@agent-teams/engineering-foundation 0.2.1 → 0.4.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 (280) hide show
  1. package/README.md +15 -2
  2. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts +6 -0
  3. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts.map +1 -0
  4. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js +143 -0
  5. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js.map +1 -0
  6. package/dist/capabilities/public-api-compatibility/adapters/outbound/crypto/node-change-fingerprint.d.ts +5 -0
  7. package/dist/capabilities/public-api-compatibility/adapters/outbound/crypto/node-change-fingerprint.d.ts.map +1 -0
  8. package/dist/capabilities/public-api-compatibility/adapters/outbound/crypto/node-change-fingerprint.js +7 -0
  9. package/dist/capabilities/public-api-compatibility/adapters/outbound/crypto/node-change-fingerprint.js.map +1 -0
  10. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/filesystem-public-api-repository.d.ts +9 -0
  11. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/filesystem-public-api-repository.d.ts.map +1 -0
  12. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/filesystem-public-api-repository.js +205 -0
  13. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/filesystem-public-api-repository.js.map +1 -0
  14. package/dist/capabilities/public-api-compatibility/application/model/public-api.d.ts +46 -0
  15. package/dist/capabilities/public-api-compatibility/application/model/public-api.d.ts.map +1 -0
  16. package/dist/capabilities/public-api-compatibility/application/model/public-api.js +4 -0
  17. package/dist/capabilities/public-api-compatibility/application/model/public-api.js.map +1 -0
  18. package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.d.ts +13 -0
  19. package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.d.ts.map +1 -0
  20. package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.js +168 -0
  21. package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.js.map +1 -0
  22. package/dist/capabilities/public-api-compatibility/application/ports/change-fingerprint.d.ts +4 -0
  23. package/dist/capabilities/public-api-compatibility/application/ports/change-fingerprint.d.ts.map +1 -0
  24. package/dist/capabilities/public-api-compatibility/application/ports/change-fingerprint.js +2 -0
  25. package/dist/capabilities/public-api-compatibility/application/ports/change-fingerprint.js.map +1 -0
  26. package/dist/capabilities/public-api-compatibility/application/ports/public-api-extractor.d.ts +5 -0
  27. package/dist/capabilities/public-api-compatibility/application/ports/public-api-extractor.d.ts.map +1 -0
  28. package/dist/capabilities/public-api-compatibility/application/ports/public-api-extractor.js +2 -0
  29. package/dist/capabilities/public-api-compatibility/application/ports/public-api-extractor.js.map +1 -0
  30. package/dist/capabilities/public-api-compatibility/application/ports/public-api-repository.d.ts +8 -0
  31. package/dist/capabilities/public-api-compatibility/application/ports/public-api-repository.d.ts.map +1 -0
  32. package/dist/capabilities/public-api-compatibility/application/ports/public-api-repository.js +2 -0
  33. package/dist/capabilities/public-api-compatibility/application/ports/public-api-repository.js.map +1 -0
  34. package/dist/capabilities/public-api-compatibility/application/rules.d.ts +19 -0
  35. package/dist/capabilities/public-api-compatibility/application/rules.d.ts.map +1 -0
  36. package/dist/capabilities/public-api-compatibility/application/rules.js +20 -0
  37. package/dist/capabilities/public-api-compatibility/application/rules.js.map +1 -0
  38. package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.d.ts +15 -0
  39. package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.d.ts.map +1 -0
  40. package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.js +30 -0
  41. package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.js.map +1 -0
  42. package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.d.ts +14 -0
  43. package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.d.ts.map +1 -0
  44. package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.js +62 -0
  45. package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.js.map +1 -0
  46. package/dist/capabilities/public-api-compatibility/contract/config.d.ts +5 -0
  47. package/dist/capabilities/public-api-compatibility/contract/config.d.ts.map +1 -0
  48. package/dist/capabilities/public-api-compatibility/contract/config.js +104 -0
  49. package/dist/capabilities/public-api-compatibility/contract/config.js.map +1 -0
  50. package/dist/capabilities/public-api-compatibility/module.d.ts +10 -0
  51. package/dist/capabilities/public-api-compatibility/module.d.ts.map +1 -0
  52. package/dist/capabilities/public-api-compatibility/module.js +69 -0
  53. package/dist/capabilities/public-api-compatibility/module.js.map +1 -0
  54. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/filesystem-repository-security-reader.d.ts +6 -0
  55. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/filesystem-repository-security-reader.d.ts.map +1 -0
  56. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/filesystem-repository-security-reader.js +200 -0
  57. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/filesystem-repository-security-reader.js.map +1 -0
  58. package/dist/capabilities/repository-security-baseline/application/model/repository-security.d.ts +46 -0
  59. package/dist/capabilities/repository-security-baseline/application/model/repository-security.d.ts.map +1 -0
  60. package/dist/capabilities/repository-security-baseline/application/model/repository-security.js +2 -0
  61. package/dist/capabilities/repository-security-baseline/application/model/repository-security.js.map +1 -0
  62. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.d.ts +4 -0
  63. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.d.ts.map +1 -0
  64. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.js +218 -0
  65. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.js.map +1 -0
  66. package/dist/capabilities/repository-security-baseline/application/ports/repository-security-reader.d.ts +5 -0
  67. package/dist/capabilities/repository-security-baseline/application/ports/repository-security-reader.d.ts.map +1 -0
  68. package/dist/capabilities/repository-security-baseline/application/ports/repository-security-reader.js +2 -0
  69. package/dist/capabilities/repository-security-baseline/application/ports/repository-security-reader.js.map +1 -0
  70. package/dist/capabilities/repository-security-baseline/application/rules.d.ts +23 -0
  71. package/dist/capabilities/repository-security-baseline/application/rules.d.ts.map +1 -0
  72. package/dist/capabilities/repository-security-baseline/application/rules.js +24 -0
  73. package/dist/capabilities/repository-security-baseline/application/rules.js.map +1 -0
  74. package/dist/capabilities/repository-security-baseline/application/use-cases/analyze-repository-security.d.ts +9 -0
  75. package/dist/capabilities/repository-security-baseline/application/use-cases/analyze-repository-security.d.ts.map +1 -0
  76. package/dist/capabilities/repository-security-baseline/application/use-cases/analyze-repository-security.js +7 -0
  77. package/dist/capabilities/repository-security-baseline/application/use-cases/analyze-repository-security.js.map +1 -0
  78. package/dist/capabilities/repository-security-baseline/contract/config.d.ts +5 -0
  79. package/dist/capabilities/repository-security-baseline/contract/config.d.ts.map +1 -0
  80. package/dist/capabilities/repository-security-baseline/contract/config.js +86 -0
  81. package/dist/capabilities/repository-security-baseline/contract/config.js.map +1 -0
  82. package/dist/capabilities/repository-security-baseline/module.d.ts +5 -0
  83. package/dist/capabilities/repository-security-baseline/module.d.ts.map +1 -0
  84. package/dist/capabilities/repository-security-baseline/module.js +49 -0
  85. package/dist/capabilities/repository-security-baseline/module.js.map +1 -0
  86. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.d.ts +6 -0
  87. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.d.ts.map +1 -0
  88. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.js +151 -0
  89. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.js.map +1 -0
  90. package/dist/capabilities/source-dependencies/adapters/outbound/oxc/oxc-source-dependency-parser.d.ts +7 -0
  91. package/dist/capabilities/source-dependencies/adapters/outbound/oxc/oxc-source-dependency-parser.d.ts.map +1 -0
  92. package/dist/capabilities/source-dependencies/adapters/outbound/oxc/oxc-source-dependency-parser.js +96 -0
  93. package/dist/capabilities/source-dependencies/adapters/outbound/oxc/oxc-source-dependency-parser.js.map +1 -0
  94. package/dist/capabilities/source-dependencies/application/model/source-workspace.d.ts +66 -0
  95. package/dist/capabilities/source-dependencies/application/model/source-workspace.d.ts.map +1 -0
  96. package/dist/capabilities/source-dependencies/application/model/source-workspace.js +13 -0
  97. package/dist/capabilities/source-dependencies/application/model/source-workspace.js.map +1 -0
  98. package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.d.ts +15 -0
  99. package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.d.ts.map +1 -0
  100. package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.js +223 -0
  101. package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.js.map +1 -0
  102. package/dist/capabilities/source-dependencies/application/ports/source-dependency-parser.d.ts +6 -0
  103. package/dist/capabilities/source-dependencies/application/ports/source-dependency-parser.d.ts.map +1 -0
  104. package/dist/capabilities/source-dependencies/application/ports/source-dependency-parser.js +2 -0
  105. package/dist/capabilities/source-dependencies/application/ports/source-dependency-parser.js.map +1 -0
  106. package/dist/capabilities/source-dependencies/application/ports/source-dependency-resolver.d.ts +12 -0
  107. package/dist/capabilities/source-dependencies/application/ports/source-dependency-resolver.d.ts.map +1 -0
  108. package/dist/capabilities/source-dependencies/application/ports/source-dependency-resolver.js +2 -0
  109. package/dist/capabilities/source-dependencies/application/ports/source-dependency-resolver.js.map +1 -0
  110. package/dist/capabilities/source-dependencies/application/rules.d.ts +26 -0
  111. package/dist/capabilities/source-dependencies/application/rules.d.ts.map +1 -0
  112. package/dist/capabilities/source-dependencies/application/rules.js +27 -0
  113. package/dist/capabilities/source-dependencies/application/rules.js.map +1 -0
  114. package/dist/capabilities/source-dependencies/application/use-cases/analyze-source-dependencies.d.ts +19 -0
  115. package/dist/capabilities/source-dependencies/application/use-cases/analyze-source-dependencies.d.ts.map +1 -0
  116. package/dist/capabilities/source-dependencies/application/use-cases/analyze-source-dependencies.js +69 -0
  117. package/dist/capabilities/source-dependencies/application/use-cases/analyze-source-dependencies.js.map +1 -0
  118. package/dist/capabilities/source-dependencies/contract/config.d.ts +5 -0
  119. package/dist/capabilities/source-dependencies/contract/config.d.ts.map +1 -0
  120. package/dist/capabilities/source-dependencies/contract/config.js +108 -0
  121. package/dist/capabilities/source-dependencies/contract/config.js.map +1 -0
  122. package/dist/capabilities/source-dependencies/module.d.ts +5 -0
  123. package/dist/capabilities/source-dependencies/module.d.ts.map +1 -0
  124. package/dist/capabilities/source-dependencies/module.js +61 -0
  125. package/dist/capabilities/source-dependencies/module.js.map +1 -0
  126. package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.d.ts +7 -0
  127. package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.d.ts.map +1 -0
  128. package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.js +115 -0
  129. package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.js.map +1 -0
  130. package/dist/capabilities/suppression-governance/adapters/outbound/time/system-clock.d.ts +5 -0
  131. package/dist/capabilities/suppression-governance/adapters/outbound/time/system-clock.d.ts.map +1 -0
  132. package/dist/capabilities/suppression-governance/adapters/outbound/time/system-clock.js +6 -0
  133. package/dist/capabilities/suppression-governance/adapters/outbound/time/system-clock.js.map +1 -0
  134. package/dist/capabilities/suppression-governance/application/model/iso-date.d.ts +2 -0
  135. package/dist/capabilities/suppression-governance/application/model/iso-date.d.ts.map +1 -0
  136. package/dist/capabilities/suppression-governance/application/model/iso-date.js +27 -0
  137. package/dist/capabilities/suppression-governance/application/model/iso-date.js.map +1 -0
  138. package/dist/capabilities/suppression-governance/application/model/suppression-governance.d.ts +35 -0
  139. package/dist/capabilities/suppression-governance/application/model/suppression-governance.d.ts.map +1 -0
  140. package/dist/capabilities/suppression-governance/application/model/suppression-governance.js +8 -0
  141. package/dist/capabilities/suppression-governance/application/model/suppression-governance.js.map +1 -0
  142. package/dist/capabilities/suppression-governance/application/policies/evaluate-suppression-governance.d.ts +8 -0
  143. package/dist/capabilities/suppression-governance/application/policies/evaluate-suppression-governance.d.ts.map +1 -0
  144. package/dist/capabilities/suppression-governance/application/policies/evaluate-suppression-governance.js +196 -0
  145. package/dist/capabilities/suppression-governance/application/policies/evaluate-suppression-governance.js.map +1 -0
  146. package/dist/capabilities/suppression-governance/application/ports/calendar-clock.d.ts +4 -0
  147. package/dist/capabilities/suppression-governance/application/ports/calendar-clock.d.ts.map +1 -0
  148. package/dist/capabilities/suppression-governance/application/ports/calendar-clock.js +2 -0
  149. package/dist/capabilities/suppression-governance/application/ports/calendar-clock.js.map +1 -0
  150. package/dist/capabilities/suppression-governance/application/ports/suppression-scanner.d.ts +6 -0
  151. package/dist/capabilities/suppression-governance/application/ports/suppression-scanner.d.ts.map +1 -0
  152. package/dist/capabilities/suppression-governance/application/ports/suppression-scanner.js +2 -0
  153. package/dist/capabilities/suppression-governance/application/ports/suppression-scanner.js.map +1 -0
  154. package/dist/capabilities/suppression-governance/application/rules.d.ts +25 -0
  155. package/dist/capabilities/suppression-governance/application/rules.d.ts.map +1 -0
  156. package/dist/capabilities/suppression-governance/application/rules.js +26 -0
  157. package/dist/capabilities/suppression-governance/application/rules.js.map +1 -0
  158. package/dist/capabilities/suppression-governance/application/use-cases/analyze-suppression-governance.d.ts +15 -0
  159. package/dist/capabilities/suppression-governance/application/use-cases/analyze-suppression-governance.d.ts.map +1 -0
  160. package/dist/capabilities/suppression-governance/application/use-cases/analyze-suppression-governance.js +15 -0
  161. package/dist/capabilities/suppression-governance/application/use-cases/analyze-suppression-governance.js.map +1 -0
  162. package/dist/capabilities/suppression-governance/contract/config.d.ts +5 -0
  163. package/dist/capabilities/suppression-governance/contract/config.d.ts.map +1 -0
  164. package/dist/capabilities/suppression-governance/contract/config.js +108 -0
  165. package/dist/capabilities/suppression-governance/contract/config.js.map +1 -0
  166. package/dist/capabilities/suppression-governance/module.d.ts +5 -0
  167. package/dist/capabilities/suppression-governance/module.d.ts.map +1 -0
  168. package/dist/capabilities/suppression-governance/module.js +57 -0
  169. package/dist/capabilities/suppression-governance/module.js.map +1 -0
  170. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.d.ts +1 -0
  171. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.d.ts.map +1 -1
  172. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.js +4 -195
  173. package/dist/capabilities/workspace-dependency-declarations/adapters/outbound/pnpm-workspace/pnpm-workspace-reader.js.map +1 -1
  174. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-dependency-policy.d.ts +6 -0
  175. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-dependency-policy.d.ts.map +1 -0
  176. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-dependency-policy.js +2 -0
  177. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-dependency-policy.js.map +1 -0
  178. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.d.ts +1 -26
  179. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.d.ts.map +1 -1
  180. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.js +1 -6
  181. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-snapshot.js.map +1 -1
  182. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts +1 -1
  183. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts.map +1 -1
  184. package/dist/capabilities/workspace-dependency-declarations/contract/config.d.ts +1 -5
  185. package/dist/capabilities/workspace-dependency-declarations/contract/config.d.ts.map +1 -1
  186. package/dist/capabilities/workspace-dependency-declarations/contract/config.js.map +1 -1
  187. package/dist/capabilities/workspace-dependency-declarations/module.d.ts +2 -0
  188. package/dist/capabilities/workspace-dependency-declarations/module.d.ts.map +1 -1
  189. package/dist/capabilities/workspace-dependency-declarations/module.js +2 -0
  190. package/dist/capabilities/workspace-dependency-declarations/module.js.map +1 -1
  191. package/dist/capability-runtime.d.ts +1 -5
  192. package/dist/capability-runtime.d.ts.map +1 -1
  193. package/dist/capability-runtime.js +4 -4
  194. package/dist/capability-runtime.js.map +1 -1
  195. package/dist/check-contract.d.ts +3 -2
  196. package/dist/check-contract.d.ts.map +1 -1
  197. package/dist/check-runner.d.ts +0 -2
  198. package/dist/check-runner.d.ts.map +1 -1
  199. package/dist/check-runner.js +1 -7
  200. package/dist/check-runner.js.map +1 -1
  201. package/dist/cli.js +36 -7
  202. package/dist/cli.js.map +1 -1
  203. package/dist/composition/capability-registry.d.ts.map +1 -1
  204. package/dist/composition/capability-registry.js +8 -0
  205. package/dist/composition/capability-registry.js.map +1 -1
  206. package/dist/composition/rule-registry.d.ts +8 -0
  207. package/dist/composition/rule-registry.d.ts.map +1 -0
  208. package/dist/composition/rule-registry.js +13 -0
  209. package/dist/composition/rule-registry.js.map +1 -0
  210. package/dist/filesystem-path-safety.d.ts +2 -0
  211. package/dist/filesystem-path-safety.d.ts.map +1 -0
  212. package/dist/filesystem-path-safety.js +19 -0
  213. package/dist/filesystem-path-safety.js.map +1 -0
  214. package/dist/foundation-config.d.ts +5 -4
  215. package/dist/foundation-config.d.ts.map +1 -1
  216. package/dist/foundation-config.js +56 -15
  217. package/dist/foundation-config.js.map +1 -1
  218. package/dist/local-mode/adapters/outbound/time/system-clock.d.ts +2 -0
  219. package/dist/local-mode/adapters/outbound/time/system-clock.d.ts.map +1 -0
  220. package/dist/local-mode/adapters/outbound/time/system-clock.js +4 -0
  221. package/dist/local-mode/adapters/outbound/time/system-clock.js.map +1 -0
  222. package/dist/local-mode/consumer-policy.js +1 -1
  223. package/dist/local-mode/consumer-policy.js.map +1 -1
  224. package/dist/local-mode/service.d.ts +1 -1
  225. package/dist/local-mode/service.d.ts.map +1 -1
  226. package/dist/local-mode/service.js +1 -1
  227. package/dist/local-mode/service.js.map +1 -1
  228. package/dist/package-self-check.d.ts +2 -2
  229. package/dist/package-self-check.d.ts.map +1 -1
  230. package/dist/package-self-check.js +23 -20
  231. package/dist/package-self-check.js.map +1 -1
  232. package/dist/schema-catalog.d.ts +1 -3
  233. package/dist/schema-catalog.d.ts.map +1 -1
  234. package/dist/schema-catalog.js +2 -6
  235. package/dist/schema-catalog.js.map +1 -1
  236. package/dist/schema-ids.d.ts +3 -0
  237. package/dist/schema-ids.d.ts.map +1 -0
  238. package/dist/schema-ids.js +11 -0
  239. package/dist/schema-ids.js.map +1 -0
  240. package/dist/semantic-version.d.ts +2 -0
  241. package/dist/semantic-version.d.ts.map +1 -1
  242. package/dist/semantic-version.js +72 -1
  243. package/dist/semantic-version.js.map +1 -1
  244. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.d.ts +6 -0
  245. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.d.ts.map +1 -0
  246. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js +133 -0
  247. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js.map +1 -0
  248. package/dist/source-inventory/application/model/source-file-snapshot.d.ts +5 -0
  249. package/dist/source-inventory/application/model/source-file-snapshot.d.ts.map +1 -0
  250. package/dist/source-inventory/application/model/source-file-snapshot.js +2 -0
  251. package/dist/source-inventory/application/model/source-file-snapshot.js.map +1 -0
  252. package/dist/source-inventory/application/ports/source-tree-reader.d.ts +5 -0
  253. package/dist/source-inventory/application/ports/source-tree-reader.d.ts.map +1 -0
  254. package/dist/source-inventory/application/ports/source-tree-reader.js +2 -0
  255. package/dist/source-inventory/application/ports/source-tree-reader.js.map +1 -0
  256. package/dist/strict-yaml.d.ts +1 -2
  257. package/dist/strict-yaml.d.ts.map +1 -1
  258. package/dist/strict-yaml.js +3 -3
  259. package/dist/strict-yaml.js.map +1 -1
  260. package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.d.ts +6 -0
  261. package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.d.ts.map +1 -0
  262. package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.js +288 -0
  263. package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.js.map +1 -0
  264. package/dist/workspace-inventory/application/model/workspace-inventory.d.ts +38 -0
  265. package/dist/workspace-inventory/application/model/workspace-inventory.d.ts.map +1 -0
  266. package/dist/workspace-inventory/application/model/workspace-inventory.js +7 -0
  267. package/dist/workspace-inventory/application/model/workspace-inventory.js.map +1 -0
  268. package/dist/workspace-inventory/application/ports/workspace-inventory-reader.d.ts +5 -0
  269. package/dist/workspace-inventory/application/ports/workspace-inventory-reader.d.ts.map +1 -0
  270. package/dist/workspace-inventory/application/ports/workspace-inventory-reader.js +2 -0
  271. package/dist/workspace-inventory/application/ports/workspace-inventory-reader.js.map +1 -0
  272. package/package.json +7 -1
  273. package/presets/oxlint/base.json +2 -0
  274. package/presets/oxlint/type-aware.json +39 -0
  275. package/schemas/architecture-source-dependencies/v1.schema.json +97 -0
  276. package/schemas/foundation-config/v1.schema.json +40 -0
  277. package/schemas/package-public-api-baseline/v1.schema.json +39 -0
  278. package/schemas/package-public-api-compatibility/v1.schema.json +70 -0
  279. package/schemas/quality-suppression-governance/v1.schema.json +109 -0
  280. package/schemas/repository-security-baseline/v1.schema.json +57 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-workspace.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/model/source-workspace.ts"],"names":[],"mappings":"AAAA,OA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;IAC5C,QAAQ,CAAC,WAAW,EAAE,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;IAC/D,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,13 @@
1
+ const SOURCE_DEPENDENCY_KINDS = [
2
+ "commonjs",
3
+ "dynamic",
4
+ "export",
5
+ "export-type",
6
+ "import-equals",
7
+ "import-equals-type",
8
+ "static",
9
+ "static-type",
10
+ "type-query"
11
+ ];
12
+ export {};
13
+ //# sourceMappingURL=source-workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-workspace.js","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/model/source-workspace.ts"],"names":[],"mappings":"AAGA,MAAM,uBAAuB,GAAG;IAC9B,UAAU;IACV,SAAS;IACT,QAAQ;IACR,aAAa;IACb,eAAe;IACf,oBAAoB;IACpB,QAAQ;IACR,aAAa;IACb,YAAY;CACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { FoundationDiagnostic } from "../../../../check-contract.js";
2
+ import type { SourceFileSnapshot } from "../../../../source-inventory/application/model/source-file-snapshot.js";
3
+ import type { WorkspaceInventory } from "../../../../workspace-inventory/application/model/workspace-inventory.js";
4
+ import type { ClassifiedSourceFile, SourceArchitecturePolicy } from "../model/source-workspace.js";
5
+ import type { SourceDependencyResolver } from "../ports/source-dependency-resolver.js";
6
+ interface EvaluationInput {
7
+ readonly policy: SourceArchitecturePolicy;
8
+ readonly inventory: WorkspaceInventory;
9
+ readonly allSourceFiles: readonly SourceFileSnapshot[];
10
+ readonly classifiedFiles: readonly ClassifiedSourceFile[];
11
+ readonly resolver: SourceDependencyResolver;
12
+ }
13
+ export declare function evaluateSourceDependencies(input: EvaluationInput): readonly FoundationDiagnostic[];
14
+ export {};
15
+ //# sourceMappingURL=evaluate-source-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-source-dependencies.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wEAAwE,CAAC;AACjH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAC;AACnH,OAAO,KAAK,EAEV,oBAAoB,EAEpB,wBAAwB,EAEzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAMvF,UAAU,eAAe;IACvB,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,cAAc,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvD,QAAQ,CAAC,eAAe,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;CAC7C;AAqMD,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,eAAe,GACrB,SAAS,oBAAoB,EAAE,CAiEjC"}
@@ -0,0 +1,223 @@
1
+ import { SOURCE_DEPENDENCY_RULES } from "../rules.js";
2
+ function diagnostic(input) {
3
+ return {
4
+ ruleId: input.rule.id,
5
+ severity: input.rule.severity,
6
+ subject: input.subject,
7
+ message: input.message,
8
+ location: { path: input.path },
9
+ relatedLocations: input.relatedPath === undefined ? [] : [{ path: input.relatedPath }],
10
+ evidence: input.evidence ?? [],
11
+ remediation: input.rule.remediation,
12
+ requiresArchitectureReview: input.rule.requiresArchitectureReview
13
+ };
14
+ }
15
+ function boundaryForPath(path, files) {
16
+ return files.find((file) => file.path === path)?.boundary;
17
+ }
18
+ function declarationDiagnostics(input) {
19
+ if (input.declaration === "runtime") {
20
+ return [];
21
+ }
22
+ const rule = input.declaration === "development"
23
+ ? SOURCE_DEPENDENCY_RULES.runtimeImportFromDevelopmentDependency
24
+ : input.workspace
25
+ ? SOURCE_DEPENDENCY_RULES.undeclaredWorkspaceDependency
26
+ : SOURCE_DEPENDENCY_RULES.undeclaredExternalDependency;
27
+ return [
28
+ diagnostic({
29
+ rule,
30
+ subject: `${input.file.workspacePackage.name}->${input.packageName}`,
31
+ message: input.declaration === "development"
32
+ ? `Runtime source imports development-only dependency ${input.packageName}.`
33
+ : `Runtime source imports undeclared dependency ${input.packageName}.`,
34
+ path: input.file.path,
35
+ relatedPath: input.file.workspacePackage.manifestPath,
36
+ evidence: [{ kind: "specifier", value: input.reference.specifier }]
37
+ })
38
+ ];
39
+ }
40
+ function evaluateResolved(input) {
41
+ const { file, reference, resolved } = input;
42
+ switch (resolved.kind) {
43
+ case "builtin":
44
+ return file.boundary.allowedBuiltins.includes(resolved.specifier)
45
+ ? []
46
+ : [
47
+ diagnostic({
48
+ rule: SOURCE_DEPENDENCY_RULES.forbiddenBuiltinDependency,
49
+ subject: `${file.boundary.id}->${resolved.specifier}`,
50
+ message: `Boundary ${file.boundary.id} cannot import ${resolved.specifier}.`,
51
+ path: file.path,
52
+ evidence: [{ kind: "specifier", value: reference.specifier }]
53
+ })
54
+ ];
55
+ case "external-package":
56
+ return [
57
+ ...(file.boundary.allowedPackages.includes(resolved.packageName)
58
+ ? []
59
+ : [
60
+ diagnostic({
61
+ rule: SOURCE_DEPENDENCY_RULES.forbiddenPackageDependency,
62
+ subject: `${file.boundary.id}->${resolved.packageName}`,
63
+ message: `Boundary ${file.boundary.id} cannot import package ${resolved.packageName}.`,
64
+ path: file.path,
65
+ evidence: [{ kind: "specifier", value: reference.specifier }]
66
+ })
67
+ ]),
68
+ ...declarationDiagnostics({
69
+ file,
70
+ reference,
71
+ packageName: resolved.packageName,
72
+ declaration: resolved.declaration,
73
+ workspace: false
74
+ })
75
+ ];
76
+ case "local-file": {
77
+ if (resolved.workspacePackage.name !== file.workspacePackage.name) {
78
+ return [
79
+ diagnostic({
80
+ rule: SOURCE_DEPENDENCY_RULES.crossPackageRelativeImport,
81
+ subject: `${file.workspacePackage.name}->${resolved.workspacePackage.name}`,
82
+ message: `Relative import crosses from ${file.workspacePackage.name} into ${resolved.workspacePackage.name}.`,
83
+ path: file.path,
84
+ relatedPath: resolved.path,
85
+ evidence: [{ kind: "specifier", value: reference.specifier }]
86
+ })
87
+ ];
88
+ }
89
+ const targetBoundary = boundaryForPath(resolved.path, input.classifiedFiles);
90
+ if (targetBoundary === undefined ||
91
+ targetBoundary.id === file.boundary.id ||
92
+ file.boundary.allowedBoundaries.includes(targetBoundary.id)) {
93
+ return [];
94
+ }
95
+ return [
96
+ diagnostic({
97
+ rule: SOURCE_DEPENDENCY_RULES.forbiddenBoundaryDependency,
98
+ subject: `${file.boundary.id}->${targetBoundary.id}`,
99
+ message: `Boundary dependency is not allowed: ${file.boundary.id} -> ${targetBoundary.id}.`,
100
+ path: file.path,
101
+ relatedPath: resolved.path,
102
+ evidence: [{ kind: "specifier", value: reference.specifier }]
103
+ })
104
+ ];
105
+ }
106
+ case "unsupported":
107
+ return [
108
+ diagnostic({
109
+ rule: SOURCE_DEPENDENCY_RULES.unsupportedImportSpecifier,
110
+ subject: `${file.path}:${reference.specifier}`,
111
+ message: `Import specifier cannot be classified: ${resolved.reason}.`,
112
+ path: file.path,
113
+ evidence: [{ kind: "specifier", value: reference.specifier }]
114
+ })
115
+ ];
116
+ case "unresolved":
117
+ return [
118
+ diagnostic({
119
+ rule: SOURCE_DEPENDENCY_RULES.unresolvedLocalImport,
120
+ subject: `${file.path}:${reference.specifier}`,
121
+ message: `Import could not be resolved: ${resolved.reason}.`,
122
+ path: file.path,
123
+ evidence: [{ kind: "specifier", value: reference.specifier }]
124
+ })
125
+ ];
126
+ case "workspace-package":
127
+ return [
128
+ ...(resolved.workspacePackage.name === file.workspacePackage.name ||
129
+ file.boundary.allowedPackages.includes(resolved.workspacePackage.name)
130
+ ? []
131
+ : [
132
+ diagnostic({
133
+ rule: SOURCE_DEPENDENCY_RULES.forbiddenPackageDependency,
134
+ subject: `${file.boundary.id}->${resolved.workspacePackage.name}`,
135
+ message: `Boundary ${file.boundary.id} cannot import workspace package ${resolved.workspacePackage.name}.`,
136
+ path: file.path,
137
+ relatedPath: resolved.workspacePackage.manifestPath,
138
+ evidence: [{ kind: "specifier", value: reference.specifier }]
139
+ })
140
+ ]),
141
+ ...(resolved.workspacePackage.name === file.workspacePackage.name
142
+ ? []
143
+ : declarationDiagnostics({
144
+ file,
145
+ reference,
146
+ packageName: resolved.workspacePackage.name,
147
+ declaration: resolved.declaration,
148
+ workspace: true
149
+ })),
150
+ ...(resolved.exported
151
+ ? []
152
+ : [
153
+ diagnostic({
154
+ rule: SOURCE_DEPENDENCY_RULES.packageSubpathNotExported,
155
+ subject: `${resolved.workspacePackage.name}:${resolved.subpath}`,
156
+ message: `Workspace package subpath is not exported: ${reference.specifier}.`,
157
+ path: file.path,
158
+ relatedPath: resolved.workspacePackage.manifestPath,
159
+ evidence: [{ kind: "subpath", value: resolved.subpath }]
160
+ })
161
+ ])
162
+ ];
163
+ }
164
+ }
165
+ export function evaluateSourceDependencies(input) {
166
+ const diagnostics = [];
167
+ const classifiedPaths = new Set(input.classifiedFiles.map((file) => file.path));
168
+ const governedFilePaths = new Set(input.allSourceFiles.map((file) => file.path));
169
+ for (const sourceFile of input.allSourceFiles) {
170
+ if (!classifiedPaths.has(sourceFile.path)) {
171
+ diagnostics.push(diagnostic({
172
+ rule: SOURCE_DEPENDENCY_RULES.unclassifiedSourceFile,
173
+ subject: sourceFile.path,
174
+ message: "Governed source file does not belong to an architecture boundary.",
175
+ path: sourceFile.path
176
+ }));
177
+ }
178
+ }
179
+ for (const file of input.classifiedFiles) {
180
+ if (file.parsed.parseErrorCount > 0) {
181
+ diagnostics.push(diagnostic({
182
+ rule: SOURCE_DEPENDENCY_RULES.sourceParseError,
183
+ subject: file.path,
184
+ message: `Source parser reported ${file.parsed.parseErrorCount} error(s).`,
185
+ path: file.path,
186
+ evidence: [
187
+ { kind: "parse-error-count", value: String(file.parsed.parseErrorCount) }
188
+ ]
189
+ }));
190
+ continue;
191
+ }
192
+ for (const unresolvedReference of file.parsed.unresolved) {
193
+ if (file.boundary.allowedRuntimeReferences.includes(unresolvedReference.kind)) {
194
+ continue;
195
+ }
196
+ diagnostics.push(diagnostic({
197
+ rule: SOURCE_DEPENDENCY_RULES.unresolvedRuntimeReference,
198
+ subject: `${file.path}:${unresolvedReference.kind}:${unresolvedReference.start}`,
199
+ message: `Non-literal ${unresolvedReference.kind} reference hides a dependency edge.`,
200
+ path: file.path,
201
+ evidence: [
202
+ { kind: "reference-kind", value: unresolvedReference.kind },
203
+ { kind: "offset", value: String(unresolvedReference.start) }
204
+ ]
205
+ }));
206
+ }
207
+ for (const reference of file.parsed.references) {
208
+ diagnostics.push(...evaluateResolved({
209
+ file,
210
+ reference,
211
+ resolved: input.resolver.resolve({
212
+ file,
213
+ governedFilePaths,
214
+ inventory: input.inventory,
215
+ reference
216
+ }),
217
+ classifiedFiles: input.classifiedFiles
218
+ }));
219
+ }
220
+ }
221
+ return diagnostics;
222
+ }
223
+ //# sourceMappingURL=evaluate-source-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-source-dependencies.js","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,uBAAuB,EAExB,MAAM,aAAa,CAAC;AAUrB,SAAS,UAAU,CAAC,KAOnB;IACC,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE;QACrB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ;QAC7B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;QAC9B,gBAAgB,EAC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AAI,CACd,GAAG,gBAAgB,CAAC;gBAClB,IAAI;gBACJ,SAAS;gBACT,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;oBAC/B,IAAI;oBACJ,iBAAiB;oBACjB,SAAS,EAAE,KAAK,CAAC,SAAS;oBAC1B,SAAS;iBACV,CAAC;gBACF,eAAe,EAAE,KAAK,CAAC,eAAe;aACvC,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { SourceFileSnapshot } from "../../../../source-inventory/application/model/source-file-snapshot.js";
2
+ import type { ParsedSourceDependencies } from "../model/source-workspace.js";
3
+ export interface SourceDependencyParser {
4
+ parse(file: SourceFileSnapshot): ParsedSourceDependencies;
5
+ }
6
+ //# sourceMappingURL=source-dependency-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-dependency-parser.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/ports/source-dependency-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wEAAwE,CAAC;AACjH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,IAAI,EAAE,kBAAkB,GAAG,wBAAwB,CAAC;CAC3D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=source-dependency-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-dependency-parser.js","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/ports/source-dependency-parser.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { WorkspaceInventory } from "../../../../workspace-inventory/application/model/workspace-inventory.js";
2
+ import type { ClassifiedSourceFile, ResolvedSourceDependency, SourceDependencyReference } from "../model/source-workspace.js";
3
+ export interface ResolveSourceDependencyInput {
4
+ readonly file: ClassifiedSourceFile;
5
+ readonly governedFilePaths: ReadonlySet<string>;
6
+ readonly inventory: WorkspaceInventory;
7
+ readonly reference: SourceDependencyReference;
8
+ }
9
+ export interface SourceDependencyResolver {
10
+ resolve(input: ResolveSourceDependencyInput): ResolvedSourceDependency;
11
+ }
12
+ //# sourceMappingURL=source-dependency-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-dependency-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/ports/source-dependency-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAC;AACnH,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,yBAAyB,CAAC;CAC/C;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,KAAK,EAAE,4BAA4B,GAAG,wBAAwB,CAAC;CACxE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=source-dependency-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-dependency-resolver.js","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/ports/source-dependency-resolver.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import type { DiagnosticSeverity } from "../../../check-contract.js";
2
+ export interface SourceDependencyRuleMetadata {
3
+ readonly id: string;
4
+ readonly severity: DiagnosticSeverity;
5
+ readonly rationale: string;
6
+ readonly remediation: string;
7
+ readonly documentation: string;
8
+ readonly requiresArchitectureReview: boolean;
9
+ }
10
+ export declare const SOURCE_DEPENDENCY_RULES: Readonly<{
11
+ crossPackageRelativeImport: SourceDependencyRuleMetadata;
12
+ forbiddenBoundaryDependency: SourceDependencyRuleMetadata;
13
+ forbiddenBuiltinDependency: SourceDependencyRuleMetadata;
14
+ forbiddenPackageDependency: SourceDependencyRuleMetadata;
15
+ packageSubpathNotExported: SourceDependencyRuleMetadata;
16
+ sourceParseError: SourceDependencyRuleMetadata;
17
+ undeclaredExternalDependency: SourceDependencyRuleMetadata;
18
+ undeclaredWorkspaceDependency: SourceDependencyRuleMetadata;
19
+ unresolvedLocalImport: SourceDependencyRuleMetadata;
20
+ unresolvedRuntimeReference: SourceDependencyRuleMetadata;
21
+ runtimeImportFromDevelopmentDependency: SourceDependencyRuleMetadata;
22
+ unsupportedImportSpecifier: SourceDependencyRuleMetadata;
23
+ unclassifiedSourceFile: SourceDependencyRuleMetadata;
24
+ }>;
25
+ export declare const SOURCE_DEPENDENCY_RULES_BY_ID: ReadonlyMap<string, SourceDependencyRuleMetadata>;
26
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/source-dependencies/application/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;CAC9C;AAkBD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;EA0ElC,CAAC;AAEH,eAAO,MAAM,6BAA6B,EAAE,WAAW,CACrD,MAAM,EACN,4BAA4B,CAG7B,CAAC"}
@@ -0,0 +1,27 @@
1
+ function rule(suffix, rationale, remediation, requiresArchitectureReview = false) {
2
+ return Object.freeze({
3
+ id: `architecture.source-dependencies.${suffix}`,
4
+ severity: "error",
5
+ rationale,
6
+ remediation,
7
+ documentation: "docs/architecture/executable-capabilities.md#architecturesource-dependencies",
8
+ requiresArchitectureReview
9
+ });
10
+ }
11
+ export const SOURCE_DEPENDENCY_RULES = Object.freeze({
12
+ crossPackageRelativeImport: rule("cross-package-relative-import", "Cross-package relative imports bypass package identity and public exports.", "Import the target package through an exported package subpath.", true),
13
+ forbiddenBoundaryDependency: rule("forbidden-boundary-dependency", "Source boundaries must follow the consumer-owned architecture graph.", "Move the dependency behind a port or approve the boundary edge.", true),
14
+ forbiddenBuiltinDependency: rule("forbidden-builtin-dependency", "Runtime builtins are capabilities that must be explicit per boundary.", "Move the builtin access to an adapter or approve it for this boundary.", true),
15
+ forbiddenPackageDependency: rule("forbidden-package-dependency", "Package dependencies must be explicit per architecture boundary.", "Move the import behind a port or approve the package for this boundary.", true),
16
+ packageSubpathNotExported: rule("package-subpath-not-exported", "Workspace consumers may only import explicit package exports.", "Use an existing public entrypoint or deliberately add a package export.", true),
17
+ sourceParseError: rule("source-parse-error", "Architecture evidence cannot be trusted when governed source does not parse.", "Fix the source syntax before evaluating architecture boundaries."),
18
+ undeclaredExternalDependency: rule("undeclared-external-dependency", "Runtime source must not rely on undeclared transitive dependencies.", "Declare the external package in dependencies, optionalDependencies, or peerDependencies."),
19
+ undeclaredWorkspaceDependency: rule("undeclared-workspace-dependency", "An allowed architecture edge still requires an explicit package dependency.", "Declare the workspace package with the package manager workspace protocol."),
20
+ unresolvedLocalImport: rule("unresolved-local-import", "Unresolved governed imports make the observed dependency graph incomplete.", "Use a supported literal import that resolves to a governed source file."),
21
+ unresolvedRuntimeReference: rule("unresolved-runtime-reference", "Non-literal runtime loading can hide architecture edges from static evidence.", "Centralize dynamic loading behind an approved adapter with literal module references.", true),
22
+ runtimeImportFromDevelopmentDependency: rule("runtime-import-from-development-dependency", "Published runtime source cannot depend only on development dependencies.", "Move the dependency to an appropriate runtime dependency section."),
23
+ unsupportedImportSpecifier: rule("unsupported-import-specifier", "Unsupported specifiers cannot be classified reliably by the architecture gate.", "Use relative, node builtin, declared external, or governed workspace package imports.", true),
24
+ unclassifiedSourceFile: rule("unclassified-source-file", "Every governed source file must belong to exactly one declared architecture boundary.", "Classify the file in an existing boundary or introduce an explicitly reviewed boundary.", true)
25
+ });
26
+ export const SOURCE_DEPENDENCY_RULES_BY_ID = new Map(Object.values(SOURCE_DEPENDENCY_RULES).map((metadata) => [metadata.id, metadata]));
27
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/capabilities/source-dependencies/application/rules.ts"],"names":[],"mappings":"AAWA,SAAS,IAAI,CACX,MAAc,EACd,SAAiB,EACjB,WAAmB,EACnB,0BAA0B,GAAG,KAAK;IAElC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE,EAAE,oCAAoC,MAAM,EAAE;QAChD,QAAQ,EAAE,OAAO;QACjB,SAAS;QACT,WAAW;QACX,aAAa,EAAE,8EAA8E;QAC7F,0BAA0B;KAC3B,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACnD,0BAA0B,EAAE,IAAI,CAC9B,+BAA+B,EAC/B,4EAA4E,EAC5E,gEAAgE,EAChE,IAAI,CACL;IACD,2BAA2B,EAAE,IAAI,CAC/B,+BAA+B,EAC/B,sEAAsE,EACtE,iEAAiE,EACjE,IAAI,CACL;IACD,0BAA0B,EAAE,IAAI,CAC9B,8BAA8B,EAC9B,uEAAuE,EACvE,wEAAwE,EACxE,IAAI,CACL;IACD,0BAA0B,EAAE,IAAI,CAC9B,8BAA8B,EAC9B,kEAAkE,EAClE,yEAAyE,EACzE,IAAI,CACL;IACD,yBAAyB,EAAE,IAAI,CAC7B,8BAA8B,EAC9B,+DAA+D,EAC/D,yEAAyE,EACzE,IAAI,CACL;IACD,gBAAgB,EAAE,IAAI,CACpB,oBAAoB,EACpB,8EAA8E,EAC9E,kEAAkE,CACnE;IACD,4BAA4B,EAAE,IAAI,CAChC,gCAAgC,EAChC,qEAAqE,EACrE,0FAA0F,CAC3F;IACD,6BAA6B,EAAE,IAAI,CACjC,iCAAiC,EACjC,6EAA6E,EAC7E,4EAA4E,CAC7E;IACD,qBAAqB,EAAE,IAAI,CACzB,yBAAyB,EACzB,4EAA4E,EAC5E,yEAAyE,CAC1E;IACD,0BAA0B,EAAE,IAAI,CAC9B,8BAA8B,EAC9B,+EAA+E,EAC/E,uFAAuF,EACvF,IAAI,CACL;IACD,sCAAsC,EAAE,IAAI,CAC1C,4CAA4C,EAC5C,0EAA0E,EAC1E,mEAAmE,CACpE;IACD,0BAA0B,EAAE,IAAI,CAC9B,8BAA8B,EAC9B,gFAAgF,EAChF,uFAAuF,EACvF,IAAI,CACL;IACD,sBAAsB,EAAE,IAAI,CAC1B,0BAA0B,EAC1B,uFAAuF,EACvF,yFAAyF,EACzF,IAAI,CACL;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAGtC,IAAI,GAAG,CACT,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAClF,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { FoundationDiagnostic } from "../../../../check-contract.js";
2
+ import type { SourceTreeReader } from "../../../../source-inventory/application/ports/source-tree-reader.js";
3
+ import type { WorkspaceInventoryReader } from "../../../../workspace-inventory/application/ports/workspace-inventory-reader.js";
4
+ import type { SourceArchitecturePolicy } from "../model/source-workspace.js";
5
+ import type { SourceDependencyParser } from "../ports/source-dependency-parser.js";
6
+ import type { SourceDependencyResolver } from "../ports/source-dependency-resolver.js";
7
+ export interface AnalyzeSourceDependenciesInput {
8
+ readonly consumerRoot: string;
9
+ readonly policy: SourceArchitecturePolicy;
10
+ readonly signal?: AbortSignal;
11
+ }
12
+ export interface AnalyzeSourceDependenciesDependencies {
13
+ readonly inventoryReader: WorkspaceInventoryReader;
14
+ readonly parser: SourceDependencyParser;
15
+ readonly resolver: SourceDependencyResolver;
16
+ readonly sourceReader: SourceTreeReader;
17
+ }
18
+ export declare function analyzeSourceDependencies(input: AnalyzeSourceDependenciesInput, dependencies: AnalyzeSourceDependenciesDependencies): Promise<readonly FoundationDiagnostic[]>;
19
+ //# sourceMappingURL=analyze-source-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze-source-dependencies.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/use-cases/analyze-source-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sEAAsE,CAAC;AAG7G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iFAAiF,CAAC;AAChI,OAAO,KAAK,EAGV,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAGvF,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,qCAAqC;IACpD,QAAQ,CAAC,eAAe,EAAE,wBAAwB,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAC;CACzC;AA+ED,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,8BAA8B,EACrC,YAAY,EAAE,qCAAqC,GAClD,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC,CA4B1C"}
@@ -0,0 +1,69 @@
1
+ import { CapabilityInputError } from "../../../../capability-runtime.js";
2
+ import { assertNotCancelled } from "../../../../strict-yaml.js";
3
+ import { evaluateSourceDependencies } from "../policies/evaluate-source-dependencies.js";
4
+ function pathInside(path, root) {
5
+ return path === root || path.startsWith(`${root}/`);
6
+ }
7
+ function deepestBoundary(file, boundaries) {
8
+ return boundaries
9
+ .filter((boundary) => boundary.roots.some((root) => pathInside(file.path, root)))
10
+ .toSorted((left, right) => Math.max(...right.roots.map((root) => root.length)) -
11
+ Math.max(...left.roots.map((root) => root.length)) ||
12
+ left.id.localeCompare(right.id))[0];
13
+ }
14
+ function containingPackage(path, packages) {
15
+ return packages
16
+ .filter((workspacePackage) => workspacePackage.rootPath === "."
17
+ ? true
18
+ : pathInside(path, workspacePackage.rootPath))
19
+ .toSorted((left, right) => right.rootPath.length - left.rootPath.length ||
20
+ left.name.localeCompare(right.name))[0];
21
+ }
22
+ function classifyFiles(files, policy, packages, parser, signal) {
23
+ const classified = [];
24
+ for (const file of files) {
25
+ assertNotCancelled(signal);
26
+ const boundary = deepestBoundary(file, policy.boundaries);
27
+ const workspacePackage = containingPackage(file.path, packages);
28
+ if (boundary === undefined || workspacePackage === undefined) {
29
+ continue;
30
+ }
31
+ classified.push({
32
+ ...file,
33
+ boundary,
34
+ workspacePackage,
35
+ parsed: parser.parse(file)
36
+ });
37
+ }
38
+ return classified;
39
+ }
40
+ function assertInventoryUsable(packages) {
41
+ const names = new Set();
42
+ for (const workspacePackage of packages) {
43
+ if (workspacePackage.name.startsWith("<unnamed:") || names.has(workspacePackage.name)) {
44
+ throw new CapabilityInputError({
45
+ code: "WORKSPACE_IDENTITY_INVALID",
46
+ message: "Source architecture requires unique named workspace packages.",
47
+ phase: "source-workspace-inventory",
48
+ retryable: false
49
+ });
50
+ }
51
+ names.add(workspacePackage.name);
52
+ }
53
+ }
54
+ export async function analyzeSourceDependencies(input, dependencies) {
55
+ const [inventory, sourceFiles] = await Promise.all([
56
+ dependencies.inventoryReader.read(input.consumerRoot, input.policy.workspaceManifestPath, input.signal),
57
+ dependencies.sourceReader.read(input.consumerRoot, input.policy.governedRoots, input.signal)
58
+ ]);
59
+ assertInventoryUsable(inventory.packages);
60
+ const classifiedFiles = classifyFiles(sourceFiles, input.policy, inventory.packages, dependencies.parser, input.signal);
61
+ return evaluateSourceDependencies({
62
+ policy: input.policy,
63
+ inventory,
64
+ allSourceFiles: sourceFiles,
65
+ classifiedFiles,
66
+ resolver: dependencies.resolver
67
+ });
68
+ }
69
+ //# sourceMappingURL=analyze-source-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze-source-dependencies.js","sourceRoot":"","sources":["../../../../../src/capabilities/source-dependencies/application/use-cases/analyze-source-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAIzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAUhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAezF,SAAS,UAAU,CAAC,IAAY,EAAE,IAAY;IAC5C,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,eAAe,CACtB,IAAwB,EACxB,UAAiD;IAEjD,OAAO,UAAU;SACd,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,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KAAK,CAAC,MAAM,CAAC,aAAa,EAC1B,KAAK,CAAC,MAAM,CACb;KACF,CAAC,CAAC;IACH,qBAAqB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,eAAe,GAAG,aAAa,CACnC,WAAW,EACX,KAAK,CAAC,MAAM,EACZ,SAAS,CAAC,QAAQ,EAClB,YAAY,CAAC,MAAM,EACnB,KAAK,CAAC,MAAM,CACb,CAAC;IACF,OAAO,0BAA0B,CAAC;QAChC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,SAAS;QACT,cAAc,EAAE,WAAW;QAC3B,eAAe;QACf,QAAQ,EAAE,YAAY,CAAC,QAAQ;KAChC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { SourceArchitecturePolicy } from "../application/model/source-workspace.js";
2
+ export declare const CAPABILITY_ID: "architecture.source-dependencies";
3
+ export declare const CAPABILITY_CONFIG_SCHEMA_VERSION: 1;
4
+ export declare function loadCapabilityConfig(consumerRoot: string, configPath: string, signal?: AbortSignal): Promise<SourceArchitecturePolicy>;
5
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/source-dependencies/contract/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,0CAA0C,CAAC;AAElD,eAAO,MAAM,aAAa,EAAG,kCAA2C,CAAC;AACzE,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAuG3D,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,wBAAwB,CAAC,CA4BnC"}
@@ -0,0 +1,108 @@
1
+ import { CapabilityInputError } from "../../../capability-runtime.js";
2
+ import { assertSchema } from "../../../schema-catalog.js";
3
+ import { loadStrictYamlFile } from "../../../strict-yaml.js";
4
+ export const CAPABILITY_ID = "architecture.source-dependencies";
5
+ export const CAPABILITY_CONFIG_SCHEMA_VERSION = 1;
6
+ function inputError(message) {
7
+ throw new CapabilityInputError({
8
+ code: "SOURCE_ARCHITECTURE_CONFIG_INVALID",
9
+ message,
10
+ phase: "source-architecture-config",
11
+ retryable: false
12
+ });
13
+ }
14
+ function isRecord(value) {
15
+ return typeof value === "object" && value !== null && !Array.isArray(value);
16
+ }
17
+ function record(value, field) {
18
+ if (!isRecord(value)) {
19
+ inputError(`${field} must be an object.`);
20
+ }
21
+ return value;
22
+ }
23
+ function strings(value, field) {
24
+ if (!Array.isArray(value)) {
25
+ inputError(`${field} must be an array of strings.`);
26
+ }
27
+ const output = [];
28
+ for (const entry of value) {
29
+ if (typeof entry !== "string") {
30
+ inputError(`${field} must be an array of strings.`);
31
+ }
32
+ output.push(entry);
33
+ }
34
+ return output;
35
+ }
36
+ function string(value, field) {
37
+ if (typeof value !== "string") {
38
+ inputError(`${field} must be a string.`);
39
+ }
40
+ return value;
41
+ }
42
+ function pathInside(path, root) {
43
+ return path === root || path.startsWith(`${root}/`);
44
+ }
45
+ function validatePolicy(policy) {
46
+ const boundaryIds = new Set();
47
+ const boundaryRoots = new Set();
48
+ for (const boundary of policy.boundaries) {
49
+ if (boundaryIds.has(boundary.id)) {
50
+ inputError(`Architecture boundary ID is duplicated: ${boundary.id}.`);
51
+ }
52
+ boundaryIds.add(boundary.id);
53
+ for (const root of boundary.roots) {
54
+ if (boundaryRoots.has(root)) {
55
+ inputError(`Architecture boundary root is duplicated: ${root}.`);
56
+ }
57
+ if (!policy.governedRoots.some((governedRoot) => pathInside(root, governedRoot))) {
58
+ inputError(`Architecture boundary root is outside governed roots: ${root}.`);
59
+ }
60
+ boundaryRoots.add(root);
61
+ }
62
+ }
63
+ for (const boundary of policy.boundaries) {
64
+ for (const target of boundary.allowedBoundaries) {
65
+ if (target === boundary.id || !boundaryIds.has(target)) {
66
+ inputError(`Boundary edge must target another declared boundary: ${boundary.id} -> ${target}.`);
67
+ }
68
+ }
69
+ }
70
+ for (const governedRoot of policy.governedRoots) {
71
+ if (![...boundaryRoots].some((root) => pathInside(root, governedRoot))) {
72
+ inputError(`Governed root has no architecture boundary: ${governedRoot}.`);
73
+ }
74
+ }
75
+ }
76
+ function mapBoundary(value, index) {
77
+ const boundary = record(value, `boundaries[${index}]`);
78
+ const allow = record(boundary["allow"], `boundaries[${index}].allow`);
79
+ return Object.freeze({
80
+ id: string(boundary["id"], `boundaries[${index}].id`),
81
+ roots: Object.freeze(strings(boundary["roots"], `boundaries[${index}].roots`)),
82
+ allowedBoundaries: Object.freeze(strings(allow["boundaries"], `boundaries[${index}].allow.boundaries`)),
83
+ allowedPackages: Object.freeze(strings(allow["packages"], `boundaries[${index}].allow.packages`)),
84
+ allowedBuiltins: Object.freeze(strings(allow["builtins"], `boundaries[${index}].allow.builtins`)),
85
+ allowedRuntimeReferences: Object.freeze(strings(allow["runtimeReferences"], `boundaries[${index}].allow.runtimeReferences`))
86
+ });
87
+ }
88
+ export async function loadCapabilityConfig(consumerRoot, configPath, signal) {
89
+ const input = await loadStrictYamlFile(consumerRoot, configPath, "source-architecture-config", signal);
90
+ await assertSchema("architecture-source-dependencies/v1", input, "source-architecture-config");
91
+ const root = record(input, "source architecture config");
92
+ const workspace = record(root["workspace"], "workspace");
93
+ const boundaryInput = root["boundaries"];
94
+ if (!Array.isArray(boundaryInput)) {
95
+ inputError("boundaries must be an array.");
96
+ }
97
+ if (workspace["kind"] !== "pnpm" || workspace["manifest"] !== "pnpm-workspace.yaml") {
98
+ inputError("workspace must select pnpm-workspace.yaml.");
99
+ }
100
+ const policy = Object.freeze({
101
+ workspaceManifestPath: "pnpm-workspace.yaml",
102
+ governedRoots: Object.freeze(strings(root["governedRoots"], "governedRoots")),
103
+ boundaries: Object.freeze(boundaryInput.map(mapBoundary))
104
+ });
105
+ validatePolicy(policy);
106
+ return policy;
107
+ }
108
+ //# sourceMappingURL=config.js.map