Versions in this module Expand all Collapse all v0 v0.1.1 Oct 30, 2026 v0.1.0 Oct 29, 2026 Changes in this version + func Enforce[Input, Output any](ctx context.Context, client *Client, operation Operation, input Input, ...) (Output, *Decision, *Decision, error) + func Observe[Input, Output any](ctx context.Context, client *Client, operation Operation, input Input, ...) (Output, <-chan Observation, error) + func OpenAIDecisionsConfigSHA256(question DecisionsQuestion) (string, error) + func ParseExecutorPrivateKeyPEM(data []byte) (ed25519.PrivateKey, error) + type ApprovalContinuation struct + Call Call + Decision Decision + type ApprovalRequired struct + Decision *Decision + func (e *ApprovalRequired) Continuation() (ApprovalContinuation, error) + func (e *ApprovalRequired) Error() string + type Call struct + ActionKey string + Arguments json.RawMessage + FactResolutions []FactResolution + GuardEvidence []GuardEvidence + OperationVersionID string + PrincipalID string + PrincipalSource string + RequestID string + ResourceID string + ResourceSource string + ReviewSummary *ReviewSummary + SessionID string + Traceparent string + Trajectory *TrajectorySnapshot + type Client struct + func NewClient(config Config) (*Client, error) + func (c *Client) Reconcile(ctx context.Context, recovery Recovery, providerReference, outcome string) (string, error) + func (c *Client) ReportObservedExecution(ctx context.Context, call Call, outcome ObservedExecutionOutcome) (ObservedExecutionRecording, error) + type Config struct + AdapterToken string + DeploymentID string + ExecutorPrivateKey ed25519.PrivateKey + GuardHandlers []GuardHandler + HTTPClient *http.Client + OrganisationID string + SidecarURL string + type CustomerAPIConfig struct + AccountBoundary string + BearerToken string + Endpoint string + HTTPClient *http.Client + Lookup string + SourceIdentity string + type CustomerRead func(context.Context, string) (CustomerReadResult, error) + func NewCustomerAPIReader(config CustomerAPIConfig) (CustomerRead, error) + type CustomerReadResult struct + AccountBoundary string + Lookup string + LookupKey string + ObservedAt time.Time + SourceIdentity string + Value map[string]any + type CustomerSource struct + AccountBoundary string + Lookup string + SourceIdentity string + SourceVersionID string + Timeout time.Duration + type Decision struct + ActionID string + ApprovalRequestID string + BundleID *string + CertificateID string + Coverage string + Enforced bool + Facts []FactSummary + MatchedRuleIDs []string + Mode string + Obligations []GuardObligationStatus + Outcome string + RailVersionIDs []string + ReasonCodes []string + RecordingStatus string + ReportReplayed *bool + RequestID string + Sequence int64 + Unresolved []struct{ ... } + func RecoverApprovalFrom[Input, Output any](ctx context.Context, client *Client, continuation ApprovalContinuation, ...) (Output, *Decision, error) + func ResumeApprovalFrom[Input, Output any](ctx context.Context, client *Client, continuation ApprovalContinuation, ...) (Output, *Decision, error) + func ResumeApproval[Input, Output any](ctx context.Context, pending *ApprovalRequired, ...) (Output, *Decision, error) + type DecisionsQuestion struct + Choices []string + Instructions string + Levels []string + MinConfidence float64 + Type string + type Discovery struct + ConfirmationStatus string + DeploymentID string + InventoryItemID string + InventoryRevisionID string + func Discover(ctx context.Context, config DiscoveryConfig) (Discovery, error) + type DiscoveryConfig struct + AgentKey string + ControlPlaneURL string + HTTPClient *http.Client + SetupKey string + type EnforceBlockedError struct + Cause error + Decision *Decision + EffectMayHaveOccurred bool + Phase string + func (e *EnforceBlockedError) Error() string + func (e *EnforceBlockedError) Unwrap() error + type ExecutionContext = Recovery + type ExtractionProvenance struct + ExtractedAt string + ModelConfigSHA256 string + ModelID string + PromptVersion string + SourceBytes int + SourceLocation string + SourceSHA256 string + type ExtractionResult struct + ModelConfigSHA256 string + ModelID string + PromptVersion string + Uncertain bool + Value json.RawMessage + type ExtractionSource struct + AccountBoundary string + Lookup string + MaxInputBytes int + MaxOutputBytes int + ModelConfigSHA256 string + ModelID string + PromptVersion string + ResultPath []string + SourceIdentity string + SourceVersionID string + Timeout time.Duration + ValueType string + type Extractor func(context.Context, []byte) (ExtractionResult, error) + func NewOpenAIDecisionsExtractor(config OpenAIDecisionsConfig) (Extractor, error) + type FactResolution struct + AccountBoundary string + AuthenticatedExecutor bool + Extraction *ExtractionProvenance + Lookup string + LookupKey string + ObservedAt string + ProviderAccountID string + SourceIdentity string + SourceVersionID string + Status string + Value map[string]any + func ExtractContextFact(ctx context.Context, source ExtractionSource, lookupKey string, ...) (FactResolution, error) + func LookupCustomerFact(ctx context.Context, source CustomerSource, lookupKey string, ...) (FactResolution, error) + func LookupQuickBooksInvoiceBalance(ctx context.Context, source QuickBooksInvoiceSource, invoiceID string) (FactResolution, error) + func LookupStripeInvoiceStatus(ctx context.Context, source StripeInvoiceSource, invoiceID string) (FactResolution, error) + type FactSummary struct + AccountBoundary string + AgeSeconds float64 + FactKey string + Lookup string + LookupKeySHA256 string + ObservedAt string + ProviderAccountID string + SourceIdentity string + SourceVersionID string + Status string + Uncertainty string + type GuardEvidence struct + BundleID string + HandlerID string + HandlerVersion string + InputSHA256 string + Kind string + OutputSHA256 string + Phase string + Target GuardTarget + func (e GuardEvidence) MarshalJSON() ([]byte, error) + type GuardHandler struct + ID string + Kind string + Process func(context.Context, string) (string, error) + Version string + type GuardObligationStatus struct + InputSHA256 string + OutputSHA256 string + Status string + type GuardRequirement struct + HandlerID string + HandlerVersion string + Kind string + RailVersionID string + RuleID string + Target GuardTarget + type GuardTarget struct + Path []string + Root string + type Observation struct + Call *Call + CallDecision *Decision + CallError error + ResultDecision *Decision + ResultError error + type ObservedExecutionOutcome struct + Event string + ProviderIdempotencyKey string + ProviderReference *string + type ObservedExecutionRecording struct + ActionID string + ReceiptID string + RecordingStatus string + Replayed bool + State string + type OpenAIDecisionsConfig struct + APIKey string + Client *http.Client + Question DecisionsQuestion + Source ExtractionSource + type Operation struct + ActionKey string + FactResolutions []FactResolution + PrincipalID string + PrincipalSource string + ResourceID string + ResourceSource string + ReviewSummary *ReviewSummary + SessionID string + Traceparent string + Trajectory *TrajectorySnapshot + VersionID string + type OutcomeUnknownError struct + Cause error + Recovery Recovery + func (e *OutcomeUnknownError) Error() string + func (e *OutcomeUnknownError) Unwrap() error + type QuickBooksInvoiceSource struct + AccessToken string + HTTPClient *http.Client + ProviderAccountID string + Sandbox bool + SourceVersionID string + Timeout time.Duration + type Recovery struct + ActionID string + AttemptID string + InputSHA256 string + PermitID *string + ProviderIdempotencyKey string + Traceparent string + type ReviewField struct + Label string + Value string + type ReviewSummary struct + Fields []ReviewField + Title string + type StripeInvoiceSource struct + ConnectedAccount bool + HTTPClient *http.Client + ProviderAccountID string + SecretKey string + SourceVersionID string + Timeout time.Duration + type TrajectorySnapshot struct + Complete bool + PriorReadOperationVersionIDs []string + SessionID string + Start bool + Values map[string]any