@wildo-ai/saas-specifications 1.1.1 → 1.1.3

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 (633) hide show
  1. package/dist/esm/_core/brand/brand-asset.schemas.d.ts +4 -6
  2. package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
  4. package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
  6. package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
  7. package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
  8. package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
  9. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
  10. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  11. package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
  12. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  13. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  14. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  15. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  16. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  17. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  18. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +15 -5
  19. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  20. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +40 -3
  21. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  22. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +85 -6
  23. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  24. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  25. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  26. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  27. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  28. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  29. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +10 -4
  30. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  31. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +15 -0
  32. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  33. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  34. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  35. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  36. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  37. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  38. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  39. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  40. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  41. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  42. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  43. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  44. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  45. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +178 -2
  46. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  47. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +115 -9
  48. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  49. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  50. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  51. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  52. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  53. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  54. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  55. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  56. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  57. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  58. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  59. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  60. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  61. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  62. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  63. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  64. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  65. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  66. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  67. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  68. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  69. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  70. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
  71. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  72. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +6 -13
  73. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  74. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts +0 -11
  75. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
  76. package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
  77. package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
  78. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
  79. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
  80. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +1 -2
  81. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
  82. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  83. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  84. package/dist/esm/_core/family-aspects.registry.js +60 -0
  85. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  86. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  87. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  88. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  89. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  90. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  91. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  92. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  93. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  94. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  95. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
  96. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js +17 -4
  97. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
  98. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  99. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  100. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  101. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  102. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  103. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  104. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  105. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  106. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  107. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  108. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  109. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  110. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  111. package/dist/esm/_core/index.d.ts +3 -0
  112. package/dist/esm/_core/index.d.ts.map +1 -1
  113. package/dist/esm/_core/index.js +3 -0
  114. package/dist/esm/_core/index.js.map +1 -1
  115. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  116. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
  117. package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
  118. package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
  119. package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
  120. package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
  121. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  122. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  123. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  124. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  125. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  126. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  127. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  128. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  129. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  130. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
  131. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +11 -5
  132. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
  133. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +66 -9
  134. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  135. package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
  136. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  137. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  138. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  139. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  140. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  141. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +4 -1
  142. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  143. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
  144. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  145. package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
  146. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
  147. package/dist/esm/_core/provider-specification.schemas.js +144 -0
  148. package/dist/esm/_core/provider-specification.schemas.js.map +1 -0
  149. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
  150. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -8
  151. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
  152. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
  153. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
  154. package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
  155. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  156. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  157. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  158. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  159. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  160. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  161. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  162. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
  163. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +7 -2
  164. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
  165. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
  166. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
  167. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
  168. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  169. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  170. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  171. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  172. package/dist/esm/_core/utils/family-ref-stamping.d.ts +64 -0
  173. package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
  174. package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
  175. package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
  176. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
  177. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
  178. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
  179. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  180. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  181. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  182. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  183. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -4
  184. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
  185. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +193 -38
  186. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  187. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +157 -57
  188. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  189. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +3 -3
  190. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
  191. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
  192. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  193. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  194. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  195. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  196. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  197. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  198. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  199. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  200. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  201. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  202. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  203. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  204. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +18 -6
  205. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  206. package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
  207. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  208. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +101 -85
  209. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  210. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +171 -86
  211. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  212. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  213. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  214. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  215. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  216. package/dist/esm/application-creation.exports.d.ts +11 -0
  217. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  218. package/dist/esm/application-creation.exports.js +11 -0
  219. package/dist/esm/application-creation.exports.js.map +1 -1
  220. package/dist/esm/assurance/application-document-publication.schemas.d.ts +20 -6
  221. package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
  222. package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
  223. package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
  224. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +999 -2
  225. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  226. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2127 -61
  227. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  228. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +26 -0
  229. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  230. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  231. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  232. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  233. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  234. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  235. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  236. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  237. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +36 -0
  238. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
  239. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
  240. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
  241. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  242. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  243. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  244. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  245. package/dist/esm/assurance/assurance-foundation.schemas.d.ts +43 -0
  246. package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
  247. package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
  248. package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
  249. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +78 -1
  250. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  251. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +562 -5
  252. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  253. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +148 -0
  254. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  255. package/dist/esm/assurance/assurance-program-generation.schemas.js +385 -0
  256. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  257. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  258. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  259. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  260. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  261. package/dist/esm/assurance/assurance-program.schemas.d.ts +474 -14
  262. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  263. package/dist/esm/assurance/assurance-program.schemas.js +319 -8
  264. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  265. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  266. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  267. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  268. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  269. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  270. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  271. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  272. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  273. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
  274. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
  275. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
  276. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
  277. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  278. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  279. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  280. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  281. package/dist/esm/assurance.exports.d.ts +2 -0
  282. package/dist/esm/assurance.exports.d.ts.map +1 -1
  283. package/dist/esm/assurance.exports.js +2 -0
  284. package/dist/esm/assurance.exports.js.map +1 -1
  285. package/dist/esm/companion-exports.d.ts +26 -8
  286. package/dist/esm/companion-exports.d.ts.map +1 -1
  287. package/dist/esm/companion-exports.js.map +1 -1
  288. package/dist/esm/engine/_bootstrap.js +3 -1
  289. package/dist/esm/engine/_bootstrap.js.map +1 -1
  290. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +15 -1
  292. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  294. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +4 -2
  295. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  296. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +2 -0
  297. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  298. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +17 -3
  299. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  300. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  301. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +12 -10
  302. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  303. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  304. package/dist/esm/engine/applications/resources/applications.resource.specification.js +4 -2
  305. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  306. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  307. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  308. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  309. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  310. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  311. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  312. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +3 -1
  313. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  314. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  315. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +15 -1
  316. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  317. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +2 -0
  318. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  319. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +17 -3
  320. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  321. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
  322. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
  323. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
  324. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
  325. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  326. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  327. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +6 -4
  328. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  329. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  330. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +4 -2
  331. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  332. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  333. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +8 -6
  334. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  335. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  336. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +11 -9
  337. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  338. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  339. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +8 -6
  340. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  341. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +9 -25
  342. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  343. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +106 -10
  344. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  345. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -6
  346. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  347. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  348. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  349. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
  350. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
  351. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
  352. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
  353. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  354. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +6 -3
  356. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  358. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  359. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +4 -2
  360. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  361. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  362. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  363. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +5 -3
  364. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  365. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  366. package/dist/esm/engine/billing/resources/prices.resource.specification.js +10 -8
  367. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  368. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  369. package/dist/esm/engine/billing/resources/products.resource.specification.js +10 -8
  370. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  371. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  372. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +16 -12
  373. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  374. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  375. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +10 -8
  376. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  377. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  378. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  379. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +8 -3
  380. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  381. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +13 -9
  382. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  383. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +30 -11
  384. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  385. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  386. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +10 -8
  387. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  388. package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
  389. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  390. package/dist/esm/engine/engine-resource-specifications.registry.js +11 -2
  391. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  392. package/dist/esm/engine/engine-resource-sub-domain.d.ts +83 -0
  393. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  394. package/dist/esm/engine/engine-resource-sub-domain.js +153 -0
  395. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  396. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/errors/error-messages.specification.js +44 -1
  398. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  399. package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
  400. package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
  401. package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
  402. package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
  403. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/features/resources/application-features.resource.specification.js +5 -3
  405. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +5 -3
  408. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  409. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  410. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  411. package/dist/esm/engine/features/resources/user-features.resource.specification.js +5 -3
  412. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  413. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  414. package/dist/esm/engine/files/resources/files.resource.specification.js +12 -10
  415. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  416. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  417. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  418. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +22 -10
  419. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  420. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  421. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  422. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +6 -4
  423. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  424. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  425. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  426. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +4 -2
  427. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  428. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  429. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  430. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  431. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  432. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
  433. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
  434. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
  435. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
  436. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
  437. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
  438. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
  439. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
  440. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  441. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  442. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  443. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
  444. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
  445. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
  446. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
  447. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
  448. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
  449. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
  450. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
  451. package/dist/esm/engine/frontend-components/index.d.ts +0 -2
  452. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  453. package/dist/esm/engine/frontend-components/index.js +4 -6
  454. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  455. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  456. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  457. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +15 -12
  458. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  459. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  460. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  461. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +12 -9
  462. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  463. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +9 -1
  464. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  465. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +9 -6
  466. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  467. package/dist/esm/engine/index.d.ts +2 -0
  468. package/dist/esm/engine/index.d.ts.map +1 -1
  469. package/dist/esm/engine/index.js +2 -0
  470. package/dist/esm/engine/index.js.map +1 -1
  471. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  472. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +19 -17
  473. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  474. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  475. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +9 -7
  476. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  477. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  478. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +10 -8
  479. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  480. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +7 -2
  481. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  482. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +12 -5
  483. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  484. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  485. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +22 -15
  486. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  487. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  488. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  489. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +14 -10
  490. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  491. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  492. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +31 -6
  493. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  494. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  495. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  496. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +11 -9
  497. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  498. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  499. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +5 -3
  500. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  501. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  502. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +6 -4
  503. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  504. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  505. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +4 -2
  506. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  507. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  508. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +3 -1
  509. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  510. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  511. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  512. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  513. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  514. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +9 -7
  515. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  516. package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
  517. package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
  518. package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
  519. package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
  520. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
  521. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
  522. package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
  523. package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
  524. package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
  525. package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
  526. package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
  527. package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
  528. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
  529. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
  530. package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
  531. package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
  532. package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
  533. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
  534. package/dist/esm/engine/providers/github.provider.specification.js +30 -0
  535. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
  536. package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
  537. package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
  538. package/dist/esm/engine/providers/google.provider.specification.js +34 -0
  539. package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
  540. package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
  541. package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
  542. package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
  543. package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
  544. package/dist/esm/engine/providers/index.d.ts +23 -0
  545. package/dist/esm/engine/providers/index.d.ts.map +1 -0
  546. package/dist/esm/engine/providers/index.js +37 -0
  547. package/dist/esm/engine/providers/index.js.map +1 -0
  548. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
  549. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
  550. package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
  551. package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
  552. package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
  553. package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
  554. package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
  555. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
  556. package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
  557. package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
  558. package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
  559. package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
  560. package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
  561. package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
  562. package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
  563. package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
  564. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
  565. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
  566. package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
  567. package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
  568. package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
  569. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
  570. package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
  571. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
  572. package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
  573. package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
  574. package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
  575. package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
  576. package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
  577. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
  578. package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
  579. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
  580. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  581. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +9 -7
  582. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  583. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  584. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  585. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +11 -9
  586. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  587. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  588. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  589. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +4 -2
  590. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  591. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  592. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  593. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +10 -8
  594. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  595. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +5 -5
  596. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  597. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +6 -4
  598. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  599. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  600. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  601. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +4 -2
  602. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  603. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +5 -5
  604. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  605. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +15 -11
  606. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  607. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  608. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  609. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +3 -1
  610. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  611. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  612. package/dist/esm/engine/users/resources/user-self.resource.specification.js +11 -9
  613. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  614. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  615. package/dist/esm/engine/users/resources/users.resource.specification.js +95 -0
  616. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  617. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  618. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  619. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +451 -25
  620. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  621. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -1
  622. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
  623. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +37 -1
  624. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  625. package/dist/tsconfig.build.tsbuildinfo +1 -0
  626. package/package.json +8 -8
  627. package/dist/esm/.builder.pid +0 -9
  628. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  629. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  630. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  631. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  632. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  633. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"placement-plan-generation.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OA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AAE,uBAAuB,CAAC,WAAW;gBAC3C,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,SAAS,EAAE,QAAQ,CAAC,SAAS;aAC9B,CACJ,CAAC;KACH,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport {\n PLACEMENT_DECISION_REF_PREFIX,\n PlacementDecisionOrigin,\n PlacementAddressSchema,\n PlacementDisposition,\n PlacementGroupSchema,\n PlacementPlanSchema,\n PlacementPlanVersion,\n PlacementSubjectSchema,\n type PlacementPlan,\n} from './placement-plan.schemas';\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * Strict provider-facing placement decision. The provider supplies a stable\n * semantic slug; the trusted runtime stamps the canonical decision-ref prefix\n * and the payload version.\n *\n * No file path, config key, label string or runtime control is representable\n * here — by construction, not by instruction. The plan decides WHERE and WHY;\n * the coding agent that authors `settings-hub.config.ts` decides HOW, guided by\n * the `settings-placement-authoring` skill.\n *\n * Neither is `origin`, and that omission is load-bearing rather than incidental.\n * A panel run IS the panel's judgement, so the runtime stamps `DELIBERATED`\n * below; representing the field here would let a provider declare its own output\n * a human revision, which is a claim no model is in a position to make. Same\n * split, and the same reason, as `decisionRef` and `version`.\n */\nexport const PlacementDecisionGenerationSchema = z.discriminatedUnion('disposition', [\n z.strictObject({\n slug: SlugSchema,\n disposition: z.literal(PlacementDisposition.PLACED),\n subject: PlacementSubjectSchema,\n address: PlacementAddressSchema,\n rationale: NonEmptyStringSchema,\n }),\n z.strictObject({\n slug: SlugSchema,\n disposition: z.literal(PlacementDisposition.DECLINED),\n subject: PlacementSubjectSchema,\n rationale: NonEmptyStringSchema,\n }),\n]);\nexport type PlacementDecisionGeneration = z.infer<typeof PlacementDecisionGenerationSchema>;\n\n/** One complete provider response for the placement-plan family. */\nexport const PlacementPlanGenerationSchema = z.strictObject({\n groups: z.array(PlacementGroupSchema),\n decisions: z.array(PlacementDecisionGenerationSchema).min(1),\n}).superRefine((generated, context) => {\n const seen = new Set<string>();\n generated.decisions.forEach((decision, index) => {\n if (seen.has(decision.slug)) {\n context.addIssue({ code: 'custom', message: `duplicate placement decision slug \"${decision.slug}\"`, path: ['decisions', index, 'slug'] });\n }\n seen.add(decision.slug);\n });\n});\nexport type PlacementPlanGeneration = z.infer<typeof PlacementPlanGenerationSchema>;\n\n/**\n * Normalize strict provider output into the persisted family (stamping refs and\n * version).\n *\n * This is also the REVISION producer's output shape in a deliberation round:\n * a placement candidate is regenerated through this exact schema, the same way\n * a text candidate is regenerated through `DeliberationTextRevisionOutputStrictSchema`.\n */\nexport function parsePlacementPlanGeneration(input: unknown): PlacementPlan {\n const generated = PlacementPlanGenerationSchema.parse(input);\n return PlacementPlanSchema.parse({\n version: PlacementPlanVersion.V1,\n groups: generated.groups,\n decisions: generated.decisions.map((decision) => (\n decision.disposition === PlacementDisposition.PLACED\n ? {\n decisionRef: `${PLACEMENT_DECISION_REF_PREFIX}${decision.slug}`,\n disposition: decision.disposition,\n origin: PlacementDecisionOrigin.DELIBERATED,\n subject: decision.subject,\n address: decision.address,\n rationale: decision.rationale,\n }\n : {\n decisionRef: `${PLACEMENT_DECISION_REF_PREFIX}${decision.slug}`,\n disposition: decision.disposition,\n origin: PlacementDecisionOrigin.DELIBERATED,\n subject: decision.subject,\n rationale: decision.rationale,\n }\n )),\n });\n}\n"]}
1
+ {"version":3,"file":"placement-plan-generation.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GAEvB,MAAM,0B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BACjC,MAAM,EAAE,uBAAuB,CAAC,WAAW;gBAC3C,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,SAAS,EAAE,QAAQ,CAAC,SAAS;aAC9B,CACJ,CAAC;KACH,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { applyFamilyRefPrefix } from '../utils/family-ref-stamping';\nimport {\n PLACEMENT_DECISION_REF_PREFIX,\n PlacementDecisionOrigin,\n PlacementAddressSchema,\n PlacementDisposition,\n PlacementGroupSchema,\n PlacementPlanSchema,\n PlacementPlanVersion,\n PlacementSubjectSchema,\n type PlacementPlan,\n} from './placement-plan.schemas';\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * Strict provider-facing placement decision. The provider supplies a stable\n * semantic slug; the trusted runtime stamps the canonical decision-ref prefix\n * and the payload version.\n *\n * No file path, config key, label string or runtime control is representable\n * here — by construction, not by instruction. The plan decides WHERE and WHY;\n * the coding agent that authors `settings-hub.config.ts` decides HOW, guided by\n * the `settings-placement-authoring` skill.\n *\n * Neither is `origin`, and that omission is load-bearing rather than incidental.\n * A panel run IS the panel's judgement, so the runtime stamps `DELIBERATED`\n * below; representing the field here would let a provider declare its own output\n * a human revision, which is a claim no model is in a position to make. Same\n * split, and the same reason, as `decisionRef` and `version`.\n */\nexport const PlacementDecisionGenerationSchema = z.discriminatedUnion('disposition', [\n z.strictObject({\n slug: SlugSchema,\n disposition: z.literal(PlacementDisposition.PLACED),\n subject: PlacementSubjectSchema,\n address: PlacementAddressSchema,\n rationale: NonEmptyStringSchema,\n }),\n z.strictObject({\n slug: SlugSchema,\n disposition: z.literal(PlacementDisposition.DECLINED),\n subject: PlacementSubjectSchema,\n rationale: NonEmptyStringSchema,\n }),\n]);\nexport type PlacementDecisionGeneration = z.infer<typeof PlacementDecisionGenerationSchema>;\n\n/** One complete provider response for the placement-plan family. */\nexport const PlacementPlanGenerationSchema = z.strictObject({\n groups: z.array(PlacementGroupSchema),\n decisions: z.array(PlacementDecisionGenerationSchema).min(1),\n}).superRefine((generated, context) => {\n // Keyed on the STAMPED form, not on the authored slug, because `applyFamilyRefPrefix` is deliberately\n // not injective: `billing` and `placement-billing` are two distinct slugs that both become\n // `placement-billing`. Checking the slug would let that pair through and produce two decisions sharing\n // one ref, which makes `priorDecisionRef` -- the revision lineage -- point at either of them.\n const seen = new Set<string>();\n generated.decisions.forEach((decision, index) => {\n const decisionRef = applyFamilyRefPrefix(decision.slug, PLACEMENT_DECISION_REF_PREFIX);\n if (seen.has(decisionRef)) {\n context.addIssue({ code: 'custom', message: `duplicate placement decision slug \"${decision.slug}\" (normalizes to \"${decisionRef}\")`, path: ['decisions', index, 'slug'] });\n }\n seen.add(decisionRef);\n });\n});\nexport type PlacementPlanGeneration = z.infer<typeof PlacementPlanGenerationSchema>;\n\n/**\n * Normalize strict provider output into the persisted family (stamping refs and\n * version).\n *\n * This is also the REVISION producer's output shape in a deliberation round:\n * a placement candidate is regenerated through this exact schema, the same way\n * a text candidate is regenerated through `DeliberationTextRevisionOutputStrictSchema`.\n */\nexport function parsePlacementPlanGeneration(input: unknown): PlacementPlan {\n const generated = PlacementPlanGenerationSchema.parse(input);\n return PlacementPlanSchema.parse({\n version: PlacementPlanVersion.V1,\n groups: generated.groups,\n decisions: generated.decisions.map((decision) => (\n decision.disposition === PlacementDisposition.PLACED\n ? {\n decisionRef: applyFamilyRefPrefix(decision.slug, PLACEMENT_DECISION_REF_PREFIX),\n disposition: decision.disposition,\n origin: PlacementDecisionOrigin.DELIBERATED,\n subject: decision.subject,\n address: decision.address,\n rationale: decision.rationale,\n }\n : {\n decisionRef: applyFamilyRefPrefix(decision.slug, PLACEMENT_DECISION_REF_PREFIX),\n disposition: decision.disposition,\n origin: PlacementDecisionOrigin.DELIBERATED,\n subject: decision.subject,\n rationale: decision.rationale,\n }\n )),\n });\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { type PlacementPlan, type PlacementSubject } from './placement-plan.schemas';
1
+ import { PlacementSubjectKind, type PlacementPlan, type PlacementSubject } from './placement-plan.schemas';
2
2
  /** Deterministic finding over a placement plan; authoring coherence beyond structural validity. */
3
3
  export declare enum PlacementPlanFindingCode {
4
4
  /** One subject placed twice on the SAME surface — the two placements contradict each other. */
@@ -32,26 +32,83 @@ export interface PlacementPlanFinding {
32
32
  readonly message: string;
33
33
  }
34
34
  /**
35
- * The identity of a subject, for duplicate + coverage comparison. Stable and
36
- * total over the union, so adding a subject kind is a compile error here rather
35
+ * The identity of a subject WITHIN its own kind — the id a catalog of that kind
36
+ * addresses it by, and nothing more.
37
+ *
38
+ * Split out of {@link placementSubjectKey} so a catalog can be handed to
39
+ * {@link validatePlacementPlan} in the exact shape its owner already publishes:
40
+ * the engine's settings catalog exports a set of bare `destinationRef` strings,
41
+ * and requiring a caller to re-spell those as `KIND::ref` would be a second
42
+ * spelling of an identity this module already owns — the classic place two
43
+ * copies drift.
44
+ *
45
+ * Total over the union, so adding a subject kind is a compile error here rather
37
46
  * than a silent hole in the duplicate check.
38
47
  */
48
+ export declare function placementSubjectLocalKey(subject: PlacementSubject): string;
49
+ /**
50
+ * The identity of a subject ACROSS kinds, for duplicate + coverage comparison.
51
+ * Composed from {@link placementSubjectLocalKey} so the two views of one
52
+ * identity cannot disagree.
53
+ */
39
54
  export declare function placementSubjectKey(subject: PlacementSubject): string;
55
+ /**
56
+ * What a caller CLAIMS TO KNOW, per subject kind — and only per subject kind.
57
+ *
58
+ * ## Why this is a per-kind map rather than one universe
59
+ *
60
+ * `UNKNOWN_SUBJECT` is a HARD FLOOR (`PLACEMENT_PLAN_HARD_FLOOR_CODES`): it refuses a landing. So a
61
+ * caller that supplies a universe is asserting *"everything outside this does not exist"*, and that
62
+ * assertion has to be true of every subject kind the plan can name — a settings destination, a
63
+ * resource operation, and an app view.
64
+ *
65
+ * No single catalog spans those three. The one that exists — `ENGINE_SETTINGS_DESTINATION_REFS` in
66
+ * the frontend package — covers ONE. Handing it to a validator that took one flat set would not have
67
+ * activated the floor; it would have made the floor FIRE ON EVERY RESOURCE OPERATION AND APP VIEW,
68
+ * refusing every realistic placement plan. A partial universe presented as a total one is worse than
69
+ * no universe at all, and the flat parameter made that mistake the natural one to make.
70
+ *
71
+ * So the shape carries the scope of the claim: a kind that is ABSENT from this map is not checked in
72
+ * either direction, and a kind that is PRESENT is checked in both — an undecided known subject is
73
+ * `SUBJECT_NOT_DECIDED`, and a decision naming something outside the set is `UNKNOWN_SUBJECT`. A
74
+ * present-but-EMPTY set is a real and different claim ("this application has none"), which is why
75
+ * absence rather than emptiness marks the uncovered case.
76
+ *
77
+ * Values are {@link placementSubjectLocalKey} outputs — bare ids, as their own catalog publishes
78
+ * them, never `KIND::id`.
79
+ */
80
+ export type KnownPlacementSubjectUniverse = Partial<Readonly<Record<PlacementSubjectKind, ReadonlySet<string>>>>;
40
81
  /**
41
82
  * Validate what Zod cannot.
42
83
  *
43
- * `knownSubjectKeys` is OPTIONAL and carries the coverage question. `_core`
84
+ * `knownSubjects` is OPTIONAL and carries the coverage question. `_core`
44
85
  * deliberately does not import the engine settings catalog (that would invert
45
86
  * the layering: `saas-specifications` must not depend on `saas-frontend-lib`),
46
- * so the caller that HOLDS the catalog — the companion — supplies the universe
47
- * and gets `SUBJECT_NOT_DECIDED` / `UNKNOWN_SUBJECT`. Omit it and those two
48
- * checks simply do not run, which is honest: a validator that cannot see the
49
- * catalog must not report a clean coverage result.
87
+ * so a caller that HOLDS a catalog supplies it — per kind, see
88
+ * {@link KnownPlacementSubjectUniverse} — and gets `SUBJECT_NOT_DECIDED` /
89
+ * `UNKNOWN_SUBJECT` for exactly the kinds it claimed. Omit it, or omit a kind,
90
+ * and those two checks do not run for what was not claimed, which is honest: a
91
+ * validator that cannot see a catalog must not report a clean coverage result.
92
+ *
93
+ * ## Nobody supplies one today, and the reason is a package boundary
94
+ *
95
+ * The only production caller is the app-creation semantic authority
96
+ * (`application-specification-semantic-authority.application-creation.service.ts`), a BACKEND-side
97
+ * package that depends on `saas-backend-lib` and must not grow a dependency on
98
+ * `saas-frontend-lib`, which is where `ENGINE_SETTINGS_DESTINATION_REFS` — the one catalog that
99
+ * exists — lives. An older revision of this comment named the companion as that caller; the
100
+ * companion can reach the catalog but has never called this validator at all.
101
+ *
102
+ * So `UNKNOWN_SUBJECT` is presently a declared floor that cannot fire, and this parameter is the
103
+ * half of the wiring `_core` can honestly own. What is missing is a HOLDER, not a shape. Note the
104
+ * defect it guards is caught downstream regardless: `verifySettingsHubContent` refuses an unknown
105
+ * destination ref at DEV startup, on the config a build task authors from this plan. Making the plan
106
+ * refuse it earlier is the improvement, not the only line of defence.
50
107
  *
51
108
  * Returns findings rather than throwing so a caller can treat a duplicate
52
109
  * placement as a hard floor and an empty group as an authoring warning.
53
110
  */
54
- export declare function validatePlacementPlan(plan: PlacementPlan, knownSubjectKeys?: ReadonlySet<string>): readonly PlacementPlanFinding[];
111
+ export declare function validatePlacementPlan(plan: PlacementPlan, knownSubjects?: KnownPlacementSubjectUniverse): readonly PlacementPlanFinding[];
55
112
  /** The finding codes that must block a landing; everything else is an authoring warning. */
56
113
  export declare const PLACEMENT_PLAN_HARD_FLOOR_CODES: readonly PlacementPlanFindingCode[];
57
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"placement-plan-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAElC,mGAAmG;AACnG,oBAAY,wBAAwB;IAClC,+FAA+F;IAC/F,8BAA8B,mCAAmC;IACjE,2GAA2G;IAC3G,WAAW,gBAAgB;IAC3B,gHAAgH;IAChH,eAAe,oBAAoB;IACnC,6FAA6F;IAC7F,mBAAmB,wBAAwB;IAC3C,yEAAyE;IACzE,eAAe,oBAAoB;IACnC;;;;;;;;;;;;OAYG;IACH,sCAAsC,2CAA2C;CAClF;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CASrE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,aAAa,EACnB,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACrC,SAAS,oBAAoB,EAAE,CAqFjC;AAED,4FAA4F;AAC5F,eAAO,MAAM,+BAA+B,EAAE,SAAS,wBAAwB,EAG9E,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,iHAAiH;IACjH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,gFAAgF;IAChF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,QAAQ,EAAE,aAAa,GACtB,SAAS,yBAAyB,EAAE,CAgBtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,+BAA+B,CAAC,sBAAsB,EAAE,MAAM,GAAG,MAAM,EAAE,CAWxF"}
1
+ {"version":3,"file":"placement-plan-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,oBAAoB,EACpB,KAAK,aAAa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AM,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,gFAAgF;IAChF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,QAAQ,EAAE,aAAa,GACtB,SAAS,yBAAyB,EAAE,CAgBtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,+BAA+B,CAAC,sBAAsB,EAAE,MAAM,GAAG,MAAM,EAAE,CAWxF"}
@@ -28,35 +28,68 @@ export var PlacementPlanFindingCode;
28
28
  PlacementPlanFindingCode["REVISION_RESTATES_SUPERSEDED_RATIONALE"] = "REVISION_RESTATES_SUPERSEDED_RATIONALE";
29
29
  })(PlacementPlanFindingCode || (PlacementPlanFindingCode = {}));
30
30
  /**
31
- * The identity of a subject, for duplicate + coverage comparison. Stable and
32
- * total over the union, so adding a subject kind is a compile error here rather
31
+ * The identity of a subject WITHIN its own kind — the id a catalog of that kind
32
+ * addresses it by, and nothing more.
33
+ *
34
+ * Split out of {@link placementSubjectKey} so a catalog can be handed to
35
+ * {@link validatePlacementPlan} in the exact shape its owner already publishes:
36
+ * the engine's settings catalog exports a set of bare `destinationRef` strings,
37
+ * and requiring a caller to re-spell those as `KIND::ref` would be a second
38
+ * spelling of an identity this module already owns — the classic place two
39
+ * copies drift.
40
+ *
41
+ * Total over the union, so adding a subject kind is a compile error here rather
33
42
  * than a silent hole in the duplicate check.
34
43
  */
35
- export function placementSubjectKey(subject) {
44
+ export function placementSubjectLocalKey(subject) {
36
45
  switch (subject.kind) {
37
46
  case PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION:
38
- return `${subject.kind}::${subject.destinationRef}`;
47
+ return subject.destinationRef;
39
48
  case PlacementSubjectKind.RESOURCE_OPERATION:
40
- return `${subject.kind}::${subject.moduleRef}/${subject.resourceRef}::${subject.operation}`;
49
+ return `${subject.moduleRef}/${subject.resourceRef}::${subject.operation}`;
41
50
  case PlacementSubjectKind.APP_VIEW:
42
- return `${subject.kind}::${subject.viewRef}`;
51
+ return subject.viewRef;
43
52
  }
44
53
  }
54
+ /**
55
+ * The identity of a subject ACROSS kinds, for duplicate + coverage comparison.
56
+ * Composed from {@link placementSubjectLocalKey} so the two views of one
57
+ * identity cannot disagree.
58
+ */
59
+ export function placementSubjectKey(subject) {
60
+ return `${subject.kind}::${placementSubjectLocalKey(subject)}`;
61
+ }
45
62
  /**
46
63
  * Validate what Zod cannot.
47
64
  *
48
- * `knownSubjectKeys` is OPTIONAL and carries the coverage question. `_core`
65
+ * `knownSubjects` is OPTIONAL and carries the coverage question. `_core`
49
66
  * deliberately does not import the engine settings catalog (that would invert
50
67
  * the layering: `saas-specifications` must not depend on `saas-frontend-lib`),
51
- * so the caller that HOLDS the catalog — the companion — supplies the universe
52
- * and gets `SUBJECT_NOT_DECIDED` / `UNKNOWN_SUBJECT`. Omit it and those two
53
- * checks simply do not run, which is honest: a validator that cannot see the
54
- * catalog must not report a clean coverage result.
68
+ * so a caller that HOLDS a catalog supplies it — per kind, see
69
+ * {@link KnownPlacementSubjectUniverse} — and gets `SUBJECT_NOT_DECIDED` /
70
+ * `UNKNOWN_SUBJECT` for exactly the kinds it claimed. Omit it, or omit a kind,
71
+ * and those two checks do not run for what was not claimed, which is honest: a
72
+ * validator that cannot see a catalog must not report a clean coverage result.
73
+ *
74
+ * ## Nobody supplies one today, and the reason is a package boundary
75
+ *
76
+ * The only production caller is the app-creation semantic authority
77
+ * (`application-specification-semantic-authority.application-creation.service.ts`), a BACKEND-side
78
+ * package that depends on `saas-backend-lib` and must not grow a dependency on
79
+ * `saas-frontend-lib`, which is where `ENGINE_SETTINGS_DESTINATION_REFS` — the one catalog that
80
+ * exists — lives. An older revision of this comment named the companion as that caller; the
81
+ * companion can reach the catalog but has never called this validator at all.
82
+ *
83
+ * So `UNKNOWN_SUBJECT` is presently a declared floor that cannot fire, and this parameter is the
84
+ * half of the wiring `_core` can honestly own. What is missing is a HOLDER, not a shape. Note the
85
+ * defect it guards is caught downstream regardless: `verifySettingsHubContent` refuses an unknown
86
+ * destination ref at DEV startup, on the config a build task authors from this plan. Making the plan
87
+ * refuse it earlier is the improvement, not the only line of defence.
55
88
  *
56
89
  * Returns findings rather than throwing so a caller can treat a duplicate
57
90
  * placement as a hard floor and an empty group as an authoring warning.
58
91
  */
59
- export function validatePlacementPlan(plan, knownSubjectKeys) {
92
+ export function validatePlacementPlan(plan, knownSubjects) {
60
93
  const findings = [];
61
94
  // ── Duplicate placements on one surface, and order collisions within a group ──
62
95
  const seenOnSurface = new Set();
@@ -115,25 +148,34 @@ export function validatePlacementPlan(plan, knownSubjectKeys) {
115
148
  message: `Decision "${decision.decisionRef}" is REVISED but its superseded rationale repeats the new one verbatim — the record satisfies the schema and tells a reader nothing about what changed.`,
116
149
  });
117
150
  }
118
- // ── Coverage, only when the caller supplied the universe ──
119
- if (knownSubjectKeys !== undefined) {
151
+ // ── Coverage, only for the kinds the caller claimed to know ──
152
+ if (knownSubjects !== undefined) {
120
153
  const decided = new Set(plan.decisions.map((decision) => placementSubjectKey(decision.subject)));
121
- for (const known of knownSubjectKeys) {
122
- if (!decided.has(known)) {
154
+ for (const [kind, localKeys] of Object.entries(knownSubjects)) {
155
+ if (localKeys === undefined)
156
+ continue;
157
+ for (const localKey of localKeys) {
158
+ if (decided.has(`${kind}::${localKey}`))
159
+ continue;
123
160
  findings.push({
124
161
  code: PlacementPlanFindingCode.SUBJECT_NOT_DECIDED,
125
162
  decisionRef: null,
126
- message: `Subject "${known}" exists but the plan neither places nor declines it — the decision was never taken.`,
163
+ message: `Subject "${kind}::${localKey}" exists but the plan neither places nor declines it — the decision was never taken.`,
127
164
  });
128
165
  }
129
166
  }
130
167
  for (const decision of plan.decisions) {
131
- const subjectKey = placementSubjectKey(decision.subject);
132
- if (!knownSubjectKeys.has(subjectKey)) {
168
+ // A kind the caller did not claim is not checked: silence there is the ABSENCE of a claim, and
169
+ // treating it as "does not exist" would make this floor refuse every plan whose subjects reach
170
+ // past the one catalog anyone actually holds.
171
+ const localKeys = knownSubjects[decision.subject.kind];
172
+ if (localKeys === undefined)
173
+ continue;
174
+ if (!localKeys.has(placementSubjectLocalKey(decision.subject))) {
133
175
  findings.push({
134
176
  code: PlacementPlanFindingCode.UNKNOWN_SUBJECT,
135
177
  decisionRef: decision.decisionRef,
136
- message: `Decision "${decision.decisionRef}" names subject "${subjectKey}", which does not exist.`,
178
+ message: `Decision "${decision.decisionRef}" names subject "${placementSubjectKey(decision.subject)}", which does not exist.`,
137
179
  });
138
180
  }
139
181
  }
@@ -1 +1 @@
1
- {"version":3,"file":"placement-plan-validation.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GAGrB,MAAM,0BAA0B,CAAC;AAElC,mGAAmG;AACnG,MAAM,CAAN,IAAY,wBAyBX;AAzBD,WAAY,wBAAwB;IAClC,+FAA+F;IAC/F,6FAAiE,CAAA;IACjE,2GAA2G;IAC3G,uDAA2B,CAAA;IAC3B,gHAAgH;IAChH,+DAAmC,CAAA;IACnC,6FAA6F;IAC7F,uEAA2C,CAAA;IAC3C,yEAAyE;IACzE,+DAAmC,CAAA;IACnC;;;;;;;;;;;;OAYG;IACH,6GAAiF,CAAA;AACnF,CAAC,EAzBW,wBAAwB,KAAxB,wBAAwB,QAyBnC;AAQD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAyB;IAC3D,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,oBAAoB,CAAC,2BAA2B;YACnD,OAAO,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC;QACtD,KAAK,oBAAoB,CAAC,kB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SAAS;QACpC,mBAAmB,EAAE,QAAQ,CAAC,UAAU,EAAE,SAAS;KACpD,CAAC,CAAC,CAAC;AACR,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,+BAA+B,CAAC,sBAA8B;IAC5E,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7D,+EAA+E;IAC/E,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACtD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iCAAiC,CAAC;YAAE,SAAS;QACxF,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAClD,IAAI,GAAG,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import {\n PlacementDecisionOrigin,\n PlacementDisposition,\n PlacementSubjectKind,\n type PlacementPlan,\n type PlacementSubject,\n} from './placement-plan.schemas';\n\n/** Deterministic finding over a placement plan; authoring coherence beyond structural validity. */\nexport enum PlacementPlanFindingCode {\n /** One subject placed twice on the SAME surface — the two placements contradict each other. */\n DUPLICATE_PLACEMENT_ON_SURFACE = 'DUPLICATE_PLACEMENT_ON_SURFACE',\n /** A declared group that nothing is placed in — an empty rail group or sidebar section is visual noise. */\n EMPTY_GROUP = 'EMPTY_GROUP',\n /** Two placements share an order within one group, so their rendered sequence is not determined by the plan. */\n ORDER_COLLISION = 'ORDER_COLLISION',\n /** A known subject the plan never decided about — neither placed nor explicitly declined. */\n SUBJECT_NOT_DECIDED = 'SUBJECT_NOT_DECIDED',\n /** A placement names a subject the caller's catalog does not contain. */\n UNKNOWN_SUBJECT = 'UNKNOWN_SUBJECT',\n /**\n * A REVISED decision whose superseded rationale repeats its own, word for word.\n *\n * The schema can require a revision to record what the panel had decided; it cannot require the\n * record to say anything. A verbatim copy is the shape that satisfies the requirement and defeats\n * it — the reader gets two identical paragraphs and still cannot see what changed, which is worse\n * than an honest absence because it LOOKS answered.\n *\n * A warning, never a floor. Two decisions can legitimately land on the same words (a revision that\n * only changed the address, keeping the argument), and refusing that would make the mechanism a\n * ceremony — exactly what `.claude/rules/application-creation-directive.md` says protection must\n * not become at this stage.\n */\n REVISION_RESTATES_SUPERSEDED_RATIONALE = 'REVISION_RESTATES_SUPERSEDED_RATIONALE',\n}\n\nexport interface PlacementPlanFinding {\n readonly code: PlacementPlanFindingCode;\n readonly decisionRef: string | null;\n readonly message: string;\n}\n\n/**\n * The identity of a subject, for duplicate + coverage comparison. Stable and\n * total over the union, so adding a subject kind is a compile error here rather\n * than a silent hole in the duplicate check.\n */\nexport function placementSubjectKey(subject: PlacementSubject): string {\n switch (subject.kind) {\n case PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION:\n return `${subject.kind}::${subject.destinationRef}`;\n case PlacementSubjectKind.RESOURCE_OPERATION:\n return `${subject.kind}::${subject.moduleRef}/${subject.resourceRef}::${subject.operation}`;\n case PlacementSubjectKind.APP_VIEW:\n return `${subject.kind}::${subject.viewRef}`;\n }\n}\n\n/**\n * Validate what Zod cannot.\n *\n * `knownSubjectKeys` is OPTIONAL and carries the coverage question. `_core`\n * deliberately does not import the engine settings catalog (that would invert\n * the layering: `saas-specifications` must not depend on `saas-frontend-lib`),\n * so the caller that HOLDS the catalog — the companion — supplies the universe\n * and gets `SUBJECT_NOT_DECIDED` / `UNKNOWN_SUBJECT`. Omit it and those two\n * checks simply do not run, which is honest: a validator that cannot see the\n * catalog must not report a clean coverage result.\n *\n * Returns findings rather than throwing so a caller can treat a duplicate\n * placement as a hard floor and an empty group as an authoring warning.\n */\nexport function validatePlacementPlan(\n plan: PlacementPlan,\n knownSubjectKeys?: ReadonlySet<string>,\n): readonly PlacementPlanFinding[] {\n const findings: PlacementPlanFinding[] = [];\n\n // ── Duplicate placements on one surface, and order collisions within a group ──\n const seenOnSurface = new Set<string>();\n const seenOrder = new Map<string, string>();\n const populatedGroups = new Set<string>();\n\n for (const decision of plan.decisions) {\n if (decision.disposition !== PlacementDisposition.PLACED) continue;\n const subjectKey = placementSubjectKey(decision.subject);\n const surfaceKey = `${decision.address.surface}::${subjectKey}`;\n if (seenOnSurface.has(surfaceKey)) {\n findings.push({\n code: PlacementPlanFindingCode.DUPLICATE_PLACEMENT_ON_SURFACE,\n decisionRef: decision.decisionRef,\n message: `Subject \"${subjectKey}\" is placed more than once on ${decision.address.surface}.`,\n });\n }\n seenOnSurface.add(surfaceKey);\n\n const groupRef = 'groupRef' in decision.address ? decision.address.groupRef : null;\n if (groupRef !== null) populatedGroups.add(`${decision.address.surface}::${groupRef}`);\n\n const orderKey = `${decision.address.surface}::${groupRef ?? '-'}::${decision.address.order}`;\n const collidesWith = seenOrder.get(orderKey);\n if (collidesWith !== undefined) {\n findings.push({\n code: PlacementPlanFindingCode.ORDER_COLLISION,\n decisionRef: decision.decisionRef,\n message: `Order ${decision.address.order} is used by both \"${collidesWith}\" and \"${decision.decisionRef}\" in the same group, so their rendered sequence is undetermined.`,\n });\n } else {\n seenOrder.set(orderKey, decision.decisionRef);\n }\n }\n\n // ── Declared groups nothing was placed in ──\n for (const group of plan.groups) {\n if (!populatedGroups.has(`${group.surface}::${group.groupRef}`)) {\n findings.push({\n code: PlacementPlanFindingCode.EMPTY_GROUP,\n decisionRef: null,\n message: `Group \"${group.groupRef}\" on ${group.surface} is declared but nothing is placed in it.`,\n });\n }\n }\n\n // ── Revisions that record nothing ──\n for (const decision of plan.decisions) {\n if (decision.origin !== PlacementDecisionOrigin.REVISED) continue;\n if (decision.supersedes === undefined) continue; // the schema already refuses this\n if (decision.supersedes.rationale.trim() !== decision.rationale.trim()) continue;\n findings.push({\n code: PlacementPlanFindingCode.REVISION_RESTATES_SUPERSEDED_RATIONALE,\n decisionRef: decision.decisionRef,\n message: `Decision \"${decision.decisionRef}\" is REVISED but its superseded rationale repeats the new one verbatim — the record satisfies the schema and tells a reader nothing about what changed.`,\n });\n }\n\n // ── Coverage, only when the caller supplied the universe ──\n if (knownSubjectKeys !== undefined) {\n const decided = new Set(plan.decisions.map((decision) => placementSubjectKey(decision.subject)));\n for (const known of knownSubjectKeys) {\n if (!decided.has(known)) {\n findings.push({\n code: PlacementPlanFindingCode.SUBJECT_NOT_DECIDED,\n decisionRef: null,\n message: `Subject \"${known}\" exists but the plan neither places nor declines it — the decision was never taken.`,\n });\n }\n }\n for (const decision of plan.decisions) {\n const subjectKey = placementSubjectKey(decision.subject);\n if (!knownSubjectKeys.has(subjectKey)) {\n findings.push({\n code: PlacementPlanFindingCode.UNKNOWN_SUBJECT,\n decisionRef: decision.decisionRef,\n message: `Decision \"${decision.decisionRef}\" names subject \"${subjectKey}\", which does not exist.`,\n });\n }\n }\n }\n\n return findings;\n}\n\n/** The finding codes that must block a landing; everything else is an authoring warning. */\nexport const PLACEMENT_PLAN_HARD_FLOOR_CODES: readonly PlacementPlanFindingCode[] = [\n PlacementPlanFindingCode.DUPLICATE_PLACEMENT_ON_SURFACE,\n PlacementPlanFindingCode.UNKNOWN_SUBJECT,\n];\n\n/**\n * A human revision a re-run is about to overwrite.\n *\n * Carries the panel argument the revision superseded, because that is the half a reader cannot\n * reconstruct: `git diff` shows the address that changed and never the case it was making, and\n * once the re-run lands, the `supersedes` record is gone from the file.\n */\nexport interface RevertedPlacementRevision {\n /** The decision ref as the PRIOR plan carried it. A re-run mints its own refs, so this is the durable handle. */\n readonly priorDecisionRef: string;\n /** Which subject/surface pair the human had ruled on, in `placementSubjectKey` form. */\n readonly subjectKey: string;\n /** The human's reasoning, from the prior plan. */\n readonly revisedRationale: string;\n /** What the panel had said before the human overruled it, from `supersedes`. */\n readonly supersededRationale: string | undefined;\n}\n\n/**\n * Every `REVISED` decision in `prior` that `incoming` does not preserve.\n *\n * **This does not prevent the overwrite — it removes the SILENCE**, which is the actual harm\n * (issue #142). `parsePlacementPlanGeneration` stamps every generated decision `DELIBERATED` and\n * knows nothing of a prior plan, and landing replaces the artifact wholesale, so a panel re-run\n * reverts every human revision and discards its `supersedes` record. A creator TOLD \"your revision\n * to `billing` was replaced by the panel, which had argued X\" re-applies it in one edit; a creator\n * told nothing discovers it when the rail is wrong.\n *\n * Matched on `placementSubjectKey`, never on `decisionRef`: a re-run mints fresh refs from its own\n * slugs, so ref equality would report every revision as reverted on every run — true by accident and\n * useless. The subject/surface pair is what a human actually ruled on.\n *\n * A revision counts as PRESERVED when the incoming decision for the same subject is itself\n * `REVISED`. That is deliberately generous: the only way a generated plan can carry `REVISED` is a\n * human having written it (the generation schema cannot express `origin`), so its presence means the\n * revision survived a hand-merge rather than being reproduced by the panel. A panel that happens to\n * land on the same address is still a REVERSION — the human decision no longer stands as a decision,\n * only as a coincidence, and the `supersedes` argument is gone either way.\n */\nexport function collectRevertedPlacementRevisions(\n prior: PlacementPlan | undefined,\n incoming: PlacementPlan,\n): readonly RevertedPlacementRevision[] {\n if (prior === undefined) return [];\n const preserved = new Set(\n incoming.decisions\n .filter((decision) => decision.origin === PlacementDecisionOrigin.REVISED)\n .map((decision) => placementSubjectKey(decision.subject)),\n );\n return prior.decisions\n .filter((decision) => decision.origin === PlacementDecisionOrigin.REVISED)\n .filter((decision) => !preserved.has(placementSubjectKey(decision.subject)))\n .map((decision) => ({\n priorDecisionRef: decision.decisionRef,\n subjectKey: placementSubjectKey(decision.subject),\n revisedRationale: decision.rationale,\n supersededRationale: decision.supersedes?.rationale,\n }));\n}\n\n/**\n * The decisions a landing is about to overwrite that a HUMAN had revised.\n *\n * ## Why this exists\n *\n * `origin: REVISED` + `supersedes.rationale` record that a human overrode the\n * panel. A playbook re-run destroys both: `parsePlacementPlanGeneration` stamps\n * every decision `DELIBERATED` and has no knowledge of the prior plan, and\n * landing replaces the file wholesale. So the one field designed to make a human\n * decision legible is reset by the ordinary operation of the system that owns it.\n *\n * That replacement is DELIBERATE — mutation is free and git is the undo\n * (`.claude/rules/application-creation-directive.md`), and acceptance is a human\n * commit, so the loss appears in a diff before it becomes real. What was missing\n * is that it appeared as one flipped enum among many changed lines, with nothing\n * naming it. This does not refuse, does not gate, and does not preserve\n * anything: it makes the loss SAYABLE.\n *\n * It matters more than it looks because the loop can re-select the producing\n * playbook unprompted — its preconditions stay satisfied once the domain plan\n * lands, and there is no generic \"my output already exists\" suppression. The\n * same shape was found live on 2026-08-24, when the loop re-chose\n * `build-decompose` on sound reasoning and overwrote a completed build plan.\n *\n * ## Why it reads TEXT\n *\n * The previous plan exists only as a rendered TypeScript module — landing returns\n * it as `previousContent`, not as a parsed value, and re-parsing a source file to\n * produce a warning would be a heavier mechanism than the warning is worth. Enum\n * values render as `EnumName.MEMBER`, so a REVISED decision is textually\n * unambiguous. A scan can only ever UNDER-report here (a renderer change makes it\n * find nothing, never invent something), which is the safe direction for a report\n * that must not cry wolf.\n */\nexport function findSupersededHumanDecisionRefs(previousRenderedSource: string): string[] {\n const refs: string[] = [];\n const chunks = previousRenderedSource.split('\"decisionRef\"');\n // chunks[0] is everything before the first decision — never a decision itself.\n for (let index = 1; index < chunks.length; index += 1) {\n const chunk = chunks[index];\n if (chunk === undefined || !chunk.includes('PlacementDecisionOrigin.REVISED')) continue;\n const ref = chunk.match(/^\\s*:\\s*\"([^\"]+)\"/)?.[1];\n if (ref !== undefined) refs.push(ref);\n }\n return refs;\n}\n"]}
1
+ {"version":3,"file":"placement-plan-validation.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GAGrB,MAAM,0BAA0B,CAAC;AAElC,mGAAmG;A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,GAAG,sBAAsB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7D,+EAA+E;IAC/E,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACtD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iCAAiC,CAAC;YAAE,SAAS;QACxF,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAClD,IAAI,GAAG,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import {\n PlacementDecisionOrigin,\n PlacementDisposition,\n PlacementSubjectKind,\n type PlacementPlan,\n type PlacementSubject,\n} from './placement-plan.schemas';\n\n/** Deterministic finding over a placement plan; authoring coherence beyond structural validity. */\nexport enum PlacementPlanFindingCode {\n /** One subject placed twice on the SAME surface — the two placements contradict each other. */\n DUPLICATE_PLACEMENT_ON_SURFACE = 'DUPLICATE_PLACEMENT_ON_SURFACE',\n /** A declared group that nothing is placed in — an empty rail group or sidebar section is visual noise. */\n EMPTY_GROUP = 'EMPTY_GROUP',\n /** Two placements share an order within one group, so their rendered sequence is not determined by the plan. */\n ORDER_COLLISION = 'ORDER_COLLISION',\n /** A known subject the plan never decided about — neither placed nor explicitly declined. */\n SUBJECT_NOT_DECIDED = 'SUBJECT_NOT_DECIDED',\n /** A placement names a subject the caller's catalog does not contain. */\n UNKNOWN_SUBJECT = 'UNKNOWN_SUBJECT',\n /**\n * A REVISED decision whose superseded rationale repeats its own, word for word.\n *\n * The schema can require a revision to record what the panel had decided; it cannot require the\n * record to say anything. A verbatim copy is the shape that satisfies the requirement and defeats\n * it — the reader gets two identical paragraphs and still cannot see what changed, which is worse\n * than an honest absence because it LOOKS answered.\n *\n * A warning, never a floor. Two decisions can legitimately land on the same words (a revision that\n * only changed the address, keeping the argument), and refusing that would make the mechanism a\n * ceremony — exactly what `.claude/rules/application-creation-directive.md` says protection must\n * not become at this stage.\n */\n REVISION_RESTATES_SUPERSEDED_RATIONALE = 'REVISION_RESTATES_SUPERSEDED_RATIONALE',\n}\n\nexport interface PlacementPlanFinding {\n readonly code: PlacementPlanFindingCode;\n readonly decisionRef: string | null;\n readonly message: string;\n}\n\n/**\n * The identity of a subject WITHIN its own kind — the id a catalog of that kind\n * addresses it by, and nothing more.\n *\n * Split out of {@link placementSubjectKey} so a catalog can be handed to\n * {@link validatePlacementPlan} in the exact shape its owner already publishes:\n * the engine's settings catalog exports a set of bare `destinationRef` strings,\n * and requiring a caller to re-spell those as `KIND::ref` would be a second\n * spelling of an identity this module already owns — the classic place two\n * copies drift.\n *\n * Total over the union, so adding a subject kind is a compile error here rather\n * than a silent hole in the duplicate check.\n */\nexport function placementSubjectLocalKey(subject: PlacementSubject): string {\n switch (subject.kind) {\n case PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION:\n return subject.destinationRef;\n case PlacementSubjectKind.RESOURCE_OPERATION:\n return `${subject.moduleRef}/${subject.resourceRef}::${subject.operation}`;\n case PlacementSubjectKind.APP_VIEW:\n return subject.viewRef;\n }\n}\n\n/**\n * The identity of a subject ACROSS kinds, for duplicate + coverage comparison.\n * Composed from {@link placementSubjectLocalKey} so the two views of one\n * identity cannot disagree.\n */\nexport function placementSubjectKey(subject: PlacementSubject): string {\n return `${subject.kind}::${placementSubjectLocalKey(subject)}`;\n}\n\n/**\n * What a caller CLAIMS TO KNOW, per subject kind — and only per subject kind.\n *\n * ## Why this is a per-kind map rather than one universe\n *\n * `UNKNOWN_SUBJECT` is a HARD FLOOR (`PLACEMENT_PLAN_HARD_FLOOR_CODES`): it refuses a landing. So a\n * caller that supplies a universe is asserting *\"everything outside this does not exist\"*, and that\n * assertion has to be true of every subject kind the plan can name — a settings destination, a\n * resource operation, and an app view.\n *\n * No single catalog spans those three. The one that exists — `ENGINE_SETTINGS_DESTINATION_REFS` in\n * the frontend package — covers ONE. Handing it to a validator that took one flat set would not have\n * activated the floor; it would have made the floor FIRE ON EVERY RESOURCE OPERATION AND APP VIEW,\n * refusing every realistic placement plan. A partial universe presented as a total one is worse than\n * no universe at all, and the flat parameter made that mistake the natural one to make.\n *\n * So the shape carries the scope of the claim: a kind that is ABSENT from this map is not checked in\n * either direction, and a kind that is PRESENT is checked in both — an undecided known subject is\n * `SUBJECT_NOT_DECIDED`, and a decision naming something outside the set is `UNKNOWN_SUBJECT`. A\n * present-but-EMPTY set is a real and different claim (\"this application has none\"), which is why\n * absence rather than emptiness marks the uncovered case.\n *\n * Values are {@link placementSubjectLocalKey} outputs — bare ids, as their own catalog publishes\n * them, never `KIND::id`.\n */\nexport type KnownPlacementSubjectUniverse = Partial<Readonly<Record<PlacementSubjectKind, ReadonlySet<string>>>>;\n\n/**\n * Validate what Zod cannot.\n *\n * `knownSubjects` is OPTIONAL and carries the coverage question. `_core`\n * deliberately does not import the engine settings catalog (that would invert\n * the layering: `saas-specifications` must not depend on `saas-frontend-lib`),\n * so a caller that HOLDS a catalog supplies it — per kind, see\n * {@link KnownPlacementSubjectUniverse} — and gets `SUBJECT_NOT_DECIDED` /\n * `UNKNOWN_SUBJECT` for exactly the kinds it claimed. Omit it, or omit a kind,\n * and those two checks do not run for what was not claimed, which is honest: a\n * validator that cannot see a catalog must not report a clean coverage result.\n *\n * ## Nobody supplies one today, and the reason is a package boundary\n *\n * The only production caller is the app-creation semantic authority\n * (`application-specification-semantic-authority.application-creation.service.ts`), a BACKEND-side\n * package that depends on `saas-backend-lib` and must not grow a dependency on\n * `saas-frontend-lib`, which is where `ENGINE_SETTINGS_DESTINATION_REFS` — the one catalog that\n * exists — lives. An older revision of this comment named the companion as that caller; the\n * companion can reach the catalog but has never called this validator at all.\n *\n * So `UNKNOWN_SUBJECT` is presently a declared floor that cannot fire, and this parameter is the\n * half of the wiring `_core` can honestly own. What is missing is a HOLDER, not a shape. Note the\n * defect it guards is caught downstream regardless: `verifySettingsHubContent` refuses an unknown\n * destination ref at DEV startup, on the config a build task authors from this plan. Making the plan\n * refuse it earlier is the improvement, not the only line of defence.\n *\n * Returns findings rather than throwing so a caller can treat a duplicate\n * placement as a hard floor and an empty group as an authoring warning.\n */\nexport function validatePlacementPlan(\n plan: PlacementPlan,\n knownSubjects?: KnownPlacementSubjectUniverse,\n): readonly PlacementPlanFinding[] {\n const findings: PlacementPlanFinding[] = [];\n\n // ── Duplicate placements on one surface, and order collisions within a group ──\n const seenOnSurface = new Set<string>();\n const seenOrder = new Map<string, string>();\n const populatedGroups = new Set<string>();\n\n for (const decision of plan.decisions) {\n if (decision.disposition !== PlacementDisposition.PLACED) continue;\n const subjectKey = placementSubjectKey(decision.subject);\n const surfaceKey = `${decision.address.surface}::${subjectKey}`;\n if (seenOnSurface.has(surfaceKey)) {\n findings.push({\n code: PlacementPlanFindingCode.DUPLICATE_PLACEMENT_ON_SURFACE,\n decisionRef: decision.decisionRef,\n message: `Subject \"${subjectKey}\" is placed more than once on ${decision.address.surface}.`,\n });\n }\n seenOnSurface.add(surfaceKey);\n\n const groupRef = 'groupRef' in decision.address ? decision.address.groupRef : null;\n if (groupRef !== null) populatedGroups.add(`${decision.address.surface}::${groupRef}`);\n\n const orderKey = `${decision.address.surface}::${groupRef ?? '-'}::${decision.address.order}`;\n const collidesWith = seenOrder.get(orderKey);\n if (collidesWith !== undefined) {\n findings.push({\n code: PlacementPlanFindingCode.ORDER_COLLISION,\n decisionRef: decision.decisionRef,\n message: `Order ${decision.address.order} is used by both \"${collidesWith}\" and \"${decision.decisionRef}\" in the same group, so their rendered sequence is undetermined.`,\n });\n } else {\n seenOrder.set(orderKey, decision.decisionRef);\n }\n }\n\n // ── Declared groups nothing was placed in ──\n for (const group of plan.groups) {\n if (!populatedGroups.has(`${group.surface}::${group.groupRef}`)) {\n findings.push({\n code: PlacementPlanFindingCode.EMPTY_GROUP,\n decisionRef: null,\n message: `Group \"${group.groupRef}\" on ${group.surface} is declared but nothing is placed in it.`,\n });\n }\n }\n\n // ── Revisions that record nothing ──\n for (const decision of plan.decisions) {\n if (decision.origin !== PlacementDecisionOrigin.REVISED) continue;\n if (decision.supersedes === undefined) continue; // the schema already refuses this\n if (decision.supersedes.rationale.trim() !== decision.rationale.trim()) continue;\n findings.push({\n code: PlacementPlanFindingCode.REVISION_RESTATES_SUPERSEDED_RATIONALE,\n decisionRef: decision.decisionRef,\n message: `Decision \"${decision.decisionRef}\" is REVISED but its superseded rationale repeats the new one verbatim — the record satisfies the schema and tells a reader nothing about what changed.`,\n });\n }\n\n // ── Coverage, only for the kinds the caller claimed to know ──\n if (knownSubjects !== undefined) {\n const decided = new Set(plan.decisions.map((decision) => placementSubjectKey(decision.subject)));\n for (const [kind, localKeys] of Object.entries(knownSubjects) as readonly (readonly [PlacementSubjectKind, ReadonlySet<string> | undefined])[]) {\n if (localKeys === undefined) continue;\n for (const localKey of localKeys) {\n if (decided.has(`${kind}::${localKey}`)) continue;\n findings.push({\n code: PlacementPlanFindingCode.SUBJECT_NOT_DECIDED,\n decisionRef: null,\n message: `Subject \"${kind}::${localKey}\" exists but the plan neither places nor declines it — the decision was never taken.`,\n });\n }\n }\n for (const decision of plan.decisions) {\n // A kind the caller did not claim is not checked: silence there is the ABSENCE of a claim, and\n // treating it as \"does not exist\" would make this floor refuse every plan whose subjects reach\n // past the one catalog anyone actually holds.\n const localKeys = knownSubjects[decision.subject.kind];\n if (localKeys === undefined) continue;\n if (!localKeys.has(placementSubjectLocalKey(decision.subject))) {\n findings.push({\n code: PlacementPlanFindingCode.UNKNOWN_SUBJECT,\n decisionRef: decision.decisionRef,\n message: `Decision \"${decision.decisionRef}\" names subject \"${placementSubjectKey(decision.subject)}\", which does not exist.`,\n });\n }\n }\n }\n\n return findings;\n}\n\n/** The finding codes that must block a landing; everything else is an authoring warning. */\nexport const PLACEMENT_PLAN_HARD_FLOOR_CODES: readonly PlacementPlanFindingCode[] = [\n PlacementPlanFindingCode.DUPLICATE_PLACEMENT_ON_SURFACE,\n PlacementPlanFindingCode.UNKNOWN_SUBJECT,\n];\n\n/**\n * A human revision a re-run is about to overwrite.\n *\n * Carries the panel argument the revision superseded, because that is the half a reader cannot\n * reconstruct: `git diff` shows the address that changed and never the case it was making, and\n * once the re-run lands, the `supersedes` record is gone from the file.\n */\nexport interface RevertedPlacementRevision {\n /** The decision ref as the PRIOR plan carried it. A re-run mints its own refs, so this is the durable handle. */\n readonly priorDecisionRef: string;\n /** Which subject/surface pair the human had ruled on, in `placementSubjectKey` form. */\n readonly subjectKey: string;\n /** The human's reasoning, from the prior plan. */\n readonly revisedRationale: string;\n /** What the panel had said before the human overruled it, from `supersedes`. */\n readonly supersededRationale: string | undefined;\n}\n\n/**\n * Every `REVISED` decision in `prior` that `incoming` does not preserve.\n *\n * **This does not prevent the overwrite — it removes the SILENCE**, which is the actual harm\n * (issue #142). `parsePlacementPlanGeneration` stamps every generated decision `DELIBERATED` and\n * knows nothing of a prior plan, and landing replaces the artifact wholesale, so a panel re-run\n * reverts every human revision and discards its `supersedes` record. A creator TOLD \"your revision\n * to `billing` was replaced by the panel, which had argued X\" re-applies it in one edit; a creator\n * told nothing discovers it when the rail is wrong.\n *\n * Matched on `placementSubjectKey`, never on `decisionRef`: a re-run mints fresh refs from its own\n * slugs, so ref equality would report every revision as reverted on every run — true by accident and\n * useless. The subject/surface pair is what a human actually ruled on.\n *\n * A revision counts as PRESERVED when the incoming decision for the same subject is itself\n * `REVISED`. That is deliberately generous: the only way a generated plan can carry `REVISED` is a\n * human having written it (the generation schema cannot express `origin`), so its presence means the\n * revision survived a hand-merge rather than being reproduced by the panel. A panel that happens to\n * land on the same address is still a REVERSION — the human decision no longer stands as a decision,\n * only as a coincidence, and the `supersedes` argument is gone either way.\n */\nexport function collectRevertedPlacementRevisions(\n prior: PlacementPlan | undefined,\n incoming: PlacementPlan,\n): readonly RevertedPlacementRevision[] {\n if (prior === undefined) return [];\n const preserved = new Set(\n incoming.decisions\n .filter((decision) => decision.origin === PlacementDecisionOrigin.REVISED)\n .map((decision) => placementSubjectKey(decision.subject)),\n );\n return prior.decisions\n .filter((decision) => decision.origin === PlacementDecisionOrigin.REVISED)\n .filter((decision) => !preserved.has(placementSubjectKey(decision.subject)))\n .map((decision) => ({\n priorDecisionRef: decision.decisionRef,\n subjectKey: placementSubjectKey(decision.subject),\n revisedRationale: decision.rationale,\n supersededRationale: decision.supersedes?.rationale,\n }));\n}\n\n/**\n * The decisions a landing is about to overwrite that a HUMAN had revised.\n *\n * ## Why this exists\n *\n * `origin: REVISED` + `supersedes.rationale` record that a human overrode the\n * panel. A playbook re-run destroys both: `parsePlacementPlanGeneration` stamps\n * every decision `DELIBERATED` and has no knowledge of the prior plan, and\n * landing replaces the file wholesale. So the one field designed to make a human\n * decision legible is reset by the ordinary operation of the system that owns it.\n *\n * That replacement is DELIBERATE — mutation is free and git is the undo\n * (`.claude/rules/application-creation-directive.md`), and acceptance is a human\n * commit, so the loss appears in a diff before it becomes real. What was missing\n * is that it appeared as one flipped enum among many changed lines, with nothing\n * naming it. This does not refuse, does not gate, and does not preserve\n * anything: it makes the loss SAYABLE.\n *\n * It matters more than it looks because the loop can re-select the producing\n * playbook unprompted — its preconditions stay satisfied once the domain plan\n * lands, and there is no generic \"my output already exists\" suppression. The\n * same shape was found live on 2026-08-24, when the loop re-chose\n * `build-decompose` on sound reasoning and overwrote a completed build plan.\n *\n * ## Why it reads TEXT\n *\n * The previous plan exists only as a rendered TypeScript module — landing returns\n * it as `previousContent`, not as a parsed value, and re-parsing a source file to\n * produce a warning would be a heavier mechanism than the warning is worth. Enum\n * values render as `EnumName.MEMBER`, so a REVISED decision is textually\n * unambiguous. A scan can only ever UNDER-report here (a renderer change makes it\n * find nothing, never invent something), which is the safe direction for a report\n * that must not cry wolf.\n */\nexport function findSupersededHumanDecisionRefs(previousRenderedSource: string): string[] {\n const refs: string[] = [];\n const chunks = previousRenderedSource.split('\"decisionRef\"');\n // chunks[0] is everything before the first decision — never a decision itself.\n for (let index = 1; index < chunks.length; index += 1) {\n const chunk = chunks[index];\n if (chunk === undefined || !chunk.includes('PlacementDecisionOrigin.REVISED')) continue;\n const ref = chunk.match(/^\\s*:\\s*\"([^\"]+)\"/)?.[1];\n if (ref !== undefined) refs.push(ref);\n }\n return refs;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { FamilyAspectsDeclaration } from '../family-aspects.schemas';
2
+ export declare const PLACEMENT_PLAN_FAMILY_ASPECTS: FamilyAspectsDeclaration;
3
+ //# sourceMappingURL=placement-plan.family-aspects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement-plan.family-aspects.d.ts","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan.family-aspects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAI1E,eAAO,MAAM,6BAA6B,EAAE,wBA0B3C,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { ApplicationSpecificationFamilySemanticSchemaRef } from '../../application-creation/application-specification-family-identity.application-creation.schemas.js';
2
+ import { FamilyAspectKind } from '../family-aspects.schemas.js';
3
+ import { PlacementGroupSchema, PlacementDecisionSchema } from './placement-plan.schemas.js';
4
+ export const PLACEMENT_PLAN_FAMILY_ASPECTS = {
5
+ schemaRef: ApplicationSpecificationFamilySemanticSchemaRef.PLACEMENT_PLAN,
6
+ aspects: [
7
+ {
8
+ key: 'placement.group',
9
+ snapshotPath: 'groups',
10
+ kind: FamilyAspectKind.COLLECTION,
11
+ itemSchema: PlacementGroupSchema,
12
+ businessKey: 'groupRef',
13
+ headlineField: 'purpose',
14
+ edges: [],
15
+ },
16
+ {
17
+ key: 'placement.decision',
18
+ snapshotPath: 'decisions',
19
+ kind: FamilyAspectKind.COLLECTION,
20
+ // A discriminated union (PLACED | DECLINED) — the drift pins read its MERGED shape.
21
+ itemSchema: PlacementDecisionSchema,
22
+ businessKey: 'decisionRef',
23
+ headlineField: 'rationale',
24
+ edges: [
25
+ // Where a PLACED decision lands: the address object's groupRef (absent on DECLINED).
26
+ { field: 'address', throughField: 'groupRef', targetAspects: ['placement.group'] },
27
+ ],
28
+ },
29
+ ],
30
+ };
31
+ //# sourceMappingURL=placement-plan.family-aspects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement-plan.family-aspects.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan.family-aspects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+CAA+C,EAAE,MAAM,mGAAmG,CAAC;AAEpK,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEzF,MAAM,CAAC,MAAM,6BAA6B,GAA6B;IACrE,SAAS,EAAE,+CAA+C,CAAC,cAAc;IACzE,OAAO,EAAE;QACP;YACE,GAAG,EAAE,iBAAiB;YACtB,YAAY,EAAE,QAAQ;YACtB,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,UAAU,EAAE,oBAAoB;YAChC,WAAW,EAAE,UAAU;YACvB,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,EAAE;SACV;QACD;YACE,GAAG,EAAE,oBAAoB;YACzB,YAAY,EAAE,WAAW;YACzB,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,oFAAoF;YACpF,UAAU,EAAE,uBAAuB;YACnC,WAAW,EAAE,aAAa;YAC1B,aAAa,EAAE,WAAW;YAC1B,KAAK,EAAE;gBACL,qFAAqF;gBACrF,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,iBAAiB,CAAC,EAAE;aACnF;SACF;KACF;CACF,CAAC","sourcesContent":["import { ApplicationSpecificationFamilySemanticSchemaRef } from '../../application-creation/application-specification-family-identity.application-creation.schemas';\nimport type { FamilyAspectsDeclaration } from '../family-aspects.schemas';\nimport { FamilyAspectKind } from '../family-aspects.schemas';\nimport { PlacementGroupSchema, PlacementDecisionSchema } from './placement-plan.schemas';\n\nexport const PLACEMENT_PLAN_FAMILY_ASPECTS: FamilyAspectsDeclaration = {\n schemaRef: ApplicationSpecificationFamilySemanticSchemaRef.PLACEMENT_PLAN,\n aspects: [\n {\n key: 'placement.group',\n snapshotPath: 'groups',\n kind: FamilyAspectKind.COLLECTION,\n itemSchema: PlacementGroupSchema,\n businessKey: 'groupRef',\n headlineField: 'purpose',\n edges: [],\n },\n {\n key: 'placement.decision',\n snapshotPath: 'decisions',\n kind: FamilyAspectKind.COLLECTION,\n // A discriminated union (PLACED | DECLINED) — the drift pins read its MERGED shape.\n itemSchema: PlacementDecisionSchema,\n businessKey: 'decisionRef',\n headlineField: 'rationale',\n edges: [\n // Where a PLACED decision lands: the address object's groupRef (absent on DECLINED).\n { field: 'address', throughField: 'groupRef', targetAspects: ['placement.group'] },\n ],\n },\n ],\n};\n"]}
@@ -40,7 +40,10 @@ export declare enum PlacementSubjectKind {
40
40
  * `SettingsDestination.ref` (the engine catalog's id). The catalog itself
41
41
  * lives in the frontend package; `_core` deliberately does not import it, so
42
42
  * ref EXISTENCE is checked by the caller that holds the catalog — see
43
- * `validatePlacementPlan`'s `knownSubjectRefs`.
43
+ * `validatePlacementPlan`'s `knownSubjects` (this parameter was named
44
+ * `knownSubjectRefs` in an earlier draft and never existed under that name,
45
+ * which made the pointer ungreppable; no caller supplies one yet, and
46
+ * `validatePlacementPlan` records why).
44
47
  */
45
48
  ENGINE_SETTINGS_DESTINATION = "ENGINE_SETTINGS_DESTINATION",
46
49
  /** A resource operation surface the application owns (its LIST, its READ, a custom verb). */
@@ -1 +1 @@
1
- {"version":3,"file":"placement-plan.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan.schemas.ts"],"names":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;;;;;;GAqBG;AACH,oBAAY,uBAAuB;IACjC,oEAAoE;IACpE,WAAW,gBAAgB;IAC3B,oIAAoI;IACpI,OAAO,YAAY;CACpB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC;IAC5C,uEAAuE;;kBAEvE,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;IAEhC,0DAA0D;;;IAG1D,gGAAgG;;;;;;;;;QAzIhG,iFAAiF;;;;;;;;QAuCjF,mEAAmE;;;;;QAMnE,4DAA4D;;;;;;;;;;IAgG5D,qFAAqF;;IAErF,0FAA0F;;QA5B5F,uEAAuE;;;;;;;;;;;;;;QAnHrE,iFAAiF;;;;;;IAuJjF,8DAA8D;;;QApChE,uEAAuE;;;mCAqEvE,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB;;;;QAvL9B,mDAAmD;;QAEnD,2EAA2E;;QAE3E,+DAA+D;;;;QA4G7D,0DAA0D;;;QAG1D,gGAAgG;;;;;;;;;YAzIhG,iFAAiF;;;;;;;;YAuCjF,mEAAmE;;;;;YAMnE,4DAA4D;;;;;;;;;;QAgG5D,qFAAqF;;QAErF,0FAA0F;;YA5B5F,uEAAuE;;;;;;;;;;;;;;YAnHrE,iFAAiF;;;;;;QAuJjF,8DAA8D;;;YApChE,uEAAuE;;;;iBAsIvE,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,mDAAmD"}
1
+ {"version":3,"file":"placement-plan.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan.schemas.ts"],"names":[],"mappings":"A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AqBG;AACH,oBAAY,uBAAuB;IACjC,oEAAoE;IACpE,WAAW,gBAAgB;IAC3B,oIAAoI;IACpI,OAAO,YAAY;CACpB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC;IAC5C,uEAAuE;;kBAEvE,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;IAEhC,0DAA0D;;;IAG1D,gGAAgG;;;;;;;;;QAzIhG,iFAAiF;;;;;;;;QAuCjF,mEAAmE;;;;;QAMnE,4DAA4D;;;;;;;;;;IAgG5D,qFAAqF;;IAErF,0FAA0F;;QA5B5F,uEAAuE;;;;;;;;;;;;;;QAnHrE,iFAAiF;;;;;;IAuJjF,8DAA8D;;;QApChE,uEAAuE;;;mCAqEvE,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB;;;;QAvL9B,mDAAmD;;QAEnD,2EAA2E;;QAE3E,+DAA+D;;;;QA4G7D,0DAA0D;;;QAG1D,gGAAgG;;;;;;;;;YAzIhG,iFAAiF;;;;;;;;YAuCjF,mEAAmE;;;;;YAMnE,4DAA4D;;;;;;;;;;QAgG5D,qFAAqF;;QAErF,0FAA0F;;YA5B5F,uEAAuE;;;;;;;;;;;;;;YAnHrE,iFAAiF;;;;;;QAuJjF,8DAA8D;;;YApChE,uEAAuE;;;;iBAsIvE,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,mDAAmD"}
@@ -46,7 +46,10 @@ export var PlacementSubjectKind;
46
46
  * `SettingsDestination.ref` (the engine catalog's id). The catalog itself
47
47
  * lives in the frontend package; `_core` deliberately does not import it, so
48
48
  * ref EXISTENCE is checked by the caller that holds the catalog — see
49
- * `validatePlacementPlan`'s `knownSubjectRefs`.
49
+ * `validatePlacementPlan`'s `knownSubjects` (this parameter was named
50
+ * `knownSubjectRefs` in an earlier draft and never existed under that name,
51
+ * which made the pointer ungreppable; no caller supplies one yet, and
52
+ * `validatePlacementPlan` records why).
50
53
  */
51
54
  PlacementSubjectKind["ENGINE_SETTINGS_DESTINATION"] = "ENGINE_SETTINGS_DESTINATION";
52
55
  /** A resource operation surface the application owns (its LIST, its READ, a custom verb). */
@@ -1 +1 @@
1
- {"version":3,"file":"placement-plan.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED,4HAA4H;AAC5H,MAAM,CAAC,MAAM,6BAA6B,GAAG,YAAY,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,iGAAiG;IACjG,iDAA6B,CAAA;IAC7B,+FAA+F;IAC/F,uCAAmB,CAAA;IACnB,8DAA8D;IAC9D,2CAAuB,CAAA;IACvB,mGAAmG;IACnG,iDAA6B,CAAA;AAC/B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED,4GAA4G;AAC5G,MAAM,CAAC,MAAM,0BAA0B,GAAgC;IACrE,gBAAgB,CAAC,YAAY;IAC7B,gBAAgB,CAAC,OAAO;CACzB,CAAC;AAEF,4BAA4B;AAC5B,MAAM,CAAN,IAAY,oBAaX;AAbD,WAAY,oBAAoB;IAC9B;;;;;;OAMG;IACH,mFAA2D,CAAA;IAC3D,6FAA6F;IAC7F,iEAAyC,CAAA;IACz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AAI,EAAE,QAAQ;gBACd,OAAO,EAAE,cAAc,QAAQ,CAAC,WAAW,kBAAkB,OAAO,CAAC,QAAQ,mDAAmD,OAAO,CAAC,OAAO,EAAE;gBACjJ,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC;aAClD,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,mDAAmD","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start placement-plan.config facet:layer:specification facet:family:placement-plan\n *\n * Versioning for the placement-plan payload format itself. `V1` — initial\n * shape (declared groups + one decision per subject). The shape grows\n * additively across versions; `version` is the explicit marker for consumers\n * that branch on era.\n */\nexport enum PlacementPlanVersion {\n V1 = 'v1',\n}\n\n/** Stable prefix every placement decision ref carries; the trusted runtime stamps it, a provider supplies only the slug. */\nexport const PLACEMENT_DECISION_REF_PREFIX = 'placement-';\n\n/**\n * WHICH shell surface a subject is placed on — a closed vocabulary, because\n * each member names a different authoring file with a different vocabulary,\n * and the dispatching coding agent derives which skill and which file from it.\n *\n * Deliberately NOT merged into one \"navigation surface\" bucket: a settings\n * placement names a rail CATEGORY, a sidebar placement names a sidebar\n * SECTION, and the two are different concepts that happen to both be groups.\n */\nexport enum PlacementSurface {\n /** The settings hub rail (`frontend/src/config/settings-hub.config.ts`). Grouped by category. */\n SETTINGS_HUB = 'SETTINGS_HUB',\n /** The application sidebar (`appShellConfig[SIDEBAR].contentSections`). Grouped by section. */\n SIDEBAR = 'SIDEBAR',\n /** The user dropdown's settings entries. Flat — no groups. */\n USER_MENU = 'USER_MENU',\n /** The command palette (Cmd+K). Flat — its `category` is a search facet, not a placement group. */\n COMMAND_MENU = 'COMMAND_MENU',\n}\n\n/** The surfaces whose placements MUST name a declared group. The other members are flat by construction. */\nexport const GROUPED_PLACEMENT_SURFACES: readonly PlacementSurface[] = [\n PlacementSurface.SETTINGS_HUB,\n PlacementSurface.SIDEBAR,\n];\n\n/** WHAT is being placed. */\nexport enum PlacementSubjectKind {\n /**\n * An engine-owned settings destination, named by its\n * `SettingsDestination.ref` (the engine catalog's id). The catalog itself\n * lives in the frontend package; `_core` deliberately does not import it, so\n * ref EXISTENCE is checked by the caller that holds the catalog — see\n * `validatePlacementPlan`'s `knownSubjectRefs`.\n */\n ENGINE_SETTINGS_DESTINATION = 'ENGINE_SETTINGS_DESTINATION',\n /** A resource operation surface the application owns (its LIST, its READ, a custom verb). */\n RESOURCE_OPERATION = 'RESOURCE_OPERATION',\n /** An application-scoped view (composite, chart, execution, full-custom). */\n APP_VIEW = 'APP_VIEW',\n}\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\nexport const PlacementSubjectSchema = z.discriminatedUnion('kind', [\n z.strictObject({\n kind: z.literal(PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION),\n destinationRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(PlacementSubjectKind.RESOURCE_OPERATION),\n moduleRef: SlugSchema,\n resourceRef: SlugSchema,\n /** The operation this placement surfaces (`list`, `read`, a custom verb ref). */\n operation: NonEmptyStringSchema,\n }),\n z.strictObject({\n kind: z.literal(PlacementSubjectKind.APP_VIEW),\n viewRef: SlugSchema,\n }),\n]);\nexport type PlacementSubject = z.infer<typeof PlacementSubjectSchema>;\n\n/**\n * A container the plan decides should exist on a grouped surface — a settings\n * rail category, or a sidebar section.\n *\n * `purpose` is prose, and it is load-bearing rather than decorative: it is what\n * grounds the generated `settings_hub.categories.<ref>.label` /\n * `sidebar_sections.<ref>.title` labels in authored intent instead of letting a\n * model invent filler from the ref alone. The plan does NOT author the label\n * string — that is the labelling pipeline's job.\n */\nexport const PlacementGroupSchema = z.strictObject({\n groupRef: SlugSchema,\n /** Which grouped surface this group belongs to. */\n surface: z.enum(PlacementSurface),\n /** Why this group exists / what it gathers, from a product perspective. */\n purpose: NonEmptyStringSchema,\n /** Sort order among groups on its surface (lower = higher). */\n order: z.number().int().min(0),\n});\nexport type PlacementGroup = z.infer<typeof PlacementGroupSchema>;\n\n/**\n * WHERE a placed subject sits. Discriminated on surface because the address\n * vocabularies genuinely differ: the grouped surfaces name a group, the flat\n * ones do not have one to name.\n */\nexport const PlacementAddressSchema = z.discriminatedUnion('surface', [\n z.strictObject({\n surface: z.literal(PlacementSurface.SETTINGS_HUB),\n /** The `PlacementGroup.groupRef` of the settings rail category. */\n groupRef: SlugSchema,\n order: z.number().int().min(0),\n }),\n z.strictObject({\n surface: z.literal(PlacementSurface.SIDEBAR),\n /** The `PlacementGroup.groupRef` of the sidebar section. */\n groupRef: SlugSchema,\n order: z.number().int().min(0),\n }),\n z.strictObject({\n surface: z.literal(PlacementSurface.USER_MENU),\n order: z.number().int().min(0),\n }),\n z.strictObject({\n surface: z.literal(PlacementSurface.COMMAND_MENU),\n order: z.number().int().min(0),\n }),\n]);\nexport type PlacementAddress = z.infer<typeof PlacementAddressSchema>;\n\n/**\n * Whether a considered subject was placed or deliberately left unplaced.\n *\n * `DECLINED` is a first-class outcome, not an absence. A subject that is simply\n * missing from the plan is a COVERAGE GAP (the decision was never taken); a\n * subject recorded as `DECLINED` is a decision, with a reason a reader can\n * disagree with. Collapsing the two would make \"we thought about it and said no\"\n * indistinguishable from \"nobody looked\".\n */\nexport enum PlacementDisposition {\n PLACED = 'PLACED',\n DECLINED = 'DECLINED',\n}\n\n/**\n * WHOSE judgement a decision currently represents.\n *\n * The placement plan is produced by an expert-panel deliberation, and every decision carries a\n * `rationale` written by that panel. Nothing stopped a later edit — a re-run, or a human changing\n * the landed file — from leaving that rationale in place while changing what it explains, so the\n * artifact went on asserting panel reasoning for a decision the panel never took.\n *\n * This is the field that makes the difference legible. It is REQUIRED and has NO DEFAULT, which is\n * the whole point: a defaulted `DELIBERATED` would mean silence claims the panel, and silence is\n * exactly what a hand-edit produces.\n *\n * ⚠️ TRUSTED, like `decisionRef`. `PlacementDecisionGenerationSchema` cannot express it, so a\n * provider cannot declare its own output a human revision; `parsePlacementPlanGeneration` stamps\n * `DELIBERATED` because a panel run is by definition the panel's judgement.\n *\n * ⚠️ This is not an audit trail and must not grow into one. Git already records WHO changed a\n * decision, WHEN, and with what commit message, mergeably and across branches\n * (`.claude/rules/one-source-of-truth.md`). What git cannot tell a reader who is looking at the\n * FILE — the config, in an editor, asking \"why is Billing under Account?\" — is that this particular\n * line is no longer what the panel decided. That is the one fact this carries.\n */\nexport enum PlacementDecisionOrigin {\n /** The expert panel decided it, and nobody has changed it since. */\n DELIBERATED = 'DELIBERATED',\n /** A human changed it after the panel decided otherwise. {@link PlacementSupersededDecisionSchema} says what the panel had said. */\n REVISED = 'REVISED',\n}\n\n/**\n * What a revision replaced — the panel's own reasoning, kept beside the human's.\n *\n * Only the RATIONALE, deliberately. The decision schema's own note already says the reasoning is\n * \"the artifact's most perishable and most valuable part\", and it is the half a reader cannot\n * reconstruct: the prior address is visible in `git diff`, the prior argument is not, because a\n * diff shows the words that changed and never the case they were making.\n *\n * Keeping more — the old address, a timestamp, an author — would grow a shadow decision beside the\n * real one, and every one of those is something git already holds, in a form that merges.\n */\nexport const PlacementSupersededDecisionSchema = z.strictObject({\n /** The rationale the panel gave for the decision this one replaced. */\n rationale: NonEmptyStringSchema,\n});\nexport type PlacementSupersededDecision = z.infer<typeof PlacementSupersededDecisionSchema>;\n\n/**\n * One placement decision.\n *\n * `rationale` is REQUIRED on both arms. It is what lets a creator ask \"why is\n * Billing under Organization?\" and get an answer without re-running the panel\n * that decided it — the plan is produced by an expert-panel deliberation, so\n * the reasoning is the artifact's most perishable and most valuable part.\n *\n * A subject may legitimately be placed on SEVERAL surfaces (billing sits in the\n * settings rail AND answers to the command palette), so one decision per\n * (subject, surface) — never one per subject.\n */\nexport const PlacementDecisionSchema = z.discriminatedUnion('disposition', [\n z.strictObject({\n /** `placement-<slug>`, stamped by the trusted runtime. */\n decisionRef: z.string().regex(new RegExp(`^${PLACEMENT_DECISION_REF_PREFIX}[a-z0-9]+(?:-[a-z0-9]+)*$`)),\n disposition: z.literal(PlacementDisposition.PLACED),\n /** Whose judgement this is. Required, never defaulted — see {@link PlacementDecisionOrigin}. */\n origin: z.enum(PlacementDecisionOrigin),\n subject: PlacementSubjectSchema,\n address: PlacementAddressSchema,\n /** Why this subject belongs at this address. One or two sentences, product-level. */\n rationale: NonEmptyStringSchema,\n /** Required exactly when `origin` is REVISED — enforced below, on the decision itself. */\n supersedes: PlacementSupersededDecisionSchema.optional(),\n }),\n z.strictObject({\n decisionRef: z.string().regex(new RegExp(`^${PLACEMENT_DECISION_REF_PREFIX}[a-z0-9]+(?:-[a-z0-9]+)*$`)),\n disposition: z.literal(PlacementDisposition.DECLINED),\n origin: z.enum(PlacementDecisionOrigin),\n subject: PlacementSubjectSchema,\n /** Why this subject is deliberately NOT surfaced anywhere. */\n rationale: NonEmptyStringSchema,\n supersedes: PlacementSupersededDecisionSchema.optional(),\n }),\n]).superRefine((decision, context) => {\n /*\n * The pairing, enforced on the DECISION rather than on the plan.\n *\n * `PlacementDecisionSchema` is exported and parsed on its own, so a check that lived only in the\n * plan's `superRefine` would hold for a whole plan and not for a decision — one of the two call\n * sites of an invariant, which is the shape `.claude/rules/invariant-call-site-enumeration.md`\n * exists for. Here it cannot be bypassed by parsing at a different granularity.\n *\n * Both directions, and the second matters as much as the first. A REVISED decision with no\n * `supersedes` is the defect this whole field was added for, wearing the new vocabulary: it says\n * \"a human changed this\" and still cannot say what was changed. A DELIBERATED decision that\n * CARRIES a `supersedes` is a plan claiming the panel overruled itself — no run produces that, so\n * it can only come from an edit that changed one half and forgot the other.\n */\n if (decision.origin === PlacementDecisionOrigin.REVISED && decision.supersedes === undefined) {\n context.addIssue({\n code: 'custom',\n message: `placement decision \"${decision.decisionRef}\" is REVISED but records no superseded rationale — a revision must say what the panel had decided, or the artifact loses the argument it replaced`,\n path: ['supersedes'],\n });\n }\n if (decision.origin === PlacementDecisionOrigin.DELIBERATED && decision.supersedes !== undefined) {\n context.addIssue({\n code: 'custom',\n message: `placement decision \"${decision.decisionRef}\" is DELIBERATED and records a superseded rationale — a panel decision supersedes nothing; set origin to REVISED, or drop the supersedes block`,\n path: ['supersedes'],\n });\n }\n});\nexport type PlacementDecision = z.infer<typeof PlacementDecisionSchema>;\n\n/**\n * THE placement payload — a **single aggregate per application**: which shell\n * surface every destination, resource operation and app view sits on, and why.\n *\n * **Artifact-family id: `placement-plan`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'placement-plan'` (the `family` vocabulary stays an open string owned by the\n * selector surface; this note is the single place tying the SHAPE to the NAME).\n * Produced by the `bottom_up.placement-plan` playbook — an expert-panel\n * deliberation, not a creator elicitation — and consumed by `build-decompose`,\n * which turns it into the coding tasks that author the real config files.\n *\n * Invariants enforced HERE: unique decision refs; at least one decision; every\n * placement on a grouped surface names a group declared in this plan, of the\n * SAME surface; no two groups share a ref on one surface. Coherence beyond\n * structure — duplicate placements, empty groups, order collisions, coverage\n * against the engine catalog — is `validatePlacementPlan`'s job.\n */\nexport const PlacementPlanSchema = z.object({\n version: z.enum(PlacementPlanVersion).default(PlacementPlanVersion.V1),\n /**\n * The groups the plan decides should exist. May be empty only when no\n * grouped-surface placement is made — enforced below rather than by a\n * `min(1)`, because a plan that places nothing but command-menu entries is\n * legitimate and needs no group.\n */\n groups: z.array(PlacementGroupSchema).default([]),\n /**\n * At least one decision, at the SCHEMA. A plan that decided nothing is a\n * refusal (\"there was nothing to place\"), never an artifact — and an empty\n * artifact that LANDS overwrites a real one, which is exactly how a completed\n * 3-task build plan was destroyed by a vacuous one on 2026-08-24.\n */\n decisions: z.array(PlacementDecisionSchema).min(1),\n}).superRefine((plan, context) => {\n const groupKeys = new Set<string>();\n plan.groups.forEach((group, index) => {\n const key = `${group.surface}::${group.groupRef}`;\n if (groupKeys.has(key)) {\n context.addIssue({ code: 'custom', message: `duplicate placement group \"${group.groupRef}\" on surface ${group.surface}`, path: ['groups', index, 'groupRef'] });\n }\n groupKeys.add(key);\n });\n\n const decisionRefs = new Set<string>();\n plan.decisions.forEach((decision, index) => {\n if (decisionRefs.has(decision.decisionRef)) {\n context.addIssue({ code: 'custom', message: `duplicate placement decision ref \"${decision.decisionRef}\"`, path: ['decisions', index, 'decisionRef'] });\n }\n decisionRefs.add(decision.decisionRef);\n\n if (decision.disposition !== PlacementDisposition.PLACED) return;\n const address = decision.address;\n if (!('groupRef' in address)) return;\n if (!groupKeys.has(`${address.surface}::${address.groupRef}`)) {\n context.addIssue({\n code: 'custom',\n message: `placement \"${decision.decisionRef}\" names group \"${address.groupRef}\", which this plan does not declare for surface ${address.surface}`,\n path: ['decisions', index, 'address', 'groupRef'],\n });\n }\n });\n});\nexport type PlacementPlan = z.infer<typeof PlacementPlanSchema>;\n/** @wildo_source:part:end placement-plan.config */\n"]}
1
+ {"version":3,"file":"placement-plan.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/placement-plan/placement-plan.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED,4HAA4H;AAC5H,MAAM,CAAC,MAAM,6BAA6B,GAAG,YAAY,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,iGAAiG;IACjG,iDAA6B,CAAA;IAC7B,+FAA+F;IAC/F,uCAAmB,CAAA;IACnB,8DAA8D;IAC9D,2CAAuB,CAAA;IACvB,mGAAmG;IACnG,iDAA6B,CAAA;AAC/B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED,4GAA4G;AAC5G,MAAM,CAAC,MAAM,0BAA0B,GAAgC;IACrE,gBAAgB,CAAC,YAAY;IA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UAAU,IAAI,OAAO,CAAC;YAAE,OAAO;QACrC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,QAAQ,CAAC;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,cAAc,QAAQ,CAAC,WAAW,kBAAkB,OAAO,CAAC,QAAQ,mDAAmD,OAAO,CAAC,OAAO,EAAE;gBACjJ,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC;aAClD,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,mDAAmD","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start placement-plan.config facet:layer:specification facet:family:placement-plan\n *\n * Versioning for the placement-plan payload format itself. `V1` — initial\n * shape (declared groups + one decision per subject). The shape grows\n * additively across versions; `version` is the explicit marker for consumers\n * that branch on era.\n */\nexport enum PlacementPlanVersion {\n V1 = 'v1',\n}\n\n/** Stable prefix every placement decision ref carries; the trusted runtime stamps it, a provider supplies only the slug. */\nexport const PLACEMENT_DECISION_REF_PREFIX = 'placement-';\n\n/**\n * WHICH shell surface a subject is placed on — a closed vocabulary, because\n * each member names a different authoring file with a different vocabulary,\n * and the dispatching coding agent derives which skill and which file from it.\n *\n * Deliberately NOT merged into one \"navigation surface\" bucket: a settings\n * placement names a rail CATEGORY, a sidebar placement names a sidebar\n * SECTION, and the two are different concepts that happen to both be groups.\n */\nexport enum PlacementSurface {\n /** The settings hub rail (`frontend/src/config/settings-hub.config.ts`). Grouped by category. */\n SETTINGS_HUB = 'SETTINGS_HUB',\n /** The application sidebar (`appShellConfig[SIDEBAR].contentSections`). Grouped by section. */\n SIDEBAR = 'SIDEBAR',\n /** The user dropdown's settings entries. Flat — no groups. */\n USER_MENU = 'USER_MENU',\n /** The command palette (Cmd+K). Flat — its `category` is a search facet, not a placement group. */\n COMMAND_MENU = 'COMMAND_MENU',\n}\n\n/** The surfaces whose placements MUST name a declared group. The other members are flat by construction. */\nexport const GROUPED_PLACEMENT_SURFACES: readonly PlacementSurface[] = [\n PlacementSurface.SETTINGS_HUB,\n PlacementSurface.SIDEBAR,\n];\n\n/** WHAT is being placed. */\nexport enum PlacementSubjectKind {\n /**\n * An engine-owned settings destination, named by its\n * `SettingsDestination.ref` (the engine catalog's id). The catalog itself\n * lives in the frontend package; `_core` deliberately does not import it, so\n * ref EXISTENCE is checked by the caller that holds the catalog — see\n * `validatePlacementPlan`'s `knownSubjects` (this parameter was named\n * `knownSubjectRefs` in an earlier draft and never existed under that name,\n * which made the pointer ungreppable; no caller supplies one yet, and\n * `validatePlacementPlan` records why).\n */\n ENGINE_SETTINGS_DESTINATION = 'ENGINE_SETTINGS_DESTINATION',\n /** A resource operation surface the application owns (its LIST, its READ, a custom verb). */\n RESOURCE_OPERATION = 'RESOURCE_OPERATION',\n /** An application-scoped view (composite, chart, execution, full-custom). */\n APP_VIEW = 'APP_VIEW',\n}\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\nexport const PlacementSubjectSchema = z.discriminatedUnion('kind', [\n z.strictObject({\n kind: z.literal(PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION),\n destinationRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(PlacementSubjectKind.RESOURCE_OPERATION),\n moduleRef: SlugSchema,\n resourceRef: SlugSchema,\n /** The operation this placement surfaces (`list`, `read`, a custom verb ref). */\n operation: NonEmptyStringSchema,\n }),\n z.strictObject({\n kind: z.literal(PlacementSubjectKind.APP_VIEW),\n viewRef: SlugSchema,\n }),\n]);\nexport type PlacementSubject = z.infer<typeof PlacementSubjectSchema>;\n\n/**\n * A container the plan decides should exist on a grouped surface — a settings\n * rail category, or a sidebar section.\n *\n * `purpose` is prose, and it is load-bearing rather than decorative: it is what\n * grounds the generated `settings_hub.categories.<ref>.label` /\n * `sidebar_sections.<ref>.title` labels in authored intent instead of letting a\n * model invent filler from the ref alone. The plan does NOT author the label\n * string — that is the labelling pipeline's job.\n */\nexport const PlacementGroupSchema = z.strictObject({\n groupRef: SlugSchema,\n /** Which grouped surface this group belongs to. */\n surface: z.enum(PlacementSurface),\n /** Why this group exists / what it gathers, from a product perspective. */\n purpose: NonEmptyStringSchema,\n /** Sort order among groups on its surface (lower = higher). */\n order: z.number().int().min(0),\n});\nexport type PlacementGroup = z.infer<typeof PlacementGroupSchema>;\n\n/**\n * WHERE a placed subject sits. Discriminated on surface because the address\n * vocabularies genuinely differ: the grouped surfaces name a group, the flat\n * ones do not have one to name.\n */\nexport const PlacementAddressSchema = z.discriminatedUnion('surface', [\n z.strictObject({\n surface: z.literal(PlacementSurface.SETTINGS_HUB),\n /** The `PlacementGroup.groupRef` of the settings rail category. */\n groupRef: SlugSchema,\n order: z.number().int().min(0),\n }),\n z.strictObject({\n surface: z.literal(PlacementSurface.SIDEBAR),\n /** The `PlacementGroup.groupRef` of the sidebar section. */\n groupRef: SlugSchema,\n order: z.number().int().min(0),\n }),\n z.strictObject({\n surface: z.literal(PlacementSurface.USER_MENU),\n order: z.number().int().min(0),\n }),\n z.strictObject({\n surface: z.literal(PlacementSurface.COMMAND_MENU),\n order: z.number().int().min(0),\n }),\n]);\nexport type PlacementAddress = z.infer<typeof PlacementAddressSchema>;\n\n/**\n * Whether a considered subject was placed or deliberately left unplaced.\n *\n * `DECLINED` is a first-class outcome, not an absence. A subject that is simply\n * missing from the plan is a COVERAGE GAP (the decision was never taken); a\n * subject recorded as `DECLINED` is a decision, with a reason a reader can\n * disagree with. Collapsing the two would make \"we thought about it and said no\"\n * indistinguishable from \"nobody looked\".\n */\nexport enum PlacementDisposition {\n PLACED = 'PLACED',\n DECLINED = 'DECLINED',\n}\n\n/**\n * WHOSE judgement a decision currently represents.\n *\n * The placement plan is produced by an expert-panel deliberation, and every decision carries a\n * `rationale` written by that panel. Nothing stopped a later edit — a re-run, or a human changing\n * the landed file — from leaving that rationale in place while changing what it explains, so the\n * artifact went on asserting panel reasoning for a decision the panel never took.\n *\n * This is the field that makes the difference legible. It is REQUIRED and has NO DEFAULT, which is\n * the whole point: a defaulted `DELIBERATED` would mean silence claims the panel, and silence is\n * exactly what a hand-edit produces.\n *\n * ⚠️ TRUSTED, like `decisionRef`. `PlacementDecisionGenerationSchema` cannot express it, so a\n * provider cannot declare its own output a human revision; `parsePlacementPlanGeneration` stamps\n * `DELIBERATED` because a panel run is by definition the panel's judgement.\n *\n * ⚠️ This is not an audit trail and must not grow into one. Git already records WHO changed a\n * decision, WHEN, and with what commit message, mergeably and across branches\n * (`.claude/rules/one-source-of-truth.md`). What git cannot tell a reader who is looking at the\n * FILE — the config, in an editor, asking \"why is Billing under Account?\" — is that this particular\n * line is no longer what the panel decided. That is the one fact this carries.\n */\nexport enum PlacementDecisionOrigin {\n /** The expert panel decided it, and nobody has changed it since. */\n DELIBERATED = 'DELIBERATED',\n /** A human changed it after the panel decided otherwise. {@link PlacementSupersededDecisionSchema} says what the panel had said. */\n REVISED = 'REVISED',\n}\n\n/**\n * What a revision replaced — the panel's own reasoning, kept beside the human's.\n *\n * Only the RATIONALE, deliberately. The decision schema's own note already says the reasoning is\n * \"the artifact's most perishable and most valuable part\", and it is the half a reader cannot\n * reconstruct: the prior address is visible in `git diff`, the prior argument is not, because a\n * diff shows the words that changed and never the case they were making.\n *\n * Keeping more — the old address, a timestamp, an author — would grow a shadow decision beside the\n * real one, and every one of those is something git already holds, in a form that merges.\n */\nexport const PlacementSupersededDecisionSchema = z.strictObject({\n /** The rationale the panel gave for the decision this one replaced. */\n rationale: NonEmptyStringSchema,\n});\nexport type PlacementSupersededDecision = z.infer<typeof PlacementSupersededDecisionSchema>;\n\n/**\n * One placement decision.\n *\n * `rationale` is REQUIRED on both arms. It is what lets a creator ask \"why is\n * Billing under Organization?\" and get an answer without re-running the panel\n * that decided it — the plan is produced by an expert-panel deliberation, so\n * the reasoning is the artifact's most perishable and most valuable part.\n *\n * A subject may legitimately be placed on SEVERAL surfaces (billing sits in the\n * settings rail AND answers to the command palette), so one decision per\n * (subject, surface) — never one per subject.\n */\nexport const PlacementDecisionSchema = z.discriminatedUnion('disposition', [\n z.strictObject({\n /** `placement-<slug>`, stamped by the trusted runtime. */\n decisionRef: z.string().regex(new RegExp(`^${PLACEMENT_DECISION_REF_PREFIX}[a-z0-9]+(?:-[a-z0-9]+)*$`)),\n disposition: z.literal(PlacementDisposition.PLACED),\n /** Whose judgement this is. Required, never defaulted — see {@link PlacementDecisionOrigin}. */\n origin: z.enum(PlacementDecisionOrigin),\n subject: PlacementSubjectSchema,\n address: PlacementAddressSchema,\n /** Why this subject belongs at this address. One or two sentences, product-level. */\n rationale: NonEmptyStringSchema,\n /** Required exactly when `origin` is REVISED — enforced below, on the decision itself. */\n supersedes: PlacementSupersededDecisionSchema.optional(),\n }),\n z.strictObject({\n decisionRef: z.string().regex(new RegExp(`^${PLACEMENT_DECISION_REF_PREFIX}[a-z0-9]+(?:-[a-z0-9]+)*$`)),\n disposition: z.literal(PlacementDisposition.DECLINED),\n origin: z.enum(PlacementDecisionOrigin),\n subject: PlacementSubjectSchema,\n /** Why this subject is deliberately NOT surfaced anywhere. */\n rationale: NonEmptyStringSchema,\n supersedes: PlacementSupersededDecisionSchema.optional(),\n }),\n]).superRefine((decision, context) => {\n /*\n * The pairing, enforced on the DECISION rather than on the plan.\n *\n * `PlacementDecisionSchema` is exported and parsed on its own, so a check that lived only in the\n * plan's `superRefine` would hold for a whole plan and not for a decision — one of the two call\n * sites of an invariant, which is the shape `.claude/rules/invariant-call-site-enumeration.md`\n * exists for. Here it cannot be bypassed by parsing at a different granularity.\n *\n * Both directions, and the second matters as much as the first. A REVISED decision with no\n * `supersedes` is the defect this whole field was added for, wearing the new vocabulary: it says\n * \"a human changed this\" and still cannot say what was changed. A DELIBERATED decision that\n * CARRIES a `supersedes` is a plan claiming the panel overruled itself — no run produces that, so\n * it can only come from an edit that changed one half and forgot the other.\n */\n if (decision.origin === PlacementDecisionOrigin.REVISED && decision.supersedes === undefined) {\n context.addIssue({\n code: 'custom',\n message: `placement decision \"${decision.decisionRef}\" is REVISED but records no superseded rationale — a revision must say what the panel had decided, or the artifact loses the argument it replaced`,\n path: ['supersedes'],\n });\n }\n if (decision.origin === PlacementDecisionOrigin.DELIBERATED && decision.supersedes !== undefined) {\n context.addIssue({\n code: 'custom',\n message: `placement decision \"${decision.decisionRef}\" is DELIBERATED and records a superseded rationale — a panel decision supersedes nothing; set origin to REVISED, or drop the supersedes block`,\n path: ['supersedes'],\n });\n }\n});\nexport type PlacementDecision = z.infer<typeof PlacementDecisionSchema>;\n\n/**\n * THE placement payload — a **single aggregate per application**: which shell\n * surface every destination, resource operation and app view sits on, and why.\n *\n * **Artifact-family id: `placement-plan`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'placement-plan'` (the `family` vocabulary stays an open string owned by the\n * selector surface; this note is the single place tying the SHAPE to the NAME).\n * Produced by the `bottom_up.placement-plan` playbook — an expert-panel\n * deliberation, not a creator elicitation — and consumed by `build-decompose`,\n * which turns it into the coding tasks that author the real config files.\n *\n * Invariants enforced HERE: unique decision refs; at least one decision; every\n * placement on a grouped surface names a group declared in this plan, of the\n * SAME surface; no two groups share a ref on one surface. Coherence beyond\n * structure — duplicate placements, empty groups, order collisions, coverage\n * against the engine catalog — is `validatePlacementPlan`'s job.\n */\nexport const PlacementPlanSchema = z.object({\n version: z.enum(PlacementPlanVersion).default(PlacementPlanVersion.V1),\n /**\n * The groups the plan decides should exist. May be empty only when no\n * grouped-surface placement is made — enforced below rather than by a\n * `min(1)`, because a plan that places nothing but command-menu entries is\n * legitimate and needs no group.\n */\n groups: z.array(PlacementGroupSchema).default([]),\n /**\n * At least one decision, at the SCHEMA. A plan that decided nothing is a\n * refusal (\"there was nothing to place\"), never an artifact — and an empty\n * artifact that LANDS overwrites a real one, which is exactly how a completed\n * 3-task build plan was destroyed by a vacuous one on 2026-08-24.\n */\n decisions: z.array(PlacementDecisionSchema).min(1),\n}).superRefine((plan, context) => {\n const groupKeys = new Set<string>();\n plan.groups.forEach((group, index) => {\n const key = `${group.surface}::${group.groupRef}`;\n if (groupKeys.has(key)) {\n context.addIssue({ code: 'custom', message: `duplicate placement group \"${group.groupRef}\" on surface ${group.surface}`, path: ['groups', index, 'groupRef'] });\n }\n groupKeys.add(key);\n });\n\n const decisionRefs = new Set<string>();\n plan.decisions.forEach((decision, index) => {\n if (decisionRefs.has(decision.decisionRef)) {\n context.addIssue({ code: 'custom', message: `duplicate placement decision ref \"${decision.decisionRef}\"`, path: ['decisions', index, 'decisionRef'] });\n }\n decisionRefs.add(decision.decisionRef);\n\n if (decision.disposition !== PlacementDisposition.PLACED) return;\n const address = decision.address;\n if (!('groupRef' in address)) return;\n if (!groupKeys.has(`${address.surface}::${address.groupRef}`)) {\n context.addIssue({\n code: 'custom',\n message: `placement \"${decision.decisionRef}\" names group \"${address.groupRef}\", which this plan does not declare for surface ${address.surface}`,\n path: ['decisions', index, 'address', 'groupRef'],\n });\n }\n });\n});\nexport type PlacementPlan = z.infer<typeof PlacementPlanSchema>;\n/** @wildo_source:part:end placement-plan.config */\n"]}