@agentskit/harness 0.7.0 → 0.8.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/CHANGELOG.md +4 -0
- package/capabilities/public-surface.json +80 -77
- package/dist/cli.js +144 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +37 -3
- package/dist/index.js +145 -15
- package/dist/index.js.map +1 -1
- package/docs/LOOP.md +19 -0
- package/loop.config.example.yaml +1 -0
- package/package.json +1 -1
- package/release/manifest.json +1 -1
- package/release/notes.md +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -2816,6 +2816,11 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2816
2816
|
}, z.core.$strip>>;
|
|
2817
2817
|
maxFixRounds: z.ZodDefault<z.ZodNumber>;
|
|
2818
2818
|
workerIdleTimeoutMin: z.ZodDefault<z.ZodNumber>;
|
|
2819
|
+
handoff: z.ZodPrefault<z.ZodObject<{
|
|
2820
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2821
|
+
maxHandoffs: z.ZodDefault<z.ZodNumber>;
|
|
2822
|
+
onlyWhenProviderUnavailable: z.ZodDefault<z.ZodBoolean>;
|
|
2823
|
+
}, z.core.$strip>>;
|
|
2819
2824
|
selfEditPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2820
2825
|
ignoreChecks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2821
2826
|
requiredChecks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -3418,6 +3423,24 @@ interface WorkerBriefInput {
|
|
|
3418
3423
|
/** Doc Bridge playbook/for-agents refs (titles/paths only). */
|
|
3419
3424
|
readonly guidanceRefs?: readonly ContextReference[];
|
|
3420
3425
|
}
|
|
3426
|
+
interface HandoffBriefInput {
|
|
3427
|
+
readonly issue: string;
|
|
3428
|
+
readonly issueUrl: string;
|
|
3429
|
+
readonly config: LoopConfig;
|
|
3430
|
+
readonly branch: string;
|
|
3431
|
+
readonly worktree: string;
|
|
3432
|
+
readonly previousProvider: string;
|
|
3433
|
+
readonly previousModel: string;
|
|
3434
|
+
readonly provider: string;
|
|
3435
|
+
readonly model: string;
|
|
3436
|
+
readonly contractDigest: string;
|
|
3437
|
+
readonly reason: string;
|
|
3438
|
+
}
|
|
3439
|
+
/**
|
|
3440
|
+
* Continuation brief for a handoff: same worktree/branch, new provider.
|
|
3441
|
+
* Instructs the worker to resume from git state — do not recreate the branch.
|
|
3442
|
+
*/
|
|
3443
|
+
declare const renderHandoffBrief: (input: HandoffBriefInput) => string;
|
|
3421
3444
|
/** The prompt a worker receives in its Orca terminal. Issue text is data; the contract and the rules are the instructions. */
|
|
3422
3445
|
declare const renderWorkerBrief: (input: WorkerBriefInput) => string;
|
|
3423
3446
|
|
|
@@ -3507,6 +3530,7 @@ declare const branchFor: (issue: Pick<LoopIssue, "identifier" | "branchName">, p
|
|
|
3507
3530
|
declare const busyIssues: (queue: readonly LoopIssue[], leases: readonly DispatchLease[], worktrees: readonly OrcaWorktree[], person: string) => ReadonlySet<string>;
|
|
3508
3531
|
declare const dispatchRecordPath: (stateDir: string, identifier: string) => string;
|
|
3509
3532
|
declare const readDispatchRecord: (stateDir: string, identifier: string) => DispatchRecordFile | null;
|
|
3533
|
+
declare const writeDispatchRecord: (stateDir: string, record: DispatchRecordFile) => string;
|
|
3510
3534
|
declare const appendLoopEvent: (stateDir: string, event: Record<string, unknown>) => void;
|
|
3511
3535
|
interface LoopState {
|
|
3512
3536
|
readonly providers: readonly ProviderAvailability[];
|
|
@@ -3595,7 +3619,7 @@ declare const runCodeReview: (runner: CommandRunner, input: CodeReviewInput) =>
|
|
|
3595
3619
|
/** Compact, worker-facing rendering of blocking findings for a fix round. */
|
|
3596
3620
|
declare const renderFindingsForWorker: (findings: readonly ReviewFinding[], max?: number) => string;
|
|
3597
3621
|
|
|
3598
|
-
type DeliverOutcome = 'waiting' | 'reviewed' | 'fix-round' | 'nudged' | 'merged' | 'held' | 'blocked' | 'stuck' | 'abandoned' | 'failed' | 'dry-run';
|
|
3622
|
+
type DeliverOutcome = 'waiting' | 'reviewed' | 'fix-round' | 'nudged' | 'handed-off' | 'merged' | 'held' | 'blocked' | 'stuck' | 'abandoned' | 'failed' | 'dry-run';
|
|
3599
3623
|
interface DeliverResult {
|
|
3600
3624
|
readonly issue: string;
|
|
3601
3625
|
readonly outcome: DeliverOutcome;
|
|
@@ -3613,6 +3637,15 @@ interface DeliverReport {
|
|
|
3613
3637
|
readonly results: readonly DeliverResult[];
|
|
3614
3638
|
readonly notes: readonly string[];
|
|
3615
3639
|
}
|
|
3640
|
+
interface DeliveryHandoff {
|
|
3641
|
+
readonly at: string;
|
|
3642
|
+
readonly fromProvider: string;
|
|
3643
|
+
readonly fromModel: string;
|
|
3644
|
+
readonly toProvider: string;
|
|
3645
|
+
readonly toModel: string;
|
|
3646
|
+
readonly reason: string;
|
|
3647
|
+
readonly terminal: string | null;
|
|
3648
|
+
}
|
|
3616
3649
|
interface DeliveryState {
|
|
3617
3650
|
readonly issue: string;
|
|
3618
3651
|
readonly prNumber: number | null;
|
|
@@ -3626,10 +3659,11 @@ interface DeliveryState {
|
|
|
3626
3659
|
}>>;
|
|
3627
3660
|
readonly fixRounds: number;
|
|
3628
3661
|
readonly nudges: readonly {
|
|
3629
|
-
readonly kind: 'idle' | 'conflict' | 'ci' | 'review';
|
|
3662
|
+
readonly kind: 'idle' | 'conflict' | 'ci' | 'review' | 'handoff';
|
|
3630
3663
|
readonly at: string;
|
|
3631
3664
|
readonly head: string | null;
|
|
3632
3665
|
}[];
|
|
3666
|
+
readonly handoffs: readonly DeliveryHandoff[];
|
|
3633
3667
|
readonly heldFor: string | null;
|
|
3634
3668
|
readonly finishedAt: string | null;
|
|
3635
3669
|
readonly finalOutcome: DeliverOutcome | null;
|
|
@@ -4071,4 +4105,4 @@ declare const runRetroStage: (input: {
|
|
|
4071
4105
|
readonly dryRun?: boolean;
|
|
4072
4106
|
}) => Promise<RetroStageReport>;
|
|
4073
4107
|
|
|
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 };
|
|
4108
|
+
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, 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, 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, renderHandoffBrief, 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, writeDispatchRecord, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };
|
package/dist/index.js
CHANGED
|
@@ -4520,6 +4520,16 @@ var LoopConfigSchema = z.object({
|
|
|
4520
4520
|
}).prefault({}),
|
|
4521
4521
|
maxFixRounds: z.number().int().min(0).default(2),
|
|
4522
4522
|
workerIdleTimeoutMin: z.number().int().positive().default(45),
|
|
4523
|
+
/**
|
|
4524
|
+
* When a worker goes idle / dies and its provider is out of usage (or otherwise unavailable),
|
|
4525
|
+
* relaunch another builder on the **same** Orca worktree + branch with a continuation brief.
|
|
4526
|
+
*/
|
|
4527
|
+
handoff: z.object({
|
|
4528
|
+
enabled: z.boolean().default(true),
|
|
4529
|
+
maxHandoffs: z.number().int().min(0).max(5).default(2),
|
|
4530
|
+
/** Only hand off when the current provider is unavailable (exhausted/cooldown/missing). */
|
|
4531
|
+
onlyWhenProviderUnavailable: z.boolean().default(true)
|
|
4532
|
+
}).prefault({}),
|
|
4523
4533
|
selfEditPaths: z.array(nonEmpty5).default([LOOP_CONFIG_FILE, ".github/**"]),
|
|
4524
4534
|
/** Check names ignored when deciding CI is green (e.g. advisory bots). */
|
|
4525
4535
|
ignoreChecks: z.array(nonEmpty5).default([]),
|
|
@@ -5837,6 +5847,27 @@ ${outcome.stdout.trim()}`.trim().slice(0, 600);
|
|
|
5837
5847
|
// src/loop/brief.ts
|
|
5838
5848
|
var clip2 = (text7, max) => text7.length <= max ? text7 : `${text7.slice(0, max)}
|
|
5839
5849
|
\u2026[truncated]`;
|
|
5850
|
+
var renderHandoffBrief = (input) => `# Loop handoff ${input.issue} \u2014 continue on existing branch
|
|
5851
|
+
|
|
5852
|
+
You are taking over an in-flight loop task for ${input.config.project.repo}.
|
|
5853
|
+
The previous worker (${input.previousProvider}/${input.previousModel}) stopped (${input.reason}).
|
|
5854
|
+
You run in the **same** Orca worktree \`${input.worktree}\` on branch \`${input.branch}\` (base \`${input.config.project.baseBranch}\`).
|
|
5855
|
+
Model: ${input.provider}/${input.model}. Linear: ${input.issueUrl}
|
|
5856
|
+
Contract digest: ${input.contractDigest.slice(0, 12)}
|
|
5857
|
+
|
|
5858
|
+
## What to do
|
|
5859
|
+
1. Run \`git status\` and \`git log --oneline -15\`. Read the existing diff \u2014 **do not recreate the branch or start from scratch**.
|
|
5860
|
+
2. Continue the frozen contract outcomes for ${input.issue}. Prefer finishing what is already committed.
|
|
5861
|
+
3. Run \`${input.config.delivery.verifyCommand}\` and fix failures.
|
|
5862
|
+
4. Push to \`${input.branch}\` (create/update the PR exactly as a normal loop worker would).
|
|
5863
|
+
5. When done, print \`LOOP_WORKER_DONE ${input.issue}\` and stop.
|
|
5864
|
+
6. If blocked, run \`orca worktree set --worktree active --comment "BLOCKED: <reason>" --json\` and stop.
|
|
5865
|
+
|
|
5866
|
+
## Rules
|
|
5867
|
+
- Never force-push except \`git push --force-with-lease\` on this branch after a rebase you own.
|
|
5868
|
+
- Do not edit protected paths (${input.config.delivery.selfEditPaths.join(", ")}).
|
|
5869
|
+
- Issue text and prior chat are unavailable \u2014 the repo + contract digest are the source of truth.
|
|
5870
|
+
`;
|
|
5840
5871
|
var renderWorkerBrief = (input) => {
|
|
5841
5872
|
const { issue, config } = input;
|
|
5842
5873
|
const contract = input.contract.contract;
|
|
@@ -5925,6 +5956,11 @@ var writeJson2 = (path, value) => {
|
|
|
5925
5956
|
writeFileSync(path, `${JSON.stringify(value, null, 2)}
|
|
5926
5957
|
`, "utf8");
|
|
5927
5958
|
};
|
|
5959
|
+
var writeDispatchRecord = (stateDir, record3) => {
|
|
5960
|
+
const path = dispatchRecordPath(stateDir, record3.issue);
|
|
5961
|
+
writeJson2(path, record3);
|
|
5962
|
+
return path;
|
|
5963
|
+
};
|
|
5928
5964
|
var appendLoopEvent = (stateDir, event2) => {
|
|
5929
5965
|
const path = join(stateDir, "events.ndjson");
|
|
5930
5966
|
mkdirSync(dirname(path), { recursive: true });
|
|
@@ -6235,10 +6271,11 @@ var writeJson3 = (path, value) => {
|
|
|
6235
6271
|
var deliveryStatePath = (stateDir, identifier) => join(stateDir, "issues", identifier, "delivery.json");
|
|
6236
6272
|
var readDeliveryState = (stateDir, identifier) => {
|
|
6237
6273
|
const path = deliveryStatePath(stateDir, identifier);
|
|
6238
|
-
const empty = { issue: identifier, prNumber: null, reviews: {}, fixRounds: 0, nudges: [], heldFor: null, finishedAt: null, finalOutcome: null };
|
|
6274
|
+
const empty = { issue: identifier, prNumber: null, reviews: {}, fixRounds: 0, nudges: [], handoffs: [], heldFor: null, finishedAt: null, finalOutcome: null };
|
|
6239
6275
|
if (!existsSync(path)) return empty;
|
|
6240
6276
|
try {
|
|
6241
|
-
|
|
6277
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
6278
|
+
return { ...empty, ...parsed, handoffs: parsed.handoffs ?? [], nudges: parsed.nudges ?? [] };
|
|
6242
6279
|
} catch {
|
|
6243
6280
|
return empty;
|
|
6244
6281
|
}
|
|
@@ -6310,6 +6347,92 @@ var finish = (ctx, record3, lease, state, outcome, reason) => {
|
|
|
6310
6347
|
saveState(ctx, { ...state, finishedAt: ctx.now().toISOString(), finalOutcome: outcome });
|
|
6311
6348
|
event(ctx, { type: `worker.${outcome}`, issue: record3.issue, reason, worktreeId: record3.worktreeId });
|
|
6312
6349
|
};
|
|
6350
|
+
var providerUnavailable = (ctx, providerId) => {
|
|
6351
|
+
const match = ctx.providers.find((provider) => provider.id === providerId);
|
|
6352
|
+
return !match || !match.available;
|
|
6353
|
+
};
|
|
6354
|
+
var pickHandoffBuilder = (ctx, record3) => {
|
|
6355
|
+
const ranked = rankModels(ctx.config, "builder", ctx.providers);
|
|
6356
|
+
const different = ranked.find((candidate) => candidate.provider !== record3.provider || candidate.model !== record3.model);
|
|
6357
|
+
return different ?? null;
|
|
6358
|
+
};
|
|
6359
|
+
var canHandoff = (ctx, record3, state, next) => {
|
|
6360
|
+
const cfg = ctx.config.delivery.handoff;
|
|
6361
|
+
if (!cfg.enabled || !next) return false;
|
|
6362
|
+
if (state.handoffs.length >= cfg.maxHandoffs) return false;
|
|
6363
|
+
if (cfg.onlyWhenProviderUnavailable && !providerUnavailable(ctx, record3.provider)) return false;
|
|
6364
|
+
return true;
|
|
6365
|
+
};
|
|
6366
|
+
var performHandoff = async (ctx, record3, state, next, reason, actions) => {
|
|
6367
|
+
const brief = renderHandoffBrief({
|
|
6368
|
+
issue: record3.issue,
|
|
6369
|
+
issueUrl: record3.url,
|
|
6370
|
+
config: ctx.config,
|
|
6371
|
+
branch: record3.branch,
|
|
6372
|
+
worktree: record3.worktree,
|
|
6373
|
+
previousProvider: record3.provider,
|
|
6374
|
+
previousModel: record3.model,
|
|
6375
|
+
provider: next.provider,
|
|
6376
|
+
model: next.model,
|
|
6377
|
+
contractDigest: record3.contractDigest,
|
|
6378
|
+
reason
|
|
6379
|
+
});
|
|
6380
|
+
if (ctx.dryRun) {
|
|
6381
|
+
actions.push(`would hand off ${record3.provider}/${record3.model} \u2192 ${next.provider}/${next.model} on ${record3.branch}`);
|
|
6382
|
+
return { issue: record3.issue, outcome: "dry-run", reason: `handoff ready: ${reason}`, actions };
|
|
6383
|
+
}
|
|
6384
|
+
const title = `loop-handoff ${record3.issue} ${next.provider}`;
|
|
6385
|
+
const launched = await launchWorkerTerminal({
|
|
6386
|
+
runner: ctx.runner,
|
|
6387
|
+
config: ctx.config,
|
|
6388
|
+
worktreeId: record3.worktreeId,
|
|
6389
|
+
command: next.tui,
|
|
6390
|
+
title,
|
|
6391
|
+
brief
|
|
6392
|
+
});
|
|
6393
|
+
actions.push(`handed off to ${next.provider}/${next.model} on terminal ${launched.terminal}${launched.accepted ? "" : " (brief not confirmed)"}`);
|
|
6394
|
+
const updated = {
|
|
6395
|
+
...record3,
|
|
6396
|
+
terminal: launched.terminal,
|
|
6397
|
+
provider: next.provider,
|
|
6398
|
+
model: next.model
|
|
6399
|
+
};
|
|
6400
|
+
writeDispatchRecord(ctx.loaded.stateDir, updated);
|
|
6401
|
+
const handoff = {
|
|
6402
|
+
at: ctx.now().toISOString(),
|
|
6403
|
+
fromProvider: record3.provider,
|
|
6404
|
+
fromModel: record3.model,
|
|
6405
|
+
toProvider: next.provider,
|
|
6406
|
+
toModel: next.model,
|
|
6407
|
+
reason,
|
|
6408
|
+
terminal: launched.terminal
|
|
6409
|
+
};
|
|
6410
|
+
const nextState = {
|
|
6411
|
+
...state,
|
|
6412
|
+
handoffs: [...state.handoffs, handoff],
|
|
6413
|
+
nudges: [...state.nudges, { kind: "handoff", at: handoff.at, head: null }]
|
|
6414
|
+
};
|
|
6415
|
+
saveState(ctx, nextState);
|
|
6416
|
+
event(ctx, {
|
|
6417
|
+
type: "worker.handed-off",
|
|
6418
|
+
issue: record3.issue,
|
|
6419
|
+
from: `${record3.provider}/${record3.model}`,
|
|
6420
|
+
to: `${next.provider}/${next.model}`,
|
|
6421
|
+
worktreeId: record3.worktreeId,
|
|
6422
|
+
branch: record3.branch,
|
|
6423
|
+
reason,
|
|
6424
|
+
briefAccepted: launched.accepted
|
|
6425
|
+
});
|
|
6426
|
+
try {
|
|
6427
|
+
await orcaWorktreeSet(ctx.runner, {
|
|
6428
|
+
worktree: `id:${record3.worktreeId}`,
|
|
6429
|
+
comment: `LOOP HANDOFF: ${record3.provider}/${record3.model} \u2192 ${next.provider}/${next.model} (${reason})`
|
|
6430
|
+
}, orcaOptions(ctx.config));
|
|
6431
|
+
} catch (error) {
|
|
6432
|
+
actions.push(`Orca comment failed: ${message3(error)}`);
|
|
6433
|
+
}
|
|
6434
|
+
return { issue: record3.issue, outcome: "handed-off", reason: `handed off to ${next.provider}/${next.model}: ${reason}`, actions };
|
|
6435
|
+
};
|
|
6313
6436
|
var handleNoPullRequest = async (ctx, record3, lease, state) => {
|
|
6314
6437
|
const actions = [];
|
|
6315
6438
|
const now4 = ctx.now();
|
|
@@ -6326,8 +6449,13 @@ var handleNoPullRequest = async (ctx, record3, lease, state) => {
|
|
|
6326
6449
|
const sinceDispatch = minutesBetween(now4, record3.dispatchedAt);
|
|
6327
6450
|
const sinceOutput = Math.min(sinceDispatch, minutesBetween(now4, lastOutputAt));
|
|
6328
6451
|
const idleTimeout = ctx.config.delivery.workerIdleTimeoutMin;
|
|
6452
|
+
const nextBuilder = pickHandoffBuilder(ctx, record3);
|
|
6453
|
+
const unavailable = providerUnavailable(ctx, record3.provider);
|
|
6329
6454
|
if (!terminalAlive) {
|
|
6330
6455
|
if (sinceDispatch < 5) return { issue: record3.issue, outcome: "waiting", reason: "worker terminal not visible yet", actions };
|
|
6456
|
+
if (canHandoff(ctx, record3, state, nextBuilder)) {
|
|
6457
|
+
return performHandoff(ctx, record3, state, nextBuilder, unavailable ? "previous terminal gone and provider unavailable" : "previous terminal gone", actions);
|
|
6458
|
+
}
|
|
6331
6459
|
await escalateLinear(ctx, record3, "stuck", `**Loop: worker stuck** \u2014 the worker terminal for \`${record3.worktree}\` is gone and no pull request was opened. The worktree was preserved for inspection; the slot was released.`, actions);
|
|
6332
6460
|
finish(ctx, record3, lease, state, "stuck", "terminal gone before PR");
|
|
6333
6461
|
return { issue: record3.issue, outcome: ctx.dryRun ? "dry-run" : "stuck", reason: "worker terminal gone before a PR was opened", actions };
|
|
@@ -6340,7 +6468,12 @@ var handleNoPullRequest = async (ctx, record3, lease, state) => {
|
|
|
6340
6468
|
idle = false;
|
|
6341
6469
|
}
|
|
6342
6470
|
}
|
|
6343
|
-
if (!idle || sinceOutput < idleTimeout)
|
|
6471
|
+
if (!idle || sinceOutput < idleTimeout) {
|
|
6472
|
+
return { issue: record3.issue, outcome: "waiting", reason: idle ? `worker idle for ${Math.round(sinceOutput)} min (< ${idleTimeout})` : "worker active", actions };
|
|
6473
|
+
}
|
|
6474
|
+
if (canHandoff(ctx, record3, state, nextBuilder) && unavailable) {
|
|
6475
|
+
return performHandoff(ctx, record3, state, nextBuilder, `idle ${Math.round(sinceOutput)} min and ${record3.provider} unavailable (usage/cooldown)`, actions);
|
|
6476
|
+
}
|
|
6344
6477
|
const idleNudges = state.nudges.filter((nudge) => nudge.kind === "idle");
|
|
6345
6478
|
const lastNudge = idleNudges.at(-1);
|
|
6346
6479
|
if (!lastNudge || minutesBetween(now4, lastNudge.at) < idleTimeout) {
|
|
@@ -6350,6 +6483,9 @@ var handleNoPullRequest = async (ctx, record3, lease, state) => {
|
|
|
6350
6483
|
event(ctx, { type: "worker.nudged", issue: record3.issue, kind: "idle" });
|
|
6351
6484
|
return { issue: record3.issue, outcome: ctx.dryRun ? "dry-run" : sent ? "nudged" : "waiting", reason: "idle without PR; nudged once", actions };
|
|
6352
6485
|
}
|
|
6486
|
+
if (canHandoff(ctx, record3, state, nextBuilder)) {
|
|
6487
|
+
return performHandoff(ctx, record3, state, nextBuilder, `idle after nudge and ${record3.provider} unavailable`, actions);
|
|
6488
|
+
}
|
|
6353
6489
|
await escalateLinear(ctx, record3, "stuck", `**Loop: worker stuck** \u2014 idle for ${Math.round(sinceOutput)} minutes after a check-in, no pull request on \`${record3.branch}\`. Worktree \`${record3.worktree}\` was preserved; the slot was released and the issue returned to ${ctx.config.delivery.returnState}.`, actions);
|
|
6354
6490
|
finish(ctx, record3, lease, state, "stuck", "idle after nudge without PR");
|
|
6355
6491
|
return { issue: record3.issue, outcome: ctx.dryRun ? "dry-run" : "stuck", reason: "idle after nudge without PR", actions };
|
|
@@ -6503,16 +6639,10 @@ var runDeliver = async (input) => {
|
|
|
6503
6639
|
const orca = orcaOptions(config);
|
|
6504
6640
|
const [accountList, agentHooks] = await Promise.all([orcaAccountList(input.runner, orca).catch(() => ({})), orcaAgentHooks(input.runner, orca).catch(() => ({}))]);
|
|
6505
6641
|
const providers = await detectProviders({ providers: providerSpecs(config), accountList, agentHooks, env: input.env, platform: input.platform, exhaustedPercent: config.models.cooldown.exhaustedPercent, cooldowns: activeCooldowns(readCooldowns(loaded.stateDir), now4()), now: now4 });
|
|
6506
|
-
const
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
runner: input.runner,
|
|
6511
|
-
stateDir: loaded.stateDir,
|
|
6512
|
-
env: input.env,
|
|
6513
|
-
now: now4
|
|
6514
|
-
}) : [];
|
|
6515
|
-
const reviewer = rankModels(config, "reviewer", providers, reviewerExtras)[0] ?? null;
|
|
6642
|
+
const availableIds = providers.filter((provider) => provider.available).map((provider) => provider.id);
|
|
6643
|
+
const catalogExtras = async (role) => config.models.routing.mode === "catalog" ? resolveCatalogCandidates({ config, role, availableProviderIds: availableIds, runner: input.runner, stateDir: loaded.stateDir, env: input.env, now: now4 }) : Promise.resolve([]);
|
|
6644
|
+
const reviewer = rankModels(config, "reviewer", providers, await catalogExtras("reviewer"))[0] ?? null;
|
|
6645
|
+
const builder = rankModels(config, "builder", providers, await catalogExtras("builder"))[0] ?? null;
|
|
6516
6646
|
let env = input.env ?? process.env;
|
|
6517
6647
|
if (!env["GITHUB_TOKEN"] && !env["GH_TOKEN"]) {
|
|
6518
6648
|
try {
|
|
@@ -6523,7 +6653,7 @@ var runDeliver = async (input) => {
|
|
|
6523
6653
|
}
|
|
6524
6654
|
const reviewDeadlineMs = input.budgetMs ? Math.max(6e4, Math.min(config.delivery.review.deadlineMs, input.budgetMs - 9e4)) : config.delivery.review.deadlineMs;
|
|
6525
6655
|
if (reviewDeadlineMs < config.delivery.review.deadlineMs) notes.push(`review deadline capped to ${Math.round(reviewDeadlineMs / 1e3)}s to fit the stage budget`);
|
|
6526
|
-
const ctx = { loaded, config, runner: input.runner, now: now4, dryRun, reviewer, env, ...input.assumeIdle === void 0 ? {} : { assumeIdle: input.assumeIdle }, notes, reviewDeadlineMs };
|
|
6656
|
+
const ctx = { loaded, config, runner: input.runner, now: now4, dryRun, reviewer, builder, providers, env, ...input.assumeIdle === void 0 ? {} : { assumeIdle: input.assumeIdle }, notes, reviewDeadlineMs };
|
|
6527
6657
|
const ledger = createDispatchLedger(loaded.stateDir);
|
|
6528
6658
|
const leases = new Map(ledger.active().map((lease) => [lease.issue, lease]));
|
|
6529
6659
|
const results = [];
|
|
@@ -7610,6 +7740,6 @@ var watchDeliveries = async (input) => {
|
|
|
7610
7740
|
};
|
|
7611
7741
|
var formatWatchEvent = (event2) => `${event2.kind}: ${event2.issue} \xB7 ${event2.message}`;
|
|
7612
7742
|
|
|
7613
|
-
export { AGENT_REGISTRY_SCHEMA_VERSION, ARTIFACT_SCHEMA_VERSION, ARTIFACT_TYPES, ASSURANCE_LEVELS, AgentRegistryEntrySchema, AgentRegistrySchema, BENCHMARK_SCHEMA_VERSION, BLOCK_STATUSES, CAPABILITY_KINDS, CAPABILITY_MANIFEST_SCHEMA_VERSION, COMPATIBILITY_COMPONENTS, COMPATIBILITY_SCHEMA_VERSION, CONTEXT_PROVIDER_SLOT, CONTRACT_CLOSE, CONTRACT_OPEN, CONTRACT_SCHEMA_VERSION, ContractOutcomeSchema, EVAL_COMPONENTS, EVAL_LAYERS, EVAL_MANIFEST_SCHEMA_VERSION, EVENT_LOG_GENESIS, EVIDENCE_BUNDLE_SCHEMA_VERSION, FileArtifactStore, FileEventStore, 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, IMPROVEMENT_CYCLE_STEPS, LEARNING_STATUSES, LEGAL_TRANSITIONS, LOOP_CONFIG_FILE, LOOP_CONFIG_SCHEMA_VERSION, LOOP_LOCAL_CONFIG_FILE, LOOP_STAGES, LoopConfigSchema, MEMORY_SCOPES, MODEL_ROLES, PHASE_DECISIONS, PHASE_EFFECTS, PHASE_EFFECT_ACTIONS, PHASE_MODES, PR_FIELDS, QUALITY_DIMENSIONS, REVIEW_SEVERITIES, STATES, TaskContractSchema, WIP_STATES, 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 };
|
|
7743
|
+
export { AGENT_REGISTRY_SCHEMA_VERSION, ARTIFACT_SCHEMA_VERSION, ARTIFACT_TYPES, ASSURANCE_LEVELS, AgentRegistryEntrySchema, AgentRegistrySchema, BENCHMARK_SCHEMA_VERSION, BLOCK_STATUSES, CAPABILITY_KINDS, CAPABILITY_MANIFEST_SCHEMA_VERSION, COMPATIBILITY_COMPONENTS, COMPATIBILITY_SCHEMA_VERSION, CONTEXT_PROVIDER_SLOT, CONTRACT_CLOSE, CONTRACT_OPEN, CONTRACT_SCHEMA_VERSION, ContractOutcomeSchema, EVAL_COMPONENTS, EVAL_LAYERS, EVAL_MANIFEST_SCHEMA_VERSION, EVENT_LOG_GENESIS, EVIDENCE_BUNDLE_SCHEMA_VERSION, FileArtifactStore, FileEventStore, 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, IMPROVEMENT_CYCLE_STEPS, LEARNING_STATUSES, LEGAL_TRANSITIONS, LOOP_CONFIG_FILE, LOOP_CONFIG_SCHEMA_VERSION, LOOP_LOCAL_CONFIG_FILE, LOOP_STAGES, LoopConfigSchema, MEMORY_SCOPES, MODEL_ROLES, PHASE_DECISIONS, PHASE_EFFECTS, PHASE_EFFECT_ACTIONS, PHASE_MODES, PR_FIELDS, QUALITY_DIMENSIONS, REVIEW_SEVERITIES, STATES, TaskContractSchema, WIP_STATES, 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, renderHandoffBrief, 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, writeDispatchRecord, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };
|
|
7614
7744
|
//# sourceMappingURL=index.js.map
|
|
7615
7745
|
//# sourceMappingURL=index.js.map
|