@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.
- package/.sdd/skills/curated/devtrack-api/SKILL.md +98 -12
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +5 -3
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +12 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +61 -5
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +15 -3
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +1951 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +16 -14
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +40 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +19 -2
- package/.sdd/skills/curated/devtrack-api/references/generated-artifact-invalidation.md +97 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +30 -1
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +42 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +22 -1
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +9 -7
- package/README.md +280 -29
- package/dist/applications/sdd/index.d.ts +16 -0
- package/dist/applications/sdd/index.js +16 -0
- package/dist/cli/program.js +180 -11
- package/dist/commands/config.js +197 -10
- package/dist/commands/sdd/execution.js +408 -16
- package/dist/commands/sdd/plugin.js +5 -0
- package/dist/commands/sdd/shared.d.ts +1 -0
- package/dist/commands/sdd/shared.js +10 -0
- package/dist/commands/sdd.js +157 -7
- package/dist/core/cli/command-matrix.d.ts +18 -0
- package/dist/core/cli/command-matrix.js +157 -0
- package/dist/core/cli-command-quality.js +11 -0
- package/dist/core/completions/command-registry.js +45 -0
- package/dist/core/config-schema.d.ts +31 -1
- package/dist/core/config-schema.js +79 -5
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.js +11 -0
- package/dist/core/global-config.d.ts +29 -0
- package/dist/core/init.d.ts +2 -2
- package/dist/core/init.js +13 -14
- package/dist/core/sdd/agent-binding.d.ts +19 -19
- package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
- package/dist/core/sdd/agent-runtime-contract.js +200 -0
- package/dist/core/sdd/allocator-recovery.d.ts +14 -0
- package/dist/core/sdd/allocator-recovery.js +30 -0
- package/dist/core/sdd/allocator-security.d.ts +18 -0
- package/dist/core/sdd/allocator-security.js +36 -0
- package/dist/core/sdd/api-foundation-baseline.d.ts +111 -0
- package/dist/core/sdd/api-foundation-baseline.js +151 -0
- package/dist/core/sdd/api-foundation-parity.d.ts +114 -0
- package/dist/core/sdd/api-foundation-parity.js +131 -0
- package/dist/core/sdd/api-profile-catalog.d.ts +36 -0
- package/dist/core/sdd/api-profile-catalog.js +132 -0
- package/dist/core/sdd/api-profile-dry-run-projection.d.ts +93 -0
- package/dist/core/sdd/api-profile-dry-run-projection.js +370 -0
- package/dist/core/sdd/api-profile-recipes.d.ts +82 -0
- package/dist/core/sdd/api-profile-recipes.js +484 -0
- package/dist/core/sdd/artifact-id-allocator.d.ts +368 -0
- package/dist/core/sdd/artifact-id-allocator.js +510 -0
- package/dist/core/sdd/check.d.ts +52 -1
- package/dist/core/sdd/check.js +326 -11
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
- package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
- package/dist/core/sdd/coordination/index.d.ts +1 -0
- package/dist/core/sdd/coordination/index.js +1 -0
- package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
- package/dist/core/sdd/coordination/redis-runtime.js +698 -0
- package/dist/core/sdd/deepagent-contracts.d.ts +99 -5
- package/dist/core/sdd/deepagent-contracts.js +62 -0
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +3 -3
- package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
- package/dist/core/sdd/default-bootstrap-files.js +14 -10
- package/dist/core/sdd/default-skills.js +115 -9
- package/dist/core/sdd/devtrack-api-appliance.d.ts +42 -1
- package/dist/core/sdd/devtrack-api-appliance.js +159 -32
- package/dist/core/sdd/devtrack-api-architecture.d.ts +16 -0
- package/dist/core/sdd/devtrack-api-architecture.js +86 -0
- package/dist/core/sdd/docs-sync.js +24 -18
- package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
- package/dist/core/sdd/domain/capability-diff.js +200 -0
- package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
- package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
- package/dist/core/sdd/enterprise-mutating-command-gate.d.ts +27 -0
- package/dist/core/sdd/enterprise-mutating-command-gate.js +104 -0
- package/dist/core/sdd/enterprise-provenance-gates.d.ts +20 -0
- package/dist/core/sdd/enterprise-provenance-gates.js +63 -0
- package/dist/core/sdd/enterprise-provisioning-policy.d.ts +26 -0
- package/dist/core/sdd/enterprise-provisioning-policy.js +104 -0
- package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
- package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
- package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
- package/dist/core/sdd/foundation-layer-manifest.js +117 -0
- package/dist/core/sdd/governance-schemas.d.ts +2 -2
- package/dist/core/sdd/governance-schemas.js +11 -2
- package/dist/core/sdd/intent-guard.d.ts +22 -0
- package/dist/core/sdd/intent-guard.js +67 -0
- package/dist/core/sdd/json-schema.js +13 -1
- package/dist/core/sdd/legacy-operations.js +169 -5
- package/dist/core/sdd/migrate-workspace.js +39 -0
- package/dist/core/sdd/package-security-gates.d.ts +21 -0
- package/dist/core/sdd/package-security-gates.js +121 -0
- package/dist/core/sdd/package-structure-gate.d.ts +85 -3
- package/dist/core/sdd/package-structure-gate.js +384 -11
- package/dist/core/sdd/parallel-feat-automation.d.ts +185 -7
- package/dist/core/sdd/parallel-feat-automation.js +212 -0
- package/dist/core/sdd/plugin-broker.d.ts +223 -4
- package/dist/core/sdd/plugin-broker.js +10 -0
- package/dist/core/sdd/plugin-cli.d.ts +30 -0
- package/dist/core/sdd/plugin-cli.js +70 -3
- package/dist/core/sdd/plugin-evidence.d.ts +73 -0
- package/dist/core/sdd/plugin-manifest.d.ts +69 -1
- package/dist/core/sdd/plugin-manifest.js +10 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
- package/dist/core/sdd/plugin-policy.js +6 -1
- package/dist/core/sdd/plugin-registry.d.ts +138 -2
- package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
- package/dist/core/sdd/plugin-sdk-contract.js +268 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
- package/dist/core/sdd/quality-validation.d.ts +89 -16
- package/dist/core/sdd/release-readiness.d.ts +68 -0
- package/dist/core/sdd/release-readiness.js +767 -0
- package/dist/core/sdd/reversa-architecture-extractor.d.ts +13 -0
- package/dist/core/sdd/reversa-architecture-extractor.js +89 -0
- package/dist/core/sdd/reversa-artifact-writer.d.ts +18 -0
- package/dist/core/sdd/reversa-artifact-writer.js +40 -0
- package/dist/core/sdd/reversa-command-policy.d.ts +136 -0
- package/dist/core/sdd/reversa-command-policy.js +361 -0
- package/dist/core/sdd/reversa-data-extractor.d.ts +11 -0
- package/dist/core/sdd/reversa-data-extractor.js +73 -0
- package/dist/core/sdd/reversa-equivalence.d.ts +20 -0
- package/dist/core/sdd/reversa-equivalence.js +34 -0
- package/dist/core/sdd/reversa-evidence.d.ts +298 -0
- package/dist/core/sdd/reversa-evidence.js +118 -0
- package/dist/core/sdd/reversa-reconstruction.d.ts +29 -0
- package/dist/core/sdd/reversa-reconstruction.js +32 -0
- package/dist/core/sdd/reversa-rules-extractor.d.ts +12 -0
- package/dist/core/sdd/reversa-rules-extractor.js +86 -0
- package/dist/core/sdd/reversa-source-safety.d.ts +19 -0
- package/dist/core/sdd/reversa-source-safety.js +105 -0
- package/dist/core/sdd/reversa-surface-scout.d.ts +13 -0
- package/dist/core/sdd/reversa-surface-scout.js +85 -0
- package/dist/core/sdd/reversa-ux-mapper.d.ts +11 -0
- package/dist/core/sdd/reversa-ux-mapper.js +73 -0
- package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
- package/dist/core/sdd/runtime-boundary-contract.js +90 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
- package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
- package/dist/core/sdd/services/agent-run.service.js +73 -1
- package/dist/core/sdd/services/archive-quality-coherence.service.d.ts +17 -0
- package/dist/core/sdd/services/archive-quality-coherence.service.js +141 -0
- package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
- package/dist/core/sdd/services/capability-diff.service.js +26 -0
- package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
- package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
- package/dist/core/sdd/services/context.service.d.ts +43 -340
- package/dist/core/sdd/services/context.service.js +323 -9
- package/dist/core/sdd/services/decide.service.js +1 -1
- package/dist/core/sdd/services/finalize.service.d.ts +27 -0
- package/dist/core/sdd/services/finalize.service.js +226 -18
- package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
- package/dist/core/sdd/services/historical-quality-regression.service.d.ts +35 -0
- package/dist/core/sdd/services/historical-quality-regression.service.js +228 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/planning-execution-coherence.service.d.ts +45 -0
- package/dist/core/sdd/services/planning-execution-coherence.service.js +225 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
- package/dist/core/sdd/state.d.ts +1 -0
- package/dist/core/sdd/state.js +266 -34
- package/dist/core/sdd/store/sdd-stores.js +2 -2
- package/dist/core/sdd/structural-health.d.ts +13 -13
- package/dist/core/sdd/types.d.ts +30 -15
- package/dist/core/sdd/types.js +4 -0
- package/dist/core/sdd/views.js +17 -0
- package/dist/core/sdd/workspace-schemas.d.ts +428 -7
- package/dist/core/sdd/workspace-schemas.js +223 -70
- package/dist/core/shared/skill-generation.d.ts +2 -0
- package/dist/core/shared/skill-generation.js +19 -2
- package/dist/core/shared/tool-detection.d.ts +19 -0
- package/dist/core/shared/tool-detection.js +89 -0
- package/dist/domains/sdd/index.d.ts +6 -0
- package/dist/domains/sdd/index.js +6 -0
- package/dist/infrastructures/sdd/index.d.ts +7 -0
- package/dist/infrastructures/sdd/index.js +6 -0
- package/dist/presentations/cli/sdd/index.d.ts +3 -0
- package/dist/presentations/cli/sdd/index.js +3 -0
- package/dist/shared/sdd/index.d.ts +3 -0
- package/dist/shared/sdd/index.js +2 -0
- package/package.json +14 -10
- package/schemas/sdd/2-plan.schema.json +207 -2
- package/schemas/sdd/5-quality.schema.json +324 -25
- package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
- package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
- package/schemas/sdd/codesdd-plugin.schema.json +171 -0
- package/schemas/sdd/deepagent-run-request.schema.json +316 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
- package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
- package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
- package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
- package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
- package/schemas/sdd/plugin-package-governance.schema.json +74 -0
- package/schemas/sdd/plugin-registry.schema.json +171 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
- package/schemas/sdd/reversa-evidence-bundle.schema.json +466 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
- 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
|
|
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;
|