Versions in this module Expand all Collapse all v1 v1.4.0 Oct 20, 2026 Changes in this version + const AuditSchema + const IPCMessageEventAggregateType + const IPCMessageStoredEventType + const IPCPayloadLimit + const MemoryContentLimit + const MemoryEmbeddingDimension + var AuditGenesisHash = sha256.Sum256([]byte("fenced-audit-genesis-v1")) + var ErrAgentVersionConflict = errors.New("agent version identity already published with a different spec") + var ErrAgentVersionRefInvalid = errors.New("agent version reference is not canonical") + var ErrApprovalNotUsable = errors.New("approval cannot authorize this invocation") + var ErrAuditChainBroken = errors.New("audit chain integrity check failed") + var ErrBudgetExceeded = errors.New("task budget would be exceeded") + var ErrBudgetNotReserved = errors.New("task has no budget reservation") + var ErrCapacityExhausted = errors.New("runtime pool capacity exhausted") + var ErrCompletionPending = errors.New("completed attempt is awaiting result commit") + var ErrFenced = errors.New("attempt fencing token is stale") + var ErrIPCAddressUnscoped = errors.New("ipc address must name an instance") + var ErrIPCDeadlineElapsed = errors.New("ipc message deadline has already elapsed") + var ErrIPCPayloadTooLarge = errors.New("ipc payload exceeds the mailbox limit") + var ErrIdempotencyConflict = errors.New("idempotency key reused with different request") + var ErrInvalidTransition = errors.New("invalid lifecycle transition") + var ErrLeaseHeld = errors.New("run already has an active lease") + var ErrLeaseNotExpired = fmt.Errorf("runtime lease has not expired") + var ErrMemoryNotFound = errors.New("memory record not found") + var ErrMemorySearchRequired = errors.New("memory search requires a keyword query or an embedding") + var ErrMemoryTooLarge = errors.New("memory content exceeds 256 KiB") + var ErrModelCallTerminal = errors.New("model call already reached a terminal state") + var ErrModelNotFound = errors.New("model descriptor not found") + var ErrModelSpecConflict = errors.New("model identity already registered with a different spec") + var ErrNoAssignment = fmt.Errorf("no runtime assignment available") + var ErrNotFound = errors.New("kernel object not found") + var ErrPoolCapacityNotInitialized = errors.New("runtime pool capacity ledger is not initialized") + var ErrPoolOperatorDenied = errors.New("runtime pool operator grant is required") + var ErrResultRequired = errors.New("durable result reference is required") + var ErrRetryableTransaction = errors.New("retryable transaction conflict") + var ErrSpawnDenied = errors.New("spawn denied") + var ErrStepNotFound = errors.New("workflow step not found") + var ErrTenantQuotaExceeded = errors.New("tenant aggregate consumption quota would be exceeded") + var ErrToolNotFound = errors.New("tool descriptor not found") + var ErrToolSpecConflict = errors.New("tool version identity already registered with a different spec") + var ErrUsageReservationConflict = errors.New("usage reservation conflicts with its replay") + var ErrVersionConflict = errors.New("resource version conflict") + var ErrWorkflowNotFound = errors.New("workflow not found") + var MemorySensitivities = map[string]struct + func CanTransitionModelCall(from, to ModelCallStatus) bool + func CanTransitionStep(from, to StepStatus) bool + func CanTransitionTo(from, to ToolCallStatus) bool + func CanTransitionWorkflow(from, to WorkflowStatus) bool + func DenialCode(err error) (string, bool) + func IPCMailboxConsumerName(runID string) string + func IsRetryableTransaction(err error) bool + func QuotaExceeded(limits, consumed, additional TaskBudget) bool + func QuotaReservationExceeded(limits, consumed, reserved, additional TaskBudget) bool + func RetryRetryable(ctx context.Context, fn func() (int, error)) (int, error) + func SpawnKeyHash(arguments json.RawMessage) string + func TaskSpecBudgetReservation(spec json.RawMessage) (tokens int64, costMicroUSD money.MicroUSD) + func TenantShard(tenantID string, count int) int + func ValidateModelRef(ref string) error + func ValidateStepName(name string) error + func ValidateToolName(name string) error + type AcknowledgeIPCMessagesInput struct + AcknowledgedAt time.Time + ConsumerName string + MessageIDs []uuid.UUID + TenantID string + func (in AcknowledgeIPCMessagesInput) Validate() error + type AcknowledgeIPCMessagesResult struct + Acknowledged []uuid.UUID + AlreadyAcknowledged []uuid.UUID + type AcquireAttemptInput struct + AttemptID uuid.UUID + ExpectedRunVersion int64 + LeaseID uuid.UUID + RunID uuid.UUID + RuntimeClass string + RuntimeInstanceID string + TTL time.Duration + TenantID string + type AdmissionReason struct + Code string + Field string + Message string + type AgentAddress struct + AgentVersionRef string + Instance string + func ParseAgentAddress(canonical string) (AgentAddress, error) + func (a AgentAddress) Canonical() string + func (a AgentAddress) Validate() error + type AgentVersion struct + CreatedAt time.Time + ID uuid.UUID + Name string + Namespace string + PackageSignature *PackageSignature + ResourceVersion int64 + Spec json.RawMessage + SpecDigest [sha256.Size]byte + TenantID string + Version string + func (v AgentVersion) Ref() string + type AgentVersionStore interface + CreateAgentVersion func(context.Context, CreateAgentVersionInput) (CreateAgentVersionResult, error) + GetAgentVersion func(context.Context, string, uuid.UUID) (AgentVersion, error) + GetAgentVersionByRef func(context.Context, string, string) (AgentVersion, error) + type AppendIPCMessageInput struct + Attachments json.RawMessage + CorrelationID string + Deadline time.Time + FromAgentVersionRef string + ID uuid.UUID + IdempotencyKey string + Kind string + Payload json.RawMessage + ReplyToMessageID uuid.UUID + SentAt time.Time + TenantID string + To AgentAddress + TraceID string + func (in AppendIPCMessageInput) Validate() error + type AppendIPCMessageResult struct + Message IPCMessage + Replayed bool + type ArtifactReference struct + ID uuid.UUID + MediaType string + SHA256 [sha256.Size]byte + SizeBytes int64 + URI string + func (a ArtifactReference) DigestHex() string + func (a ArtifactReference) Validate() error + type Attempt struct + CreatedAt time.Time + FailureCode string + FailureMessage string + FencingToken int64 + FinishedAt *time.Time + ID uuid.UUID + Ordinal int + Phase domain.AttemptPhase + ResourceVersion int64 + RunID uuid.UUID + RuntimeClass string + RuntimeInstanceID string + RuntimePoolID string + StartedAt *time.Time + TenantID string + UpdatedAt time.Time + type AttemptLease struct + Attempt Attempt + Lease Lease + Run Run + type AuditEvent struct + Actor string + ChainHash [sha256.Size]byte + Details json.RawMessage + EventType string + ID uuid.UUID + OccurredAt time.Time + PrevHash [sha256.Size]byte + ResourceID uuid.UUID + ResourceType string + Seq int64 + TenantID string + func (e AuditEvent) ComputeChainHash() [sha256.Size]byte + type AuditStore interface + ExportAuditChain func(context.Context, string) ([]AuditEvent, error) + GetAuditEvent func(context.Context, string, uuid.UUID) (AuditEvent, error) + ListAudit func(context.Context, ListAuditInput) ([]AuditEvent, error) + VerifyAuditChain func(context.Context, string) (AuditVerification, error) + type AuditVerification struct + Checked int64 + FirstBrokenSeq int64 + HeadHash [sha256.Size]byte + HeadSeq int64 + Valid bool + type BudgetStore interface + GetTaskBudget func(context.Context, string, uuid.UUID) (TaskBudgetStatus, error) + ReleaseTaskUsageReservation func(context.Context, string, uuid.UUID, string) error + ReserveTaskUsage func(context.Context, ReserveTaskUsageInput) error + SettleTaskUsage func(context.Context, SettleTaskUsageInput) (TaskBudgetStatus, error) + SettleTaskUsageDelta func(context.Context, SettleTaskUsageDeltaInput) (TaskBudgetStatus, error) + type CancelAttemptInput struct + AttemptID uuid.UUID + ExpectedAttemptVersion int64 + FencingToken int64 + IdempotencyKey string + TenantID string + func (in CancelAttemptInput) RequestHash() ([sha256.Size]byte, error) + type CancelAttemptResult struct + Attempt Attempt + Run Run + Task Task + type Checkpoint struct + AgentVersionRef string + AttemptID uuid.UUID + ConfirmedReceiptIDs []string + CreatedAt time.Time + EnvelopeSHA256 [sha256.Size]byte + FencingToken int64 + ID uuid.UUID + Ordinal int + Provider string + RunID uuid.UUID + RuntimeABI string + RuntimeClass string + SchemaVersion string + State ArtifactReference + TenantID string + type ClaimOutboxInput struct + DispatcherID string + Limit int + LockTTL time.Duration + type ClaimTasksInput struct + Kind ControllerKind + Limit int + OwnerID string + Phase domain.TaskPhase + ShardCount int + ShardIndex int + TTL time.Duration + type ClaimWorkflowsInput struct + Batch int + Lease time.Duration + MaxTokens int64 + Owner string + type CommitCheckpointInput struct + AgentVersionRef string + AttemptID uuid.UUID + CheckpointID uuid.UUID + ConfirmedReceiptIDs []string + ExpectedAttemptVersion int64 + FencingToken int64 + IdempotencyKey string + Provider string + RuntimeABI string + SchemaVersion string + State ArtifactReference + TenantID string + func (in CommitCheckpointInput) Normalize() (CommitCheckpointInput, [sha256.Size]byte, error) + type CompleteAttemptInput struct + AttemptID uuid.UUID + ExpectedAttemptVersion int64 + FencingToken int64 + IdempotencyKey string + Result ArtifactReference + TenantID string + func (in CompleteAttemptInput) RequestHash() ([sha256.Size]byte, error) + type CompleteAttemptResult struct + Attempt Attempt + Run Run + Task Task + type CompleteRunInput struct + AttemptID uuid.UUID + ExpectedRunVersion int64 + FencingToken int64 + ResultRef string + RunID uuid.UUID + TenantID string + type ControlStore interface + ClaimOutbox func(context.Context, ClaimOutboxInput) ([]OutboxEvent, error) + ClaimTasks func(context.Context, ClaimTasksInput) ([]TaskClaim, error) + DecideAdmission func(context.Context, DecideAdmissionInput) (Task, error) + DeferTaskSchedule func(context.Context, DeferTaskScheduleInput) (Task, error) + GetAgentVersionByRef func(context.Context, string, string) (AgentVersion, error) + GetTask func(context.Context, string, uuid.UUID) (Task, error) + MarkOutboxFailed func(context.Context, uuid.UUID, string, int64, string, time.Time) error + MarkOutboxPublished func(context.Context, uuid.UUID, string, int64, time.Time) error + ReleaseTaskClaim func(context.Context, TaskClaim) error + ScheduleTask func(context.Context, ScheduleTaskInput) (AttemptLease, error) + type ControllerKind string + const ControllerAdmission + const ControllerScheduling + type CreateAgentVersionInput struct + ID uuid.UUID + Name string + Namespace string + PackageSignature *PackageSignature + Spec json.RawMessage + TenantID string + Version string + func (in CreateAgentVersionInput) ValidateAndHash() (json.RawMessage, [sha256.Size]byte, error) + type CreateAgentVersionResult struct + AgentVersion AgentVersion + Existing bool + type CreateModelCallInput struct + AttemptID uuid.UUID + ID uuid.UUID + IdempotencyKey string + ModelRef string + PriceRevision string + RunID uuid.UUID + TaskID uuid.UUID + TenantID string + func (in CreateModelCallInput) RequestHash() ([sha256.Size]byte, error) + type CreateModelCallResult struct + Existing bool + ModelCall ModelCall + type CreateRunInput struct + ExpectedTaskVersion int64 + ID uuid.UUID + TaskID uuid.UUID + TenantID string + type CreateTaskInput struct + AgentVersionRef string + Goal string + ID uuid.UUID + IdempotencyKey string + Namespace string + ParentTaskID *uuid.UUID + Spec json.RawMessage + TenantID string + WorkflowAttempt int + WorkflowID *uuid.UUID + WorkflowStepID *uuid.UUID + WorkflowStepName string + func (in CreateTaskInput) ValidateAndHash() (json.RawMessage, [32]byte, error) + type CreateTaskResult struct + Existing bool + Task Task + type CreateToolApprovalInput struct + Action string + ArgsHash [sha256.Size]byte + AttemptID uuid.UUID + CallID uuid.UUID + ExpiresAt time.Time + ID uuid.UUID + RequestedAt time.Time + Resource string + RunID uuid.UUID + TaskID uuid.UUID + TenantID string + ToolName string + ToolVersion string + type CreateToolApprovalResult struct + Existing bool + ToolApproval ToolApproval + type CreateToolCallInput struct + Action string + ArgsHash [sha256.Size]byte + AttemptID uuid.UUID + ID uuid.UUID + IdempotencyKey string + Resource string + RunID uuid.UUID + TaskID uuid.UUID + TenantID string + ToolName string + ToolVersion string + func (in CreateToolCallInput) RequestHash() ([sha256.Size]byte, error) + type CreateToolCallResult struct + Existing bool + ToolCall ToolCall + type CreateWorkflowInput struct + BudgetMaxCostMicroUSD money.MicroUSD + BudgetMaxTasks int64 + BudgetMaxTokens int64 + DeadlineAt *time.Time + Goal string + ID uuid.UUID + IdempotencyKey string + Namespace string + Spec json.RawMessage + Steps []CreateWorkflowStepInput + TenantID string + func (in CreateWorkflowInput) RequestHash() ([sha256.Size]byte, error) + type CreateWorkflowResult struct + Existing bool + Workflow Workflow + type CreateWorkflowStepInput struct + AgentVersionRef string + ConditionContains string + ConditionEquals string + ConditionStep string + DependsOn []string + Goal string + MaxAttempts int + Name string + RequiresApproval bool + Spec json.RawMessage + type DecideAdmissionInput struct + Admit bool + AgentVersionID *uuid.UUID + Budget *TaskBudget + ClaimFencingToken int64 + EvaluatorVersion string + ExpectedTaskVersion int64 + OwnerID string + PolicyRevision string + ReasonCode string + Reasons []AdmissionReason + TaskID uuid.UUID + TenantID string + type DecideToolApprovalInput struct + ApprovalID uuid.UUID + DecidedBy string + Decision ToolApprovalStatus + ExpectedVersion int64 + Now time.Time + TenantID string + func (in DecideToolApprovalInput) Valid() bool + type DecideWorkflowStepApprovalInput struct + Approved bool + DecidedBy string + ExpectedVersion int64 + StepName string + TenantID string + WorkflowID uuid.UUID + type DeferTaskScheduleInput struct + ClaimFencingToken int64 + ExpectedTaskVersion int64 + OwnerID string + Rejection json.RawMessage + TaskID uuid.UUID + TenantID string + Until time.Time + type FinishModelCallInput struct + CostMicroUSD money.MicroUSD + ExpectedVersion int64 + FinishReason string + InputTokens int64 + ModelCallID uuid.UUID + OutputTokens int64 + PriceRevision string + ProviderRequestID string + Status ModelCallStatus + TenantID string + UsageCertainty ModelUsageCertainty + type HeartbeatLeaseInput struct + AttemptID uuid.UUID + ExpectedLeaseVersion int64 + FencingToken int64 + TTL time.Duration + TenantID string + type HeartbeatStatus struct + AttemptVersion int64 + CancelRequested bool + type IPCMessage struct + Attachments json.RawMessage + CorrelationID string + Deadline time.Time + FromAgentVersionRef string + ID uuid.UUID + Kind string + Payload json.RawMessage + ReplyToMessageID uuid.UUID + SentAt time.Time + Sequence int64 + TenantID string + To AgentAddress + TraceID string + type IPCStore interface + AcknowledgeIPCMessages func(context.Context, AcknowledgeIPCMessagesInput) (AcknowledgeIPCMessagesResult, error) + AppendIPCMessage func(context.Context, AppendIPCMessageInput) (AppendIPCMessageResult, error) + GetIPCMessage func(context.Context, string, uuid.UUID) (IPCMessage, error) + ListMailbox func(context.Context, ListMailboxInput) ([]IPCMessage, error) + type KernelStore interface + AcquireAttempt func(context.Context, AcquireAttemptInput) (AttemptLease, error) + CompleteRun func(context.Context, CompleteRunInput) (Run, Task, error) + CreateRun func(context.Context, CreateRunInput) (Run, error) + CreateTask func(context.Context, CreateTaskInput) (CreateTaskResult, error) + HeartbeatLease func(context.Context, HeartbeatLeaseInput) (Lease, error) + TransitionAttempt func(context.Context, TransitionAttemptInput) (Attempt, error) + TransitionTask func(context.Context, string, uuid.UUID, int64, domain.TaskPhase) (Task, error) + type Lease struct + AcquiredAt time.Time + AttemptID uuid.UUID + ExpiresAt time.Time + FencingToken int64 + HeartbeatAt time.Time + ID uuid.UUID + ResourceVersion int64 + RunID uuid.UUID + TenantID string + type ListAuditInput struct + AfterSeq int64 + Limit int + TenantID string + type ListMailboxInput struct + AfterSequence int64 + ConsumerName string + Limit int + TenantID string + To AgentAddress + func (in ListMailboxInput) Validate() error + type MailboxScopeStore interface + GetRunMailboxScope func(context.Context, string, uuid.UUID) (RunMailboxScope, error) + type MemoryRecord struct + Content string + ContentType string + CreatedAt time.Time + Embedding []float32 + EmbeddingProvider string + ID uuid.UUID + Key string + Namespace string + Provenance json.RawMessage + ResourceVersion int64 + RetentionUntil *time.Time + Sensitivity string + SourceAttemptID *uuid.UUID + SourceRunID *uuid.UUID + SourceTaskID *uuid.UUID + SupersededBy *uuid.UUID + TenantID string + TombstoneAt *time.Time + UpdatedAt time.Time + func (r MemoryRecord) ContentHash() ([sha256.Size]byte, error) + type MemoryStore interface + GetMemory func(context.Context, string, uuid.UUID) (MemoryRecord, error) + PutMemory func(context.Context, PutMemoryInput) (MemoryRecord, bool, error) + SearchMemory func(context.Context, SearchMemoryInput) ([]MemoryRecord, error) + TombstoneMemory func(context.Context, string, uuid.UUID, int64) (MemoryRecord, error) + type MetricsStore interface + AggregateMetrics func(context.Context, string, time.Time) (*observability.Metrics, error) + type ModelCall struct + AttemptID uuid.UUID + CostMicroUSD money.MicroUSD + CreatedAt time.Time + FinishReason string + ID uuid.UUID + IdempotencyKey string + InputTokens int64 + ModelRef string + OutputTokens int64 + PriceRevision string + ProviderRequestID string + RequestHash [sha256.Size]byte + ResourceVersion int64 + RunID uuid.UUID + Status ModelCallStatus + TaskID uuid.UUID + TenantID string + UpdatedAt time.Time + UsageCertainty ModelUsageCertainty + type ModelCallStatus string + const ModelCallCompleted + const ModelCallFailed + const ModelCallStarted + const ModelCallStopped + func (s ModelCallStatus) Terminal() bool + type ModelDescriptor struct + CreatedAt time.Time + ID uuid.UUID + InputPriceMicroUSDPerMillion money.MicroUSD + ModelName string + OutputPriceMicroUSDPerMillion money.MicroUSD + PriceRevision string + Provider string + SpecHash [sha256.Size]byte + SupportsStreaming bool + TenantID string + func (d ModelDescriptor) Ref() string + func (d ModelDescriptor) Validate() error + type ModelStore interface + CreateModelCall func(context.Context, CreateModelCallInput) (CreateModelCallResult, error) + FinishModelCall func(context.Context, FinishModelCallInput) (ModelCall, error) + GetModelCall func(context.Context, string, uuid.UUID) (ModelCall, error) + GetModelDescriptor func(context.Context, string, string, string) (ModelDescriptor, error) + RegisterModelDescriptor func(context.Context, RegisterModelDescriptorInput) (ModelDescriptor, error) + type ModelUsageCertainty string + const ModelUsageKnown + const ModelUsageKnownZero + const ModelUsageUnknown + func (c ModelUsageCertainty) Valid() bool + type OutboxEvent struct + AggregateID uuid.UUID + AggregateType string + AggregateVersion int64 + EventType string + ID uuid.UUID + LockFencingToken int64 + LockedBy string + LockedUntil time.Time + OccurredAt time.Time + Payload json.RawMessage + PublishAttempts int + TenantID string + type PackageSignature struct + KeyID string + ManifestDigest string + Signature string + type PoolHealthStore interface + PoolInstanceHealth func(context.Context, []string, time.Time, time.Duration) (map[string]bool, error) + type PutMemoryInput struct + Content string + ContentType string + Embedding []float32 + EmbeddingProvider string + Key string + Namespace string + Provenance json.RawMessage + RetentionUntil *time.Time + Sensitivity string + SourceAttemptID *uuid.UUID + SourceRunID *uuid.UUID + SourceTaskID *uuid.UUID + TenantID string + func (in PutMemoryInput) Validate() error + type ReceiptStore interface + GetRuntimeReceipt func(context.Context, string, uuid.UUID, string, string) (RuntimeReceipt, error) + WriteRuntimeReceipt func(context.Context, WriteRuntimeReceiptInput) error + type RecoverExpiredAttemptInput struct + AttemptID uuid.UUID + DeadlineExceeded bool + FencingToken int64 + LeaseTTL time.Duration + MaxAttempts int + NewAttemptID uuid.UUID + NewLeaseID uuid.UUID + TenantID string + type RecoveryCandidate struct + AttemptID uuid.UUID + DeadlineExceeded bool + FencingToken int64 + TaskSpec json.RawMessage + TenantID string + type RecoveryResult struct + Lease AttemptLease + Retried bool + type RegisterModelDescriptorInput struct + InputPriceMicroUSDPerMillion money.MicroUSD + ModelName string + OutputPriceMicroUSDPerMillion money.MicroUSD + PriceRevision string + Provider string + SupportsStreaming bool + TenantID string + func (in RegisterModelDescriptorInput) ValidateAndHash() (ModelDescriptor, [sha256.Size]byte, error) + type RegisterToolDescriptorInput struct + Actions []string + Name string + ParamsSchema json.RawMessage + ResourcePatterns []string + SideEffectRisk ToolRisk + TenantID string + Version string + func (in RegisterToolDescriptorInput) ValidateAndHash() (ToolDescriptor, [sha256.Size]byte, error) + type ReserveTaskUsageInput struct + Amount TaskBudget + ExpiresAt time.Time + ReservationKey string + TaskID uuid.UUID + TenantID string + func (in ReserveTaskUsageInput) Valid() bool + type Run struct + ActiveAttemptID *uuid.UUID + CompletedAt *time.Time + CreatedAt time.Time + CurrentFencingToken int64 + ID uuid.UUID + Ordinal int + Phase domain.RunPhase + ResourceVersion int64 + ResultRef string + TaskID uuid.UUID + TenantID string + UpdatedAt time.Time + type RunMailboxScope struct + AgentVersionRef string + RunID string + TaskID string + TenantID string + type RuntimeAssignment struct + AgentVersion *AgentVersion + Attempt Attempt + Lease Lease + PendingApprovalID *uuid.UUID + ResumeCheckpoint *Checkpoint + Run Run + Task Task + type RuntimePolicy struct + SpawnGuards SpawnGuards + func DecodeWorkflowRuntimePolicy(spec json.RawMessage) RuntimePolicy + type RuntimePoolOperatorStore interface + UpdateRuntimePoolStatus func(context.Context, UpdateRuntimePoolStatusInput) (RuntimePoolState, error) + type RuntimePoolState struct + ID string + ResourceVersion int64 + Status string + type RuntimeReceipt struct + ProcessedAt time.Time + RequestHash [sha256.Size]byte + Response json.RawMessage + type RuntimeStore interface + AcknowledgeCancellation func(context.Context, CancelAttemptInput) (CancelAttemptResult, error) + CommitCheckpoint func(context.Context, CommitCheckpointInput) (Checkpoint, Attempt, error) + CompleteAttempt func(context.Context, CompleteAttemptInput) (CompleteAttemptResult, error) + GetHeartbeatStatus func(context.Context, string, uuid.UUID, int64) (HeartbeatStatus, error) + GetRuntimeAssignment func(context.Context, string, uuid.UUID, int64) (RuntimeAssignment, error) + ListExpiredAttempts func(context.Context, time.Time, int) ([]RecoveryCandidate, error) + PollRuntimeAssignment func(context.Context, string, string) (RuntimeAssignment, error) + RecoverExpiredAttempt func(context.Context, RecoverExpiredAttemptInput) (RecoveryResult, error) + WorkflowLineage func(context.Context, string, uuid.UUID) (workflowID uuid.UUID, stepName string, version int64, ok bool, err error) + type ScheduleTaskInput struct + AttemptID uuid.UUID + ClaimFencingToken int64 + ExpectedTaskVersion int64 + LeaseID uuid.UUID + LeaseTTL time.Duration + OwnerID string + RequestedCPU int64 + RequestedLLMSlots int + RequestedMemory int64 + RunID uuid.UUID + RuntimeClass string + RuntimeInstanceID string + RuntimePoolID string + TaskID uuid.UUID + TenantID string + type SearchMemoryInput struct + Embedding []float32 + Limit int + Namespace string + Query string + Sensitivity string + TenantID string + func (in SearchMemoryInput) Validate() error + type SetTenantQuotaInput struct + Limits TaskBudget + TenantID string + WindowSeconds int64 + func (in SetTenantQuotaInput) Valid() bool + type SettleTaskUsageDeltaInput struct + FamilyPrefix string + IdempotencyKey string + ReservationKey string + Target TaskBudget + TaskID uuid.UUID + TenantID string + func (in SettleTaskUsageDeltaInput) Valid() bool + type SettleTaskUsageInput struct + IdempotencyKey string + ReservationKey string + TaskID uuid.UUID + TenantID string + Usage TaskBudget + func (in SettleTaskUsageInput) Valid() bool + type SpawnDenial struct + Code string + Message string + func (d SpawnDenial) Error() string + func (d SpawnDenial) Unwrap() error + type SpawnGuards struct + Enabled bool + MaxChildrenPerStep int64 + MaxDynamicSteps int64 + MaxSpawnCostMicroUSD money.MicroUSD + MaxSpawnDepth int + MaxSpawnTasks int64 + MaxSpawnTokens int64 + MaxWorkflowSteps int64 + type SpawnWorkflowStepInput struct + AgentVersionRef string + Arguments json.RawMessage + Goal string + Guards SpawnGuards + IdempotencyKey string + MaxAttempts int + Name string + ParentStepName string + Spec json.RawMessage + TenantID string + WorkflowID uuid.UUID + WorkflowVersion int64 + type SpawnWorkflowStepResult struct + Created bool + Step WorkflowStep + Usage WorkflowUsage + Workflow Workflow + WorkflowExhausted bool + type StepStatus string + const StepCancelled + const StepFailed + const StepPending + const StepRunning + const StepSkipped + const StepSucceeded + const StepWaitingApproval + func (s StepStatus) Terminal() bool + type Task struct + ActiveRunID *uuid.UUID + AdmissionReasonCode string + AdmittedAt *time.Time + AgentVersionID *uuid.UUID + AgentVersionRef string + CancelRequestedAt *time.Time + CreatedAt time.Time + ExecutionDeadlineAt *time.Time + Goal string + ID uuid.UUID + IdempotencyKey string + LastScheduleRejection json.RawMessage + Namespace string + NextScheduleAttemptAt *time.Time + ParentTaskID *uuid.UUID + Phase domain.TaskPhase + RequestHash [32]byte + ResourceVersion int64 + ResultRef string + ScheduleRetryCount int64 + Spec json.RawMessage + TenantID string + UpdatedAt time.Time + WorkflowAttempt int + WorkflowID *uuid.UUID + WorkflowStepID *uuid.UUID + WorkflowStepName string + type TaskBudget struct + CostMicroUSD money.MicroUSD + Tokens int64 + ToolCalls int64 + WallSeconds int64 + func (b TaskBudget) Valid() bool + func (b TaskBudget) Zero() bool + type TaskBudgetStatus struct + Consumed TaskBudget + Exhausted bool + Reserved TaskBudget + ResourceVersion int64 + TaskID uuid.UUID + TenantID string + UpdatedAt time.Time + type TaskCancellationStore interface + RequestTaskCancellation func(context.Context, string, uuid.UUID, int64) (Task, error) + type TaskClaim struct + ExpiresAt time.Time + FencingToken int64 + Kind ControllerKind + OwnerID string + Task Task + type TenantQuota struct + Limits TaskBudget + ResourceVersion int64 + TenantID string + UpdatedAt time.Time + WindowSeconds int64 + type TenantQuotaStore interface + DeleteTenantQuota func(context.Context, string) error + GetTenantQuota func(context.Context, string) (TenantQuota, error) + GetTenantQuotaUsage func(context.Context, string, time.Time) (TenantWindowUsage, error) + SetTenantQuota func(context.Context, SetTenantQuotaInput) (TenantQuota, error) + type TenantWindowUsage struct + Consumed TaskBudget + Reserved TaskBudget + ResourceVersion int64 + TenantID string + UpdatedAt time.Time + WindowStart time.Time + type ToolApproval struct + Action string + ArgsHash [sha256.Size]byte + AttemptID uuid.UUID + CallID uuid.UUID + DecidedAt *time.Time + DecidedBy string + ExpiresAt time.Time + ID uuid.UUID + RequestedAt time.Time + Resource string + ResourceVersion int64 + RunID uuid.UUID + Status ToolApprovalStatus + TaskID uuid.UUID + TenantID string + ToolName string + ToolVersion string + type ToolApprovalStatus string + const ToolApprovalApproved + const ToolApprovalExpired + const ToolApprovalPending + const ToolApprovalRejected + type ToolCall struct + Action string + ApprovalID *uuid.UUID + ArgsHash [sha256.Size]byte + AttemptID uuid.UUID + CreatedAt time.Time + DecisionReasons []string + ID uuid.UUID + IdempotencyKey string + PolicyRevision string + RequestHash [sha256.Size]byte + Resource string + ResourceVersion int64 + RunID uuid.UUID + Status ToolCallStatus + TaskID uuid.UUID + TenantID string + ToolName string + ToolVersion string + UpdatedAt time.Time + type ToolCallStatus string + const ToolCallApproved + const ToolCallDenied + const ToolCallExecuted + const ToolCallFailed + const ToolCallPending + const ToolCallRequiresApproval + type ToolDescriptor struct + Actions []string + CreatedAt time.Time + ID uuid.UUID + Name string + ParamsSchema json.RawMessage + ResourcePatterns []string + SideEffectRisk ToolRisk + SpecHash [sha256.Size]byte + TenantID string + Version string + func (d ToolDescriptor) Validate() error + type ToolRisk string + const ToolRiskHigh + const ToolRiskLow + const ToolRiskNone + func (r ToolRisk) Valid() bool + type ToolStore interface + CreateToolApproval func(context.Context, CreateToolApprovalInput) (CreateToolApprovalResult, error) + CreateToolCall func(context.Context, CreateToolCallInput) (CreateToolCallResult, error) + DecideToolApproval func(context.Context, DecideToolApprovalInput) (ToolApproval, error) + GetToolApproval func(context.Context, string, uuid.UUID) (ToolApproval, error) + GetToolCall func(context.Context, string, uuid.UUID) (ToolCall, error) + GetToolDescriptor func(context.Context, string, string, string) (ToolDescriptor, error) + ListToolDescriptors func(context.Context, string) ([]ToolDescriptor, error) + RegisterToolDescriptor func(context.Context, RegisterToolDescriptorInput) (ToolDescriptor, error) + UpdateToolCall func(context.Context, UpdateToolCallInput) (ToolCall, error) + type TransitionAttemptInput struct + AttemptID uuid.UUID + ExpectedAttemptVersion int64 + FailureCode string + FailureMessage string + FencingToken int64 + TenantID string + To domain.AttemptPhase + type TransitionWorkflowInput struct + ExpectedOwner string + ExpectedVersion int64 + FailureCode string + TenantID string + To WorkflowStatus + WorkflowID uuid.UUID + type TransitionWorkflowStepInput struct + AttemptCount *int + ExpectedOwner string + ExpectedVersion int64 + FailureCode string + ResultSummary json.RawMessage + StepName string + TaskID *uuid.UUID + TenantID string + To StepStatus + WorkflowID uuid.UUID + type UpdateRuntimePoolStatusInput struct + ExpectedVersion int64 + OperatorSubject string + PoolID string + Status string + TenantID string + type UpdateToolCallInput struct + ApprovalID *uuid.UUID + DecisionReasons []string + ExpectedVersion int64 + PolicyRevision string + Status ToolCallStatus + TenantID string + ToolCallID uuid.UUID + type Workflow struct + BudgetExhaustedAt *time.Time + BudgetMaxCostMicroUSD money.MicroUSD + BudgetMaxTasks int64 + BudgetMaxTokens int64 + CancelRequestedAt *time.Time + CreatedAt time.Time + DeadlineAt *time.Time + DeadlineExceededAt *time.Time + FailureCode string + Goal string + ID uuid.UUID + IdempotencyKey string + Namespace string + NeedsBudgetReconciliation bool + ResourceVersion int64 + Spec json.RawMessage + Status WorkflowStatus + TenantID string + UpdatedAt time.Time + type WorkflowStatus string + const WorkflowCancelled + const WorkflowFailed + const WorkflowPending + const WorkflowRunning + const WorkflowSucceeded + func (s WorkflowStatus) Terminal() bool + type WorkflowStep struct + AgentVersionRef string + ApprovalDecision string + AttemptCount int + CreatedAt time.Time + DecidedAt *time.Time + DecidedBy string + FailureCode string + Goal string + ID uuid.UUID + IsDynamic bool + MaxAttempts int + Name string + Ordinal int + ParentStepName string + ReservedCostMicroUSD money.MicroUSD + ReservedTasks int64 + ReservedTokens int64 + ResourceVersion int64 + ResultSummary json.RawMessage + SpawnDepth int + SpawnKey string + Spec json.RawMessage + Status StepStatus + TaskID *uuid.UUID + TenantID string + UpdatedAt time.Time + WorkflowID uuid.UUID + type WorkflowStore interface + ArtifactMetadata func(context.Context, string, string) ([]byte, int64, string, error) + ClaimWorkflows func(context.Context, ClaimWorkflowsInput) ([]Workflow, error) + CreateWorkflow func(context.Context, CreateWorkflowInput) (CreateWorkflowResult, error) + DecideWorkflowStepApproval func(context.Context, DecideWorkflowStepApprovalInput) (WorkflowStep, error) + GetWorkflow func(context.Context, string, uuid.UUID) (Workflow, error) + GetWorkflowStep func(context.Context, string, uuid.UUID, string) (WorkflowStep, error) + ListActiveWorkflows func(context.Context, int) ([]Workflow, error) + ListWorkflowSteps func(context.Context, string, uuid.UUID) ([]WorkflowStep, error) + MarkWorkflowBudgetExhausted func(context.Context, string, uuid.UUID, int64) (Workflow, error) + MarkWorkflowDeadlineExceeded func(context.Context, string, uuid.UUID, int64) (Workflow, error) + RequestWorkflowCancellation func(context.Context, string, uuid.UUID, int64) (Workflow, error) + SpawnWorkflowStep func(context.Context, SpawnWorkflowStepInput) (SpawnWorkflowStepResult, error) + TransitionWorkflow func(context.Context, TransitionWorkflowInput) (Workflow, error) + TransitionWorkflowStep func(context.Context, TransitionWorkflowStepInput) (WorkflowStep, error) + WorkflowUsageSnapshot func(context.Context, string, uuid.UUID) (WorkflowUsage, error) + type WorkflowUsage struct + BudgetMaxCostMicroUSD money.MicroUSD + BudgetMaxTasks int64 + BudgetMaxTokens int64 + CostMicroUSD money.MicroUSD + PendingOverage bool + ReservedCostMicroUSD money.MicroUSD + ReservedTokens int64 + StepReservedCostMicroUSD money.MicroUSD + StepReservedTasks int64 + StepReservedTokens int64 + Tasks int64 + Tokens int64 + func (u WorkflowUsage) CommittedCostMicroUSD() money.MicroUSD + func (u WorkflowUsage) CommittedTasks() int64 + func (u WorkflowUsage) CommittedTokens() int64 + func (u WorkflowUsage) Exhausted() bool + type WriteRuntimeReceiptInput struct + AttemptID uuid.UUID + IdempotencyKey string + Operation string + RequestHash [sha256.Size]byte + Response json.RawMessage + TenantID string