From 3e0e82a3f5bc7a1dfcc13c40b73f60cb4d9b71c1 Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Tue, 18 Aug 2026 14:02:22 -0600 Subject: [PATCH 1/3] feat(release): require a version bump for a manifest or export change --- .github/workflows/ci.yml | 4 + api-surface.json | 3485 ++++++++++++++++++++++++++++++ package.json | 9 +- pnpm-lock.yaml | 183 +- scripts/check-api-surface.mjs | 229 ++ scripts/check-version-bump.mjs | 511 +++++ scripts/lib/api-surface.mjs | 295 +++ tests/version-bump-check.test.ts | 634 ++++++ 8 files changed, 5249 insertions(+), 101 deletions(-) create mode 100644 api-surface.json create mode 100644 scripts/check-api-surface.mjs create mode 100644 scripts/check-version-bump.mjs create mode 100644 scripts/lib/api-surface.mjs create mode 100644 tests/version-bump-check.test.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb244a04..770a5be6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + with: + # check:version-bump diffs this branch against the merge base, so the + # base commit has to be in the clone. + fetch-depth: 0 - uses: pnpm/action-setup@v6 diff --git a/api-surface.json b/api-surface.json new file mode 100644 index 00000000..9267f0d8 --- /dev/null +++ b/api-surface.json @@ -0,0 +1,3485 @@ +{ + "package": "@tangle-network/agent-eval", + "entries": { + ".": { + "AGENT_PROFILE_KINDS": "value", + "ActionExecutionPolicy": "type", + "ActionPolicyDecision": "type", + "ActionableSideInfo": "type", + "ActiveLearningOptions": "type", + "AgentEvalError": "value", + "AgentEvalErrorCode": "type", + "AgentProfile": "type", + "AgentProfileCell": "type", + "AgentProfileCellInput": "type", + "AgentProfileDimensionValue": "type", + "AgentProfileJson": "type", + "AgentProfileSourceInput": "type", + "Analyst": "type", + "AnalystContext": "type", + "AnalystFeedbackTrajectoryOptions": "type", + "AnalystFinding": "type", + "AnalystFindingDigest": "type", + "AnalystRegistry": "value", + "AnalystRegistryOptions": "type", + "AnalystReviewDecision": "type", + "AnalystReviewRequest": "type", + "AnalystRunDigest": "type", + "AnalystRunEvent": "type", + "AnalystRunInputs": "type", + "AnalystRunResult": "type", + "AnalystRunSummary": "type", + "AnalystSeverity": "type", + "AnalystUsageReceipt": "type", + "AnalyzeRunsOptions": "type", + "AnalyzeTracesResult": "type", + "Artifact": "type", + "ArtifactEventLike": "type", + "AssertCapabilityHeadroomOptions": "type", + "AssertCrossFamilyOptions": "type", + "AssertCrossFamilyServedOptions": "type", + "AssertServedModelOptions": "type", + "AssertSingleBackendOptions": "type", + "BOOTSTRAP_GATE_MIN_N": "value", + "BackendDescriptor": "type", + "BackendIntegrityError": "value", + "BackendIntegrityReport": "type", + "BenchmarkEvaluation": "type", + "BlendWeights": "type", + "BootstrapOptions": "type", + "BootstrapResult": "type", + "BudgetBreachError": "value", + "BudgetGuard": "value", + "BudgetLedgerEntry": "type", + "BudgetPolicy": "type", + "BudgetSpec": "type", + "CODING_HARNESSES": "value", + "CalibrationResult": "type", + "CampaignCellFailureReceipt": "type", + "CampaignFactoryParams": "type", + "CampaignIntegrityPolicy": "type", + "CampaignResult": "type", + "CampaignRunContext": "type", + "CampaignRunOutcome": "type", + "CampaignScenario": "type", + "CampaignVariant": "type", + "CanaryAlert": "type", + "CanaryEvaluation": "type", + "CanaryKind": "type", + "CanaryLeak": "type", + "CanaryOptions": "type", + "CanaryReport": "type", + "CandidateScore": "type", + "CapabilityHeadroomOptions": "type", + "CapabilityHeadroomResult": "type", + "CellVerdict": "type", + "ChannelRollup": "type", + "ChatCallOpts": "type", + "ChatClient": "type", + "ChatRequest": "type", + "ChatResponse": "type", + "CheckResult": "type", + "CheckerIdentity": "type", + "CheckerOutcome": "type", + "CliffsMagnitude": "type", + "CommandRunner": "type", + "ComparePairedArmsOptions": "type", + "CompletionCriterion": "type", + "CompletionRequirement": "type", + "CompletionVerdict": "type", + "ConceptFinding": "type", + "ConceptSpec": "type", + "ConfigError": "value", + "ContinuousAgreement": "type", + "ContinuousAgreementOptions": "type", + "ContinuousCalibrationResult": "type", + "ContractCheckResult": "type", + "ContractSpan": "type", + "ContractVerdict": "type", + "ControlActionOutcome": "type", + "ControlBudget": "type", + "ControlContext": "type", + "ControlDecision": "type", + "ControlEvalResult": "type", + "ControlRunResult": "type", + "ControlRuntimeConfig": "type", + "ControlRuntimeError": "type", + "ControlStep": "type", + "CorpusAgreementOptions": "type", + "CorpusAgreementPerDimension": "type", + "CorpusAgreementReport": "type", + "CorpusScoreRecord": "type", + "CorrectnessChecker": "type", + "CostAccountingIncompleteError": "value", + "CostCallConflictError": "value", + "CostCeilingReachedError": "value", + "CostChannel": "type", + "CostEntry": "type", + "CostLedger": "value", + "CostLedgerFilter": "type", + "CostLedgerHandle": "type", + "CostLedgerOptions": "type", + "CostLedgerPersistence": "type", + "CostLedgerPersistenceError": "value", + "CostLedgerSummary": "type", + "CostProvenance": "type", + "CostReceipt": "type", + "CostReceiptCaptureError": "value", + "CostReceiptInput": "type", + "CostReservationExceededError": "value", + "CostResult": "type", + "CostSummary": "type", + "CostTracker": "value", + "CostUsage": "type", + "CounterfactualContext": "type", + "CounterfactualMutation": "type", + "CounterfactualResult": "type", + "CounterfactualRunner": "type", + "CreateChatClientOpts": "type", + "CreateTraceAnalystOptions": "type", + "CrossFamilyError": "value", + "CustomTokenPricing": "type", + "DECISION_PAIRED_DELTA_STATISTIC": "value", + "DEFAULT_PERMUTATIONS": "value", + "DEFAULT_REDACTION_RULES": "value", + "DEFAULT_RED_TEAM_CORPUS": "value", + "DEFAULT_TRACE_ANALYST_BUDGETS": "value", + "DEFAULT_TRACE_ANALYST_KINDS": "value", + "DataAcquisitionPlan": "type", + "DatasetManifest": "type", + "DatasetOverview": "type", + "DatasetScenario": "type", + "DatasetSplit": "type", + "DefaultAnalystRegistryOptions": "type", + "DefaultVerdict": "type", + "DefineAgentEvalOptions": "type", + "DefinedAgentEval": "type", + "DeployGateLayerInput": "type", + "DeployRunResult": "type", + "DeployRunner": "type", + "DetectorEvent": "type", + "DetectorSignal": "type", + "DiffPolicy": "type", + "DiffScorecardOptions": "type", + "DirEntry": "type", + "DiscoverPersonasOptions": "type", + "DiscoveredPersona": "type", + "DriverState": "type", + "DspyRlmTraceEngineOptions": "type", + "EProcess": "type", + "EProcessOptions": "type", + "EProcessState": "type", + "EProcessStep": "type", + "ERROR_COUNT_PATTERNS": "value", + "EnsembleAggregate": "type", + "EnsembleJudgeOptions": "type", + "EquivalenceArm": "type", + "EquivalenceCheckDefinition": "type", + "EquivalenceCheckSpec": "type", + "EquivalenceChecker": "type", + "EquivalenceCheckerInput": "type", + "EquivalenceCheckerResult": "type", + "EquivalenceObligation": "type", + "EquivalenceObligationStatus": "type", + "EquivalenceProtocolError": "value", + "EquivalenceRecord": "type", + "ErrorCluster": "type", + "ErrorCountPattern": "type", + "ErrorStreakOptions": "type", + "EvalCampaignOptions": "type", + "EvalCampaignResult": "type", + "EventFilter": "type", + "EvidenceRef": "type", + "ExactAnalystRunEvent": "type", + "ExactAnalystRunResult": "type", + "ExactCapableAnalyst": "type", + "ExactRegistryRunOpts": "type", + "ExactRiskDifferenceResult": "type", + "ExperimentPlan": "type", + "ExperimentRep": "type", + "ExperimentResult": "type", + "ExperimentStats": "type", + "ExtractOptions": "type", + "ExtractResult": "type", + "ExtractedUsage": "type", + "FAILURE_CLASSES": "value", + "FAILURE_MODE_KIND_SPEC": "value", + "FailedRun": "type", + "FailureClass": "type", + "FailureClassification": "type", + "FailureContext": "type", + "FailureMode": "type", + "FailureRule": "type", + "FeedbackArtifactType": "type", + "FeedbackAttempt": "type", + "FeedbackLabel": "type", + "FeedbackLabelKind": "type", + "FeedbackLabelSource": "type", + "FeedbackOptimizerRow": "type", + "FeedbackOutcome": "type", + "FeedbackSplitPolicy": "type", + "FeedbackTask": "type", + "FeedbackTrajectory": "type", + "FeedbackTrajectoryFilter": "type", + "FeedbackTrajectoryStore": "type", + "FieldDestination": "type", + "FileSystemFeedbackTrajectoryStore": "value", + "FileSystemRawProviderSink": "value", + "FileSystemTraceStore": "value", + "Finding": "type", + "FindingSubject": "type", + "FindingSubjectKind": "type", + "FindingsDiff": "type", + "FindingsStore": "value", + "GainDistributionBin": "type", + "GainDistributionFigureSpec": "type", + "GainDistributionOptions": "type", + "GateDecision": "type", + "GateEvidence": "type", + "GenericSpan": "type", + "GoldenItem": "type", + "HARNESS_NATIVE_MODEL": "value", + "HarnessType": "type", + "HeadroomInput": "type", + "HeldOutGate": "value", + "HeldOutGateConfig": "type", + "HeldOutGateRejectionCode": "type", + "HeldOutPartition": "type", + "HiddenCriteriaGrader": "type", + "HiddenGradeResult": "type", + "HiddenLeak": "type", + "ImprovementThresholds": "type", + "ImprovementVerdictResult": "type", + "InMemoryFeedbackTrajectoryStore": "value", + "InMemoryRawProviderSink": "value", + "InMemoryTraceStore": "value", + "InsightReport": "type", + "IntentMatchInput": "type", + "IntentMatchOptions": "type", + "IntentMatchResult": "type", + "InterimReleaseConfidence": "type", + "InterimReleaseConfidenceInput": "type", + "JudgeError": "value", + "JudgeFamily": "type", + "JudgeRetryOutcome": "type", + "JudgeRetryPolicy": "type", + "JudgeRubric": "type", + "JudgeScore": "type", + "JudgeScoreInput": "type", + "JudgeScoresRecord": "type", + "JudgeSpan": "type", + "JudgeVerdict": "type", + "KeywordConceptSpec": "type", + "KeywordCoverageFinding": "type", + "KeywordCoverageOptions": "type", + "KeywordCoverageResult": "type", + "KnowledgeAcquisitionMode": "type", + "KnowledgeBundle": "type", + "KnowledgeFreshness": "type", + "KnowledgeImportance": "type", + "KnowledgeReadinessReport": "type", + "KnowledgeRequirement": "type", + "KnowledgeRequirementCategory": "type", + "KnowledgeSensitivity": "type", + "Layer": "type", + "LayerResult": "type", + "LayerStatus": "type", + "LeaderboardOptions": "type", + "LeaderboardRow": "type", + "LlmCallError": "value", + "LlmCallMetadata": "type", + "LlmCallRequest": "type", + "LlmCallResult": "type", + "LlmClient": "value", + "LlmClientOptions": "type", + "LlmCorrectnessCheckerOpts": "type", + "LlmJudgeOptions": "type", + "LlmMessage": "type", + "LlmResponseError": "value", + "LlmReviewerConfig": "type", + "LlmRouteRequirements": "type", + "LlmSpan": "type", + "MANN_WHITNEY_EXACT_MAX_STATES": "value", + "MANN_WHITNEY_EXACT_MAX_WORK": "value", + "MODEL_PRICING": "value", + "MannWhitneyResult": "type", + "MatchedPair": "type", + "MatchedRunRecordPair": "type", + "MaximumCharge": "type", + "McNemarResult": "type", + "MintRolloutOptions": "type", + "MintRolloutResult": "type", + "MintedRolloutLine": "type", + "ModelSeats": "type", + "ModelSubstitutionError": "value", + "MultiLayerVerifier": "value", + "NoLeakOptions": "type", + "NoopRawProviderSink": "value", + "NotFoundError": "value", + "OUTPUT_VALUE": "value", + "Objective": "type", + "Oracle": "type", + "OracleObservation": "type", + "OracleReport": "type", + "OracleResult": "type", + "OtlpExport": "type", + "OtlpFileTraceStore": "value", + "OtlpFlatLine": "type", + "OtlpSpan": "type", + "PaidCallResult": "type", + "PairArmsOptions": "type", + "PairArmsResult": "type", + "PairRunRecordsResult": "type", + "PairedArmRow": "type", + "PairedArmsComparison": "type", + "PairedBootstrapOptions": "type", + "PairedBootstrapResult": "type", + "PairedCorrectness": "type", + "PairedDecisionMethod": "type", + "PairedDecisionShape": "type", + "PairedDecisionStatistic": "type", + "PairedDeltaTestOptions": "type", + "PairedDeltaTestResult": "type", + "PairedEvalueOptions": "type", + "PairedEvalueSequence": "type", + "PairedEvalueStep": "type", + "PairedMcNemarEvidence": "type", + "PairedMetricDelta": "type", + "PairedPromotionDecision": "type", + "PairedPromotionDecisionOptions": "type", + "PairedSignTestResult": "type", + "PairedTTestResult": "type", + "PairwiseSteeringOptimizer": "value", + "ParetoPoint": "type", + "ParetoResult": "type", + "PartitionHeldOutOptions": "type", + "PendingCostCall": "type", + "PendingCostCallView": "type", + "PersistedFinding": "type", + "PersonaConfig": "type", + "PreferenceMemoryEntry": "type", + "ProducedProposal": "type", + "ProducedState": "type", + "ProductBenchmarkExportOptions": "type", + "ProductBenchmarkExportResult": "type", + "ProductBenchmarkManifest": "type", + "ProductBenchmarkSingleRunExportOptions": "type", + "ProductBenchmarkSplit": "type", + "ProductBenchmarkValidationReport": "type", + "ProductClient": "value", + "ProductClientConfig": "type", + "ProfileAxisSpec": "type", + "ProjectRuntimeTrajectoryEvidenceOptions": "type", + "PromptHandle": "type", + "PromptRegistry": "value", + "ProportionInterval": "type", + "ProposalEventLike": "type", + "ProposalFinding": "type", + "ProposeFn": "type", + "ProposeInput": "type", + "ProposeOutput": "type", + "ProposeReviewConfig": "type", + "ProposeReviewControlAction": "type", + "ProposeReviewControlConfig": "type", + "ProposeReviewControlResult": "type", + "ProposeReviewControlState": "type", + "ProposeReviewReport": "type", + "ProposedSideEffect": "type", + "QueryTracesPage": "type", + "REDACTION_VERSION": "value", + "RankTestMethod": "type", + "RankTestMethodRequest": "type", + "RankTestOptions": "type", + "RawAnalystFinding": "type", + "RawProviderEvent": "type", + "RawProviderSink": "type", + "RecordRunsOptions": "type", + "RedTeamCase": "type", + "RedTeamCategory": "type", + "RedTeamFinding": "type", + "RedTeamReport": "type", + "RedactionRule": "type", + "ReferenceReplayCaseRun": "type", + "ReferenceReplayRun": "type", + "ReferenceReplaySplit": "type", + "ReflectionContext": "type", + "ReflectionProposal": "type", + "RegistryRunOpts": "type", + "ReleaseConfidenceInput": "type", + "ReleaseConfidenceIssue": "type", + "ReleaseConfidenceMetrics": "type", + "ReleaseConfidenceScorecard": "type", + "ReleaseTraceEvidence": "type", + "RepeatedActionOptions": "type", + "RequirementCheck": "type", + "ResearchReport": "type", + "ResearchReportOptions": "type", + "Researcher": "type", + "Review": "type", + "ReviewFn": "type", + "ReviewInput": "type", + "ReviewMemoryEntry": "type", + "ReviewMemoryStore": "type", + "RiskDifferenceResult": "type", + "RouteMap": "type", + "RoutedField": "type", + "Run": "type", + "RunCampaignOptions": "type", + "RunCommandInput": "type", + "RunCommandResult": "type", + "RunCostProvenance": "type", + "RunFilter": "type", + "RunIntegrityError": "value", + "RunIntegrityReport": "type", + "RunJudgeMetadata": "type", + "RunOutcome": "type", + "RunPaidCallInput": "type", + "RunRecord": "type", + "RunRecordBackend": "type", + "RunRecordValidationError": "value", + "RunScore": "type", + "RunScoreWeights": "type", + "RunSplitTag": "type", + "RunStatus": "type", + "RunTaskFailure": "type", + "RunTerminalOutcome": "type", + "RunTokenUsage": "type", + "RuntimeEventLike": "type", + "RuntimeTrajectoryEvidenceProjection": "type", + "RuntimeTrajectoryEvidenceSummary": "type", + "RuntimeTrajectoryHookEvent": "type", + "RuntimeTrajectoryRecord": "type", + "RuntimeTrajectoryRunRecord": "type", + "SEMANTIC_CONCEPT_JUDGE_VERSION": "value", + "SandboxDriver": "type", + "SatisfiedBy": "type", + "Scenario": "type", + "ScenarioCost": "type", + "ScorePreference": "type", + "ScoreRiskDifferenceResult": "type", + "Scorecard": "type", + "ScorecardCell": "type", + "ScorecardCellDiff": "type", + "ScorecardDiff": "type", + "ScorecardEntry": "type", + "ScorecardLogLine": "type", + "SearchSpanResult": "type", + "SearchTraceResult": "type", + "SelfImproveOptions": "type", + "SelfImproveResult": "type", + "SemanticConceptJudgeInput": "type", + "SemanticConceptJudgeOptions": "type", + "SemanticConceptJudgeResult": "type", + "SequentialDecision": "type", + "SeriesConvergenceOptions": "type", + "SeriesConvergenceResult": "type", + "ServedCrossFamilyError": "value", + "ServedModelCheck": "type", + "ServedModelVerdict": "type", + "Severity": "type", + "SignTestAlternative": "type", + "SingleBackendDivergence": "type", + "SingleBackendReport": "type", + "Span": "type", + "SpanFilter": "type", + "SpanHandle": "type", + "SpanMatchRecord": "type", + "SplitCoverage": "type", + "SteeringBundle": "type", + "SteeringChange": "type", + "SteeringOptimizationResult": "type", + "SteeringOptimizationRow": "type", + "StopDecision": "type", + "StrategyChecker": "type", + "StreamingDetector": "type", + "SummaryTable": "type", + "SummaryTableOptions": "type", + "SummaryTableRow": "type", + "SynthesisTarget": "type", + "TRACE_ANALYST_TRUNCATION_MARKER_PREFIX": "value", + "TaskGold": "type", + "TaskHeadroom": "type", + "ToolCallEventLike": "type", + "ToolSpan": "type", + "ToolStats": "type", + "ToolUseMetrics": "type", + "ToolUseOptions": "type", + "TraceAnalysisEngine": "type", + "TraceAnalysisEngineResult": "type", + "TraceAnalysisStore": "type", + "TraceAnalystByteBudgets": "type", + "TraceAnalystDefinition": "type", + "TraceAnalystFilters": "type", + "TraceAnalystSpan": "type", + "TraceAnalystSpanKind": "type", + "TraceAnalystSpanStatus": "type", + "TraceAnalystTraceSummary": "type", + "TraceContract": "type", + "TraceEmitter": "value", + "TraceEvent": "type", + "TraceInsightReadiness": "type", + "TraceInsightSuite": "type", + "TraceStore": "type", + "Trajectory": "type", + "TrajectoryStep": "type", + "TreatmentGate": "type", + "TreatmentGateInput": "type", + "TreatmentGateOptions": "type", + "TrialTrace": "type", + "UNKNOWN_MODEL": "value", + "UserQuestion": "type", + "VERIFICATION_STRATEGIES": "value", + "VERIFICATION_STRATEGY_SOURCES": "value", + "ValidationError": "value", + "VerbosityBiasResult": "type", + "Verdict": "type", + "VerdictCacheStore": "type", + "VerdictCertification": "type", + "Verification": "type", + "VerificationReport": "type", + "VerificationStrategyProfile": "type", + "VerificationStrategySource": "type", + "VerifyFn": "type", + "VerifyOptions": "type", + "ViewSpansResult": "type", + "ViewTraceOversized": "type", + "ViewTraceResult": "type", + "ViteDeployRunnerInput": "type", + "WILCOXON_EXACT_MAX_N": "value", + "WeightedCompositeInput": "type", + "WeightedCompositeResult": "type", + "WilcoxonSignedRankResult": "type", + "WranglerDeployRunnerInput": "type", + "acquisitionPlansForKnowledgeGaps": "value", + "agentProfileCellHashMaterial": "value", + "agentProfileCellKey": "value", + "agentProfileHash": "value", + "agentProfileId": "value", + "aggregateJudgeVerdicts": "value", + "aggregateRunScore": "value", + "analystFindingDigest": "value", + "analystRunDigest": "value", + "analystRunToFeedbackTrajectory": "value", + "analystRunToReviewRequests": "value", + "analyzeAntiSlop": "value", + "analyzeRuns": "value", + "analyzeSeries": "value", + "analyzeTraces": "value", + "argHash": "value", + "assertCapabilityHeadroom": "value", + "assertCrossFamily": "value", + "assertCrossFamilyServed": "value", + "assertLlmRoute": "value", + "assertNoHiddenLeak": "value", + "assertProductBenchmarkRun": "value", + "assertRealBackend": "value", + "assertRunCaptured": "value", + "assertServedModel": "value", + "assertServedModels": "value", + "assertSingleBackend": "value", + "assignFeedbackSplit": "value", + "benjaminiHochberg": "value", + "blendHeldout": "value", + "blockingKnowledgeEval": "value", + "bonferroni": "value", + "bootstrapCi": "value", + "budgetBreachView": "value", + "buildAgentProfileCell": "value", + "buildDefaultAnalystRegistry": "value", + "buildEquivalenceRecord": "value", + "buildReflectionPrompt": "value", + "buildTraceInsightContext": "value", + "buildTraceInsightPrompt": "value", + "buildTrajectory": "value", + "calibrateJudge": "value", + "calibrateJudgeContinuous": "value", + "callLlm": "value", + "callLlmJson": "value", + "canonicalJson": "value", + "canonicalize": "value", + "capabilityHeadroom": "value", + "captureFetchToRawSink": "value", + "certificationEvidenceDigest": "value", + "checkCanaries": "value", + "checkServedModel": "value", + "checkTraceContracts": "value", + "clamp01": "value", + "classifyFailure": "value", + "cliffsDelta": "value", + "cohensD": "value", + "comparePairedArms": "value", + "completionVerdict": "value", + "computeExperimentStats": "value", + "computeFindingId": "value", + "computeToolUseMetrics": "value", + "confidenceInterval": "value", + "contentHash": "value", + "continuousAgreement": "value", + "controlRunToFeedbackTrajectory": "value", + "corpusInterRaterAgreement": "value", + "corpusInterRaterAgreementFromJudgeScores": "value", + "costForTokenPricing": "value", + "costForUsage": "value", + "costReceiptFromLlm": "value", + "costReceiptFromLlmError": "value", + "createAntiSlopJudge": "value", + "createBoundedTraceAnalysisStore": "value", + "createChatClient": "value", + "createDspyRlmTraceEngine": "value", + "createFeedbackTrajectory": "value", + "createLlmCorrectnessChecker": "value", + "createLlmReviewer": "value", + "createTraceAnalyst": "value", + "decidePairedPromotion": "value", + "defaultBlendWeights": "value", + "defineAgentEval": "value", + "defineEquivalenceCheck": "value", + "deployGateLayer": "value", + "describeTraceInsightScope": "value", + "diffFindings": "value", + "diffScorecard": "value", + "discoverPersonas": "value", + "domainEvidencePattern": "value", + "dominates": "value", + "eProcess": "value", + "ensembleJudge": "value", + "equivalenceVerdict": "value", + "errorStreakDetector": "value", + "estimateCost": "value", + "estimateTokens": "value", + "evaluateActionPolicy": "value", + "evaluateInterimReleaseConfidence": "value", + "evaluateOracles": "value", + "evaluateReleaseConfidence": "value", + "expandProfileAxes": "value", + "exportProductBenchmark": "value", + "exportProductBenchmarkRuns": "value", + "exportRunAsOtlp": "value", + "extractErrorCount": "value", + "extractProducedState": "value", + "extractUsage": "value", + "extractUsageFromSse": "value", + "failureClusterView": "value", + "feedbackTrajectoriesToDatasetScenarios": "value", + "feedbackTrajectoriesToOptimizerRows": "value", + "feedbackTrajectoryToOptimizerRow": "value", + "fileVerdictCache": "value", + "formatScorecardDiff": "value", + "gainHistogram": "value", + "gateTreatmentApplied": "value", + "gradeOnHidden": "value", + "gradeSemanticStatus": "value", + "groupRunsByAgentProfileCell": "value", + "harnessAxisOf": "value", + "hashContent": "value", + "hashJson": "value", + "hiddenGrade": "value", + "holm": "value", + "improvementVerdict": "value", + "inMemoryReviewStore": "value", + "inferDomainKeywords": "value", + "interRaterReliability": "value", + "interpretCliffs": "value", + "iqr": "value", + "isBinaryOutcomeVector": "value", + "isJudgeSpan": "value", + "isLlmSpan": "value", + "isModelPriced": "value", + "isRunRecord": "value", + "isToolSpan": "value", + "isTransientLlmError": "value", + "jsonShape": "value", + "jsonlReviewStore": "value", + "jsonlRunRecordBackend": "value", + "judgeAgreementView": "value", + "judgeFamily": "value", + "judgeSpans": "value", + "knowledgeReadinessTracePayload": "value", + "leaderboard": "value", + "llmJudge": "value", + "loadScorecard": "value", + "localCommandRunner": "value", + "makeFinding": "value", + "makeProposalFinding": "value", + "mannWhitneyU": "value", + "maximumChargeForLlmRequest": "value", + "mcnemar": "value", + "mcnemarPower": "value", + "mcnemarRequiredN": "value", + "minimumPairsForPairedDeltaTest": "value", + "mintRolloutRows": "value", + "modelHasSnapshot": "value", + "modelPriceKey": "value", + "mulberry32": "value", + "notBlocked": "value", + "objectiveEval": "value", + "observeAll": "value", + "otlpTextToTraceAnalysisStore": "value", + "pairArms": "value", + "pairRunRecords": "value", + "pairedBinaryScale": "value", + "pairedBootstrap": "value", + "pairedCohensDz": "value", + "pairedDeltaTest": "value", + "pairedDeltaTieFraction": "value", + "pairedEvalueSequence": "value", + "pairedMde": "value", + "pairedRiskDifference": "value", + "pairedRiskDifferenceExact": "value", + "pairedRiskDifferenceScore": "value", + "pairedSignTest": "value", + "pairedTTest": "value", + "paretoChart": "value", + "paretoFrontier": "value", + "parseReflectionResponse": "value", + "parseRunRecordSafe": "value", + "parseRuntimeTrajectoryHookEvent": "value", + "partialCredit": "value", + "partitionHeldOut": "value", + "passAtK": "value", + "pearsonR": "value", + "preflightModels": "value", + "probeLlm": "value", + "productBenchmarkRepoIdentity": "value", + "profile": "value", + "projectRuntimeTrajectoryEvidence": "value", + "proposeSynthesisTargets": "value", + "ranks": "value", + "readProductBenchmarkManifest": "value", + "recordRuns": "value", + "recordRunsToScorecard": "value", + "redTeamDataset": "value", + "redTeamReport": "value", + "redactString": "value", + "regexMatches": "value", + "renderPreferenceMemoryMarkdown": "value", + "repeatedActionDetector": "value", + "requiredPairedSampleSize": "value", + "requiredSampleSize": "value", + "resolveModelPricing": "value", + "resolveSeat": "value", + "roundTripRunRecord": "value", + "routeFields": "value", + "runAgentControlLoop": "value", + "runCampaign": "value", + "runCanaries": "value", + "runCounterfactual": "value", + "runEquivalenceCheck": "value", + "runEvalCampaign": "value", + "runIntentMatchJudge": "value", + "runKeywordCoverageJudge": "value", + "runKeywordCoverageJudgeUrl": "value", + "runProposeReview": "value", + "runProposeReviewAsControlLoop": "value", + "runSemanticConceptJudge": "value", + "runTaskScore": "value", + "runsForScenario": "value", + "scoreKnowledgeReadiness": "value", + "scoreRedTeamOutput": "value", + "scoreTraceInsightReadiness": "value", + "seatPresets": "value", + "selfImprove": "value", + "servedModelAcceptable": "value", + "spearmanR": "value", + "stripFencedJson": "value", + "subjectiveEval": "value", + "summarizeBackendIntegrity": "value", + "summarizePreferenceMemory": "value", + "summaryTable": "value", + "textInSnapshot": "value", + "toAgentProfileJson": "value", + "tokenizeDomainWords": "value", + "toolSpansToTraceAnalysisStore": "value", + "toolWasteView": "value", + "traceContract": "value", + "urlContains": "value", + "userQuestionsForKnowledgeGaps": "value", + "validateRunRecord": "value", + "verbosityBias": "value", + "verifyAgentProfileCell": "value", + "verifyCompletion": "value", + "viteDeployRunner": "value", + "weightedComposite": "value", + "weightedMean": "value", + "wilcoxonSignedRank": "value", + "wilson": "value", + "withAssignedFeedbackSplit": "value", + "withHeldoutBlend": "value", + "withJudgeRetry": "value", + "wranglerDeployRunner": "value" + }, + "./analyst": { + "AGENT_RX_UPSTREAM_REVISION": "value", + "ANALYST_BENCHMARK_COST_LEDGER_FILE": "value", + "ANALYST_BENCHMARK_DEPENDENCY_LOCK_DIGEST_ALGORITHM": "value", + "ANALYST_BENCHMARK_DEPENDENCY_LOCK_FILES": "value", + "ANALYST_BENCHMARK_DEPENDENCY_LOCK_SHA256": "value", + "ANALYST_BENCHMARK_EVIDENCE_DEPENDENCY_LOCK_SHA256": "value", + "ANALYST_BENCHMARK_EVIDENCE_IMPLEMENTATION_SHA256": "value", + "ANALYST_BENCHMARK_EVIDENCE_PACKAGE_VERSION": "value", + "ANALYST_BENCHMARK_HELP": "value", + "ANALYST_BENCHMARK_IMPLEMENTATION_DIGEST_ALGORITHM": "value", + "ANALYST_BENCHMARK_IMPLEMENTATION_FILES": "value", + "ANALYST_BENCHMARK_IMPLEMENTATION_SHA256": "value", + "ANALYST_BENCHMARK_LOCAL_RECEIPT_FILE": "value", + "ANALYST_BENCHMARK_MANIFEST_FILE": "value", + "ANALYST_BENCHMARK_OBSERVATIONS_FILE": "value", + "ANALYST_SEVERITIES": "value", + "AgentRxBenchmarkCaseOptions": "type", + "AgentRxCalibrationRunnerSummary": "type", + "AgentRxCalibrationSummary": "type", + "AgentRxFailure": "type", + "AgentRxPrediction": "type", + "AgentRxPredictionReport": "type", + "AgentRxRow": "type", + "Analyst": "type", + "AnalystBenchmarkArtifact": "type", + "AnalystBenchmarkCase": "type", + "AnalystBenchmarkCommandConfig": "type", + "AnalystBenchmarkCommandDependencies": "type", + "AnalystBenchmarkDatasetRef": "type", + "AnalystBenchmarkDescriptor": "type", + "AnalystBenchmarkError": "type", + "AnalystBenchmarkLabelState": "type", + "AnalystBenchmarkLocalRunReceipt": "type", + "AnalystBenchmarkObservation": "type", + "AnalystBenchmarkOutput": "type", + "AnalystBenchmarkProgressRow": "type", + "AnalystBenchmarkProvenance": "type", + "AnalystBenchmarkResult": "type", + "AnalystBenchmarkRunIdentity": "type", + "AnalystBenchmarkRunManifest": "type", + "AnalystBenchmarkRunner": "type", + "AnalystBenchmarkSummary": "type", + "AnalystBudgetDeclaration": "type", + "AnalystComparisonMetric": "type", + "AnalystContext": "type", + "AnalystCost": "type", + "AnalystDefinition": "type", + "AnalystDefinitionAsymmetry": "type", + "AnalystDefinitionAsymmetryReport": "type", + "AnalystEvidenceBinding": "type", + "AnalystEvidenceExpectation": "type", + "AnalystEvidenceResolution": "type", + "AnalystEvidenceResolutionError": "type", + "AnalystEvidenceResolver": "type", + "AnalystExpressivenessError": "value", + "AnalystFinding": "type", + "AnalystFindingScore": "type", + "AnalystHooks": "type", + "AnalystInputKind": "type", + "AnalystInstructionsOverride": "type", + "AnalystIssueExpectation": "type", + "AnalystLatencyDistribution": "type", + "AnalystMetricComparison": "type", + "AnalystProfileFragment": "type", + "AnalystRegistry": "value", + "AnalystRegistryOptions": "type", + "AnalystRepairDeclaration": "type", + "AnalystRequirements": "type", + "AnalystRowExpansion": "type", + "AnalystRunEvent": "type", + "AnalystRunInputs": "type", + "AnalystRunResult": "type", + "AnalystRunSummary": "type", + "AnalystRunnerComparison": "type", + "AnalystSeverity": "type", + "AnalystTransportBinding": "type", + "AnalystUsageReceipt": "type", + "BehavioralAnalystOptions": "type", + "BudgetPolicy": "type", + "CODE_TRACE_BENCH_ANALYST_PROMPT": "value", + "CONTROL_INTEGRITY_ANALYST": "value", + "ChatCallOpts": "type", + "ChatClient": "type", + "ChatRequest": "type", + "ChatResponse": "type", + "ChatTransport": "type", + "ChunkedEvidenceBinding": "type", + "CliBridgeTransportOpts": "type", + "CodeTraceBenchCaseOptions": "type", + "CodeTraceBenchLabelOptions": "type", + "CodeTraceBenchLabelSet": "type", + "CodeTraceBenchRow": "type", + "CodeTraceBlockDiagnostics": "type", + "CodeTraceCalibrationRunnerSummary": "type", + "CodeTraceCalibrationSummary": "type", + "CodeTraceFailureBlock": "type", + "CodeTraceStageAnnotation": "type", + "CodeTracerLabelGroup": "type", + "CodeTracerPredictionAdapterOptions": "type", + "CodeTracerPredictions": "type", + "CodeTracerStepLabel": "type", + "ControlIntegrityAnalyst": "value", + "CreateChatClientOpts": "type", + "CreateTraceAnalystOptions": "type", + "CustomTransportOpts": "type", + "DEFAULT_MAX_VERIFICATION_ARTIFACT_BYTES": "value", + "DEFAULT_TRACE_ANALYST_KINDS": "value", + "DEFAULT_TRACE_ANALYST_LIMITS": "value", + "DecodedReply": "type", + "DefaultAnalystRegistryOptions": "type", + "DefineCustomAnalystOptions": "type", + "DefineExactCustomAnalystOptions": "type", + "DiffPolicy": "type", + "DirectProviderTransportOpts": "type", + "DspyRlmTraceEngineOptions": "type", + "EvidenceProjection": "type", + "EvidenceRef": "type", + "ExactAnalystBudgetPolicy": "type", + "ExactAnalystBudgetSnapshot": "type", + "ExactAnalystExecutionPlanSnapshot": "type", + "ExactAnalystRunCompletion": "type", + "ExactAnalystRunEvent": "type", + "ExactAnalystRunExecutionError": "value", + "ExactAnalystRunPolicySnapshot": "type", + "ExactAnalystRunResult": "type", + "ExactAnalystRunSummary": "type", + "ExactAnalystSnapshot": "type", + "ExactCapableAnalyst": "type", + "ExactExecutionComponentIdentity": "type", + "ExactExecutionComponentSnapshot": "type", + "ExactRegistryRunOpts": "type", + "ExecutionProbe": "type", + "ExecutionProbeOutcome": "type", + "ExecutionProbeRequest": "type", + "ExpandRowsArgs": "type", + "FAILURE_MODE_KIND_SPEC": "value", + "FINDING_SUBJECT_GRAMMAR_PROMPT": "value", + "FINDING_SUBJECT_KINDS": "value", + "FINDING_SUBJECT_SYNTAX": "value", + "FindingSubject": "type", + "FindingSubjectKind": "type", + "FindingSubjectStringSchema": "value", + "FindingsDiff": "type", + "FindingsStore": "value", + "IMPROVEMENT_KIND_SPEC": "value", + "InlineEvidenceBinding": "type", + "JudgeAdapterOpts": "type", + "KIND_EXPECTED_SUBJECTS": "value", + "KNOWLEDGE_GAP_KIND_SPEC": "value", + "KNOWLEDGE_POISONING_KIND_SPEC": "value", + "LoadedVerificationArtifacts": "type", + "MAX_INCORRECT_BLOCKS": "value", + "MAX_INCORRECT_BLOCK_STEPS": "value", + "MockTransportOpts": "type", + "PersistedFinding": "type", + "PreparedPublicAnalystBenchmark": "type", + "PrimeBenchmarkRunnerOptions": "type", + "PrimeBridgeTransport": "type", + "PrimeBridgeTransportRequest": "type", + "PrimeBridgeTransportResult": "type", + "PrimeCodeTraceDefinitionArgs": "type", + "PrimeExchangeOptions": "type", + "PrimeExchangeOutcome": "type", + "PrimeFailure": "type", + "PrimeProjectionDelivery": "type", + "PrimeProjectionOutcome": "type", + "PrimeProjectionSource": "type", + "PrimePromptSpec": "type", + "PrimeProtocolIdentity": "type", + "PrimeRawUsage": "type", + "PrimeRejectedRow": "type", + "PrimeRepairPromptSpec": "type", + "PrimeRepairState": "type", + "PrimeReplyContract": "type", + "PrimeRowDecoded": "type", + "PrimeTurnRecord": "type", + "ProposalFinding": "type", + "ProposalFindingOrigin": "type", + "PublicAnalystBenchmarkDataset": "type", + "PublicAnalystBenchmarkModelConfig": "type", + "PublicAnalystBenchmarkModelOwner": "type", + "PublicAnalystBenchmarkModelSettings": "type", + "PublicBenchmarkDistributions": "type", + "PublicBenchmarkModelPrediction": "type", + "PublicBenchmarkSelectionReport": "type", + "PublicBenchmarkValueDistribution": "type", + "PublicDirectDefinitionArgs": "type", + "PublicRlmDefinitionArgs": "type", + "RAW_FINDING_SCHEMA_PROMPT": "value", + "RawAnalystEvidence": "type", + "RawAnalystEvidenceSchema": "value", + "RawAnalystFinding": "type", + "RawAnalystFindingSchema": "value", + "RegistryRunOpts": "type", + "ReplVariableConsensusPort": "type", + "ReplVariableEvidenceBinding": "type", + "ReplyContract": "type", + "ReplyEnvelope": "type", + "ReplyRowDecoded": "type", + "ReplyRowRejection": "type", + "RouterTransportOpts": "type", + "RunAnalystBenchmarkOptions": "type", + "RunCriticAdapterOpts": "type", + "SKILL_USAGE_ANALYST": "value", + "SandboxSdkTransportOpts": "type", + "SemanticConceptJudgeAdapterOpts": "type", + "SkillUsageAnalyst": "value", + "SkillUsageRecord": "type", + "SkillUsageReport": "type", + "SkillUsageScanConfig": "type", + "StepLabelAdapterOptions": "type", + "TraceAnalysisEngine": "type", + "TraceAnalysisEngineRequest": "type", + "TraceAnalysisEngineResult": "type", + "TraceAnalystDefinition": "type", + "TraceAnalystLimits": "type", + "TraceToolGroupName": "type", + "UpstreamPredictionAdapterOptions": "type", + "VerificationArtifactFile": "type", + "VerificationArtifactManifest": "type", + "VerificationArtifactRole": "type", + "VerificationAvailabilitySummary": "type", + "VerificationOutcome": "type", + "VerificationOutcomeSource": "type", + "VerificationOutcomeStatus": "type", + "VerificationResultFile": "type", + "VerifierAdapterOpts": "type", + "adaptPublicBenchmarkFindings": "value", + "agentRxBenchmarkCase": "value", + "agentRxPredictionsToFindings": "value", + "analystBenchmarkDependencyLockDigest": "value", + "analystBenchmarkImplementationDigest": "value", + "analystDefinitionAsymmetries": "value", + "analystDefinitionProtocolSha256": "value", + "analystInstructionsOverrideFromText": "value", + "analystUsageReceiptFromPrimeUsage": "value", + "appendVerificationArtifactsToOtlp": "value", + "assertExactRegistryRunOpts": "value", + "assertProposalFindings": "value", + "behavioralAnalyst": "value", + "bindAnalyst": "value", + "buildDefaultAnalystRegistry": "value", + "buildPrimePrompt": "value", + "buildPrimeRepairPrompt": "value", + "buildSkillUsageReport": "value", + "buildTraceToolsForGroup": "value", + "codeTraceBenchCase": "value", + "codeTracerPredictionsToFindings": "value", + "coerceJson": "value", + "coerceToFindingRows": "value", + "compareAnalystRunners": "value", + "computeFindingId": "value", + "createChatClient": "value", + "createDspyRlmTraceEngine": "value", + "createJudgeAdapter": "value", + "createPrimeBenchmarkRunner": "value", + "createPublicBenchmarkDirectRunner": "value", + "createPublicBenchmarkRlmRunner": "value", + "createRunCriticAdapter": "value", + "createSemanticConceptJudgeAdapter": "value", + "createTraceAnalyst": "value", + "createVerifierAdapter": "value", + "decodeReplyRows": "value", + "defaultIsMaterial": "value", + "defineCustomAnalyst": "value", + "defineTraceAnalyst": "value", + "deriveEfficiencyFindings": "value", + "diffFindings": "value", + "effectiveAnalystProtocolSha256": "value", + "emitControlIntegrityFindings": "value", + "emitSkillUsageFindings": "value", + "emptyPrimeRawUsage": "value", + "emptyPublicBenchmarkRunner": "value", + "evidenceRefsFromRawFinding": "value", + "expandCodeTraceFailureBlocks": "value", + "extractPrimeJsonObject": "value", + "findingSubjectGrammarPromptFor": "value", + "isProposalFinding": "value", + "liftSeverity": "value", + "loadCodeTraceVerificationArtifacts": "value", + "loadPublicBenchmarkRows": "value", + "makeFinding": "value", + "makeProposalFinding": "value", + "mergePrimeRawUsage": "value", + "nodeHttpPrimeBridgeTransport": "value", + "normalizeAgentRxCategory": "value", + "normalizeBenchmarkLabel": "value", + "normalizePrimeUsage": "value", + "parseFindingSubject": "value", + "parseRawFinding": "value", + "parseVerificationOutcome": "value", + "preparePublicAnalystBenchmark": "value", + "primeAnalystProtocolSha256": "value", + "primeCodeTraceAnalystDefinition": "value", + "primeProtocolSha256": "value", + "primeReplyDefect": "value", + "projectPrimeTrajectory": "value", + "publicBenchmarkDistributions": "value", + "publicBenchmarkProtocolSha256": "value", + "publicBenchmarkRlmInstructions": "value", + "publicBenchmarkSelectionReport": "value", + "publicBenchmarkSystemPrompt": "value", + "publicDirectAnalystDefinition": "value", + "publicRlmAnalystDefinition": "value", + "readAnalystBenchmarkArtifact": "value", + "readAnalystInstructionsOverride": "value", + "registryBenchmarkRunner": "value", + "renderAgentRxCalibrationMarkdown": "value", + "renderAnalystBenchmarkMarkdown": "value", + "renderCodeTraceCalibrationMarkdown": "value", + "renderFindingSubject": "value", + "renderPriorFindings": "value", + "renderUpstreamFindings": "value", + "resolveTraceAnalystLimits": "value", + "rlmEngineLimits": "value", + "roundAgentRxStep": "value", + "runAnalystBenchmark": "value", + "runAnalystBenchmarkCommand": "value", + "runPrimeExchange": "value", + "runTraceAnalyst": "value", + "scoreAnalystFindings": "value", + "selectPublicBenchmarkRows": "value", + "stripCodeFences": "value", + "summarizeAgentRxCalibration": "value", + "summarizeAnalystBenchmarkRunner": "value", + "summarizeCodeTraceCalibration": "value", + "traceStoreEvidenceResolver": "value" + }, + "./authenticity": { + "AuthenticityNuance": "value", + "AuthenticityResult": "value", + "AuthenticitySignals": "value", + "BlendedRealness": "value", + "CompleteFn": "value", + "ProducedFile": "value", + "RealnessBand": "value", + "RealnessGate": "value", + "RealnessJudgment": "value", + "gateRealness": "value", + "judgeRealnessLlm": "value", + "scoreAuthenticity": "value", + "scoreAuthenticityNuance": "value", + "scoreRealnessBlended": "value" + }, + "./benchmarks": { + "BENCHMARK_SPLIT_SEED": "value", + "BenchmarkAdapter": "type", + "BenchmarkDatasetItem": "type", + "BenchmarkDistribution": "type", + "BenchmarkEvaluation": "type", + "BenchmarkFamily": "type", + "BenchmarkMetricCalibrationOptions": "type", + "BenchmarkMetricCalibrationResult": "type", + "BenchmarkReport": "type", + "BenchmarkResponder": "type", + "BenchmarkRunOptions": "type", + "BenchmarkRunResult": "type", + "BenchmarkScenario": "type", + "BenchmarkSliceSummary": "type", + "BenchmarkSource": "type", + "BenchmarkTaskKind": "type", + "BuildStandardRetrievalItemsOptions": "type", + "RetrievalIdAdapterOptions": "type", + "StandardRetrievalArtifact": "type", + "StandardRetrievalDocument": "type", + "StandardRetrievalEvaluationOptions": "type", + "StandardRetrievalPayload": "type", + "StandardRetrievalQrel": "type", + "StandardRetrievalQuery": "type", + "StandardRetrievalResult": "type", + "buildStandardRetrievalItems": "value", + "calibrateBenchmarkMetric": "value", + "createRetrievalIdBenchmarkAdapter": "value", + "deterministicSplit": "value", + "evaluateStandardRetrieval": "value", + "normalizeRetrievedDocumentIds": "value", + "parseBeirCorpusJsonl": "value", + "parseBeirQueriesJsonl": "value", + "parseJsonlRows": "value", + "parseQrels": "value", + "parseTsvRows": "value", + "renderBenchmarkReportMarkdown": "value", + "retrievalMetricsAtCutoff": "value", + "routing": "value", + "runBenchmarkAdapter": "value", + "summarizeBenchmarkCampaign": "value" + }, + "./builder-eval": { + "BuilderSession": "value", + "BuilderSessionInit": "value", + "ChatSummary": "value", + "CorrelationReport": "value", + "LayerCorrelation": "value", + "ProjectKind": "value", + "ProjectRegistry": "value", + "ProjectSummary": "value", + "ProjectTimelineEntry": "value", + "RunAppScenarioOptions": "value", + "ShipOptions": "value", + "ThreeLayerProjectReport": "value", + "correlateLayers": "value", + "resumeBuilderSession": "value", + "scoreAllProjects": "value", + "scoreProject": "value" + }, + "./campaign": { + "AnalyzeCrossSurfaceInteractionsInput": "type", + "AutoevalsScoreLike": "type", + "AutoevalsScorerLike": "type", + "AxisEvidence": "type", + "AxisVerdict": "type", + "BuildEvidenceVectorOptions": "type", + "BuildLoopProvenanceArgs": "type", + "BuildTraceAnalystSurfaceDispatchOptions": "type", + "CacheIssueReason": "type", + "CacheRead": "type", + "CampaignAggregates": "type", + "CampaignArtifactWriter": "type", + "CampaignBreakdown": "type", + "CampaignCellFailureReceipt": "type", + "CampaignCellResult": "type", + "CampaignCostMeter": "type", + "CampaignResult": "type", + "CampaignRunPlan": "type", + "CampaignRunPlanCell": "type", + "CampaignScenarioIdentity": "type", + "CampaignStorage": "type", + "CampaignTokenUsage": "type", + "CampaignTraceWriter": "type", + "CodeSurface": "type", + "CodeSurfaceVerification": "type", + "CompareOptimizationMethodsOptions": "type", + "ComparisonCost": "type", + "ComponentSurface": "type", + "CostLedgerHandle": "type", + "CreateProfileMatrixPlanOptions": "type", + "CreateSearchHistoryReceiptInput": "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": "type", + "DEFAULT_EXTERNAL_OPTIMIZER_CALLBACK_LIMITS": "value", + "DEFAULT_EXTERNAL_OPTIMIZER_PROCESS_LIMITS": "value", + "DefaultProductionGateCheck": "type", + "DefaultProductionGateOptions": "type", + "DefaultProductionRewardHackingOptions": "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", + "ExternalOptimizationExample": "type", + "ExternalOptimizerCallbackLimits": "type", + "ExternalOptimizerChatRequest": "type", + "ExternalOptimizerEndpointFormat": "type", + "ExternalOptimizerEvaluationObservation": "type", + "ExternalOptimizerEvaluationRefusalReason": "type", + "ExternalOptimizerExecutionSummary": "type", + "ExternalOptimizerModelBudget": "type", + "ExternalOptimizerModelCall": "type", + "ExternalOptimizerModelCallRequest": "type", + "ExternalOptimizerModelCallResult": "type", + "ExternalOptimizerModelExecutionObservation": "type", + "ExternalOptimizerObservationArtifact": "type", + "ExternalOptimizerObservationSummary": "type", + "ExternalOptimizerProcessLimits": "type", + "ExternalOptimizerRunnerCommand": "type", + "ExternalOptimizerSubmittedCandidate": "type", + "ExternalTextCandidate": "type", + "ExternalTextEvaluationResponse": "type", + "ExternalTextOptimizationMethodConfig": "type", + "ExternalTextOptimizerContext": "type", + "ExternalTextOptimizerResult": "type", + "FileSearchLedger": "value", + "FinalizeProfileMatrixOptions": "type", + "FinalizedProfileMatrixResult": "type", + "FsLabeledScenarioStore": "value", + "FsLabeledScenarioStoreOptions": "type", + "Gate": "type", + "GateCheckStatus": "type", + "GateContext": "type", + "GateContribution": "type", + "GateDecision": "type", + "GateResult": "type", + "GenerationCandidate": "type", + "GenerationRecord": "type", + "GepaAdaptiveEngineRun": "type", + "GepaCandidatePopulationArtifact": "type", + "GepaCandidatePopulationCandidate": "type", + "GepaCandidatePopulationSummary": "type", + "GepaCandidateSelectionScore": "type", + "GepaEngineOptions": "type", + "GepaEngineRun": "type", + "GepaOptimizationMethodConfig": "type", + "GepaOptimizationRecipe": "type", + "GepaRunnerCommand": "type", + "GitWorktreeAdapterOptions": "type", + "HeldOutGateOptions": "type", + "HeldoutSignificance": "type", + "HeldoutSignificanceOptions": "type", + "JudgeAggregate": "type", + "JudgeConfig": "type", + "JudgeDimension": "type", + "JudgeScore": "type", + "LabelTrust": "type", + "LabeledScenarioRecord": "type", + "LabeledScenarioSampleArgs": "type", + "LabeledScenarioSource": "type", + "LabeledScenarioStore": "type", + "LabeledScenarioStoreError": "value", + "LabeledScenarioWrite": "type", + "LlmJudgeDimension": "type", + "LlmJudgeOptions": "type", + "LoadEvalFixtureScenariosOptions": "type", + "LoopProvenanceArgsFromResult": "type", + "LoopProvenanceBackend": "type", + "LoopProvenanceCandidate": "type", + "LoopProvenanceEvidence": "type", + "LoopProvenanceOptimizationMethod": "type", + "LoopProvenanceRecord": "type", + "MutableSurface": "type", + "NeutralizationGateOptions": "type", + "ObjectiveSource": "type", + "OpenAICompatibleOptimizerModel": "type", + "OpenAutoPrOptions": "type", + "OpenAutoPrResult": "type", + "OpenSearchLedgerOptions": "type", + "OptimizationMethod": "type", + "OptimizationMethodComparison": "type", + "OptimizationMethodInput": "type", + "OptimizationMethodPairwise": "type", + "OptimizationMethodProvenance": "type", + "OptimizationMethodResult": "type", + "OptimizationMethodRunOptions": "type", + "OptimizationMethodScore": "type", + "OptimizationPackageSource": "type", + "OptimizationTokenUsage": "type", + "OptimizerConfig": "type", + "OptimizerModelBudget": "type", + "PairedHoldout": "type", + "ParetoParent": "type", + "ParetoSignificanceGateOptions": "type", + "PendingCostCallView": "type", + "PhoenixEvaluationResultLike": "type", + "PhoenixEvaluatorLike": "type", + "PlanCampaignRunOptions": "type", + "PlanEvalFixtureRunOptions": "type", + "PlaybackContext": "type", + "PlaybackDriver": "type", + "PlaybackStep": "type", + "PowerPreflight": "type", + "PowerPreflightOptions": "type", + "PremeasuredOptimizationBaseline": "type", + "ProfileDispatchFn": "type", + "ProfileMatrixCoverage": "type", + "ProfileMatrixError": "value", + "ProfileMatrixPlan": "type", + "ProfileMatrixRow": "type", + "ProfileMatrixSegmentResult": "type", + "ProfileSummary": "type", + "PromotionObjective": "type", + "PromotionPolicy": "type", + "ProposalFinding": "type", + "ProposalFindingOrigin": "type", + "ProposalTrackContext": "type", + "ProposeContext": "type", + "ProposedCandidate": "type", + "RedactionStatus": "type", + "ReferenceEquivalenceJudgeOptions": "type", + "ReferenceEquivalenceScenario": "type", + "RolloutArgumentDiff": "type", + "RolloutArgumentDiffOptions": "type", + "RolloutCall": "type", + "RunCampaignOptions": "type", + "RunEvalOptions": "type", + "RunImprovementLoopOptions": "type", + "RunImprovementLoopResult": "type", + "RunOptimizationOptions": "type", + "RunOptimizationResult": "type", + "RunProfileMatrixOptions": "type", + "RunProfileMatrixResult": "type", + "RunProfileMatrixSegmentOptions": "type", + "SEARCH_HISTORY_RECEIPT_DIGEST_ALGORITHM": "value", + "SEARCH_HISTORY_RECEIPT_SCHEMA_VERSION": "value", + "SEARCH_LEDGER_SCHEMA": "value", + "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", + "SearchHistoryAuditSummary": "type", + "SearchHistoryCoverage": "type", + "SearchHistoryCoverageRow": "type", + "SearchHistoryPolicy": "type", + "SearchHistoryReceipt": "type", + "SearchHistoryRequiredError": "value", + "SearchLedger": "type", + "SearchLedgerAppendResult": "type", + "SearchLedgerConflictError": "value", + "SearchLedgerEntry": "type", + "SearchLedgerError": "value", + "SearchLedgerEvent": "type", + "SearchLedgerHash": "type", + "SearchLedgerIntegrityError": "value", + "SearchLedgerReplay": "type", + "SearchLedgerTrustedHeadMode": "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", + "SegmentedProfileMatrixError": "value", + "SequentialDecideFn": "type", + "SequentialDecideOptions": "type", + "SequentialDecision": "type", + "SequentialObservation": "type", + "SequentialPairedGate": "type", + "SequentialPairedGateOptions": "type", + "SessionScript": "type", + "SingleRunLock": "type", + "SingleRunLockOptions": "type", + "SkillOptOptimizationMethodConfig": "type", + "SkillOptRunnerCommand": "type", + "SkillOptTrainerConfig": "type", + "SurfaceProposer": "type", + "TraceAnalystArtifact": "type", + "TraceAnalystScenario": "type", + "TraceSpan": "type", + "TransientFailureOptions": "type", + "UngroundedLiteralReport": "type", + "UserStory": "type", + "UserStoryVerdict": "type", + "Worktree": "type", + "WorktreeAdapter": "type", + "WorktreeAdapterError": "value", + "acquireSingleRunLock": "value", + "analyzeCrossSurfaceInteractions": "value", + "assertCampaignDesign": "value", + "assertCampaignSplitIdentity": "value", + "assertCodeSurfaceIdentity": "value", + "assertCompleteSearchHistory": "value", + "assertComponentSurface": "value", + "assertSearchHistoryMatchesReplay": "value", + "autoevalsScorerJudge": "value", + "buildEvidenceVector": "value", + "buildLoopProvenanceRecord": "value", + "buildTraceAnalystSurfaceDispatch": "value", + "campaignBreakdown": "value", + "campaignMeanComposite": "value", + "campaignMeasurementDigest": "value", + "campaignScenarioIdentity": "value", + "campaignSplitDigest": "value", + "campaignSplitDigestFromIdentities": "value", + "canonicalDigest": "value", + "cellCachePath": "value", + "classifyUngroundedLiterals": "value", + "codeSurfaceIdentityMaterial": "value", + "combineComparisonCosts": "value", + "compareOptimizationMethods": "value", + "compareRankKeys": "value", + "componentSurfaceIdentityMaterial": "value", + "composeGate": "value", + "costFromLedgerSummary": "value", + "createProfileMatrixPlan": "value", + "createReferenceEquivalenceJudge": "value", + "createRunCostLedger": "value", + "createSearchHistoryReceipt": "value", + "decodeExternalTextCandidate": "value", + "defaultProductionGate": "value", + "detectScale": "value", + "dimensionRegressions": "value", + "discoverEvalFixtures": "value", + "emitLoopProvenance": "value", + "externalTextOptimizationMethod": "value", + "finalizeProfileMatrix": "value", + "fsCampaignStorage": "value", + "gepaOptimizationMethod": "value", + "gitWorktreeAdapter": "value", + "heldOutGate": "value", + "heldoutSignificance": "value", + "inMemoryCampaignStorage": "value", + "isProposedCandidate": "value", + "isTransientTransportFailure": "value", + "labelTrustRank": "value", + "llmJudge": "value", + "loadEvalFixture": "value", + "loadEvalFixtureScenarios": "value", + "loopProvenanceArgsFromResult": "value", + "loopProvenanceSpans": "value", + "makePlaybackDispatch": "value", + "makeProposalFinding": "value", + "neutralizationGate": "value", + "neutralizeText": "value", + "openAutoPr": "value", + "openSearchLedger": "value", + "optimizationTokenUsageFromSummary": "value", + "pairHoldout": "value", + "paretoPolicy": "value", + "paretoSignificanceGate": "value", + "phoenixEvaluatorJudge": "value", + "planCampaignRun": "value", + "planEvalFixtureRun": "value", + "powerPreflight": "value", + "provenanceRecordPath": "value", + "provenanceSpansPath": "value", + "readCachedCell": "value", + "readExternalOptimizerObservationArtifact": "value", + "readGepaCandidatePopulationArtifact": "value", + "renderScoreboardMarkdown": "value", + "renderSurfaceDiff": "value", + "resolveExternalOptimizerCallbackLimits": "value", + "resolveExternalOptimizerProcessLimits": "value", + "resolveRunDir": "value", + "resolveWorktreePath": "value", + "rolloutArgumentDiff": "value", + "runCampaign": "value", + "runEval": "value", + "runImprovementLoop": "value", + "runOptimization": "value", + "runProfileMatrix": "value", + "runProfileMatrixSegment": "value", + "scoreDiscrimination": "value", + "scoreUserStory": "value", + "scoreboardSummary": "value", + "searchHistoryCoverageRow": "value", + "selectDiscriminative": "value", + "sequentialDecide": "value", + "sequentialPairedGate": "value", + "skillOptOptimizationMethod": "value", + "surfaceContentHash": "value", + "surfaceHash": "value", + "tangleTracesRoot": "value", + "traceAnalystQualityJudge": "value", + "userStoryScoreboard": "value", + "validateSearchLedgerEvent": "value", + "verifyCodeSurface": "value", + "verifyLoopProvenanceRecord": "value", + "verifySearchHistoryReceipt": "value" + }, + "./contract": { + "AgentEvalAgent": "type", + "AgentEvalEvaluateOptions": "type", + "AgentEvalImproveOptions": "type", + "AgentProfileImprovementExperimentExecutionInput": "type", + "AgentProfileImprovementExperimentRun": "type", + "AgentTraceContributor": "type", + "AgentTraceContributorType": "type", + "AgentTraceConversation": "type", + "AgentTraceFile": "type", + "AgentTraceIndex": "type", + "AgentTraceRange": "type", + "AgentTraceRecord": "type", + "AnalystFinding": "type", + "AnalyzeRunsOptions": "type", + "AuthoringProvenance": "type", + "AxisEvidence": "type", + "AxisVerdict": "type", + "BuildEvidenceVectorOptions": "type", + "CampaignAggregates": "type", + "CampaignArtifactWriter": "type", + "CampaignCellFailureReceipt": "type", + "CampaignCellResult": "type", + "CampaignCostMeter": "type", + "CampaignResult": "type", + "CampaignStorage": "type", + "CampaignTraceWriter": "type", + "CandidateExperimentExecutionInput": "type", + "CandidateExperimentRun": "type", + "ChatClient": "type", + "CodeAgentJsonlLine": "type", + "CodeAgentSessionAction": "type", + "CodeAgentSessionActionKind": "type", + "CodeAgentSessionActionStatus": "type", + "CodeAgentSessionActionSurface": "type", + "CodeAgentSessionDiagnostic": "type", + "CodeAgentSessionExecutionReceipt": "type", + "CodeAgentSessionIntakeOptions": "type", + "CodeAgentSessionIntakeResult": "type", + "CodeAgentSessionMetrics": "type", + "CodeAgentSessionObservation": "type", + "CodeAgentSessionSource": "type", + "CodeAgentSessionTerminalStatus": "type", + "CodeSurface": "type", + "CompareAgentProfileImprovementExperimentOptions": "type", + "CompareCandidateExperimentOptions": "type", + "CompareOptimizationMethodsOptions": "type", + "ComparisonCost": "type", + "CostLedgerHandle": "type", + "CostProvenanceSummary": "type", + "CreateChatClientOpts": "type", + "DefaultAnalystRegistryOptions": "type", + "DefaultProductionGateCheck": "type", + "DefaultProductionGateOptions": "type", + "DefaultProductionRewardHackingOptions": "type", + "DefineAgentEvalOptions": "type", + "DefinedAgentEval": "type", + "DeploymentOutcome": "type", + "Dispatch": "type", + "DispatchContext": "type", + "EvalCellScoreDelta": "type", + "EvalDimensionDelta": "type", + "EvalGenerationDiff": "type", + "EvalReportingSuiteInput": "type", + "EvalReportingSuiteOptions": "type", + "EvalReportingSuiteResult": "type", + "EvalRunDiff": "type", + "EvaluatePairedMeasurementsOptions": "type", + "EvidenceVector": "type", + "ExecutionErrorOutcomeCell": "type", + "ExecutionInsight": "type", + "ExecutionReport": "type", + "ExternalOptimizationExample": "type", + "ExternalTextEvaluationResponse": "type", + "ExternalTextOptimizationMethodConfig": "type", + "ExternalTextOptimizerContext": "type", + "ExternalTextOptimizerResult": "type", + "FailureClassTally": "type", + "FailureClusterInsight": "type", + "FeedbackTableMeta": "type", + "FeedbackTableRow": "type", + "FileSystemOutcomeStore": "value", + "FileSystemOutcomeStoreOptions": "type", + "FromFeedbackTableOptions": "type", + "FromFeedbackTableResult": "type", + "FromOtelSpansOptions": "type", + "FromRunRecordDirOptions": "type", + "FromRunRecordDirResult": "type", + "Gate": "type", + "GateCheckStatus": "type", + "GateContext": "type", + "GateContribution": "type", + "GateDecision": "type", + "GateResult": "type", + "GenerationCandidate": "type", + "GenerationRecord": "type", + "GepaAdaptiveEngineRun": "type", + "GepaEngineOptions": "type", + "GepaEngineRun": "type", + "GepaOptimizationMethodConfig": "type", + "GepaOptimizationRecipe": "type", + "GepaRunnerCommand": "type", + "HeldOutGateOptions": "type", + "HostedTenant": "type", + "InMemoryOutcomeStore": "value", + "InsightReport": "type", + "InterRaterInsight": "type", + "JudgeConfig": "type", + "JudgeDimension": "type", + "JudgeInsight": "type", + "JudgeScore": "type", + "LiftInsight": "type", + "LlmJudgeDimension": "type", + "LlmJudgeOptions": "type", + "MutableSurface": "type", + "ObjectiveSource": "type", + "OpenAICompatibleOptimizerModel": "type", + "OptimizationMethod": "type", + "OptimizationMethodComparison": "type", + "OptimizationMethodInput": "type", + "OptimizationMethodProvenance": "type", + "OptimizationMethodResult": "type", + "OptimizationPackageSource": "type", + "OptimizationTokenUsage": "type", + "OptimizerConfig": "type", + "OptimizerModelBudget": "type", + "OutcomeCorrelationInsight": "type", + "OutcomeStore": "type", + "PairedMeasurement": "type", + "PairedMeasurementAdapter": "type", + "PairedMeasurementEvaluation": "type", + "ParetoSignificanceGateOptions": "type", + "ParsedCodeAgentJsonl": "type", + "PartitionByAuthoringModelResult": "type", + "PromotionObjective": "type", + "PromotionPolicy": "type", + "ProposalFinding": "type", + "ProposalFindingOrigin": "type", + "REFERENCE_EQUIVALENCE_INPUT_LIMITS": "value", + "REFERENCE_EQUIVALENCE_JUDGE_VERSION": "value", + "Recommendation": "type", + "ReferenceEquivalenceJudgeInput": "type", + "ReferenceEquivalenceJudgeOptions": "type", + "ReferenceEquivalenceJudgeResult": "type", + "ReferenceEquivalenceScenario": "type", + "ReleaseSummary": "type", + "RunAgentProfileImprovementExperimentOptions": "type", + "RunCampaignOptions": "type", + "RunCandidateExperimentOptions": "type", + "RunEvalOptions": "type", + "RunImprovementLoopOptions": "type", + "RunImprovementLoopResult": "type", + "RunRecordRejection": "type", + "ScalarDistribution": "type", + "Scenario": "type", + "SealAgentProfileImprovementSuiteOptions": "type", + "SealCandidateBenchmarkSuiteOptions": "type", + "SelfImproveBudget": "type", + "SelfImproveOptions": "type", + "SelfImproveProgressEvent": "type", + "SelfImproveResult": "type", + "SelfImproveRunError": "value", + "SessionScript": "type", + "SkillOptOptimizationMethodConfig": "type", + "SkillOptRunnerCommand": "type", + "SkillOptTrainerConfig": "type", + "SummarizeExecutionOptions": "type", + "SurfaceProposer": "type", + "TokenUsageInsight": "type", + "analyzeRuns": "value", + "buildDefaultAnalystRegistry": "value", + "buildEvidenceVector": "value", + "campaignSplitDigest": "value", + "compareOptimizationMethods": "value", + "composeGate": "value", + "createChatClient": "value", + "createReferenceEquivalenceJudge": "value", + "defaultProductionGate": "value", + "defineAgentEval": "value", + "diffGenerations": "value", + "diffRunBaselineToWinner": "value", + "diffRuns": "value", + "evalReportingSuite": "value", + "evaluatePairedMeasurements": "value", + "externalTextOptimizationMethod": "value", + "fromClaudeCodeSession": "value", + "fromCodexSession": "value", + "fromFeedbackTable": "value", + "fromKimiCodeSession": "value", + "fromOpenCodeSession": "value", + "fromOtelSpans": "value", + "fromPiSession": "value", + "fromPigraphSession": "value", + "fromRunRecordDir": "value", + "fsCampaignStorage": "value", + "gepaOptimizationMethod": "value", + "heldOutGate": "value", + "inMemoryCampaignStorage": "value", + "llmJudge": "value", + "makeProposalFinding": "value", + "measuredComparisonFromAgentProfileImprovementExperiment": "value", + "measuredComparisonFromCandidateExperiment": "value", + "observeCodeAgentSession": "value", + "paretoPolicy": "value", + "paretoSignificanceGate": "value", + "parseAgentTrace": "value", + "parseCodeAgentJsonl": "value", + "parseCodeAgentJsonlFile": "value", + "partitionRunsByAuthoringModel": "value", + "runAgentProfileImprovementExperiment": "value", + "runCampaign": "value", + "runCandidateExperiment": "value", + "runEval": "value", + "runImprovementLoop": "value", + "runReferenceEquivalenceJudge": "value", + "sealAgentProfileImprovementExperiment": "value", + "sealAgentProfileImprovementSuite": "value", + "sealAgentProfileImprovementTask": "value", + "sealCandidateBenchmarkSuite": "value", + "sealCandidateBenchmarkTask": "value", + "sealCandidateExperiment": "value", + "selfImprove": "value", + "skillOptOptimizationMethod": "value", + "streamCodeAgentJsonlFile": "value", + "summarizeExecution": "value", + "verifyAgentProfileImprovementExperiment": "value", + "verifyAgentProfileImprovementExperimentComparison": "value", + "verifyAgentProfileImprovementSuiteInputs": "value", + "verifyAgentProfileImprovementTask": "value", + "verifyCandidateBenchmarkSuite": "value", + "verifyCandidateBenchmarkSuiteInputs": "value", + "verifyCandidateBenchmarkTask": "value", + "verifyCandidateExperiment": "value", + "verifyCandidateExperimentComparison": "value" + }, + "./experiment": { + "AdmissionExecution": "type", + "AdmissionPartition": "type", + "AdmissionRule": "type", + "AdmissionStage": "type", + "ArmRealizedBudget": "type", + "ArmSpec": "type", + "BOOTSTRAP_GATE_MIN_N": "value", + "BudgetRule": "type", + "ClusteredPowerOptions": "type", + "ClusteredPowerPoint": "type", + "ClusteredPowerRefusal": "type", + "ClusteredPowerResult": "type", + "ComputedInterval": "type", + "Condition": "type", + "CreateEvidenceReceiptInput": "type", + "DecisionBranch": "type", + "DecisionOutcome": "type", + "DecisionRule": "type", + "DecisionTableNotTotalError": "value", + "DerivedQuantities": "type", + "DesignRefusalError": "value", + "EProcess": "type", + "EProcessOptions": "type", + "EProcessState": "type", + "EProcessStep": "type", + "EVIDENCE_AUTHORITY_KINDS": "value", + "EVIDENCE_RECEIPT_VERSION": "value", + "Estimand": "type", + "EstimandResult": "type", + "EvidenceAuthority": "type", + "EvidenceAuthorityKind": "type", + "EvidenceBinding": "type", + "EvidenceReceipt": "type", + "EvidenceReceiptVerification": "type", + "EvidenceRecord": "type", + "EvidenceVector": "type", + "Experiment": "type", + "ExperimentFunnel": "type", + "ExperimentRep": "type", + "ExperimentSpec": "type", + "ExperimentStats": "type", + "ExperimentTracker": "value", + "ExperimentVerdict": "type", + "FunnelIntegrityError": "value", + "FunnelPartitionCount": "type", + "FunnelStageCount": "type", + "FunnelStageInput": "type", + "GateEvidence": "type", + "GateResult": "type", + "HaltOutcome": "type", + "HaltRule": "type", + "HeldoutSignificance": "type", + "HeldoutSignificanceOptions": "type", + "HypothesisManifest": "type", + "HypothesisResult": "type", + "INDEPENDENT_EVIDENCE_AUTHORITY_KINDS": "value", + "IntervalSpec": "type", + "JsonValue": "type", + "MatchedBudgetError": "value", + "MatchedBudgetRule": "type", + "MatchedBudgetVerdict": "type", + "MatchedPair": "type", + "NLadderProjection": "type", + "Obligation": "type", + "OutcomeSpec": "type", + "PairArmsOptions": "type", + "PairArmsResult": "type", + "PairedArmRow": "type", + "PairedBootstrapOptions": "type", + "PairedBootstrapResult": "type", + "PairedEvalueOptions": "type", + "PairedEvalueSequence": "type", + "PairedEvalueStep": "type", + "PairedHoldout": "type", + "PowerPreflight": "type", + "PowerPreflightOptions": "type", + "Predicate": "type", + "PromotionPolicy": "type", + "ProportionInterval": "type", + "RegisteredExperiment": "type", + "ReissuePolicy": "type", + "ReissueVerdict": "type", + "SealAmendment": "type", + "SealIntegrityError": "value", + "SealedExperiment": "type", + "SeedDerivation": "type", + "SelectionRule": "type", + "SequentialCrossingHorizon": "type", + "SequentialCrossingHorizonOptions": "type", + "SequentialDecision": "type", + "SequentialObservation": "type", + "SequentialPairedGate": "type", + "SequentialPairedGateOptions": "type", + "SetExpr": "type", + "SignFlipFloor": "type", + "SignedManifest": "type", + "UniformPassDecision": "type", + "UniformPassSchedule": "type", + "ValidityGate": "type", + "amendExperiment": "value", + "assertDesignAdequate": "value", + "assertFunnelReconciles": "value", + "assertMatchedBudgets": "value", + "benjaminiHochberg": "value", + "bonferroni": "value", + "buildEvidenceVector": "value", + "buildFunnel": "value", + "canonicalize": "value", + "classifyReissue": "value", + "clusteredPower": "value", + "comparePairedArms": "value", + "composeFunnels": "value", + "computeEstimand": "value", + "computeInterval": "value", + "createEvidenceReceipt": "value", + "defineExperiment": "value", + "eProcess": "value", + "evaluateCondition": "value", + "evaluateHaltRule": "value", + "evaluateHypothesis": "value", + "evaluateIdentityGate": "value", + "evaluateOracleDeterminismGate": "value", + "evaluatePopulationReproducibilityGate": "value", + "evaluatePowerFloorGate": "value", + "evaluatePredicate": "value", + "evaluateProvenanceGate": "value", + "executeAdmissionRule": "value", + "executeDecisionRule": "value", + "fileExperimentStore": "value", + "hashJson": "value", + "heldoutSignificance": "value", + "holm": "value", + "inMemoryExperimentStore": "value", + "isIndependentEvidence": "value", + "mcnemar": "value", + "mcnemarPower": "value", + "mcnemarRequiredN": "value", + "mulberry32": "value", + "openSealedExperiment": "value", + "pairArms": "value", + "pairHoldout": "value", + "pairRunRecords": "value", + "pairedBootstrap": "value", + "pairedEvalueSequence": "value", + "pairedMde": "value", + "pairedRiskDifference": "value", + "pairedRiskDifferenceExact": "value", + "pairedRiskDifferenceScore": "value", + "paretoPolicy": "value", + "paretoSignificanceGate": "value", + "powerPreflight": "value", + "projectNLadderBudget": "value", + "readField": "value", + "renderFunnelTable": "value", + "requiredPairedSampleSize": "value", + "requiredSampleSize": "value", + "runSelectionRule": "value", + "runUniformPassBudget": "value", + "sealExperiment": "value", + "sequentialCrossingHorizon": "value", + "sequentialDecide": "value", + "sequentialPairedGate": "value", + "signManifest": "value", + "verifyEvidenceReceipt": "value", + "verifyManifest": "value", + "verifyMatchedBudgets": "value", + "verifySealedExperiment": "value", + "wilson": "value" + }, + "./fuzz": { + "ArchiveEntry": "type", + "BehaviorExplorer": "value", + "BehaviorSpace": "type", + "BuildCapsuleInput": "type", + "CapsuleData": "type", + "Cell": "type", + "CoverageCell": "type", + "EvalRecord": "type", + "Evaluation": "type", + "Evaluator": "type", + "ExploreEvent": "type", + "ExploreOptions": "type", + "ExploreToolDef": "type", + "Finding": "type", + "FuzzAgentOptions": "type", + "MutationProposer": "type", + "Objective": "type", + "ObjectiveContext": "type", + "ProposeContext": "type", + "RenderCapsuleOptions": "type", + "RunCost": "type", + "SpaceAxis": "type", + "ValidityGates": "type", + "adversarialObjective": "value", + "buildCapsule": "value", + "buildCoverage": "value", + "cellId": "value", + "composeGates": "value", + "enumerateCells": "value", + "fuzzAgent": "value", + "makeExploreTools": "value", + "mutationProposer": "value", + "noveltyObjective": "value", + "perturbationStabilityGate": "value", + "renderCapsuleHtml": "value", + "severityFloorGate": "value" + }, + "./hosted": { + "EvalRunCellScore": "type", + "EvalRunCellScoreSchema": "value", + "EvalRunEvent": "type", + "EvalRunEventSchema": "value", + "EvalRunGenerationSnapshot": "type", + "EvalRunGenerationSnapshotSchema": "value", + "EvalRunStatus": "type", + "HOSTED_WIRE_VERSION": "value", + "HostedClient": "type", + "HostedIngestHeaders": "type", + "HostedTenant": "type", + "HostedWireVersion": "type", + "IngestEvalRunsRequest": "type", + "IngestEvalRunsRequestSchema": "value", + "IngestResponse": "type", + "IngestResponseSchema": "value", + "IngestTracesRequest": "type", + "IngestTracesRequestSchema": "value", + "InsightReport": "type", + "InsightReportSchema": "value", + "MutableSurfaceSchema": "value", + "RunTerminalOutcomeSchema": "value", + "TraceSpanEvent": "type", + "TraceSpanEventSchema": "value", + "UnixNanoTimestamp": "type", + "UnixNanoTimestampSchema": "value", + "createHostedClient": "value", + "hostedClientFromEnv": "value", + "hostedTenantFromEnv": "value" + }, + "./ledger-core": { + "AtomicFileLock": "type", + "AtomicFileLockAcquisition": "type", + "AtomicFileLockError": "value", + "AtomicFileLockOptions": "type", + "AtomicFileLockOwner": "type", + "AtomicFileLockUnavailable": "type", + "FileLedgerJournal": "value", + "FileLedgerJournalOptions": "type", + "FileLockResult": "type", + "LEDGER_HASH_PATTERN": "value", + "LedgerAnchoredEntry": "type", + "LedgerAppendOptions": "type", + "LedgerAppendResult": "type", + "LedgerCanonicalizationError": "value", + "LedgerChainFields": "type", + "LedgerEntryOf": "type", + "LedgerEventBase": "type", + "LedgerFileContext": "type", + "LedgerHash": "type", + "LedgerJournalCodec": "type", + "LedgerLineContext": "type", + "LedgerProjector": "type", + "LedgerReplayResult": "type", + "LedgerTrustedHead": "type", + "LedgerTrustedHeadRemoval": "type", + "LedgerTrustedHeadSubject": "type", + "appendLedgerLine": "value", + "canonicalString": "value", + "hashCanonical": "value", + "probeAtomicFileLock": "value", + "readTrustedHeadFile": "value", + "trustedHeadPathFor": "value", + "tryAcquireAtomicFileLock": "value", + "tryWithLedgerFileLock": "value", + "verifyEntriesAgainstTrustedHead": "value", + "withLedgerFileLock": "value", + "writeLedgerFileAtomically": "value" + }, + "./matrix": { + "AxisSummary": "type", + "CellResult": "type", + "CellSpend": "type", + "CostProvenance": "type", + "DefaultVerdict": "type", + "MatrixAxis": "type", + "MatrixCell": "type", + "MatrixResult": "type", + "RunAgentMatrixOptions": "type", + "readCellSpend": "value", + "runAgentMatrix": "value", + "withCellSpend": "value" + }, + "./meta-eval": { + "CalibrationBin": "value", + "CalibrationOptions": "value", + "CalibrationPair": "value", + "CalibrationReport": "value", + "CorrelationResult": "value", + "CorrelationStudyOptions": "value", + "CorrelationStudyResult": "value", + "DeploymentOutcome": "value", + "EvalHealthStamp": "value", + "EvalMetricSpec": "value", + "FileSystemOutcomeStore": "value", + "FileSystemOutcomeStoreOptions": "value", + "InMemoryOutcomeStore": "value", + "JudgeSentinelOptions": "value", + "OutcomeFilter": "value", + "OutcomePair": "value", + "OutcomeStore": "value", + "RubricOutcomePair": "value", + "RubricPredictiveValidityInput": "value", + "RubricPredictiveValidityReport": "value", + "RubricRanking": "value", + "SENTINEL_METRIC_NAMES": "value", + "SentinelMetricName": "value", + "SentinelMetrics": "value", + "SentinelReport": "value", + "SentinelSetOptions": "value", + "SentinelSnapshot": "value", + "SentinelStore": "value", + "SentinelThresholds": "value", + "SentinelTrend": "value", + "SnapshotMeta": "value", + "calibrationCurve": "value", + "calibrationFromPairs": "value", + "correlationStudy": "value", + "evalHealthStamp": "value", + "fileSentinelStore": "value", + "inMemorySentinelStore": "value", + "judgeSentinelReport": "value", + "rubricPredictiveValidity": "value", + "snapshotFromAgreement": "value", + "snapshotFromCalibration": "value", + "snapshotFromSentinelSet": "value", + "validateSentinelSnapshot": "value" + }, + "./multishot": { + "ArtifactJudgeInput": "type", + "CellCompositeInput": "type", + "CellCompositeScore": "type", + "ConversationJudgeInput": "type", + "DEFAULT_CODER_MODEL": "value", + "DEFAULT_DELEGATE_CODE_TOOL": "value", + "DEFAULT_DELEGATE_RESEARCH_TOOL": "value", + "DEFAULT_JUDGE_MODEL": "value", + "DEFAULT_RESEARCHER_MODEL": "value", + "DefaultCoderConfig": "type", + "DefaultResearcherConfig": "type", + "DefaultToolsBundle": "type", + "DefaultToolsConfig": "type", + "JudgeConfig": "type", + "JudgeDimension": "type", + "JudgeRunResult": "type", + "JudgeScore": "type", + "MultishotArtifact": "type", + "MultishotCellOutput": "type", + "MultishotDriverEmptyError": "value", + "MultishotFatalToolError": "value", + "MultishotJudges": "type", + "MultishotMessage": "type", + "MultishotPersona": "type", + "MultishotResult": "type", + "MultishotShape": "type", + "MultishotShot": "type", + "MultishotShotResultError": "value", + "MultishotToolDefinition": "type", + "MultishotToolExecutor": "type", + "MultishotTransport": "type", + "MultishotTransportRequest": "type", + "MultishotTransportResponse": "type", + "MultishotTransportToolCall": "type", + "RouterCompletionRequest": "type", + "RouterCompletionResponse": "type", + "RouterToolCall": "type", + "RunMultishotMatrixOptions": "type", + "RunMultishotMatrixResult": "type", + "RunMultishotOptions": "type", + "assertMultishotShotResult": "value", + "computeCellComposite": "value", + "createCodeExecutor": "value", + "createResearchExecutor": "value", + "defaultDelegationTools": "value", + "defaultMultishotDriverSystemPrompt": "value", + "defaultMultishotOpener": "value", + "defaultRouterBaseUrl": "value", + "defaultShapeFromProfile": "value", + "estimateRouterCost": "value", + "renderDimensions": "value", + "renderJsonFooter": "value", + "renderPersonaFacts": "value", + "requireRouterApiKey": "value", + "routerCompletion": "value", + "runJudge": "value", + "runMultishot": "value", + "runMultishotMatrix": "value" + }, + "./multishot/golden": { + "CURRENT_MULTISHOT_GOLDEN_VERSION": "value", + "CompareOptions": "type", + "MultishotGoldenCase": "type", + "MultishotGoldenEngine": "type", + "MultishotGoldenMismatchError": "value", + "MultishotGoldenOutcome": "type", + "MultishotGoldenRecord": "type", + "MultishotGoldenRecordSet": "type", + "MultishotGoldenReport": "type", + "MultishotGoldenScenario": "type", + "MultishotGoldenScenarioReport": "type", + "MultishotMatrixGoldenCase": "type", + "MultishotMatrixGoldenEngine": "type", + "MultishotMatrixGoldenRecord": "type", + "MultishotMatrixGoldenScenario": "type", + "MultishotRecordedMessage": "type", + "MultishotRecordedRequest": "type", + "RecordedJudgeRequest": "type", + "RecordedMultishotError": "type", + "RecordedMultishotResult": "type", + "VOLATILE_KEYS": "value", + "assertMultishotGoldenScenario": "value", + "assertMultishotMatrixGoldenScenario": "value", + "checkMultishotGolden": "value", + "checkMultishotGoldenScenario": "value", + "checkMultishotMatrixGoldenScenario": "value", + "compareJson": "value", + "goldenRecords": "value", + "maskVolatileMarkdown": "value", + "multishotGoldenScenarios": "value", + "multishotGoldenVersions": "value", + "multishotMatrixGoldenScenarios": "value", + "readRunDir": "value", + "recordError": "value", + "recordJudgeRequest": "value", + "recordMessage": "value", + "recordRequest": "value", + "recordResult": "value", + "sortJudgeRequests": "value", + "stripVolatile": "value" + }, + "./pipelines": { + "BudgetBreachFinding": "value", + "BudgetBreachReport": "value", + "DivergenceOptions": "value", + "DivergenceReport": "value", + "FailureCluster": "value", + "FailureClusterReport": "value", + "JudgeAgreementReport": "value", + "JudgePair": "value", + "RegressionOptions": "value", + "RegressionSpec": "value", + "StuckLoopFinding": "value", + "StuckLoopOptions": "value", + "StuckLoopReport": "value", + "ToolWasteFinding": "value", + "ToolWasteOptions": "value", + "ToolWasteReport": "value", + "budgetBreachView": "value", + "computeToolUseMetrics": "value", + "failureClusterView": "value", + "firstDivergenceView": "value", + "judgeAgreementView": "value", + "regressionView": "value", + "stuckLoopView": "value", + "toolWasteView": "value" + }, + "./profile-cell": { + "AGENT_PROFILE_KINDS": "value", + "AgentInterfaceProfileLike": "value", + "AgentProfileCell": "value", + "AgentProfileCellInput": "value", + "AgentProfileCellSchemaVersion": "value", + "AgentProfileCellValidationError": "value", + "AgentProfileDimensionValue": "value", + "AgentProfileHarness": "value", + "AgentProfileJson": "value", + "AgentProfileJsonObject": "value", + "AgentProfileKind": "value", + "AgentProfileSource": "value", + "AgentProfileSourceInput": "value", + "agentProfileCellHashMaterial": "value", + "agentProfileCellKey": "value", + "assertRunAgentProfileCell": "value", + "buildAgentInterfaceProfileCell": "value", + "buildAgentProfileCell": "value", + "groupRunsByAgentProfileCell": "value", + "requireAgentProfileCell": "value", + "toAgentProfileJson": "value", + "validateAgentProfileCell": "value", + "verifyAgentProfileCell": "value" + }, + "./reporting": { + "BootstrapOptions": "type", + "BootstrapResult": "type", + "GainDistributionBin": "type", + "GainDistributionFigureSpec": "type", + "GainDistributionOptions": "type", + "InterimReleaseConfidence": "type", + "InterimReleaseConfidenceInput": "type", + "JudgeReplayGateArgs": "type", + "PairedBootstrapOptions": "type", + "PairedBootstrapResult": "type", + "PairedEvalueOptions": "type", + "PairedEvalueSequence": "type", + "PairedEvalueStep": "type", + "ParetoFigureSpec": "type", + "ParetoPoint": "type", + "RESEARCH_REPORT_HARD_PAIR_FLOOR": "value", + "ReleaseConfidenceAxis": "type", + "ReleaseConfidenceAxisName": "type", + "ReleaseConfidenceInput": "type", + "ReleaseConfidenceIssue": "type", + "ReleaseConfidenceMetrics": "type", + "ReleaseConfidenceScorecard": "type", + "ReleaseConfidenceStatus": "type", + "ReleaseConfidenceThresholds": "type", + "ReleaseTraceEvidence": "type", + "ResearchReport": "type", + "ResearchReportCandidate": "type", + "ResearchReportDecision": "type", + "ResearchReportMethodology": "type", + "ResearchReportOptions": "type", + "ResearchReportRecommendation": "type", + "RubricOutcomePair": "type", + "RubricPredictiveValidityInput": "type", + "RubricPredictiveValidityReport": "type", + "RubricRanking": "type", + "SequentialDecision": "type", + "SummaryTable": "type", + "SummaryTableOptions": "type", + "SummaryTableRow": "type", + "Verdict": "type", + "assertReleaseConfidence": "value", + "benjaminiHochberg": "value", + "bootstrapCi": "value", + "evaluateInterimReleaseConfidence": "value", + "evaluateReleaseConfidence": "value", + "gainHistogram": "value", + "judgeReplayGate": "value", + "pairedBootstrap": "value", + "pairedEvalueSequence": "value", + "paretoChart": "value", + "researchReport": "value", + "rubricPredictiveValidity": "value", + "summaryTable": "value", + "wilcoxonSignedRank": "value" + }, + "./rl": { + "ABSENT_CATEGORY": "value", + "AdaptationCurve": "value", + "AdaptationPoint": "value", + "AdaptationRunner": "value", + "AdapterContext": "value", + "AdversarialMutation": "value", + "BehaviorFeatures": "value", + "BradleyTerryFit": "value", + "BradleyTerryRating": "value", + "BuildPairwiseFromCampaignInput": "value", + "BuildVerifiedFindingRowArgs": "value", + "CaseVerdictDetail": "value", + "CellObservation": "value", + "CompareCurvesResult": "value", + "ComputeBestOfNOptions": "value", + "ComputeBestOfNResult": "value", + "ComputeCurve": "value", + "ComputeCurveBudget": "value", + "ComputeCurvePoint": "value", + "ContaminationProbeInput": "value", + "ContaminationProbeOptions": "value", + "ContaminationProbeReport": "value", + "CorpusAppendResult": "value", + "CorpusRecord": "value", + "CurriculumAllocation": "value", + "DEFAULT_MIN_N_PER_FEATURE": "value", + "DEFAULT_QUANTILE_BUCKETS": "value", + "DPO_CONTEXT_REQUIREMENT": "value", + "DatasetFormat": "value", + "DeploymentOutcome": "type", + "DetectRewardHackingInput": "value", + "DpoExportRow": "value", + "DpoLineContext": "value", + "DpoLookups": "value", + "EasyModeOptions": "value", + "EasyModeReport": "value", + "EloOptions": "value", + "ExtractPreferencesOptions": "value", + "ExtractStepRewardsOptions": "value", + "FeatureDivergence": "value", + "FeatureShift": "value", + "FidelityReport": "value", + "FidelityVerdict": "value", + "FileSystemOutcomeStore": "value", + "FileSystemOutcomeStoreOptions": "type", + "FixOutcome": "value", + "GoldLabelEntry": "value", + "GrpoExportRow": "value", + "GrpoLookups": "value", + "HarvestOptions": "value", + "InMemoryOutcomeStore": "value", + "NormalizedStep": "value", + "OffPolicyContributionCounts": "value", + "OffPolicyEstimate": "value", + "OffPolicyOptions": "value", + "OffPolicyTrajectory": "value", + "OutcomeStore": "type", + "PRM_CONTEXT_REQUIREMENT": "value", + "PairedDeltaCoverage": "value", + "PairwiseOutcome": "value", + "ParetoPointInput": "value", + "PredictiveValidityResearcher": "value", + "PredictiveValidityResearcherOptions": "value", + "PreferenceExtractionReport": "value", + "PreferenceStrategy": "value", + "PreferenceTriple": "value", + "PrefixDivergence": "value", + "PrmExportRow": "value", + "PrmLineContext": "value", + "PrmLookups": "value", + "PrmTrainingTriple": "value", + "REPRESENTATIVE_MIN_FIDELITY": "value", + "RLCampaignResult": "value", + "ReplayBatchCase": "value", + "ReplayBatchFix": "value", + "ReplayBatchReport": "value", + "RewardHackingFinding": "value", + "RewardHackingReport": "value", + "RewardHackingSignal": "value", + "RewardKind": "value", + "RewardStats": "value", + "RlDatasetBundle": "value", + "RlDatasetConfig": "value", + "RlDatasetManifest": "value", + "RlDatasetStats": "value", + "RolloutLineContext": "type", + "RunAdaptationCurveOptions": "value", + "RunComputeCurveOptions": "value", + "RunRLCampaignOptions": "value", + "RunwiseStepSummary": "value", + "STEP_REWARD_CONTEXT_REQUIREMENT": "value", + "ScenarioPerturbation": "value", + "ScenarioPerturbationKind": "value", + "SelfConsistencyOptions": "value", + "SelfConsistencyResult": "value", + "SftExportRow": "value", + "SftLookups": "value", + "SimFidelityOptions": "value", + "StepReward": "value", + "StepRewardJsonlRow": "value", + "StepScorer": "value", + "ThompsonCurriculumOptions": "value", + "TrainingLineSelectionOptions": "value", + "TrajectoryStep": "value", + "VERIFIED_FINDING_SCHEMA": "value", + "VarianceCurriculumOptions": "value", + "VerifiableReward": "value", + "VerifiableRewardExtractionOptions": "value", + "VerifiableRewardSource": "value", + "VerifiedFindingFix": "value", + "VerifiedFindingRow": "value", + "VerifiedFindingsCorpusSource": "value", + "VerifiedFindingsDataset": "value", + "VerifiedFindingsSource": "value", + "VerifiedFindingsSummary": "value", + "appendToCorpus": "value", + "applyEloUpdate": "value", + "assertPrmTrainableLine": "value", + "bestOfN": "value", + "bucketLabel": "value", + "buildDatasetFromCorpus": "value", + "buildPairwiseFromCampaign": "value", + "buildRlDataset": "value", + "buildVerifiedFindingRow": "value", + "campaignToRunRecords": "value", + "compareAdaptationCurves": "value", + "datasheetToMarkdown": "value", + "defaultBehaviorFeatures": "value", + "detectRewardHacking": "value", + "doublyRobust": "value", + "easyModeCheck": "value", + "extractPreferences": "value", + "extractStepRewards": "value", + "extractVerifiableReward": "value", + "extractVerifiableRewardsFromRecords": "value", + "filterDeterministicallyRewarded": "value", + "firstPassK": "value", + "fitBradleyTerry": "value", + "injectIrrelevantClause": "value", + "inverseProbabilityWeighting": "value", + "jsDivergence": "value", + "loadVerifiedFindingsDataset": "value", + "observationsFromRunRecords": "value", + "offPolicyEstimateAll": "value", + "paretoFrontier": "value", + "prmTrainingPairs": "value", + "quantileEdges": "value", + "readCorpus": "value", + "renameVariables": "value", + "runAdaptationCurve": "value", + "runComputeCurve": "value", + "runContaminationProbe": "value", + "runEvalCampaign": "value", + "runRLCampaign": "value", + "runwiseStepRewardSummary": "value", + "selfConsistency": "value", + "selfNormalizedImportanceWeighting": "value", + "shuffleOrder": "value", + "simFidelityReport": "value", + "stepRewardsToJsonl": "value", + "summarizeVerifiedFindings": "value", + "thompsonCurriculum": "value", + "toAnthropicFormat": "value", + "toDpoJsonl": "value", + "toDpoRows": "value", + "toGrpoJsonl": "value", + "toGrpoRows": "value", + "toPrmJsonl": "value", + "toPrmRows": "value", + "toSftJsonl": "value", + "toSftRows": "value", + "toTRLFormat": "value", + "validateDatasetFormats": "value", + "varianceBasedCurriculum": "value", + "verificationReportToRunRecord": "value", + "verifiedFindingsToJsonl": "value" + }, + "./rollout": { + "ATIF_SCHEMA_VERSION": "value", + "BuildOptions": "type", + "BuildSummary": "type", + "CHAT_ROLES": "value", + "ChatMessage": "type", + "ChatRole": "type", + "ChatToolCall": "type", + "ClaudeTranscript": "type", + "ClaudeTranscriptRef": "type", + "ClaudeUsageTotals": "type", + "DEFAULT_CLAUDE_PROJECTS_DIR": "value", + "DEFAULT_OPENCODE_DB": "value", + "DatasetCardInputs": "type", + "EmittedEvidence": "type", + "FORMAT_FILES": "value", + "FORMAT_GATE_DISPOSITION": "value", + "FormatGateCounts": "type", + "FromHarborOptions": "type", + "GATE_CHECKS": "value", + "GATE_CHECK_IDS": "value", + "GATE_POLICIES": "value", + "GateCheck": "type", + "GateCheckDisposition": "type", + "GateCheckId": "type", + "GateCheckedOutcome": "type", + "GateDisposition": "type", + "GateEntryPoint": "type", + "GatePolicy": "type", + "GateReport": "type", + "GatedEvidence": "type", + "HARBOR_IMPORT_GAP": "value", + "HarborAgent": "type", + "HarborContentPart": "type", + "HarborFinalMetrics": "type", + "HarborImageSource": "type", + "HarborMetrics": "type", + "HarborObservation": "type", + "HarborObservationResult": "type", + "HarborStep": "type", + "HarborStepSource": "type", + "HarborSubagentTrajectoryRef": "type", + "HarborToolCall": "type", + "HarborTrajectory": "type", + "MintRolloutOptions": "type", + "MintRolloutResult": "type", + "MintedRolloutLine": "type", + "MintedRolloutOutcome": "type", + "OpencodeSessionRow": "type", + "RELEASE_FORMATS": "value", + "ROLLOUT_CAPTURES": "value", + "ROLLOUT_RELEASE_USAGE": "value", + "ROLLOUT_ROLES": "value", + "ROLLOUT_SCHEMA": "value", + "ROLLOUT_SPLITS": "value", + "RealnessLabels": "type", + "ReleaseFormat": "type", + "ReleaseRowRef": "type", + "RewardRow": "type", + "RftItem": "type", + "RolloutArtifacts": "type", + "RolloutCapture": "type", + "RolloutCostBlock": "type", + "RolloutLine": "type", + "RolloutOutcome": "type", + "RolloutPolicy": "type", + "RolloutProvenance": "type", + "RolloutReleaseCliArgs": "type", + "RolloutRole": "type", + "RolloutScrubber": "type", + "RolloutSplit": "type", + "RolloutStep": "type", + "RolloutTask": "type", + "SCRUB_RULES": "value", + "ScoreOrigin": "type", + "ScorePreference": "type", + "ScrubCounts": "type", + "ScrubReport": "type", + "ScrubRule": "type", + "SftExportOptions": "type", + "SftRow": "type", + "TRAINABLE_SPLITS": "value", + "ToolDef": "type", + "VerifiersRolloutOutput": "type", + "VerifiersTokenUsage": "type", + "addScrubCounts": "value", + "appendRolloutLines": "value", + "assertGateReport": "value", + "assertMinted": "value", + "assertMintedLines": "value", + "assertRolloutLine": "value", + "buildDatasetCard": "value", + "buildHfDataset": "value", + "claudeProjectSlug": "value", + "defaultRolloutScrubber": "value", + "emptyScrubCounts": "value", + "findClaudeTranscripts": "value", + "findOpencodeSessionById": "value", + "findOpencodeSessionsByDirectory": "value", + "fromHarborTrajectory": "value", + "gateErrors": "value", + "gateGamedOutcome": "value", + "gatedEvidenceOf": "value", + "gatedRolloutIds": "value", + "isRealnessGated": "value", + "isRolloutLine": "value", + "isTrainableSplit": "value", + "measureFormatGate": "value", + "mintRolloutRows": "value", + "observedScore": "value", + "observedSplitScore": "value", + "openOpencodeDb": "value", + "parseRolloutReleaseArgs": "value", + "planPushCommand": "value", + "pushDataset": "value", + "readClaudeTranscript": "value", + "readOpencodeSessionMessages": "value", + "readRolloutJournal": "value", + "readRolloutLedger": "value", + "realnessLabels": "value", + "relabelImportedSplit": "value", + "releaseRowRefs": "value", + "runRolloutReleaseCli": "value", + "scoreOrigin": "value", + "scrubLines": "value", + "scrubRolloutLine": "value", + "scrubText": "value", + "toHarborTrajectories": "value", + "toHarborTrajectory": "value", + "toJsonl": "value", + "toRewardRows": "value", + "toRftItem": "value", + "toRftItems": "value", + "toSftRows": "value", + "toVerifiersRolloutOutput": "value", + "toVerifiersRolloutOutputs": "value", + "trainingReward": "value", + "trainingScore": "value", + "unmintableReasons": "value", + "validateRolloutLine": "value", + "writeRolloutLedger": "value" + }, + "./storyboard": { + "CodeAnimationOptions": "value", + "CodeEdit": "value", + "CompileOptions": "value", + "HtmlRenderOptions": "value", + "ReduceOptions": "value", + "Scene": "value", + "SceneType": "value", + "SceneVisual": "value", + "SemanticEvent": "value", + "SemanticKind": "value", + "Storyboard": "value", + "codeEditFromSpan": "value", + "codeEditsForStoryboard": "value", + "compileStoryboard": "value", + "editAnimationText": "value", + "extractCodeEdits": "value", + "reduceToSemanticEvents": "value", + "renderCodeAnimationHtml": "value", + "renderStoryboardHtml": "value", + "renderStoryboardMarkdown": "value" + }, + "./supervisor-run": { + "ClaudeCodeReaderOptions": "type", + "CloseRow": "type", + "DEFAULT_CANCEL_TOOLS": "value", + "DEFAULT_SPAWN_TOOLS": "value", + "DEFAULT_STEER_TOOLS": "value", + "DecisionMetrics": "type", + "EconomicsMetrics": "type", + "LoopsReaderOptions": "type", + "Measured": "type", + "NO_SOURCE_LIMITS": "value", + "OrchestrationMetrics": "type", + "OutcomeMetrics": "type", + "PatchStats": "type", + "PerWorkerRow": "type", + "RoleSpend": "type", + "RollupCellRow": "type", + "SUPERVISOR_RUN_INTEGRITY_SCHEMA": "value", + "SUPERVISOR_RUN_ROLLUP_SCHEMA": "value", + "SUPERVISOR_RUN_SCHEMA": "value", + "SourceLimits": "type", + "SpawnRow": "type", + "SteerAcknowledgementFact": "type", + "SteerBreakdown": "type", + "SteerRequestFact": "type", + "SupervisorJournalDialect": "type", + "SupervisorRolloutOptions": "type", + "SupervisorRunIntegrityEvidence": "type", + "SupervisorRunIntegrityIssue": "type", + "SupervisorRunIntegrityIssueCode": "type", + "SupervisorRunIntegrityOptions": "type", + "SupervisorRunIntegrityReport": "type", + "SupervisorRunIntegritySeverity": "type", + "SupervisorRunNodeRole": "type", + "SupervisorRunReader": "type", + "SupervisorRunReport": "type", + "SupervisorRunRollup": "type", + "SupervisorRunSourceOnlyCheckCode": "type", + "SupervisorRunSources": "type", + "SupervisorRunTree": "type", + "SupervisorRunTreeGap": "type", + "SupervisorRunTreeGapCode": "type", + "SupervisorTreeFacts": "type", + "Unavailable": "type", + "WallDistribution": "type", + "WorkerLogFacts": "type", + "WorkerLogSource": "type", + "WriteSupervisorRunOptions": "type", + "analyzeSupervisorRun": "value", + "analyzeSupervisorRunIntegrity": "value", + "analyzeSupervisorRunSources": "value", + "claudeCodeSupervisorRunReader": "value", + "findSupervisorRunDirIn": "value", + "findSupervisorRunDirs": "value", + "isRuntimeSupervisorRunDir": "value", + "isUnavailable": "value", + "loopsSupervisorRunReader": "value", + "parsePatch": "value", + "parseSupervisorTree": "value", + "readClaudeCodeSupervisorRun": "value", + "readLoopsSupervisorRun": "value", + "readRuntimeSupervisorRun": "value", + "renderSupervisorRollupMarkdown": "value", + "renderSupervisorRunHeadline": "value", + "renderSupervisorRunMarkdown": "value", + "reportSupervisorRound": "value", + "rollupSupervisorRuns": "value", + "runtimeSupervisorRunReader": "value", + "showMeasured": "value", + "supervisorReportStem": "value", + "supervisorRunRolloutLines": "value", + "unavailable": "value", + "writeSupervisorRunReport": "value", + "writeSupervisorRunReportSafe": "value" + }, + "./trace-attributes": { + "INPUT_VALUE": "value", + "LLM_CACHED_TOKENS": "value", + "LLM_CACHED_TOKEN_ATTR_KEYS": "value", + "LLM_CACHE_WRITE_TOKENS": "value", + "LLM_CACHE_WRITE_TOKEN_ATTR_KEYS": "value", + "LLM_CONTEXT_TOKENS": "value", + "LLM_COST_ATTR_KEYS": "value", + "LLM_COST_USD": "value", + "LLM_INPUT_TOKENS": "value", + "LLM_INPUT_TOKEN_ATTR_KEYS": "value", + "LLM_MODEL_ATTR_KEYS": "value", + "LLM_MODEL_NAME": "value", + "LLM_OUTPUT_TOKENS": "value", + "LLM_OUTPUT_TOKEN_ATTR_KEYS": "value", + "LLM_REASONING_TOKENS": "value", + "LLM_REASONING_TOKEN_ATTR_KEYS": "value", + "LlmSpanOtlpInput": "value", + "OPENINFERENCE_SPAN_KIND": "value", + "OUTPUT_VALUE": "value", + "RUN_COST_ATTR_KEYS": "value", + "SPAN_KIND_ATTR_KEYS": "value", + "TOOL_ARGS_CAPTURED": "value", + "TOOL_LATENCY_MS": "value", + "TOOL_NAME": "value", + "TOOL_NAME_ATTR_KEYS": "value", + "applyLlmSpanOtlpAttributes": "value", + "asNumber": "value", + "contextInputTokens": "value", + "firstNumberAttr": "value" + }, + "./trace-repair": { + "ADMISSION_CONFIG_DEFAULTS": "value", + "ADMISSION_EXCLUSION_MEANING": "value", + "ADMISSION_EXCLUSION_ORDER": "value", + "ADMISSION_ROW_KEYS": "value", + "ADMISSION_STRATA": "value", + "ActionPayloadKind": "type", + "AdmissionArtifact": "type", + "AdmissionCheckRecord": "type", + "AdmissionConfig": "type", + "AdmissionConfigInput": "type", + "AdmissionControlArm": "type", + "AdmissionControlObservation": "type", + "AdmissionControlRequest": "type", + "AdmissionControlRunner": "type", + "AdmissionCriteria": "type", + "AdmissionDecision": "type", + "AdmissionDenominatorError": "value", + "AdmissionDivergence": "type", + "AdmissionEndStateOracle": "type", + "AdmissionEvidence": "type", + "AdmissionExclusionReason": "type", + "AdmissionIndependenceError": "value", + "AdmissionNoOpInjection": "type", + "AdmissionOutcome": "type", + "AdmissionPrefixReplay": "type", + "AdmissionPrefixReplayer": "type", + "AdmissionProvenance": "type", + "AdmissionRejection": "type", + "AdmissionReport": "type", + "AdmissionRolloutSummary": "type", + "AdmissionRow": "type", + "AdmissionRowVerdict": "type", + "AdmissionScreeningRecord": "type", + "AdmissionStratum": "type", + "AdmissionTestVerdict": "type", + "AdmittedRow": "type", + "AnalystResponse": "type", + "AskRepairArmOptions": "type", + "BLINDED_FIELDS": "value", + "BlindTrajectoryOptions": "type", + "BlindedStep": "type", + "BlindedTrajectoryPrefix": "type", + "BudgetCheck": "type", + "BudgetMeasurement": "type", + "BudgetViolation": "type", + "CONTINUATION_POLICY_DEFAULTS": "value", + "CONTROL_SCREENING_MODES": "value", + "CREDIT_TERMS": "value", + "CommandOutput": "type", + "CompletionRepairArmOptions": "type", + "ContinuationArm": "type", + "ContinuationEnvironment": "type", + "ContinuationEnvironmentDescription": "type", + "ContinuationEnvironmentFactory": "type", + "ContinuationEnvironmentRequest": "type", + "ContinuationExecRecord": "type", + "ContinuationExecResult": "type", + "ContinuationExitStatus": "type", + "ContinuationMessage": "type", + "ContinuationModel": "type", + "ContinuationModelCall": "type", + "ContinuationModelRequest": "type", + "ContinuationModelResponse": "type", + "ContinuationPolicyViolationError": "value", + "ContinuationRollout": "type", + "ContinuationStepRecord": "type", + "ContinuationSymmetryError": "value", + "ContinuationUsageTotals": "type", + "ControlArmEvidence": "type", + "ControlCapability": "type", + "ControlPolicy": "type", + "ControlPolicyInput": "type", + "ControlScreening": "type", + "DEGENERATE_STRATEGIES": "value", + "DSPY_REPAIR_SIGNATURE": "value", + "DSPY_REPAIR_TASK_TOKEN": "value", + "DSPY_REPAIR_TRAJECTORY_INPUT": "value", + "DefineContinuationPolicyInput": "type", + "DegenerateDefeatKind": "type", + "DegenerateStrategy": "type", + "DegenerateStrategyId": "type", + "DeltaRepairInterval": "type", + "DeltaRepairOptions": "type", + "DeltaRepairReport": "type", + "DenominatorChain": "type", + "DenominatorChainArtifact": "type", + "DenominatorIntactInput": "type", + "DenominatorStage": "type", + "DockerContinuationEnvironmentOptions": "type", + "DspyRepairArmOptions": "type", + "GradeRepairOptions": "type", + "InjectedAction": "type", + "InjectedTestOracleOptions": "type", + "InterventionBudget": "type", + "InterventionExecution": "type", + "MINI_SWE_SYSTEM_MESSAGE": "value", + "MIN_ORACLE_REPLICATES": "value", + "NO_DECISIVE_FAILURE": "value", + "NO_OP_ACTIONS": "value", + "NondeterministicOracleError": "value", + "OUTPUT_ELISION_THRESHOLD": "value", + "OUTPUT_ELISION_WINDOW": "value", + "OracleAssertionResult": "type", + "OracleDeterminismEvidence": "type", + "OracleDeterminismVerdict": "type", + "OracleFlippedUnit": "type", + "OracleLoad": "type", + "OracleReplicate": "type", + "OracleReplicateGroup": "type", + "OracleStateLabel": "type", + "OracleStateVerdict": "type", + "ParseAnalystResponseOutcome": "type", + "ParsedAction": "type", + "PinnedContinuationPolicy": "type", + "PrefixFidelityEvidence": "type", + "PrefixReplayEvidence": "type", + "ProcessRequest": "type", + "ProcessResult": "type", + "ProcessRunner": "type", + "REPAIR_CONTRACT_LINES": "value", + "REPAIR_QUESTION": "value", + "REPAIR_REPAIR_CONTRACT_LINES": "value", + "ReadRepairPayloadOptions": "type", + "RecordedStep": "type", + "RecordedToolCall": "type", + "RenderAdmissionOptions": "type", + "RepairAnalystArm": "type", + "RepairArm": "type", + "RepairArmAffordance": "type", + "RepairArmAnswer": "type", + "RepairArmAsymmetry": "type", + "RepairArmAsymmetryReport": "type", + "RepairArmBudgetRecord": "type", + "RepairArmCertification": "type", + "RepairArmDeclaration": "type", + "RepairArmEvidence": "type", + "RepairArmRejectedRow": "type", + "RepairArmRepairTurn": "type", + "RepairArmReply": "type", + "RepairArmRequest": "type", + "RepairArmSymmetryError": "value", + "RepairArmUsage": "type", + "RepairContinuationOutcome": "type", + "RepairContinuationRequest": "type", + "RepairContinuationRunner": "type", + "RepairCredit": "type", + "RepairDeclined": "type", + "RepairExecResult": "type", + "RepairFinding": "type", + "RepairFunnelCounts": "type", + "RepairGrade": "type", + "RepairIntervention": "type", + "RepairRejection": "type", + "RepairRolloutEvidence": "type", + "RepairRowResult": "type", + "RepairSession": "type", + "RepairSessionFactory": "type", + "RepairSessionRequest": "type", + "RepairThreat": "type", + "RepairThreatId": "type", + "ReproductionEvidence": "type", + "ResponseParseFailure": "type", + "RunAdmissionOptions": "type", + "RunContinuationOptions": "type", + "SCAFFOLD_INTERVENTION_BUDGET": "value", + "SUBMIT_SENTINEL": "value", + "SUITE_REWARD_UNIT": "value", + "TB_REPAIR_ADMISSION_CRITERIA": "value", + "TaskOracleRegistry": "type", + "TaskOracleRegistryDocument": "type", + "TestOracle": "type", + "TestOracleContext": "type", + "TestOracleError": "value", + "TestOracleOutcome": "type", + "TestRunEvidence": "type", + "TestSuiteFile": "type", + "TestSuiteTamperedError": "value", + "UncalibratedControlError": "value", + "admissionArtifact": "value", + "admitRow": "value", + "admittedCount": "value", + "admittedRowIds": "value", + "askRepairArm": "value", + "assertAnalystIndependent": "value", + "assertArmSymmetry": "value", + "assertChainReconciles": "value", + "assertControlCalibrated": "value", + "assertDenominatorIntact": "value", + "assertDeterministicOracle": "value", + "assertDspyRepairEngine": "value", + "blindTrajectory": "value", + "buildDenominatorChain": "value", + "checkInterventionBudget": "value", + "classifyActionPayload": "value", + "continuationPolicyDigest": "value", + "continuationSeed": "value", + "controlCanRescue": "value", + "countFunnel": "value", + "createCompletionRepairArm": "value", + "createDockerContinuationEnvironment": "value", + "createDspyRepairArm": "value", + "defineControlPolicy": "value", + "definePinnedContinuationPolicy": "value", + "degenerateStrategy": "value", + "deltaRepair": "value", + "dockerRunArgs": "value", + "dspyRepairInstructions": "value", + "gradeRepairRow": "value", + "injectedTestOracle": "value", + "isPreStratumReason": "value", + "isRecordedTimeout": "value", + "noOpInjectionStep": "value", + "nodeProcessRunner": "value", + "normalizeActionForComparison": "value", + "oracleDeterminism": "value", + "parseAction": "value", + "parseAnalystResponse": "value", + "parseTaskOracleRegistry": "value", + "reachedT0": "value", + "reachedT1": "value", + "reachedT2": "value", + "readRepairPayload": "value", + "renderAdmissionReport": "value", + "renderDeltaRepairReport": "value", + "renderFormatErrorObservation": "value", + "renderInstanceMessage": "value", + "renderObservation": "value", + "renderRepairTrajectory": "value", + "renderTimeoutObservation": "value", + "repairArmAsymmetries": "value", + "repairArmPromptSha256": "value", + "repairArmResponse": "value", + "repairCredit": "value", + "repairFinding": "value", + "repairQuestionSha256": "value", + "repairTaskDefinition": "value", + "repairTaskPolicy": "value", + "repairTrajectoryHeader": "value", + "resolveAdmissionConfig": "value", + "rolloutDigest": "value", + "rolloutRecordedSteps": "value", + "runAdmission": "value", + "runContinuation": "value", + "scanShellAction": "value", + "stratumOf": "value", + "submissionOf": "value", + "taskOracleRegistry": "value", + "testSuiteDigest": "value", + "toRecordedSteps": "value", + "totalCost": "value", + "totalUsage": "value" + }, + "./traces": { + "AnalyzeTracesInput": "type", + "AnalyzeTracesOptions": "type", + "AnalyzeTracesResult": "type", + "Artifact": "value", + "BoundedTraceAnalysisStoreOptions": "type", + "BudgetLedgerEntry": "value", + "BudgetSpec": "value", + "BuildTraceAnalysisToolsOptions": "type", + "CaptureFetchContext": "value", + "CaptureFetchOptions": "value", + "DEFAULT_REDACTION_RULES": "value", + "DEFAULT_TRACE_ANALYST_BUDGETS": "value", + "DatasetOverview": "type", + "ErrorCluster": "type", + "EventFilter": "value", + "EventKind": "value", + "ExportableSpan": "value", + "ExtractUsageFromSseOptions": "value", + "ExtractedUsage": "value", + "FAILURE_CLASSES": "value", + "FailureClass": "value", + "FileSystemRawProviderSink": "value", + "FileSystemRawProviderSinkOptions": "value", + "FileSystemTraceStore": "value", + "FileSystemTraceStoreOptions": "value", + "FlattenOtlpOptions": "type", + "GenericSpan": "value", + "INPUT_VALUE": "value", + "InMemoryRawProviderSink": "value", + "InMemoryRawProviderSinkOptions": "value", + "InMemoryTraceStore": "value", + "JudgeSpan": "value", + "LLM_CACHED_TOKENS": "value", + "LLM_CACHED_TOKEN_ATTR_KEYS": "value", + "LLM_CACHE_WRITE_TOKENS": "value", + "LLM_CACHE_WRITE_TOKEN_ATTR_KEYS": "value", + "LLM_CONTEXT_TOKENS": "value", + "LLM_COST_ATTR_KEYS": "value", + "LLM_COST_USD": "value", + "LLM_INPUT_TOKENS": "value", + "LLM_INPUT_TOKEN_ATTR_KEYS": "value", + "LLM_MODEL_ATTR_KEYS": "value", + "LLM_MODEL_NAME": "value", + "LLM_OUTPUT_TOKENS": "value", + "LLM_OUTPUT_TOKEN_ATTR_KEYS": "value", + "LLM_REASONING_TOKENS": "value", + "LLM_REASONING_TOKEN_ATTR_KEYS": "value", + "LlmSpan": "value", + "LlmSpanOtlpInput": "value", + "Message": "value", + "NoopRawProviderSink": "value", + "OPENINFERENCE_SPAN_KIND": "value", + "OTEL_AGENT_EVAL_SCOPE": "value", + "OUTPUT_VALUE": "value", + "OtelExportConfig": "value", + "OtelExporter": "value", + "OtlpExport": "value", + "OtlpFileTraceStore": "value", + "OtlpFileTraceStoreOptions": "type", + "OtlpFlatLine": "type", + "OtlpResourceSpans": "value", + "OtlpSpan": "value", + "OtlpSpanRole": "value", + "OtlpSpanRoleInput": "value", + "OtlpToRunRecordsOptions": "type", + "OtlpTraceRunRecord": "type", + "ProjectedOtlpSpan": "type", + "ProviderRedactor": "value", + "QueryTracesPage": "type", + "REDACTION_VERSION": "value", + "RUN_COST_ATTR_KEYS": "value", + "RawProviderDirection": "value", + "RawProviderEvent": "value", + "RawProviderSink": "value", + "RawProviderSinkFilter": "value", + "RedactionReport": "value", + "RedactionRule": "value", + "RetrievalSpan": "value", + "Run": "value", + "RunCompleteHook": "value", + "RunCompleteHookContext": "value", + "RunFilter": "value", + "RunIntegrityError": "value", + "RunIntegrityExpectations": "value", + "RunIntegrityIssue": "value", + "RunIntegrityIssueCode": "value", + "RunIntegrityReport": "value", + "RunLayer": "value", + "RunOutcome": "value", + "RunStatus": "value", + "SPAN_KIND_ATTR_KEYS": "value", + "SandboxSpan": "value", + "SearchSpanResult": "type", + "SearchTraceResult": "type", + "Span": "value", + "SpanBase": "value", + "SpanFilter": "value", + "SpanHandle": "value", + "SpanKind": "value", + "SpanMatchRecord": "type", + "SpanNotFoundError": "value", + "SpanStatus": "value", + "SseUsageMode": "value", + "TOOL_ARGS_CAPTURED": "value", + "TOOL_LATENCY_MS": "value", + "TOOL_NAME": "value", + "TOOL_NAME_ATTR_KEYS": "value", + "TRACE_ANALYSIS_LIMITS": "value", + "TRACE_ANALYST_ACTOR_DESCRIPTION": "value", + "TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION": "value", + "TRACE_ANALYST_TOOL_NAMESPACE": "value", + "TRACE_ANALYST_TRUNCATION_MARKER_PREFIX": "value", + "TRACE_SCHEMA_VERSION": "value", + "ToolSpan": "value", + "ToolSpanOtlpInput": "value", + "ToolSpansToTraceAnalysisStoreOptions": "type", + "ToolTraceMissingError": "value", + "TraceAggregate": "type", + "TraceAnalysisLimitError": "value", + "TraceAnalysisStore": "type", + "TraceAnalysisStoreContext": "type", + "TraceAnalysisStoreContractError": "value", + "TraceAnalysisToolDescriptor": "type", + "TraceAnalysisValidationError": "value", + "TraceAnalystByteBudgets": "type", + "TraceAnalystFilters": "type", + "TraceAnalystHookOptions": "type", + "TraceAnalystSpan": "type", + "TraceAnalystSpanKind": "type", + "TraceAnalystSpanStatus": "type", + "TraceAnalystTraceSummary": "type", + "TraceEmitter": "value", + "TraceEmitterOptions": "value", + "TraceEvent": "value", + "TraceFileMalformedError": "value", + "TraceFileMissingError": "value", + "TraceFileTooLargeError": "value", + "TraceInsightContext": "type", + "TraceInsightFinding": "type", + "TraceInsightPanelRole": "type", + "TraceInsightPromptInput": "type", + "TraceInsightQualityGate": "type", + "TraceInsightQuestion": "type", + "TraceInsightReadiness": "type", + "TraceInsightSuite": "type", + "TraceInsightTask": "type", + "TraceNotFoundError": "value", + "TraceStore": "value", + "TraceStoreSource": "value", + "TraceStoreToOtlpOptions": "value", + "TracesToOtlpResult": "value", + "ViewSpansResult": "type", + "ViewTraceOversized": "type", + "ViewTraceResult": "type", + "aggregateLlm": "value", + "analyzeTraces": "value", + "applyLlmSpanOtlpAttributes": "value", + "applyToolSpanOtlpAttributes": "value", + "argHash": "value", + "asNumber": "value", + "asString": "value", + "assertRunCaptured": "value", + "buildTraceAnalysisToolDescriptors": "value", + "buildTraceInsightContext": "value", + "buildTraceInsightPrompt": "value", + "captureFetchToRawSink": "value", + "classifyOtlpSpanRole": "value", + "contextInputTokens": "value", + "convertTraceStoresToOtlp": "value", + "createBoundedTraceAnalysisStore": "value", + "createOtelExporter": "value", + "createOtelTracingStore": "value", + "defaultProviderRedactor": "value", + "defaultTraceInsightPanel": "value", + "describeTraceInsightScope": "value", + "domainEvidencePattern": "value", + "exportRunAsOtlp": "value", + "extractOtlpAttributes": "value", + "extractUsage": "value", + "extractUsageFromResponse": "value", + "extractUsageFromSse": "value", + "firstNumberAttr": "value", + "firstStringAttr": "value", + "flattenOtlpExportToNdjson": "value", + "groupBy": "value", + "hasCapturedToolArgs": "value", + "inferDomainKeywords": "value", + "inferOtlpKind": "value", + "isJudgeSpan": "value", + "isLlmSpan": "value", + "isOtlpModelCall": "value", + "isRetrievalSpan": "value", + "isSandboxSpan": "value", + "isToolSpan": "value", + "judgeSpans": "value", + "llmSpanFromProvider": "value", + "llmSpans": "value", + "otelRunCompleteHook": "value", + "otlpRowsToRunRecords": "value", + "otlpRowsToTraceRunRecords": "value", + "otlpTextToTraceAnalysisStore": "value", + "otlpToRunRecords": "value", + "otlpToTraceRunRecords": "value", + "planTraceInsightQuestions": "value", + "projectOtlpFlatLine": "value", + "providerFromBaseUrl": "value", + "readOtlpStatus": "value", + "redactString": "value", + "redactValue": "value", + "runFailureClass": "value", + "runsForScenario": "value", + "scoreTraceInsightReadiness": "value", + "stringField": "value", + "throwIfRunIncomplete": "value", + "tokenizeDomainWords": "value", + "toolSpans": "value", + "toolSpansToTraceAnalysisStore": "value", + "traceAnalystFunctionGroup": "value", + "traceAnalystOnRunComplete": "value", + "traceSpanKindToOpenInferenceKind": "value" + }, + "./trajectory-replay": { + "AnalystReplayFinding": "type", + "ArmExecutionResult": "type", + "CaseResources": "type", + "ChatCompletionCaller": "type", + "ChatOutcome": "type", + "ChatUsage": "type", + "CorpusSpec": "type", + "CwdSource": "type", + "DecodedTrajectory": "type", + "DockerImagePreparerOptions": "type", + "EnumerationResult": "type", + "ExcludedCase": "type", + "FORMAT_ERROR_OBSERVATION_PREFIX": "value", + "FailedFixAttempt": "type", + "FindingReplaySource": "type", + "FindingReplayability": "type", + "FindingVerification": "type", + "FindingVerificationStatus": "type", + "FixArmExecution": "type", + "FixArmExecutor": "type", + "FixGenerationOutcome": "type", + "FixLoopAttemptRecord": "type", + "FixLoopOptions": "type", + "FixLoopResult": "type", + "FixPromptInput": "type", + "ImagePreparation": "type", + "ImagePreparer": "type", + "IncorrectStepsSubject": "type", + "IngestedTrajectory": "type", + "PREFIX_DIVERGENCE_TOLERANCE_PCT": "value", + "PrefixDivergence": "type", + "PrefixDivergenceKind": "type", + "PrefixReplayResult": "type", + "RECORDED_ELISION_PATTERN": "value", + "RecordedFinalOutcome": "type", + "RecordedObservationKind": "type", + "RecordedTrajectoryStep": "type", + "RecordedTrajectoryTurn": "type", + "ReplayArmVerdict": "type", + "ReplayBatchCaseRow": "type", + "ReplayBatchFixResult": "type", + "ReplayBatchOptions": "type", + "ReplayBatchReport": "type", + "ReplayExclusionReason": "type", + "ReplayExecBackend": "type", + "ReplayExecBackendFactory": "type", + "ReplayExecResult": "type", + "ReplayExecSession": "type", + "ReplayFindingOptions": "type", + "ReplayFindingResult": "type", + "ReplayVerdict": "type", + "ReplayVerifyOptions": "type", + "ReplayableCase": "type", + "ResolvedFindingReplay": "type", + "ResolvedReplayInvocation": "type", + "ResourceResolution": "type", + "SUBMIT_ACTION_SIGNATURE": "value", + "SandboxCounterfactualRunner": "value", + "SandboxCounterfactualRunnerOptions": "type", + "TIMEOUT_OBSERVATION_MARKER": "value", + "VerifiableFinding": "type", + "VerifyFindingsOptions": "type", + "VerifyFindingsRun": "type", + "assertReplayableTrajectory": "value", + "buildFixPrompt": "value", + "buildRetryFixPrompt": "value", + "classifyObservation": "value", + "classifyPrefixStep": "value", + "classifyVerdict": "value", + "clipText": "value", + "countScriptCommands": "value", + "decodeRecordedTurns": "value", + "deriveFailureSignature": "value", + "derivedImageTag": "value", + "dockerImagePreparer": "value", + "enumerateReplayableCases": "value", + "extractFixCommand": "value", + "finalRecordedOutcome": "value", + "findingReplayStep": "value", + "findingTrajectoryId": "value", + "generateFixCommand": "value", + "goldIncorrectSteps": "value", + "ingestRecordedTrajectory": "value", + "isElidedField": "value", + "isRecordedTimeout": "value", + "isSubmitAction": "value", + "isSubmitOnlyAction": "value", + "parseCorpusFlag": "value", + "parseIncorrectStepsSubject": "value", + "parseObservationOutput": "value", + "parseRecordedReturncode": "value", + "readFindingsFile": "value", + "readLabelEntries": "value", + "renderBatchReport": "value", + "renderVerifiedFindingsSection": "value", + "replayVerify": "value", + "replayVerifyFinding": "value", + "resolveCaseResources": "value", + "resolveFindingInvocation": "value", + "resolveFindingReplayability": "value", + "runFixLoop": "value", + "runReplayBatch": "value", + "seededSample": "value", + "summarizePrefixReplay": "value", + "unreadableExitCount": "value", + "verifyFindings": "value", + "wrapActionForExec": "value" + }, + "./wire": { + "BUILTIN_RUBRICS": "value", + "ErrorResponse": "value", + "ErrorResponseSchema": "value", + "FailureMode": "value", + "FailureModeSchema": "value", + "FeedbackAttemptSchema": "value", + "FeedbackIngestResponse": "value", + "FeedbackIngestResponseSchema": "value", + "FeedbackLabelSchema": "value", + "FeedbackTrajectory": "value", + "FeedbackTrajectorySchema": "value", + "HandleJudgeOptions": "value", + "HealthResponseSchema": "value", + "IngestionStores": "value", + "JudgeRequest": "value", + "JudgeRequestSchema": "value", + "JudgeResult": "value", + "JudgeResultSchema": "value", + "ListRubricsResponse": "value", + "ListRubricsResponseSchema": "value", + "RpcOptions": "type", + "Rubric": "value", + "RubricDimension": "value", + "RubricDimensionSchema": "value", + "RubricInfo": "value", + "RubricInfoSchema": "value", + "RubricSchema": "value", + "ServeOptions": "type", + "StartedServer": "type", + "TraceEvent": "value", + "TraceEventSchema": "value", + "TracesIngestRequest": "value", + "TracesIngestRequestSchema": "value", + "TracesIngestResponse": "value", + "TracesIngestResponseSchema": "value", + "VersionResponse": "value", + "VersionResponseSchema": "value", + "WIRE_VERSION": "value", + "WireError": "value", + "buildOpenApi": "value", + "createApp": "value", + "dispatchRpc": "value", + "getBuiltinRubric": "value", + "handleFeedbackIngest": "value", + "handleJudge": "value", + "handleListRubrics": "value", + "handleTracesIngest": "value", + "handleVersion": "value", + "hashRubric": "value", + "listBuiltinRubrics": "value", + "runRpcBatch": "value", + "runRpcOnce": "value", + "startServer": "value", + "startServerAsync": "value" + } + }, + "assets": [ + "./openapi.json" + ] +} diff --git a/package.json b/package.json index 7e86183a..22de9ccc 100644 --- a/package.json +++ b/package.json @@ -180,9 +180,12 @@ "check:model-ids": "node scripts/check-model-id-requests.mjs", "check:analyst-benchmark": "node scripts/check-analyst-benchmark-implementation.mjs", "openapi": "node dist/cli.js openapi --out dist/openapi.json", - "verify:package": "pnpm check:analyst-benchmark && pnpm run check:skill && pnpm run check:model-ids && publint && attw --pack --profile esm-only . && node scripts/verify-package-exports.mjs && pnpm run evidence:check", + "verify:package": "pnpm run check:version-bump && pnpm check:analyst-benchmark && pnpm run check:skill && pnpm run check:model-ids && pnpm run check:api-surface && publint && attw --pack --profile esm-only . && node scripts/verify-package-exports.mjs && pnpm run evidence:check", "evidence:render": "tsx scripts/render-evidence-index.ts", - "evidence:check": "tsx scripts/render-evidence-index.ts --check" + "evidence:check": "tsx scripts/render-evidence-index.ts --check", + "check:version-bump": "node scripts/check-version-bump.mjs", + "check:api-surface": "node scripts/check-api-surface.mjs", + "api:surface": "node scripts/check-api-surface.mjs --write" }, "dependencies": { "@asteasolutions/zod-to-openapi": "^9.1.0", @@ -207,7 +210,7 @@ "lib-r-math.js": "^3.0.2", "lint-staged": "^17.2.0", "openapi3-ts": "^4.6.0", - "oxc-parser": "^0.141.0", + "oxc-parser": "0.144.0", "publint": "^0.3.22", "tsdown": "^0.22.14", "tsx": "^4.23.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db78f5a5..dde3a3ec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,8 +77,8 @@ importers: specifier: ^4.6.0 version: 4.6.0 oxc-parser: - specifier: ^0.141.0 - version: 0.141.0 + specifier: 0.144.0 + version: 0.144.0 publint: specifier: ^0.3.22 version: 0.3.22 @@ -587,129 +587,124 @@ packages: resolution: {integrity: sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==} engines: {node: '>=14'} - '@oxc-parser/binding-android-arm-eabi@0.141.0': - resolution: {integrity: sha512-jk7086MFvR/T4DG9IY7MKBVt1PMxvSZoz/TvnifodvS0pjghVwJHRttnAExhlwdMOgHv1TmLdENnbNpYk2zjvA==} + '@oxc-parser/binding-android-arm-eabi@0.144.0': + resolution: {integrity: sha512-IaoGBEp/huvja99PxI/b72TbKFzA/UzxxAka7f233dc/Tg/rRTX9Qn8IquFLWwWf4IddN/5TaJ8S4Subbjq7wQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxc-parser/binding-android-arm64@0.141.0': - resolution: {integrity: sha512-a4XDQ27ZT7e7zwAlxJDTiCA7IBGWDuy2+MhFq85Of7XlBSmpkfcBFml11q0Zx6f7RMuI0B4xCtt2ytBS4yOptg==} + '@oxc-parser/binding-android-arm64@0.144.0': + resolution: {integrity: sha512-u6fJu8XQXP99+9pYO3jq7F1D7V9fyFuDBShYFlr+gY+GcJzhveeN/zoMfuXxX6XBquJO0kjqKd7BjhJ7pClWXQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxc-parser/binding-darwin-arm64@0.141.0': - resolution: {integrity: sha512-m/kVk6rzYmBeHYnz+1Y5fod00AVTTxMbC71azFfm/zjx1j9XxwKtA0+VfkKuVMC8rbghb9TtfevnuWZa9OuPEg==} + '@oxc-parser/binding-darwin-arm64@0.144.0': + resolution: {integrity: sha512-o9xGSmMQcboJLjwI+acFf6xa7nYdp0/nRFE8ry4Xrt8OviQ9ITFDBUkAXVJMOLchSV9Pu981GxJuW0mt4i6vQQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxc-parser/binding-darwin-x64@0.141.0': - resolution: {integrity: sha512-o0X+6KZlfucWU/v5oKRQPwdFXsXAjW8jmpo/Gpw/qyKsbKtlfkHoeH9Bjp/m13TwjewvJnCkwF0DWzgpC4HjTQ==} + '@oxc-parser/binding-darwin-x64@0.144.0': + resolution: {integrity: sha512-2yNm4tX++W3KLbyziVhs5alSb74a3C1uNDu/1P/AQj1ux8yZYuvbCAeJCCrGkr8J18ZmnBAzDthdTZBEAEb71w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxc-parser/binding-freebsd-x64@0.141.0': - resolution: {integrity: sha512-W5KbTnNkTMMMylqj6dYqnsXvkmESVPodPKYLJ5zdzIPdl9fUJtolkpUeSzYEbGGYB4a4A4avl3EePnZ/wLIdJg==} + '@oxc-parser/binding-freebsd-x64@0.144.0': + resolution: {integrity: sha512-TG4CjY1OjynplkF9nAQ9m9zboPJksnbAF+U/9xQGSXyIt+5sQRitwfQrUgjrG17/up9G8k/boNjLD2zp4xq1Kw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxc-parser/binding-linux-arm-gnueabihf@0.141.0': - resolution: {integrity: sha512-g3dtbJa8zeOGK36Sr9cQavsdi5H/ie2hVjrSjIxsNAR1qZA40ZYVXnfdfoMAlq8CmB9qFL1yhsSCUHeNmdmt8w==} + '@oxc-parser/binding-linux-arm-gnueabihf@0.144.0': + resolution: {integrity: sha512-i0T9NagVmqc+rbSyBr5mDKj7TCMIBRrSteQlQJt1WhWIH/sZeOP9GB09H9w98YdinuZkDIPmO7Fz0jDC7bMvSA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxc-parser/binding-linux-arm-musleabihf@0.141.0': - resolution: {integrity: sha512-e6hwQqd+3lvP13G2jxvFpoA7dzHcFLN+Mq47JCVMtdNHbbyBRo756JCtbbJH6ca8inTfyqZoqBmS3vhQlzAK2w==} + '@oxc-parser/binding-linux-arm-musleabihf@0.144.0': + resolution: {integrity: sha512-YUsEqM3WMS3mOON+TFf7RzS0QthzEifx7tpUQu0GSF2MsT+D6t154ZBs6WhWaCZNl0GuVDEvndCyEAUBHzSHGw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxc-parser/binding-linux-arm64-gnu@0.141.0': - resolution: {integrity: sha512-vXz2BLAuypA+4MLyBg94pzEo6THVnzYnCtAjXoihIIQo0t2pnp/AmW+SH1EI+4VbuJnC//KplIJ5yyaCGua4jA==} + '@oxc-parser/binding-linux-arm64-gnu@0.144.0': + resolution: {integrity: sha512-LlWH4kt+IET3qIAe0e0IFLNlQ3CVUAfN//UFsA6N0/FghMh/FBk1e+wzvgG+t8WSnXkvf8B1TovquS2EJras9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-arm64-musl@0.141.0': - resolution: {integrity: sha512-jMkS/EztNW34HKsXIaT/SoHcmtocq/vWhwFOVduF9kduuuRIVwfwQ6uxzIO+qPKSXdd2TXt54of0BJ2zFMXnmw==} + '@oxc-parser/binding-linux-arm64-musl@0.144.0': + resolution: {integrity: sha512-ajXbXIWBWUD4U3IQxr2p6DiXwD7GPHEBLa+JteKhIfvLmBEBdTjO28lP+5r3AF2qal8cxLERfTnGs64Z22ZuXw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxc-parser/binding-linux-ppc64-gnu@0.141.0': - resolution: {integrity: sha512-vo+MR+n3zQJ6Mq92hiP084NZcgDv5iJlVR02gMf28neMvVT1tKVm7VeiW/DxhdqOi3QLeaXIk9cUcLL1qrkngw==} + '@oxc-parser/binding-linux-ppc64-gnu@0.144.0': + resolution: {integrity: sha512-/+sDzL/4cWEwdqenKo/DX3gkkxu7H7ytFAtealDey/Gd59yPWn64obVk6wXKVjVfXMciUUUTySxZG9AIMX3RNQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-riscv64-gnu@0.141.0': - resolution: {integrity: sha512-oh80w+7RuiO5gBp9Jnoa/H8Qlt3JsHL2MkW+0dwEdlDMdslVZX/YsekSK6EeyEenY66/mhCfypsNATQ7Ph3qlQ==} + '@oxc-parser/binding-linux-riscv64-gnu@0.144.0': + resolution: {integrity: sha512-dMVhPBbrd8y6aeLd7Ihn9OZhKO8QgCQVtLBTRgbmf4lKrcR61SpaQRJPJuocTc/Cn5SJMm+alHYPnzkbOGM7Dg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-riscv64-musl@0.141.0': - resolution: {integrity: sha512-LOyEmFA8sCnYbEXP1+iQvCC/P1YXHMA/t6x1Ksp0Y9VwhLFsiBJFzV1zIxrOIE2LKaGGhDjQ29xq9cbq6omDXA==} + '@oxc-parser/binding-linux-riscv64-musl@0.144.0': + resolution: {integrity: sha512-jQ8O0+b6J2IhJgm0DnqEJq8hG9OocmF1b4TBWCk08CRWqTmLZj/+lYs7w3OA60nb2SiqOmthQyJPacrCi7y+oQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxc-parser/binding-linux-s390x-gnu@0.141.0': - resolution: {integrity: sha512-3wnwk/l1CvszVE5TJR1wSl/zSEfydRqrNhn6s7Vr9IzSJpUQIroqVsIoPARHRFA+FQwkxAFDAHDAasa7v8OobQ==} + '@oxc-parser/binding-linux-s390x-gnu@0.144.0': + resolution: {integrity: sha512-/mZxZtcGrzuvqPLPV7gjavbROYs/dHy6+yQ2Sl/2to/+qoC/v6CcruGFnfQPzQbXXTYReXJzLb5QY9KmgCbJOg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-x64-gnu@0.141.0': - resolution: {integrity: sha512-qtyQVAAebFq57B2tifTlel3TgGqUtsYNI/e+p6aya9rN9lOZVTDvr215fGYSA9XWooxzMxDiVxkBLk2jQHbsOQ==} + '@oxc-parser/binding-linux-x64-gnu@0.144.0': + resolution: {integrity: sha512-/caRGFHcarHZlBrucBwQwBbzqhD+UfZZ/r7soocS0/mp6/5KTq+1Zl/OQx5lFLcN+GpUPYszbrvQU9MCFLEzJg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-x64-musl@0.141.0': - resolution: {integrity: sha512-SkGV1nKw40roEc94pv5EaaeH2ay14G6+roe8Q0wIUC1LcEKxzKW921h7+ZuZX0D3q2Mb/7aSFmxEVqnko3lPRw==} + '@oxc-parser/binding-linux-x64-musl@0.144.0': + resolution: {integrity: sha512-qFtwAo6BWuWDjh57QDdZdYi746GW0mIeoZSGK2jJqlxIjo389Y/7lrriTOI+ou7tTvusOrSYGQZ+e+nDswt2vQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxc-parser/binding-openharmony-arm64@0.141.0': - resolution: {integrity: sha512-cVgDM7n8QziQqOaP5hNgUYfMG7S/ZeuPxFWXnnHRv7rh025COk0rfQ6eEdKG3j/GaUuyvNZN4ifF1J8KmuXLLA==} + '@oxc-parser/binding-openharmony-arm64@0.144.0': + resolution: {integrity: sha512-n+NgMGWWEYpH+rlkMhDvLR2k8vJDHQp3j8SoS86IS6J0hc4kuDaiYAAvu9dF86xjeGYy+h9WLj12sylmBJV9sg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxc-parser/binding-wasm32-wasi@0.141.0': - resolution: {integrity: sha512-HggH++Fkn3OilBn+bs3jpgIFQa34oMAyUUHy0vpGum+gt1Eb5nyLc8dNU/RAPSw6lsLrx7ncKtHSZE+3Sp0l2g==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [wasm32] - - '@oxc-parser/binding-win32-arm64-msvc@0.141.0': - resolution: {integrity: sha512-KLSEH9GwgbrqbJOjtGHt9STw96s+78yDzp7IDN8Lno+7Ut9sNBfZ4jYZIz4mD50qmWUjoOI7i9I6UENbhNbMZQ==} + '@oxc-parser/binding-win32-arm64-msvc@0.144.0': + resolution: {integrity: sha512-fShxpJiCBOdG4+jBAvahTTFUDI5djXc/+IPC1ldeC8LbyCW0h9m/7oP8DRZWI7WT2Ahv8sHtZz4ugECylCFpTA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxc-parser/binding-win32-ia32-msvc@0.141.0': - resolution: {integrity: sha512-9UVWUOOCI/1YkiSSNjg2zyBJYM9E/t1A/8GNobd48JDn/fQ6mzxcVO3H08jb3rAaW/B1VBf8eCORTvSsO9T08g==} + '@oxc-parser/binding-win32-ia32-msvc@0.144.0': + resolution: {integrity: sha512-vFrYV+C3lJhIiSdNhdkZHnZ0YIClgTSluXaPMYjlGslVPD+uJg6K1s2xNL/X/gdBcy9IIbjbp0vNBwQhdMMdkw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxc-parser/binding-win32-x64-msvc@0.141.0': - resolution: {integrity: sha512-HI/wsvbWT5RHHw5c37D0fEgeTd8/1Q4OJs5jUmEBc17VZFG6SsCIe4barq7NsAPPks/JW+3ayi3Rp+PQI5h4Kg==} + '@oxc-parser/binding-win32-x64-msvc@0.144.0': + resolution: {integrity: sha512-0ASbKSwdeihMekyy7y4jC0CwW3XBDZk5Sw64m/W7IReVQHaduqLYssF9KCJA2oHG9oldnl/1CMxqCoImXfqQkA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -717,8 +712,8 @@ packages: '@oxc-project/types@0.140.0': resolution: {integrity: sha512-h5LUOzGArYemnW1NMz/DuuQhBi96J6JL2Bk8zE4kvqxB5Sg3jxmCiH4uyOWHDkiKSt5vWlG4FIwCR/DbstcNRQ==} - '@oxc-project/types@0.141.0': - resolution: {integrity: sha512-S4as7z0j0xQkXcJlyY5ehntwK8/wRkQb9Cyqw+J/N2rkWGQGK0SxD6X6DhQTc7qsxVTBxXbxZtBJh3mr3PtIzQ==} + '@oxc-project/types@0.144.0': + resolution: {integrity: sha512-nuhZIOLuI6TFQ32I/WnUx+SCPY7SdSKwgnFHydAuoS1+Z4BRcaP+RRJmGzl9lw+0OFF7UmaESf7KQRXaNLHypg==} '@publint/pack@0.1.6': resolution: {integrity: sha512-3uVNyGcVplhPZSLVyeIpL7+cIRn1YCSNHLG/rUIlBQMVH8YuN9++YF+5+UDIIO9RW98dujiUoTltO7RDB5bFJA==} @@ -1633,8 +1628,8 @@ packages: openapi3-ts@4.6.0: resolution: {integrity: sha512-a4sfn6L2sIShhtzJqmjGrARvxAW/3F2BJDdyRVvNF9VhAsZSh5hSyI3a9TNvmzBxXmq66nY5LNT5bQcBxYAZZg==} - oxc-parser@0.141.0: - resolution: {integrity: sha512-uFkGGr1KMWd6aWv9UAqooYrN78trw8MWWmoPvgWokfBEUq1+eiIQ+qfj3wokhy0fxtZWZk+0dHoS7/yRTJtd6w==} + oxc-parser@0.144.0: + resolution: {integrity: sha512-eacM4wMgGWXctHubY262yo+50E76qtQBqe+uK73YEV1IT3qP12Acbnf9Nc8t+agIAdnko9iVT4KF83/d0EjY5w==} engines: {node: ^20.19.0 || >=22.12.0} package-manager-detector@1.8.0: @@ -2330,73 +2325,66 @@ snapshots: '@opentelemetry/semantic-conventions@1.43.0': {} - '@oxc-parser/binding-android-arm-eabi@0.141.0': - optional: true - - '@oxc-parser/binding-android-arm64@0.141.0': + '@oxc-parser/binding-android-arm-eabi@0.144.0': optional: true - '@oxc-parser/binding-darwin-arm64@0.141.0': + '@oxc-parser/binding-android-arm64@0.144.0': optional: true - '@oxc-parser/binding-darwin-x64@0.141.0': + '@oxc-parser/binding-darwin-arm64@0.144.0': optional: true - '@oxc-parser/binding-freebsd-x64@0.141.0': + '@oxc-parser/binding-darwin-x64@0.144.0': optional: true - '@oxc-parser/binding-linux-arm-gnueabihf@0.141.0': + '@oxc-parser/binding-freebsd-x64@0.144.0': optional: true - '@oxc-parser/binding-linux-arm-musleabihf@0.141.0': + '@oxc-parser/binding-linux-arm-gnueabihf@0.144.0': optional: true - '@oxc-parser/binding-linux-arm64-gnu@0.141.0': + '@oxc-parser/binding-linux-arm-musleabihf@0.144.0': optional: true - '@oxc-parser/binding-linux-arm64-musl@0.141.0': + '@oxc-parser/binding-linux-arm64-gnu@0.144.0': optional: true - '@oxc-parser/binding-linux-ppc64-gnu@0.141.0': + '@oxc-parser/binding-linux-arm64-musl@0.144.0': optional: true - '@oxc-parser/binding-linux-riscv64-gnu@0.141.0': + '@oxc-parser/binding-linux-ppc64-gnu@0.144.0': optional: true - '@oxc-parser/binding-linux-riscv64-musl@0.141.0': + '@oxc-parser/binding-linux-riscv64-gnu@0.144.0': optional: true - '@oxc-parser/binding-linux-s390x-gnu@0.141.0': + '@oxc-parser/binding-linux-riscv64-musl@0.144.0': optional: true - '@oxc-parser/binding-linux-x64-gnu@0.141.0': + '@oxc-parser/binding-linux-s390x-gnu@0.144.0': optional: true - '@oxc-parser/binding-linux-x64-musl@0.141.0': + '@oxc-parser/binding-linux-x64-gnu@0.144.0': optional: true - '@oxc-parser/binding-openharmony-arm64@0.141.0': + '@oxc-parser/binding-linux-x64-musl@0.144.0': optional: true - '@oxc-parser/binding-wasm32-wasi@0.141.0': - dependencies: - '@emnapi/core': 1.11.2 - '@emnapi/runtime': 1.11.2 - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + '@oxc-parser/binding-openharmony-arm64@0.144.0': optional: true - '@oxc-parser/binding-win32-arm64-msvc@0.141.0': + '@oxc-parser/binding-win32-arm64-msvc@0.144.0': optional: true - '@oxc-parser/binding-win32-ia32-msvc@0.141.0': + '@oxc-parser/binding-win32-ia32-msvc@0.144.0': optional: true - '@oxc-parser/binding-win32-x64-msvc@0.141.0': + '@oxc-parser/binding-win32-x64-msvc@0.144.0': optional: true '@oxc-project/types@0.140.0': {} - '@oxc-project/types@0.141.0': {} + '@oxc-project/types@0.144.0': {} '@publint/pack@0.1.6': dependencies: @@ -3095,30 +3083,29 @@ snapshots: dependencies: yaml: 2.9.0 - oxc-parser@0.141.0: + oxc-parser@0.144.0: dependencies: - '@oxc-project/types': 0.141.0 + '@oxc-project/types': 0.144.0 optionalDependencies: - '@oxc-parser/binding-android-arm-eabi': 0.141.0 - '@oxc-parser/binding-android-arm64': 0.141.0 - '@oxc-parser/binding-darwin-arm64': 0.141.0 - '@oxc-parser/binding-darwin-x64': 0.141.0 - '@oxc-parser/binding-freebsd-x64': 0.141.0 - '@oxc-parser/binding-linux-arm-gnueabihf': 0.141.0 - '@oxc-parser/binding-linux-arm-musleabihf': 0.141.0 - '@oxc-parser/binding-linux-arm64-gnu': 0.141.0 - '@oxc-parser/binding-linux-arm64-musl': 0.141.0 - '@oxc-parser/binding-linux-ppc64-gnu': 0.141.0 - '@oxc-parser/binding-linux-riscv64-gnu': 0.141.0 - '@oxc-parser/binding-linux-riscv64-musl': 0.141.0 - '@oxc-parser/binding-linux-s390x-gnu': 0.141.0 - '@oxc-parser/binding-linux-x64-gnu': 0.141.0 - '@oxc-parser/binding-linux-x64-musl': 0.141.0 - '@oxc-parser/binding-openharmony-arm64': 0.141.0 - '@oxc-parser/binding-wasm32-wasi': 0.141.0 - '@oxc-parser/binding-win32-arm64-msvc': 0.141.0 - '@oxc-parser/binding-win32-ia32-msvc': 0.141.0 - '@oxc-parser/binding-win32-x64-msvc': 0.141.0 + '@oxc-parser/binding-android-arm-eabi': 0.144.0 + '@oxc-parser/binding-android-arm64': 0.144.0 + '@oxc-parser/binding-darwin-arm64': 0.144.0 + '@oxc-parser/binding-darwin-x64': 0.144.0 + '@oxc-parser/binding-freebsd-x64': 0.144.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.144.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.144.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.144.0 + '@oxc-parser/binding-linux-arm64-musl': 0.144.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.144.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.144.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.144.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.144.0 + '@oxc-parser/binding-linux-x64-gnu': 0.144.0 + '@oxc-parser/binding-linux-x64-musl': 0.144.0 + '@oxc-parser/binding-openharmony-arm64': 0.144.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.144.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.144.0 + '@oxc-parser/binding-win32-x64-msvc': 0.144.0 package-manager-detector@1.8.0: {} diff --git a/scripts/check-api-surface.mjs b/scripts/check-api-surface.mjs new file mode 100644 index 00000000..edb5d949 --- /dev/null +++ b/scripts/check-api-surface.mjs @@ -0,0 +1,229 @@ +#!/usr/bin/env node +/** + * Record — and hold to — the symbols each published entry point exports. + * + * Reads the BUILT declaration files, because those are what npm puts in the + * tarball and what a consumer's compiler reads. Source is not consulted: a + * symbol that source exports but the build drops is not on the surface, and the + * defect being closed is about what a consumer can actually resolve. + * + * The parser is `oxc-parser`, not the TypeScript compiler API, and that is a + * requirement rather than a preference. This repository set spans TypeScript 6 + * and TypeScript 7, and TypeScript 7 ships no JavaScript compiler API at all — + * `ts.createProgram` is undefined there. A checker-based extractor would work + * in one repository and have to be rewritten in the others, which is how three + * copies of one rule end up with three different bugs. `oxc-parser` presents + * the same API on every repository and parses the declaration dialect the + * build already emits through the same parser family. + * + * Usage: + * node scripts/check-api-surface.mjs [--write] [packageDirectory...] + * + * Default package directory is the repository root. `--write` regenerates the + * records; without it the command compares and fails on any difference. + */ +import { existsSync, readFileSync, writeFileSync } from 'node:fs' +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import { parseSync } from 'oxc-parser' +import { + compareSurfaces, + formatSurface, + relativeToRoot, + resolveExportEntries, + surfaceRecordPath, +} from './lib/api-surface.mjs' + +const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..') + +const args = process.argv.slice(2) +const write = args.includes('--write') +const packageDirectories = args.filter((argument) => !argument.startsWith('--')) +if (packageDirectories.length === 0) packageDirectories.push('.') + +/** Declaration kind of a top-level declaration node. */ +const declarationKind = (node) => { + switch (node.type) { + case 'TSInterfaceDeclaration': + case 'TSTypeAliasDeclaration': + return 'type' + case 'ClassDeclaration': + case 'FunctionDeclaration': + case 'TSDeclareFunction': + case 'TSEnumDeclaration': + case 'TSModuleDeclaration': + case 'VariableDeclaration': + return 'value' + default: + throw new Error(`unhandled exported declaration node ${node.type}`) + } +} + +const declaredNames = (node) => { + if (node.type === 'VariableDeclaration') { + return node.declarations.map((declarator) => declarator.id.name) + } + if (node.type === 'TSModuleDeclaration') { + return [node.id.type === 'Identifier' ? node.id.name : node.id.value] + } + return [node.id.name] +} + +/** + * Resolve a relative specifier written with the runtime extension back to the + * declaration file that states its types, the way a bundler-mode compiler does. + */ +const resolveRelativeDeclaration = (fromFile, specifier) => { + const base = resolve(dirname(fromFile), specifier) + const candidates = [ + base.replace(/\.m?js$/, '.d.ts'), + base.replace(/\.m?js$/, '.d.mts'), + `${base}.d.ts`, + base, + ] + for (const candidate of candidates) { + if (existsSync(candidate)) return candidate + } + throw new Error(`cannot resolve "${specifier}" from ${fromFile} to a declaration file`) +} + +/** + * Every symbol `file` exports, name to kind. Follows `export * from` into the + * chunk files the build splits declarations across, because those re-exports + * are what a consumer's entry point actually resolves through. + */ +const exportsOfFile = (file, seen = new Set()) => { + if (seen.has(file)) return {} + seen.add(file) + const source = readFileSync(file, 'utf8') + const parsed = parseSync(file, source, { lang: 'dts' }) + if (parsed.errors.length > 0) { + throw new Error(`${file} failed to parse: ${parsed.errors[0].message}`) + } + const names = {} + for (const node of parsed.program.body) { + if (!node.type.startsWith('Export')) continue + switch (node.type) { + case 'ExportNamedDeclaration': { + if (node.declaration) { + const kind = declarationKind(node.declaration) + for (const name of declaredNames(node.declaration)) names[name] = kind + break + } + for (const specifier of node.specifiers) { + const exported = specifier.exported + const name = exported.type === 'Identifier' ? exported.name : exported.value + // `export type { A }` marks the statement; `export { type A }` marks + // the specifier. Either one makes the name type-only. + names[name] = node.exportKind === 'type' || specifier.exportKind === 'type' ? 'type' : 'value' + } + break + } + case 'ExportAllDeclaration': { + const specifier = node.source.value + if (!specifier.startsWith('.')) { + throw new Error( + `${file} re-exports all of "${specifier}", which is outside this package. ` + + 'The surface record cannot state symbols it cannot read; ' + + 'name the re-exported symbols explicitly instead.', + ) + } + const target = resolveRelativeDeclaration(file, specifier) + if (node.exported) { + const name = node.exported.type === 'Identifier' ? node.exported.name : node.exported.value + names[name] = 'value' + break + } + for (const [name, kind] of Object.entries(exportsOfFile(target, seen))) { + names[name] = node.exportKind === 'type' ? 'type' : kind + } + break + } + case 'ExportDefaultDeclaration': + names.default = 'value' + break + default: + throw new Error(`${file} uses unhandled export form ${node.type}`) + } + } + return names +} + +const surfaceOfPackage = (packageDirectory) => { + const packageDir = resolve(repoRoot, packageDirectory) + const manifestPath = resolve(packageDir, 'package.json') + const manifest = JSON.parse(readFileSync(manifestPath, 'utf8')) + const { entries, assets } = resolveExportEntries(manifest, packageDir) + const missing = entries.filter((entry) => !existsSync(entry.file)) + if (missing.length > 0) { + throw new Error( + `${relativeToRoot(repoRoot, manifestPath)} declares entry points whose declarations are ` + + `not built: ${missing.map((entry) => entry.subpath).join(', ')}. Build the package first.`, + ) + } + const recorded = {} + for (const entry of entries) recorded[entry.subpath] = exportsOfFile(entry.file) + return { package: manifest.name, entries: recorded, assets } +} + +const failures = [] +const reports = [] + +for (const packageDirectory of packageDirectories) { + const recordPath = resolve(repoRoot, surfaceRecordPath(packageDirectory.replace(/^\.\/?/, ''))) + const surface = surfaceOfPackage(packageDirectory) + const generated = formatSurface(surface) + const total = Object.values(surface.entries).reduce( + (sum, names) => sum + Object.keys(names).length, + 0, + ) + const displayPath = relativeToRoot(repoRoot, recordPath) + if (write) { + writeFileSync(recordPath, generated) + reports.push(`${displayPath}: wrote ${total} exports across ${Object.keys(surface.entries).length} entry points`) + continue + } + const committed = existsSync(recordPath) ? readFileSync(recordPath, 'utf8') : null + if (committed === null) { + failures.push( + `${displayPath} does not exist. Every publishable package records its export surface ` + + 'so a change to it can be required to carry a version bump.', + ) + continue + } + if (committed !== generated) { + const changes = compareSurfaces(JSON.parse(committed), surface) + const lines = [`${displayPath} does not match the built declarations.`] + for (const [label, list] of [ + ['not recorded (present in the build)', changes.added], + ['recorded but gone from the build', changes.removed], + ['kind narrowed', changes.narrowed], + ['kind changed', changes.widened], + ]) { + for (const change of list.slice(0, 20)) lines.push(` ${label}: ${change}`) + if (list.length > 20) lines.push(` ${label}: ...and ${list.length - 20} more`) + } + failures.push(lines.join('\n')) + continue + } + reports.push(`${displayPath}: ${total} exports across ${Object.keys(surface.entries).length} entry points, record current`) +} + +if (failures.length > 0) { + process.stderr.write( + `${[ + 'The export surface record is out of date.', + '', + ...failures, + '', + 'Regenerate it in the same change:', + ` pnpm run build && pnpm run api:surface`, + '', + 'The record is what check:version-bump compares against the merge base, so a stale', + 'record lets a new export ship under a version the registry already holds.', + ].join('\n')}\n`, + ) + process.exit(1) +} + +process.stdout.write(`${reports.join('\n')}\n`) diff --git a/scripts/check-version-bump.mjs b/scripts/check-version-bump.mjs new file mode 100644 index 00000000..dbda4496 --- /dev/null +++ b/scripts/check-version-bump.mjs @@ -0,0 +1,511 @@ +#!/usr/bin/env node +/** + * Fail a change that alters a consumer-visible package surface without bumping + * that package's version to a higher one. + * + * The defect this closes: a pull request moves a peer range or a catalog pin, + * merges, and main now declares a version the registry already holds under + * DIFFERENT, consumer-visible terms. `publish.yml` skips a version already on + * the registry, so re-tagging cannot correct it — the change simply never + * reaches a consumer, and nothing goes red. It happened to 0.119.0, whose + * agent-eval peer floor moved from `>=0.139.2` to `>=0.140.1` with no bump, and + * unnoticed for far longer to `@tangle-network/agent-bench`. + * + * The rule: for every publishable manifest in the workspace, if any field npm + * copies into the published manifest differs from the merge base, `version` must + * be strictly higher than the base's. `version` is not part of the compared + * surface — it is the payment a surface change is made with, and a payment in + * the wrong direction lands on a version the registry may already hold. + * + * `catalog:` specifiers are compared by what they RESOLVE to, through + * `pnpm-workspace.yaml`. That indirection is how the drift stayed invisible: + * `"@tangle-network/agent-knowledge": "catalog:"` is byte-identical across the + * change that moved the installed version 7.0.3 -> 7.0.4. Only the resolved + * version is compared, so moving a dependency between the default catalog, a + * named catalog, and a literal pin is silent as long as the version is the same. + * + * Two deliberate scope boundaries, so neither reads as an oversight: + * + * - `workspace:` specifiers are NOT resolved. One resolves to a sibling in the + * same commit, so it moves only when that sibling's version moves — which + * this check already requires to be paid for, on that sibling. Resolving it + * here would demand a second bump for a change already accounted. + * - Built output is not compared. A `src/` change that rewrites all of + * `dist/` is allowed with no bump; releases, not this check, decide when + * code ships. The EXPORTED SYMBOLS are the one exception, below. + * + * The manifest is only half of what a consumer sees. Adding an export to an + * entry point changes no manifest field at all — `exports["./durable"].types` + * still reads `./dist/durable.d.ts` — so the manifest comparison reports + * "consumer surface unchanged" and the new symbol ships under a version the + * registry already holds. That happened to `PursuitProjection`, + * `PursuitRunProjection` and `PursuitNodeProjection`: added and exported at + * 0.140.0, which npm already held, so they resolved in no published version and + * a consumer spent hours proving types that existed were absent. + * + * So every publishable package also commits `api-surface.json`, the symbols each + * entry point exports, generated from the built declarations by + * `check-api-surface.mjs`. This check compares that record against the merge + * base and requires the level the change implies: + * + * - a removed export, or one narrowed from a value to a type, is breaking; + * - an added export is additive; + * - a manifest-only change asks for a higher version, as it always did. + * + * The level each severity demands is read off the consumer's compatibility + * boundary, which sits one position further right below 1.0 — see + * `requiredBumpLevel` in `lib/api-surface.mjs`. + * + * This file, `check-api-surface.mjs` and `lib/api-surface.mjs` are kept + * byte-identical in agent-eval, agent-knowledge and agent-runtime. They read + * everything repo-specific out of the manifests they inspect, so an edit to one + * belongs in all three. Nothing here may name a single repository. + * + * Usage: pnpm run check:version-bump + * PACKAGE_VERSION_BUMP_BASE base ref to compare against (default: the + * CI base branch, else origin/main, else main) + * PACKAGE_VERSION_BUMP_ROOT repository to inspect (default: this repo) + */ +import { execFileSync } from 'node:child_process' +import { readFileSync } from 'node:fs' +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import { parse as parseYaml } from 'yaml' +import { + LEVEL_RANK, + compareSurfaces, + requiredBumpLevel, + surfaceRecordPath, + surfaceSeverity, + versionBumpLevel, +} from './lib/api-surface.mjs' + +const repoRoot = resolve( + process.env.PACKAGE_VERSION_BUMP_ROOT ?? + resolve(dirname(fileURLToPath(import.meta.url)), '..'), +) + +/** + * Every field npm copies into the published manifest, so every field a consumer + * can read or resolve against. `version` is absent on purpose (see the header); + * so are `scripts` as a whole, `devDependencies`, and metadata prose, none of + * which change what a consumer installs. The install-lifecycle scripts are the + * exception and are compared separately — they execute on a consumer's machine. + */ +const CONSUMER_VISIBLE_FIELDS = [ + 'name', + 'private', + 'type', + 'main', + 'module', + 'types', + 'typings', + 'browser', + 'exports', + 'imports', + 'typesVersions', + 'bin', + 'files', + 'directories', + 'engines', + 'os', + 'cpu', + 'license', + 'sideEffects', + 'publishConfig', + 'dependencies', + 'optionalDependencies', + 'peerDependencies', + 'peerDependenciesMeta', + 'bundleDependencies', + 'bundledDependencies', + 'installScripts', +] + +/** Fields whose values are `{ [dependency]: specifier }` and so carry `catalog:` indirection. */ +const SPECIFIER_FIELDS = new Set(['dependencies', 'optionalDependencies', 'peerDependencies']) + +/** Fields npm treats as an unordered set, where a reordering changes nothing. */ +const UNORDERED_FIELDS = new Set(['files', 'os', 'cpu']) + +/** The scripts npm runs on the CONSUMER's machine when the tarball is installed. */ +const INSTALL_LIFECYCLE_SCRIPTS = ['preinstall', 'install', 'postinstall'] + +const git = (args, { allowFailure = false } = {}) => { + try { + return execFileSync('git', ['-C', repoRoot, ...args], { + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + stdio: ['ignore', 'pipe', 'pipe'], + }) + } catch (error) { + if (allowFailure) return null + throw new Error(`git ${args.join(' ')} failed: ${error.stderr || error.message}`) + } +} + +const fileAtRef = (ref, path) => git(['show', `${ref}:${path}`], { allowFailure: true }) + +const resolveBase = () => { + const configured = + process.env.PACKAGE_VERSION_BUMP_BASE || + // The base BRANCH, never the webhook's frozen base sha. On a pull_request + // run the checked-out merge ref is recomputed against the CURRENT base tip, + // so the frozen sha can name a commit that is no longer the merge parent — + // and then a release someone else merged in the meantime pays for a change + // in this pull request. + (process.env.GITHUB_BASE_REF ? `origin/${process.env.GITHUB_BASE_REF}` : '') + // Fail closed on any event that HAS a base branch, BEFORE any fallback. A + // fallback would compare against whatever `main` happens to be in the clone, + // which is not the branch under review — a silent pass with no signal. A push + // or manual run genuinely has no base and is not what this gates. + const baselessEvents = new Set(['push', 'workflow_dispatch', 'schedule']) + if ( + !configured && + process.env.GITHUB_ACTIONS && + !baselessEvents.has(process.env.GITHUB_EVENT_NAME ?? '') + ) { + throw new Error( + `running in CI on a ${process.env.GITHUB_EVENT_NAME ?? 'unknown'} event with no base ` + + 'branch to compare against. Set GITHUB_BASE_REF (or PACKAGE_VERSION_BUMP_BASE).', + ) + } + const candidates = configured ? [configured] : ['origin/main', 'main'] + for (const candidate of candidates) { + const resolved = git(['rev-parse', '--verify', `${candidate}^{commit}`], { allowFailure: true }) + if (resolved) return { ref: resolved.trim(), label: candidate } + } + if (configured) { + throw new Error( + `cannot resolve the requested base commit ${configured}. ` + + 'Check out with fetch-depth: 0 so the base is present.', + ) + } + return null +} + +const globToRegExp = (glob) => { + const escaped = glob.replace(/[.+^${}()|[\]\\]/g, '\\$&') + const body = escaped.replace(/\*\*/g, '').replace(/\*/g, '[^/]*').replace(//g, '.*') + return new RegExp(`^${body}$`) +} + +/** pnpm workspace `packages:` patterns, including `!` exclusions and `**`. */ +const workspaceMatcher = (patterns) => { + const include = [] + const exclude = [] + for (const pattern of patterns) { + if (typeof pattern !== 'string') continue + const normalized = pattern.replace(/^\.\//, '').replace(/\/+$/, '') + if (normalized.startsWith('!')) exclude.push(globToRegExp(normalized.slice(1))) + else include.push(globToRegExp(normalized)) + } + return (directory) => + include.some((pattern) => pattern.test(directory)) && + !exclude.some((pattern) => pattern.test(directory)) +} + +const workspaceAtRef = (ref) => { + const raw = fileAtRef(ref, 'pnpm-workspace.yaml') + if (raw === null) return { catalogs: { default: {}, named: {} }, matches: () => false } + const document = parseYaml(raw) ?? {} + return { + catalogs: { default: document.catalog ?? {}, named: document.catalogs ?? {} }, + matches: workspaceMatcher(document.packages ?? []), + } +} + +/** + * Every manifest that could be published from this ref, keyed by package NAME. + * Keyed by name, not path, so moving a package between directories still + * compares against what that same package name already published. + */ +const manifestsAtRef = (ref, workspace) => { + const tracked = (git(['ls-tree', '-r', '--name-only', ref]) ?? '') + .split('\n') + .filter((path) => path.endsWith('package.json') && !path.includes('node_modules/')) + const byName = new Map() + for (const path of tracked) { + const directory = path === 'package.json' ? '' : dirname(path) + if (directory !== '' && !workspace.matches(directory)) continue + const raw = fileAtRef(ref, path) + if (raw === null) continue + let manifest + try { + manifest = JSON.parse(raw) + } catch (error) { + throw new Error(`${path} at ${ref.slice(0, 12)} is not valid JSON: ${error.message}`) + } + if (typeof manifest?.name !== 'string') continue + byName.set(manifest.name, { path, manifest }) + } + return byName +} + +/** + * What a consumer actually resolves. Only the RESOLVED version is returned, so + * moving a dependency between the default catalog, a named catalog, and a + * literal pin is silent when the version does not move. + */ +const resolveSpecifier = (specifier, catalogs, context) => { + if (typeof specifier !== 'string' || !specifier.startsWith('catalog:')) return specifier + const name = specifier.slice('catalog:'.length).trim() + const table = name === '' ? catalogs.default : catalogs.named[name] + const resolved = table?.[context.dependency] + if (resolved === undefined) { + // Fail closed: an unresolvable catalog pin must not compare equal by accident. + throw new Error( + `${context.path} ${context.field}.${context.dependency} is "${specifier}" but ` + + `pnpm-workspace.yaml has no ${name === '' ? 'catalog' : `catalogs.${name}`} entry for it`, + ) + } + return String(resolved) +} + +const surfaceOf = ({ path, manifest }, catalogs) => { + const surface = {} + const withInstallScripts = { + ...manifest, + installScripts: Object.fromEntries( + INSTALL_LIFECYCLE_SCRIPTS.filter((name) => manifest.scripts?.[name] !== undefined).map( + (name) => [name, manifest.scripts[name]], + ), + ), + } + for (const field of CONSUMER_VISIBLE_FIELDS) { + if (!(field in withInstallScripts)) continue + const value = withInstallScripts[field] + if (field === 'installScripts' && Object.keys(value).length === 0) continue + if (SPECIFIER_FIELDS.has(field) && value && typeof value === 'object') { + surface[field] = Object.fromEntries( + Object.entries(value).map(([dependency, specifier]) => [ + dependency, + resolveSpecifier(specifier, catalogs, { path, field, dependency }), + ]), + ) + } else if (UNORDERED_FIELDS.has(field) && Array.isArray(value)) { + // npm reads these as sets. Negations are order-sensitive, so only sort + // when none is present. + surface[field] = value.some((entry) => typeof entry === 'string' && entry.startsWith('!')) + ? value + : [...value].sort() + } else { + surface[field] = value + } + } + return surface +} + +const show = (value) => (value === undefined ? '(absent)' : JSON.stringify(value)) + +/** Report the changed leaves, so a failure names the exact edit to pay for. */ +const surfaceChanges = (before, after) => { + const changes = [] + for (const field of CONSUMER_VISIBLE_FIELDS) { + const left = before[field] + const right = after[field] + if (JSON.stringify(left) === JSON.stringify(right)) continue + const isMap = (value) => value && typeof value === 'object' && !Array.isArray(value) + if (isMap(left) && isMap(right)) { + for (const key of [...new Set([...Object.keys(left), ...Object.keys(right)])].sort()) { + if (JSON.stringify(left[key]) === JSON.stringify(right[key])) continue + changes.push(`${field}.${key}: ${show(left[key])} -> ${show(right[key])}`) + } + } else { + changes.push(`${field}: ${show(left)} -> ${show(right)}`) + } + } + return changes +} + +/** + * The export surface record of one package at one ref, or `null` when the ref + * carries no record for it. + */ +const surfaceAtRef = (ref, manifestPath) => { + const recordPath = surfaceRecordPath(manifestPath === 'package.json' ? '' : dirname(manifestPath)) + const raw = fileAtRef(ref, recordPath) + if (raw === null) return null + try { + return { path: recordPath, surface: JSON.parse(raw) } + } catch (error) { + throw new Error(`${recordPath} at ${ref.slice(0, 12)} is not valid JSON: ${error.message}`) + } +} + +/** Rank a level, treating `lower` and `unorderable` as paying nothing. */ +const rankOf = (level) => LEVEL_RANK[level] ?? 0 + +const base = resolveBase() +if (base === null) { + process.stdout.write('No base ref to compare against; version-bump check does not apply.\n') + process.exit(0) +} + +const head = git(['rev-parse', 'HEAD']).trim() +const mergeBase = git(['merge-base', base.ref, head], { allowFailure: true })?.trim() +if (!mergeBase) { + throw new Error(`${base.label} (${base.ref.slice(0, 12)}) shares no history with HEAD`) +} + +const baseLabel = `${base.label} (${mergeBase.slice(0, 12)})` + +if (mergeBase === head) { + process.stdout.write(`No commits ahead of ${baseLabel}; nothing to compare for a version bump.\n`) + process.exit(0) +} + +const baseWorkspace = workspaceAtRef(mergeBase) +const headWorkspace = workspaceAtRef(head) +const baseManifests = manifestsAtRef(mergeBase, baseWorkspace) +const headManifests = manifestsAtRef(head, headWorkspace) + +const publishable = (entry) => entry !== undefined && entry.manifest.private !== true +const failures = [] +const inspected = [] + +// The union: a package that STOPS being publishable is itself a consumer-visible +// change, so it cannot be dropped from the comparison by the flag that hides it. +const names = [ + ...new Set( + [...baseManifests.entries(), ...headManifests.entries()] + .filter(([name]) => publishable(baseManifests.get(name)) || publishable(headManifests.get(name))) + .map(([name]) => name), + ), +].sort() + +for (const name of names) { + const baseEntry = baseManifests.get(name) + const headEntry = headManifests.get(name) + if (!headEntry) { + inspected.push(`${name}: removed from the workspace; nothing left to version`) + continue + } + if (!baseEntry) { + inspected.push(`${headEntry.path}: new publishable package at ${headEntry.manifest.version}`) + continue + } + + const changes = surfaceChanges( + surfaceOf(baseEntry, baseWorkspace.catalogs), + surfaceOf(headEntry, headWorkspace.catalogs), + ) + + const baseRecord = surfaceAtRef(mergeBase, baseEntry.path) + const headRecord = surfaceAtRef(head, headEntry.path) + if (headRecord === null) { + // Fail closed rather than pass a package whose symbols nothing states. A + // missing record is indistinguishable from a surface that never changes. + failures.push({ + path: headEntry.path, + name, + baseVersion: baseEntry.manifest.version, + headVersion: headEntry.manifest.version, + changes, + missingRecord: surfaceRecordPath( + headEntry.path === 'package.json' ? '' : dirname(headEntry.path), + ), + }) + continue + } + // A record appearing for the first time states the surface as it already is, + // so there is nothing yet to have changed against. + const exportChanges = + baseRecord === null + ? { added: [], removed: [], narrowed: [], widened: [] } + : compareSurfaces(baseRecord.surface, headRecord.surface) + const severity = surfaceSeverity(exportChanges) + const exportLines = [ + ...exportChanges.removed.map((change) => `export removed: ${change}`), + ...exportChanges.narrowed.map((change) => `export narrowed: ${change}`), + ...exportChanges.added.map((change) => `export added: ${change}`), + ...exportChanges.widened.map((change) => `export kind changed: ${change}`), + ] + + if (changes.length === 0 && exportLines.length === 0) { + inspected.push(`${headEntry.path}: consumer surface unchanged at ${headEntry.manifest.version}`) + continue + } + + // The manifest rule asks only for a higher version; the export rule asks for a + // level. The stronger of the two governs. + const requiredLevel = (() => { + const forExports = requiredBumpLevel(severity, baseEntry.manifest.version) + const forManifest = changes.length > 0 ? 'patch' : 'none' + return rankOf(forExports) >= rankOf(forManifest) ? forExports : forManifest + })() + const paidLevel = versionBumpLevel(baseEntry.manifest.version, headEntry.manifest.version) + + if (rankOf(paidLevel) >= rankOf(requiredLevel)) { + inspected.push( + `${headEntry.path}: ${changes.length} manifest and ${exportLines.length} export change(s) ` + + `needing a ${requiredLevel} bump, paid for by ` + + `${baseEntry.manifest.version} -> ${headEntry.manifest.version} (${paidLevel})`, + ) + continue + } + failures.push({ + path: headEntry.path, + name, + baseVersion: baseEntry.manifest.version, + headVersion: headEntry.manifest.version, + changes: [...changes, ...exportLines], + requiredLevel, + paidLevel, + severity, + }) +} + +if (failures.length > 0) { + const lines = ['A consumer-visible change must ship under a higher version.', ''] + for (const failure of failures) { + if (failure.missingRecord) { + lines.push( + `${failure.path} (${failure.name}) publishes entry points but ${failure.missingRecord} ` + + 'does not exist, so a change to its exported symbols cannot be seen here.', + ' Generate it with: pnpm run build && pnpm run api:surface', + '', + ) + continue + } + const versionState = (() => { + if (failure.baseVersion === failure.headVersion) return `still declares ${failure.headVersion}` + const move = `moves ${failure.baseVersion} -> ${failure.headVersion}` + return rankOf(failure.paidLevel) === 0 + ? `${move}, which is not higher` + : `${move}, only a ${failure.paidLevel} bump` + })() + const severityLabel = failure.severity === 'none' ? 'manifest-only' : failure.severity + lines.push( + `${failure.path} (${failure.name}) ${versionState}, but against ${baseLabel} it makes ` + + `${severityLabel === 'additive' ? 'an' : 'a'} ${severityLabel} change needing a ` + + `${failure.requiredLevel} bump:`, + ) + for (const change of failure.changes) lines.push(` ${change}`) + lines.push('') + } + // The command a repository actually uses to set a version, read from its own + // manifest rather than named here, so this file stays identical across repos. + const rootManifest = JSON.parse(fileAtRef(head, 'package.json') ?? '{}') + const bumpCommand = + rootManifest.scripts?.['release:prepare'] === undefined + ? ' set "version" in package.json' + : ' pnpm run release:prepare (root package)' + lines.push( + 'A version already on the registry cannot be corrected by re-tagging — publish.yml', + 'skips it — so this change would never reach a consumer.', + '', + 'Bump the version in the same pull request:', + bumpCommand, + 'and add the CHANGELOG entry that says what a consumer must do differently.', + ) + process.stderr.write(`${lines.join('\n')}\n`) + process.exit(1) +} + +process.stdout.write( + `${[ + `Consumer-visible package surfaces carry their version bumps (against ${baseLabel}).`, + ...inspected.map((line) => ` ${line}`), + ].join('\n')}\n`, +) diff --git a/scripts/lib/api-surface.mjs b/scripts/lib/api-surface.mjs new file mode 100644 index 00000000..44fbdf42 --- /dev/null +++ b/scripts/lib/api-surface.mjs @@ -0,0 +1,295 @@ +/** + * The public export surface of a package, and the version level a change to it + * must be paid for with. + * + * `check-version-bump.mjs` compares the MANIFEST — the fields npm copies into + * the published package.json. That comparison cannot see a symbol. Adding an + * export to a source entry point leaves every manifest field byte-identical: + * `exports["./durable"].types` still reads `./dist/durable.d.ts`, so the change + * is invisible and the package ships under a version the registry already + * holds. This module supplies the missing half — the SYMBOLS each entry point + * exports — as a committed record that a change has to update. + * + * The record is a file, not a live comparison of two builds. Three reasons: + * - the merge base's symbols are then one `git show` away, with no second + * checkout, no second install, and no second build; + * - the record appears in the pull request diff, so an added export is + * visible to a reviewer at the moment it is added; + * - `check-version-bump.mjs` keeps needing nothing but git, so it still runs + * before the build. + * + * A record can go stale. `check-api-surface.mjs` regenerates it from the built + * declaration files and fails when the two disagree, and it runs wherever a + * build has already happened. Staleness is therefore loud, never a silent pass. + * + * Scope: names and their kind (`value` or `type`), never the shape behind a + * name. Removing a field from an exported interface is a break this does not + * see. Deeper comparison would need a full type checker on both sides and would + * fail on every internal type edit; names and kinds are the granularity that + * matches the defect — a name that resolves in no published version. + */ +import { existsSync, readdirSync } from 'node:fs' +import { join, posix, relative, resolve } from 'node:path' + +/** Declaration-file suffixes an `exports` condition can legitimately point at. */ +const DECLARATION_SUFFIXES = ['.d.ts', '.d.mts', '.d.cts'] + +/** + * Conditions that resolve to the types a consumer compiles against, most + * specific first. `types` is authoritative; the others are read only when a + * package states no `types`, and are then required to be a declaration file + * before they count as an entry point. + */ +const TYPE_CONDITIONS = ['types', 'import', 'module', 'default', 'require'] + +const isDeclarationFile = (target) => DECLARATION_SUFFIXES.some((suffix) => target.endsWith(suffix)) + +/** + * The declaration target of one `exports` value. Returns `null` for an entry + * that resolves to something other than a declaration file — a JSON asset, a + * bare script — which is a real entry point with no symbols to record. + */ +const declarationTargetOf = (value) => { + if (typeof value === 'string') return isDeclarationFile(value) ? value : null + if (value === null || typeof value !== 'object') return null + if (Array.isArray(value)) { + for (const element of value) { + const target = declarationTargetOf(element) + if (target !== null) return target + } + return null + } + for (const condition of TYPE_CONDITIONS) { + if (!(condition in value)) continue + const target = declarationTargetOf(value[condition]) + if (target !== null) return target + } + return null +} + +/** + * Expand one `*` in a subpath against the files a build produced. + * + * `"./benchmarks/*": { "types": "./dist/benchmarks/*.d.ts" }` is a single + * manifest line standing for however many modules the build emitted. Each one + * is a separate entry point a consumer can import, so each is recorded + * separately — otherwise adding a benchmark module would be invisible here for + * the same reason adding a symbol is invisible to the manifest comparison. + */ +const expandWildcard = (subpath, target, packageDir) => { + const [prefix, suffix] = target.split('*') + // npm splits the pattern at the `*`, not at a path boundary: the text before + // the star is a directory path plus a possible filename prefix, and the star + // itself matches across `/`. Splitting with `dirname`/`basename` drops the + // final directory when the prefix ends in a separator, which silently matches + // nothing. + const separator = prefix.lastIndexOf('/') + const directory = resolve(packageDir, separator === -1 ? '.' : prefix.slice(0, separator)) + const namePrefix = separator === -1 ? prefix : prefix.slice(separator + 1) + const entries = [] + if (existsSync(directory)) { + const found = readdirSync(directory, { recursive: true, withFileTypes: true }) + const relativeNames = found + .filter((entry) => entry.isFile()) + .map((entry) => + posix.join(relative(directory, entry.parentPath).split('\\').join('/'), entry.name), + ) + .sort() + for (const name of relativeNames) { + if (!name.startsWith(namePrefix) || !name.endsWith(suffix)) continue + const stem = name.slice(namePrefix.length, name.length - suffix.length) + if (stem === '') continue + entries.push({ subpath: subpath.replace('*', stem), file: join(directory, name) }) + } + } + if (entries.length === 0) { + throw new Error( + `exports["${subpath}"] -> "${target}" matches no built file. Either the build did not ` + + 'emit the modules this pattern publishes, or the pattern is wrong. An entry point ' + + 'that resolves to nothing must not be recorded as an empty surface.', + ) + } + return entries +} + +/** + * Every entry point a consumer can import from this package, with the + * declaration file that states its symbols. + * + * Returns `assets` separately so an entry point with no declaration file is + * recorded as deliberately empty rather than dropped. A dropped entry would be + * a hole in the surface record with nothing naming it. + */ +export const resolveExportEntries = (manifest, packageDir) => { + const declared = manifest.exports + if (declared === undefined) return { entries: [], assets: [] } + const table = + typeof declared === 'string' || Array.isArray(declared) ? { '.': declared } : declared + const entries = [] + const assets = [] + for (const [subpath, value] of Object.entries(table)) { + // A condition name at the top level (`{ "import": ... }`) is sugar for a + // single "." entry, not a subpath. + if (!subpath.startsWith('.')) { + const target = declarationTargetOf(table) + if (target !== null) entries.push({ subpath: '.', file: resolve(packageDir, target) }) + else assets.push('.') + break + } + const target = declarationTargetOf(value) + if (target === null) { + assets.push(subpath) + continue + } + if (subpath.includes('*') || target.includes('*')) { + if (!subpath.includes('*') || !target.includes('*')) { + throw new Error( + `exports["${subpath}"] uses a pattern on one side only; ` + + 'a wildcard subpath and its target must both carry exactly one "*"', + ) + } + entries.push(...expandWildcard(subpath, target, packageDir)) + continue + } + entries.push({ subpath, file: resolve(packageDir, target) }) + } + entries.sort((left, right) => left.subpath.localeCompare(right.subpath)) + return { entries, assets: assets.sort() } +} + +/** Stable on-disk form: sorted everywhere, so a diff shows only real movement. */ +export const formatSurface = (surface) => { + const entries = {} + for (const subpath of Object.keys(surface.entries).sort()) { + const names = surface.entries[subpath] + entries[subpath] = Object.fromEntries(Object.keys(names).sort().map((name) => [name, names[name]])) + } + return `${JSON.stringify({ package: surface.package, entries, assets: [...surface.assets].sort() }, null, 2)}\n` +} + +/** + * What moved between two surface records. + * + * `value -> type` is listed as a narrowing: the name still type-checks, and the + * runtime binding a consumer imported is gone. That is a break the name set + * alone would call unchanged. + */ +export const compareSurfaces = (before, after) => { + const added = [] + const removed = [] + const narrowed = [] + const widened = [] + const subpaths = [ + ...new Set([...Object.keys(before.entries ?? {}), ...Object.keys(after.entries ?? {})]), + ].sort() + for (const subpath of subpaths) { + const left = before.entries?.[subpath] + const right = after.entries?.[subpath] + if (left === undefined) { + for (const name of Object.keys(right ?? {}).sort()) added.push(`${subpath} ${name}`) + continue + } + if (right === undefined) { + for (const name of Object.keys(left).sort()) removed.push(`${subpath} ${name}`) + continue + } + for (const name of [...new Set([...Object.keys(left), ...Object.keys(right)])].sort()) { + const from = left[name] + const to = right[name] + if (from === to) continue + if (from === undefined) added.push(`${subpath} ${name}`) + else if (to === undefined) removed.push(`${subpath} ${name}`) + else if (from === 'value' && to === 'type') narrowed.push(`${subpath} ${name}: value -> type`) + else widened.push(`${subpath} ${name}: ${from} -> ${to}`) + } + } + // An entry point that stops carrying declarations is a removal of everything + // a consumer could import through it, so it is compared with the same rule. + const beforeAssets = new Set(before.assets ?? []) + const afterAssets = new Set(after.assets ?? []) + for (const subpath of [...afterAssets].sort()) { + if (!beforeAssets.has(subpath) && before.entries?.[subpath] === undefined) { + added.push(`${subpath} (entry point, no declarations)`) + } + } + for (const subpath of [...beforeAssets].sort()) { + if (!afterAssets.has(subpath) && after.entries?.[subpath] === undefined) { + removed.push(`${subpath} (entry point, no declarations)`) + } + } + return { added, removed, narrowed, widened } +} + +export const surfaceSeverity = (changes) => { + if (changes.removed.length > 0 || changes.narrowed.length > 0) return 'breaking' + if (changes.added.length > 0 || changes.widened.length > 0) return 'additive' + return 'none' +} + +const VERSION_PATTERN = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/ + +const parseVersion = (raw) => { + const match = VERSION_PATTERN.exec(String(raw).trim()) + if (!match) return null + return { + major: Number(match[1]), + minor: Number(match[2]), + patch: Number(match[3]), + prerelease: match[4], + } +} + +export const LEVEL_RANK = { none: 0, patch: 1, minor: 2, major: 3 } + +/** + * The level a version move actually pays. `lower` and `unorderable` are not + * levels — they are the two ways a move pays nothing, kept distinct so a + * failure can say which happened. + */ +export const versionBumpLevel = (baseVersion, headVersion) => { + const base = parseVersion(baseVersion) + const head = parseVersion(headVersion) + if (!base || !head) return 'unorderable' + if (head.major !== base.major) return head.major > base.major ? 'major' : 'lower' + if (head.minor !== base.minor) return head.minor > base.minor ? 'minor' : 'lower' + if (head.patch !== base.patch) return head.patch > base.patch ? 'patch' : 'lower' + if (head.prerelease === base.prerelease) return 'none' + // Same release triple. Leaving a prerelease for its release, or advancing to a + // later prerelease, is the smallest move that reaches a consumer. Adding a + // prerelease to an already-released version goes backwards. + if (base.prerelease === undefined) return 'lower' + if (head.prerelease === undefined) return 'patch' + return head.prerelease > base.prerelease ? 'patch' : 'lower' +} + +/** + * The level a surface change must move, read off the consumer's compatibility + * boundary rather than off semver's headline rule. + * + * `^1.2.3` admits every 1.x, so the boundary sits at MAJOR: a break has to move + * major, and an addition has to move minor to be reachable through a `~1.2` + * style pin. `^0.2.3` — and the fleet's explicit `>=0.2.3 <0.3.0` window — + * admits only 0.2.x, so the boundary moves one position right. A break has to + * move MINOR, because that is what lands outside every existing consumer + * window, and an addition needs only PATCH, because that is already reachable + * inside one. Demanding a minor for every added export on a 0.x package would + * push every consumer range forward for a change that breaks nobody. + */ +export const requiredBumpLevel = (severity, baseVersion) => { + if (severity === 'none') return 'none' + const base = parseVersion(baseVersion) + // An unreadable base version cannot establish a boundary; demand the strongest + // level rather than guess downwards. + const stable = base === null || base.major >= 1 + if (severity === 'breaking') return stable ? 'major' : 'minor' + return stable ? 'minor' : 'patch' +} + +/** Path of a package's surface record, relative to the repository root. */ +export const surfaceRecordPath = (packageDirectory) => { + const directory = packageDirectory === '' || packageDirectory === '.' ? '' : packageDirectory + return directory === '' ? 'api-surface.json' : posix.join(directory, 'api-surface.json') +} + +export const relativeToRoot = (repoRoot, absolutePath) => + relative(repoRoot, absolutePath).split('\\').join('/') diff --git a/tests/version-bump-check.test.ts b/tests/version-bump-check.test.ts new file mode 100644 index 00000000..779f2ce2 --- /dev/null +++ b/tests/version-bump-check.test.ts @@ -0,0 +1,634 @@ +import { execFile } from 'node:child_process' +import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { promisify } from 'node:util' +import { afterEach, describe, expect, it } from 'vitest' + +const execFileAsync = promisify(execFile) +const roots: string[] = [] + +/** + * A throwaway repository with the two shapes that matter: a root manifest whose + * peer ranges a consumer resolves against, and a workspace package that reaches + * its dependency versions through a `catalog:` pin. + */ +async function createRepo(): Promise { + const root = await mkdtemp(join(tmpdir(), 'agent-runtime-version-bump-')) + roots.push(root) + await git(root, 'init', '--quiet', '--initial-branch=main') + await mkdir(join(root, 'bench')) + await writeManifests(root, { + version: '1.0.0', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await writeFile(join(root, 'source.ts'), 'export const value = 1\n') + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'value', AgentSpec: 'type' }, + }) + await writeSurface(root, 'bench', '@tangle-network/agent-bench', { '.': { runBench: 'value' } }) + await commit(root, 'base') + return root +} + +/** + * An export surface record for a fixture package. Every publishable manifest + * must carry one, so the fixture writes one wherever it writes a manifest. + */ +async function writeSurface( + root: string, + directory: string, + name: string, + entries: Record>, +): Promise { + await writeFile( + join(root, directory, 'api-surface.json'), + `${JSON.stringify({ package: name, entries, assets: [] }, null, 2)}\n`, + ) +} + +async function writeManifests( + root: string, + spec: { version: string; evalPeer: string; knowledgeCatalog: string; benchVersion: string }, +): Promise { + await writeFile( + join(root, 'package.json'), + `${JSON.stringify( + { + name: '@tangle-network/agent-runtime', + version: spec.version, + exports: { '.': './dist/index.js' }, + files: ['dist', 'README.md'], + dependencies: { '@tangle-network/agent-knowledge': 'catalog:' }, + peerDependencies: { '@tangle-network/agent-eval': spec.evalPeer }, + devDependencies: { vitest: '^4.1.10' }, + scripts: { build: 'tsdown' }, + }, + null, + 2, + )}\n`, + ) + await writeFile( + join(root, 'bench', 'package.json'), + `${JSON.stringify( + { + name: '@tangle-network/agent-bench', + version: spec.benchVersion, + dependencies: { '@tangle-network/agent-knowledge': 'catalog:' }, + }, + null, + 2, + )}\n`, + ) + await writeFile( + join(root, 'pnpm-workspace.yaml'), + [ + 'packages:', + ' - bench', + '', + 'catalog:', + ` '@tangle-network/agent-knowledge': ${spec.knowledgeCatalog}`, + '', + ].join('\n'), + ) +} + +async function git(root: string, ...args: string[]): Promise { + // -c core.hooksPath keeps a developer's global hooks out of the fixture; the + // fixture identity is local so it never depends on machine git config. + const { stdout } = await execFileAsync( + 'git', + ['-C', root, '-c', 'core.hooksPath=/dev/null', '-c', 'commit.gpgsign=false', ...args], + { env: { ...process.env, GIT_CONFIG_GLOBAL: '/dev/null', GIT_CONFIG_SYSTEM: '/dev/null' } }, + ) + return stdout +} + +async function commit(root: string, message: string): Promise { + await git(root, 'add', '-A') + await git( + root, + '-c', + 'user.email=t@t.dev', + '-c', + 'user.name=T', + 'commit', + '--quiet', + '-m', + message, + ) + return (await git(root, 'rev-parse', 'HEAD')).trim() +} + +async function check(root: string, base: string) { + return execFileAsync(process.execPath, ['scripts/check-version-bump.mjs'], { + cwd: process.cwd(), + env: { + ...process.env, + PACKAGE_VERSION_BUMP_ROOT: root, + PACKAGE_VERSION_BUMP_BASE: base, + }, + }) +} + +afterEach(async () => { + await Promise.all(roots.splice(0).map((root) => rm(root, { recursive: true, force: true }))) +}) + +describe('consumer-visible change requires a version bump', () => { + it('rejects a peer range move that keeps the same version', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '1.0.0', + evalPeer: '>=0.141.0 <0.142.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await commit(root, 'move the peer range') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining( + 'peerDependencies.@tangle-network/agent-eval: ">=0.140.1 <0.141.0" -> ">=0.141.0 <0.142.0"', + ), + }) + }) + + it('accepts the same move once the version pays for it', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '1.1.0', + evalPeer: '>=0.141.0 <0.142.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await commit(root, 'move the peer range and bump') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('paid for by 1.0.0 -> 1.1.0'), + }) + }) + + it('rejects a catalog pin move even though every manifest is byte-identical', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '1.0.0', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.5', + benchVersion: '0.4.9', + }) + await commit(root, 'move only the catalog pin') + + // This is the shape that shipped 0.119.0 twice: the specifier string never + // changes, so a manifest diff shows nothing while the resolved version moves. + expect((await git(root, 'diff', base, 'HEAD', '--', 'package.json')).trim()).toBe('') + const failure = await check(root, base).catch((error) => error) + expect(failure.stderr).toContain( + 'dependencies.@tangle-network/agent-knowledge: "7.0.4" -> "7.0.5"', + ) + // Every publishable package that resolves through the pin, not just the root. + expect(failure.stderr).toContain('bench/package.json (@tangle-network/agent-bench)') + }) + + it('does not fire on an ordinary source-only change', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeFile(join(root, 'source.ts'), 'export const value = 2\n') + await commit(root, 'edit source') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged at 1.0.0'), + }) + }) + + it('does not fire on a devDependency or script change', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:package.json').then((raw) => raw)) + manifest.devDependencies.vitest = '^4.2.0' + manifest.scripts.lint = 'biome check src' + await writeFile(join(root, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await commit(root, 'bump a devDependency and add a script') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged at 1.0.0'), + }) + }) + + it('fails closed when a catalog specifier resolves to nothing', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeFile( + join(root, 'pnpm-workspace.yaml'), + ['packages:', ' - bench', '', 'catalog: {}', ''].join('\n'), + ) + await commit(root, 'drop the catalog entry the dependency points at') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('has no catalog entry for it'), + }) + }) + + it('fails closed when the named base cannot be resolved', async () => { + const root = await createRepo() + + await expect(check(root, '0000000000000000000000000000000000000000')).rejects.toMatchObject({ + stderr: expect.stringContaining('cannot resolve the requested base commit'), + }) + }) + + it('fails closed on a CI event that should have had a base branch', async () => { + const root = await createRepo() + await writeFile(join(root, 'source.ts'), 'export const value = 2\n') + await commit(root, 'edit source') + + await expect( + execFileAsync(process.execPath, ['scripts/check-version-bump.mjs'], { + cwd: process.cwd(), + env: { + ...process.env, + PACKAGE_VERSION_BUMP_ROOT: root, + PACKAGE_VERSION_BUMP_BASE: '', + GITHUB_BASE_REF: '', + GITHUB_ACTIONS: 'true', + GITHUB_EVENT_NAME: 'merge_group', + }, + }), + ).rejects.toMatchObject({ + stderr: expect.stringContaining('with no base branch to compare against'), + }) + }) + + it('rejects a downgrade, which lands on a version the registry may already hold', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '0.9.0', + evalPeer: '>=0.141.0 <0.142.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await commit(root, 'move the peer range and lower the version') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('moves 1.0.0 -> 0.9.0, which is not higher'), + }) + }) + + it('rejects an install-lifecycle script that would run on a consumer machine', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:package.json')) + manifest.scripts.postinstall = 'node ./dist/postinstall.js' + await writeFile(join(root, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await commit(root, 'add a postinstall script') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('installScripts'), + }) + }) + + it('rejects a typesVersions change', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:package.json')) + manifest.typesVersions = { '*': { '*': ['dist/*'] } } + await writeFile(join(root, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await commit(root, 'add typesVersions') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('typesVersions'), + }) + }) + + it('compares a moved package against the name it already published, not a new path', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await mkdir(join(root, 'packages', 'bench'), { recursive: true }) + const manifest = JSON.parse(await git(root, 'show', 'HEAD:bench/package.json')) + manifest.peerDependencies = { '@tangle-network/agent-eval': '>=0.141.0 <0.142.0' } + await writeFile( + join(root, 'packages', 'bench', 'package.json'), + `${JSON.stringify(manifest, null, 2)}\n`, + ) + await writeSurface(root, join('packages', 'bench'), '@tangle-network/agent-bench', { + '.': { runBench: 'value' }, + }) + await rm(join(root, 'bench'), { recursive: true }) + await writeFile( + join(root, 'pnpm-workspace.yaml'), + [ + 'packages:', + ' - packages/*', + '', + 'catalog:', + " '@tangle-network/agent-knowledge': 7.0.4", + '', + ].join('\n'), + ) + await commit(root, 'move bench and change its peers') + + // Relocating a directory must not buy a free pass on an already-published name. + const failure = await check(root, base).catch((error) => error) + expect(failure.stderr).toContain('@tangle-network/agent-bench') + expect(failure.stderr).toContain( + 'peerDependencies: (absent) -> {"@tangle-network/agent-eval":">=0.141.0 <0.142.0"}', + ) + }) + + it('rejects marking a published package private without a version bump', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:bench/package.json')) + manifest.private = true + await writeFile(join(root, 'bench', 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await commit(root, 'mark bench private') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('private'), + }) + }) + + it('does not fire when a dependency moves between a catalog and an identical literal pin', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:package.json')) + manifest.dependencies['@tangle-network/agent-knowledge'] = '7.0.4' + await writeFile(join(root, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await commit(root, 'inline the catalog pin at the same version') + + // The tarball is byte-identical; only the authoring style moved. + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged'), + }) + }) + + it('does not fire when files is reordered', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:package.json')) + manifest.files = ['README.md', 'dist'] + await writeFile(join(root, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await commit(root, 'reorder files') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged'), + }) + }) + + it('does not police a directory the workspace excludes', async () => { + const root = await createRepo() + await writeFile( + join(root, 'pnpm-workspace.yaml'), + [ + 'packages:', + ' - bench', + ' - fixtures/*', + ' - "!fixtures/scratch"', + '', + 'catalog:', + " '@tangle-network/agent-knowledge': 7.0.4", + '', + ].join('\n'), + ) + await mkdir(join(root, 'fixtures', 'scratch'), { recursive: true }) + await writeFile( + join(root, 'fixtures', 'scratch', 'package.json'), + `${JSON.stringify({ name: 'scratch-fixture', version: '1.0.0', files: ['a'] }, null, 2)}\n`, + ) + await commit(root, 'add an excluded fixture package') + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + + await writeFile( + join(root, 'fixtures', 'scratch', 'package.json'), + `${JSON.stringify({ name: 'scratch-fixture', version: '1.0.0', files: ['a', 'b'] }, null, 2)}\n`, + ) + await commit(root, 'edit the excluded fixture') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged at 1.0.0'), + }) + }) + + it('reaches a package nested deeper than one level under a ** pattern', async () => { + const root = await createRepo() + await writeFile( + join(root, 'pnpm-workspace.yaml'), + [ + 'packages:', + ' - bench', + ' - packages/**', + '', + 'catalog:', + " '@tangle-network/agent-knowledge': 7.0.4", + '', + ].join('\n'), + ) + await mkdir(join(root, 'packages', 'group', 'nested'), { recursive: true }) + await writeFile( + join(root, 'packages', 'group', 'nested', 'package.json'), + `${JSON.stringify( + { name: '@tangle-network/nested', version: '1.0.0', peerDependencies: { react: '>=18' } }, + null, + 2, + )}\n`, + ) + await writeSurface(root, join('packages', 'group', 'nested'), '@tangle-network/nested', { + '.': { nested: 'value' }, + }) + await commit(root, 'add a nested workspace package') + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + + await writeFile( + join(root, 'packages', 'group', 'nested', 'package.json'), + `${JSON.stringify( + { name: '@tangle-network/nested', version: '1.0.0', peerDependencies: { react: '>=19' } }, + null, + 2, + )}\n`, + ) + await commit(root, 'move the nested package peer range') + + const failure = await check(root, base).catch((error) => error) + expect(failure.stderr).toContain('@tangle-network/nested') + expect(failure.stderr).toContain('peerDependencies.react: ">=18" -> ">=19"') + }) + + it('survives a workspace file that does not exist', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + const manifest = JSON.parse(await git(root, 'show', 'HEAD:package.json')) + // The catalog is gone, so nothing may resolve through it any more. + manifest.dependencies['@tangle-network/agent-knowledge'] = '7.0.4' + await writeFile(join(root, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`) + await rm(join(root, 'pnpm-workspace.yaml')) + await rm(join(root, 'bench'), { recursive: true }) + await commit(root, 'drop the workspace file') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged'), + }) + }) +}) + +describe('a change to the exported symbols requires a version bump', () => { + it('rejects an added export while every manifest field stays identical', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'value', AgentSpec: 'type', PursuitProjection: 'type' }, + }) + await commit(root, 'add an export') + + // The shape that shipped PursuitProjection into no published version: the + // manifest never moves, so the manifest comparison sees nothing at all. + expect((await git(root, 'diff', base, 'HEAD', '--', 'package.json')).trim()).toBe('') + const failure = await check(root, base).catch((error) => error) + expect(failure.stderr).toContain('export added: . PursuitProjection') + expect(failure.stderr).toContain('additive change needing a minor bump') + }) + + it('accepts the added export once a minor pays for it', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '1.1.0', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'value', AgentSpec: 'type', PursuitProjection: 'type' }, + }) + await commit(root, 'add an export and bump the minor') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('1.0.0 -> 1.1.0 (minor)'), + }) + }) + + it('rejects a patch for an added export on a 1.x package', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '1.0.1', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'value', AgentSpec: 'type', PursuitProjection: 'type' }, + }) + await commit(root, 'add an export and bump only the patch') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('moves 1.0.0 -> 1.0.1, only a patch bump'), + }) + }) + + it('demands a major for a removed export on a 1.x package', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeManifests(root, { + version: '1.1.0', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await writeSurface(root, '.', '@tangle-network/agent-runtime', { '.': { runAgent: 'value' } }) + await commit(root, 'remove an export and bump the minor') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('breaking change needing a major bump'), + }) + }) + + it('treats a value that becomes type-only as breaking', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'type', AgentSpec: 'type' }, + }) + await commit(root, 'drop the runtime binding behind an export') + + const failure = await check(root, base).catch((error) => error) + expect(failure.stderr).toContain('export narrowed: . runAgent: value -> type') + expect(failure.stderr).toContain('needing a major bump') + }) + + it('moves the boundary one position right below 1.0', async () => { + const root = await createRepo() + await writeManifests(root, { + version: '0.140.0', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await commit(root, 'move to a 0.x version') + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + + // A consumer window is `>=0.140.0 <0.141.0`, so a patch already reaches an + // addition and a break has to leave the window at the minor. + await writeManifests(root, { + version: '0.140.1', + evalPeer: '>=0.140.1 <0.141.0', + knowledgeCatalog: '7.0.4', + benchVersion: '0.4.9', + }) + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'value', AgentSpec: 'type', PursuitProjection: 'type' }, + }) + await commit(root, 'add an export and bump the patch') + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('needing a patch bump'), + }) + + await writeSurface(root, '.', '@tangle-network/agent-runtime', { '.': { runAgent: 'value' } }) + await commit(root, 'remove an export on the same patch') + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('breaking change needing a minor bump'), + }) + }) + + it('does not fire when the exported symbols do not move', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeFile(join(root, 'source.ts'), 'export const value = 2\n') + await commit(root, 'edit source only') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged at 1.0.0'), + }) + }) + + it('records a first surface without demanding payment for it', async () => { + const root = await createRepo() + await git(root, 'rm', '--quiet', 'api-surface.json', 'bench/api-surface.json') + await commit(root, 'a history with no surface record') + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await writeSurface(root, '.', '@tangle-network/agent-runtime', { + '.': { runAgent: 'value', AgentSpec: 'type' }, + }) + await writeSurface(root, 'bench', '@tangle-network/agent-bench', { '.': { runBench: 'value' } }) + await commit(root, 'record the surface for the first time') + + await expect(check(root, base)).resolves.toMatchObject({ + stdout: expect.stringContaining('consumer surface unchanged at 1.0.0'), + }) + }) + + it('fails closed when a publishable package states no surface at all', async () => { + const root = await createRepo() + const base = (await git(root, 'rev-parse', 'HEAD')).trim() + await git(root, 'rm', '--quiet', 'api-surface.json') + await commit(root, 'delete the surface record') + + await expect(check(root, base)).rejects.toMatchObject({ + stderr: expect.stringContaining('api-surface.json does not exist'), + }) + }) +}) From bd5b63d0a2c7cd0d97094597e487f0045e498448 Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Tue, 18 Aug 2026 14:12:14 -0600 Subject: [PATCH 2/3] refactor(release): keep check-api-surface.mjs identical to its siblings --- scripts/check-api-surface.mjs | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/scripts/check-api-surface.mjs b/scripts/check-api-surface.mjs index edb5d949..f1139ce5 100644 --- a/scripts/check-api-surface.mjs +++ b/scripts/check-api-surface.mjs @@ -60,13 +60,18 @@ const declarationKind = (node) => { } const declaredNames = (node) => { - if (node.type === 'VariableDeclaration') { - return node.declarations.map((declarator) => declarator.id.name) + const named = (identifier, context) => { + // A destructuring pattern carries no single name. It cannot appear in a + // declaration file, so reaching here means the parse is not what this + // reader assumes — record nothing rather than a key of `undefined`. + if (identifier?.type === 'Identifier') return identifier.name + if (identifier?.type === 'Literal') return identifier.value + throw new Error(`cannot read the exported name of a ${context} (${identifier?.type})`) } - if (node.type === 'TSModuleDeclaration') { - return [node.id.type === 'Identifier' ? node.id.name : node.id.value] + if (node.type === 'VariableDeclaration') { + return node.declarations.map((declarator) => named(declarator.id, 'variable declarator')) } - return [node.id.name] + return [named(node.id, node.type)] } /** @@ -91,10 +96,18 @@ const resolveRelativeDeclaration = (fromFile, specifier) => { * Every symbol `file` exports, name to kind. Follows `export * from` into the * chunk files the build splits declarations across, because those re-exports * are what a consumer's entry point actually resolves through. + * + * `resolved` memoizes a finished file and `visiting` breaks a cycle. Keeping the + * two apart means a chunk reached by several paths is parsed once and still + * answers with its symbols on every path, instead of answering empty on all but + * the first. The entry point's total is the same either way, because every path + * merges upward into it; the cost and the per-file answer are not. */ -const exportsOfFile = (file, seen = new Set()) => { - if (seen.has(file)) return {} - seen.add(file) +const exportsOfFile = (file, resolved = new Map(), visiting = new Set()) => { + const memoized = resolved.get(file) + if (memoized !== undefined) return memoized + if (visiting.has(file)) return {} + visiting.add(file) const source = readFileSync(file, 'utf8') const parsed = parseSync(file, source, { lang: 'dts' }) if (parsed.errors.length > 0) { @@ -134,7 +147,7 @@ const exportsOfFile = (file, seen = new Set()) => { names[name] = 'value' break } - for (const [name, kind] of Object.entries(exportsOfFile(target, seen))) { + for (const [name, kind] of Object.entries(exportsOfFile(target, resolved, visiting))) { names[name] = node.exportKind === 'type' ? 'type' : kind } break @@ -146,6 +159,8 @@ const exportsOfFile = (file, seen = new Set()) => { throw new Error(`${file} uses unhandled export form ${node.type}`) } } + visiting.delete(file) + resolved.set(file, names) return names } From 184aa525f4a2568f2e90cd6f27756da78ce074ac Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Wed, 19 Aug 2026 01:10:11 -0600 Subject: [PATCH 3/3] chore(release): regenerate the surface record and repin the lock digest for the rebased tree --- api-surface.json | 10 ++++++++++ src/analyst/benchmark-implementation.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/api-surface.json b/api-surface.json index 9267f0d8..e0248856 100644 --- a/api-surface.json +++ b/api-surface.json @@ -1872,14 +1872,19 @@ "EProcessStep": "type", "EVIDENCE_AUTHORITY_KINDS": "value", "EVIDENCE_RECEIPT_VERSION": "value", + "EVIDENCE_STATES": "value", "Estimand": "type", "EstimandResult": "type", "EvidenceAuthority": "type", "EvidenceAuthorityKind": "type", "EvidenceBinding": "type", + "EvidenceDenominator": "type", "EvidenceReceipt": "type", "EvidenceReceiptVerification": "type", "EvidenceRecord": "type", + "EvidenceRegistryError": "value", + "EvidenceRegistryRecord": "type", + "EvidenceState": "type", "EvidenceVector": "type", "Experiment": "type", "ExperimentFunnel": "type", @@ -1971,6 +1976,8 @@ "evaluatePowerFloorGate": "value", "evaluatePredicate": "value", "evaluateProvenanceGate": "value", + "evidenceDenominatorSchema": "value", + "evidenceRegistryRecordSchema": "value", "executeAdmissionRule": "value", "executeDecisionRule": "value", "fileExperimentStore": "value", @@ -1995,9 +2002,11 @@ "pairedRiskDifferenceScore": "value", "paretoPolicy": "value", "paretoSignificanceGate": "value", + "parseEvidenceRegistryRecord": "value", "powerPreflight": "value", "projectNLadderBudget": "value", "readField": "value", + "renderEvidenceIndex": "value", "renderFunnelTable": "value", "requiredPairedSampleSize": "value", "requiredSampleSize": "value", @@ -2008,6 +2017,7 @@ "sequentialDecide": "value", "sequentialPairedGate": "value", "signManifest": "value", + "validateEvidenceRegistry": "value", "verifyEvidenceReceipt": "value", "verifyManifest": "value", "verifyMatchedBudgets": "value", diff --git a/src/analyst/benchmark-implementation.ts b/src/analyst/benchmark-implementation.ts index 47b3fae9..8b021b5a 100644 --- a/src/analyst/benchmark-implementation.ts +++ b/src/analyst/benchmark-implementation.ts @@ -10,7 +10,7 @@ export const ANALYST_BENCHMARK_DEPENDENCY_LOCK_FILES = Object.freeze([ ]) export const ANALYST_BENCHMARK_DEPENDENCY_LOCK_SHA256 = - 'd486ebde3bc6205e6486cd74547e3890c8136a8ad0873111bd5974ce4204737a' + 'e900fd0482d3702146727e8117df29b27fbba0878e64b35445a2901d4e94119e' /** The published benchmark evidence was produced at this package version, by * the retired one-shot direct runner, before trace analysts moved to the