Documentation
¶
Overview ¶
Package ovr exposes the public runtime primitives for Ouvrier.
Index ¶
- Variables
- func Handler(nodes ...Node) (http.Handler, error)
- func PartialOK() partialOKOption
- func RequireEnv(names ...string) error
- func Run(addr string, nodes ...Node) error
- func Validate(nodes ...Node) error
- type AcceptedReply
- type ApprovalStatus
- type BackoffPolicy
- type BashOption
- type Budget
- type CronTrigger
- type Effect
- type Event
- type EventKind
- type Execution
- type ExecutionStatus
- type FileSink
- type FromOption
- type Hook
- type Hooks
- type JSONReply
- type LogSink
- type MapOption
- type MemoryRecord
- type ModelRate
- type Node
- type OTLPExporterOption
- type ParallelOption
- type PendingApproval
- type PermissionAction
- type PermissionActionKind
- type PermissionDecision
- type PermissionPolicy
- type PipeOption
- func Bash(sandbox SandboxConfig, options ...BashOption) PipeOption
- func Fallback(models ...string) PipeOption
- func MCP(name string) PipeOption
- func MaxCostUSD(max float64) PipeOption
- func MaxTokens(max int) PipeOption
- func Model(id string) PipeOption
- func NoCache() PipeOption
- func Output[T any]() PipeOption
- func Retry(max int, policies ...BackoffPolicy) PipeOption
- func SequentialTools() PipeOption
- func Skill(dirName string) PipeOption
- func SubAgent(name string, pipeline PipelineSpec, options ...SubAgentOption) PipeOption
- func Timeout(value string) PipeOption
- func Tool(name string, goFunc any, options ...ToolOption) PipeOption
- type PipelineSpec
- type PricingTable
- type Provider
- type PushTarget
- type QueueTarget
- type ReplyFormat
- type Runner
- type RunnerOption
- func WithHooks(hooks *Hooks) RunnerOption
- func WithOTLPExporter(endpoint string, options ...OTLPExporterOption) RunnerOption
- func WithPermissionPolicy(permissionPolicy PermissionPolicy) RunnerOption
- func WithPricing(table PricingTable) RunnerOption
- func WithProvider(p Provider) RunnerOption
- func WithProviderBudget(provider string, maxInFlight int) RunnerOption
- func WithSandbox(sandbox SandboxConfig) RunnerOption
- func WithSchemaRepairAttempts(max int) RunnerOption
- func WithStateStore(store StateStore) RunnerOption
- func WithTracer(tracer Tracer) RunnerOption
- type SSEReply
- type SandboxConfig
- type SandboxOption
- type SchemaViolation
- type Session
- type SinkTarget
- type Span
- type StateStore
- type StreamAckMode
- type StreamTrigger
- type SubAgentOption
- type ToolOption
- type Tracer
- type WebhookEndpoint
Constants ¶
This section is empty.
Variables ¶
var ( // ErrPipelineEmpty means no pipeline nodes were provided. ErrPipelineEmpty = errors.New("pipeline is empty") // ErrFirstNodeNotFrom means the pipeline does not start with a From node. ErrFirstNodeNotFrom = errors.New("first node must be From") // ErrTerminalMissing means the pipeline has no Reply, Push, or Sink node. ErrTerminalMissing = errors.New("pipeline must include Reply, Push, or Sink") // ErrTerminalNotLast means a pipeline has nodes after its terminal before the next From. ErrTerminalNotLast = errors.New("terminal node must be last in its pipeline") // ErrMultipleTerminals means a pipeline has more than one terminal node. ErrMultipleTerminals = errors.New("pipeline must include exactly one terminal") // ErrIncompatibleTerminal means the terminal cannot be used with the trigger kind. ErrIncompatibleTerminal = errors.New("terminal is incompatible with trigger") // ErrPipeMissingModel means a Pipe node was declared without Model. ErrPipeMissingModel = errors.New("pipe must include Model") // ErrInvalidModelForm means a Model id was not in provider/model form. ErrInvalidModelForm = errors.New("model must use provider/model form") // ErrInvalidNode means a node was nil, unsupported, or otherwise invalid. ErrInvalidNode = errors.New("invalid node") // ErrIncompatibleTriggerOption means a From option was set on a trigger kind // that does not consume it (e.g. StreamDLQ on an HTTP trigger), which would // otherwise be silently ignored at runtime. ErrIncompatibleTriggerOption = errors.New("From option is incompatible with trigger") )
var ErrMissingEnv = errors.New("required environment variable missing")
var ErrRunNotImplemented = errors.New("run runtime not implemented")
ErrRunNotImplemented means the requested runtime transport is not implemented yet.
Functions ¶
func Handler ¶ added in v0.2.0
Handler compiles nodes into an http.Handler for HTTP and Webhook triggers, ready to drive with net/http/httptest. It mirrors what Run serves, minus the listener, so a worker can be exercised end to end in a Go test. Cron and stream triggers are not served by the returned handler.
The handler uses an in-memory state store unless the Runner was built WithStateStore. Configure a Provider with WithProvider to avoid live model calls.
Handler always returns the combined surface — trigger routes, /admin/*, and /metrics on a single handler — regardless of OUVRIER_ADMIN_ADDR. The split admin listener is a property of Run's network layout, not of this in-process test seam: tests keep driving both trigger and admin routes through the one handler, exactly as before the split existed. Only Run starts a second listener (and removes admin routes from the public mux) when OUVRIER_ADMIN_ADDR is set.
func PartialOK ¶
func PartialOK() partialOKOption
PartialOK lets a SubAgent return ordered error results for failed child tasks or lets Parallel/Map return ordered error outcomes instead of failing the whole parent pipeline immediately.
func RequireEnv ¶
Types ¶
type AcceptedReply ¶
type AcceptedReply struct{}
func Accepted ¶
func Accepted() AcceptedReply
Accepted declares an HTTP 202 reply while the pipeline continues asynchronously.
type ApprovalStatus ¶ added in v0.2.0
type ApprovalStatus string
ApprovalStatus is the public lifecycle state of a human-in-the-loop approval.
const ( ApprovalPending ApprovalStatus = "pending" ApprovalApproved ApprovalStatus = "approved" ApprovalDenied ApprovalStatus = "denied" )
type BackoffPolicy ¶
type BackoffPolicy interface {
// contains filtered or unexported methods
}
BackoffPolicy configures the delay between retry attempts.
func ExponentialBackoff ¶
func ExponentialBackoff() BackoffPolicy
ExponentialBackoff configures retry attempts with an exponential delay.
type BashOption ¶
type BashOption interface {
// contains filtered or unexported methods
}
BashOption configures the sandboxed Bash capability.
func BashMaxOutputBytes ¶
func BashMaxOutputBytes(max int) BashOption
BashMaxOutputBytes bounds captured stdout and stderr for one bash command.
func BashTimeout ¶
func BashTimeout(value string) BashOption
BashTimeout configures the maximum wall-clock duration for one bash command.
func UnsafeBashHostExecution ¶
func UnsafeBashHostExecution() BashOption
UnsafeBashHostExecution allows the host-shell Bash fallback.
Use this only for local/dev or trusted workloads. Ouvrier still enforces ToolExecutor permission decisions, environment allowlisting, working directory resolution, timeout, and bounded output, but this option does not provide a real OS sandbox.
type Budget ¶
type Budget struct {
MaxIterations int
MaxTokens int
MaxCostUSD float64
MaxWallClock time.Duration
}
Budget captures execution limits recorded with public sessions.
type CronTrigger ¶
type CronTrigger struct {
// contains filtered or unexported fields
}
CronTrigger is a cron expression trigger source.
type Event ¶
type Event struct {
ID uint64
At time.Time
Kind EventKind
ExecID string
SessionID string
TraceID string
Payload map[string]any
}
Event is the public, redacted event shape passed through advanced hooks.
type EventKind ¶
type EventKind string
EventKind identifies a runner lifecycle event that hooks can observe.
const ( EventPipelineStarted EventKind = "pipeline_started" EventPipelineCompleted EventKind = "pipeline_completed" EventPipelineFailed EventKind = "pipeline_failed" EventPipeStarted EventKind = "pipe_started" EventPipeCompleted EventKind = "pipe_completed" EventPipeFailed EventKind = "pipe_failed" EventSessionStarted EventKind = "session_started" EventSessionSaved EventKind = "session_saved" EventSessionCancelled EventKind = "session_cancelled" EventLLMCallStarted EventKind = "llm_call_started" EventLLMCallCompleted EventKind = "llm_call_completed" EventLLMCallFailed EventKind = "llm_call_failed" EventLLMTokenDelta EventKind = "llm_token_delta" EventModelFallback EventKind = "model_fallback" EventToolCallStarted EventKind = "tool_call_started" EventToolCallCompleted EventKind = "tool_call_completed" EventToolCallFailed EventKind = "tool_call_failed" EventPermissionDecision EventKind = "permission_decision" EventIdempotencyDecision EventKind = "idempotency_decision" EventSignatureDecision EventKind = "signature_decision" EventApprovalRequested EventKind = "approval_requested" EventApprovalApproved EventKind = "approval_approved" EventApprovalDenied EventKind = "approval_denied" EventExecutionSuspended EventKind = "execution_suspended" EventExecutionResumed EventKind = "execution_resumed" EventHookFailed EventKind = "hook_failed" EventSchemaValidationPassed EventKind = "schema_validation_passed" EventSchemaValidationFailed EventKind = "schema_validation_failed" EventSchemaRepairStarted EventKind = "schema_repair_started" EventSchemaRepairCompleted EventKind = "schema_repair_completed" EventSchemaRepairFailed EventKind = "schema_repair_failed" EventBudgetExceeded EventKind = "budget_exceeded" EventTaskStarted EventKind = "task_started" EventTaskCompleted EventKind = "task_completed" EventTaskFailed EventKind = "task_failed" EventSkillLoaded EventKind = "skill_loaded" EventStreamDeadLettered EventKind = "stream_dead_lettered" EventStreamRedelivered EventKind = "stream_redelivered" EventCronLeaseAcquired EventKind = "cron_lease_acquired" EventCronLeaseLost EventKind = "cron_lease_lost" EventCronTickSkipped EventKind = "cron_tick_skipped" EventDurableRunPruneFailed EventKind = "durable_run_prune_failed" EventRunRecovered EventKind = "run_recovered" EventRunAbandoned EventKind = "run_abandoned" EventReplayIndeterminateTool EventKind = "replay_indeterminate_tool" EventSinkLogged EventKind = "sink_logged" )
type Execution ¶
type Execution struct {
ExecID string
TraceID string
Status ExecutionStatus
StartedAt time.Time
CompletedAt time.Time
}
Execution is the public state-store representation of one pipeline execution.
type ExecutionStatus ¶
type ExecutionStatus string
ExecutionStatus is the public state-store status for one execution.
const ( ExecutionRunning ExecutionStatus = "running" ExecutionCompleted ExecutionStatus = "completed" ExecutionFailed ExecutionStatus = "failed" ExecutionTruncated ExecutionStatus = "truncated" )
type FileSink ¶
type FileSink struct {
// contains filtered or unexported fields
}
FileSink is a Sink target that writes the final outcome to a file.
type FromOption ¶
type FromOption interface {
// contains filtered or unexported methods
}
FromOption configures a From node.
func IdempotencyKey ¶
func IdempotencyKey(header string) FromOption
IdempotencyKey prevents duplicate trigger deliveries based on a request header.
func StreamAckPolicy ¶ added in v0.2.0
func StreamAckPolicy(policy StreamAckMode) FromOption
StreamAckPolicy configures the per-broker acknowledgement mode for a stream trigger. See StreamAckAuto and StreamAckManual.
func StreamDLQ ¶ added in v0.2.0
func StreamDLQ(target string, maxAttempts int) FromOption
StreamDLQ routes a poisoned stream message to a dead-letter target once it has been redelivered maxAttempts times without success. maxAttempts counts total processing attempts before the message is dead-lettered.
func StreamMaxInFlight ¶ added in v0.2.0
func StreamMaxInFlight(limit int) FromOption
StreamMaxInFlight bounds the number of stream messages processed concurrently so a slow handler applies backpressure to the broker instead of buffering deliveries without bound.
func VerifySignature ¶
func VerifySignature(envVar, header string) FromOption
VerifySignature verifies an HMAC-SHA256 request signature before executing a trigger.
func WorkerPool ¶
func WorkerPool(limit int) FromOption
WorkerPool bounds concurrent trigger executions for a pipeline.
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks is a public hook registration set consumed by NewRunner.
type JSONReply ¶
type JSONReply[T any] struct { // contains filtered or unexported fields }
JSONReply is a typed JSON reply format.
type LogSink ¶
type LogSink struct{}
LogSink is a Sink target that writes the outcome to logs and metrics.
type MapOption ¶
type MapOption interface {
// contains filtered or unexported methods
}
MapOption configures a Map composition step.
func Concurrency ¶
Concurrency bounds concurrent Map item executions.
type MemoryRecord ¶ added in v0.2.0
MemoryRecord is the public state-store representation of one persistent, scoped agent-memory entry that survives across sessions.
type ModelRate ¶ added in v0.2.0
ModelRate captures USD-per-token rates for a single provider/model. Cache rates are optional and default to zero.
func PerMillion ¶ added in v0.2.0
PerMillion builds a ModelRate from USD-per-million-token rates, the common way vendors publish pricing.
type Node ¶
type Node interface {
// contains filtered or unexported methods
}
Node is a single step in an Ouvrier pipeline.
func From ¶
func From(source any, options ...FromOption) Node
From declares the event source that starts a pipeline.
func Pipe ¶
func Pipe(goal string, options ...PipeOption) Node
Pipe declares one agent step in a pipeline.
func Push ¶
func Push(target PushTarget) Node
Push terminates an asynchronous pipeline by sending the outcome elsewhere.
func Reply ¶
func Reply(format ReplyFormat) Node
Reply terminates a synchronous pipeline by answering the caller.
func Sink ¶
func Sink(target SinkTarget) Node
Sink terminates a pipeline without replying to the trigger source.
type OTLPExporterOption ¶ added in v0.2.0
type OTLPExporterOption = events.OTLPOption
OTLPExporterOption configures the OTLP exporter installed by WithOTLPExporter.
func OTLPHeaders ¶ added in v0.2.0
func OTLPHeaders(headers map[string]string) OTLPExporterOption
OTLPHeaders attaches additional HTTP headers (e.g. authorization for hosted collectors) to every OTLP export request.
func OTLPServiceName ¶ added in v0.2.0
func OTLPServiceName(name string) OTLPExporterOption
OTLPServiceName sets the service.name resource attribute on exported spans.
type ParallelOption ¶
type ParallelOption interface {
// contains filtered or unexported methods
}
ParallelOption configures a Parallel composition step.
type PendingApproval ¶ added in v0.2.0
type PendingApproval struct {
ID string
ExecID string
SessionID string
TraceID string
ToolName string
ToolCallID string
ToolKind string
Effect string
Reason string
Status ApprovalStatus
CreatedAt time.Time
DecidedAt time.Time
DecidedBy string
}
PendingApproval is the public state-store representation of one human-in-the-loop approval request that suspends an execution until an operator approves or denies the gated tool call. The Reason is redaction-safe and never carries tool arguments or skill bodies.
type PermissionAction ¶
type PermissionAction struct {
Kind PermissionActionKind
ToolName string
ToolCallID string
ToolKind string
Target string
Effect Effect
IdempotencyKey string
SideEffects []string
RequiresApproval bool
}
PermissionAction is the public, auditable action passed to a PermissionPolicy.
type PermissionActionKind ¶
type PermissionActionKind string
PermissionActionKind identifies an action that a runner policy can authorize.
const ( PermissionActionToolCall PermissionActionKind = "tool_call" PermissionActionPushWebhook PermissionActionKind = "push_webhook" PermissionActionPushQueue PermissionActionKind = "push_queue" PermissionActionSinkFile PermissionActionKind = "sink_file" PermissionActionSinkLog PermissionActionKind = "sink_log" )
type PermissionDecision ¶
PermissionDecision is the policy verdict for one action.
type PermissionPolicy ¶
type PermissionPolicy interface {
Authorize(context.Context, PermissionAction) (PermissionDecision, error)
}
PermissionPolicy authorizes privileged runner actions.
func AllowSideEffectTargets ¶
func AllowSideEffectTargets(label string, targets ...string) PermissionPolicy
AllowSideEffectTargets returns the default production policy plus an explicit target-scoped allowance for non-idempotent output actions such as Push and file Sink. Use "*" only when intentionally allowing every target for a label.
func AllowSideEffects ¶
func AllowSideEffects(labels ...string) PermissionPolicy
AllowSideEffects returns the default production policy plus explicit non-idempotent side-effect allowances for non-targeted tool calls. Targeted actions such as Push, file Sink, MCP, and Bash require AllowSideEffectTargets.
type PipeOption ¶
type PipeOption interface {
// contains filtered or unexported methods
}
PipeOption configures a Pipe node.
func Bash ¶
func Bash(sandbox SandboxConfig, options ...BashOption) PipeOption
Bash declares a bash command tool named "bash" for a Pipe.
By default Bash requires a platform sandbox that can enforce workspace, process, environment, and network boundaries. The runtime fails at startup when those guarantees are unavailable.
func Fallback ¶ added in v0.2.0
func Fallback(models ...string) PipeOption
Fallback declares an ordered list of fallback models for a Pipe. On a classified provider failure (transient, rate-limit, or auth) of the primary model, the harness tries each fallback model in order before failing. Permanent and validation failures never fall through.
func MCP ¶
func MCP(name string) PipeOption
MCP connects an external Model Context Protocol server to a Pipe.
func MaxCostUSD ¶
func MaxCostUSD(max float64) PipeOption
MaxCostUSD configures a Pipe cost budget in US dollars.
func Output ¶
func Output[T any]() PipeOption
Output declares the typed result schema expected from a Pipe.
func Retry ¶
func Retry(max int, policies ...BackoffPolicy) PipeOption
Retry configures transient provider retries and retry-safe tool retries. Tool retries only apply to ReadOnly or Idempotent tools.
func SequentialTools ¶
func SequentialTools() PipeOption
SequentialTools forces tool calls from one provider turn to execute one at a time.
func Skill ¶
func Skill(dirName string) PipeOption
Skill registers a Markdown skill directory for a Pipe.
func SubAgent ¶
func SubAgent(name string, pipeline PipelineSpec, options ...SubAgentOption) PipeOption
SubAgent exposes a child pipeline as a governed tool for a Pipe.
func Timeout ¶
func Timeout(value string) PipeOption
Timeout configures a Pipe wall-clock budget using a Go duration string.
func Tool ¶
func Tool(name string, goFunc any, options ...ToolOption) PipeOption
Tool registers a Go function as an agent tool for a Pipe.
type PipelineSpec ¶
type PipelineSpec struct {
// contains filtered or unexported fields
}
PipelineSpec is a child pipeline declaration used by SubAgent.
func Pipeline ¶
func Pipeline(nodes ...Node) PipelineSpec
Pipeline declares a child pipeline that can be exposed to a Pipe as a SubAgent.
type PricingTable ¶ added in v0.2.0
type PricingTable = provider.PricingTable
PricingTable maps a "provider/model" identifier to its per-token rate. It is used to compute Usage.CostUSD per call and to aggregate total cost per execution. A nil or empty table leaves cost best-effort (zero).
type Provider ¶ added in v0.2.0
Provider is the LLM boundary the runtime calls for completions. Implement it — or use the ovrtest package's scripted provider — to drive a worker in tests without contacting a real model and without spending tokens. In production, providers are configured from environment credentials and this need not be set.
type PushTarget ¶
type PushTarget interface {
// contains filtered or unexported methods
}
PushTarget configures where Push sends the final outcome.
type QueueTarget ¶
type QueueTarget struct {
// contains filtered or unexported fields
}
QueueTarget is a Push target that publishes the final outcome to a queue.
type ReplyFormat ¶
type ReplyFormat interface {
// contains filtered or unexported methods
}
ReplyFormat configures how Reply serializes the final outcome.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner owns advanced runtime configuration for Ouvrier pipelines.
func NewRunner ¶
func NewRunner(options ...RunnerOption) *Runner
NewRunner creates an advanced runner. Configuration errors are returned by Run.
type RunnerOption ¶
type RunnerOption func(*runnerConfig)
RunnerOption configures a Runner.
func WithHooks ¶
func WithHooks(hooks *Hooks) RunnerOption
WithHooks installs advanced lifecycle hooks for the runner.
func WithOTLPExporter ¶ added in v0.2.0
func WithOTLPExporter(endpoint string, options ...OTLPExporterOption) RunnerOption
WithOTLPExporter installs a Tracer that ships spans to an OTLP/HTTP collector at endpoint (e.g. "https://collector:4318"); the exporter appends "/v1/traces". Spans are encoded as OTLP/HTTP JSON with no heavy otel SDK dependency, and attributes are redacted before export. It is a convenience wrapper over WithTracer; passing both means the last option wins. An empty endpoint is rejected. Default off: when this option is unset, behavior is unchanged.
func WithPermissionPolicy ¶
func WithPermissionPolicy(permissionPolicy PermissionPolicy) RunnerOption
WithPermissionPolicy installs a production permission policy for privileged actions.
func WithPricing ¶ added in v0.2.0
func WithPricing(table PricingTable) RunnerOption
WithPricing installs a pricing table used to compute per-call and per-execution cost. When unset, cost stays best-effort (zero) with no behavior change.
func WithProvider ¶ added in v0.2.0
func WithProvider(p Provider) RunnerOption
WithProvider injects a single Provider used for every model id, bypassing the environment-derived provider registry. It is the seam that makes a worker unit-testable: pair it with Handler and httptest, or with a scripted provider from the ovrtest package.
func WithProviderBudget ¶ added in v0.2.0
func WithProviderBudget(provider string, maxInFlight int) RunnerOption
WithProviderBudget bounds the number of concurrent in-flight LLM calls for a single provider (the part before "/" in a model id). It prevents one provider's rate limit from stalling calls routed to other providers. The budget is shared across every Pipe in the runner. A limit less than or equal to zero is rejected.
func WithSandbox ¶
func WithSandbox(sandbox SandboxConfig) RunnerOption
WithSandbox installs a filesystem workspace boundary for the runner.
func WithSchemaRepairAttempts ¶
func WithSchemaRepairAttempts(max int) RunnerOption
WithSchemaRepairAttempts enables bounded ResultSchema repair attempts for runtime Pipe outputs.
func WithStateStore ¶
func WithStateStore(store StateStore) RunnerOption
WithStateStore installs a custom durable execution store.
func WithTracer ¶
func WithTracer(tracer Tracer) RunnerOption
WithTracer installs a Tracer that receives span lifecycle events for pipeline, pipe, session, LLM, tool, schema, and subagent activity. The harness pairs *_started events with their *_completed or *_failed counterparts internally; callers see one span per logical operation.
type SandboxConfig ¶
type SandboxConfig struct {
// contains filtered or unexported fields
}
SandboxConfig describes an explicit filesystem workspace boundary.
func Sandbox ¶
func Sandbox(root string, options ...SandboxOption) SandboxConfig
Sandbox configures a workspace root used for filesystem-bound capabilities.
type SandboxOption ¶
type SandboxOption func(*SandboxConfig)
SandboxOption configures a sandbox boundary.
func AllowEnv ¶
func AllowEnv(keys ...string) SandboxOption
AllowEnv allows selected environment variables inside sandboxed capabilities.
type SchemaViolation ¶
type SchemaViolation struct {
ID uint64
At time.Time
ExecID string
SessionID string
SchemaName string
Error string
}
SchemaViolation is the public state-store representation of one schema failure.
type Session ¶
type Session struct {
ExecID string
SessionID string
ParentSessionID string
TraceID string
Model string
StartedAt time.Time
Budget Budget
}
Session is the public state-store representation of one runtime session.
type SinkTarget ¶
type SinkTarget interface {
// contains filtered or unexported methods
}
SinkTarget configures where Sink records or discards the final outcome.
type StateStore ¶
type StateStore interface {
SaveExecution(context.Context, Execution) error
Execution(context.Context, string) (Execution, bool, error)
Executions(context.Context) ([]Execution, error)
SaveSession(context.Context, Session) error
Session(context.Context, string) (Session, bool, error)
Sessions(context.Context) ([]Session, error)
ReserveIdempotency(context.Context, string, string) (string, bool, error)
AddEvent(context.Context, Event) (Event, error)
Events(context.Context, string) ([]Event, error)
EventsSince(context.Context, string, uint64) ([]Event, error)
AddSchemaViolation(context.Context, SchemaViolation) (SchemaViolation, error)
SchemaViolations(context.Context, string) ([]SchemaViolation, error)
SaveMemory(context.Context, string, string, string) error
Memory(context.Context, string, string) (string, bool, error)
ListMemory(context.Context, string) ([]MemoryRecord, error)
SaveApproval(context.Context, PendingApproval) error
Approval(context.Context, string) (PendingApproval, bool, error)
PendingApprovals(context.Context) ([]PendingApproval, error)
ResolveApproval(context.Context, string, ApprovalStatus, string) (PendingApproval, error)
}
StateStore is the public durable execution store contract accepted by NewRunner.
type StreamAckMode ¶ added in v0.2.0
type StreamAckMode string
StreamAckMode selects when a stream delivery is acknowledged to the source broker.
const ( // StreamAckAuto acknowledges a delivery automatically once the pipeline has // processed it successfully (or it has been routed to the DLQ). This is the // default and matches at-least-once delivery with runtime-managed acks. StreamAckAuto StreamAckMode = "auto" // StreamAckManual leaves acknowledgement to the message handler: the runtime // never auto-acks a successfully processed delivery, so the broker keeps // redelivering until the source's own ack closure is invoked. Brokers whose // receiver does not expose an ack closure treat this as a no-op (the // transport's own delivery semantics apply). StreamAckManual StreamAckMode = "manual" )
type StreamTrigger ¶
type StreamTrigger struct {
// contains filtered or unexported fields
}
StreamTrigger is a stream trigger source.
func Stream ¶
func Stream(uri string) StreamTrigger
Stream declares a stream trigger source for From.
type SubAgentOption ¶
type SubAgentOption interface {
// contains filtered or unexported methods
}
SubAgentOption configures a SubAgent registered on a Pipe.
func MaxParallel ¶
func MaxParallel(limit int) SubAgentOption
MaxParallel bounds concurrent invocations of a SubAgent.
type ToolOption ¶
type ToolOption interface {
// contains filtered or unexported methods
}
ToolOption configures a Go tool registered on a Pipe.
func Describe ¶
func Describe(text string) ToolOption
Describe sets the LLM-facing description for a Tool.
func Idempotent ¶
func Idempotent(keyExpression string) ToolOption
Idempotent marks a side-effecting Tool as replay-safe for a stable key expression.
func Param ¶
func Param(name, description string) ToolOption
Param sets the LLM-facing description for a Tool parameter.
func ReadOnly ¶
func ReadOnly() ToolOption
ReadOnly marks a Tool as side-effect free and eligible for safe retry/parallel policies.
func RequiresApproval ¶
func RequiresApproval() ToolOption
RequiresApproval marks a Tool as blocked unless an explicit policy allows it.
func SideEffecting ¶
func SideEffecting(labels ...string) ToolOption
SideEffecting marks a Tool as mutating external state.
func ToolTimeout ¶
func ToolTimeout(value string) ToolOption
ToolTimeout configures the maximum wall-clock duration for one Tool invocation.
type Tracer ¶
Tracer is the public surface for OTel-compatible span emission. Implementations are free to use OpenTelemetry, Jaeger, Honeycomb, or any other observability stack. The harness emits one span per pipeline, pipe, session, LLM call, tool call, schema validation, and subagent task.
type WebhookEndpoint ¶
type WebhookEndpoint struct {
// contains filtered or unexported fields
}
WebhookEndpoint can be used as a signed webhook trigger or a push target.
func Webhook ¶
func Webhook(value string) WebhookEndpoint
Webhook declares a webhook trigger source or push target.
Source Files
¶
- bash.go
- compile.go
- compile_schema.go
- compile_step.go
- compile_trigger.go
- composition.go
- doc.go
- durable_recovery.go
- durable_runs.go
- env.go
- env_guard.go
- handler.go
- http_runtime.go
- http_runtime_composition.go
- http_runtime_skills.go
- mcp.go
- node.go
- options.go
- output.go
- permission_policy.go
- pipeline.go
- pricing.go
- provider_env.go
- routes.go
- routes_admin_events.go
- routes_admin_plan_types.go
- routes_admin_plans.go
- routes_admin_runs.go
- routes_dev.go
- routes_dev_script.go
- routes_dev_style.go
- run.go
- runner.go
- runner_events.go
- runner_state.go
- runtime_bash.go
- runtime_cron.go
- runtime_cron_lease.go
- runtime_http.go
- runtime_http_approval.go
- runtime_http_metrics.go
- runtime_http_resume.go
- runtime_http_sse.go
- runtime_http_stream_replay.go
- runtime_mixed.go
- runtime_queue.go
- runtime_queue_kafka.go
- runtime_queue_redis.go
- runtime_queue_sqs.go
- runtime_stream.go
- runtime_stream_dlq.go
- runtime_stream_kafka.go
- runtime_stream_nats.go
- runtime_stream_redis.go
- runtime_stream_state.go
- skill.go
- subagent_runtime.go
- tool.go
- tool_schema.go
- trigger.go
- validation.go
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ouvrier
command
|
|
|
internal
|
|
|
adminapi
Package adminapi is the shared client for a worker's authenticated /admin/* endpoints.
|
Package adminapi is the shared client for a worker's authenticated /admin/* endpoints. |
|
auth
Package auth bridges the official Codex CLI for ChatGPT-subscription sign-in.
|
Package auth bridges the official Codex CLI for ChatGPT-subscription sign-in. |
|
console
Package console is the loopback-only operator web console for an Ouvrier fleet.
|
Package console is the loopback-only operator web console for an Ouvrier fleet. |
|
deploy
Package deploy implements Ouvrier's deploy engine: building static binaries, resolving pip.yaml deploy environments and their env files, pre-flight validation, shipping over SSH, and the user-level deployments inventory.
|
Package deploy implements Ouvrier's deploy engine: building static binaries, resolving pip.yaml deploy environments and their env files, pre-flight validation, shipping over SSH, and the user-level deployments inventory. |
|
envnames
Package envnames is the single source of truth for the runtime environment variable names read by Ouvrier.
|
Package envnames is the single source of truth for the runtime environment variable names read by Ouvrier. |
|
operate/snippets
Package snippets is the embedded Ouvrier API + snippet pack: the single source of truth shared by the agent (read_ouvrier_api / search_ouvrier_docs) and the IDE (snippet palette + API panel).
|
Package snippets is the embedded Ouvrier API + snippet pack: the single source of truth shared by the agent (read_ouvrier_api / search_ouvrier_docs) and the IDE (snippet palette + API panel). |
|
provider/codex
Package codex implements provider.Provider over the official `codex exec` transport, billed to the user's ChatGPT subscription.
|
Package codex implements provider.Provider over the official `codex exec` transport, billed to the user's ChatGPT subscription. |
|
tunnel
Package tunnel federates the loopback-only /admin APIs of deployed workers over SSH tunnels.
|
Package tunnel federates the loopback-only /admin APIs of deployed workers over SSH tunnels. |
|
Package ovreval is a lightweight evaluation and regression harness for Ouvrier workers.
|
Package ovreval is a lightweight evaluation and regression harness for Ouvrier workers. |
|
Package ovrtest provides test doubles for exercising Ouvrier workers without contacting a real model provider or spending tokens.
|
Package ovrtest provides test doubles for exercising Ouvrier workers without contacting a real model provider or spending tokens. |