contract

package
v0.3.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeAgentNameReserved               = diagnosticcontract.CodeAgentNameReserved
	CodeBinaryVersionMismatch           = diagnosticcontract.CodeBinaryVersionMismatch
	CodeBridgeHealthUnavailable         = diagnosticcontract.CodeBridgeHealthUnavailable
	CodeBridgeNotFound                  = diagnosticcontract.CodeBridgeNotFound
	CodeBridgeNotificationSuppressed    = diagnosticcontract.CodeBridgeNotificationSuppressed
	CodeBridgeReady                     = diagnosticcontract.CodeBridgeReady
	CodeBridgeTargetUnavailable         = diagnosticcontract.CodeBridgeTargetUnavailable
	CodeBulkTooLarge                    = diagnosticcontract.CodeBulkTooLarge
	CodeBundleConsentRequired           = diagnosticcontract.CodeBundleConsentRequired
	CodeBundlePartialFailure            = diagnosticcontract.CodeBundlePartialFailure
	CodeBundleSizeExceeded              = diagnosticcontract.CodeBundleSizeExceeded
	CodeConfigActiveSessionsBlock       = diagnosticcontract.CodeConfigActiveSessionsBlock
	CodeConfigApplyUnsupported          = diagnosticcontract.CodeConfigApplyUnsupported
	CodeConfigDriftPresent              = diagnosticcontract.CodeConfigDriftPresent
	CodeConfigDriftStale                = diagnosticcontract.CodeConfigDriftStale
	CodeConfigInvalid                   = diagnosticcontract.CodeConfigInvalid
	CodeConfigPartialFailure            = diagnosticcontract.CodeConfigPartialFailure
	CodeConfigReloadTimeout             = diagnosticcontract.CodeConfigReloadTimeout
	CodeConfigRestartRequired           = diagnosticcontract.CodeConfigRestartRequired
	CodeConfigValidateFailed            = diagnosticcontract.CodeConfigValidateFailed
	CodeConfigValidated                 = diagnosticcontract.CodeConfigValidated
	CodeCursorConflict                  = diagnosticcontract.CodeCursorConflict
	CodeDaemonHealthUnavailable         = diagnosticcontract.CodeDaemonHealthUnavailable
	CodeDaemonDraining                  = diagnosticcontract.CodeDaemonDraining
	CodeDaemonStateSuspect              = diagnosticcontract.CodeDaemonStateSuspect
	CodeDaemonStatusOK                  = diagnosticcontract.CodeDaemonStatusOK
	CodeDaemonUnavailable               = diagnosticcontract.CodeDaemonUnavailable
	CodeDiskWriteFailed                 = diagnosticcontract.CodeDiskWriteFailed
	CodeExtensionChecksumUnverified     = diagnosticcontract.CodeExtensionChecksumUnverified
	CodeExtensionAgentConflict          = diagnosticcontract.CodeExtensionAgentConflict
	CodeExtensionEnvBindingDangling     = diagnosticcontract.CodeExtensionEnvBindingDangling
	CodeExtensionEnvBindingInvalid      = diagnosticcontract.CodeExtensionEnvBindingInvalid
	CodeExtensionEnvBindingUndeclared   = diagnosticcontract.CodeExtensionEnvBindingUndeclared
	CodeExtensionNetworkConfirmRequired = diagnosticcontract.CodeExtensionNetworkConfirmRequired
	CodeExtensionInstallFailed          = diagnosticcontract.CodeExtensionInstallFailed
	CodeExtensionUpdateCleanupFailed    = diagnosticcontract.CodeExtensionUpdateCleanupFailed
	CodeExtensionInUse                  = diagnosticcontract.CodeExtensionInUse
	CodeExtensionNotFound               = diagnosticcontract.CodeExtensionNotFound
	CodeExtensionRuntimeUnavailable     = diagnosticcontract.CodeExtensionRuntimeUnavailable
	CodeFlagNotApplicable               = diagnosticcontract.CodeFlagNotApplicable
	CodeForbiddenOperatorAction         = diagnosticcontract.CodeForbiddenOperatorAction
	CodeForceOpRateLimited              = diagnosticcontract.CodeForceOpRateLimited
	CodeForceOpRequiresReason           = diagnosticcontract.CodeForceOpRequiresReason
	CodeHomeDiskSpaceCritical           = diagnosticcontract.CodeHomeDiskSpaceCritical
	CodeHomeDiskSpaceLow                = diagnosticcontract.CodeHomeDiskSpaceLow
	CodeHomePathMissing                 = diagnosticcontract.CodeHomePathMissing
	CodeHomePermsWrong                  = diagnosticcontract.CodeHomePermsWrong
	CodeIDFormatUnknown                 = diagnosticcontract.CodeIDFormatUnknown
	CodeIdentityLookupUnavailable       = diagnosticcontract.CodeIdentityLookupUnavailable
	CodeIdentityMismatch                = diagnosticcontract.CodeIdentityMismatch
	CodeIdentityRequired                = diagnosticcontract.CodeIdentityRequired
	CodeIdentityStale                   = diagnosticcontract.CodeIdentityStale
	CodeIdentityUnauthorized            = diagnosticcontract.CodeIdentityUnauthorized
	CodeMarketplaceUnavailable          = diagnosticcontract.CodeMarketplaceUnavailable
	CodeModelNotFound                   = diagnosticcontract.CodeModelNotFound
	CodeModelUnavailable                = diagnosticcontract.CodeModelUnavailable
	CodeMCPAuthRequired                 = diagnosticcontract.CodeMCPAuthRequired
	CodeMCPServerReady                  = diagnosticcontract.CodeMCPServerReady
	CodeMCPServerUnavailable            = diagnosticcontract.CodeMCPServerUnavailable
	CodeMigrationsPending               = diagnosticcontract.CodeMigrationsPending
	CodeNetworkDisabled                 = diagnosticcontract.CodeNetworkDisabled
	CodeNetworkReady                    = diagnosticcontract.CodeNetworkReady
	CodeNetworkUnavailable              = diagnosticcontract.CodeNetworkUnavailable
	CodePresetBuiltinProtected          = diagnosticcontract.CodePresetBuiltinProtected
	CodePresetDuplicateName             = diagnosticcontract.CodePresetDuplicateName
	CodePresetFilterInvalid             = diagnosticcontract.CodePresetFilterInvalid
	CodePresetNotFound                  = diagnosticcontract.CodePresetNotFound
	CodeProbeFailed                     = diagnosticcontract.CodeProbeFailed
	CodeProbeTimeout                    = diagnosticcontract.CodeProbeTimeout
	CodePromptDispatchIndeterminate     = diagnosticcontract.CodePromptDispatchIndeterminate
	CodePromptIdempotencyConflict       = diagnosticcontract.CodePromptIdempotencyConflict
	CodePromptMessageIdentityConflict   = diagnosticcontract.CodePromptMessageIdentityConflict
	CodeProviderClassificationUnknown   = diagnosticcontract.CodeProviderClassificationUnknown
	CodeProviderCLIMissing              = diagnosticcontract.CodeProviderCLIMissing
	CodeProviderCredentialUnresolved    = diagnosticcontract.CodeProviderCredentialUnresolved
	CodeProviderLoginRequiresLocalTTY   = diagnosticcontract.CodeProviderLoginRequiresLocalTTY
	CodeProviderAuthenticated           = diagnosticcontract.CodeProviderAuthenticated
	CodeProviderNotAuthenticated        = diagnosticcontract.CodeProviderNotAuthenticated
	CodeProviderNotInstalled            = diagnosticcontract.CodeProviderNotInstalled
	CodeProviderPermissionDenied        = diagnosticcontract.CodeProviderPermissionDenied
	CodeProviderRateLimited             = diagnosticcontract.CodeProviderRateLimited
	CodeProviderTransientFailure        = diagnosticcontract.CodeProviderTransientFailure
	CodeReasoningEffortUnsupported      = diagnosticcontract.CodeReasoningEffortUnsupported
	CodeReasoningOptionMissing          = diagnosticcontract.CodeReasoningOptionMissing
	CodeSpeedRejected                   = diagnosticcontract.CodeSpeedRejected
	CodeRoleAgentNotFound               = diagnosticcontract.CodeRoleAgentNotFound
	CodeRoleResolutionFailed            = diagnosticcontract.CodeRoleResolutionFailed
	CodeRoleUnknown                     = diagnosticcontract.CodeRoleUnknown
	CodeRetryChainTooDeep               = diagnosticcontract.CodeRetryChainTooDeep
	CodeSchedulerReady                  = diagnosticcontract.CodeSchedulerReady
	CodeSchedulerPaused                 = diagnosticcontract.CodeSchedulerPaused
	CodeSecretsPermsWrong               = diagnosticcontract.CodeSecretsPermsWrong
	CodeSessionBusy                     = diagnosticcontract.CodeSessionBusy
	CodeSessionLocked                   = diagnosticcontract.CodeSessionLocked
	CodeSessionQueueFull                = diagnosticcontract.CodeSessionQueueFull
	CodeSessionResumeAmbiguous          = diagnosticcontract.CodeSessionResumeAmbiguous
	CodeSkillRegistryReady              = diagnosticcontract.CodeSkillRegistryReady
	CodeSkillNotFound                   = diagnosticcontract.CodeSkillNotFound
	CodeSocketPathUnwritable            = diagnosticcontract.CodeSocketPathUnwritable
	CodeTargetAmbiguous                 = diagnosticcontract.CodeTargetAmbiguous
	CodeTargetUnknown                   = diagnosticcontract.CodeTargetUnknown
	CodeTaskRunAlreadyTerminal          = diagnosticcontract.CodeTaskRunAlreadyTerminal
	CodeTaskRunCrashed                  = diagnosticcontract.CodeTaskRunCrashed
	CodeTaskRunNotReleasable            = diagnosticcontract.CodeTaskRunNotReleasable
	CodeTaskRunOrphan                   = diagnosticcontract.CodeTaskRunOrphan
	CodeTaskRunStaleLease               = diagnosticcontract.CodeTaskRunStaleLease
	CodeTaskRunStillActive              = diagnosticcontract.CodeTaskRunStillActive
	CodeTaskRunStranded                 = diagnosticcontract.CodeTaskRunStranded
	CodeTaskRunStuck                    = diagnosticcontract.CodeTaskRunStuck
	CodeUnknownActorFormat              = diagnosticcontract.CodeUnknownActorFormat
	CodeUnknownComponent                = diagnosticcontract.CodeUnknownComponent
	CodeVaultRefUnresolved              = diagnosticcontract.CodeVaultRefUnresolved
)
View Source
const (
	CodeExtensionArchiveDigestMismatch   = diagnosticcontract.CodeExtensionArchiveDigestMismatch
	CodeExtensionUnverifiedPolicyBlocked = diagnosticcontract.CodeExtensionUnverifiedPolicyBlocked
)
View Source
const (
	ProviderAuthStateAuthenticated     = "authenticated"
	ProviderAuthStateNeedsLogin        = "needs_login"
	ProviderAuthStateMissingCLI        = "missing_cli"
	ProviderAuthStateMissingCredential = "missing_credential"
	ProviderAuthStatePermissionDenied  = "permission_denied"
	ProviderAuthStateRateLimited       = "rate_limited"
	ProviderAuthStateTransient         = "transient"
	ProviderAuthStateNone              = "none"
	ProviderAuthStateUnknown           = "unknown"
)
View Source
const (

	// SessionAttachDefaultTTLSeconds is the lease duration used when attach omits a positive TTL.
	SessionAttachDefaultTTLSeconds = 15 * 60
	// SessionAttachMaxTTLSeconds is the largest attach lease accepted by the daemon.
	SessionAttachMaxTTLSeconds = 24 * 60 * 60
)
View Source
const (
	SessionStreamFrameRaw        = "raw"
	SessionStreamFrameTranscript = "transcript"

	SessionStreamEventTranscriptSnapshot  = "transcript_snapshot"
	SessionStreamEventTranscriptDelta     = "transcript_delta"
	SessionStreamEventGoalSnapshotChanged = "goal_snapshot_changed"
	SessionStreamEventCommandsChanged     = "session_commands_changed"

	TranscriptSnapshotReasonFenceMissing       = "fence_missing"
	TranscriptSnapshotReasonEpochMismatch      = "epoch_mismatch"
	TranscriptSnapshotReasonGenerationMismatch = "generation_mismatch"
	TranscriptSnapshotReasonSequenceReset      = "sequence_reset"
)
View Source
const (
	SpeedNormal = speedpkg.SpeedNormal
	SpeedFast   = speedpkg.SpeedFast
)
View Source
const (
	SpeedResolutionApplied     = speedpkg.ResolutionApplied
	SpeedResolutionUnsupported = speedpkg.ResolutionUnsupported
	SpeedResolutionRejected    = speedpkg.ResolutionRejected
)
View Source
const (
	SpeedResolutionReasonCapabilityAbsent    = speedpkg.ReasonCapabilityAbsent
	SpeedResolutionReasonCapabilityAmbiguous = speedpkg.ReasonCapabilityAmbiguous
	SpeedResolutionReasonValueAmbiguous      = speedpkg.ReasonValueAmbiguous
	SpeedResolutionReasonProviderRejected    = speedpkg.ReasonProviderRejected
)
View Source
const (
	ToolOperatorCauseDetailKey    = "operator_cause"
	ToolOperatorRecoveryDetailKey = "operator_recovery"
)
View Source
const (
	WindowManagerFrameSnapshot = "snapshot"
	WindowManagerFrameEvent    = "event"
	WindowManagerFrameClient   = "client"
	WindowManagerFrameError    = "error"
)
View Source
const LoopRunWebRoute = "/loop-runs/%s"

LoopRunWebRoute is the public SPA route for one persisted Loop run.

View Source
const (
	// NetworkPresenceLocal identifies a daemon-local peer joined to a channel.
	NetworkPresenceLocal = "local"
)
View Source
const ObserveOverviewSchemaVersion = "observe-overview/v1"

ObserveOverviewSchemaVersion identifies the home overview payload contract revision.

View Source
const SchedulerDrainTimeoutMaxSeconds int64 = math.MaxInt64 / int64(time.Second)

SchedulerDrainTimeoutMaxSeconds is the largest whole-second timeout that can be represented by time.Duration.

View Source
const (
	// StatusSchemaVersion identifies the public status/doctor payload contract.
	StatusSchemaVersion = "2026-07-16"
)
View Source
const TaskRunConversationThreadID = "thread_agent_channel"

TaskRunConversationThreadID is the deterministic thread identifier used by Live task runs.

Variables

View Source
var (
	// ErrRawClaimTokenMetadata reports an unsafe raw lease credential in channel metadata.
	ErrRawClaimTokenMetadata = errors.New("contract: coordination metadata must not contain raw lease credentials")
	// ErrInvalidCoordinationMessageMetadata reports missing or invalid typed correlation metadata.
	ErrInvalidCoordinationMessageMetadata = errors.New("contract: invalid coordination message metadata")
)
View Source
var (
	// ErrUnsafeAuthoredContextPayload reports raw credentials or disallowed prompt data in a public DTO.
	ErrUnsafeAuthoredContextPayload = errors.New(
		"contract: authored context payload contains unsafe token or prompt data",
	)
	// ErrInvalidAuthoredContextEnum reports a value outside a closed public contract enum.
	ErrInvalidAuthoredContextEnum = errors.New("contract: invalid authored context enum")
)
View Source
var ErrBridgeInstanceMismatch = bridgeContractError("bridge instance id must match request path")

ErrBridgeInstanceMismatch reports a body/path bridge-instance mismatch for typed delivery-target requests.

View Source
var ErrUnsafeBridgeProviderConfigPayload = bridgeContractError(
	"bridge provider config contains unsafe token or secret data",
)

ErrUnsafeBridgeProviderConfigPayload reports raw credentials in bridge provider config JSON.

View Source
var ErrWindowManagerUnsafeRevision = errors.New("window manager revision exceeds the JSON safe integer range")

ErrWindowManagerUnsafeRevision identifies a domain revision that cannot be represented on the wire.

Functions

func ACPPromptStopReasonValues

func ACPPromptStopReasonValues() []string

ACPPromptStopReasonValues returns the closed ACP prompt stop vocabulary.

func AgentSoulRevisionActionValues

func AgentSoulRevisionActionValues() []string

AgentSoulRevisionActionValues returns the closed Soul revision action enum values.

func AuthoredDiagnosticSeverityValues

func AuthoredDiagnosticSeverityValues() []string

AuthoredDiagnosticSeverityValues returns the closed diagnostic severity enum values.

func AuthoredValidationStatusValues

func AuthoredValidationStatusValues() []string

AuthoredValidationStatusValues returns the closed authored validation status enum values.

func BridgeSendTestStatusValues

func BridgeSendTestStatusValues() []string

BridgeSendTestStatusValues returns the closed send-test status vocabulary.

func ContainsRawClaimTokenField

func ContainsRawClaimTokenField(payload any) (bool, error)

ContainsRawClaimTokenField reports whether a JSON payload includes a raw claim_token field.

func ContainsUnsafeAuthoredContextPayload

func ContainsUnsafeAuthoredContextPayload(payload any) (bool, error)

ContainsUnsafeAuthoredContextPayload reports whether a payload includes raw credentials or prompt data.

func DiagnosticCodeCategory

func DiagnosticCodeCategory(code string) (string, bool)

DiagnosticCodeCategory returns the canonical category for code.

func DiagnosticCodes

func DiagnosticCodes() []string

DiagnosticCodes returns all registered deterministic diagnostic codes.

func FilterToolOperatorFailureDetails

func FilterToolOperatorFailureDetails(details map[string]json.RawMessage) map[string]json.RawMessage

FilterToolOperatorFailureDetails retains only the two explicitly safe remediation fields.

func GoalCommandOutcomeValues

func GoalCommandOutcomeValues() []string

GoalCommandOutcomeValues returns the closed structured Goal result vocabulary.

func GoalContextStateValues

func GoalContextStateValues() []string

GoalContextStateValues returns the closed context freshness vocabulary.

func GoalPromptKindValues

func GoalPromptKindValues() []string

GoalPromptKindValues returns the closed transcript Goal prompt vocabulary.

func GoalReasonCodeValues

func GoalReasonCodeValues() []string

GoalReasonCodeValues returns the stable public Goal reason vocabulary.

func GoalSnapshotChangeCauseValues

func GoalSnapshotChangeCauseValues() []string

GoalSnapshotChangeCauseValues returns the closed session projection cause vocabulary.

func GoalStatusValues

func GoalStatusValues() []string

GoalStatusValues returns the closed public Goal lifecycle vocabulary.

func GoalTurnResultStatusValues

func GoalTurnResultStatusValues() []string

GoalTurnResultStatusValues returns the closed Goal turn result vocabulary.

func GoalVerdictOutcomeValues

func GoalVerdictOutcomeValues() []string

GoalVerdictOutcomeValues returns the closed Goal judge outcome vocabulary.

func HeartbeatActorKindValues

func HeartbeatActorKindValues() []string

HeartbeatActorKindValues returns the closed Heartbeat actor kind enum values.

func HeartbeatRevisionOperationValues

func HeartbeatRevisionOperationValues() []string

HeartbeatRevisionOperationValues returns the closed Heartbeat revision operation enum values.

func HeartbeatWakeReasonValues

func HeartbeatWakeReasonValues() []string

HeartbeatWakeReasonValues returns the closed wake reason enum values.

func HeartbeatWakeResultValues

func HeartbeatWakeResultValues() []string

HeartbeatWakeResultValues returns the closed wake result enum values.

func HeartbeatWakeSourceValues

func HeartbeatWakeSourceValues() []string

HeartbeatWakeSourceValues returns the closed wake source enum values.

func IsDiagnosticCategory

func IsDiagnosticCategory(category string) bool

IsDiagnosticCategory reports whether category belongs to the closed set.

func IsDiagnosticCode

func IsDiagnosticCode(code string) bool

IsDiagnosticCode reports whether code belongs to the canonical registry.

func IsDiagnosticFreshness

func IsDiagnosticFreshness(freshness string) bool

IsDiagnosticFreshness reports whether freshness belongs to the closed set.

func IsDiagnosticSeverity

func IsDiagnosticSeverity(severity string) bool

IsDiagnosticSeverity reports whether severity belongs to the closed set.

func IssueSeverityValues

func IssueSeverityValues() []string

IssueSeverityValues returns the closed validation-severity set.

func LoopGateVerdictOutcomeValues

func LoopGateVerdictOutcomeValues() []string

LoopGateVerdictOutcomeValues returns the closed machine-verdict vocabulary.

func LoopGenerationOriginValues

func LoopGenerationOriginValues() []string

LoopGenerationOriginValues returns the closed generation provenance vocabulary.

func LoopMetricDirectionValues

func LoopMetricDirectionValues() []string

LoopMetricDirectionValues returns the closed gate metric direction vocabulary.

func LoopNodeInventoryStateValues

func LoopNodeInventoryStateValues() []string

LoopNodeInventoryStateValues returns the closed inventory-state vocabulary.

func LoopParentClosePolicyValues

func LoopParentClosePolicyValues() []string

LoopParentClosePolicyValues returns the closed parent-close vocabulary.

func LoopRunEventKindValues

func LoopRunEventKindValues() []string

LoopRunEventKindValues returns the closed public loop run event vocabulary.

func LoopRunLifecycleEventKindValues

func LoopRunLifecycleEventKindValues() []string

LoopRunLifecycleEventKindValues returns event kinds that mutate durable run state.

func LoopRunLiveStatusValues

func LoopRunLiveStatusValues() []string

LoopRunLiveStatusValues returns the non-terminal loop run statuses.

func LoopRunStatusValues

func LoopRunStatusValues() []string

LoopRunStatusValues returns the closed public loop run status vocabulary.

func LoopRunTerminalStatusValues

func LoopRunTerminalStatusValues() []string

LoopRunTerminalStatusValues returns the terminal loop run statuses.

func LoopRunTransitionCauseValues

func LoopRunTransitionCauseValues() []string

LoopRunTransitionCauseValues returns the closed public transition-cause vocabulary.

func LoopWatchEventKindValues

func LoopWatchEventKindValues() []string

LoopWatchEventKindValues returns the closed watch-events kind vocabulary in ADR-004 order. It is the single source consumed by the OpenAPI enum registration and the generated web `LOOP_WATCH_EVENT_KINDS` array, so the authoring kind-select never hand-authors the enum in TypeScript.

func MarketplaceKindValues

func MarketplaceKindValues() []string

MarketplaceKindValues returns the closed marketplace catalog set.

func PromptRuntimeSelectionFromPayload

func PromptRuntimeSelectionFromPayload(
	payload *PromptRuntimeSelectionPayload,
) *session.RuntimeSelection

PromptRuntimeSelectionFromPayload converts an optional prompt runtime snapshot.

func SchedulerBacklogDomainQuery

func SchedulerBacklogDomainQuery(query SchedulerBacklogQuery) taskpkg.SchedulerBacklogQuery

SchedulerBacklogDomainQuery converts API filters into task-domain filters.

func SessionHealthIneligibilityReasonValues

func SessionHealthIneligibilityReasonValues() []string

SessionHealthIneligibilityReasonValues returns closed wake-ineligibility reason enum values.

func SessionHealthStateValues

func SessionHealthStateValues() []string

SessionHealthStateValues returns the closed session health state enum values.

func SessionHealthStatusValues

func SessionHealthStatusValues() []string

SessionHealthStatusValues returns the closed session health status enum values.

func ToolOperatorFailureDetails

func ToolOperatorFailureDetails(failure *tools.OperatorFailure) map[string]json.RawMessage

ToolOperatorFailureDetails projects explicitly authored operator-safe remediation.

func ValidateAuthoredContextRedacted

func ValidateAuthoredContextRedacted(payload any) error

ValidateAuthoredContextRedacted rejects raw credentials or disallowed prompt data in public DTOs.

func ValidateDiagnosticItem

func ValidateDiagnosticItem(item DiagnosticItem) error

ValidateDiagnosticItem checks the public contract without mutating it.

func ValidateDiagnosticRegistry

func ValidateDiagnosticRegistry() error

ValidateDiagnosticRegistry checks duplicate codes and unknown categories.

func ValidateNoCallerSuppliedNetworkIdentity

func ValidateNoCallerSuppliedNetworkIdentity(raw map[string]json.RawMessage, requestName string) error

ValidateNoCallerSuppliedNetworkIdentity rejects caller-authored sender identity and proof fields.

func ValidateNoRawClaimTokenField

func ValidateNoRawClaimTokenField(payload any) error

ValidateNoRawClaimTokenField rejects payloads that include a raw claim_token JSON field.

func ValidateTaskInboxQuery

func ValidateTaskInboxQuery(query TaskInboxQuery, path string) error

ValidateTaskInboxQuery validates transport-owned fields before workspace resolution or storage access.

func ValidateTaskListQuery

func ValidateTaskListQuery(query TaskListQuery, path string) error

ValidateTaskListQuery validates transport-owned fields before workspace resolution or storage access.

func WindowManagerCommandIDValues

func WindowManagerCommandIDValues() []string

WindowManagerCommandIDValues returns every supported semantic command id.

func WindowManagerErrorCodeValues

func WindowManagerErrorCodeValues() []string

WindowManagerErrorCodeValues returns every public window-manager error code.

Types

type ACPAvailableCommandInputPayload

type ACPAvailableCommandInputPayload struct {
	Hint string `json:"hint"`
}

ACPAvailableCommandInputPayload describes the optional unstructured command argument.

type ACPAvailableCommandPayload

type ACPAvailableCommandPayload struct {
	Name        string                           `json:"name"`
	Description string                           `json:"description"`
	Input       *ACPAvailableCommandInputPayload `json:"input,omitempty"`
}

ACPAvailableCommandPayload is one command in the session's current replacement set.

type ACPCapsPayload

type ACPCapsPayload struct {
	SupportsLoadSession bool                         `json:"supports_load_session"`
	SupportedModes      []string                     `json:"supported_modes,omitempty"`
	ConfigOptions       []SessionConfigOptionPayload `json:"config_options,omitempty"`
}

ACPCapsPayload is the JSON representation of ACP capabilities.

type ACPPromptStopReason

type ACPPromptStopReason string

ACPPromptStopReason is the closed turn-completion vocabulary exposed by ACP sessions.

const (
	ACPStopReasonEndTurn         ACPPromptStopReason = "end_turn"
	ACPStopReasonMaxTokens       ACPPromptStopReason = "max_tokens"
	ACPStopReasonMaxTurnRequests ACPPromptStopReason = "max_turn_requests"
	ACPStopReasonRefusal         ACPPromptStopReason = "refusal"
	// ACP spells the cancellation wire value with a doubled l.
	ACPStopReasonCancelled ACPPromptStopReason = "cancel" + "led"
)

type AddTaskDependencyRequest

type AddTaskDependencyRequest struct {
	DependsOnTaskID string                 `json:"depends_on_task_id"`
	Kind            taskpkg.DependencyKind `json:"kind,omitempty"`
}

AddTaskDependencyRequest is the shared dependency-create request payload.

type AgentCapabilityPayload

type AgentCapabilityPayload struct {
	ID      string `json:"id"`
	Summary string `json:"summary,omitempty"`
	Source  string `json:"source,omitempty"`
}

AgentCapabilityPayload describes one caller capability atom.

type AgentCapabilitySectionPayload

type AgentCapabilitySectionPayload struct {
	Section      AgentContextSectionMetaPayload `json:"section"`
	Capabilities []AgentCapabilityPayload       `json:"capabilities"`
}

AgentCapabilitySectionPayload is the bounded capability section in `/agent/context`.

type AgentCatalogFacetsPayload

type AgentCatalogFacetsPayload struct {
	Categories []string `json:"categories"`
	Total      int      `json:"total"`
	Active     int      `json:"active"`
	Idle       int      `json:"idle"`
}

AgentCatalogFacetsPayload contains fleet-wide values before search, filters, and cursor pagination. Active and Idle are exact only when the enclosing response reports SessionsAvailable.

type AgentCatalogItemPayload

type AgentCatalogItemPayload struct {
	Agent    AgentPayload                `json:"agent"`
	Sessions *AgentSessionMetricsPayload `json:"sessions,omitempty"`
}

AgentCatalogItemPayload combines one effective definition with its optional runtime session aggregate. Sessions is nil when the session authority is temporarily unavailable.

type AgentCatalogResponse

type AgentCatalogResponse struct {
	Agents            []AgentCatalogItemPayload `json:"agents"`
	Page              CountedCursorPagePayload  `json:"page"`
	Facets            AgentCatalogFacetsPayload `json:"facets"`
	SessionsAvailable bool                      `json:"sessions_available"`
}

AgentCatalogResponse is one bounded workspace-scoped agent fleet page.

type AgentChannelMessagePayload

type AgentChannelMessagePayload struct {
	MessageID     string                             `json:"message_id"`
	ChannelID     string                             `json:"channel_id"`
	FromSessionID string                             `json:"from_session_id"`
	ToSessionID   string                             `json:"to_session_id,omitempty"`
	Body          json.RawMessage                    `json:"body"`
	Metadata      CoordinationMessageMetadataPayload `json:"metadata"`
	Timestamp     time.Time                          `json:"timestamp"`
}

AgentChannelMessagePayload is one safe channel message read projection.

type AgentChannelMessageResponse

type AgentChannelMessageResponse struct {
	Message AgentChannelMessagePayload `json:"message"`
}

AgentChannelMessageResponse wraps one sent channel message.

type AgentChannelMessagesResponse

type AgentChannelMessagesResponse struct {
	Messages []AgentChannelMessagePayload `json:"messages"`
}

AgentChannelMessagesResponse wraps channel inbox messages.

type AgentChannelReplyRequest

type AgentChannelReplyRequest struct {
	ReplyToMessageID string                             `json:"reply_to_message_id"`
	Body             json.RawMessage                    `json:"body"`
	Metadata         CoordinationMessageMetadataPayload `json:"metadata"`
	IdempotencyKey   string                             `json:"idempotency_key,omitempty"`
}

AgentChannelReplyRequest replies to one delivered coordination message.

type AgentChannelSendRequest

type AgentChannelSendRequest struct {
	Body           json.RawMessage                    `json:"body"`
	Metadata       CoordinationMessageMetadataPayload `json:"metadata"`
	IdempotencyKey string                             `json:"idempotency_key,omitempty"`
}

AgentChannelSendRequest sends one task-bound coordination message.

func (*AgentChannelSendRequest) UnmarshalJSON

func (r *AgentChannelSendRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON rejects caller-supplied envelope identity on the agent channel surface.

type AgentChannelsResponse

type AgentChannelsResponse struct {
	Channels []CoordinationChannelPayload `json:"channels"`
}

AgentChannelsResponse wraps discoverable coordination channels for the caller.

type AgentContextPayload

type AgentContextPayload struct {
	Self                AgentIdentityPayload                   `json:"self"`
	Workspace           AgentWorkspacePayload                  `json:"workspace"`
	Session             AgentSessionPayload                    `json:"session"`
	Soul                AgentSoulSectionPayload                `json:"soul"`
	Task                AgentTaskContextPayload                `json:"task"`
	CoordinationChannel AgentCoordinationChannelContextPayload `json:"coordination_channel"`
	InboxSummary        AgentInboxSummaryPayload               `json:"inbox_summary"`
	PeerRoster          AgentPeerRosterPayload                 `json:"peer_roster"`
	Capabilities        AgentCapabilitySectionPayload          `json:"capabilities"`
	Limits              AgentLimitsPayload                     `json:"limits"`
	Provenance          AgentContextProvenancePayload          `json:"provenance"`
}

AgentContextPayload is the stable bounded situation payload returned by `/agent/context`.

func NormalizeAgentContextPayload

func NormalizeAgentContextPayload(source *AgentContextPayload) AgentContextPayload

NormalizeAgentContextPayload returns a context payload with stable bounded list sections.

type AgentContextProvenancePayload

type AgentContextProvenancePayload struct {
	GeneratedAt time.Time `json:"generated_at"`
	Source      string    `json:"source"`
}

AgentContextProvenancePayload describes when and how an agent context was assembled.

type AgentContextResponse

type AgentContextResponse struct {
	Context AgentContextPayload `json:"context"`
}

AgentContextResponse wraps the bounded caller situation payload.

type AgentContextSectionMetaPayload

type AgentContextSectionMetaPayload struct {
	Limit     int  `json:"limit"`
	Returned  int  `json:"returned"`
	Truncated bool `json:"truncated"`
}

AgentContextSectionMetaPayload reports bounding/truncation metadata for context sections.

type AgentCoordinationChannelContextPayload

type AgentCoordinationChannelContextPayload struct {
	Available bool                        `json:"available"`
	Channel   *CoordinationChannelPayload `json:"channel,omitempty"`
}

AgentCoordinationChannelContextPayload is the active coordination-channel section.

type AgentCoordinatorConfigResponse

type AgentCoordinatorConfigResponse struct {
	Coordinator CoordinatorConfigPayload `json:"coordinator"`
}

AgentCoordinatorConfigResponse wraps coordinator config read state.

type AgentCreateScope

type AgentCreateScope string

AgentCreateScope identifies where a newly authored AGENT.md definition is stored.

const (
	// AgentCreateScopeWorkspace writes the agent under one workspace's .compozy directory.
	AgentCreateScopeWorkspace AgentCreateScope = "workspace"
	// AgentCreateScopeGlobal writes the agent under COMPOZY_HOME.
	AgentCreateScopeGlobal AgentCreateScope = "global"
)

type AgentDiagnosticPayload

type AgentDiagnosticPayload struct {
	Path      string `json:"path"`
	ErrorKind string `json:"error_kind"`
	Message   string `json:"message"`
}

AgentDiagnosticPayload reports one malformed agent definition encountered during discovery.

type AgentEffectiveRuntimePayload

type AgentEffectiveRuntimePayload struct {
	Provider        string                       `json:"provider"`
	Model           string                       `json:"model,omitempty"`
	ReasoningEffort ReasoningEffort              `json:"reasoning_effort,omitempty"`
	Sources         AgentEffectiveRuntimeSources `json:"sources"`
}

AgentEffectiveRuntimePayload is the workspace-scoped runtime projection for one authored agent definition.

type AgentEffectiveRuntimeSources

type AgentEffectiveRuntimeSources struct {
	Provider        AgentRuntimeValueSource `json:"provider"`
	Model           AgentRuntimeValueSource `json:"model,omitempty"`
	ReasoningEffort AgentRuntimeValueSource `json:"reasoning_effort,omitempty"`
}

AgentEffectiveRuntimeSources reports provenance for effective agent runtime values.

type AgentEventPayload

type AgentEventPayload struct {
	Type              string                       `json:"type"`
	SessionID         string                       `json:"session_id,omitempty"`
	TurnID            string                       `json:"turn_id,omitempty"`
	MessageID         string                       `json:"message_id,omitempty"`
	RequestID         string                       `json:"request_id,omitempty"`
	Timestamp         time.Time                    `json:"timestamp"`
	Text              string                       `json:"text,omitempty"`
	Title             string                       `json:"title,omitempty"`
	ToolCallID        string                       `json:"tool_call_id,omitempty"`
	StopReason        string                       `json:"stop_reason,omitempty"`
	PromptStopReason  ACPPromptStopReason          `json:"prompt_stop_reason,omitempty"`
	AvailableCommands []ACPAvailableCommandPayload `json:"available_commands,omitempty"`
	Action            string                       `json:"action,omitempty"`
	Resource          string                       `json:"resource,omitempty"`
	Decision          string                       `json:"decision,omitempty"`
	Error             string                       `json:"error,omitempty"`
	Failure           *SessionFailurePayload       `json:"failure,omitempty"`
	Goal              *GoalPromptMeta              `json:"goal,omitempty"`
	Usage             *TokenUsagePayload           `json:"usage,omitempty"`
	Runtime           *RuntimeActivityPayload      `json:"runtime,omitempty"`
	PromptRuntime     *RuntimeSelectionPayload     `json:"prompt_runtime,omitempty"`
	Raw               json.RawMessage              `json:"raw,omitempty"`
}

AgentEventPayload is the shared raw agent-event streaming payload.

type AgentIdentityPayload

type AgentIdentityPayload struct {
	SessionID string `json:"session_id"`
	AgentName string `json:"agent_name"`
	Provider  string `json:"provider"`
	Model     string `json:"model,omitempty"`
}

AgentIdentityPayload describes the daemon-authenticated caller identity.

type AgentInboxItemPayload

type AgentInboxItemPayload struct {
	MessageID string                             `json:"message_id"`
	ChannelID string                             `json:"channel_id"`
	Kind      CoordinationMessageKind            `json:"kind"`
	Metadata  CoordinationMessageMetadataPayload `json:"metadata"`
	Preview   string                             `json:"preview,omitempty"`
	Timestamp time.Time                          `json:"timestamp"`
}

AgentInboxItemPayload is one compact inbox item in the bounded agent context.

type AgentInboxSummaryPayload

type AgentInboxSummaryPayload struct {
	Section     AgentContextSectionMetaPayload `json:"section"`
	UnreadCount int                            `json:"unread_count"`
	Items       []AgentInboxItemPayload        `json:"items"`
}

AgentInboxSummaryPayload is the bounded inbox section in `/agent/context`.

type AgentLimitsPayload

type AgentLimitsPayload struct {
	MaxChildren         int `json:"max_children"`
	MaxSpawnDepth       int `json:"max_spawn_depth"`
	MaxActiveTaskLeases int `json:"max_active_task_leases"`
	ContextSectionLimit int `json:"context_section_limit"`
}

AgentLimitsPayload reports safe runtime limits relevant to agent decisions.

type AgentMCPServerJSON

type AgentMCPServerJSON struct {
	Name      string                            `json:"name"`
	Transport string                            `json:"transport,omitempty"`
	Command   string                            `json:"command,omitempty"`
	Args      []string                          `json:"args,omitempty"`
	Env       map[string]string                 `json:"env,omitempty"`
	SecretEnv map[string]string                 `json:"secret_env,omitempty"`
	URL       string                            `json:"url,omitempty"`
	Auth      *SettingsMCPAuthConfigViewPayload `json:"auth,omitempty"`
}

AgentMCPServerJSON is the shared MCP server response payload.

type AgentMePayload

type AgentMePayload struct {
	Self             AgentIdentityPayload         `json:"self"`
	Workspace        AgentWorkspacePayload        `json:"workspace"`
	Session          AgentSessionPayload          `json:"session"`
	Capabilities     []AgentCapabilityPayload     `json:"capabilities"`
	Channels         []CoordinationChannelPayload `json:"channels"`
	ActiveTaskLeases []TaskRunLeaseSummaryPayload `json:"active_task_leases"`
	Coordinator      CoordinatorConfigPayload     `json:"coordinator"`
	Limits           AgentLimitsPayload           `json:"limits"`
}

AgentMePayload is the compact caller state returned by `/agent/me`.

func NormalizeAgentMePayload

func NormalizeAgentMePayload(payload AgentMePayload) AgentMePayload

NormalizeAgentMePayload returns a payload with nil list sections converted to empty arrays.

type AgentMeResponse

type AgentMeResponse struct {
	Me AgentMePayload `json:"me"`
}

AgentMeResponse wraps the resolved caller payload.

type AgentOrigin

type AgentOrigin string

AgentOrigin identifies the authored root that owns an effective definition.

const (
	// AgentOriginGlobal identifies a definition stored under COMPOZY_HOME.
	AgentOriginGlobal AgentOrigin = "global"
	// AgentOriginWorkspace identifies a definition stored under a workspace root.
	AgentOriginWorkspace AgentOrigin = "workspace"
)

type AgentPayload

type AgentPayload struct {
	Name             string                        `json:"name"`
	Provider         string                        `json:"provider"`
	Command          string                        `json:"command,omitempty"`
	Model            string                        `json:"model,omitempty"`
	ReasoningEffort  ReasoningEffort               `json:"reasoning_effort,omitempty"`
	Tools            []string                      `json:"tools,omitempty"`
	Toolsets         []string                      `json:"toolsets,omitempty"`
	DenyTools        []string                      `json:"deny_tools,omitempty"`
	Permissions      string                        `json:"permissions,omitempty"`
	CategoryPath     []string                      `json:"category_path,omitempty"`
	MCPServers       []AgentMCPServerJSON          `json:"mcp_servers,omitempty"`
	Origin           AgentOrigin                   `json:"origin"`
	WorkspaceID      string                        `json:"workspace_id,omitempty"`
	Skills           *CreateAgentSkillsConfig      `json:"skills,omitempty"`
	DefinitionDigest string                        `json:"definition_digest"`
	Prompt           string                        `json:"prompt"`
	Diagnostics      []AgentDiagnosticPayload      `json:"diagnostics,omitempty"`
	EffectiveRuntime *AgentEffectiveRuntimePayload `json:"effective_runtime,omitempty"`
}

AgentPayload is the shared agent definition response payload.

type AgentPeerRosterPayload

type AgentPeerRosterPayload struct {
	Section AgentContextSectionMetaPayload `json:"section"`
	Peers   []AgentPeerSummaryPayload      `json:"peers"`
}

AgentPeerRosterPayload is the bounded peer roster section in `/agent/context`.

type AgentPeerSummaryPayload

type AgentPeerSummaryPayload struct {
	PeerID       string   `json:"peer_id"`
	SessionID    string   `json:"session_id,omitempty"`
	DisplayName  string   `json:"display_name,omitempty"`
	ChannelID    string   `json:"channel_id,omitempty"`
	Capabilities []string `json:"capabilities"`
}

AgentPeerSummaryPayload is one compact peer entry in the bounded agent context.

type AgentProbeHealthPayload

type AgentProbeHealthPayload struct {
	AgentName  string    `json:"agent_name,omitempty"`
	Provider   string    `json:"provider,omitempty"`
	Command    string    `json:"command,omitempty"`
	Executable string    `json:"executable,omitempty"`
	Status     string    `json:"status"`
	Error      string    `json:"error,omitempty"`
	CheckedAt  time.Time `json:"checked_at"`
	DurationMS int64     `json:"duration_ms"`
}

AgentProbeHealthPayload exposes one downstream ACP command probe result.

type AgentResponse

type AgentResponse struct {
	Agent AgentPayload `json:"agent"`
}

AgentResponse wraps one shared agent payload.

type AgentRuntimeValueSource

type AgentRuntimeValueSource string

AgentRuntimeValueSource identifies the authored/default layer that supplied one effective runtime value.

const (
	AgentRuntimeValueSourceAgent           AgentRuntimeValueSource = "agent"
	AgentRuntimeValueSourceProjectDefault  AgentRuntimeValueSource = "project_default"
	AgentRuntimeValueSourceProviderDefault AgentRuntimeValueSource = "provider_default"
	AgentRuntimeValueSourceModelDefault    AgentRuntimeValueSource = "model_default"
)

type AgentSessionMetricsPayload

type AgentSessionMetricsPayload struct {
	Total          int        `json:"total"`
	Active         int        `json:"active"`
	Failed         int        `json:"failed"`
	RuntimeSeconds int64      `json:"runtime_seconds"`
	LastActivityAt *time.Time `json:"last_activity_at,omitempty"`
}

AgentSessionMetricsPayload contains exact visible-session aggregates for one agent.

type AgentSessionPayload

type AgentSessionPayload struct {
	ID                           string                 `json:"id"`
	Name                         string                 `json:"name,omitempty"`
	Type                         session.Type           `json:"type,omitempty"`
	State                        session.State          `json:"state"`
	ResolvedNetworkParticipation *participation.Spec    `json:"resolved_network_participation,omitempty"`
	Lineage                      *SessionLineagePayload `json:"lineage,omitempty"`
	CreatedAt                    time.Time              `json:"created_at"`
	UpdatedAt                    time.Time              `json:"updated_at"`
}

AgentSessionPayload is the compact session context used by agent endpoints.

func NormalizeAgentSessionPayload

func NormalizeAgentSessionPayload(payload AgentSessionPayload) AgentSessionPayload

NormalizeAgentSessionPayload clones nested snapshots and normalizes lineage lists.

type AgentSoulConfigProvenancePayload

type AgentSoulConfigProvenancePayload struct {
	Digest                 string `json:"digest"`
	Source                 string `json:"source,omitempty"`
	Enabled                bool   `json:"enabled"`
	MaxBodyBytes           int64  `json:"max_body_bytes"`
	ContextProjectionBytes int64  `json:"context_projection_bytes"`
}

AgentSoulConfigProvenancePayload reports the Soul config subset that shaped a read model.

func AgentSoulConfigProvenancePayloadFromDomain

func AgentSoulConfigProvenancePayloadFromDomain(
	provenance soulpkg.ConfigProvenance,
) AgentSoulConfigProvenancePayload

AgentSoulConfigProvenancePayloadFromDomain converts Soul config provenance into the public DTO.

type AgentSoulDeleteByPathRequest

type AgentSoulDeleteByPathRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	ExpectedDigest string `json:"expected_digest"`
}

AgentSoulDeleteByPathRequest removes SOUL.md for the route agent.

type AgentSoulDeleteRequest

type AgentSoulDeleteRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	AgentName      string `json:"agent_name"`
	ExpectedDigest string `json:"expected_digest"`
}

AgentSoulDeleteRequest removes SOUL.md through the managed authoring service.

type AgentSoulFrontmatterPayload

type AgentSoulFrontmatterPayload struct {
	Version       string   `json:"version,omitempty"`
	Role          string   `json:"role,omitempty"`
	Tone          []string `json:"tone,omitempty"`
	Principles    []string `json:"principles,omitempty"`
	Constraints   []string `json:"constraints,omitempty"`
	Collaboration []string `json:"collaboration,omitempty"`
	MemoryPolicy  []string `json:"memory_policy,omitempty"`
	Tags          []string `json:"tags,omitempty"`
}

AgentSoulFrontmatterPayload is the allowlisted strict SOUL.md metadata projection.

type AgentSoulHistoryRequest

type AgentSoulHistoryRequest struct {
	WorkspaceID string `json:"workspace_id,omitempty"`
	AgentName   string `json:"agent_name"`
	Limit       int    `json:"limit,omitempty"`
	Cursor      string `json:"cursor,omitempty"`
}

AgentSoulHistoryRequest lists managed SOUL.md authoring revisions.

type AgentSoulHistoryResponse

type AgentSoulHistoryResponse struct {
	Revisions  []AgentSoulRevisionPayload `json:"revisions"`
	NextCursor string                     `json:"next_cursor,omitempty"`
}

AgentSoulHistoryResponse returns bounded SOUL.md authoring history.

type AgentSoulMutationResponse

type AgentSoulMutationResponse struct {
	Soul     AgentSoulPayload         `json:"soul"`
	Revision AgentSoulRevisionPayload `json:"revision"`
}

AgentSoulMutationResponse returns the post-mutation read model and audit row.

type AgentSoulPayload

type AgentSoulPayload struct {
	AgentName        string                             `json:"agent_name,omitempty"`
	Enabled          bool                               `json:"enabled"`
	Present          bool                               `json:"present"`
	Active           bool                               `json:"active"`
	Valid            bool                               `json:"valid"`
	ValidationStatus AuthoredValidationStatus           `json:"validation_status"`
	SnapshotID       string                             `json:"snapshot_id,omitempty"`
	RevisionID       string                             `json:"revision_id,omitempty"`
	Digest           string                             `json:"digest,omitempty"`
	SourcePath       string                             `json:"source_path,omitempty"`
	Frontmatter      AgentSoulFrontmatterPayload        `json:"frontmatter"`
	Body             string                             `json:"body,omitempty"`
	Truncated        bool                               `json:"truncated,omitempty"`
	Limits           AuthoredContextLimitsPayload       `json:"limits"`
	ConfigProvenance AgentSoulConfigProvenancePayload   `json:"config_provenance"`
	Diagnostics      []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
	CreatedAt        *time.Time                         `json:"created_at,omitempty"`
}

AgentSoulPayload is the full resolved Soul read model for dedicated inspect/authoring surfaces.

func AgentSoulPayloadFromResolved

func AgentSoulPayloadFromResolved(
	agentName string,
	resolved *soulpkg.ResolvedSoul,
	snapshotID string,
	configProvenance soulpkg.ConfigProvenance,
) AgentSoulPayload

AgentSoulPayloadFromResolved converts a resolver result into the full Soul read model.

type AgentSoulPutByPathRequest

type AgentSoulPutByPathRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	Body           string `json:"body"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

AgentSoulPutByPathRequest creates or replaces SOUL.md for the route agent.

type AgentSoulPutRequest

type AgentSoulPutRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	AgentName      string `json:"agent_name"`
	Body           string `json:"body"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

AgentSoulPutRequest creates or replaces SOUL.md through the managed authoring service.

type AgentSoulRevisionAction

type AgentSoulRevisionAction string

AgentSoulRevisionAction describes one managed SOUL.md authoring mutation.

const (
	AgentSoulRevisionPut      AgentSoulRevisionAction = "put"
	AgentSoulRevisionDelete   AgentSoulRevisionAction = "delete"
	AgentSoulRevisionRollback AgentSoulRevisionAction = "rollback"
)

type AgentSoulRevisionPayload

type AgentSoulRevisionPayload struct {
	ID             string                             `json:"id"`
	AgentName      string                             `json:"agent_name"`
	SourcePath     string                             `json:"source_path"`
	Action         AgentSoulRevisionAction            `json:"action"`
	PreviousDigest string                             `json:"previous_digest,omitempty"`
	NewDigest      string                             `json:"new_digest,omitempty"`
	Diagnostics    []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
	Actor          AuthoredContextActorPayload        `json:"actor"`
	Origin         *AuthoredContextActorPayload       `json:"origin,omitempty"`
	CreatedAt      time.Time                          `json:"created_at"`
}

AgentSoulRevisionPayload is a redacted SOUL.md authoring history row.

func AgentSoulRevisionPayloadFromDomain

func AgentSoulRevisionPayloadFromDomain(revision soulpkg.Revision) (AgentSoulRevisionPayload, error)

AgentSoulRevisionPayloadFromDomain converts a Soul authoring revision into the public DTO.

type AgentSoulRollbackByPathRequest

type AgentSoulRollbackByPathRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	RevisionID     string `json:"revision_id"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

AgentSoulRollbackByPathRequest restores a prior SOUL.md revision for the route agent.

type AgentSoulRollbackRequest

type AgentSoulRollbackRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	AgentName      string `json:"agent_name"`
	RevisionID     string `json:"revision_id"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

AgentSoulRollbackRequest restores a prior SOUL.md revision through the managed authoring service.

type AgentSoulSectionPayload

type AgentSoulSectionPayload struct {
	Enabled          bool                     `json:"enabled"`
	Present          bool                     `json:"present"`
	Active           bool                     `json:"active"`
	Valid            bool                     `json:"valid"`
	ValidationStatus AuthoredValidationStatus `json:"validation_status,omitempty"`
	SnapshotID       string                   `json:"snapshot_id,omitempty"`
	Digest           string                   `json:"digest,omitempty"`
	ConfigDigest     string                   `json:"config_digest,omitempty"`
	SourcePath       string                   `json:"source_path,omitempty"`
	Role             string                   `json:"role,omitempty"`
	Tone             []string                 `json:"tone"`
	Principles       []string                 `json:"principles"`
	Truncated        bool                     `json:"truncated,omitempty"`
	MaxBytes         int64                    `json:"max_bytes,omitempty"`
	MaxBodyBytes     int64                    `json:"max_body_bytes,omitempty"`
}

AgentSoulSectionPayload is the compact, context-safe Soul projection for `/agent/context`.

func AgentSoulSectionPayloadFromResolved

func AgentSoulSectionPayloadFromResolved(
	resolved *soulpkg.ResolvedSoul,
	snapshotID string,
	configProvenance soulpkg.ConfigProvenance,
) AgentSoulSectionPayload

AgentSoulSectionPayloadFromResolved converts a resolver result into the compact context projection.

type AgentSoulValidateByPathRequest

type AgentSoulValidateByPathRequest struct {
	WorkspaceID string `json:"workspace_id,omitempty"`
	Body        string `json:"body,omitempty"`
}

AgentSoulValidateByPathRequest validates SOUL.md for the route agent.

type AgentSoulValidateRequest

type AgentSoulValidateRequest struct {
	WorkspaceID string `json:"workspace_id,omitempty"`
	AgentName   string `json:"agent_name,omitempty"`
	Body        string `json:"body,omitempty"`
}

AgentSoulValidateRequest validates a proposed SOUL.md body or the current file.

type AgentSpawnPayload

type AgentSpawnPayload struct {
	Session     SessionPayload               `json:"session"`
	Lineage     SessionLineagePayload        `json:"lineage"`
	Permissions SpawnPermissionPolicyPayload `json:"permissions"`
}

AgentSpawnPayload is the safe spawn response projection.

type AgentSpawnRequest

type AgentSpawnRequest struct {
	AgentName        string                       `json:"agent_name"`
	Provider         string                       `json:"provider,omitempty"`
	Model            string                       `json:"model,omitempty"`
	Speed            Speed                        `json:"speed,omitempty"`
	Name             string                       `json:"name,omitempty"`
	Workspace        string                       `json:"workspace,omitempty"`
	PromptOverlay    string                       `json:"prompt_overlay,omitempty"`
	SpawnRole        string                       `json:"spawn_role"`
	TTLSeconds       int64                        `json:"ttl_seconds"`
	AutoStopOnParent bool                         `json:"auto_stop_on_parent"`
	Permissions      SpawnPermissionPolicyPayload `json:"permissions"`
	IdempotencyKey   string                       `json:"idempotency_key,omitempty"`
}

AgentSpawnRequest asks the daemon to create a narrowed child session.

type AgentSpawnResponse

type AgentSpawnResponse struct {
	Spawn AgentSpawnPayload `json:"spawn"`
}

AgentSpawnResponse wraps a safe spawn result.

type AgentTaskClaimNextRequest

type AgentTaskClaimNextRequest struct {
	RunID                string   `json:"run_id,omitempty"`
	WorkspaceID          string   `json:"workspace_id,omitempty"`
	RequiredCapabilities []string `json:"required_capabilities,omitempty"`
	PriorityMin          int      `json:"priority_min,omitempty"`
	LeaseSeconds         int64    `json:"lease_seconds,omitempty"`
	Wait                 bool     `json:"wait,omitempty"`
	IdempotencyKey       string   `json:"idempotency_key,omitempty"`
}

AgentTaskClaimNextRequest captures the agent-initiated atomic next-work request.

type AgentTaskClaimPayload

type AgentTaskClaimPayload struct {
	Task                TaskReferencePayload        `json:"task"`
	Run                 TaskRunPayload              `json:"run"`
	Lease               TaskRunLeaseSummaryPayload  `json:"lease"`
	CoordinationChannel *CoordinationChannelPayload `json:"coordination_channel,omitempty"`
}

AgentTaskClaimPayload is the synchronous claim response for the session-bound lease.

type AgentTaskClaimResponse

type AgentTaskClaimResponse struct {
	Claim AgentTaskClaimPayload `json:"claim"`
}

AgentTaskClaimResponse wraps the synchronous task claim response.

type AgentTaskCompleteRequest

type AgentTaskCompleteRequest struct {
	Result         json.RawMessage `json:"result,omitempty"`
	CreatedTaskIDs []string        `json:"created_task_ids,omitempty"`
}

AgentTaskCompleteRequest completes the caller session's claimed task run.

type AgentTaskContextPayload

type AgentTaskContextPayload struct {
	Available bool                        `json:"available"`
	Task      *TaskReferencePayload       `json:"task,omitempty"`
	Lease     *TaskRunLeaseSummaryPayload `json:"lease,omitempty"`
	Bundle    *taskpkg.ContextBundle      `json:"bundle,omitempty"`
}

AgentTaskContextPayload is the bounded active-task section in `/agent/context`.

type AgentTaskFailRequest

type AgentTaskFailRequest struct {
	Error    string          `json:"error"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

AgentTaskFailRequest fails the caller session's claimed task run.

type AgentTaskHeartbeatRequest

type AgentTaskHeartbeatRequest struct {
	LeaseSeconds int64 `json:"lease_seconds,omitempty"`
}

AgentTaskHeartbeatRequest extends the caller session's task-run lease.

type AgentTaskLeaseResponse

type AgentTaskLeaseResponse struct {
	Lease TaskRunLeaseSummaryPayload `json:"lease"`
}

AgentTaskLeaseResponse wraps a safe task-run lease projection.

type AgentTaskReleaseRequest

type AgentTaskReleaseRequest struct {
	Reason string `json:"reason,omitempty"`
}

AgentTaskReleaseRequest releases the caller session's claimed task run.

type AgentWorkspacePayload

type AgentWorkspacePayload struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	RootDir string `json:"root_dir,omitempty"`
}

AgentWorkspacePayload is the compact workspace context used by agent endpoints.

type AgentsResponse

type AgentsResponse struct {
	Agents []AgentPayload `json:"agents"`
}

AgentsResponse wraps the shared agent list payload.

type ApproveLoopRunRequest

type ApproveLoopRunRequest struct {
	GateID   string           `json:"gate_id"`
	Decision LoopGateDecision `json:"decision"`
}

ApproveLoopRunRequest applies a human-gate decision.

type ApproveSessionRequest

type ApproveSessionRequest struct {
	RequestID string `json:"request_id"`
	TurnID    string `json:"turn_id"`
	Decision  string `json:"decision"`
}

ApproveSessionRequest is the interactive permission approval payload.

type AttachSessionRequest

type AttachSessionRequest struct {
	AttachedTo string `json:"attached_to,omitempty"`
	TTLSeconds int    `json:"ttl_seconds,omitempty"`
}

AttachSessionRequest captures explicit attach-lock options.

type AttachTaskRunSessionRequest

type AttachTaskRunSessionRequest struct {
	SessionID string `json:"session_id"`
}

AttachTaskRunSessionRequest is the shared run-session attach request payload.

type AuthoredContextActorPayload

type AuthoredContextActorPayload struct {
	Kind string `json:"kind"`
	Ref  string `json:"ref,omitempty"`
}

AuthoredContextActorPayload records redacted actor or origin identity.

type AuthoredContextDiagnosticPayload

type AuthoredContextDiagnosticPayload struct {
	Code         string                     `json:"code"`
	Severity     AuthoredDiagnosticSeverity `json:"severity"`
	Message      string                     `json:"message"`
	Field        string                     `json:"field,omitempty"`
	Section      string                     `json:"section,omitempty"`
	SourcePath   string                     `json:"source_path,omitempty"`
	Line         int                        `json:"line,omitempty"`
	Column       int                        `json:"column,omitempty"`
	OwnerSurface string                     `json:"owner_surface,omitempty"`
}

AuthoredContextDiagnosticPayload is a redacted, deterministic authored-context diagnostic.

type AuthoredContextLimitsPayload

type AuthoredContextLimitsPayload struct {
	MaxBodyBytes           int64 `json:"max_body_bytes"`
	ContextProjectionBytes int64 `json:"context_projection_bytes,omitempty"`
	MaxBytes               int64 `json:"max_bytes,omitempty"`
}

AuthoredContextLimitsPayload reports stable parser/projection limits.

type AuthoredDiagnosticSeverity

type AuthoredDiagnosticSeverity string

AuthoredDiagnosticSeverity is the closed diagnostic severity shared by Soul and Heartbeat DTOs.

const (
	AuthoredDiagnosticInfo    AuthoredDiagnosticSeverity = "info"
	AuthoredDiagnosticWarning AuthoredDiagnosticSeverity = "warning"
	AuthoredDiagnosticError   AuthoredDiagnosticSeverity = "error"
)

func (AuthoredDiagnosticSeverity) Valid

func (s AuthoredDiagnosticSeverity) Valid() bool

Valid reports whether the diagnostic severity is a closed enum member.

func (AuthoredDiagnosticSeverity) Validate

func (s AuthoredDiagnosticSeverity) Validate() error

Validate reports an error for values outside the closed diagnostic severity enum.

type AuthoredValidationStatus

type AuthoredValidationStatus string

AuthoredValidationStatus is the closed validation state shared by authored-context surfaces.

const (
	AuthoredValidationMissing  AuthoredValidationStatus = "missing"
	AuthoredValidationInactive AuthoredValidationStatus = "inactive"
	AuthoredValidationValid    AuthoredValidationStatus = "valid"
	AuthoredValidationInvalid  AuthoredValidationStatus = "invalid"
)

func (AuthoredValidationStatus) Valid

func (s AuthoredValidationStatus) Valid() bool

Valid reports whether the validation status is a closed enum member.

func (AuthoredValidationStatus) Validate

func (s AuthoredValidationStatus) Validate() error

Validate reports an error for values outside the closed validation status enum.

type AutomationHealthPayload

type AutomationHealthPayload struct {
	Enabled          bool                              `json:"enabled"`
	Jobs             AutomationResourceStatusPayload   `json:"jobs"`
	Triggers         AutomationResourceStatusPayload   `json:"triggers"`
	SchedulerRunning bool                              `json:"scheduler_running"`
	NextFire         *time.Time                        `json:"next_fire,omitempty"`
	ScheduledJobs    []AutomationSchedulerStatePayload `json:"scheduled_jobs,omitempty"`
}

AutomationHealthPayload describes additive automation health state inside the runtime status response.

type AutomationResourceStatusPayload

type AutomationResourceStatusPayload struct {
	Total   int `json:"total"`
	Enabled int `json:"enabled"`
}

AutomationResourceStatusPayload reports total and enabled counts for one automation definition family.

type AutomationSchedulerStatePayload

type AutomationSchedulerStatePayload struct {
	JobID                     string                               `json:"job_id"`
	Registered                bool                                 `json:"registered"`
	NextRunAt                 *time.Time                           `json:"next_run_at,omitempty"`
	LastRunAt                 *time.Time                           `json:"last_run_at,omitempty"`
	LastScheduledAt           *time.Time                           `json:"last_scheduled_at,omitempty"`
	LastFireID                string                               `json:"last_fire_id,omitempty"`
	CatchUpPolicy             automationpkg.SchedulerCatchUpPolicy `json:"catch_up_policy,omitempty"`
	MisfireGraceSeconds       int                                  `json:"misfire_grace_seconds,omitempty"`
	ConsecutiveResumeFailures int                                  `json:"consecutive_resume_failures,omitempty"`
	LastMisfireAt             *time.Time                           `json:"last_misfire_at,omitempty"`
	MisfireCount              int                                  `json:"misfire_count,omitempty"`
	UpdatedAt                 *time.Time                           `json:"updated_at,omitempty"`
}

AutomationSchedulerStatePayload exposes durable scheduler cursor diagnostics for one scheduled automation job.

type AutomationSuggestionAcceptanceResponse

type AutomationSuggestionAcceptanceResponse struct {
	Suggestion AutomationSuggestionPayload `json:"suggestion"`
	Job        JobPayload                  `json:"job"`
}

AutomationSuggestionAcceptanceResponse wraps an accepted suggestion and its Job.

type AutomationSuggestionPayload

type AutomationSuggestionPayload struct {
	ID          string                         `json:"id"`
	WorkspaceID string                         `json:"workspace_id"`
	Source      automationpkg.SuggestionSource `json:"source"`
	DedupKey    string                         `json:"dedup_key"`
	Status      automationpkg.SuggestionStatus `json:"status"`
	Payload     JobPayload                     `json:"payload"`
	CreatedAt   time.Time                      `json:"created_at"`
	ResolvedAt  *time.Time                     `json:"resolved_at,omitempty"`
}

AutomationSuggestionPayload is a workspace-scoped, consent-first Job proposal.

type AutomationSuggestionResponse

type AutomationSuggestionResponse struct {
	Suggestion AutomationSuggestionPayload `json:"suggestion"`
}

AutomationSuggestionResponse wraps one resolved automation suggestion.

type AutomationSuggestionsResponse

type AutomationSuggestionsResponse struct {
	Suggestions []AutomationSuggestionPayload `json:"suggestions"`
}

AutomationSuggestionsResponse wraps an exact-workspace suggestion list.

type BridgeAggregateHealthPayload

type BridgeAggregateHealthPayload struct {
	TotalInstances        int                       `json:"total_instances"`
	RouteCount            int                       `json:"route_count"`
	DeliveryBacklog       int                       `json:"delivery_backlog"`
	DeliveryDroppedTotal  int                       `json:"delivery_dropped_total"`
	DeliveryFailuresTotal int                       `json:"delivery_failures_total"`
	AuthFailuresTotal     int                       `json:"auth_failures_total"`
	StatusCounts          BridgeStatusCountsPayload `json:"status_counts"`
}

BridgeAggregateHealthPayload captures the additive bridge summary nested under the daemon health response.

type BridgeCatalogFacetsPayload

type BridgeCatalogFacetsPayload struct {
	Platforms map[string]int            `json:"platforms"`
	Statuses  BridgeStatusCountsPayload `json:"statuses"`
}

BridgeCatalogFacetsPayload reports exact counts for the complete filtered authority.

type BridgeDeliveryDefaultsPayload

type BridgeDeliveryDefaultsPayload json.RawMessage

BridgeDeliveryDefaultsPayload carries common target/progress fields plus provider-owned string defaults in one normalized object.

func (BridgeDeliveryDefaultsPayload) MarshalJSON

func (p BridgeDeliveryDefaultsPayload) MarshalJSON() ([]byte, error)

MarshalJSON validates and emits the canonical delivery-default representation.

func (*BridgeDeliveryDefaultsPayload) UnmarshalJSON

func (p *BridgeDeliveryDefaultsPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON validates delivery defaults before storing their canonical representation.

type BridgeDeliveryTargetInput

type BridgeDeliveryTargetInput struct {
	BridgeInstanceID string                 `json:"bridge_instance_id,omitempty"`
	PeerID           string                 `json:"peer_id,omitempty"`
	ThreadID         string                 `json:"thread_id,omitempty"`
	GroupID          string                 `json:"group_id,omitempty"`
	Mode             bridgepkg.DeliveryMode `json:"mode,omitempty"`
}

BridgeDeliveryTargetInput is the shared typed delivery-target override payload.

func (*BridgeDeliveryTargetInput) UnmarshalJSON

func (r *BridgeDeliveryTargetInput) UnmarshalJSON(data []byte) error

UnmarshalJSON preserves whether mode was supplied and rejects identity bytes that encoding/json would otherwise replace with the Unicode replacement rune.

type BridgeHealthPayload

type BridgeHealthPayload struct {
	BridgeInstanceID        string                       `json:"bridge_instance_id"`
	Status                  bridgepkg.BridgeStatus       `json:"status"`
	RouteCount              int                          `json:"route_count"`
	DeliveryBacklog         int                          `json:"delivery_backlog"`
	DeliveryDroppedTotal    int                          `json:"delivery_dropped_total"`
	DeliveryDroppedByReason map[string]int               `json:"delivery_dropped_by_reason,omitempty"`
	DeliveryFailuresTotal   int                          `json:"delivery_failures_total"`
	AuthFailuresTotal       int                          `json:"auth_failures_total"`
	LastSuccessAt           *time.Time                   `json:"last_success_at,omitempty"`
	LastError               string                       `json:"last_error,omitempty"`
	LastErrorAt             *time.Time                   `json:"last_error_at,omitempty"`
	Degradation             *bridgepkg.BridgeDegradation `json:"degradation,omitempty"`
	Diagnostics             []bridgepkg.BridgeDiagnostic `json:"diagnostics,omitempty"`
	Ingress                 *GatewayIngressPayload       `json:"ingress,omitempty"`
}

BridgeHealthPayload captures the additive per-instance observability fields exposed through bridge APIs.

type BridgeHealthStreamPayload

type BridgeHealthStreamPayload struct {
	GeneratedAt  time.Time                      `json:"generated_at"`
	BridgeHealth map[string]BridgeHealthPayload `json:"bridge_health"`
}

BridgeHealthStreamPayload wraps one bridge-health SSE snapshot payload.

type BridgePayload

type BridgePayload struct {
	ID                   string                         `json:"id"`
	Scope                bridgepkg.Scope                `json:"scope"`
	WorkspaceID          string                         `json:"workspace_id,omitempty"`
	Platform             string                         `json:"platform"`
	ExtensionName        string                         `json:"extension_name"`
	DisplayName          string                         `json:"display_name"`
	Source               bridgepkg.BridgeInstanceSource `json:"source,omitempty"`
	Enabled              bool                           `json:"enabled"`
	Status               bridgepkg.BridgeStatus         `json:"status"`
	DMPolicy             bridgepkg.BridgeDMPolicy       `json:"dm_policy,omitempty"`
	RoutingPolicy        bridgepkg.RoutingPolicy        `json:"routing_policy"`
	ProviderConfig       BridgeProviderConfigPayload    `json:"provider_config,omitempty"`
	WebhookPublicURL     string                         `json:"webhook_public_url,omitempty"`
	GatewayIngress       *GatewayIngressPayload         `json:"gateway_ingress,omitempty"`
	DeliveryDefaults     BridgeDeliveryDefaultsPayload  `json:"delivery_defaults,omitempty"`
	NotificationSuppress bool                           `json:"notification_suppress"`
	Degradation          *bridgepkg.BridgeDegradation   `json:"degradation,omitempty"`
	CreatedAt            time.Time                      `json:"created_at"`
	UpdatedAt            time.Time                      `json:"updated_at"`
}

BridgePayload captures the shared bridge-management contract returned by HTTP/UDS.

type BridgeProgressConfigPayload

type BridgeProgressConfigPayload struct {
	ToolProgress bridgepkg.ProgressMode     `json:"tool_progress"`
	Grouping     bridgepkg.ProgressGrouping `json:"grouping"`
	Typing       bool                       `json:"typing"`
	Reactions    bool                       `json:"reactions"`
}

BridgeProgressConfigPayload is the public progress block under delivery_defaults.

func BridgeProgressConfigPayloadFromConfig

func BridgeProgressConfigPayloadFromConfig(config bridgepkg.ProgressConfig) BridgeProgressConfigPayload

BridgeProgressConfigPayloadFromConfig converts effective daemon settings to the public shape.

func (BridgeProgressConfigPayload) ProgressConfig

ProgressConfig converts the public payload to the daemon-owned configuration.

func (BridgeProgressConfigPayload) Validate

func (p BridgeProgressConfigPayload) Validate() error

Validate reports whether the progress values belong to the public taxonomy.

type BridgeProviderConfigPayload

type BridgeProviderConfigPayload json.RawMessage

BridgeProviderConfigPayload carries provider-owned runtime configuration.

func (BridgeProviderConfigPayload) MarshalJSON

func (p BridgeProviderConfigPayload) MarshalJSON() ([]byte, error)

MarshalJSON preserves the compact raw JSON representation of provider config.

func (*BridgeProviderConfigPayload) UnmarshalJSON

func (p *BridgeProviderConfigPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON validates provider config before storing its compact representation.

type BridgeProviderPayload

type BridgeProviderPayload struct {
	Platform      string                                `json:"platform"`
	ExtensionName string                                `json:"extension_name"`
	DisplayName   string                                `json:"display_name"`
	Description   string                                `json:"description,omitempty"`
	SecretSlots   []bridgepkg.BridgeSecretSlot          `json:"secret_slots,omitempty"`
	ConfigSchema  *bridgepkg.BridgeProviderConfigSchema `json:"config_schema,omitempty"`
	Enabled       bool                                  `json:"enabled"`
	State         string                                `json:"state"`
	Health        string                                `json:"health"`
	HealthMessage string                                `json:"health_message,omitempty"`
}

BridgeProviderPayload captures provider metadata exposed by bridge-management APIs.

type BridgeProvidersResponse

type BridgeProvidersResponse struct {
	Providers []BridgeProviderPayload `json:"providers"`
}

BridgeProvidersResponse wraps the shared installed provider catalog.

type BridgeResolveTargetRequest

type BridgeResolveTargetRequest struct {
	Name string `json:"name"`
}

BridgeResolveTargetRequest resolves a human-facing or canonical bridge target name.

type BridgeResolveTargetResponse

type BridgeResolveTargetResponse struct {
	Result     bridgepkg.ResolveBridgeTargetResult `json:"result"`
	Diagnostic *DiagnosticItem                     `json:"diagnostic,omitempty"`
}

BridgeResolveTargetResponse wraps the deterministic bridge target resolver result.

type BridgeResponse

type BridgeResponse struct {
	Bridge BridgePayload       `json:"bridge"`
	Health BridgeHealthPayload `json:"health"`
}

BridgeResponse wraps one shared bridge payload.

type BridgeRoutesResponse

type BridgeRoutesResponse struct {
	Routes []bridgepkg.BridgeRoute `json:"routes"`
}

BridgeRoutesResponse wraps one bridge's route set.

type BridgeSecretBindingResponse

type BridgeSecretBindingResponse struct {
	Binding bridgepkg.BridgeSecretBinding `json:"binding"`
}

BridgeSecretBindingResponse wraps one bridge secret binding payload.

type BridgeSecretBindingsResponse

type BridgeSecretBindingsResponse struct {
	Bindings []bridgepkg.BridgeSecretBinding `json:"bindings"`
}

BridgeSecretBindingsResponse wraps one bridge-instance secret binding list.

type BridgeSendTestRequest

type BridgeSendTestRequest struct {
	Message string                    `json:"message"`
	Target  BridgeDeliveryTargetInput `json:"target"`
}

BridgeSendTestRequest requests one real provider delivery. Unlike BridgeTestDeliveryRequest, this request reaches the installed adapter.

func (BridgeSendTestRequest) NormalizedMessage

func (r BridgeSendTestRequest) NormalizedMessage() string

NormalizedMessage returns the provider-bound text without transport padding.

func (BridgeSendTestRequest) ToResolveDeliveryTargetRequest

func (r BridgeSendTestRequest) ToResolveDeliveryTargetRequest(
	bridgeInstanceID string,
) (bridgepkg.ResolveDeliveryTargetRequest, error)

ToResolveDeliveryTargetRequest validates the body/path ownership boundary while preserving the explicit target overrides byte-exact.

type BridgeSendTestResponse

type BridgeSendTestResponse struct {
	Status           BridgeSendTestStatus           `json:"status"`
	BridgeInstanceID string                         `json:"bridge_instance_id"`
	DeliveryID       string                         `json:"delivery_id"`
	RemoteMessageID  string                         `json:"remote_message_id,omitempty"`
	DeliveryTarget   bridgepkg.DeliveryTarget       `json:"delivery_target"`
	Error            *bridgepkg.DeliveryErrorDetail `json:"error,omitempty"`
}

BridgeSendTestResponse reports the provider acknowledgment for a real send.

type BridgeSendTestStatus

type BridgeSendTestStatus string

BridgeSendTestStatus identifies the only two truthful outcomes of a real provider canary.

const (
	BridgeSendTestStatusDelivered                  BridgeSendTestStatus = "delivered"
	BridgeSendTestStatusCommittedResultUnavailable BridgeSendTestStatus = "committed_result_unavailable"
)

func (BridgeSendTestStatus) Validate

func (s BridgeSendTestStatus) Validate() error

Validate reports whether the send-test status is part of the public contract.

type BridgeStatusCountsPayload

type BridgeStatusCountsPayload struct {
	Disabled     int `json:"disabled"`
	Starting     int `json:"starting"`
	Ready        int `json:"ready"`
	Degraded     int `json:"degraded"`
	AuthRequired int `json:"auth_required"`
	Error        int `json:"error"`
}

BridgeStatusCountsPayload captures aggregate per-status bridge counts.

type BridgeTargetsResponse

type BridgeTargetsResponse struct {
	BridgeID                string                   `json:"bridge_id"`
	Targets                 []bridgepkg.BridgeTarget `json:"targets"`
	Total                   int                      `json:"total"`
	CacheStale              bool                     `json:"cache_stale"`
	GeneratedAt             time.Time                `json:"generated_at"`
	LastSuccessfulRefreshAt *time.Time               `json:"last_successful_refresh_at,omitempty"`
}

BridgeTargetsResponse wraps one bridge's daemon-owned target directory.

type BridgeTestDeliveryRequest

type BridgeTestDeliveryRequest struct {
	Message string                    `json:"message,omitempty"`
	Target  BridgeDeliveryTargetInput `json:"target"`
}

BridgeTestDeliveryRequest is the shared typed dry-run delivery payload.

func (BridgeTestDeliveryRequest) ToResolveDeliveryTargetRequest

func (r BridgeTestDeliveryRequest) ToResolveDeliveryTargetRequest(
	bridgeInstanceID string,
) (bridgepkg.ResolveDeliveryTargetRequest, error)

ToResolveDeliveryTargetRequest validates and converts the transport payload into the daemon-owned delivery-target resolution request for the supplied bridge instance id.

type BridgeTestDeliveryResponse

type BridgeTestDeliveryResponse struct {
	Status         string                   `json:"status"`
	Message        string                   `json:"message,omitempty"`
	DeliveryTarget bridgepkg.DeliveryTarget `json:"delivery_target"`
}

BridgeTestDeliveryResponse wraps the dry-run delivery-target resolution payload.

type BridgeVerifyResponse

type BridgeVerifyResponse struct {
	BridgeInstanceID string                        `json:"bridge_instance_id"`
	Checks           []bridgepkg.BridgeCheckRecord `json:"checks"`
}

BridgeVerifyResponse returns the live, provider-owned checks for one bridge.

type BridgeWebhookRegistrationResponse

type BridgeWebhookRegistrationResponse struct {
	BridgeInstanceID string                      `json:"bridge_instance_id"`
	Status           bridgepkg.BridgeCheckStatus `json:"status"`
	Remediation      string                      `json:"remediation"`
}

BridgeWebhookRegistrationResponse reports the provider-owned registration outcome.

type BridgesResponse

type BridgesResponse struct {
	Bridges      []BridgePayload                `json:"bridges"`
	BridgeHealth map[string]BridgeHealthPayload `json:"bridge_health"`
	Facets       BridgeCatalogFacetsPayload     `json:"facets"`
	Page         CountedCursorPagePayload       `json:"page"`
}

BridgesResponse wraps one bounded public bridge catalog page.

type BulkForceTaskRunItemPayload

type BulkForceTaskRunItemPayload struct {
	RunID string          `json:"run_id"`
	OK    bool            `json:"ok"`
	Run   *TaskRunPayload `json:"run,omitempty"`
	Error *ErrorPayload   `json:"error,omitempty"`
}

BulkForceTaskRunItemPayload records one per-row bulk force-operation outcome.

type BulkForceTaskRunRequest

type BulkForceTaskRunRequest struct {
	RunIDs   []string        `json:"run_ids"`
	Reason   string          `json:"reason,omitempty"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

BulkForceTaskRunRequest is the shared bounded bulk force-operation payload.

type BulkForceTaskRunResponse

type BulkForceTaskRunResponse struct {
	Results []BulkForceTaskRunItemPayload `json:"results"`
}

BulkForceTaskRunResponse wraps bounded per-row force-operation results.

type CancelTaskRequest

type CancelTaskRequest struct {
	Reason   string          `json:"reason,omitempty"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

CancelTaskRequest is the shared task-cancel request payload.

type CancelTaskRunRequest

type CancelTaskRunRequest struct {
	Reason   string          `json:"reason,omitempty"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

CancelTaskRunRequest is the shared run-cancel request payload.

type ClarificationAnswerPayload

type ClarificationAnswerPayload = toolspkg.ClarifyAnswer

ClarificationAnswerPayload is the exact public clarification result.

type ClarificationAnswerRequest

type ClarificationAnswerRequest struct {
	ChoiceIndex *int   `json:"choice_index,omitempty"`
	Text        string `json:"text,omitempty"`
}

ClarificationAnswerRequest resolves one live clarification through a public transport.

type ClarificationPendingPayload

type ClarificationPendingPayload struct {
	RequestID string    `json:"request_id"`
	SessionID string    `json:"session_id"`
	AgentName string    `json:"agent_name"`
	Question  string    `json:"question"`
	Choices   []string  `json:"choices,omitempty"`
	AskedAt   time.Time `json:"asked_at"`
	Deadline  time.Time `json:"deadline"`
}

ClarificationPendingPayload is the public live pending projection.

func ClarificationPendingPayloadFromDomain

func ClarificationPendingPayloadFromDomain(pending toolspkg.ClarifyPending) ClarificationPendingPayload

ClarificationPendingPayloadFromDomain removes internal workspace ownership from the response body.

type ClarificationsResponse

type ClarificationsResponse struct {
	Clarifications []ClarificationPendingPayload `json:"clarifications"`
}

ClarificationsResponse lists the complete live pending projection for one session.

type ClearTaskBlockRequest

type ClearTaskBlockRequest struct {
	Note string `json:"note,omitempty"`
}

ClearTaskBlockRequest captures one task-block clear request.

type CompleteTaskRunRequest

type CompleteTaskRunRequest struct {
	Result         json.RawMessage `json:"result,omitempty"`
	CreatedTaskIDs []string        `json:"created_task_ids,omitempty"`
}

CompleteTaskRunRequest is the shared run-complete request payload.

type ConfigApplyRecordPayload

type ConfigApplyRecordPayload struct {
	ID                string                  `json:"id"`
	DesiredConfigHash string                  `json:"desired_config_hash"`
	ActiveConfigHash  string                  `json:"active_config_hash"`
	Generation        int64                   `json:"generation"`
	Actor             string                  `json:"actor"`
	DiffClass         SettingsApplyLifecycle  `json:"diff_class"`
	Status            ConfigApplyStatus       `json:"status"`
	Lifecycle         SettingsApplyLifecycle  `json:"lifecycle"`
	NextAction        SettingsApplyNextAction `json:"next_action"`
	Diagnostics       []DiagnosticItem        `json:"diagnostics,omitempty"`
	CreatedAt         time.Time               `json:"created_at"`
	AppliedAt         *time.Time              `json:"applied_at,omitempty"`
	UpdatedAt         time.Time               `json:"updated_at"`
}

type ConfigApplyRecordsResponse

type ConfigApplyRecordsResponse struct {
	Entries []ConfigApplyRecordPayload `json:"entries"`
}

type ConfigApplyStatus

type ConfigApplyStatus string
const (
	ConfigApplyStatusPendingApply ConfigApplyStatus = "pending_apply"
	ConfigApplyStatusApplied      ConfigApplyStatus = "applied"
	ConfigApplyStatusBlocked      ConfigApplyStatus = "blocked"
	ConfigApplyStatusFailed       ConfigApplyStatus = "failed"
)

type ConfigRuntimeStatusPayload

type ConfigRuntimeStatusPayload struct {
	Status          string `json:"status"`
	Validated       bool   `json:"validated"`
	ValidationError string `json:"validation_error,omitempty"`
	HomeDir         string `json:"home_dir,omitempty"`
	ConfigFile      string `json:"config_file,omitempty"`
	RestartRequired bool   `json:"restart_required"`
	ApplyState      string `json:"apply_state"`
}

ConfigRuntimeStatusPayload reports daemon config validation and apply lifecycle state.

type ConsentArea

type ConsentArea struct {
	Area   string `json:"area"`
	Access string `json:"access"`
}

ConsentArea is one operator-facing permission summary derived from Host API methods.

type CoordinationChannelPayload

type CoordinationChannelPayload struct {
	ID                  string                    `json:"id"`
	DisplayName         string                    `json:"display_name"`
	Purpose             string                    `json:"purpose,omitempty"`
	WorkspaceID         string                    `json:"workspace_id,omitempty"`
	TaskID              string                    `json:"task_id,omitempty"`
	RunID               string                    `json:"run_id,omitempty"`
	WorkflowID          string                    `json:"workflow_id,omitempty"`
	AllowedMessageKinds []CoordinationMessageKind `json:"allowed_message_kinds"`
	LastActivityAt      *time.Time                `json:"last_activity_at,omitempty"`
}

CoordinationChannelPayload describes the stable task-run coordination channel binding.

func NormalizeCoordinationChannelPayload

func NormalizeCoordinationChannelPayload(payload CoordinationChannelPayload) CoordinationChannelPayload

NormalizeCoordinationChannelPayload returns a channel payload with stable message-kind arrays.

type CoordinationMessageKind

type CoordinationMessageKind string

CoordinationMessageKind identifies the MVP task-run coordination message kind.

const (
	// CoordinationMessageStatus reports non-authoritative work progress.
	CoordinationMessageStatus CoordinationMessageKind = "status"
	// CoordinationMessageRequest asks another participant for information or action.
	CoordinationMessageRequest CoordinationMessageKind = "request"
	// CoordinationMessageReply answers a prior coordination message.
	CoordinationMessageReply CoordinationMessageKind = "reply"
	// CoordinationMessageBlocker reports a blocking condition for coordinated work.
	CoordinationMessageBlocker CoordinationMessageKind = "blocker"
	// CoordinationMessageHandoff transfers conversational context between participants.
	CoordinationMessageHandoff CoordinationMessageKind = "handoff"
	// CoordinationMessageResult shares task-run output before or after terminal task APIs.
	CoordinationMessageResult CoordinationMessageKind = "result"
	// CoordinationMessageReviewRequest asks for review of coordinated work.
	CoordinationMessageReviewRequest CoordinationMessageKind = "review_request"
)

func CoordinationMessageKinds

func CoordinationMessageKinds() []CoordinationMessageKind

CoordinationMessageKinds returns the accepted MVP coordination message kinds.

type CoordinationMessageMetadataPayload

type CoordinationMessageMetadataPayload struct {
	TaskID        string                     `json:"task_id"`
	RunID         string                     `json:"run_id"`
	WorkflowID    string                     `json:"workflow_id,omitempty"`
	ChannelID     string                     `json:"channel_id"`
	MessageKind   CoordinationMessageKind    `json:"message_kind"`
	CorrelationID string                     `json:"correlation_id"`
	Ext           map[string]json.RawMessage `json:"ext,omitempty"`
}

CoordinationMessageMetadataPayload carries typed task/run correlation for channel messages.

func (*CoordinationMessageMetadataPayload) UnmarshalJSON

func (p *CoordinationMessageMetadataPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON rejects raw claim tokens in typed channel message metadata.

func (CoordinationMessageMetadataPayload) Validate

Validate rejects missing correlation fields, unknown message kinds, and raw claim token metadata.

type CoordinatorConfigPayload

type CoordinatorConfigPayload struct {
	Enabled                       bool                    `json:"enabled"`
	AgentName                     string                  `json:"agent_name"`
	Provider                      string                  `json:"provider,omitempty"`
	Model                         string                  `json:"model,omitempty"`
	DefaultTTLSeconds             int64                   `json:"default_ttl_seconds"`
	MaxChildren                   int                     `json:"max_children"`
	MaxActiveSessionsPerWorkspace int                     `json:"max_active_sessions_per_workspace"`
	Source                        CoordinatorConfigSource `json:"source"`
	WorkspaceID                   string                  `json:"workspace_id,omitempty"`
}

CoordinatorConfigPayload is the safe coordinator config read model.

type CoordinatorConfigSource

type CoordinatorConfigSource string

CoordinatorConfigSource identifies where a coordinator config read model came from.

const (
	// CoordinatorConfigSourceWorkspace identifies a workspace override.
	CoordinatorConfigSourceWorkspace CoordinatorConfigSource = "workspace"
	// CoordinatorConfigSourceGlobal identifies global config.
	CoordinatorConfigSourceGlobal CoordinatorConfigSource = "global"
	// CoordinatorConfigSourceDefault identifies bundled defaults or agent fallback.
	CoordinatorConfigSourceDefault CoordinatorConfigSource = "default"
)

type CostSource

type CostSource = modelcatalog.CostSource

CostSource is the canonical model-catalog cost provenance exposed by API contracts.

type CostStatus

type CostStatus = modelcatalog.CostStatus

CostStatus is the canonical model-catalog cost classification exposed by API contracts.

type CountedCursorPagePayload

type CountedCursorPagePayload struct {
	NextCursor string `json:"next_cursor,omitempty"`
	HasMore    bool   `json:"has_more"`
	Total      int    `json:"total"`
	Limit      int    `json:"limit"`
}

CountedCursorPagePayload describes a bounded catalog page. Total is the number of rows matching the workspace-scoped filters before the cursor is applied, including zero for an empty catalog.

type CreateAgentPayload

type CreateAgentPayload struct {
	Name            string                   `json:"name"`
	Provider        string                   `json:"provider,omitempty"`
	Command         string                   `json:"command,omitempty"`
	Model           string                   `json:"model,omitempty"`
	ReasoningEffort ReasoningEffort          `json:"reasoning_effort,omitempty"`
	Tools           []string                 `json:"tools,omitempty"`
	Toolsets        []string                 `json:"toolsets,omitempty"`
	DenyTools       []string                 `json:"deny_tools,omitempty"`
	Permissions     SettingsPermissionMode   `json:"permissions,omitempty"`
	CategoryPath    []string                 `json:"category_path,omitempty"`
	Skills          *CreateAgentSkillsConfig `json:"skills,omitempty"`
	Prompt          string                   `json:"prompt"`
}

CreateAgentPayload captures the simple AGENT.md fields supported by v1 authoring.

type CreateAgentRequest

type CreateAgentRequest struct {
	Scope     AgentCreateScope   `json:"scope"`
	Workspace string             `json:"workspace,omitempty"`
	Agent     CreateAgentPayload `json:"agent"`
}

CreateAgentRequest is the shared agent definition authoring request payload.

type CreateAgentSkillsConfig

type CreateAgentSkillsConfig struct {
	Disabled []string `json:"disabled,omitempty"`
}

CreateAgentSkillsConfig captures agent-local skill policy stored in AGENT.md.

type CreateBridgeRequest

type CreateBridgeRequest struct {
	Scope                bridgepkg.Scope               `json:"scope"`
	WorkspaceID          string                        `json:"workspace_id,omitempty"`
	Platform             string                        `json:"platform"`
	ExtensionName        string                        `json:"extension_name"`
	DisplayName          string                        `json:"display_name"`
	Enabled              bool                          `json:"enabled"`
	DMPolicy             bridgepkg.BridgeDMPolicy      `json:"dm_policy,omitempty"`
	RoutingPolicy        bridgepkg.RoutingPolicy       `json:"routing_policy"`
	ProviderConfig       BridgeProviderConfigPayload   `json:"provider_config,omitempty"`
	DeliveryDefaults     BridgeDeliveryDefaultsPayload `json:"delivery_defaults,omitempty"`
	NotificationSuppress bool                          `json:"notification_suppress,omitempty"`
}

CreateBridgeRequest is the shared bridge-instance creation payload.

func (CreateBridgeRequest) ToCreateInstanceRequest

func (r CreateBridgeRequest) ToCreateInstanceRequest() (bridgepkg.CreateInstanceRequest, error)

ToCreateInstanceRequest validates and converts the transport payload into the daemon-owned bridge create request.

type CreateJobRequest

type CreateJobRequest struct {
	Scope       automationpkg.Scope            `json:"scope"`
	Name        string                         `json:"name"`
	TargetKind  automationpkg.TargetKind       `json:"target_kind,omitempty"`
	AgentName   string                         `json:"agent_name"`
	WorkspaceID string                         `json:"workspace_id,omitempty"`
	Prompt      string                         `json:"prompt"`
	Schedule    automationpkg.ScheduleSpec     `json:"schedule"`
	Task        *automationpkg.JobTaskConfig   `json:"task,omitempty"`
	LoopTarget  *automationpkg.LoopTarget      `json:"loop_target,omitempty"`
	Enabled     *bool                          `json:"enabled,omitempty"`
	Retry       *automationpkg.RetryConfig     `json:"retry,omitempty"`
	FireLimit   *automationpkg.FireLimitConfig `json:"fire_limit,omitempty"`
}

CreateJobRequest is the shared automation job create payload.

type CreateLoopRequest

type CreateLoopRequest struct {
	Definition   *LoopDefinitionDocument `json:"definition,omitempty"`
	ForkFromName string                  `json:"fork_from_name,omitempty"`
}

CreateLoopRequest creates a writable Loop definition or forks a read-only Loop by name.

type CreateNetworkChannelRequest

type CreateNetworkChannelRequest struct {
	Channel           string   `json:"channel"`
	WorkspaceID       string   `json:"workspace_id"`
	Purpose           string   `json:"purpose"`
	FanoutPolicy      string   `json:"fanout_policy,omitempty"`
	CoordinatorPeerID string   `json:"coordinator_peer_id,omitempty"`
	AgentNames        []string `json:"agent_names"`
}

CreateNetworkChannelRequest is the shared network channel creation payload.

type CreateNetworkChannelResponse

type CreateNetworkChannelResponse struct {
	Channel NetworkChannelDetailPayload `json:"channel"`
}

CreateNetworkChannelResponse wraps the created channel detail payload.

type CreateNotificationPresetRequest

type CreateNotificationPresetRequest struct {
	Name    string                      `json:"name"`
	Events  []string                    `json:"events"`
	Targets []NotificationTargetPayload `json:"targets"`
	Filter  string                      `json:"filter,omitempty"`
	Enabled bool                        `json:"enabled"`
}

CreateNotificationPresetRequest creates one preset.

func (CreateNotificationPresetRequest) ToCreateRequest

ToCreatePreset converts the transport create shape into the domain request.

type CreateSessionRequest

type CreateSessionRequest struct {
	AgentName     string `json:"agent_name,omitempty"`
	Name          string `json:"name,omitempty"`
	Workspace     string `json:"workspace,omitempty"`
	WorkspacePath string `json:"workspace_path,omitempty"`
	// ParentSessionID records creation provenance; the parent must live in the
	// target workspace and the link never narrows the child's lifecycle.
	ParentSessionID      string                 `json:"parent_session_id,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
}

CreateSessionRequest is the shared session creation request payload.

type CreateSupportBundleRequest

type CreateSupportBundleRequest struct {
	Yes           bool  `json:"yes"`
	IncludeStatus *bool `json:"include_status,omitempty"`
}

type CreateTaskBlockRequest

type CreateTaskBlockRequest struct {
	Kind      taskpkg.BlockKind `json:"kind"`
	Reason    string            `json:"reason"`
	Details   json.RawMessage   `json:"details,omitempty"`
	ExpiresAt *time.Time        `json:"expires_at,omitempty"`
	RunID     string            `json:"run_id,omitempty"`
}

CreateTaskBlockRequest captures one task-block create request.

type CreateTaskBridgeNotificationSubscriptionRequest

type CreateTaskBridgeNotificationSubscriptionRequest struct {
	SubscriptionID   string                 `json:"subscription_id,omitempty"`
	BridgeInstanceID string                 `json:"bridge_instance_id"`
	Scope            bridgepkg.Scope        `json:"scope"`
	WorkspaceID      string                 `json:"workspace_id,omitempty"`
	PeerID           string                 `json:"peer_id,omitempty"`
	ThreadID         string                 `json:"thread_id,omitempty"`
	GroupID          string                 `json:"group_id,omitempty"`
	DeliveryMode     bridgepkg.DeliveryMode `json:"delivery_mode"`
}

CreateTaskBridgeNotificationSubscriptionRequest captures one task-scoped terminal bridge notification target.

type CreateTaskChildRequest

type CreateTaskChildRequest struct {
	ID                   string                 `json:"id,omitempty"`
	Identifier           string                 `json:"identifier,omitempty"`
	Scope                taskpkg.Scope          `json:"scope"`
	Workspace            string                 `json:"workspace,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
	Title                string                 `json:"title"`
	Description          string                 `json:"description,omitempty"`
	Priority             taskpkg.Priority       `json:"priority,omitempty"`
	MaxAttempts          *int                   `json:"max_attempts,omitempty"`
	AutoEnqueueOnReady   bool                   `json:"auto_enqueue_on_ready,omitempty"`
	Draft                bool                   `json:"draft,omitempty"`
	ApprovalPolicy       taskpkg.ApprovalPolicy `json:"approval_policy,omitempty"`
	Owner                *taskpkg.Ownership     `json:"owner,omitempty"`
	WakeCreator          *bool                  `json:"wake_creator,omitempty"`
	Metadata             json.RawMessage        `json:"metadata,omitempty"`
}

CreateTaskChildRequest is the shared child-task create payload.

type CreateTaskRequest

type CreateTaskRequest struct {
	ID                   string                 `json:"id,omitempty"`
	Identifier           string                 `json:"identifier,omitempty"`
	Scope                taskpkg.Scope          `json:"scope"`
	Workspace            string                 `json:"workspace,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
	Title                string                 `json:"title"`
	Description          string                 `json:"description,omitempty"`
	Priority             taskpkg.Priority       `json:"priority,omitempty"`
	MaxAttempts          *int                   `json:"max_attempts,omitempty"`
	AutoEnqueueOnReady   bool                   `json:"auto_enqueue_on_ready,omitempty"`
	Draft                bool                   `json:"draft,omitempty"`
	ApprovalPolicy       taskpkg.ApprovalPolicy `json:"approval_policy,omitempty"`
	Owner                *taskpkg.Ownership     `json:"owner,omitempty"`
	WakeCreator          *bool                  `json:"wake_creator,omitempty"`
	Metadata             json.RawMessage        `json:"metadata,omitempty"`
}

CreateTaskRequest is the shared task-create request payload.

type CreateTaskRunReviewRequest

type CreateTaskRunReviewRequest = taskpkg.RunReviewRequest

CreateTaskRunReviewRequest captures one request to review a terminal task run.

type CreateTriggerRequest

type CreateTriggerRequest struct {
	Scope              automationpkg.Scope            `json:"scope"`
	Name               string                         `json:"name"`
	TargetKind         automationpkg.TargetKind       `json:"target_kind,omitempty"`
	AgentName          string                         `json:"agent_name"`
	WorkspaceID        string                         `json:"workspace_id,omitempty"`
	Prompt             string                         `json:"prompt"`
	Event              string                         `json:"event"`
	Filter             map[string]string              `json:"filter,omitempty"`
	LoopTarget         *automationpkg.LoopTarget      `json:"loop_target,omitempty"`
	Enabled            *bool                          `json:"enabled,omitempty"`
	Retry              *automationpkg.RetryConfig     `json:"retry,omitempty"`
	FireLimit          *automationpkg.FireLimitConfig `json:"fire_limit,omitempty"`
	WebhookID          string                         `json:"webhook_id,omitempty"`
	EndpointSlug       string                         `json:"endpoint_slug,omitempty"`
	WebhookSecretValue string                         `json:"webhook_secret_value,omitempty"`
}

CreateTriggerRequest is the shared automation trigger create payload.

type CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
	RootDir      string   `json:"root_dir"`
	Name         string   `json:"name,omitempty"`
	AddDirs      []string `json:"add_dirs,omitempty"`
	DefaultAgent string   `json:"default_agent,omitempty"`
	SandboxRef   string   `json:"sandbox_ref,omitempty"`
}

CreateWorkspaceRequest is the shared workspace creation request payload.

type CursorPagePayload

type CursorPagePayload struct {
	NextCursor string `json:"next_cursor,omitempty"`
	HasMore    bool   `json:"has_more"`
	Limit      int    `json:"limit"`
}

CursorPagePayload describes one bounded stable-cursor page. NextCursor continues in the direction of the request. Limit is the normalized bound applied by the server.

type DaemonStatusPayload

type DaemonStatusPayload struct {
	Status         string                `json:"status"`
	PID            int                   `json:"pid"`
	StartedAt      time.Time             `json:"started_at"`
	Socket         string                `json:"socket"`
	HTTPHost       string                `json:"http_host"`
	HTTPPort       int                   `json:"http_port"`
	UserHomeDir    string                `json:"user_home_dir"`
	ActiveSessions int                   `json:"active_sessions"`
	TotalSessions  int                   `json:"total_sessions"`
	Version        string                `json:"version,omitempty"`
	Network        *NetworkStatusPayload `json:"network,omitempty"`
	Gateway        *GatewayStatusPayload `json:"gateway,omitempty"`
	SchemaStreams  []SchemaStreamStatus  `json:"schema_streams"`
}

DaemonStatusPayload is the shared daemon status response payload.

type DeleteAgentResponse

type DeleteAgentResponse struct {
	Name             string      `json:"name"`
	Origin           AgentOrigin `json:"origin"`
	UnshadowedOrigin AgentOrigin `json:"unshadowed_origin,omitempty"`
}

DeleteAgentResponse reports the effective definition removed from disk.

type DeleteLoopInputDefaultResponse

type DeleteLoopInputDefaultResponse struct {
	LoopName string                 `json:"loop_name"`
	Key      string                 `json:"key"`
	Scope    LoopInputDefaultsScope `json:"scope"`
	Deleted  bool                   `json:"deleted"`
}

DeleteLoopInputDefaultResponse reports whether one configured key was present before deletion.

type DeleteResourceRequest

type DeleteResourceRequest struct {
	ExpectedVersion int64 `json:"expected_version"`
}

DeleteResourceRequest is the shared desired-state delete payload.

type DevLinkExtensionRequest

type DevLinkExtensionRequest struct {
	OriginPath           string `json:"origin_path"`
	GenerationHash       string `json:"generation_hash"`
	ConfirmNetworkDigest string `json:"confirm_network_digest,omitempty"`
}

DevLinkExtensionRequest links one immutable generation under the caller's trusted workspace.

type DiagnosticCodeSpec

type DiagnosticCodeSpec = diagnosticcontract.DiagnosticCodeSpec

DiagnosticCodeSpec records the canonical owner metadata for one code.

func DiagnosticCodeSpecs

func DiagnosticCodeSpecs() []DiagnosticCodeSpec

DiagnosticCodeSpecs returns the sorted canonical diagnostic code registry.

type DiagnosticItem

type DiagnosticItem = diagnosticcontract.DiagnosticItem

DiagnosticItem is the canonical actionable-diagnostic wire shape.

type DoctorPayload

type DoctorPayload struct {
	SchemaVersion string               `json:"schema_version"`
	GeneratedAt   time.Time            `json:"generated_at"`
	DurationMS    int64                `json:"duration_ms"`
	Status        string               `json:"status"`
	Summary       DoctorSummaryPayload `json:"summary"`
	Items         []DiagnosticItem     `json:"items"`
}

DoctorPayload is the diagnostic probe result shared by HTTP, UDS, and CLI JSON.

type DoctorSummaryPayload

type DoctorSummaryPayload struct {
	Total            int            `json:"total"`
	CountsBySeverity map[string]int `json:"counts_by_severity"`
}

DoctorSummaryPayload provides stable severity counters for agents.

type DrainState

type DrainState string

DrainState is the closed daemon new-work admission state.

const (
	DrainStateActive   DrainState = "active"
	DrainStateDraining DrainState = "draining"
)

type DrainStatusResponse

type DrainStatusResponse struct {
	State                      DrainState `json:"state"`
	AdmissionClosed            bool       `json:"admission_closed"`
	ActiveSessionExecutions    int        `json:"active_session_executions"`
	ActiveTaskClaims           int        `json:"active_task_claims"`
	AuthoritativeClaimsSettled bool       `json:"authoritative_claims_settled"`
	SessionExecutionSettled    bool       `json:"session_execution_settled"`
	SafeToStop                 bool       `json:"safe_to_stop"`
}

DrainStatusResponse is shared by HTTP, UDS, and CLI control surfaces.

type DuplicateAgentOverrides

type DuplicateAgentOverrides struct {
	Provider        string                   `json:"provider,omitempty"`
	Command         string                   `json:"command,omitempty"`
	Model           string                   `json:"model,omitempty"`
	ReasoningEffort ReasoningEffort          `json:"reasoning_effort,omitempty"`
	Tools           []string                 `json:"tools,omitempty"`
	Toolsets        []string                 `json:"toolsets,omitempty"`
	DenyTools       []string                 `json:"deny_tools,omitempty"`
	Permissions     SettingsPermissionMode   `json:"permissions,omitempty"`
	CategoryPath    []string                 `json:"category_path,omitempty"`
	Skills          *CreateAgentSkillsConfig `json:"skills,omitempty"`
	Prompt          string                   `json:"prompt,omitempty"`
}

DuplicateAgentOverrides captures caller-editable fields applied to a clone.

type DuplicateAgentRequest

type DuplicateAgentRequest struct {
	Name      string                   `json:"name"`
	Scope     AgentCreateScope         `json:"scope,omitempty"`
	Workspace string                   `json:"workspace,omitempty"`
	Overrides *DuplicateAgentOverrides `json:"overrides,omitempty"`
}

DuplicateAgentRequest clones the effective route agent definition.

type EnableExtensionRequest

type EnableExtensionRequest struct {
	ConfirmNetworkDigest string `json:"confirm_network_digest,omitempty"`
}

EnableExtensionRequest carries digest-exact network participation consent.

type EnqueueTaskRunRequest

type EnqueueTaskRunRequest struct {
	IdempotencyKey       string                 `json:"idempotency_key,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
	Metadata             json.RawMessage        `json:"metadata,omitempty"`
}

EnqueueTaskRunRequest is the shared run-enqueue request payload.

type ErrorPayload

type ErrorPayload struct {
	Error      string            `json:"error"`
	Code       string            `json:"code,omitempty"`
	Details    map[string]string `json:"details,omitempty"`
	Diagnostic *DiagnosticItem   `json:"diagnostic,omitempty"`
}

ErrorPayload is the shared error response payload.

type ExtensionCommandGroupPayload

type ExtensionCommandGroupPayload struct {
	Extension string `json:"extension"`
	Path      string `json:"path"`
	Summary   string `json:"summary"`
}

ExtensionCommandGroupPayload is one non-executable command presentation group.

type ExtensionCommandPayload

type ExtensionCommandPayload struct {
	Extension        string                 `json:"extension"`
	Verb             string                 `json:"verb"`
	ToolID           string                 `json:"tool_id"`
	Summary          string                 `json:"summary"`
	Example          string                 `json:"example,omitempty"`
	Flags            []toolspkg.CommandFlag `json:"flags"`
	RiskClass        toolspkg.RiskClass     `json:"risk_class"`
	ApprovalRequired bool                   `json:"approval_required"`
}

ExtensionCommandPayload is one executable command leaf projected from an active extension tool.

type ExtensionCommandsResponse

type ExtensionCommandsResponse struct {
	Commands []ExtensionCommandPayload      `json:"commands"`
	Groups   []ExtensionCommandGroupPayload `json:"groups"`
}

ExtensionCommandsResponse wraps the storage-free contributed-command projection.

type ExtensionEnablePreviewPayload

type ExtensionEnablePreviewPayload struct {
	Extension                   string                      `json:"extension"`
	Changes                     []ExtensionKitChangePayload `json:"changes"`
	AgentConflicts              []string                    `json:"agent_conflicts"`
	MissingEnv                  []string                    `json:"missing_env"`
	AutomationStarting          []string                    `json:"automation_starting"`
	NetworkRequirementDigest    string                      `json:"network_requirement_digest"`
	NetworkConfirmationRequired bool                        `json:"network_confirmation_required"`
}

ExtensionEnablePreviewPayload is the mutation-free enable projection.

type ExtensionEnableResult

type ExtensionEnableResult struct {
	Extension         ExtensionPayload `json:"extension"`
	AutomationStarted []string         `json:"automation_started"`
}

ExtensionEnableResult is the committed enable action result.

type ExtensionInventoryPayload

type ExtensionInventoryPayload struct {
	Extension string                    `json:"extension"`
	Enabled   bool                      `json:"enabled"`
	Items     []ExtensionKitItemPayload `json:"items"`
}

ExtensionInventoryPayload is the shipped/live union for one extension.

type ExtensionKitChange

type ExtensionKitChange string

ExtensionKitChange identifies how enable reconciliation will mutate one resource.

const (
	ExtensionKitChangeAdded   ExtensionKitChange = "added"
	ExtensionKitChangeChanged ExtensionKitChange = "changed"
	ExtensionKitChangeRemoved ExtensionKitChange = "removed"
)

type ExtensionKitChangePayload

type ExtensionKitChangePayload struct {
	Kind   resources.ResourceKind `json:"kind"`
	ID     string                 `json:"id"`
	Name   string                 `json:"name"`
	Change ExtensionKitChange     `json:"change"`
}

ExtensionKitChangePayload is one resource delta in an enable preview.

type ExtensionKitItemPayload

type ExtensionKitItemPayload struct {
	Kind resources.ResourceKind `json:"kind"`
	ID   string                 `json:"id"`
	Name string                 `json:"name"`
	Live bool                   `json:"live"`
}

ExtensionKitItemPayload is one shipped or live extension resource.

type ExtensionLogPayload

type ExtensionLogPayload struct {
	Sequence       int64     `json:"sequence"`
	Timestamp      time.Time `json:"timestamp"`
	Message        string    `json:"message"`
	GenerationHash string    `json:"generation_hash,omitempty"`
}

ExtensionLogPayload is one redacted per-instance stderr record.

type ExtensionLogsResponse

type ExtensionLogsResponse struct {
	Logs []ExtensionLogPayload `json:"logs"`
}

ExtensionLogsResponse wraps a bounded snapshot of redacted extension logs.

type ExtensionManifestSummary

type ExtensionManifestSummary struct {
	Name              string   `json:"name"`
	Version           string   `json:"version"`
	Description       string   `json:"description,omitempty"`
	MinCompozyVersion string   `json:"min_compozy_version"`
	Provides          []string `json:"provides"`
	Permissions       []string `json:"permissions"`
}

ExtensionManifestSummary is the stable authoring-facing subset of a validated manifest.

type ExtensionOperationErrorPayload

type ExtensionOperationErrorPayload struct {
	Error         string          `json:"error"`
	Code          string          `json:"code"`
	Diagnostic    *DiagnosticItem `json:"diagnostic,omitempty"`
	CurrentDigest string          `json:"current_digest,omitempty"`
	Agents        []string        `json:"agents,omitempty"`
	EnvName       string          `json:"env_name,omitempty"`
	DeclaredEnv   []string        `json:"declared_env,omitempty"`
}

ExtensionOperationErrorPayload is the deterministic extension lifecycle error envelope.

type ExtensionPayload

type ExtensionPayload struct {
	Name                        string                       `json:"name"`
	WorkspaceID                 string                       `json:"workspace_id,omitempty"`
	Version                     string                       `json:"version"`
	Type                        string                       `json:"type"`
	Source                      string                       `json:"source"`
	Enabled                     bool                         `json:"enabled"`
	State                       string                       `json:"state"`
	Capabilities                []string                     `json:"capabilities,omitempty"`
	Permissions                 []string                     `json:"permissions,omitempty"`
	RequiresEnv                 []string                     `json:"requires_env,omitempty"`
	MissingEnv                  []string                     `json:"missing_env,omitempty"`
	BoundEnvKeys                []string                     `json:"bound_env_keys,omitempty"`
	NetworkRequirementDigest    string                       `json:"network_requirement_digest,omitempty"`
	NetworkConfirmationRequired bool                         `json:"network_confirmation_required"`
	PID                         int                          `json:"pid,omitempty"`
	UptimeSeconds               int64                        `json:"uptime_seconds,omitempty"`
	Health                      string                       `json:"health,omitempty"`
	HealthMessage               string                       `json:"health_message,omitempty"`
	LastError                   string                       `json:"last_error,omitempty"`
	FailureCode                 string                       `json:"failure_code,omitempty"`
	ConsecutiveFailures         int                          `json:"consecutive_failures"`
	RestartBackoffMS            int64                        `json:"restart_backoff_ms"`
	GenerationHash              string                       `json:"generation_hash,omitempty"`
	Dev                         bool                         `json:"dev,omitempty"`
	OverridesPublished          bool                         `json:"overrides_published,omitempty"`
	OriginPath                  string                       `json:"origin_path,omitempty"`
	UpdateAvailable             bool                         `json:"update_available"`
	RemoteVersion               string                       `json:"remote_version,omitempty"`
	DigestMatched               bool                         `json:"digest_matched"`
	DaemonRunning               bool                         `json:"daemon_running"`
	Provenance                  *ExtensionProvenancePayload  `json:"provenance,omitempty"`
	Marketplace                 *MarketplaceListingPayload   `json:"marketplace,omitempty"`
	Trust                       *ExtensionTrustReportPayload `json:"trust,omitempty"`
	Diagnostics                 []DiagnosticItem             `json:"diagnostics,omitempty"`
}

ExtensionPayload is the shared extension response payload surfaced by CLI APIs.

type ExtensionProvenancePayload

type ExtensionProvenancePayload struct {
	Slug                string                       `json:"slug,omitempty"`
	CatalogEntryID      string                       `json:"catalog_entry_id,omitempty"`
	InstalledFrom       string                       `json:"installed_from"`
	SourceURL           string                       `json:"source_url,omitempty"`
	ChecksumSHA256      string                       `json:"checksum_sha256"`
	ArchiveDigestSHA256 string                       `json:"archive_digest_sha256,omitempty"`
	DigestMatched       bool                         `json:"digest_matched"`
	ChecksumVerified    bool                         `json:"checksum_verified"`
	RegistryTier        string                       `json:"registry_tier"`
	Permissions         []string                     `json:"permissions,omitempty"`
	InstalledAt         time.Time                    `json:"installed_at"`
	InstalledBy         string                       `json:"installed_by"`
	AllowUnverified     bool                         `json:"allow_unverified"`
	Warnings            []DiagnosticItem             `json:"warnings,omitempty"`
	Trust               *ExtensionTrustReportPayload `json:"trust,omitempty"`
}

ExtensionProvenancePayload contains the persisted source and trust record.

type ExtensionProvenanceResponse

type ExtensionProvenanceResponse struct {
	Provenance ExtensionProvenancePayload `json:"provenance"`
}

ExtensionProvenanceResponse wraps one installed extension provenance record.

type ExtensionRemoveResponse

type ExtensionRemoveResponse struct {
	Extension ManagedExtensionRemovePayload `json:"extension"`
}

ExtensionRemoveResponse wraps one removed extension result.

type ExtensionResponse

type ExtensionResponse struct {
	Extension ExtensionPayload `json:"extension"`
}

ExtensionResponse wraps one extension payload.

type ExtensionSearchItem

type ExtensionSearchItem struct {
	Slug             string `json:"slug"`
	Name             string `json:"name"`
	Description      string `json:"description,omitempty"`
	Author           string `json:"author,omitempty"`
	Version          string `json:"version,omitempty"`
	Downloads        int    `json:"downloads,omitempty"`
	Source           string `json:"source"`
	Tier             string `json:"tier"`
	Integrity        string `json:"integrity"`
	DigestMatched    bool   `json:"digest_matched"`
	Installed        bool   `json:"installed"`
	InstalledVersion string `json:"installed_version,omitempty"`
	UpdateAvailable  bool   `json:"update_available"`
}

ExtensionSearchItem is one source-tagged extension discovery result.

type ExtensionSearchRequest

type ExtensionSearchRequest struct {
	Query   string
	Sources []string
	Limit   int
	Cursor  string
}

ExtensionSearchRequest selects global extension discovery sources.

type ExtensionSearchResponse

type ExtensionSearchResponse struct {
	Items           []ExtensionSearchItem `json:"items"`
	NextCursor      string                `json:"next_cursor,omitempty"`
	SourcesDegraded []string              `json:"sources_degraded,omitempty"`
}

ExtensionSearchResponse is a stable page from a cached source-union snapshot.

type ExtensionSecretBindingPayload

type ExtensionSecretBindingPayload struct {
	EnvName string `json:"env_name"`
	Stale   bool   `json:"stale"`
}

ExtensionSecretBindingPayload reports one bound key without exposing its Vault ref or value.

type ExtensionSecretInput

type ExtensionSecretInput struct {
	Value    *string `json:"value,omitempty"`
	VaultRef *string `json:"vault_ref,omitempty"`
}

ExtensionSecretInput is one write-only value or existing Vault binding.

type ExtensionSecretsPayload

type ExtensionSecretsPayload struct {
	DeclaredEnv  []string                        `json:"declared_env"`
	BoundEnvKeys []string                        `json:"bound_env_keys"`
	Bindings     []ExtensionSecretBindingPayload `json:"bindings"`
}

ExtensionSecretsPayload exposes binding presence without refs or values.

type ExtensionTrustReportPayload

type ExtensionTrustReportPayload struct {
	Decision         string           `json:"decision"`
	RegistryTier     string           `json:"registry_tier"`
	ChecksumVerified bool             `json:"checksum_verified"`
	AllowUnverified  bool             `json:"allow_unverified"`
	Warnings         []DiagnosticItem `json:"warnings,omitempty"`
}

ExtensionTrustReportPayload records the trust decision for an extension.

type ExtensionUpdateBatchResponse

type ExtensionUpdateBatchResponse struct {
	Updates []ManagedExtensionUpdatePayload `json:"updates"`
}

ExtensionUpdateBatchResponse wraps per-item extension update outcomes.

type ExtensionUpdateResponse

type ExtensionUpdateResponse struct {
	Update ManagedExtensionUpdatePayload `json:"update"`
}

ExtensionUpdateResponse wraps one marketplace extension update result.

type ExtensionValidatePayload

type ExtensionValidatePayload struct {
	Manifest     *ExtensionManifestSummary `json:"manifest,omitempty"`
	Issues       []ValidationIssue         `json:"issues"`
	ConsentAreas []ConsentArea             `json:"consent_areas"`
}

ExtensionValidatePayload is the shared result for extension-package validation surfaces.

type ExtensionValidationErrorPayload

type ExtensionValidationErrorPayload struct {
	Error      string            `json:"error"`
	Diagnostic *DiagnosticItem   `json:"diagnostic,omitempty"`
	Issues     []ValidationIssue `json:"issues"`
}

ExtensionValidationErrorPayload reports positioned extension validation failures.

type ExtensionsResponse

type ExtensionsResponse struct {
	Extensions []ExtensionPayload `json:"extensions"`
}

ExtensionsResponse wraps the extension list payload.

type FSBrowseResponse

type FSBrowseResponse struct {
	Path    string           `json:"path"`
	Parent  string           `json:"parent,omitempty"`
	Home    string           `json:"home,omitempty"`
	Entries []FSEntryPayload `json:"entries"`
}

FSBrowseResponse lists the contents of one directory plus navigation anchors.

type FSEntryPayload

type FSEntryPayload struct {
	Name  string `json:"name"`
	Path  string `json:"path"`
	IsDir bool   `json:"is_dir"`
}

FSEntryPayload describes one filesystem entry returned by the directory browser.

type FailTaskRunRequest

type FailTaskRunRequest struct {
	Error    string          `json:"error"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

FailTaskRunRequest is the shared run-fail request payload.

type FanOutTaskRunsRequest

type FanOutTaskRunsRequest struct {
	NetworkParticipation *participation.Request            `json:"network_participation,omitempty"`
	Designations         []TaskFanOutRunDesignationRequest `json:"designations"`
	IdempotencyKey       string                            `json:"idempotency_key,omitempty"`
}

FanOutTaskRunsRequest captures one designated fan-out enqueue request.

type FanOutTaskRunsResponse

type FanOutTaskRunsResponse struct {
	DesignationGroupID string           `json:"designation_group_id"`
	Runs               []TaskRunPayload `json:"runs"`
}

FanOutTaskRunsResponse wraps designated sibling runs enqueued for one task.

type ForceFailTaskRunRequest

type ForceFailTaskRunRequest struct {
	Reason   string          `json:"reason"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

ForceFailTaskRunRequest is the shared forced-failure request payload.

type ForceReleaseTaskRunRequest

type ForceReleaseTaskRunRequest struct {
	Reason   string          `json:"reason,omitempty"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

ForceReleaseTaskRunRequest is the shared force-release request payload.

type GatewayAddressPayload

type GatewayAddressPayload struct {
	Tier    string `json:"tier"`
	Address string `json:"address"`
	Live    bool   `json:"live"`
}

GatewayAddressPayload reports one listener address without credential material.

type GatewayAuditAuthPayload

type GatewayAuditAuthPayload struct {
	Mode              string `json:"mode"`
	RequiredRemotely  bool   `json:"required_remotely"`
	ActiveDeviceCount int    `json:"active_device_count"`
}

GatewayAuditAuthPayload describes the active remote authentication boundary.

type GatewayAuditFindingPayload

type GatewayAuditFindingPayload struct {
	ID          string `json:"id"`
	Severity    string `json:"severity"`
	Summary     string `json:"summary"`
	Remediation string `json:"remediation"`
	Tier        string `json:"tier,omitempty"`
	Resource    string `json:"resource,omitempty"`
}

GatewayAuditFindingPayload is one stable, ranked, actionable finding.

type GatewayAuditPayload

type GatewayAuditPayload struct {
	Ran              bool                         `json:"ran"`
	NoFindings       bool                         `json:"no_findings"`
	LocalOnly        bool                         `json:"local_only"`
	Status           GatewayStatusPayload         `json:"status"`
	Auth             GatewayAuditAuthPayload      `json:"auth"`
	DeviceHighlights GatewayDeviceHighlights      `json:"device_highlights"`
	Findings         []GatewayAuditFindingPayload `json:"findings"`
}

GatewayAuditPayload is one completed, redacted security posture audit.

type GatewayDeviceHighlights

type GatewayDeviceHighlights struct {
	Active         int      `json:"active"`
	Revoked        int      `json:"revoked"`
	Stale          int      `json:"stale"`
	RecentlyPaired int      `json:"recently_paired"`
	StaleDeviceIDs []string `json:"stale_device_ids"`
}

GatewayDeviceHighlights summarizes inventory signals without credential material.

type GatewayDevicePayload

type GatewayDevicePayload struct {
	ID            string     `json:"id"`
	Name          string     `json:"name"`
	ActorKind     string     `json:"actor_kind"`
	PairingOrigin string     `json:"pairing_origin"`
	RevokeEpoch   uint64     `json:"revoke_epoch"`
	CreatedAt     time.Time  `json:"created_at"`
	LastSeenAt    *time.Time `json:"last_seen_at,omitempty"`
	RevokedAt     *time.Time `json:"revoked_at,omitempty"`
}

GatewayDevicePayload is the redacted representation of one paired device.

type GatewayDeviceRenameRequest

type GatewayDeviceRenameRequest struct {
	Name string `json:"name" binding:"required"`
}

GatewayDeviceRenameRequest changes a paired device's operator-visible name.

type GatewayDevicesResponse

type GatewayDevicesResponse struct {
	Devices []GatewayDevicePayload `json:"devices"`
}

GatewayDevicesResponse wraps the redacted paired-device inventory.

type GatewayIngressBindRequest

type GatewayIngressBindRequest struct {
	SubjectKind string `json:"subject_kind" binding:"required"`
	SubjectID   string `json:"subject_id"   binding:"required"`
	Confirmed   bool   `json:"confirmed"    binding:"required"`
}

GatewayIngressBindRequest confirms public ingress for one supported subject.

type GatewayIngressBindingResponse

type GatewayIngressBindingResponse struct {
	Binding GatewayIngressPayload `json:"binding"`
	Changed bool                  `json:"changed"`
}

GatewayIngressBindingResponse reports the projected binding and whether it changed.

type GatewayIngressPayload

type GatewayIngressPayload struct {
	SubjectKind                 string     `json:"subject_kind"`
	SubjectID                   string     `json:"subject_id"`
	ScopeKind                   string     `json:"scope_kind"`
	WorkspaceID                 string     `json:"workspace_id,omitempty"`
	URL                         string     `json:"url,omitempty"`
	Reachability                string     `json:"reachability"`
	EndpointGeneration          uint64     `json:"endpoint_generation"`
	ConfirmedEndpointGeneration uint64     `json:"confirmed_endpoint_generation,omitempty"`
	ConfirmedAt                 *time.Time `json:"confirmed_at,omitempty"`
	EnablePath                  string     `json:"enable_path,omitempty"`
}

GatewayIngressPayload is the redacted reachability projection for one subject.

type GatewayIngressUnbindResponse

type GatewayIngressUnbindResponse struct {
	SubjectKind string `json:"subject_kind"`
	SubjectID   string `json:"subject_id"`
	Changed     bool   `json:"changed"`
}

GatewayIngressUnbindResponse reports the subject removed from public ingress.

type GatewayIssuedCredentialPayload

type GatewayIssuedCredentialPayload struct {
	Device     GatewayDevicePayload `json:"device"`
	Credential string               `json:"credential,omitempty"`
}

GatewayIssuedCredentialPayload carries a paired device and its one-time credential.

type GatewayPairingArtifactPayload

type GatewayPairingArtifactPayload struct {
	Artifact  string    `json:"artifact"`
	ExpiresAt time.Time `json:"expires_at"`
}

GatewayPairingArtifactPayload carries one short-lived, single-use pairing artifact.

type GatewayPairingRedeemRequest

type GatewayPairingRedeemRequest struct {
	Artifact   string `json:"artifact"             binding:"required"`
	Name       string `json:"name"                 binding:"required"`
	ActorKind  string `json:"actor_kind"           binding:"required"`
	Credential string `json:"credential,omitempty"`
}

GatewayPairingRedeemRequest exchanges a pairing artifact for a device credential.

type GatewayProviderEnableRequest

type GatewayProviderEnableRequest struct {
	Tier               string `json:"tier"                       binding:"required"`
	InstallSource      string `json:"install_source"             binding:"required"`
	DigestConfirmed    string `json:"digest_confirmed,omitempty"`
	ExpectedGeneration uint64 `json:"expected_generation"`
}

GatewayProviderEnableRequest enables one provider from a confirmed install source.

type GatewayProviderPayload

type GatewayProviderPayload struct {
	Name       string `json:"name"`
	Tier       string `json:"tier"`
	Desired    string `json:"desired"`
	Observed   string `json:"observed"`
	Generation uint64 `json:"generation"`
	Health     string `json:"health"`
	Cause      string `json:"cause,omitempty"`
}

GatewayProviderPayload reports lifecycle and health for one connectivity provider.

type GatewayRefusalPayload

type GatewayRefusalPayload struct {
	Cause string `json:"cause"`
	Fix   string `json:"fix"`
}

GatewayRefusalPayload explains why exposure was refused and how to resolve it.

type GatewayRevokePayload

type GatewayRevokePayload struct {
	Device   GatewayDevicePayload `json:"device"`
	Changed  bool                 `json:"changed"`
	Canceled int                  `json:"canceled"`
}

GatewayRevokePayload reports the result of revoking a paired device.

type GatewayStatusPayload

type GatewayStatusPayload struct {
	Enabled   bool                     `json:"enabled"`
	Changed   bool                     `json:"changed"`
	Tiers     []GatewayTierPayload     `json:"tiers"`
	Surfaces  []GatewaySurfacePayload  `json:"surfaces"`
	Providers []GatewayProviderPayload `json:"providers"`
	Addresses []GatewayAddressPayload  `json:"addresses"`
	Devices   []GatewayDevicePayload   `json:"devices"`
	Bindings  []GatewayIngressPayload  `json:"bindings"`
	Refusal   *GatewayRefusalPayload   `json:"refusal,omitempty"`
}

GatewayStatusPayload is the redacted operator-global exposure projection.

type GatewayStreamTicketPayload

type GatewayStreamTicketPayload struct {
	Ticket    string    `json:"ticket"`
	ExpiresAt time.Time `json:"expires_at"`
}

GatewayStreamTicketPayload carries one short-lived, single-use stream ticket.

type GatewaySurfacePayload

type GatewaySurfacePayload struct {
	Surface    string `json:"surface"`
	Tier       string `json:"tier"`
	Desired    string `json:"desired"`
	Observed   string `json:"observed"`
	Generation uint64 `json:"generation"`
}

GatewaySurfacePayload reports exposure state for one gateway surface.

type GatewaySurfaceRequest

type GatewaySurfaceRequest struct {
	Surface            string `json:"surface"             binding:"required"`
	Tier               string `json:"tier"                binding:"required"`
	Desired            string `json:"desired"             binding:"required"`
	ExpectedGeneration uint64 `json:"expected_generation"`
	Consent            bool   `json:"consent"`
}

GatewaySurfaceRequest changes one gateway surface using optimistic concurrency.

type GatewayTierPayload

type GatewayTierPayload struct {
	Tier            string `json:"tier"`
	Desired         string `json:"desired"`
	Observed        string `json:"observed"`
	ListenerAddress string `json:"listener_address,omitempty"`
	Advertised      bool   `json:"advertised"`
}

GatewayTierPayload reports desired and observed state for one gateway tier.

type GoalBlockingIssue

type GoalBlockingIssue struct {
	ID   string `json:"id"`
	Note string `json:"note"`
}

GoalBlockingIssue is one public verdict blocker.

type GoalCommandOutcome

type GoalCommandOutcome string

GoalCommandOutcome is the structured Goal command result vocabulary.

const (
	GoalOutcomeStarted  GoalCommandOutcome = "started"
	GoalOutcomeReplaced GoalCommandOutcome = "replaced"
	GoalOutcomeStatus   GoalCommandOutcome = "status"
	GoalOutcomePaused   GoalCommandOutcome = "paused"
	GoalOutcomeResumed  GoalCommandOutcome = "resumed"
	GoalOutcomeCleared  GoalCommandOutcome = "cleared"
	GoalOutcomeError    GoalCommandOutcome = "error"
)

type GoalCommandResult

type GoalCommandResult struct {
	Outcome       GoalCommandOutcome `json:"outcome"`
	ReasonCode    *GoalReasonCode    `json:"reason_code"`
	Snapshot      *GoalSnapshot      `json:"snapshot"`
	ReplacedRunID *string            `json:"replaced_run_id"`
}

GoalCommandResult is the shared structured success/error envelope for Goal operations.

type GoalContextSnapshot

type GoalContextSnapshot struct {
	State      GoalContextState `json:"state"`
	Used       *int64           `json:"used"`
	Size       *int64           `json:"size"`
	Ratio      *float64         `json:"ratio"`
	NudgeRatio float64          `json:"nudge_ratio"`
	ReportedAt *time.Time       `json:"reported_at"`
}

GoalContextSnapshot is checkpoint-pinned context telemetry.

type GoalContextState

type GoalContextState string

GoalContextState is the closed public context freshness vocabulary.

const (
	GoalContextKnown   GoalContextState = "known"
	GoalContextUnknown GoalContextState = "unknown"
	GoalContextPending GoalContextState = "pending"
)

type GoalCriterionResult

type GoalCriterionResult struct {
	ID             string                  `json:"id"`
	Type           string                  `json:"type"`
	Outcome        GoalVerdictOutcome      `json:"outcome"`
	Passed         bool                    `json:"passed"`
	Broken         bool                    `json:"broken,omitempty"`
	ExitCode       *int                    `json:"exit_code,omitempty"`
	Stdout         string                  `json:"stdout,omitempty"`
	Stderr         string                  `json:"stderr,omitempty"`
	Score          *float64                `json:"score,omitempty"`
	Evidence       json.RawMessage         `json:"evidence,omitempty"`
	BlockingIssues []GoalBlockingIssue     `json:"blocking_issues,omitempty"`
	Warnings       []GoalDiagnosticWarning `json:"warnings,omitempty"`
	Payload        json.RawMessage         `json:"payload,omitempty"`
}

GoalCriterionResult is one sanitized Goal judge criterion result.

type GoalDiagnosticWarning

type GoalDiagnosticWarning struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

GoalDiagnosticWarning is one non-terminal Goal judge diagnostic.

type GoalPromptKind

type GoalPromptKind string

GoalPromptKind is the public transcript classification for engine-owned Goal prompts.

const (
	GoalPromptWork         GoalPromptKind = "goal-work"
	GoalPromptContinuation GoalPromptKind = "goal-continuation"
	GoalPromptCompaction   GoalPromptKind = "goal-compaction"
)

type GoalPromptMeta

type GoalPromptMeta struct {
	Kind          GoalPromptKind `json:"kind"`
	RunID         string         `json:"run_id"`
	NodeID        string         `json:"node_id"`
	Generation    int64          `json:"generation"`
	ItemIndex     int            `json:"item_index"`
	Turn          *int           `json:"turn"`
	PromptAttempt int            `json:"prompt_attempt"`
	PromptID      string         `json:"prompt_id"`
}

GoalPromptMeta classifies one engine-owned Goal prompt in persisted transcript events.

type GoalReasonCode

type GoalReasonCode string

GoalReasonCode is the stable public Goal error and transition vocabulary.

const (
	GoalReasonNotActive                  GoalReasonCode = "goal_not_active"
	GoalReasonReplaceRequired            GoalReasonCode = "goal_replace_required"
	GoalReasonReplaceStale               GoalReasonCode = "goal_replace_stale"
	GoalReasonObjectiveRequired          GoalReasonCode = "goal_objective_required"
	GoalReasonObjectiveTooLarge          GoalReasonCode = "goal_objective_too_large"
	GoalReasonContractClauseEmpty        GoalReasonCode = "goal_contract_clause_empty"
	GoalReasonCommandInvalid             GoalReasonCode = "goal_command_invalid"
	GoalReasonDraftRequiresIdle          GoalReasonCode = "goal_draft_requires_idle"
	GoalReasonEvidenceTooLarge           GoalReasonCode = "goal_evidence_too_large"
	GoalReasonReportConflict             GoalReasonCode = "goal_report_conflict"
	GoalReasonSessionBusyQueueFull       GoalReasonCode = "goal_session_busy_queue_full"
	GoalReasonTurnFilterInvalid          GoalReasonCode = "goal_turn_filter_invalid"
	GoalReasonJudgeUnavailable           GoalReasonCode = "goal_judge_unavailable"
	GoalReasonJudgeBroken                GoalReasonCode = "goal_judge_broken"
	GoalReasonJudgeOutcomeInvalid        GoalReasonCode = "goal_judge_outcome_invalid"
	GoalReasonActionControlInvalid       GoalReasonCode = "goal_action_control_invalid"
	GoalReasonStopReasonInvalid          GoalReasonCode = "goal_stop_reason_invalid"
	GoalReasonPromptRequestFailed        GoalReasonCode = "goal_prompt_request_failed"
	GoalReasonAgentRefused               GoalReasonCode = "goal_agent_refused"
	GoalReasonCompactionCancelled        GoalReasonCode = "goal_compaction_cancel" + "led"
	GoalReasonRecoveryAmbiguous          GoalReasonCode = "goal_recovery_ambiguous"
	GoalReasonControlRevokedInFlight     GoalReasonCode = "goal_control_revoked_in_flight"
	GoalReasonReseedConfirmationRequired GoalReasonCode = "goal_reseed_confirmation_required"
	GoalReasonPresubmitRetriesExhausted  GoalReasonCode = "goal_presubmit_retries_exhausted"
	GoalReasonBudgetFenced               GoalReasonCode = "goal_budget_fenced"
	GoalReasonOriginInvalid              GoalReasonCode = "goal_origin_invalid"
	GoalReasonOriginWorkspaceMismatch    GoalReasonCode = "goal_origin_workspace_mismatch"
	GoalReasonOriginProfileUnavailable   GoalReasonCode = "goal_origin_profile_unavailable"
	GoalReasonControlStale               GoalReasonCode = "goal_control_stale"
	GoalReasonPromptFenced               GoalReasonCode = "goal_prompt_fenced"
	GoalReasonSessionCreationMismatch    GoalReasonCode = "session_creation_identity_mismatch"
	GoalReasonContinuousBindingMismatch  GoalReasonCode = "continuous_binding_mismatch"
)

type GoalSnapshot

type GoalSnapshot struct {
	RunID           string              `json:"run_id"`
	NodeID          string              `json:"node_id"`
	Objective       string              `json:"objective"`
	OriginSessionID string              `json:"origin_session_id"`
	BoundSessionID  string              `json:"bound_session_id"`
	Status          GoalStatus          `json:"status"`
	RunStatus       LoopRunStatus       `json:"run_status"`
	Cause           *GoalReasonCode     `json:"cause"`
	TurnsUsed       int                 `json:"turns_used"`
	TurnLimit       int                 `json:"turn_limit"`
	Live            bool                `json:"live"`
	ContractSummary string              `json:"contract_summary"`
	LastVerdict     *GoalVerdictSummary `json:"last_verdict"`
	Context         GoalContextSnapshot `json:"context"`
}

GoalSnapshot is the canonical newest session-origin Goal projection.

type GoalSnapshotChangeCause

type GoalSnapshotChangeCause string

GoalSnapshotChangeCause classifies session Goal discovery signals.

const (
	GoalSnapshotCauseStart   GoalSnapshotChangeCause = "start"
	GoalSnapshotCauseReplace GoalSnapshotChangeCause = "replace"
	GoalSnapshotCauseStatus  GoalSnapshotChangeCause = "status"
	GoalSnapshotCauseClear   GoalSnapshotChangeCause = "clear"
	GoalSnapshotCauseReseed  GoalSnapshotChangeCause = "reseed"
)

type GoalSnapshotChangedPayload

type GoalSnapshotChangedPayload struct {
	SessionID      string                  `json:"session_id"`
	RunID          *string                 `json:"run_id"`
	BoundSessionID *string                 `json:"bound_session_id"`
	Revision       int64                   `json:"revision"`
	Cause          GoalSnapshotChangeCause `json:"cause"`
}

GoalSnapshotChangedPayload is the persisted session stream discovery signal.

type GoalStatus

type GoalStatus string

GoalStatus is the closed public Goal lifecycle vocabulary.

const (
	GoalStatusActive        GoalStatus = "active"
	GoalStatusPaused        GoalStatus = "paused"
	GoalStatusBlocked       GoalStatus = "blocked"
	GoalStatusUsageLimited  GoalStatus = "usage-limited"
	GoalStatusBudgetLimited GoalStatus = "budget-limited"
	GoalStatusComplete      GoalStatus = "complete"
)

type GoalTurn

type GoalTurn struct {
	Seq            int64                   `json:"seq"`
	Generation     int64                   `json:"generation"`
	NodeID         string                  `json:"node_id"`
	ItemIndex      int                     `json:"item_index"`
	Turn           int                     `json:"turn"`
	PromptAttempt  int                     `json:"prompt_attempt"`
	SessionID      string                  `json:"session_id"`
	BindingHandle  string                  `json:"binding_handle"`
	BindingEpoch   int64                   `json:"binding_epoch"`
	PromptID       string                  `json:"prompt_id"`
	ResultStatus   *GoalTurnResultStatus   `json:"result_status"`
	ReasonCode     *GoalReasonCode         `json:"reason_code"`
	StopReason     *ACPPromptStopReason    `json:"stop_reason"`
	VerdictOutcome *GoalVerdictOutcome     `json:"verdict_outcome"`
	BlockingIssues []GoalBlockingIssue     `json:"blocking_issues"`
	Criteria       []GoalCriterionResult   `json:"criteria"`
	Warnings       []GoalDiagnosticWarning `json:"warnings"`
	EvidenceRef    *string                 `json:"evidence_ref"`
	PromptRef      *string                 `json:"prompt_ref"`
	TokensUsed     *int64                  `json:"tokens_used"`
	ActorKind      string                  `json:"actor_kind"`
	ActorID        string                  `json:"actor_id"`
	StartedAt      time.Time               `json:"started_at"`
	EndedAt        *time.Time              `json:"ended_at"`
}

GoalTurn is one immutable-start, optionally terminal Goal audit row.

type GoalTurnPage

type GoalTurnPage struct {
	Turns        []GoalTurn `json:"turns"`
	NextAfterSeq *int64     `json:"next_after_seq"`
}

GoalTurnPage is one run-wide monotonic cursor page.

type GoalTurnResultStatus

type GoalTurnResultStatus string

GoalTurnResultStatus is the closed terminal classification for one Goal turn.

const (
	GoalTurnResultCompleted     GoalTurnResultStatus = "completed"
	GoalTurnResultInvalidResult GoalTurnResultStatus = "invalid-result"
	GoalTurnResultFailed        GoalTurnResultStatus = "failed"
	GoalTurnResultAmbiguous     GoalTurnResultStatus = "ambiguous"
)

type GoalVerdictOutcome

type GoalVerdictOutcome string

GoalVerdictOutcome is the closed Goal judge outcome vocabulary.

const (
	GoalVerdictApproved         GoalVerdictOutcome = "approved"
	GoalVerdictRejected         GoalVerdictOutcome = "rejected"
	GoalVerdictAwaitingApproval GoalVerdictOutcome = "awaiting_approval"
	GoalVerdictBlocked          GoalVerdictOutcome = "blocked"
	GoalVerdictError            GoalVerdictOutcome = "error"
	GoalVerdictTimeout          GoalVerdictOutcome = "timeout"
	GoalVerdictInvalidOutput    GoalVerdictOutcome = "invalid_output"
)

type GoalVerdictSummary

type GoalVerdictSummary struct {
	Outcome        GoalVerdictOutcome  `json:"outcome"`
	BlockingIssues []GoalBlockingIssue `json:"blocking_issues"`
	EvidenceRef    *string             `json:"evidence_ref"`
	EvaluatedAt    time.Time           `json:"evaluated_at"`
}

GoalVerdictSummary is the latest evaluated Goal verdict.

type HeartbeatActorKind

type HeartbeatActorKind string

HeartbeatActorKind describes a redacted Heartbeat authoring actor class.

const (
	HeartbeatActorUser      HeartbeatActorKind = "user"
	HeartbeatActorAgent     HeartbeatActorKind = "agent"
	HeartbeatActorExtension HeartbeatActorKind = "extension"
	HeartbeatActorSystem    HeartbeatActorKind = "system"
)

type HeartbeatActorPayload

type HeartbeatActorPayload struct {
	Kind HeartbeatActorKind `json:"kind"`
	Ref  string             `json:"ref,omitempty"`
}

HeartbeatActorPayload records a redacted Heartbeat authoring actor.

type HeartbeatConfigProvenancePayload

type HeartbeatConfigProvenancePayload struct {
	Digest string                       `json:"digest"`
	Subset HeartbeatConfigSubsetPayload `json:"subset"`
}

HeartbeatConfigProvenancePayload reports the Heartbeat config subset that shaped a policy.

type HeartbeatConfigSubsetPayload

type HeartbeatConfigSubsetPayload struct {
	Enabled                      bool   `json:"enabled"`
	MaxBodyBytes                 int64  `json:"max_body_bytes"`
	ContextProjectionBytes       int64  `json:"context_projection_bytes"`
	MinInterval                  string `json:"min_interval"`
	DefaultInterval              string `json:"default_interval"`
	WakeCooldown                 string `json:"wake_cooldown"`
	MaxWakesPerCycle             int    `json:"max_wakes_per_cycle"`
	ActiveSessionOnly            bool   `json:"active_session_only"`
	AllowActiveHoursPreferences  bool   `json:"allow_active_hours_preferences"`
	WakeEventRetention           string `json:"wake_event_retention"`
	SessionHealthStaleAfter      string `json:"session_health_stale_after"`
	SessionHealthHookMinInterval string `json:"session_health_hook_min_interval"`
}

HeartbeatConfigSubsetPayload is the canonical config authority subset for Heartbeat.

type HeartbeatContextProjectionPayload

type HeartbeatContextProjectionPayload struct {
	Include []string `json:"include,omitempty"`
}

HeartbeatContextProjectionPayload captures authored context projection hints.

type HeartbeatDeleteByPathRequest

type HeartbeatDeleteByPathRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	ExpectedDigest string `json:"expected_digest"`
}

HeartbeatDeleteByPathRequest removes HEARTBEAT.md for the route agent.

type HeartbeatDeleteRequest

type HeartbeatDeleteRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	AgentName      string `json:"agent_name"`
	ExpectedDigest string `json:"expected_digest"`
}

HeartbeatDeleteRequest removes HEARTBEAT.md through the managed authoring service.

type HeartbeatFrontmatterPayload

type HeartbeatFrontmatterPayload struct {
	Version     int                                    `json:"version"`
	Enabled     bool                                   `json:"enabled"`
	Summary     string                                 `json:"summary,omitempty"`
	Preferences HeartbeatFrontmatterPreferencesPayload `json:"preferences"`
	Context     HeartbeatContextProjectionPayload      `json:"context"`
}

HeartbeatFrontmatterPayload is the allowlisted strict HEARTBEAT.md metadata projection.

type HeartbeatFrontmatterPreferencesPayload

type HeartbeatFrontmatterPreferencesPayload struct {
	MinInterval  string                       `json:"min_interval,omitempty"`
	ActiveHours  []HeartbeatTimeWindowPayload `json:"active_hours,omitempty"`
	QuietWindows []HeartbeatTimeWindowPayload `json:"quiet_windows,omitempty"`
}

HeartbeatFrontmatterPreferencesPayload captures authored preference hints before config bounds.

type HeartbeatHistoryRequest

type HeartbeatHistoryRequest struct {
	WorkspaceID string `json:"workspace_id,omitempty"`
	AgentName   string `json:"agent_name"`
	Limit       int    `json:"limit,omitempty"`
	Cursor      string `json:"cursor,omitempty"`
}

HeartbeatHistoryRequest lists managed HEARTBEAT.md authoring revisions.

type HeartbeatHistoryResponse

type HeartbeatHistoryResponse struct {
	Revisions  []HeartbeatRevisionPayload `json:"revisions"`
	NextCursor string                     `json:"next_cursor,omitempty"`
}

HeartbeatHistoryResponse returns bounded HEARTBEAT.md authoring history.

type HeartbeatMutationResponse

type HeartbeatMutationResponse struct {
	Heartbeat HeartbeatPolicyPayload   `json:"heartbeat"`
	Revision  HeartbeatRevisionPayload `json:"revision"`
}

HeartbeatMutationResponse returns the post-mutation read model and audit row.

type HeartbeatPolicyPayload

type HeartbeatPolicyPayload struct {
	AgentName        string                             `json:"agent_name,omitempty"`
	Enabled          bool                               `json:"enabled"`
	Present          bool                               `json:"present"`
	Active           bool                               `json:"active"`
	Valid            bool                               `json:"valid"`
	ValidationStatus AuthoredValidationStatus           `json:"validation_status"`
	SourcePath       string                             `json:"source_path,omitempty"`
	Digest           string                             `json:"digest,omitempty"`
	ConfigDigest     string                             `json:"config_digest,omitempty"`
	SnapshotID       string                             `json:"snapshot_id,omitempty"`
	SchemaVersion    int                                `json:"schema_version"`
	Summary          string                             `json:"summary,omitempty"`
	GuidanceMarkdown string                             `json:"guidance_markdown,omitempty"`
	Frontmatter      HeartbeatFrontmatterPayload        `json:"frontmatter"`
	Preferences      HeartbeatPreferencesPayload        `json:"preferences"`
	ConfigProvenance HeartbeatConfigProvenancePayload   `json:"config_provenance"`
	Prompt           HeartbeatPromptContributionPayload `json:"prompt"`
	Diagnostics      []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
	Limits           AuthoredContextLimitsPayload       `json:"limits"`
	CreatedAt        *time.Time                         `json:"created_at,omitempty"`
}

HeartbeatPolicyPayload is the full resolved HEARTBEAT.md read model.

func HeartbeatPolicyPayloadFromResolved

func HeartbeatPolicyPayloadFromResolved(
	agentName string,
	policy *heartbeatpkg.ResolvedPolicy,
	snapshotID string,
) (HeartbeatPolicyPayload, error)

HeartbeatPolicyPayloadFromResolved converts a resolver result into the full Heartbeat read model.

type HeartbeatPreferencesPayload

type HeartbeatPreferencesPayload struct {
	MinInterval  string                            `json:"min_interval"`
	ActiveHours  []HeartbeatTimeWindowPayload      `json:"active_hours,omitempty"`
	QuietWindows []HeartbeatTimeWindowPayload      `json:"quiet_windows,omitempty"`
	Context      HeartbeatContextProjectionPayload `json:"context"`
}

HeartbeatPreferencesPayload captures config-bound wake policy hints.

type HeartbeatPromptContributionPayload

type HeartbeatPromptContributionPayload struct {
	Active           bool                               `json:"active"`
	Digest           string                             `json:"digest,omitempty"`
	ConfigDigest     string                             `json:"config_digest,omitempty"`
	SourcePath       string                             `json:"source_path,omitempty"`
	Summary          string                             `json:"summary,omitempty"`
	GuidanceMarkdown string                             `json:"guidance_markdown,omitempty"`
	Preferences      HeartbeatPreferencesPayload        `json:"preferences"`
	Truncated        bool                               `json:"truncated"`
	MaxBytes         int64                              `json:"max_bytes"`
	MaxBodyBytes     int64                              `json:"max_body_bytes"`
	Diagnostics      []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
	Context          HeartbeatContextProjectionPayload  `json:"context"`
}

HeartbeatPromptContributionPayload is the bounded synthetic-wake prompt contribution.

type HeartbeatPutByPathRequest

type HeartbeatPutByPathRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	Body           string `json:"body"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

HeartbeatPutByPathRequest creates or replaces HEARTBEAT.md for the route agent.

type HeartbeatPutRequest

type HeartbeatPutRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	AgentName      string `json:"agent_name"`
	Body           string `json:"body"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

HeartbeatPutRequest creates or replaces HEARTBEAT.md through the managed authoring service.

type HeartbeatRevisionOperation

type HeartbeatRevisionOperation string

HeartbeatRevisionOperation describes one managed HEARTBEAT.md authoring mutation.

const (
	HeartbeatRevisionWrite    HeartbeatRevisionOperation = "write"
	HeartbeatRevisionDelete   HeartbeatRevisionOperation = "delete"
	HeartbeatRevisionRollback HeartbeatRevisionOperation = "rollback"
)

type HeartbeatRevisionPayload

type HeartbeatRevisionPayload struct {
	ID             string                     `json:"id"`
	AgentName      string                     `json:"agent_name"`
	SourcePath     string                     `json:"source_path"`
	Operation      HeartbeatRevisionOperation `json:"operation"`
	PreviousDigest string                     `json:"previous_digest,omitempty"`
	NewDigest      string                     `json:"new_digest,omitempty"`
	NewSnapshotID  string                     `json:"new_snapshot_id,omitempty"`
	Actor          HeartbeatActorPayload      `json:"actor"`
	CreatedAt      time.Time                  `json:"created_at"`
}

HeartbeatRevisionPayload is a redacted HEARTBEAT.md authoring history row.

func HeartbeatRevisionPayloadFromDomain

func HeartbeatRevisionPayloadFromDomain(revision heartbeatpkg.Revision) (HeartbeatRevisionPayload, error)

HeartbeatRevisionPayloadFromDomain converts a Heartbeat authoring revision into the public DTO.

type HeartbeatRollbackByPathRequest

type HeartbeatRollbackByPathRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	RevisionID     string `json:"revision_id,omitempty"`
	TargetDigest   string `json:"target_digest,omitempty"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

HeartbeatRollbackByPathRequest restores a HEARTBEAT.md revision for the route agent.

type HeartbeatRollbackRequest

type HeartbeatRollbackRequest struct {
	WorkspaceID    string `json:"workspace_id,omitempty"`
	AgentName      string `json:"agent_name"`
	RevisionID     string `json:"revision_id,omitempty"`
	TargetDigest   string `json:"target_digest,omitempty"`
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

HeartbeatRollbackRequest restores a prior HEARTBEAT.md revision or snapshot body.

type HeartbeatStatusRequest

type HeartbeatStatusRequest struct {
	WorkspaceID             string `json:"workspace_id,omitempty"`
	AgentName               string `json:"agent_name"`
	SessionID               string `json:"session_id,omitempty"`
	IncludeSessionHealth    bool   `json:"include_session_health,omitempty"`
	IncludeRecentWakeEvents bool   `json:"include_recent_wake_events,omitempty"`
}

HeartbeatStatusRequest composes policy, wake state, and optional session health.

type HeartbeatStatusResponse

type HeartbeatStatusResponse struct {
	AgentName        string                             `json:"agent_name"`
	SourcePath       string                             `json:"source_path,omitempty"`
	Enabled          bool                               `json:"enabled"`
	Present          bool                               `json:"present"`
	Active           bool                               `json:"active"`
	Valid            bool                               `json:"valid"`
	ValidationStatus AuthoredValidationStatus           `json:"validation_status"`
	Digest           string                             `json:"digest,omitempty"`
	ConfigDigest     string                             `json:"config_digest,omitempty"`
	SnapshotID       string                             `json:"snapshot_id,omitempty"`
	Summary          string                             `json:"summary,omitempty"`
	Preferences      HeartbeatPreferencesPayload        `json:"preferences"`
	Diagnostics      []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
	WakeState        *HeartbeatWakeStatePayload         `json:"wake_state,omitempty"`
	WakeEvents       []HeartbeatWakeEventPayload        `json:"wake_events,omitempty"`
	SessionHealth    *SessionHealthPayload              `json:"session_health,omitempty"`
	RevisionCursor   string                             `json:"revision_cursor,omitempty"`
}

HeartbeatStatusResponse composes policy status, wake state, recent wake audit, and optional health.

func HeartbeatStatusResponseFromResult

func HeartbeatStatusResponseFromResult(result *heartbeatpkg.StatusResult) (HeartbeatStatusResponse, error)

HeartbeatStatusResponseFromResult converts composed Heartbeat status into the public DTO.

type HeartbeatTimeWindowPayload

type HeartbeatTimeWindowPayload struct {
	Timezone string `json:"timezone"`
	Start    string `json:"start"`
	End      string `json:"end"`
}

HeartbeatTimeWindowPayload is one authored local wall-clock active or quiet window.

type HeartbeatValidateByPathRequest

type HeartbeatValidateByPathRequest struct {
	WorkspaceID string `json:"workspace_id,omitempty"`
	Body        string `json:"body"`
}

HeartbeatValidateByPathRequest validates HEARTBEAT.md for the route agent.

type HeartbeatValidateRequest

type HeartbeatValidateRequest struct {
	WorkspaceID string `json:"workspace_id,omitempty"`
	AgentName   string `json:"agent_name,omitempty"`
	Body        string `json:"body"`
}

HeartbeatValidateRequest validates a proposed HEARTBEAT.md body.

type HeartbeatWakeByPathRequest

type HeartbeatWakeByPathRequest struct {
	WorkspaceID    string              `json:"workspace_id,omitempty"`
	SessionID      string              `json:"session_id"`
	Source         HeartbeatWakeSource `json:"source"`
	DryRun         bool                `json:"dry_run,omitempty"`
	IdempotencyKey string              `json:"idempotency_key,omitempty"`
}

HeartbeatWakeByPathRequest asks for one wake decision for the route agent.

type HeartbeatWakeDecisionPayload

type HeartbeatWakeDecisionPayload struct {
	WakeEventID       string                             `json:"wake_event_id,omitempty"`
	Result            HeartbeatWakeResult                `json:"result"`
	Reason            HeartbeatWakeReason                `json:"reason"`
	PolicySnapshotID  string                             `json:"policy_snapshot_id,omitempty"`
	PolicyDigest      string                             `json:"policy_digest,omitempty"`
	ConfigDigest      string                             `json:"config_digest,omitempty"`
	SyntheticPromptID string                             `json:"synthetic_prompt_id,omitempty"`
	Diagnostics       []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
}

HeartbeatWakeDecisionPayload reports the auditable result of one wake decision.

func HeartbeatWakeDecisionPayloadFromDomain

func HeartbeatWakeDecisionPayloadFromDomain(
	decision heartbeatpkg.WakeDecision,
) (HeartbeatWakeDecisionPayload, error)

HeartbeatWakeDecisionPayloadFromDomain converts one wake decision into the public DTO.

type HeartbeatWakeEventPayload

type HeartbeatWakeEventPayload struct {
	ID                string              `json:"id"`
	WorkspaceID       string              `json:"workspace_id,omitempty"`
	AgentName         string              `json:"agent_name,omitempty"`
	SessionID         string              `json:"session_id,omitempty"`
	PolicySnapshotID  string              `json:"policy_snapshot_id,omitempty"`
	Source            HeartbeatWakeSource `json:"source"`
	Result            HeartbeatWakeResult `json:"result"`
	Reason            HeartbeatWakeReason `json:"reason"`
	SyntheticPromptID string              `json:"synthetic_prompt_id,omitempty"`
	CreatedAt         time.Time           `json:"created_at"`
	ExpiresAt         time.Time           `json:"expires_at"`
}

HeartbeatWakeEventPayload is one retained Heartbeat wake audit row.

func HeartbeatWakeEventPayloadFromDomain

func HeartbeatWakeEventPayloadFromDomain(event heartbeatpkg.WakeEvent) (HeartbeatWakeEventPayload, error)

HeartbeatWakeEventPayloadFromDomain converts one wake audit row into the public DTO.

type HeartbeatWakeReason

type HeartbeatWakeReason string

HeartbeatWakeReason is the closed deterministic reason for Heartbeat wake audit.

const (
	HeartbeatWakeReasonSent                  HeartbeatWakeReason = "wake_sent"
	HeartbeatWakeReasonDisabled              HeartbeatWakeReason = "heartbeat_disabled"
	HeartbeatWakeReasonInvalid               HeartbeatWakeReason = "heartbeat_invalid"
	HeartbeatWakeReasonNoPolicy              HeartbeatWakeReason = "heartbeat_no_policy"
	HeartbeatWakeReasonRateLimited           HeartbeatWakeReason = "heartbeat_rate_limited"
	HeartbeatWakeReasonNoEligibleSession     HeartbeatWakeReason = "heartbeat_no_eligible_session"
	HeartbeatWakeReasonCooldownActive        HeartbeatWakeReason = "cooldown_active"
	HeartbeatWakeReasonQuietWindow           HeartbeatWakeReason = "quiet_window"
	HeartbeatWakeReasonSessionNotFound       HeartbeatWakeReason = "session_not_found"
	HeartbeatWakeReasonSessionUnhealthy      HeartbeatWakeReason = "session_unhealthy"
	HeartbeatWakeReasonSessionNotAttachable  HeartbeatWakeReason = "session_not_attachable"
	HeartbeatWakeReasonSessionPromptActive   HeartbeatWakeReason = "session_prompt_active"
	HeartbeatWakeReasonSessionPromptRace     HeartbeatWakeReason = "session_prompt_active_race"
	HeartbeatWakeReasonSyntheticPromptFailed HeartbeatWakeReason = "synthetic_prompt_failed"
	HeartbeatWakeReasonCoalesced             HeartbeatWakeReason = "wake_coalesced"
)

func (HeartbeatWakeReason) Valid

func (r HeartbeatWakeReason) Valid() bool

Valid reports whether the wake reason is a closed enum member.

func (HeartbeatWakeReason) Validate

func (r HeartbeatWakeReason) Validate() error

Validate reports an error for values outside the closed wake reason enum.

type HeartbeatWakeRequest

type HeartbeatWakeRequest struct {
	WorkspaceID    string              `json:"workspace_id,omitempty"`
	AgentName      string              `json:"agent_name"`
	SessionID      string              `json:"session_id"`
	Source         HeartbeatWakeSource `json:"source"`
	DryRun         bool                `json:"dry_run,omitempty"`
	IdempotencyKey string              `json:"idempotency_key,omitempty"`
}

HeartbeatWakeRequest asks for one manual advisory Heartbeat wake decision.

type HeartbeatWakeResponse

type HeartbeatWakeResponse struct {
	Decision HeartbeatWakeDecisionPayload `json:"decision"`
}

HeartbeatWakeResponse wraps one advisory wake decision.

type HeartbeatWakeResult

type HeartbeatWakeResult string

HeartbeatWakeResult classifies the outcome of an advisory Heartbeat wake attempt.

const (
	HeartbeatWakeResultSent        HeartbeatWakeResult = "sent"
	HeartbeatWakeResultSkipped     HeartbeatWakeResult = "skipped"
	HeartbeatWakeResultCoalesced   HeartbeatWakeResult = "coalesced"
	HeartbeatWakeResultRateLimited HeartbeatWakeResult = "rate_limited"
	HeartbeatWakeResultFailed      HeartbeatWakeResult = "failed"
)

type HeartbeatWakeSource

type HeartbeatWakeSource string

HeartbeatWakeSource classifies who requested an advisory Heartbeat wake.

const (
	HeartbeatWakeSourceScheduler      HeartbeatWakeSource = "scheduler"
	HeartbeatWakeSourceManual         HeartbeatWakeSource = "manual"
	HeartbeatWakeSourceHarnessReentry HeartbeatWakeSource = "harness_reentry"
)

type HeartbeatWakeStatePayload

type HeartbeatWakeStatePayload struct {
	WorkspaceID      string              `json:"workspace_id,omitempty"`
	AgentName        string              `json:"agent_name,omitempty"`
	SessionID        string              `json:"session_id"`
	PolicySnapshotID string              `json:"policy_snapshot_id,omitempty"`
	LastWakeAt       *time.Time          `json:"last_wake_at,omitempty"`
	NextAllowedAt    *time.Time          `json:"next_allowed_at,omitempty"`
	CoalescedCount   int                 `json:"coalesced_count"`
	LastResult       HeartbeatWakeResult `json:"last_result"`
	LastReason       HeartbeatWakeReason `json:"last_reason,omitempty"`
	UpdatedAt        time.Time           `json:"updated_at"`
}

HeartbeatWakeStatePayload is the per-session cooldown/coalescing summary.

func HeartbeatWakeStatePayloadFromDomain

func HeartbeatWakeStatePayloadFromDomain(state heartbeatpkg.WakeState) (HeartbeatWakeStatePayload, error)

HeartbeatWakeStatePayloadFromDomain converts wake coalescing state into the public DTO.

type HookCatalogPayload

type HookCatalogPayload struct {
	Order        int                  `json:"order"`
	Name         string               `json:"name"`
	Event        string               `json:"event"`
	Source       string               `json:"source"`
	SkillSource  string               `json:"skill_source,omitempty"`
	Mode         string               `json:"mode"`
	Required     bool                 `json:"required"`
	Priority     int                  `json:"priority"`
	TimeoutMS    int64                `json:"timeout_ms,omitempty"`
	ExecutorKind string               `json:"executor_kind,omitempty"`
	Matcher      hookspkg.HookMatcher `json:"matcher"`
	Metadata     map[string]string    `json:"metadata,omitempty"`
}

HookCatalogPayload is the shared resolved-hook catalog response payload.

type HookCatalogQuery

type HookCatalogQuery struct {
	Workspace string
	Agent     string
	Event     string
	Source    string
	Mode      string
}

HookCatalogQuery captures the shared resolved-hook catalog filters.

type HookCatalogResponse

type HookCatalogResponse struct {
	Hooks []HookCatalogPayload `json:"hooks"`
}

HookCatalogResponse wraps the resolved hook catalog payload.

type HookEventPayload

type HookEventPayload struct {
	Event         string `json:"event"`
	Family        string `json:"family"`
	SyncEligible  bool   `json:"sync_eligible"`
	PayloadSchema string `json:"payload_schema"`
	PatchSchema   string `json:"patch_schema,omitempty"`
}

HookEventPayload is the shared hook taxonomy response payload.

type HookEventsQuery

type HookEventsQuery struct {
	Family   string
	SyncOnly bool
}

HookEventsQuery captures the shared hook taxonomy filters.

type HookEventsResponse

type HookEventsResponse struct {
	Events []HookEventPayload `json:"events"`
}

HookEventsResponse wraps the hook taxonomy payload.

type HookRunPayload

type HookRunPayload struct {
	HookName      string          `json:"hook_name"`
	Event         string          `json:"event"`
	Source        string          `json:"source"`
	Mode          string          `json:"mode"`
	DurationMS    int64           `json:"duration_ms"`
	Outcome       string          `json:"outcome"`
	DispatchDepth int             `json:"dispatch_depth"`
	PatchApplied  json.RawMessage `json:"patch_applied,omitempty"`
	Error         string          `json:"error,omitempty"`
	Required      bool            `json:"required,omitempty"`
	RecordedAt    time.Time       `json:"recorded_at"`
}

HookRunPayload is the shared hook execution history response payload.

type HookRunsQuery

type HookRunsQuery struct {
	Session string
	Event   string
	Outcome string
	Since   string
	Last    int
}

HookRunsQuery captures the shared hook execution history filters.

type HookRunsResponse

type HookRunsResponse struct {
	Runs []HookRunPayload `json:"runs"`
}

HookRunsResponse wraps the hook run history payload.

type InstallExtensionRequest

type InstallExtensionRequest struct {
	Source          InstallExtensionSource `json:"source"`
	Ref             string                 `json:"ref"`
	Version         string                 `json:"version,omitempty"`
	Asset           string                 `json:"asset,omitempty"`
	AllowUnverified bool                   `json:"allow_unverified,omitempty"`
}

InstallExtensionRequest is the shared extension install request payload.

type InstallExtensionSource

type InstallExtensionSource string

InstallExtensionSource is the closed distribution-source union.

const (
	InstallExtensionSourceCurated   InstallExtensionSource = "curated"
	InstallExtensionSourceGitHub    InstallExtensionSource = "github"
	InstallExtensionSourceGit       InstallExtensionSource = "git"
	InstallExtensionSourceLocalPath InstallExtensionSource = "local_path"
)

type InstallSettingsMCPServerRequest

type InstallSettingsMCPServerRequest struct {
	EntryID     string                                  `json:"entry_id"`
	Name        string                                  `json:"name,omitempty"`
	Scope       SettingsWorkspaceScopeKind              `json:"scope,omitempty"`
	WorkspaceID string                                  `json:"workspace_id,omitempty"`
	Values      *SettingsMCPCatalogInstallValuesPayload `json:"values"`
}

InstallSettingsMCPServerRequest installs one feed-locked MCP entry.

type InstallSettingsMCPServerResponse

type InstallSettingsMCPServerResponse struct {
	MCPServer SettingsMCPServerItemPayload `json:"mcp_server"`
	Apply     SettingsApplyResponse        `json:"apply"`
	NextStep  SettingsMCPInstallNextStep   `json:"next_step"`
	Warnings  []DiagnosticItem             `json:"warnings,omitempty"`
}

InstallSettingsMCPServerResponse returns the persisted item, config-apply outcome, and follow-up.

type IssueSeverity

type IssueSeverity string

IssueSeverity classifies one extension-package validation issue.

const (
	// IssueSeverityError blocks extension-package use.
	IssueSeverityError IssueSeverity = "error"
	// IssueSeverityWarning reports non-blocking authoring guidance.
	IssueSeverityWarning IssueSeverity = "warning"
)

type JobPayload

type JobPayload struct {
	ID          string                           `json:"id"`
	Scope       automationpkg.Scope              `json:"scope"`
	Name        string                           `json:"name"`
	TargetKind  automationpkg.TargetKind         `json:"target_kind"`
	AgentName   string                           `json:"agent_name"`
	WorkspaceID string                           `json:"workspace_id,omitempty"`
	Prompt      string                           `json:"prompt"`
	Schedule    *automationpkg.ScheduleSpec      `json:"schedule,omitempty"`
	Task        *automationpkg.JobTaskConfig     `json:"task,omitempty"`
	LoopTarget  *automationpkg.LoopTarget        `json:"loop_target,omitempty"`
	Enabled     bool                             `json:"enabled"`
	Retry       automationpkg.RetryConfig        `json:"retry"`
	FireLimit   automationpkg.FireLimitConfig    `json:"fire_limit"`
	Source      automationpkg.JobSource          `json:"source"`
	CreatedAt   time.Time                        `json:"created_at"`
	UpdatedAt   time.Time                        `json:"updated_at"`
	NextRun     *time.Time                       `json:"next_run,omitempty"`
	Scheduler   *AutomationSchedulerStatePayload `json:"scheduler,omitempty"`
}

JobPayload is the shared automation job response payload.

type JobResponse

type JobResponse struct {
	Job JobPayload `json:"job"`
}

JobResponse wraps one shared automation job payload.

type JobsResponse

type JobsResponse struct {
	Jobs []JobPayload             `json:"jobs"`
	Page CountedCursorPagePayload `json:"page"`
}

JobsResponse wraps the shared automation job list payload.

type LogEventPayload

type LogEventPayload struct {
	ID          string          `json:"id"`
	SessionID   string          `json:"session_id"`
	WorkspaceID string          `json:"workspace_id,omitempty"`
	Type        string          `json:"type"`
	AgentName   string          `json:"agent_name"`
	Provider    string          `json:"provider,omitempty"`
	Component   string          `json:"component,omitempty"`
	Outcome     string          `json:"outcome,omitempty"`
	Content     json.RawMessage `json:"content,omitempty"`
	store.EventCorrelation
	ParentSessionID string    `json:"parent_session_id,omitempty"`
	RootSessionID   string    `json:"root_session_id,omitempty"`
	SpawnDepth      int       `json:"spawn_depth"`
	Summary         string    `json:"summary,omitempty"`
	Timestamp       time.Time `json:"timestamp"`
}

LogEventPayload is the shared runtime log response payload.

type LogTailStatusPayload

type LogTailStatusPayload struct {
	Available bool   `json:"available"`
	Status    string `json:"status"`
}

LogTailStatusPayload reports the log-tail capability advertised by settings.

type LogsListResponse

type LogsListResponse struct {
	Events []LogEventPayload `json:"events"`
}

LogsListResponse wraps the runtime logs payload.

type LoopAnnotationPayload

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

LoopAnnotationPayload is one editor node position.

type LoopAnnotationsResponse

type LoopAnnotationsResponse struct {
	Annotations []LoopAnnotationPayload `json:"annotations"`
}

LoopAnnotationsResponse returns editor sidecar positions.

type LoopBackoffSpec

type LoopBackoffSpec struct {
	Base string `json:"base,omitempty"`
	Max  string `json:"max,omitempty"`
}

LoopBackoffSpec bounds retry delays.

type LoopBudget

type LoopBudget struct {
	Tokens       int                `json:"tokens"`
	WallClockSec int                `json:"wall_clock_sec"`
	OnExceeded   LoopBudgetExceeded `json:"on_exceeded,omitempty"`
}

type LoopBudgetExceeded

type LoopBudgetExceeded string

LoopBudgetExceeded controls the outcome for a budget breach.

const (
	LoopBudgetExceededHalt     LoopBudgetExceeded = "halt"
	LoopBudgetExceededEscalate LoopBudgetExceeded = "escalate"
)

type LoopCatalogAggregatePayload

type LoopCatalogAggregatePayload struct {
	Runs      int `json:"runs"`
	Succeeded int `json:"succeeded"`
	Failed    int `json:"failed"`
}

LoopCatalogAggregatePayload summarizes recent loop activity.

type LoopCatalogEntryPayload

type LoopCatalogEntryPayload struct {
	Name          string                      `json:"name"`
	Version       int                         `json:"version"`
	Description   string                      `json:"description,omitempty"`
	Source        LoopSource                  `json:"source"`
	Catalog       LoopCatalogResourceSpec     `json:"catalog"`
	Inputs        map[string]LoopInput        `json:"inputs,omitempty"`
	Start         []LoopStartBinding          `json:"start,omitempty"`
	Contract      LoopContract                `json:"contract"`
	LastRun       *LoopCatalogLastRunPayload  `json:"last_run,omitempty"`
	Aggregate30d  LoopCatalogAggregatePayload `json:"aggregate_30d"`
	SuccessRate30 float64                     `json:"success_rate_30d"`
}

LoopCatalogEntryPayload is one fully hydrated row from a bounded catalog page.

type LoopCatalogFacetsPayload

type LoopCatalogFacetsPayload struct {
	Kinds      map[string]int `json:"kinds"`
	Categories map[string]int `json:"categories"`
	Statuses   map[string]int `json:"statuses"`
}

LoopCatalogFacetsPayload contains exact self-filtered catalog counts.

type LoopCatalogLastRunPayload

type LoopCatalogLastRunPayload struct {
	ID             string        `json:"id"`
	Status         LoopRunStatus `json:"status"`
	BestGeneration *int64        `json:"best_generation,omitempty"`
	BestScore      *float64      `json:"best_score,omitempty"`
	CreatedAt      time.Time     `json:"created_at"`
}

LoopCatalogLastRunPayload identifies the latest run shown in a catalog entry.

type LoopCatalogMeta

type LoopCatalogMeta struct {
	UseWhen  string   `json:"use_when,omitempty"`
	Keywords []string `json:"keywords,omitempty"`
	Category string   `json:"category,omitempty"`
}

type LoopCatalogResourceSpec

type LoopCatalogResourceSpec struct {
	UseWhen  string   `json:"use_when,omitempty"`
	Keywords []string `json:"keywords,omitempty"`
	Category string   `json:"category,omitempty"`
}

LoopCatalogResourceSpec is the public catalog metadata projection.

type LoopConfig

type LoopConfig struct {
	HumanGateEnabled  *bool                  `json:"human_gate_enabled,omitempty"`
	ReattemptStrategy *LoopReattemptStrategy `json:"reattempt_strategy,omitempty"`
	EnabledChecks     json.RawMessage        `json:"enabled_checks_json,omitempty"`
	IterationCap      *int                   `json:"iteration_cap,omitempty"`
	BudgetTokens      *int                   `json:"budget_tokens,omitempty"`
	BudgetWallSec     *int                   `json:"budget_wall_sec,omitempty"`
	BudgetOnExceeded  *LoopBudgetExceeded    `json:"budget_on_exceeded,omitempty"`
	NoProgressWindow  *int                   `json:"no_progress_window,omitempty"`
	FanOutWidth       *int                   `json:"fan_out_width,omitempty"`
	GateMaxRevisions  *int                   `json:"gate_max_revisions,omitempty"`
	RuntimeDefaults   *LoopRuntimeDefaults   `json:"runtime_defaults,omitempty"`
	RuntimeRules      []LoopRuntimeRule      `json:"runtime_rules,omitempty"`
}

LoopConfig is the public per-loop or per-run override layer.

type LoopConfigResponse

type LoopConfigResponse struct {
	Config          *LoopConfig         `json:"config"`
	EffectiveConfig LoopEffectiveConfig `json:"effective_config"`
}

LoopConfigResponse returns the stored override and daemon-resolved runtime config.

type LoopContract

type LoopContract struct {
	Goal             string               `json:"goal"`
	DefinitionOfDone string               `json:"definition_of_done"`
	Constraints      []string             `json:"constraints,omitempty"`
	Boundaries       []string             `json:"boundaries,omitempty"`
	StopWhen         string               `json:"stop_when,omitempty"`
	Verification     []LoopGateCriterion  `json:"verification,omitempty"`
	TerminalStates   []string             `json:"terminal_states,omitempty"`
	IterationCap     int                  `json:"iteration_cap"`
	NoProgress       LoopNoProgress       `json:"no_progress"`
	Budget           LoopBudget           `json:"budget"`
	RuntimeDefaults  *LoopRuntimeDefaults `json:"runtime_defaults,omitempty"`
	RuntimeRules     []LoopRuntimeRule    `json:"runtime_rules,omitempty"`
	*LoopContractLifecycleState
}

type LoopContractLifecycleState

type LoopContractLifecycleState struct {
	OnDone      []LoopEffectSpec `json:"on_done,omitempty"`
	OnNoOp      []LoopEffectSpec `json:"on_noop,omitempty"`
	OnBlocked   []LoopEffectSpec `json:"on_blocked,omitempty"`
	OnFailed    []LoopEffectSpec `json:"on_failed,omitempty"`
	OnExhausted []LoopEffectSpec `json:"on_exhausted,omitempty"`
	OnStalled   []LoopEffectSpec `json:"on_stalled,omitempty"`
	OnCanceled  []LoopEffectSpec `json:"on_canceled,omitempty"`
}

LoopContractLifecycleState carries optional terminal reactions.

type LoopControlProvenancePayload

type LoopControlProvenancePayload struct {
	ActorKind   string    `json:"actor_kind"`
	ActorID     string    `json:"actor_id"`
	Reason      string    `json:"reason,omitempty"`
	RuleID      string    `json:"rule_id,omitempty"`
	RequestedAt time.Time `json:"requested_at"`
}

LoopControlProvenancePayload attributes one node-control mutation.

type LoopDefinitionDocument

type LoopDefinitionDocument struct {
	APIVersion           string                 `json:"apiVersion"`
	Kind                 string                 `json:"kind"`
	Meta                 LoopDefinitionMeta     `json:"meta"`
	Concurrency          string                 `json:"concurrency,omitempty"`
	Inputs               map[string]LoopInput   `json:"inputs,omitempty"`
	Contract             LoopContract           `json:"contract"`
	Graph                LoopGraph              `json:"graph"`
	Start                []LoopStartBinding     `json:"start,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
}

LoopDefinitionDocument is the public compozy.loop/v1 authoring document.

func NewLoopDefinitionDocument

func NewLoopDefinitionDocument(value any) (LoopDefinitionDocument, error)

NewLoopDefinitionDocument converts any JSON-compatible loop document into the public DTO.

func (LoopDefinitionDocument) Decode

func (d LoopDefinitionDocument) Decode(target any) error

Decode converts the public loop document into a caller-owned engine or SDK type.

type LoopDefinitionMeta

type LoopDefinitionMeta struct {
	Name        string          `json:"name"`
	Version     int             `json:"version,omitempty"`
	Description string          `json:"description,omitempty"`
	Catalog     LoopCatalogMeta `json:"catalog"`
}

type LoopDefinitionPayload

type LoopDefinitionPayload struct {
	Name               string                       `json:"name"`
	Version            int                          `json:"version"`
	Description        string                       `json:"description,omitempty"`
	Source             LoopSource                   `json:"source"`
	Catalog            LoopCatalogResourceSpec      `json:"catalog"`
	Definition         LoopDefinitionDocument       `json:"definition"`
	EffectiveLifecycle *LoopResolvedLifecycleConfig `json:"effective_lifecycle,omitempty"`
}

LoopDefinitionPayload is the inspect/publish response for one Loop definition.

type LoopEffectSpec

type LoopEffectSpec struct {
	Emit *LoopEmitSpec  `json:"emit,omitempty"`
	Tool string         `json:"tool,omitempty"`
	With map[string]any `json:"with,omitempty"`
}

LoopEffectSpec describes one emitted event or tool call.

type LoopEffectiveConfig

type LoopEffectiveConfig struct {
	HumanGateEnabled  bool                  `json:"human_gate_enabled"`
	ReattemptStrategy LoopReattemptStrategy `json:"reattempt_strategy"`
	EnabledChecks     json.RawMessage       `json:"enabled_checks_json"`
	IterationCap      int                   `json:"iteration_cap"`
	BudgetTokens      int                   `json:"budget_tokens"`
	BudgetWallSec     int                   `json:"budget_wall_sec"`
	BudgetOnExceeded  LoopBudgetExceeded    `json:"budget_on_exceeded"`
	NoProgressWindow  int                   `json:"no_progress_window"`
	FanOutWidth       int                   `json:"fan_out_width"`
	GateMaxRevisions  int                   `json:"gate_max_revisions"`
	RuntimeDefaults   LoopRuntimeDefaults   `json:"runtime_defaults"`
	RuntimeRules      []LoopRuntimeRule     `json:"runtime_rules"`
	RunRuntimeRules   []LoopRuntimeRule     `json:"run_runtime_rules,omitempty"`
}

LoopEffectiveConfig is the public fully resolved runtime config.

type LoopEmitSpec

type LoopEmitSpec struct {
	Kind    string         `json:"kind"`
	Payload map[string]any `json:"payload,omitempty"`
}

LoopEmitSpec describes an emitted internal event.

type LoopErrorPolicy

type LoopErrorPolicy struct {
	Route     string           `json:"route,omitempty"`
	AllowFail bool             `json:"allow_fail,omitempty"`
	Effects   []LoopEffectSpec `json:"effects,omitempty"`
}

LoopErrorPolicy combines error flow with observational effects.

type LoopGateBlockingIssuePayload

type LoopGateBlockingIssuePayload struct {
	ID   string `json:"id"`
	Note string `json:"note"`
}

LoopGateBlockingIssuePayload is one sanitized gate_verdict blocker.

type LoopGateCriterion

type LoopGateCriterion struct {
	ID       string `json:"id"`
	Type     string `json:"type"`
	Check    string `json:"check,omitempty"`
	Expect   string `json:"expect,omitempty"`
	Contains string `json:"contains,omitempty"`
	Agent    string `json:"agent,omitempty"`
	//nolint:modernize // OpenAPI requires omitempty; JSON uses omitzero.
	Runtime LoopRuntimeSpec `json:"runtime,omitempty,omitzero"`
	Rubric  string          `json:"rubric,omitempty"`
	Prompt  string          `json:"prompt,omitempty"`
	Tool    string          `json:"tool,omitempty"`
	Inputs  map[string]any  `json:"inputs,omitempty"`
	Metric  *LoopMetricSpec `json:"metric,omitempty"`
}

type LoopGateCriterionDetailPayload

type LoopGateCriterionDetailPayload struct {
	ID             string                         `json:"id"`
	Type           string                         `json:"type"`
	Outcome        LoopGateVerdictOutcome         `json:"outcome"`
	Passed         bool                           `json:"passed"`
	Broken         bool                           `json:"broken,omitempty"`
	ExitCode       *int                           `json:"exit_code,omitempty"`
	Stdout         string                         `json:"stdout,omitempty"`
	Stderr         string                         `json:"stderr,omitempty"`
	Score          *float64                       `json:"score,omitempty"`
	Evidence       json.RawMessage                `json:"evidence,omitempty"`
	BlockingIssues []LoopGateBlockingIssuePayload `json:"blocking_issues,omitempty"`
	Warnings       []LoopGateDiagnosticWarning    `json:"warnings,omitempty"`
	Payload        json.RawMessage                `json:"payload,omitempty"`
}

LoopGateCriterionDetailPayload is one durable criterion diagnostic in generation detail.

type LoopGateCriterionEventPayload

type LoopGateCriterionEventPayload struct {
	ID     string   `json:"id"`
	Type   string   `json:"type"`
	Status string   `json:"status"`
	Note   string   `json:"note"`
	Score  *float64 `json:"score,omitempty"`
}

LoopGateCriterionEventPayload is one sanitized gate_verdict criterion result.

type LoopGateDecision

type LoopGateDecision string

LoopGateDecision is the human gate approval decision vocabulary.

const (
	LoopGateDecisionApprove        LoopGateDecision = "approve"
	LoopGateDecisionRequestChanges LoopGateDecision = "request_changes"
	LoopGateDecisionReject         LoopGateDecision = "reject"
)

type LoopGateDiagnosticWarning

type LoopGateDiagnosticWarning struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

LoopGateDiagnosticWarning is one non-terminal criterion diagnostic.

type LoopGateVerdictEventPayload

type LoopGateVerdictEventPayload struct {
	NodeID         string                          `json:"node_id"`
	Generation     int64                           `json:"generation"`
	GateID         string                          `json:"gate_id"`
	ItemIndex      int                             `json:"item_index"`
	Verdict        string                          `json:"verdict"`
	Reason         string                          `json:"reason"`
	Route          string                          `json:"route"`
	BlockingIssues []LoopGateBlockingIssuePayload  `json:"blocking_issues"`
	Criteria       []LoopGateCriterionEventPayload `json:"criteria"`
	Score          *float64                        `json:"score,omitempty"`
	BestGeneration *int64                          `json:"best_generation,omitempty"`
}

LoopGateVerdictEventPayload is the exact gate_verdict SSE payload.

type LoopGateVerdictOutcome

type LoopGateVerdictOutcome string

LoopGateVerdictOutcome is the machine gate verdict vocabulary.

const (
	LoopGateVerdictApproved         LoopGateVerdictOutcome = "approved"
	LoopGateVerdictRejected         LoopGateVerdictOutcome = "rejected"
	LoopGateVerdictAwaitingApproval LoopGateVerdictOutcome = "awaiting_approval"
	LoopGateVerdictBlocked          LoopGateVerdictOutcome = "blocked"
	LoopGateVerdictError            LoopGateVerdictOutcome = "error"
	LoopGateVerdictTimeout          LoopGateVerdictOutcome = "timeout"
	LoopGateVerdictInvalidOutput    LoopGateVerdictOutcome = "invalid_output"
)

type LoopGateVerdictPayload

type LoopGateVerdictPayload struct {
	GateID         string                           `json:"gate_id"`
	ItemIndex      int                              `json:"item_index"`
	Outcome        LoopGateVerdictOutcome           `json:"outcome"`
	Score          *float64                         `json:"score,omitempty"`
	RouteCauseRank *int                             `json:"route_cause_rank,omitempty"`
	BlockingIssues []LoopGateBlockingIssuePayload   `json:"blocking_issues"`
	Criteria       []LoopGateCriterionDetailPayload `json:"criteria"`
}

LoopGateVerdictPayload is one queryable machine verdict in generation detail.

type LoopGateVerdictRunEventPayload

type LoopGateVerdictRunEventPayload struct {
	ID          string                      `json:"id"`
	LoopRunID   string                      `json:"loop_run_id"`
	WorkspaceID string                      `json:"workspace_id"`
	Seq         int64                       `json:"seq"`
	Kind        LoopRunEventKind            `json:"kind"`
	Payload     LoopGateVerdictEventPayload `json:"payload"`
	At          time.Time                   `json:"at"`
}

LoopGateVerdictRunEventPayload is the typed gate_verdict event envelope.

type LoopGenerationOrigin

type LoopGenerationOrigin string

LoopGenerationOrigin identifies why a generation exists.

const (
	LoopGenerationOriginInitial            LoopGenerationOrigin = "initial"
	LoopGenerationOriginStopWhen           LoopGenerationOrigin = "stop_when"
	LoopGenerationOriginReattempt          LoopGenerationOrigin = "reattempt"
	LoopGenerationOriginGateRevise         LoopGenerationOrigin = "gate_revise"
	LoopGenerationOriginGateNextGeneration LoopGenerationOrigin = "gate_next_generation"
	LoopGenerationOriginDoDRetry           LoopGenerationOrigin = "dod_retry"
	LoopGenerationOriginRatchetRestore     LoopGenerationOrigin = "ratchet_restore"
	LoopGenerationOriginRequeue            LoopGenerationOrigin = "requeue"
)

type LoopGenerationOutput

type LoopGenerationOutput struct {
	Generation      int64                `json:"generation,omitempty"`
	NodeID          string               `json:"node_id"`
	ItemIndex       int                  `json:"item_index,omitempty"`
	Status          string               `json:"status"`
	OutputRef       string               `json:"output_ref,omitempty"`
	TaskRunID       string               `json:"task_run_id,omitempty"`
	SessionID       string               `json:"session_id,omitempty"`
	ChildLoopRunID  string               `json:"child_loop_run_id,omitempty"`
	ResolvedRuntime *LoopResolvedRuntime `json:"resolved_runtime,omitempty"`
	Attempt         int                  `json:"attempt,omitempty"`
	NextAttemptAt   *time.Time           `json:"next_attempt_at,omitempty"`
	FailureClass    string               `json:"failure_class,omitempty"`
	Disposition     string               `json:"disposition,omitempty"`
}

LoopGenerationOutput is one public generation output row.

type LoopGenerationPayload

type LoopGenerationPayload struct {
	Generation       int64                    `json:"generation"`
	ParentGeneration int64                    `json:"parent_generation"`
	Origin           LoopGenerationOrigin     `json:"origin"`
	Verdicts         []LoopGateVerdictPayload `json:"verdicts"`
	Outputs          []LoopGenerationOutput   `json:"outputs"`
}

LoopGenerationPayload groups durable provenance, verdicts, and node state by generation.

type LoopGenerationStartedEventPayload

type LoopGenerationStartedEventPayload struct {
	Generation        int64                 `json:"generation"`
	ParentGeneration  int64                 `json:"parent_generation"`
	Origin            LoopGenerationOrigin  `json:"origin"`
	ReattemptStrategy LoopReattemptStrategy `json:"reattempt_strategy"`
	LoopName          string                `json:"loop_name"`
}

LoopGenerationStartedEventPayload is the exact generation_started SSE payload.

type LoopGenerationStartedRunEventPayload

type LoopGenerationStartedRunEventPayload struct {
	ID          string                            `json:"id"`
	LoopRunID   string                            `json:"loop_run_id"`
	WorkspaceID string                            `json:"workspace_id"`
	Seq         int64                             `json:"seq"`
	Kind        LoopRunEventKind                  `json:"kind"`
	Payload     LoopGenerationStartedEventPayload `json:"payload"`
	At          time.Time                         `json:"at"`
}

LoopGenerationStartedRunEventPayload is the typed generation_started event envelope.

type LoopGraph

type LoopGraph struct {
	Nodes []LoopGraphNode `json:"nodes"`
	Edges []LoopGraphEdge `json:"edges"`
}

type LoopGraphEdge

type LoopGraphEdge struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type LoopGraphNode

type LoopGraphNode struct {
	ID            string                       `json:"id"`
	Class         LoopNodeClass                `json:"class"`
	Kind          string                       `json:"kind"`
	Session       map[string]any               `json:"session,omitempty"`
	Timeout       string                       `json:"timeout,omitempty"`
	Retry         *LoopRetrySpec               `json:"retry,omitempty"`
	Harvest       map[string]any               `json:"harvest,omitempty"`
	Produces      map[string]any               `json:"produces,omitempty"`
	Params        map[string]any               `json:"params,omitempty"`
	Collection    string                       `json:"collection,omitempty"`
	Filter        string                       `json:"filter,omitempty"`
	BatchSize     int                          `json:"batch_size,omitempty"`
	MaxParallel   int                          `json:"max_parallel,omitempty"`
	MaxFanOut     int                          `json:"max_fan_out,omitempty"`
	Condition     string                       `json:"condition,omitempty"`
	Criteria      []LoopGateCriterion          `json:"criteria,omitempty"`
	VerdictPolicy string                       `json:"verdict_policy,omitempty"`
	OnResult      map[string]any               `json:"on_result,omitempty"`
	MaxRevisions  int                          `json:"max_revisions,omitempty"`
	Body          *LoopGraph                   `json:"body,omitempty"`
	Contract      *LoopContract                `json:"contract,omitempty"`
	InputRef      string                       `json:"input_ref,omitempty"`
	Pattern       string                       `json:"pattern,omitempty"`
	Parse         string                       `json:"parse,omitempty"`
	WatchSpec     map[string]any               `json:"watch,omitempty"`
	Events        []LoopWatchEventSubscription `json:"events,omitempty"`
	*LoopNodeLifecycleState
}

type LoopInput

type LoopInput struct {
	Type        string        `json:"type"`
	Required    bool          `json:"required,omitempty"`
	Description string        `json:"description,omitempty"`
	Ref         *LoopInputRef `json:"ref,omitempty"`
	Default     any           `json:"default,omitempty"`
}

type LoopInputDefaultErrorPayload

type LoopInputDefaultErrorPayload struct {
	Loop   string `json:"loop"`
	Key    string `json:"key"`
	Reason string `json:"reason"`
}

LoopInputDefaultErrorPayload reports one input resolution failure.

type LoopInputDefaultResponse

type LoopInputDefaultResponse struct {
	LoopName string                 `json:"loop_name"`
	Key      string                 `json:"key"`
	Scope    LoopInputDefaultsScope `json:"scope"`
	Present  bool                   `json:"present"`
	Value    any                    `json:"value,omitempty"`
}

LoopInputDefaultResponse returns one configured key without collapsing explicit zero values.

type LoopInputDefaultsResponse

type LoopInputDefaultsResponse struct {
	LoopName string                 `json:"loop_name"`
	Scope    LoopInputDefaultsScope `json:"scope"`
	Values   map[string]any         `json:"values"`
}

LoopInputDefaultsResponse returns one Loop's configured values at one explicit scope.

type LoopInputDefaultsScope

type LoopInputDefaultsScope string

LoopInputDefaultsScope selects the file-backed config layer managed by an input-default request.

const (
	LoopInputDefaultsScopeGlobal    LoopInputDefaultsScope = "global"
	LoopInputDefaultsScopeWorkspace LoopInputDefaultsScope = "workspace"
)

type LoopInputOrigin

type LoopInputOrigin string

LoopInputOrigin is the public effective-input provenance vocabulary.

const (
	LoopInputOriginRun        LoopInputOrigin = "run"
	LoopInputOriginWorkspace  LoopInputOrigin = "workspace"
	LoopInputOriginGlobal     LoopInputOrigin = "global"
	LoopInputOriginDefinition LoopInputOrigin = "definition"
)

type LoopInputRef

type LoopInputRef struct {
	Kind string `json:"kind"`
}

type LoopLintErrorPayload

type LoopLintErrorPayload struct {
	NodeID   string           `json:"node_id,omitempty"`
	Code     string           `json:"code"`
	Message  string           `json:"message"`
	Severity LoopLintSeverity `json:"severity"`
}

LoopLintErrorPayload is the per-node 422 payload surfaced to authoring clients.

type LoopLintSeverity

type LoopLintSeverity string

LoopLintSeverity classifies a lint diagnostic.

const (
	LoopLintSeverityError   LoopLintSeverity = "error"
	LoopLintSeverityWarning LoopLintSeverity = "warning"
)

type LoopMetricDirection

type LoopMetricDirection string

LoopMetricDirection determines whether a gate metric should increase or decrease.

const (
	LoopMetricMaximize LoopMetricDirection = "maximize"
	LoopMetricMinimize LoopMetricDirection = "minimize"
)

type LoopMetricSpec

type LoopMetricSpec struct {
	Direction LoopMetricDirection `json:"direction"`
	MinDelta  *float64            `json:"min_delta,omitempty"`
}

LoopMetricSpec declares the score contract for one machine criterion.

type LoopMutationResponse

type LoopMutationResponse struct {
	OK         bool                          `json:"ok"`
	RunID      string                        `json:"run_id"`
	NodeID     string                        `json:"node_id,omitempty"`
	Status     string                        `json:"status,omitempty"`
	Provenance *LoopControlProvenancePayload `json:"provenance,omitempty"`
	Control    *LoopNodeControlPayload       `json:"control,omitempty"`
}

LoopMutationResponse is the shared structured answer for lifecycle verbs.

type LoopNoProgress

type LoopNoProgress struct {
	Window     int      `json:"window"`
	HashFields []string `json:"hash_fields,omitempty"`
}

type LoopNodeClass

type LoopNodeClass string

LoopNodeClass is the public loop graph node class vocabulary.

const (
	LoopNodeClassAction  LoopNodeClass = "action"
	LoopNodeClassControl LoopNodeClass = "control"
	LoopNodeClassSource  LoopNodeClass = "source"
)

type LoopNodeControlPayload

type LoopNodeControlPayload struct {
	LoopRunID       string                        `json:"loop_run_id"`
	NodeID          string                        `json:"node_id"`
	Paused          bool                          `json:"paused"`
	PauseProvenance *LoopControlProvenancePayload `json:"pause_provenance,omitempty"`
	Quarantined     bool                          `json:"quarantined"`
	QuarantineEntry json.RawMessage               `json:"quarantine_entry,omitempty"`
	QuarantinedAt   *time.Time                    `json:"quarantined_at,omitempty"`
	AttentionFlag   string                        `json:"attention_flag,omitempty"`
	AttentionReason string                        `json:"attention_reason,omitempty"`
	// AttentionProducerNodeID routes a dependency-parked consumer to the
	// quarantined producer that owns the repair record.
	AttentionProducerNodeID string                        `json:"attention_producer_node_id,omitempty"`
	CancelState             string                        `json:"cancel_state,omitempty"`
	CancelProvenance        *LoopControlProvenancePayload `json:"cancel_provenance,omitempty"`
	LastEvidenceAt          *time.Time                    `json:"last_evidence_at,omitempty"`
	DeathResumeStreak       int                           `json:"death_resume_streak"`
	Revision                int64                         `json:"revision"`
	UpdatedAt               time.Time                     `json:"updated_at"`
}

LoopNodeControlPayload is the public durable control state for one authored node.

type LoopNodeInventoryItem

type LoopNodeInventoryItem struct {
	State      LoopNodeInventoryState  `json:"state"`
	LoopRunID  string                  `json:"loop_run_id"`
	LoopName   string                  `json:"loop_name"`
	Generation int                     `json:"generation"`
	NodeID     string                  `json:"node_id"`
	ItemIndex  int                     `json:"item_index"`
	StateAt    time.Time               `json:"state_at"`
	Wait       *LoopNodeWaitPayload    `json:"wait,omitempty"`
	Control    *LoopNodeControlPayload `json:"control,omitempty"`
	Output     *LoopGenerationOutput   `json:"output,omitempty"`
}

LoopNodeInventoryItem is one stable-ordered workspace inventory row.

type LoopNodeInventoryResponse

type LoopNodeInventoryResponse struct {
	Items      []LoopNodeInventoryItem `json:"items"`
	NextCursor string                  `json:"next_cursor,omitempty"`
}

LoopNodeInventoryResponse is one page of workspace-scoped node state.

type LoopNodeInventoryState

type LoopNodeInventoryState string

LoopNodeInventoryState is the closed workspace inventory vocabulary.

const (
	LoopNodeInventoryWaiting     LoopNodeInventoryState = "waiting"
	LoopNodeInventoryQuarantined LoopNodeInventoryState = "quarantined"
	LoopNodeInventoryAttention   LoopNodeInventoryState = "attention"
	LoopNodeInventoryRetrying    LoopNodeInventoryState = "retrying"
)

type LoopNodeLifecycleState

type LoopNodeLifecycleState struct {
	Deadline       string                `json:"deadline,omitempty"`
	ResultContract *LoopResultContract   `json:"result_contract,omitempty"`
	OnError        *LoopErrorPolicy      `json:"on_error,omitempty"`
	OnRetry        []LoopEffectSpec      `json:"on_retry,omitempty"`
	OnSuccess      []LoopEffectSpec      `json:"on_success,omitempty"`
	OnPause        []LoopEffectSpec      `json:"on_pause,omitempty"`
	OnTimeout      []LoopEffectSpec      `json:"on_timeout,omitempty"`
	OnCancel       []LoopEffectSpec      `json:"on_cancel,omitempty"`
	OnQuarantine   []LoopEffectSpec      `json:"on_quarantine,omitempty"`
	OnParentClose  LoopParentClosePolicy `json:"on_parent_close,omitempty"`
	Expires        *LoopWaitExpiry       `json:"expires,omitempty"`
}

LoopNodeLifecycleState carries optional node reliability fields.

type LoopNodeMutationRequest

type LoopNodeMutationRequest struct {
	Reason string `json:"reason,omitempty"`
}

LoopNodeMutationRequest carries optional operator context for a node mutation.

type LoopNodePauseRequest

type LoopNodePauseRequest struct {
	Mode   string `json:"mode"`
	Reason string `json:"reason,omitempty"`
}

LoopNodePauseRequest parks one authored node.

type LoopNodeResumeRequest

type LoopNodeResumeRequest struct {
	Mode      string          `json:"mode"`
	ItemIndex *int            `json:"item_index,omitempty"`
	Payload   json.RawMessage `json:"payload,omitempty"`
}

LoopNodeResumeRequest releases one authored node pause or manual wait.

type LoopNodeWaitPayload

type LoopNodeWaitPayload struct {
	LoopRunID         string          `json:"loop_run_id"`
	Generation        int             `json:"generation"`
	NodeID            string          `json:"node_id"`
	ItemIndex         int             `json:"item_index"`
	Kind              string          `json:"kind"`
	ResumeAt          *time.Time      `json:"resume_at,omitempty"`
	NextEscalationAt  *time.Time      `json:"next_escalation_at,omitempty"`
	EscalationCursor  int             `json:"escalation_cursor"`
	ClaimState        string          `json:"claim_state"`
	ClaimedByKind     string          `json:"claimed_by_kind,omitempty"`
	ClaimedByID       string          `json:"claimed_by_id,omitempty"`
	ClaimedAt         *time.Time      `json:"claimed_at,omitempty"`
	AdmissionFailures int             `json:"admission_failures"`
	Expect            json.RawMessage `json:"expect,omitempty"`
	IssuedEpoch       int64           `json:"issued_epoch"`
	CreatedAt         time.Time       `json:"created_at"`
	AgeSeconds        int64           `json:"age_seconds"`
}

LoopNodeWaitPayload is one public durable wait cell.

type LoopParentClosePolicy

type LoopParentClosePolicy string

LoopParentClosePolicy is the closed run-loop parent-close vocabulary.

const (
	// LoopParentCloseTerminate closes the child with its parent.
	LoopParentCloseTerminate LoopParentClosePolicy = "terminate"
	// LoopParentCloseCancel requests a graceful child cancellation.
	LoopParentCloseCancel LoopParentClosePolicy = "cancel"
	// LoopParentCloseAbandon leaves the child running independently.
	LoopParentCloseAbandon LoopParentClosePolicy = "abandon"
)

type LoopPlanNodePreview

type LoopPlanNodePreview struct {
	ID        string        `json:"id"`
	Class     LoopNodeClass `json:"class"`
	Kind      string        `json:"kind"`
	DependsOn []string      `json:"depends_on,omitempty"`
}

LoopPlanNodePreview is one gen-1 node materialized by dry-run.

type LoopPlanPayload

type LoopPlanPayload struct {
	LoopName                     string                     `json:"loop_name"`
	ResolvedInputs               map[string]any             `json:"resolved_inputs"`
	InputOrigins                 map[string]LoopInputOrigin `json:"input_origins"`
	Generation                   int                        `json:"generation"`
	Nodes                        []LoopPlanNodePreview      `json:"nodes"`
	Contract                     LoopContract               `json:"contract"`
	MaterializedContract         LoopContract               `json:"materialized_contract"`
	EffectiveConfig              LoopEffectiveConfig        `json:"effective_config"`
	ResolvedNetworkParticipation *participation.Spec        `json:"resolved_network_participation"`
}

LoopPlanPayload is the public dry-run preview.

type LoopReattemptStrategy

type LoopReattemptStrategy string

LoopReattemptStrategy configures generation re-attempt breadth.

const (
	LoopReattemptFailedOnly LoopReattemptStrategy = "failed_only"
	LoopReattemptFullBody   LoopReattemptStrategy = "full_body"
)

type LoopResolvedLifecycleConfig

type LoopResolvedLifecycleConfig struct {
	RetryMaxAttempts       int               `json:"retry_max_attempts"`
	RetryBackoffBase       string            `json:"retry_backoff_base"`
	RetryBackoffMax        string            `json:"retry_backoff_max"`
	RetryNonRetryable      []string          `json:"retry_non_retryable"`
	LivenessSilenceWindow  string            `json:"liveness_silence_window"`
	ResumeDeathStreakLimit int               `json:"resume_death_streak_limit"`
	PredicateCostLimit     uint64            `json:"predicate_cost_limit"`
	WaitAdmissionAttempts  int               `json:"wait_admission_attempts"`
	WaitAdmissionInterval  string            `json:"wait_admission_interval"`
	AdmissionHorizon       string            `json:"admission_horizon"`
	Sources                map[string]string `json:"sources"`
}

LoopResolvedLifecycleConfig reports effective node-family defaults and their source layer.

type LoopResolvedRuntime

type LoopResolvedRuntime struct {
	Provider  string                `json:"provider,omitempty"`
	Model     string                `json:"model,omitempty"`
	Reasoning string                `json:"reasoning,omitempty"`
	Source    LoopRuntimeProvenance `json:"source"`
}

LoopResolvedRuntime is the runtime applied by the daemon plus field provenance.

type LoopResponse

type LoopResponse struct {
	Loop LoopDefinitionPayload `json:"loop"`
}

LoopResponse wraps one Loop definition.

type LoopResultContract

type LoopResultContract struct {
	FailureField string `json:"failure_field"`
	MessageField string `json:"message_field,omitempty"`
}

LoopResultContract identifies application-failure fields in a node result.

type LoopRetrySpec

type LoopRetrySpec struct {
	MaxAttempts  int              `json:"max_attempts,omitempty"`
	OnFailure    string           `json:"on_failure,omitempty"`
	Backoff      *LoopBackoffSpec `json:"backoff,omitempty"`
	NonRetryable []string         `json:"non_retryable,omitempty"`
}

LoopRetrySpec configures node retry policy.

type LoopRunEventKind

type LoopRunEventKind string

LoopRunEventKind is the public loop run event stream vocabulary.

const (
	LoopRunEventNodeRunning          LoopRunEventKind = "node_running"
	LoopRunEventNodeSucceeded        LoopRunEventKind = "node_succeeded"
	LoopRunEventNodeFailed           LoopRunEventKind = "node_failed"
	LoopRunEventGateVerdict          LoopRunEventKind = "gate_verdict"
	LoopRunEventGenerationStarted    LoopRunEventKind = "generation_started"
	LoopRunEventChannelMsg           LoopRunEventKind = "channel_msg"
	LoopRunEventTokenTick            LoopRunEventKind = "token_tick"
	LoopRunEventNeedsApproval        LoopRunEventKind = "needs_approval"
	LoopRunEventStatusChanged        LoopRunEventKind = "status_changed"
	LoopRunEventGoalTurnStarted      LoopRunEventKind = "goal_turn_started"
	LoopRunEventGoalTurnCompleted    LoopRunEventKind = "goal_turn_completed"
	LoopRunEventGoalStatusChanged    LoopRunEventKind = "goal_status_changed"
	LoopRunEventRuntimeApplied       LoopRunEventKind = "runtime_applied"
	LoopRunEventNodeRetryScheduled   LoopRunEventKind = "node_retry_scheduled"
	LoopRunEventNodePaused           LoopRunEventKind = "node_paused"
	LoopRunEventNodeResumed          LoopRunEventKind = "node_resumed"
	LoopRunEventNodeCanceled         LoopRunEventKind = "node_canceled"
	LoopRunEventNodeKilled           LoopRunEventKind = "node_killed"
	LoopRunEventNodeQuarantined      LoopRunEventKind = "node_quarantined"
	LoopRunEventNodeRequeued         LoopRunEventKind = "node_requeued"
	LoopRunEventNodeWaitStarted      LoopRunEventKind = "node_wait_started"
	LoopRunEventNodeWaitResumed      LoopRunEventKind = "node_wait_resumed"
	LoopRunEventNodeAttentionFlagged LoopRunEventKind = "node_attention_flagged"
	LoopRunEventNodeAttentionCleared LoopRunEventKind = "node_attention_cleared"
	LoopRunEventEffectResults        LoopRunEventKind = "effect_results"
	LoopRunEventCustomEvent          LoopRunEventKind = "custom_event"
	LoopRunEventDuplicateSuppressed  LoopRunEventKind = "duplicate_suppressed"
	LoopRunEventTargetBreaker        LoopRunEventKind = "target_breaker_transition"
	LoopRunEventStaleScheduleDropped LoopRunEventKind = "stale_schedule_dropped"
	LoopRunEventLateArrival          LoopRunEventKind = "late_arrival"
)

type LoopRunEventPayload

type LoopRunEventPayload struct {
	ID          string           `json:"id"`
	LoopRunID   string           `json:"loop_run_id"`
	WorkspaceID string           `json:"workspace_id"`
	Seq         int64            `json:"seq"`
	Kind        LoopRunEventKind `json:"kind"`
	Payload     json.RawMessage  `json:"payload"`
	At          time.Time        `json:"at"`
}

LoopRunEventPayload is one SSE/audit event for a loop run.

type LoopRunPayload

type LoopRunPayload struct {
	ID                           string                `json:"id"`
	WorkspaceID                  string                `json:"workspace_id"`
	LoopName                     string                `json:"loop_name"`
	Status                       LoopRunStatus         `json:"status"`
	Generation                   int64                 `json:"generation"`
	BestGeneration               *int64                `json:"best_generation,omitempty"`
	BestScore                    *float64              `json:"best_score,omitempty"`
	ReattemptStrategy            LoopReattemptStrategy `json:"reattempt_strategy"`
	CreatedAt                    time.Time             `json:"created_at"`
	StartedAt                    time.Time             `json:"started_at"`
	LastProgressAt               time.Time             `json:"last_progress_at"`
	StartedByKind                string                `json:"started_by_kind,omitempty"`
	StartedByRef                 string                `json:"started_by_ref,omitempty"`
	StartedOriginKind            string                `json:"started_origin_kind,omitempty"`
	StartedOriginRef             string                `json:"started_origin_ref,omitempty"`
	DefinitionVersion            int                   `json:"definition_version"`
	DefinitionDigest             string                `json:"definition_digest,omitempty"`
	ActiveGateID                 string                `json:"active_gate_id,omitempty"`
	BudgetApprovalSeq            int                   `json:"budget_approval_seq,omitempty"`
	StartMetadata                map[string]any        `json:"start_metadata,omitempty"`
	IterationCap                 int                   `json:"iteration_cap"`
	BudgetTokens                 int                   `json:"budget_tokens"`
	BudgetWallSec                int                   `json:"budget_wall_sec"`
	BudgetOnExceeded             LoopBudgetExceeded    `json:"budget_on_exceeded"`
	TokensUsed                   int64                 `json:"tokens_used"`
	ParentLoopRunID              string                `json:"parent_loop_run_id,omitempty"`
	PauseRequested               bool                  `json:"pause_requested"`
	Inputs                       map[string]any        `json:"inputs,omitempty"`
	ResolvedNetworkParticipation *participation.Spec   `json:"resolved_network_participation"`
}

LoopRunPayload is the public loop_run aggregate projection.

type LoopRunResponse

type LoopRunResponse struct {
	Run                  LoopRunPayload           `json:"run"`
	ExecutedDefinition   *LoopDefinitionDocument  `json:"executed_definition,omitempty"`
	MaterializedContract LoopContract             `json:"materialized_contract"`
	Generations          []LoopGenerationPayload  `json:"generations,omitempty"`
	NodeControls         []LoopNodeControlPayload `json:"node_controls"`
	Waits                []LoopNodeWaitPayload    `json:"waits"`
	// WatchEvents is the parked watch-events read-model (present only while dormant).
	WatchEvents *LoopWatchEventsState `json:"watch_events,omitempty"`
}

LoopRunResponse returns one run with generation detail.

type LoopRunStatus

type LoopRunStatus string

LoopRunStatus is the public loop run state vocabulary.

const (
	LoopRunStatusQueued        LoopRunStatus = "queued"
	LoopRunStatusRunning       LoopRunStatus = "running"
	LoopRunStatusWatching      LoopRunStatus = "watching"
	LoopRunStatusNeedsApproval LoopRunStatus = "needs-approval"
	LoopRunStatusPaused        LoopRunStatus = "paused"
	LoopRunStatusDone          LoopRunStatus = "done"
	LoopRunStatusNoOp          LoopRunStatus = "no-op"
	LoopRunStatusBlocked       LoopRunStatus = "blocked"
	LoopRunStatusFailed        LoopRunStatus = "failed"
	LoopRunStatusExhausted     LoopRunStatus = "exhausted"
	LoopRunStatusStalled       LoopRunStatus = "stalled"
	LoopRunStatusCanceled      LoopRunStatus = "canceled"
)

type LoopRunTransitionCause

type LoopRunTransitionCause string

LoopRunTransitionCause identifies why a run status changed.

const (
	LoopRunTransitionCauseStart              LoopRunTransitionCause = "start"
	LoopRunTransitionCausePromote            LoopRunTransitionCause = "promote"
	LoopRunTransitionCauseOperatorCancel     LoopRunTransitionCause = "operator_cancel"
	LoopRunTransitionCauseOperatorKill       LoopRunTransitionCause = "operator_kill"
	LoopRunTransitionCauseGoalReplace        LoopRunTransitionCause = "goal_replace"
	LoopRunTransitionCauseGoalClear          LoopRunTransitionCause = "goal_clear"
	LoopRunTransitionCausePauseBoundary      LoopRunTransitionCause = "pause_boundary"
	LoopRunTransitionCauseOperatorResume     LoopRunTransitionCause = "operator_resume"
	LoopRunTransitionCauseApproval           LoopRunTransitionCause = "approval"
	LoopRunTransitionCauseWaitExpired        LoopRunTransitionCause = "wait_expired"
	LoopRunTransitionCauseGateRejected       LoopRunTransitionCause = "gate_rejected"
	LoopRunTransitionCauseContract           LoopRunTransitionCause = "contract"
	LoopRunTransitionCauseBudget             LoopRunTransitionCause = "budget"
	LoopRunTransitionCauseIterationCap       LoopRunTransitionCause = "iteration_cap"
	LoopRunTransitionCauseNoProgress         LoopRunTransitionCause = "no_progress"
	LoopRunTransitionCauseWatchPoll          LoopRunTransitionCause = "watch_poll"
	LoopRunTransitionCauseWatchEvents        LoopRunTransitionCause = "watch_events"
	LoopRunTransitionCauseCoordinatorFailure LoopRunTransitionCause = "coordinator_failure"
)

type LoopRunsAggregatePayload

type LoopRunsAggregatePayload struct {
	Total     int `json:"total"`
	Live      int `json:"live"`
	Terminal  int `json:"terminal"`
	Succeeded int `json:"succeeded"`
	Failed    int `json:"failed"`
}

LoopRunsAggregatePayload summarizes the returned run set.

type LoopRunsResponse

type LoopRunsResponse struct {
	Runs       []LoopRunPayload         `json:"runs"`
	Aggregates LoopRunsAggregatePayload `json:"aggregates"`
}

LoopRunsResponse lists workspace-scoped loop runs.

type LoopRuntimeDefaults

type LoopRuntimeDefaults struct {
	//nolint:modernize // OpenAPI requires omitempty; JSON uses omitzero.
	Worker LoopRuntimeSpec `json:"worker,omitempty,omitzero"`
	//nolint:modernize // OpenAPI requires omitempty; JSON uses omitzero.
	Judge LoopRuntimeSpec `json:"judge,omitempty,omitzero"`
}

LoopRuntimeDefaults contains worker and judge runtime intent.

type LoopRuntimeMatch

type LoopRuntimeMatch struct {
	ID         string `json:"id,omitempty"`
	Type       string `json:"type,omitempty"`
	Complexity string `json:"complexity,omitempty"`
}

LoopRuntimeMatch selects exactly one imported task dimension.

type LoopRuntimeProvenance

type LoopRuntimeProvenance struct {
	Provider  string `json:"provider,omitempty"`
	Model     string `json:"model,omitempty"`
	Reasoning string `json:"reasoning,omitempty"`
}

LoopRuntimeProvenance identifies the source of each applied field.

type LoopRuntimeRule

type LoopRuntimeRule struct {
	Match   LoopRuntimeMatch `json:"match"`
	Runtime LoopRuntimeSpec  `json:"runtime"`
}

LoopRuntimeRule applies runtime intent to matching task items.

type LoopRuntimeSpec

type LoopRuntimeSpec struct {
	Provider  string `json:"provider,omitempty"`
	Model     string `json:"model,omitempty"`
	Reasoning string `json:"reasoning,omitempty"`
}

LoopRuntimeSpec is one provider/model/reasoning selection layer.

func (*LoopRuntimeSpec) UnmarshalJSON

func (s *LoopRuntimeSpec) UnmarshalJSON(data []byte) error

UnmarshalJSON keeps runtime objects closed while the surrounding Loop DSL remains extensible.

type LoopRuntimeValidationItemPayload

type LoopRuntimeValidationItemPayload struct {
	TaskID string `json:"task_id,omitempty"`
	Field  string `json:"field"`
	Value  string `json:"value"`
	Reason string `json:"reason"`
}

LoopRuntimeValidationItemPayload is one deterministic runtime preflight diagnostic.

type LoopSource

type LoopSource string

LoopSource is the public source-provenance tier for a Loop definition.

const (
	LoopSourceMarketplace LoopSource = "marketplace"
	LoopSourceUser        LoopSource = "user"
	LoopSourceAdditional  LoopSource = "additional"
	LoopSourceWorkspace   LoopSource = "workspace"
)

type LoopStartBinding

type LoopStartBinding struct {
	Kind         string            `json:"kind"`
	Inputs       map[string]any    `json:"inputs,omitempty"`
	InputMapping map[string]string `json:"input_mapping,omitempty"`
}

type LoopValidationResponse

type LoopValidationResponse struct {
	Valid             bool                               `json:"valid"`
	Errors            []LoopLintErrorPayload             `json:"errors,omitempty"`
	RuntimeValidation []LoopRuntimeValidationItemPayload `json:"runtime_validation,omitempty"`
	InputDefault      *LoopInputDefaultErrorPayload      `json:"input_default,omitempty"`
}

LoopValidationResponse reports lint/compile diagnostics.

type LoopVersionConflictResponse

type LoopVersionConflictResponse struct {
	Error          string `json:"error"`
	CurrentVersion int    `json:"current_version"`
}

LoopVersionConflictResponse reports the current published version after a CAS miss.

type LoopWaitExpiry

type LoopWaitExpiry struct {
	After    string           `json:"after"`
	Escalate []LoopEffectSpec `json:"escalate,omitempty"`
	Route    string           `json:"route,omitempty"`
}

LoopWaitExpiry describes an optional expiry path for waits and gates.

type LoopWatchEventKind

type LoopWatchEventKind string

LoopWatchEventKind is the closed public vocabulary of subscribable watch-events hook kinds. It mirrors the shipped rows of the loop engine's watch-events family registry (internal/loop.SupportedWatchEvents); a drift test in internal/daemon keeps this contract enum and the registry in lockstep. ADR-004 governs the phased matrix — phases B/C append rows here as they land.

const (
	LoopWatchEventTaskStatusChanged LoopWatchEventKind = "task.status_changed"
	LoopWatchEventTaskBlocked       LoopWatchEventKind = "task.blocked"
	LoopWatchEventTaskUnblocked     LoopWatchEventKind = "task.unblocked"
	LoopWatchEventTaskNeedsAttn     LoopWatchEventKind = "task.needs_attention"
	LoopWatchEventTaskRecovered     LoopWatchEventKind = "task.recovered"
	LoopWatchEventTaskRunCompleted  LoopWatchEventKind = "task.run.completed" // #nosec G101 -- event enum.
	LoopWatchEventTaskRunFailed     LoopWatchEventKind = "task.run.failed"
	LoopWatchEventLoopTerminal      LoopWatchEventKind = "loop.terminal"
	LoopWatchEventLoopNodeTerminal  LoopWatchEventKind = "loop.node.terminal"       // #nosec G101 -- event enum.
	LoopWatchEventAutomationDone    LoopWatchEventKind = "automation.run.completed" // #nosec G101 -- event enum.
	LoopWatchEventAutomationFailed  LoopWatchEventKind = "automation.run.failed"    // #nosec G101 -- event enum.
	LoopWatchEventNetworkMessage    LoopWatchEventKind = "network.message.persisted"
	LoopWatchEventNetworkThread     LoopWatchEventKind = "network.thread.opened"
	LoopWatchEventNetworkDirect     LoopWatchEventKind = "network.direct_room.opened"
	LoopWatchEventNetworkWorkOpen   LoopWatchEventKind = "network.work.opened"
	LoopWatchEventNetworkWorkChange LoopWatchEventKind = "network.work.transitioned"
	LoopWatchEventNetworkWorkClosed LoopWatchEventKind = "network.work.closed"
	LoopWatchEventCoordinatorSpawn  LoopWatchEventKind = "coordinator.spawned"
	LoopWatchEventCoordinatorDecide LoopWatchEventKind = "coordinator.decision"
	LoopWatchEventCoordinatorStop   LoopWatchEventKind = "coordinator.stopped"
	LoopWatchEventCoordinatorFail   LoopWatchEventKind = "coordinator.failed"
	LoopWatchEventPostRecord        LoopWatchEventKind = "event.post_record" // #nosec G101 -- event enum.
)

type LoopWatchEventSubscription

type LoopWatchEventSubscription struct {
	Kind   LoopWatchEventKind `json:"kind"`
	Filter string             `json:"filter,omitempty"`
}

LoopWatchEventSubscription is one parked watch-events subscription projected for a loop-run detail read-model. Kind names a subscribable hook event; Filter is the CEL expression evaluated at wake (empty = match every event of this kind in the run's workspace).

type LoopWatchEventsState

type LoopWatchEventsState struct {
	Subscriptions []LoopWatchEventSubscription `json:"subscriptions"`
	Cursors       map[string]int64             `json:"cursors,omitempty"`
	LastWakeAt    *time.Time                   `json:"last_wake_at,omitempty"`
}

LoopWatchEventsState is the parked watch-events node read-model surfaced on a loop-run detail response. It is present only while the run's current generation is dormant at a watch-events node; an absent value means the run is not currently parked on events, so clients render nothing (truthful UI). Subscriptions and Cursors project the durable pending output_ref; LastWakeAt is the run's last coordinator-progress timestamp.

type LoopsResponse

type LoopsResponse struct {
	Loops  []LoopCatalogEntryPayload `json:"loops"`
	Facets LoopCatalogFacetsPayload  `json:"facets"`
	Page   CountedCursorPagePayload  `json:"page"`
}

LoopsResponse is returned by GET /workspaces/{workspace_id}/loops.

type MCPServerStatusPayload

type MCPServerStatusPayload struct {
	Name          string `json:"name"`
	Scope         string `json:"scope"`
	WorkspaceID   string `json:"workspace_id,omitempty"`
	AuthStatus    string `json:"auth_status,omitempty"`
	Configured    bool   `json:"configured"`
	Initialized   bool   `json:"initialized"`
	State         string `json:"state"`
	Probe         string `json:"probe,omitempty"`
	ToolCount     int    `json:"tool_count,omitempty"`
	Reason        string `json:"reason,omitempty"`
	Diagnostic    string `json:"diagnostic,omitempty"`
	Transport     string `json:"transport,omitempty"`
	RuntimeStatus string `json:"runtime_status"`
}

MCPServerStatusPayload reports configured MCP server availability.

type ManagedExtensionRemovePayload

type ManagedExtensionRemovePayload struct {
	Name     string           `json:"name"`
	Path     string           `json:"path"`
	Status   string           `json:"status"`
	Warnings []DiagnosticItem `json:"warnings,omitempty"`
}

ManagedExtensionRemovePayload describes one daemon-owned extension removal.

type ManagedExtensionUpdatePayload

type ManagedExtensionUpdatePayload struct {
	Name           string           `json:"name"`
	Slug           string           `json:"slug"`
	Registry       string           `json:"registry"`
	CurrentVersion string           `json:"current_version,omitempty"`
	LatestVersion  string           `json:"latest_version,omitempty"`
	Path           string           `json:"path"`
	Status         string           `json:"status"`
	Warnings       []DiagnosticItem `json:"warnings,omitempty"`
	Error          *DiagnosticItem  `json:"error,omitempty"`
}

ManagedExtensionUpdatePayload describes one daemon-owned extension update.

type MarketplaceEntryResponse

type MarketplaceEntryResponse struct {
	Entry     MarketplaceListingPayload          `json:"entry"`
	MCP       *MarketplaceMCPDetailPayload       `json:"mcp,omitempty"`
	Extension *MarketplaceExtensionDetailPayload `json:"extension,omitempty"`
	Skill     *MarketplaceSkillDetailPayload     `json:"skill,omitempty"`
}

MarketplaceEntryResponse is one exact detail resolved by entry_id.

type MarketplaceExtensionDetailPayload

type MarketplaceExtensionDetailPayload struct {
	InstallSlug  string `json:"install_slug"`
	ArtifactURL  string `json:"artifact_url"`
	DigestSHA256 string `json:"digest_sha256"`
	Repository   string `json:"repository,omitempty"`
}

MarketplaceExtensionDetailPayload contains curated extension acquisition metadata.

type MarketplaceKind

type MarketplaceKind string

MarketplaceKind identifies one supported marketplace catalog.

const (
	MarketplaceKindMCP       MarketplaceKind = "mcp"
	MarketplaceKindExtension MarketplaceKind = "extension"
	MarketplaceKindSkill     MarketplaceKind = "skill"

	MarketplaceScopeGlobal    = "global"
	MarketplaceScopeWorkspace = "workspace"
)

type MarketplaceKindResponse

type MarketplaceKindResponse struct {
	Kind       MarketplaceKind             `json:"kind"`
	Total      *int                        `json:"total,omitempty"`
	NextCursor string                      `json:"next_cursor,omitempty"`
	Stale      bool                        `json:"stale"`
	ErrorClass string                      `json:"error_class,omitempty"`
	Error      string                      `json:"error,omitempty"`
	Items      []MarketplaceListingPayload `json:"items"`
}

MarketplaceKindResponse is one kind's browse response.

type MarketplaceKindResult

type MarketplaceKindResult struct {
	Kind       MarketplaceKind             `json:"kind"`
	Total      *int                        `json:"total,omitempty"`
	NextCursor string                      `json:"next_cursor,omitempty"`
	Stale      bool                        `json:"stale"`
	ErrorClass string                      `json:"error_class,omitempty"`
	Error      string                      `json:"error,omitempty"`
	Items      []MarketplaceListingPayload `json:"items"`
}

MarketplaceKindResult is one independently resolved marketplace kind.

type MarketplaceListingPayload

type MarketplaceListingPayload struct {
	Kind             MarketplaceKind              `json:"kind"`
	EntryID          string                       `json:"entry_id"`
	Name             string                       `json:"name"`
	Description      string                       `json:"description"`
	Version          string                       `json:"version,omitempty"`
	Author           string                       `json:"author,omitempty"`
	Downloads        *int                         `json:"downloads,omitempty"`
	InstallSlug      string                       `json:"install_slug,omitempty"`
	Source           string                       `json:"source"`
	Transport        string                       `json:"transport,omitempty"`
	Tier             string                       `json:"tier,omitempty"`
	PublishedAt      *time.Time                   `json:"published_at,omitempty"`
	UpdatedAt        *time.Time                   `json:"updated_at,omitempty"`
	Installed        bool                         `json:"installed"`
	InstalledName    string                       `json:"installed_name,omitempty"`
	InstalledVersion string                       `json:"installed_version,omitempty"`
	UpdateAvailable  bool                         `json:"update_available"`
	ManagePath       string                       `json:"manage_path,omitempty"`
	Trust            *ExtensionTrustReportPayload `json:"trust,omitempty"`
}

MarketplaceListingPayload is the common discovery row shared by every marketplace kind.

type MarketplaceMCPDetailPayload

type MarketplaceMCPDetailPayload struct {
	Launch       MarketplaceMCPLaunchPayload  `json:"launch"`
	Auth         *MarketplaceMCPOAuthPayload  `json:"auth,omitempty"`
	Inputs       []MarketplaceMCPInputPayload `json:"inputs,omitempty"`
	DefaultScope string                       `json:"default_scope"`
}

MarketplaceMCPDetailPayload contains the feed-locked MCP install template.

type MarketplaceMCPInputBindingPayload

type MarketplaceMCPInputBindingPayload struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

MarketplaceMCPInputBindingPayload identifies the sole allowed materialization target.

type MarketplaceMCPInputPayload

type MarketplaceMCPInputPayload struct {
	ID       string                            `json:"id"`
	Prompt   string                            `json:"prompt"`
	Type     string                            `json:"type"`
	Required bool                              `json:"required"`
	Binding  MarketplaceMCPInputBindingPayload `json:"binding"`
	Default  any                               `json:"default,omitempty"`
}

MarketplaceMCPInputPayload describes one typed operator input.

type MarketplaceMCPLaunchPayload

type MarketplaceMCPLaunchPayload struct {
	Type    string   `json:"type"`
	Package string   `json:"package,omitempty"`
	Version string   `json:"version,omitempty"`
	Image   string   `json:"image,omitempty"`
	Digest  string   `json:"digest,omitempty"`
	URL     string   `json:"url,omitempty"`
	Args    []string `json:"args,omitempty"`
}

MarketplaceMCPLaunchPayload contains the typed catalog launch declaration.

type MarketplaceMCPOAuthPayload

type MarketplaceMCPOAuthPayload struct {
	Method       string   `json:"method"`
	Registration string   `json:"registration"`
	Scopes       []string `json:"scopes,omitempty"`
}

MarketplaceMCPOAuthPayload contains OAuth discovery policy from the catalog.

type MarketplaceRefreshKindPayload

type MarketplaceRefreshKindPayload struct {
	Kind       string `json:"kind"`
	Outcome    string `json:"outcome"`
	EntryCount int    `json:"entry_count"`
	Stale      bool   `json:"stale"`
	ErrorClass string `json:"error_class,omitempty"`
}

MarketplaceRefreshKindPayload reports one feed-backed refresh outcome.

type MarketplaceRefreshResponse

type MarketplaceRefreshResponse struct {
	Kinds []MarketplaceRefreshKindPayload `json:"kinds"`
}

MarketplaceRefreshResponse reports deterministic per-kind refresh outcomes.

type MarketplaceSearchResponse

type MarketplaceSearchResponse struct {
	Query string                  `json:"query"`
	Kinds []MarketplaceKindResult `json:"kinds"`
}

MarketplaceSearchResponse is the deterministic grouped discovery response.

type MarketplaceSkillDetailPayload

type MarketplaceSkillDetailPayload struct {
	InstallSlug string   `json:"install_slug"`
	DisplayName string   `json:"display_name,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	Readme      string   `json:"readme,omitempty"`
	License     string   `json:"license,omitempty"`
	Repository  string   `json:"repository,omitempty"`
	Versions    []string `json:"versions,omitempty"`
}

MarketplaceSkillDetailPayload contains skill registry detail and acquisition metadata.

type MemoryAdhocNoteRequest

type MemoryAdhocNoteRequest struct {
	Scope       memcontract.Scope     `json:"scope"`
	WorkspaceID string                `json:"workspace_id,omitempty"`
	AgentName   string                `json:"agent_name,omitempty"`
	AgentTier   memcontract.AgentTier `json:"agent_tier,omitempty"`
	Content     string                `json:"content"`
	Slug        string                `json:"slug,omitempty"`
}

MemoryAdhocNoteRequest is the only public ad-hoc memory note write surface.

type MemoryAdhocNoteResponse

type MemoryAdhocNoteResponse struct {
	Path      string    `json:"path"`
	Accepted  bool      `json:"accepted"`
	CreatedAt time.Time `json:"created_at"`
}

MemoryAdhocNoteResponse reports the created ad-hoc note artifact.

type MemoryConfigMetadataResponse

type MemoryConfigMetadataResponse struct {
	Config       SettingsMemoryConfigPayload `json:"config"`
	MutablePaths []string                    `json:"mutable_paths"`
	LockedPaths  []string                    `json:"locked_paths"`
	Providers    []MemoryProviderPayload     `json:"providers"`
}

MemoryConfigMetadataResponse exposes Memory v2 settings metadata without secrets.

type MemoryConsolidateRequest

type MemoryConsolidateRequest struct {
	Workspace string `json:"workspace,omitempty"`
}

MemoryConsolidateRequest is the shared memory consolidation request payload.

type MemoryConsolidateResponse

type MemoryConsolidateResponse struct {
	Triggered bool   `json:"triggered"`
	Reason    string `json:"reason,omitempty"`
}

MemoryConsolidateResponse is the shared memory consolidation response payload.

type MemoryCreateRequest

type MemoryCreateRequest struct {
	Scope          memcontract.Scope     `json:"scope"`
	WorkspaceID    string                `json:"workspace_id,omitempty"`
	AgentName      string                `json:"agent_name,omitempty"`
	AgentTier      memcontract.AgentTier `json:"agent_tier,omitempty"`
	Origin         memcontract.Origin    `json:"origin,omitempty"`
	Type           memcontract.Type      `json:"type"`
	Name           string                `json:"name"`
	Description    string                `json:"description,omitempty"`
	Content        string                `json:"content"`
	Entity         string                `json:"entity,omitempty"`
	Attribute      string                `json:"attribute,omitempty"`
	Metadata       map[string]string     `json:"metadata,omitempty"`
	IdempotencyKey string                `json:"idempotency_key,omitempty"`
	DryRun         bool                  `json:"dry_run,omitempty"`
}

MemoryCreateRequest is the canonical controller-backed create/propose payload.

type MemoryDailyLogListResponse

type MemoryDailyLogListResponse struct {
	Logs []MemoryDailyLogPayload `json:"logs"`
}

MemoryDailyLogListResponse wraps daily memory log artifacts.

type MemoryDailyLogPayload

type MemoryDailyLogPayload struct {
	Date           string                `json:"date"`
	Scope          memcontract.Scope     `json:"scope"`
	WorkspaceID    string                `json:"workspace_id,omitempty"`
	AgentName      string                `json:"agent_name,omitempty"`
	AgentTier      memcontract.AgentTier `json:"agent_tier,omitempty"`
	Path           string                `json:"path"`
	OperationCount int                   `json:"operation_count"`
}

MemoryDailyLogPayload describes one daily memory log artifact.

type MemoryDecisionListResponse

type MemoryDecisionListResponse struct {
	Decisions []MemoryDecisionPayload `json:"decisions"`
}

MemoryDecisionListResponse wraps controller decision history.

type MemoryDecisionOp

type MemoryDecisionOp string

MemoryDecisionOp is the public string form of a controller decision op.

const (
	// MemoryDecisionOpNoop means the controller intentionally left state unchanged.
	MemoryDecisionOpNoop MemoryDecisionOp = "noop"
	// MemoryDecisionOpAdd means the controller created a new curated entry.
	MemoryDecisionOpAdd MemoryDecisionOp = "add"
	// MemoryDecisionOpUpdate means the controller updated an existing curated entry.
	MemoryDecisionOpUpdate MemoryDecisionOp = "update"
	// MemoryDecisionOpDelete means the controller deleted an existing curated entry.
	MemoryDecisionOpDelete MemoryDecisionOp = "delete"
	// MemoryDecisionOpReject means the controller rejected a proposed candidate.
	MemoryDecisionOpReject MemoryDecisionOp = "reject"
)

type MemoryDecisionPayload

type MemoryDecisionPayload struct {
	ID              string                     `json:"id"`
	CandidateHash   string                     `json:"candidate_hash"`
	IdempotencyKey  string                     `json:"idempotency_key,omitempty"`
	Op              MemoryDecisionOp           `json:"op"`
	Scope           memcontract.Scope          `json:"scope"`
	WorkspaceID     string                     `json:"workspace_id,omitempty"`
	AgentName       string                     `json:"agent_name,omitempty"`
	AgentTier       memcontract.AgentTier      `json:"agent_tier,omitempty"`
	Targets         []string                   `json:"targets,omitempty"`
	TargetFilename  string                     `json:"target_filename,omitempty"`
	Frontmatter     memcontract.Header         `json:"frontmatter"`
	PostContentHash string                     `json:"post_content_hash,omitempty"`
	Confidence      float32                    `json:"confidence"`
	Source          memcontract.DecisionSource `json:"source"`
	RuleTrace       []memcontract.RuleHit      `json:"rule_trace,omitempty"`
	LLMTrace        *MemoryLLMTracePayload     `json:"llm_trace,omitempty"`
	Reason          string                     `json:"reason,omitempty"`
	PromptVersion   string                     `json:"prompt_version,omitempty"`
	AppliedAt       *time.Time                 `json:"applied_at,omitempty"`
	DecidedAt       time.Time                  `json:"decided_at"`
}

MemoryDecisionPayload is the redaction-safe public form of a controller decision.

type MemoryDecisionResponse

type MemoryDecisionResponse struct {
	Decision MemoryDecisionPayload `json:"decision"`
}

MemoryDecisionResponse wraps one controller decision.

type MemoryDecisionRevertRequest

type MemoryDecisionRevertRequest struct {
	Reason string `json:"reason,omitempty"`
	DryRun bool   `json:"dry_run,omitempty"`
}

MemoryDecisionRevertRequest asks the controller to revert one applied decision.

type MemoryDecisionRevertResponse

type MemoryDecisionRevertResponse struct {
	Decision MemoryDecisionPayload `json:"decision"`
	Reverted bool                  `json:"reverted"`
	DryRun   bool                  `json:"dry_run,omitempty"`
}

MemoryDecisionRevertResponse wraps a revert decision.

type MemoryDeleteResponse

type MemoryDeleteResponse struct {
	Decision MemoryDecisionPayload `json:"decision"`
	Applied  bool                  `json:"applied"`
}

MemoryDeleteResponse wraps a controller-backed delete decision.

type MemoryDreamListResponse

type MemoryDreamListResponse struct {
	Dreams []MemoryDreamPayload `json:"dreams"`
}

MemoryDreamListResponse wraps dreaming runtime records.

type MemoryDreamPayload

type MemoryDreamPayload struct {
	ID             string                `json:"id"`
	Status         MemoryDreamState      `json:"status"`
	Scope          memcontract.Scope     `json:"scope"`
	WorkspaceID    string                `json:"workspace_id,omitempty"`
	AgentName      string                `json:"agent_name,omitempty"`
	AgentTier      memcontract.AgentTier `json:"agent_tier,omitempty"`
	CandidateCount int                   `json:"candidate_count"`
	PromotedCount  int                   `json:"promoted_count"`
	ArtifactPaths  []string              `json:"artifact_paths,omitempty"`
	FailurePath    string                `json:"failure_path,omitempty"`
	FailureReason  string                `json:"failure_reason,omitempty"`
	LockUntil      *time.Time            `json:"lock_until,omitempty"`
	StartedAt      time.Time             `json:"started_at"`
	CompletedAt    *time.Time            `json:"completed_at,omitempty"`
}

MemoryDreamPayload is one dreaming runtime record.

type MemoryDreamResponse

type MemoryDreamResponse struct {
	Dream MemoryDreamPayload `json:"dream"`
}

MemoryDreamResponse wraps one dreaming runtime record.

type MemoryDreamRetryRequest

type MemoryDreamRetryRequest struct {
	FailureID string `json:"failure_id,omitempty"`
	Force     bool   `json:"force,omitempty"`
}

MemoryDreamRetryRequest asks the daemon to retry a failed dreaming run.

type MemoryDreamRetryResponse

type MemoryDreamRetryResponse struct {
	Dream   MemoryDreamPayload `json:"dream"`
	Retried bool               `json:"retried"`
}

MemoryDreamRetryResponse reports the retried dreaming run.

type MemoryDreamState

type MemoryDreamState string

MemoryDreamState is the public state of a dreaming run.

const (
	// MemoryDreamStateIdle means no dreaming run is active.
	MemoryDreamStateIdle MemoryDreamState = "idle"
	// MemoryDreamStateRunning means a dreaming run is currently executing.
	MemoryDreamStateRunning MemoryDreamState = "running"
	// MemoryDreamStatePromoted means the run produced a promoted memory.
	MemoryDreamStatePromoted MemoryDreamState = "promoted"
	// MemoryDreamStateSkipped means promotion gates rejected the run.
	MemoryDreamStateSkipped MemoryDreamState = "skipped"
	// MemoryDreamStateFailed means the run failed and wrote DLQ material.
	MemoryDreamStateFailed MemoryDreamState = "failed"
)

type MemoryDreamTriggerRequest

type MemoryDreamTriggerRequest struct {
	Scope       memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID string                `json:"workspace_id,omitempty"`
	AgentName   string                `json:"agent_name,omitempty"`
	AgentTier   memcontract.AgentTier `json:"agent_tier,omitempty"`
	Force       bool                  `json:"force,omitempty"`
}

MemoryDreamTriggerRequest asks the daemon to run dreaming immediately.

type MemoryDreamTriggerResponse

type MemoryDreamTriggerResponse struct {
	Dream     MemoryDreamPayload `json:"dream"`
	Triggered bool               `json:"triggered"`
	Reason    string             `json:"reason,omitempty"`
}

MemoryDreamTriggerResponse reports the requested dreaming run.

type MemoryEditRequest

type MemoryEditRequest struct {
	Scope          memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID    string                `json:"workspace_id,omitempty"`
	AgentName      string                `json:"agent_name,omitempty"`
	AgentTier      memcontract.AgentTier `json:"agent_tier,omitempty"`
	Type           memcontract.Type      `json:"type,omitempty"`
	Name           string                `json:"name,omitempty"`
	Description    string                `json:"description,omitempty"`
	Content        string                `json:"content"`
	Metadata       map[string]string     `json:"metadata,omitempty"`
	IdempotencyKey string                `json:"idempotency_key,omitempty"`
	DryRun         bool                  `json:"dry_run,omitempty"`
}

MemoryEditRequest is the canonical controller-backed update payload.

type MemoryEntryPayload

type MemoryEntryPayload struct {
	Summary MemoryEntrySummaryPayload `json:"summary"`
	Content string                    `json:"content"`
}

MemoryEntryPayload is one curated memory document with bounded public content.

type MemoryEntryResponse

type MemoryEntryResponse struct {
	Memory MemoryEntryPayload `json:"memory"`
}

MemoryEntryResponse wraps a single Memory v2 entry.

type MemoryEntrySummaryPayload

type MemoryEntrySummaryPayload struct {
	Filename        string                `json:"filename"`
	Name            string                `json:"name"`
	Description     string                `json:"description,omitempty"`
	Type            memcontract.Type      `json:"type"`
	Scope           memcontract.Scope     `json:"scope"`
	WorkspaceID     string                `json:"workspace_id,omitempty"`
	AgentName       string                `json:"agent_name,omitempty"`
	AgentTier       memcontract.AgentTier `json:"agent_tier,omitempty"`
	ContentHash     string                `json:"content_hash,omitempty"`
	SupersededBy    string                `json:"superseded_by,omitempty"`
	ModTime         time.Time             `json:"mod_time"`
	CreatedAt       *time.Time            `json:"created_at,omitempty"`
	UpdatedAt       *time.Time            `json:"updated_at,omitempty"`
	LastRecalledAt  *time.Time            `json:"last_recalled_at,omitempty"`
	RecallCount     int                   `json:"recall_count"`
	Injection       bool                  `json:"injection"`
	SystemManaged   bool                  `json:"system_managed"`
	StalenessBanner string                `json:"staleness_banner,omitempty"`
}

MemoryEntrySummaryPayload is one redaction-safe curated memory summary.

type MemoryErrorPayload

type MemoryErrorPayload struct {
	Code    string         `json:"code"`
	Message string         `json:"message"`
	Details map[string]any `json:"details,omitempty"`
}

MemoryErrorPayload is the deterministic public error envelope for Memory v2 endpoints.

type MemoryExtractorDrainResponse

type MemoryExtractorDrainResponse struct {
	DrainedAt time.Time `json:"drained_at"`
	Remaining int       `json:"remaining"`
}

MemoryExtractorDrainResponse reports extractor drain completion.

type MemoryExtractorFailurePayload

type MemoryExtractorFailurePayload struct {
	ID          string    `json:"id"`
	SessionID   string    `json:"session_id"`
	WorkspaceID string    `json:"workspace_id,omitempty"`
	AgentName   string    `json:"agent_name,omitempty"`
	Reason      string    `json:"reason"`
	Path        string    `json:"path"`
	CreatedAt   time.Time `json:"created_at"`
}

MemoryExtractorFailurePayload is one redaction-safe extractor DLQ record.

type MemoryExtractorFailuresResponse

type MemoryExtractorFailuresResponse struct {
	Failures []MemoryExtractorFailurePayload `json:"failures"`
}

MemoryExtractorFailuresResponse wraps extractor DLQ records.

type MemoryExtractorRetryRequest

type MemoryExtractorRetryRequest struct {
	FailureID string `json:"failure_id,omitempty"`
	SessionID string `json:"session_id,omitempty"`
}

MemoryExtractorRetryRequest asks the daemon to retry extractor DLQ records.

type MemoryExtractorRetryResponse

type MemoryExtractorRetryResponse struct {
	Retried int `json:"retried"`
	Failed  int `json:"failed"`
}

MemoryExtractorRetryResponse reports extractor retry results.

type MemoryExtractorState

type MemoryExtractorState string

MemoryExtractorState is the public lifecycle state of the extractor queue.

const (
	// MemoryExtractorStateIdle means the extractor has no active work.
	MemoryExtractorStateIdle MemoryExtractorState = "idle"
	// MemoryExtractorStateRunning means the extractor is processing queued turns.
	MemoryExtractorStateRunning MemoryExtractorState = "running"
	// MemoryExtractorStateDraining means shutdown is waiting for queue drain.
	MemoryExtractorStateDraining MemoryExtractorState = "draining"
	// MemoryExtractorStateStopped means the extractor runtime is closed.
	MemoryExtractorStateStopped MemoryExtractorState = "stopped"
)

type MemoryExtractorStatusPayload

type MemoryExtractorStatusPayload struct {
	Status                 MemoryExtractorState `json:"status"`
	QueuedSessions         int                  `json:"queued_sessions"`
	InFlightSessions       int                  `json:"in_flight_sessions"`
	ActiveProviderSessions int                  `json:"active_provider_sessions"`
	DroppedTurns           int                  `json:"dropped_turns"`
	CoalescedTurns         int                  `json:"coalesced_turns"`
	SkippedTurns           int                  `json:"skipped_turns"`
	BackpressuredSessions  int                  `json:"backpressured_sessions"`
	FailureCount           int                  `json:"failure_count"`
}

MemoryExtractorStatusPayload reports extractor queue/runtime status.

type MemoryExtractorStatusResponse

type MemoryExtractorStatusResponse struct {
	Extractor MemoryExtractorStatusPayload `json:"extractor"`
}

MemoryExtractorStatusResponse wraps extractor queue/runtime status.

type MemoryHealthPayload

type MemoryHealthPayload struct {
	Status             string     `json:"status"`
	Reason             string     `json:"reason,omitempty"`
	Enabled            bool       `json:"enabled"`
	Configured         bool       `json:"configured"`
	GlobalDir          string     `json:"global_dir,omitempty"`
	GlobalFiles        int        `json:"global_files"`
	WorkspaceFiles     int        `json:"workspace_files"`
	WorkspaceCount     int        `json:"workspace_count"`
	DreamEnabled       bool       `json:"dream_enabled"`
	DreamAgent         string     `json:"dream_agent,omitempty"`
	DreamMinHours      float64    `json:"dream_min_hours,omitempty"`
	DreamMinSessions   int        `json:"dream_min_sessions,omitempty"`
	DreamCheckInterval string     `json:"dream_check_interval,omitempty"`
	IndexedFiles       int        `json:"indexed_files"`
	OrphanedFiles      int        `json:"orphaned_files"`
	LastReindex        *time.Time `json:"last_reindex"`
	OperationCount     int        `json:"operation_count"`
	LastOperationAt    *time.Time `json:"last_operation_at"`
	LastConsolidation  *time.Time `json:"last_consolidation"`
}

MemoryHealthPayload is the shared memory health response payload.

type MemoryHistoryResponse

type MemoryHistoryResponse struct {
	Operations []MemoryOperationPayload `json:"operations"`
}

MemoryHistoryResponse wraps the bounded memory operation history payload.

type MemoryLLMTracePayload

type MemoryLLMTracePayload struct {
	Model         string `json:"model"`
	PromptVersion string `json:"prompt_version"`
	LatencyMs     int64  `json:"latency_ms"`
	Error         string `json:"error,omitempty"`
}

MemoryLLMTracePayload is the redaction-safe public LLM tiebreaker metadata.

type MemoryListResponse

type MemoryListResponse struct {
	Memories []MemoryEntrySummaryPayload `json:"memories"`
	Page     CountedCursorPagePayload    `json:"page"`
}

MemoryListResponse wraps one counted page of Memory v2 headers.

type MemoryMutationDecisionResponse

type MemoryMutationDecisionResponse struct {
	Decision MemoryDecisionPayload `json:"decision"`
	Applied  bool                  `json:"applied"`
	DryRun   bool                  `json:"dry_run,omitempty"`
}

MemoryMutationDecisionResponse wraps a write/edit/delete controller decision.

type MemoryMutationResponse

type MemoryMutationResponse struct {
	OK bool `json:"ok"`
}

MemoryMutationResponse is the shared memory mutation response payload.

type MemoryOperationHistoryPayload

type MemoryOperationHistoryPayload struct {
	ID          string                `json:"id"`
	Operation   memcontract.Operation `json:"operation"`
	Scope       memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID string                `json:"workspace_id,omitempty"`
	AgentName   string                `json:"agent_name,omitempty"`
	AgentTier   memcontract.AgentTier `json:"agent_tier,omitempty"`
	Filename    string                `json:"filename,omitempty"`
	Summary     string                `json:"summary,omitempty"`
	Timestamp   time.Time             `json:"timestamp"`
}

MemoryOperationHistoryPayload is one redaction-safe Memory v2 operation row.

type MemoryOperationHistoryResponse

type MemoryOperationHistoryResponse struct {
	Operations []MemoryOperationHistoryPayload `json:"operations"`
}

MemoryOperationHistoryResponse wraps redaction-safe Memory v2 operation history.

type MemoryOperationPayload

type MemoryOperationPayload struct {
	ID        string    `json:"id"`
	Operation string    `json:"operation"`
	Scope     string    `json:"scope,omitempty"`
	Workspace string    `json:"workspace,omitempty"`
	Filename  string    `json:"filename,omitempty"`
	AgentName string    `json:"agent_name,omitempty"`
	Summary   string    `json:"summary,omitempty"`
	Timestamp time.Time `json:"timestamp"`
}

MemoryOperationPayload is one redacted memory operation history row.

type MemoryPromoteRequest

type MemoryPromoteRequest struct {
	Filename       string                     `json:"filename"`
	From           MemoryScopeSelectorPayload `json:"from"`
	To             MemoryScopeSelectorPayload `json:"to"`
	IdempotencyKey string                     `json:"idempotency_key,omitempty"`
	DryRun         bool                       `json:"dry_run,omitempty"`
}

MemoryPromoteRequest promotes a memory entry across scope/tier boundaries.

type MemoryPromoteResponse

type MemoryPromoteResponse struct {
	Decision MemoryDecisionPayload `json:"decision"`
	Applied  bool                  `json:"applied"`
	DryRun   bool                  `json:"dry_run,omitempty"`
}

MemoryPromoteResponse wraps the promotion controller decision.

type MemoryProviderLifecycleRequest

type MemoryProviderLifecycleRequest struct {
	Reason string `json:"reason,omitempty"`
}

MemoryProviderLifecycleRequest changes a provider lifecycle state.

type MemoryProviderLifecycleResponse

type MemoryProviderLifecycleResponse struct {
	Provider MemoryProviderPayload `json:"provider"`
	Changed  bool                  `json:"changed"`
}

MemoryProviderLifecycleResponse reports the provider lifecycle state after mutation.

type MemoryProviderListResponse

type MemoryProviderListResponse struct {
	Providers []MemoryProviderPayload `json:"providers"`
}

MemoryProviderListResponse wraps registered memory providers.

type MemoryProviderPayload

type MemoryProviderPayload struct {
	Name          string              `json:"name"`
	Status        MemoryProviderState `json:"status"`
	Active        bool                `json:"active"`
	Builtin       bool                `json:"builtin"`
	Tools         []string            `json:"tools,omitempty"`
	FailureCount  int                 `json:"failure_count"`
	CooldownUntil *time.Time          `json:"cooldown_until,omitempty"`
	LastErrorCode string              `json:"last_error_code,omitempty"`
}

MemoryProviderPayload is one redaction-safe provider registry entry.

type MemoryProviderResponse

type MemoryProviderResponse struct {
	Provider MemoryProviderPayload `json:"provider"`
}

MemoryProviderResponse wraps one memory provider.

type MemoryProviderSelectRequest

type MemoryProviderSelectRequest struct {
	Name string `json:"name"`
}

MemoryProviderSelectRequest selects the active provider by name.

type MemoryProviderState

type MemoryProviderState string

MemoryProviderState is the public lifecycle state of a memory provider.

const (
	// MemoryProviderStateActive identifies the selected provider.
	MemoryProviderStateActive MemoryProviderState = "active"
	// MemoryProviderStateStandby identifies a registered but inactive provider.
	MemoryProviderStateStandby MemoryProviderState = "standby"
	// MemoryProviderStateCoolingDown identifies a provider under retry cooldown.
	MemoryProviderStateCoolingDown MemoryProviderState = "cooling_down"
	// MemoryProviderStateFailed identifies a provider blocked by failures.
	MemoryProviderStateFailed MemoryProviderState = "failed"
)

type MemoryReadResponse

type MemoryReadResponse struct {
	Content string `json:"content"`
}

MemoryReadResponse is the shared memory read response payload.

type MemoryRecallTracePayload

type MemoryRecallTracePayload struct {
	SessionID     string                    `json:"session_id"`
	TurnSeq       int64                     `json:"turn_seq"`
	Query         memcontract.Query         `json:"query"`
	Options       memcontract.RecallOptions `json:"options"`
	Recall        memcontract.Packaged      `json:"recall"`
	ExecutedAt    time.Time                 `json:"executed_at"`
	SkippedReason string                    `json:"skipped_reason,omitempty"`
}

MemoryRecallTracePayload records one recall trace without prompt-only payload leakage.

type MemoryRecallTraceResponse

type MemoryRecallTraceResponse struct {
	Trace MemoryRecallTracePayload `json:"trace"`
}

MemoryRecallTraceResponse wraps one recall trace.

type MemoryReindexRequest

type MemoryReindexRequest struct {
	Scope     string `json:"scope,omitempty"`
	Workspace string `json:"workspace,omitempty"`
}

MemoryReindexRequest is the shared memory-catalog reindex request payload.

type MemoryReindexResponse

type MemoryReindexResponse struct {
	IndexedFiles int                   `json:"indexed_files"`
	Scope        memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID  string                `json:"workspace_id,omitempty"`
	AgentName    string                `json:"agent_name,omitempty"`
	AgentTier    memcontract.AgentTier `json:"agent_tier,omitempty"`
	CompletedAt  time.Time             `json:"completed_at"`
}

MemoryReindexResponse reports the outcome of a catalog rebuild.

type MemoryReindexV2Request

type MemoryReindexV2Request struct {
	Scope         memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID   string                `json:"workspace_id,omitempty"`
	AgentName     string                `json:"agent_name,omitempty"`
	AgentTier     memcontract.AgentTier `json:"agent_tier,omitempty"`
	IncludeSystem bool                  `json:"include_system,omitempty"`
}

MemoryReindexV2Request is the canonical catalog rebuild request.

type MemoryReloadResponse

type MemoryReloadResponse struct {
	ReloadedAt time.Time `json:"reloaded_at"`
	Generation int64     `json:"generation"`
}

MemoryReloadResponse reports frozen snapshot invalidation for future sessions.

type MemoryResetRequest

type MemoryResetRequest struct {
	Scope       memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID string                `json:"workspace_id,omitempty"`
	AgentName   string                `json:"agent_name,omitempty"`
	AgentTier   memcontract.AgentTier `json:"agent_tier,omitempty"`
	DerivedOnly bool                  `json:"derived_only"`
	Confirm     bool                  `json:"confirm"`
}

MemoryResetRequest asks the daemon to reset derived memory indexes or runtime state.

type MemoryResetResponse

type MemoryResetResponse struct {
	ResetAt      time.Time `json:"reset_at"`
	DerivedOnly  bool      `json:"derived_only"`
	DeletedRows  int       `json:"deleted_rows"`
	DeletedFiles int       `json:"deleted_files"`
}

MemoryResetResponse reports reset work completed by the daemon.

type MemoryScopeSelectorPayload

type MemoryScopeSelectorPayload struct {
	Scope       memcontract.Scope     `json:"scope"`
	WorkspaceID string                `json:"workspace_id,omitempty"`
	AgentName   string                `json:"agent_name,omitempty"`
	AgentTier   memcontract.AgentTier `json:"agent_tier,omitempty"`
}

MemoryScopeSelectorPayload identifies a concrete Memory v2 scope/tier.

type MemoryScopeShowResponse

type MemoryScopeShowResponse struct {
	Selector   MemoryScopeSelectorPayload   `json:"selector"`
	Precedence []MemoryScopeSelectorPayload `json:"precedence"`
	Roots      map[string]string            `json:"roots"`
}

MemoryScopeShowResponse reports effective scope resolution for operators and agents.

type MemorySearchRequest

type MemorySearchRequest struct {
	QueryText              string                `json:"query_text"`
	ContextHint            string                `json:"context_hint,omitempty"`
	Scope                  memcontract.Scope     `json:"scope,omitempty"`
	WorkspaceID            string                `json:"workspace_id,omitempty"`
	AgentName              string                `json:"agent_name,omitempty"`
	AgentTier              memcontract.AgentTier `json:"agent_tier,omitempty"`
	TopK                   int                   `json:"top_k,omitempty"`
	RawCandidates          int                   `json:"raw_candidates,omitempty"`
	IncludeAlreadySurfaced bool                  `json:"include_already_surfaced,omitempty"`
	IncludeSystem          bool                  `json:"include_system,omitempty"`
	AlreadySurfaced        []string              `json:"already_surfaced,omitempty"`
	Explain                bool                  `json:"explain,omitempty"`
}

MemorySearchRequest is the canonical deterministic recall/search payload.

type MemorySearchResponse

type MemorySearchResponse struct {
	Results []MemorySearchResultPayload `json:"results"`
	Recall  memcontract.Packaged        `json:"recall"`
}

MemorySearchResponse wraps deterministic recall/search output.

type MemorySearchResultPayload

type MemorySearchResultPayload struct {
	Memory       MemoryEntrySummaryPayload `json:"memory"`
	Score        float64                   `json:"score"`
	Snippet      string                    `json:"snippet,omitempty"`
	WhyRecalled  []string                  `json:"why_recalled,omitempty"`
	ShadowedBy   string                    `json:"shadowed_by,omitempty"`
	AlreadyShown bool                      `json:"already_shown,omitempty"`
}

MemorySearchResultPayload is one redaction-safe deterministic search result.

type MemorySessionLedgerEntryPayload

type MemorySessionLedgerEntryPayload struct {
	Sequence  int64          `json:"sequence"`
	EventType string         `json:"event_type"`
	EmittedAt time.Time      `json:"emitted_at"`
	Payload   map[string]any `json:"payload,omitempty"`
}

MemorySessionLedgerEntryPayload is one JSONL ledger event.

type MemorySessionLedgerMetaPayload

type MemorySessionLedgerMetaPayload struct {
	Version         int        `json:"version"`
	SessionID       string     `json:"session_id"`
	WorkspaceID     string     `json:"workspace_id,omitempty"`
	RootSessionID   string     `json:"root_session_id,omitempty"`
	ParentSessionID string     `json:"parent_session_id,omitempty"`
	SpawnDepth      int        `json:"spawn_depth"`
	Path            string     `json:"path"`
	Checksum        string     `json:"checksum"`
	CreatedAt       time.Time  `json:"created_at"`
	StoppedAt       *time.Time `json:"stopped_at,omitempty"`
}

MemorySessionLedgerMetaPayload describes one forensic session ledger projection.

type MemorySessionLedgerResponse

type MemorySessionLedgerResponse struct {
	Meta   MemorySessionLedgerMetaPayload    `json:"meta"`
	Events []MemorySessionLedgerEntryPayload `json:"events"`
}

MemorySessionLedgerResponse wraps one materialized session ledger.

type MemorySessionReplayRequest

type MemorySessionReplayRequest struct {
	IncludeToolEvents bool `json:"include_tool_events,omitempty"`
	IncludeMemory     bool `json:"include_memory,omitempty"`
}

MemorySessionReplayRequest controls deterministic replay output.

type MemorySessionReplayResponse

type MemorySessionReplayResponse struct {
	SessionID string                            `json:"session_id"`
	Events    []MemorySessionLedgerEntryPayload `json:"events"`
}

MemorySessionReplayResponse wraps replayable session ledger events.

type MemorySessionsPruneRequest

type MemorySessionsPruneRequest struct {
	OlderThanHours int  `json:"older_than_hours"`
	DryRun         bool `json:"dry_run,omitempty"`
}

MemorySessionsPruneRequest asks the daemon to prune persisted ledger/session rows.

type MemorySessionsPruneResponse

type MemorySessionsPruneResponse struct {
	PrunedSessions int  `json:"pruned_sessions"`
	PrunedEvents   int  `json:"pruned_events"`
	DryRun         bool `json:"dry_run,omitempty"`
}

MemorySessionsPruneResponse reports ledger/session prune results.

type MemorySessionsRepairResponse

type MemorySessionsRepairResponse struct {
	RepairedLedgers int       `json:"repaired_ledgers"`
	SkippedLedgers  int       `json:"skipped_ledgers"`
	CompletedAt     time.Time `json:"completed_at"`
}

MemorySessionsRepairResponse reports session ledger repair work.

type MemoryWriteRequest

type MemoryWriteRequest struct {
	Content   string `json:"content"`
	Scope     string `json:"scope,omitempty"`
	Workspace string `json:"workspace,omitempty"`
}

MemoryWriteRequest is the shared memory write request payload.

type ModelCatalogCostPayload

type ModelCatalogCostPayload struct {
	InputPerMillion      *float64 `json:"input_per_million,omitempty"`
	OutputPerMillion     *float64 `json:"output_per_million,omitempty"`
	CacheReadPerMillion  *float64 `json:"cache_read_per_million,omitempty"`
	CacheWritePerMillion *float64 `json:"cache_write_per_million,omitempty"`
	ReasoningPerMillion  *float64 `json:"reasoning_per_million,omitempty"`
}

ModelCatalogCostPayload reports normalized model price hints.

type ModelCatalogSourceRefPayload

type ModelCatalogSourceRefPayload struct {
	SourceID    string `json:"source_id"`
	SourceKind  string `json:"source_kind"`
	Priority    int    `json:"priority"`
	RefreshedAt string `json:"refreshed_at,omitempty"`
	Stale       bool   `json:"stale"`
	LastError   string `json:"last_error,omitempty"`
}

ModelCatalogSourceRefPayload identifies one source used by a merged model.

type ModelCatalogSourceStatusPayload

type ModelCatalogSourceStatusPayload struct {
	SourceID     string `json:"source_id"`
	SourceKind   string `json:"source_kind"`
	ProviderID   string `json:"provider_id"`
	Priority     int    `json:"priority"`
	LastRefresh  string `json:"last_refresh,omitempty"`
	NextRefresh  string `json:"next_refresh,omitempty"`
	LastSuccess  string `json:"last_success,omitempty"`
	LastError    string `json:"last_error,omitempty"`
	RefreshState string `json:"refresh_state"`
	RowCount     int    `json:"row_count"`
	Stale        bool   `json:"stale"`
}

ModelCatalogSourceStatusPayload reports provider-scoped catalog source health.

type NetworkBudgetUsagePayload

type NetworkBudgetUsagePayload struct {
	ParticipationStatus participation.Status `json:"participation_status"`
	WakesUsed           int                  `json:"wakes_used"`
	WallTimeUsed        string               `json:"wall_time_used"`
	InputTokensUsed     int64                `json:"input_tokens_used"`
	OutputTokensUsed    int64                `json:"output_tokens_used"`
	ExhaustedReason     string               `json:"exhausted_reason,omitempty"`
	UpdatedAt           time.Time            `json:"updated_at"`
}

NetworkBudgetUsagePayload reports durable bound consumption for one execution owner.

type NetworkCapabilityBriefPayload

type NetworkCapabilityBriefPayload struct {
	ID      string `json:"id"`
	Summary string `json:"summary"`
}

NetworkCapabilityBriefPayload is the shared brief discovery projection for one peer capability.

type NetworkCapabilityCatalogPayload

type NetworkCapabilityCatalogPayload struct {
	Capabilities []NetworkCapabilityPayload `json:"capabilities"`
}

NetworkCapabilityCatalogPayload is the shared rich discovery catalog surfaced by peer-detail APIs when explicit rich capability data is available.

type NetworkCapabilityPayload

type NetworkCapabilityPayload struct {
	ID                string   `json:"id"`
	Summary           string   `json:"summary"`
	Outcome           string   `json:"outcome"`
	Version           string   `json:"version,omitempty"`
	Digest            string   `json:"digest,omitempty"`
	ContextNeeded     []string `json:"context_needed,omitempty"`
	ArtifactsExpected []string `json:"artifacts_expected,omitempty"`
	ExecutionOutline  []string `json:"execution_outline,omitempty"`
	Constraints       []string `json:"constraints,omitempty"`
	Examples          []string `json:"examples,omitempty"`
	Requirements      []string `json:"requirements,omitempty"`
}

NetworkCapabilityPayload is the shared rich capability payload surfaced by daemon APIs.

type NetworkChannelDetailPayload

type NetworkChannelDetailPayload struct {
	Channel                    string                           `json:"channel"`
	WorkspaceID                string                           `json:"workspace_id,omitempty"`
	Purpose                    string                           `json:"purpose,omitempty"`
	FanoutPolicy               string                           `json:"fanout_policy,omitempty"`
	CoordinatorPeerID          string                           `json:"coordinator_peer_id,omitempty"`
	CreatedBy                  string                           `json:"created_by,omitempty"`
	CreatedAt                  *time.Time                       `json:"created_at,omitempty"`
	PeerCount                  int                              `json:"peer_count"`
	LocalPeerCount             int                              `json:"local_peer_count,omitempty"`
	SessionCount               int                              `json:"session_count,omitempty"`
	MessageCount               int                              `json:"message_count,omitempty"`
	PresenceCount              int                              `json:"presence_count,omitempty"`
	HistoricalParticipantCount int                              `json:"historical_participant_count,omitempty"`
	LastActivityAt             *time.Time                       `json:"last_activity_at,omitempty"`
	LastPresenceAt             *time.Time                       `json:"last_presence_at,omitempty"`
	LastMessagePreview         string                           `json:"last_message_preview,omitempty"`
	KindCounts                 []NetworkChannelKindCountPayload `json:"kind_counts,omitempty"`
	Sessions                   []SessionPayload                 `json:"sessions,omitempty"`
	Peers                      []NetworkPeerPayload             `json:"peers,omitempty"`
}

NetworkChannelDetailPayload is the shared channel detail payload used by the network UI.

type NetworkChannelKindCountPayload

type NetworkChannelKindCountPayload struct {
	Kind  string `json:"kind"`
	Count int    `json:"count"`
}

NetworkChannelKindCountPayload reports one channel-level kind count.

type NetworkChannelMessagesResponse

type NetworkChannelMessagesResponse struct {
	Messages []NetworkConversationMessagePayload `json:"messages"`
	Page     CursorPagePayload                   `json:"page"`
}

NetworkChannelMessagesResponse wraps one cursor page of channel messages.

type NetworkChannelPayload

type NetworkChannelPayload struct {
	Channel                    string     `json:"channel"`
	WorkspaceID                string     `json:"workspace_id,omitempty"`
	Purpose                    string     `json:"purpose,omitempty"`
	FanoutPolicy               string     `json:"fanout_policy,omitempty"`
	CoordinatorPeerID          string     `json:"coordinator_peer_id,omitempty"`
	CreatedBy                  string     `json:"created_by,omitempty"`
	CreatedAt                  *time.Time `json:"created_at,omitempty"`
	PeerCount                  int        `json:"peer_count"`
	LocalPeerCount             int        `json:"local_peer_count,omitempty"`
	SessionCount               int        `json:"session_count,omitempty"`
	MessageCount               int        `json:"message_count,omitempty"`
	PresenceCount              int        `json:"presence_count,omitempty"`
	HistoricalParticipantCount int        `json:"historical_participant_count,omitempty"`
	LastActivityAt             *time.Time `json:"last_activity_at,omitempty"`
	LastPresenceAt             *time.Time `json:"last_presence_at,omitempty"`
	LastMessagePreview         string     `json:"last_message_preview,omitempty"`
}

NetworkChannelPayload is the shared JSON representation of one active channel.

type NetworkChannelResponse

type NetworkChannelResponse struct {
	Channel NetworkChannelDetailPayload `json:"channel"`
}

NetworkChannelResponse wraps one channel detail payload.

type NetworkChannelsResponse

type NetworkChannelsResponse struct {
	Channels []NetworkChannelPayload `json:"channels"`
	Recents  []NetworkRecentPayload  `json:"recents,omitempty"`
}

NetworkChannelsResponse wraps channels and bounded cross-channel recents.

type NetworkConversationMessagePayload

type NetworkConversationMessagePayload struct {
	MessageID   string          `json:"message_id"`
	WorkspaceID string          `json:"workspace_id,omitempty"`
	Channel     string          `json:"channel"`
	Surface     string          `json:"surface,omitempty"`
	ThreadID    string          `json:"thread_id,omitempty"`
	DirectID    string          `json:"direct_id,omitempty"`
	Kind        string          `json:"kind"`
	Direction   string          `json:"direction"`
	PeerFrom    string          `json:"peer_from"`
	PeerTo      string          `json:"peer_to,omitempty"`
	Mentions    []string        `json:"mentions,omitempty"`
	DisplayName string          `json:"display_name,omitempty"`
	SessionID   string          `json:"session_id,omitempty"`
	Local       bool            `json:"local,omitempty"`
	WorkID      string          `json:"work_id,omitempty"`
	ReplyTo     string          `json:"reply_to,omitempty"`
	TraceID     string          `json:"trace_id,omitempty"`
	CausationID string          `json:"causation_id,omitempty"`
	Intent      string          `json:"intent,omitempty"`
	Text        string          `json:"text,omitempty"`
	PreviewText string          `json:"preview_text,omitempty"`
	SizeBytes   int64           `json:"size_bytes,omitempty"`
	Body        json.RawMessage `json:"body"`
	Timestamp   time.Time       `json:"timestamp"`
}

NetworkConversationMessagePayload is the shared network conversation timeline payload.

type NetworkCoordinationCostPayload

type NetworkCoordinationCostPayload struct {
	DeliveredCount        int64 `json:"delivered_count,omitempty"`
	PromptSizeBytes       int64 `json:"prompt_size_bytes,omitempty"`
	EstimatedPromptTokens int64 `json:"estimated_prompt_tokens,omitempty"`
}

NetworkCoordinationCostPayload reports aggregate prompt delivery cost for one public thread.

type NetworkCoordinationEligibilityPayload

type NetworkCoordinationEligibilityPayload struct {
	Eligible    bool   `json:"eligible"`
	Reason      string `json:"reason"`
	RunID       string `json:"run_id,omitempty"`
	Coordinator bool   `json:"coordinator"`
	WorkerCount int    `json:"worker_count"`
}

NetworkCoordinationEligibilityPayload is daemon-owned invitation eligibility truth.

type NetworkCoordinationInvitationPayload

type NetworkCoordinationInvitationPayload struct {
	Scope       string     `json:"scope"`
	TaskID      string     `json:"task_id,omitempty"`
	Dismissed   bool       `json:"dismissed"`
	DismissedAt *time.Time `json:"dismissed_at,omitempty"`
	DismissedBy string     `json:"dismissed_by,omitempty"`
}

NetworkCoordinationInvitationPayload is the daemon-persisted dismissal state for one scope.

type NetworkCoordinationPayload

type NetworkCoordinationPayload struct {
	WorkspaceID string                                `json:"workspace_id"`
	Scope       string                                `json:"scope"`
	TaskID      string                                `json:"task_id,omitempty"`
	Enabled     bool                                  `json:"enabled"`
	Revision    int64                                 `json:"revision"`
	UpdatedAt   *time.Time                            `json:"updated_at,omitempty"`
	UpdatedBy   string                                `json:"updated_by,omitempty"`
	Invitation  *NetworkCoordinationInvitationPayload `json:"invitation,omitempty"`
	Eligibility NetworkCoordinationEligibilityPayload `json:"eligibility"`
}

NetworkCoordinationPayload is the workspace coordination setting plus invitation state.

type NetworkCoordinationResponse

type NetworkCoordinationResponse struct {
	Coordination NetworkCoordinationPayload `json:"coordination"`
}

NetworkCoordinationResponse wraps one coordination payload.

type NetworkDirectResolveRequest

type NetworkDirectResolveRequest struct {
	SessionID string `json:"session_id"`
	PeerID    string `json:"peer_id"`
}

NetworkDirectResolveRequest requests creation or lookup of a direct room.

type NetworkDirectRoomMessagesResponse

type NetworkDirectRoomMessagesResponse struct {
	Messages []NetworkConversationMessagePayload `json:"messages"`
	Page     CursorPagePayload                   `json:"page"`
}

NetworkDirectRoomMessagesResponse wraps one cursor page of direct-room messages.

type NetworkDirectRoomPayload

type NetworkDirectRoomPayload struct {
	WorkspaceID        string     `json:"workspace_id,omitempty"`
	Channel            string     `json:"channel"`
	DirectID           string     `json:"direct_id"`
	SessionA           string     `json:"session_a"`
	SessionB           string     `json:"session_b"`
	OpenedAt           *time.Time `json:"opened_at,omitempty"`
	LastActivityAt     *time.Time `json:"last_activity_at,omitempty"`
	MessageCount       int        `json:"message_count"`
	OpenWorkCount      int        `json:"open_work_count"`
	LastMessagePreview string     `json:"last_message_preview,omitempty"`
}

NetworkDirectRoomPayload is the direct-room list/detail projection.

type NetworkDirectRoomResponse

type NetworkDirectRoomResponse struct {
	Direct NetworkDirectRoomPayload `json:"direct"`
}

NetworkDirectRoomResponse wraps one direct-room summary.

type NetworkDirectRoomsResponse

type NetworkDirectRoomsResponse struct {
	Directs []NetworkDirectRoomPayload `json:"directs"`
	Page    CountedCursorPagePayload   `json:"page"`
}

NetworkDirectRoomsResponse wraps one cursor page of direct-room summaries.

type NetworkEnvelopePayload

type NetworkEnvelopePayload struct {
	Protocol    string                     `json:"protocol"`
	ID          string                     `json:"id"`
	Kind        string                     `json:"kind"`
	WorkspaceID string                     `json:"workspace_id,omitempty"`
	Channel     string                     `json:"channel"`
	Surface     *string                    `json:"surface,omitempty"`
	ThreadID    *string                    `json:"thread_id,omitempty"`
	DirectID    *string                    `json:"direct_id,omitempty"`
	From        string                     `json:"from"`
	To          *string                    `json:"to,omitempty"`
	Mentions    []string                   `json:"mentions,omitempty"`
	WorkID      *string                    `json:"work_id,omitempty"`
	ReplyTo     *string                    `json:"reply_to,omitempty"`
	TraceID     *string                    `json:"trace_id,omitempty"`
	CausationID *string                    `json:"causation_id,omitempty"`
	TS          int64                      `json:"ts"`
	ExpiresAt   *int64                     `json:"expires_at,omitempty"`
	Body        json.RawMessage            `json:"body"`
	Proof       map[string]json.RawMessage `json:"proof,omitempty"`
	Ext         map[string]json.RawMessage `json:"ext,omitempty"`
}

NetworkEnvelopePayload is the shared JSON representation of one surfaced network envelope used by inbox and audit-facing views.

type NetworkInboxResponse

type NetworkInboxResponse struct {
	Messages []NetworkEnvelopePayload `json:"messages"`
}

NetworkInboxResponse wraps the queued inbox payload.

type NetworkKindMetricPayload

type NetworkKindMetricPayload struct {
	Kind      string `json:"kind"`
	Sent      int64  `json:"sent"`
	Received  int64  `json:"received"`
	Rejected  int64  `json:"rejected"`
	Delivered int64  `json:"delivered"`
}

NetworkKindMetricPayload is the per-kind network runtime metric snapshot.

type NetworkPeerCardPayload

type NetworkPeerCardPayload struct {
	PeerID              string                          `json:"peer_id"`
	DisplayName         *string                         `json:"display_name,omitempty"`
	ProfilesSupported   []string                        `json:"profiles_supported"`
	Capabilities        []NetworkCapabilityBriefPayload `json:"capabilities"`
	ArtifactsSupported  []string                        `json:"artifacts_supported"`
	TrustModesSupported []string                        `json:"trust_modes_supported"`
	Ext                 map[string]json.RawMessage      `json:"ext,omitempty"`
}

NetworkPeerCardPayload is the shared JSON representation of one peer card.

type NetworkPeerDetailPayload

type NetworkPeerDetailPayload struct {
	SessionID         *string                          `json:"session_id,omitempty"`
	PeerID            string                           `json:"peer_id"`
	DisplayName       string                           `json:"display_name,omitempty"`
	Channel           string                           `json:"channel,omitempty"`
	Local             bool                             `json:"local,omitempty"`
	PeerCard          NetworkPeerCardPayload           `json:"peer_card"`
	CapabilityCatalog *NetworkCapabilityCatalogPayload `json:"capability_catalog,omitempty"`
	JoinedAt          *time.Time                       `json:"joined_at,omitempty"`
	PresenceState     string                           `json:"presence_state"`
	Metrics           NetworkPeerMetricsPayload        `json:"metrics"`
}

NetworkPeerDetailPayload is the shared selected-peer detail payload.

type NetworkPeerMessagesResponse

type NetworkPeerMessagesResponse struct {
	Messages []NetworkConversationMessagePayload `json:"messages"`
	Page     CursorPagePayload                   `json:"page"`
}

NetworkPeerMessagesResponse wraps one cursor page of peer-room messages.

type NetworkPeerMetricsPayload

type NetworkPeerMetricsPayload struct {
	Sent               int64 `json:"sent,omitempty"`
	Received           int64 `json:"received,omitempty"`
	Rejected           int64 `json:"rejected,omitempty"`
	Delivered          int64 `json:"delivered,omitempty"`
	SentSizeBytes      int64 `json:"sent_size_bytes,omitempty"`
	ReceivedSizeBytes  int64 `json:"received_size_bytes,omitempty"`
	RejectedSizeBytes  int64 `json:"rejected_size_bytes,omitempty"`
	DeliveredSizeBytes int64 `json:"delivered_size_bytes,omitempty"`
	TotalSizeBytes     int64 `json:"total_size_bytes,omitempty"`
}

NetworkPeerMetricsPayload is the shared peer-level counter payload.

type NetworkPeerPayload

type NetworkPeerPayload struct {
	WorkspaceID   string                 `json:"workspace_id,omitempty"`
	SessionID     *string                `json:"session_id,omitempty"`
	PeerID        string                 `json:"peer_id"`
	DisplayName   string                 `json:"display_name,omitempty"`
	Channel       string                 `json:"channel"`
	Local         bool                   `json:"local"`
	PeerCard      NetworkPeerCardPayload `json:"peer_card"`
	JoinedAt      *time.Time             `json:"joined_at,omitempty"`
	PresenceState string                 `json:"presence_state"`
}

NetworkPeerPayload is the shared JSON representation of one visible peer.

type NetworkPeerResponse

type NetworkPeerResponse struct {
	Peer NetworkPeerDetailPayload `json:"peer"`
}

NetworkPeerResponse wraps one selected peer detail payload.

type NetworkPeersResponse

type NetworkPeersResponse struct {
	Peers []NetworkPeerPayload `json:"peers"`
}

NetworkPeersResponse wraps the visible peer list payload.

type NetworkRecentPayload

type NetworkRecentPayload struct {
	Channel            string     `json:"channel"`
	Surface            string     `json:"surface"`
	ContainerID        string     `json:"container_id"`
	LastActivityAt     *time.Time `json:"last_activity_at,omitempty"`
	LastMessagePreview string     `json:"last_message_preview,omitempty"`
	Title              string     `json:"title,omitempty"`
	ParticipantCount   int        `json:"participant_count,omitempty"`
	SessionA           string     `json:"session_a,omitempty"`
	SessionB           string     `json:"session_b,omitempty"`
}

NetworkRecentPayload is one cross-channel recent thread/direct projection.

type NetworkSendPayload

type NetworkSendPayload struct {
	ID          string                     `json:"id"`
	WorkspaceID string                     `json:"workspace_id,omitempty"`
	SessionID   string                     `json:"session_id"`
	Channel     string                     `json:"channel"`
	Surface     string                     `json:"surface,omitempty"`
	ThreadID    string                     `json:"thread_id,omitempty"`
	DirectID    string                     `json:"direct_id,omitempty"`
	Kind        string                     `json:"kind"`
	To          string                     `json:"to,omitempty"`
	Mentions    []string                   `json:"mentions,omitempty"`
	WorkID      string                     `json:"work_id,omitempty"`
	ReplyTo     string                     `json:"reply_to,omitempty"`
	TraceID     string                     `json:"trace_id,omitempty"`
	CausationID string                     `json:"causation_id,omitempty"`
	ExpiresAt   *int64                     `json:"expires_at,omitempty"`
	Ext         map[string]json.RawMessage `json:"ext,omitempty"`
}

NetworkSendPayload is the shared daemon network send response payload.

type NetworkSendRequest

type NetworkSendRequest struct {
	WorkspaceID string                     `json:"workspace_id,omitempty"`
	SessionID   string                     `json:"session_id"`
	Channel     string                     `json:"channel"`
	Surface     string                     `json:"surface,omitempty"`
	ThreadID    string                     `json:"thread_id,omitempty"`
	DirectID    string                     `json:"direct_id,omitempty"`
	Kind        string                     `json:"kind"`
	To          string                     `json:"to,omitempty"`
	Mentions    []string                   `json:"mentions,omitempty"`
	Body        json.RawMessage            `json:"body"`
	WorkID      string                     `json:"work_id,omitempty"`
	ReplyTo     string                     `json:"reply_to,omitempty"`
	TraceID     string                     `json:"trace_id,omitempty"`
	CausationID string                     `json:"causation_id,omitempty"`
	ExpiresAt   *int64                     `json:"expires_at,omitempty"`
	ID          string                     `json:"id,omitempty"`
	Ext         map[string]json.RawMessage `json:"ext,omitempty"`
}

NetworkSendRequest is the shared daemon network send request payload.

func (*NetworkSendRequest) UnmarshalJSON

func (r *NetworkSendRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON rejects obsolete fields and caller-supplied envelope identity.

type NetworkSendResponse

type NetworkSendResponse struct {
	Message NetworkSendPayload `json:"message"`
}

NetworkSendResponse wraps the outbound send result payload.

type NetworkStatusPayload

type NetworkStatusPayload struct {
	Enabled              bool                       `json:"enabled"`
	Status               string                     `json:"status"`
	LocalPeers           int                        `json:"local_peers"`
	Channels             int                        `json:"channels"`
	MessagesSent         int64                      `json:"messages_sent"`
	MessagesReceived     int64                      `json:"messages_received"`
	MessagesRejected     int64                      `json:"messages_rejected"`
	MessagesDelivered    int64                      `json:"messages_delivered"`
	WorkflowTaggedEvents int64                      `json:"workflow_tagged_events"`
	HandoffTaggedEvents  int64                      `json:"handoff_tagged_events"`
	OpenThreads          int64                      `json:"open_threads"`
	OpenDirectRooms      int64                      `json:"open_direct_rooms"`
	OpenWorkItems        int64                      `json:"open_work_items"`
	ConversationMessages int64                      `json:"conversation_messages"`
	WorkTransitions      int64                      `json:"work_transitions"`
	DirectResolves       int64                      `json:"direct_resolves"`
	KindMetrics          []NetworkKindMetricPayload `json:"kind_metrics"`
}

NetworkStatusPayload is the shared network diagnostics response payload.

type NetworkStatusResponse

type NetworkStatusResponse struct {
	Network NetworkStatusPayload `json:"network"`
}

NetworkStatusResponse wraps the network runtime status payload.

type NetworkSubscriptionPayload

type NetworkSubscriptionPayload struct {
	WorkspaceID string     `json:"workspace_id,omitempty"`
	Channel     string     `json:"channel"`
	ThreadID    string     `json:"thread_id,omitempty"`
	SessionID   string     `json:"session_id"`
	Mode        string     `json:"mode"`
	CreatedAt   *time.Time `json:"created_at,omitempty"`
	UpdatedAt   *time.Time `json:"updated_at,omitempty"`
}

NetworkSubscriptionPayload exposes one session delivery preference.

type NetworkSubscriptionRequest

type NetworkSubscriptionRequest struct {
	ThreadID  string `json:"thread_id,omitempty"`
	SessionID string `json:"session_id"`
	Mode      string `json:"mode"`
}

NetworkSubscriptionRequest captures one session delivery preference mutation.

type NetworkSubscriptionResponse

type NetworkSubscriptionResponse struct {
	Subscription NetworkSubscriptionPayload `json:"subscription"`
}

NetworkSubscriptionResponse wraps one subscription preference.

type NetworkSubscriptionsResponse

type NetworkSubscriptionsResponse struct {
	Subscriptions []NetworkSubscriptionPayload `json:"subscriptions"`
}

NetworkSubscriptionsResponse wraps channel/thread subscription preferences.

type NetworkTaskThreadOriginPayload

type NetworkTaskThreadOriginPayload struct {
	TaskID           string     `json:"task_id"`
	WorkspaceID      string     `json:"workspace_id,omitempty"`
	Channel          string     `json:"channel"`
	ThreadID         string     `json:"thread_id"`
	OriginMessageID  string     `json:"origin_message_id"`
	Digest           string     `json:"digest"`
	SourceMessageIDs []string   `json:"source_message_ids,omitempty"`
	CreatedAt        *time.Time `json:"created_at,omitempty"`
	UpdatedAt        *time.Time `json:"updated_at,omitempty"`
}

NetworkTaskThreadOriginPayload links a task back to a source thread.

type NetworkThreadMessagesResponse

type NetworkThreadMessagesResponse struct {
	Messages []NetworkConversationMessagePayload `json:"messages"`
	Page     CursorPagePayload                   `json:"page"`
}

NetworkThreadMessagesResponse wraps one cursor page of public-thread messages.

type NetworkThreadResponse

type NetworkThreadResponse struct {
	Thread       NetworkThreadSummaryPayload       `json:"thread"`
	SessionCosts []NetworkThreadSessionCostPayload `json:"session_costs,omitempty"`
	TaskLinks    []NetworkTaskThreadOriginPayload  `json:"task_links,omitempty"`
}

NetworkThreadResponse wraps one public-thread summary.

type NetworkThreadSessionCostPayload

type NetworkThreadSessionCostPayload struct {
	SessionID             string     `json:"session_id"`
	DeliveredCount        int64      `json:"delivered_count,omitempty"`
	PromptSizeBytes       int64      `json:"prompt_size_bytes,omitempty"`
	EstimatedPromptTokens int64      `json:"estimated_prompt_tokens,omitempty"`
	FirstDeliveredAt      *time.Time `json:"first_delivered_at,omitempty"`
	LastDeliveredAt       *time.Time `json:"last_delivered_at,omitempty"`
}

NetworkThreadSessionCostPayload reports prompt delivery cost for one session in a public thread.

type NetworkThreadSummaryPayload

type NetworkThreadSummaryPayload struct {
	WorkspaceID        string                          `json:"workspace_id,omitempty"`
	Channel            string                          `json:"channel"`
	ThreadID           string                          `json:"thread_id"`
	RootMessageID      string                          `json:"root_message_id"`
	Title              string                          `json:"title,omitempty"`
	OpenedByPeerID     string                          `json:"opened_by_peer_id,omitempty"`
	OpenedSessionID    string                          `json:"opened_session_id,omitempty"`
	OpenedAt           *time.Time                      `json:"opened_at,omitempty"`
	LastActivityAt     *time.Time                      `json:"last_activity_at,omitempty"`
	MessageCount       int                             `json:"message_count"`
	ParticipantCount   int                             `json:"participant_count"`
	OpenWorkCount      int                             `json:"open_work_count"`
	CoordinationCost   *NetworkCoordinationCostPayload `json:"coordination_cost,omitempty"`
	LastMessagePreview string                          `json:"last_message_preview,omitempty"`
}

NetworkThreadSummaryPayload is the public-thread list/detail projection.

type NetworkThreadsResponse

type NetworkThreadsResponse struct {
	Threads []NetworkThreadSummaryPayload `json:"threads"`
	Page    CountedCursorPagePayload      `json:"page"`
}

NetworkThreadsResponse wraps one cursor page of public-thread summaries.

type NetworkUsageDetailPayload

type NetworkUsageDetailPayload struct {
	WakeID              string               `json:"wake_id"`
	TaskRunID           string               `json:"task_run_id"`
	ParticipationStatus participation.Status `json:"participation_status"`
	WorkspaceID         string               `json:"workspace_id"`
	Channel             string               `json:"channel"`
	RootID              string               `json:"root_id"`
	Depth               int                  `json:"depth"`
	State               string               `json:"state"`
	UsageState          string               `json:"usage_state"`
	ChargedWallTime     string               `json:"charged_wall_time"`
	InputTokens         int64                `json:"input_tokens"`
	OutputTokens        int64                `json:"output_tokens"`
	ReservedAt          time.Time            `json:"reserved_at"`
	SettledAt           *time.Time           `json:"settled_at,omitempty"`
	Reason              string               `json:"reason,omitempty"`
}

NetworkUsageDetailPayload is one wake's charged usage truth.

type NetworkUsageResponse

type NetworkUsageResponse struct {
	WorkspaceID string                      `json:"workspace_id"`
	Details     []NetworkUsageDetailPayload `json:"details"`
	Total       NetworkUsageSummaryPayload  `json:"total"`
	Budget      *NetworkBudgetUsagePayload  `json:"budget,omitempty"`
	NextCursor  string                      `json:"next_cursor,omitempty"`
}

NetworkUsageResponse is the workspace-scoped usage meter.

type NetworkUsageSummaryPayload

type NetworkUsageSummaryPayload struct {
	WakeCount            int    `json:"wake_count"`
	ReservedWakeCount    int    `json:"reserved_wake_count"`
	ActualWakeCount      int    `json:"actual_wake_count"`
	UnavailableWakeCount int    `json:"unavailable_wake_count"`
	ChargedWallTime      string `json:"charged_wall_time"`
	InputTokens          int64  `json:"input_tokens"`
	OutputTokens         int64  `json:"output_tokens"`
}

NetworkUsageSummaryPayload aggregates the complete filtered ledger scope.

type NetworkWorkPayload

type NetworkWorkPayload struct {
	WorkID          string     `json:"work_id"`
	WorkspaceID     string     `json:"workspace_id,omitempty"`
	Channel         string     `json:"channel"`
	Surface         string     `json:"surface"`
	ThreadID        string     `json:"thread_id,omitempty"`
	DirectID        string     `json:"direct_id,omitempty"`
	OpenedSessionID string     `json:"opened_session_id,omitempty"`
	TargetSessionID string     `json:"target_session_id,omitempty"`
	State           string     `json:"state"`
	OpenedAt        *time.Time `json:"opened_at,omitempty"`
	LastActivityAt  *time.Time `json:"last_activity_at,omitempty"`
	TerminalAt      *time.Time `json:"terminal_at,omitempty"`
}

NetworkWorkPayload is the public network work lookup projection.

type NetworkWorkResponse

type NetworkWorkResponse struct {
	Work NetworkWorkPayload `json:"work"`
}

NetworkWorkResponse wraps one network work lookup.

type NotificationPresetListResponse

type NotificationPresetListResponse struct {
	Presets     []NotificationPresetPayload `json:"presets"`
	Total       int                         `json:"total"`
	GeneratedAt time.Time                   `json:"generated_at"`
}

NotificationPresetListResponse wraps a preset list response.

type NotificationPresetPayload

type NotificationPresetPayload struct {
	Name                   string                      `json:"name"`
	Events                 []string                    `json:"events"`
	Targets                []NotificationTargetPayload `json:"targets"`
	Filter                 string                      `json:"filter,omitempty"`
	Enabled                bool                        `json:"enabled"`
	BuiltIn                bool                        `json:"built_in"`
	DefaultVersion         string                      `json:"default_version,omitempty"`
	DefaultHash            string                      `json:"default_hash,omitempty"`
	UserModified           bool                        `json:"user_modified"`
	DefaultUpdateAvailable bool                        `json:"default_update_available"`
	CreatedAt              time.Time                   `json:"created_at"`
	UpdatedAt              time.Time                   `json:"updated_at"`
}

NotificationPresetPayload is the shared HTTP/UDS notification preset shape.

func NotificationPresetPayloadFromDomain

func NotificationPresetPayloadFromDomain(preset presetspkg.Preset) NotificationPresetPayload

NotificationPresetPayloadFromDomain converts a preset into a transport payload.

type NotificationPresetResponse

type NotificationPresetResponse struct {
	Preset NotificationPresetPayload `json:"preset"`
}

NotificationPresetResponse wraps one preset response.

type NotificationTargetPayload

type NotificationTargetPayload struct {
	BridgeID       string `json:"bridge_id"`
	CanonicalRoute string `json:"canonical_route,omitempty"`
	DisplayName    string `json:"display_name,omitempty"`
	DeliveryMode   string `json:"delivery_mode,omitempty"`
}

NotificationTargetPayload identifies one preset delivery target.

type ObserveFailureHealthPayload

type ObserveFailureHealthPayload struct {
	Status string                        `json:"status"`
	Total  int                           `json:"total"`
	ByKind map[store.FailureKind]int     `json:"by_kind,omitempty"`
	Recent []SessionFailureHealthPayload `json:"recent,omitempty"`
}

ObserveFailureHealthPayload summarizes persisted lifecycle failures.

type ObserveHealthPayload

type ObserveHealthPayload struct {
	Status             string                          `json:"status"`
	UptimeSeconds      int64                           `json:"uptime_seconds"`
	ActiveSessions     int                             `json:"active_sessions"`
	ActiveAgents       int                             `json:"active_agents"`
	GlobalDBSizeBytes  int64                           `json:"global_db_size_bytes"`
	SessionDBSizeBytes int64                           `json:"session_db_size_bytes"`
	Persistence        ObservePersistenceHealthPayload `json:"persistence"`
	Retention          ObserveRetentionHealthPayload   `json:"retention"`
	Failures           ObserveFailureHealthPayload     `json:"failures"`
	AgentProbes        []AgentProbeHealthPayload       `json:"agent_probes,omitempty"`
	Bridges            BridgeAggregateHealthPayload    `json:"bridges"`
	Activities         []SessionActivityHealthPayload  `json:"activities,omitempty"`
	Version            string                          `json:"version"`
}

ObserveHealthPayload is the shared observability health response payload.

type ObserveOverviewPayload

type ObserveOverviewPayload struct {
	SchemaVersion string                        `json:"schema_version"`
	GeneratedAt   time.Time                     `json:"generated_at"`
	Attention     OverviewAttentionPayload      `json:"attention"`
	Today         OverviewTodayPayload          `json:"today"`
	Outcomes      OverviewOutcomesPayload       `json:"outcomes"`
	Usage         OverviewUsagePayload          `json:"usage"`
	Pulse         OverviewPulsePayload          `json:"pulse"`
	Network       OverviewNetworkPayload        `json:"network"`
	System        OverviewSystemPayload         `json:"system"`
	Freshness     TaskDashboardFreshnessPayload `json:"freshness"`
}

ObserveOverviewPayload is the home overview read model (global by default; optional workspace scope).

type ObserveOverviewResponse

type ObserveOverviewResponse struct {
	Overview ObserveOverviewPayload `json:"overview"`
}

ObserveOverviewResponse wraps the shared home overview payload.

type ObservePersistenceHealthPayload

type ObservePersistenceHealthPayload struct {
	Status             string `json:"status"`
	GlobalDBSizeBytes  int64  `json:"global_db_size_bytes"`
	SessionDBSizeBytes int64  `json:"session_db_size_bytes"`
}

ObservePersistenceHealthPayload captures store health fields shared by lifecycle, memory, and operator diagnostics.

type ObserveRetentionHealthPayload

type ObserveRetentionHealthPayload struct {
	Enabled                  bool       `json:"enabled"`
	RetentionDays            int        `json:"retention_days"`
	SweepIntervalSeconds     int64      `json:"sweep_interval_seconds"`
	LastSweepStatus          string     `json:"last_sweep_status"`
	LastSweepAt              *time.Time `json:"last_sweep_at,omitempty"`
	LastCutoffAt             *time.Time `json:"last_cutoff_at,omitempty"`
	LastSweepError           string     `json:"last_sweep_error,omitempty"`
	DeletedEventSummaries    int64      `json:"deleted_event_summaries"`
	DeletedTokenStats        int64      `json:"deleted_token_stats"`
	DeletedTokenUsageDaily   int64      `json:"deleted_token_usage_daily"`
	DeletedPermissionLogRows int64      `json:"deleted_permission_log_rows"`
}

ObserveRetentionHealthPayload captures the observable state of configured retention sweeps.

type OnboardingStatusPayload

type OnboardingStatusPayload struct {
	Completed   bool   `json:"completed"`
	CompletedAt string `json:"completed_at,omitempty"`
}

OnboardingStatusPayload describes the global first-run onboarding completion state.

type OnboardingStatusResponse

type OnboardingStatusResponse struct {
	Onboarding OnboardingStatusPayload `json:"onboarding"`
}

OnboardingStatusResponse wraps the onboarding completion state.

type OpenAIErrorPayload

type OpenAIErrorPayload struct {
	Message string  `json:"message"`
	Type    string  `json:"type"`
	Param   *string `json:"param"`
	Code    string  `json:"code"`
}

OpenAIErrorPayload carries OpenAI-style error details.

type OpenAIErrorResponse

type OpenAIErrorResponse struct {
	Error OpenAIErrorPayload `json:"error"`
}

OpenAIErrorResponse is the OpenAI-compatible error envelope.

type OpenAIModelCompozyPayload

type OpenAIModelCompozyPayload struct {
	ProviderID             string                   `json:"provider_id"`
	ModelID                string                   `json:"model_id"`
	DisplayName            string                   `json:"display_name,omitempty"`
	Sources                []string                 `json:"sources"`
	Available              *bool                    `json:"available"`
	AvailabilityState      string                   `json:"availability_state"`
	Stale                  bool                     `json:"stale"`
	RefreshedAt            string                   `json:"refreshed_at,omitempty"`
	ContextWindow          *int64                   `json:"context_window,omitempty"`
	MaxInputTokens         *int64                   `json:"max_input_tokens,omitempty"`
	MaxOutputTokens        *int64                   `json:"max_output_tokens,omitempty"`
	SupportsTools          *bool                    `json:"supports_tools,omitempty"`
	SupportsReasoning      *bool                    `json:"supports_reasoning,omitempty"`
	ReasoningEfforts       []ReasoningEffort        `json:"reasoning_efforts,omitempty"`
	DefaultReasoningEffort *ReasoningEffort         `json:"default_reasoning_effort,omitempty"`
	Cost                   *ModelCatalogCostPayload `json:"cost,omitempty"`
	LastError              string                   `json:"last_error,omitempty"`
}

OpenAIModelCompozyPayload carries Compozy-specific model metadata under the `compozy` key.

type OpenAIModelListResponse

type OpenAIModelListResponse struct {
	Object string               `json:"object"`
	Data   []OpenAIModelPayload `json:"data"`
}

OpenAIModelListResponse is the OpenAI-compatible model list projection.

type OpenAIModelPayload

type OpenAIModelPayload struct {
	ID      string                    `json:"id"`
	Object  string                    `json:"object"`
	Created int64                     `json:"created"`
	OwnedBy string                    `json:"owned_by"`
	Compozy OpenAIModelCompozyPayload `json:"compozy"`
}

OpenAIModelPayload is one OpenAI-compatible model object with Compozy metadata.

type OverviewAgentSharePayload

type OverviewAgentSharePayload struct {
	AgentName string  `json:"agent_name"`
	Tokens    int64   `json:"tokens"`
	Fraction  float64 `json:"fraction"`
}

OverviewAgentSharePayload is one agent's fraction of window token usage.

type OverviewAttentionItemPayload

type OverviewAttentionItemPayload struct {
	Kind       string    `json:"kind"`
	Title      string    `json:"title"`
	Detail     string    `json:"detail,omitempty"`
	TaskID     string    `json:"task_id,omitempty"`
	RunID      string    `json:"run_id,omitempty"`
	SessionID  string    `json:"session_id,omitempty"`
	OccurredAt time.Time `json:"occurred_at"`
	Actions    []string  `json:"actions"`
}

OverviewAttentionItemPayload is one actionable attention row.

type OverviewAttentionPayload

type OverviewAttentionPayload struct {
	Total  int                            `json:"total"`
	ByKind map[string]int                 `json:"by_kind"`
	Items  []OverviewAttentionItemPayload `json:"items"`
}

OverviewAttentionPayload lists everything currently waiting on the user.

type OverviewLongestSessionPayload

type OverviewLongestSessionPayload struct {
	SessionID       string `json:"session_id"`
	AgentName       string `json:"agent_name"`
	DurationSeconds int64  `json:"duration_seconds"`
	Date            string `json:"date"`
}

OverviewLongestSessionPayload is the longest user session inside the pulse window.

type OverviewNetworkPayload

type OverviewNetworkPayload struct {
	MessagesToday int `json:"messages_today"`
}

OverviewNetworkPayload carries today-windowed network counters.

type OverviewOutcomeDayPayload

type OverviewOutcomeDayPayload struct {
	Date      string `json:"date"`
	Completed int    `json:"completed"`
	Failed    int    `json:"failed"`
	Canceled  int    `json:"canceled"`
}

OverviewOutcomeDayPayload is one daemon-local day of run outcomes.

type OverviewOutcomesPayload

type OverviewOutcomesPayload struct {
	WindowDays int                         `json:"window_days"`
	Days       []OverviewOutcomeDayPayload `json:"days"`
	Completed  int                         `json:"completed"`
	Failed     int                         `json:"failed"`
	Canceled   int                         `json:"canceled"`
	SuccessPct float64                     `json:"success_pct"`
}

OverviewOutcomesPayload summarizes terminal run outcomes for the fixed window.

type OverviewPulseBucketPayload

type OverviewPulseBucketPayload struct {
	Weekday int `json:"weekday"`
	Hour    int `json:"hour"`
	Events  int `json:"events"`
}

OverviewPulseBucketPayload is one hour-by-weekday event count; weekday 0 is Sunday.

type OverviewPulsePayload

type OverviewPulsePayload struct {
	WindowDays     int                            `json:"window_days"`
	Buckets        []OverviewPulseBucketPayload   `json:"buckets"`
	Busiest        *OverviewPulseBucketPayload    `json:"busiest,omitempty"`
	LongestSession *OverviewLongestSessionPayload `json:"longest_session,omitempty"`
}

OverviewPulsePayload summarizes hour-by-weekday activity plus derived insights.

type OverviewSystemPayload

type OverviewSystemPayload struct {
	HookRunsToday     int `json:"hook_runs_today"`
	HookFailuresToday int `json:"hook_failures_today"`
	RetentionDays     int `json:"retention_days"`
}

OverviewSystemPayload carries today-windowed system counters plus retention truth.

type OverviewTodayPayload

type OverviewTodayPayload struct {
	RunsCompleted int `json:"runs_completed"`
	RunsFailed    int `json:"runs_failed"`
	TasksClosed   int `json:"tasks_closed"`
}

OverviewTodayPayload summarizes today's terminal work.

type OverviewUsageDayPayload

type OverviewUsageDayPayload struct {
	Date   string `json:"date"`
	Tokens int64  `json:"tokens"`
}

OverviewUsageDayPayload is one daemon-local day of token usage.

type OverviewUsagePayload

type OverviewUsagePayload struct {
	WindowDays    int                         `json:"window_days"`
	RetentionDays int                         `json:"retention_days"`
	Truncated     bool                        `json:"truncated"`
	TotalTokens   int64                       `json:"total_tokens"`
	EstimatedCost *float64                    `json:"estimated_cost,omitempty"`
	CostCurrency  string                      `json:"cost_currency,omitempty"`
	CostStatus    string                      `json:"cost_status,omitempty"`
	Days          []OverviewUsageDayPayload   `json:"days"`
	AgentShare    []OverviewAgentSharePayload `json:"agent_share"`
}

OverviewUsagePayload summarizes token usage and estimated cost for the selected window.

type PatchLoopRequest

type PatchLoopRequest struct {
	ExpectedVersion *int                   `json:"expected_version,omitempty"`
	Definition      LoopDefinitionDocument `json:"definition"`
}

PatchLoopRequest atomically lints, compiles, and publishes a Loop definition.

type PauseTaskRequest

type PauseTaskRequest struct {
	Reason   string          `json:"reason"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

PauseTaskRequest captures one per-task pause request.

type PromoteNetworkThreadTaskRequest

type PromoteNetworkThreadTaskRequest struct {
	OriginMessageID string          `json:"origin_message_id"`
	Title           string          `json:"title,omitempty"`
	Description     string          `json:"description,omitempty"`
	Priority        string          `json:"priority,omitempty"`
	Metadata        json.RawMessage `json:"metadata,omitempty"`
}

PromoteNetworkThreadTaskRequest promotes a thread message into a durable task.

type PromoteNetworkThreadTaskResponse

type PromoteNetworkThreadTaskResponse struct {
	Task   TaskPayload                    `json:"task"`
	Origin NetworkTaskThreadOriginPayload `json:"origin"`
}

PromoteNetworkThreadTaskResponse wraps a promoted task and its network origin link.

type PromoteSessionInputRequest

type PromoteSessionInputRequest struct {
	Text           string `json:"text"`
	MessageID      string `json:"message_id"`
	IdempotencyKey string `json:"idempotency_key"`
	ExpectedTurnID string `json:"expected_turn_id"`
}

PromoteSessionInputRequest atomically replaces queued input with steering input.

func (PromoteSessionInputRequest) Validate

func (r PromoteSessionInputRequest) Validate() error

Validate checks one atomic queue-to-steer replacement and its active-turn fence.

type PromptDelivery

type PromptDelivery string

PromptDelivery describes when the daemon will submit accepted input.

const (
	PromptDeliveryNone                PromptDelivery = "none"
	PromptDeliveryDirect              PromptDelivery = "direct"
	PromptDeliveryAfterTurn           PromptDelivery = "after_turn"
	PromptDeliveryInterruptThenPrompt PromptDelivery = "interrupt_then_prompt"
)

type PromptInput

type PromptInput struct {
	Message        string
	MessageID      string
	IdempotencyKey string
}

PromptInput is the canonical authored prompt extracted from one transport request.

func ExtractPromptInput

func ExtractPromptInput(req SendPromptRequest) (PromptInput, error)

ExtractPromptInput validates explicit command identity and AI SDK message correlation.

type PromptMode

type PromptMode string

PromptMode selects how prompt input is handled while the session is busy.

const (
	PromptModeQueue     PromptMode = "queue"
	PromptModeInterrupt PromptMode = "interrupt"
	PromptModeSteer     PromptMode = "steer"
)

type PromptRuntimeSelectionPayload

type PromptRuntimeSelectionPayload struct {
	Provider        string          `json:"provider"`
	Model           string          `json:"model,omitempty"`
	ReasoningEffort ReasoningEffort `json:"reasoning_effort,omitempty"`
	Speed           Speed           `json:"speed,omitempty"`
}

PromptRuntimeSelectionPayload is the caller-selected runtime for one prompt.

func PromptRuntimeSelectionPayloadFromSelection

func PromptRuntimeSelectionPayloadFromSelection(
	selection *session.RuntimeSelection,
) *PromptRuntimeSelectionPayload

PromptRuntimeSelectionPayloadFromSelection converts an optional runtime selection into its wire shape.

type PromptUIMessage

type PromptUIMessage struct {
	ID      string             `json:"id,omitempty"`
	Role    string             `json:"role"`
	Content string             `json:"content,omitempty"`
	Parts   []PromptUITextPart `json:"parts,omitempty"`
}

PromptUIMessage carries Vercel AI SDK compatible message input.

type PromptUITextPart

type PromptUITextPart struct {
	Type string `json:"type,omitempty"`
	Text string `json:"text,omitempty"`
}

PromptUITextPart carries one text part from a Vercel AI SDK message.

type ProvenancePayload

type ProvenancePayload struct {
	Slug                   string                    `json:"slug,omitempty"`
	Registry               string                    `json:"registry,omitempty"`
	Version                string                    `json:"version,omitempty"`
	InstalledAt            *time.Time                `json:"installed_at,omitempty"`
	InstalledFromExtension string                    `json:"installed_from_extension,omitempty"`
	PrecedenceTier         string                    `json:"precedence_tier"`
	ShadowedBy             []SkillShadowEntryPayload `json:"shadowed_by,omitempty"`
}

ProvenancePayload is the nested provenance metadata for marketplace skills.

type ProviderAuthProbeResponse

type ProviderAuthProbeResponse struct {
	Provider   string                    `json:"provider"`
	AuthStatus ProviderAuthStatusPayload `json:"auth_status"`
	Probe      *ProviderAuthProbeResult  `json:"probe,omitempty"`
}

ProviderAuthProbeResponse reports one live provider-auth probe result.

type ProviderAuthProbeResult

type ProviderAuthProbeResult struct {
	ExitCode   int    `json:"exit_code"`
	Stdout     string `json:"stdout,omitempty"`
	Stderr     string `json:"stderr,omitempty"`
	DurationMs int64  `json:"duration_ms"`
}

ProviderAuthProbeResult is the redacted raw output from a provider auth probe.

type ProviderAuthStatusPayload

type ProviderAuthStatusPayload struct {
	Mode        string                         `json:"mode"`
	EnvPolicy   string                         `json:"env_policy"`
	HomePolicy  string                         `json:"home_policy"`
	State       string                         `json:"state"`
	Code        string                         `json:"code,omitempty"`
	Message     string                         `json:"message,omitempty"`
	StatusCmd   string                         `json:"status_command,omitempty"`
	Login       ProviderLoginDescriptorPayload `json:"login"`
	LastProbeAt *time.Time                     `json:"last_probe_at,omitempty"`
}

ProviderAuthStatusPayload is the shared provider-auth readiness payload.

type ProviderListResponse

type ProviderListResponse struct {
	Providers []ProviderSummaryPayload `json:"providers"`
}

ProviderListResponse is the canonical provider inventory payload.

type ProviderLoginDescriptorPayload

type ProviderLoginDescriptorPayload struct {
	Configured        bool                      `json:"configured"`
	Source            ProviderLoginSource       `json:"source,omitempty"`
	Executable        string                    `json:"executable,omitempty"`
	Presence          ProviderLoginPresence     `json:"presence"`
	RecommendedAction ProviderRecommendedAction `json:"recommended_action,omitempty"`
}

ProviderLoginDescriptorPayload is the only public projection of auth_login_command.

type ProviderLoginPresence

type ProviderLoginPresence string

ProviderLoginPresence reports only the availability truth established by the current probe.

const (
	ProviderLoginPresencePresent ProviderLoginPresence = "present"
	ProviderLoginPresenceMissing ProviderLoginPresence = "missing"
	ProviderLoginPresenceUnknown ProviderLoginPresence = "unknown"
)

type ProviderLoginSource

type ProviderLoginSource string

ProviderLoginSource identifies the safe source of configured login metadata.

const (
	ProviderLoginSourceAuthLoginCommand ProviderLoginSource = "auth_login_command"
)

type ProviderModelCurationRequest

type ProviderModelCurationRequest struct {
	ModelID                string           `json:"model_id"`
	Hidden                 *bool            `json:"hidden,omitempty"`
	Featured               *bool            `json:"featured,omitempty"`
	Deprecated             *bool            `json:"deprecated,omitempty"`
	DefaultReasoningEffort *ReasoningEffort `json:"default_effort,omitempty"`
}

ProviderModelCurationRequest captures one model-only provider config mutation.

type ProviderModelCurationResponse

type ProviderModelCurationResponse struct {
	Model ProviderModelPayload  `json:"model"`
	Apply SettingsApplyResponse `json:"apply"`
}

ProviderModelCurationResponse reports the effective model and live config-apply result.

type ProviderModelListResponse

type ProviderModelListResponse struct {
	Models []ProviderModelPayload `json:"models"`
}

ProviderModelListResponse is the native provider model catalog list payload.

type ProviderModelPayload

type ProviderModelPayload struct {
	ProviderID             string                         `json:"provider_id"`
	ModelID                string                         `json:"model_id"`
	DisplayName            string                         `json:"display_name,omitempty"`
	Sources                []ModelCatalogSourceRefPayload `json:"sources"`
	Available              *bool                          `json:"available"`
	AvailabilityState      string                         `json:"availability_state"`
	Stale                  bool                           `json:"stale"`
	RefreshedAt            string                         `json:"refreshed_at,omitempty"`
	ContextWindow          *int64                         `json:"context_window,omitempty"`
	MaxInputTokens         *int64                         `json:"max_input_tokens,omitempty"`
	MaxOutputTokens        *int64                         `json:"max_output_tokens,omitempty"`
	SupportsTools          *bool                          `json:"supports_tools,omitempty"`
	SupportsReasoning      *bool                          `json:"supports_reasoning,omitempty"`
	ReasoningEfforts       []ReasoningEffort              `json:"reasoning_efforts,omitempty"`
	DefaultReasoningEffort *ReasoningEffort               `json:"default_reasoning_effort,omitempty"`
	Cost                   *ModelCatalogCostPayload       `json:"cost,omitempty"`
	Curated                bool                           `json:"curated"`
	Deprecated             bool                           `json:"deprecated"`
	Hidden                 bool                           `json:"hidden"`
	Featured               bool                           `json:"featured"`
	ReleaseDate            string                         `json:"release_date,omitempty"`
	ReasoningSource        ReasoningSource                `json:"reasoning_source,omitempty"`
	LastError              string                         `json:"last_error,omitempty"`
}

ProviderModelPayload is one merged provider model catalog projection.

type ProviderModelRefreshRequest

type ProviderModelRefreshRequest struct {
	SourceID  string `json:"source_id,omitempty"`
	Force     bool   `json:"force,omitempty"`
	RequestID string `json:"request_id,omitempty"`
}

ProviderModelRefreshRequest captures one provider model catalog refresh request.

type ProviderModelRefreshResponse

type ProviderModelRefreshResponse struct {
	Sources []ModelCatalogSourceStatusPayload `json:"sources"`
	Error   string                            `json:"error,omitempty"`
}

ProviderModelRefreshResponse reports provider model catalog refresh source status.

type ProviderModelStatusResponse

type ProviderModelStatusResponse struct {
	Sources []ModelCatalogSourceStatusPayload `json:"sources"`
}

ProviderModelStatusResponse reports provider model catalog source status.

type ProviderRecommendedAction

type ProviderRecommendedAction string

ProviderRecommendedAction is the safe agent-facing recovery action.

const (
	ProviderRecommendedActionNone       ProviderRecommendedAction = ""
	ProviderRecommendedActionInstallCLI ProviderRecommendedAction = "install_cli"
	ProviderRecommendedActionLogin      ProviderRecommendedAction = "login"
	ProviderRecommendedActionBindSecret ProviderRecommendedAction = "bind_secret"
	ProviderRecommendedActionRetry      ProviderRecommendedAction = "retry"
	ProviderRecommendedActionInspect    ProviderRecommendedAction = "inspect"
	ProviderRecommendedActionNoRetry    ProviderRecommendedAction = "no_retry"
)

type ProviderStatusPayload

type ProviderStatusPayload struct {
	Name          string                         `json:"name"`
	DisplayName   string                         `json:"display_name,omitempty"`
	Default       bool                           `json:"default"`
	Mode          string                         `json:"mode,omitempty"`
	EnvPolicy     string                         `json:"env_policy,omitempty"`
	HomePolicy    string                         `json:"home_policy,omitempty"`
	State         string                         `json:"state"`
	Code          string                         `json:"code,omitempty"`
	Message       string                         `json:"message,omitempty"`
	StatusCommand string                         `json:"status_command,omitempty"`
	Login         ProviderLoginDescriptorPayload `json:"login"`
	LastProbeAt   *time.Time                     `json:"last_probe_at,omitempty"`
}

ProviderStatusPayload reports one provider's auth readiness in the status surface.

type ProviderSummaryPayload

type ProviderSummaryPayload struct {
	Name        string                    `json:"name"`
	DisplayName string                    `json:"display_name,omitempty"`
	Default     bool                      `json:"default"`
	AuthStatus  ProviderAuthStatusPayload `json:"auth_status"`
}

ProviderSummaryPayload describes one canonical provider and its declared auth state.

type PutBridgeSecretBindingRequest

type PutBridgeSecretBindingRequest struct {
	// SecretRef identifies the daemon-owned encrypted secret reference.
	SecretRef string `json:"secret_ref"`
	// Kind identifies the materialized secret kind passed to the provider runtime.
	Kind string `json:"kind"`
	// SecretValue is write-only plaintext stored into the vault when provided.
	SecretValue *string `json:"secret_value,omitempty"`
}

PutBridgeSecretBindingRequest is the shared bridge secret binding upsert payload.

func (PutBridgeSecretBindingRequest) ToBridgeSecretBinding

func (r PutBridgeSecretBindingRequest) ToBridgeSecretBinding(
	bridgeInstanceID string,
	bindingName string,
) (bridgepkg.BridgeSecretBinding, error)

ToBridgeSecretBinding validates and converts the transport payload into the daemon-owned binding request.

type PutLoopAnnotationsRequest

type PutLoopAnnotationsRequest struct {
	Annotations []LoopAnnotationPayload `json:"annotations"`
}

PutLoopAnnotationsRequest replaces editor sidecar positions for one Loop.

type PutLoopConfigRequest

type PutLoopConfigRequest struct {
	Config LoopConfig `json:"config"`
}

PutLoopConfigRequest replaces the stored no-fork config override.

type PutLoopInputDefaultRequest

type PutLoopInputDefaultRequest struct {
	Scope LoopInputDefaultsScope `json:"scope"`
	Value any                    `json:"value"`
}

PutLoopInputDefaultRequest sets one configured Loop input at one scope.

type PutLoopInputDefaultsRequest

type PutLoopInputDefaultsRequest struct {
	Scope  LoopInputDefaultsScope `json:"scope"`
	Values map[string]any         `json:"values"`
}

PutLoopInputDefaultsRequest replaces one Loop's complete configured table at one scope.

type PutNetworkCoordinationInvitationRequest

type PutNetworkCoordinationInvitationRequest struct {
	Scope            string `json:"scope"`
	TaskID           string `json:"task_id,omitempty"`
	RunID            string `json:"run_id,omitempty"`
	Dismissed        *bool  `json:"dismissed"`
	ExpectedRevision *int64 `json:"expected_revision"`
}

PutNetworkCoordinationInvitationRequest persists or resets invitation dismissal. Scope is "workspace" or "task". When dismissed is false, the row is deleted (reset).

type PutNetworkCoordinationRequest

type PutNetworkCoordinationRequest struct {
	Scope            string `json:"scope"`
	TaskID           string `json:"task_id,omitempty"`
	RunID            string `json:"run_id,omitempty"`
	Enabled          *bool  `json:"enabled"`
	ExpectedRevision *int64 `json:"expected_revision"`
}

PutNetworkCoordinationRequest toggles one explicit coordination scope with CAS.

type PutResourceRequest

type PutResourceRequest struct {
	Scope           resources.ResourceScope `json:"scope"`
	ExpectedVersion int64                   `json:"expected_version,omitempty"`
	Spec            json.RawMessage         `json:"spec"`
}

PutResourceRequest is the shared desired-state upsert payload.

type PutSettingsHookRequest

type PutSettingsHookRequest struct {
	Declaration SettingsHookDeclarationPayload `json:"declaration"`
}

type PutSettingsMCPServerRequest

type PutSettingsMCPServerRequest struct {
	Server          SettingsMCPServerPayload              `json:"server"`
	SecretValues    *SettingsMCPSecretValuesPayload       `json:"secret_values,omitempty"`
	PreserveSecrets *SettingsMCPSecretPreservationPayload `json:"preserve_secrets,omitempty"`
	PreserveEnv     []string                              `json:"preserve_env,omitempty"`
}

type PutSettingsProviderRequest

type PutSettingsProviderRequest struct {
	Settings      SettingsProviderWritePayload         `json:"settings"`
	ModelCuration *ProviderModelCurationRequest        `json:"model_curation,omitempty"`
	Secrets       []SettingsProviderSecretWritePayload `json:"secrets,omitempty"`
}

type PutSettingsSandboxRequest

type PutSettingsSandboxRequest struct {
	Profile SettingsSandboxProfilePayload `json:"profile"`
}

type PutVaultSecretRequest

type PutVaultSecretRequest struct {
	Ref         string `json:"ref"`
	Kind        string `json:"kind,omitempty"`
	SecretValue string `json:"secret_value"`
}

PutVaultSecretRequest writes one vault-backed secret. SecretValue is write-only.

func (PutVaultSecretRequest) Normalize

Normalize returns the canonical write request without exposing plaintext in errors.

func (PutVaultSecretRequest) Validate

func (r PutVaultSecretRequest) Validate() error

Validate verifies a public vault write request.

type ReasoningEffort

type ReasoningEffort = modelcatalog.ReasoningEffort

ReasoningEffort is the canonical model-catalog reasoning level exposed by API contracts.

type ReasoningSource

type ReasoningSource = modelcatalog.ReasoningSource

ReasoningSource is the canonical model-catalog reasoning provenance exposed by API contracts.

type RecapPayload

type RecapPayload struct {
	Session        SessionPayload            `json:"session"`
	ActiveRun      *TaskRunPayload           `json:"active_run,omitempty"`
	RecentMarkers  []TranscriptMarkerPayload `json:"recent_markers"`
	RecentMessages []transcript.UIMessage    `json:"recent_messages"`
	PendingInputs  int                       `json:"pending_inputs"`
	PendingMarkers int                       `json:"pending_markers"`
	Snapshot       RecapSnapshotPayload      `json:"snapshot"`
}

RecapPayload is a deterministic session recap composed from persisted daemon state.

type RecapSnapshotPayload

type RecapSnapshotPayload struct {
	GeneratedAt      time.Time `json:"generated_at"`
	EventCursor      int64     `json:"event_cursor"`
	TranscriptCursor int64     `json:"transcript_cursor"`
	QueueGeneration  int64     `json:"queue_generation"`
	Consistency      string    `json:"consistency"`
}

RecapSnapshotPayload records the consistent read boundary for one recap.

type RecoverTaskRequest

type RecoverTaskRequest struct {
	Note string `json:"note,omitempty"`
}

RecoverTaskRequest captures one task-level needs_attention recovery request.

type RecoverTaskRunRequest

type RecoverTaskRunRequest struct {
	Reason   string          `json:"reason,omitempty"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

RecoverTaskRunRequest is the shared recovery request payload for a needs_attention run.

type ReloadExtensionRequest

type ReloadExtensionRequest struct {
	GenerationHash       string `json:"generation_hash"`
	ConfirmNetworkDigest string `json:"confirm_network_digest,omitempty"`
}

ReloadExtensionRequest swaps one dev-linked extension to an immutable generation.

type ReplaceSessionInputRequest

type ReplaceSessionInputRequest struct {
	Text           string `json:"text"`
	MessageID      string `json:"message_id"`
	IdempotencyKey string `json:"idempotency_key"`
}

ReplaceSessionInputRequest atomically replaces one queued input.

func (ReplaceSessionInputRequest) Validate

func (r ReplaceSessionInputRequest) Validate() error

Validate checks one atomic queued-input replacement.

type ResolveWorkspaceRequest

type ResolveWorkspaceRequest struct {
	Path string `json:"path"`
}

ResolveWorkspaceRequest is the shared workspace resolve request payload.

type ResourceRecordPayload

type ResourceRecordPayload struct {
	Kind      resources.ResourceKind   `json:"kind"`
	ID        string                   `json:"id"`
	Version   int64                    `json:"version"`
	Scope     resources.ResourceScope  `json:"scope"`
	Owner     resources.ResourceOwner  `json:"owner"`
	Source    resources.ResourceSource `json:"source"`
	Spec      json.RawMessage          `json:"spec"`
	CreatedAt time.Time                `json:"created_at"`
	UpdatedAt time.Time                `json:"updated_at"`
}

ResourceRecordPayload is the shared desired-state record response shape.

type ResourceResponse

type ResourceResponse struct {
	Record ResourceRecordPayload `json:"record"`
}

ResourceResponse wraps one desired-state resource payload.

type ResourcesResponse

type ResourcesResponse struct {
	Records []ResourceRecordPayload `json:"records"`
}

ResourcesResponse wraps the shared desired-state resource list payload.

type RestartActionResponse

type RestartActionResponse struct {
	OperationID        string                 `json:"operation_id"`
	Status             RestartOperationStatus `json:"status"`
	StatusURL          string                 `json:"status_url"`
	ActiveSessionCount int                    `json:"active_session_count"`
}

type RestartActionStatus

type RestartActionStatus struct {
	OperationID        string                 `json:"operation_id"`
	Status             RestartOperationStatus `json:"status"`
	OldPID             int                    `json:"old_pid"`
	OldStartedAt       time.Time              `json:"old_started_at"`
	OldSocketPath      string                 `json:"old_socket_path"`
	NewPID             int                    `json:"new_pid,omitempty"`
	ActiveSessionCount int                    `json:"active_session_count"`
	FailureReason      string                 `json:"failure_reason,omitempty"`
	StartedAt          time.Time              `json:"started_at"`
	UpdatedAt          time.Time              `json:"updated_at"`
	CompletedAt        *time.Time             `json:"completed_at,omitempty"`
}

type RestartOperationStatus

type RestartOperationStatus string
const (
	RestartOperationPending        RestartOperationStatus = "pending"
	RestartOperationStopping       RestartOperationStatus = "stopping"
	RestartOperationWaitingRelease RestartOperationStatus = "waiting_release"
	RestartOperationStarting       RestartOperationStatus = "starting"
	RestartOperationReady          RestartOperationStatus = "ready"
	RestartOperationFailed         RestartOperationStatus = "failed"
)

type ResumeTaskRequest

type ResumeTaskRequest struct {
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

ResumeTaskRequest captures one per-task resume request.

type RetryTaskRunRequest

type RetryTaskRunRequest struct {
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

RetryTaskRunRequest is the shared retry request payload.

type RetryTaskRunResponse

type RetryTaskRunResponse struct {
	PreviousRun TaskRunPayload `json:"previous_run"`
	Run         TaskRunPayload `json:"run"`
}

RetryTaskRunResponse wraps one retry source and newly queued run payload.

type RoleDiagnostic

type RoleDiagnostic struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Agent   string `json:"agent,omitempty"`
}

RoleDiagnostic reports a current configuration-resolution problem without simulating an invocation.

type RoleFallbackStatus

type RoleFallbackStatus struct {
	Provider        string `json:"provider"`
	Model           string `json:"model"`
	ReasoningEffort string `json:"reasoning_effort,omitempty"`
}

RoleFallbackStatus is one configured fallback route in declaration order.

type RoleResolutionMode

type RoleResolutionMode string

RoleResolutionMode identifies how one configured background role finds its identity.

const (
	RoleResolutionModeBuiltin RoleResolutionMode = "builtin"
	RoleResolutionModeCatalog RoleResolutionMode = "catalog"
	RoleResolutionModeInherit RoleResolutionMode = "inherit"
)

type RoleStatus

type RoleStatus struct {
	Role            string               `json:"role"`
	Enabled         bool                 `json:"enabled"`
	ResolutionMode  RoleResolutionMode   `json:"resolution_mode"`
	Agent           *string              `json:"agent"`
	Provider        *string              `json:"provider"`
	Model           *string              `json:"model"`
	ReasoningEffort *string              `json:"reasoning_effort"`
	Timeout         *string              `json:"timeout,omitempty"`
	FallbackChain   []RoleFallbackStatus `json:"fallback_chain"`
	Provenance      map[string]string    `json:"provenance"`
	Diagnostics     []RoleDiagnostic     `json:"diagnostics"`
}

RoleStatus is the effective configuration projection for one background role.

type RoleStatusResponse

type RoleStatusResponse struct {
	Role RoleStatus `json:"role"`
}

RoleStatusResponse wraps one role projection.

type RolesResponse

type RolesResponse struct {
	Roles []RoleStatus `json:"roles"`
}

RolesResponse wraps the closed role roster.

type RunLoopRequest

type RunLoopRequest struct {
	Inputs               map[string]any         `json:"inputs,omitempty"`
	ParentLoopRunID      string                 `json:"parent_loop_run_id,omitempty"`
	ConfigOverrides      *LoopConfig            `json:"config_overrides,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
}

RunLoopRequest starts a Loop, or previews it when dry=true.

type RunLoopResponse

type RunLoopResponse struct {
	Run    *LoopRunPayload  `json:"run,omitempty"`
	DryRun *LoopPlanPayload `json:"dry_run,omitempty"`
	WebURL string           `json:"web_url,omitempty"`
}

RunLoopResponse returns either a persisted run or a dry-run plan preview.

type RunPayload

type RunPayload struct {
	ID                   string                  `json:"id"`
	JobID                string                  `json:"job_id,omitempty"`
	TriggerID            string                  `json:"trigger_id,omitempty"`
	SessionID            string                  `json:"session_id,omitempty"`
	TaskID               string                  `json:"task_id,omitempty"`
	TaskRunID            string                  `json:"task_run_id,omitempty"`
	LoopRunID            string                  `json:"loop_run_id,omitempty"`
	FireID               string                  `json:"fire_id,omitempty"`
	Status               automationpkg.RunStatus `json:"status"`
	Attempt              int                     `json:"attempt"`
	NetworkParticipation *participation.Request  `json:"network_participation,omitempty"`
	ScheduledAt          *time.Time              `json:"scheduled_at,omitempty"`
	StartedAt            *time.Time              `json:"started_at,omitempty"`
	EndedAt              *time.Time              `json:"ended_at,omitempty"`
	Error                string                  `json:"error,omitempty"`
	DeliveryError        string                  `json:"delivery_error,omitempty"`
	DeliveryErrorAt      *time.Time              `json:"delivery_error_at,omitempty"`
	Metadata             map[string]any          `json:"metadata,omitempty"`
}

RunPayload is the shared automation run response payload.

type RunResponse

type RunResponse struct {
	Run RunPayload `json:"run"`
}

RunResponse wraps one shared automation run payload.

type RunsResponse

type RunsResponse struct {
	Runs []RunPayload `json:"runs"`
}

RunsResponse wraps the shared automation run list payload.

type RuntimeActivityPayload

type RuntimeActivityPayload struct {
	TurnID             string     `json:"turn_id,omitempty"`
	TurnSource         string     `json:"turn_source,omitempty"`
	TurnStartedAt      *time.Time `json:"turn_started_at,omitempty"`
	DeadlineAt         *time.Time `json:"deadline_at,omitempty"`
	LastActivityAt     *time.Time `json:"last_activity_at,omitempty"`
	LastActivityKind   string     `json:"last_activity_kind,omitempty"`
	LastActivityDetail string     `json:"last_activity_detail,omitempty"`
	CurrentTool        string     `json:"current_tool,omitempty"`
	ToolCallID         string     `json:"tool_call_id,omitempty"`
	LastProgressAt     *time.Time `json:"last_progress_at,omitempty"`
	IterationCurrent   int        `json:"iteration_current"`
	IterationMax       int        `json:"iteration_max"`
	IdleSeconds        int64      `json:"idle_seconds"`
	ElapsedSeconds     int64      `json:"elapsed_seconds"`
	ElapsedMS          int64      `json:"elapsed_ms"`
}

RuntimeActivityPayload is the shared JSON representation of active prompt supervision state.

type RuntimeSelectionPayload

type RuntimeSelectionPayload struct {
	Provider        string           `json:"provider"`
	Model           string           `json:"model,omitempty"`
	ReasoningEffort ReasoningEffort  `json:"reasoning_effort,omitempty"`
	Speed           Speed            `json:"speed,omitempty"`
	SpeedResolution *SpeedResolution `json:"speed_resolution,omitempty"`
}

RuntimeSelectionPayload is the effective runtime bound to a logical session.

type SchedulerBacklogPayload

type SchedulerBacklogPayload struct {
	Runs  []SchedulerBacklogRunPayload `json:"runs"`
	Total int                          `json:"total"`
}

SchedulerBacklogPayload reports queued scheduler backlog rows.

type SchedulerBacklogQuery

type SchedulerBacklogQuery struct {
	Limit         int           `form:"limit"          json:"limit,omitempty"`
	Scope         taskpkg.Scope `form:"scope"          json:"scope,omitempty"`
	WorkspaceID   string        `form:"workspace"      json:"workspace,omitempty"`
	IncludePaused bool          `form:"include_paused" json:"include_paused,omitempty"`
}

SchedulerBacklogQuery captures transport query filters.

type SchedulerBacklogResponse

type SchedulerBacklogResponse struct {
	Backlog SchedulerBacklogPayload `json:"backlog"`
}

SchedulerBacklogResponse wraps scheduler backlog.

type SchedulerBacklogRunPayload

type SchedulerBacklogRunPayload struct {
	Task TaskSummaryPayload `json:"task"`
	Run  TaskRunPayload     `json:"run"`
}

SchedulerBacklogRunPayload exposes one queued run with task identity.

type SchedulerDrainRequest

type SchedulerDrainRequest struct {
	Reason         string `json:"reason,omitempty"`
	TimeoutSeconds *int64 `json:"timeout_seconds,omitempty"`
}

SchedulerDrainRequest captures scheduler drain input.

type SchedulerDrainResponse

type SchedulerDrainResponse struct {
	Scheduler       SchedulerStatusPayload `json:"scheduler"`
	Completed       bool                   `json:"completed"`
	TimedOut        bool                   `json:"timed_out,omitempty"`
	RemainingClaims int                    `json:"remaining_claims"`
	StartedAt       time.Time              `json:"started_at"`
	CompletedAt     time.Time              `json:"completed_at"`
}

SchedulerDrainResponse wraps the final drain result.

type SchedulerPauseRequest

type SchedulerPauseRequest struct {
	Reason string `json:"reason,omitempty"`
}

SchedulerPauseRequest captures scheduler-wide pause input.

type SchedulerResumeRequest

type SchedulerResumeRequest struct {
	Reason string `json:"reason,omitempty"`
}

SchedulerResumeRequest captures scheduler-wide resume input.

type SchedulerStatusPayload

type SchedulerStatusPayload struct {
	Paused                 bool       `json:"paused"`
	PausedBy               string     `json:"paused_by,omitempty"`
	PausedAt               *time.Time `json:"paused_at,omitempty"`
	PausedReason           string     `json:"paused_reason,omitempty"`
	ActiveClaimCount       int        `json:"active_claim_count"`
	QueuedRunCount         int        `json:"queued_run_count"`
	PausedTaskCount        int        `json:"paused_task_count"`
	StarvedRunCount        int        `json:"starved_run_count"`
	NeedsAttentionRunCount int        `json:"needs_attention_run_count"`
	AsOf                   time.Time  `json:"as_of"`
}

SchedulerStatusPayload exposes scheduler-wide pause state and queue pressure.

type SchedulerStatusResponse

type SchedulerStatusResponse struct {
	Scheduler SchedulerStatusPayload `json:"scheduler"`
}

SchedulerStatusResponse wraps scheduler status.

type SchemaStreamStatus

type SchemaStreamStatus struct {
	Stream       string `json:"stream"`
	Version      int64  `json:"version"`
	AppliedCount int    `json:"applied_count"`
	SumDigest    string `json:"sum_digest"`
}

SchemaStreamStatus reports one daemon-global migration stream's applied state.

type SendPromptRequest

type SendPromptRequest struct {
	Message        string                         `json:"message,omitempty"`
	Messages       []PromptUIMessage              `json:"messages,omitempty"`
	MessageID      string                         `json:"message_id"`
	IdempotencyKey string                         `json:"idempotency_key"`
	Mode           PromptMode                     `json:"mode,omitempty"`
	ExpectedTurnID string                         `json:"expected_turn_id,omitempty"`
	Runtime        *PromptRuntimeSelectionPayload `json:"runtime,omitempty"`
}

SendPromptRequest captures user-facing prompt input plus optional busy-input mode.

func (SendPromptRequest) ValidateBusyInputFence

func (r SendPromptRequest) ValidateBusyInputFence() error

ValidateBusyInputFence requires stale-action protection for commands that replace an active turn.

type SendPromptResultPayload

type SendPromptResultPayload struct {
	Status                string             `json:"status"`
	Mode                  PromptMode         `json:"mode,omitempty"`
	Delivery              PromptDelivery     `json:"delivery"`
	MessageID             string             `json:"message_id"`
	IdempotencyKey        string             `json:"idempotency_key"`
	Replayed              bool               `json:"replayed"`
	QueueEntryID          string             `json:"queue_entry_id,omitempty"`
	QueuePosition         int                `json:"queue_position,omitempty"`
	QueueGeneration       int64              `json:"queue_generation,omitempty"`
	EstimatedSendAt       *time.Time         `json:"estimated_send_at,omitempty"`
	PreviousTurnID        string             `json:"previous_turn_id,omitempty"`
	NewTurnID             string             `json:"new_turn_id,omitempty"`
	CanceledQueuedEntries int                `json:"canceled_queued_entries,omitempty"`
	Goal                  *GoalCommandResult `json:"goal,omitempty"`
}

SendPromptResultPayload reports non-streaming busy-input outcomes.

type SendPromptResultResponse

type SendPromptResultResponse struct {
	Prompt SendPromptResultPayload `json:"prompt"`
}

SendPromptResultResponse wraps non-streaming busy-input prompt outcomes.

type SessionActivityHealthPayload

type SessionActivityHealthPayload struct {
	SessionID          string     `json:"session_id"`
	TurnID             string     `json:"turn_id,omitempty"`
	TurnSource         string     `json:"turn_source,omitempty"`
	TurnStartedAt      *time.Time `json:"turn_started_at,omitempty"`
	DeadlineAt         *time.Time `json:"deadline_at,omitempty"`
	LastActivityAt     *time.Time `json:"last_activity_at,omitempty"`
	LastActivityKind   string     `json:"last_activity_kind,omitempty"`
	LastActivityDetail string     `json:"last_activity_detail,omitempty"`
	CurrentTool        string     `json:"current_tool,omitempty"`
	ToolCallID         string     `json:"tool_call_id,omitempty"`
	LastProgressAt     *time.Time `json:"last_progress_at,omitempty"`
	IterationCurrent   int        `json:"iteration_current"`
	IterationMax       int        `json:"iteration_max"`
	IdleSeconds        int64      `json:"idle_seconds"`
	ElapsedSeconds     int64      `json:"elapsed_seconds"`
	ElapsedMS          int64      `json:"elapsed_ms"`
	Status             string     `json:"status"`
	StallState         string     `json:"stall_state,omitempty"`
	StallReason        string     `json:"stall_reason,omitempty"`
}

SessionActivityHealthPayload exposes active runtime supervision state in the observability health response.

type SessionAggregatePayload

type SessionAggregatePayload struct {
	Active   int            `json:"active"`
	Total    int            `json:"total"`
	ByStatus map[string]int `json:"by_status,omitempty"`
	ByBadge  map[string]int `json:"by_badge,omitempty"`
}

SessionAggregatePayload summarizes current session state.

type SessionApprovalResponse

type SessionApprovalResponse struct {
	Status string `json:"status"`
}

SessionApprovalResponse wraps the approve-session success payload.

type SessionAttachPayload

type SessionAttachPayload struct {
	SessionID       string    `json:"session_id"`
	AttachedTo      string    `json:"attached_to"`
	AttachExpiresAt time.Time `json:"attach_expires_at"`
	AttachedAt      time.Time `json:"attached_at"`
}

SessionAttachPayload reports the attach lease acquired by one caller.

type SessionAttachResponse

type SessionAttachResponse struct {
	Session SessionPayload       `json:"session"`
	Attach  SessionAttachPayload `json:"attach"`
}

SessionAttachResponse wraps one explicit session attach lease.

type SessionCatalogEventPayload

type SessionCatalogEventPayload struct {
	Kind        string `json:"kind"`
	WorkspaceID string `json:"workspace_id"`
	SessionID   string `json:"session_id"`
}

SessionCatalogEventPayload is a workspace-identified wake signal. Clients must reconcile the authoritative catalog snapshot instead of counting events.

type SessionCatalogResponse

type SessionCatalogResponse struct {
	Sessions []SessionPayload         `json:"sessions"`
	Page     CountedCursorPagePayload `json:"page"`
}

SessionCatalogResponse wraps one bounded public session catalog page.

type SessionCommandPayload

type SessionCommandPayload struct {
	ID             string               `json:"id"`
	CanonicalToken string               `json:"canonical_token"`
	DisplayName    string               `json:"display_name"`
	Description    string               `json:"description"`
	Lane           string               `json:"lane"`
	Source         SessionCommandSource `json:"source"`
	Placements     []string             `json:"placements"`
	InputHint      string               `json:"input_hint,omitempty"`
}

SessionCommandPayload is one command available in a session composer.

type SessionCommandSource

type SessionCommandSource struct {
	Kind  string `json:"kind"`
	ID    string `json:"id,omitempty"`
	Key   string `json:"key,omitempty"`
	Scope string `json:"scope"`
}

SessionCommandSource identifies one command owner without exposing filesystem paths.

type SessionCommandsChangedPayload

type SessionCommandsChangedPayload struct {
	SessionID string `json:"session_id"`
	Revision  string `json:"revision"`
}

SessionCommandsChangedPayload invalidates one session command catalog revision.

type SessionCommandsResponse

type SessionCommandsResponse struct {
	Commands []SessionCommandPayload `json:"commands"`
	Revision string                  `json:"revision"`
}

SessionCommandsResponse is the session-scoped command catalog projection.

type SessionConfigOptionPayload

type SessionConfigOptionPayload struct {
	ID          string                            `json:"id"`
	Label       string                            `json:"label,omitempty"`
	Description string                            `json:"description,omitempty"`
	Kind        string                            `json:"kind"`
	Current     string                            `json:"current,omitempty"`
	Values      []SessionConfigOptionValuePayload `json:"values,omitempty"`
}

SessionConfigOptionPayload is one active ACP session config option.

type SessionConfigOptionValuePayload

type SessionConfigOptionValuePayload struct {
	Value       string `json:"value"`
	Label       string `json:"label,omitempty"`
	Description string `json:"description,omitempty"`
}

SessionConfigOptionValuePayload is one selectable value for an active ACP config option.

type SessionConversationRewindPayload

type SessionConversationRewindPayload struct {
	TranscriptEpoch int64  `json:"transcript_epoch"`
	TargetMessageID string `json:"target_message_id"`
	ArchivedFrom    int64  `json:"archived_from_sequence"`
	ArchivedThrough int64  `json:"archived_through_sequence"`
	ArchivedEvents  int64  `json:"archived_event_count"`
	Generation      int64  `json:"generation"`
	MaxSequence     int64  `json:"max_sequence"`
	DraftText       string `json:"draft_text"`
	Replayed        bool   `json:"replayed"`
}

SessionConversationRewindPayload describes the committed transcript cut.

type SessionConversationRewindRequest

type SessionConversationRewindRequest struct {
	MessageID           string `json:"message_id"`
	IdempotencyKey      string `json:"idempotency_key"`
	ExpectedEpoch       *int64 `json:"expected_epoch"`
	ExpectedGeneration  *int64 `json:"expected_generation"`
	ExpectedMaxSequence *int64 `json:"expected_max_sequence"`
}

SessionConversationRewindRequest carries the durable message identity and transcript fences observed by the caller.

type SessionConversationRewindResponse

type SessionConversationRewindResponse struct {
	Session SessionPayload                   `json:"session"`
	Rewind  SessionConversationRewindPayload `json:"rewind"`
}

SessionConversationRewindResponse returns the restarted session, the new transcript coordinates, and the selected prompt text for composer prefill.

type SessionEventPayload

type SessionEventPayload struct {
	ID            string `json:"id"`
	SessionID     string `json:"session_id"`
	Sequence      int64  `json:"sequence"`
	TurnID        string `json:"turn_id"`
	Type          string `json:"type"`
	AgentName     string `json:"agent_name"`
	WorkspaceID   string `json:"workspace_id,omitempty"`
	WorkspacePath string `json:"workspace_path,omitempty"`
	store.EventCorrelation
	ParentSessionID string                 `json:"parent_session_id,omitempty"`
	RootSessionID   string                 `json:"root_session_id,omitempty"`
	SpawnDepth      int                    `json:"spawn_depth"`
	Content         json.RawMessage        `json:"content"`
	Goal            *GoalPromptMeta        `json:"goal,omitempty"`
	StopReason      store.StopReason       `json:"stop_reason,omitempty"`
	StopDetail      string                 `json:"stop_detail,omitempty"`
	Failure         *SessionFailurePayload `json:"failure,omitempty"`
	Timestamp       time.Time              `json:"timestamp"`
}

SessionEventPayload is the shared session event response payload.

type SessionEventsResponse

type SessionEventsResponse struct {
	Events []SessionEventPayload `json:"events"`
}

SessionEventsResponse wraps the shared session events payload.

type SessionFailureHealthPayload

type SessionFailureHealthPayload struct {
	SessionID       string            `json:"session_id"`
	AgentName       string            `json:"agent_name,omitempty"`
	Provider        string            `json:"provider,omitempty"`
	WorkspaceID     string            `json:"workspace_id,omitempty"`
	State           string            `json:"state,omitempty"`
	FailureKind     store.FailureKind `json:"failure_kind"`
	Summary         string            `json:"summary,omitempty"`
	CrashBundlePath string            `json:"crash_bundle_path,omitempty"`
	UpdatedAt       time.Time         `json:"updated_at"`
}

SessionFailureHealthPayload exposes one compact lifecycle failure health row.

type SessionFailurePayload

type SessionFailurePayload struct {
	Kind            store.FailureKind `json:"kind"`
	Summary         string            `json:"summary,omitempty"`
	CrashBundlePath string            `json:"crash_bundle_path,omitempty"`
}

SessionFailurePayload is the redacted lifecycle failure diagnostic shared by session read paths, event streams, and health summaries.

type SessionGoalResponse

type SessionGoalResponse struct {
	Goal *GoalSnapshot `json:"goal"`
}

SessionGoalResponse preserves explicit null when no visible Goal exists.

type SessionHealthIneligibilityReason

type SessionHealthIneligibilityReason string

SessionHealthIneligibilityReason is the closed reason for wake-ineligible health rows.

const (
	SessionHealthReasonPromptActive  SessionHealthIneligibilityReason = "session_prompt_active"
	SessionHealthReasonNotAttachable SessionHealthIneligibilityReason = "session_not_attachable"
	SessionHealthReasonUnhealthy     SessionHealthIneligibilityReason = "session_unhealthy"
	SessionHealthReasonStale         SessionHealthIneligibilityReason = "session_health_stale"
	SessionHealthReasonHung          SessionHealthIneligibilityReason = "session_health_hung"
	SessionHealthReasonDead          SessionHealthIneligibilityReason = "session_health_dead"
	SessionHealthReasonUnknown       SessionHealthIneligibilityReason = "session_health_unknown"
)

type SessionHealthPayload

type SessionHealthPayload struct {
	SessionID           string                           `json:"session_id"`
	WorkspaceID         string                           `json:"workspace_id"`
	AgentName           string                           `json:"agent_name"`
	State               SessionHealthState               `json:"state"`
	Health              SessionHealthStatus              `json:"health"`
	ActivePrompt        bool                             `json:"active_prompt"`
	Attachable          bool                             `json:"attachable"`
	EligibleForWake     bool                             `json:"eligible_for_wake"`
	IneligibilityReason SessionHealthIneligibilityReason `json:"ineligibility_reason,omitempty"`
	LastActivityAt      *time.Time                       `json:"last_activity_at,omitempty"`
	LastPresenceAt      *time.Time                       `json:"last_presence_at,omitempty"`
	LastError           string                           `json:"last_error,omitempty"`
	UpdatedAt           time.Time                        `json:"updated_at"`
}

SessionHealthPayload is the metadata-only runtime health row for one session.

func SessionHealthPayloadFromDomain

func SessionHealthPayloadFromDomain(health heartbeatpkg.SessionHealth) (SessionHealthPayload, error)

SessionHealthPayloadFromDomain converts daemon-owned session health into the public DTO.

type SessionHealthResponse

type SessionHealthResponse struct {
	Health SessionHealthPayload `json:"health"`
}

SessionHealthResponse wraps one session health read model.

type SessionHealthState

type SessionHealthState string

SessionHealthState describes daemon-owned runtime state for wake eligibility.

const (
	SessionHealthStateIdle      SessionHealthState = "idle"
	SessionHealthStatePrompting SessionHealthState = "prompting"
	SessionHealthStateStopped   SessionHealthState = "stopped"
	SessionHealthStateDetached  SessionHealthState = "detached"
)

func (SessionHealthState) Valid

func (s SessionHealthState) Valid() bool

Valid reports whether the health state is a closed enum member.

func (SessionHealthState) Validate

func (s SessionHealthState) Validate() error

Validate reports an error for values outside the closed health state enum.

type SessionHealthStatus

type SessionHealthStatus string

SessionHealthStatus classifies metadata-only session health.

const (
	SessionHealthHealthy  SessionHealthStatus = "healthy"
	SessionHealthDegraded SessionHealthStatus = "degraded"
	SessionHealthStale    SessionHealthStatus = "stale"
	SessionHealthDead     SessionHealthStatus = "dead"
	SessionHealthUnknown  SessionHealthStatus = "unknown"
)

func (SessionHealthStatus) Valid

func (s SessionHealthStatus) Valid() bool

Valid reports whether the health status is a closed enum member.

func (SessionHealthStatus) Validate

func (s SessionHealthStatus) Validate() error

Validate reports an error for values outside the closed health status enum.

type SessionHistoryResponse

type SessionHistoryResponse struct {
	History []TurnHistoryPayload `json:"history"`
}

SessionHistoryResponse wraps the shared grouped turn history payload.

type SessionInputListResponse

type SessionInputListResponse struct {
	Inputs []SessionInputPayload `json:"inputs"`
}

SessionInputListResponse returns current-generation pending input in dispatch order.

type SessionInputPayload

type SessionInputPayload struct {
	ID               string                          `json:"id"`
	SessionID        string                          `json:"session_id"`
	MessageID        string                          `json:"message_id,omitempty"`
	IdempotencyKey   string                          `json:"idempotency_key,omitempty"`
	TargetTurnID     string                          `json:"target_turn_id,omitempty"`
	Status           string                          `json:"status"`
	Mode             PromptMode                      `json:"mode"`
	Delivery         PromptDelivery                  `json:"delivery"`
	Text             string                          `json:"text"`
	QueueGeneration  int64                           `json:"queue_generation"`
	EnqueuedAt       time.Time                       `json:"enqueued_at"`
	Runtime          *PromptRuntimeSelectionPayload  `json:"runtime,omitempty"`
	SkillInvocations []SessionSkillInvocationPayload `json:"skill_invocations,omitempty"`
}

SessionInputPayload is one durable operator input waiting for session dispatch.

type SessionInputResponse

type SessionInputResponse struct {
	Input SessionInputPayload `json:"input"`
}

SessionInputResponse returns one durable pending input.

type SessionInspectResponse

type SessionInspectResponse struct {
	SessionID    string                             `json:"session_id"`
	Health       SessionHealthPayload               `json:"health"`
	WakeState    *HeartbeatWakeStatePayload         `json:"wake_state,omitempty"`
	WakeEvents   []HeartbeatWakeEventPayload        `json:"wake_events,omitempty"`
	PolicyDigest string                             `json:"policy_digest,omitempty"`
	ConfigDigest string                             `json:"config_digest,omitempty"`
	Diagnostics  []AuthoredContextDiagnosticPayload `json:"diagnostics,omitempty"`
}

SessionInspectResponse returns detailed health, wake audit, and policy diagnostics.

type SessionLineagePayload

type SessionLineagePayload struct {
	ParentSessionID  string                       `json:"parent_session_id,omitempty"`
	RootSessionID    string                       `json:"root_session_id,omitempty"`
	SpawnDepth       int                          `json:"spawn_depth"`
	SpawnRole        string                       `json:"spawn_role,omitempty"`
	TTLExpiresAt     *time.Time                   `json:"ttl_expires_at,omitempty"`
	AutoStopOnParent bool                         `json:"auto_stop_on_parent"`
	SpawnBudget      SpawnBudgetPayload           `json:"spawn_budget"`
	PermissionPolicy SpawnPermissionPolicyPayload `json:"permission_policy"`
}

SessionLineagePayload exposes safe parent/child lineage metadata for spawned sessions.

func NormalizeSessionLineagePayload

func NormalizeSessionLineagePayload(payload *SessionLineagePayload) *SessionLineagePayload

NormalizeSessionLineagePayload returns a lineage payload with stable nested permission arrays.

func SessionLineagePayloadFromStore

func SessionLineagePayloadFromStore(lineage *store.SessionLineage) *SessionLineagePayload

SessionLineagePayloadFromStore converts durable session lineage metadata into the safe public payload used across daemon read surfaces.

type SessionOwner

type SessionOwner struct {
	SessionID     string `json:"session_id"`
	WorkspaceID   string `json:"workspace_id"`
	WorkspaceName string `json:"workspace_name"`
}

SessionOwner is the minimal workspace ownership projection for one session.

type SessionPayload

type SessionPayload struct {
	ID                           string                `json:"id"`
	Name                         string                `json:"name,omitempty"`
	AgentName                    string                `json:"agent_name"`
	Runtime                      SessionRuntimePayload `json:"runtime"`
	WorkspaceID                  string                `json:"workspace_id,omitempty"`
	WorkspacePath                string                `json:"workspace_path,omitempty"`
	ResolvedNetworkParticipation *participation.Spec   `json:"resolved_network_participation,omitempty"`
	Type                         session.Type          `json:"type,omitempty"`
	State                        session.State         `json:"state"`
	Badge                        session.Badge         `json:"badge"`
	Attachable                   bool                  `json:"attachable"`
	AttachedTo                   string                `json:"attached_to,omitempty"`
	AttachExpiresAt              *time.Time            `json:"attach_expires_at,omitempty"`
	TranscriptEpoch              int64                 `json:"transcript_epoch,omitempty"`
	ArchivedAt                   *time.Time            `json:"archived_at"`
	// StopReason is the session-level stop classification, distinct from AgentEventPayload.StopReason.
	StopReason store.StopReason `json:"stop_reason,omitempty"`
	// StopDetail is the session-level stop context paired with StopReason.
	StopDetail        string                       `json:"stop_detail,omitempty"`
	Failure           *SessionFailurePayload       `json:"failure,omitempty"`
	AvailableCommands []ACPAvailableCommandPayload `json:"available_commands"`
	Activity          *RuntimeActivityPayload      `json:"activity,omitempty"`
	Sandbox           *SessionSandboxPayload       `json:"sandbox,omitempty"`
	Lineage           *SessionLineagePayload       `json:"lineage,omitempty"`
	Health            *SessionHealthPayload        `json:"health,omitempty"`
	CreatedAt         time.Time                    `json:"created_at"`
	UpdatedAt         time.Time                    `json:"updated_at"`
}

SessionPayload is the shared session response payload.

type SessionPayloadHealth

type SessionPayloadHealth = SessionHealthPayload

SessionPayloadHealth attaches optional health to session list/read responses when requested.

type SessionProviderOptionPayload

type SessionProviderOptionPayload struct {
	Name            string `json:"name"`
	DisplayName     string `json:"display_name,omitempty"`
	Harness         string `json:"harness,omitempty"`
	RuntimeProvider string `json:"runtime_provider,omitempty"`
	AuthMode        string `json:"auth_mode,omitempty"`
	EnvPolicy       string `json:"env_policy,omitempty"`
	HomePolicy      string `json:"home_policy,omitempty"`
}

SessionProviderOptionPayload is one workspace-visible session provider option.

type SessionRecapResponse

type SessionRecapResponse struct {
	Recap RecapPayload `json:"recap"`
}

SessionRecapResponse wraps one deterministic session recap.

type SessionRepairActionPayload

type SessionRepairActionPayload struct {
	Code       string `json:"code"`
	TurnID     string `json:"turn_id"`
	EventID    string `json:"event_id,omitempty"`
	ToolCallID string `json:"tool_call_id,omitempty"`
	ToolName   string `json:"tool_name,omitempty"`
	Persisted  bool   `json:"persisted"`
}

SessionRepairActionPayload is one append-only repair action.

type SessionRepairIssuePayload

type SessionRepairIssuePayload struct {
	Code     string `json:"code"`
	Severity string `json:"severity"`
	TurnID   string `json:"turn_id,omitempty"`
	EventID  string `json:"event_id,omitempty"`
	Detail   string `json:"detail,omitempty"`
}

SessionRepairIssuePayload is one inconsistency found during session repair.

type SessionRepairPayload

type SessionRepairPayload struct {
	SessionID string                       `json:"session_id"`
	Issues    []SessionRepairIssuePayload  `json:"issues"`
	Actions   []SessionRepairActionPayload `json:"actions"`
	Persisted bool                         `json:"persisted"`
}

SessionRepairPayload reports one dry-run or persisted session repair pass.

type SessionRepairResponse

type SessionRepairResponse struct {
	Repair SessionRepairPayload `json:"repair"`
}

SessionRepairResponse wraps the repair report for one session.

type SessionResponse

type SessionResponse struct {
	Session SessionPayload `json:"session"`
}

SessionResponse wraps one shared session payload.

type SessionRuntimePayload

type SessionRuntimePayload struct {
	Status            session.RuntimeStatus             `json:"status"`
	Transition        session.RuntimeTransitionStrategy `json:"transition,omitempty"`
	Failure           string                            `json:"failure,omitempty"`
	Selected          *PromptRuntimeSelectionPayload    `json:"selected,omitempty"`
	SelectionRevision int64                             `json:"selection_revision"`
	Effective         *RuntimeSelectionPayload          `json:"effective,omitempty"`
	ACPSessionID      string                            `json:"acp_session_id,omitempty"`
	ACPCaps           *ACPCapsPayload                   `json:"acp_caps,omitempty"`
}

SessionRuntimePayload reports the current ACP binding and its effective runtime.

type SessionSandboxPayload

type SessionSandboxPayload struct {
	SandboxID         string          `json:"sandbox_id,omitempty"`
	Backend           string          `json:"backend,omitempty"`
	Profile           string          `json:"profile,omitempty"`
	State             string          `json:"state,omitempty"`
	InstanceID        string          `json:"instance_id,omitempty"`
	LastSyncError     string          `json:"last_sync_error,omitempty"`
	ProviderStateJSON json.RawMessage `json:"provider_state_json,omitempty"`
}

SessionSandboxPayload is the shared session sandbox response payload.

type SessionSkillInvocationPayload

type SessionSkillInvocationPayload struct {
	CommandID string               `json:"command_id"`
	Token     string               `json:"token"`
	Name      string               `json:"name"`
	Source    SessionCommandSource `json:"source"`
	Start     int                  `json:"start"`
	End       int                  `json:"end"`
}

SessionSkillInvocationPayload identifies one admitted inline skill marker.

type SessionSoulRefreshRequest

type SessionSoulRefreshRequest struct {
	ExpectedDigest string `json:"expected_digest"`
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

SessionSoulRefreshRequest refreshes an idle session Soul snapshot through body-level CAS.

type SessionStatusResponse

type SessionStatusResponse struct {
	SessionID           string                           `json:"session_id"`
	WorkspaceID         string                           `json:"workspace_id"`
	AgentName           string                           `json:"agent_name"`
	State               SessionHealthState               `json:"state"`
	Health              SessionHealthStatus              `json:"health"`
	ActivePrompt        bool                             `json:"active_prompt"`
	Attachable          bool                             `json:"attachable"`
	EligibleForWake     bool                             `json:"eligible_for_wake"`
	IneligibilityReason SessionHealthIneligibilityReason `json:"ineligibility_reason,omitempty"`
	WakeState           *HeartbeatWakeStatePayload       `json:"wake_state,omitempty"`
	UpdatedAt           time.Time                        `json:"updated_at"`
}

SessionStatusResponse returns compact session status plus wake eligibility.

type SessionStreamPayload

type SessionStreamPayload struct {
	Raw                 *SessionEventPayload           `json:"raw,omitempty"`
	TranscriptSnapshot  *TranscriptSnapshotPayload     `json:"transcript_snapshot,omitempty"`
	TranscriptDelta     *TranscriptDeltaPayload        `json:"transcript_delta,omitempty"`
	GoalSnapshotChanged *GoalSnapshotChangedPayload    `json:"goal_snapshot_changed,omitempty"`
	CommandsChanged     *SessionCommandsChangedPayload `json:"session_commands_changed,omitempty"`
	SessionStopped      *SessionEventPayload           `json:"session_stopped,omitempty"`
}

SessionStreamPayload documents the possible SSE frame payloads.

type SessionTranscriptResponse

type SessionTranscriptResponse struct {
	Entries            []transcript.Entry `json:"entries"`
	Epoch              int64              `json:"epoch"`
	Generation         int64              `json:"generation"`
	MaxSequence        int64              `json:"max_sequence"`
	HasOlder           bool               `json:"has_older"`
	NextBeforeSequence int64              `json:"next_before_sequence,omitempty"`
	Limit              int                `json:"limit"`
}

SessionTranscriptResponse wraps one bounded chronological transcript page.

type SessionUsagePayload

type SessionUsagePayload struct {
	InputTokens  *int64     `json:"input_tokens,omitempty"`
	OutputTokens *int64     `json:"output_tokens,omitempty"`
	TotalTokens  *int64     `json:"total_tokens,omitempty"`
	TotalCost    *float64   `json:"total_cost,omitempty"`
	CostCurrency string     `json:"cost_currency,omitempty"`
	CostStatus   CostStatus `json:"cost_status,omitempty"`
	CostSource   CostSource `json:"cost_source,omitempty"`
	TurnCount    int64      `json:"turn_count"`
}

SessionUsagePayload is the aggregated per-session token-usage summary sourced from the daemon's authoritative token-stats aggregate. Pointer metrics remain absent when the runtime has no truthful value.

type SessionUsageResponse

type SessionUsageResponse struct {
	Usage SessionUsagePayload `json:"usage"`
}

SessionUsageResponse wraps the aggregated token-usage summary for one session.

type SessionsResponse

type SessionsResponse struct {
	Sessions []SessionPayload `json:"sessions"`
}

SessionsResponse wraps the shared session list payload.

type SetExtensionSecretsRequest

type SetExtensionSecretsRequest struct {
	Secrets map[string]ExtensionSecretInput `json:"secrets"`
}

SetExtensionSecretsRequest updates one or more declared environment bindings.

type SetSessionRuntimeRequest

type SetSessionRuntimeRequest struct {
	Runtime          PromptRuntimeSelectionPayload `json:"runtime"`
	ExpectedRevision *int64                        `json:"expected_revision"`
}

SetSessionRuntimeRequest durably selects the default runtime for future prompts.

type SetTaskExecutionProfileRequest

type SetTaskExecutionProfileRequest = taskpkg.ExecutionProfile

SetTaskExecutionProfileRequest captures one profile replacement request.

type SettingsActionMetadataPayload

type SettingsActionMetadataPayload struct {
	Name      string                   `json:"name"`
	Available bool                     `json:"available"`
	Behavior  SettingsMutationBehavior `json:"behavior"`
}

type SettingsAgentScopeKind

type SettingsAgentScopeKind string
const (
	SettingsAgentScopeGlobal SettingsAgentScopeKind = "global"
	SettingsAgentScopeAgent  SettingsAgentScopeKind = "agent"
)

type SettingsApplyFailurePayload

type SettingsApplyFailurePayload struct {
	Subsystem  string         `json:"subsystem"`
	Diagnostic DiagnosticItem `json:"diagnostic"`
}

type SettingsApplyLifecycle

type SettingsApplyLifecycle string
const (
	SettingsApplyLifecycleLive               SettingsApplyLifecycle = "live"
	SettingsApplyLifecycleLiveAdd            SettingsApplyLifecycle = "live-add"
	SettingsApplyLifecycleLiveRemoveIfUnused SettingsApplyLifecycle = "live-remove-if-unused"
	SettingsApplyLifecycleRestartRequired    SettingsApplyLifecycle = "restart-required"
	SettingsApplyLifecycleSessionRebind      SettingsApplyLifecycle = "session-rebind"
)

type SettingsApplyNextAction

type SettingsApplyNextAction string
const (
	SettingsApplyNextActionNone          SettingsApplyNextAction = "none"
	SettingsApplyNextActionRestartDaemon SettingsApplyNextAction = "restart-daemon"
	SettingsApplyNextActionNewSession    SettingsApplyNextAction = "new-session"
	SettingsApplyNextActionRetry         SettingsApplyNextAction = "retry"
)

type SettingsApplyResponse

type SettingsApplyResponse struct {
	Section          SettingsApplyTargetName       `json:"section,omitempty"`
	Scope            SettingsScopeKind             `json:"scope,omitempty"`
	WriteTarget      SettingsWriteTargetKind       `json:"write_target,omitempty"`
	WorkspaceID      string                        `json:"workspace_id,omitempty"`
	AgentName        string                        `json:"agent_name,omitempty"`
	Applied          bool                          `json:"applied"`
	Lifecycle        SettingsApplyLifecycle        `json:"lifecycle"`
	ApplyRecordID    string                        `json:"apply_record_id"`
	ActiveGeneration int64                         `json:"active_generation"`
	ActiveConfigHash string                        `json:"active_config_hash"`
	NextAction       SettingsApplyNextAction       `json:"next_action"`
	RestartRequired  bool                          `json:"restart_required,omitempty"`
	RestartScope     string                        `json:"restart_scope,omitempty"`
	Warnings         []string                      `json:"warnings,omitempty"`
	PartialFailures  []SettingsApplyFailurePayload `json:"partial_failures,omitempty"`
	Skipped          bool                          `json:"skipped,omitempty"`
	SkippedReason    string                        `json:"skipped_reason,omitempty"`
}

type SettingsAutomationConfigPayload

type SettingsAutomationConfigPayload struct {
	Enabled           bool                            `json:"enabled"`
	Timezone          string                          `json:"timezone"`
	MaxConcurrentJobs int                             `json:"max_concurrent_jobs"`
	DefaultFireLimit  automationmodel.FireLimitConfig `json:"default_fire_limit"`
}

type SettingsAutomationResponse

type SettingsAutomationResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Config  SettingsAutomationConfigPayload  `json:"config"`
	Runtime SettingsAutomationRuntimePayload `json:"runtime"`
	Links   []SettingsOperationalLinkPayload `json:"links,omitempty"`
}

type SettingsAutomationRuntimePayload

type SettingsAutomationRuntimePayload struct {
	Available        bool       `json:"available"`
	Running          bool       `json:"running"`
	SchedulerRunning bool       `json:"scheduler_running"`
	JobTotal         int        `json:"job_total"`
	JobEnabled       int        `json:"job_enabled"`
	TriggerTotal     int        `json:"trigger_total"`
	TriggerEnabled   int        `json:"trigger_enabled"`
	NextFire         *time.Time `json:"next_fire,omitempty"`
	LastSyncedAt     *time.Time `json:"last_synced_at,omitempty"`
}

type SettingsCollectionName

type SettingsCollectionName string
const (
	SettingsCollectionProviders  SettingsCollectionName = "providers"
	SettingsCollectionMCPServers SettingsCollectionName = "mcp-servers"
	SettingsCollectionSandboxes  SettingsCollectionName = "sandboxes"
	SettingsCollectionHooks      SettingsCollectionName = "hooks"
)

type SettingsConfigPathsPayload

type SettingsConfigPathsPayload struct {
	HomeDir          string `json:"home_dir"`
	GlobalConfig     string `json:"global_config"`
	GlobalMCPSidecar string `json:"global_mcp_sidecar"`
	LogFile          string `json:"log_file"`
	DaemonInfo       string `json:"daemon_info"`
}

type SettingsCoordinatorRoleConfigPayload

type SettingsCoordinatorRoleConfigPayload struct {
	SettingsRoleConfigPayload
	TTL                           string `json:"ttl"`
	MaxChildren                   int    `json:"max_children"`
	MaxActiveSessionsPerWorkspace int    `json:"max_active_sessions_per_workspace"`
}

type SettingsDaemonPayload

type SettingsDaemonPayload struct {
	Socket               string                              `json:"socket"`
	MemoryReportInterval string                              `json:"memory_report_interval"`
	ReloadTimeouts       SettingsDaemonReloadTimeoutsPayload `json:"reload_timeouts"`
}

type SettingsDaemonReloadTimeoutsPayload

type SettingsDaemonReloadTimeoutsPayload struct {
	Providers string `json:"providers"`
	MCP       string `json:"mcp"`
	Bridges   string `json:"bridges"`
}

type SettingsDaemonRuntimePayload

type SettingsDaemonRuntimePayload struct {
	Available      bool       `json:"available"`
	Status         string     `json:"status,omitempty"`
	PID            int        `json:"pid,omitempty"`
	StartedAt      *time.Time `json:"started_at,omitempty"`
	UptimeSeconds  int64      `json:"uptime_seconds"`
	Socket         string     `json:"socket,omitempty"`
	HTTPHost       string     `json:"http_host,omitempty"`
	HTTPPort       int        `json:"http_port,omitempty"`
	ActiveSessions int        `json:"active_sessions"`
	ActiveAgents   int        `json:"active_agents"`
	TotalSessions  int        `json:"total_sessions"`
	Version        string     `json:"version,omitempty"`
}

type SettingsDefaultsPayload

type SettingsDefaultsPayload struct {
	Agent    string `json:"agent"`
	Provider string `json:"provider,omitempty"`
	Sandbox  string `json:"sandbox,omitempty"`
}

type SettingsExtensionDevPayload

type SettingsExtensionDevPayload struct {
	WatchInterval string `json:"watch_interval"`
}

type SettingsExtensionGitHubSourcePayload

type SettingsExtensionGitHubSourcePayload struct {
	Enabled bool   `json:"enabled"`
	BaseURL string `json:"base_url"`
}

type SettingsExtensionGitSourcePayload

type SettingsExtensionGitSourcePayload struct {
	Enabled bool `json:"enabled"`
}

type SettingsExtensionRateLimitPayload

type SettingsExtensionRateLimitPayload struct {
	Requests int    `json:"requests"`
	Window   string `json:"window"`
	Queue    int    `json:"queue"`
}

type SettingsExtensionResourcesPayload

type SettingsExtensionResourcesPayload struct {
	AllowedKinds           []string                          `json:"allowed_kinds,omitempty"`
	MaxScope               resources.ResourceScopeKind       `json:"max_scope,omitempty"`
	SnapshotRateLimit      SettingsExtensionRateLimitPayload `json:"snapshot_rate_limit"`
	OperatorWriteRateLimit SettingsExtensionRateLimitPayload `json:"operator_write_rate_limit"`
}

type SettingsExtensionSourcesPayload

type SettingsExtensionSourcesPayload struct {
	GitHub SettingsExtensionGitHubSourcePayload `json:"github"`
	Git    SettingsExtensionGitSourcePayload    `json:"git"`
}

type SettingsExtensionTrustPayload

type SettingsExtensionTrustPayload struct {
	AllowUnverified bool `json:"allow_unverified"`
}

type SettingsExtensionsConfigPayload

type SettingsExtensionsConfigPayload struct {
	Trust     SettingsExtensionTrustPayload     `json:"trust"`
	Sources   SettingsExtensionSourcesPayload   `json:"sources"`
	Dev       SettingsExtensionDevPayload       `json:"dev"`
	Resources SettingsExtensionResourcesPayload `json:"resources"`
}

type SettingsGeneralActionsPayload

type SettingsGeneralActionsPayload struct {
	Restart SettingsActionMetadataPayload `json:"restart"`
}

type SettingsGeneralConfigPayload

type SettingsGeneralConfigPayload struct {
	Defaults       SettingsDefaultsPayload    `json:"defaults"`
	Limits         SettingsLimitsPayload      `json:"limits"`
	Permissions    SettingsPermissionsPayload `json:"permissions"`
	SessionTimeout string                     `json:"session_timeout"`
	HTTP           SettingsHTTPPayload        `json:"http"`
	Daemon         SettingsDaemonPayload      `json:"daemon"`
	Redact         SettingsRedactPayload      `json:"redact"`
}

type SettingsGeneralResponse

type SettingsGeneralResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	ConfigPaths SettingsConfigPathsPayload    `json:"config_paths"`
	Config      SettingsGeneralConfigPayload  `json:"config"`
	Runtime     SettingsDaemonRuntimePayload  `json:"runtime"`
	Actions     SettingsGeneralActionsPayload `json:"actions"`
}

type SettingsGlobalCollectionMutationResult

type SettingsGlobalCollectionMutationResult struct {
	Section         SettingsCollectionName   `json:"section"`
	Scope           SettingsGlobalScopeKind  `json:"scope"`
	WriteTarget     SettingsWriteTargetKind  `json:"write_target,omitempty"`
	Behavior        SettingsMutationBehavior `json:"behavior"`
	Applied         bool                     `json:"applied"`
	RestartRequired bool                     `json:"restart_required"`
	RestartScope    string                   `json:"restart_scope,omitempty"`
	Warnings        []string                 `json:"warnings,omitempty"`
}

type SettingsGlobalCollectionResponseMetaPayload

type SettingsGlobalCollectionResponseMetaPayload struct {
	Collection      SettingsCollectionName    `json:"collection"`
	Scope           SettingsGlobalScopeKind   `json:"scope"`
	AvailableScopes []SettingsGlobalScopeKind `json:"available_scopes"`
}

type SettingsGlobalScopeKind

type SettingsGlobalScopeKind string
const (
	SettingsGlobalScope SettingsGlobalScopeKind = "global"
)

type SettingsGlobalSectionMutationResult

type SettingsGlobalSectionMutationResult struct {
	Section         SettingsSectionName      `json:"section"`
	Scope           SettingsGlobalScopeKind  `json:"scope"`
	WriteTarget     SettingsWriteTargetKind  `json:"write_target,omitempty"`
	Behavior        SettingsMutationBehavior `json:"behavior"`
	Applied         bool                     `json:"applied"`
	RestartRequired bool                     `json:"restart_required"`
	RestartScope    string                   `json:"restart_scope,omitempty"`
	Warnings        []string                 `json:"warnings,omitempty"`
}

type SettingsGlobalSectionResponseMetaPayload

type SettingsGlobalSectionResponseMetaPayload struct {
	Section         SettingsSectionName       `json:"section"`
	Scope           SettingsGlobalScopeKind   `json:"scope"`
	AvailableScopes []SettingsGlobalScopeKind `json:"available_scopes"`
}

type SettingsGlobalWorkspaceCollectionMutationResult

type SettingsGlobalWorkspaceCollectionMutationResult struct {
	Section         SettingsCollectionName     `json:"section"`
	Scope           SettingsWorkspaceScopeKind `json:"scope"`
	WriteTarget     SettingsWriteTargetKind    `json:"write_target,omitempty"`
	WorkspaceID     string                     `json:"workspace_id,omitempty"`
	Behavior        SettingsMutationBehavior   `json:"behavior"`
	Applied         bool                       `json:"applied"`
	RestartRequired bool                       `json:"restart_required"`
	RestartScope    string                     `json:"restart_scope,omitempty"`
	Warnings        []string                   `json:"warnings,omitempty"`
}

type SettingsGlobalWorkspaceCollectionResponseMetaPayload

type SettingsGlobalWorkspaceCollectionResponseMetaPayload struct {
	Collection      SettingsCollectionName       `json:"collection"`
	Scope           SettingsWorkspaceScopeKind   `json:"scope"`
	WorkspaceID     string                       `json:"workspace_id,omitempty"`
	AvailableScopes []SettingsWorkspaceScopeKind `json:"available_scopes"`
}

type SettingsHTTPPayload

type SettingsHTTPPayload struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

type SettingsHookDeclarationPayload

type SettingsHookDeclarationPayload struct {
	Name         string                    `json:"name"`
	Event        hookspkg.HookEvent        `json:"event"`
	Mode         hookspkg.HookMode         `json:"mode,omitempty"`
	Required     bool                      `json:"required,omitempty"`
	Enabled      *bool                     `json:"enabled,omitempty"`
	Priority     int                       `json:"priority,omitempty"`
	Timeout      string                    `json:"timeout,omitempty"`
	Matcher      hookspkg.HookMatcher      `json:"matcher"`
	ExecutorKind hookspkg.HookExecutorKind `json:"executor_kind,omitempty"`
	Command      string                    `json:"command,omitempty"`
	Args         []string                  `json:"args,omitempty"`
	Env          map[string]string         `json:"env,omitempty"`
	SecretEnv    map[string]string         `json:"secret_env,omitempty"`
	Metadata     map[string]string         `json:"metadata,omitempty"`
}

type SettingsHookItemPayload

type SettingsHookItemPayload struct {
	Name           string                         `json:"name"`
	Declaration    SettingsHookDeclarationPayload `json:"declaration"`
	SourceMetadata SettingsSourceMetadataPayload  `json:"source_metadata"`
}

type SettingsHookResponse

type SettingsHookResponse struct {
	Hook SettingsHookItemPayload `json:"hook"`
}

type SettingsHooksExtensionsResponse

type SettingsHooksExtensionsResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Hooks           []SettingsHookItemPayload           `json:"hooks,omitempty"`
	Config          SettingsExtensionsConfigPayload     `json:"config"`
	Installed       []SettingsInstalledExtensionPayload `json:"installed,omitempty"`
	TransportParity SettingsTransportParityPayload      `json:"transport_parity"`
}

type SettingsHooksResponse

type SettingsHooksResponse struct {
	SettingsGlobalCollectionResponseMetaPayload
	Hooks []SettingsHookItemPayload `json:"hooks"`
}

type SettingsInstalledExtensionPayload

type SettingsInstalledExtensionPayload struct {
	Name          string   `json:"name"`
	Version       string   `json:"version,omitempty"`
	Enabled       bool     `json:"enabled"`
	State         string   `json:"state,omitempty"`
	Health        string   `json:"health,omitempty"`
	HealthMessage string   `json:"health_message,omitempty"`
	LastError     string   `json:"last_error,omitempty"`
	RequiresEnv   []string `json:"requires_env,omitempty"`
	MissingEnv    []string `json:"missing_env,omitempty"`
}

type SettingsLimitsPayload

type SettingsLimitsPayload struct {
	MaxConcurrentAgents int `json:"max_concurrent_agents"`
}

type SettingsLogTailCapabilityPayload

type SettingsLogTailCapabilityPayload struct {
	Available bool                    `json:"available"`
	StreamURL string                  `json:"stream_url,omitempty"`
	Transport SettingsStreamTransport `json:"transport,omitempty"`
}

type SettingsMCPAuthBeginMode

type SettingsMCPAuthBeginMode string

SettingsMCPAuthBeginMode selects callback delivery for one OAuth session.

const (
	// SettingsMCPAuthBeginModeAutomatic completes through the daemon loopback callback.
	SettingsMCPAuthBeginModeAutomatic SettingsMCPAuthBeginMode = "automatic"
	// SettingsMCPAuthBeginModeManual returns a copy/paste callback without requiring a listener.
	SettingsMCPAuthBeginModeManual SettingsMCPAuthBeginMode = "manual"
)

type SettingsMCPAuthBeginRequest

type SettingsMCPAuthBeginRequest struct {
	Mode                   SettingsMCPAuthBeginMode `json:"mode"`
	ApprovedScopes         []string                 `json:"approved_scopes,omitempty"`
	ApproveScopeEscalation bool                     `json:"approve_scope_escalation,omitempty"`
}

SettingsMCPAuthBeginRequest selects automatic or manual callback delivery.

type SettingsMCPAuthBeginResponse

type SettingsMCPAuthBeginResponse struct {
	AuthorizationURL string    `json:"authorization_url"`
	State            string    `json:"state"`
	ExpiresAt        time.Time `json:"expires_at"`
	CallbackURL      string    `json:"callback_url"`
	ManualSupported  bool      `json:"manual_supported"`
}

SettingsMCPAuthBeginResponse returns the verifier-free PKCE handoff.

type SettingsMCPAuthConfigPayload

type SettingsMCPAuthConfigPayload struct {
	Registration    string   `json:"registration,omitempty"`
	IssuerURL       string   `json:"issuer_url,omitempty"`
	ClientID        string   `json:"client_id,omitempty"`
	ClientSecretRef string   `json:"client_secret_ref,omitempty"`
	Scopes          []string `json:"scopes,omitempty"`
}

type SettingsMCPAuthConfigViewPayload

type SettingsMCPAuthConfigViewPayload struct {
	Registration           string   `json:"registration,omitempty"`
	IssuerURL              string   `json:"issuer_url,omitempty"`
	ClientID               string   `json:"client_id,omitempty"`
	ClientSecretConfigured bool     `json:"client_secret_configured"`
	Scopes                 []string `json:"scopes,omitempty"`
}

SettingsMCPAuthConfigViewPayload is the public, binding-free OAuth configuration projection.

type SettingsMCPAuthExchangeRequest

type SettingsMCPAuthExchangeRequest struct {
	RedirectURL string `json:"redirect_url"`
}

SettingsMCPAuthExchangeRequest completes one login with the full redirect URL.

type SettingsMCPAuthStatusPayload

type SettingsMCPAuthStatusPayload struct {
	ServerName   string     `json:"server_name"`
	Scope        string     `json:"scope"`
	WorkspaceID  string     `json:"workspace_id,omitempty"`
	Status       string     `json:"status"`
	RemoteURL    string     `json:"remote_url,omitempty"`
	AuthType     string     `json:"auth_type,omitempty"`
	ClientID     string     `json:"client_id,omitempty"`
	Issuer       string     `json:"issuer,omitempty"`
	Scopes       []string   `json:"scopes,omitempty"`
	ExpiresAt    *time.Time `json:"expires_at,omitempty"`
	UpdatedAt    *time.Time `json:"updated_at,omitempty"`
	Refreshable  bool       `json:"refreshable"`
	TokenPresent bool       `json:"token_present"`
	Diagnostic   string     `json:"diagnostic,omitempty"`
}

type SettingsMCPCatalogInputPayload

type SettingsMCPCatalogInputPayload struct {
	Value    string `json:"value,omitempty"`
	VaultRef string `json:"vault_ref,omitempty"`
}

SettingsMCPCatalogInputPayload contains exactly one write-only catalog value or existing Vault ref.

type SettingsMCPCatalogInstallValuesPayload

type SettingsMCPCatalogInstallValuesPayload struct {
	Inputs map[string]SettingsMCPCatalogInputPayload `json:"inputs,omitempty"`
}

SettingsMCPCatalogInstallValuesPayload contains operator-supplied catalog inputs.

type SettingsMCPInstallNextStep

type SettingsMCPInstallNextStep string

SettingsMCPInstallNextStep identifies the deterministic follow-up to catalog installation.

const (
	SettingsMCPInstallNextStepNone      SettingsMCPInstallNextStep = "none"
	SettingsMCPInstallNextStepAuthorize SettingsMCPInstallNextStep = "authorize"
)

type SettingsMCPSecretPreservationPayload

type SettingsMCPSecretPreservationPayload struct {
	SecretEnv         []string `json:"secret_env,omitempty"`
	OAuthClientSecret bool     `json:"oauth_client_secret,omitempty"`
}

SettingsMCPSecretPreservationPayload identifies existing bindings to retain without exposing their refs.

type SettingsMCPSecretValuesPayload

type SettingsMCPSecretValuesPayload struct {
	SecretEnv         map[string]string `json:"secret_env,omitempty"`
	OAuthClientSecret *string           `json:"oauth_client_secret,omitempty"`
}

type SettingsMCPServerItemPayload

type SettingsMCPServerItemPayload struct {
	Name           string                                 `json:"name"`
	Transport      string                                 `json:"transport"`
	Command        string                                 `json:"command,omitempty"`
	Args           []string                               `json:"args,omitempty"`
	EnvKeys        []string                               `json:"env_keys,omitempty"`
	SecretEnvKeys  []string                               `json:"secret_env_keys,omitempty"`
	URL            string                                 `json:"url,omitempty"`
	Auth           *SettingsMCPAuthConfigViewPayload      `json:"auth,omitempty"`
	AuthStatus     *SettingsMCPAuthStatusPayload          `json:"auth_status,omitempty"`
	RuntimeStatus  *SettingsMCPServerRuntimeStatusPayload `json:"runtime_status,omitempty"`
	Scope          SettingsScopeKind                      `json:"scope"`
	WorkspaceID    string                                 `json:"workspace_id,omitempty"`
	CatalogEntry   string                                 `json:"catalog_entry,omitempty"`
	CatalogVersion string                                 `json:"catalog_version,omitempty"`
	SourceMetadata SettingsSourceMetadataPayload          `json:"source_metadata"`
}

type SettingsMCPServerPayload

type SettingsMCPServerPayload struct {
	Name      string                        `json:"name"`
	Transport string                        `json:"transport,omitempty"`
	Command   string                        `json:"command,omitempty"`
	Args      []string                      `json:"args,omitempty"`
	Env       map[string]string             `json:"env,omitempty"`
	SecretEnv map[string]string             `json:"secret_env,omitempty"`
	URL       string                        `json:"url,omitempty"`
	Auth      *SettingsMCPAuthConfigPayload `json:"auth,omitempty"`
}

type SettingsMCPServerRuntimeStatusPayload

type SettingsMCPServerRuntimeStatusPayload struct {
	Configured      bool   `json:"configured"`
	Initialized     bool   `json:"initialized"`
	State           string `json:"state"`
	Probe           string `json:"probe"`
	ToolCount       int    `json:"tool_count"`
	ProtocolVersion string `json:"protocol_version,omitempty"`
	Reason          string `json:"reason,omitempty"`
	Diagnostic      string `json:"diagnostic,omitempty"`
}

type SettingsMCPServersResponse

type SettingsMCPServersResponse struct {
	SettingsGlobalWorkspaceCollectionResponseMetaPayload
	MCPServers []SettingsMCPServerItemPayload `json:"mcp_servers"`
}

type SettingsMarketplacePayload

type SettingsMarketplacePayload struct {
	Registry string `json:"registry"`
	BaseURL  string `json:"base_url,omitempty"`
}

type SettingsMemoryActionsPayload

type SettingsMemoryActionsPayload struct {
	Consolidate SettingsActionMetadataPayload `json:"consolidate"`
}

type SettingsMemoryConfigPayload

type SettingsMemoryConfigPayload struct {
	Enabled    bool                            `json:"enabled"`
	GlobalDir  string                          `json:"global_dir,omitempty"`
	Controller SettingsMemoryControllerPayload `json:"controller"`
	Recall     SettingsMemoryRecallPayload     `json:"recall"`
	Decisions  SettingsMemoryDecisionsPayload  `json:"decisions"`
	Extractor  SettingsMemoryExtractorPayload  `json:"extractor"`
	Dream      SettingsMemoryDreamPayload      `json:"dream"`
	Session    SettingsMemorySessionPayload    `json:"session"`
	Daily      SettingsMemoryDailyPayload      `json:"daily"`
	File       SettingsMemoryFilePayload       `json:"file"`
	Provider   SettingsMemoryProviderPayload   `json:"provider"`
	Workspace  SettingsMemoryWorkspacePayload  `json:"workspace"`
}

type SettingsMemoryControllerPayload

type SettingsMemoryControllerPayload struct {
	Mode            string                                `json:"mode"`
	MaxLatency      string                                `json:"max_latency"`
	DefaultOpOnFail string                                `json:"default_op_on_fail"`
	Policy          SettingsMemoryControllerPolicyPayload `json:"policy"`
}

type SettingsMemoryControllerPolicyPayload

type SettingsMemoryControllerPolicyPayload struct {
	MaxContentChars int      `json:"max_content_chars"`
	MaxWritesPerMin int      `json:"max_writes_per_min"`
	AllowOrigins    []string `json:"allow_origins"`
}

type SettingsMemoryControllerRoleConfigPayload

type SettingsMemoryControllerRoleConfigPayload struct {
	Enabled         bool                          `json:"enabled"`
	Provider        string                        `json:"provider"`
	Model           string                        `json:"model"`
	ReasoningEffort string                        `json:"reasoning_effort"`
	Timeout         string                        `json:"timeout"`
	TopK            int                           `json:"top_k"`
	PromptVersion   string                        `json:"prompt_version"`
	MaxTokensOut    int                           `json:"max_tokens_out"`
	FallbackChain   []SettingsRoleFallbackPayload `json:"fallback_chain"`
}

type SettingsMemoryDailyPayload

type SettingsMemoryDailyPayload struct {
	MaxBytes        int64  `json:"max_bytes"`
	MaxLines        int    `json:"max_lines"`
	RotateFormat    string `json:"rotate_format"`
	DreamingWindow  int    `json:"dreaming_window"`
	ColdArchiveDays int    `json:"cold_archive_days"`
	HardDeleteDays  int    `json:"hard_delete_days"`
	MaxArchiveBytes int64  `json:"max_archive_bytes"`
	SweepHour       int    `json:"sweep_hour"`
	ArchivePath     string `json:"archive_path"`
}

type SettingsMemoryDecisionsPayload

type SettingsMemoryDecisionsPayload struct {
	PruneAfterAppliedDays int   `json:"prune_after_applied_days"`
	KeepAuditSummary      bool  `json:"keep_audit_summary"`
	MaxPostContentBytes   int64 `json:"max_post_content_bytes"`
}

type SettingsMemoryDreamGatesPayload

type SettingsMemoryDreamGatesPayload struct {
	MinUnpromoted  int     `json:"min_unpromoted"`
	MinRecallCount int     `json:"min_recall_count"`
	MinScore       float64 `json:"min_score"`
}

type SettingsMemoryDreamPayload

type SettingsMemoryDreamPayload struct {
	MinHours      float64                           `json:"min_hours"`
	MinSessions   int                               `json:"min_sessions"`
	Debounce      string                            `json:"debounce"`
	PromptVersion string                            `json:"prompt_version"`
	CheckInterval string                            `json:"check_interval"`
	Gates         SettingsMemoryDreamGatesPayload   `json:"gates"`
	Scoring       SettingsMemoryDreamScoringPayload `json:"scoring"`
}

type SettingsMemoryDreamScoringPayload

type SettingsMemoryDreamScoringPayload struct {
	RecencyHalfLifeDays int                                      `json:"recency_half_life_days"`
	Weights             SettingsMemoryDreamScoringWeightsPayload `json:"weights"`
}

type SettingsMemoryDreamScoringWeightsPayload

type SettingsMemoryDreamScoringWeightsPayload struct {
	Frequency float64 `json:"frequency"`
	Relevance float64 `json:"relevance"`
	Recency   float64 `json:"recency"`
	Freshness float64 `json:"freshness"`
}

type SettingsMemoryExtractorPayload

type SettingsMemoryExtractorPayload struct {
	Mode             string                              `json:"mode"`
	ThrottleTurns    int                                 `json:"throttle_turns"`
	Deadline         string                              `json:"deadline"`
	SandboxInboxOnly bool                                `json:"sandbox_inbox_only"`
	InboxPath        string                              `json:"inbox_path"`
	DLQPath          string                              `json:"dlq_path"`
	Queue            SettingsMemoryExtractorQueuePayload `json:"queue"`
}

type SettingsMemoryExtractorQueuePayload

type SettingsMemoryExtractorQueuePayload struct {
	Capacity    int `json:"capacity"`
	CoalesceMax int `json:"coalesce_max"`
}

type SettingsMemoryFilePayload

type SettingsMemoryFilePayload struct {
	MaxLines int   `json:"max_lines"`
	MaxBytes int64 `json:"max_bytes"`
}

type SettingsMemoryHealthPayload

type SettingsMemoryHealthPayload struct {
	Available          bool       `json:"available"`
	FileCount          int        `json:"file_count"`
	DreamEnabled       bool       `json:"dream_enabled"`
	LastConsolidatedAt *time.Time `json:"last_consolidated_at,omitempty"`
}

type SettingsMemoryProviderPayload

type SettingsMemoryProviderPayload struct {
	Name             string `json:"name"`
	Timeout          string `json:"timeout"`
	FailureThreshold int    `json:"failure_threshold"`
	Cooldown         string `json:"cooldown"`
}

type SettingsMemoryRecallFreshnessPayload

type SettingsMemoryRecallFreshnessPayload struct {
	BannerAfterDays int `json:"banner_after_days"`
}

type SettingsMemoryRecallPayload

type SettingsMemoryRecallPayload struct {
	TopK                   int                                  `json:"top_k"`
	RawCandidates          int                                  `json:"raw_candidates"`
	Fusion                 string                               `json:"fusion"`
	IncludeAlreadySurfaced bool                                 `json:"include_already_surfaced"`
	IncludeSystem          bool                                 `json:"include_system"`
	Weights                SettingsMemoryRecallWeightsPayload   `json:"weights"`
	Freshness              SettingsMemoryRecallFreshnessPayload `json:"freshness"`
	Signals                SettingsMemoryRecallSignalsPayload   `json:"signals"`
}

type SettingsMemoryRecallSignalsPayload

type SettingsMemoryRecallSignalsPayload struct {
	QueueCapacity  int `json:"queue_capacity"`
	WorkerRetryMax int `json:"worker_retry_max"`
}

type SettingsMemoryRecallWeightsPayload

type SettingsMemoryRecallWeightsPayload struct {
	BM25Unicode  float64 `json:"bm25_unicode"`
	BM25Trigram  float64 `json:"bm25_trigram"`
	Recency      float64 `json:"recency"`
	RecallSignal float64 `json:"recall_signal"`
}

type SettingsMemoryResponse

type SettingsMemoryResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Config  SettingsMemoryConfigPayload  `json:"config"`
	Health  SettingsMemoryHealthPayload  `json:"health"`
	Actions SettingsMemoryActionsPayload `json:"actions"`
}

type SettingsMemorySessionPayload

type SettingsMemorySessionPayload struct {
	LedgerFormat     string `json:"ledger_format"`
	LedgerRoot       string `json:"ledger_root"`
	EventsPurgeGrace string `json:"events_purge_grace"`
	ColdArchiveDays  int    `json:"cold_archive_days"`
	HardDeleteDays   int    `json:"hard_delete_days"`
	MaxArchiveBytes  int64  `json:"max_archive_bytes"`
	UnboundPartition string `json:"unbound_partition"`
}

type SettingsMemoryWorkspacePayload

type SettingsMemoryWorkspacePayload struct {
	TOMLPath   string `json:"toml_path"`
	AutoCreate bool   `json:"auto_create"`
}

type SettingsMutationBehavior

type SettingsMutationBehavior string
const (
	SettingsMutationBehaviorAppliedNow      SettingsMutationBehavior = "applied_now"
	SettingsMutationBehaviorRestartRequired SettingsMutationBehavior = "restart_required"
	SettingsMutationBehaviorActionTrigger   SettingsMutationBehavior = "action_trigger"
)

type SettingsNetworkConfigPayload

type SettingsNetworkConfigPayload struct {
	Enabled      bool                             `json:"enabled"`
	MaxReplayAge int                              `json:"max_replay_age"`
	Live         SettingsNetworkLiveConfigPayload `json:"live"`
}

type SettingsNetworkLiveConfigPayload

type SettingsNetworkLiveConfigPayload struct {
	Defaults SettingsNetworkLiveDefaultsPayload `json:"defaults"`
	Limits   SettingsNetworkLiveLimitsPayload   `json:"limits"`
}

type SettingsNetworkLiveDefaultsPayload

type SettingsNetworkLiveDefaultsPayload struct {
	MaxWakes         int    `json:"max_wakes"`
	MaxWakeWallTime  string `json:"max_wake_wall_time"`
	MaxTotalWallTime string `json:"max_total_wall_time"`
	MaxInputTokens   int64  `json:"max_input_tokens"`
	MaxOutputTokens  int64  `json:"max_output_tokens"`
	MaxWakeDepth     int    `json:"max_wake_depth"`
	CoalesceWindow   string `json:"coalesce_window"`
}

type SettingsNetworkLiveLimitsPayload

type SettingsNetworkLiveLimitsPayload struct {
	MaxWakes          int    `json:"max_wakes"`
	MaxWakeWallTime   string `json:"max_wake_wall_time"`
	MaxTotalWallTime  string `json:"max_total_wall_time"`
	MaxInputTokens    int64  `json:"max_input_tokens"`
	MaxOutputTokens   int64  `json:"max_output_tokens"`
	MaxWakeDepth      int    `json:"max_wake_depth"`
	MinCoalesceWindow string `json:"min_coalesce_window"`
	MaxCoalesceWindow string `json:"max_coalesce_window"`
}

type SettingsNetworkResponse

type SettingsNetworkResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Config  SettingsNetworkConfigPayload     `json:"config"`
	Runtime SettingsNetworkRuntimePayload    `json:"runtime"`
	Links   []SettingsOperationalLinkPayload `json:"links,omitempty"`
}

type SettingsNetworkRuntimePayload

type SettingsNetworkRuntimePayload struct {
	Available         bool   `json:"available"`
	Enabled           bool   `json:"enabled"`
	Status            string `json:"status,omitempty"`
	LocalPeers        int    `json:"local_peers"`
	Channels          int    `json:"channels"`
	MessagesReceived  int64  `json:"messages_received"`
	MessagesDelivered int64  `json:"messages_delivered"`
	MessagesRejected  int64  `json:"messages_rejected"`
}

type SettingsObservabilityConfigPayload

type SettingsObservabilityConfigPayload struct {
	Enabled        bool                                   `json:"enabled"`
	RetentionDays  int                                    `json:"retention_days"`
	MaxGlobalBytes int64                                  `json:"max_global_bytes"`
	Transcripts    SettingsObservabilityTranscriptPayload `json:"transcripts"`
}

type SettingsObservabilityResponse

type SettingsObservabilityResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Config  SettingsObservabilityConfigPayload  `json:"config"`
	Runtime SettingsObservabilityRuntimePayload `json:"runtime"`
	LogTail SettingsLogTailCapabilityPayload    `json:"log_tail"`
}

type SettingsObservabilityRuntimePayload

type SettingsObservabilityRuntimePayload struct {
	Available          bool   `json:"available"`
	Status             string `json:"status,omitempty"`
	GlobalDBSizeBytes  int64  `json:"global_db_size_bytes"`
	SessionDBSizeBytes int64  `json:"session_db_size_bytes"`
	ActiveSessions     int    `json:"active_sessions"`
	ActiveAgents       int    `json:"active_agents"`
	UptimeSeconds      int64  `json:"uptime_seconds"`
}

type SettingsObservabilityTranscriptPayload

type SettingsObservabilityTranscriptPayload struct {
	Enabled            bool  `json:"enabled"`
	SegmentBytes       int   `json:"segment_bytes"`
	MaxBytesPerSession int64 `json:"max_bytes_per_session"`
}

type SettingsOperationalLinkPayload

type SettingsOperationalLinkPayload struct {
	Label string `json:"label"`
	Path  string `json:"path"`
}

type SettingsPermissionMode

type SettingsPermissionMode string
const (
	SettingsPermissionModeDenyAll      SettingsPermissionMode = "deny-all"
	SettingsPermissionModeApproveReads SettingsPermissionMode = "approve-reads"
	SettingsPermissionModeApproveAll   SettingsPermissionMode = "approve-all"
)

type SettingsPermissionsPayload

type SettingsPermissionsPayload struct {
	Mode SettingsPermissionMode `json:"mode"`
}

type SettingsProviderAuthStatusPayload

type SettingsProviderAuthStatusPayload struct {
	Mode       string                         `json:"mode"`
	EnvPolicy  string                         `json:"env_policy"`
	HomePolicy string                         `json:"home_policy"`
	State      string                         `json:"state"`
	Code       string                         `json:"code,omitempty"`
	Message    string                         `json:"message,omitempty"`
	StatusCmd  string                         `json:"status_command,omitempty"`
	Login      ProviderLoginDescriptorPayload `json:"login"`
}

type SettingsProviderCredentialSlotPayload

type SettingsProviderCredentialSlotPayload struct {
	Name      string `json:"name"`
	TargetEnv string `json:"target_env"`
	SecretRef string `json:"secret_ref"`
	Kind      string `json:"kind,omitempty"`
	Required  bool   `json:"required"`
}

type SettingsProviderCredentialStatusPayload

type SettingsProviderCredentialStatusPayload struct {
	Name      string `json:"name"`
	TargetEnv string `json:"target_env"`
	SecretRef string `json:"secret_ref"`
	Kind      string `json:"kind,omitempty"`
	Required  bool   `json:"required"`
	Present   bool   `json:"present"`
	Source    string `json:"source,omitempty"`
}

type SettingsProviderFallbackPayload

type SettingsProviderFallbackPayload struct {
	Source   SettingsSourceRefPayload        `json:"source"`
	Settings SettingsProviderSettingsPayload `json:"settings"`
}

type SettingsProviderItemPayload

type SettingsProviderItemPayload struct {
	Name             string                                    `json:"name"`
	Settings         SettingsProviderSettingsPayload           `json:"settings"`
	Default          bool                                      `json:"default"`
	CommandAvailable bool                                      `json:"command_available"`
	Credentials      []SettingsProviderCredentialStatusPayload `json:"credentials,omitempty"`
	AuthStatus       *SettingsProviderAuthStatusPayload        `json:"auth_status,omitempty"`
	SourceMetadata   SettingsSourceMetadataPayload             `json:"source_metadata"`
	Fallback         *SettingsProviderFallbackPayload          `json:"fallback,omitempty"`
}

type SettingsProviderModelPayload

type SettingsProviderModelPayload struct {
	ID                       string            `json:"id"`
	DisplayName              string            `json:"display_name,omitempty"`
	ContextWindow            *int64            `json:"context_window,omitempty"`
	MaxInputTokens           *int64            `json:"max_input_tokens,omitempty"`
	MaxOutputTokens          *int64            `json:"max_output_tokens,omitempty"`
	SupportsTools            *bool             `json:"supports_tools,omitempty"`
	SupportsReasoning        *bool             `json:"supports_reasoning,omitempty"`
	ReasoningEfforts         []ReasoningEffort `json:"reasoning_efforts,omitempty"`
	DefaultReasoningEffort   ReasoningEffort   `json:"default_reasoning_effort,omitempty"`
	CostInputPerMillion      *float64          `json:"cost_input_per_million,omitempty"`
	CostOutputPerMillion     *float64          `json:"cost_output_per_million,omitempty"`
	CostCacheReadPerMillion  *float64          `json:"cost_cache_read_per_million,omitempty"`
	CostCacheWritePerMillion *float64          `json:"cost_cache_write_per_million,omitempty"`
	CostReasoningPerMillion  *float64          `json:"cost_reasoning_per_million,omitempty"`
	Deprecated               *bool             `json:"deprecated,omitempty"`
	Hidden                   *bool             `json:"hidden,omitempty"`
	Featured                 *bool             `json:"featured,omitempty"`
	ReleaseDate              string            `json:"release_date,omitempty"`
}

type SettingsProviderModelsDiscoveryPayload

type SettingsProviderModelsDiscoveryPayload struct {
	Enabled  *bool  `json:"enabled,omitempty"`
	Command  string `json:"command,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
	Timeout  string `json:"timeout,omitempty"`
}

type SettingsProviderModelsPayload

type SettingsProviderModelsPayload struct {
	Default   string                                  `json:"default,omitempty"`
	Curated   []SettingsProviderModelPayload          `json:"curated,omitempty"`
	Discovery *SettingsProviderModelsDiscoveryPayload `json:"discovery,omitempty"`
	Reasoning *SettingsProviderReasoningPayload       `json:"reasoning,omitempty"`
}

type SettingsProviderReasoningPayload

type SettingsProviderReasoningPayload struct {
	Apply string `json:"apply"`
}

type SettingsProviderResponse

type SettingsProviderResponse struct {
	Provider SettingsProviderItemPayload `json:"provider"`
}

type SettingsProviderSecretWritePayload

type SettingsProviderSecretWritePayload struct {
	Name      string `json:"name,omitempty"`
	SecretRef string `json:"secret_ref"`
	Kind      string `json:"kind,omitempty"`
	Value     string `json:"value"`
}

type SettingsProviderSettingsPayload

type SettingsProviderSettingsPayload struct {
	Command         string                                  `json:"command,omitempty"`
	DisplayName     string                                  `json:"display_name,omitempty"`
	Models          *SettingsProviderModelsPayload          `json:"models,omitempty"`
	Harness         string                                  `json:"harness,omitempty"`
	RuntimeProvider string                                  `json:"runtime_provider,omitempty"`
	Transport       string                                  `json:"transport,omitempty"`
	BaseURL         string                                  `json:"base_url,omitempty"`
	AuthMode        string                                  `json:"auth_mode,omitempty"`
	EnvPolicy       string                                  `json:"env_policy,omitempty"`
	HomePolicy      string                                  `json:"home_policy,omitempty"`
	AuthStatusCmd   string                                  `json:"auth_status_command,omitempty"`
	CredentialSlots []SettingsProviderCredentialSlotPayload `json:"credential_slots,omitempty"`
}

type SettingsProviderWritePayload

type SettingsProviderWritePayload struct {
	Command         string                                  `json:"command,omitempty"`
	DisplayName     string                                  `json:"display_name,omitempty"`
	Models          *SettingsProviderModelsPayload          `json:"models,omitempty"`
	Harness         string                                  `json:"harness,omitempty"`
	RuntimeProvider string                                  `json:"runtime_provider,omitempty"`
	Transport       string                                  `json:"transport,omitempty"`
	BaseURL         string                                  `json:"base_url,omitempty"`
	AuthMode        string                                  `json:"auth_mode,omitempty"`
	EnvPolicy       string                                  `json:"env_policy,omitempty"`
	HomePolicy      string                                  `json:"home_policy,omitempty"`
	AuthStatusCmd   string                                  `json:"auth_status_command,omitempty"`
	AuthLoginCmd    *string                                 `json:"auth_login_command,omitempty"`
	CredentialSlots []SettingsProviderCredentialSlotPayload `json:"credential_slots,omitempty"`
}

SettingsProviderWritePayload accepts auth_login_command without exposing it on reads.

type SettingsProvidersResponse

type SettingsProvidersResponse struct {
	SettingsGlobalCollectionResponseMetaPayload
	Providers []SettingsProviderItemPayload `json:"providers"`
}

type SettingsRedactPayload

type SettingsRedactPayload struct {
	Enabled bool `json:"enabled"`
}

type SettingsRoleConfigPayload

type SettingsRoleConfigPayload struct {
	Enabled         bool                          `json:"enabled"`
	Agent           string                        `json:"agent"`
	Provider        string                        `json:"provider"`
	Model           string                        `json:"model"`
	ReasoningEffort string                        `json:"reasoning_effort"`
	FallbackChain   []SettingsRoleFallbackPayload `json:"fallback_chain"`
}

type SettingsRoleFallbackPayload

type SettingsRoleFallbackPayload struct {
	Provider        string `json:"provider"`
	Model           string `json:"model"`
	ReasoningEffort string `json:"reasoning_effort"`
}

type SettingsRolesConfigPayload

type SettingsRolesConfigPayload struct {
	Coordinator       SettingsCoordinatorRoleConfigPayload      `json:"coordinator"`
	Dream             SettingsRoleConfigPayload                 `json:"dream"`
	CheckpointSummary SettingsRoleConfigPayload                 `json:"checkpoint_summary"`
	MemoryExtractor   SettingsRoleConfigPayload                 `json:"memory_extractor"`
	AutoTitle         SettingsRoleConfigPayload                 `json:"auto_title"`
	MemoryController  SettingsMemoryControllerRoleConfigPayload `json:"memory_controller"`
}

type SettingsRolesResponse

type SettingsRolesResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Config SettingsRolesConfigPayload `json:"config"`
}

type SettingsSandboxDaytonaPayload

type SettingsSandboxDaytonaPayload struct {
	APIURL      string `json:"api_url,omitempty"`
	Target      string `json:"target,omitempty"`
	Image       string `json:"image,omitempty"`
	Snapshot    string `json:"snapshot,omitempty"`
	Class       string `json:"class,omitempty"`
	AutoStop    string `json:"auto_stop,omitempty"`
	AutoArchive string `json:"auto_archive,omitempty"`
}

type SettingsSandboxItemPayload

type SettingsSandboxItemPayload struct {
	Name                string                        `json:"name"`
	Profile             SettingsSandboxProfilePayload `json:"profile"`
	WorkspaceUsageCount int                           `json:"workspace_usage_count"`
	SourceMetadata      SettingsSourceMetadataPayload `json:"source_metadata"`
}

type SettingsSandboxNetworkPayload

type SettingsSandboxNetworkPayload struct {
	AllowPublicIngress bool     `json:"allow_public_ingress,omitempty"`
	AllowOutbound      bool     `json:"allow_outbound,omitempty"`
	AllowList          []string `json:"allow_list,omitempty"`
	DenyList           []string `json:"deny_list,omitempty"`
	Required           bool     `json:"required,omitempty"`
}

type SettingsSandboxProfilePayload

type SettingsSandboxProfilePayload struct {
	Backend     string                         `json:"backend"`
	SyncMode    string                         `json:"sync_mode,omitempty"`
	Persistence string                         `json:"persistence,omitempty"`
	RuntimeRoot string                         `json:"runtime_root,omitempty"`
	Env         map[string]string              `json:"env,omitempty"`
	SecretEnv   map[string]string              `json:"secret_env,omitempty"`
	Network     *SettingsSandboxNetworkPayload `json:"network,omitempty"`
	Daytona     *SettingsSandboxDaytonaPayload `json:"daytona,omitempty"`
}

type SettingsSandboxResponse

type SettingsSandboxResponse struct {
	Sandbox SettingsSandboxItemPayload `json:"sandbox"`
}

type SettingsSandboxesResponse

type SettingsSandboxesResponse struct {
	SettingsGlobalCollectionResponseMetaPayload
	Sandboxes []SettingsSandboxItemPayload `json:"sandboxes"`
}

type SettingsScopeKind

type SettingsScopeKind string
const (
	SettingsScopeGlobal    SettingsScopeKind = "global"
	SettingsScopeWorkspace SettingsScopeKind = "workspace"
	SettingsScopeAgent     SettingsScopeKind = "agent"
)

type SettingsSectionName

type SettingsSectionName string
const (
	SettingsSectionGeneral         SettingsSectionName = "general"
	SettingsSectionMemory          SettingsSectionName = "memory"
	SettingsSectionRoles           SettingsSectionName = "roles"
	SettingsSectionSkills          SettingsSectionName = "skills"
	SettingsSectionAutomation      SettingsSectionName = "automation"
	SettingsSectionNetwork         SettingsSectionName = "network"
	SettingsSectionWindowManager   SettingsSectionName = "window-manager"
	SettingsSectionObservability   SettingsSectionName = "observability"
	SettingsSectionHooksExtensions SettingsSectionName = "hooks-extensions"
)

type SettingsSkillsConfigPayload

type SettingsSkillsConfigPayload struct {
	Enabled                 bool                       `json:"enabled"`
	DisabledSkills          []string                   `json:"disabled_skills,omitempty"`
	PollInterval            string                     `json:"poll_interval"`
	AllowedMarketplaceMCP   []string                   `json:"allowed_marketplace_mcp,omitempty"`
	AllowedMarketplaceHooks []string                   `json:"allowed_marketplace_hooks,omitempty"`
	Marketplace             SettingsMarketplacePayload `json:"marketplace"`
}

type SettingsSkillsMutationResult

type SettingsSkillsMutationResult struct {
	Section         SettingsSectionName      `json:"section"`
	Scope           SettingsAgentScopeKind   `json:"scope"`
	WriteTarget     SettingsWriteTargetKind  `json:"write_target,omitempty"`
	WorkspaceID     string                   `json:"workspace_id,omitempty"`
	AgentName       string                   `json:"agent_name,omitempty"`
	Behavior        SettingsMutationBehavior `json:"behavior"`
	Applied         bool                     `json:"applied"`
	RestartRequired bool                     `json:"restart_required"`
	RestartScope    string                   `json:"restart_scope,omitempty"`
	Warnings        []string                 `json:"warnings,omitempty"`
}

type SettingsSkillsResponse

type SettingsSkillsResponse struct {
	SettingsSkillsSectionResponseMetaPayload
	Config           SettingsSkillsConfigPayload      `json:"config"`
	DiscoveredCount  int                              `json:"discovered_count"`
	DisabledCount    int                              `json:"disabled_count"`
	RuntimeAvailable bool                             `json:"runtime_available"`
	Diagnostics      []SkillDiagnosticPayload         `json:"diagnostics,omitempty"`
	Links            []SettingsOperationalLinkPayload `json:"links,omitempty"`
}

type SettingsSkillsSectionResponseMetaPayload

type SettingsSkillsSectionResponseMetaPayload struct {
	Section         SettingsSectionName      `json:"section"`
	Scope           SettingsAgentScopeKind   `json:"scope"`
	WorkspaceID     string                   `json:"workspace_id,omitempty"`
	AgentName       string                   `json:"agent_name,omitempty"`
	AvailableScopes []SettingsAgentScopeKind `json:"available_scopes"`
}

type SettingsSourceKind

type SettingsSourceKind string
const (
	SettingsSourceBuiltinProvider     SettingsSourceKind = "builtin-provider"
	SettingsSourceGlobalConfig        SettingsSourceKind = "global-config"
	SettingsSourceWorkspaceConfig     SettingsSourceKind = "workspace-config"
	SettingsSourceGlobalMCPSidecar    SettingsSourceKind = "global-mcp-sidecar"
	SettingsSourceWorkspaceMCPSidecar SettingsSourceKind = "workspace-mcp-sidecar"
	SettingsSourceGlobalAgentFile     SettingsSourceKind = "global-agent-file"
	SettingsSourceWorkspaceAgentFile  SettingsSourceKind = "workspace-agent-file"
)

type SettingsSourceMetadataPayload

type SettingsSourceMetadataPayload struct {
	EffectiveSource  SettingsSourceRefPayload   `json:"effective_source"`
	ShadowedSources  []SettingsSourceRefPayload `json:"shadowed_sources,omitempty"`
	AvailableTargets []SettingsWriteTargetKind  `json:"available_targets"`
}

type SettingsSourceRefPayload

type SettingsSourceRefPayload struct {
	Kind        SettingsSourceKind `json:"kind"`
	Scope       SettingsScopeKind  `json:"scope"`
	WorkspaceID string             `json:"workspace_id,omitempty"`
	AgentName   string             `json:"agent_name,omitempty"`
}

type SettingsStreamTransport

type SettingsStreamTransport string
const (
	SettingsStreamTransportSSE SettingsStreamTransport = "sse"
)

type SettingsTargetSelector

type SettingsTargetSelector string
const (
	SettingsTargetAuto    SettingsTargetSelector = "auto"
	SettingsTargetConfig  SettingsTargetSelector = "config"
	SettingsTargetSidecar SettingsTargetSelector = "sidecar"
)

type SettingsTransportParityPayload

type SettingsTransportParityPayload struct {
	Known          bool `json:"known"`
	SettingsHTTP   bool `json:"settings_http"`
	SettingsUDS    bool `json:"settings_uds"`
	ExtensionsHTTP bool `json:"extensions_http"`
	ExtensionsUDS  bool `json:"extensions_uds"`
}

type SettingsUpdateResponse

type SettingsUpdateResponse struct {
	Supported      bool                     `json:"supported"`
	Managed        bool                     `json:"managed"`
	InstallMethod  string                   `json:"install_method"`
	CurrentVersion string                   `json:"current_version"`
	LatestVersion  string                   `json:"latest_version,omitempty"`
	Available      bool                     `json:"available"`
	Status         SettingsUpdateStatusKind `json:"status"`
	Recommendation string                   `json:"recommendation,omitempty"`
	ReleaseURL     string                   `json:"release_url,omitempty"`
	CheckedAt      *time.Time               `json:"checked_at,omitempty"`
	LastError      string                   `json:"last_error,omitempty"`
}

type SettingsUpdateStatusKind

type SettingsUpdateStatusKind string
const (
	SettingsUpdateStatusCurrent     SettingsUpdateStatusKind = "current"
	SettingsUpdateStatusAvailable   SettingsUpdateStatusKind = "available"
	SettingsUpdateStatusUpdated     SettingsUpdateStatusKind = "updated"
	SettingsUpdateStatusDeferred    SettingsUpdateStatusKind = "deferred"
	SettingsUpdateStatusUnsupported SettingsUpdateStatusKind = "unsupported"
	SettingsUpdateStatusFailed      SettingsUpdateStatusKind = "failed"
)

type SettingsWindowBindingAction

type SettingsWindowBindingAction string
const (
	SettingsWindowBindingActionNone     SettingsWindowBindingAction = "none"
	SettingsWindowBindingActionReserved SettingsWindowBindingAction = "reserved"
	SettingsWindowBindingActionZoom     SettingsWindowBindingAction = "zoom"
)

type SettingsWindowDesktopTransition

type SettingsWindowDesktopTransition string
const (
	SettingsWindowDesktopTransitionSlide     SettingsWindowDesktopTransition = "slide"
	SettingsWindowDesktopTransitionCrossfade SettingsWindowDesktopTransition = "crossfade"
	SettingsWindowDesktopTransitionInstant   SettingsWindowDesktopTransition = "instant"
)

type SettingsWindowDragAwayPolicy

type SettingsWindowDragAwayPolicy string
const (
	SettingsWindowDragAwayPolicyWindow SettingsWindowDragAwayPolicy = "window"
	SettingsWindowDragAwayPolicyGroup  SettingsWindowDragAwayPolicy = "group"
)

type SettingsWindowDragModifier

type SettingsWindowDragModifier string
const (
	SettingsWindowDragModifierAlt     SettingsWindowDragModifier = "alt"
	SettingsWindowDragModifierControl SettingsWindowDragModifier = "control"
	SettingsWindowDragModifierMeta    SettingsWindowDragModifier = "meta"
	SettingsWindowDragModifierShift   SettingsWindowDragModifier = "shift"
	SettingsWindowDragModifierNone    SettingsWindowDragModifier = "none"
)

type SettingsWindowFocusPolicy

type SettingsWindowFocusPolicy string
const (
	SettingsWindowFocusPolicyClickDirectional SettingsWindowFocusPolicy = "click_directional"
	SettingsWindowFocusPolicyDirectional      SettingsWindowFocusPolicy = "directional"
)

type SettingsWindowManagerBindingPayload

type SettingsWindowManagerBindingPayload struct {
	TopCenter    SettingsWindowBindingAction `json:"top_center"`
	BottomCenter SettingsWindowBindingAction `json:"bottom_center"`
}

type SettingsWindowManagerConfigPayload

type SettingsWindowManagerConfigPayload struct {
	NewWindowPolicy     SettingsWindowNewPolicy             `json:"new_window_policy"`
	SmallViewportPolicy SettingsWindowSmallViewportPolicy   `json:"small_viewport_policy"`
	FocusPolicy         SettingsWindowFocusPolicy           `json:"focus_policy"`
	FocusWrap           bool                                `json:"focus_wrap"`
	FocusFollowsPointer bool                                `json:"focus_follows_pointer"`
	RaiseOnFocus        bool                                `json:"raise_on_focus"`
	DragAwayPolicy      SettingsWindowDragAwayPolicy        `json:"drag_away_policy"`
	GroupMoveModifier   SettingsWindowDragModifier          `json:"group_move_modifier"`
	SwapModifier        SettingsWindowDragModifier          `json:"swap_modifier"`
	HistoryLimit        int                                 `json:"history_limit"`
	NavStackLimit       int                                 `json:"nav_stack_limit"`
	ClosedEntryLimit    int                                 `json:"closed_entry_limit"`
	DesktopTransition   SettingsWindowDesktopTransition     `json:"desktop_transition"`
	Gaps                SettingsWindowManagerGapsPayload    `json:"gaps"`
	Snap                SettingsWindowManagerSnapPayload    `json:"snap"`
	Bindings            SettingsWindowManagerBindingPayload `json:"bindings"`
	Shortcuts           map[string]string                   `json:"shortcuts"`
}

type SettingsWindowManagerGapsPayload

type SettingsWindowManagerGapsPayload struct {
	Inner  int `json:"inner"`
	Top    int `json:"top"`
	Right  int `json:"right"`
	Bottom int `json:"bottom"`
	Left   int `json:"left"`
}

type SettingsWindowManagerResponse

type SettingsWindowManagerResponse struct {
	SettingsGlobalSectionResponseMetaPayload
	Config SettingsWindowManagerConfigPayload `json:"config"`
}

type SettingsWindowManagerSnapPayload

type SettingsWindowManagerSnapPayload struct {
	EdgeBand     int       `json:"edge_band"`
	CornerReach  int       `json:"corner_reach"`
	ExitSlack    int       `json:"exit_slack"`
	RepeatRatios []float64 `json:"repeat_ratios"`
}

type SettingsWindowNewPolicy

type SettingsWindowNewPolicy string
const (
	SettingsWindowNewPolicyFloating    SettingsWindowNewPolicy = "floating"
	SettingsWindowNewPolicyBesideFocus SettingsWindowNewPolicy = "beside_focus"
)

type SettingsWindowSmallViewportPolicy

type SettingsWindowSmallViewportPolicy string
const (
	SettingsWindowSmallViewportPolicyStack  SettingsWindowSmallViewportPolicy = "stack"
	SettingsWindowSmallViewportPolicyReject SettingsWindowSmallViewportPolicy = "reject"
)

type SettingsWorkspaceScopeKind

type SettingsWorkspaceScopeKind string
const (
	SettingsWorkspaceScopeGlobal    SettingsWorkspaceScopeKind = "global"
	SettingsWorkspaceScopeWorkspace SettingsWorkspaceScopeKind = "workspace"
)

type SettingsWriteTargetKind

type SettingsWriteTargetKind string
const (
	SettingsWriteTargetGlobalConfig        SettingsWriteTargetKind = "global-config"
	SettingsWriteTargetWorkspaceConfig     SettingsWriteTargetKind = "workspace-config"
	SettingsWriteTargetGlobalMCPSidecar    SettingsWriteTargetKind = "global-mcp-sidecar"
	SettingsWriteTargetWorkspaceMCPSidecar SettingsWriteTargetKind = "workspace-mcp-sidecar"
	SettingsWriteTargetGlobalAgentFile     SettingsWriteTargetKind = "global-agent-file"
	SettingsWriteTargetWorkspaceAgentFile  SettingsWriteTargetKind = "workspace-agent-file"
)

type SkillActionResponse

type SkillActionResponse struct {
	OK bool `json:"ok"`
}

SkillActionResponse is the shared skill enable/disable response payload.

type SkillActivationPayload

type SkillActivationPayload struct {
	Active  bool                           `json:"active"`
	Reasons []SkillActivationReasonPayload `json:"reasons,omitempty"`
}

SkillActivationPayload reports whether a skill can activate and why it cannot.

type SkillActivationReasonCode

type SkillActivationReasonCode string

SkillActivationReasonCode identifies a machine-stable reason a skill cannot activate.

const (
	// SkillActivationReasonPlatformMismatch means the current platform fails the skill gate.
	SkillActivationReasonPlatformMismatch SkillActivationReasonCode = "platform_mismatch"
	// SkillActivationReasonEnvironmentContextUnavailable means environment facts could not be evaluated.
	SkillActivationReasonEnvironmentContextUnavailable SkillActivationReasonCode = "environment_context_unavailable"
	// SkillActivationReasonEnvironmentMismatch means the current environment fails the skill gate.
	SkillActivationReasonEnvironmentMismatch SkillActivationReasonCode = "environment_mismatch"
	// SkillActivationReasonToolContextUnavailable means installed-tool facts could not be evaluated.
	SkillActivationReasonToolContextUnavailable SkillActivationReasonCode = "tool_context_unavailable"
	// SkillActivationReasonMissingTool means one or more required tools are unavailable.
	SkillActivationReasonMissingTool SkillActivationReasonCode = "missing_tool"
	// SkillActivationReasonCapabilityContextUnavailable means capability facts could not be evaluated.
	SkillActivationReasonCapabilityContextUnavailable SkillActivationReasonCode = "capability_context_unavailable"
	// SkillActivationReasonMissingCapability means one or more required capabilities are unavailable.
	SkillActivationReasonMissingCapability SkillActivationReasonCode = "missing_capability"
)

type SkillActivationReasonPayload

type SkillActivationReasonPayload struct {
	Gate string `json:"gate"`
	// Code is the machine-stable reason identifier.
	Code SkillActivationReasonCode `json:"code"`
	// Missing lists the required tools or capabilities absent for applicable reason codes.
	Missing []string `json:"missing,omitempty"`
	// Message is operator-facing diagnostic text and is not a stable identifier.
	Message string `json:"message"`
}

SkillActivationReasonPayload describes one failed activation gate.

type SkillContentResponse

type SkillContentResponse struct {
	Content string `json:"content"`
}

SkillContentResponse is the explicit response type for one skill body.

type SkillDiagnosticPayload

type SkillDiagnosticPayload struct {
	Name               string                            `json:"name"`
	State              SkillDiagnosticState              `json:"state"`
	Source             string                            `json:"source,omitempty"`
	Path               string                            `json:"path,omitempty"`
	WinningSource      string                            `json:"winning_source,omitempty"`
	WinningPath        string                            `json:"winning_path,omitempty"`
	VerificationStatus SkillVerificationStatus           `json:"verification_status"`
	Warnings           []SkillVerificationWarningPayload `json:"warnings,omitempty"`
	Failure            *SkillVerificationFailurePayload  `json:"failure,omitempty"`
	ActivationReasons  []SkillActivationReasonPayload    `json:"activation_reasons,omitempty"`
}

type SkillDiagnosticState

type SkillDiagnosticState string
const (
	SkillDiagnosticStateValid              SkillDiagnosticState = "valid"
	SkillDiagnosticStateShadowed           SkillDiagnosticState = "shadowed"
	SkillDiagnosticStateVerificationFailed SkillDiagnosticState = "verification_failed"
	SkillDiagnosticStateInactive           SkillDiagnosticState = "inactive"
)

type SkillMarketplaceCleanupDiagnosticPayload

type SkillMarketplaceCleanupDiagnosticPayload struct {
	Operation string `json:"operation"`
}

SkillMarketplaceCleanupDiagnosticPayload identifies cleanup degradation after a successful mutation.

type SkillMarketplaceInstallPayload

type SkillMarketplaceInstallPayload struct {
	Name               string                                     `json:"name"`
	Slug               string                                     `json:"slug"`
	Version            string                                     `json:"version,omitempty"`
	Registry           string                                     `json:"registry"`
	Path               string                                     `json:"path"`
	Hash               string                                     `json:"hash"`
	Status             string                                     `json:"status"`
	CleanupDiagnostics []SkillMarketplaceCleanupDiagnosticPayload `json:"cleanup_diagnostics,omitempty"`
}

SkillMarketplaceInstallPayload describes one completed marketplace install.

type SkillMarketplaceInstallRequest

type SkillMarketplaceInstallRequest struct {
	Slug    string `json:"slug"`
	Version string `json:"version,omitempty"`
}

SkillMarketplaceInstallRequest installs one remote marketplace skill.

type SkillMarketplaceInstallResponse

type SkillMarketplaceInstallResponse struct {
	Skill SkillMarketplaceInstallPayload `json:"skill"`
}

SkillMarketplaceInstallResponse wraps one marketplace install result.

type SkillMarketplaceRemovePayload

type SkillMarketplaceRemovePayload struct {
	Name   string `json:"name"`
	Slug   string `json:"slug"`
	Path   string `json:"path"`
	Status string `json:"status"`
}

SkillMarketplaceRemovePayload describes one removed marketplace skill.

type SkillMarketplaceRemoveResponse

type SkillMarketplaceRemoveResponse struct {
	Skill SkillMarketplaceRemovePayload `json:"skill"`
}

SkillMarketplaceRemoveResponse wraps one marketplace removal result.

type SkillMarketplaceUpdatePayload

type SkillMarketplaceUpdatePayload struct {
	Name               string                                     `json:"name"`
	Slug               string                                     `json:"slug"`
	CurrentVersion     string                                     `json:"current_version,omitempty"`
	LatestVersion      string                                     `json:"latest_version,omitempty"`
	Path               string                                     `json:"path"`
	Status             string                                     `json:"status"`
	CleanupDiagnostics []SkillMarketplaceCleanupDiagnosticPayload `json:"cleanup_diagnostics,omitempty"`
}

SkillMarketplaceUpdatePayload describes one marketplace update outcome.

type SkillMarketplaceUpdateRequest

type SkillMarketplaceUpdateRequest struct {
	Name      string `json:"name,omitempty"`
	All       bool   `json:"all,omitempty"`
	CheckOnly bool   `json:"check_only,omitempty"`
}

SkillMarketplaceUpdateRequest checks or applies updates for marketplace skills.

type SkillMarketplaceUpdateResponse

type SkillMarketplaceUpdateResponse struct {
	Skills []SkillMarketplaceUpdatePayload `json:"skills"`
}

SkillMarketplaceUpdateResponse wraps marketplace update results.

type SkillPayload

type SkillPayload struct {
	Name        string                   `json:"name"`
	Description string                   `json:"description"`
	Version     string                   `json:"version,omitempty"`
	Source      string                   `json:"source"`
	Enabled     bool                     `json:"enabled"`
	Activation  SkillActivationPayload   `json:"activation"`
	Dir         string                   `json:"dir"`
	Metadata    map[string]any           `json:"metadata,omitempty"`
	Provenance  *ProvenancePayload       `json:"provenance,omitempty"`
	Diagnostics []SkillDiagnosticPayload `json:"diagnostics,omitempty"`
}

SkillPayload is the HTTP response type for a skill.

type SkillResponse

type SkillResponse struct {
	Skill SkillPayload `json:"skill"`
}

SkillResponse wraps one shared skill payload.

type SkillRuntimeStatusPayload

type SkillRuntimeStatusPayload struct {
	RuntimeAvailable bool                     `json:"runtime_available"`
	DiscoveredCount  int                      `json:"discovered_count"`
	DisabledCount    int                      `json:"disabled_count"`
	Diagnostics      []SkillDiagnosticPayload `json:"diagnostics,omitempty"`
}

SkillRuntimeStatusPayload summarizes the skill registry's availability.

type SkillShadowEntryPayload

type SkillShadowEntryPayload struct {
	Path             string    `json:"path"`
	Tier             string    `json:"tier"`
	ResolvedToWinner bool      `json:"resolved_to_winner"`
	DetectedAt       time.Time `json:"detected_at"`
}

type SkillShadowsResponse

type SkillShadowsResponse struct {
	Name    string                    `json:"name"`
	Winner  SkillShadowEntryPayload   `json:"winner"`
	Shadows []SkillShadowEntryPayload `json:"shadows"`
}

SkillShadowsResponse wraps the resolver shadow evidence for one skill name.

type SkillVerificationFailurePayload

type SkillVerificationFailurePayload struct {
	Code         string `json:"code"`
	Message      string `json:"message"`
	ExpectedHash string `json:"expected_hash,omitempty"`
	ActualHash   string `json:"actual_hash,omitempty"`
}

type SkillVerificationStatus

type SkillVerificationStatus string
const (
	SkillVerificationStatusPassed  SkillVerificationStatus = "passed"
	SkillVerificationStatusWarning SkillVerificationStatus = "warning"
	SkillVerificationStatusFailed  SkillVerificationStatus = "failed"
)

type SkillVerificationWarningPayload

type SkillVerificationWarningPayload struct {
	Severity string `json:"severity"`
	Pattern  string `json:"pattern,omitempty"`
	Message  string `json:"message"`
}

type SkillsResponse

type SkillsResponse struct {
	Skills []SkillPayload `json:"skills"`
}

SkillsResponse wraps the shared skill list payload.

type SlackAppManifestResponse

type SlackAppManifestResponse struct {
	Manifest bridgepkg.SlackAppManifest `json:"manifest"`
}

SlackAppManifestResponse wraps one generated Slack app manifest.

type SpawnBudgetPayload

type SpawnBudgetPayload struct {
	MaxChildren           int   `json:"max_children"`
	MaxDepth              int   `json:"max_depth"`
	TTLSeconds            int64 `json:"ttl_seconds"`
	MaxActivePerWorkspace int   `json:"max_active_per_workspace,omitempty"`
}

SpawnBudgetPayload is the transport read model for bounded spawn limits.

type SpawnPermissionPolicyPayload

type SpawnPermissionPolicyPayload struct {
	Tools           []string `json:"tools"`
	Skills          []string `json:"skills"`
	MCPServers      []string `json:"mcp_servers"`
	WorkspacePaths  []string `json:"workspace_paths"`
	NetworkChannels []string `json:"network_channels"`
	SandboxProfiles []string `json:"sandbox_profiles"`
}

SpawnPermissionPolicyPayload captures concrete permission atoms available to a spawned session.

func NormalizeSpawnPermissionPolicyPayload

func NormalizeSpawnPermissionPolicyPayload(payload SpawnPermissionPolicyPayload) SpawnPermissionPolicyPayload

NormalizeSpawnPermissionPolicyPayload returns a permission policy with stable empty arrays.

type Speed

type Speed = speedpkg.Speed

Speed is the provider-neutral runtime speed vocabulary.

type SpeedResolution

type SpeedResolution = speedpkg.Resolution

SpeedResolution is the confirmed ACP speed outcome.

type SpeedResolutionReason

type SpeedResolutionReason = speedpkg.ResolutionReason

SpeedResolutionReason explains a non-applied ACP speed outcome.

type SpeedResolutionStatus

type SpeedResolutionStatus = speedpkg.ResolutionStatus

SpeedResolutionStatus is the confirmed ACP speed outcome state.

type StartTaskRunRequest

type StartTaskRunRequest struct {
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

StartTaskRunRequest is the shared run-start request payload.

type StatusPayload

type StatusPayload struct {
	SchemaVersion    string                           `json:"schema_version"`
	GeneratedAt      time.Time                        `json:"generated_at"`
	Daemon           DaemonStatusPayload              `json:"daemon"`
	Sessions         SessionAggregatePayload          `json:"sessions"`
	SubprocessHealth SubprocessHealthAggregatePayload `json:"subprocess_health"`
	Health           ObserveHealthPayload             `json:"health"`
	Memory           MemoryHealthPayload              `json:"memory"`
	Automation       AutomationHealthPayload          `json:"automation"`
	Tasks            TaskHealthPayload                `json:"tasks"`
	Bridges          BridgeAggregateHealthPayload     `json:"bridges"`
	Providers        []ProviderStatusPayload          `json:"providers,omitempty"`
	MCPServers       []MCPServerStatusPayload         `json:"mcp_servers,omitempty"`
	Skills           SkillRuntimeStatusPayload        `json:"skills"`
	Config           ConfigRuntimeStatusPayload       `json:"config"`
	LogTail          LogTailStatusPayload             `json:"log_tail"`
}

StatusPayload is the hard-cut runtime status surface shared by HTTP, UDS, and CLI JSON.

type SteerPromptRequest

type SteerPromptRequest struct {
	Text           string `json:"text"`
	MessageID      string `json:"message_id"`
	IdempotencyKey string `json:"idempotency_key"`
	ExpectedTurnID string `json:"expected_turn_id"`
}

SteerPromptRequest captures replacement guidance for a fenced active session turn.

func (SteerPromptRequest) Validate

func (r SteerPromptRequest) Validate() error

Validate checks the required identity and authored text for steering input.

type StuckTaskRunPayload

type StuckTaskRunPayload struct {
	TaskID     string `json:"task_id"`
	RunID      string `json:"run_id"`
	Status     string `json:"status"`
	OriginKind string `json:"origin_kind"`
	ChannelID  string `json:"channel_id,omitempty"`
	SessionID  string `json:"session_id,omitempty"`
	AgeMillis  int64  `json:"age_ms"`
}

type SubmitTaskRunReviewVerdictRequest

type SubmitTaskRunReviewVerdictRequest struct {
	RunID   string                   `json:"run_id"`
	Verdict taskpkg.RunReviewVerdict `json:"verdict"`
}

SubmitTaskRunReviewVerdictRequest captures one persisted reviewer verdict write.

type SubprocessHealthAggregatePayload

type SubprocessHealthAggregatePayload struct {
	Status    string                           `json:"status"`
	Monitored int                              `json:"monitored"`
	Healthy   int                              `json:"healthy"`
	Unhealthy int                              `json:"unhealthy"`
	Sessions  []SubprocessHealthSessionPayload `json:"sessions,omitempty"`
}

SubprocessHealthAggregatePayload summarizes active ACP subprocess health.

type SubprocessHealthSessionPayload

type SubprocessHealthSessionPayload struct {
	SessionID           string     `json:"session_id"`
	WorkspaceID         string     `json:"workspace_id"`
	AgentName           string     `json:"agent_name"`
	ConsecutiveFailures int        `json:"consecutive_failures"`
	LastCheckedAt       *time.Time `json:"last_checked_at,omitempty"`
	Reason              string     `json:"reason,omitempty"`
}

SubprocessHealthSessionPayload identifies one active session with a failed verdict.

type SupportBundleManifestArtifactPayload

type SupportBundleManifestArtifactPayload struct {
	Path             string `json:"path"`
	Included         bool   `json:"included"`
	OmittedReason    string `json:"omitted_reason,omitempty"`
	Bytes            int64  `json:"bytes"`
	Truncated        bool   `json:"truncated"`
	RedactionVersion string `json:"redaction_version,omitempty"`
}

type SupportBundleManifestPayload

type SupportBundleManifestPayload struct {
	SchemaVersion        string                                 `json:"schema_version"`
	OperationID          string                                 `json:"operation_id"`
	CreatedAt            time.Time                              `json:"created_at"`
	BundleMaxBytes       int64                                  `json:"bundle_max_bytes"`
	ArtifactMaxBytes     int64                                  `json:"artifact_max_bytes"`
	LogTailMaxBytes      int64                                  `json:"log_tail_max_bytes"`
	EventSummaryMaxBytes int64                                  `json:"event_summary_max_bytes"`
	RedactionVersion     string                                 `json:"redaction_version"`
	Artifacts            []SupportBundleManifestArtifactPayload `json:"artifacts"`
}

type SupportBundleOperationPayload

type SupportBundleOperationPayload struct {
	OperationID   string                        `json:"operation_id"`
	Status        string                        `json:"status"`
	StatusURL     string                        `json:"status_url"`
	DownloadURL   string                        `json:"download_url,omitempty"`
	FileName      string                        `json:"file_name,omitempty"`
	SizeBytes     int64                         `json:"size_bytes,omitempty"`
	Manifest      *SupportBundleManifestPayload `json:"manifest,omitempty"`
	FailureReason string                        `json:"failure_reason,omitempty"`
	CreatedAt     time.Time                     `json:"created_at"`
	UpdatedAt     time.Time                     `json:"updated_at"`
	CompletedAt   *time.Time                    `json:"completed_at,omitempty"`
}

type SupportBundleOperationResponse

type SupportBundleOperationResponse struct {
	Operation SupportBundleOperationPayload `json:"operation"`
}

type TaskBlockPayload

type TaskBlockPayload struct {
	ID          string                 `json:"id"`
	TaskID      string                 `json:"task_id"`
	WorkspaceID string                 `json:"workspace_id,omitempty"`
	Kind        taskpkg.BlockKind      `json:"kind"`
	Reason      string                 `json:"reason"`
	Details     json.RawMessage        `json:"details,omitempty"`
	CreatedAt   time.Time              `json:"created_at"`
	CreatedBy   taskpkg.ActorIdentity  `json:"created_by"`
	ExpiresAt   *time.Time             `json:"expires_at,omitempty"`
	ClearedAt   *time.Time             `json:"cleared_at,omitempty"`
	ClearedBy   *taskpkg.ActorIdentity `json:"cleared_by,omitempty"`
	ClearNote   string                 `json:"clear_note,omitempty"`
}

TaskBlockPayload is the public task-block read model.

type TaskBlockResponse

type TaskBlockResponse struct {
	Block TaskBlockPayload `json:"block"`
}

TaskBlockResponse wraps one task-block payload.

type TaskBlocksResponse

type TaskBlocksResponse struct {
	Blocks []TaskBlockPayload `json:"blocks"`
}

TaskBlocksResponse wraps a task-block list.

type TaskBridgeNotificationCursorPayload

type TaskBridgeNotificationCursorPayload struct {
	Scope           notifications.ScopeRef `json:"scope"`
	ConsumerID      string                 `json:"consumer_id"`
	StreamName      string                 `json:"stream_name"`
	SubjectID       string                 `json:"subject_id"`
	LastSequence    int64                  `json:"last_sequence"`
	LastDeliveryID  string                 `json:"last_delivery_id,omitempty"`
	LastDeliveredAt *time.Time             `json:"last_delivered_at,omitempty"`
	LastError       string                 `json:"last_error,omitempty"`
	UpdatedAt       *time.Time             `json:"updated_at,omitempty"`
}

TaskBridgeNotificationCursorPayload exposes the durable cursor identity and latest diagnostic state for one bridge terminal notification subscription.

type TaskBridgeNotificationSubscriptionPayload

type TaskBridgeNotificationSubscriptionPayload struct {
	SubscriptionID   string                              `json:"subscription_id"`
	TaskID           string                              `json:"task_id"`
	BridgeInstanceID string                              `json:"bridge_instance_id"`
	Scope            bridgepkg.Scope                     `json:"scope"`
	WorkspaceID      string                              `json:"workspace_id,omitempty"`
	PeerID           string                              `json:"peer_id,omitempty"`
	ThreadID         string                              `json:"thread_id,omitempty"`
	GroupID          string                              `json:"group_id,omitempty"`
	DeliveryMode     bridgepkg.DeliveryMode              `json:"delivery_mode"`
	Cursor           TaskBridgeNotificationCursorPayload `json:"cursor"`
	CreatedBy        taskpkg.ActorIdentity               `json:"created_by"`
	CreatedAt        time.Time                           `json:"created_at"`
	UpdatedAt        time.Time                           `json:"updated_at"`
}

TaskBridgeNotificationSubscriptionPayload exposes one bridge terminal notification subscription plus its durable cursor diagnostics.

type TaskBridgeNotificationSubscriptionResponse

type TaskBridgeNotificationSubscriptionResponse struct {
	Subscription TaskBridgeNotificationSubscriptionPayload `json:"subscription"`
}

TaskBridgeNotificationSubscriptionResponse wraps one task bridge notification subscription payload.

type TaskBridgeNotificationSubscriptionsResponse

type TaskBridgeNotificationSubscriptionsResponse struct {
	Subscriptions []TaskBridgeNotificationSubscriptionPayload `json:"subscriptions"`
}

TaskBridgeNotificationSubscriptionsResponse wraps a task bridge notification subscription list.

type TaskCatalogFacetsPayload

type TaskCatalogFacetsPayload struct {
	Statuses []TaskCatalogStatusFacetPayload `json:"statuses"`
	Owners   []TaskCatalogOwnerFacetPayload  `json:"owners"`
}

TaskCatalogFacetsPayload contains exact counts computed before the cursor cut.

type TaskCatalogItemPayload

type TaskCatalogItemPayload struct {
	ID                           string                 `json:"id"`
	Identifier                   string                 `json:"identifier,omitempty"`
	Scope                        taskpkg.Scope          `json:"scope"`
	WorkspaceID                  string                 `json:"workspace_id,omitempty"`
	ParentTaskID                 string                 `json:"parent_task_id,omitempty"`
	ResolvedNetworkParticipation *participation.Spec    `json:"resolved_network_participation,omitempty"`
	Title                        string                 `json:"title"`
	Priority                     taskpkg.Priority       `json:"priority,omitempty"`
	MaxAttempts                  int                    `json:"max_attempts,omitempty"`
	AutoEnqueueOnReady           bool                   `json:"auto_enqueue_on_ready,omitempty"`
	Status                       taskpkg.Status         `json:"status"`
	ApprovalPolicy               taskpkg.ApprovalPolicy `json:"approval_policy,omitempty"`
	ApprovalState                taskpkg.ApprovalState  `json:"approval_state,omitempty"`
	Draft                        bool                   `json:"draft,omitempty"`
	Owner                        *taskpkg.Ownership     `json:"owner,omitempty"`
	CurrentRunID                 string                 `json:"current_run_id,omitempty"`
	LatestEventSeq               int64                  `json:"latest_event_seq"`
	NeedsAttention               bool                   `json:"needs_attention,omitempty"`
	NeedsAttentionReason         string                 `json:"needs_attention_reason,omitempty"`
	NeedsAttentionAt             *time.Time             `json:"needs_attention_at,omitempty"`
	NeedsAttentionBy             *taskpkg.ActorIdentity `json:"needs_attention_by,omitempty"`
	WakeCreator                  bool                   `json:"wake_creator"`
	CreatedBy                    taskpkg.ActorIdentity  `json:"created_by"`
	Origin                       taskpkg.Origin         `json:"origin"`
	CreatedAt                    time.Time              `json:"created_at"`
	UpdatedAt                    time.Time              `json:"updated_at"`
	ClosedAt                     *time.Time             `json:"closed_at,omitempty"`
	ChildCount                   int                    `json:"child_count,omitempty"`
	DependencyCount              int                    `json:"dependency_count,omitempty"`
	ActiveRun                    *TaskCatalogRunPayload `json:"active_run,omitempty"`
	LastActivityAt               *time.Time             `json:"last_activity_at,omitempty"`
}

TaskCatalogItemPayload is one lean task catalog row.

func TaskCatalogItemPayloadFromSummary

func TaskCatalogItemPayloadFromSummary(record *taskpkg.Summary) TaskCatalogItemPayload

TaskCatalogItemPayloadFromSummary converts one bounded domain catalog row.

type TaskCatalogOwnerFacetPayload

type TaskCatalogOwnerFacetPayload struct {
	Owner taskpkg.Ownership `json:"owner"`
	Count int               `json:"count"`
}

TaskCatalogOwnerFacetPayload is one exact owner count after all filters.

type TaskCatalogRunPayload

type TaskCatalogRunPayload struct {
	ID                           string                 `json:"id"`
	TaskID                       string                 `json:"task_id"`
	Status                       taskpkg.RunStatus      `json:"status"`
	Attempt                      int                    `json:"attempt"`
	RecoveryCount                int                    `json:"recovery_count"`
	PreviousRunID                string                 `json:"previous_run_id,omitempty"`
	FailureKind                  string                 `json:"failure_kind,omitempty"`
	MaxAttempts                  int                    `json:"max_attempts"`
	SessionID                    string                 `json:"session_id,omitempty"`
	ClaimedBy                    *taskpkg.ActorIdentity `json:"claimed_by,omitempty"`
	LeaseUntil                   *time.Time             `json:"lease_until,omitempty"`
	HeartbeatAt                  *time.Time             `json:"heartbeat_at,omitempty"`
	ResolvedNetworkParticipation *participation.Spec    `json:"resolved_network_participation,omitempty"`
	QueuedAt                     time.Time              `json:"queued_at"`
	ClaimedAt                    *time.Time             `json:"claimed_at,omitempty"`
	StartedAt                    *time.Time             `json:"started_at,omitempty"`
	EndedAt                      *time.Time             `json:"ended_at,omitempty"`
	Error                        string                 `json:"error,omitempty"`
}

TaskCatalogRunPayload is the bounded run summary embedded in catalog and inbox rows.

func TaskCatalogRunPayloadFromSummary

func TaskCatalogRunPayloadFromSummary(summary *taskpkg.RunSummary) *TaskCatalogRunPayload

TaskCatalogRunPayloadFromSummary converts one bounded catalog run summary.

type TaskCatalogStatusFacetPayload

type TaskCatalogStatusFacetPayload struct {
	Status taskpkg.Status `json:"status"`
	Count  int            `json:"count"`
}

TaskCatalogStatusFacetPayload is one exact status count after all filters.

type TaskDashboardActiveRunPayload

type TaskDashboardActiveRunPayload struct {
	TaskID                       string              `json:"task_id"`
	TaskIdentifier               string              `json:"task_identifier,omitempty"`
	TaskTitle                    string              `json:"task_title"`
	TaskStatus                   taskpkg.Status      `json:"task_status"`
	TaskPriority                 taskpkg.Priority    `json:"task_priority,omitempty"`
	TaskOwner                    *taskpkg.Ownership  `json:"task_owner,omitempty"`
	Scope                        taskpkg.Scope       `json:"scope"`
	WorkspaceID                  string              `json:"workspace_id,omitempty"`
	LatestEventSeq               int64               `json:"latest_event_seq"`
	RunID                        string              `json:"run_id"`
	RunStatus                    taskpkg.RunStatus   `json:"run_status"`
	Attempt                      int                 `json:"attempt"`
	MaxAttempts                  int                 `json:"max_attempts"`
	SessionID                    string              `json:"session_id,omitempty"`
	ResolvedNetworkParticipation *participation.Spec `json:"resolved_network_participation,omitempty"`
	LastActivityAt               time.Time           `json:"last_activity_at"`
	AgeMilli                     int64               `json:"age_ms"`
	HealthStatus                 string              `json:"health_status"`
	Stuck                        bool                `json:"stuck"`
	Error                        string              `json:"error,omitempty"`
}

TaskDashboardActiveRunPayload exposes one recent active-run card payload.

type TaskDashboardActiveRunsPayload

type TaskDashboardActiveRunsPayload struct {
	Total    int                             `json:"total"`
	Running  int                             `json:"running"`
	Starting int                             `json:"starting"`
	Claimed  int                             `json:"claimed"`
	Queued   int                             `json:"queued"`
	Items    []TaskDashboardActiveRunPayload `json:"items,omitempty"`
}

TaskDashboardActiveRunsPayload summarizes the currently active run set and recent cards.

type TaskDashboardBlockedCardPayload

type TaskDashboardBlockedCardPayload struct {
	Tasks                int    `json:"tasks"`
	AwaitingApproval     int    `json:"awaiting_approval"`
	AwaitingDependencies int    `json:"awaiting_dependencies"`
	HealthStatus         string `json:"health_status"`
}

TaskDashboardBlockedCardPayload summarizes approval and dependency pressure.

type TaskDashboardCardsPayload

type TaskDashboardCardsPayload struct {
	InProgress TaskDashboardInProgressCardPayload `json:"in_progress"`
	Blocked    TaskDashboardBlockedCardPayload    `json:"blocked"`
	Failed     TaskDashboardFailedCardPayload     `json:"failed"`
	Latency    TaskDashboardLatencyCardPayload    `json:"latency"`
}

TaskDashboardCardsPayload exposes dashboard-ready card values.

type TaskDashboardFailedCardPayload

type TaskDashboardFailedCardPayload struct {
	Tasks        int    `json:"tasks"`
	FailedRuns   int    `json:"failed_runs"`
	ForcedStops  int    `json:"forced_stops"`
	HealthStatus string `json:"health_status"`
}

TaskDashboardFailedCardPayload summarizes failed work and disruptive run outcomes.

type TaskDashboardFreshnessPayload

type TaskDashboardFreshnessPayload struct {
	ObservedAt       time.Time `json:"observed_at"`
	LatestActivityAt time.Time `json:"latest_activity_at"`
	AgeMilli         int64     `json:"age_ms"`
	StaleAfterMilli  int64     `json:"stale_after_ms"`
	HasLiveWork      bool      `json:"has_live_work"`
	Status           string    `json:"status"`
	Stale            bool      `json:"stale"`
}

TaskDashboardFreshnessPayload exposes recency and stale-warning state for the dashboard snapshot.

type TaskDashboardHealthPayload

type TaskDashboardHealthPayload struct {
	Status           string `json:"status"`
	StuckRuns        int    `json:"stuck_runs"`
	ActiveOrphanRuns int    `json:"active_orphan_runs"`
	QueueBacklog     bool   `json:"queue_backlog"`
}

TaskDashboardHealthPayload exposes warning-oriented dashboard health indicators.

type TaskDashboardInProgressCardPayload

type TaskDashboardInProgressCardPayload struct {
	Tasks        int    `json:"tasks"`
	ActiveRuns   int    `json:"active_runs"`
	RunningRuns  int    `json:"running_runs"`
	StartingRuns int    `json:"starting_runs"`
	ClaimedRuns  int    `json:"claimed_runs"`
	QueuedRuns   int    `json:"queued_runs"`
	HealthStatus string `json:"health_status"`
}

TaskDashboardInProgressCardPayload summarizes active work and live-run pressure.

type TaskDashboardLatencyCardPayload

type TaskDashboardLatencyCardPayload struct {
	ClaimLatencyMillis TaskLatencyMetricPayload `json:"claim_latency_ms"`
	StartLatencyMillis TaskLatencyMetricPayload `json:"start_latency_ms"`
}

TaskDashboardLatencyCardPayload exposes queue and start latency summaries.

type TaskDashboardPayload

type TaskDashboardPayload struct {
	Totals          TaskDashboardTotalsPayload            `json:"totals"`
	Cards           TaskDashboardCardsPayload             `json:"cards"`
	StatusBreakdown []TaskDashboardStatusBreakdownPayload `json:"status_breakdown,omitempty"`
	Queue           TaskDashboardQueuePayload             `json:"queue"`
	Health          TaskDashboardHealthPayload            `json:"health"`
	ActiveRuns      TaskDashboardActiveRunsPayload        `json:"active_runs"`
	Freshness       TaskDashboardFreshnessPayload         `json:"freshness"`
}

TaskDashboardPayload is the observer-backed task dashboard response payload.

type TaskDashboardQuery

type TaskDashboardQuery struct {
	Scope                taskpkg.Scope      `json:"scope,omitempty"`
	Workspace            string             `json:"workspace,omitempty"`
	OwnerKind            taskpkg.OwnerKind  `json:"owner_kind,omitempty"`
	OwnerRef             string             `json:"owner_ref,omitempty"`
	ParticipationChannel string             `json:"participation_channel,omitempty"`
	OriginKind           taskpkg.OriginKind `json:"origin_kind,omitempty"`
}

TaskDashboardQuery captures the shared observer-backed task dashboard filters.

type TaskDashboardQueueDepthPayload

type TaskDashboardQueueDepthPayload struct {
	ChannelID           string    `json:"channel_id,omitempty"`
	Count               int       `json:"count"`
	OldestQueuedAt      time.Time `json:"oldest_queued_at"`
	OldestQueueAgeMilli int64     `json:"oldest_queue_age_ms"`
}

TaskDashboardQueueDepthPayload reports queued work by channel.

type TaskDashboardQueuePayload

type TaskDashboardQueuePayload struct {
	Total                 int                              `json:"total"`
	Depth                 []TaskDashboardQueueDepthPayload `json:"depth,omitempty"`
	OldestQueuedAt        time.Time                        `json:"oldest_queued_at"`
	OldestQueueAgeMilli   int64                            `json:"oldest_queue_age_ms"`
	BacklogWarning        bool                             `json:"backlog_warning"`
	BacklogStatus         string                           `json:"backlog_status"`
	BacklogThresholdMilli int64                            `json:"backlog_threshold_ms"`
}

TaskDashboardQueuePayload reports current queue backlog state.

type TaskDashboardResponse

type TaskDashboardResponse struct {
	Dashboard TaskDashboardPayload `json:"dashboard"`
}

TaskDashboardResponse wraps the shared task dashboard payload.

type TaskDashboardStatusBreakdownPayload

type TaskDashboardStatusBreakdownPayload struct {
	Status       taskpkg.Status `json:"status"`
	Count        int            `json:"count"`
	SharePercent int            `json:"share_percent"`
}

TaskDashboardStatusBreakdownPayload reports one aggregated task-status bucket.

type TaskDashboardTotalsPayload

type TaskDashboardTotalsPayload struct {
	TasksTotal             int `json:"tasks_total"`
	RunsTotal              int `json:"runs_total"`
	DraftTasks             int `json:"draft_tasks"`
	PendingTasks           int `json:"pending_tasks"`
	ReadyTasks             int `json:"ready_tasks"`
	InProgressTasks        int `json:"in_progress_tasks"`
	BlockedTasks           int `json:"blocked_tasks"`
	CompletedTasks         int `json:"completed_tasks"`
	FailedTasks            int `json:"failed_tasks"`
	CanceledTasks          int `json:"canceled_tasks"`
	AwaitingApprovalTasks  int `json:"awaiting_approval_tasks"`
	DependencyBlockedTasks int `json:"dependency_blocked_tasks"`
	QueuedRuns             int `json:"queued_runs"`
	ClaimedRuns            int `json:"claimed_runs"`
	StartingRuns           int `json:"starting_runs"`
	RunningRuns            int `json:"running_runs"`
	CompletedRuns          int `json:"completed_runs"`
	FailedRuns             int `json:"failed_runs"`
	CanceledRuns           int `json:"canceled_runs"`
	ActiveRuns             int `json:"active_runs"`
}

TaskDashboardTotalsPayload collapses current task and run totals into operator-facing counters.

type TaskDependencyPayload

type TaskDependencyPayload struct {
	TaskID          string                 `json:"task_id"`
	DependsOnTaskID string                 `json:"depends_on_task_id"`
	Kind            taskpkg.DependencyKind `json:"kind"`
	CreatedAt       time.Time              `json:"created_at"`
}

TaskDependencyPayload is the shared dependency-edge response payload.

type TaskDependencyReferencePayload

type TaskDependencyReferencePayload struct {
	TaskID          string                 `json:"task_id"`
	DependsOnTaskID string                 `json:"depends_on_task_id"`
	Kind            taskpkg.DependencyKind `json:"kind"`
	CreatedAt       time.Time              `json:"created_at"`
	DependsOn       TaskReferencePayload   `json:"depends_on"`
}

TaskDependencyReferencePayload enriches one dependency edge with the referenced blocker identity.

type TaskDesignationRollupPayload

type TaskDesignationRollupPayload struct {
	DesignationGroupID string          `json:"designation_group_id"`
	TaskID             string          `json:"task_id"`
	Summary            json.RawMessage `json:"summary"`
	CreatedAt          time.Time       `json:"created_at"`
}

TaskDesignationRollupPayload exposes the persisted summary for one designated run group.

type TaskDetailPayload

type TaskDetailPayload struct {
	Summary              TaskSummaryPayload               `json:"summary"`
	Task                 TaskPayload                      `json:"task"`
	Children             []TaskSummaryPayload             `json:"children,omitempty"`
	Dependencies         []TaskDependencyPayload          `json:"dependencies,omitempty"`
	DependencyReferences []TaskDependencyReferencePayload `json:"dependency_references,omitempty"`
	Runs                 []TaskRunPayload                 `json:"runs,omitempty"`
	DesignationRollups   []TaskDesignationRollupPayload   `json:"designation_rollups,omitempty"`
	Events               []TaskEventPayload               `json:"events,omitempty"`
}

TaskDetailPayload is the shared expanded task response payload.

type TaskDetailResponse

type TaskDetailResponse struct {
	Task TaskDetailPayload `json:"task"`
}

TaskDetailResponse wraps one shared expanded task payload.

type TaskEventPayload

type TaskEventPayload struct {
	ID        string                `json:"id"`
	TaskID    string                `json:"task_id"`
	RunID     string                `json:"run_id,omitempty"`
	EventType string                `json:"event_type"`
	Actor     taskpkg.ActorIdentity `json:"actor"`
	Origin    taskpkg.Origin        `json:"origin"`
	Payload   json.RawMessage       `json:"payload,omitempty"`
	Timestamp time.Time             `json:"timestamp"`
}

TaskEventPayload is the shared task audit-event response payload.

type TaskExecutionProfilePayload

type TaskExecutionProfilePayload = taskpkg.ExecutionProfile

TaskExecutionProfilePayload is the task-owned orchestration profile read model.

type TaskExecutionProfileResponse

type TaskExecutionProfileResponse struct {
	Profile TaskExecutionProfilePayload `json:"profile"`
}

TaskExecutionProfileResponse wraps one execution profile response.

type TaskExecutionRequest

type TaskExecutionRequest struct {
	IdempotencyKey       string                 `json:"idempotency_key,omitempty"`
	NetworkParticipation *participation.Request `json:"network_participation,omitempty"`
	Metadata             json.RawMessage        `json:"metadata,omitempty"`
}

TaskExecutionRequest is the shared task publish/start/approval execution payload.

type TaskExecutionResponse

type TaskExecutionResponse struct {
	Task TaskPayload    `json:"task"`
	Run  TaskRunPayload `json:"run"`
}

TaskExecutionResponse wraps one explicit task execution-boundary result.

type TaskFanOutRunDesignationRequest

type TaskFanOutRunDesignationRequest struct {
	Brief          string          `json:"brief"`
	Metadata       json.RawMessage `json:"metadata,omitempty"`
	IdempotencyKey string          `json:"idempotency_key,omitempty"`
}

TaskFanOutRunDesignationRequest describes one designated sibling run.

type TaskHealthPayload

type TaskHealthPayload struct {
	Status                     string                    `json:"status"`
	QueueDepthTotal            int                       `json:"queue_depth_total"`
	OldestQueuedAt             *time.Time                `json:"oldest_queued_at,omitempty"`
	OldestQueueAgeMilli        int64                     `json:"oldest_queue_age_ms"`
	QueueDepth                 []TaskQueueDepthPayload   `json:"queue_depth,omitempty"`
	StuckRuns                  []StuckTaskRunPayload     `json:"stuck_runs,omitempty"`
	ActiveOrphanRuns           int                       `json:"active_orphan_runs"`
	TaskTotals                 []TaskStatusTotalPayload  `json:"task_totals,omitempty"`
	RunTotals                  []TaskRunTotalPayload     `json:"run_totals,omitempty"`
	OwnerTotals                []TaskOwnerTotalPayload   `json:"owner_totals,omitempty"`
	ForcedStopsSinceStart      int                       `json:"forced_stops_since_start"`
	DuplicateIngressSinceStart int                       `json:"duplicate_ingress_since_start"`
	ChannelMismatchSinceStart  int                       `json:"channel_mismatch_since_start"`
	RecoverySinceStart         TaskRecoveryTotalsPayload `json:"recovery_since_start"`
}

TaskHealthPayload exposes observer-owned task health in the status surface.

type TaskInboxFacetsPayload

type TaskInboxFacetsPayload struct {
	Statuses   []TaskInboxStatusFacetPayload   `json:"statuses"`
	Priorities []TaskInboxPriorityFacetPayload `json:"priorities"`
}

TaskInboxFacetsPayload contains exact inbox counts before the cursor cut.

type TaskInboxItemPayload

type TaskInboxItemPayload struct {
	Task             TaskInboxTaskPayload   `json:"task"`
	Lane             TaskInboxLane          `json:"lane"`
	ApprovalPolicy   taskpkg.ApprovalPolicy `json:"approval_policy,omitempty"`
	ApprovalState    taskpkg.ApprovalState  `json:"approval_state,omitempty"`
	BlockingReason   string                 `json:"blocking_reason,omitempty"`
	LatestActivityAt time.Time              `json:"latest_activity_at"`
	Run              *TaskCatalogRunPayload `json:"run,omitempty"`
	Triage           TaskTriageStatePayload `json:"triage"`
}

TaskInboxItemPayload is one task inbox item with action-ready metadata.

type TaskInboxLane

type TaskInboxLane string

TaskInboxLane identifies one inbox grouping lane.

const (
	TaskInboxLaneMyWork     TaskInboxLane = "my_work"
	TaskInboxLaneApprovals  TaskInboxLane = "approvals"
	TaskInboxLaneFailedRuns TaskInboxLane = "failed_runs"
	TaskInboxLaneBlocked    TaskInboxLane = "blocked"
	TaskInboxLaneArchived   TaskInboxLane = "archived"
)

type TaskInboxLaneGroupPayload

type TaskInboxLaneGroupPayload struct {
	Lane        TaskInboxLane          `json:"lane"`
	Count       int                    `json:"count"`
	UnreadCount int                    `json:"unread_count"`
	Items       []TaskInboxItemPayload `json:"items,omitempty"`
}

TaskInboxLaneGroupPayload groups page items and exact filtered lane counts.

type TaskInboxPayload

type TaskInboxPayload struct {
	UnreadTotal   int                         `json:"unread_total"`
	ArchivedTotal int                         `json:"archived_total"`
	Groups        []TaskInboxLaneGroupPayload `json:"groups"`
	Page          CountedCursorPagePayload    `json:"page"`
	Facets        TaskInboxFacetsPayload      `json:"facets"`
}

TaskInboxPayload is the actor-scoped bounded task inbox response payload.

type TaskInboxPriorityFacetPayload

type TaskInboxPriorityFacetPayload struct {
	Priority taskpkg.Priority `json:"priority"`
	Count    int              `json:"count"`
}

TaskInboxPriorityFacetPayload is one exact inbox priority count.

type TaskInboxQuery

type TaskInboxQuery struct {
	Scope     taskpkg.CatalogScope `json:"scope,omitempty"`
	Workspace string               `json:"workspace,omitempty"`
	OwnerKind taskpkg.OwnerKind    `json:"owner_kind,omitempty"`
	OwnerRef  string               `json:"owner_ref,omitempty"`
	Lane      TaskInboxLane        `json:"lane,omitempty"`
	Status    taskpkg.Status       `json:"status,omitempty"`
	Priority  taskpkg.Priority     `json:"priority,omitempty"`
	Unread    *bool                `json:"unread,omitempty"`
	Query     string               `json:"query,omitempty"`
	Cursor    string               `json:"cursor,omitempty"`
	Limit     int                  `json:"limit,omitempty"`
}

TaskInboxQuery captures the shared bounded actor-scoped inbox filters.

type TaskInboxResponse

type TaskInboxResponse struct {
	Inbox TaskInboxPayload `json:"inbox"`
}

TaskInboxResponse wraps the shared task inbox payload.

type TaskInboxStatusFacetPayload

type TaskInboxStatusFacetPayload struct {
	Status taskpkg.Status `json:"status"`
	Count  int            `json:"count"`
}

TaskInboxStatusFacetPayload is one exact inbox status count.

type TaskInboxTaskPayload

type TaskInboxTaskPayload struct {
	ID             string             `json:"id"`
	Identifier     string             `json:"identifier,omitempty"`
	Title          string             `json:"title"`
	Status         taskpkg.Status     `json:"status"`
	Priority       taskpkg.Priority   `json:"priority,omitempty"`
	Owner          *taskpkg.Ownership `json:"owner,omitempty"`
	Scope          taskpkg.Scope      `json:"scope"`
	WorkspaceID    string             `json:"workspace_id,omitempty"`
	LatestEventSeq int64              `json:"latest_event_seq"`
}

TaskInboxTaskPayload is the lean task reference embedded in inbox rows.

func TaskInboxTaskPayloadFromReference

func TaskInboxTaskPayloadFromReference(record taskpkg.Reference) TaskInboxTaskPayload

TaskInboxTaskPayloadFromReference converts one bounded inbox task reference.

type TaskInspectEventPayload

type TaskInspectEventPayload struct {
	ID        string    `json:"id"`
	Type      string    `json:"type"`
	SessionID string    `json:"session_id,omitempty"`
	TaskID    string    `json:"task_id,omitempty"`
	RunID     string    `json:"run_id,omitempty"`
	Outcome   string    `json:"outcome,omitempty"`
	Summary   string    `json:"summary,omitempty"`
	Timestamp time.Time `json:"timestamp"`
}

TaskInspectEventPayload is one recent event summary returned by task inspect.

type TaskInspectPayload

type TaskInspectPayload struct {
	Target       string                      `json:"target"`
	Task         TaskSummaryPayload          `json:"task"`
	CurrentRun   *TaskInspectRunPayload      `json:"current_run,omitempty"`
	BoundSession *TaskInspectSessionPayload  `json:"bound_session,omitempty"`
	RecentRuns   []TaskInspectRunPayload     `json:"recent_runs,omitempty"`
	RecentEvents []TaskInspectEventPayload   `json:"recent_events,omitempty"`
	Scheduler    TaskInspectSchedulerPayload `json:"scheduler"`
	Diagnostics  []DiagnosticItem            `json:"diagnostics,omitempty"`
	NextAction   string                      `json:"next_action"`
	AsOf         time.Time                   `json:"as_of"`
}

TaskInspectPayload is the shared task/run inspection response payload.

type TaskInspectResponse

type TaskInspectResponse struct {
	Inspect TaskInspectPayload `json:"inspect"`
}

TaskInspectResponse wraps one task/run inspect snapshot.

type TaskInspectRunPayload

type TaskInspectRunPayload struct {
	RunID                   string            `json:"run_id"`
	TaskID                  string            `json:"task_id"`
	Status                  taskpkg.RunStatus `json:"status"`
	ClaimTokenHashTruncated string            `json:"claim_token_hash_truncated,omitempty"`
	LeaseUntil              *time.Time        `json:"lease_until,omitempty"`
	HeartbeatAt             *time.Time        `json:"heartbeat_at,omitempty"`
	HeartbeatAgeSeconds     *int64            `json:"heartbeat_age_seconds,omitempty"`
	Retries                 int               `json:"retries,omitempty"`
	LastErrorSummary        string            `json:"last_error_summary,omitempty"`
	FailureKind             string            `json:"failure_kind,omitempty"`
	BoundSessionID          string            `json:"bound_session_id,omitempty"`
	StartedAt               *time.Time        `json:"started_at,omitempty"`
	EndedAt                 *time.Time        `json:"ended_at,omitempty"`
	PreviousRunID           string            `json:"previous_run_id,omitempty"`
	QueuedAt                time.Time         `json:"queued_at"`
	Attempt                 int               `json:"attempt"`
}

TaskInspectRunPayload is the redacted run projection returned by task inspect.

type TaskInspectSchedulerPayload

type TaskInspectSchedulerPayload struct {
	Paused    bool       `json:"paused"`
	PausedBy  string     `json:"paused_by,omitempty"`
	PausedAt  *time.Time `json:"paused_at,omitempty"`
	Reason    string     `json:"reason,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

TaskInspectSchedulerPayload is the scheduler state used for inspect diagnostics.

type TaskInspectSessionPayload

type TaskInspectSessionPayload struct {
	SessionID      string     `json:"session_id"`
	State          string     `json:"state,omitempty"`
	AgentName      string     `json:"agent_name,omitempty"`
	ProviderName   string     `json:"provider_name,omitempty"`
	WorkspaceID    string     `json:"workspace_id,omitempty"`
	StartedAt      *time.Time `json:"started_at,omitempty"`
	LastActivityAt *time.Time `json:"last_activity_at,omitempty"`
	StopReason     string     `json:"stop_reason,omitempty"`
	FailureKind    string     `json:"failure_kind,omitempty"`
}

TaskInspectSessionPayload is the bound-session projection returned by task inspect.

type TaskLatencyMetricPayload

type TaskLatencyMetricPayload struct {
	Samples       int   `json:"samples"`
	AverageMillis int64 `json:"average_ms"`
	MaximumMillis int64 `json:"maximum_ms"`
}

TaskLatencyMetricPayload exposes one task latency metric family.

type TaskListQuery

type TaskListQuery struct {
	Scope                taskpkg.CatalogScope  `json:"scope,omitempty"`
	Workspace            string                `json:"workspace,omitempty"`
	Status               taskpkg.Status        `json:"status,omitempty"`
	Priority             taskpkg.Priority      `json:"priority,omitempty"`
	IncludeDrafts        bool                  `json:"include_drafts,omitempty"`
	ApprovalState        taskpkg.ApprovalState `json:"approval_state,omitempty"`
	OwnerKind            taskpkg.OwnerKind     `json:"owner_kind,omitempty"`
	OwnerRef             string                `json:"owner_ref,omitempty"`
	ParentTaskID         string                `json:"parent_task_id,omitempty"`
	ParticipationChannel string                `json:"participation_channel,omitempty"`
	Query                string                `json:"query,omitempty"`
	Sort                 taskpkg.CatalogSort   `json:"sort,omitempty"`
	Cursor               string                `json:"cursor,omitempty"`
	Limit                int                   `json:"limit,omitempty"`
}

TaskListQuery captures the shared bounded task catalog filters.

type TaskOwnerTotalPayload

type TaskOwnerTotalPayload struct {
	OwnerKind string `json:"owner_kind"`
	OwnerRef  string `json:"owner_ref"`
	Count     int    `json:"count"`
}

type TaskPayload

type TaskPayload struct {
	ID                           string                 `json:"id"`
	Identifier                   string                 `json:"identifier,omitempty"`
	Scope                        taskpkg.Scope          `json:"scope"`
	WorkspaceID                  string                 `json:"workspace_id,omitempty"`
	ParentTaskID                 string                 `json:"parent_task_id,omitempty"`
	ResolvedNetworkParticipation *participation.Spec    `json:"resolved_network_participation,omitempty"`
	Title                        string                 `json:"title"`
	Description                  string                 `json:"description,omitempty"`
	Priority                     taskpkg.Priority       `json:"priority,omitempty"`
	MaxAttempts                  int                    `json:"max_attempts,omitempty"`
	AutoEnqueueOnReady           bool                   `json:"auto_enqueue_on_ready,omitempty"`
	Status                       taskpkg.Status         `json:"status"`
	ApprovalPolicy               taskpkg.ApprovalPolicy `json:"approval_policy,omitempty"`
	ApprovalState                taskpkg.ApprovalState  `json:"approval_state,omitempty"`
	Draft                        bool                   `json:"draft,omitempty"`
	Owner                        *taskpkg.Ownership     `json:"owner,omitempty"`
	CurrentRunID                 string                 `json:"current_run_id,omitempty"`
	LatestEventSeq               int64                  `json:"latest_event_seq"`
	Paused                       bool                   `json:"paused,omitempty"`
	PausedBy                     string                 `json:"paused_by,omitempty"`
	PausedAt                     *time.Time             `json:"paused_at,omitempty"`
	PausedReason                 string                 `json:"paused_reason,omitempty"`
	EffectivePaused              bool                   `json:"effective_paused,omitempty"`
	PausedByTaskID               string                 `json:"paused_by_task_id,omitempty"`
	// BlockedReasons is populated on read/detail projections and may be omitted by mutation responses.
	BlockedReasons       []taskpkg.BlockedReason `json:"blocked_reasons,omitempty"`
	NeedsAttention       bool                    `json:"needs_attention,omitempty"`
	NeedsAttentionReason string                  `json:"needs_attention_reason,omitempty"`
	NeedsAttentionAt     *time.Time              `json:"needs_attention_at,omitempty"`
	NeedsAttentionBy     *taskpkg.ActorIdentity  `json:"needs_attention_by,omitempty"`
	WakeCreator          bool                    `json:"wake_creator"`
	CreatedBy            taskpkg.ActorIdentity   `json:"created_by"`
	Origin               taskpkg.Origin          `json:"origin"`
	CreatedAt            time.Time               `json:"created_at"`
	UpdatedAt            time.Time               `json:"updated_at"`
	ClosedAt             *time.Time              `json:"closed_at,omitempty"`
	Metadata             json.RawMessage         `json:"metadata,omitempty"`
}

TaskPayload is the shared full task response payload.

type TaskQueueDepthPayload

type TaskQueueDepthPayload struct {
	ChannelID           string     `json:"channel_id,omitempty"`
	Count               int        `json:"count"`
	OldestQueuedAt      *time.Time `json:"oldest_queued_at,omitempty"`
	OldestQueueAgeMilli int64      `json:"oldest_queue_age_ms"`
}

type TaskRecoveryTotalsPayload

type TaskRecoveryTotalsPayload struct {
	Requeued      int `json:"requeued"`
	MarkedRunning int `json:"marked_running"`
	Failed        int `json:"failed"`
}

type TaskReferencePayload

type TaskReferencePayload struct {
	ID              string             `json:"id"`
	Identifier      string             `json:"identifier,omitempty"`
	Title           string             `json:"title"`
	Status          taskpkg.Status     `json:"status"`
	Priority        taskpkg.Priority   `json:"priority,omitempty"`
	Owner           *taskpkg.Ownership `json:"owner,omitempty"`
	Scope           taskpkg.Scope      `json:"scope"`
	WorkspaceID     string             `json:"workspace_id,omitempty"`
	LatestEventSeq  int64              `json:"latest_event_seq"`
	Paused          bool               `json:"paused,omitempty"`
	EffectivePaused bool               `json:"effective_paused,omitempty"`
	PausedByTaskID  string             `json:"paused_by_task_id,omitempty"`
}

TaskReferencePayload is the human-meaningful task identity shared across task read models.

type TaskResponse

type TaskResponse struct {
	Task TaskPayload `json:"task"`
}

TaskResponse wraps one shared task payload.

type TaskRunConversationRefPayload

type TaskRunConversationRefPayload struct {
	WorkspaceID string `json:"workspace_id"`
	Channel     string `json:"channel"`
	Surface     string `json:"surface"`
	ThreadID    string `json:"thread_id"`
	StreamURL   string `json:"stream_url"`
}

TaskRunConversationRefPayload identifies the deterministic conversation attached to a Live run.

type TaskRunConversationStreamPayload

type TaskRunConversationStreamPayload struct {
	Message *NetworkConversationMessagePayload `json:"message,omitempty"`
	Usage   *NetworkUsageResponse              `json:"usage,omitempty"`
}

TaskRunConversationStreamPayload is one typed message-or-usage SSE frame.

type TaskRunDetailPayload

type TaskRunDetailPayload struct {
	Run     TaskRunPayload                   `json:"run"`
	Task    *TaskReferencePayload            `json:"task,omitempty"`
	Session *TaskRunSessionPayload           `json:"session,omitempty"`
	Summary TaskRunOperationalSummaryPayload `json:"summary"`
	Network *TaskRunNetworkPayload           `json:"network,omitempty"`
}

TaskRunDetailPayload is the shared run-detail response payload.

type TaskRunDetailResponse

type TaskRunDetailResponse struct {
	Run TaskRunDetailPayload `json:"run"`
}

TaskRunDetailResponse wraps one shared task-run detail payload.

type TaskRunLeaseSummaryPayload

type TaskRunLeaseSummaryPayload struct {
	TaskID                       string                      `json:"task_id"`
	RunID                        string                      `json:"run_id"`
	Status                       taskpkg.RunStatus           `json:"status"`
	SessionID                    string                      `json:"session_id,omitempty"`
	ClaimedBy                    *taskpkg.ActorIdentity      `json:"claimed_by,omitempty"`
	ClaimTokenHash               string                      `json:"claim_token_hash,omitempty"`
	LeaseUntil                   *time.Time                  `json:"lease_until,omitempty"`
	HeartbeatAt                  *time.Time                  `json:"heartbeat_at,omitempty"`
	ResolvedNetworkParticipation *participation.Spec         `json:"resolved_network_participation,omitempty"`
	CoordinationChannel          *CoordinationChannelPayload `json:"coordination_channel,omitempty"`
}

TaskRunLeaseSummaryPayload is the safe read projection for task-run lease state.

func NormalizeTaskRunLeaseSummaryPayload

func NormalizeTaskRunLeaseSummaryPayload(payload TaskRunLeaseSummaryPayload) TaskRunLeaseSummaryPayload

NormalizeTaskRunLeaseSummaryPayload returns a lease summary with normalized nested channel metadata.

type TaskRunListQuery

type TaskRunListQuery struct {
	Status               taskpkg.RunStatus `json:"status,omitempty"`
	SessionID            string            `json:"session_id,omitempty"`
	ParticipationChannel string            `json:"participation_channel,omitempty"`
	Limit                int               `json:"limit,omitempty"`
}

TaskRunListQuery captures the shared task-run list filters.

type TaskRunNetworkPayload

type TaskRunNetworkPayload struct {
	Conversation TaskRunConversationRefPayload `json:"conversation"`
	Usage        NetworkUsageResponse          `json:"usage"`
}

TaskRunNetworkPayload carries the run-scoped conversation and truthful bound consumption.

type TaskRunOperationalSummaryPayload

type TaskRunOperationalSummaryPayload struct {
	LastActivityAt time.Time  `json:"last_activity_at"`
	LastEventType  string     `json:"last_event_type,omitempty"`
	ToolCallCount  *int64     `json:"tool_call_count,omitempty"`
	TurnCount      *int64     `json:"turn_count,omitempty"`
	InputTokens    *int64     `json:"input_tokens,omitempty"`
	OutputTokens   *int64     `json:"output_tokens,omitempty"`
	TotalTokens    *int64     `json:"total_tokens,omitempty"`
	TotalCost      *float64   `json:"total_cost,omitempty"`
	CostCurrency   *string    `json:"cost_currency,omitempty"`
	CostStatus     CostStatus `json:"cost_status,omitempty"`
	CostSource     CostSource `json:"cost_source,omitempty"`
}

TaskRunOperationalSummaryPayload captures aggregated runtime metrics for run detail.

type TaskRunPayload

type TaskRunPayload struct {
	ID                           string                         `json:"id"`
	TaskID                       string                         `json:"task_id"`
	Status                       taskpkg.RunStatus              `json:"status"`
	Attempt                      int                            `json:"attempt"`
	RecoveryCount                int                            `json:"recovery_count"`
	PreviousRunID                string                         `json:"previous_run_id,omitempty"`
	FailureKind                  string                         `json:"failure_kind,omitempty"`
	ClaimedBy                    *taskpkg.ActorIdentity         `json:"claimed_by,omitempty"`
	SessionID                    string                         `json:"session_id,omitempty"`
	Origin                       taskpkg.Origin                 `json:"origin"`
	IdempotencyKey               string                         `json:"idempotency_key,omitempty"`
	ResolvedNetworkParticipation *participation.Spec            `json:"resolved_network_participation,omitempty"`
	DesignationGroupID           string                         `json:"designation_group_id,omitempty"`
	ClaimTokenHash               string                         `json:"claim_token_hash,omitempty"`
	LeaseUntil                   *time.Time                     `json:"lease_until,omitempty"`
	HeartbeatAt                  *time.Time                     `json:"heartbeat_at,omitempty"`
	CoordinationChannel          *CoordinationChannelPayload    `json:"coordination_channel,omitempty"`
	Designation                  *taskpkg.RunDesignationSummary `json:"designation,omitempty"`
	QueuedAt                     time.Time                      `json:"queued_at"`
	ClaimedAt                    *time.Time                     `json:"claimed_at,omitempty"`
	StartedAt                    *time.Time                     `json:"started_at,omitempty"`
	EndedAt                      *time.Time                     `json:"ended_at,omitempty"`
	Error                        string                         `json:"error,omitempty"`
	Metadata                     json.RawMessage                `json:"metadata,omitempty"`
	Result                       json.RawMessage                `json:"result,omitempty"`
}

TaskRunPayload is the shared task-run response payload.

type TaskRunResponse

type TaskRunResponse struct {
	Run TaskRunPayload `json:"run"`
}

TaskRunResponse wraps one shared task-run payload.

type TaskRunReviewListQuery

type TaskRunReviewListQuery = taskpkg.RunReviewQuery

TaskRunReviewListQuery captures shared review read filters.

type TaskRunReviewPayload

type TaskRunReviewPayload = taskpkg.RunReview

TaskRunReviewPayload is the task-run review gate read model.

type TaskRunReviewRequestResponse

type TaskRunReviewRequestResponse struct {
	Review  TaskRunReviewPayload `json:"review"`
	Created bool                 `json:"created"`
}

TaskRunReviewRequestResponse wraps one review request and idempotent-create marker.

type TaskRunReviewResponse

type TaskRunReviewResponse struct {
	Review TaskRunReviewPayload `json:"review"`
}

TaskRunReviewResponse wraps one task-run review payload.

type TaskRunReviewVerdictResponse

type TaskRunReviewVerdictResponse struct {
	Review          TaskRunReviewPayload `json:"review"`
	ContinuationRun *TaskRunPayload      `json:"continuation_run,omitempty"`
	CircuitOpened   bool                 `json:"circuit_opened,omitempty"`
}

TaskRunReviewVerdictResponse wraps one recorded review verdict result.

type TaskRunReviewsResponse

type TaskRunReviewsResponse struct {
	Reviews []TaskRunReviewPayload `json:"reviews"`
}

TaskRunReviewsResponse wraps a task-run review list.

type TaskRunSessionPayload

type TaskRunSessionPayload struct {
	SessionID   string    `json:"session_id"`
	WorkspaceID string    `json:"workspace_id,omitempty"`
	AgentName   string    `json:"agent_name,omitempty"`
	Name        string    `json:"name,omitempty"`
	State       string    `json:"state,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

TaskRunSessionPayload links one task run to its backing session when available.

type TaskRunSummaryPayload

type TaskRunSummaryPayload struct {
	ID                           string                         `json:"id"`
	TaskID                       string                         `json:"task_id"`
	Status                       taskpkg.RunStatus              `json:"status"`
	Attempt                      int                            `json:"attempt"`
	RecoveryCount                int                            `json:"recovery_count"`
	PreviousRunID                string                         `json:"previous_run_id,omitempty"`
	FailureKind                  string                         `json:"failure_kind,omitempty"`
	MaxAttempts                  int                            `json:"max_attempts"`
	SessionID                    string                         `json:"session_id,omitempty"`
	ClaimedBy                    *taskpkg.ActorIdentity         `json:"claimed_by,omitempty"`
	ClaimTokenHash               string                         `json:"claim_token_hash,omitempty"`
	LeaseUntil                   *time.Time                     `json:"lease_until,omitempty"`
	HeartbeatAt                  *time.Time                     `json:"heartbeat_at,omitempty"`
	ResolvedNetworkParticipation *participation.Spec            `json:"resolved_network_participation,omitempty"`
	CoordinationChannel          *CoordinationChannelPayload    `json:"coordination_channel,omitempty"`
	DesignationGroupID           string                         `json:"designation_group_id,omitempty"`
	Designation                  *taskpkg.RunDesignationSummary `json:"designation,omitempty"`
	QueuedAt                     time.Time                      `json:"queued_at"`
	ClaimedAt                    *time.Time                     `json:"claimed_at,omitempty"`
	StartedAt                    *time.Time                     `json:"started_at,omitempty"`
	EndedAt                      *time.Time                     `json:"ended_at,omitempty"`
	Error                        string                         `json:"error,omitempty"`
}

TaskRunSummaryPayload is the shared run-chip payload reused by enriched task reads.

type TaskRunTotalPayload

type TaskRunTotalPayload struct {
	Status     string `json:"status"`
	OriginKind string `json:"origin_kind"`
	ChannelID  string `json:"channel_id,omitempty"`
	Count      int    `json:"count"`
}

type TaskRunsResponse

type TaskRunsResponse struct {
	Runs []TaskRunPayload `json:"runs"`
}

TaskRunsResponse wraps the shared task-run list payload.

type TaskStatusTotalPayload

type TaskStatusTotalPayload struct {
	Scope     string `json:"scope"`
	Status    string `json:"status"`
	ChannelID string `json:"channel_id,omitempty"`
	Count     int    `json:"count"`
}

type TaskStreamEventPayload

type TaskStreamEventPayload struct {
	Sequence int64                   `json:"sequence"`
	Type     string                  `json:"type"`
	Timeline TaskTimelineItemPayload `json:"timeline"`
}

TaskStreamEventPayload is one task-scoped replayable stream event.

type TaskStreamQuery

type TaskStreamQuery struct {
	AfterSequence int64 `json:"after_sequence,omitempty"`
}

TaskStreamQuery captures the shared task stream replay filters.

type TaskSummaryPayload

type TaskSummaryPayload struct {
	ID                           string                           `json:"id"`
	Identifier                   string                           `json:"identifier,omitempty"`
	Scope                        taskpkg.Scope                    `json:"scope"`
	WorkspaceID                  string                           `json:"workspace_id,omitempty"`
	ParentTaskID                 string                           `json:"parent_task_id,omitempty"`
	ResolvedNetworkParticipation *participation.Spec              `json:"resolved_network_participation,omitempty"`
	Title                        string                           `json:"title"`
	Priority                     taskpkg.Priority                 `json:"priority,omitempty"`
	MaxAttempts                  int                              `json:"max_attempts,omitempty"`
	AutoEnqueueOnReady           bool                             `json:"auto_enqueue_on_ready,omitempty"`
	Status                       taskpkg.Status                   `json:"status"`
	ApprovalPolicy               taskpkg.ApprovalPolicy           `json:"approval_policy,omitempty"`
	ApprovalState                taskpkg.ApprovalState            `json:"approval_state,omitempty"`
	Draft                        bool                             `json:"draft,omitempty"`
	Owner                        *taskpkg.Ownership               `json:"owner,omitempty"`
	CurrentRunID                 string                           `json:"current_run_id,omitempty"`
	LatestEventSeq               int64                            `json:"latest_event_seq"`
	Paused                       bool                             `json:"paused,omitempty"`
	PausedBy                     string                           `json:"paused_by,omitempty"`
	PausedAt                     *time.Time                       `json:"paused_at,omitempty"`
	PausedReason                 string                           `json:"paused_reason,omitempty"`
	EffectivePaused              bool                             `json:"effective_paused,omitempty"`
	PausedByTaskID               string                           `json:"paused_by_task_id,omitempty"`
	BlockedReasons               []taskpkg.BlockedReason          `json:"blocked_reasons,omitempty"`
	NeedsAttention               bool                             `json:"needs_attention,omitempty"`
	NeedsAttentionReason         string                           `json:"needs_attention_reason,omitempty"`
	NeedsAttentionAt             *time.Time                       `json:"needs_attention_at,omitempty"`
	NeedsAttentionBy             *taskpkg.ActorIdentity           `json:"needs_attention_by,omitempty"`
	WakeCreator                  bool                             `json:"wake_creator"`
	CreatedBy                    taskpkg.ActorIdentity            `json:"created_by"`
	Origin                       taskpkg.Origin                   `json:"origin"`
	CreatedAt                    time.Time                        `json:"created_at"`
	UpdatedAt                    time.Time                        `json:"updated_at"`
	ClosedAt                     *time.Time                       `json:"closed_at,omitempty"`
	ChildCount                   int                              `json:"child_count,omitempty"`
	DependencyCount              int                              `json:"dependency_count,omitempty"`
	Dependencies                 []TaskDependencyReferencePayload `json:"dependencies,omitempty"`
	ActiveRun                    *TaskRunSummaryPayload           `json:"active_run,omitempty"`
	LastActivityAt               *time.Time                       `json:"last_activity_at,omitempty"`
}

TaskSummaryPayload is the shared list-oriented task response payload.

type TaskTimelineItemPayload

type TaskTimelineItemPayload struct {
	Sequence  int64                  `json:"sequence"`
	EventID   string                 `json:"event_id"`
	Task      TaskReferencePayload   `json:"task"`
	Run       *TaskRunSummaryPayload `json:"run,omitempty"`
	EventType string                 `json:"event_type"`
	Actor     taskpkg.ActorIdentity  `json:"actor"`
	Origin    taskpkg.Origin         `json:"origin"`
	Payload   json.RawMessage        `json:"payload,omitempty"`
	Timestamp time.Time              `json:"timestamp"`
}

TaskTimelineItemPayload is the shared task-timeline response payload.

type TaskTimelineQuery

type TaskTimelineQuery struct {
	AfterSequence int64 `json:"after_sequence,omitempty"`
	Limit         int   `json:"limit,omitempty"`
}

TaskTimelineQuery captures the shared task timeline filters.

type TaskTimelineResponse

type TaskTimelineResponse struct {
	Timeline []TaskTimelineItemPayload `json:"timeline"`
}

TaskTimelineResponse wraps the shared task timeline payload.

type TaskTreeNodePayload

type TaskTreeNodePayload struct {
	Task           TaskReferencePayload   `json:"task"`
	ParentTaskID   string                 `json:"parent_task_id,omitempty"`
	Depth          int                    `json:"depth"`
	ChildCount     int                    `json:"child_count,omitempty"`
	ActiveRun      *TaskRunSummaryPayload `json:"active_run,omitempty"`
	LastActivityAt time.Time              `json:"last_activity_at"`
}

TaskTreeNodePayload is one node inside a task-tree live snapshot.

type TaskTreePayload

type TaskTreePayload struct {
	Root        TaskTreeNodePayload   `json:"root"`
	Descendants []TaskTreeNodePayload `json:"descendants,omitempty"`
}

TaskTreePayload is the shared task-tree live snapshot.

type TaskTreeResponse

type TaskTreeResponse struct {
	Tree TaskTreePayload `json:"tree"`
}

TaskTreeResponse wraps the shared task-tree payload.

type TaskTriageStatePayload

type TaskTriageStatePayload struct {
	TaskID             string                `json:"task_id"`
	Actor              taskpkg.ActorIdentity `json:"actor"`
	Read               bool                  `json:"read"`
	Archived           bool                  `json:"archived"`
	Dismissed          bool                  `json:"dismissed"`
	LastSeenActivityAt *time.Time            `json:"last_seen_activity_at,omitempty"`
	UpdatedAt          time.Time             `json:"updated_at"`
}

TaskTriageStatePayload is the shared actor-scoped task triage state.

type TaskTriageStateResponse

type TaskTriageStateResponse struct {
	Triage TaskTriageStatePayload `json:"triage"`
}

TaskTriageStateResponse wraps the shared task triage-state payload.

type TasksResponse

type TasksResponse struct {
	Tasks  []TaskCatalogItemPayload `json:"tasks"`
	Page   CountedCursorPagePayload `json:"page"`
	Facets TaskCatalogFacetsPayload `json:"facets"`
}

TasksResponse wraps the shared task list payload.

type TokenUsagePayload

type TokenUsagePayload struct {
	TurnID           string    `json:"turn_id,omitempty"`
	InputTokens      *int64    `json:"input_tokens,omitempty"`
	OutputTokens     *int64    `json:"output_tokens,omitempty"`
	TotalTokens      *int64    `json:"total_tokens,omitempty"`
	ThoughtTokens    *int64    `json:"thought_tokens,omitempty"`
	CacheReadTokens  *int64    `json:"cache_read_tokens,omitempty"`
	CacheWriteTokens *int64    `json:"cache_write_tokens,omitempty"`
	ContextUsed      *int64    `json:"context_used,omitempty"`
	ContextSize      *int64    `json:"context_size,omitempty"`
	CostAmount       *float64  `json:"cost_amount,omitempty"`
	CostCurrency     *string   `json:"cost_currency,omitempty"`
	Timestamp        time.Time `json:"timestamp"`
}

TokenUsagePayload is the shared token-usage response payload.

type ToolApprovalGrantListResponse

type ToolApprovalGrantListResponse struct {
	Grants []ToolApprovalGrantPayload `json:"grants"`
	Total  int                        `json:"total"`
}

ToolApprovalGrantListResponse wraps one workspace's remembered decisions.

type ToolApprovalGrantPayload

type ToolApprovalGrantPayload struct {
	ID          string                         `json:"id"`
	WorkspaceID string                         `json:"workspace_id"`
	AgentName   string                         `json:"agent_name,omitempty"`
	ToolID      toolspkg.ToolID                `json:"tool_id"`
	InputDigest string                         `json:"input_digest,omitempty"`
	Decision    toolspkg.ApprovalGrantDecision `json:"decision"`
	CreatedAt   time.Time                      `json:"created_at"`
	LastUsedAt  time.Time                      `json:"last_used_at"`
}

ToolApprovalGrantPayload is one workspace-scoped remembered native-tool approval decision.

func ToolApprovalGrantPayloadFromDomain

func ToolApprovalGrantPayloadFromDomain(grant toolspkg.ApprovalGrant) ToolApprovalGrantPayload

ToolApprovalGrantPayloadFromDomain converts one durable decision into the shared transport shape.

type ToolApprovalGrantResponse

type ToolApprovalGrantResponse struct {
	Grant ToolApprovalGrantPayload `json:"grant"`
}

ToolApprovalGrantResponse wraps one stored wider approval decision.

type ToolApprovalGrantSetRequest

type ToolApprovalGrantSetRequest struct {
	ToolID    toolspkg.ToolID                       `json:"tool_id"`
	Decision  toolspkg.ApprovalGrantDecision        `json:"decision"`
	Scope     toolspkg.ApprovalGrantManagementScope `json:"scope"`
	AgentName string                                `json:"agent_name,omitempty"`
}

ToolApprovalGrantSetRequest creates or replaces one explicit wider remembered decision.

func (ToolApprovalGrantSetRequest) Domain

Domain converts the transport request into the domain-owned validation shape.

type ToolApprovalPayload

type ToolApprovalPayload struct {
	ApprovalToken string       `json:"approval_token"`
	ExpiresAt     time.Time    `json:"expires_at"`
	ToolID        tools.ToolID `json:"tool_id"`
	InputDigest   string       `json:"input_digest"`
}

ToolApprovalPayload is the only response shape that can expose a raw approval token.

type ToolApprovalRequest

type ToolApprovalRequest struct {
	SessionID   string          `json:"session_id"`
	WorkspaceID string          `json:"workspace_id,omitempty"`
	AgentName   string          `json:"agent_name,omitempty"`
	Input       json.RawMessage `json:"input,omitempty"`
	InputDigest string          `json:"input_digest,omitempty"`
}

ToolApprovalRequest requests one local approval reference for a concrete invocation.

type ToolApprovalResponse

type ToolApprovalResponse struct {
	Approval ToolApprovalPayload `json:"approval"`
}

ToolApprovalResponse returns one approval reference.

type ToolArtifactPageResponse

type ToolArtifactPageResponse struct {
	Artifact   tools.ArtifactRef `json:"artifact"`
	Offset     int64             `json:"offset"`
	Bytes      int64             `json:"bytes"`
	TotalBytes int64             `json:"total_bytes"`
	DataBase64 string            `json:"data_base64"`
	NextOffset int64             `json:"next_offset"`
	EOF        bool              `json:"eof"`
}

ToolArtifactPageResponse is one exact byte page from a retained oversized result.

type ToolAvailabilityPayload

type ToolAvailabilityPayload struct {
	Registered  bool               `json:"registered"`
	Enabled     bool               `json:"enabled"`
	Available   bool               `json:"available"`
	Authorized  bool               `json:"authorized"`
	Executable  bool               `json:"executable"`
	Conflicted  bool               `json:"conflicted"`
	ReasonCodes []tools.ReasonCode `json:"reason_codes,omitempty"`
}

ToolAvailabilityPayload records composable runtime availability diagnostics.

type ToolBackendRefPayload

type ToolBackendRefPayload struct {
	Kind                 tools.BackendKind `json:"kind"`
	ExtensionID          string            `json:"extension_id,omitempty"`
	Handler              string            `json:"handler,omitempty"`
	MCPServer            string            `json:"mcp_server,omitempty"`
	MCPTool              string            `json:"mcp_tool,omitempty"`
	NativeName           string            `json:"native_name,omitempty"`
	RequiresCapabilities []string          `json:"requires_capabilities,omitempty"`
}

ToolBackendRefPayload identifies the executable backend without leaking backend secrets.

type ToolCallEventPayload

type ToolCallEventPayload struct {
	Kind                 tools.ToolCallEventKind `json:"kind"`
	ToolID               tools.ToolID            `json:"tool_id"`
	DisplayTitle         string                  `json:"display_title,omitempty"`
	SourceKind           tools.SourceKind        `json:"source_kind,omitempty"`
	SourceOwner          string                  `json:"source_owner,omitempty"`
	WorkspaceID          string                  `json:"workspace_id,omitempty"`
	SessionID            string                  `json:"session_id,omitempty"`
	AgentName            string                  `json:"agent_name,omitempty"`
	Risk                 tools.RiskClass         `json:"risk,omitempty"`
	ReadOnly             bool                    `json:"read_only"`
	Destructive          bool                    `json:"destructive"`
	OpenWorld            bool                    `json:"open_world"`
	ApprovalMode         string                  `json:"approval_mode,omitempty"`
	Decision             string                  `json:"decision,omitempty"`
	ReasonCodes          []tools.ReasonCode      `json:"reason_codes,omitempty"`
	DurationMS           int64                   `json:"duration_ms,omitempty"`
	ResultBytes          int64                   `json:"result_bytes,omitempty"`
	Truncated            bool                    `json:"truncated"`
	CorrelationID        string                  `json:"correlation_id,omitempty"`
	ErrorCode            tools.ErrorCode         `json:"error_code,omitempty"`
	InputDigest          string                  `json:"input_digest,omitempty"`
	RedactedInputFields  []string                `json:"redacted_input_fields,omitempty"`
	ResultDigest         string                  `json:"result_digest,omitempty"`
	ResultRedactionPaths []string                `json:"result_redaction_paths,omitempty"`
}

ToolCallEventPayload is a redacted dispatch event surfaced when a handler can collect events.

type ToolDescriptorPayload

type ToolDescriptorPayload struct {
	ToolID              tools.ToolID          `json:"tool_id"`
	Backend             ToolBackendRefPayload `json:"backend"`
	DisplayTitle        string                `json:"display_title,omitempty"`
	FriendlyVerb        string                `json:"friendly_verb,omitempty"`
	Preview             string                `json:"preview,omitempty"`
	Description         string                `json:"description"`
	InputSchema         json.RawMessage       `json:"input_schema"`
	OutputSchema        json.RawMessage       `json:"output_schema,omitempty"`
	InputSchemaDigest   string                `json:"input_schema_digest"`
	OutputSchemaDigest  string                `json:"output_schema_digest,omitempty"`
	Source              ToolSourceRefPayload  `json:"source"`
	Visibility          tools.Visibility      `json:"visibility"`
	Risk                tools.RiskClass       `json:"risk"`
	ReadOnly            bool                  `json:"read_only"`
	Destructive         bool                  `json:"destructive"`
	OpenWorld           bool                  `json:"open_world"`
	RequiresInteraction bool                  `json:"requires_interaction"`
	ConcurrencySafe     bool                  `json:"concurrency_safe"`
	MaxResultBytes      int64                 `json:"max_result_bytes,omitempty"`
	Toolsets            []tools.ToolsetID     `json:"toolsets,omitempty"`
	Tags                []string              `json:"tags,omitempty"`
	SearchHints         []string              `json:"search_hints,omitempty"`
}

ToolDescriptorPayload is the public descriptor shape exposed by daemon APIs.

type ToolErrorPayload

type ToolErrorPayload struct {
	Code          tools.ErrorCode            `json:"code"`
	Message       string                     `json:"message"`
	ToolID        tools.ToolID               `json:"tool_id,omitempty"`
	ReasonCodes   []tools.ReasonCode         `json:"reason_codes,omitempty"`
	Layer         string                     `json:"layer,omitempty"`
	Details       map[string]json.RawMessage `json:"details,omitempty"`
	PartialResult *tools.ToolResult          `json:"partial_result,omitempty"`
}

ToolErrorPayload is the structured error envelope for tool registry routes.

type ToolErrorResponse

type ToolErrorResponse struct {
	Error ToolErrorPayload `json:"error"`
}

ToolErrorResponse returns one structured tool error.

type ToolInvokeRequest

type ToolInvokeRequest struct {
	SessionID            string          `json:"session_id,omitempty"`
	WorkspaceID          string          `json:"workspace_id,omitempty"`
	AgentName            string          `json:"agent_name,omitempty"`
	ToolCallID           string          `json:"tool_call_id,omitempty"`
	TurnID               string          `json:"turn_id,omitempty"`
	CorrelationID        string          `json:"correlation_id,omitempty"`
	Input                json.RawMessage `json:"input"`
	SensitiveInputFields []string        `json:"sensitive_input_fields,omitempty"`
	ApprovalToken        string          `json:"approval_token,omitempty"`
}

ToolInvokeRequest executes a concrete tool call through registry dispatch.

type ToolInvokeResponse

type ToolInvokeResponse struct {
	ToolID     tools.ToolID           `json:"tool_id"`
	Status     string                 `json:"status"`
	Result     tools.ToolResult       `json:"result"`
	Truncated  bool                   `json:"truncated"`
	DurationMS int64                  `json:"duration_ms"`
	Events     []ToolCallEventPayload `json:"events"`
}

ToolInvokeResponse is the stable result envelope returned by invoke endpoints.

type ToolPayload

type ToolPayload struct {
	Descriptor   ToolDescriptorPayload     `json:"descriptor"`
	Availability ToolAvailabilityPayload   `json:"availability"`
	Decision     ToolPolicyDecisionPayload `json:"decision"`
}

ToolPayload is one public registry projection row.

type ToolPolicyDecisionPayload

type ToolPolicyDecisionPayload struct {
	VisibleToOperator    bool               `json:"visible_to_operator"`
	VisibleToSession     bool               `json:"visible_to_session"`
	Callable             bool               `json:"callable"`
	ApprovalRequired     bool               `json:"approval_required"`
	SystemPermissionMode string             `json:"system_permission_mode,omitempty"`
	SessionPolicyResult  string             `json:"session_policy_result,omitempty"`
	AgentPolicyResult    string             `json:"agent_policy_result,omitempty"`
	RegistryPolicyResult string             `json:"registry_policy_result,omitempty"`
	SourcePolicyResult   string             `json:"source_policy_result,omitempty"`
	AvailabilityResult   string             `json:"availability_result,omitempty"`
	HookResult           string             `json:"hook_result,omitempty"`
	ReasonCodes          []tools.ReasonCode `json:"reason_codes,omitempty"`
}

ToolPolicyDecisionPayload records effective policy and availability decisions for a caller.

type ToolResponse

type ToolResponse struct {
	Tool ToolPayload `json:"tool"`
}

ToolResponse returns one registry tool projection.

type ToolSearchRequest

type ToolSearchRequest struct {
	Query       string `json:"query"`
	Limit       int    `json:"limit,omitempty"`
	WorkspaceID string `json:"workspace_id,omitempty"`
	SessionID   string `json:"session_id,omitempty"`
	AgentName   string `json:"agent_name,omitempty"`
}

ToolSearchRequest filters the scoped registry projection.

type ToolSourceRefPayload

type ToolSourceRefPayload struct {
	Kind            tools.SourceKind `json:"kind"`
	Owner           string           `json:"owner"`
	RawServerName   string           `json:"raw_server_name,omitempty"`
	RawToolName     string           `json:"raw_tool_name,omitempty"`
	ResourceID      string           `json:"resource_id,omitempty"`
	ResourceVersion string           `json:"resource_version,omitempty"`
	WorkspaceID     string           `json:"workspace_id,omitempty"`
	Scope           string           `json:"scope,omitempty"`
}

ToolSourceRefPayload preserves descriptor provenance without alternate identities.

type ToolsResponse

type ToolsResponse struct {
	Tools []ToolPayload `json:"tools"`
}

ToolsResponse returns a registry projection.

type ToolsetPayload

type ToolsetPayload struct {
	ID            tools.ToolsetID    `json:"id"`
	Tools         []string           `json:"tools,omitempty"`
	Toolsets      []tools.ToolsetID  `json:"toolsets,omitempty"`
	ExpandedTools []tools.ToolID     `json:"expanded_tools,omitempty"`
	Status        string             `json:"status"`
	ReasonCodes   []tools.ReasonCode `json:"reason_codes,omitempty"`
}

ToolsetPayload describes one named toolset and its expansion state.

type ToolsetResponse

type ToolsetResponse struct {
	Toolset ToolsetPayload `json:"toolset"`
}

ToolsetResponse returns one toolset projection.

type ToolsetsResponse

type ToolsetsResponse struct {
	Toolsets []ToolsetPayload `json:"toolsets"`
}

ToolsetsResponse returns the known toolset catalog projection.

type TranscriptDeltaPayload

type TranscriptDeltaPayload struct {
	SessionID     string             `json:"session_id"`
	WorkspaceID   string             `json:"workspace_id,omitempty"`
	WorkspacePath string             `json:"workspace_path,omitempty"`
	Epoch         int64              `json:"epoch"`
	Generation    int64              `json:"generation"`
	Entries       []transcript.Entry `json:"entries"`
	Cursor        int64              `json:"cursor"`
	MaxSequence   int64              `json:"max_sequence"`
	HasMore       bool               `json:"has_more"`
}

TranscriptDeltaPayload carries one bounded batch of materialized entry upserts.

type TranscriptMarkerPayload

type TranscriptMarkerPayload struct {
	Kind       string          `json:"kind"`
	OccurredAt time.Time       `json:"occurred_at"`
	Summary    string          `json:"summary"`
	Evidence   map[string]any  `json:"evidence,omitempty"`
	Diagnostic json.RawMessage `json:"diagnostic,omitempty"`
}

TranscriptMarkerPayload is the typed transcript marker shape shared by logs, recap, and transcript UI projections.

type TranscriptSnapshotPayload

type TranscriptSnapshotPayload struct {
	SessionID          string             `json:"session_id"`
	WorkspaceID        string             `json:"workspace_id,omitempty"`
	WorkspacePath      string             `json:"workspace_path,omitempty"`
	Epoch              int64              `json:"epoch"`
	Generation         int64              `json:"generation"`
	Entries            []transcript.Entry `json:"entries"`
	MaxSequence        int64              `json:"max_sequence"`
	HasOlder           bool               `json:"has_older"`
	NextBeforeSequence int64              `json:"next_before_sequence,omitempty"`
	Reset              bool               `json:"reset"`
	Reason             string             `json:"reason,omitempty"`
}

TranscriptSnapshotPayload seeds or explicitly resets one bounded transcript tail.

type TriggerPayload

type TriggerPayload struct {
	ID                   string                        `json:"id"`
	Scope                automationpkg.Scope           `json:"scope"`
	Name                 string                        `json:"name"`
	TargetKind           automationpkg.TargetKind      `json:"target_kind"`
	AgentName            string                        `json:"agent_name"`
	WorkspaceID          string                        `json:"workspace_id,omitempty"`
	Prompt               string                        `json:"prompt"`
	Event                string                        `json:"event"`
	Filter               map[string]string             `json:"filter,omitempty"`
	LoopTarget           *automationpkg.LoopTarget     `json:"loop_target,omitempty"`
	Enabled              bool                          `json:"enabled"`
	Retry                automationpkg.RetryConfig     `json:"retry"`
	FireLimit            automationpkg.FireLimitConfig `json:"fire_limit"`
	Source               automationpkg.JobSource       `json:"source"`
	WebhookID            string                        `json:"webhook_id,omitempty"`
	EndpointSlug         string                        `json:"endpoint_slug,omitempty"`
	WebhookSecretPresent bool                          `json:"webhook_secret_present"`
	WebhookSecretHash    string                        `json:"webhook_secret_hash,omitempty"`
	Ingress              *GatewayIngressPayload        `json:"ingress,omitempty"`
	CreatedAt            time.Time                     `json:"created_at"`
	UpdatedAt            time.Time                     `json:"updated_at"`
}

TriggerPayload is the shared automation trigger response payload.

func TriggerPayloadFromTrigger

func TriggerPayloadFromTrigger(trigger automationpkg.Trigger) TriggerPayload

TriggerPayloadFromTrigger converts an internal automation trigger into the public redacted automation trigger payload.

func TriggerPayloadsFromTriggers

func TriggerPayloadsFromTriggers(triggers []automationpkg.Trigger) []TriggerPayload

TriggerPayloadsFromTriggers converts internal automation triggers into public redacted automation trigger payloads.

type TriggerResponse

type TriggerResponse struct {
	Trigger TriggerPayload `json:"trigger"`
}

TriggerResponse wraps one shared automation trigger payload.

type TriggersResponse

type TriggersResponse struct {
	Triggers []TriggerPayload         `json:"triggers"`
	Page     CountedCursorPagePayload `json:"page"`
}

TriggersResponse wraps the shared automation trigger list payload.

type TurnHistoryPayload

type TurnHistoryPayload struct {
	TurnID string                `json:"turn_id"`
	Events []SessionEventPayload `json:"events"`
}

TurnHistoryPayload is the shared turn history response payload.

type UpdateAgentRequest

type UpdateAgentRequest struct {
	Workspace      string             `json:"workspace,omitempty"`
	Agent          CreateAgentPayload `json:"agent"`
	ExpectedDigest string             `json:"expected_digest"`
}

UpdateAgentRequest replaces the effective route agent definition.

type UpdateBridgeRequest

type UpdateBridgeRequest struct {
	DisplayName          *string                        `json:"display_name,omitempty"`
	DMPolicy             *bridgepkg.BridgeDMPolicy      `json:"dm_policy,omitempty"`
	RoutingPolicy        *bridgepkg.RoutingPolicy       `json:"routing_policy,omitempty"`
	ProviderConfig       *BridgeProviderConfigPayload   `json:"provider_config,omitempty"`
	DeliveryDefaults     *BridgeDeliveryDefaultsPayload `json:"delivery_defaults,omitempty"`
	NotificationSuppress *bool                          `json:"notification_suppress,omitempty"`
	Degradation          *bridgepkg.BridgeDegradation   `json:"degradation,omitempty"`
	ClearDegradation     bool                           `json:"clear_degradation,omitempty"`
}

UpdateBridgeRequest is the shared mutable bridge-instance patch payload.

func (UpdateBridgeRequest) ToUpdateInstanceRequest

func (r UpdateBridgeRequest) ToUpdateInstanceRequest(id string) (bridgepkg.UpdateInstanceRequest, error)

ToUpdateInstanceRequest validates and converts the transport patch payload into the daemon-owned bridge update request for the supplied instance id.

type UpdateExtensionRequest

type UpdateExtensionRequest struct {
	Version              string `json:"version,omitempty"`
	CheckOnly            bool   `json:"check_only,omitempty"`
	AllowUnverified      bool   `json:"allow_unverified,omitempty"`
	ConfirmNetworkDigest string `json:"confirm_network_digest,omitempty"`
}

UpdateExtensionRequest is the shared marketplace extension update payload.

type UpdateExtensionsRequest

type UpdateExtensionsRequest struct {
	Names           []string `json:"names,omitempty"`
	All             bool     `json:"all,omitempty"`
	Version         string   `json:"version,omitempty"`
	CheckOnly       bool     `json:"check_only,omitempty"`
	AllowUnverified bool     `json:"allow_unverified,omitempty"`
}

UpdateExtensionsRequest selects one or more managed extension updates.

type UpdateJobRequest

type UpdateJobRequest struct {
	Name       *string                        `json:"name,omitempty"`
	Prompt     *string                        `json:"prompt,omitempty"`
	Schedule   *automationpkg.ScheduleSpec    `json:"schedule,omitempty"`
	Task       *automationpkg.JobTaskConfig   `json:"task,omitempty"`
	LoopTarget *automationpkg.LoopTarget      `json:"loop_target,omitempty"`
	Enabled    *bool                          `json:"enabled,omitempty"`
	Retry      *automationpkg.RetryConfig     `json:"retry,omitempty"`
	FireLimit  *automationpkg.FireLimitConfig `json:"fire_limit,omitempty"`
}

UpdateJobRequest is the shared automation job patch payload.

func (UpdateJobRequest) HasChanges

func (r UpdateJobRequest) HasChanges() bool

HasChanges reports whether the patch includes any mutable field.

type UpdateNetworkChannelRequest

type UpdateNetworkChannelRequest struct {
	Purpose           *string `json:"purpose,omitempty"`
	FanoutPolicy      *string `json:"fanout_policy,omitempty"`
	CoordinatorPeerID *string `json:"coordinator_peer_id,omitempty"`
}

UpdateNetworkChannelRequest captures mutable channel delivery policy fields.

type UpdateNotificationPresetRequest

type UpdateNotificationPresetRequest struct {
	Events  *[]string                    `json:"events,omitempty"`
	Targets *[]NotificationTargetPayload `json:"targets,omitempty"`
	Filter  *string                      `json:"filter,omitempty"`
	Enabled *bool                        `json:"enabled,omitempty"`
}

UpdateNotificationPresetRequest mutates one preset.

func (UpdateNotificationPresetRequest) ToUpdateRequest

ToUpdateRequest converts the transport patch shape into the domain request.

type UpdateSettingsAutomationRequest

type UpdateSettingsAutomationRequest struct {
	Config SettingsAutomationConfigPayload `json:"config"`
}

type UpdateSettingsGeneralRequest

type UpdateSettingsGeneralRequest struct {
	Config SettingsGeneralConfigPayload `json:"config"`
}

type UpdateSettingsHooksExtensionsRequest

type UpdateSettingsHooksExtensionsRequest struct {
	Config SettingsExtensionsConfigPayload `json:"config"`
}

type UpdateSettingsMemoryRequest

type UpdateSettingsMemoryRequest struct {
	Config SettingsMemoryConfigPayload `json:"config"`
}

type UpdateSettingsNetworkRequest

type UpdateSettingsNetworkRequest struct {
	Config SettingsNetworkConfigPayload `json:"config"`
}

type UpdateSettingsObservabilityRequest

type UpdateSettingsObservabilityRequest struct {
	Config SettingsObservabilityConfigPayload `json:"config"`
}

type UpdateSettingsRolesRequest

type UpdateSettingsRolesRequest struct {
	Config SettingsRolesConfigPayload `json:"config"`
}

type UpdateSettingsSkillsRequest

type UpdateSettingsSkillsRequest struct {
	Config SettingsSkillsConfigPayload `json:"config"`
}

type UpdateSettingsWindowManagerRequest

type UpdateSettingsWindowManagerRequest struct {
	Config SettingsWindowManagerConfigPayload `json:"config"`
}

type UpdateTaskRequest

type UpdateTaskRequest struct {
	Title                *string                 `json:"title,omitempty"`
	Description          *string                 `json:"description,omitempty"`
	Priority             *taskpkg.Priority       `json:"priority,omitempty"`
	MaxAttempts          *int                    `json:"max_attempts,omitempty"`
	AutoEnqueueOnReady   *bool                   `json:"auto_enqueue_on_ready,omitempty"`
	ApprovalPolicy       *taskpkg.ApprovalPolicy `json:"approval_policy,omitempty"`
	Metadata             *json.RawMessage        `json:"metadata,omitempty"`
	NetworkParticipation *participation.Request  `json:"network_participation,omitempty"`
	Owner                *taskpkg.Ownership      `json:"owner,omitempty"`
	ClearOwner           bool                    `json:"clear_owner,omitempty"`
}

UpdateTaskRequest is the shared task patch payload.

func (UpdateTaskRequest) HasChanges

func (r UpdateTaskRequest) HasChanges() bool

HasChanges reports whether the patch includes any mutable task field.

type UpdateTriggerRequest

type UpdateTriggerRequest struct {
	Name               *string                        `json:"name,omitempty"`
	Prompt             *string                        `json:"prompt,omitempty"`
	Event              *string                        `json:"event,omitempty"`
	Filter             map[string]string              `json:"filter,omitempty"`
	LoopTarget         *automationpkg.LoopTarget      `json:"loop_target,omitempty"`
	Enabled            *bool                          `json:"enabled,omitempty"`
	Retry              *automationpkg.RetryConfig     `json:"retry,omitempty"`
	FireLimit          *automationpkg.FireLimitConfig `json:"fire_limit,omitempty"`
	WebhookID          *string                        `json:"webhook_id,omitempty"`
	EndpointSlug       *string                        `json:"endpoint_slug,omitempty"`
	WebhookSecretValue *string                        `json:"webhook_secret_value,omitempty"`
}

UpdateTriggerRequest is the shared automation trigger patch payload.

func (UpdateTriggerRequest) HasChanges

func (r UpdateTriggerRequest) HasChanges() bool

HasChanges reports whether the patch includes any mutable field.

type UpdateWorkspaceRequest

type UpdateWorkspaceRequest struct {
	Name         *string   `json:"name"`
	AddDirs      *[]string `json:"add_dirs"`
	DefaultAgent *string   `json:"default_agent"`
	SandboxRef   *string   `json:"sandbox_ref"`
}

UpdateWorkspaceRequest is the shared workspace update request payload.

type ValidateLoopRequest

type ValidateLoopRequest struct {
	Definition LoopDefinitionDocument `json:"definition"`
}

ValidateLoopRequest lints and compiles a Loop definition without saving it.

type ValidationIssue

type ValidationIssue struct {
	Path     string        `json:"path"`
	Line     int           `json:"line,omitempty"`
	Column   int           `json:"column,omitempty"`
	Field    string        `json:"field,omitempty"`
	Message  string        `json:"message"`
	Severity IssueSeverity `json:"severity"`
}

ValidationIssue is one positioned extension-package validation diagnostic.

type VaultSecretPayload

type VaultSecretPayload struct {
	Ref       string    `json:"ref"`
	Namespace string    `json:"namespace"`
	Kind      string    `json:"kind,omitempty"`
	Present   bool      `json:"present"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

VaultSecretPayload is redacted vault metadata safe for public control surfaces.

type VaultSecretResponse

type VaultSecretResponse struct {
	Secret VaultSecretPayload `json:"secret"`
}

VaultSecretResponse wraps one redacted vault metadata row.

type VaultSecretsResponse

type VaultSecretsResponse struct {
	Secrets []VaultSecretPayload `json:"secrets"`
}

VaultSecretsResponse wraps a redacted vault metadata list.

type WebhookDeliveryPayload

type WebhookDeliveryPayload struct {
	Matched int          `json:"matched"`
	Runs    []RunPayload `json:"runs,omitempty"`
}

WebhookDeliveryPayload is the shared webhook dispatch response payload.

type WebhookDeliveryResponse

type WebhookDeliveryResponse struct {
	Result WebhookDeliveryPayload `json:"result"`
}

WebhookDeliveryResponse wraps the shared webhook delivery result payload.

type WindowManagerActor

type WindowManagerActor struct {
	Kind string `json:"kind,omitempty"`
	ID   string `json:"id,omitempty"`
}

WindowManagerActor records a command initiator without affecting command semantics.

type WindowManagerArrangeLayoutPayload

type WindowManagerArrangeLayoutPayload struct {
	DesktopID   windowmanager.DesktopID      `json:"desktop_id"`
	WindowIDs   []windowmanager.WindowID     `json:"window_ids"`
	Arrangement windowmanager.Arrangement    `json:"arrangement"`
	Frame       windowmanager.NormalizedRect `json:"frame"`
	GroupID     windowmanager.GroupID        `json:"group_id"`
	ResourceID  string                       `json:"resource_id,omitempty"`
}

type WindowManagerBalanceLayoutPayload

type WindowManagerBalanceLayoutPayload struct {
	GroupID *windowmanager.GroupID `json:"group_id,omitempty"`
	SplitID *windowmanager.NodeID  `json:"split_id,omitempty"`
}

type WindowManagerClientFrame

type WindowManagerClientFrame struct {
	Type        string                    `json:"type"`
	WorkspaceID windowmanager.WorkspaceID `json:"workspace_id"`
	Revision    WindowManagerRevision     `json:"revision"`
	Client      WindowManagerClientView   `json:"client"`
}

WindowManagerClientFrame carries one bound client's presentation change.

type WindowManagerClientRegistration

type WindowManagerClientRegistration struct {
	WorkspaceID     windowmanager.WorkspaceID `json:"workspace_id"`
	ClientID        windowmanager.ClientID    `json:"client_id,omitempty"`
	ActiveDesktopID windowmanager.DesktopID   `json:"active_desktop_id,omitempty"`
}

WindowManagerClientRegistration requests one live client view.

type WindowManagerClientView

type WindowManagerClientView struct {
	WorkspaceID          windowmanager.WorkspaceID `json:"workspace_id"`
	ClientID             windowmanager.ClientID    `json:"client_id"`
	PresentationRevision WindowManagerRevision     `json:"presentation_revision"`
	ActiveDesktopID      windowmanager.DesktopID   `json:"active_desktop_id"`
	FocusedWindowID      *windowmanager.WindowID   `json:"focused_window_id,omitempty"`
	FocusOrder           []windowmanager.WindowID  `json:"focus_order"`
	StackActive          map[string]string         `json:"stack_active"`
	ConnectedAt          time.Time                 `json:"connected_at"`
}

WindowManagerClientView is transient presentation state for one connected client.

func WindowManagerClientFromDomain

func WindowManagerClientFromDomain(client windowmanager.ClientView) (WindowManagerClientView, error)

WindowManagerClientFromDomain converts transient client presentation state.

type WindowManagerClientsResponse

type WindowManagerClientsResponse struct {
	WorkspaceID windowmanager.WorkspaceID `json:"workspace_id"`
	Clients     []WindowManagerClientView `json:"clients"`
}

WindowManagerClientsResponse lists client-local views in one workspace partition.

type WindowManagerCloseWindowPayload

type WindowManagerCloseWindowPayload struct {
	WindowID windowmanager.WindowID   `json:"window_id"`
	Minimize bool                     `json:"minimize"`
	Scope    windowmanager.CloseScope `json:"scope,omitempty"`
}

type WindowManagerCommandID

type WindowManagerCommandID string

WindowManagerCommandID is the stable wire discriminator for semantic commands.

const (
	WindowManagerCommandDesktopCreate        WindowManagerCommandID = "desktop.create"
	WindowManagerCommandDesktopUpdate        WindowManagerCommandID = "desktop.update"
	WindowManagerCommandDesktopReorder       WindowManagerCommandID = "desktop.reorder"
	WindowManagerCommandDesktopSwitch        WindowManagerCommandID = "desktop.switch"
	WindowManagerCommandDesktopDelete        WindowManagerCommandID = "desktop.delete"
	WindowManagerCommandWindowOpen           WindowManagerCommandID = "window.open"
	WindowManagerCommandWindowNavigate       WindowManagerCommandID = "window.navigate"
	WindowManagerCommandWindowClose          WindowManagerCommandID = "window.close"
	WindowManagerCommandWindowFocus          WindowManagerCommandID = "window.focus"
	WindowManagerCommandWindowMove           WindowManagerCommandID = "window.move"
	WindowManagerCommandWindowResize         WindowManagerCommandID = "window.resize"
	WindowManagerCommandWindowSwap           WindowManagerCommandID = "window.swap"
	WindowManagerCommandWindowToggleFloating WindowManagerCommandID = "window.toggle_floating"
	WindowManagerCommandWindowZoom           WindowManagerCommandID = "window.zoom"
	WindowManagerCommandWindowStackGroup     WindowManagerCommandID = "window.stack.group"
	WindowManagerCommandWindowStackReorder   WindowManagerCommandID = "window.stack.reorder"
	WindowManagerCommandWindowStackSetActive WindowManagerCommandID = "window.stack.set_active"
	WindowManagerCommandWindowPin            WindowManagerCommandID = "window.pin"
	WindowManagerCommandWindowReopen         WindowManagerCommandID = "window.reopen"
	WindowManagerCommandLayoutArrange        WindowManagerCommandID = "layout.arrange"
	WindowManagerCommandLayoutResize         WindowManagerCommandID = "layout.resize"
	WindowManagerCommandLayoutFrameResize    WindowManagerCommandID = "layout.frame_resize"
	WindowManagerCommandLayoutBalance        WindowManagerCommandID = "layout.balance"
	WindowManagerCommandLayoutUndo           WindowManagerCommandID = "layout.undo"
	WindowManagerCommandLayoutRedo           WindowManagerCommandID = "layout.redo"
	WindowManagerCommandLayoutReplace        WindowManagerCommandID = "layout.replace"
)

type WindowManagerCommandRequest

type WindowManagerCommandRequest struct {
	WorkspaceID      windowmanager.WorkspaceID `json:"workspace_id"`
	CommandID        WindowManagerCommandID    `json:"command_id"`
	ExpectedRevision *WindowManagerRevision    `json:"expected_revision"`
	ClientID         *windowmanager.ClientID   `json:"client_id,omitempty"`
	Actor            WindowManagerActor        `json:"actor"`
	Origin           string                    `json:"origin"`
	Rebase           *WindowManagerRebaseGuard `json:"rebase,omitempty"`
	Payload          json.RawMessage           `json:"payload"`
}

WindowManagerCommandRequest binds one discriminated payload to a workspace revision.

func (WindowManagerCommandRequest) Domain

Domain validates the path/body identity and decodes the payload selected by command_id.

type WindowManagerCreateDesktopPayload

type WindowManagerCreateDesktopPayload struct {
	DesktopID  windowmanager.DesktopID      `json:"desktop_id"`
	Name       string                       `json:"name"`
	Purpose    windowmanager.DesktopPurpose `json:"purpose"`
	FocusOwner *windowmanager.WindowID      `json:"focus_owner,omitempty"`
	AfterID    *windowmanager.DesktopID     `json:"after_id,omitempty"`
}

type WindowManagerDeleteDesktopPayload

type WindowManagerDeleteDesktopPayload struct {
	DesktopID     windowmanager.DesktopID  `json:"desktop_id"`
	DestinationID *windowmanager.DesktopID `json:"destination_id,omitempty"`
}

type WindowManagerDesktop

type WindowManagerDesktop struct {
	ID             windowmanager.DesktopID      `json:"id"`
	Name           string                       `json:"name"`
	Order          int                          `json:"order"`
	Purpose        windowmanager.DesktopPurpose `json:"purpose"`
	FocusOwner     *windowmanager.WindowID      `json:"focus_owner,omitempty"`
	Groups         []WindowManagerLayoutGroup   `json:"groups"`
	Floating       []windowmanager.WindowID     `json:"floating"`
	FloatingStacks []WindowManagerFloatingStack `json:"floating_stacks"`
}

WindowManagerDesktop is one ordered workspace desktop in the stable wire contract.

type WindowManagerErrorCode

type WindowManagerErrorCode string

WindowManagerErrorCode is a stable failure identifier shared by every transport.

const (
	WindowManagerErrorWorkspaceNotFound WindowManagerErrorCode = "window_manager_workspace_not_found"
	WindowManagerErrorRevisionConflict  WindowManagerErrorCode = "window_manager_revision_conflict"
	WindowManagerErrorInvalidCommand    WindowManagerErrorCode = "window_manager_invalid_command"
	WindowManagerErrorInvalidTopology   WindowManagerErrorCode = "window_manager_invalid_topology"
	WindowManagerErrorDesktopNotFound   WindowManagerErrorCode = "window_manager_desktop_not_found"
	WindowManagerErrorWindowNotFound    WindowManagerErrorCode = "window_manager_window_not_found"
	WindowManagerErrorNotStacked        WindowManagerErrorCode = "window_manager_not_stacked"
	WindowManagerErrorWindowPinned      WindowManagerErrorCode = "window_manager_window_pinned"
	WindowManagerErrorClientNotFound    WindowManagerErrorCode = "window_manager_client_not_found"
	WindowManagerErrorDestination       WindowManagerErrorCode = "window_manager_destination_required"
	WindowManagerErrorFinalDesktop      WindowManagerErrorCode = "window_manager_final_desktop"
	WindowManagerErrorHistoryBoundary   WindowManagerErrorCode = "window_manager_history_boundary"
	WindowManagerErrorLayoutNotFound    WindowManagerErrorCode = "window_manager_layout_not_found"
	WindowManagerErrorSlowConsumer      WindowManagerErrorCode = "window_manager_slow_consumer"
	WindowManagerErrorUnavailable       WindowManagerErrorCode = "window_manager_unavailable"
)

type WindowManagerErrorFrame

type WindowManagerErrorFrame struct {
	Type  string                    `json:"type"`
	Error WindowManagerErrorPayload `json:"error"`
}

WindowManagerErrorFrame closes a stream with one stable structured error.

type WindowManagerErrorPayload

type WindowManagerErrorPayload struct {
	Error           string                     `json:"error"`
	Code            WindowManagerErrorCode     `json:"code"`
	WorkspaceID     windowmanager.WorkspaceID  `json:"workspace_id"`
	CurrentRevision *WindowManagerRevision     `json:"current_revision,omitempty"`
	Conflicts       []windowmanager.Conflict   `json:"conflicts,omitempty"`
	Diagnostics     []windowmanager.Diagnostic `json:"diagnostics,omitempty"`
}

WindowManagerErrorPayload is the deterministic error body shared by HTTP, UDS, CLI, and WebSocket.

type WindowManagerEvent

type WindowManagerEvent struct {
	WorkspaceID windowmanager.WorkspaceID `json:"workspace_id"`
	Revision    WindowManagerRevision     `json:"revision"`
	CommandID   WindowManagerCommandID    `json:"command_id"`
	Changes     windowmanager.ChangeSet   `json:"changes"`
	Actor       WindowManagerActor        `json:"actor"`
	Origin      string                    `json:"origin,omitempty"`
	OccurredAt  time.Time                 `json:"occurred_at"`
}

WindowManagerEvent is one committed semantic mutation.

func WindowManagerEventFromDomain

func WindowManagerEventFromDomain(event windowmanager.Event) (WindowManagerEvent, error)

WindowManagerEventFromDomain converts a committed domain event to the stable wire form.

type WindowManagerEventFrame

type WindowManagerEventFrame struct {
	Type        string                    `json:"type"`
	WorkspaceID windowmanager.WorkspaceID `json:"workspace_id"`
	Revision    WindowManagerRevision     `json:"revision"`
	Event       WindowManagerEvent        `json:"event"`
}

WindowManagerEventFrame carries one event strictly after the snapshot fence.

type WindowManagerFloatingStack

type WindowManagerFloatingStack struct {
	ID        windowmanager.NodeID         `json:"id"`
	WindowIDs []windowmanager.WindowID     `json:"window_ids"`
	ActiveID  *windowmanager.WindowID      `json:"active_id,omitempty"`
	Rect      windowmanager.NormalizedRect `json:"rect"`
	Minimized bool                         `json:"minimized"`
}

WindowManagerFloatingStack is one ordered tab frame outside the tiled tree.

type WindowManagerFocusWindowPayload

type WindowManagerFocusWindowPayload struct {
	WindowID  *windowmanager.WindowID      `json:"window_id,omitempty"`
	Direction windowmanager.FocusDirection `json:"direction,omitempty"`
}

type WindowManagerFrameResizeLayoutPayload

type WindowManagerFrameResizeLayoutPayload struct {
	DesktopID windowmanager.DesktopID              `json:"desktop_id"`
	Edits     []WindowManagerGroupFrameEditPayload `json:"edits"`
}

type WindowManagerGroupFrameEditPayload

type WindowManagerGroupFrameEditPayload struct {
	GroupID windowmanager.GroupID        `json:"group_id"`
	Frame   windowmanager.NormalizedRect `json:"frame"`
}

type WindowManagerGroupWindowsPayload

type WindowManagerGroupWindowsPayload struct {
	TargetWindowID windowmanager.WindowID   `json:"target_window_id"`
	WindowIDs      []windowmanager.WindowID `json:"window_ids"`
	InsertIndex    *int                     `json:"insert_index,omitempty"`
}

type WindowManagerLayoutDocument

type WindowManagerLayoutDocument struct {
	Version     uint32                         `json:"version"`
	WorkspaceID windowmanager.WorkspaceID      `json:"workspace_id"`
	Desktops    []WindowManagerDesktop         `json:"desktops"`
	Windows     map[string]WindowManagerWindow `json:"windows"`
	Overrides   windowmanager.WorkspaceConfig  `json:"overrides"`
}

WindowManagerLayoutDocument is the stable declarative layout wire contract.

func WindowManagerLayoutFromDomain

func WindowManagerLayoutFromDomain(document windowmanager.LayoutDocument) (WindowManagerLayoutDocument, error)

WindowManagerLayoutFromDomain converts a domain layout to its stable wire form.

func (WindowManagerLayoutDocument) Domain

Domain converts a stable wire layout to the authoritative domain document.

type WindowManagerLayoutGroup

type WindowManagerLayoutGroup struct {
	ID    windowmanager.GroupID        `json:"id"`
	Frame windowmanager.NormalizedRect `json:"frame"`
	Root  WindowManagerLayoutNode      `json:"root"`
}

WindowManagerLayoutGroup is one independent tiled island in a desktop.

type WindowManagerLayoutNode

type WindowManagerLayoutNode struct {
	ID        windowmanager.NodeID      `json:"id"`
	Kind      windowmanager.NodeKind    `json:"kind"`
	WindowID  *windowmanager.WindowID   `json:"window_id,omitempty"`
	Axis      *windowmanager.Axis       `json:"axis,omitempty"`
	Children  []WindowManagerLayoutNode `json:"children,omitempty"`
	Weights   []float64                 `json:"weights,omitempty"`
	WindowIDs []windowmanager.WindowID  `json:"window_ids,omitempty"`
	ActiveID  *windowmanager.WindowID   `json:"active_id,omitempty"`
}

WindowManagerLayoutNode is a recursive leaf, weighted split, or tabbed stack.

type WindowManagerLayoutReplaceRequest

type WindowManagerLayoutReplaceRequest struct {
	WorkspaceID      windowmanager.WorkspaceID   `json:"workspace_id"`
	ExpectedRevision *WindowManagerRevision      `json:"expected_revision"`
	ClientID         *windowmanager.ClientID     `json:"client_id,omitempty"`
	Actor            WindowManagerActor          `json:"actor"`
	Origin           string                      `json:"origin"`
	Document         WindowManagerLayoutDocument `json:"document"`
}

WindowManagerLayoutReplaceRequest applies a declarative document through revision CAS.

type WindowManagerLayoutValidationRequest

type WindowManagerLayoutValidationRequest struct {
	WorkspaceID windowmanager.WorkspaceID   `json:"workspace_id"`
	Document    WindowManagerLayoutDocument `json:"document"`
}

WindowManagerLayoutValidationRequest validates a declarative document without writing it.

type WindowManagerLayoutValidationResponse

type WindowManagerLayoutValidationResponse struct {
	WorkspaceID windowmanager.WorkspaceID  `json:"workspace_id"`
	Valid       bool                       `json:"valid"`
	Diagnostics []windowmanager.Diagnostic `json:"diagnostics,omitempty"`
}

WindowManagerLayoutValidationResponse returns stable topology diagnostics.

type WindowManagerMoveWindowPayload

type WindowManagerMoveWindowPayload struct {
	WindowID             windowmanager.WindowID        `json:"window_id"`
	DestinationDesktopID windowmanager.DesktopID       `json:"destination_desktop_id"`
	TargetWindowID       *windowmanager.WindowID       `json:"target_window_id,omitempty"`
	Placement            windowmanager.DropPlacement   `json:"placement"`
	FloatingRect         *windowmanager.NormalizedRect `json:"floating_rect,omitempty"`
	MoveGroup            bool                          `json:"move_group"`
}

type WindowManagerNavigateWindowPayload

type WindowManagerNavigateWindowPayload struct {
	WindowID    windowmanager.WindowID     `json:"window_id"`
	Route       windowmanager.RouteIntent  `json:"route,omitzero"`
	InstanceKey *string                    `json:"instance_key,omitempty"`
	Mode        windowmanager.NavigateMode `json:"mode,omitempty"`
}

type WindowManagerOpenWindowPayload

type WindowManagerOpenWindowPayload struct {
	Window          WindowManagerWindowSpecPayload `json:"window"`
	RestoreWindowID *windowmanager.WindowID        `json:"restore_window_id,omitempty"`
}

type WindowManagerPinWindowPayload

type WindowManagerPinWindowPayload struct {
	WindowID windowmanager.WindowID `json:"window_id"`
	Pinned   bool                   `json:"pinned"`
}

type WindowManagerPreview

type WindowManagerPreview struct {
	Snapshot    WindowManagerSnapshot      `json:"snapshot"`
	Changed     bool                       `json:"changed"`
	Changes     windowmanager.ChangeSet    `json:"changes"`
	Diagnostics []windowmanager.Diagnostic `json:"diagnostics,omitempty"`
	Client      *WindowManagerClientView   `json:"client,omitempty"`
}

WindowManagerPreview reports a validated proposal without a durable write.

func WindowManagerPreviewFromDomain

func WindowManagerPreviewFromDomain(preview windowmanager.Preview) (WindowManagerPreview, error)

WindowManagerPreviewFromDomain converts a command preview.

type WindowManagerRebaseGuard

type WindowManagerRebaseGuard struct {
	WindowID      *windowmanager.WindowID `json:"window_id,omitempty"`
	SourceNodeID  *windowmanager.NodeID   `json:"source_node_id,omitempty"`
	TargetNodeID  *windowmanager.NodeID   `json:"target_node_id,omitempty"`
	SplitID       *windowmanager.NodeID   `json:"split_id,omitempty"`
	BoundaryIndex *int                    `json:"boundary_index,omitempty"`
}

WindowManagerRebaseGuard proves stale source and target identities remain unambiguous.

type WindowManagerRedoLayoutPayload

type WindowManagerRedoLayoutPayload struct{}

type WindowManagerReopenWindowPayload

type WindowManagerReopenWindowPayload struct{}

type WindowManagerReorderDesktopPayload

type WindowManagerReorderDesktopPayload struct {
	DesktopID windowmanager.DesktopID `json:"desktop_id"`
	Order     int                     `json:"order"`
}

type WindowManagerReorderStackPayload

type WindowManagerReorderStackPayload struct {
	WindowID windowmanager.WindowID `json:"window_id"`
	Index    int                    `json:"index"`
}

type WindowManagerReplaceLayoutPayload

type WindowManagerReplaceLayoutPayload struct {
	Document WindowManagerLayoutDocument `json:"document"`
}

type WindowManagerResizeLayoutPayload

type WindowManagerResizeLayoutPayload struct {
	SplitID       windowmanager.NodeID `json:"split_id"`
	BoundaryIndex int                  `json:"boundary_index"`
	Delta         float64              `json:"delta"`
}

type WindowManagerResizeWindowPayload

type WindowManagerResizeWindowPayload struct {
	WindowID windowmanager.WindowID       `json:"window_id"`
	Frame    windowmanager.NormalizedRect `json:"frame"`
}

type WindowManagerResult

type WindowManagerResult struct {
	Snapshot    WindowManagerSnapshot      `json:"snapshot"`
	Applied     bool                       `json:"applied"`
	Changes     windowmanager.ChangeSet    `json:"changes"`
	Diagnostics []windowmanager.Diagnostic `json:"diagnostics,omitempty"`
	Client      *WindowManagerClientView   `json:"client,omitempty"`
	RebasedFrom *WindowManagerRevision     `json:"rebased_from,omitempty"`
}

WindowManagerResult reports one applied or no-op command.

func WindowManagerResultFromDomain

func WindowManagerResultFromDomain(result *windowmanager.Result) (WindowManagerResult, error)

WindowManagerResultFromDomain converts a semantic command result.

type WindowManagerReturnAnchor

type WindowManagerReturnAnchor struct {
	DesktopID      windowmanager.DesktopID   `json:"desktop_id"`
	GroupID        *windowmanager.GroupID    `json:"group_id,omitempty"`
	ParentSplitID  *windowmanager.NodeID     `json:"parent_split_id,omitempty"`
	ChildIndex     *int                      `json:"child_index,omitempty"`
	Weight         *float64                  `json:"weight,omitempty"`
	NeighborIDs    []windowmanager.WindowID  `json:"neighbor_ids,omitempty"`
	SourceRevision WindowManagerRevision     `json:"source_revision"`
	SourceGroup    *WindowManagerLayoutGroup `json:"source_group,omitempty"`
}

WindowManagerReturnAnchor is the stable wire form of a prior structural slot.

type WindowManagerRevision

type WindowManagerRevision uint64

WindowManagerRevision is an unsigned wire integer that remains exact in JavaScript.

WindowManagerMaxSafeRevision is the largest integer exactly representable by JavaScript numbers.

func (*WindowManagerRevision) UnmarshalJSON

func (revision *WindowManagerRevision) UnmarshalJSON(data []byte) error

UnmarshalJSON rejects revision values that JavaScript clients cannot represent exactly.

type WindowManagerSetStackActivePayload

type WindowManagerSetStackActivePayload struct {
	WindowID windowmanager.WindowID `json:"window_id"`
}

type WindowManagerSnapshot

type WindowManagerSnapshot struct {
	Version          uint32                         `json:"version"`
	WorkspaceID      windowmanager.WorkspaceID      `json:"workspace_id"`
	Revision         WindowManagerRevision          `json:"revision"`
	Desktops         []WindowManagerDesktop         `json:"desktops"`
	Windows          map[string]WindowManagerWindow `json:"windows"`
	ClosedEntryCount int                            `json:"closed_entry_count"`
	Overrides        windowmanager.WorkspaceConfig  `json:"overrides"`
	UpdatedAt        time.Time                      `json:"updated_at"`
}

WindowManagerSnapshot is the complete durable workspace aggregate.

func WindowManagerSnapshotFromDomain

func WindowManagerSnapshotFromDomain(snapshot windowmanager.Snapshot) (WindowManagerSnapshot, error)

WindowManagerSnapshotFromDomain converts the authoritative domain snapshot to its stable wire form.

type WindowManagerSnapshotFrame

type WindowManagerSnapshotFrame struct {
	Type        string                    `json:"type"`
	WorkspaceID windowmanager.WorkspaceID `json:"workspace_id"`
	Revision    WindowManagerRevision     `json:"revision"`
	Snapshot    WindowManagerSnapshot     `json:"snapshot"`
	Client      *WindowManagerClientView  `json:"client,omitempty"`
}

WindowManagerSnapshotFrame is the first frame of every stream subscription.

type WindowManagerSwapWindowsPayload

type WindowManagerSwapWindowsPayload struct {
	FirstWindowID  windowmanager.WindowID `json:"first_window_id"`
	SecondWindowID windowmanager.WindowID `json:"second_window_id"`
}

type WindowManagerSwitchDesktopPayload

type WindowManagerSwitchDesktopPayload struct {
	DesktopID windowmanager.DesktopID `json:"desktop_id"`
}

type WindowManagerToggleFloatingPayload

type WindowManagerToggleFloatingPayload struct {
	WindowID     windowmanager.WindowID        `json:"window_id"`
	FloatingRect *windowmanager.NormalizedRect `json:"floating_rect,omitempty"`
}

type WindowManagerUndoLayoutPayload

type WindowManagerUndoLayoutPayload struct{}

type WindowManagerUpdateDesktopPayload

type WindowManagerUpdateDesktopPayload struct {
	DesktopID windowmanager.DesktopID `json:"desktop_id"`
	Name      string                  `json:"name"`
}

type WindowManagerWindow

type WindowManagerWindow struct {
	ID           windowmanager.WindowID        `json:"id"`
	App          string                        `json:"app"`
	InstanceKey  *string                       `json:"instance_key,omitempty"`
	Route        windowmanager.RouteIntent     `json:"route"`
	NavStack     []windowmanager.RouteIntent   `json:"nav_stack"`
	Pinned       bool                          `json:"pinned"`
	Placement    windowmanager.WindowPlacement `json:"placement"`
	DesktopID    windowmanager.DesktopID       `json:"desktop_id"`
	FloatingRect windowmanager.NormalizedRect  `json:"floating_rect"`
	Minimized    bool                          `json:"minimized"`
	ReturnAnchor *WindowManagerReturnAnchor    `json:"return_anchor,omitempty"`
}

WindowManagerWindow is one durable application instance.

type WindowManagerWindowSpecPayload

type WindowManagerWindowSpecPayload struct {
	ID                  windowmanager.WindowID       `json:"id,omitempty"`
	App                 string                       `json:"app"`
	InstanceKey         *string                      `json:"instance_key,omitempty"`
	Route               windowmanager.RouteIntent    `json:"route"`
	DesktopID           windowmanager.DesktopID      `json:"desktop_id"`
	FloatingRect        windowmanager.NormalizedRect `json:"floating_rect"`
	InsertTiled         bool                         `json:"insert_tiled"`
	StackTargetWindowID *windowmanager.WindowID      `json:"stack_target_window_id,omitempty"`
}

type WindowManagerZoomWindowPayload

type WindowManagerZoomWindowPayload struct {
	WindowID windowmanager.WindowID `json:"window_id"`
}

type WorkspaceDetailPayload

type WorkspaceDetailPayload struct {
	Workspace WorkspacePayload               `json:"workspace"`
	Sessions  []SessionPayload               `json:"sessions,omitempty"`
	Agents    []AgentPayload                 `json:"agents,omitempty"`
	Skills    []WorkspaceSkillPayload        `json:"skills,omitempty"`
	Providers []SessionProviderOptionPayload `json:"providers,omitempty"`
}

WorkspaceDetailPayload is the shared resolved workspace detail response payload.

type WorkspacePayload

type WorkspacePayload struct {
	ID           string    `json:"id"`
	RootDir      string    `json:"root_dir"`
	AddDirs      []string  `json:"add_dirs"`
	Name         string    `json:"name"`
	DefaultAgent string    `json:"default_agent,omitempty"`
	SandboxRef   string    `json:"sandbox_ref,omitempty"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

WorkspacePayload is the shared workspace response payload.

type WorkspaceResponse

type WorkspaceResponse struct {
	Workspace WorkspacePayload `json:"workspace"`
}

WorkspaceResponse wraps one shared workspace payload.

type WorkspaceSkillPayload

type WorkspaceSkillPayload struct {
	Name   string `json:"name"`
	Dir    string `json:"dir"`
	Source string `json:"source"`
}

WorkspaceSkillPayload is the shared workspace skill response payload.

type WorkspacesResponse

type WorkspacesResponse struct {
	Workspaces []WorkspacePayload `json:"workspaces"`
}

WorkspacesResponse wraps the shared workspace list payload.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL