@tangle-network/agent-eval 0.122.5 → 0.122.6

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 CHANGED
@@ -4,6 +4,14 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
4
4
 
5
5
  ---
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ### Changed
10
+
11
+ - Keep one live tip per lineage track when another track branches or merges from it, and compare those track tips when building the frontier.
12
+ - Pass track identity, operation, vision, ancestry, and proposer choice to candidate generation so independent tracks can pursue distinct strategies.
13
+ - Route named tracks to caller-supplied proposers, with the default proposer as fallback, and make heuristic branches inherit their parent track's proposer.
14
+
7
15
  ## [0.122.2] — 2026-07-17 — premeasured optimization continuation
8
16
 
9
17
  ### Added
@@ -17,8 +17,8 @@ import {
17
17
  runBenchmarkAdapter,
18
18
  summarizeBenchmarkCampaign
19
19
  } from "../chunk-WULRYLNC.js";
20
- import "../chunk-GLUBGL77.js";
21
- import "../chunk-FLCXOTWF.js";
20
+ import "../chunk-67H37Q6I.js";
21
+ import "../chunk-YA6MJYZN.js";
22
22
  import "../chunk-FZ26ORA6.js";
23
23
  import "../chunk-EAWKAVID.js";
24
24
  import "../chunk-ARU2PZFM.js";
@@ -370,11 +370,12 @@ declare class Lineage {
370
370
  /** Distinct track ids, in first-seen (`seq`) order. */
371
371
  tracks(): string[];
372
372
  trackNodes(track: string): LineageNode[];
373
- /** The highest-`score` tip of a track (ties broken by lowest `seq`). */
373
+ /** Highest-scoring node without a child in the same track.
374
+ * A branch or merge into another track does not retire this track. */
374
375
  trackTip(track: string): LineageNode | undefined;
375
376
  /** The highest-`score` node overall (ties broken by lowest `seq`). */
376
377
  best(): LineageNode | undefined;
377
- /** The Pareto-non-dominated set among TIPS. Uses `scoreVector` when every
378
+ /** The Pareto-non-dominated set among current per-track tips. Uses `scoreVector` when every
378
379
  * compared tip carries one, else the scalar `score`. A dominates B iff A is
379
380
  * >= B on every component and > B on at least one. */
380
381
  frontier(): LineageNode[];
@@ -474,11 +475,17 @@ interface RunLineageOptions {
474
475
  track: string;
475
476
  proposer: string;
476
477
  tip: LineageNode;
478
+ operation: 'extend' | 'branch';
479
+ generation: number;
480
+ vision?: string;
477
481
  }) => Promise<RunLineageStepResult>;
478
482
  /** Collapse 2+ parent surfaces into one (GEPA crossover / LLM merge in real use). */
479
483
  merge: (args: {
480
484
  parents: LineageNode[];
481
485
  track: string;
486
+ proposer: string;
487
+ generation: number;
488
+ vision?: string;
482
489
  }) => Promise<Omit<RunLineageStepResult, 'gate'>>;
483
490
  governor: Governor;
484
491
  budget: {
@@ -1707,6 +1714,14 @@ interface ParetoParent {
1707
1714
  label?: string;
1708
1715
  rationale?: string;
1709
1716
  }
1717
+ /** The lineage track that requested a proposal. */
1718
+ interface ProposalTrackContext {
1719
+ id: string;
1720
+ operation: 'extend' | 'branch' | 'merge';
1721
+ proposer: string;
1722
+ vision?: string;
1723
+ parentTrackIds: readonly string[];
1724
+ }
1710
1725
  /** Exact measured state for the surface an optimizer is learning from.
1711
1726
  * Unlike a model-authored expected gain, every value here comes from a
1712
1727
  * completed campaign over the designed denominator. */
@@ -1761,6 +1776,8 @@ interface ProposeContext<TFindings = unknown> {
1761
1776
  populationSize: number;
1762
1777
  generation: number;
1763
1778
  signal: AbortSignal;
1779
+ /** Present when a multi-track lineage requests this proposal. */
1780
+ track?: ProposalTrackContext;
1764
1781
  /** Measured baseline for this optimization run. `runOptimization` always
1765
1782
  * supplies it; optional for standalone proposer callers. */
1766
1783
  baselineOutcome?: ScoredSurfaceOutcome;
@@ -5108,6 +5125,8 @@ interface RunLineageLoopOptions<TScenario extends Scenario, TArtifact> {
5108
5125
  /** Override the per-step proposer. Default {@link gepaProposer}. Inject a
5109
5126
  * pure stub to unit-test without an LLM. */
5110
5127
  proposer?: SurfaceProposer;
5128
+ /** Optional proposer implementations keyed by the labels carried by tracks. */
5129
+ proposers?: Readonly<Record<string, SurfaceProposer>>;
5111
5130
  /** Override how a surface is scored into a DAG-node fitness. Default is a
5112
5131
  * {@link runCampaign} pass over `holdoutScenarios ?? scenarios`. Inject a
5113
5132
  * deterministic function to unit-test without a campaign. */
@@ -7506,4 +7525,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
7506
7525
  * identity against the checkout at `worktreeRef`. */
7507
7526
  declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
7508
7527
 
7509
- export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, LineageStoreConflictError, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignLineageStore, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, canonicalDigest, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };
7528
+ export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, LineageStoreConflictError, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposalTrackContext, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignLineageStore, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, canonicalDigest, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };
@@ -68,7 +68,7 @@ import {
68
68
  userStoryScoreboard,
69
69
  validateSearchLedgerEvent,
70
70
  verifyCodeSurface
71
- } from "../chunk-GLUBGL77.js";
71
+ } from "../chunk-67H37Q6I.js";
72
72
  import {
73
73
  assertCodeSurfaceIdentity,
74
74
  buildEvidenceVector,
@@ -109,7 +109,7 @@ import {
109
109
  surfaceContentHash,
110
110
  surfaceHash,
111
111
  verifyLoopProvenanceRecord
112
- } from "../chunk-FLCXOTWF.js";
112
+ } from "../chunk-YA6MJYZN.js";
113
113
  import {
114
114
  SearchLedgerConflictError,
115
115
  SearchLedgerError,
@@ -15,7 +15,7 @@ import {
15
15
  runImprovementLoop,
16
16
  surfaceContentHash,
17
17
  surfaceHash
18
- } from "./chunk-FLCXOTWF.js";
18
+ } from "./chunk-YA6MJYZN.js";
19
19
  import {
20
20
  SearchLedgerConflictError,
21
21
  SearchLedgerError,
@@ -227,19 +227,26 @@ var Lineage = class _Lineage {
227
227
  trackNodes(track) {
228
228
  return this.all().filter((n) => n.track === track);
229
229
  }
230
- /** The highest-`score` tip of a track (ties broken by lowest `seq`). */
230
+ /** Highest-scoring node without a child in the same track.
231
+ * A branch or merge into another track does not retire this track. */
231
232
  trackTip(track) {
232
- return pickBest(this.tips().filter((n) => n.track === track));
233
+ return pickBest(
234
+ this.trackNodes(track).filter(
235
+ (node) => (this.childIds.get(node.id) ?? []).every(
236
+ (childId) => this.byId.get(childId)?.track !== track
237
+ )
238
+ )
239
+ );
233
240
  }
234
241
  /** The highest-`score` node overall (ties broken by lowest `seq`). */
235
242
  best() {
236
243
  return pickBest(this.all());
237
244
  }
238
- /** The Pareto-non-dominated set among TIPS. Uses `scoreVector` when every
245
+ /** The Pareto-non-dominated set among current per-track tips. Uses `scoreVector` when every
239
246
  * compared tip carries one, else the scalar `score`. A dominates B iff A is
240
247
  * >= B on every component and > B on at least one. */
241
248
  frontier() {
242
- const tips = this.tips();
249
+ const tips = this.tracks().map((track) => this.trackTip(track)).filter((node) => node !== void 0);
243
250
  const useVector = tips.length > 0 && tips.every((n) => n.scoreVector !== void 0);
244
251
  const vecOf = (n) => useVector ? n.scoreVector : [n.score];
245
252
  return tips.filter((a) => !tips.some((b) => b.id !== a.id && dominates(vecOf(b), vecOf(a)))).sort(bySeq);
@@ -421,7 +428,7 @@ function heuristicGovernor(opts = {}) {
421
428
  op: "branch",
422
429
  fromNodeId: leader.id,
423
430
  track: `${leader.track}+${lineage.tracks().length}`,
424
- proposer: "gepa"
431
+ proposer: leader.proposer
425
432
  };
426
433
  }
427
434
  if (leader) return { op: "extend", track: leader.track };
@@ -521,13 +528,23 @@ async function runLineage(opts) {
521
528
  steps += 1;
522
529
  continue;
523
530
  }
524
- const result2 = await opts.merge({ parents, track: op.track });
531
+ const target = parents.find((parent) => parent.track === op.track) ?? pickBest(parents);
532
+ const proposer2 = trackProposer.get(op.track) ?? target.proposer;
533
+ const vision = target.vision;
534
+ const result2 = await opts.merge({
535
+ parents,
536
+ track: op.track,
537
+ proposer: proposer2,
538
+ generation: Math.max(...parents.map((parent) => parent.generation)) + 1,
539
+ ...vision !== void 0 ? { vision } : {}
540
+ });
525
541
  const node2 = lineage.merge({
526
542
  parentIds: parents.map((p) => p.id),
527
543
  track: op.track,
528
544
  surface: result2.surface,
529
545
  score: result2.score,
530
- ...parents[0].vision !== void 0 ? { vision: parents[0].vision } : {},
546
+ proposer: proposer2,
547
+ ...vision !== void 0 ? { vision } : {},
531
548
  ...result2.scoreVector !== void 0 ? { scoreVector: result2.scoreVector } : {},
532
549
  ...result2.rationale !== void 0 ? { rationale: result2.rationale } : {}
533
550
  });
@@ -548,14 +565,22 @@ async function runLineage(opts) {
548
565
  continue;
549
566
  }
550
567
  trackProposer.set(op.track, op.proposer);
551
- const result2 = await opts.step({ track: op.track, proposer: op.proposer, tip: from });
568
+ const vision = op.vision ?? from.vision;
569
+ const result2 = await opts.step({
570
+ track: op.track,
571
+ proposer: op.proposer,
572
+ tip: from,
573
+ operation: "branch",
574
+ generation: from.generation + 1,
575
+ ...vision !== void 0 ? { vision } : {}
576
+ });
552
577
  const node2 = lineage.addNode({
553
578
  parentIds: [from.id],
554
579
  track: op.track,
555
580
  surface: result2.surface,
556
581
  score: result2.score,
557
582
  proposer: op.proposer,
558
- ...op.vision !== void 0 ? { vision: op.vision } : {},
583
+ ...vision !== void 0 ? { vision } : {},
559
584
  ...result2.scoreVector !== void 0 ? { scoreVector: result2.scoreVector } : {},
560
585
  ...result2.rationale !== void 0 ? { rationale: result2.rationale } : {},
561
586
  ...result2.gate !== void 0 ? { gate: result2.gate } : {}
@@ -576,7 +601,14 @@ async function runLineage(opts) {
576
601
  continue;
577
602
  }
578
603
  const proposer = trackProposer.get(op.track) ?? tip.proposer;
579
- const result = await opts.step({ track: op.track, proposer, tip });
604
+ const result = await opts.step({
605
+ track: op.track,
606
+ proposer,
607
+ tip,
608
+ operation: "extend",
609
+ generation: tip.generation + 1,
610
+ ...tip.vision !== void 0 ? { vision: tip.vision } : {}
611
+ });
580
612
  const node = lineage.addNode({
581
613
  parentIds: [tip.id],
582
614
  track: op.track,
@@ -4305,21 +4337,25 @@ async function runLineageLoop(opts) {
4305
4337
  if (!Number.isInteger(candidateConcurrency) || candidateConcurrency < 1) {
4306
4338
  throw new Error("runLineageLoop: candidateConcurrency must be a positive integer");
4307
4339
  }
4308
- let proposer = opts.proposer;
4309
- if (!proposer) {
4310
- if (!opts.llm || !opts.model) {
4311
- throw new Error(
4312
- "runLineageLoop: a proposer is required \u2014 either inject `proposer`, or provide `llm` + `model` for the default gepaProposer."
4313
- );
4314
- }
4315
- proposer = gepaProposer({
4340
+ let defaultProposer = opts.proposer;
4341
+ if (!defaultProposer && opts.llm && opts.model) {
4342
+ defaultProposer = gepaProposer({
4316
4343
  llm: opts.llm,
4317
4344
  model: opts.model,
4318
4345
  target: opts.target ?? "agent surface",
4319
- // GEPA combine-complementary-lessons is what the `merge` seam relies on.
4320
4346
  combineParents: true
4321
4347
  });
4322
4348
  }
4349
+ if (!defaultProposer && !opts.proposers) {
4350
+ throw new Error(
4351
+ "runLineageLoop: a proposer is required \u2014 inject `proposer` or `proposers`, or provide `llm` + `model` for the default gepaProposer."
4352
+ );
4353
+ }
4354
+ const proposerFor = (name) => {
4355
+ const resolved = opts.proposers?.[name] ?? defaultProposer;
4356
+ if (!resolved) throw new Error(`runLineageLoop: no proposer is registered for '${name}'`);
4357
+ return resolved;
4358
+ };
4323
4359
  const scoringScenarios = opts.holdoutScenarios ?? opts.scenarios;
4324
4360
  let scoreSurface = opts.scoreSurface;
4325
4361
  if (!scoreSurface) {
@@ -4382,14 +4418,21 @@ async function runLineageLoop(opts) {
4382
4418
  };
4383
4419
  });
4384
4420
  const step = async (args) => {
4385
- const proposed = await proposer.propose({
4421
+ const proposed = await proposerFor(args.proposer).propose({
4386
4422
  currentSurface: args.tip.surface,
4387
4423
  history: [],
4388
4424
  findings: [],
4389
4425
  populationSize,
4390
- generation: 0,
4426
+ generation: args.generation,
4391
4427
  signal: new AbortController().signal,
4392
- paretoParents: []
4428
+ paretoParents: [],
4429
+ track: {
4430
+ id: args.track,
4431
+ operation: args.operation,
4432
+ proposer: args.proposer,
4433
+ parentTrackIds: [args.tip.track],
4434
+ ...args.vision !== void 0 ? { vision: args.vision } : {}
4435
+ }
4393
4436
  });
4394
4437
  const pool = [
4395
4438
  {
@@ -4434,7 +4477,7 @@ async function runLineageLoop(opts) {
4434
4477
  composite: node.score,
4435
4478
  generation: node.generation
4436
4479
  }));
4437
- const proposed = await proposer.propose({
4480
+ const proposed = await proposerFor(args.proposer).propose({
4438
4481
  currentSurface: ordered[0].surface,
4439
4482
  history: [],
4440
4483
  findings: [],
@@ -4442,9 +4485,16 @@ async function runLineageLoop(opts) {
4442
4485
  // paretoParents has > 1 string member.
4443
4486
  populationSize: 1,
4444
4487
  // generation >= 1 keeps the combine slot semantically a "merge" step.
4445
- generation: 1,
4488
+ generation: args.generation,
4446
4489
  signal: new AbortController().signal,
4447
- paretoParents
4490
+ paretoParents,
4491
+ track: {
4492
+ id: args.track,
4493
+ operation: "merge",
4494
+ proposer: args.proposer,
4495
+ parentTrackIds: [...new Set(ordered.map((parent) => parent.track))],
4496
+ ...args.vision !== void 0 ? { vision: args.vision } : {}
4497
+ }
4448
4498
  });
4449
4499
  const first = proposed[0];
4450
4500
  const merged = first ? toCandidate(first) : { surface: ordered[0].surface };
@@ -8210,4 +8260,4 @@ export {
8210
8260
  verifyCodeSurface,
8211
8261
  resolveWorktreePath
8212
8262
  };
8213
- //# sourceMappingURL=chunk-GLUBGL77.js.map
8263
+ //# sourceMappingURL=chunk-67H37Q6I.js.map