@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.
Files changed (203) hide show
  1. package/dist/adapters.d.ts +60 -0
  2. package/dist/adapters.js +160 -0
  3. package/dist/admission.d.ts +49 -0
  4. package/dist/admission.js +90 -0
  5. package/dist/analysis/analyzer.d.ts +10 -0
  6. package/dist/analysis/analyzer.js +67 -0
  7. package/dist/analysis/complexity-scorer.d.ts +24 -0
  8. package/dist/analysis/complexity-scorer.js +39 -0
  9. package/dist/analysis/context-builder.d.ts +14 -0
  10. package/dist/analysis/context-builder.js +79 -0
  11. package/dist/analysis/convention-detector.d.ts +9 -0
  12. package/dist/analysis/convention-detector.js +177 -0
  13. package/dist/analysis/dependency-parser.d.ts +17 -0
  14. package/dist/analysis/dependency-parser.js +167 -0
  15. package/dist/analysis/file-walker.d.ts +18 -0
  16. package/dist/analysis/file-walker.js +158 -0
  17. package/dist/analysis/hotspot-analyzer.d.ts +28 -0
  18. package/dist/analysis/hotspot-analyzer.js +85 -0
  19. package/dist/analysis/index.d.ts +13 -0
  20. package/dist/analysis/index.js +12 -0
  21. package/dist/analysis/pattern-detector.d.ts +10 -0
  22. package/dist/analysis/pattern-detector.js +86 -0
  23. package/dist/analysis/types.d.ts +94 -0
  24. package/dist/analysis/types.js +5 -0
  25. package/dist/audit-archival.d.ts +48 -0
  26. package/dist/audit-archival.js +72 -0
  27. package/dist/audit-export.d.ts +45 -0
  28. package/dist/audit-export.js +100 -0
  29. package/dist/audit-extended.d.ts +28 -0
  30. package/dist/audit-extended.js +38 -0
  31. package/dist/audit-scheduler.d.ts +32 -0
  32. package/dist/audit-scheduler.js +52 -0
  33. package/dist/audit-sqlite-sink.d.ts +11 -0
  34. package/dist/audit-sqlite-sink.js +51 -0
  35. package/dist/autonomy-tracker.d.ts +76 -0
  36. package/dist/autonomy-tracker.js +277 -0
  37. package/dist/check-runs.d.ts +37 -0
  38. package/dist/check-runs.js +72 -0
  39. package/dist/cli/commands/agents.d.ts +6 -0
  40. package/dist/cli/commands/agents.js +33 -0
  41. package/dist/cli/commands/complexity.d.ts +6 -0
  42. package/dist/cli/commands/complexity.js +35 -0
  43. package/dist/cli/commands/cost.d.ts +6 -0
  44. package/dist/cli/commands/cost.js +53 -0
  45. package/dist/cli/commands/dashboard.d.ts +9 -0
  46. package/dist/cli/commands/dashboard.js +50 -0
  47. package/dist/cli/commands/health.d.ts +6 -0
  48. package/dist/cli/commands/health.js +33 -0
  49. package/dist/cli/commands/init.d.ts +6 -0
  50. package/dist/cli/commands/init.js +127 -0
  51. package/dist/cli/commands/routing.d.ts +6 -0
  52. package/dist/cli/commands/routing.js +46 -0
  53. package/dist/cli/commands/run.d.ts +6 -0
  54. package/dist/cli/commands/run.js +36 -0
  55. package/dist/cli/commands/start.d.ts +6 -0
  56. package/dist/cli/commands/start.js +26 -0
  57. package/dist/cli/commands/status.d.ts +6 -0
  58. package/dist/cli/commands/status.js +34 -0
  59. package/dist/cli/dashboard-renderer.d.ts +24 -0
  60. package/dist/cli/dashboard-renderer.js +129 -0
  61. package/dist/cli/formatters/index.d.ts +6 -0
  62. package/dist/cli/formatters/index.js +18 -0
  63. package/dist/cli/formatters/json.d.ts +5 -0
  64. package/dist/cli/formatters/json.js +7 -0
  65. package/dist/cli/formatters/minimal.d.ts +5 -0
  66. package/dist/cli/formatters/minimal.js +36 -0
  67. package/dist/cli/formatters/table.d.ts +5 -0
  68. package/dist/cli/formatters/table.js +184 -0
  69. package/dist/cli/index.d.ts +6 -0
  70. package/dist/cli/index.js +35 -0
  71. package/dist/compliance-extended.d.ts +41 -0
  72. package/dist/compliance-extended.js +58 -0
  73. package/dist/config.d.ts +26 -0
  74. package/dist/config.js +66 -0
  75. package/dist/context-enrichment.d.ts +33 -0
  76. package/dist/context-enrichment.js +125 -0
  77. package/dist/cost-governance.d.ts +22 -0
  78. package/dist/cost-governance.js +106 -0
  79. package/dist/cost-tracker.d.ts +75 -0
  80. package/dist/cost-tracker.js +177 -0
  81. package/dist/defaults.d.ts +140 -0
  82. package/dist/defaults.js +218 -0
  83. package/dist/deploy/flyio-target.d.ts +19 -0
  84. package/dist/deploy/flyio-target.js +114 -0
  85. package/dist/deploy/index.d.ts +15 -0
  86. package/dist/deploy/index.js +11 -0
  87. package/dist/deploy/kubernetes-target.d.ts +25 -0
  88. package/dist/deploy/kubernetes-target.js +124 -0
  89. package/dist/deploy/metrics-collector.d.ts +31 -0
  90. package/dist/deploy/metrics-collector.js +75 -0
  91. package/dist/deploy/rollout-controller.d.ts +42 -0
  92. package/dist/deploy/rollout-controller.js +192 -0
  93. package/dist/deploy/rollout-types.d.ts +86 -0
  94. package/dist/deploy/rollout-types.js +5 -0
  95. package/dist/deploy/types.d.ts +47 -0
  96. package/dist/deploy/types.js +5 -0
  97. package/dist/deploy/vercel-target.d.ts +16 -0
  98. package/dist/deploy/vercel-target.js +115 -0
  99. package/dist/discovery.d.ts +26 -0
  100. package/dist/discovery.js +46 -0
  101. package/dist/episodic-enhanced.d.ts +88 -0
  102. package/dist/episodic-enhanced.js +212 -0
  103. package/dist/execute.d.ts +81 -0
  104. package/dist/execute.js +703 -0
  105. package/dist/fix-ci.d.ts +61 -0
  106. package/dist/fix-ci.js +380 -0
  107. package/dist/handoff-executor.d.ts +61 -0
  108. package/dist/handoff-executor.js +119 -0
  109. package/dist/index.d.ts +70 -0
  110. package/dist/index.js +87 -0
  111. package/dist/instrumented.d.ts +27 -0
  112. package/dist/instrumented.js +34 -0
  113. package/dist/logger.d.ts +17 -0
  114. package/dist/logger.js +37 -0
  115. package/dist/multi-repo/impact-analyzer.d.ts +22 -0
  116. package/dist/multi-repo/impact-analyzer.js +95 -0
  117. package/dist/multi-repo/index.d.ts +5 -0
  118. package/dist/multi-repo/index.js +4 -0
  119. package/dist/multi-repo/monorepo-detector.d.ts +16 -0
  120. package/dist/multi-repo/monorepo-detector.js +246 -0
  121. package/dist/multi-repo/service-map-builder.d.ts +24 -0
  122. package/dist/multi-repo/service-map-builder.js +235 -0
  123. package/dist/multi-repo/types.d.ts +54 -0
  124. package/dist/multi-repo/types.js +5 -0
  125. package/dist/notifications/index.d.ts +4 -0
  126. package/dist/notifications/index.js +4 -0
  127. package/dist/notifications/notification-router.d.ts +62 -0
  128. package/dist/notifications/notification-router.js +206 -0
  129. package/dist/notifications/slack-messenger.d.ts +26 -0
  130. package/dist/notifications/slack-messenger.js +69 -0
  131. package/dist/notifications/teams-messenger.d.ts +21 -0
  132. package/dist/notifications/teams-messenger.js +85 -0
  133. package/dist/notifications.d.ts +13 -0
  134. package/dist/notifications.js +15 -0
  135. package/dist/orchestration.d.ts +20 -0
  136. package/dist/orchestration.js +53 -0
  137. package/dist/orchestrator.d.ts +160 -0
  138. package/dist/orchestrator.js +372 -0
  139. package/dist/otel-exporter.d.ts +37 -0
  140. package/dist/otel-exporter.js +128 -0
  141. package/dist/plugin.d.ts +45 -0
  142. package/dist/plugin.js +8 -0
  143. package/dist/policy-evaluators.d.ts +40 -0
  144. package/dist/policy-evaluators.js +57 -0
  145. package/dist/process-escalation.d.ts +38 -0
  146. package/dist/process-escalation.js +129 -0
  147. package/dist/progressive-gates.d.ts +54 -0
  148. package/dist/progressive-gates.js +135 -0
  149. package/dist/provenance.d.ts +29 -0
  150. package/dist/provenance.js +61 -0
  151. package/dist/reconcilers.d.ts +28 -0
  152. package/dist/reconcilers.js +37 -0
  153. package/dist/runners/claude-code.d.ts +17 -0
  154. package/dist/runners/claude-code.js +200 -0
  155. package/dist/runners/codex.d.ts +19 -0
  156. package/dist/runners/codex.js +153 -0
  157. package/dist/runners/copilot-stub.d.ts +9 -0
  158. package/dist/runners/copilot-stub.js +15 -0
  159. package/dist/runners/copilot.d.ts +15 -0
  160. package/dist/runners/copilot.js +119 -0
  161. package/dist/runners/cursor-stub.d.ts +9 -0
  162. package/dist/runners/cursor-stub.js +15 -0
  163. package/dist/runners/cursor.d.ts +20 -0
  164. package/dist/runners/cursor.js +140 -0
  165. package/dist/runners/devin-stub.d.ts +9 -0
  166. package/dist/runners/devin-stub.js +15 -0
  167. package/dist/runners/generic-llm.d.ts +51 -0
  168. package/dist/runners/generic-llm.js +125 -0
  169. package/dist/runners/index.d.ts +8 -0
  170. package/dist/runners/index.js +7 -0
  171. package/dist/runners/runner-registry.d.ts +50 -0
  172. package/dist/runners/runner-registry.js +156 -0
  173. package/dist/runners/types.d.ts +59 -0
  174. package/dist/runners/types.js +7 -0
  175. package/dist/security.d.ts +51 -0
  176. package/dist/security.js +70 -0
  177. package/dist/shared.d.ts +134 -0
  178. package/dist/shared.js +284 -0
  179. package/dist/state/index.d.ts +4 -0
  180. package/dist/state/index.js +3 -0
  181. package/dist/state/schema.d.ts +16 -0
  182. package/dist/state/schema.js +264 -0
  183. package/dist/state/store.d.ts +109 -0
  184. package/dist/state/store.js +644 -0
  185. package/dist/state/types.d.ts +190 -0
  186. package/dist/state/types.js +5 -0
  187. package/dist/structured-logger.d.ts +20 -0
  188. package/dist/structured-logger.js +64 -0
  189. package/dist/task-decomposer.d.ts +61 -0
  190. package/dist/task-decomposer.js +265 -0
  191. package/dist/telemetry-extended.d.ts +24 -0
  192. package/dist/telemetry-extended.js +31 -0
  193. package/dist/types.d.ts +9 -0
  194. package/dist/types.js +7 -0
  195. package/dist/validate-agent-output.d.ts +30 -0
  196. package/dist/validate-agent-output.js +81 -0
  197. package/dist/validate-issue.d.ts +25 -0
  198. package/dist/validate-issue.js +102 -0
  199. package/dist/watch.d.ts +43 -0
  200. package/dist/watch.js +99 -0
  201. package/dist/webhook-manager.d.ts +38 -0
  202. package/dist/webhook-manager.js +66 -0
  203. package/package.json +59 -0
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Security context module — integrates enterprise security primitives
3
+ * (sandbox, JIT credentials, kill switch, approval workflow) into the
4
+ * AI-SDLC pipeline.
5
+ *
6
+ * Uses stub implementations from the reference for testability.
7
+ */
8
+ import { createGitHubSandbox, createGitHubJITCredentialIssuer, classifyApprovalTier, compareTiers, type Sandbox, type JITCredentialIssuer, type JITCredential, type KillSwitch, type ApprovalWorkflow, type ApprovalTier, type ApprovalRequest, type CodespacesClient, type GitHubSandboxConfig, type SecretsClient, type SecretEncryptor, type GitHubJITConfig, type NetworkPolicy, type SandboxConstraints, type SandboxStatus, type ApprovalStatus, type ApprovalClassificationInput } from '@ai-sdlc/reference';
9
+ export interface SecurityContext {
10
+ sandbox: Sandbox;
11
+ jitCredentials: JITCredentialIssuer;
12
+ killSwitch: KillSwitch;
13
+ approvalWorkflow: ApprovalWorkflow;
14
+ }
15
+ /**
16
+ * Create a pipeline security context using stub implementations.
17
+ * Accepts optional partial overrides to replace individual primitives.
18
+ */
19
+ export declare function createPipelineSecurity(overrides?: Partial<SecurityContext>): SecurityContext;
20
+ /**
21
+ * Check the kill switch and throw if active.
22
+ */
23
+ export declare function checkKillSwitch(security: SecurityContext): Promise<void>;
24
+ /**
25
+ * Issue JIT credentials for an agent with a scoped TTL.
26
+ */
27
+ export declare function issueAgentCredentials(security: SecurityContext, agentId: string, scope?: string[], ttlMs?: number): Promise<JITCredential>;
28
+ /**
29
+ * Revoke agent credentials after execution.
30
+ */
31
+ export declare function revokeAgentCredentials(security: SecurityContext, credentialId: string): Promise<void>;
32
+ /**
33
+ * Classify the required approval tier and submit an approval request.
34
+ * Returns the request (auto-approved if tier is 'auto').
35
+ */
36
+ export declare function classifyAndSubmitApproval(security: SecurityContext, complexityScore: number, requester: string, description: string, opts?: {
37
+ securitySensitive?: boolean;
38
+ isInfraChange?: boolean;
39
+ }): Promise<ApprovalRequest>;
40
+ /**
41
+ * Create a GitHub Codespace-backed sandbox (requires CodespacesClient).
42
+ */
43
+ export declare function createGitHubSandboxProvider(client: CodespacesClient, config: GitHubSandboxConfig): Sandbox;
44
+ /**
45
+ * Create a GitHub Secrets-backed JIT credential issuer (requires SecretsClient).
46
+ * Encryptor can be provided via config.encryptor.
47
+ */
48
+ export declare function createGitHubJITProvider(client: SecretsClient, config: GitHubJITConfig): JITCredentialIssuer;
49
+ export { classifyApprovalTier, compareTiers, createGitHubSandbox, createGitHubJITCredentialIssuer };
50
+ export type { ApprovalTier, ApprovalRequest, JITCredential, CodespacesClient, GitHubSandboxConfig, SecretsClient, SecretEncryptor, GitHubJITConfig, NetworkPolicy, SandboxConstraints, SandboxStatus, ApprovalStatus, ApprovalClassificationInput, };
51
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Security context module — integrates enterprise security primitives
3
+ * (sandbox, JIT credentials, kill switch, approval workflow) into the
4
+ * AI-SDLC pipeline.
5
+ *
6
+ * Uses stub implementations from the reference for testability.
7
+ */
8
+ import { createStubSandbox, createStubJITCredentialIssuer, createStubKillSwitch, createStubApprovalWorkflow, createGitHubSandbox, createGitHubJITCredentialIssuer, classifyApprovalTier, compareTiers, } from '@ai-sdlc/reference';
9
+ import { DEFAULT_JIT_TTL_MS, DEFAULT_JIT_SCOPE } from './defaults.js';
10
+ /**
11
+ * Create a pipeline security context using stub implementations.
12
+ * Accepts optional partial overrides to replace individual primitives.
13
+ */
14
+ export function createPipelineSecurity(overrides) {
15
+ return {
16
+ sandbox: overrides?.sandbox ?? createStubSandbox(),
17
+ jitCredentials: overrides?.jitCredentials ?? createStubJITCredentialIssuer(),
18
+ killSwitch: overrides?.killSwitch ?? createStubKillSwitch(),
19
+ approvalWorkflow: overrides?.approvalWorkflow ?? createStubApprovalWorkflow(),
20
+ };
21
+ }
22
+ /**
23
+ * Check the kill switch and throw if active.
24
+ */
25
+ export async function checkKillSwitch(security) {
26
+ const active = await security.killSwitch.isActive();
27
+ if (active) {
28
+ const reason = await security.killSwitch.getReason();
29
+ throw new Error(`Pipeline aborted: kill switch active — ${reason ?? 'no reason given'}`);
30
+ }
31
+ }
32
+ /**
33
+ * Issue JIT credentials for an agent with a scoped TTL.
34
+ */
35
+ export async function issueAgentCredentials(security, agentId, scope = DEFAULT_JIT_SCOPE, ttlMs = DEFAULT_JIT_TTL_MS) {
36
+ return security.jitCredentials.issue(agentId, scope, ttlMs);
37
+ }
38
+ /**
39
+ * Revoke agent credentials after execution.
40
+ */
41
+ export async function revokeAgentCredentials(security, credentialId) {
42
+ await security.jitCredentials.revoke(credentialId);
43
+ }
44
+ /**
45
+ * Classify the required approval tier and submit an approval request.
46
+ * Returns the request (auto-approved if tier is 'auto').
47
+ */
48
+ export async function classifyAndSubmitApproval(security, complexityScore, requester, description, opts) {
49
+ const tier = classifyApprovalTier({
50
+ complexityScore,
51
+ securitySensitive: opts?.securitySensitive,
52
+ isInfraChange: opts?.isInfraChange,
53
+ });
54
+ return security.approvalWorkflow.submit(tier, requester, description);
55
+ }
56
+ /**
57
+ * Create a GitHub Codespace-backed sandbox (requires CodespacesClient).
58
+ */
59
+ export function createGitHubSandboxProvider(client, config) {
60
+ return createGitHubSandbox(client, config);
61
+ }
62
+ /**
63
+ * Create a GitHub Secrets-backed JIT credential issuer (requires SecretsClient).
64
+ * Encryptor can be provided via config.encryptor.
65
+ */
66
+ export function createGitHubJITProvider(client, config) {
67
+ return createGitHubJITCredentialIssuer(client, config);
68
+ }
69
+ export { classifyApprovalTier, compareTiers, createGitHubSandbox, createGitHubJITCredentialIssuer };
70
+ //# sourceMappingURL=security.js.map
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Shared utilities extracted from execute.ts and fix-ci.ts.
3
+ * Eliminates ~400 lines of duplicated logic across orchestrators.
4
+ */
5
+ import { type AuditLog, type AgentConstraints, type AutonomyLevel, type AutonomyPolicy, type Permissions, type MetricStore, type AgentMemory, type ComplianceCoverageReport, type SecretStore, type AuthorizationHook, type AuthorizationContext, type AuthorizationResult } from '@ai-sdlc/reference';
6
+ export declare function execFileAsync(cmd: string, args: string[], opts?: Record<string, unknown>): Promise<{
7
+ stdout: string;
8
+ stderr: string;
9
+ }>;
10
+ /**
11
+ * Replace `{key}` placeholders in a string with values from `vars`.
12
+ * Unknown keys are left as-is.
13
+ */
14
+ export declare function interpolate(text: string, vars: Record<string, string>): string;
15
+ /**
16
+ * Interpolate a branch name pattern by replacing `{key}` placeholders.
17
+ * Falls back to `ai-sdlc/issue-{issueNumber}` when no pattern is provided.
18
+ */
19
+ export declare function interpolateBranchPattern(pattern: string | undefined, vars: Record<string, string>): string;
20
+ /**
21
+ * Interpolate a PR title template by replacing `{key}` placeholders.
22
+ * Falls back to `fix: {issueTitle} (#{issueNumber})` when no template is provided.
23
+ */
24
+ export declare function interpolatePRTitle(template: string | undefined, vars: Record<string, string>): string;
25
+ export declare const BRANCH_PATTERN: RegExp;
26
+ /**
27
+ * Extract the issue number from an `ai-sdlc/issue-N` branch name.
28
+ * Returns null if the branch doesn't match the pattern.
29
+ */
30
+ export declare function extractIssueNumber(branch: string): number | null;
31
+ export interface GitHubEnvConfig {
32
+ org: string;
33
+ repo: string;
34
+ token: string | undefined;
35
+ }
36
+ /**
37
+ * Read GitHub org/repo/token from standard environment variables.
38
+ * Accepts an optional SecretStore to resolve the token through the
39
+ * adapter system instead of reading process.env directly.
40
+ *
41
+ * Falls back to empty strings when no env vars are set — explicit
42
+ * configuration is required for production use.
43
+ */
44
+ export declare function getGitHubConfig(secretStore?: SecretStore): GitHubEnvConfig;
45
+ /**
46
+ * Resolve the repository root directory using `git rev-parse`.
47
+ */
48
+ export declare function resolveRepoRoot(): Promise<string>;
49
+ /**
50
+ * Create the default JSONL-backed audit log for a work directory.
51
+ */
52
+ export declare function createDefaultAuditLog(workDir: string): AuditLog;
53
+ /**
54
+ * Find the applicable autonomy level from the policy.
55
+ * @param maxLevel Maximum level to search for (default 1).
56
+ */
57
+ export declare function resolveAutonomyLevel(policy: AutonomyPolicy, maxLevel?: number): AutonomyLevel;
58
+ /**
59
+ * Merge blocked paths from agent constraints and autonomy guardrails,
60
+ * deduplicating the result.
61
+ */
62
+ export declare function mergeBlockedPaths(constraints: AgentConstraints, guardrails: {
63
+ blockedPaths?: string[];
64
+ }): string[];
65
+ /**
66
+ * Resolve the effective agent constraints from an AgentRole and autonomy level.
67
+ */
68
+ export declare function resolveConstraints(agentConstraints: AgentConstraints | undefined, autonomyLevel: AutonomyLevel): {
69
+ maxFiles: number;
70
+ requireTests: boolean;
71
+ blockedPaths: string[];
72
+ };
73
+ /**
74
+ * Check if a routing strategy allows fully autonomous execution.
75
+ */
76
+ export declare function isAutonomousStrategy(strategy: string): boolean;
77
+ /**
78
+ * Record a metric to an optional MetricStore (no-ops if store is undefined).
79
+ */
80
+ export declare function recordMetric(store: MetricStore | undefined, metric: string, value: number): void;
81
+ import type { Logger } from './logger.js';
82
+ export interface ValidateAndAuditParams {
83
+ filesChanged: string[];
84
+ workDir: string;
85
+ constraints: {
86
+ maxFilesPerChange: number;
87
+ requireTests: boolean;
88
+ blockedPaths: string[];
89
+ };
90
+ guardrails: {
91
+ maxLinesPerPR?: number;
92
+ };
93
+ auditLog: AuditLog;
94
+ log: Logger;
95
+ /** Optional callback to post a comment on validation failure. */
96
+ onViolation?: (violationList: string) => Promise<void>;
97
+ }
98
+ /**
99
+ * Validate agent output against guardrails and record audit entries.
100
+ * Throws on guardrail violations.
101
+ */
102
+ export declare function validateAndAuditOutput(params: ValidateAndAuditParams): Promise<void>;
103
+ /**
104
+ * Create a pipeline agent memory backed by local files.
105
+ */
106
+ export declare function createPipelineMemory(workDir: string): AgentMemory;
107
+ /**
108
+ * Evaluate pipeline compliance across all regulatory frameworks.
109
+ */
110
+ export declare function evaluatePipelineCompliance(hasMemory: boolean): ComplianceCoverageReport[];
111
+ /**
112
+ * Authorize a list of files against ABAC permissions and agent constraints.
113
+ * Throws on the first denied file.
114
+ */
115
+ export declare function authorizeFilesChanged(files: string[], permissions: Permissions, constraints: AgentConstraints | undefined, auditLog: AuditLog, actor: string): void;
116
+ /**
117
+ * Create an ABAC permission-check hook wrapping the existing authorize().
118
+ */
119
+ export declare function createAbacPermissionHook(permissions: Permissions, constraints: AgentConstraints | undefined): AuthorizationHook;
120
+ /**
121
+ * Create a blocked-paths guardrail hook.
122
+ */
123
+ export declare function createBlockedPathsHook(blockedPaths: string[]): AuthorizationHook;
124
+ /**
125
+ * Create an audit logging hook that records authorization decisions.
126
+ */
127
+ export declare function createAuditLoggingHook(auditLog: AuditLog): AuthorizationHook;
128
+ /**
129
+ * Compose multiple AuthorizationHook functions into a chain.
130
+ * Hooks are executed in order; the first denial short-circuits.
131
+ */
132
+ export declare function createPipelineAuthorizationChain(hooks: AuthorizationHook[]): AuthorizationHook;
133
+ export type { AuthorizationHook, AuthorizationContext, AuthorizationResult };
134
+ //# sourceMappingURL=shared.d.ts.map
package/dist/shared.js ADDED
@@ -0,0 +1,284 @@
1
+ /**
2
+ * Shared utilities extracted from execute.ts and fix-ci.ts.
3
+ * Eliminates ~400 lines of duplicated logic across orchestrators.
4
+ */
5
+ import { execFile } from 'node:child_process';
6
+ import { join } from 'node:path';
7
+ import { createAuditLog, createFileSink, authorize, checkAllFrameworks, createAgentMemory, createFileLongTermMemory, createFileEpisodicMemory, } from '@ai-sdlc/reference';
8
+ import { DEFAULT_GITHUB_ORG, DEFAULT_GITHUB_REPO, DEFAULT_CONFIG_DIR_NAME, DEFAULT_MAX_FILES_PER_CHANGE, DEFAULT_REQUIRE_TESTS, DEFAULT_BRANCH_TEMPLATE, DEFAULT_BRANCH_PATTERN, DEFAULT_PR_TITLE_TEMPLATE, } from './defaults.js';
9
+ export function execFileAsync(cmd, args, opts) {
10
+ return new Promise((resolve, reject) => {
11
+ execFile(cmd, args, opts ?? {}, (err, stdout, stderr) => {
12
+ if (err)
13
+ reject(err);
14
+ else
15
+ resolve({ stdout, stderr });
16
+ });
17
+ });
18
+ }
19
+ // ── Template interpolation ────────────────────────────────────────────
20
+ /**
21
+ * Replace `{key}` placeholders in a string with values from `vars`.
22
+ * Unknown keys are left as-is.
23
+ */
24
+ export function interpolate(text, vars) {
25
+ return text.replace(/\{(\w+)\}/g, (_, key) => vars[key] ?? `{${key}}`);
26
+ }
27
+ /**
28
+ * Interpolate a branch name pattern by replacing `{key}` placeholders.
29
+ * Falls back to `ai-sdlc/issue-{issueNumber}` when no pattern is provided.
30
+ */
31
+ export function interpolateBranchPattern(pattern, vars) {
32
+ return interpolate(pattern ?? DEFAULT_BRANCH_TEMPLATE, vars);
33
+ }
34
+ /**
35
+ * Interpolate a PR title template by replacing `{key}` placeholders.
36
+ * Falls back to `fix: {issueTitle} (#{issueNumber})` when no template is provided.
37
+ */
38
+ export function interpolatePRTitle(template, vars) {
39
+ return interpolate(template ?? DEFAULT_PR_TITLE_TEMPLATE, vars);
40
+ }
41
+ // ── Branch pattern ───────────────────────────────────────────────────
42
+ export const BRANCH_PATTERN = DEFAULT_BRANCH_PATTERN;
43
+ /**
44
+ * Extract the issue number from an `ai-sdlc/issue-N` branch name.
45
+ * Returns null if the branch doesn't match the pattern.
46
+ */
47
+ export function extractIssueNumber(branch) {
48
+ const match = branch.match(BRANCH_PATTERN);
49
+ return match ? Number(match[1]) : null;
50
+ }
51
+ /**
52
+ * Read GitHub org/repo/token from standard environment variables.
53
+ * Accepts an optional SecretStore to resolve the token through the
54
+ * adapter system instead of reading process.env directly.
55
+ *
56
+ * Falls back to empty strings when no env vars are set — explicit
57
+ * configuration is required for production use.
58
+ */
59
+ export function getGitHubConfig(secretStore) {
60
+ const org = process.env.GITHUB_REPOSITORY_OWNER ?? DEFAULT_GITHUB_ORG;
61
+ const repo = process.env.GITHUB_REPOSITORY?.split('/')[1] ?? DEFAULT_GITHUB_REPO;
62
+ const token = secretStore
63
+ ? secretStore.get('github-token')
64
+ : process.env.GITHUB_TOKEN || undefined;
65
+ return { org, repo, token };
66
+ }
67
+ // ── Repo root ────────────────────────────────────────────────────────
68
+ /**
69
+ * Resolve the repository root directory using `git rev-parse`.
70
+ */
71
+ export async function resolveRepoRoot() {
72
+ const { stdout } = await execFileAsync('git', ['rev-parse', '--show-toplevel']);
73
+ return stdout.trim();
74
+ }
75
+ // ── Audit log factory ────────────────────────────────────────────────
76
+ /**
77
+ * Create the default JSONL-backed audit log for a work directory.
78
+ */
79
+ export function createDefaultAuditLog(workDir) {
80
+ return createAuditLog(createFileSink(join(workDir, DEFAULT_CONFIG_DIR_NAME, 'audit.jsonl')));
81
+ }
82
+ // ── Autonomy helpers ─────────────────────────────────────────────────
83
+ /**
84
+ * Find the applicable autonomy level from the policy.
85
+ * @param maxLevel Maximum level to search for (default 1).
86
+ */
87
+ export function resolveAutonomyLevel(policy, maxLevel = 1) {
88
+ const level = policy.spec.levels.find((l) => l.level <= maxLevel);
89
+ if (!level) {
90
+ throw new Error(`No autonomy level 0 or ${maxLevel} found in policy`);
91
+ }
92
+ return level;
93
+ }
94
+ /**
95
+ * Merge blocked paths from agent constraints and autonomy guardrails,
96
+ * deduplicating the result.
97
+ */
98
+ export function mergeBlockedPaths(constraints, guardrails) {
99
+ const agentBlocked = constraints.blockedPaths ?? [];
100
+ const autonomyBlocked = guardrails.blockedPaths ?? [];
101
+ return [...new Set([...agentBlocked, ...autonomyBlocked])];
102
+ }
103
+ /**
104
+ * Resolve the effective agent constraints from an AgentRole and autonomy level.
105
+ */
106
+ export function resolveConstraints(agentConstraints, autonomyLevel) {
107
+ const constraints = agentConstraints ?? {
108
+ maxFilesPerChange: DEFAULT_MAX_FILES_PER_CHANGE,
109
+ requireTests: DEFAULT_REQUIRE_TESTS,
110
+ blockedPaths: [],
111
+ };
112
+ return {
113
+ maxFiles: constraints.maxFilesPerChange ?? 15,
114
+ requireTests: constraints.requireTests ?? true,
115
+ blockedPaths: mergeBlockedPaths(constraints, autonomyLevel.guardrails),
116
+ };
117
+ }
118
+ // ── Routing strategy ─────────────────────────────────────────────────
119
+ /**
120
+ * Check if a routing strategy allows fully autonomous execution.
121
+ */
122
+ export function isAutonomousStrategy(strategy) {
123
+ return strategy === 'fully-autonomous' || strategy === 'ai-with-review';
124
+ }
125
+ // ── Metric store helper ──────────────────────────────────────────────
126
+ /**
127
+ * Record a metric to an optional MetricStore (no-ops if store is undefined).
128
+ */
129
+ export function recordMetric(store, metric, value) {
130
+ if (store)
131
+ store.record({ metric, value });
132
+ }
133
+ // ── Output validation (shared block) ─────────────────────────────────
134
+ import { validateAgentOutput } from './validate-agent-output.js';
135
+ /**
136
+ * Validate agent output against guardrails and record audit entries.
137
+ * Throws on guardrail violations.
138
+ */
139
+ export async function validateAndAuditOutput(params) {
140
+ const { filesChanged, workDir, constraints, guardrails, auditLog, log, onViolation } = params;
141
+ log.stage('validate-output');
142
+ const validation = await validateAgentOutput({
143
+ filesChanged,
144
+ workDir,
145
+ constraints,
146
+ guardrails,
147
+ });
148
+ log.stageEnd('validate-output');
149
+ if (!validation.passed) {
150
+ auditLog.record({
151
+ actor: 'system',
152
+ action: 'check',
153
+ resource: 'agent-output',
154
+ decision: 'denied',
155
+ details: { violations: validation.violations.map((v) => v.rule) },
156
+ });
157
+ const violationList = validation.violations
158
+ .map((v) => `- **${v.rule}**: ${v.message}`)
159
+ .join('\n');
160
+ if (onViolation) {
161
+ await onViolation(violationList);
162
+ }
163
+ throw new Error('Agent output failed guardrail validation');
164
+ }
165
+ auditLog.record({
166
+ actor: 'system',
167
+ action: 'check',
168
+ resource: 'agent-output',
169
+ decision: 'allowed',
170
+ });
171
+ }
172
+ // ── Agent memory ─────────────────────────────────────────────────────
173
+ /**
174
+ * Create a pipeline agent memory backed by local files.
175
+ */
176
+ export function createPipelineMemory(workDir) {
177
+ const base = createAgentMemory();
178
+ const memDir = join(workDir, DEFAULT_CONFIG_DIR_NAME, 'memory');
179
+ return {
180
+ ...base,
181
+ longTerm: createFileLongTermMemory(join(memDir, 'long-term.json')),
182
+ episodic: createFileEpisodicMemory(join(memDir, 'episodes.json')),
183
+ };
184
+ }
185
+ // ── Compliance reporting ─────────────────────────────────────────────
186
+ /**
187
+ * Evaluate pipeline compliance across all regulatory frameworks.
188
+ */
189
+ export function evaluatePipelineCompliance(hasMemory) {
190
+ const controls = new Set([
191
+ 'quality-gates',
192
+ 'audit-logging',
193
+ 'autonomy-governance',
194
+ 'human-review',
195
+ 'metrics-collection',
196
+ 'complexity-routing',
197
+ ]);
198
+ if (hasMemory)
199
+ controls.add('agent-memory');
200
+ return checkAllFrameworks(controls);
201
+ }
202
+ // ── ABAC authorization ───────────────────────────────────────────────
203
+ /**
204
+ * Authorize a list of files against ABAC permissions and agent constraints.
205
+ * Throws on the first denied file.
206
+ */
207
+ export function authorizeFilesChanged(files, permissions, constraints, auditLog, actor) {
208
+ for (const file of files) {
209
+ const result = authorize(permissions, constraints, 'write', file);
210
+ if (!result.allowed) {
211
+ auditLog.record({
212
+ actor,
213
+ action: 'write',
214
+ resource: file,
215
+ decision: 'denied',
216
+ details: { reason: result.reason, layer: result.layer },
217
+ });
218
+ throw new Error(`Authorization denied for ${file}: ${result.reason}`);
219
+ }
220
+ }
221
+ }
222
+ // ── Authorization middleware chains ──────────────────────────────────
223
+ /**
224
+ * Create an ABAC permission-check hook wrapping the existing authorize().
225
+ */
226
+ export function createAbacPermissionHook(permissions, constraints) {
227
+ return (ctx) => {
228
+ return authorize(permissions, constraints, ctx.action, ctx.target);
229
+ };
230
+ }
231
+ /**
232
+ * Create a blocked-paths guardrail hook.
233
+ */
234
+ export function createBlockedPathsHook(blockedPaths) {
235
+ return (ctx) => {
236
+ for (const pattern of blockedPaths) {
237
+ const regex = new RegExp('^' +
238
+ pattern
239
+ .replace(/[.+^${}()|[\]\\]/g, '\\$&')
240
+ .replace(/\*\*/g, '{{GLOBSTAR}}')
241
+ .replace(/\*/g, '[^/]*')
242
+ .replace(/\{\{GLOBSTAR\}\}/g, '.*') +
243
+ '$');
244
+ if (regex.test(ctx.target)) {
245
+ return {
246
+ allowed: false,
247
+ reason: `Target "${ctx.target}" matches blocked path "${pattern}"`,
248
+ layer: 'constraints',
249
+ };
250
+ }
251
+ }
252
+ return { allowed: true };
253
+ };
254
+ }
255
+ /**
256
+ * Create an audit logging hook that records authorization decisions.
257
+ */
258
+ export function createAuditLoggingHook(auditLog) {
259
+ return (ctx) => {
260
+ auditLog.record({
261
+ actor: ctx.agent,
262
+ action: ctx.action,
263
+ resource: ctx.target,
264
+ decision: 'allowed',
265
+ details: { hook: 'audit-logging' },
266
+ });
267
+ return { allowed: true };
268
+ };
269
+ }
270
+ /**
271
+ * Compose multiple AuthorizationHook functions into a chain.
272
+ * Hooks are executed in order; the first denial short-circuits.
273
+ */
274
+ export function createPipelineAuthorizationChain(hooks) {
275
+ return (ctx) => {
276
+ for (const hook of hooks) {
277
+ const result = hook(ctx);
278
+ if (!result.allowed)
279
+ return result;
280
+ }
281
+ return { allowed: true };
282
+ };
283
+ }
284
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1,4 @@
1
+ export { StateStore } from './store.js';
2
+ export { CURRENT_SCHEMA_VERSION, SCHEMA_DDL, MIGRATION_V2, MIGRATION_V3, MIGRATION_V4, MIGRATION_V5, MIGRATIONS, } from './schema.js';
3
+ export type { ComplexityProfile, EpisodicRecord, AutonomyLedgerEntry, PipelineRun, PipelineRunStatus, Convention, HotspotRecord, RoutingDecision, CostLedgerEntry, GateThresholdOverride, AutonomyEvent, AutonomyEventType, HandoffEvent, DeploymentRecord, DeploymentRecordState, RolloutStepRecord, AuditEntryRecord, } from './types.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { StateStore } from './store.js';
2
+ export { CURRENT_SCHEMA_VERSION, SCHEMA_DDL, MIGRATION_V2, MIGRATION_V3, MIGRATION_V4, MIGRATION_V5, MIGRATIONS, } from './schema.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * SQLite DDL and migrations for the state store.
3
+ */
4
+ export declare const CURRENT_SCHEMA_VERSION = 6;
5
+ export declare const SCHEMA_DDL = "\nCREATE TABLE IF NOT EXISTS schema_version (\n version INTEGER PRIMARY KEY,\n applied_at TEXT DEFAULT (datetime('now'))\n);\n\nCREATE TABLE IF NOT EXISTS complexity_profile (\n id INTEGER PRIMARY KEY,\n repo_path TEXT NOT NULL,\n score REAL NOT NULL,\n files_count INTEGER,\n modules_count INTEGER,\n dependency_count INTEGER,\n analyzed_at TEXT DEFAULT (datetime('now')),\n raw_data TEXT\n);\n\nCREATE TABLE IF NOT EXISTS episodic_memory (\n id INTEGER PRIMARY KEY,\n issue_number INTEGER,\n pr_number INTEGER,\n pipeline_type TEXT NOT NULL,\n outcome TEXT NOT NULL,\n duration_ms INTEGER,\n files_changed INTEGER,\n error_message TEXT,\n metadata TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n);\n\nCREATE TABLE IF NOT EXISTS autonomy_ledger (\n id INTEGER PRIMARY KEY,\n agent_name TEXT NOT NULL UNIQUE,\n current_level INTEGER DEFAULT 0,\n total_tasks INTEGER DEFAULT 0,\n success_count INTEGER DEFAULT 0,\n failure_count INTEGER DEFAULT 0,\n last_task_at TEXT,\n metrics TEXT\n);\n\nCREATE TABLE IF NOT EXISTS pipeline_runs (\n id INTEGER PRIMARY KEY,\n run_id TEXT NOT NULL UNIQUE,\n issue_number INTEGER,\n pr_number INTEGER,\n pipeline_type TEXT NOT NULL,\n status TEXT NOT NULL,\n current_stage TEXT,\n started_at TEXT DEFAULT (datetime('now')),\n completed_at TEXT,\n result TEXT,\n gate_results TEXT\n);\n\nCREATE TABLE IF NOT EXISTS conventions (\n id INTEGER PRIMARY KEY,\n category TEXT NOT NULL,\n pattern TEXT NOT NULL,\n confidence REAL,\n examples TEXT,\n detected_at TEXT DEFAULT (datetime('now'))\n);\n";
6
+ export interface Migration {
7
+ version: number;
8
+ sql: string;
9
+ }
10
+ export declare const MIGRATION_V2 = "\nALTER TABLE complexity_profile ADD COLUMN architectural_patterns TEXT;\nALTER TABLE complexity_profile ADD COLUMN hotspots TEXT;\nALTER TABLE complexity_profile ADD COLUMN module_graph TEXT;\nALTER TABLE complexity_profile ADD COLUMN conventions_data TEXT;\n\nCREATE TABLE IF NOT EXISTS hotspots (\n id INTEGER PRIMARY KEY,\n repo_path TEXT NOT NULL,\n file_path TEXT NOT NULL,\n churn_rate REAL NOT NULL,\n complexity INTEGER NOT NULL,\n commit_count INTEGER,\n last_modified TEXT,\n note TEXT,\n analyzed_at TEXT DEFAULT (datetime('now'))\n);\n\nCREATE TABLE IF NOT EXISTS routing_history (\n id INTEGER PRIMARY KEY,\n issue_number INTEGER,\n task_complexity INTEGER,\n codebase_complexity REAL,\n routing_strategy TEXT NOT NULL,\n agent_name TEXT,\n reason TEXT,\n decided_at TEXT DEFAULT (datetime('now'))\n);\n";
11
+ export declare const MIGRATION_V3 = "\n-- Cost tracking\nCREATE TABLE IF NOT EXISTS cost_ledger (\n id INTEGER PRIMARY KEY,\n run_id TEXT NOT NULL,\n agent_name TEXT NOT NULL,\n pipeline_type TEXT NOT NULL,\n model TEXT,\n input_tokens INTEGER DEFAULT 0,\n output_tokens INTEGER DEFAULT 0,\n total_tokens INTEGER DEFAULT 0,\n cost_usd REAL DEFAULT 0.0,\n issue_number INTEGER,\n pr_number INTEGER,\n created_at TEXT DEFAULT (datetime('now'))\n);\nCREATE INDEX IF NOT EXISTS idx_cost_ledger_run ON cost_ledger(run_id);\nCREATE INDEX IF NOT EXISTS idx_cost_ledger_agent ON cost_ledger(agent_name);\n\n-- Gate threshold overrides per complexity band\nCREATE TABLE IF NOT EXISTS gate_threshold_overrides (\n id INTEGER PRIMARY KEY,\n gate_name TEXT NOT NULL,\n complexity_band TEXT NOT NULL,\n enforcement_level TEXT NOT NULL,\n threshold_overrides TEXT,\n active INTEGER DEFAULT 1,\n created_at TEXT DEFAULT (datetime('now')),\n UNIQUE(gate_name, complexity_band)\n);\n\n-- Autonomy event log (immutable)\nCREATE TABLE IF NOT EXISTS autonomy_events (\n id INTEGER PRIMARY KEY,\n agent_name TEXT NOT NULL,\n event_type TEXT NOT NULL,\n from_level INTEGER NOT NULL,\n to_level INTEGER NOT NULL,\n trigger TEXT,\n metrics_snapshot TEXT,\n unmet_conditions TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n);\nCREATE INDEX IF NOT EXISTS idx_autonomy_events_agent ON autonomy_events(agent_name);\n\n-- Extend autonomy_ledger\nALTER TABLE autonomy_ledger ADD COLUMN pr_approval_rate REAL DEFAULT 0.0;\nALTER TABLE autonomy_ledger ADD COLUMN rollback_count INTEGER DEFAULT 0;\nALTER TABLE autonomy_ledger ADD COLUMN security_incidents INTEGER DEFAULT 0;\nALTER TABLE autonomy_ledger ADD COLUMN promoted_at TEXT;\nALTER TABLE autonomy_ledger ADD COLUMN demoted_at TEXT;\nALTER TABLE autonomy_ledger ADD COLUMN time_at_level_ms INTEGER DEFAULT 0;\n\n-- Extend episodic_memory\nALTER TABLE episodic_memory ADD COLUMN agent_name TEXT;\nALTER TABLE episodic_memory ADD COLUMN complexity_score INTEGER;\nALTER TABLE episodic_memory ADD COLUMN routing_strategy TEXT;\nALTER TABLE episodic_memory ADD COLUMN gate_pass_count INTEGER;\nALTER TABLE episodic_memory ADD COLUMN gate_fail_count INTEGER;\nALTER TABLE episodic_memory ADD COLUMN cost_usd REAL;\nALTER TABLE episodic_memory ADD COLUMN is_regression INTEGER DEFAULT 0;\nALTER TABLE episodic_memory ADD COLUMN related_episodes TEXT;\n\n-- Extend pipeline_runs\nALTER TABLE pipeline_runs ADD COLUMN cost_usd REAL DEFAULT 0.0;\nALTER TABLE pipeline_runs ADD COLUMN tokens_used INTEGER DEFAULT 0;\nALTER TABLE pipeline_runs ADD COLUMN model TEXT;\nALTER TABLE pipeline_runs ADD COLUMN agent_name TEXT;\nALTER TABLE pipeline_runs ADD COLUMN complexity_score INTEGER;\n";
12
+ export declare const MIGRATION_V4 = "\n-- Handoff audit trail\nCREATE TABLE IF NOT EXISTS handoff_events (\n id INTEGER PRIMARY KEY,\n run_id TEXT NOT NULL,\n from_agent TEXT NOT NULL,\n to_agent TEXT NOT NULL,\n payload_hash TEXT,\n validation_result TEXT NOT NULL,\n error_message TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n);\nCREATE INDEX IF NOT EXISTS idx_handoff_events_run ON handoff_events(run_id);\n";
13
+ export declare const MIGRATION_V5 = "\n-- Deployment records\nCREATE TABLE IF NOT EXISTS deployments (\n id INTEGER PRIMARY KEY,\n deployment_id TEXT NOT NULL UNIQUE,\n target_name TEXT NOT NULL,\n provider TEXT NOT NULL,\n version TEXT NOT NULL,\n environment TEXT NOT NULL,\n state TEXT NOT NULL,\n url TEXT,\n error TEXT,\n started_at TEXT DEFAULT (datetime('now')),\n completed_at TEXT\n);\nCREATE INDEX IF NOT EXISTS idx_deployments_target ON deployments(target_name);\nCREATE INDEX IF NOT EXISTS idx_deployments_env ON deployments(environment);\n\n-- Rollout step records\nCREATE TABLE IF NOT EXISTS rollout_steps (\n id INTEGER PRIMARY KEY,\n deployment_id TEXT NOT NULL,\n step_number INTEGER NOT NULL,\n weight_percent INTEGER NOT NULL,\n state TEXT NOT NULL,\n metrics_snapshot TEXT,\n started_at TEXT DEFAULT (datetime('now')),\n completed_at TEXT,\n FOREIGN KEY (deployment_id) REFERENCES deployments(deployment_id)\n);\nCREATE INDEX IF NOT EXISTS idx_rollout_steps_deployment ON rollout_steps(deployment_id);\n\n-- Audit entries (indexed, queryable)\nCREATE TABLE IF NOT EXISTS audit_entries (\n id INTEGER PRIMARY KEY,\n entry_id TEXT NOT NULL UNIQUE,\n actor TEXT NOT NULL,\n action TEXT NOT NULL,\n resource_type TEXT,\n resource_id TEXT,\n detail TEXT,\n hash TEXT,\n previous_hash TEXT,\n signature TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n);\nCREATE INDEX IF NOT EXISTS idx_audit_entries_actor ON audit_entries(actor);\nCREATE INDEX IF NOT EXISTS idx_audit_entries_action ON audit_entries(action);\nCREATE INDEX IF NOT EXISTS idx_audit_entries_resource ON audit_entries(resource_type, resource_id);\nCREATE INDEX IF NOT EXISTS idx_audit_entries_created ON audit_entries(created_at);\n";
14
+ export declare const MIGRATION_V6 = "\n-- Cost governance: add stage_name and cache_read_tokens to cost_ledger\nALTER TABLE cost_ledger ADD COLUMN stage_name TEXT;\nALTER TABLE cost_ledger ADD COLUMN cache_read_tokens INTEGER DEFAULT 0;\n";
15
+ export declare const MIGRATIONS: Migration[];
16
+ //# sourceMappingURL=schema.d.ts.map