Documentation
¶
Overview ¶
Package venat is the root facade for the Venat runner. It owns construction and the Runner wrapper:
runner := venat.NewDevelopment()
Import api for public contracts such as Config, commands, store interfaces, policy requests, and Run/Task value types.
Public packages are grouped by stable extension concern:
- venat — Runner construction, methods, and error re-exports
- api — Config, commands, interfaces, Run/Task data contracts
- [agent] — agent engine and profile contracts
- [tool] — tool contract, effect types, and tooltest helpers
- [flow] — flow preset contracts
- [policy] — unified authorization contract
- [blackboard] — blackboard item and selector contracts
- [provider] — LLM provider drivers (anthropic, openai, scripted)
- [message] — shared message/content data types
- [hook] — pre/post-turn hook contracts
- [transport] — integration transports such as MCP
- [worker] — optional Runner-to-agent.Engine execution glue
Types under internal/ are implementation details. Core storage, mailbox, transition, command-handler, and replay internals are not public extension points and cannot be imported by consumers.
Package venat is the public façade for the Venat runner.
Import github.com/Viking602/venat/api for public contracts such as Config, commands, interfaces, and value types. The root package owns only construction, Runner methods, and sentinel error re-exports.
Index ¶
- Variables
- func DefaultConfig() api.Config
- type Runner
- func (r *Runner) AckEnvelope(ctx context.Context, cmd api.AckEnvelopeCommand) error
- func (r *Runner) AcquireResourceClaims(ctx context.Context, request api.ResourceClaimRequest) (api.ResourceClaimDecision, error)
- func (r *Runner) AcquireTaskExecution(ctx context.Context, cmd api.AcquireTaskExecutionCommand) (api.TaskExecutionLease, bool, error)
- func (r *Runner) AcquireTaskExecutionWithClaims(ctx context.Context, cmd api.AcquireTaskExecutionCommand) (api.AcquireTaskExecutionResult, error)
- func (r *Runner) ActiveLeaseCount(runID, taskID string) intdeprecated
- func (r *Runner) ActiveLeaseCountContext(ctx context.Context, runID, taskID string) int
- func (r *Runner) AdvanceRun(ctx context.Context, cmd api.AdvanceRunCommand) (api.Run, error)
- func (r *Runner) Agents() []api.AgentProfile
- func (r *Runner) AppendEvent(ctx context.Context, event api.Event) error
- func (r *Runner) AppendTaskExecutionEvent(ctx context.Context, cmd api.AppendTaskExecutionEventCommand) error
- func (r *Runner) AppendUsage(ctx context.Context, record api.UsageRecord) error
- func (r *Runner) Begin(ctx context.Context) (api.UnitOfWork, error)
- func (r *Runner) Close(ctx context.Context) error
- func (r *Runner) CompleteActionAttempt(ctx context.Context, cmd api.CompleteActionAttemptCommand) (api.ActionAttempt, error)
- func (r *Runner) CreateTask(ctx context.Context, cmd api.CreateTaskCommand) (api.Task, error)
- func (r *Runner) DeadLetter(ctx context.Context, cmd api.DeadLetterCommand) error
- func (r *Runner) DecideApproval(ctx context.Context, cmd api.DecideApprovalCommand) error
- func (r *Runner) DispatchTask(ctx context.Context, cmd api.DispatchTaskCommand) (api.TaskEnvelope, error)
- func (r *Runner) DispatchTaskFanOut(ctx context.Context, cmd api.FanOutDispatchTaskCommand) ([]api.TaskEnvelope, error)
- func (r *Runner) DrainResponseOutbox(ctx context.Context) (int, error)
- func (r *Runner) EndTraceSpan(ctx context.Context, cmd api.EndTraceSpanCommand) error
- func (r *Runner) EnforceToolResult(ctx context.Context, request api.ToolResultEnforcementRequest) (api.ToolResultEnforcementResult, error)
- func (r *Runner) Events(runID string) []api.Eventdeprecated
- func (r *Runner) ExecuteCommand(ctx context.Context, command api.Command) (any, error)deprecated
- func (r *Runner) HeartbeatTaskExecution(ctx context.Context, cmd api.HeartbeatTaskExecutionCommand) error
- func (r *Runner) InvokeTool(ctx context.Context, cmd api.ToolInvocation) (api.ToolInvocationResult, error)
- func (r *Runner) ListActionAttempts(ctx context.Context, selector api.ActionAttemptSelector) ([]api.ActionAttempt, error)
- func (r *Runner) ListAdmissionReservations(ctx context.Context, selector api.AdmissionReservationSelector) ([]api.AdmissionReservation, error)
- func (r *Runner) ListAgentDefinitionSnapshots(ctx context.Context, selector api.AgentDefinitionSnapshotSelector) ([]api.AgentDefinitionSnapshot, error)
- func (r *Runner) ListEnvelopes(ctx context.Context, runID string) ([]api.TaskEnvelope, error)
- func (r *Runner) ListEvents(ctx context.Context, runID string) ([]api.Event, error)
- func (r *Runner) ListMessages(ctx context.Context, runID string) ([]api.UserMessage, error)
- func (r *Runner) ListQueuedMessages(ctx context.Context) ([]api.UserMessage, error)
- func (r *Runner) ListResourceClaims(ctx context.Context, selector api.ResourceClaimSelector) ([]api.ResourceClaim, error)
- func (r *Runner) ListTasks(ctx context.Context, runID string) ([]api.Task, error)
- func (r *Runner) ListTraceSpans(ctx context.Context, runID string) ([]api.TraceSpan, error)
- func (r *Runner) LoadAdmissionReservation(ctx context.Context, id string) (api.AdmissionReservation, error)
- func (r *Runner) LoadAgentDefinitionSnapshot(ctx context.Context, definitionID, version string) (api.AgentDefinitionSnapshot, error)
- func (r *Runner) LoadEnvelope(ctx context.Context, envelopeID string) (api.TaskEnvelope, error)
- func (r *Runner) LoadMessage(ctx context.Context, runID, messageID string) (api.UserMessage, error)
- func (r *Runner) LoadResourceClaim(ctx context.Context, id string) (api.ResourceClaim, error)
- func (r *Runner) LoadRun(ctx context.Context, runID string) (api.Run, error)
- func (r *Runner) LoadTask(ctx context.Context, runID, taskID string) (api.Task, error)
- func (r *Runner) Mode() api.RuntimeMode
- func (r *Runner) PendingResumeTokens(ctx context.Context, selector api.ResumeTokenSelector) ([]api.ResumeToken, error)
- func (r *Runner) PreviewAdmission(ctx context.Context, request api.AdmissionRequest) (api.AdmissionDecision, error)
- func (r *Runner) PublishResponse(ctx context.Context, cmd api.PublishResponseCommand) error
- func (r *Runner) QueryUsage(ctx context.Context, selector api.UsageSelector) ([]api.UsageRecord, error)
- func (r *Runner) QueueEnvelope(ctx context.Context, env api.TaskEnvelope) error
- func (r *Runner) QueueMessage(ctx context.Context, message api.UserMessage) error
- func (r *Runner) QueueRun(ctx context.Context, cmd api.StartRunCommand) (api.Run, error)
- func (r *Runner) ReadyTasks(runID string) []api.Taskdeprecated
- func (r *Runner) ReadyTasksContext(ctx context.Context, runID string) []api.Task
- func (r *Runner) Recover(ctx context.Context, runID string) (api.Projection, error)
- func (r *Runner) RecoverResumeToken(ctx context.Context, cmd api.RecoverResumeTokenCommand) (api.ResumeToken, error)
- func (r *Runner) RegisterAgent(profile api.AgentProfile)
- func (r *Runner) RegisterFlow(flow api.Flow) error
- func (r *Runner) RegisterTool(tool api.Tool)
- func (r *Runner) RegisterToolForInvocation(runID, taskID string, holderType api.HolderType, holderID string, ...)
- func (r *Runner) ReleaseTaskExecution(ctx context.Context, cmd api.ReleaseTaskExecutionCommand) error
- func (r *Runner) RemoveToolsForInvocation(runID, taskID string, holderType api.HolderType, holderID string)
- func (r *Runner) Replay(runID string, mode api.ReplayMode) (api.Projection, error)deprecated
- func (r *Runner) ReplayContext(ctx context.Context, runID string, mode api.ReplayMode) (api.Projection, error)
- func (r *Runner) ReplayRunState(runID string) (api.Projection, error)deprecated
- func (r *Runner) ReplayRunStateContext(ctx context.Context, runID string) (api.Projection, error)
- func (r *Runner) RequestApproval(ctx context.Context, cmd api.RequestApprovalCommand) (api.ApprovalRequest, api.ResumeToken, error)
- func (r *Runner) RequestHandoff(ctx context.Context, cmd api.HandoffCommand) error
- func (r *Runner) ReserveAdmission(ctx context.Context, request api.AdmissionRequest) (api.AdmissionDecision, error)
- func (r *Runner) ResolveActionAttempt(ctx context.Context, cmd api.ResolveActionAttemptCommand) (api.ActionAttempt, error)
- func (r *Runner) ResponseOutbox(runID string) []api.UserMessagedeprecated
- func (r *Runner) ResponseOutboxContext(ctx context.Context, runID string) []api.UserMessage
- func (r *Runner) ResumeTokens() map[string]api.ResumeToken
- func (r *Runner) Run(ctx context.Context, runID string) (api.Run, error)
- func (r *Runner) RunEvents(ctx context.Context, runID string) ([]api.Event, error)
- func (r *Runner) RunTimeline(ctx context.Context, runID string) ([]api.RunTimelineItem, error)
- func (r *Runner) SaveAgentDefinitionSnapshot(ctx context.Context, snapshot api.AgentDefinitionSnapshot) error
- func (r *Runner) SaveRun(ctx context.Context, run api.Run) error
- func (r *Runner) SaveTask(ctx context.Context, task api.Task) error
- func (r *Runner) SaveTraceSpan(ctx context.Context, span api.TraceSpan) error
- func (r *Runner) SelectItems(ctx context.Context, runID string, selector api.BlackboardSelector) ([]api.BlackboardItem, error)
- func (r *Runner) SetMessagePolicy(policy api.MessagePolicyChecker)
- func (r *Runner) SetOutputGateway(gateway api.OutputGateway)
- func (r *Runner) SetPipeline(components api.PipelineComponents)
- func (r *Runner) SetPolicyEngine(policy api.PolicyEngine)
- func (r *Runner) StartActionAttempt(ctx context.Context, cmd api.StartActionAttemptCommand) (api.ActionAttempt, error)
- func (r *Runner) StartRun(ctx context.Context, cmd api.StartRunCommand) (api.Run, api.Task, error)
- func (r *Runner) StartRunWithResult(ctx context.Context, cmd api.StartRunCommand) (api.StartRunResult, error)
- func (r *Runner) StartTraceSpan(ctx context.Context, cmd api.StartTraceSpanCommand) (api.TraceSpan, error)
- func (r *Runner) StoreCapabilities(ctx context.Context) (api.StoreCapabilities, error)
- func (r *Runner) StoreProvider() api.StoreProvider
- func (r *Runner) SubmitResponseOutput(ctx context.Context, cmd api.SubmitResponseOutputCommand) error
- func (r *Runner) SubmitTypedReport(ctx context.Context, cmd api.SubmitTypedReportCommand) error
- func (r *Runner) SubmitUserInput(ctx context.Context, cmd api.SubmitUserInputCommand) error
- func (r *Runner) Subscribe(ctx context.Context, runID string, filter api.BlackboardFilter) (<-chan api.BlackboardItem, func() error, error)
- func (r *Runner) SumUsageCredits(ctx context.Context, selector api.UsageSelector) (int64, error)
- func (r *Runner) Task(ctx context.Context, runID, taskID string) (api.Task, error)
- func (r *Runner) TraceSpans(runID string) []api.TraceSpandeprecated
- func (r *Runner) TransitionAdmission(ctx context.Context, transition api.AdmissionTransition) (api.AdmissionDecision, error)
- func (r *Runner) TransitionResourceClaims(ctx context.Context, request api.ResourceClaimTransitionRequest) (api.ResourceClaimDecision, error)
- func (r *Runner) TransitionRun(ctx context.Context, cmd api.TransitionRunCommand) error
- func (r *Runner) TransitionTask(ctx context.Context, cmd api.TransitionTaskCommand) error
- func (r *Runner) UpdateEnvelope(ctx context.Context, env api.TaskEnvelope) error
- func (r *Runner) UpdateMessage(ctx context.Context, message api.UserMessage) error
- func (r *Runner) WaitForBlackboard(ctx context.Context, runID string, filter api.BlackboardFilter, ...) ([]api.BlackboardItem, error)
- func (r *Runner) WriteItem(ctx context.Context, item api.BlackboardItem) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = api.ErrNotFound ErrTerminalState = api.ErrTerminalState ErrStaleTaskVersion = api.ErrStaleTaskVersion ErrLeaseHolderMismatch = api.ErrLeaseHolderMismatch ErrLeaseNotActive = api.ErrLeaseNotActive ErrOwnerMismatch = api.ErrOwnerMismatch ErrActionTaskRequired = api.ErrActionTaskRequired ErrActionReconcileRequired = api.ErrActionReconcileRequired ErrIdempotencyConflict = api.ErrIdempotencyConflict ErrResponseTaskRequired = api.ErrResponseTaskRequired ErrPolicyDenied = api.ErrPolicyDenied ErrPolicyObligationFailed = api.ErrPolicyObligationFailed ErrHandoffCycle = api.ErrHandoffCycle ErrHandoffDepthExceeded = api.ErrHandoffDepthExceeded ErrInvalidCommand = api.ErrInvalidCommand ErrInvalidTransition = api.ErrInvalidTransition ErrCompletionCriteriaUnmet = api.ErrCompletionCriteriaUnmet ErrDependencyUnmet = api.ErrDependencyUnmet ErrDependencyFailed = api.ErrDependencyFailed ErrInvalidConfiguration = api.ErrInvalidConfiguration ErrInvalidAddress = api.ErrInvalidAddress ErrNoRecipients = api.ErrNoRecipients ErrSubscriptionClosed = api.ErrSubscriptionClosed ErrWaitTimeout = api.ErrWaitTimeout )
Public sentinel errors are owned by api and re-exported here for callers that only need root-level construction and error checks.
Functions ¶
func DefaultConfig ¶
DefaultConfig returns an empty api.Config; useful as a baseline before overriding individual fields.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is the public façade over the internal runtime. All public contract values crossing this boundary use api package types, not internal/core types.
func NewDevelopment ¶
NewDevelopment constructs a runner with in-memory storage and allow-all policy defaults. It is intended for tests, examples, and local development.
func NewProduction ¶
NewProduction constructs a runner only when the host supplies both durable storage and an explicit policy. The framework cannot verify whether a StoreProvider is durable, so production ownership remains with the host.
func (*Runner) AckEnvelope ¶
func (*Runner) AcquireResourceClaims ¶ added in v0.14.0
func (r *Runner) AcquireResourceClaims(ctx context.Context, request api.ResourceClaimRequest) (api.ResourceClaimDecision, error)
AcquireResourceClaims atomically acquires every requested opaque key or none.
func (*Runner) AcquireTaskExecution ¶
func (r *Runner) AcquireTaskExecution(ctx context.Context, cmd api.AcquireTaskExecutionCommand) (api.TaskExecutionLease, bool, error)
func (*Runner) AcquireTaskExecutionWithClaims ¶ added in v0.14.0
func (r *Runner) AcquireTaskExecutionWithClaims(ctx context.Context, cmd api.AcquireTaskExecutionCommand) (api.AcquireTaskExecutionResult, error)
AcquireTaskExecutionWithClaims atomically acquires a task lease and every requested shared/exclusive resource claim.
func (*Runner) ActiveLeaseCount
deprecated
func (*Runner) ActiveLeaseCountContext ¶
func (*Runner) AdvanceRun ¶
func (*Runner) Agents ¶
func (r *Runner) Agents() []api.AgentProfile
func (*Runner) AppendEvent ¶
func (*Runner) AppendTaskExecutionEvent ¶ added in v0.13.0
func (*Runner) AppendUsage ¶
AppendUsage persists one usage-metering record. The worker runtime calls it after every engine run; hosts may also append their own records (e.g. for non-engine model calls).
func (*Runner) CompleteActionAttempt ¶
func (r *Runner) CompleteActionAttempt(ctx context.Context, cmd api.CompleteActionAttemptCommand) (api.ActionAttempt, error)
func (*Runner) CreateTask ¶
func (*Runner) DeadLetter ¶
func (*Runner) DecideApproval ¶
func (*Runner) DispatchTask ¶
func (r *Runner) DispatchTask(ctx context.Context, cmd api.DispatchTaskCommand) (api.TaskEnvelope, error)
func (*Runner) DispatchTaskFanOut ¶
func (r *Runner) DispatchTaskFanOut(ctx context.Context, cmd api.FanOutDispatchTaskCommand) ([]api.TaskEnvelope, error)
func (*Runner) DrainResponseOutbox ¶
func (*Runner) EndTraceSpan ¶
func (*Runner) EnforceToolResult ¶ added in v0.14.0
func (r *Runner) EnforceToolResult(ctx context.Context, request api.ToolResultEnforcementRequest) (api.ToolResultEnforcementResult, error)
func (*Runner) ExecuteCommand
deprecated
ExecuteCommand dispatches a Command through the internal command bus and returns the typed result. For most use cases prefer the typed methods (QueueRun, StartRun, RequestApproval, AcquireTaskExecution, ...) which avoid the result-type assertion and provide better compile-time signatures. ExecuteCommand exists for tools (replay, migration, admin) that operate generically over Commands.
Result types follow the api.<Command>Result naming convention where a command produces a structured value (StartRunCommand -> api.StartRunResult, RequestApprovalCommand -> api.RequestApprovalResult, AcquireTaskExecutionCommand -> api.AcquireTaskExecutionResult). Commands that produce a single domain value return that value directly.
Deprecated: use the typed Runner methods so result shapes are checked at compile time.
func (*Runner) HeartbeatTaskExecution ¶
func (*Runner) InvokeTool ¶
func (r *Runner) InvokeTool(ctx context.Context, cmd api.ToolInvocation) (api.ToolInvocationResult, error)
func (*Runner) ListActionAttempts ¶ added in v0.13.0
func (r *Runner) ListActionAttempts(ctx context.Context, selector api.ActionAttemptSelector) ([]api.ActionAttempt, error)
func (*Runner) ListAdmissionReservations ¶ added in v0.14.0
func (r *Runner) ListAdmissionReservations(ctx context.Context, selector api.AdmissionReservationSelector) ([]api.AdmissionReservation, error)
ListAdmissionReservations lists durable reservations matching selector.
func (*Runner) ListAgentDefinitionSnapshots ¶ added in v0.14.0
func (r *Runner) ListAgentDefinitionSnapshots(ctx context.Context, selector api.AgentDefinitionSnapshotSelector) ([]api.AgentDefinitionSnapshot, error)
ListAgentDefinitionSnapshots lists immutable definition revisions matching selector.
func (*Runner) ListEnvelopes ¶
func (*Runner) ListEvents ¶
func (*Runner) ListMessages ¶
func (*Runner) ListQueuedMessages ¶
func (*Runner) ListResourceClaims ¶ added in v0.14.0
func (r *Runner) ListResourceClaims(ctx context.Context, selector api.ResourceClaimSelector) ([]api.ResourceClaim, error)
ListResourceClaims lists durable claims matching selector.
func (*Runner) ListTraceSpans ¶
func (*Runner) LoadAdmissionReservation ¶ added in v0.14.0
func (r *Runner) LoadAdmissionReservation(ctx context.Context, id string) (api.AdmissionReservation, error)
LoadAdmissionReservation loads one durable aggregate-capacity reservation.
func (*Runner) LoadAgentDefinitionSnapshot ¶ added in v0.14.0
func (r *Runner) LoadAgentDefinitionSnapshot(ctx context.Context, definitionID, version string) (api.AgentDefinitionSnapshot, error)
LoadAgentDefinitionSnapshot loads one immutable definition revision.
func (*Runner) LoadEnvelope ¶
func (*Runner) LoadMessage ¶
func (*Runner) LoadResourceClaim ¶ added in v0.14.0
LoadResourceClaim loads one durable resource claim.
func (*Runner) Mode ¶
func (r *Runner) Mode() api.RuntimeMode
Mode reports whether the runner was created with development defaults or validated production dependencies.
func (*Runner) PendingResumeTokens ¶
func (r *Runner) PendingResumeTokens(ctx context.Context, selector api.ResumeTokenSelector) ([]api.ResumeToken, error)
PendingResumeTokens lists unconsumed resume tokens matching selector. After a crash, a host enumerates pending tokens with this and recovers each via RecoverResumeToken — the bulk-recovery entry point.
func (*Runner) PreviewAdmission ¶ added in v0.14.0
func (r *Runner) PreviewAdmission(ctx context.Context, request api.AdmissionRequest) (api.AdmissionDecision, error)
PreviewAdmission evaluates aggregate capacity without reserving it.
func (*Runner) PublishResponse ¶
func (*Runner) QueryUsage ¶
func (r *Runner) QueryUsage(ctx context.Context, selector api.UsageSelector) ([]api.UsageRecord, error)
QueryUsage returns the usage records matching selector.
func (*Runner) QueueEnvelope ¶
func (*Runner) QueueMessage ¶
func (*Runner) ReadyTasks
deprecated
func (*Runner) ReadyTasksContext ¶
func (*Runner) RecoverResumeToken ¶
func (r *Runner) RecoverResumeToken(ctx context.Context, cmd api.RecoverResumeTokenCommand) (api.ResumeToken, error)
func (*Runner) RegisterAgent ¶
func (r *Runner) RegisterAgent(profile api.AgentProfile)
func (*Runner) RegisterTool ¶
func (*Runner) RegisterToolForInvocation ¶ added in v0.14.0
func (r *Runner) RegisterToolForInvocation(runID, taskID string, holderType api.HolderType, holderID string, tool api.Tool)
RegisterToolForInvocation scopes governed tool metadata to one run, task, holder, and tool name. RegisterTool remains the legacy global registration API for direct non-agent callers.
func (*Runner) ReleaseTaskExecution ¶
func (*Runner) RemoveToolsForInvocation ¶ added in v0.14.0
func (r *Runner) RemoveToolsForInvocation(runID, taskID string, holderType api.HolderType, holderID string)
RemoveToolsForInvocation releases all scoped tool metadata for one exact invocation identity.
func (*Runner) Replay
deprecated
func (r *Runner) Replay(runID string, mode api.ReplayMode) (api.Projection, error)
Deprecated: use ReplayContext.
func (*Runner) ReplayContext ¶
func (r *Runner) ReplayContext(ctx context.Context, runID string, mode api.ReplayMode) (api.Projection, error)
func (*Runner) ReplayRunState
deprecated
func (r *Runner) ReplayRunState(runID string) (api.Projection, error)
Deprecated: use ReplayRunStateContext.
func (*Runner) ReplayRunStateContext ¶
func (*Runner) RequestApproval ¶
func (r *Runner) RequestApproval(ctx context.Context, cmd api.RequestApprovalCommand) (api.ApprovalRequest, api.ResumeToken, error)
func (*Runner) RequestHandoff ¶
func (*Runner) ReserveAdmission ¶ added in v0.14.0
func (r *Runner) ReserveAdmission(ctx context.Context, request api.AdmissionRequest) (api.AdmissionDecision, error)
ReserveAdmission atomically evaluates aggregate limits and records capacity.
func (*Runner) ResolveActionAttempt ¶ added in v0.13.0
func (r *Runner) ResolveActionAttempt(ctx context.Context, cmd api.ResolveActionAttemptCommand) (api.ActionAttempt, error)
func (*Runner) ResponseOutbox
deprecated
func (r *Runner) ResponseOutbox(runID string) []api.UserMessage
Deprecated: use ResponseOutboxContext.
func (*Runner) ResponseOutboxContext ¶
func (*Runner) ResumeTokens ¶
func (r *Runner) ResumeTokens() map[string]api.ResumeToken
func (*Runner) RunTimeline ¶
func (*Runner) SaveAgentDefinitionSnapshot ¶ added in v0.14.0
func (r *Runner) SaveAgentDefinitionSnapshot(ctx context.Context, snapshot api.AgentDefinitionSnapshot) error
SaveAgentDefinitionSnapshot persists one immutable definition revision.
func (*Runner) SaveTraceSpan ¶
func (*Runner) SelectItems ¶
func (r *Runner) SelectItems(ctx context.Context, runID string, selector api.BlackboardSelector) ([]api.BlackboardItem, error)
func (*Runner) SetMessagePolicy ¶
func (r *Runner) SetMessagePolicy(policy api.MessagePolicyChecker)
func (*Runner) SetOutputGateway ¶
func (r *Runner) SetOutputGateway(gateway api.OutputGateway)
func (*Runner) SetPipeline ¶
func (r *Runner) SetPipeline(components api.PipelineComponents)
func (*Runner) SetPolicyEngine ¶
func (r *Runner) SetPolicyEngine(policy api.PolicyEngine)
func (*Runner) StartActionAttempt ¶
func (r *Runner) StartActionAttempt(ctx context.Context, cmd api.StartActionAttemptCommand) (api.ActionAttempt, error)
func (*Runner) StartRunWithResult ¶ added in v0.14.0
func (r *Runner) StartRunWithResult(ctx context.Context, cmd api.StartRunCommand) (api.StartRunResult, error)
StartRunWithResult starts a run and reports whether this call created it. Created is false for an idempotent retry that returned the existing run.
func (*Runner) StartTraceSpan ¶
func (*Runner) StoreCapabilities ¶
func (*Runner) StoreProvider ¶
func (r *Runner) StoreProvider() api.StoreProvider
func (*Runner) SubmitResponseOutput ¶
func (*Runner) SubmitTypedReport ¶
func (*Runner) SubmitUserInput ¶
func (*Runner) Subscribe ¶
func (r *Runner) Subscribe(ctx context.Context, runID string, filter api.BlackboardFilter) (<-chan api.BlackboardItem, func() error, error)
Subscribe streams future blackboard writes for runID that match filter. The subscription ends when the returned cancel func is called or when ctx is cancelled — either way the underlying subscription is released and the channel closes; items in flight at that moment may be dropped. cancel is idempotent and safe to call after ctx cancellation.
func (*Runner) SumUsageCredits ¶
SumUsageCredits returns the credit sum over records matching selector.
func (*Runner) TraceSpans
deprecated
func (*Runner) TransitionAdmission ¶ added in v0.14.0
func (r *Runner) TransitionAdmission(ctx context.Context, transition api.AdmissionTransition) (api.AdmissionDecision, error)
TransitionAdmission applies one expected-version reservation transition.
func (*Runner) TransitionResourceClaims ¶ added in v0.14.0
func (r *Runner) TransitionResourceClaims(ctx context.Context, request api.ResourceClaimTransitionRequest) (api.ResourceClaimDecision, error)
TransitionResourceClaims atomically applies expected-version claim changes.
func (*Runner) TransitionRun ¶
func (*Runner) TransitionTask ¶
func (*Runner) UpdateEnvelope ¶
func (*Runner) UpdateMessage ¶
func (*Runner) WaitForBlackboard ¶
func (r *Runner) WaitForBlackboard(ctx context.Context, runID string, filter api.BlackboardFilter, predicate func([]api.BlackboardItem) bool, timeout time.Duration) ([]api.BlackboardItem, error)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
_examples
|
|
|
approval
command
approval demonstrates the human-in-the-loop tool gate: a policy engine requires approval for any tool flagged RequiresActionTask, the runtime pauses, a human decides, and the call resumes.
|
approval demonstrates the human-in-the-loop tool gate: a policy engine requires approval for any tool flagged RequiresActionTask, the runtime pauses, a human decides, and the call resumes. |
|
coding_hashline
command
coding_hashline demonstrates the sandboxed coding capability end to end: a scripted agent reads a buggy Go file, fixes it with a line-anchored hashline edit, formats it with the in-process gofmt tool, runs the package tests, and shows the resulting git diff — all through the Runner/worker path under coding.PolicyEngine(), and with NO shell access.
|
coding_hashline demonstrates the sandboxed coding capability end to end: a scripted agent reads a buggy Go file, fixes it with a line-anchored hashline edit, formats it with the in-process gofmt tool, runs the package tests, and shows the resulting git diff — all through the Runner/worker path under coding.PolicyEngine(), and with NO shell access. |
|
collab
command
collab demonstrates handoff: agent A starts a task, decides B is the right owner, and transfers ownership via RequestHandoff.
|
collab demonstrates handoff: agent A starts a task, decides B is the right owner, and transfers ownership via RequestHandoff. |
|
dataflow
command
dataflow demonstrates blackboard read/write: producer task writes a finding, consumer task reads it via SelectItems.
|
dataflow demonstrates blackboard read/write: producer task writes a finding, consumer task reads it via SelectItems. |
|
durable
command
durable demonstrates event-sourced replay: after a run completes, ReplayRunState rebuilds the full projection from the event log alone.
|
durable demonstrates event-sourced replay: after a run completes, ReplayRunState rebuilds the full projection from the event log alone. |
|
evaluation
command
evaluation demonstrates the eval framework: declare an EvalCase with a scripted Harness and a few typed Assertions, then grade an executed run.
|
evaluation demonstrates the eval framework: declare an EvalCase with a scripted Harness and a few typed Assertions, then grade an executed run. |
|
governed_tool
command
governed_tool demonstrates policy-gated tool execution.
|
governed_tool demonstrates policy-gated tool execution. |
|
incident_response
command
Reference architecture: 用户 → 主控 → Blackboard → Mailbox → N 专家 → 归因 → 风险评审 → 处置.
|
Reference architecture: 用户 → 主控 → Blackboard → Mailbox → N 专家 → 归因 → 风险评审 → 处置. |
|
mailbox_pingpong
command
mailbox_pingpong shows the mailbox dispatch + ack primitive.
|
mailbox_pingpong shows the mailbox dispatch + ack primitive. |
|
orchestrator
command
|
|
|
panel
command
panel demonstrates AwaitMode=Quorum: a synthesizer task unblocks once 2 of 3 panel experts succeed.
|
panel demonstrates AwaitMode=Quorum: a synthesizer task unblocks once 2 of 3 panel experts succeed. |
|
recipes/collab
command
Recipe: collab — multi-branch parallel work where each branch hands off from implementer to reviewer.
|
Recipe: collab — multi-branch parallel work where each branch hands off from implementer to reviewer. |
|
recipes/deepsearch
command
Recipe: deepsearch — research + verification stage gated by AwaitMode=All.
|
Recipe: deepsearch — research + verification stage gated by AwaitMode=All. |
|
recipes/panel
command
Recipe: panel — domain experts each tagged by Role.
|
Recipe: panel — domain experts each tagged by Role. |
|
recipes/research
command
Recipe: research — N parallel researchers contribute evidence, a supervisor waits for the corpus, then synthesizes a finding.
|
Recipe: research — N parallel researchers contribute evidence, a supervisor waits for the corpus, then synthesizes a finding. |
|
recipes/verifier
command
verifier demonstrates feedback-loop engineering on the Venat agent layer: a writer agent drafts an answer, a verifier subagent checks it against a rubric, and the writer revises on the verifier's feedback until it passes.
|
verifier demonstrates feedback-loop engineering on the Venat agent layer: a writer agent drafts an answer, a verifier subagent checks it against a rubric, and the writer revises on the verifier's feedback until it passes. |
|
research
command
research demonstrates fan-out by group.
|
research demonstrates fan-out by group. |
|
skills
command
|
|
|
subagent
command
subagent demonstrates the self-sufficient agent layer (ADR-018): one parent agent delegates to two subagents, each running on a different model served by a different vendor, through a single provider.Registry and a single agent.Build path.
|
subagent demonstrates the self-sufficient agent layer (ADR-018): one parent agent delegates to two subagents, each running on a different model served by a different vendor, through a single provider.Registry and a single agent.Build path. |
|
tooling
command
tooling demonstrates the tool registration + invocation primitive: a read-effect tool runs through the policy gate without approval, and the runtime records a ToolInvocationResult on the run timeline.
|
tooling demonstrates the tool registration + invocation primitive: a read-effect tool runs through the policy gate without approval, and the runtime records a ToolInvocationResult on the run timeline. |
|
worker
command
worker demonstrates the optional AgentWorker glue.
|
worker demonstrates the optional AgentWorker glue. |
|
workflow
command
|
|
|
Package blackboard exposes only the stable item and selector contracts used by the Venat runtime.
|
Package blackboard exposes only the stable item and selector contracts used by the Venat runtime. |
|
cmd
|
|
|
venat
command
|
|
|
Package coding is the reusable coding-agent toolkit: the coding.* tool.Drivers (read_file, search, edit_hashline, write_file, gofmt, gotest), the Workspace filesystem abstraction, and the hashline snapshot store behind stale-edit detection.
|
Package coding is the reusable coding-agent toolkit: the coding.* tool.Drivers (read_file, search, edit_hashline, write_file, gofmt, gotest), the Workspace filesystem abstraction, and the hashline snapshot store behind stale-edit detection. |
|
internal/hashline
Package hashline implements the pure-Go core of the hashline line-anchored edit protocol: file normalization, the FNV tag fingerprint, the numbered read/edit formats, a strict patch parser, an original-line-anchored applier, and an all-or-nothing multi-section patcher.
|
Package hashline implements the pure-Go core of the hashline line-anchored edit protocol: file normalization, the FNV tag fingerprint, the numbered read/edit formats, a strict patch parser, an original-line-anchored applier, and an all-or-nothing multi-section patcher. |
|
internal/workspace
Package workspace provides low-level sandbox helpers for the coding capability: workspace-relative path resolution, an argv command allowlist and runner, and a bounded file-listing walker.
|
Package workspace provides low-level sandbox helpers for the coding capability: workspace-relative path resolution, an argv command allowlist and runner, and a bounded file-listing walker. |
|
Package contract provides public conformance tests for application-owned api.StoreProvider implementations.
|
Package contract provides public conformance tests for application-owned api.StoreProvider implementations. |
|
internal/inmemfake
Package inmemfake provides a non-exported in-memory api.StoreProvider used solely by the framework's own contract-suite self-test in contract/contract_test.go.
|
Package inmemfake provides a non-exported in-memory api.StoreProvider used solely by the framework's own contract-suite self-test in contract/contract_test.go. |
|
Package eval is the v0.8.0 evaluation framework.
|
Package eval is the v0.8.0 evaluation framework. |
|
assertions
Package assertions ships the framework's built-in eval.Assertion implementations.
|
Package assertions ships the framework's built-in eval.Assertion implementations. |
|
matcher
Package matcher ships the framework's built-in value comparators used by eval assertions (most notably ToolCalledWithArg and OutputContains).
|
Package matcher ships the framework's built-in value comparators used by eval assertions (most notably ToolCalledWithArg and OutputContains). |
|
reporter
Package reporter renders a slice of eval.EvalResult into the formats CI and humans consume: JUnit XML (junit.go), GitHub Checks annotations (github.go), and a terminal-friendly summary (text.go).
|
Package reporter renders a slice of eval.EvalResult into the formats CI and humans consume: JUnit XML (junit.go), GitHub Checks annotations (github.go), and a terminal-friendly summary (text.go). |
|
Package flow exposes orchestrator flow presets.
|
Package flow exposes orchestrator flow presets. |
|
internal
|
|
|
cli
Package cli implements the deliberately minimal venat binary.
|
Package cli implements the deliberately minimal venat binary. |
|
compact
Package compact provides conversation compaction strategies for managing context window growth.
|
Package compact provides conversation compaction strategies for managing context window growth. |
|
core/adapter
Package adapter is the only bidirectional bridge between the public api types and the internal core model.
|
Package adapter is the only bidirectional bridge between the public api types and the internal core model. |
|
core/governance
Package governance provides pure policy-effect helpers that operate only through ports.UnitOfWork.
|
Package governance provides pure policy-effect helpers that operate only through ports.UnitOfWork. |
|
errs
Package errs provides structured error types used across the framework.
|
Package errs provides structured error types used across the framework. |
|
gate
Package gate provides concurrency and ordering primitives for transport and messaging layers.
|
Package gate provides concurrency and ordering primitives for transport and messaging layers. |
|
Package memory is the optional-plugin memory surface for v0.8.0+.
|
Package memory is the optional-plugin memory surface for v0.8.0+. |
|
Package multiagent is the v0.8.0 multi-agent layer.
|
Package multiagent is the v0.8.0 multi-agent layer. |
|
Package packs is the v0.8.0 "vertical pack" registry root.
|
Package packs is the v0.8.0 "vertical pack" registry root. |
|
aiops
Package aiops is a v0.8.0 skeleton pack for production-monitoring style agents: alert triage, log search, runbook execution.
|
Package aiops is a v0.8.0 skeleton pack for production-monitoring style agents: alert triage, log search, runbook execution. |
|
coding
Package coding is the declarative manifest for the sandboxed coding capability specified in docs/coding-agent-hashline.md.
|
Package coding is the declarative manifest for the sandboxed coding capability specified in docs/coding-agent-hashline.md. |
|
customersupport
Package customersupport is a v0.8.0 skeleton pack that bundles a triage agent plus the capability shape a typical support workflow needs (ticket lookup, knowledge-base search, reply drafting).
|
Package customersupport is a v0.8.0 skeleton pack that bundles a triage agent plus the capability shape a typical support workflow needs (ticket lookup, knowledge-base search, reply drafting). |
|
devops
Package devops is a v0.8.0 skeleton pack for build/release/operate style agents: a deploy assistant, a release-notes drafter, and a log-triage helper.
|
Package devops is a v0.8.0 skeleton pack for build/release/operate style agents: a deploy assistant, a release-notes drafter, and a log-triage helper. |
|
research
Package research is the v0.8.0 worked-example pack: a small bundle of agent definitions, capabilities, and an eval suite that demonstrates the shape every pack should follow.
|
Package research is the v0.8.0 worked-example pack: a small bundle of agent definitions, capabilities, and an eval suite that demonstrates the shape every pack should follow. |
|
Package policy exposes the stable authorization contract used by the Venat runner.
|
Package policy exposes the stable authorization contract used by the Venat runner. |
|
Package skill parses and registers Agent Skills-compatible instruction bundles.
|
Package skill parses and registers Agent Skills-compatible instruction bundles. |
|
Package stream is the consumer-facing streaming surface for the agent loop.
|
Package stream is the consumer-facing streaming surface for the agent loop. |
|
transport
|
|
|
cron
Package cron is the cron transport driver for api.TriggerSchedule.
|
Package cron is the cron transport driver for api.TriggerSchedule. |
|
event
Package event is the in-process pub/sub transport driver for api.TriggerEvent.
|
Package event is the in-process pub/sub transport driver for api.TriggerEvent. |
|
mcp/client
Package mcpclient implements a typed Model Context Protocol client.
|
Package mcpclient implements a typed Model Context Protocol client. |
|
scheduler
Package scheduler is a deprecated compatibility shim for the cron trigger transport.
|
Package scheduler is a deprecated compatibility shim for the cron trigger transport. |
|
sse
Package sse adapts a live stream.Frame stream onto a Server-Sent Events HTTP response.
|
Package sse adapts a live stream.Frame stream onto a Server-Sent Events HTTP response. |
|
trigger
Package trigger declares the small set of types shared across every transport driver under transport/* (scheduler, webhook, event).
|
Package trigger declares the small set of types shared across every transport driver under transport/* (scheduler, webhook, event). |
|
webhook
Package webhook is the HTTP transport driver for api.TriggerWebhook.
|
Package webhook is the HTTP transport driver for api.TriggerWebhook. |
|
Package worker provides optional glue between the Venat runner and the single-agent engine.
|
Package worker provides optional glue between the Venat runner and the single-agent engine. |
|
Package workflow provides a user-facing workflow modeling layer.
|
Package workflow provides a user-facing workflow modeling layer. |