@ai-sdlc/orchestrator 0.1.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/adapters.d.ts +60 -0
- package/dist/adapters.js +160 -0
- package/dist/admission.d.ts +49 -0
- package/dist/admission.js +90 -0
- package/dist/analysis/analyzer.d.ts +10 -0
- package/dist/analysis/analyzer.js +67 -0
- package/dist/analysis/complexity-scorer.d.ts +24 -0
- package/dist/analysis/complexity-scorer.js +39 -0
- package/dist/analysis/context-builder.d.ts +14 -0
- package/dist/analysis/context-builder.js +79 -0
- package/dist/analysis/convention-detector.d.ts +9 -0
- package/dist/analysis/convention-detector.js +177 -0
- package/dist/analysis/dependency-parser.d.ts +17 -0
- package/dist/analysis/dependency-parser.js +167 -0
- package/dist/analysis/file-walker.d.ts +18 -0
- package/dist/analysis/file-walker.js +158 -0
- package/dist/analysis/hotspot-analyzer.d.ts +28 -0
- package/dist/analysis/hotspot-analyzer.js +85 -0
- package/dist/analysis/index.d.ts +13 -0
- package/dist/analysis/index.js +12 -0
- package/dist/analysis/pattern-detector.d.ts +10 -0
- package/dist/analysis/pattern-detector.js +86 -0
- package/dist/analysis/types.d.ts +94 -0
- package/dist/analysis/types.js +5 -0
- package/dist/audit-archival.d.ts +48 -0
- package/dist/audit-archival.js +72 -0
- package/dist/audit-export.d.ts +45 -0
- package/dist/audit-export.js +100 -0
- package/dist/audit-extended.d.ts +28 -0
- package/dist/audit-extended.js +38 -0
- package/dist/audit-scheduler.d.ts +32 -0
- package/dist/audit-scheduler.js +52 -0
- package/dist/audit-sqlite-sink.d.ts +11 -0
- package/dist/audit-sqlite-sink.js +51 -0
- package/dist/autonomy-tracker.d.ts +76 -0
- package/dist/autonomy-tracker.js +277 -0
- package/dist/check-runs.d.ts +37 -0
- package/dist/check-runs.js +72 -0
- package/dist/cli/commands/agents.d.ts +6 -0
- package/dist/cli/commands/agents.js +33 -0
- package/dist/cli/commands/complexity.d.ts +6 -0
- package/dist/cli/commands/complexity.js +35 -0
- package/dist/cli/commands/cost.d.ts +6 -0
- package/dist/cli/commands/cost.js +53 -0
- package/dist/cli/commands/dashboard.d.ts +9 -0
- package/dist/cli/commands/dashboard.js +50 -0
- package/dist/cli/commands/health.d.ts +6 -0
- package/dist/cli/commands/health.js +33 -0
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.js +127 -0
- package/dist/cli/commands/routing.d.ts +6 -0
- package/dist/cli/commands/routing.js +46 -0
- package/dist/cli/commands/run.d.ts +6 -0
- package/dist/cli/commands/run.js +36 -0
- package/dist/cli/commands/start.d.ts +6 -0
- package/dist/cli/commands/start.js +26 -0
- package/dist/cli/commands/status.d.ts +6 -0
- package/dist/cli/commands/status.js +34 -0
- package/dist/cli/dashboard-renderer.d.ts +24 -0
- package/dist/cli/dashboard-renderer.js +129 -0
- package/dist/cli/formatters/index.d.ts +6 -0
- package/dist/cli/formatters/index.js +18 -0
- package/dist/cli/formatters/json.d.ts +5 -0
- package/dist/cli/formatters/json.js +7 -0
- package/dist/cli/formatters/minimal.d.ts +5 -0
- package/dist/cli/formatters/minimal.js +36 -0
- package/dist/cli/formatters/table.d.ts +5 -0
- package/dist/cli/formatters/table.js +184 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.js +35 -0
- package/dist/compliance-extended.d.ts +41 -0
- package/dist/compliance-extended.js +58 -0
- package/dist/config.d.ts +26 -0
- package/dist/config.js +66 -0
- package/dist/context-enrichment.d.ts +33 -0
- package/dist/context-enrichment.js +125 -0
- package/dist/cost-governance.d.ts +22 -0
- package/dist/cost-governance.js +106 -0
- package/dist/cost-tracker.d.ts +75 -0
- package/dist/cost-tracker.js +177 -0
- package/dist/defaults.d.ts +140 -0
- package/dist/defaults.js +218 -0
- package/dist/deploy/flyio-target.d.ts +19 -0
- package/dist/deploy/flyio-target.js +114 -0
- package/dist/deploy/index.d.ts +15 -0
- package/dist/deploy/index.js +11 -0
- package/dist/deploy/kubernetes-target.d.ts +25 -0
- package/dist/deploy/kubernetes-target.js +124 -0
- package/dist/deploy/metrics-collector.d.ts +31 -0
- package/dist/deploy/metrics-collector.js +75 -0
- package/dist/deploy/rollout-controller.d.ts +42 -0
- package/dist/deploy/rollout-controller.js +192 -0
- package/dist/deploy/rollout-types.d.ts +86 -0
- package/dist/deploy/rollout-types.js +5 -0
- package/dist/deploy/types.d.ts +47 -0
- package/dist/deploy/types.js +5 -0
- package/dist/deploy/vercel-target.d.ts +16 -0
- package/dist/deploy/vercel-target.js +115 -0
- package/dist/discovery.d.ts +26 -0
- package/dist/discovery.js +46 -0
- package/dist/episodic-enhanced.d.ts +88 -0
- package/dist/episodic-enhanced.js +212 -0
- package/dist/execute.d.ts +81 -0
- package/dist/execute.js +703 -0
- package/dist/fix-ci.d.ts +61 -0
- package/dist/fix-ci.js +380 -0
- package/dist/handoff-executor.d.ts +61 -0
- package/dist/handoff-executor.js +119 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +87 -0
- package/dist/instrumented.d.ts +27 -0
- package/dist/instrumented.js +34 -0
- package/dist/logger.d.ts +17 -0
- package/dist/logger.js +37 -0
- package/dist/multi-repo/impact-analyzer.d.ts +22 -0
- package/dist/multi-repo/impact-analyzer.js +95 -0
- package/dist/multi-repo/index.d.ts +5 -0
- package/dist/multi-repo/index.js +4 -0
- package/dist/multi-repo/monorepo-detector.d.ts +16 -0
- package/dist/multi-repo/monorepo-detector.js +246 -0
- package/dist/multi-repo/service-map-builder.d.ts +24 -0
- package/dist/multi-repo/service-map-builder.js +235 -0
- package/dist/multi-repo/types.d.ts +54 -0
- package/dist/multi-repo/types.js +5 -0
- package/dist/notifications/index.d.ts +4 -0
- package/dist/notifications/index.js +4 -0
- package/dist/notifications/notification-router.d.ts +62 -0
- package/dist/notifications/notification-router.js +206 -0
- package/dist/notifications/slack-messenger.d.ts +26 -0
- package/dist/notifications/slack-messenger.js +69 -0
- package/dist/notifications/teams-messenger.d.ts +21 -0
- package/dist/notifications/teams-messenger.js +85 -0
- package/dist/notifications.d.ts +13 -0
- package/dist/notifications.js +15 -0
- package/dist/orchestration.d.ts +20 -0
- package/dist/orchestration.js +53 -0
- package/dist/orchestrator.d.ts +160 -0
- package/dist/orchestrator.js +372 -0
- package/dist/otel-exporter.d.ts +37 -0
- package/dist/otel-exporter.js +128 -0
- package/dist/plugin.d.ts +45 -0
- package/dist/plugin.js +8 -0
- package/dist/policy-evaluators.d.ts +40 -0
- package/dist/policy-evaluators.js +57 -0
- package/dist/process-escalation.d.ts +38 -0
- package/dist/process-escalation.js +129 -0
- package/dist/progressive-gates.d.ts +54 -0
- package/dist/progressive-gates.js +135 -0
- package/dist/provenance.d.ts +29 -0
- package/dist/provenance.js +61 -0
- package/dist/reconcilers.d.ts +28 -0
- package/dist/reconcilers.js +37 -0
- package/dist/runners/claude-code.d.ts +17 -0
- package/dist/runners/claude-code.js +200 -0
- package/dist/runners/codex.d.ts +19 -0
- package/dist/runners/codex.js +153 -0
- package/dist/runners/copilot-stub.d.ts +9 -0
- package/dist/runners/copilot-stub.js +15 -0
- package/dist/runners/copilot.d.ts +15 -0
- package/dist/runners/copilot.js +119 -0
- package/dist/runners/cursor-stub.d.ts +9 -0
- package/dist/runners/cursor-stub.js +15 -0
- package/dist/runners/cursor.d.ts +20 -0
- package/dist/runners/cursor.js +140 -0
- package/dist/runners/devin-stub.d.ts +9 -0
- package/dist/runners/devin-stub.js +15 -0
- package/dist/runners/generic-llm.d.ts +51 -0
- package/dist/runners/generic-llm.js +125 -0
- package/dist/runners/index.d.ts +8 -0
- package/dist/runners/index.js +7 -0
- package/dist/runners/runner-registry.d.ts +50 -0
- package/dist/runners/runner-registry.js +156 -0
- package/dist/runners/types.d.ts +59 -0
- package/dist/runners/types.js +7 -0
- package/dist/security.d.ts +51 -0
- package/dist/security.js +70 -0
- package/dist/shared.d.ts +134 -0
- package/dist/shared.js +284 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.js +3 -0
- package/dist/state/schema.d.ts +16 -0
- package/dist/state/schema.js +264 -0
- package/dist/state/store.d.ts +109 -0
- package/dist/state/store.js +644 -0
- package/dist/state/types.d.ts +190 -0
- package/dist/state/types.js +5 -0
- package/dist/structured-logger.d.ts +20 -0
- package/dist/structured-logger.js +64 -0
- package/dist/task-decomposer.d.ts +61 -0
- package/dist/task-decomposer.js +265 -0
- package/dist/telemetry-extended.d.ts +24 -0
- package/dist/telemetry-extended.js +31 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +7 -0
- package/dist/validate-agent-output.d.ts +30 -0
- package/dist/validate-agent-output.js +81 -0
- package/dist/validate-issue.d.ts +25 -0
- package/dist/validate-issue.js +102 -0
- package/dist/watch.d.ts +43 -0
- package/dist/watch.js +99 -0
- package/dist/webhook-manager.d.ts +38 -0
- package/dist/webhook-manager.js +66 -0
- package/package.json +59 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export { loadConfig, loadConfigAsync, type AiSdlcConfig } from './config.js';
|
|
2
|
+
export { validateIssue, validateIssueWithExtensions, parseComplexity } from './validate-issue.js';
|
|
3
|
+
export { executePipeline, type ExecuteOptions, type PipelineResult, type PromotionResult, } from './execute.js';
|
|
4
|
+
export { validateAgentOutput, type ValidationContext, type ValidationResult, type ValidationViolation, } from './validate-agent-output.js';
|
|
5
|
+
export { createLogger, type Logger } from './logger.js';
|
|
6
|
+
export { executeFixCI, countRetryAttempts, fetchCILogs, type FixCIOptions } from './fix-ci.js';
|
|
7
|
+
export { getGitHubConfig, resolveRepoRoot, createDefaultAuditLog, resolveAutonomyLevel, resolveConstraints, mergeBlockedPaths, isAutonomousStrategy, recordMetric, validateAndAuditOutput, createPipelineMemory, evaluatePipelineCompliance, authorizeFilesChanged, extractIssueNumber, BRANCH_PATTERN, createAbacPermissionHook, createBlockedPathsHook, createAuditLoggingHook, createPipelineAuthorizationChain, type GitHubEnvConfig, type ValidateAndAuditParams, } from './shared.js';
|
|
8
|
+
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';
|
|
9
|
+
export type { ComplexityBand, GateProfile } from './defaults.js';
|
|
10
|
+
export { renderTemplate } from './notifications.js';
|
|
11
|
+
export { createPipelineSecurity, checkKillSwitch, issueAgentCredentials, revokeAgentCredentials, classifyAndSubmitApproval, classifyApprovalTier, compareTiers, createGitHubSandbox, createGitHubJITCredentialIssuer, createGitHubSandboxProvider, createGitHubJITProvider, type SecurityContext, } from './security.js';
|
|
12
|
+
export { createPipelineProvenance, attachProvenanceToPR, validatePipelineProvenance, provenanceToAnnotations, provenanceFromAnnotations, PROVENANCE_ANNOTATION_PREFIX, type ProvenanceRecord, type ReviewDecision, } from './provenance.js';
|
|
13
|
+
export { createPipelineAdmission, admitIssueResource, type PipelineAdmissionConfig, type AdmissionPipeline, type AdmissionResult, } from './admission.js';
|
|
14
|
+
export { createPipelineMetricStore, createInstrumentedEnforcement, createInstrumentedAutonomy, createInstrumentedExecutor, STANDARD_METRICS, instrumentExecutor, } from './instrumented.js';
|
|
15
|
+
export { createPipelineDiscovery, findMatchingAgent, resolveAgentForIssue, matchAgentBySkill, createStubAgentCardFetcher, createPipelineAgentCardFetcher, } from './discovery.js';
|
|
16
|
+
export { createStructuredConsoleLogger, createStructuredBufferLogger, } from './structured-logger.js';
|
|
17
|
+
export { startWatch, type WatchOptions, type WatchHandle } from './watch.js';
|
|
18
|
+
export { createPipelineOrchestration, executePipelineOrchestration, validatePipelineHandoffs, sequential, parallel, hybrid, hierarchical, swarm, validateHandoff, simpleSchemaValidate, } from './orchestration.js';
|
|
19
|
+
export { createPipelineRegoEvaluator, createPipelineCELEvaluator, createPipelineABACHook, createPipelineExpressionEvaluator, createPipelineLLMEvaluator, evaluatePipelineGate, scorePipelineComplexity, evaluatePipelineComplexityRouting, } from './policy-evaluators.js';
|
|
20
|
+
export { createPipelineAdapterRegistry, createPipelineWebhookBridge, resolveAdapterFromGit, resolveInfrastructure, scanPipelineAdapters, } from './adapters.js';
|
|
21
|
+
export { createPipelineReconciler, createGateReconciler, createAutonomyReconciler, hasResourceChanged, fingerprintResource, } from './reconcilers.js';
|
|
22
|
+
export { createFileAuditLog, verifyAuditIntegrity, loadAuditEntries, rotateAuditLog, computeAuditHash, } from './audit-extended.js';
|
|
23
|
+
export { checkFrameworkCompliance, getControlCatalog, getFrameworkMappings, listSupportedFrameworks, } from './compliance-extended.js';
|
|
24
|
+
export { createSilentLogger, withPipelineSpanSync, getPipelineTracer, validateResourceSchema, } from './telemetry-extended.js';
|
|
25
|
+
export { ClaudeCodeRunner, ClaudeCodeRunner as GitHubActionsRunner, GenericLLMRunner, CopilotRunner, CursorRunner, CodexRunner, RunnerRegistry, createRunnerRegistry, type AgentRunner, type AgentContext, type AgentResult, type GenericLLMConfig, type RegisteredRunner, } from './runners/index.js';
|
|
26
|
+
export type { TokenUsage } from './runners/index.js';
|
|
27
|
+
export { SlackMessenger, TeamsMessenger, NotificationRouter } from './notifications/index.js';
|
|
28
|
+
export type { SlackConfig, TeamsConfig, PipelineEvent, PipelineEventType, NotificationRoute, NotificationTemplate, } from './notifications/index.js';
|
|
29
|
+
export { StateStore } from './state/index.js';
|
|
30
|
+
export type { HotspotRecord, RoutingDecision, CostLedgerEntry, GateThresholdOverride, AutonomyEvent, AutonomyEventType, HandoffEvent, DeploymentRecord, DeploymentRecordState, RolloutStepRecord, AuditEntryRecord, } from './state/index.js';
|
|
31
|
+
export { createKubernetesTarget, createVercelTarget, createFlyioTarget, createHttpMetricsCollector, createStubMetricsCollector, RolloutController, } from './deploy/index.js';
|
|
32
|
+
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';
|
|
33
|
+
export { getComplexityBand, getGateProfile, adjustEnforcement, adjustGateForComplexity, adjustGatesForComplexity, computeGateAdjustments, } from './progressive-gates.js';
|
|
34
|
+
export type { AdjustedGate, GateAdjustment } from './progressive-gates.js';
|
|
35
|
+
export { evaluateProcessEscalation, isSignificantEscalation, formatEscalationSummary, } from './process-escalation.js';
|
|
36
|
+
export type { EscalationAction, EscalationResult, EscalationActionType, } from './process-escalation.js';
|
|
37
|
+
export { createEnhancedEpisodicMemory, detectRegressions, extractEpisodicPatterns, } from './episodic-enhanced.js';
|
|
38
|
+
export type { EnhancedEpisodicInput, RegressionInfo, FailurePattern, EpisodicSummary, } from './episodic-enhanced.js';
|
|
39
|
+
export { findRelevantEpisodes, formatEpisodicContext, enrichAgentContext, } from './context-enrichment.js';
|
|
40
|
+
export type { EpisodeSearchCriteria, ScoredEpisode } from './context-enrichment.js';
|
|
41
|
+
export { AutonomyTracker } from './autonomy-tracker.js';
|
|
42
|
+
export type { AgentPerformanceMetrics, PromotionEvaluation, DemotionEvaluation, PromotionProximity, } from './autonomy-tracker.js';
|
|
43
|
+
export { CostTracker } from './cost-tracker.js';
|
|
44
|
+
export type { CostSummary, BudgetStatus, CostTimeSeriesPoint } from './cost-tracker.js';
|
|
45
|
+
export { createOTelBridge, isOTelAvailable } from './otel-exporter.js';
|
|
46
|
+
export type { OTelBridge, OTelBridgeOptions, OTelSpanHandle } from './otel-exporter.js';
|
|
47
|
+
export { renderDashboardFrame } from './cli/dashboard-renderer.js';
|
|
48
|
+
export type { DashboardData } from './cli/dashboard-renderer.js';
|
|
49
|
+
export { walkFiles, detectModules, parseImports, buildModuleGraph, detectConventions, detectPatterns, analyzeHotspots, computeComplexityScore, analyzeCodebase, buildCodebaseContext, formatContextForPrompt, } from './analysis/index.js';
|
|
50
|
+
export type { CodebaseProfile, CodebaseContext, Hotspot, ArchitecturalPattern, DetectedConvention, ModuleInfo, ModuleGraph, DependencyEdge, AnalyzerOptions, FileInfo, ImportStatement, } from './analysis/index.js';
|
|
51
|
+
export { createCheckRun, updateCheckRun, reportGateCheckRuns } from './check-runs.js';
|
|
52
|
+
export { detectMonorepoLayout, detectWorkspace, buildServiceMap, detectCycles, topologicalOrder, getTransitiveDependents, analyzeImpact, formatImpactSummary, getAffectedBuildOrder, } from './multi-repo/index.js';
|
|
53
|
+
export type { ServiceNode, ServiceMap, ServiceEdge, MonorepoLayout, WorkspaceConfig, WorkspacePackage, ImpactResult, } from './multi-repo/index.js';
|
|
54
|
+
export { decomposeTask, validateTaskGraph, getExecutionLayers } from './task-decomposer.js';
|
|
55
|
+
export type { SubTask, TaskGraph, DecompositionContext, DecompositionOptions, } from './task-decomposer.js';
|
|
56
|
+
export { HandoffExecutor } from './handoff-executor.js';
|
|
57
|
+
export type { HandoffPayload, HandoffResult, HandoffExecutorOptions } from './handoff-executor.js';
|
|
58
|
+
export { createWebhookManager, type WebhookManager, type WebhookManagerConfig, type WebhookBridges, } from './webhook-manager.js';
|
|
59
|
+
export { createSqliteAuditSink } from './audit-sqlite-sink.js';
|
|
60
|
+
export { createAuditScheduler } from './audit-scheduler.js';
|
|
61
|
+
export type { AuditSchedulerConfig, AuditScheduler } from './audit-scheduler.js';
|
|
62
|
+
export { exportAuditEntries, generateComplianceReport } from './audit-export.js';
|
|
63
|
+
export type { ExportFormat, ExportOptions, ComplianceReportOptions, ComplianceReport, } from './audit-export.js';
|
|
64
|
+
export { archiveEntries, loadArchivedEntries, verifyArchiveContinuity } from './audit-archival.js';
|
|
65
|
+
export type { ArchiveManifest, ArchivalOptions } from './audit-archival.js';
|
|
66
|
+
export { Orchestrator, type OrchestratorConfig, type WebhookConfig } from './orchestrator.js';
|
|
67
|
+
export type { OrchestratorPlugin, PluginContext, BeforeRunEvent, AfterRunEvent, RunErrorEvent, } from './plugin.js';
|
|
68
|
+
export { CostGovernancePlugin } from './cost-governance.js';
|
|
69
|
+
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';
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// ── Core orchestration ───────────────────────────────────────────────
|
|
2
|
+
export { loadConfig, loadConfigAsync } from './config.js';
|
|
3
|
+
export { validateIssue, validateIssueWithExtensions, parseComplexity } from './validate-issue.js';
|
|
4
|
+
export { executePipeline, } from './execute.js';
|
|
5
|
+
export { validateAgentOutput, } from './validate-agent-output.js';
|
|
6
|
+
export { createLogger } from './logger.js';
|
|
7
|
+
export { executeFixCI, countRetryAttempts, fetchCILogs } from './fix-ci.js';
|
|
8
|
+
// Shared utilities
|
|
9
|
+
export { getGitHubConfig, resolveRepoRoot, createDefaultAuditLog, resolveAutonomyLevel, resolveConstraints, mergeBlockedPaths, isAutonomousStrategy, recordMetric, validateAndAuditOutput, createPipelineMemory, evaluatePipelineCompliance, authorizeFilesChanged, extractIssueNumber, BRANCH_PATTERN, createAbacPermissionHook, createBlockedPathsHook, createAuditLoggingHook, createPipelineAuthorizationChain, } from './shared.js';
|
|
10
|
+
// Defaults
|
|
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';
|
|
12
|
+
// Notifications
|
|
13
|
+
export { renderTemplate } from './notifications.js';
|
|
14
|
+
// Security subsystem
|
|
15
|
+
export { createPipelineSecurity, checkKillSwitch, issueAgentCredentials, revokeAgentCredentials, classifyAndSubmitApproval, classifyApprovalTier, compareTiers, createGitHubSandbox, createGitHubJITCredentialIssuer, createGitHubSandboxProvider, createGitHubJITProvider, } from './security.js';
|
|
16
|
+
// Provenance tracking
|
|
17
|
+
export { createPipelineProvenance, attachProvenanceToPR, validatePipelineProvenance, provenanceToAnnotations, provenanceFromAnnotations, PROVENANCE_ANNOTATION_PREFIX, } from './provenance.js';
|
|
18
|
+
// Admission pipeline
|
|
19
|
+
export { createPipelineAdmission, admitIssueResource, } from './admission.js';
|
|
20
|
+
// Metrics instrumentation
|
|
21
|
+
export { createPipelineMetricStore, createInstrumentedEnforcement, createInstrumentedAutonomy, createInstrumentedExecutor, STANDARD_METRICS, instrumentExecutor, } from './instrumented.js';
|
|
22
|
+
// Agent discovery
|
|
23
|
+
export { createPipelineDiscovery, findMatchingAgent, resolveAgentForIssue, matchAgentBySkill, createStubAgentCardFetcher, createPipelineAgentCardFetcher, } from './discovery.js';
|
|
24
|
+
// Structured logging
|
|
25
|
+
export { createStructuredConsoleLogger, createStructuredBufferLogger, } from './structured-logger.js';
|
|
26
|
+
// Watch mode
|
|
27
|
+
export { startWatch } from './watch.js';
|
|
28
|
+
// Agent orchestration
|
|
29
|
+
export { createPipelineOrchestration, executePipelineOrchestration, validatePipelineHandoffs, sequential, parallel, hybrid, hierarchical, swarm, validateHandoff, simpleSchemaValidate, } from './orchestration.js';
|
|
30
|
+
// Policy evaluators
|
|
31
|
+
export { createPipelineRegoEvaluator, createPipelineCELEvaluator, createPipelineABACHook, createPipelineExpressionEvaluator, createPipelineLLMEvaluator, evaluatePipelineGate, scorePipelineComplexity, evaluatePipelineComplexityRouting, } from './policy-evaluators.js';
|
|
32
|
+
// Adapter ecosystem
|
|
33
|
+
export { createPipelineAdapterRegistry, createPipelineWebhookBridge, resolveAdapterFromGit, resolveInfrastructure, scanPipelineAdapters, } from './adapters.js';
|
|
34
|
+
// Reconcilers (generalized names)
|
|
35
|
+
export { createPipelineReconciler, createGateReconciler, createAutonomyReconciler, hasResourceChanged, fingerprintResource, } from './reconcilers.js';
|
|
36
|
+
// Extended audit
|
|
37
|
+
export { createFileAuditLog, verifyAuditIntegrity, loadAuditEntries, rotateAuditLog, computeAuditHash, } from './audit-extended.js';
|
|
38
|
+
// Extended compliance
|
|
39
|
+
export { checkFrameworkCompliance, getControlCatalog, getFrameworkMappings, listSupportedFrameworks, } from './compliance-extended.js';
|
|
40
|
+
// Extended telemetry
|
|
41
|
+
export { createSilentLogger, withPipelineSpanSync, getPipelineTracer, validateResourceSchema, } from './telemetry-extended.js';
|
|
42
|
+
// Runners
|
|
43
|
+
export { ClaudeCodeRunner, ClaudeCodeRunner as GitHubActionsRunner, GenericLLMRunner, CopilotRunner, CursorRunner, CodexRunner, RunnerRegistry, createRunnerRegistry, } from './runners/index.js';
|
|
44
|
+
// Notifications
|
|
45
|
+
export { SlackMessenger, TeamsMessenger, NotificationRouter } from './notifications/index.js';
|
|
46
|
+
// State store
|
|
47
|
+
export { StateStore } from './state/index.js';
|
|
48
|
+
// Deployment targets
|
|
49
|
+
export { createKubernetesTarget, createVercelTarget, createFlyioTarget, createHttpMetricsCollector, createStubMetricsCollector, RolloutController, } from './deploy/index.js';
|
|
50
|
+
// Progressive gates
|
|
51
|
+
export { getComplexityBand, getGateProfile, adjustEnforcement, adjustGateForComplexity, adjustGatesForComplexity, computeGateAdjustments, } from './progressive-gates.js';
|
|
52
|
+
// Process escalation
|
|
53
|
+
export { evaluateProcessEscalation, isSignificantEscalation, formatEscalationSummary, } from './process-escalation.js';
|
|
54
|
+
// Enhanced episodic memory
|
|
55
|
+
export { createEnhancedEpisodicMemory, detectRegressions, extractEpisodicPatterns, } from './episodic-enhanced.js';
|
|
56
|
+
// Context enrichment
|
|
57
|
+
export { findRelevantEpisodes, formatEpisodicContext, enrichAgentContext, } from './context-enrichment.js';
|
|
58
|
+
// Autonomy tracker
|
|
59
|
+
export { AutonomyTracker } from './autonomy-tracker.js';
|
|
60
|
+
// Cost tracker
|
|
61
|
+
export { CostTracker } from './cost-tracker.js';
|
|
62
|
+
// OTel bridge
|
|
63
|
+
export { createOTelBridge, isOTelAvailable } from './otel-exporter.js';
|
|
64
|
+
// Dashboard renderer
|
|
65
|
+
export { renderDashboardFrame } from './cli/dashboard-renderer.js';
|
|
66
|
+
// Codebase analysis
|
|
67
|
+
export { walkFiles, detectModules, parseImports, buildModuleGraph, detectConventions, detectPatterns, analyzeHotspots, computeComplexityScore, analyzeCodebase, buildCodebaseContext, formatContextForPrompt, } from './analysis/index.js';
|
|
68
|
+
// Check runs
|
|
69
|
+
export { createCheckRun, updateCheckRun, reportGateCheckRuns } from './check-runs.js';
|
|
70
|
+
// Multi-repo orchestration
|
|
71
|
+
export { detectMonorepoLayout, detectWorkspace, buildServiceMap, detectCycles, topologicalOrder, getTransitiveDependents, analyzeImpact, formatImpactSummary, getAffectedBuildOrder, } from './multi-repo/index.js';
|
|
72
|
+
// Task decomposition
|
|
73
|
+
export { decomposeTask, validateTaskGraph, getExecutionLayers } from './task-decomposer.js';
|
|
74
|
+
// Handoff execution
|
|
75
|
+
export { HandoffExecutor } from './handoff-executor.js';
|
|
76
|
+
// Webhook manager
|
|
77
|
+
export { createWebhookManager, } from './webhook-manager.js';
|
|
78
|
+
// Audit modules
|
|
79
|
+
export { createSqliteAuditSink } from './audit-sqlite-sink.js';
|
|
80
|
+
export { createAuditScheduler } from './audit-scheduler.js';
|
|
81
|
+
export { exportAuditEntries, generateComplianceReport } from './audit-export.js';
|
|
82
|
+
export { archiveEntries, loadArchivedEntries, verifyArchiveContinuity } from './audit-archival.js';
|
|
83
|
+
// Orchestrator class
|
|
84
|
+
export { Orchestrator } from './orchestrator.js';
|
|
85
|
+
// Cost governance plugin
|
|
86
|
+
export { CostGovernancePlugin } from './cost-governance.js';
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metrics instrumentation wrappers for the dogfood pipeline.
|
|
3
|
+
* Wraps enforcement and autonomy evaluation with metric recording.
|
|
4
|
+
*/
|
|
5
|
+
import { createMetricStore, instrumentExecutor, STANDARD_METRICS, type MetricStore, type MetricCategory, type MetricDefinition, type MetricDataPoint, type MetricQuery, type MetricSummary } from '@ai-sdlc/reference';
|
|
6
|
+
/**
|
|
7
|
+
* Create a metric store pre-loaded with standard metric definitions.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createPipelineMetricStore(): MetricStore;
|
|
10
|
+
/**
|
|
11
|
+
* Create an instrumented enforcement function that records per-gate metrics.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createInstrumentedEnforcement(metricStore: MetricStore): (qualityGate: import("@ai-sdlc/reference").QualityGate, ctx: import("@ai-sdlc/reference").EvaluationContext) => import("@ai-sdlc/reference").EnforcementResult;
|
|
14
|
+
/**
|
|
15
|
+
* Create instrumented autonomy callbacks for promotion/demotion metrics.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createInstrumentedAutonomy(metricStore: MetricStore): {
|
|
18
|
+
onPromotion: (agent: string, fromLevel: number, toLevel: number) => void;
|
|
19
|
+
onDemotion: (agent: string, fromLevel: number, toLevel: number) => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Create an instrumented executor that records task execution metrics.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createInstrumentedExecutor(metricStore: MetricStore): (plan: import("@ai-sdlc/reference").OrchestrationPlan, agents: Map<string, import("@ai-sdlc/reference").AgentRole>, taskFn: import("@ai-sdlc/reference").TaskFn, options?: import("@ai-sdlc/reference").ExecutionOptions) => Promise<import("@ai-sdlc/reference").OrchestrationResult>;
|
|
25
|
+
export { STANDARD_METRICS, createMetricStore, instrumentExecutor };
|
|
26
|
+
export type { MetricStore, MetricCategory, MetricDefinition, MetricDataPoint, MetricQuery, MetricSummary, };
|
|
27
|
+
//# sourceMappingURL=instrumented.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metrics instrumentation wrappers for the dogfood pipeline.
|
|
3
|
+
* Wraps enforcement and autonomy evaluation with metric recording.
|
|
4
|
+
*/
|
|
5
|
+
import { createMetricStore, instrumentEnforcement, instrumentAutonomy, instrumentExecutor, executeOrchestration, STANDARD_METRICS, enforce, } from '@ai-sdlc/reference';
|
|
6
|
+
/**
|
|
7
|
+
* Create a metric store pre-loaded with standard metric definitions.
|
|
8
|
+
*/
|
|
9
|
+
export function createPipelineMetricStore() {
|
|
10
|
+
return createMetricStore();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create an instrumented enforcement function that records per-gate metrics.
|
|
14
|
+
*/
|
|
15
|
+
export function createInstrumentedEnforcement(metricStore) {
|
|
16
|
+
const config = { metricStore };
|
|
17
|
+
return instrumentEnforcement(enforce, config);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create instrumented autonomy callbacks for promotion/demotion metrics.
|
|
21
|
+
*/
|
|
22
|
+
export function createInstrumentedAutonomy(metricStore) {
|
|
23
|
+
const config = { metricStore };
|
|
24
|
+
return instrumentAutonomy(config);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create an instrumented executor that records task execution metrics.
|
|
28
|
+
*/
|
|
29
|
+
export function createInstrumentedExecutor(metricStore) {
|
|
30
|
+
const config = { metricStore };
|
|
31
|
+
return instrumentExecutor(executeOrchestration, config);
|
|
32
|
+
}
|
|
33
|
+
export { STANDARD_METRICS, createMetricStore, instrumentExecutor };
|
|
34
|
+
//# sourceMappingURL=instrumented.js.map
|
package/dist/logger.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured logger with stage timing for the AI-SDLC pipeline.
|
|
3
|
+
*/
|
|
4
|
+
export interface Logger {
|
|
5
|
+
/** Mark the start of a named stage. */
|
|
6
|
+
stage(name: string): void;
|
|
7
|
+
/** Mark the end of a named stage and record its duration. */
|
|
8
|
+
stageEnd(name: string): void;
|
|
9
|
+
/** Log an informational message. */
|
|
10
|
+
info(msg: string): void;
|
|
11
|
+
/** Log an error message. */
|
|
12
|
+
error(msg: string): void;
|
|
13
|
+
/** Print a summary of all stage durations and total time. */
|
|
14
|
+
summary(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createLogger(): Logger;
|
|
17
|
+
//# sourceMappingURL=logger.d.ts.map
|
package/dist/logger.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured logger with stage timing for the AI-SDLC pipeline.
|
|
3
|
+
*/
|
|
4
|
+
export function createLogger() {
|
|
5
|
+
const starts = new Map();
|
|
6
|
+
const durations = new Map();
|
|
7
|
+
const pipelineStart = performance.now();
|
|
8
|
+
return {
|
|
9
|
+
stage(name) {
|
|
10
|
+
starts.set(name, performance.now());
|
|
11
|
+
console.log(`[ai-sdlc] \u25B8 ${name}`);
|
|
12
|
+
},
|
|
13
|
+
stageEnd(name) {
|
|
14
|
+
const start = starts.get(name);
|
|
15
|
+
if (start !== undefined) {
|
|
16
|
+
const duration = Math.round(performance.now() - start);
|
|
17
|
+
durations.set(name, duration);
|
|
18
|
+
console.log(`[ai-sdlc] \u2713 ${name} (${duration}ms)`);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
info(msg) {
|
|
22
|
+
console.log(`[ai-sdlc] ${msg}`);
|
|
23
|
+
},
|
|
24
|
+
error(msg) {
|
|
25
|
+
console.error(`[ai-sdlc] ERROR: ${msg}`);
|
|
26
|
+
},
|
|
27
|
+
summary() {
|
|
28
|
+
const total = Math.round(performance.now() - pipelineStart);
|
|
29
|
+
console.log(`[ai-sdlc] --- Pipeline Summary ---`);
|
|
30
|
+
for (const [name, ms] of durations) {
|
|
31
|
+
console.log(`[ai-sdlc] ${name}: ${ms}ms`);
|
|
32
|
+
}
|
|
33
|
+
console.log(`[ai-sdlc] total: ${total}ms`);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Impact analyzer — traces changed files to affected downstream services.
|
|
3
|
+
*
|
|
4
|
+
* Given a set of changed files and a ServiceMap, determines which services
|
|
5
|
+
* are directly affected (contain changed files) and which are transitively
|
|
6
|
+
* affected (depend on directly affected services).
|
|
7
|
+
*/
|
|
8
|
+
import type { ServiceMap, ImpactResult } from './types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Analyze the impact of changed files across a service map.
|
|
11
|
+
*/
|
|
12
|
+
export declare function analyzeImpact(serviceMap: ServiceMap, changedFiles: string[]): ImpactResult;
|
|
13
|
+
/**
|
|
14
|
+
* Get a summary of the impact for logging or notification.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatImpactSummary(impact: ImpactResult): string;
|
|
17
|
+
/**
|
|
18
|
+
* Determine the recommended build order for affected services.
|
|
19
|
+
* Returns services in dependency order (leaf dependencies first).
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAffectedBuildOrder(serviceMap: ServiceMap, impact: ImpactResult): string[];
|
|
22
|
+
//# sourceMappingURL=impact-analyzer.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Impact analyzer — traces changed files to affected downstream services.
|
|
3
|
+
*
|
|
4
|
+
* Given a set of changed files and a ServiceMap, determines which services
|
|
5
|
+
* are directly affected (contain changed files) and which are transitively
|
|
6
|
+
* affected (depend on directly affected services).
|
|
7
|
+
*/
|
|
8
|
+
import { relative, normalize } from 'node:path';
|
|
9
|
+
import { getTransitiveDependents } from './service-map-builder.js';
|
|
10
|
+
/**
|
|
11
|
+
* Analyze the impact of changed files across a service map.
|
|
12
|
+
*/
|
|
13
|
+
export function analyzeImpact(serviceMap, changedFiles) {
|
|
14
|
+
const directlyAffected = new Set();
|
|
15
|
+
// Normalize changed files to relative paths from root
|
|
16
|
+
const normalizedFiles = changedFiles.map((f) => {
|
|
17
|
+
if (f.startsWith('/') || f.startsWith(serviceMap.rootPath)) {
|
|
18
|
+
return normalize(relative(serviceMap.rootPath, f));
|
|
19
|
+
}
|
|
20
|
+
return normalize(f);
|
|
21
|
+
});
|
|
22
|
+
// Find directly affected services (contain changed files)
|
|
23
|
+
for (const file of normalizedFiles) {
|
|
24
|
+
for (const service of serviceMap.services) {
|
|
25
|
+
const serviceRelPath = normalize(relative(serviceMap.rootPath, service.path));
|
|
26
|
+
if (file.startsWith(serviceRelPath + '/') || file === serviceRelPath) {
|
|
27
|
+
directlyAffected.add(service.name);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// Find transitively affected services
|
|
32
|
+
const transitivelyAffected = new Set();
|
|
33
|
+
for (const name of directlyAffected) {
|
|
34
|
+
const transitive = getTransitiveDependents(serviceMap, name);
|
|
35
|
+
for (const t of transitive) {
|
|
36
|
+
if (!directlyAffected.has(t)) {
|
|
37
|
+
transitivelyAffected.add(t);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const allAffected = new Set([...directlyAffected, ...transitivelyAffected]);
|
|
42
|
+
const unaffected = serviceMap.services
|
|
43
|
+
.map((s) => s.name)
|
|
44
|
+
.filter((name) => !allAffected.has(name));
|
|
45
|
+
return {
|
|
46
|
+
changedFiles,
|
|
47
|
+
directlyAffected: [...directlyAffected],
|
|
48
|
+
transitivelyAffected: [...transitivelyAffected],
|
|
49
|
+
allAffected: [...allAffected],
|
|
50
|
+
unaffected,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get a summary of the impact for logging or notification.
|
|
55
|
+
*/
|
|
56
|
+
export function formatImpactSummary(impact) {
|
|
57
|
+
const lines = [];
|
|
58
|
+
if (impact.directlyAffected.length > 0) {
|
|
59
|
+
lines.push(`Directly affected: ${impact.directlyAffected.join(', ')}`);
|
|
60
|
+
}
|
|
61
|
+
if (impact.transitivelyAffected.length > 0) {
|
|
62
|
+
lines.push(`Transitively affected: ${impact.transitivelyAffected.join(', ')}`);
|
|
63
|
+
}
|
|
64
|
+
if (impact.unaffected.length > 0) {
|
|
65
|
+
lines.push(`Unaffected: ${impact.unaffected.join(', ')}`);
|
|
66
|
+
}
|
|
67
|
+
return lines.join('\n');
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Determine the recommended build order for affected services.
|
|
71
|
+
* Returns services in dependency order (leaf dependencies first).
|
|
72
|
+
*/
|
|
73
|
+
export function getAffectedBuildOrder(serviceMap, impact) {
|
|
74
|
+
const affected = new Set(impact.allAffected);
|
|
75
|
+
const result = [];
|
|
76
|
+
const visited = new Set();
|
|
77
|
+
const adjacency = new Map();
|
|
78
|
+
for (const node of serviceMap.services) {
|
|
79
|
+
adjacency.set(node.name, node.dependencies.filter((d) => affected.has(d)));
|
|
80
|
+
}
|
|
81
|
+
function visit(name) {
|
|
82
|
+
if (visited.has(name) || !affected.has(name))
|
|
83
|
+
return;
|
|
84
|
+
visited.add(name);
|
|
85
|
+
for (const dep of adjacency.get(name) ?? []) {
|
|
86
|
+
visit(dep);
|
|
87
|
+
}
|
|
88
|
+
result.push(name);
|
|
89
|
+
}
|
|
90
|
+
for (const name of affected) {
|
|
91
|
+
visit(name);
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=impact-analyzer.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ServiceNode, ServiceMap, ServiceEdge, MonorepoLayout, WorkspaceConfig, WorkspacePackage, ImpactResult, } from './types.js';
|
|
2
|
+
export { detectMonorepoLayout, detectWorkspace } from './monorepo-detector.js';
|
|
3
|
+
export { buildServiceMap, detectCycles, topologicalOrder, getTransitiveDependents, } from './service-map-builder.js';
|
|
4
|
+
export { analyzeImpact, formatImpactSummary, getAffectedBuildOrder } from './impact-analyzer.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { detectMonorepoLayout, detectWorkspace } from './monorepo-detector.js';
|
|
2
|
+
export { buildServiceMap, detectCycles, topologicalOrder, getTransitiveDependents, } from './service-map-builder.js';
|
|
3
|
+
export { analyzeImpact, formatImpactSummary, getAffectedBuildOrder } from './impact-analyzer.js';
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monorepo workspace detection — heuristic detection of workspace type
|
|
3
|
+
* by scanning for configuration files (pnpm-workspace.yaml, go.work, etc.).
|
|
4
|
+
*
|
|
5
|
+
* Design decision D3: Heuristic workspace detection.
|
|
6
|
+
*/
|
|
7
|
+
import type { MonorepoLayout, WorkspaceConfig } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Detect the monorepo layout of a directory by scanning for workspace config files.
|
|
10
|
+
*/
|
|
11
|
+
export declare function detectMonorepoLayout(rootPath: string): MonorepoLayout;
|
|
12
|
+
/**
|
|
13
|
+
* Enumerate all packages in a workspace.
|
|
14
|
+
*/
|
|
15
|
+
export declare function detectWorkspace(rootPath: string): WorkspaceConfig;
|
|
16
|
+
//# sourceMappingURL=monorepo-detector.d.ts.map
|