@ai-sdlc/orchestrator 0.5.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-enforcement.d.ts +26 -0
- package/dist/action-enforcement.js +70 -0
- package/dist/admission-composite.d.ts +67 -0
- package/dist/admission-composite.js +158 -0
- package/dist/admission-enrichment.d.ts +142 -0
- package/dist/admission-enrichment.js +331 -0
- package/dist/admission-hc.d.ts +62 -0
- package/dist/admission-hc.js +83 -0
- package/dist/admission-score.d.ts +148 -0
- package/dist/admission-score.js +237 -0
- package/dist/analysis/analyzer.js +3 -2
- package/dist/analysis/convention-detector.d.ts +85 -2
- package/dist/analysis/convention-detector.js +375 -70
- package/dist/analysis/diff-analyzer.d.ts +33 -0
- package/dist/analysis/diff-analyzer.js +122 -0
- package/dist/analysis/hotspot-analyzer.js +3 -1
- package/dist/analysis/index.d.ts +2 -1
- package/dist/analysis/index.js +2 -1
- package/dist/artifacts/index.d.ts +65 -0
- package/dist/artifacts/index.js +142 -0
- package/dist/backlog-adapter.d.ts +121 -0
- package/dist/backlog-adapter.js +438 -0
- package/dist/calibration.d.ts +43 -0
- package/dist/calibration.js +76 -0
- package/dist/cli/commands/agents.d.ts +24 -0
- package/dist/cli/commands/agents.js +66 -1
- package/dist/cli/commands/git-remote.d.ts +49 -0
- package/dist/cli/commands/git-remote.js +91 -0
- package/dist/cli/commands/health.d.ts +4 -0
- package/dist/cli/commands/health.js +13 -1
- package/dist/cli/commands/init.d.ts +26 -0
- package/dist/cli/commands/init.js +164 -22
- package/dist/cli/commands/mcp-setup.d.ts +31 -0
- package/dist/cli/commands/mcp-setup.js +78 -8
- package/dist/cli/formatters/table.js +15 -2
- package/dist/cli/index.d.ts +14 -1
- package/dist/cli/index.js +81 -20
- package/dist/cli/versions.d.ts +57 -0
- package/dist/cli/versions.js +128 -0
- package/dist/code-area-classifier.d.ts +21 -0
- package/dist/code-area-classifier.js +48 -0
- package/dist/config.d.ts +33 -1
- package/dist/config.js +78 -8
- package/dist/cycle-utils.d.ts +51 -0
- package/dist/cycle-utils.js +77 -0
- package/dist/database/adapters/external.d.ts +24 -0
- package/dist/database/adapters/external.js +80 -0
- package/dist/database/adapters/neon.d.ts +41 -0
- package/dist/database/adapters/neon.js +98 -0
- package/dist/database/adapters/pg-snapshot-restore.d.ts +28 -0
- package/dist/database/adapters/pg-snapshot-restore.js +68 -0
- package/dist/database/adapters/sqlite-copy.d.ts +32 -0
- package/dist/database/adapters/sqlite-copy.js +145 -0
- package/dist/database/connection-injection.d.ts +35 -0
- package/dist/database/connection-injection.js +93 -0
- package/dist/database/index.d.ts +12 -0
- package/dist/database/index.js +23 -0
- package/dist/database/registry.d.ts +13 -0
- package/dist/database/registry.js +27 -0
- package/dist/database/topology.d.ts +52 -0
- package/dist/database/topology.js +44 -0
- package/dist/database/types.d.ts +89 -0
- package/dist/database/types.js +26 -0
- package/dist/defaults.d.ts +5 -0
- package/dist/defaults.js +5 -0
- package/dist/design-authority.d.ts +40 -0
- package/dist/design-authority.js +71 -0
- package/dist/design-lookahead.d.ts +64 -0
- package/dist/design-lookahead.js +86 -0
- package/dist/design-quality-trend.d.ts +87 -0
- package/dist/design-quality-trend.js +190 -0
- package/dist/design-system-context.d.ts +46 -0
- package/dist/design-system-context.js +80 -0
- package/dist/design-system-correction-loop.d.ts +64 -0
- package/dist/design-system-correction-loop.js +128 -0
- package/dist/design-system-metrics.d.ts +61 -0
- package/dist/design-system-metrics.js +104 -0
- package/dist/design-system-stewardship.d.ts +22 -0
- package/dist/design-system-stewardship.js +85 -0
- package/dist/design-system-validation.d.ts +37 -0
- package/dist/design-system-validation.js +88 -0
- package/dist/dispatch/index.d.ts +4 -0
- package/dist/dispatch/index.js +4 -0
- package/dist/dispatch/merge-gate.d.ts +46 -0
- package/dist/dispatch/merge-gate.js +90 -0
- package/dist/dispatch/requeue.d.ts +57 -0
- package/dist/dispatch/requeue.js +131 -0
- package/dist/dispatch/worker-pool.d.ts +62 -0
- package/dist/dispatch/worker-pool.js +60 -0
- package/dist/execute.d.ts +40 -0
- package/dist/execute.js +295 -30
- package/dist/fix-ci.js +40 -3
- package/dist/fix-review.d.ts +66 -0
- package/dist/fix-review.js +448 -0
- package/dist/harness/adapters/claude-code.d.ts +29 -0
- package/dist/harness/adapters/claude-code.js +191 -0
- package/dist/harness/adapters/codex.d.ts +25 -0
- package/dist/harness/adapters/codex.js +61 -0
- package/dist/harness/independence.d.ts +51 -0
- package/dist/harness/independence.js +67 -0
- package/dist/harness/index.d.ts +14 -0
- package/dist/harness/index.js +20 -0
- package/dist/harness/registry.d.ts +17 -0
- package/dist/harness/registry.js +31 -0
- package/dist/harness/types.d.ts +123 -0
- package/dist/harness/types.js +8 -0
- package/dist/harness/version-probe.d.ts +14 -0
- package/dist/harness/version-probe.js +123 -0
- package/dist/index.d.ts +39 -5
- package/dist/index.js +48 -3
- package/dist/models/classifier.d.ts +76 -0
- package/dist/models/classifier.js +221 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/registry.d.ts +97 -0
- package/dist/models/registry.js +173 -0
- package/dist/pillar-breakdown.d.ts +63 -0
- package/dist/pillar-breakdown.js +153 -0
- package/dist/pipeline-cycle-detector.d.ts +70 -0
- package/dist/pipeline-cycle-detector.js +111 -0
- package/dist/priority.d.ts +7 -76
- package/dist/priority.js +18 -5
- package/dist/review-meta.d.ts +65 -0
- package/dist/review-meta.js +149 -0
- package/dist/review.d.ts +35 -0
- package/dist/review.js +84 -0
- package/dist/runners/claude-code-sdk.d.ts +31 -0
- package/dist/runners/claude-code-sdk.js +238 -0
- package/dist/runners/claude-code.d.ts +3 -0
- package/dist/runners/claude-code.js +319 -73
- package/dist/runners/codex.js +4 -1
- package/dist/runners/copilot.js +4 -1
- package/dist/runners/cursor.js +4 -1
- package/dist/runners/git-utils.d.ts +81 -0
- package/dist/runners/git-utils.js +201 -0
- package/dist/runners/index.d.ts +5 -1
- package/dist/runners/index.js +4 -0
- package/dist/runners/review-agent.d.ts +67 -0
- package/dist/runners/review-agent.js +350 -0
- package/dist/runners/runner-registry.js +10 -0
- package/dist/runners/sdk-review-runner.d.ts +65 -0
- package/dist/runners/sdk-review-runner.js +185 -0
- package/dist/runners/security-triage.d.ts +20 -4
- package/dist/runners/security-triage.js +42 -14
- package/dist/runners/types.d.ts +25 -0
- package/dist/runtime/attestations.d.ts +274 -0
- package/dist/runtime/attestations.js +460 -0
- package/dist/runtime/git-env.d.ts +53 -0
- package/dist/runtime/git-env.js +60 -0
- package/dist/runtime/index.d.ts +7 -0
- package/dist/runtime/index.js +7 -0
- package/dist/runtime/parallelism-flag.d.ts +10 -0
- package/dist/runtime/parallelism-flag.js +18 -0
- package/dist/runtime/port-allocator.d.ts +21 -0
- package/dist/runtime/port-allocator.js +66 -0
- package/dist/runtime/worktree-pool.d.ts +86 -0
- package/dist/runtime/worktree-pool.js +204 -0
- package/dist/runtime/worktree.d.ts +25 -0
- package/dist/runtime/worktree.js +111 -0
- package/dist/sa-scoring/auto-calibrate.d.ts +69 -0
- package/dist/sa-scoring/auto-calibrate.js +107 -0
- package/dist/sa-scoring/c1-sa2-computable.d.ts +42 -0
- package/dist/sa-scoring/c1-sa2-computable.js +59 -0
- package/dist/sa-scoring/composite.d.ts +107 -0
- package/dist/sa-scoring/composite.js +139 -0
- package/dist/sa-scoring/depparse-client.d.ts +79 -0
- package/dist/sa-scoring/depparse-client.js +187 -0
- package/dist/sa-scoring/did-compiler.d.ts +122 -0
- package/dist/sa-scoring/did-compiler.js +286 -0
- package/dist/sa-scoring/drift-monitor.d.ts +84 -0
- package/dist/sa-scoring/drift-monitor.js +186 -0
- package/dist/sa-scoring/exemplar-bank.d.ts +78 -0
- package/dist/sa-scoring/exemplar-bank.js +154 -0
- package/dist/sa-scoring/feedback-store.d.ts +100 -0
- package/dist/sa-scoring/feedback-store.js +156 -0
- package/dist/sa-scoring/index.d.ts +71 -0
- package/dist/sa-scoring/index.js +158 -0
- package/dist/sa-scoring/layer1-deterministic.d.ts +115 -0
- package/dist/sa-scoring/layer1-deterministic.js +298 -0
- package/dist/sa-scoring/layer2-structural.d.ts +71 -0
- package/dist/sa-scoring/layer2-structural.js +151 -0
- package/dist/sa-scoring/layer3-llm.d.ts +86 -0
- package/dist/sa-scoring/layer3-llm.js +282 -0
- package/dist/sa-scoring/rescore-orchestrator.d.ts +52 -0
- package/dist/sa-scoring/rescore-orchestrator.js +47 -0
- package/dist/scheduling/burn-down.d.ts +27 -0
- package/dist/scheduling/burn-down.js +43 -0
- package/dist/scheduling/calibration.d.ts +42 -0
- package/dist/scheduling/calibration.js +150 -0
- package/dist/scheduling/index.d.ts +8 -0
- package/dist/scheduling/index.js +8 -0
- package/dist/scheduling/ledger.d.ts +59 -0
- package/dist/scheduling/ledger.js +216 -0
- package/dist/scheduling/off-peak.d.ts +27 -0
- package/dist/scheduling/off-peak.js +112 -0
- package/dist/scheduling/schedule-decision.d.ts +39 -0
- package/dist/scheduling/schedule-decision.js +89 -0
- package/dist/scheduling/tier-analysis.d.ts +47 -0
- package/dist/scheduling/tier-analysis.js +81 -0
- package/dist/scheduling/types.d.ts +140 -0
- package/dist/scheduling/types.js +11 -0
- package/dist/shared.d.ts +13 -0
- package/dist/shared.js +32 -0
- package/dist/state/index.d.ts +1 -1
- package/dist/state/schema.d.ts +6 -1
- package/dist/state/schema.js +276 -1
- package/dist/state/store.d.ts +71 -1
- package/dist/state/store.js +464 -7
- package/dist/state/types.d.ts +174 -0
- package/dist/types.d.ts +1 -1
- package/dist/validate-agent-output.js +4 -1
- package/dist/watch.js +6 -0
- package/dist/workflow-patterns/artifact-writer.d.ts +16 -0
- package/dist/workflow-patterns/artifact-writer.js +34 -0
- package/dist/workflow-patterns/classifiers.d.ts +10 -0
- package/dist/workflow-patterns/classifiers.js +72 -0
- package/dist/workflow-patterns/detector.d.ts +27 -0
- package/dist/workflow-patterns/detector.js +186 -0
- package/dist/workflow-patterns/index.d.ts +8 -0
- package/dist/workflow-patterns/index.js +7 -0
- package/dist/workflow-patterns/proposal-generator.d.ts +15 -0
- package/dist/workflow-patterns/proposal-generator.js +183 -0
- package/dist/workflow-patterns/telemetry-ingest.d.ts +27 -0
- package/dist/workflow-patterns/telemetry-ingest.js +103 -0
- package/dist/workflow-patterns/types.d.ts +61 -0
- package/dist/workflow-patterns/types.js +11 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { loadConfig, loadConfigAsync, type AiSdlcConfig } from './config.js';
|
|
1
|
+
export { loadConfig, loadConfigAsync, type AiSdlcConfig, type ConfigLoadWarning, } from './config.js';
|
|
2
2
|
export { validateIssue, validateIssueWithExtensions, parseComplexity } from './validate-issue.js';
|
|
3
3
|
export { executePipeline, type ExecuteOptions, type PipelineResult, type PromotionResult, } from './execute.js';
|
|
4
4
|
export { validateAgentOutput, type ValidationContext, type ValidationResult, type ValidationViolation, } from './validate-agent-output.js';
|
|
5
5
|
export { createLogger, type Logger } from './logger.js';
|
|
6
6
|
export { validateConfigFiles, type FileValidationResult } from './validate-config.js';
|
|
7
7
|
export { executeFixCI, countRetryAttempts, fetchCILogs, type FixCIOptions } from './fix-ci.js';
|
|
8
|
+
export { executeFixReview, countRetryAttempts as countReviewRetryAttempts, fetchReviewFindings, type FixReviewOptions, } from './fix-review.js';
|
|
8
9
|
export { executeTriage, type TriageOptions, type TriageResult } from './triage.js';
|
|
9
10
|
export { getGitHubConfig, resolveRepoRoot, createDefaultAuditLog, resolveAutonomyLevel, resolveConstraints, mergeBlockedPaths, isAutonomousStrategy, recordMetric, validateAndAuditOutput, createPipelineMemory, evaluatePipelineCompliance, authorizeFilesChanged, extractIssueNumber, extractIssueId, issueIdToNumber, formatIssueRef, BRANCH_PATTERN, createAbacPermissionHook, createBlockedPathsHook, createAuditLoggingHook, createPipelineAuthorizationChain, type GitHubEnvConfig, type ValidateAndAuditParams, } from './shared.js';
|
|
10
11
|
export { DEFAULT_MODEL, DEFAULT_GITHUB_ORG, DEFAULT_GITHUB_REPO, DEFAULT_GITHUB_REPOSITORY, DEFAULT_CONFIG_DIR_NAME, DEFAULT_SANDBOX_MEMORY_MB, DEFAULT_SANDBOX_CPU_PERCENT, DEFAULT_SANDBOX_NETWORK_POLICY, DEFAULT_SANDBOX_TIMEOUT_MS, defaultSandboxConstraints, DEFAULT_RUNNER_TIMEOUT_MS, DEFAULT_ALLOWED_TOOLS, DEFAULT_MAX_FILES_PER_CHANGE, DEFAULT_REQUIRE_TESTS, DEFAULT_BLOCKED_PATHS, DEFAULT_MAX_FIX_ATTEMPTS, DEFAULT_MAX_LOG_LINES, DEFAULT_GH_CLI_TIMEOUT_MS, DEFAULT_JIT_TTL_MS, DEFAULT_JIT_SCOPE, DEFAULT_BRANCH_TEMPLATE, DEFAULT_BRANCH_PATTERN, DEFAULT_PR_TITLE_TEMPLATE, DEFAULT_PR_FOOTER, DEFAULT_COMPLEXITY_THRESHOLDS, DEFAULT_MAX_LINES_PER_PR, DEFAULT_ANALYSIS_INCLUDE, DEFAULT_ANALYSIS_EXCLUDE, DEFAULT_GIT_HISTORY_DAYS, DEFAULT_HOTSPOT_THRESHOLD, NOTIFICATION_TITLES, DEFAULT_MODEL_COSTS, DEFAULT_COST_BUDGET_USD, DEFAULT_DASHBOARD_REFRESH_MS, PROGRESSIVE_GATE_PROFILES, DEFAULT_LINT_COMMAND, DEFAULT_FORMAT_COMMAND, DEFAULT_COMMIT_MESSAGE_TEMPLATE, DEFAULT_COMMIT_CO_AUTHOR, DEFAULT_OPENAI_API_URL, DEFAULT_OPENAI_MODEL, DEFAULT_ANTHROPIC_API_URL, DEFAULT_ANTHROPIC_MODEL, DEFAULT_GENERIC_LLM_MODEL, DEFAULT_LLM_TIMEOUT_MS, DEFAULT_LLM_MAX_TOKENS, DEFAULT_LLM_SYSTEM_PROMPT, DEFAULT_DOCKER_IMAGE, DEFAULT_WORKFLOW_FILE, DEFAULT_LABEL_TO_SKILL_MAP, DEFAULT_ANALYSIS_CACHE_TTL_MS, } from './defaults.js';
|
|
@@ -18,6 +19,28 @@ export { createPipelineDiscovery, findMatchingAgent, resolveAgentForIssue, match
|
|
|
18
19
|
export { createStructuredConsoleLogger, createStructuredBufferLogger, } from './structured-logger.js';
|
|
19
20
|
export { startWatch, type WatchOptions, type WatchHandle } from './watch.js';
|
|
20
21
|
export { computePriority, rankWorkItems, type PriorityScore, type PriorityInput, type PriorityConfig, } from './priority.js';
|
|
22
|
+
export { checkAction, enforceAction, DEFAULT_BLOCKED_ACTIONS, type ActionEnforcementResult, } from './action-enforcement.js';
|
|
23
|
+
export { scoreIssueForAdmission, mapIssueToPriorityInput, type AdmissionInput, type AdmissionThresholds, type IssueAdmissionResult, type AuthorAssociation, type DesignSystemContext, type AutonomyContext, type CodeAreaQuality, type DesignAuthoritySignal, type DesignAuthoritySignalType, type DesignQualityMetrics, } from './admission-score.js';
|
|
24
|
+
export { enrichAdmissionInput, computeDesignSystemReadiness, computeReadinessFromDesignSystemContext, computeDefectRiskFactor, computeAutonomyFactor, computeDesignAuthorityWeight, complexityToAutonomyLevel, type EnrichmentContext, type LifecyclePhase, } from './admission-enrichment.js';
|
|
25
|
+
export { computeAdmissionComposite, type AdmissionComposite } from './admission-composite.js';
|
|
26
|
+
export { parseBacklogTask, loadBacklogTaskFromRoot, mapBacklogTaskToAdmissionInput, loadSoulTracks, loadMaintainers, type BacklogTaskSnapshot, type BacklogAcceptanceCriterion, type BacklogMappingOptions, type BacklogAdmissionMapping, } from './backlog-adapter.js';
|
|
27
|
+
export { computePillarBreakdown, detectTensions, pillarSignalScore, type PillarBreakdown, type PillarContribution, type PillarName, type SharedDimensions, type TensionFlag, type TensionFlagType, type HcChannelBreakdown, } from './pillar-breakdown.js';
|
|
28
|
+
export { compileDid, validatePhase2bReadiness, hashDidSpec, canonicalJson, tokenize, serializeForStore, deserializeFromStore, type CompiledDid, type CompiledScopeLists, type CompiledScopeEntry, type CompiledConstraintRule, type CompiledAntiPattern, type CompiledAntiPatternLists, type CompiledMeasurableSignal, type Bm25Corpus, type Bm25Document, type PrincipleCorpora, type ReadinessResult, } from './sa-scoring/did-compiler.js';
|
|
29
|
+
export { HttpDepparseClient, FakeDepparseClient, DepparseError, type DepparseClient, type DepparseMatch, type DepparseMatchRequest, type DepparseMatchResponse, type DepparseHealth, type DepparseErrorKind, } from './sa-scoring/depparse-client.js';
|
|
30
|
+
export { runLayer1, checkScopeGate, detectConstraintViolations, detectAntiPatterns, checkMeasurableSignals, renderPreVerifiedSummary, type DeterministicScoringResult, type ScopeGateResult, type ScopeGateMatch, type ConstraintViolation, type ConstraintViolationResult, type AntiPatternHit, type AntiPatternResult, type MeasurableSignalCheck, type MeasurableSignalResult, type Layer1Input, } from './sa-scoring/layer1-deterministic.js';
|
|
31
|
+
export { computeDomainRelevance, computePrincipleCoverage, type DomainRelevanceResult, type PrincipleCoverageVector, type PrincipleCoverageEntry, type ContributingTerm, } from './sa-scoring/layer2-structural.js';
|
|
32
|
+
export { runLayer3, buildSa1Prompt, buildSa2Prompt, extractJson, RecordedLLMClient, LayerLlmError, CONFIDENCE_THRESHOLD, type LLMClient, type LLMScoringResult, type SubtleConflict, type SubtleDesignConflict, type Layer3Input, type PromptContext, type LayerLlmErrorKind, } from './sa-scoring/layer3-llm.js';
|
|
33
|
+
export { computeSoulAlignment, computeSa1, computeSa2, getPhaseWeights, W_STRUCTURAL_FLOOR, type SoulAlignmentResult, type SoulAlignmentInput, type Sa1Inputs, type Sa2Inputs, type Sa1Result, type Sa2Result, type SaPhase, type PhaseWeights, } from './sa-scoring/composite.js';
|
|
34
|
+
export { computeSa2Computable, type Sa2ComputableResult } from './sa-scoring/c1-sa2-computable.js';
|
|
35
|
+
export { SAFeedbackStore, SA_FEEDBACK_LABELS, classifyLabel, recordOverrideFeedback, type RecordFeedbackInput, type PrecisionWindow, type PrecisionResult, type CategoryFalsePositive, type OverrideFeedbackInput, } from './sa-scoring/feedback-store.js';
|
|
36
|
+
export { computeCalibrationCoefficient, buildCategoryCoefficients, type CategoryFeedback, type BuildCategoryCoefficientsInput, } from './calibration.js';
|
|
37
|
+
export { autoCalibratePhaseWeights, computePhase3Weights, decideCalibrationDirection, renderCalibrationDiff, WEIGHT_FLOOR, WEIGHT_CEILING, DEFAULT_SHIFT_SIZE, DEFAULT_WINDOW_DAYS, PRECISION_DELTA_THRESHOLD, type PrecisionPair, type CalibrationDecision, type ComputePhase3WeightsInput, type AutoCalibrateDeps, type AutoCalibrateResult, type DimensionDiff, } from './sa-scoring/auto-calibrate.js';
|
|
38
|
+
export { detectSoulDrift, computeWindowStats, computeTrend, describeDriftSource, DEFAULT_MEAN_THRESHOLD, DEFAULT_STDDEV_THRESHOLD, DEFAULT_CONSECUTIVE_WINDOWS, DEFAULT_RECOVERY_MS, type SoulDriftDetectedEvent, type DriftTrend, type WindowStats, type DriftDetectorDeps, } from './sa-scoring/drift-monitor.js';
|
|
39
|
+
export { handleCoreIdentityChanged, type CoreIdentityChangedEvent, type BacklogReshuffledEvent, type SoulGraphStaleFlag, type RescoreDeps, type HandleResult, } from './sa-scoring/rescore-orchestrator.js';
|
|
40
|
+
export { scoreSoulAlignment, resolveSoulAlignmentOverride, type ScoreSoulAlignmentInput, type ScoreSoulAlignmentDeps, type SoulAlignmentScoringResult, } from './sa-scoring/index.js';
|
|
41
|
+
export type { SaDimension, FeedbackSignal } from './state/types.js';
|
|
42
|
+
export { executeReview, type ReviewContext, type ReviewOptions } from './review.js';
|
|
43
|
+
export { metaReview, ReviewFeedbackStore, type MetaReviewDecision, type MetaReviewResult, type ReviewFeedback, } from './review-meta.js';
|
|
21
44
|
export { createPipelineOrchestration, executePipelineOrchestration, validatePipelineHandoffs, sequential, parallel, hybrid, hierarchical, swarm, validateHandoff, simpleSchemaValidate, } from './orchestration.js';
|
|
22
45
|
export { createPipelineRegoEvaluator, createPipelineCELEvaluator, createPipelineABACHook, createPipelineExpressionEvaluator, createPipelineLLMEvaluator, evaluatePipelineGate, scorePipelineComplexity, evaluatePipelineComplexityRouting, } from './policy-evaluators.js';
|
|
23
46
|
export { createPipelineAdapterRegistry, createPipelineWebhookBridge, resolveAdapterFromGit, resolveInfrastructure, resolveIssueTrackerFromConfig, scanPipelineAdapters, } from './adapters.js';
|
|
@@ -25,12 +48,14 @@ export { createPipelineReconciler, createGateReconciler, createAutonomyReconcile
|
|
|
25
48
|
export { createFileAuditLog, verifyAuditIntegrity, loadAuditEntries, rotateAuditLog, computeAuditHash, } from './audit-extended.js';
|
|
26
49
|
export { checkFrameworkCompliance, getControlCatalog, getFrameworkMappings, listSupportedFrameworks, } from './compliance-extended.js';
|
|
27
50
|
export { createSilentLogger, withPipelineSpanSync, getPipelineTracer, validateResourceSchema, } from './telemetry-extended.js';
|
|
28
|
-
export { ClaudeCodeRunner, ClaudeCodeRunner as GitHubActionsRunner, GenericLLMRunner, CopilotRunner, CursorRunner, CodexRunner, RunnerRegistry, createRunnerRegistry, SecurityTriageRunner, type AgentRunner, type AgentContext, type AgentResult, type GenericLLMConfig, type RegisteredRunner, type SecurityTriageConfig, type TriageVerdict, } from './runners/index.js';
|
|
51
|
+
export { ClaudeCodeRunner, ClaudeCodeRunner as GitHubActionsRunner, GenericLLMRunner, CopilotRunner, CursorRunner, CodexRunner, RunnerRegistry, createRunnerRegistry, SecurityTriageRunner, ReviewAgentRunner, REVIEW_PROMPTS, type AgentRunner, type AgentContext, type AgentResult, type AgentProgressEvent, type GenericLLMConfig, type RegisteredRunner, type SecurityTriageConfig, type TriageVerdict, type ReviewAgentConfig, type ReviewType, type ReviewFinding, type ReviewVerdict, } from './runners/index.js';
|
|
29
52
|
export type { TokenUsage } from './runners/index.js';
|
|
30
53
|
export { SlackMessenger, TeamsMessenger, NotificationRouter } from './notifications/index.js';
|
|
31
54
|
export type { SlackConfig, TeamsConfig, PipelineEvent, PipelineEventType, NotificationRoute, NotificationTemplate, } from './notifications/index.js';
|
|
32
55
|
export { StateStore } from './state/index.js';
|
|
33
|
-
export type { HotspotRecord, RoutingDecision, CostLedgerEntry, GateThresholdOverride, AutonomyEvent, AutonomyEventType, HandoffEvent, DeploymentRecord, DeploymentRecordState, RolloutStepRecord, AuditEntryRecord, PriorityCalibrationSample, } from './state/index.js';
|
|
56
|
+
export type { HotspotRecord, RoutingDecision, CostLedgerEntry, GateThresholdOverride, AutonomyEvent, AutonomyEventType, HandoffEvent, DeploymentRecord, DeploymentRecordState, RolloutStepRecord, AuditEntryRecord, PriorityCalibrationSample, ToolSequenceEvent, WorkflowPattern, PatternProposal, } from './state/index.js';
|
|
57
|
+
export { readToolSequenceJSONL, readSessionMetaFiles, sessionMetaToEvents, categorizeAction, DEFAULT_DETECTION_OPTIONS, } from './workflow-patterns/index.js';
|
|
58
|
+
export type { CanonicalStep, NGram, DetectedPattern, DetectionOptions, RawToolSequenceEntry, SessionMeta, } from './workflow-patterns/index.js';
|
|
34
59
|
export { createKubernetesTarget, createVercelTarget, createFlyioTarget, createHttpMetricsCollector, createStubMetricsCollector, RolloutController, } from './deploy/index.js';
|
|
35
60
|
export type { DeploymentTargetConfig, HealthCheckConfig, DeploymentState, DeploymentResult, DeploymentTarget, ExecFn, FetchFn, KubernetesConfig, VercelConfig, FlyioConfig, CanaryStep, CanaryConfig, BlueGreenConfig, RollingConfig, RolloutStrategy, RolloutPhase, RolloutStatus, RolloutMetrics, MetricsSource, RolloutControllerConfig, HttpMetricsConfig, } from './deploy/index.js';
|
|
36
61
|
export { getComplexityBand, getGateProfile, adjustEnforcement, adjustGateForComplexity, adjustGatesForComplexity, computeGateAdjustments, } from './progressive-gates.js';
|
|
@@ -49,8 +74,8 @@ export { createOTelBridge, isOTelAvailable } from './otel-exporter.js';
|
|
|
49
74
|
export type { OTelBridge, OTelBridgeOptions, OTelSpanHandle } from './otel-exporter.js';
|
|
50
75
|
export { renderDashboardFrame } from './cli/dashboard-renderer.js';
|
|
51
76
|
export type { DashboardData } from './cli/dashboard-renderer.js';
|
|
52
|
-
export { walkFiles, detectModules, parseImports, buildModuleGraph, detectConventions, detectPatterns, analyzeHotspots, computeComplexityScore, analyzeCodebase, buildCodebaseContext, formatContextForPrompt, } from './analysis/index.js';
|
|
53
|
-
export type { CodebaseProfile, CodebaseContext, Hotspot, ArchitecturalPattern, DetectedConvention, ModuleInfo, ModuleGraph, DependencyEdge, AnalyzerOptions, FileInfo, ImportStatement, } from './analysis/index.js';
|
|
77
|
+
export { walkFiles, detectModules, parseImports, buildModuleGraph, detectConventions, detectReactProject, loadProjectAliases, parseTsConfigAliases, parseViteOrWebpackAliases, enumerateTestLocations, detectPatterns, analyzeHotspots, computeComplexityScore, analyzeCodebase, buildCodebaseContext, formatContextForPrompt, analyzeDiff, extractChangedFiles, } from './analysis/index.js';
|
|
78
|
+
export type { CodebaseProfile, CodebaseContext, Hotspot, ArchitecturalPattern, DetectedConvention, ModuleInfo, ModuleGraph, DependencyEdge, AnalyzerOptions, FileInfo, ImportStatement, DiffFinding, DiffAnalysisResult, DetectConventionsOptions, PathAliasMap, TestLocationSummary, } from './analysis/index.js';
|
|
54
79
|
export { createCheckRun, updateCheckRun, reportGateCheckRuns } from './check-runs.js';
|
|
55
80
|
export { detectMonorepoLayout, detectWorkspace, buildServiceMap, detectCycles, topologicalOrder, getTransitiveDependents, analyzeImpact, formatImpactSummary, getAffectedBuildOrder, } from './multi-repo/index.js';
|
|
56
81
|
export type { ServiceNode, ServiceMap, ServiceEdge, MonorepoLayout, WorkspaceConfig, WorkspacePackage, ImpactResult, } from './multi-repo/index.js';
|
|
@@ -69,5 +94,14 @@ export type { ArchiveManifest, ArchivalOptions } from './audit-archival.js';
|
|
|
69
94
|
export { Orchestrator, type OrchestratorConfig, type WebhookConfig } from './orchestrator.js';
|
|
70
95
|
export type { OrchestratorPlugin, PluginContext, BeforeRunEvent, AfterRunEvent, RunErrorEvent, } from './plugin.js';
|
|
71
96
|
export { CostGovernancePlugin } from './cost-governance.js';
|
|
97
|
+
export { WorktreePoolManager, WorktreePoolError, WorktreeOwnershipError, deterministicPort, allocatePort, allocateContiguousPorts, isPortFree, PortAllocationError, slugifyBranch, worktreePath, verifyOwnership, assertOwnership, isExistingWorktree, readParallelismMode, isParallelismEnabled, PARALLELISM_FLAG, DEFAULT_BASE_PORT, DEFAULT_POOL_ROOT, DEFAULT_STALE_THRESHOLD_DAYS, type WorktreePoolSpec, type WorktreePoolManagerDeps, type WorktreeHandle, type AllocateOptions, type AllocatePortOptions, type AllocateContiguousOptions, type OwnershipResult, type ParallelismMode, } from './runtime/index.js';
|
|
98
|
+
export { HarnessRegistry, UnknownHarnessError, ClaudeCodeAdapter, CodexAdapter, createDefaultHarnessRegistry, probeVersion, matchesRange, enforceIndependence, validateIndependenceGraph, CyclicIndependenceConstraintError, type HarnessAdapter, type HarnessAvailability, type HarnessCapabilities, type HarnessEvent, type HarnessInput, type HarnessName, type HarnessRequires, type HarnessResult, type HarnessResultStatus, type ClaudeCodeAdapterDeps, type CodexAdapterDeps, type IndependenceResult, type UpstreamRun, type ToolDefinition, } from './harness/index.js';
|
|
99
|
+
export { SubscriptionLedger, validateTenantShares, evaluateSchedule, CalibrationStore, COLD_START_DEFAULT, buildBurnDownReport, analyzeTier, PLAN_COSTS_USD, isOffPeakAt, nextOffPeakStart, ageInDays, freshnessLevel, DEFAULT_TENANT, COLD_START_DEFAULT_INPUT, COLD_START_DEFAULT_OUTPUT, ESTIMATE_VARIANCE_THRESHOLD, ROLLING_WINDOW_SIZE, type SubscriptionPlan, type Schedule, type TokenEstimate, type LedgerKey, type WindowState, type AdmissionDecision, type BurnDownReport, type LedgerEvent, type BillingMode, type QuotaSource, type OffPeakSchedule, type BurnDownInput, type CalibrationStoreDeps, type LedgerDeps, type ScheduleDecision, type ScheduleEvaluationContext, type Confidence, type ContentionEvent, type TierAnalysisInput, type TierAnalysisResult, type FreshnessLevel, } from './scheduling/index.js';
|
|
100
|
+
export { DatabaseAdapterRegistry, UnknownDatabaseAdapterError, SqliteCopyAdapter, NeonAdapter, PgSnapshotRestoreAdapter, ExternalAdapter, createDefaultDatabaseAdapterRegistry, buildInjectionOverrides, parsePostgresUrl, maskConnectionString, enforceTopologyGuard, buildMigrationDivergedEvent, DatabaseBranchAdapterError, BranchTopologyForbiddenError, type DatabaseBranchAdapter, type DatabaseBranchCapabilities, type DatabaseBranchHandle, type DatabaseAdapterName, type ResolvedDatabaseBranchPool, type DatabaseAccess, type SqliteCopyAdapterDeps, type NeonAdapterDeps, type PgSnapshotRestoreAdapterDeps, type ExternalAdapterDeps, type InjectedEnvOverrides, type KnownInFlightBranches, type MigrationDivergedEvent, } from './database/index.js';
|
|
101
|
+
export { StateWriter, appendEvent, readEvents, atomicWriteJson, listActiveStates, HEARTBEAT_INTERVAL_MS, HEARTBEAT_STALE_MS, type RuntimeState, type ArtifactEvent, type StageStatus, } from './artifacts/index.js';
|
|
102
|
+
export { runWorkerPool, withMergeGate, forceReleaseMergeGate, isBranchUpToDate, MergeGateLockTimeoutError, decideRequeue, appendTriageHistory, type WorkItem, type WorkerPoolDeps, type WorkerPoolEvent, type WorkerPoolResult, type FailureEvent, type RequeueTrigger, type RequeueDecision, type RequeueDecisionInput, type TriageHistoryEntry, type FailureClassification, type MergeGateDeps, } from './dispatch/index.js';
|
|
103
|
+
export { ModelRegistry, ModelRemovedError, UnknownAliasError, DEFAULT_REGISTRY, decideFromRawOutput, decideFromInvocationFailure, validateClassifierOutput, defaultRulesetDecision, appendCalibrationEntry, ALL_REVIEWERS, type ModelEntry, type ResolutionContext, type ResolutionResult, type ResolutionEvent, type ReviewerName, type ClassifierOutput, type ClassifierDecision, type FellOpenReason, type CalibrationLogEntry, type DiffSummary, } from './models/index.js';
|
|
104
|
+
export { PipelineCycleDetector, createStageMarker, parseStageInvocations, DEFAULT_CYCLE_LIMITS, type PipelineStage, type CycleConfig, type CycleDetectionResult, } from './pipeline-cycle-detector.js';
|
|
105
|
+
export { checkAndHandleCycle, createCycleDetectorFromConfig, type CycleHandlerOptions, type CycleCheckResult, } from './cycle-utils.js';
|
|
72
106
|
export type { ApiVersion, Metadata, Condition, SecretRef, MetricCondition, Duration, Resource, TriggerFilter, Trigger, Provider, RoutingStrategy, ComplexityThreshold, Routing, Stage, PipelineSpec, PipelinePhase, PipelineStatus, Pipeline, AgentConstraints, HandoffContractRef, Handoff, SkillExample, Skill, AgentCard, AgentRoleSpec, AgentRoleStatus, AgentRole, GateScope, MetricRule, ToolRule, ReviewerRule, DocumentationRule, ProvenanceRule, ExpressionRule, GateRule, EnforcementLevel, Override, RetryPolicy, Evaluation, Gate, QualityGateSpec, QualityGateStatus, QualityGate, Permissions, ApprovalRequirement, Guardrails, MonitoringLevel, AutonomyLevel, PromotionCriteria, DemotionTrigger, AgentAutonomyStatus, AutonomyPolicySpec, AutonomyPolicyStatus, AutonomyPolicy, AdapterInterface, HealthCheck, AdapterBindingSpec, AdapterBindingStatus, AdapterBinding, AnyResource, ResourceKind, ValidationError, GateVerdict, DemotionResult, ComplexityFactor, AuthorizationContext, AuthorizationResult, AuthIdentity, AuthenticationResult, Authenticator, MutatingGateContext, ExpressionEvaluator, ExpressionVerdict, LLMEvaluationDimension, LLMEvaluationResult, LLMGateVerdict, AgentExecutionState, HandoffValidationError, SchemaResolver, SchemaValidationError, MemoryTier, MemoryEntry, WorkingMemory, ShortTermMemory, LongTermMemory, SharedMemory, EpisodicMemory, } from './types.js';
|
|
73
107
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// ── Core orchestration ───────────────────────────────────────────────
|
|
2
|
-
export { loadConfig, loadConfigAsync } from './config.js';
|
|
2
|
+
export { loadConfig, loadConfigAsync, } from './config.js';
|
|
3
3
|
export { validateIssue, validateIssueWithExtensions, parseComplexity } from './validate-issue.js';
|
|
4
4
|
export { executePipeline, } from './execute.js';
|
|
5
5
|
export { validateAgentOutput, } from './validate-agent-output.js';
|
|
6
6
|
export { createLogger } from './logger.js';
|
|
7
7
|
export { validateConfigFiles } from './validate-config.js';
|
|
8
8
|
export { executeFixCI, countRetryAttempts, fetchCILogs } from './fix-ci.js';
|
|
9
|
+
export { executeFixReview, countRetryAttempts as countReviewRetryAttempts, fetchReviewFindings, } from './fix-review.js';
|
|
9
10
|
export { executeTriage } from './triage.js';
|
|
10
11
|
// Shared utilities
|
|
11
12
|
export { getGitHubConfig, resolveRepoRoot, createDefaultAuditLog, resolveAutonomyLevel, resolveConstraints, mergeBlockedPaths, isAutonomousStrategy, recordMetric, validateAndAuditOutput, createPipelineMemory, evaluatePipelineCompliance, authorizeFilesChanged, extractIssueNumber, extractIssueId, issueIdToNumber, formatIssueRef, BRANCH_PATTERN, createAbacPermissionHook, createBlockedPathsHook, createAuditLoggingHook, createPipelineAuthorizationChain, } from './shared.js';
|
|
@@ -29,6 +30,31 @@ export { createStructuredConsoleLogger, createStructuredBufferLogger, } from './
|
|
|
29
30
|
export { startWatch } from './watch.js';
|
|
30
31
|
// Priority scoring (PPA)
|
|
31
32
|
export { computePriority, rankWorkItems, } from './priority.js';
|
|
33
|
+
// Action enforcement
|
|
34
|
+
export { checkAction, enforceAction, DEFAULT_BLOCKED_ACTIONS, } from './action-enforcement.js';
|
|
35
|
+
// Issue admission scoring
|
|
36
|
+
export { scoreIssueForAdmission, mapIssueToPriorityInput, } from './admission-score.js';
|
|
37
|
+
export { enrichAdmissionInput, computeDesignSystemReadiness, computeReadinessFromDesignSystemContext, computeDefectRiskFactor, computeAutonomyFactor, computeDesignAuthorityWeight, complexityToAutonomyLevel, } from './admission-enrichment.js';
|
|
38
|
+
export { computeAdmissionComposite } from './admission-composite.js';
|
|
39
|
+
export { parseBacklogTask, loadBacklogTaskFromRoot, mapBacklogTaskToAdmissionInput, loadSoulTracks, loadMaintainers, } from './backlog-adapter.js';
|
|
40
|
+
export { computePillarBreakdown, detectTensions, pillarSignalScore, } from './pillar-breakdown.js';
|
|
41
|
+
// RFC-0008 Addendum B — SA scoring (Layer 1/2/3 + composite)
|
|
42
|
+
export { compileDid, validatePhase2bReadiness, hashDidSpec, canonicalJson, tokenize, serializeForStore, deserializeFromStore, } from './sa-scoring/did-compiler.js';
|
|
43
|
+
export { HttpDepparseClient, FakeDepparseClient, DepparseError, } from './sa-scoring/depparse-client.js';
|
|
44
|
+
export { runLayer1, checkScopeGate, detectConstraintViolations, detectAntiPatterns, checkMeasurableSignals, renderPreVerifiedSummary, } from './sa-scoring/layer1-deterministic.js';
|
|
45
|
+
export { computeDomainRelevance, computePrincipleCoverage, } from './sa-scoring/layer2-structural.js';
|
|
46
|
+
export { runLayer3, buildSa1Prompt, buildSa2Prompt, extractJson, RecordedLLMClient, LayerLlmError, CONFIDENCE_THRESHOLD, } from './sa-scoring/layer3-llm.js';
|
|
47
|
+
export { computeSoulAlignment, computeSa1, computeSa2, getPhaseWeights, W_STRUCTURAL_FLOOR, } from './sa-scoring/composite.js';
|
|
48
|
+
export { computeSa2Computable } from './sa-scoring/c1-sa2-computable.js';
|
|
49
|
+
export { SAFeedbackStore, SA_FEEDBACK_LABELS, classifyLabel, recordOverrideFeedback, } from './sa-scoring/feedback-store.js';
|
|
50
|
+
export { computeCalibrationCoefficient, buildCategoryCoefficients, } from './calibration.js';
|
|
51
|
+
export { autoCalibratePhaseWeights, computePhase3Weights, decideCalibrationDirection, renderCalibrationDiff, WEIGHT_FLOOR, WEIGHT_CEILING, DEFAULT_SHIFT_SIZE, DEFAULT_WINDOW_DAYS, PRECISION_DELTA_THRESHOLD, } from './sa-scoring/auto-calibrate.js';
|
|
52
|
+
export { detectSoulDrift, computeWindowStats, computeTrend, describeDriftSource, DEFAULT_MEAN_THRESHOLD, DEFAULT_STDDEV_THRESHOLD, DEFAULT_CONSECUTIVE_WINDOWS, DEFAULT_RECOVERY_MS, } from './sa-scoring/drift-monitor.js';
|
|
53
|
+
export { handleCoreIdentityChanged, } from './sa-scoring/rescore-orchestrator.js';
|
|
54
|
+
export { scoreSoulAlignment, resolveSoulAlignmentOverride, } from './sa-scoring/index.js';
|
|
55
|
+
// PR review orchestration
|
|
56
|
+
export { executeReview } from './review.js';
|
|
57
|
+
export { metaReview, ReviewFeedbackStore, } from './review-meta.js';
|
|
32
58
|
// Agent orchestration
|
|
33
59
|
export { createPipelineOrchestration, executePipelineOrchestration, validatePipelineHandoffs, sequential, parallel, hybrid, hierarchical, swarm, validateHandoff, simpleSchemaValidate, } from './orchestration.js';
|
|
34
60
|
// Policy evaluators
|
|
@@ -44,11 +70,13 @@ export { checkFrameworkCompliance, getControlCatalog, getFrameworkMappings, list
|
|
|
44
70
|
// Extended telemetry
|
|
45
71
|
export { createSilentLogger, withPipelineSpanSync, getPipelineTracer, validateResourceSchema, } from './telemetry-extended.js';
|
|
46
72
|
// Runners
|
|
47
|
-
export { ClaudeCodeRunner, ClaudeCodeRunner as GitHubActionsRunner, GenericLLMRunner, CopilotRunner, CursorRunner, CodexRunner, RunnerRegistry, createRunnerRegistry, SecurityTriageRunner, } from './runners/index.js';
|
|
73
|
+
export { ClaudeCodeRunner, ClaudeCodeRunner as GitHubActionsRunner, GenericLLMRunner, CopilotRunner, CursorRunner, CodexRunner, RunnerRegistry, createRunnerRegistry, SecurityTriageRunner, ReviewAgentRunner, REVIEW_PROMPTS, } from './runners/index.js';
|
|
48
74
|
// Notifications
|
|
49
75
|
export { SlackMessenger, TeamsMessenger, NotificationRouter } from './notifications/index.js';
|
|
50
76
|
// State store
|
|
51
77
|
export { StateStore } from './state/index.js';
|
|
78
|
+
// Workflow pattern detection
|
|
79
|
+
export { readToolSequenceJSONL, readSessionMetaFiles, sessionMetaToEvents, categorizeAction, DEFAULT_DETECTION_OPTIONS, } from './workflow-patterns/index.js';
|
|
52
80
|
// Deployment targets
|
|
53
81
|
export { createKubernetesTarget, createVercelTarget, createFlyioTarget, createHttpMetricsCollector, createStubMetricsCollector, RolloutController, } from './deploy/index.js';
|
|
54
82
|
// Progressive gates
|
|
@@ -68,7 +96,7 @@ export { createOTelBridge, isOTelAvailable } from './otel-exporter.js';
|
|
|
68
96
|
// Dashboard renderer
|
|
69
97
|
export { renderDashboardFrame } from './cli/dashboard-renderer.js';
|
|
70
98
|
// Codebase analysis
|
|
71
|
-
export { walkFiles, detectModules, parseImports, buildModuleGraph, detectConventions, detectPatterns, analyzeHotspots, computeComplexityScore, analyzeCodebase, buildCodebaseContext, formatContextForPrompt, } from './analysis/index.js';
|
|
99
|
+
export { walkFiles, detectModules, parseImports, buildModuleGraph, detectConventions, detectReactProject, loadProjectAliases, parseTsConfigAliases, parseViteOrWebpackAliases, enumerateTestLocations, detectPatterns, analyzeHotspots, computeComplexityScore, analyzeCodebase, buildCodebaseContext, formatContextForPrompt, analyzeDiff, extractChangedFiles, } from './analysis/index.js';
|
|
72
100
|
// Check runs
|
|
73
101
|
export { createCheckRun, updateCheckRun, reportGateCheckRuns } from './check-runs.js';
|
|
74
102
|
// Multi-repo orchestration
|
|
@@ -88,4 +116,21 @@ export { archiveEntries, loadArchivedEntries, verifyArchiveContinuity } from './
|
|
|
88
116
|
export { Orchestrator } from './orchestrator.js';
|
|
89
117
|
// Cost governance plugin
|
|
90
118
|
export { CostGovernancePlugin } from './cost-governance.js';
|
|
119
|
+
// RFC-0010 runtime primitives
|
|
120
|
+
export { WorktreePoolManager, WorktreePoolError, WorktreeOwnershipError, deterministicPort, allocatePort, allocateContiguousPorts, isPortFree, PortAllocationError, slugifyBranch, worktreePath, verifyOwnership, assertOwnership, isExistingWorktree, readParallelismMode, isParallelismEnabled, PARALLELISM_FLAG, DEFAULT_BASE_PORT, DEFAULT_POOL_ROOT, DEFAULT_STALE_THRESHOLD_DAYS, } from './runtime/index.js';
|
|
121
|
+
// RFC-0010 harness adapters
|
|
122
|
+
export { HarnessRegistry, UnknownHarnessError, ClaudeCodeAdapter, CodexAdapter, createDefaultHarnessRegistry, probeVersion, matchesRange, enforceIndependence, validateIndependenceGraph, CyclicIndependenceConstraintError, } from './harness/index.js';
|
|
123
|
+
// RFC-0010 subscription scheduling
|
|
124
|
+
export { SubscriptionLedger, validateTenantShares, evaluateSchedule, CalibrationStore, COLD_START_DEFAULT, buildBurnDownReport, analyzeTier, PLAN_COSTS_USD, isOffPeakAt, nextOffPeakStart, ageInDays, freshnessLevel, DEFAULT_TENANT, COLD_START_DEFAULT_INPUT, COLD_START_DEFAULT_OUTPUT, ESTIMATE_VARIANCE_THRESHOLD, ROLLING_WINDOW_SIZE, } from './scheduling/index.js';
|
|
125
|
+
// RFC-0010 database branching (DatabaseBranchAdapter framework + 4 adapters)
|
|
126
|
+
export { DatabaseAdapterRegistry, UnknownDatabaseAdapterError, SqliteCopyAdapter, NeonAdapter, PgSnapshotRestoreAdapter, ExternalAdapter, createDefaultDatabaseAdapterRegistry, buildInjectionOverrides, parsePostgresUrl, maskConnectionString, enforceTopologyGuard, buildMigrationDivergedEvent, DatabaseBranchAdapterError, BranchTopologyForbiddenError, } from './database/index.js';
|
|
127
|
+
// RFC-0010 artifacts (heartbeat + event stream + atomic JSON + state listing)
|
|
128
|
+
export { StateWriter, appendEvent, readEvents, atomicWriteJson, listActiveStates, HEARTBEAT_INTERVAL_MS, HEARTBEAT_STALE_MS, } from './artifacts/index.js';
|
|
129
|
+
// RFC-0010 dispatch (worker pool + merge gate + requeue)
|
|
130
|
+
export { runWorkerPool, withMergeGate, forceReleaseMergeGate, isBranchUpToDate, MergeGateLockTimeoutError, decideRequeue, appendTriageHistory, } from './dispatch/index.js';
|
|
131
|
+
// RFC-0010 model registry + classifier
|
|
132
|
+
export { ModelRegistry, ModelRemovedError, UnknownAliasError, DEFAULT_REGISTRY, decideFromRawOutput, decideFromInvocationFailure, validateClassifierOutput, defaultRulesetDecision, appendCalibrationEntry, ALL_REVIEWERS, } from './models/index.js';
|
|
133
|
+
// Pipeline cycle detection
|
|
134
|
+
export { PipelineCycleDetector, createStageMarker, parseStageInvocations, DEFAULT_CYCLE_LIMITS, } from './pipeline-cycle-detector.js';
|
|
135
|
+
export { checkAndHandleCycle, createCycleDetectorFromConfig, } from './cycle-utils.js';
|
|
91
136
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conditional review classifier (RFC-0010 §12). The classifier reads a PR diff and emits a
|
|
3
|
+
* structured decision listing which downstream review agents to invoke. This module provides:
|
|
4
|
+
*
|
|
5
|
+
* - The output-schema validator (Q4 resolution: confident: bool + confidence: float with
|
|
6
|
+
* consistency rule confident: true REQUIRES confidence ≥ 0.7).
|
|
7
|
+
* - The default fall-open ruleset (RFC §12.3 baseline + the four fall-open triggers).
|
|
8
|
+
* - The calibration-log writer for $ARTIFACTS_DIR/_classifier/calibration.jsonl.
|
|
9
|
+
*/
|
|
10
|
+
export type ReviewerName = 'testing' | 'critic' | 'security';
|
|
11
|
+
export declare const ALL_REVIEWERS: readonly ReviewerName[];
|
|
12
|
+
export interface ClassifierOutput {
|
|
13
|
+
reviewers: ReviewerName[];
|
|
14
|
+
rationale: Record<string, string>;
|
|
15
|
+
confident: boolean;
|
|
16
|
+
confidence: number;
|
|
17
|
+
modelOverride?: Partial<Record<ReviewerName, 'haiku' | 'sonnet' | 'opus' | 'opus[1m]'>>;
|
|
18
|
+
harnessOverride?: Partial<Record<ReviewerName, string>>;
|
|
19
|
+
}
|
|
20
|
+
export type FellOpenReason = 'parse-error' | 'schema-validation' | 'confident-false' | 'invocation-failed';
|
|
21
|
+
export interface ClassifierDecision {
|
|
22
|
+
reviewers: readonly ReviewerName[];
|
|
23
|
+
fellOpen: boolean;
|
|
24
|
+
fellOpenReason: FellOpenReason | null;
|
|
25
|
+
rawOutput: ClassifierOutput | null;
|
|
26
|
+
parseError: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Parse and validate raw JSON output from a classifier-LLM invocation. Returns a structured
|
|
30
|
+
* decision; on any validation failure the decision falls open to the full reviewer set per
|
|
31
|
+
* RFC §12.3 (failing open is a non-negotiable safety property).
|
|
32
|
+
*/
|
|
33
|
+
export declare function decideFromRawOutput(rawJson: string): ClassifierDecision;
|
|
34
|
+
/** Decision used when the classifier invocation itself fails (timeout, harness exhausted). */
|
|
35
|
+
export declare function decideFromInvocationFailure(): ClassifierDecision;
|
|
36
|
+
type ValidationResult = {
|
|
37
|
+
ok: true;
|
|
38
|
+
value: ClassifierOutput;
|
|
39
|
+
} | {
|
|
40
|
+
ok: false;
|
|
41
|
+
error: string;
|
|
42
|
+
};
|
|
43
|
+
export declare function validateClassifierOutput(value: unknown): ValidationResult;
|
|
44
|
+
export interface DiffSummary {
|
|
45
|
+
filesChanged: number;
|
|
46
|
+
paths: string[];
|
|
47
|
+
linesAdded: number;
|
|
48
|
+
linesRemoved: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Apply the default classifier ruleset from RFC §12.3 to a diff summary. Used as the
|
|
52
|
+
* fallback when no LLM classifier is configured, and as the seed prompt for LLM-based
|
|
53
|
+
* classifiers. Always returns confident: true with confidence: 1.0 because these are
|
|
54
|
+
* deterministic rules.
|
|
55
|
+
*/
|
|
56
|
+
export declare function defaultRulesetDecision(diff: DiffSummary): ClassifierOutput;
|
|
57
|
+
export interface CalibrationLogEntry {
|
|
58
|
+
timestamp: string;
|
|
59
|
+
issueId: string;
|
|
60
|
+
diffStats: DiffSummary;
|
|
61
|
+
classifierOutput: ClassifierOutput | null;
|
|
62
|
+
fellOpen: boolean;
|
|
63
|
+
fellOpenReason: FellOpenReason | null;
|
|
64
|
+
/** Back-filled later via cli-classifier-feedback when the operator attributes a miss. */
|
|
65
|
+
humanOverrideAfterMerge: {
|
|
66
|
+
addedReviewer: ReviewerName;
|
|
67
|
+
reason: string;
|
|
68
|
+
} | null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Append one entry to $ARTIFACTS_DIR/_classifier/calibration.jsonl. Atomic per-line via
|
|
72
|
+
* appendFile. Creates the directory if missing.
|
|
73
|
+
*/
|
|
74
|
+
export declare function appendCalibrationEntry(artifactsDir: string, entry: CalibrationLogEntry): Promise<void>;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=classifier.d.ts.map
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conditional review classifier (RFC-0010 §12). The classifier reads a PR diff and emits a
|
|
3
|
+
* structured decision listing which downstream review agents to invoke. This module provides:
|
|
4
|
+
*
|
|
5
|
+
* - The output-schema validator (Q4 resolution: confident: bool + confidence: float with
|
|
6
|
+
* consistency rule confident: true REQUIRES confidence ≥ 0.7).
|
|
7
|
+
* - The default fall-open ruleset (RFC §12.3 baseline + the four fall-open triggers).
|
|
8
|
+
* - The calibration-log writer for $ARTIFACTS_DIR/_classifier/calibration.jsonl.
|
|
9
|
+
*/
|
|
10
|
+
import { appendFile, mkdir } from 'node:fs/promises';
|
|
11
|
+
import { dirname } from 'node:path';
|
|
12
|
+
export const ALL_REVIEWERS = ['testing', 'critic', 'security'];
|
|
13
|
+
const VALID_MODEL_OVERRIDES = new Set(['haiku', 'sonnet', 'opus', 'opus[1m]']);
|
|
14
|
+
const VALID_HARNESS_OVERRIDES = new Set([
|
|
15
|
+
'claude-code',
|
|
16
|
+
'codex',
|
|
17
|
+
'gemini-cli',
|
|
18
|
+
'opencode',
|
|
19
|
+
'aider',
|
|
20
|
+
'generic-api',
|
|
21
|
+
]);
|
|
22
|
+
const CONFIDENCE_FLOOR_FOR_TRUE = 0.7;
|
|
23
|
+
/**
|
|
24
|
+
* Parse and validate raw JSON output from a classifier-LLM invocation. Returns a structured
|
|
25
|
+
* decision; on any validation failure the decision falls open to the full reviewer set per
|
|
26
|
+
* RFC §12.3 (failing open is a non-negotiable safety property).
|
|
27
|
+
*/
|
|
28
|
+
export function decideFromRawOutput(rawJson) {
|
|
29
|
+
let parsed;
|
|
30
|
+
try {
|
|
31
|
+
parsed = JSON.parse(rawJson);
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
return failOpen('parse-error', null, err.message);
|
|
35
|
+
}
|
|
36
|
+
const validation = validateClassifierOutput(parsed);
|
|
37
|
+
if (!validation.ok) {
|
|
38
|
+
return failOpen('schema-validation', null, validation.error);
|
|
39
|
+
}
|
|
40
|
+
if (!validation.value.confident) {
|
|
41
|
+
return failOpen('confident-false', validation.value, null);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
reviewers: validation.value.reviewers,
|
|
45
|
+
fellOpen: false,
|
|
46
|
+
fellOpenReason: null,
|
|
47
|
+
rawOutput: validation.value,
|
|
48
|
+
parseError: null,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Decision used when the classifier invocation itself fails (timeout, harness exhausted). */
|
|
52
|
+
export function decideFromInvocationFailure() {
|
|
53
|
+
return failOpen('invocation-failed', null, null);
|
|
54
|
+
}
|
|
55
|
+
function failOpen(reason, rawOutput, parseError) {
|
|
56
|
+
return {
|
|
57
|
+
reviewers: ALL_REVIEWERS,
|
|
58
|
+
fellOpen: true,
|
|
59
|
+
fellOpenReason: reason,
|
|
60
|
+
rawOutput,
|
|
61
|
+
parseError,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function validateClassifierOutput(value) {
|
|
65
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
66
|
+
return { ok: false, error: 'output is not an object' };
|
|
67
|
+
}
|
|
68
|
+
const obj = value;
|
|
69
|
+
// reviewers: array of ReviewerName, unique
|
|
70
|
+
if (!Array.isArray(obj.reviewers)) {
|
|
71
|
+
return { ok: false, error: 'reviewers must be an array' };
|
|
72
|
+
}
|
|
73
|
+
const seen = new Set();
|
|
74
|
+
for (const r of obj.reviewers) {
|
|
75
|
+
if (typeof r !== 'string' || !ALL_REVIEWERS.includes(r)) {
|
|
76
|
+
return { ok: false, error: `reviewers contains invalid value: ${String(r)}` };
|
|
77
|
+
}
|
|
78
|
+
if (seen.has(r))
|
|
79
|
+
return { ok: false, error: `reviewers contains duplicate: ${r}` };
|
|
80
|
+
seen.add(r);
|
|
81
|
+
}
|
|
82
|
+
// rationale: object with string values
|
|
83
|
+
if (typeof obj.rationale !== 'object' || obj.rationale === null || Array.isArray(obj.rationale)) {
|
|
84
|
+
return { ok: false, error: 'rationale must be an object' };
|
|
85
|
+
}
|
|
86
|
+
for (const [k, v] of Object.entries(obj.rationale)) {
|
|
87
|
+
if (typeof v !== 'string') {
|
|
88
|
+
return { ok: false, error: `rationale.${k} must be a string` };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// confident: bool
|
|
92
|
+
if (typeof obj.confident !== 'boolean') {
|
|
93
|
+
return { ok: false, error: 'confident must be a boolean' };
|
|
94
|
+
}
|
|
95
|
+
// confidence: number in [0, 1]
|
|
96
|
+
if (typeof obj.confidence !== 'number' ||
|
|
97
|
+
!Number.isFinite(obj.confidence) ||
|
|
98
|
+
obj.confidence < 0 ||
|
|
99
|
+
obj.confidence > 1) {
|
|
100
|
+
return { ok: false, error: 'confidence must be a number in [0, 1]' };
|
|
101
|
+
}
|
|
102
|
+
// Consistency: confident: true REQUIRES confidence >= 0.7
|
|
103
|
+
if (obj.confident && obj.confidence < CONFIDENCE_FLOOR_FOR_TRUE) {
|
|
104
|
+
return {
|
|
105
|
+
ok: false,
|
|
106
|
+
error: `confident: true requires confidence >= ${CONFIDENCE_FLOOR_FOR_TRUE} (got ${obj.confidence})`,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
// Optional modelOverride: { reviewerName?: alias }
|
|
110
|
+
if (obj.modelOverride !== undefined) {
|
|
111
|
+
if (typeof obj.modelOverride !== 'object' ||
|
|
112
|
+
obj.modelOverride === null ||
|
|
113
|
+
Array.isArray(obj.modelOverride)) {
|
|
114
|
+
return { ok: false, error: 'modelOverride must be an object' };
|
|
115
|
+
}
|
|
116
|
+
for (const [k, v] of Object.entries(obj.modelOverride)) {
|
|
117
|
+
if (!ALL_REVIEWERS.includes(k)) {
|
|
118
|
+
return { ok: false, error: `modelOverride contains unknown reviewer: ${k}` };
|
|
119
|
+
}
|
|
120
|
+
if (typeof v !== 'string' || !VALID_MODEL_OVERRIDES.has(v)) {
|
|
121
|
+
return {
|
|
122
|
+
ok: false,
|
|
123
|
+
error: `modelOverride.${k} must be one of ${[...VALID_MODEL_OVERRIDES].join('|')}`,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Optional harnessOverride: { reviewerName?: harnessName }
|
|
129
|
+
if (obj.harnessOverride !== undefined) {
|
|
130
|
+
if (typeof obj.harnessOverride !== 'object' ||
|
|
131
|
+
obj.harnessOverride === null ||
|
|
132
|
+
Array.isArray(obj.harnessOverride)) {
|
|
133
|
+
return { ok: false, error: 'harnessOverride must be an object' };
|
|
134
|
+
}
|
|
135
|
+
for (const [k, v] of Object.entries(obj.harnessOverride)) {
|
|
136
|
+
if (!ALL_REVIEWERS.includes(k)) {
|
|
137
|
+
return { ok: false, error: `harnessOverride contains unknown reviewer: ${k}` };
|
|
138
|
+
}
|
|
139
|
+
if (typeof v !== 'string' || !VALID_HARNESS_OVERRIDES.has(v)) {
|
|
140
|
+
return {
|
|
141
|
+
ok: false,
|
|
142
|
+
error: `harnessOverride.${k} must be one of ${[...VALID_HARNESS_OVERRIDES].join('|')}`,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return { ok: true, value: obj };
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Apply the default classifier ruleset from RFC §12.3 to a diff summary. Used as the
|
|
151
|
+
* fallback when no LLM classifier is configured, and as the seed prompt for LLM-based
|
|
152
|
+
* classifiers. Always returns confident: true with confidence: 1.0 because these are
|
|
153
|
+
* deterministic rules.
|
|
154
|
+
*/
|
|
155
|
+
export function defaultRulesetDecision(diff) {
|
|
156
|
+
if (diff.filesChanged === 0) {
|
|
157
|
+
return {
|
|
158
|
+
reviewers: [],
|
|
159
|
+
rationale: { all: 'no files changed; no review needed' },
|
|
160
|
+
confident: true,
|
|
161
|
+
confidence: 1,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const allDocs = diff.paths.every((p) => /\.(md|rst|txt)$/i.test(p) || p.startsWith('docs/'));
|
|
165
|
+
if (allDocs) {
|
|
166
|
+
return {
|
|
167
|
+
reviewers: ['critic'],
|
|
168
|
+
rationale: { critic: 'documentation-only change; critic suffices' },
|
|
169
|
+
confident: true,
|
|
170
|
+
confidence: 0.95,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const touchesAuth = diff.paths.some((p) => /(?:^|\/)(auth|crypto|secrets?)\b/i.test(p));
|
|
174
|
+
const touchesLockfiles = diff.paths.some((p) => /(?:^|\/)(package(-lock)?\.json|requirements\.txt|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|poetry\.lock|Pipfile\.lock)$/i.test(p));
|
|
175
|
+
const touchesCi = diff.paths.some((p) => p.startsWith('.github/workflows/'));
|
|
176
|
+
if (touchesAuth) {
|
|
177
|
+
return {
|
|
178
|
+
reviewers: ['testing', 'critic', 'security'],
|
|
179
|
+
rationale: {
|
|
180
|
+
testing: 'auth touched; verify regression coverage',
|
|
181
|
+
critic: 'auth touched; verify approach',
|
|
182
|
+
security: 'auth-touching diff; mandatory security review',
|
|
183
|
+
},
|
|
184
|
+
modelOverride: { security: 'opus' },
|
|
185
|
+
confident: true,
|
|
186
|
+
confidence: 0.99,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
if (touchesLockfiles || touchesCi) {
|
|
190
|
+
return {
|
|
191
|
+
reviewers: ['security', 'critic'],
|
|
192
|
+
rationale: {
|
|
193
|
+
security: touchesLockfiles ? 'supply-chain (lockfile) change' : 'CI workflow change',
|
|
194
|
+
critic: 'verify approach',
|
|
195
|
+
},
|
|
196
|
+
confident: true,
|
|
197
|
+
confidence: 0.9,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
// Default: all three
|
|
201
|
+
return {
|
|
202
|
+
reviewers: ['testing', 'critic', 'security'],
|
|
203
|
+
rationale: {
|
|
204
|
+
testing: 'default fallback',
|
|
205
|
+
critic: 'default fallback',
|
|
206
|
+
security: 'default fallback',
|
|
207
|
+
},
|
|
208
|
+
confident: true,
|
|
209
|
+
confidence: 0.8,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Append one entry to $ARTIFACTS_DIR/_classifier/calibration.jsonl. Atomic per-line via
|
|
214
|
+
* appendFile. Creates the directory if missing.
|
|
215
|
+
*/
|
|
216
|
+
export async function appendCalibrationEntry(artifactsDir, entry) {
|
|
217
|
+
const path = `${artifactsDir}/_classifier/calibration.jsonl`;
|
|
218
|
+
await mkdir(dirname(path), { recursive: true });
|
|
219
|
+
await appendFile(path, JSON.stringify(entry) + '\n', 'utf8');
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=classifier.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ModelRegistry, ModelRemovedError, UnknownAliasError, DEFAULT_REGISTRY, type ModelEntry, type ResolutionContext, type ResolutionResult, type ResolutionEvent, } from './registry.js';
|
|
2
|
+
export { decideFromRawOutput, decideFromInvocationFailure, validateClassifierOutput, defaultRulesetDecision, appendCalibrationEntry, ALL_REVIEWERS, type ReviewerName, type ClassifierOutput, type ClassifierDecision, type FellOpenReason, type CalibrationLogEntry, type DiffSummary, } from './classifier.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ModelRegistry, ModelRemovedError, UnknownAliasError, DEFAULT_REGISTRY, } from './registry.js';
|
|
2
|
+
export { decideFromRawOutput, decideFromInvocationFailure, validateClassifierOutput, defaultRulesetDecision, appendCalibrationEntry, ALL_REVIEWERS, } from './classifier.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model alias registry per RFC-0010 §11. Maps short aliases (haiku, sonnet, opus, opus[1m])
|
|
3
|
+
* to physical model IDs and tracks deprecation lifecycle (deprecatedAt / removedAt /
|
|
4
|
+
* replacementAlias). Resolution is performed once at pipeline-load and pinned per run
|
|
5
|
+
* (RFC §11.1) so model swaps cannot occur underneath an in-flight pipeline.
|
|
6
|
+
*/
|
|
7
|
+
export interface ModelEntry {
|
|
8
|
+
/** Short alias used in pipeline YAML (e.g., 'haiku'). */
|
|
9
|
+
alias: string;
|
|
10
|
+
/** Physical model ID dispatched to the harness (e.g., 'claude-haiku-4-5-20251001'). */
|
|
11
|
+
modelId: string;
|
|
12
|
+
/** ISO 8601 date when the vendor announced deprecation; null if active. */
|
|
13
|
+
deprecatedAt: string | null;
|
|
14
|
+
/** ISO 8601 date when the vendor will (or did) remove the model; null if not scheduled. */
|
|
15
|
+
removedAt: string | null;
|
|
16
|
+
/** Alias to migrate to when this entry is deprecated; required when deprecatedAt is set. */
|
|
17
|
+
replacementAlias: string | null;
|
|
18
|
+
/** Documentation hint, surfaced by cli-model-bump. */
|
|
19
|
+
use?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ResolutionContext {
|
|
22
|
+
/** Source of `now` for deprecation comparisons; defaults to system clock. */
|
|
23
|
+
now?: () => Date;
|
|
24
|
+
}
|
|
25
|
+
export type ResolutionEvent = {
|
|
26
|
+
type: 'ok';
|
|
27
|
+
alias: string;
|
|
28
|
+
modelId: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'ModelDeprecated';
|
|
31
|
+
alias: string;
|
|
32
|
+
modelId: string;
|
|
33
|
+
removedAt: string | null;
|
|
34
|
+
replacementAlias: string | null;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'ModelDeprecationGracePeriod';
|
|
37
|
+
alias: string;
|
|
38
|
+
removedAt: string;
|
|
39
|
+
};
|
|
40
|
+
export interface ResolutionResult {
|
|
41
|
+
modelId: string;
|
|
42
|
+
events: ResolutionEvent[];
|
|
43
|
+
}
|
|
44
|
+
export declare class ModelRemovedError extends Error {
|
|
45
|
+
readonly alias: string;
|
|
46
|
+
readonly modelId: string;
|
|
47
|
+
readonly removedAt: string;
|
|
48
|
+
constructor(alias: string, modelId: string, removedAt: string);
|
|
49
|
+
}
|
|
50
|
+
export declare class UnknownAliasError extends Error {
|
|
51
|
+
readonly alias: string;
|
|
52
|
+
constructor(alias: string);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Default registry shipped with the orchestrator. Maintainers update deprecatedAt /
|
|
56
|
+
* removedAt / replacementAlias from public vendor announcements (see operator-runbook).
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_REGISTRY: readonly ModelEntry[];
|
|
59
|
+
export declare class ModelRegistry {
|
|
60
|
+
private readonly entries;
|
|
61
|
+
constructor(entries?: readonly ModelEntry[]);
|
|
62
|
+
list(): ModelEntry[];
|
|
63
|
+
get(alias: string): ModelEntry | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Resolve an alias to a physical model ID at pipeline-load. Throws ModelRemovedError
|
|
66
|
+
* if the model has been removed; emits ModelDeprecated event otherwise (informational).
|
|
67
|
+
* Within `GRACE_PERIOD_DAYS` of the removal date, additionally emits
|
|
68
|
+
* ModelDeprecationGracePeriod for escalated operator notification.
|
|
69
|
+
*/
|
|
70
|
+
resolve(alias: string, ctx?: ResolutionContext): ResolutionResult;
|
|
71
|
+
/**
|
|
72
|
+
* Bulk-resolve a set of stage aliases. Emits one ResolutionResult per (stage, alias).
|
|
73
|
+
* Used at pipeline-load to pin model resolution for the whole pipeline run.
|
|
74
|
+
*/
|
|
75
|
+
resolveAll(stageAliases: ReadonlyArray<{
|
|
76
|
+
stage: string;
|
|
77
|
+
alias: string;
|
|
78
|
+
}>, ctx?: ResolutionContext): Map<string, ResolutionResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Operator-facing dry-run helper: for each currently deprecated alias, report what
|
|
81
|
+
* would happen if a pipeline started today. Used by cli-model-bump --dry-run.
|
|
82
|
+
*/
|
|
83
|
+
bumpPlan(stageAliases: ReadonlyArray<{
|
|
84
|
+
stage: string;
|
|
85
|
+
alias: string;
|
|
86
|
+
}>, ctx?: ResolutionContext): Array<{
|
|
87
|
+
stage: string;
|
|
88
|
+
alias: string;
|
|
89
|
+
currentModelId: string;
|
|
90
|
+
deprecatedAt: string | null;
|
|
91
|
+
removedAt: string | null;
|
|
92
|
+
replacementAlias: string | null;
|
|
93
|
+
replacementModelId: string | null;
|
|
94
|
+
inGracePeriod: boolean;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=registry.d.ts.map
|