@tangle-network/agent-eval 0.91.0 → 0.93.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
@@ -10,12 +10,14 @@ import { TCloud } from '@tangle-network/tcloud';
10
10
  import { B as BenchmarkRunnerConfig, S as Scenario, c as BenchmarkReport, P as ProductClientConfig, C as CheckResult, T as TestResult, d as PersonaConfig, D as DriverResult, e as DriverState, b as JudgeFn, f as CollectedArtifacts, g as ScenarioResult, h as TurnMetrics, i as ScenarioFile, j as CompletionCriterion } from './types-Croy5h7V.js';
11
11
  export { A as ArtifactCheck, k as ArtifactResult, E as EvalResult, F as FeedbackPattern, l as JudgeConfig, a as JudgeInput, m as JudgeRubric, J as JudgeScore, n as PersonaRigor, R as RouteMap, o as RubricDimension, p as Turn, q as TurnResult } from './types-Croy5h7V.js';
12
12
  export { c as ControlActionFailureMode, d as ControlActionOutcome, e as ControlBudget, f as ControlContext, g as ControlDecision, C as ControlEvalResult, a as ControlRunResult, h as ControlRuntimeConfig, i as ControlRuntimeError, j as ControlSeverity, b as ControlStep, k as ControlStopPolicies, S as StopDecision, l as allCriticalPassed, o as objectiveEval, r as runAgentControlLoop, s as stopOnNoProgress, m as stopOnRepeatedAction, n as subjectiveEval } from './control-runtime-DuFBYg7A.js';
13
+ import { F as FailureClass, h as BudgetSpec, B as BudgetLedgerEntry, R as Run, L as LlmSpan } from './schema-m0gsnbt3.js';
14
+ export { A as Artifact, E as EventKind, i as FAILURE_CLASSES, G as GenericSpan, J as JudgeSpan, M as Message, d as RetrievalSpan, g as RunLayer, f as RunStatus, e as SandboxSpan, S as Span, j as SpanBase, c as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, T as ToolSpan, a as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-m0gsnbt3.js';
13
15
  import { A as AgentEvalError, J as JudgeError, a as ConfigError } from './errors-CzMUYo7b.js';
14
16
  export { b as AgentEvalErrorCode, C as CaptureIntegrityError, N as NotFoundError, R as ReplayError, V as ValidationError, c as VerificationError } from './errors-CzMUYo7b.js';
15
17
  import { b as FeedbackLabel, F as FeedbackTrajectoryStore, a as FeedbackTrajectory } from './feedback-trajectory-D9OVLrg9.js';
16
18
  export { c as FeedbackArtifactType, d as FeedbackAttempt, e as FeedbackLabelKind, f as FeedbackLabelSource, g as FeedbackOptimizerRow, h as FeedbackOutcome, i as FeedbackReplayAdapter, j as FeedbackReplayResult, k as FeedbackSeverity, l as FeedbackSplitPolicy, m as FeedbackTask, n as FeedbackTrajectoryFilter, o as FileSystemFeedbackTrajectoryStore, I as InMemoryFeedbackTrajectoryStore, P as PreferenceMemoryEntry, p as ProposedSideEffect, q as assignFeedbackSplit, r as controlRunToFeedbackTrajectory, s as createFeedbackTrajectory, t as feedbackTrajectoriesToDatasetScenarios, u as feedbackTrajectoriesToOptimizerRows, v as feedbackTrajectoryToDatasetScenario, w as feedbackTrajectoryToOptimizerRow, x as parseFeedbackTrajectoriesJsonl, y as renderPreferenceMemoryMarkdown, z as replayFeedbackTrajectories, A as replayFeedbackTrajectory, B as serializeFeedbackTrajectoriesJsonl, C as summarizePreferenceMemory, D as withAssignedFeedbackSplit } from './feedback-trajectory-D9OVLrg9.js';
17
- import { b as CorrectnessChecker, A as AgentProfile$1 } from './pre-registration-DELOEJ8v.js';
18
- export { c as ArtifactCheckArtifact, d as ArtifactEventLike, e as ArtifactValidator, f as BackendIntegrityError, B as BackendIntegrityReport, C as CompletionRequirement, a as CompletionVerdict, H as HypothesisManifest, g as HypothesisResult, L as LlmCorrectnessCheckerOpts, h as ProducedProposal, P as ProducedState, i as ProposalEventLike, j as RequirementCheck, R as RuntimeEventLike, k as SatisfiedBy, S as SignedManifest, l as SignedManifestAlgo, T as TaskGold, m as ToolCallEventLike, V as ValidationContext, n as ValidationIssue, o as ValidationResult, p as agentProfileHash, q as assertRealBackend, r as byteLengthRange, s as canonicalize, t as completionVerdict, u as composeValidators, v as containsAll, w as createLlmCorrectnessChecker, x as createTokenRecallChecker, y as evaluateHypothesis, z as extractProducedState, D as hashJson, E as jsonHasKeys, F as parseCorrectnessResponse, G as regexMatch, I as signManifest, J as summarizeBackendIntegrity, K as verifyCompletion, M as verifyManifest } from './pre-registration-DELOEJ8v.js';
19
+ import { b as CorrectnessChecker, A as AgentProfile$1 } from './pre-registration-mAnCugl9.js';
20
+ export { c as ArtifactCheckArtifact, d as ArtifactEventLike, e as ArtifactValidator, f as BackendIntegrityError, B as BackendIntegrityReport, C as CompletionRequirement, a as CompletionVerdict, H as HypothesisManifest, g as HypothesisResult, L as LlmCorrectnessCheckerOpts, h as ProducedProposal, P as ProducedState, i as ProposalEventLike, j as RequirementCheck, R as RuntimeEventLike, k as SatisfiedBy, S as SignedManifest, l as SignedManifestAlgo, T as TaskGold, m as ToolCallEventLike, V as ValidationContext, n as ValidationIssue, o as ValidationResult, p as agentProfileHash, q as assertRealBackend, r as byteLengthRange, s as canonicalize, t as completionVerdict, u as composeValidators, v as containsAll, w as createLlmCorrectnessChecker, x as createTokenRecallChecker, y as evaluateHypothesis, z as extractProducedState, D as hashJson, E as jsonHasKeys, F as parseCorrectnessResponse, G as regexMatch, I as signManifest, J as summarizeBackendIntegrity, K as verifyCompletion, M as verifyManifest } from './pre-registration-mAnCugl9.js';
19
21
  export { DataAcquisitionPlan, KnowledgeAcquisitionMode, KnowledgeBundle, KnowledgeFallbackPolicy, KnowledgeFreshness, KnowledgeImportance, KnowledgeReadinessReport, KnowledgeRecommendedAction, KnowledgeRequirement, KnowledgeRequirementCategory, KnowledgeResponsibleSurface, KnowledgeSensitivity, ScoreKnowledgeReadinessOptions, UserQuestion, acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, knowledgeReadinessTracePayload, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps } from './knowledge/index.js';
20
22
  import { h as ReleaseConfidenceThresholds, f as ReleaseConfidenceScorecard } from './release-report-euXIV_Sk.js';
21
23
  export { A as ActionableSideInfo, o as AsiSeverity, B as BootstrapOptions, a as BootstrapResult, J as JudgeReplayGateArgs, R as ReleaseConfidenceAxis, b as ReleaseConfidenceAxisName, c as ReleaseConfidenceInput, d as ReleaseConfidenceIssue, e as ReleaseConfidenceMetrics, g as ReleaseConfidenceStatus, i as ReleaseTraceEvidence, j as RenderReleaseReportOptions, V as Verdict, k as assertReleaseConfidence, l as bootstrapCi, m as evaluateReleaseConfidence, n as judgeReplayGate, r as renderReleaseReport } from './release-report-euXIV_Sk.js';
@@ -39,8 +41,6 @@ export { b as RunIntegrityError, R as RunIntegrityExpectations, c as RunIntegrit
39
41
  export { a as aggregateLlm, b as argHash, g as groupBy, j as judgeSpans, l as llmSpans, r as runFailureClass, c as runsForScenario, t as toolSpans } from './query-CqTxMwDw.js';
40
42
  export { F as FileSystemRawProviderSink, a as FileSystemRawProviderSinkOptions, I as InMemoryRawProviderSink, b as InMemoryRawProviderSinkOptions, N as NoopRawProviderSink, P as ProviderRedactor, c as RawProviderDirection, d as RawProviderEvent, R as RawProviderSink, e as RawProviderSinkFilter, f as defaultProviderRedactor, p as providerFromBaseUrl } from './raw-provider-sink-C46HDghv.js';
41
43
  export { D as DEFAULT_REDACTION_RULES, b as REDACTION_VERSION, a as RedactionReport, R as RedactionRule, r as redactString, c as redactValue } from './redact-B40YG2M_.js';
42
- import { h as BudgetSpec, B as BudgetLedgerEntry, R as Run, L as LlmSpan } from './schema-m0gsnbt3.js';
43
- export { A as Artifact, E as EventKind, i as FAILURE_CLASSES, F as FailureClass, G as GenericSpan, J as JudgeSpan, M as Message, d as RetrievalSpan, g as RunLayer, f as RunStatus, e as SandboxSpan, S as Span, j as SpanBase, c as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, T as ToolSpan, a as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-m0gsnbt3.js';
44
44
  import { T as TraceStore, R as RunFilter } from './store-CKUAgsJz.js';
45
45
  export { E as EventFilter, F as FileSystemTraceStore, a as FileSystemTraceStoreOptions, I as InMemoryTraceStore, S as SpanFilter } from './store-CKUAgsJz.js';
46
46
  export { D as DEFAULT_FAILURE_RULES, b as FailureClassification, c as FailureContext, d as FailureRule, e as classifyFailure } from './failure-cluster-CL7IVgkJ.js';
@@ -276,6 +276,87 @@ declare class ProductClient {
276
276
  */
277
277
  declare function runE2EWorkflow(client: ProductClient, name: string, workflow: (client: ProductClient) => Promise<CheckResult[]>): Promise<TestResult>;
278
278
 
279
+ /**
280
+ * Streaming detectors — the canonical, online failure-mode kernel.
281
+ *
282
+ * A `StreamingDetector` is a pure incremental reducer: fold one normalized step, get a signal the
283
+ * moment a threshold trips (else null). The SAME kernel runs in two places, so the logic lives once:
284
+ * - ONLINE, over a live agent pipe (a worker's tool-call stream) → raise a finding mid-run.
285
+ * - INSIDE the control loop (`control-runtime`) → its `stopOn*` policies fold these detectors.
286
+ *
287
+ * Detectors are stateful but self-contained; `streak` is exposed for telemetry and `reset` clears it.
288
+ * Fingerprinting is the CALLER's job — the control loop hashes state/action with `stableFingerprint`,
289
+ * a tool-call pipe hashes args with `argHash` — so a detector stays agnostic to what it's watching.
290
+ */
291
+
292
+ type DetectorSeverity = 'info' | 'warn' | 'critical';
293
+ /** A normalized step a detector folds over. Fields are optional; each detector reads only what it
294
+ * needs (repeated-action → `actionFingerprint`; no-progress → `stateFingerprint` + `score`;
295
+ * error-streak → `status`). */
296
+ interface DetectorEvent {
297
+ /** Fingerprint of the action/tool-call this step took (caller pre-hashes). */
298
+ readonly actionFingerprint?: string;
299
+ /** Fingerprint of observable state AFTER this step. */
300
+ readonly stateFingerprint?: string;
301
+ /** Score after this step (the score-flat half of no-progress). */
302
+ readonly score?: number;
303
+ /** Whether this step errored. */
304
+ readonly status?: 'ok' | 'error';
305
+ /** Free-form label carried into the signal evidence (e.g. the tool name). */
306
+ readonly label?: string;
307
+ }
308
+ interface DetectorSignal {
309
+ readonly detector: string;
310
+ readonly severity: DetectorSeverity;
311
+ readonly failureClass?: FailureClass;
312
+ readonly reason: string;
313
+ /** Consecutive matching steps at the moment the signal fired. */
314
+ readonly streak: number;
315
+ readonly evidence?: Record<string, unknown>;
316
+ }
317
+ interface StreamingDetector {
318
+ readonly id: string;
319
+ /** Current streak (consecutive matching steps) — for telemetry/introspection between observes. */
320
+ readonly streak: number;
321
+ /** Fold one event; return a signal when the threshold trips, else null. */
322
+ observe(event: DetectorEvent): DetectorSignal | null;
323
+ /** Clear all state. */
324
+ reset(): void;
325
+ }
326
+ interface RepeatedActionOptions {
327
+ /** Signal once the same action fingerprint repeats this many CONSECUTIVE steps (default 3).
328
+ * `<= 0` disables the signal (the streak is still tracked, for telemetry). */
329
+ readonly maxRepeated?: number;
330
+ readonly severity?: DetectorSeverity;
331
+ /** Failure class to stamp on the signal (default `tool_recovery_failure`). */
332
+ readonly failureClass?: FailureClass;
333
+ }
334
+ /** Same action fingerprint N consecutive steps = a stuck loop (the #1 long-horizon failure mode). */
335
+ declare function repeatedActionDetector(opts?: RepeatedActionOptions): StreamingDetector;
336
+ interface NoProgressOptions {
337
+ /** Signal once state is unchanged AND score is flat for this many CONSECUTIVE steps (default 3).
338
+ * `<= 0` disables the signal. */
339
+ readonly maxNoProgress?: number;
340
+ /** Minimum |score change| that counts as progress (default 0.001). */
341
+ readonly minScoreDelta?: number;
342
+ readonly severity?: DetectorSeverity;
343
+ readonly failureClass?: FailureClass;
344
+ }
345
+ /** State + score unchanged across N steps = spinning wheels. Compares each step to the previous one,
346
+ * so prime with the initial state (observe it once before the first real step) to detect on step 1. */
347
+ declare function noProgressDetector(opts?: NoProgressOptions): StreamingDetector;
348
+ interface ErrorStreakOptions {
349
+ /** Signal once this many CONSECUTIVE steps errored (default 3). `<= 0` disables. */
350
+ readonly maxErrors?: number;
351
+ readonly severity?: DetectorSeverity;
352
+ readonly failureClass?: FailureClass;
353
+ }
354
+ /** N consecutive tool errors = the worker is hammering a broken approach. */
355
+ declare function errorStreakDetector(opts?: ErrorStreakOptions): StreamingDetector;
356
+ /** Fold one event through many detectors at once; returns every signal that fired this step. The
357
+ * natural shape for an online pipe watching with a whole panel of detectors. */
358
+ declare function observeAll(detectors: ReadonlyArray<StreamingDetector>, event: DetectorEvent): DetectorSignal[];
359
+
279
360
  interface AgentDriverConfig {
280
361
  client: ProductClient;
281
362
  driverModel?: string;
@@ -317,6 +398,35 @@ declare class AgentDriver {
317
398
  * — exported so harness authors can inspect and regression-test it.
318
399
  */
319
400
  declare function buildDriverSystemPrompt(persona: PersonaConfig, state: DriverState, productContext?: string): string;
401
+ interface WorkerDriverContext {
402
+ /** The goal (or sub-goal) the driven worker must actually accomplish. */
403
+ goal: string;
404
+ /** The worker's harness — e.g. 'claude-code' | 'codex' | 'opencode' | 'router-tools'.
405
+ * Names which capability profile the driver should exploit. */
406
+ harness?: string;
407
+ /** A capability + caveat brief for THIS harness (parallel tool calls, sub-agents and
408
+ * their depth/concurrency limits, autonomy/runaway profile, MCP, native tool-isolation)
409
+ * — sourced from the harness-compat matrix. Free text so the substrate stays decoupled
410
+ * from any runtime harness type. */
411
+ harnessBrief?: string;
412
+ /** What the worker has done so far — the trace/state summary the driver reasons over to
413
+ * write its next instruction. Empty on the first turn. */
414
+ progress?: string;
415
+ /** Optional extra context (repo, constraints, the deliverable's acceptance check). */
416
+ context?: string;
417
+ }
418
+ /**
419
+ * Build the WORKER-DRIVER system prompt — the harness-aware sibling of
420
+ * `buildDriverSystemPrompt`. Where that one role-plays a demanding *user* of a
421
+ * product, this one is a meta-agent that DRIVES a capable coding *worker* to
422
+ * complete a goal: it writes rich, high-signal instructions that direct the
423
+ * worker to exploit its harness's full power (parallelize, sub-agents, run-to-
424
+ * completion, tools/MCP), matched to what THAT harness can actually do. The
425
+ * load-bearing contract: the driver never writes a thin steer — every message
426
+ * is the dense, specific directive a world-class engineering lead would write.
427
+ * Pure function; exported so harness authors can inspect and regression-test it.
428
+ */
429
+ declare function buildWorkerDriverSystemPrompt(ctx: WorkerDriverContext): string;
320
430
  interface DecideNextUserTurnOpts {
321
431
  persona: PersonaConfig;
322
432
  state: DriverState;
@@ -5531,4 +5641,4 @@ type CachedJudge<TArtifact, TScenario extends Scenario$1 = Scenario$1> = JudgeCo
5531
5641
  */
5532
5642
  declare function cachedJudge<TArtifact, TScenario extends Scenario$1 = Scenario$1>(judge: JudgeConfig<TArtifact, TScenario>, store: VerdictCacheStore, options: CachedJudgeOptions): CachedJudge<TArtifact, TScenario>;
5533
5643
 
5534
- export { ATTESTATION_ALGORITHM, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, AgentProfile$1 as AgentProfile, type AgreementResult, type AlignmentOp, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AttestationProvenance, type AttestationVerification, type AttestedReport, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, type CachedJudge, type CachedJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateComparison, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChannelRollup, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, ConfigError, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractCheckResult, type ContractJudgeOptions, type ContractMetric, type ContractReport, type ContractRule, type ContractRuleKind, type ContractSpan, type ContractVerdict, type ContractViolation, ConvergenceTracker, CorrectnessChecker, type CostEntry, CostLedger, type CostReport, type CostSummary, CostTracker, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateExperimentInput, type CreateSandboxPoolOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_FINDERS, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, DefaultVerdict, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DescriptionLengthCandidate, type DescriptionLengthConfig, type DescriptionLengthDecision, type DescriptionLengthEvidence, DescriptionLengthGate, type DescriptionLengthRejectionCode, type DiffScorecardOptions, type DirEntry, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type EnsembleAggregate, type EnsembleJudgeOptions, type ErrorCountPattern, type EvalToolDef, EvalTraceStore, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type ExperimentProvenance, type ExperimentRep, type ExperimentStats, type ExperimentStore, ExperimentTracker, type ExperimentTrackerOptions, type ExperimentVerdict, type ExportedRewardModel, type ExtractOptions, type ExtractResult, type FactorContribution, type FactorialCell, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FileChange, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, HarnessConfig, type HeldOutPartition, HoldoutAuditor, type HttpGithubClientOptions, INTENT_MATCH_JUDGE_VERSION, type ImageData, type ImprovementThresholds, type ImprovementVerdictResult, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, JudgeError, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeParseError, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, type JudgeVerdict, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, LlmSpan, LockedJsonlAppender, MODEL_PRICING, type MakeEvalToolsConfig, type MatchResult, type MatcherResult, type MergeOptions, MetricsCollector, type ModelCostRollup, type ModelPreflight, type ModelSeats, ModelsUnreachableError, type MuffledFinder, type MuffledFinding, type MultiToolchainLayerConfig, type Mutator, Mutex, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParseStudentLabel, type PartitionHeldOutOptions, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type PreflightModelsOptions, type PreflightOutcome, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, type ProvenanceReader, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepoRef, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run, type RunCommandInput, type RunCommandResult, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunRecordBackend, type RunRecordFilter, RunScore, RunScoreWeights, RunSplitTag, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SeatName, type SeatPresetName, SeatUnsetError, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SerializedRegex, Severity, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, type SpanPredicate, type SplitGoldOptions, SteeringBundle, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type StepAttribution, type SynthesisReason, type SynthesisTarget, TestResult, type TextMatcher, type ThresholdContract, TokenCounter, type TokenSpec, type TraceContract, TraceContractBuilder, TraceEmitter, TraceStore, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UI_FINDING_SEVERITIES, UI_LENSES, UNIVERSAL_FINDERS, type UiFinding, type UiFindingScreenshot, type UiFindingSeverity, type UiLens, type VerdictCacheStats, type VerdictCacheStore, VerifyContext, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, aggregateJudgeVerdicts, aggregatePrReviewScore, analyzeAntiSlop, appendScorecard, assertCrossFamily, assertModelsServed, assertSingleBackend, assignHeldOutTag, attachCostToReport, attest, bisect, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, cachedJudge, canaryLeakView, canonicalJson, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, checkTraceContracts, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, computeExperimentStats, contentHash, contractJudge, costReport, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createSandboxPool, crossTraceDiff, dataDescriptionBits, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffScorecard, discoverPersonas, distillPlaybook, ensembleJudge, estimateCost, estimateTokens, evaluateContract, evaluateOracles, evaluateTraceContract, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, fieldAgreement, fileContains, fileExists, fileExperimentStore, fileVerdictCache, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, fnv1a32, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, gitProvenanceReader, precision as goldenPrecision, hashContent, hashToUnit, htmlContainsElement, httpGithubClient, improvementVerdict, inMemoryExperimentStore, inMemoryReferenceReplayStore, inMemoryRunRecordBackend, inMemoryVerdictCache, isModelPriced, isOtelConfigured, jsonShape, jsonlReferenceReplayStore, jsonlRunRecordBackend, judgeFamily, keyPreserved, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, makeEvalTools, matchGoldens, matchSpan, mergeLayerResults, modelDescriptionBits, multiToolchainLayer, notBlocked, paraphraseRobustness, paraphraseRobustnessScenarios, parseGoldJsonl, parseReflectionResponse, partitionHeldOut, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, preflightModels, printDriverSummary, index as profile, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatches, renderMarkdownReport, renderPlaybookMarkdown, replayScorerOverCorpus, replayTraceThroughJudge, resetLockedAppendersForTesting, resolveModelPricing, resolveSeat, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runDistillation, runE2EWorkflow, runExpectations, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runScore, runSelfPlay, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, seatPresets, securityJudge, sentenceReorderMutator, splitGold, statusAdvanced, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toOpenAiTool, toPrometheusText, traceContract, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyAttestation, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
5644
+ export { ATTESTATION_ALGORITHM, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, AgentProfile$1 as AgentProfile, type AgreementResult, type AlignmentOp, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AttestationProvenance, type AttestationVerification, type AttestedReport, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, type CachedJudge, type CachedJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateComparison, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChannelRollup, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, ConfigError, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractCheckResult, type ContractJudgeOptions, type ContractMetric, type ContractReport, type ContractRule, type ContractRuleKind, type ContractSpan, type ContractVerdict, type ContractViolation, ConvergenceTracker, CorrectnessChecker, type CostEntry, CostLedger, type CostReport, type CostSummary, CostTracker, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateExperimentInput, type CreateSandboxPoolOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_FINDERS, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, DefaultVerdict, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DescriptionLengthCandidate, type DescriptionLengthConfig, type DescriptionLengthDecision, type DescriptionLengthEvidence, DescriptionLengthGate, type DescriptionLengthRejectionCode, type DetectorEvent, type DetectorSeverity, type DetectorSignal, type DiffScorecardOptions, type DirEntry, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type EnsembleAggregate, type EnsembleJudgeOptions, type ErrorCountPattern, type ErrorStreakOptions, type EvalToolDef, EvalTraceStore, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type ExperimentProvenance, type ExperimentRep, type ExperimentStats, type ExperimentStore, ExperimentTracker, type ExperimentTrackerOptions, type ExperimentVerdict, type ExportedRewardModel, type ExtractOptions, type ExtractResult, type FactorContribution, type FactorialCell, FailureClass, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FileChange, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, HarnessConfig, type HeldOutPartition, HoldoutAuditor, type HttpGithubClientOptions, INTENT_MATCH_JUDGE_VERSION, type ImageData, type ImprovementThresholds, type ImprovementVerdictResult, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, JudgeError, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeParseError, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, type JudgeVerdict, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, LlmSpan, LockedJsonlAppender, MODEL_PRICING, type MakeEvalToolsConfig, type MatchResult, type MatcherResult, type MergeOptions, MetricsCollector, type ModelCostRollup, type ModelPreflight, type ModelSeats, ModelsUnreachableError, type MuffledFinder, type MuffledFinding, type MultiToolchainLayerConfig, type Mutator, Mutex, type NoProgressOptions, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParseStudentLabel, type PartitionHeldOutOptions, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type PreflightModelsOptions, type PreflightOutcome, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, type ProvenanceReader, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepeatedActionOptions, type RepoRef, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run, type RunCommandInput, type RunCommandResult, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunRecordBackend, type RunRecordFilter, RunScore, RunScoreWeights, RunSplitTag, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SeatName, type SeatPresetName, SeatUnsetError, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SerializedRegex, Severity, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, type SpanPredicate, type SplitGoldOptions, SteeringBundle, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type StepAttribution, type StreamingDetector, type SynthesisReason, type SynthesisTarget, TestResult, type TextMatcher, type ThresholdContract, TokenCounter, type TokenSpec, type TraceContract, TraceContractBuilder, TraceEmitter, TraceStore, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UI_FINDING_SEVERITIES, UI_LENSES, UNIVERSAL_FINDERS, type UiFinding, type UiFindingScreenshot, type UiFindingSeverity, type UiLens, type VerdictCacheStats, type VerdictCacheStore, VerifyContext, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkerDriverContext, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, aggregateJudgeVerdicts, aggregatePrReviewScore, analyzeAntiSlop, appendScorecard, assertCrossFamily, assertModelsServed, assertSingleBackend, assignHeldOutTag, attachCostToReport, attest, bisect, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildWorkerDriverSystemPrompt, cachedJudge, canaryLeakView, canonicalJson, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, checkTraceContracts, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, computeExperimentStats, contentHash, contractJudge, costReport, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createSandboxPool, crossTraceDiff, dataDescriptionBits, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffScorecard, discoverPersonas, distillPlaybook, ensembleJudge, errorStreakDetector, estimateCost, estimateTokens, evaluateContract, evaluateOracles, evaluateTraceContract, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, fieldAgreement, fileContains, fileExists, fileExperimentStore, fileVerdictCache, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, fnv1a32, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, gitProvenanceReader, precision as goldenPrecision, hashContent, hashToUnit, htmlContainsElement, httpGithubClient, improvementVerdict, inMemoryExperimentStore, inMemoryReferenceReplayStore, inMemoryRunRecordBackend, inMemoryVerdictCache, isModelPriced, isOtelConfigured, jsonShape, jsonlReferenceReplayStore, jsonlRunRecordBackend, judgeFamily, keyPreserved, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, makeEvalTools, matchGoldens, matchSpan, mergeLayerResults, modelDescriptionBits, multiToolchainLayer, noProgressDetector, notBlocked, observeAll, paraphraseRobustness, paraphraseRobustnessScenarios, parseGoldJsonl, parseReflectionResponse, partitionHeldOut, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, preflightModels, printDriverSummary, index as profile, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatches, renderMarkdownReport, renderPlaybookMarkdown, repeatedActionDetector, replayScorerOverCorpus, replayTraceThroughJudge, resetLockedAppendersForTesting, resolveModelPricing, resolveSeat, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runDistillation, runE2EWorkflow, runExpectations, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runScore, runSelfPlay, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, seatPresets, securityJudge, sentenceReorderMutator, splitGold, statusAdvanced, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toOpenAiTool, toPrometheusText, traceContract, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyAttestation, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  knowledgeReadinessTracePayload,
25
25
  scoreKnowledgeReadiness,
26
26
  userQuestionsForKnowledgeGaps
27
- } from "./chunk-3CKU6VGU.js";
27
+ } from "./chunk-Q2JRAWRI.js";
28
28
  import {
29
29
  assertRecordIntegrity,
30
30
  checkRecordIntegrity,
@@ -41,7 +41,7 @@ import {
41
41
  extractProducedState,
42
42
  parseCorrectnessResponse,
43
43
  verifyCompletion
44
- } from "./chunk-FIUKOSWI.js";
44
+ } from "./chunk-S6OZEZQK.js";
45
45
  import {
46
46
  DEFAULT_MUTATION_PRIMITIVES,
47
47
  DEFAULT_RED_TEAM_CORPUS,
@@ -154,15 +154,19 @@ import {
154
154
  runProposeReview,
155
155
  runProposeReviewAsControlLoop,
156
156
  scoreFromEvals
157
- } from "./chunk-RTWFUK6A.js";
157
+ } from "./chunk-E4GH6USR.js";
158
158
  import {
159
159
  allCriticalPassed,
160
+ errorStreakDetector,
161
+ noProgressDetector,
160
162
  objectiveEval,
163
+ observeAll,
164
+ repeatedActionDetector,
161
165
  runAgentControlLoop,
162
166
  stopOnNoProgress,
163
167
  stopOnRepeatedAction,
164
168
  subjectiveEval
165
- } from "./chunk-NCRFYPS3.js";
169
+ } from "./chunk-YEHAEDUD.js";
166
170
  import {
167
171
  assertReleaseConfidence,
168
172
  bootstrapCi,
@@ -1564,6 +1568,42 @@ Sign-off: respond with exactly "DONE" only when a ${persona.role} would act on t
1564
1568
 
1565
1569
  Output ONLY your next message to the agent \u2014 in character, first person, no meta-commentary, no stage directions.`;
1566
1570
  }
1571
+ function buildWorkerDriverSystemPrompt(ctx) {
1572
+ const harness = ctx.harness ?? "a coding agent";
1573
+ const brief = ctx.harnessBrief ? `
1574
+ This worker's harness (${harness}) can:
1575
+ ${ctx.harnessBrief}
1576
+ Drive it to USE these \u2014 and never ask for a capability it lacks.
1577
+ ` : `
1578
+ The worker runs in ${harness}. Drive it to exploit whatever its harness offers \u2014 parallel tool calls, sub-agents, run-to-completion \u2014 and never ask for a capability it lacks.
1579
+ `;
1580
+ const progress = ctx.progress ? `
1581
+ What the worker has done so far:
1582
+ ${ctx.progress}
1583
+ ` : "\nThe worker has not started yet \u2014 your first instruction sets the whole plan.\n";
1584
+ const context = ctx.context ? `
1585
+ Context:
1586
+ ${ctx.context}
1587
+ ` : "";
1588
+ return `You are a DRIVER: a meta-agent whose entire job is to drive a capable coding worker to ACHIEVE A GOAL by writing it precise, high-signal instructions. You do not do the work yourself \u2014 you direct the worker to do it, brilliantly, and you hold it to a standard it would not hold itself to.
1589
+
1590
+ The goal: ${ctx.goal}
1591
+ ${context}${brief}${progress}
1592
+ THE BAR \u2014 non-negotiable. Every instruction you write is dense, specific, and complete. You write the message a world-class engineering lead writes to a strong report: the exact next objective, the concrete sub-steps, what to do in parallel vs in sequence, what to verify and how, what "done" looks like, and the failure modes to avoid. A thin steer \u2014 "try again", "fix the issues", a single vague sentence \u2014 is a failure on YOUR part, not the worker's. Out-drive a human power-user.
1593
+
1594
+ HOW to drive (each turn):
1595
+ 1. Read what the worker actually did (its trace/state above), not what it claims. Find the real gap between here and the goal.
1596
+ 2. Decide the next objective \u2014 the largest correct step the worker can take now.
1597
+ 3. Decompose it: name the sub-tasks that can run IN PARALLEL (independent files/checks/searches) and tell the worker to fan them out (sub-agents / parallel tool calls where its harness allows); name what must run in SEQUENCE and why.
1598
+ 4. Make it exploit the harness: drive it to run to completion under its own autonomy, spawn sub-agents for separable work, use its tools/MCP, and not stop at the first plausible stopping point.
1599
+ 5. Specify verification: the exact command / test / check that proves the step landed, and tell it to run that and report the result \u2014 never accept "done" without the check.
1600
+ 6. Name the traps: the specific failure modes for THIS step (editing the wrong file, a check that passes vacuously, scope creep) and forbid them.
1601
+ 7. As the task gets harder, decompose MORE, not less \u2014 more parallel branches, deeper sub-agent trees, tighter verification.
1602
+
1603
+ COMPLETION: drive toward the goal's real acceptance check. Do not declare done \u2014 the deliverable's checker does. If the worker claims it is done, drive it to PROVE it with the check; if the check fails, drive the fix.
1604
+
1605
+ Output ONLY your next instruction to the worker \u2014 direct, detailed, actionable, in the first person as the driver. No meta-commentary, no preamble.`;
1606
+ }
1567
1607
  async function decideNextUserTurn(tc, opts) {
1568
1608
  const { persona, state, history, productContext = "", model = "claude-sonnet-4-6" } = opts;
1569
1609
  const lastResponse = history.length > 0 ? history[history.length - 1].content.slice(0, 2e3) : "(no conversation yet \u2014 this is the first message)";
@@ -10033,6 +10073,7 @@ export {
10033
10073
  buildTraceInsightContext,
10034
10074
  buildTraceInsightPrompt,
10035
10075
  buildTrajectory,
10076
+ buildWorkerDriverSystemPrompt,
10036
10077
  byteLengthRange,
10037
10078
  cachedJudge,
10038
10079
  calibrateJudge,
@@ -10122,6 +10163,7 @@ export {
10122
10163
  dominates,
10123
10164
  eProcess,
10124
10165
  ensembleJudge,
10166
+ errorStreakDetector,
10125
10167
  estimateCost,
10126
10168
  estimateTokens,
10127
10169
  euAiActReport,
@@ -10233,9 +10275,11 @@ export {
10233
10275
  mulberry32,
10234
10276
  multiToolchainLayer,
10235
10277
  nistAiRmfReport,
10278
+ noProgressDetector,
10236
10279
  normalizeScores,
10237
10280
  notBlocked,
10238
10281
  objectiveEval,
10282
+ observeAll,
10239
10283
  otelRunCompleteHook,
10240
10284
  otlpToRunRecords,
10241
10285
  otlpToTraceRunRecords,
@@ -10290,6 +10334,7 @@ export {
10290
10334
  renderPriorFindings,
10291
10335
  renderReleaseReport,
10292
10336
  renderSteeringText,
10337
+ repeatedActionDetector,
10293
10338
  replayFeedbackTrajectories,
10294
10339
  replayFeedbackTrajectory,
10295
10340
  replayScorerOverCorpus,