Documentation
¶
Overview ¶
Package steering is the public SDK facade over Harbor's internal/runtime/steering package — the run loop that drives a planner, the per-run control inbox/registry, and the steering taxonomy (RFC §3.6, §6.3; D-204). Alias-based re-exports only: no behavior lives here. RunLoop construction stays internal (the assembled Stack carries the production RunLoop); control-history internals and event payload structs are deliberately private.
Index ¶
Constants ¶
const ( // ControlInjectContext — INJECT_CONTEXT. ControlInjectContext = internal.ControlInjectContext // ControlRedirect — REDIRECT. ControlRedirect = internal.ControlRedirect // ControlCancel — CANCEL. ControlCancel = internal.ControlCancel // ControlPrioritize — PRIORITIZE. ControlPrioritize = internal.ControlPrioritize // ControlPause — PAUSE. ControlPause = internal.ControlPause // ControlResume — RESUME. ControlResume = internal.ControlResume // ControlApprove — APPROVE. ControlApprove = internal.ControlApprove // ControlReject — REJECT. ControlReject = internal.ControlReject // ControlUserMessage — USER_MESSAGE. ControlUserMessage = internal.ControlUserMessage )
ControlType values — the nine-entry steering taxonomy (RFC §6.3).
const ( // ScopeSessionUser — the session's own user. ScopeSessionUser = internal.ScopeSessionUser // ScopeOwnerUser — the owning user across their sessions. ScopeOwnerUser = internal.ScopeOwnerUser // ScopeAdmin — the elevated admin scope. ScopeAdmin = internal.ScopeAdmin )
Scope values.
const DefaultMaxSteps = internal.DefaultMaxSteps
DefaultMaxSteps is the run loop's default planner-step cap.
Variables ¶
var ( // ErrIdentityRequired — the run's identity quadruple is incomplete. ErrIdentityRequired = internal.ErrIdentityRequired // ErrUnknownControlType — the control type is not in the taxonomy. ErrUnknownControlType = internal.ErrUnknownControlType // ErrPayloadInvalid — the control payload failed validation. ErrPayloadInvalid = internal.ErrPayloadInvalid // ErrScopeMismatch — the caller scope is insufficient. ErrScopeMismatch = internal.ErrScopeMismatch // ErrInvalidScope — the caller scope is not a valid Scope. ErrInvalidScope = internal.ErrInvalidScope // ErrInboxNotFound — no inbox is open for the run. ErrInboxNotFound = internal.ErrInboxNotFound // ErrNoPlanner — RunSpec.Planner is nil. ErrNoPlanner = internal.ErrNoPlanner // ErrRunLoopMisconfigured — the RunLoop misses a mandatory dependency. ErrRunLoopMisconfigured = internal.ErrRunLoopMisconfigured // ErrNoOutstandingPause — the control targets a run with no pause. ErrNoOutstandingPause = internal.ErrNoOutstandingPause // ErrMaxStepsExceeded — the run loop hit its step cap. ErrMaxStepsExceeded = internal.ErrMaxStepsExceeded // ErrDecisionShapeUnsupported — the executor cannot dispatch the shape. ErrDecisionShapeUnsupported = internal.ErrDecisionShapeUnsupported )
Re-exported sentinel errors callers compare via errors.Is.
var ControlTypes = internal.ControlTypes
ControlTypes lists the taxonomy.
var IsValidControlType = internal.IsValidControlType
IsValidControlType reports whether t is in the taxonomy.
var IsValidScope = internal.IsValidScope
IsValidScope reports whether s is a valid Scope.
var NewRegistry = internal.NewRegistry
NewRegistry constructs a steering registry.
var RequiredScope = internal.RequiredScope
RequiredScope returns the minimum scope a control type demands.
var ValidatePayload = internal.ValidatePayload
ValidatePayload validates a control payload's shape budget.
var WithClock = internal.WithClock
WithClock injects a controllable clock into NewRegistry.
Functions ¶
This section is empty.
Types ¶
type AppliedControl ¶
type AppliedControl = internal.AppliedControl
AppliedControl records one applied control on the history.
type ControlEvent ¶
type ControlEvent = internal.ControlEvent
ControlEvent is one validated, scoped control instruction.
type ControlType ¶
type ControlType = internal.ControlType
ControlType names one steering control (the nine-entry taxonomy).
type RunLoop ¶
RunLoop is the shared planner-driving loop (one instance backs every spawned task; obtain it from the assembled Stack).
type ToolExecutor ¶
type ToolExecutor = internal.ToolExecutor
ToolExecutor dispatches the planner's non-Finish decisions.