@agentskit/harness 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2607,6 +2607,12 @@ declare const LOOP_CONFIG_FILE = "loop.config.yaml";
2607
2607
  /** Optional, gitignored per-machine overlay merged over the versioned config (e.g. `linear.person`, `machine.minFreeRamGb`). */
2608
2608
  declare const LOOP_LOCAL_CONFIG_FILE = "loop.config.local.yaml";
2609
2609
  declare const LOOP_CONFIG_SCHEMA_VERSION = 1;
2610
+ declare const effortLevel: z.ZodEnum<{
2611
+ low: "low";
2612
+ medium: "medium";
2613
+ high: "high";
2614
+ xhigh: "xhigh";
2615
+ }>;
2610
2616
  declare const LoopConfigSchema: z.ZodObject<{
2611
2617
  schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
2612
2618
  project: z.ZodObject<{
@@ -2615,6 +2621,11 @@ declare const LoopConfigSchema: z.ZodObject<{
2615
2621
  baseBranch: z.ZodDefault<z.ZodString>;
2616
2622
  root: z.ZodDefault<z.ZodString>;
2617
2623
  stateDir: z.ZodDefault<z.ZodString>;
2624
+ setup: z.ZodPrefault<z.ZodObject<{
2625
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
2626
+ timeoutSec: z.ZodDefault<z.ZodNumber>;
2627
+ required: z.ZodDefault<z.ZodBoolean>;
2628
+ }, z.core.$strip>>;
2618
2629
  }, z.core.$strip>;
2619
2630
  orca: z.ZodPrefault<z.ZodObject<{
2620
2631
  bin: z.ZodDefault<z.ZodString>;
@@ -2741,6 +2752,33 @@ declare const LoopConfigSchema: z.ZodObject<{
2741
2752
  probe: z.ZodOptional<z.ZodArray<z.ZodString>>;
2742
2753
  headless: z.ZodOptional<z.ZodArray<z.ZodString>>;
2743
2754
  reviewProvider: z.ZodOptional<z.ZodString>;
2755
+ effortFlag: z.ZodOptional<z.ZodString>;
2756
+ }, z.core.$strip>>;
2757
+ effort: z.ZodPrefault<z.ZodObject<{
2758
+ orchestrator: z.ZodDefault<z.ZodEnum<{
2759
+ low: "low";
2760
+ medium: "medium";
2761
+ high: "high";
2762
+ xhigh: "xhigh";
2763
+ }>>;
2764
+ reviewer: z.ZodDefault<z.ZodEnum<{
2765
+ low: "low";
2766
+ medium: "medium";
2767
+ high: "high";
2768
+ xhigh: "xhigh";
2769
+ }>>;
2770
+ builder: z.ZodDefault<z.ZodEnum<{
2771
+ low: "low";
2772
+ medium: "medium";
2773
+ high: "high";
2774
+ xhigh: "xhigh";
2775
+ }>>;
2776
+ watcher: z.ZodDefault<z.ZodEnum<{
2777
+ low: "low";
2778
+ medium: "medium";
2779
+ high: "high";
2780
+ xhigh: "xhigh";
2781
+ }>>;
2744
2782
  }, z.core.$strip>>;
2745
2783
  }, z.core.$strip>;
2746
2784
  machine: z.ZodPrefault<z.ZodObject<{
@@ -2773,9 +2811,9 @@ declare const LoopConfigSchema: z.ZodObject<{
2773
2811
  concurrency: z.ZodDefault<z.ZodNumber>;
2774
2812
  minSeverity: z.ZodDefault<z.ZodEnum<{
2775
2813
  blocker: "blocker";
2814
+ high: "high";
2776
2815
  nit: "nit";
2777
2816
  med: "med";
2778
- high: "high";
2779
2817
  }>>;
2780
2818
  deadlineMs: z.ZodDefault<z.ZodNumber>;
2781
2819
  maxCalls: z.ZodDefault<z.ZodNumber>;
@@ -2816,6 +2854,11 @@ declare const LoopConfigSchema: z.ZodObject<{
2816
2854
  }, z.core.$strip>>;
2817
2855
  maxFixRounds: z.ZodDefault<z.ZodNumber>;
2818
2856
  workerIdleTimeoutMin: z.ZodDefault<z.ZodNumber>;
2857
+ handoff: z.ZodPrefault<z.ZodObject<{
2858
+ enabled: z.ZodDefault<z.ZodBoolean>;
2859
+ maxHandoffs: z.ZodDefault<z.ZodNumber>;
2860
+ onlyWhenProviderUnavailable: z.ZodDefault<z.ZodBoolean>;
2861
+ }, z.core.$strip>>;
2819
2862
  selfEditPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
2820
2863
  ignoreChecks: z.ZodDefault<z.ZodArray<z.ZodString>>;
2821
2864
  requiredChecks: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -2878,6 +2921,19 @@ declare const LoopConfigSchema: z.ZodObject<{
2878
2921
  enabled: z.ZodDefault<z.ZodBoolean>;
2879
2922
  allowTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
2880
2923
  }, z.core.$strip>>;
2924
+ github: z.ZodPrefault<z.ZodObject<{
2925
+ intakeLabel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2926
+ reviewOnly: z.ZodDefault<z.ZodLiteral<true>>;
2927
+ }, z.core.$strip>>;
2928
+ resilience: z.ZodPrefault<z.ZodObject<{
2929
+ maxConsecutiveFailures: z.ZodDefault<z.ZodNumber>;
2930
+ pausedLabel: z.ZodDefault<z.ZodString>;
2931
+ stagePauseAfterRuns: z.ZodDefault<z.ZodNumber>;
2932
+ }, z.core.$strip>>;
2933
+ brief: z.ZodPrefault<z.ZodObject<{
2934
+ skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
2935
+ maxSkillChars: z.ZodDefault<z.ZodNumber>;
2936
+ }, z.core.$strip>>;
2881
2937
  schedule: z.ZodPrefault<z.ZodObject<{
2882
2938
  tick: z.ZodDefault<z.ZodString>;
2883
2939
  deliver: z.ZodDefault<z.ZodString>;
@@ -2924,9 +2980,10 @@ declare const providerIdentity: (config: LoopConfig, provider: string) => {
2924
2980
  readonly orcaUsageKey: string;
2925
2981
  readonly settings: LoopProviderConfig;
2926
2982
  };
2927
- declare const renderTuiCommand: (settings: LoopProviderConfig, model: string) => string;
2983
+ type EffortLevel = z.infer<typeof effortLevel>;
2984
+ declare const renderTuiCommand: (settings: LoopProviderConfig, model: string, effort?: EffortLevel) => string;
2928
2985
  /** Substitute `{model}` / `{prompt}` inside each headless argv element; the prompt stays one argv element, never shell-joined. */
2929
- declare const renderHeadlessArgv: (settings: LoopProviderConfig, model: string, prompt: string) => readonly string[] | null;
2986
+ declare const renderHeadlessArgv: (settings: LoopProviderConfig, model: string, prompt: string, effort?: EffortLevel) => readonly string[] | null;
2930
2987
 
2931
2988
  declare const AGENT_REGISTRY_SCHEMA_VERSION: 1;
2932
2989
  declare const AgentRegistryEntrySchema: z.ZodObject<{
@@ -3015,6 +3072,8 @@ interface RankedModel extends ModelReference {
3015
3072
  readonly remainingPercent: number | null;
3016
3073
  readonly reason: string;
3017
3074
  readonly preferenceIndex: number;
3075
+ /** Reasoning effort requested for this role (`models.effort.<role>`); only takes effect on providers with `effortFlag` set. */
3076
+ readonly effort: EffortLevel;
3018
3077
  }
3019
3078
  interface RoutingDecision {
3020
3079
  readonly role: ModelRole;
@@ -3209,7 +3268,14 @@ declare const githubPullRequestsForBranch: (runner: CommandRunner, input: {
3209
3268
  declare const githubOpenPullRequests: (runner: CommandRunner, input: {
3210
3269
  readonly repo: string;
3211
3270
  readonly limit?: number;
3271
+ readonly label?: string;
3212
3272
  }, options?: GitHubCliOptions) => Promise<readonly PullRequestSnapshot[]>;
3273
+ /** Remove a label from a PR (best-effort — `gh` succeeds even if the label was already gone). */
3274
+ declare const githubLabelRemove: (runner: CommandRunner, input: {
3275
+ readonly repo: string;
3276
+ readonly number: number;
3277
+ readonly label: string;
3278
+ }, options?: GitHubCliOptions) => Promise<void>;
3213
3279
  /** Squash/merge via REST with optimistic concurrency on the reviewed head SHA; GitHub refuses when the head moved. */
3214
3280
  declare const githubMergeArgv: (input: {
3215
3281
  readonly repo: string;
@@ -3403,8 +3469,39 @@ interface GenerateContractInput {
3403
3469
  readonly onMemoryPlan?: (plan: MemoryContextPlan) => void;
3404
3470
  }
3405
3471
  declare const classifyProviderFailure: (detail: string, timedOut?: boolean) => ProviderFailure["kind"];
3472
+ /**
3473
+ * Best-effort extraction of a reset instant from a CLI's own usage-limit message, e.g.
3474
+ * "resets 10:40pm (America/Sao_Paulo)" or "resets in 3h". Returns null when nothing parses;
3475
+ * callers fall back to the configured exponential cooldown.
3476
+ */
3477
+ declare const extractResetsAt: (detail: string, now?: Date) => string | null;
3406
3478
  declare const generateContract: (input: GenerateContractInput) => Promise<StoredContract>;
3407
3479
 
3480
+ interface PinnedSkill {
3481
+ /** As configured in `brief.skills` — a path relative to the project root. */
3482
+ readonly path: string;
3483
+ /** sha256 of the content actually embedded (post-truncation), so the digest matches what the worker saw. */
3484
+ readonly digest: string;
3485
+ readonly content: string;
3486
+ readonly truncated: boolean;
3487
+ }
3488
+ interface PinnedSkillRef {
3489
+ readonly path: string;
3490
+ readonly digest: string;
3491
+ }
3492
+ declare const skillDigest: (content: string) => string;
3493
+ /**
3494
+ * Read every configured skill file relative to `root`, hash and truncate each (with a visible note) to `maxChars`
3495
+ * so one large file cannot blow the whole brief's budget. A file listed in `brief.skills` is a promise to the
3496
+ * worker that specific guidance is present — missing or unreadable files fail the dispatch outright (fail-closed)
3497
+ * rather than silently sending a worker without conventions it was told it would have.
3498
+ */
3499
+ declare const loadPinnedSkills: (root: string, paths: readonly string[], maxChars: number) => readonly PinnedSkill[];
3500
+ /** Rendered once per dispatch and embedded in the worker brief; the digest lets a human or `loop retro` prove which exact revision a given run saw. */
3501
+ declare const renderPinnedSkills: (skills: readonly PinnedSkill[]) => string;
3502
+ /** The `{path, digest}` list persisted in `dispatch.json` — the full content lives only in the brief file, not duplicated per issue. */
3503
+ declare const skillRefs: (skills: readonly PinnedSkill[]) => readonly PinnedSkillRef[];
3504
+
3408
3505
  interface WorkerBriefInput {
3409
3506
  readonly issue: LinearIssueDetail;
3410
3507
  readonly contract: StoredContract;
@@ -3417,7 +3514,27 @@ interface WorkerBriefInput {
3417
3514
  readonly memoryBlock?: string;
3418
3515
  /** Doc Bridge playbook/for-agents refs (titles/paths only). */
3419
3516
  readonly guidanceRefs?: readonly ContextReference[];
3517
+ /** Full content of `brief.skills` files, read and digested once at dispatch time (`loadPinnedSkills`). */
3518
+ readonly skills?: readonly PinnedSkill[];
3519
+ }
3520
+ interface HandoffBriefInput {
3521
+ readonly issue: string;
3522
+ readonly issueUrl: string;
3523
+ readonly config: LoopConfig;
3524
+ readonly branch: string;
3525
+ readonly worktree: string;
3526
+ readonly previousProvider: string;
3527
+ readonly previousModel: string;
3528
+ readonly provider: string;
3529
+ readonly model: string;
3530
+ readonly contractDigest: string;
3531
+ readonly reason: string;
3420
3532
  }
3533
+ /**
3534
+ * Continuation brief for a handoff: same worktree/branch, new provider.
3535
+ * Instructs the worker to resume from git state — do not recreate the branch.
3536
+ */
3537
+ declare const renderHandoffBrief: (input: HandoffBriefInput) => string;
3421
3538
  /** The prompt a worker receives in its Orca terminal. Issue text is data; the contract and the rules are the instructions. */
3422
3539
  declare const renderWorkerBrief: (input: WorkerBriefInput) => string;
3423
3540
 
@@ -3465,6 +3582,15 @@ interface DispatchRecordFile {
3465
3582
  readonly leaseId: string;
3466
3583
  readonly dispatchedAt: string;
3467
3584
  readonly url: string;
3585
+ readonly briefDigest: string;
3586
+ readonly skills: readonly PinnedSkillRef[];
3587
+ readonly setup: {
3588
+ readonly command: readonly string[];
3589
+ readonly exitCode: number | null;
3590
+ readonly durationMs: number;
3591
+ readonly timedOut: boolean;
3592
+ } | null;
3593
+ readonly effort: EffortLevel;
3468
3594
  }
3469
3595
  interface TickInput {
3470
3596
  readonly configPath?: string;
@@ -3506,7 +3632,9 @@ declare const branchFor: (issue: Pick<LoopIssue, "identifier" | "branchName">, p
3506
3632
  /** Issues the loop must not touch: active leases, worktrees already linked to the issue, or a worktree sitting on the issue's branch. */
3507
3633
  declare const busyIssues: (queue: readonly LoopIssue[], leases: readonly DispatchLease[], worktrees: readonly OrcaWorktree[], person: string) => ReadonlySet<string>;
3508
3634
  declare const dispatchRecordPath: (stateDir: string, identifier: string) => string;
3635
+ declare const briefPath: (stateDir: string, identifier: string) => string;
3509
3636
  declare const readDispatchRecord: (stateDir: string, identifier: string) => DispatchRecordFile | null;
3637
+ declare const writeDispatchRecord: (stateDir: string, record: DispatchRecordFile) => string;
3510
3638
  declare const appendLoopEvent: (stateDir: string, event: Record<string, unknown>) => void;
3511
3639
  interface LoopState {
3512
3640
  readonly providers: readonly ProviderAvailability[];
@@ -3558,6 +3686,8 @@ interface CodeReviewOutcome {
3558
3686
  readonly provider: string;
3559
3687
  readonly model: string | null;
3560
3688
  readonly resultParsed: boolean;
3689
+ /** Last 800 chars of combined stderr+stdout, for callers that need to classify *why* a review was incomplete (auth/quota/timeout) beyond the truncated `summary`. */
3690
+ readonly rawTail: string;
3561
3691
  }
3562
3692
  interface CodeReviewInput {
3563
3693
  readonly cli: string;
@@ -3595,7 +3725,7 @@ declare const runCodeReview: (runner: CommandRunner, input: CodeReviewInput) =>
3595
3725
  /** Compact, worker-facing rendering of blocking findings for a fix round. */
3596
3726
  declare const renderFindingsForWorker: (findings: readonly ReviewFinding[], max?: number) => string;
3597
3727
 
3598
- type DeliverOutcome = 'waiting' | 'reviewed' | 'fix-round' | 'nudged' | 'merged' | 'held' | 'blocked' | 'stuck' | 'abandoned' | 'failed' | 'dry-run';
3728
+ type DeliverOutcome = 'waiting' | 'reviewed' | 'fix-round' | 'nudged' | 'handed-off' | 'merged' | 'held' | 'blocked' | 'stuck' | 'abandoned' | 'failed' | 'dry-run';
3599
3729
  interface DeliverResult {
3600
3730
  readonly issue: string;
3601
3731
  readonly outcome: DeliverOutcome;
@@ -3613,6 +3743,15 @@ interface DeliverReport {
3613
3743
  readonly results: readonly DeliverResult[];
3614
3744
  readonly notes: readonly string[];
3615
3745
  }
3746
+ interface DeliveryHandoff {
3747
+ readonly at: string;
3748
+ readonly fromProvider: string;
3749
+ readonly fromModel: string;
3750
+ readonly toProvider: string;
3751
+ readonly toModel: string;
3752
+ readonly reason: string;
3753
+ readonly terminal: string | null;
3754
+ }
3616
3755
  interface DeliveryState {
3617
3756
  readonly issue: string;
3618
3757
  readonly prNumber: number | null;
@@ -3626,10 +3765,11 @@ interface DeliveryState {
3626
3765
  }>>;
3627
3766
  readonly fixRounds: number;
3628
3767
  readonly nudges: readonly {
3629
- readonly kind: 'idle' | 'conflict' | 'ci' | 'review';
3768
+ readonly kind: 'idle' | 'conflict' | 'ci' | 'review' | 'handoff';
3630
3769
  readonly at: string;
3631
3770
  readonly head: string | null;
3632
3771
  }[];
3772
+ readonly handoffs: readonly DeliveryHandoff[];
3633
3773
  readonly heldFor: string | null;
3634
3774
  readonly finishedAt: string | null;
3635
3775
  readonly finalOutcome: DeliverOutcome | null;
@@ -4071,4 +4211,86 @@ declare const runRetroStage: (input: {
4071
4211
  readonly dryRun?: boolean;
4072
4212
  }) => Promise<RetroStageReport>;
4073
4213
 
4074
- export { AGENT_REGISTRY_SCHEMA_VERSION, ARTIFACT_SCHEMA_VERSION, ARTIFACT_TYPES, ASSURANCE_LEVELS, type AdapterMetadata, type AdapterTelemetry, type AdversarialReviewResult, type AgentAdapter, type AgentEvalCase, type AgentEvalReport, type AgentEvalSuite, type AgentMemoryAdapter, type AgentMemoryHit, type AgentMemoryKvStore, type AgentMemoryRecord, type AgentRegistry, type AgentRegistryEntry, AgentRegistryEntrySchema, AgentRegistrySchema, type AgentSessionOptions, type AgentUsage, type ApprovedAssumption, type ArgvRagContextProviderOptions, type ArtifactBinding, type ArtifactEnvelope, type ArtifactEnvelopeInput, type ArtifactType, type ArtificialAnalysisModel, type AssuranceLevel, type AutomationStatus, type AutonomyMode, BENCHMARK_SCHEMA_VERSION, BLOCK_STATUSES, type BenchmarkBinding, type BenchmarkComparison, type BenchmarkImprovementDirection, type BenchmarkManifest, type BenchmarkObservation, type BenchmarkObservationEvidence, type BenchmarkObservationInput, type BenchmarkObservationStatus, type BenchmarkReport, type BenchmarkRun, type BenchmarkSummary, type BenchmarkTask, type BlockAssessment, type BlockManifest, type BlockStatus, CAPABILITY_KINDS, CAPABILITY_MANIFEST_SCHEMA_VERSION, CHECK_CATEGORIES, COMPATIBILITY_COMPONENTS, COMPATIBILITY_SCHEMA_VERSION, CONTEXT_PROVIDER_SLOT, CONTRACT_CLOSE, CONTRACT_OPEN, CONTRACT_SCHEMA_VERSION, type CacheUsage, type CapabilityDescriptor, type CapabilityKind, type CapabilityManifest, type CapabilityManifestInput, type CatalogModel, type ChangedFile, type CheckCategory, type CheckOutcome, type CheckResult, type ChecksAssessment, type ClaimResult, type CodeReviewInput, type CodeReviewOutcome, type CodingAgentAdapter, type CodingAgentHandlerResult, type CodingAgentRequest, type CodingAgentResult, type CommandResult, type CommandRunOptions, type CommandRunner, type CompatibilityComponent, type CompatibilityComponentId, type CompatibilityManifest, type CompatibilityObservation, type CompatibilityReport, type CompatibilityStatus, type ContextProvider, type ContextQuery, type ContextReference, type ContextSnapshot, type ContractAssessment, type ContractOutcome, ContractOutcomeSchema, type ContractScope, type CooldownEntry, type CooldownState, type CoordinationIdentity, type CriterionStatus, type CycleIterationMetrics, type CycleMatrixRow, type CycleStepResult, type CycleStepStatus, type DebriefInput, type DebriefIssueRow, type DebriefReport, type DecisionPacket, type DeliverInput, type DeliverOutcome, type DeliverReport, type DeliverResult, type DeliveryState, type DetectProvidersInput, type DiscoveryAmbiguity, type DiscoveryCurrentInput, type DiscoveryCurrentResult, type DiscoveryDecisionLogEntry, type DiscoveryInput, type DiscoveryOption, type DiscoveryResult, type DispatchLease, type DispatchLedger, type DispatchRecord, type DispatchRecordFile, type Disposer, type DocBridgeIndexInspection, type DockerMount, type DockerRuntimeEvidence, type DockerToolDefinition, type DoctorCheck, type DoctorCheckStatus, EVAL_COMPONENTS, EVAL_LAYERS, EVAL_MANIFEST_SCHEMA_VERSION, EVENT_LOG_GENESIS, EVIDENCE_BUNDLE_SCHEMA_VERSION, type EvalBatteryReport, type EvalCaseDefinition, type EvalCaseReport, type EvalComponent, type EvalExpectation, type EvalLayer, type EvalManifest, type EvalObservation, type EvalObservationStatus, type EventLogLock, type EventLogLockRecovery, type EventLogLockStatus, type EventLogVerification, type EventStore, type EvidenceArtifact, type EvidenceBundle, type EvidenceBundleFile, type EvidenceBundleSignature, type EvidenceBundleVerification, type EvidenceReference, type ExecutePhaseProfileOptions, type FailureClass, type FailureClassification, type FetchQueueInput, FileArtifactStore, FileEventStore, type FilePreflightPlan, type GateAssessment, type GateBinding, type GateCriterion, type GenerateContractInput, type GitHubCliOptions, type GuidedInstallIO, type GuidedInstallInput, type GuidedInstallReport, HARNESS_ERROR_CATALOG, HARNESS_ERROR_CODES, HARNESS_EVENT_ENVELOPE_SCHEMA_VERSION, HARNESS_EVENT_SCHEMA_VERSION, HARNESS_EVENT_TYPES, HARNESS_PLUGIN_API_VERSION, HARNESS_REPO_URL, HarnessError, type HarnessErrorClassification, type HarnessErrorDisposition, type HarnessEvent, type HarnessEventContext, type HarnessEventEnvelope, type HarnessEventEnvelopeInput, type HarnessEventInput, type HarnessEventListener, type HarnessEventPayloads, type HarnessEventProvenance, type HarnessEventType, type HarnessPlugin, type HarnessPluginContext, IMPROVEMENT_CYCLE_STEPS, type ImprovementCycleAssessment, type ImprovementCycleInput, type ImprovementCycleIteration, type ImprovementCycleStep, type InstallAction, type InstallInput, type InstallReport, LEARNING_STATUSES, LEGAL_TRANSITIONS, LOOP_CONFIG_FILE, LOOP_CONFIG_SCHEMA_VERSION, LOOP_LOCAL_CONFIG_FILE, LOOP_STAGES, type LearningRecord, type LearningStatus, type LearningsLedger, type LinearIssueDetail, type LinearListInput, type LinearQueueFilter, type LinearWriteOptions, type LlmCache, type LlmCacheKeyInput, type LlmCacheStats, type LoadedConfig, type LoadedLoopConfig, type LocalConfigAnswers, type LocalConfigPrompter, type LoopConfig, type LoopConfigInput, LoopConfigSchema, type LoopDoctorInput, type LoopDoctorReport, type LoopEvent, type LoopIssue, type LoopProviderConfig, type LoopStage, type LoopState, type LoopStatusReport, MEMORY_SCOPES, MODEL_ROLES, type MachineMetrics, type MachineSample, type MachineThresholds, type McpPolicy, type McpToolBridge, type McpToolBridgeOptions, type McpToolCallInput, type McpToolCallResult, type MemoryContextPlan, type MemoryPromptSelection, type MemoryScope, type MemoryUsage, type MetricStatus, type ModelBinding, type ModelPolicy, type ModelQuality, type ModelReference, type ModelRole, type NormalizedPhaseProfile, type OptimizationComparison, type OptimizationObservation, type OrcaAgentHookState, type OrcaAutomation, type OrcaAutomationSpec, type OrcaCliOptions, type OrcaCreatedWorktree, type OrcaDispatchInput, type OrcaDispatchPlan, type OrcaLeaseState, type OrcaLifecycleInput, type OrcaLifecycleProjection, type OrcaStatus as OrcaRuntimeStatus, type OrcaSendReceipt, type OrcaTerminal, type OrcaWorktree, PHASE_DECISIONS, PHASE_EFFECTS, PHASE_EFFECT_ACTIONS, PHASE_MODES, PR_FIELDS, type ParallelismUsage, type PhaseAmbiguity, type PhaseContext, type PhaseDecision, type PhaseDecisionPacket, type PhaseDefinition, type PhaseEffect, type PhaseEffectAction, type PhaseEffectPolicy, type PhaseExecution, type PhaseExecutionReport, type PhaseGateEvaluator, type PhaseGateResult, type PhaseHandler, type PhaseHandlerResult, type PhaseMachineMetrics, type PhaseMode, type PhasePreflight, type PhasePreflightResult, type PhaseProfile, type PhaseResumeState, type PhaseRetryPolicy, type PhaseRoutePlan, type PhaseTelemetry, type PhaseTokenMetrics, type PilotAssessment, type PilotEntry, type PilotManifest, type PluginContribution, type PluginRegistry, type PluginSlot, type PolicyDecision, type PolicyGate, type PolicyRequest, type PolicyRule, type ProcessToolDefinition, type ProductionEvidence, type ProviderAuthStatus, type ProviderAvailability, type ProviderCatalog, type ProviderFailure, type ProviderSpec, type ProviderUsage, type PullRequestApproval, type PullRequestCheck, type PullRequestDraft, type PullRequestSnapshot, QUALITY_DIMENSIONS, type QaTransitionAssessment, type QualityDimension, type QualityDimensionScore, type QualityMatrix, REVIEW_SEVERITIES, RUN_STATES, type RagContextProviderOptions, type RagQueryResult, type RankedModel, type RecoveryObservation, type RecoveryPolicy, type RecoveryResult, type RepositoryProfile, type ResolvedAgent, type RetroInput, type RetroIssueRow, type RetroReport, type RetroStageReport, type RetroSuggestion, type RetroTarget, type RetroWindow, type ReviewFinding, type ReviewLens, type ReviewSeverity, type ReviewVerdict, type RichIO, type RoutingDecision, type RoutingSkip, type RunOutcome, type RunReconciliation, type RunState, type RuntimeConfig, type RuntimeExperimentCandidate, type RuntimeExperimentResult, STATES, SURFACE_NAMES, type SessionRecorder, type SlotAssessment, type SlotInput, type SourceSnapshot, type StateTransition, type StatusBlock, type StatusSnapshot, type StoredContract, type StructuredEvidence, type SurfaceName, type SurfaceRequirement, type TaskContract, TaskContractSchema, type TeamMember, type TickCandidateResult, type TickInput, type TickOutcome, type TickReport, type TokenUsage, type ToolDefinition, type ToolExecutionRequest, type ToolExecutionResult, type ToolRuntime, type TrackingAdapter, type TrackingConfig, type TrackingTransition, type TrustedEvidenceKey, type UsageMetric, type UsageWindow, type VerificationCheck, type VerificationConfig, type VerificationRun, WIP_STATES, type WatchEvent, type WatchEventKind, type WatchInput, type WatchReport, type WatchTargetSnapshot, type WatchdogBlocker, type WatchdogBudget, type WatchdogResult, type WipAssessment, type WipAssessmentInput, type WipEntry, type WipState, type WorkerBriefInput, type WorkflowNode, type WorkflowResult, activeCooldowns, adaptiveConcurrency, appendLoopEvent, approveRun, approvedDecision, artifactDigest, artifactFilePath, artifactIsFresh, artifactMarkdownPath, assertHuman, assessAcceptance, assessAgentEval, assessBlock, assessChecks, assessCompatibility, assessContract, assessDiscovery, assessImprovementCycle, assessIntegration, assessPilot, assessPreflight, assessProduction, assessQaTransition, assessSlots, assessWip, assessWorktreeCleanup, atLeast, authStatusFor, authorizeRun, automationName, automationPrompt, automationSpecs, availableMemoryBytes, benchmarkRuns, branchFor, buildDebriefReport, buildListIssuesArgv, buildRetroReport, buildReviewArgv, buildSuggestions, busyIssues, cancelRun, classifyFailure, classifyHarnessError, classifyProviderFailure, classifyWatchEvent, classifyWatchPhase, cleanTaskArtifacts, clearProviderCooldown, compareOptimization, compareVersions, composePullRequest, contractIsFresh, contractPath, cooldownPath, cooldownUntil, countRunningWorkers, createArgvRagContextProvider, createArtifactEnvelope, createCapabilityManifest, createCodingAgentAdapter, createCompatibilityManifest, createConfiguredToolRuntime, createDispatchLedger, createDocBridgeContextProvider, createDockerToolRuntime, createEvalManifest, createFileMemoryAdapter, createFileMemoryKvStore, createHarnessEventEnvelope, createInMemoryMemoryAdapter, createKvMemoryAdapter, createLinearTrackingAdapter, createLlmCache, createLlmCacheKey, createMachineMonitor, createMcpToolBridge, createModelPolicy, createOrcaDispatchPlan, createOrcaLifecycleProjection, createPhaseArtifact, createPhaseProfile, createPluginRegistry, createPluginSlot, createPolicyGate, createProcessRunner, createProcessToolRuntime, createPullRequestApproval, createQualityMatrix, createRagContextProvider, createRichIO, createSessionRecorder, createStatusSnapshot, createToolRuntime, createTrackingAdapter, createTrackingTransition, deliveryStatePath, detectProviders, dispatchRecordPath, evaluateWatchdog, executePhaseProfile, exportEvidenceBundle, fetchArtificialAnalysisModels, fetchLinearIssue, fetchLinearQueue, fetchTeamMembers, filterAndOrderQueue, findExecutable, formatWatchEvent, gatherLoopState, generateContract, githubComment, githubCommentArgv, githubCommentExists, githubMerge, githubMergeArgv, githubOpenPullRequests, githubPullRequest, githubPullRequestsForBranch, hasLocalConfig, hashContextSnapshot, hashContextSnapshots, hashMcpArgs, inspectDocBridgeIndex, inspectEventLogLock, installLoopAutomations, installPreflight, isDiscoveryCurrent, isWsl, launchWorkerTerminal, learningToMemoryRecord, learningsPath, linearAttach, linearAttachArgv, linearCommentAdd, linearCommentAddArgv, linearLabelAdd, linearLabelArgv, linearLabelRemove, linearStatusSet, linearStatusSetArgv, listCliModels, listDispatched, loadAgentRegistry, loadAliases, loadBenchmarkManifest, loadBuiltinCatalog, loadConfig, loadLatestRun, loadLoopConfig, localConfigPath, loopStatus, markProviderExhausted, memoryDigestOf, mergeLoopConfig, modelFor, normalizeReason, openLoopMemory, orcaAccountList, orcaAgentHooks, orcaAutomationCreateArgv, orcaAutomationEditArgv, orcaAutomationRemove, orcaAutomationRun, orcaAutomationRuns, orcaAutomationsList, orcaJson, orcaStatus, orcaTerminalCreate, orcaTerminalList, orcaTerminalScreen, orcaTerminalSend, orcaTerminalWait, orcaVersion, orcaWorktreeCreate, orcaWorktreeRemove, orcaWorktreeSet, orcaWorktreeSetArgv, orcaWorktrees, parseAgentRegistryText, parseArtificialAnalysisPayload, parseAutomationRuns, parseContractOutput, parseGrokModelsOutput, parseJsonEnvelope, parseLinearIssueDetail, parseLinearIssues, parseLoopConfigText, parseMemInfo, parseModelRef, parseOrcaAgentHooks, parseOrcaAutomations, parseOrcaSendReceipt, parseOrcaStatus, parseOrcaTerminals, parseOrcaVersion, parseOrcaWorktreeCreate, parseOrcaWorktrees, parseProviderUsage, parsePullRequest, parseRagQueryOutput, parseRetro, parseReviewResult, parseSince, parseTeamMembers, parseUsageWindows, parseVmStat, planFilePreflight, planMemoryContext, planPhaseProfile, planRun, precheckCommand, precheckDeliver, precheckTick, preferMemoryOverDocBridge, promoteLearnings, promoteLearningsToMemory, promptLocalConfig, providerIdentity, providerSpecs, rankModels, readAaCache, readArtifactFile, readContextSnapshots, readCooldowns, readDeliveryState, readDispatchRecord, readEvidenceTrustStore, readLearningsLedger, readLoopEvents, readStoredContract, reconcileRun, recordBenchmarkObservation, recoverEventLogLock, recoveryDelayMs, remainingUsagePercent, renderArtifactMarkdown, renderContractPrompt, renderDebriefMarkdown, renderFindingsForWorker, renderHeadlessArgv, renderLocalConfig, renderRetroMarkdown, renderTuiCommand, renderWorkerBrief, resolveAgentForRole, resolveAlias, resolveCatalogCandidates, resolveDocContext, resumeStateFromArtifacts, retroLearnings, retryRun, routeAllRoles, runAdversarialReview, runAgentEval, runCodeReview, runDeliver, runEvalBattery, runGuidedInstall, runLoopDoctor, runRetroStage, runTick, runWithRecovery, runWorkflow, sampleMachine, selectMemoryForPrompt, selectModel, selectRuntime, severityRank, shellQuote, snapshotWatchTargets, startRun, summarizeMachine, tiersFor, touchesProtectedPaths, transition, undeclaredOrcaProviders, uninstallLoopAutomations, unknownTelemetry, untrusted, upsertProposedLearnings, usageRankTuple, validateAdapterMetadata, validateArtifactEnvelope, validateBenchmarkManifest, validateBlockManifest, validateCacheableOperation, validateCapabilityManifest, validateCompatibilityManifest, validateConfig, validateContextSnapshot, validateContextSnapshots, validateEvalManifest, validateHarnessErrorClassification, validateHarnessEventEnvelope, validateLoopConfig, validateMemoryRecord, validateOptimizationObservation, validatePhaseTelemetry, validateSafeCommand, validateStatusSnapshot, verifyEvidenceBundle, verifyPullRequestApproval, verifyRun, watchDeliveries, worktreeNameFor, writeAaCache, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };
4214
+ /** One recorded failure for an issue, kept for diagnostics (`loop retro`, `loop status`). */
4215
+ interface IssueFailureRecord {
4216
+ readonly kind: string;
4217
+ readonly at: string;
4218
+ readonly reason: string;
4219
+ }
4220
+ interface IssueFailureState {
4221
+ readonly issue: string;
4222
+ /** Consecutive failures since the last success (dispatch, clean/findings review, merge). Resets to 0 on any of those. */
4223
+ readonly consecutive: number;
4224
+ /** Most recent failures first, capped at 10 — enough for a human to see the pattern without the file growing unbounded. */
4225
+ readonly history: readonly IssueFailureRecord[];
4226
+ readonly pausedAt: string | null;
4227
+ readonly pausedReason: string | null;
4228
+ }
4229
+ declare const issueFailurePath: (stateDir: string, issue: string) => string;
4230
+ declare const readIssueFailures: (stateDir: string, issue: string) => IssueFailureState;
4231
+ /**
4232
+ * Record one failure for an issue and return the updated state. Callers decide, from `consecutive`, whether the
4233
+ * `maxConsecutiveFailures` threshold was just crossed and the issue should be paused (see `pauseIssue`).
4234
+ */
4235
+ declare const recordIssueFailure: (stateDir: string, issue: string, kind: string, reason: string, now?: Date) => IssueFailureState;
4236
+ /** Clear the consecutive-failure counter (and any pause) after progress: a successful dispatch, a clean/findings review, or a merge. */
4237
+ declare const clearIssueFailures: (stateDir: string, issue: string) => void;
4238
+ declare const pauseIssue: (stateDir: string, issue: string, reason: string, now?: Date) => IssueFailureState;
4239
+ /** Manual or label-driven resume: clears the pause and the counter so the issue gets a clean slate; history is kept. */
4240
+ declare const resumeIssue: (stateDir: string, issue: string) => IssueFailureState;
4241
+ declare const isIssuePaused: (stateDir: string, issue: string) => boolean;
4242
+ /** All paused issues under `<stateDir>/issues/*\/failures.json`, for `loop status`/`loop retro`. */
4243
+ declare const listPausedIssues: (stateDir: string) => readonly IssueFailureState[];
4244
+ type LoopStageName = 'tick' | 'deliver';
4245
+ interface StagePauseEntry {
4246
+ readonly consecutiveFailures: number;
4247
+ readonly lastFailureAt: string | null;
4248
+ readonly lastReason: string | null;
4249
+ readonly pausedAt: string | null;
4250
+ readonly pausedReason: string | null;
4251
+ }
4252
+ type StagePauseState = Partial<Record<LoopStageName, StagePauseEntry>>;
4253
+ declare const stagePausePath: (stateDir: string) => string;
4254
+ declare const readStagePause: (stateDir: string) => StagePauseState;
4255
+ declare const stageEntry: (stateDir: string, stage: LoopStageName) => StagePauseEntry;
4256
+ declare const isStagePaused: (stateDir: string, stage: LoopStageName) => boolean;
4257
+ /**
4258
+ * Record the outcome of one `loop stage` run. A thrown exception is a failure; anything that returns a report
4259
+ * (including an idle/no-op tick) is a success and clears both the counter and any existing pause. Crossing
4260
+ * `threshold` consecutive failures pauses the stage; the caller (`loop stage`) checks `isStagePaused` up front and
4261
+ * skips the actual run while paused, so a crash loop cannot spend budget or provider usage.
4262
+ */
4263
+ declare const recordStageRunResult: (stateDir: string, stage: LoopStageName, outcome: {
4264
+ readonly succeeded: true;
4265
+ } | {
4266
+ readonly succeeded: false;
4267
+ readonly reason: string;
4268
+ }, threshold: number, now?: Date) => StagePauseEntry;
4269
+ declare const resumeStage: (stateDir: string, stage: LoopStageName) => void;
4270
+
4271
+ /** A GitHub PR the loop never dispatched, picked up only because it carries `github.intakeLabel`. */
4272
+ interface IntakeRecord {
4273
+ readonly pr: number;
4274
+ readonly headRef: string;
4275
+ readonly source: 'github-label';
4276
+ readonly addedAt: string;
4277
+ }
4278
+ /** The synthetic "issue" identifier intake state is filed under (`<stateDir>/issues/pr-<n>/…`) — there is no Linear issue for these. */
4279
+ declare const intakeIssueId: (pr: number) => string;
4280
+ declare const intakePath: (stateDir: string, pr: number) => string;
4281
+ declare const readIntake: (stateDir: string, pr: number) => IntakeRecord | null;
4282
+ /** Every PR currently tracked as intake (label may since have been removed on GitHub — `runDeliver` notices that separately). */
4283
+ declare const listIntake: (stateDir: string) => readonly IntakeRecord[];
4284
+ /**
4285
+ * List every open PR carrying `github.intakeLabel` and start tracking the ones not seen before. Idempotent: a PR
4286
+ * already tracked (or already a normal loop dispatch — same repo, so `pr-<n>` cannot collide with a Linear
4287
+ * identifier) is left alone; `runDeliver` handles it from state on every later call, not from this discovery.
4288
+ */
4289
+ declare const discoverIntake: (runner: CommandRunner, input: {
4290
+ readonly repo: string;
4291
+ readonly label: string;
4292
+ readonly stateDir: string;
4293
+ readonly now: () => Date;
4294
+ }, options?: GitHubCliOptions) => Promise<readonly IntakeRecord[]>;
4295
+
4296
+ export { AGENT_REGISTRY_SCHEMA_VERSION, ARTIFACT_SCHEMA_VERSION, ARTIFACT_TYPES, ASSURANCE_LEVELS, type AdapterMetadata, type AdapterTelemetry, type AdversarialReviewResult, type AgentAdapter, type AgentEvalCase, type AgentEvalReport, type AgentEvalSuite, type AgentMemoryAdapter, type AgentMemoryHit, type AgentMemoryKvStore, type AgentMemoryRecord, type AgentRegistry, type AgentRegistryEntry, AgentRegistryEntrySchema, AgentRegistrySchema, type AgentSessionOptions, type AgentUsage, type ApprovedAssumption, type ArgvRagContextProviderOptions, type ArtifactBinding, type ArtifactEnvelope, type ArtifactEnvelopeInput, type ArtifactType, type ArtificialAnalysisModel, type AssuranceLevel, type AutomationStatus, type AutonomyMode, BENCHMARK_SCHEMA_VERSION, BLOCK_STATUSES, type BenchmarkBinding, type BenchmarkComparison, type BenchmarkImprovementDirection, type BenchmarkManifest, type BenchmarkObservation, type BenchmarkObservationEvidence, type BenchmarkObservationInput, type BenchmarkObservationStatus, type BenchmarkReport, type BenchmarkRun, type BenchmarkSummary, type BenchmarkTask, type BlockAssessment, type BlockManifest, type BlockStatus, CAPABILITY_KINDS, CAPABILITY_MANIFEST_SCHEMA_VERSION, CHECK_CATEGORIES, COMPATIBILITY_COMPONENTS, COMPATIBILITY_SCHEMA_VERSION, CONTEXT_PROVIDER_SLOT, CONTRACT_CLOSE, CONTRACT_OPEN, CONTRACT_SCHEMA_VERSION, type CacheUsage, type CapabilityDescriptor, type CapabilityKind, type CapabilityManifest, type CapabilityManifestInput, type CatalogModel, type ChangedFile, type CheckCategory, type CheckOutcome, type CheckResult, type ChecksAssessment, type ClaimResult, type CodeReviewInput, type CodeReviewOutcome, type CodingAgentAdapter, type CodingAgentHandlerResult, type CodingAgentRequest, type CodingAgentResult, type CommandResult, type CommandRunOptions, type CommandRunner, type CompatibilityComponent, type CompatibilityComponentId, type CompatibilityManifest, type CompatibilityObservation, type CompatibilityReport, type CompatibilityStatus, type ContextProvider, type ContextQuery, type ContextReference, type ContextSnapshot, type ContractAssessment, type ContractOutcome, ContractOutcomeSchema, type ContractScope, type CooldownEntry, type CooldownState, type CoordinationIdentity, type CriterionStatus, type CycleIterationMetrics, type CycleMatrixRow, type CycleStepResult, type CycleStepStatus, type DebriefInput, type DebriefIssueRow, type DebriefReport, type DecisionPacket, type DeliverInput, type DeliverOutcome, type DeliverReport, type DeliverResult, type DeliveryState, type DetectProvidersInput, type DiscoveryAmbiguity, type DiscoveryCurrentInput, type DiscoveryCurrentResult, type DiscoveryDecisionLogEntry, type DiscoveryInput, type DiscoveryOption, type DiscoveryResult, type DispatchLease, type DispatchLedger, type DispatchRecord, type DispatchRecordFile, type Disposer, type DocBridgeIndexInspection, type DockerMount, type DockerRuntimeEvidence, type DockerToolDefinition, type DoctorCheck, type DoctorCheckStatus, EVAL_COMPONENTS, EVAL_LAYERS, EVAL_MANIFEST_SCHEMA_VERSION, EVENT_LOG_GENESIS, EVIDENCE_BUNDLE_SCHEMA_VERSION, type EffortLevel, type EvalBatteryReport, type EvalCaseDefinition, type EvalCaseReport, type EvalComponent, type EvalExpectation, type EvalLayer, type EvalManifest, type EvalObservation, type EvalObservationStatus, type EventLogLock, type EventLogLockRecovery, type EventLogLockStatus, type EventLogVerification, type EventStore, type EvidenceArtifact, type EvidenceBundle, type EvidenceBundleFile, type EvidenceBundleSignature, type EvidenceBundleVerification, type EvidenceReference, type ExecutePhaseProfileOptions, type FailureClass, type FailureClassification, type FetchQueueInput, FileArtifactStore, FileEventStore, type FilePreflightPlan, type GateAssessment, type GateBinding, type GateCriterion, type GenerateContractInput, type GitHubCliOptions, type GuidedInstallIO, type GuidedInstallInput, type GuidedInstallReport, HARNESS_ERROR_CATALOG, HARNESS_ERROR_CODES, HARNESS_EVENT_ENVELOPE_SCHEMA_VERSION, HARNESS_EVENT_SCHEMA_VERSION, HARNESS_EVENT_TYPES, HARNESS_PLUGIN_API_VERSION, HARNESS_REPO_URL, type HandoffBriefInput, HarnessError, type HarnessErrorClassification, type HarnessErrorDisposition, type HarnessEvent, type HarnessEventContext, type HarnessEventEnvelope, type HarnessEventEnvelopeInput, type HarnessEventInput, type HarnessEventListener, type HarnessEventPayloads, type HarnessEventProvenance, type HarnessEventType, type HarnessPlugin, type HarnessPluginContext, IMPROVEMENT_CYCLE_STEPS, type ImprovementCycleAssessment, type ImprovementCycleInput, type ImprovementCycleIteration, type ImprovementCycleStep, type InstallAction, type InstallInput, type InstallReport, type IntakeRecord, type IssueFailureRecord, type IssueFailureState, LEARNING_STATUSES, LEGAL_TRANSITIONS, LOOP_CONFIG_FILE, LOOP_CONFIG_SCHEMA_VERSION, LOOP_LOCAL_CONFIG_FILE, LOOP_STAGES, type LearningRecord, type LearningStatus, type LearningsLedger, type LinearIssueDetail, type LinearListInput, type LinearQueueFilter, type LinearWriteOptions, type LlmCache, type LlmCacheKeyInput, type LlmCacheStats, type LoadedConfig, type LoadedLoopConfig, type LocalConfigAnswers, type LocalConfigPrompter, type LoopConfig, type LoopConfigInput, LoopConfigSchema, type LoopDoctorInput, type LoopDoctorReport, type LoopEvent, type LoopIssue, type LoopProviderConfig, type LoopStage, type LoopStageName, type LoopState, type LoopStatusReport, MEMORY_SCOPES, MODEL_ROLES, type MachineMetrics, type MachineSample, type MachineThresholds, type McpPolicy, type McpToolBridge, type McpToolBridgeOptions, type McpToolCallInput, type McpToolCallResult, type MemoryContextPlan, type MemoryPromptSelection, type MemoryScope, type MemoryUsage, type MetricStatus, type ModelBinding, type ModelPolicy, type ModelQuality, type ModelReference, type ModelRole, type NormalizedPhaseProfile, type OptimizationComparison, type OptimizationObservation, type OrcaAgentHookState, type OrcaAutomation, type OrcaAutomationSpec, type OrcaCliOptions, type OrcaCreatedWorktree, type OrcaDispatchInput, type OrcaDispatchPlan, type OrcaLeaseState, type OrcaLifecycleInput, type OrcaLifecycleProjection, type OrcaStatus as OrcaRuntimeStatus, type OrcaSendReceipt, type OrcaTerminal, type OrcaWorktree, PHASE_DECISIONS, PHASE_EFFECTS, PHASE_EFFECT_ACTIONS, PHASE_MODES, PR_FIELDS, type ParallelismUsage, type PhaseAmbiguity, type PhaseContext, type PhaseDecision, type PhaseDecisionPacket, type PhaseDefinition, type PhaseEffect, type PhaseEffectAction, type PhaseEffectPolicy, type PhaseExecution, type PhaseExecutionReport, type PhaseGateEvaluator, type PhaseGateResult, type PhaseHandler, type PhaseHandlerResult, type PhaseMachineMetrics, type PhaseMode, type PhasePreflight, type PhasePreflightResult, type PhaseProfile, type PhaseResumeState, type PhaseRetryPolicy, type PhaseRoutePlan, type PhaseTelemetry, type PhaseTokenMetrics, type PilotAssessment, type PilotEntry, type PilotManifest, type PinnedSkill, type PinnedSkillRef, type PluginContribution, type PluginRegistry, type PluginSlot, type PolicyDecision, type PolicyGate, type PolicyRequest, type PolicyRule, type ProcessToolDefinition, type ProductionEvidence, type ProviderAuthStatus, type ProviderAvailability, type ProviderCatalog, type ProviderFailure, type ProviderSpec, type ProviderUsage, type PullRequestApproval, type PullRequestCheck, type PullRequestDraft, type PullRequestSnapshot, QUALITY_DIMENSIONS, type QaTransitionAssessment, type QualityDimension, type QualityDimensionScore, type QualityMatrix, REVIEW_SEVERITIES, RUN_STATES, type RagContextProviderOptions, type RagQueryResult, type RankedModel, type RecoveryObservation, type RecoveryPolicy, type RecoveryResult, type RepositoryProfile, type ResolvedAgent, type RetroInput, type RetroIssueRow, type RetroReport, type RetroStageReport, type RetroSuggestion, type RetroTarget, type RetroWindow, type ReviewFinding, type ReviewLens, type ReviewSeverity, type ReviewVerdict, type RichIO, type RoutingDecision, type RoutingSkip, type RunOutcome, type RunReconciliation, type RunState, type RuntimeConfig, type RuntimeExperimentCandidate, type RuntimeExperimentResult, STATES, SURFACE_NAMES, type SessionRecorder, type SlotAssessment, type SlotInput, type SourceSnapshot, type StagePauseEntry, type StagePauseState, type StateTransition, type StatusBlock, type StatusSnapshot, type StoredContract, type StructuredEvidence, type SurfaceName, type SurfaceRequirement, type TaskContract, TaskContractSchema, type TeamMember, type TickCandidateResult, type TickInput, type TickOutcome, type TickReport, type TokenUsage, type ToolDefinition, type ToolExecutionRequest, type ToolExecutionResult, type ToolRuntime, type TrackingAdapter, type TrackingConfig, type TrackingTransition, type TrustedEvidenceKey, type UsageMetric, type UsageWindow, type VerificationCheck, type VerificationConfig, type VerificationRun, WIP_STATES, type WatchEvent, type WatchEventKind, type WatchInput, type WatchReport, type WatchTargetSnapshot, type WatchdogBlocker, type WatchdogBudget, type WatchdogResult, type WipAssessment, type WipAssessmentInput, type WipEntry, type WipState, type WorkerBriefInput, type WorkflowNode, type WorkflowResult, activeCooldowns, adaptiveConcurrency, appendLoopEvent, approveRun, approvedDecision, artifactDigest, artifactFilePath, artifactIsFresh, artifactMarkdownPath, assertHuman, assessAcceptance, assessAgentEval, assessBlock, assessChecks, assessCompatibility, assessContract, assessDiscovery, assessImprovementCycle, assessIntegration, assessPilot, assessPreflight, assessProduction, assessQaTransition, assessSlots, assessWip, assessWorktreeCleanup, atLeast, authStatusFor, authorizeRun, automationName, automationPrompt, automationSpecs, availableMemoryBytes, benchmarkRuns, branchFor, briefPath, buildDebriefReport, buildListIssuesArgv, buildRetroReport, buildReviewArgv, buildSuggestions, busyIssues, cancelRun, classifyFailure, classifyHarnessError, classifyProviderFailure, classifyWatchEvent, classifyWatchPhase, cleanTaskArtifacts, clearIssueFailures, clearProviderCooldown, compareOptimization, compareVersions, composePullRequest, contractIsFresh, contractPath, cooldownPath, cooldownUntil, countRunningWorkers, createArgvRagContextProvider, createArtifactEnvelope, createCapabilityManifest, createCodingAgentAdapter, createCompatibilityManifest, createConfiguredToolRuntime, createDispatchLedger, createDocBridgeContextProvider, createDockerToolRuntime, createEvalManifest, createFileMemoryAdapter, createFileMemoryKvStore, createHarnessEventEnvelope, createInMemoryMemoryAdapter, createKvMemoryAdapter, createLinearTrackingAdapter, createLlmCache, createLlmCacheKey, createMachineMonitor, createMcpToolBridge, createModelPolicy, createOrcaDispatchPlan, createOrcaLifecycleProjection, createPhaseArtifact, createPhaseProfile, createPluginRegistry, createPluginSlot, createPolicyGate, createProcessRunner, createProcessToolRuntime, createPullRequestApproval, createQualityMatrix, createRagContextProvider, createRichIO, createSessionRecorder, createStatusSnapshot, createToolRuntime, createTrackingAdapter, createTrackingTransition, deliveryStatePath, detectProviders, discoverIntake, dispatchRecordPath, evaluateWatchdog, executePhaseProfile, exportEvidenceBundle, extractResetsAt, fetchArtificialAnalysisModels, fetchLinearIssue, fetchLinearQueue, fetchTeamMembers, filterAndOrderQueue, findExecutable, formatWatchEvent, gatherLoopState, generateContract, githubComment, githubCommentArgv, githubCommentExists, githubLabelRemove, githubMerge, githubMergeArgv, githubOpenPullRequests, githubPullRequest, githubPullRequestsForBranch, hasLocalConfig, hashContextSnapshot, hashContextSnapshots, hashMcpArgs, inspectDocBridgeIndex, inspectEventLogLock, installLoopAutomations, installPreflight, intakeIssueId, intakePath, isDiscoveryCurrent, isIssuePaused, isStagePaused, isWsl, issueFailurePath, launchWorkerTerminal, learningToMemoryRecord, learningsPath, linearAttach, linearAttachArgv, linearCommentAdd, linearCommentAddArgv, linearLabelAdd, linearLabelArgv, linearLabelRemove, linearStatusSet, linearStatusSetArgv, listCliModels, listDispatched, listIntake, listPausedIssues, loadAgentRegistry, loadAliases, loadBenchmarkManifest, loadBuiltinCatalog, loadConfig, loadLatestRun, loadLoopConfig, loadPinnedSkills, localConfigPath, loopStatus, markProviderExhausted, memoryDigestOf, mergeLoopConfig, modelFor, normalizeReason, openLoopMemory, orcaAccountList, orcaAgentHooks, orcaAutomationCreateArgv, orcaAutomationEditArgv, orcaAutomationRemove, orcaAutomationRun, orcaAutomationRuns, orcaAutomationsList, orcaJson, orcaStatus, orcaTerminalCreate, orcaTerminalList, orcaTerminalScreen, orcaTerminalSend, orcaTerminalWait, orcaVersion, orcaWorktreeCreate, orcaWorktreeRemove, orcaWorktreeSet, orcaWorktreeSetArgv, orcaWorktrees, parseAgentRegistryText, parseArtificialAnalysisPayload, parseAutomationRuns, parseContractOutput, parseGrokModelsOutput, parseJsonEnvelope, parseLinearIssueDetail, parseLinearIssues, parseLoopConfigText, parseMemInfo, parseModelRef, parseOrcaAgentHooks, parseOrcaAutomations, parseOrcaSendReceipt, parseOrcaStatus, parseOrcaTerminals, parseOrcaVersion, parseOrcaWorktreeCreate, parseOrcaWorktrees, parseProviderUsage, parsePullRequest, parseRagQueryOutput, parseRetro, parseReviewResult, parseSince, parseTeamMembers, parseUsageWindows, parseVmStat, pauseIssue, planFilePreflight, planMemoryContext, planPhaseProfile, planRun, precheckCommand, precheckDeliver, precheckTick, preferMemoryOverDocBridge, promoteLearnings, promoteLearningsToMemory, promptLocalConfig, providerIdentity, providerSpecs, rankModels, readAaCache, readArtifactFile, readContextSnapshots, readCooldowns, readDeliveryState, readDispatchRecord, readEvidenceTrustStore, readIntake, readIssueFailures, readLearningsLedger, readLoopEvents, readStagePause, readStoredContract, reconcileRun, recordBenchmarkObservation, recordIssueFailure, recordStageRunResult, recoverEventLogLock, recoveryDelayMs, remainingUsagePercent, renderArtifactMarkdown, renderContractPrompt, renderDebriefMarkdown, renderFindingsForWorker, renderHandoffBrief, renderHeadlessArgv, renderLocalConfig, renderPinnedSkills, renderRetroMarkdown, renderTuiCommand, renderWorkerBrief, resolveAgentForRole, resolveAlias, resolveCatalogCandidates, resolveDocContext, resumeIssue, resumeStage, resumeStateFromArtifacts, retroLearnings, retryRun, routeAllRoles, runAdversarialReview, runAgentEval, runCodeReview, runDeliver, runEvalBattery, runGuidedInstall, runLoopDoctor, runRetroStage, runTick, runWithRecovery, runWorkflow, sampleMachine, selectMemoryForPrompt, selectModel, selectRuntime, severityRank, shellQuote, skillDigest, skillRefs, snapshotWatchTargets, stageEntry, stagePausePath, startRun, summarizeMachine, tiersFor, touchesProtectedPaths, transition, undeclaredOrcaProviders, uninstallLoopAutomations, unknownTelemetry, untrusted, upsertProposedLearnings, usageRankTuple, validateAdapterMetadata, validateArtifactEnvelope, validateBenchmarkManifest, validateBlockManifest, validateCacheableOperation, validateCapabilityManifest, validateCompatibilityManifest, validateConfig, validateContextSnapshot, validateContextSnapshots, validateEvalManifest, validateHarnessErrorClassification, validateHarnessEventEnvelope, validateLoopConfig, validateMemoryRecord, validateOptimizationObservation, validatePhaseTelemetry, validateSafeCommand, validateStatusSnapshot, verifyEvidenceBundle, verifyPullRequestApproval, verifyRun, watchDeliveries, worktreeNameFor, writeAaCache, writeDispatchRecord, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };