steering

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

View Source
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).

View Source
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.

View Source
const DefaultMaxSteps = internal.DefaultMaxSteps

DefaultMaxSteps is the run loop's default planner-step cap.

Variables

View Source
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.

View Source
var ControlTypes = internal.ControlTypes

ControlTypes lists the taxonomy.

View Source
var IsValidControlType = internal.IsValidControlType

IsValidControlType reports whether t is in the taxonomy.

View Source
var IsValidScope = internal.IsValidScope

IsValidScope reports whether s is a valid Scope.

View Source
var NewRegistry = internal.NewRegistry

NewRegistry constructs a steering registry.

View Source
var RequiredScope = internal.RequiredScope

RequiredScope returns the minimum scope a control type demands.

View Source
var ValidatePayload = internal.ValidatePayload

ValidatePayload validates a control payload's shape budget.

View Source
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 Clock

type Clock = internal.Clock

Clock is the controllable time source seam.

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 Inbox

type Inbox = internal.Inbox

Inbox is one run's control inbox.

type Option

type Option = internal.Option

Option customises NewRegistry.

type Registry

type Registry = internal.Registry

Registry is the per-run steering inbox registry.

type RunLoop

type RunLoop = internal.RunLoop

RunLoop is the shared planner-driving loop (one instance backs every spawned task; obtain it from the assembled Stack).

type RunSpec

type RunSpec = internal.RunSpec

RunSpec is the per-run input to RunLoop.Run.

type Scope

type Scope = internal.Scope

Scope is the caller-privilege scope of a control.

type ToolExecutor

type ToolExecutor = internal.ToolExecutor

ToolExecutor dispatches the planner's non-Finish decisions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL