@agent-teams/engineering-foundation 1.8.0 → 1.10.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 (284) hide show
  1. package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-native-tool-transition.d.ts +20 -0
  2. package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-native-tool-transition.d.ts.map +1 -0
  3. package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-native-tool-transition.js +60 -0
  4. package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-native-tool-transition.js.map +1 -0
  5. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.d.ts +9 -7
  6. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.d.ts.map +1 -1
  7. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.js +128 -76
  8. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.js.map +1 -1
  9. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.d.ts +5 -6
  10. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.d.ts.map +1 -1
  11. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.js +34 -10
  12. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.js.map +1 -1
  13. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts +1 -1
  14. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts.map +1 -1
  15. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js +48 -138
  16. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js.map +1 -1
  17. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.d.ts.map +1 -1
  18. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.js +248 -211
  19. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.js.map +1 -1
  20. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-engine.d.ts +35 -0
  21. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-engine.d.ts.map +1 -0
  22. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-engine.js +97 -0
  23. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-engine.js.map +1 -0
  24. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-excerpt.d.ts +42 -0
  25. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-excerpt.d.ts.map +1 -0
  26. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-excerpt.js +199 -0
  27. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-excerpt.js.map +1 -0
  28. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-inputs.d.ts +9 -0
  29. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-inputs.d.ts.map +1 -0
  30. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-inputs.js +197 -0
  31. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-inputs.js.map +1 -0
  32. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-item.d.ts +23 -0
  33. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-item.d.ts.map +1 -0
  34. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-item.js +103 -0
  35. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-item.js.map +1 -0
  36. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-model.d.ts +19 -0
  37. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-model.d.ts.map +1 -0
  38. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-model.js +250 -0
  39. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-model.js.map +1 -0
  40. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-reference.d.ts +21 -0
  41. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-reference.d.ts.map +1 -0
  42. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-reference.js +269 -0
  43. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-reference.js.map +1 -0
  44. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/growth-invocation.js +3 -3
  45. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/growth-invocation.js.map +1 -1
  46. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-tool-transition-content.d.ts +14 -0
  47. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-tool-transition-content.d.ts.map +1 -0
  48. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-tool-transition-content.js +40 -0
  49. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-tool-transition-content.js.map +1 -0
  50. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-transition-archive.d.ts +18 -0
  51. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-transition-archive.d.ts.map +1 -0
  52. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-transition-archive.js +152 -0
  53. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/native-transition-archive.js.map +1 -0
  54. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/observe-native-tool-transition.d.ts +24 -0
  55. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/observe-native-tool-transition.d.ts.map +1 -0
  56. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/observe-native-tool-transition.js +199 -0
  57. package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/observe-native-tool-transition.js.map +1 -0
  58. package/dist/capabilities/public-api-compatibility/application/model/native-tool-transition.d.ts +76 -0
  59. package/dist/capabilities/public-api-compatibility/application/model/native-tool-transition.d.ts.map +1 -0
  60. package/dist/capabilities/public-api-compatibility/application/model/native-tool-transition.js +35 -0
  61. package/dist/capabilities/public-api-compatibility/application/model/native-tool-transition.js.map +1 -0
  62. package/dist/capabilities/public-api-compatibility/application/policies/validate-native-tool-transition.d.ts +7 -0
  63. package/dist/capabilities/public-api-compatibility/application/policies/validate-native-tool-transition.d.ts.map +1 -0
  64. package/dist/capabilities/public-api-compatibility/application/policies/validate-native-tool-transition.js +55 -0
  65. package/dist/capabilities/public-api-compatibility/application/policies/validate-native-tool-transition.js.map +1 -0
  66. package/dist/capabilities/public-api-compatibility/application/ports/native-tool-transition.d.ts +10 -0
  67. package/dist/capabilities/public-api-compatibility/application/ports/native-tool-transition.d.ts.map +1 -0
  68. package/dist/capabilities/public-api-compatibility/application/ports/native-tool-transition.js +2 -0
  69. package/dist/capabilities/public-api-compatibility/application/ports/native-tool-transition.js.map +1 -0
  70. package/dist/capabilities/public-api-compatibility/application/use-cases/prepare-native-tool-transition.d.ts +29 -0
  71. package/dist/capabilities/public-api-compatibility/application/use-cases/prepare-native-tool-transition.d.ts.map +1 -0
  72. package/dist/capabilities/public-api-compatibility/application/use-cases/prepare-native-tool-transition.js +124 -0
  73. package/dist/capabilities/public-api-compatibility/application/use-cases/prepare-native-tool-transition.js.map +1 -0
  74. package/dist/capabilities/public-api-compatibility/module.js +2 -2
  75. package/dist/capabilities/public-api-compatibility/module.js.map +1 -1
  76. package/dist/capabilities/public-api-compatibility/native-transition-module.d.ts +37 -0
  77. package/dist/capabilities/public-api-compatibility/native-transition-module.d.ts.map +1 -0
  78. package/dist/capabilities/public-api-compatibility/native-transition-module.js +44 -0
  79. package/dist/capabilities/public-api-compatibility/native-transition-module.js.map +1 -0
  80. package/dist/capabilities/public-api-compatibility/node.d.ts +2 -0
  81. package/dist/capabilities/public-api-compatibility/node.d.ts.map +1 -1
  82. package/dist/capabilities/public-api-compatibility/node.js +1 -0
  83. package/dist/capabilities/public-api-compatibility/node.js.map +1 -1
  84. package/dist/capabilities/public-api-compatibility/schemas.d.ts +1 -1
  85. package/dist/capabilities/public-api-compatibility/schemas.d.ts.map +1 -1
  86. package/dist/capabilities/public-api-compatibility/schemas.js +1 -0
  87. package/dist/capabilities/public-api-compatibility/schemas.js.map +1 -1
  88. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/load-quality-gate-policy.d.ts +3 -3
  89. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/load-quality-gate-policy.d.ts.map +1 -1
  90. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/load-quality-gate-policy.js +14 -1
  91. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/load-quality-gate-policy.js.map +1 -1
  92. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/parse-quality-gate-policy.d.ts +2 -2
  93. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/parse-quality-gate-policy.d.ts.map +1 -1
  94. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/parse-quality-gate-policy.js +24 -3
  95. package/dist/capabilities/quality-gate-runner/adapters/inbound/configuration/parse-quality-gate-policy.js.map +1 -1
  96. package/dist/capabilities/quality-gate-runner/adapters/outbound/bun/bun-package-script-executor.d.ts +24 -0
  97. package/dist/capabilities/quality-gate-runner/adapters/outbound/bun/bun-package-script-executor.d.ts.map +1 -0
  98. package/dist/capabilities/quality-gate-runner/adapters/outbound/bun/bun-package-script-executor.js +25 -0
  99. package/dist/capabilities/quality-gate-runner/adapters/outbound/bun/bun-package-script-executor.js.map +1 -0
  100. package/dist/capabilities/quality-gate-runner/adapters/outbound/package-script-process.d.ts +9 -0
  101. package/dist/capabilities/quality-gate-runner/adapters/outbound/package-script-process.d.ts.map +1 -0
  102. package/dist/capabilities/quality-gate-runner/adapters/outbound/package-script-process.js +19 -0
  103. package/dist/capabilities/quality-gate-runner/adapters/outbound/package-script-process.js.map +1 -0
  104. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.d.ts +3 -1
  105. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.d.ts.map +1 -1
  106. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.js +16 -26
  107. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.js.map +1 -1
  108. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.d.ts +11 -2
  109. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.d.ts.map +1 -1
  110. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.d.ts +2 -2
  111. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.d.ts.map +1 -1
  112. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.js +1 -1
  113. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.js.map +1 -1
  114. package/dist/capabilities/quality-gate-runner/application/policies/quality-gate-input.d.ts +1 -0
  115. package/dist/capabilities/quality-gate-runner/application/policies/quality-gate-input.d.ts.map +1 -1
  116. package/dist/capabilities/quality-gate-runner/application/policies/quality-gate-input.js +3 -0
  117. package/dist/capabilities/quality-gate-runner/application/policies/quality-gate-input.js.map +1 -1
  118. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.d.ts +2 -2
  119. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.d.ts.map +1 -1
  120. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.js.map +1 -1
  121. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.d.ts +2 -0
  122. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.d.ts.map +1 -1
  123. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.js.map +1 -1
  124. package/dist/capabilities/quality-gate-runner/application/ports/quality-gate-policy-loader.d.ts +2 -2
  125. package/dist/capabilities/quality-gate-runner/application/ports/quality-gate-policy-loader.d.ts.map +1 -1
  126. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.d.ts +2 -2
  127. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.d.ts.map +1 -1
  128. package/dist/capabilities/quality-gate-runner/application/use-cases/create-quality-gate-command.d.ts.map +1 -1
  129. package/dist/capabilities/quality-gate-runner/application/use-cases/create-quality-gate-command.js +12 -1
  130. package/dist/capabilities/quality-gate-runner/application/use-cases/create-quality-gate-command.js.map +1 -1
  131. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.d.ts +2 -2
  132. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.d.ts.map +1 -1
  133. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.js +2 -0
  134. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.js.map +1 -1
  135. package/dist/capabilities/quality-gate-runner/composition/node-quality-gate-command.d.ts.map +1 -1
  136. package/dist/capabilities/quality-gate-runner/composition/node-quality-gate-command.js +60 -20
  137. package/dist/capabilities/quality-gate-runner/composition/node-quality-gate-command.js.map +1 -1
  138. package/dist/capabilities/quality-gate-runner/composition/select-package-script-executor.d.ts +11 -0
  139. package/dist/capabilities/quality-gate-runner/composition/select-package-script-executor.d.ts.map +1 -0
  140. package/dist/capabilities/quality-gate-runner/composition/select-package-script-executor.js +13 -0
  141. package/dist/capabilities/quality-gate-runner/composition/select-package-script-executor.js.map +1 -0
  142. package/dist/capabilities/quality-gate-runner/schemas.d.ts +1 -1
  143. package/dist/capabilities/quality-gate-runner/schemas.d.ts.map +1 -1
  144. package/dist/capabilities/quality-gate-runner/schemas.js +2 -1
  145. package/dist/capabilities/quality-gate-runner/schemas.js.map +1 -1
  146. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/load-agent-workflow-policy.d.ts +1 -1
  147. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/load-agent-workflow-policy.d.ts.map +1 -1
  148. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/load-agent-workflow-policy.js +4 -1
  149. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/load-agent-workflow-policy.js.map +1 -1
  150. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/parse-agent-workflow-policy.d.ts.map +1 -1
  151. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/parse-agent-workflow-policy.js +15 -0
  152. package/dist/capabilities/repository-agent-workflow/adapters/inbound/configuration/parse-agent-workflow-policy.js.map +1 -1
  153. package/dist/capabilities/repository-agent-workflow/adapters/outbound/bun/bun-package-script-runner.d.ts +18 -0
  154. package/dist/capabilities/repository-agent-workflow/adapters/outbound/bun/bun-package-script-runner.d.ts.map +1 -0
  155. package/dist/capabilities/repository-agent-workflow/adapters/outbound/bun/bun-package-script-runner.js +24 -0
  156. package/dist/capabilities/repository-agent-workflow/adapters/outbound/bun/bun-package-script-runner.js.map +1 -0
  157. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.d.ts +2 -0
  158. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.d.ts.map +1 -1
  159. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.js +7 -1
  160. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.js.map +1 -1
  161. package/dist/capabilities/repository-agent-workflow/application/model/repository-agent-workflow.d.ts +2 -0
  162. package/dist/capabilities/repository-agent-workflow/application/model/repository-agent-workflow.d.ts.map +1 -1
  163. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.d.ts.map +1 -1
  164. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.js +4 -2
  165. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.js.map +1 -1
  166. package/dist/capabilities/repository-agent-workflow/application/policies/workflow-input.d.ts +1 -0
  167. package/dist/capabilities/repository-agent-workflow/application/policies/workflow-input.d.ts.map +1 -1
  168. package/dist/capabilities/repository-agent-workflow/application/policies/workflow-input.js +3 -0
  169. package/dist/capabilities/repository-agent-workflow/application/policies/workflow-input.js.map +1 -1
  170. package/dist/capabilities/repository-agent-workflow/application/ports/changed-workflow.d.ts +2 -0
  171. package/dist/capabilities/repository-agent-workflow/application/ports/changed-workflow.d.ts.map +1 -1
  172. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.d.ts.map +1 -1
  173. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js +1 -0
  174. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js.map +1 -1
  175. package/dist/capabilities/repository-agent-workflow/composition/node-commands.d.ts +2 -1
  176. package/dist/capabilities/repository-agent-workflow/composition/node-commands.d.ts.map +1 -1
  177. package/dist/capabilities/repository-agent-workflow/composition/node-commands.js +42 -1
  178. package/dist/capabilities/repository-agent-workflow/composition/node-commands.js.map +1 -1
  179. package/dist/capabilities/repository-agent-workflow/composition/select-package-script-runner.d.ts +6 -0
  180. package/dist/capabilities/repository-agent-workflow/composition/select-package-script-runner.d.ts.map +1 -0
  181. package/dist/capabilities/repository-agent-workflow/composition/select-package-script-runner.js +9 -0
  182. package/dist/capabilities/repository-agent-workflow/composition/select-package-script-runner.js.map +1 -0
  183. package/dist/capabilities/repository-agent-workflow/schemas.d.ts +1 -1
  184. package/dist/capabilities/repository-agent-workflow/schemas.d.ts.map +1 -1
  185. package/dist/capabilities/repository-agent-workflow/schemas.js +2 -1
  186. package/dist/capabilities/repository-agent-workflow/schemas.js.map +1 -1
  187. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.d.ts.map +1 -1
  188. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.js +2 -6
  189. package/dist/capabilities/source-dependencies/adapters/outbound/node/node-source-dependency-resolver.js.map +1 -1
  190. package/dist/capabilities/workspace-dependency-declarations/adapters/inbound/filesystem/load-capability-config.d.ts +1 -1
  191. package/dist/capabilities/workspace-dependency-declarations/adapters/inbound/filesystem/load-capability-config.d.ts.map +1 -1
  192. package/dist/capabilities/workspace-dependency-declarations/adapters/inbound/filesystem/load-capability-config.js +4 -1
  193. package/dist/capabilities/workspace-dependency-declarations/adapters/inbound/filesystem/load-capability-config.js.map +1 -1
  194. package/dist/capabilities/workspace-dependency-declarations/adapters/inbound/filesystem/parse-capability-config.js.map +1 -1
  195. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-dependency-settings.d.ts +1 -1
  196. package/dist/capabilities/workspace-dependency-declarations/application/model/workspace-dependency-settings.d.ts.map +1 -1
  197. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts +2 -1
  198. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts.map +1 -1
  199. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.js +10 -7
  200. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.js.map +1 -1
  201. package/dist/capabilities/workspace-dependency-declarations/module.js +1 -1
  202. package/dist/capabilities/workspace-dependency-declarations/module.js.map +1 -1
  203. package/dist/capabilities/workspace-dependency-declarations/schemas.d.ts +1 -1
  204. package/dist/capabilities/workspace-dependency-declarations/schemas.d.ts.map +1 -1
  205. package/dist/capabilities/workspace-dependency-declarations/schemas.js +2 -1
  206. package/dist/capabilities/workspace-dependency-declarations/schemas.js.map +1 -1
  207. package/dist/features/command-host/adapters/inbound/cli/cli-arguments.d.ts.map +1 -1
  208. package/dist/features/command-host/adapters/inbound/cli/cli-arguments.js +18 -0
  209. package/dist/features/command-host/adapters/inbound/cli/cli-arguments.js.map +1 -1
  210. package/dist/features/command-host/adapters/inbound/cli/foundation-cli.d.ts.map +1 -1
  211. package/dist/features/command-host/adapters/inbound/cli/foundation-cli.js +9 -1
  212. package/dist/features/command-host/adapters/inbound/cli/foundation-cli.js.map +1 -1
  213. package/dist/features/command-host/application/command-invocation.d.ts +2 -0
  214. package/dist/features/command-host/application/command-invocation.d.ts.map +1 -1
  215. package/dist/features/command-host/application/command-invocation.js.map +1 -1
  216. package/dist/features/command-host/application/command-services.d.ts +4 -0
  217. package/dist/features/command-host/application/command-services.d.ts.map +1 -1
  218. package/dist/features/command-host/composition/node-command-host.d.ts +2 -2
  219. package/dist/features/command-host/composition/node-command-host.d.ts.map +1 -1
  220. package/dist/features/command-host/composition/node-command-host.js +14 -5
  221. package/dist/features/command-host/composition/node-command-host.js.map +1 -1
  222. package/dist/features/quality-coverage/adapters/consumer-observations.d.ts.map +1 -1
  223. package/dist/features/quality-coverage/adapters/consumer-observations.js +7 -2
  224. package/dist/features/quality-coverage/adapters/consumer-observations.js.map +1 -1
  225. package/dist/features/quality-coverage/api.d.ts +1 -1
  226. package/dist/features/quality-coverage/api.d.ts.map +1 -1
  227. package/dist/features/quality-coverage/api.js +1 -1
  228. package/dist/features/quality-coverage/api.js.map +1 -1
  229. package/dist/features/quality-coverage/application/script-route.d.ts.map +1 -1
  230. package/dist/features/quality-coverage/application/script-route.js +11 -7
  231. package/dist/features/quality-coverage/application/script-route.js.map +1 -1
  232. package/dist/process-execution/application/errors.d.ts +1 -1
  233. package/dist/process-execution/application/errors.d.ts.map +1 -1
  234. package/dist/process-execution/application/errors.js +1 -1
  235. package/dist/process-execution/application/errors.js.map +1 -1
  236. package/dist/process-execution/application/process-failure-policy.d.ts +1 -1
  237. package/dist/process-execution/application/process-failure-policy.d.ts.map +1 -1
  238. package/dist/process-execution/application/process-failure-policy.js +1 -1
  239. package/dist/process-execution/application/process-failure-policy.js.map +1 -1
  240. package/dist/process-execution/application/runtime-selection.d.ts +26 -0
  241. package/dist/process-execution/application/runtime-selection.d.ts.map +1 -0
  242. package/dist/process-execution/application/runtime-selection.js +60 -0
  243. package/dist/process-execution/application/runtime-selection.js.map +1 -0
  244. package/dist/process-execution/module.d.ts +1 -0
  245. package/dist/process-execution/module.d.ts.map +1 -1
  246. package/dist/process-execution/module.js +1 -0
  247. package/dist/process-execution/module.js.map +1 -1
  248. package/dist/process-execution/node-process-runner.d.ts +15 -4
  249. package/dist/process-execution/node-process-runner.d.ts.map +1 -1
  250. package/dist/process-execution/node-process-runner.js +261 -237
  251. package/dist/process-execution/node-process-runner.js.map +1 -1
  252. package/dist/process-execution/node-runtime-verifier.d.ts +17 -0
  253. package/dist/process-execution/node-runtime-verifier.d.ts.map +1 -0
  254. package/dist/process-execution/node-runtime-verifier.js +116 -0
  255. package/dist/process-execution/node-runtime-verifier.js.map +1 -0
  256. package/dist/process-execution/windows-command-launch.d.ts +4 -0
  257. package/dist/process-execution/windows-command-launch.d.ts.map +1 -0
  258. package/dist/process-execution/windows-command-launch.js +46 -0
  259. package/dist/process-execution/windows-command-launch.js.map +1 -0
  260. package/dist/process-execution/windows-managed-process-diagnostics.d.ts +11 -2
  261. package/dist/process-execution/windows-managed-process-diagnostics.d.ts.map +1 -1
  262. package/dist/process-execution/windows-managed-process-diagnostics.js +54 -1
  263. package/dist/process-execution/windows-managed-process-diagnostics.js.map +1 -1
  264. package/dist/process-execution/windows-managed-process.d.ts +6 -1
  265. package/dist/process-execution/windows-managed-process.d.ts.map +1 -1
  266. package/dist/process-execution/windows-managed-process.js +32 -13
  267. package/dist/process-execution/windows-managed-process.js.map +1 -1
  268. package/dist/schema-catalog.d.ts +1 -1
  269. package/dist/schema-catalog.d.ts.map +1 -1
  270. package/dist/schema-ids.d.ts +1 -1
  271. package/dist/schema-ids.d.ts.map +1 -1
  272. package/package.json +10 -4
  273. package/schemas/package-public-api-native-transition/v1.schema.json +173 -0
  274. package/schemas/quality-gate-runner/v2.schema.json +70 -0
  275. package/schemas/repository-agent-workflow/v2.schema.json +94 -0
  276. package/schemas/workspace-dependency-declarations/v2.schema.json +83 -0
  277. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.d.ts +0 -101
  278. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.d.ts.map +0 -1
  279. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.js +0 -2
  280. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.js.map +0 -1
  281. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.d.ts +0 -15
  282. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.d.ts.map +0 -1
  283. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.js +0 -47
  284. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.js.map +0 -1
@@ -0,0 +1,197 @@
1
+ import { open, opendir, realpath, stat } from "node:fs/promises";
2
+ import { dirname, join, resolve } from "node:path";
3
+ import { parse } from "jsonc-parser";
4
+ import { assertNotCancelled } from "../../../application/policies/public-api-evidence-errors.js";
5
+ const MAX_BYTES = 128 * 1024 * 1024;
6
+ const MAX_FILES = 20_000;
7
+ async function boundedFile(path, maxBytes) {
8
+ const handle = await open(path, "r");
9
+ try {
10
+ const before = await handle.stat();
11
+ if (!before.isFile() || before.size > maxBytes) {
12
+ throw new Error("Public API compiler input exceeds its bounded regular-file admission.");
13
+ }
14
+ const chunks = [];
15
+ let total = 0;
16
+ for (;;) {
17
+ const chunk = Buffer.alloc(Math.min(64 * 1024, maxBytes - total + 1));
18
+ const { bytesRead } = await handle.read(chunk, 0, chunk.length, null);
19
+ if (bytesRead === 0) {
20
+ break;
21
+ }
22
+ total += bytesRead;
23
+ if (total > maxBytes) {
24
+ throw new Error("Public API compiler input exceeds its per-file or aggregate byte budget.");
25
+ }
26
+ chunks.push(chunk.subarray(0, bytesRead));
27
+ }
28
+ const after = await handle.stat();
29
+ if (before.dev !== after.dev || before.ino !== after.ino || before.size !== after.size || before.mtimeMs !== after.mtimeMs || before.ctimeMs !== after.ctimeMs || total !== after.size) {
30
+ throw new Error("Public API compiler input changed during snapshot capture.");
31
+ }
32
+ return Buffer.concat(chunks, total);
33
+ }
34
+ finally {
35
+ await handle.close();
36
+ }
37
+ }
38
+ async function findPackage(directory, name) {
39
+ let current = directory;
40
+ for (;;) {
41
+ const candidate = join(current, "node_modules", name);
42
+ try {
43
+ if ((await stat(join(candidate, "package.json"))).isFile()) {
44
+ return await realpath(candidate);
45
+ }
46
+ }
47
+ catch (error) {
48
+ if (!(error instanceof Error && "code" in error && ["ENOENT", "ENOTDIR"].includes(String(error.code)))) {
49
+ throw error;
50
+ }
51
+ }
52
+ const parent = dirname(current);
53
+ if (parent === current) {
54
+ return undefined;
55
+ }
56
+ current = parent;
57
+ }
58
+ }
59
+ function compilerPresets(files) {
60
+ const result = [];
61
+ for (const [path, text] of files) {
62
+ if (!/\.jsonc?$/u.test(path)) {
63
+ continue;
64
+ }
65
+ const value = parse(text);
66
+ if (typeof value !== "object" || value === null || !("extends" in value)) {
67
+ continue;
68
+ }
69
+ const extended = typeof value.extends === "string" ? [value.extends] : Array.isArray(value.extends) ? value.extends : [];
70
+ for (const target of extended) {
71
+ if (typeof target !== "string" || target.startsWith(".") || target.startsWith("/") || target.includes("\\")) {
72
+ continue;
73
+ }
74
+ const parts = target.split("/");
75
+ const name = target.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
76
+ if (name !== undefined && /^(?:@[a-zA-Z0-9_][a-zA-Z0-9_.-]*\/)?[a-zA-Z0-9_][a-zA-Z0-9_.-]*$/u.test(name)) {
77
+ result.push({ owner: dirname(path), name });
78
+ }
79
+ }
80
+ }
81
+ return result;
82
+ }
83
+ /** Capture the staged declaration/configuration namespace and its installed
84
+ * dependency declarations before starting the native compiler. No SDK or package
85
+ * code is executed. The compiler subsequently sees only these copied bytes. */
86
+ export async function captureNativePublicApiInputs(input) {
87
+ const files = new Map();
88
+ let total = 0;
89
+ let entries = 0;
90
+ const directoryEntries = async (path) => {
91
+ const values = [];
92
+ for await (const entry of await opendir(path)) {
93
+ if (++entries > 50_000) {
94
+ throw new Error("Public API compiler input exceeds its directory-entry budget.");
95
+ }
96
+ values.push(entry);
97
+ }
98
+ return values.toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
99
+ };
100
+ const capture = async (physical, virtual) => {
101
+ assertNotCancelled(input.signal);
102
+ if (files.size >= MAX_FILES) {
103
+ throw new Error("Public API compiler input snapshot exceeds its file inventory.");
104
+ }
105
+ const bytes = await boundedFile(physical, Math.min(32 * 1024 * 1024, MAX_BYTES - total));
106
+ total += bytes.byteLength;
107
+ if (total > MAX_BYTES || files.size >= MAX_FILES) {
108
+ throw new Error("Public API compiler input snapshot exceeds its bounded file or byte inventory.");
109
+ }
110
+ files.set(resolve(virtual).replaceAll("\\", "/"), bytes.toString("utf8"));
111
+ };
112
+ const walk = async (physical, virtual, depth = 0) => {
113
+ if (depth > 128) {
114
+ throw new Error("Public API compiler input exceeds its directory-depth budget.");
115
+ }
116
+ for (const entry of await directoryEntries(physical)) {
117
+ assertNotCancelled(input.signal);
118
+ if (entry.name === "node_modules" || entry.name === ".git") {
119
+ continue;
120
+ }
121
+ const source = join(physical, entry.name);
122
+ const target = join(virtual, entry.name);
123
+ if (entry.isDirectory()) {
124
+ await walk(source, target, depth + 1);
125
+ }
126
+ else if (entry.isFile() && /(?:\.d\.[cm]?ts|\.jsonc?)$/u.test(entry.name)) {
127
+ await capture(source, target);
128
+ }
129
+ else if (entry.isSymbolicLink()) {
130
+ throw new Error("Public API compiler input snapshot contains a symbolic-link member.");
131
+ }
132
+ }
133
+ };
134
+ await walk(input.stagingRoot, input.stagingRoot);
135
+ const installed = new Map();
136
+ const pending = [];
137
+ const admit = async (owner, virtualOwner, name) => {
138
+ if (!/^(?:@[a-zA-Z0-9_][a-zA-Z0-9_.-]*\/)?[a-zA-Z0-9_][a-zA-Z0-9_.-]*$/u.test(name)) {
139
+ throw new Error("Public API dependency name is not a bounded package identifier.");
140
+ }
141
+ const physical = await findPackage(owner, name);
142
+ if (physical === undefined) {
143
+ return;
144
+ } // Missing imports remain native compiler diagnostics.
145
+ const global = join(input.stagingRoot, "node_modules", name);
146
+ let virtual = global;
147
+ const prior = installed.get(global);
148
+ if (prior !== undefined && prior !== physical) {
149
+ virtual = join(virtualOwner, "node_modules", name);
150
+ }
151
+ const existing = installed.get(virtual);
152
+ if (existing === physical) {
153
+ return;
154
+ }
155
+ if (existing !== undefined) {
156
+ throw new Error("Public API dependency snapshot has conflicting package resolution.");
157
+ }
158
+ installed.set(virtual, physical);
159
+ pending.push({ physical, virtual });
160
+ };
161
+ const dependencies = async (physical, virtual) => {
162
+ const bytes = files.get(resolve(virtual, "package.json").replaceAll("\\", "/"));
163
+ if (bytes === undefined) {
164
+ throw new Error("Public API dependency manifest was not captured.");
165
+ }
166
+ const manifest = JSON.parse(bytes);
167
+ for (const name of [...new Set([...Object.keys(manifest.dependencies ?? {}), ...Object.keys(manifest.peerDependencies ?? {}), ...Object.keys(manifest.optionalDependencies ?? {})])].toSorted()) {
168
+ await admit(physical, virtual, name);
169
+ }
170
+ };
171
+ for (const preset of compilerPresets(files)) {
172
+ await admit(preset.owner, input.stagingRoot, preset.name);
173
+ }
174
+ await dependencies(input.packageRoot, input.packageRoot);
175
+ for (const owner of [input.packageRoot, input.stagingRoot]) {
176
+ try {
177
+ for (const entry of await directoryEntries(join(owner, "node_modules", "@types"))) {
178
+ await admit(owner, input.stagingRoot, `@types/${entry.name}`);
179
+ }
180
+ }
181
+ catch (error) {
182
+ if (!(error instanceof Error && "code" in error && ["ENOENT", "ENOTDIR"].includes(String(error.code)))) {
183
+ throw error;
184
+ }
185
+ }
186
+ }
187
+ for (let index = 0; index < pending.length; index++) {
188
+ if (pending.length > 1024) {
189
+ throw new Error("Public API dependency snapshot exceeds its package budget.");
190
+ }
191
+ const pkg = pending[index];
192
+ await walk(pkg.physical, pkg.virtual);
193
+ await dependencies(pkg.physical, pkg.virtual);
194
+ }
195
+ return files;
196
+ }
197
+ //# sourceMappingURL=native-public-api-inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-public-api-inputs.js","sourceRoot":"","sources":["../../../../../../src/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AAEjG,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;AACpC,MAAM,SAAS,GAAG,MAAM,CAAC;AACzB,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,QAAgB;IACvD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,GAAG,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QAAC,CAAC;QAC7I,MAAM,MAAM,GAAa,EAAE,CAAC;QAAC,IAAI,K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,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC;gBAAC,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,UAAU,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAAC,CAAC;QACvJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAAC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;gBAAC,MAAM,KAAK,CAAC;YAAC,CAAC;QAAC,CAAC;IAC9I,CAAC;IACD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACpD,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAAC,CAAC;QAC7G,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAE,CAAC;QAC5B,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,23 @@
1
+ import * as model from "@microsoft/api-extractor-model";
2
+ import { type DocComment } from "@microsoft/tsdoc";
3
+ import type { NativePublicApiContext } from "./native-public-api-engine.js";
4
+ import { type NativeDeclaration, type NativeExcerpt } from "./native-public-api-excerpt.js";
5
+ export interface NativeModelDeclaration {
6
+ readonly node: NativeDeclaration;
7
+ readonly name: string;
8
+ readonly exported: boolean;
9
+ readonly releaseTag: model.ReleaseTag;
10
+ readonly docComment: DocComment | undefined;
11
+ readonly overloadIndex: number;
12
+ }
13
+ /** Exhaustive supported declaration-to-model mapping. Unsupported native syntax
14
+ * fails before it can be represented as an empty or successful API surface. */
15
+ export declare function createNativeApiItem(context: NativePublicApiContext, descriptor: NativeModelDeclaration, projected: NativeExcerpt): Promise<model.ApiDeclaredItem>;
16
+ /** Use the same public constructors for an external identity as for its actual
17
+ * API model. In particular they own callable overload selectors and the
18
+ * distinction between static and instance member navigation. */
19
+ export declare function createNativeExternalReference(context: NativePublicApiContext, packageName: string | undefined, chain: readonly {
20
+ readonly node: NativeDeclaration;
21
+ readonly name: string;
22
+ }[]): Promise<string>;
23
+ //# sourceMappingURL=native-public-api-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-public-api-item.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-item.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAA8D,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAExJ,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAqCD;+EAC+E;AAC/E,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,sBAAsB,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CA8BvK;AAED;;gEAEgE;AAChE,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,SAAS;IACpI,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzD,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBpB"}
@@ -0,0 +1,103 @@
1
+ import * as ast from "typescript/unstable/ast";
2
+ import * as model from "@microsoft/api-extractor-model";
3
+ import { TSDocConfiguration } from "@microsoft/tsdoc";
4
+ import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference.js";
5
+ import { nativeAccessorPair, nativeHasModifier, nativeSignatureNode } from "./native-public-api-excerpt.js";
6
+ async function signatureOptions(context, node, projected, overloadIndex) {
7
+ const signature = nativeSignatureNode(node);
8
+ const parameters = [];
9
+ for (const parameter of signature.parameters ?? []) {
10
+ parameters.push({ parameterName: await context.emitter.printNode(parameter.name), parameterTypeTokenRange: projected.range(parameter.type), isOptional: parameter.questionToken !== undefined || parameter.initializer !== undefined });
11
+ }
12
+ return { overloadIndex,
13
+ parameters,
14
+ typeParameters: (signature.typeParameters ?? []).map(parameter => ({ typeParameterName: parameter.name.text, constraintTokenRange: projected.range(parameter.constraint), defaultTypeTokenRange: projected.range(parameter.defaultType) })),
15
+ returnTypeTokenRange: projected.range(signature.type) };
16
+ }
17
+ function memberOptions(node) {
18
+ return { isOptional: node.questionToken !== undefined, isReadonly: nativeHasModifier(node, ast.SyntaxKind.ReadonlyKeyword), isStatic: nativeHasModifier(node, ast.SyntaxKind.StaticKeyword), isProtected: nativeHasModifier(node, ast.SyntaxKind.ProtectedKeyword), isAbstract: nativeHasModifier(node, ast.SyntaxKind.AbstractKeyword) };
19
+ }
20
+ function classHeritage(node, projected) {
21
+ const base = node.heritageClauses?.find(clause => clause.token === ast.SyntaxKind.ExtendsKeyword)?.types[0];
22
+ return { extendsTokenRange: base === undefined ? undefined : projected.range(base),
23
+ implementsTokenRanges: node.heritageClauses?.filter(clause => clause.token === ast.SyntaxKind.ImplementsKeyword).flatMap(clause => clause.types.map(type => projected.range(type))) ?? [] };
24
+ }
25
+ async function readonlyAccessor(context, descriptor) {
26
+ if (!ast.isGetAccessorDeclaration(descriptor.node)) {
27
+ return false;
28
+ }
29
+ return await nativeAccessorPair(context, descriptor.node, descriptor.name) === undefined;
30
+ }
31
+ function commonOptions(descriptor, projected) {
32
+ return { name: descriptor.name, docComment: descriptor.docComment, releaseTag: descriptor.releaseTag, excerptTokens: projected.tokens, isExported: descriptor.exported };
33
+ }
34
+ async function variableItem(context, descriptor, projected) {
35
+ const common = commonOptions(descriptor, projected);
36
+ if (nativeSignatureNode(descriptor.node) !== descriptor.node) {
37
+ return new model.ApiFunction({ ...common, ...await signatureOptions(context, descriptor.node, projected, descriptor.overloadIndex) });
38
+ }
39
+ return new model.ApiVariable({ ...common, isReadonly: (descriptor.node.parent.flags & ast.NodeFlags.Const) !== 0, variableTypeTokenRange: projected.range(descriptor.node.type), initializerTokenRange: projected.range(descriptor.node.initializer) });
40
+ }
41
+ function interfaceHeritage(node, projected) {
42
+ return node.heritageClauses?.flatMap(clause => clause.types.map(type => projected.range(type))) ?? [];
43
+ }
44
+ function accessorType(node) { return node.type ?? node.parameters?.[0]?.type; }
45
+ /** Exhaustive supported declaration-to-model mapping. Unsupported native syntax
46
+ * fails before it can be represented as an empty or successful API surface. */
47
+ export async function createNativeApiItem(context, descriptor, projected) {
48
+ const { node } = descriptor;
49
+ const common = commonOptions(descriptor, projected);
50
+ const signature = await signatureOptions(context, node, projected, descriptor.overloadIndex);
51
+ const member = memberOptions(node);
52
+ const access = async () => new model.ApiProperty({ ...common, ...member, isReadonly: await readonlyAccessor(context, descriptor), propertyTypeTokenRange: projected.range(accessorType(node)) });
53
+ const constructors = {
54
+ [ast.SyntaxKind.FunctionDeclaration]: () => new model.ApiFunction({ ...common, ...signature }),
55
+ [ast.SyntaxKind.TypeAliasDeclaration]: () => new model.ApiTypeAlias({ ...common, typeParameters: signature.typeParameters, typeTokenRange: projected.range(node.type) }),
56
+ [ast.SyntaxKind.ClassDeclaration]: () => new model.ApiClass({ ...common, typeParameters: signature.typeParameters, isAbstract: member.isAbstract, ...classHeritage(node, projected) }),
57
+ [ast.SyntaxKind.InterfaceDeclaration]: () => new model.ApiInterface({ ...common, typeParameters: signature.typeParameters, extendsTokenRanges: interfaceHeritage(node, projected) }),
58
+ [ast.SyntaxKind.ModuleDeclaration]: () => new model.ApiNamespace(common),
59
+ [ast.SyntaxKind.SourceFile]: () => new model.ApiNamespace(common),
60
+ [ast.SyntaxKind.EnumDeclaration]: () => new model.ApiEnum(common),
61
+ [ast.SyntaxKind.EnumMember]: () => new model.ApiEnumMember({ ...common, initializerTokenRange: projected.range(node.initializer) }),
62
+ [ast.SyntaxKind.VariableDeclaration]: () => variableItem(context, descriptor, projected),
63
+ [ast.SyntaxKind.Constructor]: () => new model.ApiConstructor({ ...common, ...signature, isProtected: member.isProtected }),
64
+ [ast.SyntaxKind.MethodDeclaration]: () => new model.ApiMethod({ ...common, ...signature, ...member }),
65
+ [ast.SyntaxKind.MethodSignature]: () => new model.ApiMethodSignature({ ...common, ...signature, isOptional: member.isOptional }),
66
+ [ast.SyntaxKind.CallSignature]: () => new model.ApiCallSignature({ ...common, ...signature }),
67
+ [ast.SyntaxKind.ConstructSignature]: () => new model.ApiConstructSignature({ ...common, ...signature }),
68
+ [ast.SyntaxKind.IndexSignature]: () => new model.ApiIndexSignature({ ...common, ...signature, isReadonly: member.isReadonly }),
69
+ [ast.SyntaxKind.PropertyDeclaration]: () => new model.ApiProperty({ ...common, ...member, propertyTypeTokenRange: projected.range(node.type), initializerTokenRange: projected.range(node.initializer) }),
70
+ [ast.SyntaxKind.PropertySignature]: () => new model.ApiPropertySignature({ ...common, ...member, propertyTypeTokenRange: projected.range(node.type) }),
71
+ [ast.SyntaxKind.GetAccessor]: access,
72
+ [ast.SyntaxKind.SetAccessor]: access,
73
+ };
74
+ const construct = constructors[node.kind];
75
+ if (construct === undefined) {
76
+ throw new Error(`Unsupported native public API declaration: ${ast.SyntaxKind[node.kind]}.`);
77
+ }
78
+ return construct();
79
+ }
80
+ /** Use the same public constructors for an external identity as for its actual
81
+ * API model. In particular they own callable overload selectors and the
82
+ * distinction between static and instance member navigation. */
83
+ export async function createNativeExternalReference(context, packageName, chain) {
84
+ const pkg = new model.ApiPackage({ name: packageName ?? "typescript-native-global", docComment: undefined, tsdocConfiguration: new TSDocConfiguration() });
85
+ const entry = new model.ApiEntryPoint({ name: "" });
86
+ pkg.addMember(entry);
87
+ let parent = entry;
88
+ let reference = entry.canonicalReference;
89
+ const empty = { tokens: [], range: () => ({ startIndex: 0, endIndex: 0 }) };
90
+ for (const [index, declaration] of chain.entries()) {
91
+ const item = await createNativeApiItem(context, { ...declaration, exported: true, releaseTag: model.ReleaseTag.Public, docComment: undefined, overloadIndex: 1 }, empty);
92
+ parent.addMember(item);
93
+ reference = item.canonicalReference;
94
+ if (index < chain.length - 1) {
95
+ if (!model.ApiItemContainerMixin.isBaseClassOf(item)) {
96
+ throw new Error("External native declaration identity has a non-container parent.");
97
+ }
98
+ parent = item;
99
+ }
100
+ }
101
+ return packageName === undefined ? reference.withSource(DeclarationReference.global().source).toString() : reference.toString();
102
+ }
103
+ //# sourceMappingURL=native-public-api-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-public-api-item.js","sourceRoot":"","sources":["../../../../../../src/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAmB,MAAM,kB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AAC;IAChE,IAAI,SAAS,GAAG,KAAK,CAAC,kBAAkB,CAAC;IACzC,MAAM,KAAK,GAAkB,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC3F,KAAK,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;QACnD,MAAM,IAAI,GAAG,MAAM,mBAAmB,CAAC,OAAO,EAAE,EAAE,GAAG,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACzK,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvB,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACpC,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAAC,CAAC;YAC9I,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;IACD,OAAO,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;AAClI,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as ast from "typescript/unstable/ast";
2
+ import * as model from "@microsoft/api-extractor-model";
3
+ import { type NativePublicApiContext, type NativePublicApiDiagnostic } from "./native-public-api-engine.js";
4
+ /** Public model constructors retain ownership of identities, parents and overload
5
+ * references. The native adapter owns only compiler observation and projection. */
6
+ export declare function createNativePublicApiModel(context: NativePublicApiContext, options: {
7
+ readonly packageName: string;
8
+ readonly entryPointPath: string;
9
+ readonly includeForgottenExports: boolean;
10
+ readonly untrimmedObservation?: boolean;
11
+ readonly referenceProjection?: "stored-surface" | "declaration-graph";
12
+ }): Promise<{
13
+ readonly model: model.ApiModel;
14
+ readonly apiPackage: model.ApiPackage;
15
+ readonly diagnostics: readonly NativePublicApiDiagnostic[];
16
+ readonly succeeded: boolean;
17
+ readonly declarationBindings: ReadonlyMap<string, ast.Node>;
18
+ }>;
19
+ //# sourceMappingURL=native-public-api-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-public-api-model.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/public-api-compatibility/adapters/outbound/api-extractor/native-public-api-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAC;AAE/C,OAAO,KAAK,KAAK,MAAM,gCAAgC,CAAC;AAKxD,OAAO,EAA6B,KAAK,sBAAsB,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAuDvI;mFACmF;AACnF,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,CAAC;CACvE,GAAG,OAAO,CAAC;IACV,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAC3D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;CAC7D,CAAC,CAwID"}
@@ -0,0 +1,250 @@
1
+ import * as ast from "typescript/unstable/ast";
2
+ import * as model from "@microsoft/api-extractor-model";
3
+ import { TSDocConfiguration, TSDocParser } from "@microsoft/tsdoc";
4
+ import { createNativeApiItem } from "./native-public-api-item.js";
5
+ import { aliased, externalReference, packageNameFor, references, symbolDeclarations, symbolRoot, uniqueSymbol } from "./native-public-api-reference.js";
6
+ import { assertNotCancelled } from "../../../application/policies/public-api-evidence-errors.js";
7
+ import { nativeCompilerDiagnostics } from "./native-public-api-engine.js";
8
+ import { combineNativeExcerpts, createNativeExcerpt, nativeAccessorPair, nativeHasModifier as modifiers } from "./native-public-api-excerpt.js";
9
+ function countOverload(siblings, node, name) {
10
+ return siblings.filter(item => item.node.kind === node.kind && item.name === name && modifiers(item.node, ast.SyntaxKind.StaticKeyword) === modifiers(node, ast.SyntaxKind.StaticKeyword)).length + 1;
11
+ }
12
+ async function setterWithGetter(context, node, name) {
13
+ return ast.isSetAccessorDeclaration(node) && await nativeAccessorPair(context, node, name) !== undefined;
14
+ }
15
+ function hasDeclarationHeader(node) {
16
+ return (node.heritageClauses?.length ?? 0) > 0 || (node.typeParameters?.length ?? 0) > 0;
17
+ }
18
+ async function representedDeclarations(context, descriptor) {
19
+ const companion = ast.isGetAccessorDeclaration(descriptor.node) ? await nativeAccessorPair(context, descriptor.node, descriptor.name) : undefined;
20
+ return companion === undefined ? [descriptor.node] : [descriptor.node, companion];
21
+ }
22
+ function publicDescriptor(descriptor) {
23
+ let current = descriptor;
24
+ while (current !== undefined) {
25
+ if (!current.exported) {
26
+ return false;
27
+ }
28
+ current = current.parent;
29
+ }
30
+ return true;
31
+ }
32
+ function releaseTag(comment, inherited) {
33
+ const tags = comment?.modifierTagSet;
34
+ if (tags?.isInternal() === true) {
35
+ return model.ReleaseTag.Internal;
36
+ }
37
+ if (tags?.isAlpha() === true) {
38
+ return model.ReleaseTag.Alpha;
39
+ }
40
+ if (tags?.isBeta() === true) {
41
+ return model.ReleaseTag.Beta;
42
+ }
43
+ if (tags?.isPublic() === true) {
44
+ return model.ReleaseTag.Public;
45
+ }
46
+ return inherited;
47
+ }
48
+ function readRelease(parser, node, inherited, report) {
49
+ let documented = node;
50
+ if (ast.isVariableDeclaration(node) && ast.isVariableDeclarationList(node.parent) && ast.isVariableStatement(node.parent.parent)) {
51
+ documented = node.parent.parent;
52
+ }
53
+ const comments = ast.getLeadingCommentRanges(documented.getSourceFile().text, documented.pos) ?? [];
54
+ const comment = comments.map(range => documented.getSourceFile().text.slice(range.pos, range.end)).findLast(text => text.startsWith("/**"));
55
+ const parsed = comment === undefined ? undefined : parser.parseString(comment);
56
+ for (const message of parsed?.log.messages ?? []) {
57
+ report(message.messageId, message.text, node, "warning");
58
+ }
59
+ return { releaseTag: releaseTag(parsed?.docComment, inherited), docComment: parsed?.docComment };
60
+ }
61
+ /** Public model constructors retain ownership of identities, parents and overload
62
+ * references. The native adapter owns only compiler observation and projection. */
63
+ export async function createNativePublicApiModel(context, options) {
64
+ const diagnostics = [...await nativeCompilerDiagnostics(context)];
65
+ const configuration = new TSDocConfiguration();
66
+ const parser = new TSDocParser(configuration);
67
+ const descriptors = [];
68
+ const roots = [];
69
+ const bySymbol = new Map();
70
+ const knownRoots = new Set();
71
+ const declarations = new Map();
72
+ const reported = new Set();
73
+ const problem = (id, text, node, severity = "error") => {
74
+ const key = `${id}:${text}:${node?.getSourceFile().fileName ?? ""}:${node?.pos ?? ""}`;
75
+ if (reported.has(key)) {
76
+ return;
77
+ }
78
+ reported.add(key);
79
+ diagnostics.push({ source: "extractor", id, severity, text,
80
+ ...(node === undefined ? {} : { file: node.getSourceFile().fileName, line: node.getSourceFile().getLineAndCharacterOfPosition(node.getStart()).line + 1 }) });
81
+ };
82
+ const addSymbol = async (symbol, name, exported, parent) => {
83
+ const target = await aliased(context, symbol);
84
+ if (await context.checker.isUnknownSymbol(target)) {
85
+ problem("native-unresolved-export", `Cannot resolve export ${name}.`);
86
+ return;
87
+ }
88
+ for (const node of await symbolDeclarations(target)) {
89
+ await addNode(node, name, exported, parent, target);
90
+ }
91
+ };
92
+ const addNode = async (node, name, exported, parent, symbol) => {
93
+ assertNotCancelled(context.signal);
94
+ if (descriptors.length >= 100_000) {
95
+ throw new Error("Native public API model node budget exhausted.");
96
+ }
97
+ if (modifiers(node, ast.SyntaxKind.PrivateKeyword) || node.name?.kind === ast.SyntaxKind.PrivateIdentifier) {
98
+ return;
99
+ }
100
+ const doc = readRelease(parser, node, parent?.releaseTag ?? model.ReleaseTag.Public, problem);
101
+ if (doc.releaseTag === model.ReleaseTag.Internal && options.untrimmedObservation !== true) {
102
+ return;
103
+ }
104
+ const siblings = parent?.children ?? roots;
105
+ const merging = [ast.SyntaxKind.InterfaceDeclaration, ast.SyntaxKind.ModuleDeclaration, ast.SyntaxKind.SourceFile].includes(node.kind);
106
+ const existing = merging ? siblings.find(item => item.name === name && item.node.kind === node.kind && item.symbol?.id === symbol?.id) : undefined;
107
+ if (existing !== undefined) {
108
+ if (hasDeclarationHeader(node)) {
109
+ problem("native-merged-header", "Merged declaration headers require an unambiguous native projection.", node);
110
+ }
111
+ await addMembers(node, existing);
112
+ return;
113
+ }
114
+ // Getter/setter pairs are one property in the public model. The getter is
115
+ // the canonical declaration when both are present; setter-only properties
116
+ // retain their actual declaration and parameter type.
117
+ if (await setterWithGetter(context, node, name)) {
118
+ return;
119
+ }
120
+ const descriptor = { node, name, symbol, exported, ...doc, children: [], parent, overloadIndex: countOverload(siblings, node, name), canonicalReference: "" };
121
+ siblings.push(descriptor);
122
+ descriptors.push(descriptor);
123
+ if (symbol !== undefined) {
124
+ const values = bySymbol.get(symbol.id) ?? [];
125
+ values.push(descriptor);
126
+ bySymbol.set(symbol.id, values);
127
+ }
128
+ await addMembers(node, descriptor);
129
+ };
130
+ const addMembers = async (node, parent) => {
131
+ if (ast.isModuleDeclaration(node) || ast.isSourceFile(node)) {
132
+ const symbol = await context.checker.getSymbolAtLocation(ast.isSourceFile(node) ? node : node.name);
133
+ if (symbol === undefined) {
134
+ problem("native-namespace-binding", "Cannot bind the namespace declaration.", node);
135
+ return;
136
+ }
137
+ for (const child of await context.checker.getExportsOfModule(symbol)) {
138
+ await addSymbol(child, child.name, true, parent);
139
+ }
140
+ }
141
+ else if (ast.isClassDeclaration(node) || ast.isInterfaceDeclaration(node) || ast.isEnumDeclaration(node)) {
142
+ for (const member of node.members) {
143
+ if (member.kind === ast.SyntaxKind.SemicolonClassElement) {
144
+ continue;
145
+ }
146
+ const named = member;
147
+ const name = named.name === undefined ? "" : ast.isIdentifier(named.name) || ast.isStringLiteral(named.name) || ast.isNumericLiteral(named.name) ? named.name.text : await context.emitter.printNode(named.name);
148
+ const symbol = named.name === undefined ? undefined : await context.checker.getSymbolAtLocation(named.name);
149
+ await addNode(named, name, true, parent, symbol);
150
+ }
151
+ }
152
+ };
153
+ const source = await context.program.getSourceFile(options.entryPointPath);
154
+ const sourceSymbol = source === undefined ? undefined : await context.checker.getSymbolAtLocation(source);
155
+ if (sourceSymbol === undefined) {
156
+ throw new Error("Native public API entrypoint must be a declaration module.");
157
+ }
158
+ if (source?.statements.some(statement => ast.isExportAssignment(statement) && statement.isExportEquals) === true) {
159
+ problem("native-export-assignment", "CommonJS export assignment requires an explicit native API projection.", source);
160
+ }
161
+ for (const exported of await context.checker.getExportsOfModule(sourceSymbol)) {
162
+ const target = await aliased(context, exported);
163
+ knownRoots.add((await symbolRoot(context, target)).id);
164
+ await addSymbol(target, exported.name, true);
165
+ }
166
+ const addHidden = async (root) => {
167
+ let name = root.name;
168
+ let suffix = 2;
169
+ while (roots.some(candidate => candidate.name === name)) {
170
+ name = `${root.name}_${suffix++}`;
171
+ }
172
+ await addSymbol(root, name, false);
173
+ };
174
+ // Retain hidden dependencies for audit while production continues to reject
175
+ // forgotten exports. ECMAScript symbol brands retain the upstream exemption.
176
+ for (let index = 0; index < descriptors.length; index++) {
177
+ const descriptor = descriptors[index];
178
+ for (const node of await representedDeclarations(context, descriptor)) {
179
+ for (const occurrence of await references(context, node, problem)) {
180
+ const root = await symbolRoot(context, occurrence.symbol);
181
+ const declaration = (await symbolDeclarations(root))[0];
182
+ if (declaration === undefined || await context.program.isSourceFileDefaultLibrary(declaration.getSourceFile())) {
183
+ continue;
184
+ }
185
+ const owner = packageNameFor(context, declaration);
186
+ if (owner !== undefined && owner !== options.packageName) {
187
+ continue;
188
+ }
189
+ if (knownRoots.has(root.id) || bySymbol.get(root.id)?.some(publicDescriptor) === true) {
190
+ continue;
191
+ }
192
+ if (!await uniqueSymbol(root)) {
193
+ problem("ae-forgotten-export", `The symbol "${root.name}" needs to be exported by the entry point.`, descriptor.node);
194
+ }
195
+ knownRoots.add(root.id);
196
+ if (options.includeForgottenExports) {
197
+ await addHidden(root);
198
+ }
199
+ }
200
+ }
201
+ }
202
+ const instantiate = async (descriptor, bind) => {
203
+ const excerpts = [];
204
+ for (const node of await representedDeclarations(context, descriptor)) {
205
+ const boundReferences = [];
206
+ if (bind) {
207
+ for (const occurrence of await references(context, node, problem)) {
208
+ const matches = bySymbol.get(occurrence.symbol.id) ?? [];
209
+ const canonicalReference = matches.find(candidate => candidate.name === occurrence.node.getText())?.canonicalReference ?? matches[0]?.canonicalReference ?? await externalReference(context, occurrence, options.packageName, problem);
210
+ if (canonicalReference !== undefined && canonicalReference.length > 0) {
211
+ boundReferences.push({ start: occurrence.start, end: occurrence.end, canonicalReference });
212
+ }
213
+ }
214
+ }
215
+ excerpts.push(await createNativeExcerpt(context, { ...descriptor, node }, boundReferences));
216
+ }
217
+ const projected = combineNativeExcerpts(excerpts);
218
+ return createNativeApiItem(context, descriptor, projected);
219
+ };
220
+ const build = async (bind) => {
221
+ const apiModel = new model.ApiModel();
222
+ const apiPackage = new model.ApiPackage({ name: options.packageName, docComment: undefined, tsdocConfiguration: configuration });
223
+ const entry = new model.ApiEntryPoint({ name: "" });
224
+ apiModel.addMember(apiPackage);
225
+ apiPackage.addMember(entry);
226
+ const append = async (descriptor, parent) => {
227
+ const item = await instantiate(descriptor, bind);
228
+ parent.addMember(item);
229
+ descriptor.canonicalReference = item.canonicalReference.toString();
230
+ declarations.set(descriptor.canonicalReference, descriptor.node);
231
+ if (descriptor.children.length > 0) {
232
+ if (!model.ApiItemContainerMixin.isBaseClassOf(item)) {
233
+ throw new Error("Native model item cannot own declarations.");
234
+ }
235
+ for (const child of descriptor.children) {
236
+ await append(child, item);
237
+ }
238
+ }
239
+ };
240
+ for (const descriptor of roots) {
241
+ await append(descriptor, entry);
242
+ }
243
+ return { model: apiModel, apiPackage };
244
+ };
245
+ const unbound = await build(false);
246
+ const result = options.referenceProjection === "stored-surface" ? unbound : await build(true);
247
+ assertNotCancelled(context.signal);
248
+ return { ...result, diagnostics, succeeded: !diagnostics.some(diagnostic => diagnostic.severity === "error"), declarationBindings: declarations };
249
+ }
250
+ //# sourceMappingURL=native-public-api-model.js.map