@devtrack-solution/codesdd 1.2.3 → 1.2.4

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 (213) hide show
  1. package/.sdd/skills/curated/devtrack-api/SKILL.md +98 -12
  2. package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +10 -0
  3. package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +10 -0
  4. package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +10 -0
  5. package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +10 -0
  6. package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +10 -0
  7. package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +5 -3
  8. package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +12 -0
  9. package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +61 -5
  10. package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +15 -3
  11. package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +1951 -0
  12. package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +16 -14
  13. package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +40 -0
  14. package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +19 -2
  15. package/.sdd/skills/curated/devtrack-api/references/generated-artifact-invalidation.md +97 -0
  16. package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +30 -1
  17. package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +42 -0
  18. package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +22 -1
  19. package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +9 -7
  20. package/README.md +280 -29
  21. package/dist/applications/sdd/index.d.ts +16 -0
  22. package/dist/applications/sdd/index.js +16 -0
  23. package/dist/cli/program.js +180 -11
  24. package/dist/commands/config.js +197 -10
  25. package/dist/commands/sdd/execution.js +408 -16
  26. package/dist/commands/sdd/plugin.js +5 -0
  27. package/dist/commands/sdd/shared.d.ts +1 -0
  28. package/dist/commands/sdd/shared.js +10 -0
  29. package/dist/commands/sdd.js +157 -7
  30. package/dist/core/cli/command-matrix.d.ts +18 -0
  31. package/dist/core/cli/command-matrix.js +157 -0
  32. package/dist/core/cli-command-quality.js +11 -0
  33. package/dist/core/completions/command-registry.js +45 -0
  34. package/dist/core/config-schema.d.ts +31 -1
  35. package/dist/core/config-schema.js +79 -5
  36. package/dist/core/config.d.ts +1 -0
  37. package/dist/core/config.js +11 -0
  38. package/dist/core/global-config.d.ts +29 -0
  39. package/dist/core/init.d.ts +2 -2
  40. package/dist/core/init.js +13 -14
  41. package/dist/core/sdd/agent-binding.d.ts +19 -19
  42. package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
  43. package/dist/core/sdd/agent-runtime-contract.js +200 -0
  44. package/dist/core/sdd/allocator-recovery.d.ts +14 -0
  45. package/dist/core/sdd/allocator-recovery.js +30 -0
  46. package/dist/core/sdd/allocator-security.d.ts +18 -0
  47. package/dist/core/sdd/allocator-security.js +36 -0
  48. package/dist/core/sdd/api-foundation-baseline.d.ts +111 -0
  49. package/dist/core/sdd/api-foundation-baseline.js +151 -0
  50. package/dist/core/sdd/api-foundation-parity.d.ts +114 -0
  51. package/dist/core/sdd/api-foundation-parity.js +131 -0
  52. package/dist/core/sdd/api-profile-catalog.d.ts +36 -0
  53. package/dist/core/sdd/api-profile-catalog.js +132 -0
  54. package/dist/core/sdd/api-profile-dry-run-projection.d.ts +93 -0
  55. package/dist/core/sdd/api-profile-dry-run-projection.js +370 -0
  56. package/dist/core/sdd/api-profile-recipes.d.ts +82 -0
  57. package/dist/core/sdd/api-profile-recipes.js +484 -0
  58. package/dist/core/sdd/artifact-id-allocator.d.ts +368 -0
  59. package/dist/core/sdd/artifact-id-allocator.js +510 -0
  60. package/dist/core/sdd/check.d.ts +52 -1
  61. package/dist/core/sdd/check.js +326 -11
  62. package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
  63. package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
  64. package/dist/core/sdd/coordination/index.d.ts +1 -0
  65. package/dist/core/sdd/coordination/index.js +1 -0
  66. package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
  67. package/dist/core/sdd/coordination/redis-runtime.js +698 -0
  68. package/dist/core/sdd/deepagent-contracts.d.ts +99 -5
  69. package/dist/core/sdd/deepagent-contracts.js +62 -0
  70. package/dist/core/sdd/deepagents/reversa-subagents.d.ts +3 -3
  71. package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
  72. package/dist/core/sdd/default-bootstrap-files.js +14 -10
  73. package/dist/core/sdd/default-skills.js +115 -9
  74. package/dist/core/sdd/devtrack-api-appliance.d.ts +42 -1
  75. package/dist/core/sdd/devtrack-api-appliance.js +159 -32
  76. package/dist/core/sdd/devtrack-api-architecture.d.ts +16 -0
  77. package/dist/core/sdd/devtrack-api-architecture.js +86 -0
  78. package/dist/core/sdd/docs-sync.js +24 -18
  79. package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
  80. package/dist/core/sdd/domain/capability-diff.js +200 -0
  81. package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
  82. package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
  83. package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
  84. package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
  85. package/dist/core/sdd/enterprise-mutating-command-gate.d.ts +27 -0
  86. package/dist/core/sdd/enterprise-mutating-command-gate.js +104 -0
  87. package/dist/core/sdd/enterprise-provenance-gates.d.ts +20 -0
  88. package/dist/core/sdd/enterprise-provenance-gates.js +63 -0
  89. package/dist/core/sdd/enterprise-provisioning-policy.d.ts +26 -0
  90. package/dist/core/sdd/enterprise-provisioning-policy.js +104 -0
  91. package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
  92. package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
  93. package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
  94. package/dist/core/sdd/foundation-layer-manifest.js +117 -0
  95. package/dist/core/sdd/governance-schemas.d.ts +2 -2
  96. package/dist/core/sdd/governance-schemas.js +11 -2
  97. package/dist/core/sdd/intent-guard.d.ts +22 -0
  98. package/dist/core/sdd/intent-guard.js +67 -0
  99. package/dist/core/sdd/json-schema.js +13 -1
  100. package/dist/core/sdd/legacy-operations.js +169 -5
  101. package/dist/core/sdd/migrate-workspace.js +39 -0
  102. package/dist/core/sdd/package-security-gates.d.ts +21 -0
  103. package/dist/core/sdd/package-security-gates.js +121 -0
  104. package/dist/core/sdd/package-structure-gate.d.ts +85 -3
  105. package/dist/core/sdd/package-structure-gate.js +384 -11
  106. package/dist/core/sdd/parallel-feat-automation.d.ts +185 -7
  107. package/dist/core/sdd/parallel-feat-automation.js +212 -0
  108. package/dist/core/sdd/plugin-broker.d.ts +223 -4
  109. package/dist/core/sdd/plugin-broker.js +10 -0
  110. package/dist/core/sdd/plugin-cli.d.ts +30 -0
  111. package/dist/core/sdd/plugin-cli.js +70 -3
  112. package/dist/core/sdd/plugin-evidence.d.ts +73 -0
  113. package/dist/core/sdd/plugin-manifest.d.ts +69 -1
  114. package/dist/core/sdd/plugin-manifest.js +10 -0
  115. package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
  116. package/dist/core/sdd/plugin-policy.js +6 -1
  117. package/dist/core/sdd/plugin-registry.d.ts +138 -2
  118. package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
  119. package/dist/core/sdd/plugin-sdk-contract.js +268 -0
  120. package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
  121. package/dist/core/sdd/quality-validation.d.ts +89 -16
  122. package/dist/core/sdd/release-readiness.d.ts +68 -0
  123. package/dist/core/sdd/release-readiness.js +767 -0
  124. package/dist/core/sdd/reversa-architecture-extractor.d.ts +13 -0
  125. package/dist/core/sdd/reversa-architecture-extractor.js +89 -0
  126. package/dist/core/sdd/reversa-artifact-writer.d.ts +18 -0
  127. package/dist/core/sdd/reversa-artifact-writer.js +40 -0
  128. package/dist/core/sdd/reversa-command-policy.d.ts +136 -0
  129. package/dist/core/sdd/reversa-command-policy.js +361 -0
  130. package/dist/core/sdd/reversa-data-extractor.d.ts +11 -0
  131. package/dist/core/sdd/reversa-data-extractor.js +73 -0
  132. package/dist/core/sdd/reversa-equivalence.d.ts +20 -0
  133. package/dist/core/sdd/reversa-equivalence.js +34 -0
  134. package/dist/core/sdd/reversa-evidence.d.ts +298 -0
  135. package/dist/core/sdd/reversa-evidence.js +118 -0
  136. package/dist/core/sdd/reversa-reconstruction.d.ts +29 -0
  137. package/dist/core/sdd/reversa-reconstruction.js +32 -0
  138. package/dist/core/sdd/reversa-rules-extractor.d.ts +12 -0
  139. package/dist/core/sdd/reversa-rules-extractor.js +86 -0
  140. package/dist/core/sdd/reversa-source-safety.d.ts +19 -0
  141. package/dist/core/sdd/reversa-source-safety.js +105 -0
  142. package/dist/core/sdd/reversa-surface-scout.d.ts +13 -0
  143. package/dist/core/sdd/reversa-surface-scout.js +85 -0
  144. package/dist/core/sdd/reversa-ux-mapper.d.ts +11 -0
  145. package/dist/core/sdd/reversa-ux-mapper.js +73 -0
  146. package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
  147. package/dist/core/sdd/runtime-boundary-contract.js +90 -0
  148. package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
  149. package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
  150. package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
  151. package/dist/core/sdd/services/agent-run.service.js +73 -1
  152. package/dist/core/sdd/services/archive-quality-coherence.service.d.ts +17 -0
  153. package/dist/core/sdd/services/archive-quality-coherence.service.js +141 -0
  154. package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
  155. package/dist/core/sdd/services/capability-diff.service.js +26 -0
  156. package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
  157. package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
  158. package/dist/core/sdd/services/context.service.d.ts +43 -340
  159. package/dist/core/sdd/services/context.service.js +323 -9
  160. package/dist/core/sdd/services/decide.service.js +1 -1
  161. package/dist/core/sdd/services/finalize.service.d.ts +27 -0
  162. package/dist/core/sdd/services/finalize.service.js +226 -18
  163. package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
  164. package/dist/core/sdd/services/historical-quality-regression.service.d.ts +35 -0
  165. package/dist/core/sdd/services/historical-quality-regression.service.js +228 -0
  166. package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
  167. package/dist/core/sdd/services/planning-execution-coherence.service.d.ts +45 -0
  168. package/dist/core/sdd/services/planning-execution-coherence.service.js +225 -0
  169. package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
  170. package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
  171. package/dist/core/sdd/state.d.ts +1 -0
  172. package/dist/core/sdd/state.js +266 -34
  173. package/dist/core/sdd/store/sdd-stores.js +2 -2
  174. package/dist/core/sdd/structural-health.d.ts +13 -13
  175. package/dist/core/sdd/types.d.ts +30 -15
  176. package/dist/core/sdd/types.js +4 -0
  177. package/dist/core/sdd/views.js +17 -0
  178. package/dist/core/sdd/workspace-schemas.d.ts +428 -7
  179. package/dist/core/sdd/workspace-schemas.js +223 -70
  180. package/dist/core/shared/skill-generation.d.ts +2 -0
  181. package/dist/core/shared/skill-generation.js +19 -2
  182. package/dist/core/shared/tool-detection.d.ts +19 -0
  183. package/dist/core/shared/tool-detection.js +89 -0
  184. package/dist/domains/sdd/index.d.ts +6 -0
  185. package/dist/domains/sdd/index.js +6 -0
  186. package/dist/infrastructures/sdd/index.d.ts +7 -0
  187. package/dist/infrastructures/sdd/index.js +6 -0
  188. package/dist/presentations/cli/sdd/index.d.ts +3 -0
  189. package/dist/presentations/cli/sdd/index.js +3 -0
  190. package/dist/shared/sdd/index.d.ts +3 -0
  191. package/dist/shared/sdd/index.js +2 -0
  192. package/package.json +14 -10
  193. package/schemas/sdd/2-plan.schema.json +207 -2
  194. package/schemas/sdd/5-quality.schema.json +324 -25
  195. package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
  196. package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
  197. package/schemas/sdd/codesdd-plugin.schema.json +171 -0
  198. package/schemas/sdd/deepagent-run-request.schema.json +316 -0
  199. package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
  200. package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
  201. package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
  202. package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
  203. package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
  204. package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
  205. package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
  206. package/schemas/sdd/plugin-package-governance.schema.json +74 -0
  207. package/schemas/sdd/plugin-registry.schema.json +171 -0
  208. package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
  209. package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
  210. package/schemas/sdd/reversa-evidence-bundle.schema.json +466 -0
  211. package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
  212. package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
  213. package/schemas/sdd/workspace-catalog.schema.json +5298 -1409
@@ -0,0 +1,121 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { promises as fs } from 'node:fs';
3
+ import path from 'node:path';
4
+ import fg from 'fast-glob';
5
+ const FORBIDDEN_PACKAGE_FILE_PATTERNS = [
6
+ /^\.env/u,
7
+ /^\.npmrc$/u,
8
+ /^\.sdd\/state\//u,
9
+ /^\.git/u,
10
+ /^node_modules\//u,
11
+ /^coverage\//u,
12
+ /^\.turbo\//u,
13
+ /^\.cache\//u,
14
+ /(?:^|\/)[^/]+\.log$/u,
15
+ /(?:^|\/)(?:secret|secrets|credential|credentials)(?:\/|$)/u,
16
+ ];
17
+ const SECRET_SIGNATURES = [
18
+ { code: 'PRIVATE_KEY', pattern: /-----BEGIN (?:RSA |DSA |EC |OPENSSH |)PRIVATE KEY-----/u },
19
+ { code: 'NPM_TOKEN', pattern: /\/\/registry\.npmjs\.org\/:_authToken=(?!\$\{NODE_AUTH_TOKEN\})\S+/u },
20
+ { code: 'OPENAI_KEY', pattern: /\bsk-[A-Za-z0-9_-]{24,}\b/u },
21
+ { code: 'GITHUB_TOKEN', pattern: /\bgh[pousr]_[A-Za-z0-9_]{24,}\b/u },
22
+ { code: 'AWS_ACCESS_KEY', pattern: /\bAKIA[0-9A-Z]{16}\b/u },
23
+ ];
24
+ const SECRET_SCAN_IGNORE = [
25
+ 'node_modules/**',
26
+ '**/node_modules/**',
27
+ 'dist/**',
28
+ 'coverage/**',
29
+ '.git/**',
30
+ '.temp/**',
31
+ '.sdd/state/**',
32
+ '.sdd/archived/**',
33
+ '.sdd/active/**',
34
+ '.sdd/planned/**',
35
+ 'pnpm-lock.yaml',
36
+ ];
37
+ export async function evaluatePackageSecurityGates(projectRoot) {
38
+ const packageJson = await readPackageJson(projectRoot);
39
+ const allowedFiles = normalizePackageFiles(packageJson.files ?? []);
40
+ const packageIssues = evaluatePackageFileAllowlist(allowedFiles);
41
+ const secretScan = await scanForHighConfidenceSecrets(projectRoot);
42
+ return {
43
+ status: packageIssues.length === 0 && secretScan.issues.length === 0 ? 'pass' : 'fail',
44
+ package_allowlist: {
45
+ status: packageIssues.length === 0 ? 'pass' : 'fail',
46
+ allowed_files: allowedFiles,
47
+ issues: packageIssues,
48
+ },
49
+ secret_scan: {
50
+ status: secretScan.issues.length === 0 ? 'pass' : 'fail',
51
+ scanned_files: secretScan.scannedFiles,
52
+ issues: secretScan.issues,
53
+ },
54
+ };
55
+ }
56
+ export function evaluatePackageFileAllowlist(files) {
57
+ const issues = [];
58
+ for (const file of files) {
59
+ const normalized = normalizePath(file);
60
+ if (FORBIDDEN_PACKAGE_FILE_PATTERNS.some((pattern) => pattern.test(normalized))) {
61
+ issues.push({
62
+ code: 'PACKAGE_FILE_FORBIDDEN',
63
+ path: normalized,
64
+ message: 'Package publish allowlist includes a forbidden path or pattern.',
65
+ });
66
+ }
67
+ }
68
+ return issues;
69
+ }
70
+ async function scanForHighConfidenceSecrets(projectRoot) {
71
+ const files = await fg(['**/*'], {
72
+ cwd: projectRoot,
73
+ onlyFiles: true,
74
+ dot: true,
75
+ ignore: SECRET_SCAN_IGNORE,
76
+ });
77
+ const issues = [];
78
+ let scannedFiles = 0;
79
+ for (const relativeFile of files) {
80
+ const normalized = normalizePath(relativeFile);
81
+ if (isBinaryLike(normalized))
82
+ continue;
83
+ if (normalized === '.npmrc' && existsSync(path.join(projectRoot, normalized))) {
84
+ issues.push({
85
+ code: 'LOCAL_NPMRC',
86
+ path: normalized,
87
+ message: 'Project-local .npmrc is not allowed in release readiness.',
88
+ });
89
+ continue;
90
+ }
91
+ const content = await fs.readFile(path.join(projectRoot, normalized), 'utf-8').catch(() => '');
92
+ scannedFiles += 1;
93
+ for (const signature of SECRET_SIGNATURES) {
94
+ if (signature.pattern.test(content)) {
95
+ issues.push({
96
+ code: signature.code,
97
+ path: normalized,
98
+ message: 'High-confidence secret signature detected.',
99
+ });
100
+ }
101
+ }
102
+ }
103
+ return { scannedFiles, issues };
104
+ }
105
+ function normalizePackageFiles(files) {
106
+ return files
107
+ .filter((file) => typeof file === 'string')
108
+ .map(normalizePath)
109
+ .filter(Boolean);
110
+ }
111
+ function normalizePath(value) {
112
+ return value.replace(/\\/gu, '/').replace(/^\.\/+/u, '').trim();
113
+ }
114
+ function isBinaryLike(fileName) {
115
+ return /\.(?:png|jpg|jpeg|gif|webp|pdf|tgz|zip|gz|br|woff2?)$/iu.test(fileName);
116
+ }
117
+ async function readPackageJson(projectRoot) {
118
+ const content = await fs.readFile(path.join(projectRoot, 'package.json'), 'utf-8');
119
+ return JSON.parse(content);
120
+ }
121
+ //# sourceMappingURL=package-security-gates.js.map
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const DerivationProfileSchema: z.ZodEnum<{
3
- prototype: "prototype";
4
3
  "foundation-compatible": "foundation-compatible";
4
+ prototype: "prototype";
5
5
  "enterprise-strict": "enterprise-strict";
6
6
  }>;
7
7
  export declare const PreviewGateStatusSchema: z.ZodEnum<{
@@ -14,20 +14,92 @@ export declare const PackageStructureNodeKindSchema: z.ZodEnum<{
14
14
  file: "file";
15
15
  dir: "dir";
16
16
  }>;
17
+ export declare const PreviewContextPatternSchema: z.ZodEnum<{
18
+ "bo-pattern": "bo-pattern";
19
+ "entity-pattern": "entity-pattern";
20
+ "application-only": "application-only";
21
+ }>;
22
+ export declare const PreviewDiagnosticSeveritySchema: z.ZodEnum<{
23
+ block: "block";
24
+ warn: "warn";
25
+ }>;
17
26
  export declare const PackageStructureNodeSchema: z.ZodSchema<PackageStructureNode>;
27
+ export declare const ApplicationOnlyContextSchema: z.ZodObject<{
28
+ context: z.ZodString;
29
+ path: z.ZodString;
30
+ reason: z.ZodString;
31
+ adr_required: z.ZodDefault<z.ZodBoolean>;
32
+ contract_rule_ref: z.ZodLiteral<"DTAPI-P1-APPONLY-001">;
33
+ }, z.core.$strip>;
34
+ export declare const PreviewContextClassificationSchema: z.ZodObject<{
35
+ context: z.ZodString;
36
+ pattern: z.ZodEnum<{
37
+ "bo-pattern": "bo-pattern";
38
+ "entity-pattern": "entity-pattern";
39
+ "application-only": "application-only";
40
+ }>;
41
+ source_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
42
+ decision_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
43
+ }, z.core.$strip>;
44
+ export declare const PreviewDiagnosticSchema: z.ZodObject<{
45
+ code: z.ZodString;
46
+ severity: z.ZodEnum<{
47
+ block: "block";
48
+ warn: "warn";
49
+ }>;
50
+ message: z.ZodString;
51
+ remediation: z.ZodString;
52
+ path: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strip>;
18
54
  export declare const PackageStructurePreviewSchema: z.ZodObject<{
19
55
  schema_version: z.ZodLiteral<1>;
20
56
  generated_at: z.ZodString;
21
57
  project_name: z.ZodString;
22
58
  profile: z.ZodEnum<{
23
- prototype: "prototype";
24
59
  "foundation-compatible": "foundation-compatible";
60
+ prototype: "prototype";
25
61
  "enterprise-strict": "enterprise-strict";
26
62
  }>;
63
+ source: z.ZodDefault<z.ZodEnum<{
64
+ template: "template";
65
+ "artifact-map": "artifact-map";
66
+ }>>;
27
67
  contexts: z.ZodArray<z.ZodString>;
28
68
  subsystems: z.ZodArray<z.ZodString>;
29
69
  transports: z.ZodArray<z.ZodString>;
30
70
  tree: z.ZodType<PackageStructureNode, unknown, z.core.$ZodTypeInternals<PackageStructureNode, unknown>>;
71
+ foundation_tests_projection: z.ZodOptional<z.ZodType<PackageStructureNode, unknown, z.core.$ZodTypeInternals<PackageStructureNode, unknown>>>;
72
+ runtime_scripts_projection: z.ZodOptional<z.ZodType<PackageStructureNode, unknown, z.core.$ZodTypeInternals<PackageStructureNode, unknown>>>;
73
+ application_only_contexts: z.ZodDefault<z.ZodArray<z.ZodObject<{
74
+ context: z.ZodString;
75
+ path: z.ZodString;
76
+ reason: z.ZodString;
77
+ adr_required: z.ZodDefault<z.ZodBoolean>;
78
+ contract_rule_ref: z.ZodLiteral<"DTAPI-P1-APPONLY-001">;
79
+ }, z.core.$strip>>>;
80
+ context_classification: z.ZodDefault<z.ZodArray<z.ZodObject<{
81
+ context: z.ZodString;
82
+ pattern: z.ZodEnum<{
83
+ "bo-pattern": "bo-pattern";
84
+ "entity-pattern": "entity-pattern";
85
+ "application-only": "application-only";
86
+ }>;
87
+ source_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
88
+ decision_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
89
+ }, z.core.$strip>>>;
90
+ contract_pack_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
91
+ diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
92
+ code: z.ZodString;
93
+ severity: z.ZodEnum<{
94
+ block: "block";
95
+ warn: "warn";
96
+ }>;
97
+ message: z.ZodString;
98
+ remediation: z.ZodString;
99
+ path: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>>>;
101
+ artifact_languages: z.ZodDefault<z.ZodArray<z.ZodString>>;
102
+ material_signature: z.ZodString;
31
103
  }, z.core.$strip>;
32
104
  export declare const HumanValidationGateSchema: z.ZodObject<{
33
105
  gate_id: z.ZodString;
@@ -43,6 +115,9 @@ export declare const HumanValidationGateSchema: z.ZodObject<{
43
115
  approved_by: z.ZodOptional<z.ZodString>;
44
116
  correction_notes: z.ZodOptional<z.ZodString>;
45
117
  exception_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
118
+ contract_pack_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
119
+ material_signature: z.ZodString;
120
+ serialized_at: z.ZodString;
46
121
  }, z.core.$strip>;
47
122
  export interface HumanValidationGateData {
48
123
  selected_profile: z.infer<typeof DerivationProfileSchema>;
@@ -62,16 +137,23 @@ export interface DebGateInput {
62
137
  subsystems?: string[];
63
138
  transports?: string[];
64
139
  generated_at?: string;
140
+ artifact_map?: unknown;
141
+ previous_human_validation_gate?: z.infer<typeof HumanValidationGateSchema>;
142
+ contract_pack_refs?: string[];
65
143
  }
66
144
  export declare function generatePackageStructurePreview(input: DebGateInput): z.infer<typeof PackageStructurePreviewSchema>;
67
145
  export declare function formatPreviewAsTree(node: z.infer<typeof PackageStructureNodeSchema>, prefix?: string): string;
68
- export declare function buildHumanValidationGate(preview: z.infer<typeof PackageStructurePreviewSchema>): z.infer<typeof HumanValidationGateSchema>;
146
+ export declare function buildHumanValidationGate(preview: z.infer<typeof PackageStructurePreviewSchema>, options?: {
147
+ previous_gate?: z.infer<typeof HumanValidationGateSchema>;
148
+ exception_refs?: string[];
149
+ }): z.infer<typeof HumanValidationGateSchema>;
69
150
  export declare function generateDevtrackApiDebGate(input: DebGateInput): HumanValidationGateData;
70
151
  export declare function isGatePending(gate: z.infer<typeof HumanValidationGateSchema>): boolean;
71
152
  export declare function isGateApproved(gate: z.infer<typeof HumanValidationGateSchema>): boolean;
72
153
  export type DerivationProfile = z.infer<typeof DerivationProfileSchema>;
73
154
  export type PreviewGateStatus = z.infer<typeof PreviewGateStatusSchema>;
74
155
  export type PackageStructureNodeKind = z.infer<typeof PackageStructureNodeKindSchema>;
156
+ export type PreviewContextPattern = z.infer<typeof PreviewContextPatternSchema>;
75
157
  export type PackageStructureNode = {
76
158
  name: string;
77
159
  kind: PackageStructureNodeKind;