Versions in this module Expand all Collapse all v0 v0.1.3 Sep 18, 2026 Changes in this version + const AgentIdentitySchema + const ExecutionPlanSchema + const MaxDelegationDepth + const ResultSchema + const SpawnResultSchema + const SpawnToolName + const ToolName + var ErrBusy = errors.New("coding subagent: busy") + var ErrCapacity = errors.New("coding subagent: capacity exhausted") + var ErrClosed = errors.New("coding subagent: closed") + var ErrInvalid = errors.New("coding subagent: invalid input") + var ErrInvalidResult = errors.New("coding subagent: invalid result") + var ErrSpawnLimit = errors.New("coding subagent: spawn limit exhausted") + func InstructionsDigest(value string) string + func Reconcile(ctx context.Context, repository *session.Repository, parent *session.Handle) error + func ValidateExecutionPlan(plan ExecutionPlan) error + func ValidateIdentity(identity AgentIdentity) error + type Activity struct + Phase ActivityPhase + Revision uint64 + RunID string + StartedAt time.Time + Tools []ToolActivity + Turn int + UpdatedAt time.Time + type ActivityAction string + const ActivityActionGlob + const ActivityActionList + const ActivityActionRead + const ActivityActionSearch + type ActivityPhase string + const ActivityPhaseFinalizing + const ActivityPhaseStarting + const ActivityPhaseThinking + const ActivityPhaseUnknown + const ActivityPhaseWorking + type ActivitySummary struct + Action ActivityAction + Target string + type AdmissionEvent struct + DelegationDepth int + Delivery Delivery + Outcome AdmissionOutcome + Reason AdmissionReason + type AdmissionObserver func(context.Context, AdmissionEvent) + type AdmissionOutcome string + const AdmissionOutcomeAccepted + const AdmissionOutcomeRejected + type AdmissionReason string + const AdmissionReasonBusy + const AdmissionReasonCapacity + const AdmissionReasonClosed + const AdmissionReasonInvalid + const AdmissionReasonSpawnLimit + type AgentEvent struct + ChildSessionID string + Event agent.Event + Ownership Ownership + Task string + type AgentEventObserver func(context.Context, AgentEvent) error + type AgentIdentity struct + DefinitionDigest string + DefinitionSchema string + DefinitionSource string + ID string + Kind AgentKind + Name string + Schema string + func BuiltinIdentity(role Role) (AgentIdentity, error) + func IdentityFromDefinition(definition agentprofile.Definition) (AgentIdentity, error) + func (i AgentIdentity) IsZero() bool + func (i AgentIdentity) LegacyRole() Role + type AgentKind string + const AgentKindBuiltin + const AgentKindCustom + const AgentKindEphemeral + type Config struct + AdmissionObserver AdmissionObserver + AgentObservers []func(context.Context, agent.Event) + Compaction *harness.CompactionSettings + Context context.Context + DelegationDepth int + EventObservers []AgentEventObserver + GenerationID uint64 + Lifecycle Lifecycle + Model ai.LanguageModel + Options ExecutionOptions + Parent *session.Handle + Repository *session.Repository + RequestPolicy func(*ai.Request) + Share *Manager + SummaryModel ai.LanguageModel + Tree *workspace.Tree + type Delivery string + const DeliveryBackground + const DeliveryForeground + type Detail struct + Activity Activity + Plan ExecutionPlan + Result any + Summary Summary + Transcript []ai.Message + type DispatchInput struct + Child *session.Handle + Observer Observer + OnEvent func(context.Context, agent.Event) + Plan ExecutionPlan + Request Request + type Dispatcher interface + AgentIDs func() []string + Compile func(context.Context, Request) (ExecutionPlan, error) + Open func(context.Context, DispatchInput) (Runner, error) + type EffectiveCapability struct + Risk string + Source string + WireName string + type Event struct + Activity ActivitySummary + ChildRunID string + ChildSessionID string + Code string + Delivery Delivery + Duration time.Duration + Identity AgentIdentity + Model string + ParentInteractionID string + ParentRunID string + ParentSessionID string + ParentToolCallID string + Progress bool + Result *Result + Role Role + RootInteractionID string + State State + Stop agent.StopReason + TaskPreview string + Time time.Time + ToolCalls int + Turns int + Usage ai.Usage + type Evidence struct + Claim string + EndLine int + Path string + StartLine int + type Execution struct + func (e *Execution) Cancel() + func (e *Execution) Wait(ctx context.Context) (Result, error) + type ExecutionOptions struct + Limits Limits + MaxAutoFollowUps int + MaxConcurrent int + MaxDepth int + MaxSpawnedPerRootInteraction int + type ExecutionPlan struct + Ancestry []string + Capabilities []EffectiveCapability + DelegationDepth int + DelegationTargets []string + Delivery Delivery + GenerationID uint64 + Identity AgentIdentity + Instructions string + InstructionsDigest string + Legacy bool + Limits Limits + MaxDelegationDepth int + Model string + Output OutputContract + PreloadedSkills []string + PrivateHooks []PrivateBinding + PrivateMCP []PrivateBinding + Schema string + Skills []string + ToolSearch bool + func (p ExecutionPlan) Clone() ExecutionPlan + func (p ExecutionPlan) Digest() (string, error) + type ExploreResult struct + Evidence []Evidence + Summary string + Unknowns []string + type Lifecycle struct + BeforeStart func(context.Context, LifecycleStart) string + BeforeStop func(context.Context, LifecycleStop) LifecycleStopDecision + type LifecycleStart struct + ChildSessionID string + Identity AgentIdentity + Ownership Ownership + Role Role + Task string + type LifecycleStop struct + ChildSessionID string + Identity AgentIdentity + LastAssistantMessage string + Ownership Ownership + Role Role + StopHookActive bool + type LifecycleStopDecision struct + Continue bool + Reason string + type Limits struct + FinalizationTurns int + MaxActivityTools int + MaxDuration time.Duration + MaxFieldBytes int + MaxOutputTokens int + MaxResultBytes int + MaxResultItems int + MaxTaskBytes int + MaxTokens int + MaxToolCalls int + MaxTurns int + RepeatedToolCallLimit int + func DefaultLimits() Limits + func NormalizeLimits(limits Limits) Limits + func ProductionLimits() Limits + type Manager struct + func New(config Config) (*Manager, error) + func (m *Manager) Cancel(ctx context.Context, childSessionID string) error + func (m *Manager) CancelRoot(rootInteractionID string) int + func (m *Manager) Close(ctx context.Context) error + func (m *Manager) Inspect(ctx context.Context, childSessionID string) (Detail, error) + func (m *Manager) List(ctx context.Context) ([]Summary, error) + func (m *Manager) MaxAutoFollowUps() int + func (m *Manager) SpawnToolFor(owner Ownership, observer Observer) agent.Tool + func (m *Manager) SpawnToolForDispatcher(owner Ownership, observer Observer, dispatcher Dispatcher) agent.Tool + func (m *Manager) Start(ctx context.Context, request Request, observer Observer) (*Execution, error) + func (m *Manager) StartWithDispatcher(ctx context.Context, request Request, observer Observer, dispatcher Dispatcher) (*Execution, error) + func (m *Manager) Tool(observer Observer) agent.Tool + func (m *Manager) ToolFor(owner Ownership, observer Observer) agent.Tool + func (m *Manager) ToolForDispatcher(owner Ownership, observer Observer, dispatcher Dispatcher) agent.Tool + func (m *Manager) ToolForTargets(owner Ownership, observer Observer, dispatcher Dispatcher, targets []string) agent.Tool + func (m *Manager) Wait(ctx context.Context, childSessionID string) (Result, error) + type Notification struct + AgentID string + Code string + ID string + Identity AgentIdentity + Outcome Outcome + Ownership Ownership + Result ai.JSON + Role Role + TaskPreview string + TerminalAt time.Time + Usage ai.Usage + type NotificationInbox struct + func NewNotificationInbox(parent *harness.Session, parentSessionID string, maxResultBytes int) (*NotificationInbox, error) + func (i *NotificationInbox) Acknowledge(ids ...string) error + func (i *NotificationInbox) Contains(id string) (bool, error) + func (i *NotificationInbox) Enqueue(value Notification) error + func (i *NotificationInbox) EnqueueCompletion(event Event) error + func (i *NotificationInbox) EnqueueRecovered(summary Summary, result any) error + func (i *NotificationInbox) Pending() ([]Notification, error) + type Observer func(context.Context, Event) error + type Outcome string + const OutcomeCanceled + const OutcomeFailed + const OutcomeInterrupted + const OutcomeSucceeded + type OutputContract struct + Digest string + Format OutputFormat + Name string + Schema json.RawMessage + func NewOutputContract(format OutputFormat, name string, schema json.RawMessage) (OutputContract, error) + func (c OutputContract) Clone() OutputContract + type OutputFormat string + const OutputFormatBuiltin + const OutputFormatJSONSchema + const OutputFormatText + type OutputValidator interface + Validate func(string) (any, error) + func NewOutputValidator(contract OutputContract, limits Limits) (_ OutputValidator, returnErr error) + type Ownership struct + ParentInteractionID string + ParentRunID string + ParentSessionID string + ParentToolCallID string + RootInteractionID string + type PlanResult struct + Assumptions []string + Risks []string + Steps []PlanStep + Summary string + Verification []string + type PlanStep struct + Files []string + Rationale string + Title string + type PrivateBinding struct + Fingerprint string + ID string + type Request struct + AgentID string + Delivery Delivery + Ownership Ownership + Role Role + Task string + type Result struct + ChildRunID string + ChildSessionID string + Code string + Duration time.Duration + Identity AgentIdentity + Outcome Outcome + Role Role + Stop agent.StopReason + ToolCalls int + Turns int + Usage ai.Usage + Value any + type ReviewFinding struct + Evidence string + Line int + Path string + Recommendation string + Severity string + Title string + type ReviewResult struct + Findings []ReviewFinding + ResidualRisks []string + Summary string + type Role string + const RoleExplore + const RolePlan + const RoleReview + type Runner interface + Close func(context.Context) error + Run func(context.Context, string) (RunnerResult, error) + type RunnerResult struct + Run *agent.RunResult + Text string + ToolCalls int + Value any + type State string + const StateCanceled + const StateCreated + const StateFailed + const StateInterrupted + const StateRunning + const StateSucceeded + type Summary struct + ChildSessionID string + Code string + CreatedAt time.Time + Delivery Delivery + Duration time.Duration + Identity AgentIdentity + Model string + Ownership Ownership + Role Role + State State + TaskPreview string + ToolCalls int + Turns int + Usage ai.Usage + type ToolActivity struct + Call ai.ToolCallPart + Result ai.ToolResultPart + RunID string + Status ToolStatus + Turn int + Update []ai.Part + type ToolStatus string + const ToolStatusCompleted + const ToolStatusRunning + const ToolStatusUnknown v0.1.2 Sep 15, 2026 v0.1.1 Sep 15, 2026 v0.1.0 Aug 12, 2026