@agent-teams/engineering-foundation 0.17.0-rc.8 → 0.17.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 (147) hide show
  1. package/README.md +33 -47
  2. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.d.ts +3 -0
  3. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.d.ts.map +1 -0
  4. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.js +17 -0
  5. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.js.map +1 -0
  6. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.d.ts +7 -0
  7. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.d.ts.map +1 -0
  8. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.js +51 -0
  9. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.js.map +1 -0
  10. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.d.ts +22 -0
  11. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.d.ts.map +1 -0
  12. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.js +90 -0
  13. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.js.map +1 -0
  14. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.d.ts +3 -0
  15. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.d.ts.map +1 -0
  16. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.js +5 -0
  17. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.js.map +1 -0
  18. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.d.ts +18 -0
  19. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.d.ts.map +1 -0
  20. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.js +2 -0
  21. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.js.map +1 -0
  22. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.d.ts +19 -0
  23. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.d.ts.map +1 -0
  24. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.js +2 -0
  25. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.js.map +1 -0
  26. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.d.ts +4 -0
  27. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.d.ts.map +1 -0
  28. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.js +64 -0
  29. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.js.map +1 -0
  30. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.d.ts +6 -0
  31. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.d.ts.map +1 -0
  32. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.js +75 -0
  33. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.js.map +1 -0
  34. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.d.ts +4 -0
  35. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.d.ts.map +1 -0
  36. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.js +2 -0
  37. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.js.map +1 -0
  38. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.d.ts +5 -0
  39. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.d.ts.map +1 -0
  40. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.js +2 -0
  41. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.js.map +1 -0
  42. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.d.ts +20 -0
  43. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.d.ts.map +1 -0
  44. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.js +9 -0
  45. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.js.map +1 -0
  46. package/dist/capabilities/quality-gate-runner/application/rules.d.ts +12 -0
  47. package/dist/capabilities/quality-gate-runner/application/rules.d.ts.map +1 -0
  48. package/dist/capabilities/quality-gate-runner/application/rules.js +18 -0
  49. package/dist/capabilities/quality-gate-runner/application/rules.js.map +1 -0
  50. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.d.ts +9 -0
  51. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.d.ts.map +1 -0
  52. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.js +5 -0
  53. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.js.map +1 -0
  54. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.d.ts +10 -0
  55. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.d.ts.map +1 -0
  56. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.js +138 -0
  57. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.js.map +1 -0
  58. package/dist/capabilities/quality-gate-runner/contract/config.d.ts +5 -0
  59. package/dist/capabilities/quality-gate-runner/contract/config.d.ts.map +1 -0
  60. package/dist/capabilities/quality-gate-runner/contract/config.js +89 -0
  61. package/dist/capabilities/quality-gate-runner/contract/config.js.map +1 -0
  62. package/dist/capabilities/quality-gate-runner/gate-command.d.ts +10 -0
  63. package/dist/capabilities/quality-gate-runner/gate-command.d.ts.map +1 -0
  64. package/dist/capabilities/quality-gate-runner/gate-command.js +82 -0
  65. package/dist/capabilities/quality-gate-runner/gate-command.js.map +1 -0
  66. package/dist/capabilities/quality-gate-runner/module.d.ts +5 -0
  67. package/dist/capabilities/quality-gate-runner/module.d.ts.map +1 -0
  68. package/dist/capabilities/quality-gate-runner/module.js +49 -0
  69. package/dist/capabilities/quality-gate-runner/module.js.map +1 -0
  70. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.d.ts +2 -0
  71. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.d.ts.map +1 -1
  72. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.js +32 -0
  73. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.js.map +1 -1
  74. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.d.ts +16 -0
  75. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.d.ts.map +1 -0
  76. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.js +213 -0
  77. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.js.map +1 -0
  78. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.d.ts +9 -0
  79. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.d.ts.map +1 -1
  80. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.js +232 -62
  81. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.js.map +1 -1
  82. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.d.ts +1 -0
  83. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.d.ts.map +1 -1
  84. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.js +2 -1
  85. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.js.map +1 -1
  86. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.d.ts +26 -0
  87. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.d.ts.map +1 -1
  88. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.d.ts +61 -0
  89. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.d.ts.map +1 -0
  90. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.js +7 -0
  91. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.js.map +1 -0
  92. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.d.ts +15 -0
  93. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.d.ts.map +1 -0
  94. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.js +2 -0
  95. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.js.map +1 -0
  96. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.d.ts +8 -0
  97. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.d.ts.map +1 -0
  98. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.js +128 -0
  99. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.js.map +1 -0
  100. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.d.ts.map +1 -1
  101. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js +8 -0
  102. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js.map +1 -1
  103. package/dist/capabilities/repository-agent-workflow/instructions-command.d.ts +6 -0
  104. package/dist/capabilities/repository-agent-workflow/instructions-command.d.ts.map +1 -0
  105. package/dist/capabilities/repository-agent-workflow/instructions-command.js +26 -0
  106. package/dist/capabilities/repository-agent-workflow/instructions-command.js.map +1 -0
  107. package/dist/cli-arguments.d.ts.map +1 -1
  108. package/dist/cli-arguments.js +15 -8
  109. package/dist/cli-arguments.js.map +1 -1
  110. package/dist/cli.js +31 -8
  111. package/dist/cli.js.map +1 -1
  112. package/dist/composition/capability-modules.d.ts +13 -0
  113. package/dist/composition/capability-modules.d.ts.map +1 -0
  114. package/dist/composition/capability-modules.js +30 -0
  115. package/dist/composition/capability-modules.js.map +1 -0
  116. package/dist/composition/capability-registry.d.ts +2 -0
  117. package/dist/composition/capability-registry.d.ts.map +1 -1
  118. package/dist/composition/capability-registry.js +5 -25
  119. package/dist/composition/capability-registry.js.map +1 -1
  120. package/dist/composition/rule-registry.d.ts +4 -7
  121. package/dist/composition/rule-registry.d.ts.map +1 -1
  122. package/dist/composition/rule-registry.js +17 -25
  123. package/dist/composition/rule-registry.js.map +1 -1
  124. package/dist/filesystem-path-safety.d.ts +6 -0
  125. package/dist/filesystem-path-safety.d.ts.map +1 -1
  126. package/dist/filesystem-path-safety.js +76 -21
  127. package/dist/filesystem-path-safety.js.map +1 -1
  128. package/dist/legacy-docs-cli-deprecation.d.ts +10 -0
  129. package/dist/legacy-docs-cli-deprecation.d.ts.map +1 -0
  130. package/dist/legacy-docs-cli-deprecation.js +36 -0
  131. package/dist/legacy-docs-cli-deprecation.js.map +1 -0
  132. package/dist/process-execution/node-process-runner.d.ts +6 -1
  133. package/dist/process-execution/node-process-runner.d.ts.map +1 -1
  134. package/dist/process-execution/node-process-runner.js +29 -6
  135. package/dist/process-execution/node-process-runner.js.map +1 -1
  136. package/dist/quality-gate-cli-command.d.ts +3 -0
  137. package/dist/quality-gate-cli-command.d.ts.map +1 -0
  138. package/dist/quality-gate-cli-command.js +37 -0
  139. package/dist/quality-gate-cli-command.js.map +1 -0
  140. package/dist/schema-ids.d.ts +1 -1
  141. package/dist/schema-ids.d.ts.map +1 -1
  142. package/dist/schema-ids.js +2 -0
  143. package/dist/schema-ids.js.map +1 -1
  144. package/package.json +3 -1
  145. package/schemas/foundation-config/v1.schema.json +10 -0
  146. package/schemas/quality-gate-run-report/v1.schema.json +47 -0
  147. package/schemas/quality-gate-runner/v1.schema.json +74 -0
package/README.md CHANGED
@@ -34,70 +34,45 @@ const catalog = await buildDocumentationCatalog({
34
34
  });
35
35
  ```
36
36
 
37
- Agents can query the same stable catalog without a generated search index. The
38
- v1 query is a normalized, case-independent literal substring over document ID,
39
- title, summary, headings, and body. Filters are exact and combine with AND;
40
- results sort by ID and then repository path.
41
-
42
- Node/pnpm consumers expose the short agent-facing commands through their own
43
- repository manifest; Foundation keeps the underlying CLI package-manager
44
- neutral:
37
+ The operator and agent-facing documentation workflow is owned by
38
+ `@agent-teams/docs-protocol`. New and migrated consumers expose its commands
39
+ through their repository manifest:
45
40
 
46
41
  ```json
47
42
  {
48
43
  "scripts": {
49
- "docs:find": "agent-teams-foundation docs find",
50
- "docs:new": "agent-teams-foundation docs new",
51
- "docs:doctor": "agent-teams-foundation docs doctor",
44
+ "docs:info": "agent-teams-docs info",
45
+ "docs:find": "agent-teams-docs find",
46
+ "docs:new": "agent-teams-docs new",
47
+ "docs:doctor": "agent-teams-docs doctor",
48
+ "docs:recover": "agent-teams-docs recover",
49
+ "docs:check": "agent-teams-docs check",
52
50
  "check": "agent-teams-foundation repo check"
53
51
  }
54
52
  }
55
53
  ```
56
54
 
57
55
  ```bash
58
- pnpm docs:find "tenant isolation" --consumer /repo
59
- pnpm docs:find --type adr --status proposed --owner architecture --consumer /repo --json
60
- ```
61
-
62
- The default profile is
63
- `architecture/foundation/document-authoring.yaml`; `--profile` selects another
64
- repository-relative profile. Zero matches is success. A partial catalog retains
65
- valid matches and structured diagnostics while returning exit code `1`.
66
-
67
- Create a governed document with an explicit ID, owner, and summary. Foundation
68
- does not infer `--owner` or `--summary` from the document type, schema, path, or
69
- current user:
70
-
71
- ```bash
72
- agent-teams-foundation docs new --type adr --id ADR-0083 \
56
+ agent-teams-docs find "tenant isolation" --consumer /repo
57
+ agent-teams-docs new --type adr --id ADR-0083 \
73
58
  --title "Tenant isolation" --owner architecture/tooling \
74
59
  --summary "Defines the tenant-isolation boundary and its verification evidence." \
75
60
  --dry-run --consumer /repo
76
- agent-teams-foundation docs new --type adr --id ADR-0083 \
61
+ agent-teams-docs new --type adr --id ADR-0083 \
77
62
  --title "Tenant isolation" --owner architecture/tooling \
78
63
  --summary "Defines the tenant-isolation boundary and its verification evidence." \
79
- --consumer /repo
80
- ```
81
-
82
- `--dry-run` compiles a non-reserving preview and performs no repository
83
- mutation. A successful create reports the document path and either the exact
84
- consumer-authorized index path and Markdown link to add, or the standard
85
- repository check as the next step. Use the read-only doctor before operating on
86
- uncertain transaction state, and run recovery only when it reports an automatic
87
- document recovery route:
88
-
89
- ```bash
90
- agent-teams-foundation docs doctor --consumer /repo
91
- agent-teams-foundation docs recover --consumer /repo
92
- agent-teams-foundation check --consumer /repo
64
+ --apply --consumer /repo
65
+ agent-teams-docs check --consumer /repo
93
66
  ```
94
67
 
95
- Every docs command accepts `--json`. Search uses command-envelope v1; mutation
96
- commands use command-envelope v2. Machine mode writes exactly one bounded JSON
97
- object to stdout, keeps diagnostics and remediation structured, uses `/` in
98
- repository paths, and omits timestamps and durations. Stable exit codes are
99
- `0` success, `1` conflict or recovery required, `2` invalid input, `3`
100
- execution failure, and `130` cancellation. The canonical details are in the
68
+ Foundation's legacy `docs` CLI namespace remains executable only as a frozen
69
+ compatibility surface. Human invocations emit the stable diagnostic code
70
+ `FOUNDATION_DOCS_CLI_DEPRECATED`; JSON invocations retain their published
71
+ stdout, stderr, envelope, and exit-code contract. The legacy namespace must not
72
+ receive new commands, options, orchestration behavior, or Docs Protocol imports.
73
+ Removal requires the evidence defined by
74
+ [ADR-0033](../../docs/decisions/0033-freeze-legacy-foundation-docs-cli.md).
75
+ The canonical current workflow and JSON contract are in the
101
76
  [document authoring protocol](../../docs/architecture/document-authoring-protocol.md#canonical-agent-and-operator-cli).
102
77
 
103
78
  Consumer CI should run both policy gates:
@@ -135,6 +110,17 @@ Repositories may also declare `repository.agent-workflow` and expose
135
110
  `agent-teams-foundation agent-workflow changed`. Foundation then discovers the
136
111
  current Git delta and invokes the consumer's configured pnpm scripts. This local
137
112
  preflight is portable across agents and never replaces the complete CI gate.
113
+ `agent-teams-foundation agent-workflow instructions <repository-file>` reports
114
+ the applicable instruction scopes, precedence, shadowing, byte budget, and
115
+ digests without printing or injecting instruction content.
116
+
117
+ Repositories may independently declare `quality.gate-runner` and run
118
+ `agent-teams-foundation gate run <profile>`. A profile is a validated DAG of
119
+ existing root package scripts with bounded concurrency, optional task deadlines,
120
+ and explicit `needs` versus `after` semantics. Configuration cannot supply
121
+ commands or plugins, static `check` never executes scripts, and installation or
122
+ upgrade never activates a profile. See the
123
+ [quality gate runner reference](../../docs/reference/quality-gate-runner.md).
138
124
 
139
125
  The root file is `foundation.config.yaml`. Use
140
126
  `agent-teams-foundation schema foundation-config/v1` for its canonical schema
@@ -0,0 +1,3 @@
1
+ import type { QualityGateRunReport } from "../../../application/model/quality-gate-report.js";
2
+ export declare function renderQualityGateRunReport(report: QualityGateRunReport): string;
3
+ //# sourceMappingURL=report-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-renderer.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAE9F,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAe/E"}
@@ -0,0 +1,17 @@
1
+ export function renderQualityGateRunReport(report) {
2
+ const lines = [
3
+ `Quality gate profile: ${report.profileId}`,
4
+ `Outcome: ${report.outcome}`,
5
+ `Duration: ${report.durationMs}ms`
6
+ ];
7
+ for (const task of report.tasks) {
8
+ const exit = task.exitCode === null ? "" : ` exit=${task.exitCode}`;
9
+ const signal = task.signal === null ? "" : ` signal=${task.signal}`;
10
+ lines.push(`- ${task.id}: ${task.outcome} (${task.durationMs}ms)${exit}${signal}`);
11
+ if (task.failureTail.length > 0) {
12
+ lines.push(task.failureTail);
13
+ }
14
+ }
15
+ return `${lines.join("\n")}\n`;
16
+ }
17
+ //# sourceMappingURL=report-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-renderer.js","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,0BAA0B,CAAC,MAA4B;IACrE,MAAM,KAAK,GAAG;QACZ,yBAAyB,MAAM,CAAC,SAAS,EAAE;QAC3C,YAAY,MAAM,CAAC,OAAO,EAAE;QAC5B,aAAa,MAAM,CAAC,UAAU,IAAI;KACnC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,QAAQ,EAAE,CAAC;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,CAAC;QACpE,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,UAAU,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC;QACnF,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { PackageScriptCatalogReader } from "../../../application/ports/package-script-catalog-reader.js";
2
+ export declare class FilesystemPackageScriptCatalogReader implements PackageScriptCatalogReader {
3
+ read(consumerRoot: string, signal?: AbortSignal): Promise<Readonly<{
4
+ scripts: Readonly<Record<string, string>>;
5
+ }>>;
6
+ }
7
+ //# sourceMappingURL=filesystem-package-script-catalog-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filesystem-package-script-catalog-reader.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AAiB9G,qBAAa,oCAAqC,YAAW,0BAA0B;IAC/E,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW;;QAiCpD;CACF"}
@@ -0,0 +1,51 @@
1
+ import { join } from "node:path";
2
+ import { assertNotCancelled } from "../../../../../cancellation.js";
3
+ import { CapabilityInputError } from "../../../../../capability-runtime.js";
4
+ import { readContainedRegularFile } from "../../../../../filesystem-path-safety.js";
5
+ import { parseStrictJson } from "../../../../../strict-json.js";
6
+ const MAX_PACKAGE_JSON_BYTES = 1024 * 1024;
7
+ function inputError(message) {
8
+ throw new CapabilityInputError({
9
+ code: "QUALITY_GATE_RUNNER_PACKAGE_INVALID",
10
+ message,
11
+ phase: "quality-gate-runner-package-catalog",
12
+ retryable: false
13
+ });
14
+ }
15
+ function isRecord(value) {
16
+ return typeof value === "object" && value !== null && !Array.isArray(value);
17
+ }
18
+ export class FilesystemPackageScriptCatalogReader {
19
+ async read(consumerRoot, signal) {
20
+ assertNotCancelled(signal);
21
+ let input;
22
+ try {
23
+ const source = await readContainedRegularFile({
24
+ root: consumerRoot,
25
+ candidate: join(consumerRoot, "package.json"),
26
+ maxBytes: MAX_PACKAGE_JSON_BYTES
27
+ });
28
+ input = parseStrictJson(source.toString("utf8"));
29
+ }
30
+ catch (error) {
31
+ inputError(`The consumer root package.json must be a stable strict JSON file: ${error instanceof Error ? error.message : "unavailable"}`);
32
+ }
33
+ assertNotCancelled(signal);
34
+ if (!isRecord(input)) {
35
+ inputError("The consumer root package.json must be an object.");
36
+ }
37
+ const scriptsInput = input["scripts"];
38
+ if (!isRecord(scriptsInput)) {
39
+ inputError("The consumer root package.json must declare a scripts object.");
40
+ }
41
+ const scripts = Object.create(null);
42
+ for (const [id, command] of Object.entries(scriptsInput)) {
43
+ if (typeof command !== "string") {
44
+ inputError(`package.json script ${id} must be a string.`);
45
+ }
46
+ scripts[id] = command;
47
+ }
48
+ return Object.freeze({ scripts: Object.freeze(scripts) });
49
+ }
50
+ }
51
+ //# sourceMappingURL=filesystem-package-script-catalog-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filesystem-package-script-catalog-reader.js","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,SAAS,UAAU,CAAC,OAAe;IACjC,MAAM,IAAI,oBAAoB,CAAC;QAC7B,IAAI,EAAE,qCAAqC;QAC3C,OAAO;QACP,KAAK,EAAE,qCAAqC;QAC5C,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,OAAO,oCAAoC;IAC/C,KAAK,C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E,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { type PackageScriptExecutor } from "../../../application/ports/package-script-executor.js";
2
+ export interface QualityGatePnpmEnvironment {
3
+ readonly npmExecPath?: string;
4
+ readonly pnpmHome?: string;
5
+ readonly pathValue?: string;
6
+ }
7
+ export declare class PnpmQualityGateScriptExecutor implements PackageScriptExecutor {
8
+ private readonly environment;
9
+ constructor(environment: QualityGatePnpmEnvironment);
10
+ run(input: {
11
+ readonly consumerRoot: string;
12
+ readonly scriptId: string;
13
+ readonly timeoutMs?: number;
14
+ readonly signal?: AbortSignal;
15
+ }): Promise<{
16
+ signal: NodeJS.Signals | null;
17
+ stdout: string;
18
+ stderr: string;
19
+ exitCode: number | null;
20
+ }>;
21
+ }
22
+ //# sourceMappingURL=pnpm-package-script-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pnpm-package-script-executor.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,uDAAuD,CAAC;AAE/D,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAyED,qBAAa,6BAA8B,YAAW,qBAAqB;IAC7D,OAAO,CAAC,QAAQ,CAAC,WAAW;IAAxC,YAA6B,WAAW,EAAE,0BAA0B,EAAI;IAElE,GAAG,CAAC,KAAK,EAAE;QACf,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC/B;;;;;OAwBA;CACF"}
@@ -0,0 +1,90 @@
1
+ import { lstat, realpath } from "node:fs/promises";
2
+ import { delimiter, isAbsolute, resolve } from "node:path";
3
+ import { FoundationError } from "../../../../../errors.js";
4
+ import { executeManagedProcess } from "../../../../../process-execution/node-process-runner.js";
5
+ import { PackageScriptTimeoutError } from "../../../application/ports/package-script-executor.js";
6
+ async function isRegularFile(path) {
7
+ const metadata = await lstat(path).catch(() => null);
8
+ return metadata !== null && metadata.isFile();
9
+ }
10
+ async function nodeEntrypoint(candidates) {
11
+ for (const candidate of candidates) {
12
+ if (candidate !== undefined && isAbsolute(candidate)) {
13
+ const canonical = await realpath(candidate).catch(() => null);
14
+ if (canonical !== null &&
15
+ /\.(?:c|m)?js$/u.test(canonical) &&
16
+ await isRegularFile(canonical)) {
17
+ return canonical;
18
+ }
19
+ }
20
+ }
21
+ return undefined;
22
+ }
23
+ async function resolvePnpmInvocation(environment) {
24
+ const homeEntrypoint = environment.pnpmHome === undefined
25
+ ? undefined
26
+ : resolve(environment.pnpmHome, "..", "pnpm", "bin", "pnpm.cjs");
27
+ const pathEntrypoints = environment.pathValue === undefined
28
+ ? []
29
+ : environment.pathValue.split(delimiter)
30
+ .filter((path) => path.length > 0)
31
+ .map((path) => resolve(path, process.platform === "win32" ? "pnpm.exe" : "pnpm"));
32
+ const entrypoint = await nodeEntrypoint([
33
+ environment.npmExecPath,
34
+ homeEntrypoint,
35
+ ...pathEntrypoints
36
+ ]);
37
+ if (entrypoint !== undefined) {
38
+ return { command: process.execPath, argsPrefix: [entrypoint] };
39
+ }
40
+ if (process.platform !== "win32") {
41
+ return { command: "pnpm", argsPrefix: [] };
42
+ }
43
+ const candidates = [
44
+ ...(environment.pnpmHome === undefined
45
+ ? []
46
+ : [resolve(environment.pnpmHome, "pnpm.exe")]),
47
+ ...(environment.pathValue === undefined
48
+ ? []
49
+ : environment.pathValue.split(delimiter)
50
+ .filter((path) => path.length > 0)
51
+ .map((path) => resolve(path, "pnpm.exe")))
52
+ ];
53
+ for (const candidate of candidates) {
54
+ if (await isRegularFile(candidate)) {
55
+ return { command: candidate, argsPrefix: [] };
56
+ }
57
+ }
58
+ throw new FoundationError("PROCESS_FAILED", "Unable to resolve a shell-free pnpm entrypoint on Windows.");
59
+ }
60
+ export class PnpmQualityGateScriptExecutor {
61
+ environment;
62
+ constructor(environment) {
63
+ this.environment = environment;
64
+ }
65
+ async run(input) {
66
+ const invocation = await resolvePnpmInvocation(this.environment);
67
+ try {
68
+ const result = await executeManagedProcess({
69
+ command: invocation.command,
70
+ args: [...invocation.argsPrefix, "run", input.scriptId],
71
+ cwd: input.consumerRoot,
72
+ ...(input.timeoutMs === undefined ? {} : { timeoutMs: input.timeoutMs }),
73
+ ...(input.signal === undefined ? {} : { signal: input.signal })
74
+ });
75
+ return {
76
+ ...result,
77
+ exitCode: result.signal === null ? result.exitCode : null
78
+ };
79
+ }
80
+ catch (error) {
81
+ if (input.timeoutMs !== undefined &&
82
+ error instanceof FoundationError &&
83
+ error.message.endsWith(`timed out after ${input.timeoutMs}ms.`)) {
84
+ throw new PackageScriptTimeoutError(input.timeoutMs, { cause: error });
85
+ }
86
+ throw error;
87
+ }
88
+ }
89
+ }
90
+ //# sourceMappingURL=pnpm-package-script-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pnpm-package-script-executor.js","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAA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AyB,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzE,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ import type { MonotonicClock } from "../../../application/ports/monotonic-clock.js";
2
+ export declare const performanceMonotonicClock: MonotonicClock;
3
+ //# sourceMappingURL=performance-monotonic-clock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-monotonic-clock.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,eAAO,MAAM,yBAAyB,EAAE,cAEtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { performance } from "node:perf_hooks";
2
+ export const performanceMonotonicClock = Object.freeze({
3
+ nowMs: () => performance.now()
4
+ });
5
+ //# sourceMappingURL=performance-monotonic-clock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-monotonic-clock.js","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,MAAM,CAAC,MAAM,yBAAyB,GAAmB,MAAM,CAAC,MAAM,CAAC;IACrE,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE;CAC/B,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ type QualityGateTaskOutcome = "passed" | "failed" | "timed-out" | "blocked" | "cancelled";
2
+ export interface QualityGateTaskReport {
3
+ readonly id: string;
4
+ readonly outcome: QualityGateTaskOutcome;
5
+ readonly durationMs: number;
6
+ readonly exitCode: number | null;
7
+ readonly signal: NodeJS.Signals | null;
8
+ readonly failureTail: string;
9
+ }
10
+ export interface QualityGateRunReport {
11
+ readonly reportSchemaVersion: 1;
12
+ readonly profileId: string;
13
+ readonly outcome: "passed" | "failed" | "cancelled";
14
+ readonly durationMs: number;
15
+ readonly tasks: readonly QualityGateTaskReport[];
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=quality-gate-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate-report.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate-report.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,GACvB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,SAAS,GACT,WAAW,CAAC;AAEhB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IACpD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAClD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=quality-gate-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate-report.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate-report.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export interface QualityGateTask {
2
+ readonly id: string;
3
+ readonly needs: readonly string[];
4
+ readonly after: readonly string[];
5
+ readonly timeoutMs?: number;
6
+ }
7
+ export interface QualityGateProfile {
8
+ readonly id: string;
9
+ readonly concurrency: number;
10
+ readonly tasks: readonly QualityGateTask[];
11
+ }
12
+ export interface QualityGatePolicy {
13
+ readonly packageManager: "pnpm";
14
+ readonly profiles: readonly QualityGateProfile[];
15
+ }
16
+ export interface PackageScriptCatalog {
17
+ readonly scripts: Readonly<Record<string, string>>;
18
+ }
19
+ //# sourceMappingURL=quality-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACpD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=quality-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { FoundationDiagnostic } from "../../../../check-contract.js";
2
+ import type { PackageScriptCatalog, QualityGatePolicy } from "../model/quality-gate.js";
3
+ export declare function evaluateQualityGateScripts(policy: QualityGatePolicy, catalog: PackageScriptCatalog): readonly FoundationDiagnostic[];
4
+ //# sourceMappingURL=evaluate-quality-gate-scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-quality-gate-scripts.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AA8DlC,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,oBAAoB,GAC5B,SAAS,oBAAoB,EAAE,CAqBjC"}
@@ -0,0 +1,64 @@
1
+ const PACKAGE_SCRIPT_REFERENCE = /(?:^|[;&|()]|\s)(?:pnpm|npm)\s+(?:run(?:-script)?\s+)?([A-Za-z0-9][A-Za-z0-9:._-]*)/gu;
2
+ function scriptReferences(command) {
3
+ const references = [];
4
+ for (const match of command.matchAll(PACKAGE_SCRIPT_REFERENCE)) {
5
+ const script = match[1];
6
+ if (script !== undefined) {
7
+ references.push(script);
8
+ }
9
+ }
10
+ return Object.freeze(references);
11
+ }
12
+ function reachesRunner(scriptId, catalog, visiting = new Set()) {
13
+ if (visiting.has(scriptId)) {
14
+ return false;
15
+ }
16
+ const command = catalog.scripts[scriptId];
17
+ if (command === undefined) {
18
+ return false;
19
+ }
20
+ if ((command.includes("agent-teams-foundation") ||
21
+ command.includes("engineering-foundation/dist/cli.js")) &&
22
+ (command.includes("gate run") || command.includes("gate\trun"))) {
23
+ return true;
24
+ }
25
+ const next = new Set(visiting);
26
+ next.add(scriptId);
27
+ return scriptReferences(command).some((reference) => reachesRunner(reference, catalog, next));
28
+ }
29
+ function diagnostic(input) {
30
+ return Object.freeze({
31
+ ruleId: input.ruleId,
32
+ severity: "error",
33
+ subject: input.scriptId,
34
+ message: input.message,
35
+ location: { path: "package.json" },
36
+ relatedLocations: [],
37
+ evidence: [{ kind: "script-id", value: input.scriptId }],
38
+ remediation: input.ruleId.endsWith("missing")
39
+ ? "Add the package script or remove it from every quality gate profile."
40
+ : "Remove the direct or indirect quality gate runner invocation from this script.",
41
+ requiresArchitectureReview: false
42
+ });
43
+ }
44
+ export function evaluateQualityGateScripts(policy, catalog) {
45
+ const scriptIds = [...new Set(policy.profiles.flatMap(({ tasks }) => tasks.map(({ id }) => id)))].toSorted();
46
+ return Object.freeze(scriptIds.flatMap((scriptId) => {
47
+ if (catalog.scripts[scriptId] === undefined) {
48
+ return [diagnostic({
49
+ ruleId: "quality.gate-runner.script-missing",
50
+ scriptId,
51
+ message: `Quality gate task ${scriptId} is not an existing root package.json script.`
52
+ })];
53
+ }
54
+ if (reachesRunner(scriptId, catalog)) {
55
+ return [diagnostic({
56
+ ruleId: "quality.gate-runner.script-recursive",
57
+ scriptId,
58
+ message: `Quality gate task ${scriptId} directly or indirectly invokes the gate runner.`
59
+ })];
60
+ }
61
+ return [];
62
+ }));
63
+ }
64
+ //# sourceMappingURL=evaluate-quality-gate-scripts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-quality-gate-scripts.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.ts"],"names":[],"mappings":"AAMA,MAAM,wBAAwB,GAC5B,uFAAuF,CAAC;AAE1F,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,KAAK,MAAM,KAAK,IAAI,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,QAAQ,kDAAkD;iBACzF,CAAC,CAAC,CAAC;QACN,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { QualityGatePolicy } from "../model/quality-gate.js";
2
+ export declare class QualityGateGraphError extends Error {
3
+ constructor(message: string);
4
+ }
5
+ export declare function validateQualityGatePolicy(policy: QualityGatePolicy): void;
6
+ //# sourceMappingURL=validate-quality-gate-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-quality-gate-graph.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,0BAA0B,CAAC;AAElC,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AA+CD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAqCzE"}
@@ -0,0 +1,75 @@
1
+ export class QualityGateGraphError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = "QualityGateGraphError";
5
+ }
6
+ }
7
+ function duplicate(values) {
8
+ const observed = new Set();
9
+ for (const value of values) {
10
+ if (observed.has(value)) {
11
+ return value;
12
+ }
13
+ observed.add(value);
14
+ }
15
+ return undefined;
16
+ }
17
+ function dependencies(task) {
18
+ return [...task.needs, ...task.after];
19
+ }
20
+ function assertAcyclic(profile) {
21
+ const tasks = new Map(profile.tasks.map((task) => [task.id, task]));
22
+ const visiting = new Set();
23
+ const visited = new Set();
24
+ const visit = (id, path) => {
25
+ if (visiting.has(id)) {
26
+ const cycleStart = path.indexOf(id);
27
+ const cycle = [...path.slice(cycleStart), id];
28
+ throw new QualityGateGraphError(`Profile ${profile.id} contains a dependency cycle: ${cycle.join(" -> ")}.`);
29
+ }
30
+ if (visited.has(id)) {
31
+ return;
32
+ }
33
+ visiting.add(id);
34
+ const task = tasks.get(id);
35
+ for (const dependency of task === undefined ? [] : dependencies(task)) {
36
+ visit(dependency, [...path, id]);
37
+ }
38
+ visiting.delete(id);
39
+ visited.add(id);
40
+ };
41
+ for (const task of profile.tasks) {
42
+ visit(task.id, []);
43
+ }
44
+ }
45
+ export function validateQualityGatePolicy(policy) {
46
+ const duplicateProfile = duplicate(policy.profiles.map(({ id }) => id));
47
+ if (duplicateProfile !== undefined) {
48
+ throw new QualityGateGraphError(`Duplicate profile ID: ${duplicateProfile}.`);
49
+ }
50
+ for (const profile of policy.profiles) {
51
+ const taskIds = profile.tasks.map(({ id }) => id);
52
+ const duplicateTask = duplicate(taskIds);
53
+ if (duplicateTask !== undefined) {
54
+ throw new QualityGateGraphError(`Profile ${profile.id} contains duplicate task ID: ${duplicateTask}.`);
55
+ }
56
+ const known = new Set(taskIds);
57
+ for (const task of profile.tasks) {
58
+ for (const dependency of dependencies(task)) {
59
+ if (dependency === task.id) {
60
+ throw new QualityGateGraphError(`Profile ${profile.id} task ${task.id} cannot depend on itself.`);
61
+ }
62
+ if (!known.has(dependency)) {
63
+ throw new QualityGateGraphError(`Profile ${profile.id} task ${task.id} references unknown task ${dependency}.`);
64
+ }
65
+ }
66
+ const needs = new Set(task.needs);
67
+ const overlap = task.after.find((dependency) => needs.has(dependency));
68
+ if (overlap !== undefined) {
69
+ throw new QualityGateGraphError(`Profile ${profile.id} task ${task.id} declares ${overlap} in both needs and after.`);
70
+ }
71
+ }
72
+ assertAcyclic(profile);
73
+ }
74
+ }
75
+ //# sourceMappingURL=validate-quality-gate-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-quality-gate-graph.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,I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-0,0 +1 @@
1
+ {"version":3,"file":"monotonic-clock.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/monotonic-clock.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,KAAK,IAAI,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=monotonic-clock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monotonic-clock.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/monotonic-clock.ts"],"names":[],"mappings":""}