@wildo-ai/framework-knowledge 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (922) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/framework-knowledge.definitions.d.ts +51 -0
  4. package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -0
  5. package/dist/esm/framework-knowledge.definitions.js +1571 -0
  6. package/dist/esm/framework-knowledge.definitions.js.map +1 -0
  7. package/dist/esm/framework-knowledge.loader.d.ts +72 -0
  8. package/dist/esm/framework-knowledge.loader.d.ts.map +1 -0
  9. package/dist/esm/framework-knowledge.loader.js +258 -0
  10. package/dist/esm/framework-knowledge.loader.js.map +1 -0
  11. package/dist/esm/framework-knowledge.schemas.d.ts +236 -0
  12. package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -0
  13. package/dist/esm/framework-knowledge.schemas.js +23 -0
  14. package/dist/esm/framework-knowledge.schemas.js.map +1 -0
  15. package/dist/esm/index.d.ts +4 -0
  16. package/dist/esm/index.d.ts.map +1 -0
  17. package/dist/esm/index.js +4 -0
  18. package/dist/esm/index.js.map +1 -0
  19. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +53 -0
  20. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -0
  21. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +56 -0
  22. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -0
  23. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +200 -0
  24. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -0
  25. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +228 -0
  26. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -0
  27. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +39 -0
  28. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -0
  29. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +39 -0
  30. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -0
  31. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +261 -0
  32. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -0
  33. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +412 -0
  34. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -0
  35. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +61 -0
  36. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -0
  37. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +65 -0
  38. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -0
  39. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +53 -0
  40. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -0
  41. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +54 -0
  42. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -0
  43. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +43 -0
  44. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -0
  45. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +73 -0
  46. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -0
  47. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +53 -0
  48. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -0
  49. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +114 -0
  50. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -0
  51. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +95 -0
  52. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -0
  53. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +102 -0
  54. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -0
  55. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +258 -0
  56. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -0
  57. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +241 -0
  58. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -0
  59. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +241 -0
  60. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -0
  61. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +202 -0
  62. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -0
  63. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +82 -0
  64. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -0
  65. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +89 -0
  66. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -0
  67. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts +56 -0
  68. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -0
  69. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js +76 -0
  70. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -0
  71. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts +30 -0
  72. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -0
  73. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js +27 -0
  74. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js.map +1 -0
  75. package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts +31 -0
  76. package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -0
  77. package/dist/esm/playbooks/top_down.market-research/playbook.definition.js +26 -0
  78. package/dist/esm/playbooks/top_down.market-research/playbook.definition.js.map +1 -0
  79. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +254 -0
  80. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -0
  81. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +219 -0
  82. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -0
  83. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +180 -0
  84. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -0
  85. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +302 -0
  86. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -0
  87. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +249 -0
  88. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -0
  89. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +286 -0
  90. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -0
  91. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +248 -0
  92. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -0
  93. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +227 -0
  94. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -0
  95. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +45 -0
  96. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -0
  97. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +48 -0
  98. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -0
  99. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +250 -0
  100. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -0
  101. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +218 -0
  102. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -0
  103. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -0
  104. package/dist/knowledge/manifest.json +45 -0
  105. package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +407 -0
  106. package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +69 -0
  107. package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-protocol.json +1 -0
  108. package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-treatment.json +1 -0
  109. package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +556 -0
  110. package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +47 -0
  111. package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +344 -0
  112. package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +43 -0
  113. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -0
  114. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -0
  115. package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +259 -0
  116. package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +83 -0
  117. package/dist/knowledge/playbooks/bottom_up.domain-plan/structured-artifact-action.json +1 -0
  118. package/dist/knowledge/playbooks/bottom_up.foundation/method.md +321 -0
  119. package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +79 -0
  120. package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +185 -0
  121. package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +66 -0
  122. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +737 -0
  123. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +44 -0
  124. package/dist/knowledge/playbooks/refinement.document-facts/method.md +261 -0
  125. package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +57 -0
  126. package/dist/knowledge/playbooks/top_down.brand-identity/method.md +151 -0
  127. package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +124 -0
  128. package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -0
  129. package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -0
  130. package/dist/knowledge/playbooks/top_down.business-model/method.md +128 -0
  131. package/dist/knowledge/playbooks/top_down.business-model/playbook.json +102 -0
  132. package/dist/knowledge/playbooks/top_down.business-model/structured-artifact-action.json +1 -0
  133. package/dist/knowledge/playbooks/top_down.capability-map/evaluation-protocol.json +1 -0
  134. package/dist/knowledge/playbooks/top_down.capability-map/evaluation-treatment.json +1 -0
  135. package/dist/knowledge/playbooks/top_down.capability-map/method.md +239 -0
  136. package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +73 -0
  137. package/dist/knowledge/playbooks/top_down.capability-map/structured-artifact-action.json +1 -0
  138. package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +177 -0
  139. package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +95 -0
  140. package/dist/knowledge/playbooks/top_down.market-analysis/method.md +64 -0
  141. package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +49 -0
  142. package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/method.md +56 -0
  143. package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +40 -0
  144. package/dist/knowledge/playbooks/top_down.market-research/method.md +68 -0
  145. package/dist/knowledge/playbooks/top_down.market-research/playbook.json +42 -0
  146. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -0
  147. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -0
  148. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +239 -0
  149. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +69 -0
  150. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/structured-artifact-action.json +1 -0
  151. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -0
  152. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -0
  153. package/dist/knowledge/playbooks/top_down.phase-gate/method.md +96 -0
  154. package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +77 -0
  155. package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -0
  156. package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -0
  157. package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +53 -0
  158. package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +61 -0
  159. package/dist/knowledge/playbooks/top_down.requirements-definition/structured-artifact-action.json +1 -0
  160. package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-protocol.json +1 -0
  161. package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-treatment.json +1 -0
  162. package/dist/knowledge/playbooks/top_down.scope-roadmap/method.md +280 -0
  163. package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +87 -0
  164. package/dist/knowledge/playbooks/top_down.scope-roadmap/structured-artifact-action.json +1 -0
  165. package/dist/knowledge/playbooks/top_down.value-proposition/method.md +204 -0
  166. package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +54 -0
  167. package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-protocol.json +1 -0
  168. package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-treatment.json +1 -0
  169. package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +146 -0
  170. package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +120 -0
  171. package/dist/knowledge/playbooks/top_down.vision-elicitation/structured-artifact-action.json +1 -0
  172. package/dist/knowledge/references/application.database.migration-change-risk.md +28 -0
  173. package/dist/knowledge/references/assertions.authored-metadata.config.md +90 -0
  174. package/dist/knowledge/references/assertions.behaviors.wire-contracts.md +223 -0
  175. package/dist/knowledge/references/assertions.references.conventions.md +92 -0
  176. package/dist/knowledge/references/assertions.snapshot.validation.md +317 -0
  177. package/dist/knowledge/references/assertions.specification.config.md +287 -0
  178. package/dist/knowledge/references/brand.asset.config.md +167 -0
  179. package/dist/knowledge/references/brand.authored-metadata.config.md +51 -0
  180. package/dist/knowledge/references/brand.logo-direction.config.md +88 -0
  181. package/dist/knowledge/references/brand.name.config.md +46 -0
  182. package/dist/knowledge/references/brand.snapshot.config.md +76 -0
  183. package/dist/knowledge/references/brand.snapshot.validation.md +446 -0
  184. package/dist/knowledge/references/brand.visual-tone.config.md +56 -0
  185. package/dist/knowledge/references/build-plan.task-graph.config.md +198 -0
  186. package/dist/knowledge/references/business-model.authored-metadata.config.md +65 -0
  187. package/dist/knowledge/references/business-model.pricing-plan.config.md +122 -0
  188. package/dist/knowledge/references/business-model.references.conventions.md +99 -0
  189. package/dist/knowledge/references/business-model.snapshot.config.md +121 -0
  190. package/dist/knowledge/references/business-model.snapshot.validation.md +325 -0
  191. package/dist/knowledge/references/cli.market.generate-command.md +230 -0
  192. package/dist/knowledge/references/cli.market.utils.md +147 -0
  193. package/dist/knowledge/references/companion.introspection.behaviors.market.md +90 -0
  194. package/dist/knowledge/references/companion.introspection.handlers.market.md +42 -0
  195. package/dist/knowledge/references/companion.market.generation-service.md +270 -0
  196. package/dist/knowledge/references/companion.market.prompt-renderer.md +244 -0
  197. package/dist/knowledge/references/companion.technical-doc.service.md +809 -0
  198. package/dist/knowledge/references/engine.client-bundle.allow-list.md +125 -0
  199. package/dist/knowledge/references/engine.client-bundle.discipline.md +130 -0
  200. package/dist/knowledge/references/engine.client-bundle.external-connectors-public.discipline.md +55 -0
  201. package/dist/knowledge/references/engine.saas-technical-doc.config.md +215 -0
  202. package/dist/knowledge/references/engine.saas-website.config.md +331 -0
  203. package/dist/knowledge/references/example.authorization.unit-narrowing.declaration.md +24 -0
  204. package/dist/knowledge/references/example.backend.addon-wiring.module.md +55 -0
  205. package/dist/knowledge/references/example.backend.custom-operation.create-postfix.md +35 -0
  206. package/dist/knowledge/references/example.backend.operation.error-throw.md +17 -0
  207. package/dist/knowledge/references/example.config.app-shell.command-menu-items.md +63 -0
  208. package/dist/knowledge/references/example.config.app-shell.full.md +147 -0
  209. package/dist/knowledge/references/example.config.app-shell.hosted-components.md +45 -0
  210. package/dist/knowledge/references/example.config.app-shell.quick-switcher-fields.md +37 -0
  211. package/dist/knowledge/references/example.config.backend.billing-enable.md +20 -0
  212. package/dist/knowledge/references/example.config.backend.required-floors.md +46 -0
  213. package/dist/knowledge/references/example.config.design-system.full.md +162 -0
  214. package/dist/knowledge/references/example.config.navigation.full.md +71 -0
  215. package/dist/knowledge/references/example.config.provider.backend-scope-billing.md +27 -0
  216. package/dist/knowledge/references/example.data-seeding.minimal.md +114 -0
  217. package/dist/knowledge/references/example.email.template.minimal.md +54 -0
  218. package/dist/knowledge/references/example.engine.component-registration.lazy-load.md +16 -0
  219. package/dist/knowledge/references/example.engine.product-definitions.feature-and-profiles.md +146 -0
  220. package/dist/knowledge/references/example.flows-actors.chat-assistant.md +196 -0
  221. package/dist/knowledge/references/example.flows-actors.llm-agent-one-shot.md +174 -0
  222. package/dist/knowledge/references/example.i18n.label-generation.engine-barrel.md +15 -0
  223. package/dist/knowledge/references/example.infra.cdn.cloudflare.md +23 -0
  224. package/dist/knowledge/references/example.infra.cdn.generic.md +17 -0
  225. package/dist/knowledge/references/example.infra.environment-config.local.md +250 -0
  226. package/dist/knowledge/references/example.market.alternative.in-house-build.md +49 -0
  227. package/dist/knowledge/references/example.market.authored-metadata.md +32 -0
  228. package/dist/knowledge/references/example.market.buying-journey.core-icp.md +140 -0
  229. package/dist/knowledge/references/example.market.category.config.md +71 -0
  230. package/dist/knowledge/references/example.market.channel.community.md +39 -0
  231. package/dist/knowledge/references/example.market.feature-benefit.kano-threshold.md +67 -0
  232. package/dist/knowledge/references/example.market.feature-benefit.pain-reliever.md +65 -0
  233. package/dist/knowledge/references/example.market.icp.anti-target.md +47 -0
  234. package/dist/knowledge/references/example.market.icp.individual.md +82 -0
  235. package/dist/knowledge/references/example.market.icp.legal-entity-with-geographies.md +95 -0
  236. package/dist/knowledge/references/example.market.is-benefit-available.composition.md +40 -0
  237. package/dist/knowledge/references/example.market.job.emotional.md +27 -0
  238. package/dist/knowledge/references/example.market.job.functional.md +28 -0
  239. package/dist/knowledge/references/example.market.message-template.seeds.md +106 -0
  240. package/dist/knowledge/references/example.market.objection.pricing.md +39 -0
  241. package/dist/knowledge/references/example.market.persona.dmu-with-inheritance.md +62 -0
  242. package/dist/knowledge/references/example.market.persona.individual-self.md +51 -0
  243. package/dist/knowledge/references/example.market.positioning.per-icp.md +103 -0
  244. package/dist/knowledge/references/example.market.proof.metric.md +39 -0
  245. package/dist/knowledge/references/example.market.scoring.golden-case.md +46 -0
  246. package/dist/knowledge/references/example.market.scoring.no-coverage-zero.md +40 -0
  247. package/dist/knowledge/references/example.market.snapshot-validation.duplicate-journey-stage.md +36 -0
  248. package/dist/knowledge/references/example.market.snapshot-validation.errors-by-kind.md +55 -0
  249. package/dist/knowledge/references/example.market.snapshot-validation.objection-proof-benefit-mismatch.md +74 -0
  250. package/dist/knowledge/references/example.market.snapshot-validation.proof-without-support.md +32 -0
  251. package/dist/knowledge/references/example.market.snapshot-validation.threshold-without-job.md +44 -0
  252. package/dist/knowledge/references/example.market.snapshot.assembled.md +49 -0
  253. package/dist/knowledge/references/example.market.tone-of-voice.config.md +41 -0
  254. package/dist/knowledge/references/example.market.trigger.growth-milestone.md +43 -0
  255. package/dist/knowledge/references/example.module.companion-exports.full.md +142 -0
  256. package/dist/knowledge/references/example.module.registration.shared.md +16 -0
  257. package/dist/knowledge/references/example.module.relationships.actor-edge-back-to-scope-owner.md +47 -0
  258. package/dist/knowledge/references/example.module.relationships.discriminator.md +25 -0
  259. package/dist/knowledge/references/example.module.relationships.scope-membership-junction.md +25 -0
  260. package/dist/knowledge/references/example.provider.backend-module-shape.md +110 -0
  261. package/dist/knowledge/references/example.provider.contribution.backend-billing.md +12 -0
  262. package/dist/knowledge/references/example.provider.frontend-file-picker.contribution.md +30 -0
  263. package/dist/knowledge/references/example.provider.frontend-file-picker.module.md +21 -0
  264. package/dist/knowledge/references/example.rag.source-fields.declaration.md +83 -0
  265. package/dist/knowledge/references/example.rate-limit.custom-controller-surface.md +25 -0
  266. package/dist/knowledge/references/example.rate-limit.resource-operation-surface.md +24 -0
  267. package/dist/knowledge/references/example.resource.add-field.priority-enum.md +19 -0
  268. package/dist/knowledge/references/example.resource.add-resource.module-factory-map.md +21 -0
  269. package/dist/knowledge/references/example.resource.config-wiring.fk-relationship.md +33 -0
  270. package/dist/knowledge/references/example.resource.custom-view.read-host.md +28 -0
  271. package/dist/knowledge/references/example.resource.mcp-exposure.md +65 -0
  272. package/dist/knowledge/references/example.resource.reference-constraints.role-constrained.md +27 -0
  273. package/dist/knowledge/references/example.resource.ui-behavior.enum-badge.md +22 -0
  274. package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +43 -0
  275. package/dist/knowledge/references/example.spec.composite-view.workspace.md +72 -0
  276. package/dist/knowledge/references/example.spec.feature.flag-with-codehandling.md +64 -0
  277. package/dist/knowledge/references/example.spec.frontend-component.prop-vocabulary.md +88 -0
  278. package/dist/knowledge/references/example.spec.resource.semantic-field.md +23 -0
  279. package/dist/knowledge/references/example.views.app-level.composite-views-config.md +19 -0
  280. package/dist/knowledge/references/example.views.chart-view.resource-owned.md +69 -0
  281. package/dist/knowledge/references/example.views.composite-view.host-embeds.md +31 -0
  282. package/dist/knowledge/references/example.views.composite-view.workspace.md +65 -0
  283. package/dist/knowledge/references/example.views.custom-view.execution-host.md +41 -0
  284. package/dist/knowledge/references/example.views.execution-view.resource-owned.md +25 -0
  285. package/dist/knowledge/references/external-connectors.app.frontend-provider-module.md +42 -0
  286. package/dist/knowledge/references/market.alternative.config.md +68 -0
  287. package/dist/knowledge/references/market.alternative.kind.md +32 -0
  288. package/dist/knowledge/references/market.authored-metadata.config.md +64 -0
  289. package/dist/knowledge/references/market.buying-journey.config.md +43 -0
  290. package/dist/knowledge/references/market.buying-journey.stage.md +33 -0
  291. package/dist/knowledge/references/market.category.config.md +63 -0
  292. package/dist/knowledge/references/market.channel.config.md +59 -0
  293. package/dist/knowledge/references/market.channel.kind.md +49 -0
  294. package/dist/knowledge/references/market.context-block.builder.md +544 -0
  295. package/dist/knowledge/references/market.context-block.response.md +57 -0
  296. package/dist/knowledge/references/market.feature-benefit.config.md +84 -0
  297. package/dist/knowledge/references/market.feature-benefit.kano.md +41 -0
  298. package/dist/knowledge/references/market.gain.config.md +50 -0
  299. package/dist/knowledge/references/market.generation.response.md +108 -0
  300. package/dist/knowledge/references/market.icp.config.md +162 -0
  301. package/dist/knowledge/references/market.icp.geographic-targeting.md +57 -0
  302. package/dist/knowledge/references/market.inherit-from.md +74 -0
  303. package/dist/knowledge/references/market.is-benefit-available.md +58 -0
  304. package/dist/knowledge/references/market.job.config.md +48 -0
  305. package/dist/knowledge/references/market.message-template.config.md +86 -0
  306. package/dist/knowledge/references/market.objection.config.md +56 -0
  307. package/dist/knowledge/references/market.objection.kind.md +34 -0
  308. package/dist/knowledge/references/market.pain.config.md +50 -0
  309. package/dist/knowledge/references/market.persona.config.md +64 -0
  310. package/dist/knowledge/references/market.positioning.config.md +84 -0
  311. package/dist/knowledge/references/market.proof.config.md +48 -0
  312. package/dist/knowledge/references/market.proof.kind.md +34 -0
  313. package/dist/knowledge/references/market.references.weighted-edges.md +105 -0
  314. package/dist/knowledge/references/market.scoring.fit.md +215 -0
  315. package/dist/knowledge/references/market.snapshot.config.md +34 -0
  316. package/dist/knowledge/references/market.snapshot.validation.md +1171 -0
  317. package/dist/knowledge/references/market.tone-of-voice.config.md +80 -0
  318. package/dist/knowledge/references/market.trigger.config.md +45 -0
  319. package/dist/knowledge/references/market.trigger.kind.md +35 -0
  320. package/dist/knowledge/references/placement-plan.config.md +330 -0
  321. package/dist/knowledge/references/platform.config.application-database.md +74 -0
  322. package/dist/knowledge/references/platform.config.application-modules.md +30 -0
  323. package/dist/knowledge/references/platform.config.backing-services.md +266 -0
  324. package/dist/knowledge/references/platform.config.cdn.md +167 -0
  325. package/dist/knowledge/references/platform.config.environment.deployment.md +263 -0
  326. package/dist/knowledge/references/platform.config.saas.md +405 -0
  327. package/dist/knowledge/references/presets.models.design-system.configuration.md +59 -0
  328. package/dist/knowledge/references/presets.models.design-system.source-config.md +72 -0
  329. package/dist/knowledge/references/presets.models.labelling.sections.md +64 -0
  330. package/dist/knowledge/references/presets.models.material.profile-contract.md +192 -0
  331. package/dist/knowledge/references/presets.models.material.runtime-policy.md +60 -0
  332. package/dist/knowledge/references/presets.models.surface-policy.defaults.md +613 -0
  333. package/dist/knowledge/references/presets.models.surface-policy.md +534 -0
  334. package/dist/knowledge/references/presets.models.surface-variant.md +56 -0
  335. package/dist/knowledge/references/requirements.authored-metadata.config.md +64 -0
  336. package/dist/knowledge/references/requirements.functional-requirement.config.md +68 -0
  337. package/dist/knowledge/references/requirements.non-functional-requirement.config.md +100 -0
  338. package/dist/knowledge/references/requirements.references.conventions.md +125 -0
  339. package/dist/knowledge/references/requirements.snapshot.config.md +73 -0
  340. package/dist/knowledge/references/requirements.snapshot.validation.md +333 -0
  341. package/dist/knowledge/references/roadmap.authored-metadata.config.md +64 -0
  342. package/dist/knowledge/references/roadmap.phase.config.md +149 -0
  343. package/dist/knowledge/references/roadmap.references.conventions.md +89 -0
  344. package/dist/knowledge/references/roadmap.snapshot.config.md +65 -0
  345. package/dist/knowledge/references/roadmap.snapshot.validation.md +325 -0
  346. package/dist/knowledge/references/saas.backend.app-config.backend-authored.md +32 -0
  347. package/dist/knowledge/references/saas.backend.application-initialization.assembly.md +38 -0
  348. package/dist/knowledge/references/saas.backend.billing.resolution-failure-reasons.md +45 -0
  349. package/dist/knowledge/references/saas.backend.custom-operation.authoritative-fields.md +53 -0
  350. package/dist/knowledge/references/saas.backend.custom-operation.transactional-core.md +120 -0
  351. package/dist/knowledge/references/saas.backend.domain-module.md +237 -0
  352. package/dist/knowledge/references/saas.backend.email-template.definition.md +69 -0
  353. package/dist/knowledge/references/saas.backend.flows-actors.a2a-agent-card.md +89 -0
  354. package/dist/knowledge/references/saas.backend.flows-actors.a2a-task-surface.md +118 -0
  355. package/dist/knowledge/references/saas.backend.flows-actors.function-tool.md +82 -0
  356. package/dist/knowledge/references/saas.backend.flows-actors.invoke-agent.md +48 -0
  357. package/dist/knowledge/references/saas.backend.flows-actors.resource-read-tool.md +39 -0
  358. package/dist/knowledge/references/saas.backend.flows-actors.resource-write-tool.md +67 -0
  359. package/dist/knowledge/references/saas.backend.pdf-template.bindings.md +52 -0
  360. package/dist/knowledge/references/saas.backend.pdf-template.definition.md +113 -0
  361. package/dist/knowledge/references/saas.backend.rate-limit-service.check-policy.md +75 -0
  362. package/dist/knowledge/references/saas.backend.system-access-service.md +994 -0
  363. package/dist/knowledge/references/saas.data-seeding.admin-endpoints.md +59 -0
  364. package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +184 -0
  365. package/dist/knowledge/references/saas.data-seeding.definition-input.md +95 -0
  366. package/dist/knowledge/references/saas.data-seeding.modes.md +72 -0
  367. package/dist/knowledge/references/saas.data-seeding.run-ledger.md +198 -0
  368. package/dist/knowledge/references/saas.data-seeding.run-status.md +35 -0
  369. package/dist/knowledge/references/saas.data-seeding.schedule.md +91 -0
  370. package/dist/knowledge/references/saas.data-seeding.scope-iteration-strategy.md +46 -0
  371. package/dist/knowledge/references/saas.external-providers.backend-provider-registry.runtime-filter.md +55 -0
  372. package/dist/knowledge/references/saas.external-providers.document-extraction.applicability.md +26 -0
  373. package/dist/knowledge/references/saas.external-providers.embeddings.applicability.md +30 -0
  374. package/dist/knowledge/references/saas.external-providers.llm.model-configuration.md +124 -0
  375. package/dist/knowledge/references/saas.external-providers.llm.operation-key.md +49 -0
  376. package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +265 -0
  377. package/dist/knowledge/references/saas.frontend.app-level-component.vocabulary.md +148 -0
  378. package/dist/knowledge/references/saas.frontend.app-shell.hosted-components.md +145 -0
  379. package/dist/knowledge/references/saas.frontend.chart-view.inserted-declaration.md +80 -0
  380. package/dist/knowledge/references/saas.frontend.command-menu.omnibox.md +88 -0
  381. package/dist/knowledge/references/saas.frontend.command-menu.search-resource.md +109 -0
  382. package/dist/knowledge/references/saas.frontend.component-registration.entry.md +21 -0
  383. package/dist/knowledge/references/saas.frontend.composite-view.authoring.md +102 -0
  384. package/dist/knowledge/references/saas.frontend.composite-view.define-helper.md +31 -0
  385. package/dist/knowledge/references/saas.frontend.domain-module.md +31 -0
  386. package/dist/knowledge/references/saas.frontend.embedded-resource-descent.md +37 -0
  387. package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.md +172 -0
  388. package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.per-action-retry-loop.md +115 -0
  389. package/dist/knowledge/references/saas.frontend.execution-view.definition.md +172 -0
  390. package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.local-pane.md +109 -0
  391. package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.md +55 -0
  392. package/dist/knowledge/references/saas.frontend.execution-view.dirty-state-contract.md +151 -0
  393. package/dist/knowledge/references/saas.frontend.execution-view.failure-handling-contract.md +302 -0
  394. package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.md +89 -0
  395. package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.md +231 -0
  396. package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.shell-data-hydrator.md +174 -0
  397. package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.md +96 -0
  398. package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.resolution.md +45 -0
  399. package/dist/knowledge/references/saas.frontend.execution-view.outcome-emission-contract.md +71 -0
  400. package/dist/knowledge/references/saas.frontend.execution-view.participation-and-anchor.md +80 -0
  401. package/dist/knowledge/references/saas.frontend.execution-view.three-zone-contract.md +147 -0
  402. package/dist/knowledge/references/saas.frontend.flows-actors-view.md +40 -0
  403. package/dist/knowledge/references/saas.frontend.form-fields.file-provider-constraints.md +80 -0
  404. package/dist/knowledge/references/saas.frontend.full-custom-view.definition.md +64 -0
  405. package/dist/knowledge/references/saas.frontend.inserted-view.identity-bindings-descriptor.md +149 -0
  406. package/dist/knowledge/references/saas.frontend.operation-key-and-resource-config-like.md +63 -0
  407. package/dist/knowledge/references/saas.frontend.quick-switcher.scope-field.md +102 -0
  408. package/dist/knowledge/references/saas.frontend.related-resource-embeds.md +86 -0
  409. package/dist/knowledge/references/saas.frontend.related-resource-preview.md +23 -0
  410. package/dist/knowledge/references/saas.frontend.related-resource-sections.md +28 -0
  411. package/dist/knowledge/references/saas.frontend.resource-header-title.md +43 -0
  412. package/dist/knowledge/references/saas.frontend.resource-layout-templates.md +215 -0
  413. package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +531 -0
  414. package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +210 -0
  415. package/dist/knowledge/references/saas.frontend.resource-ui-behavior-preset-map.md +39 -0
  416. package/dist/knowledge/references/saas.frontend.settings-hub.engine-destinations.md +58 -0
  417. package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +118 -0
  418. package/dist/knowledge/references/saas.frontend.view-definition-scope.md +42 -0
  419. package/dist/knowledge/references/saas.market.generation-agent.md +104 -0
  420. package/dist/knowledge/references/saas.models.core-resource-operation.md +86 -0
  421. package/dist/knowledge/references/saas.models.data-mode-read-list.md +395 -0
  422. package/dist/knowledge/references/saas.models.engine-capabilities.md +114 -0
  423. package/dist/knowledge/references/saas.models.error-type.md +45 -0
  424. package/dist/knowledge/references/saas.models.external-data-pipeline.md +162 -0
  425. package/dist/knowledge/references/saas.models.feature-limit-semantic.md +51 -0
  426. package/dist/knowledge/references/saas.models.flows-actors.agent-configuration.md +127 -0
  427. package/dist/knowledge/references/saas.models.flows-actors.agent-definition.md +115 -0
  428. package/dist/knowledge/references/saas.models.flows-actors.agent-invocation.md +52 -0
  429. package/dist/knowledge/references/saas.models.flows-actors.agent-prompt-spec.md +188 -0
  430. package/dist/knowledge/references/saas.models.http-api-binding.md +237 -0
  431. package/dist/knowledge/references/saas.models.navigation.layout.md +149 -0
  432. package/dist/knowledge/references/saas.models.organization-unit-narrowing-containment.md +22 -0
  433. package/dist/knowledge/references/saas.models.organization-unit-narrowing-declaration.md +42 -0
  434. package/dist/knowledge/references/saas.models.polymorphism.optout-business-key.md +62 -0
  435. package/dist/knowledge/references/saas.models.polymorphism.variant-definition.md +74 -0
  436. package/dist/knowledge/references/saas.models.provider-capabilities.md +97 -0
  437. package/dist/knowledge/references/saas.models.rate-limit-configuration.md +67 -0
  438. package/dist/knowledge/references/saas.models.relationship-handling-contract.md +30 -0
  439. package/dist/knowledge/references/saas.models.relationship-handling-settings.md +62 -0
  440. package/dist/knowledge/references/saas.models.relationship-nature-and-models.md +112 -0
  441. package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +431 -0
  442. package/dist/knowledge/references/saas.models.resource-config.forwarded-label.md +88 -0
  443. package/dist/knowledge/references/saas.models.resource-config.operation-api-call.md +89 -0
  444. package/dist/knowledge/references/saas.models.resource-config.operation-base.md +79 -0
  445. package/dist/knowledge/references/saas.models.resource-config.operation-mcp-exposure.md +49 -0
  446. package/dist/knowledge/references/saas.models.resource-config.operation-path.md +27 -0
  447. package/dist/knowledge/references/saas.models.resource-config.operation-union.md +26 -0
  448. package/dist/knowledge/references/saas.models.resource-config.operation-variant-for-key.md +62 -0
  449. package/dist/knowledge/references/saas.models.resource-config.resource-configuration.md +124 -0
  450. package/dist/knowledge/references/saas.models.resource-config.resource-relationships-buckets.md +38 -0
  451. package/dist/knowledge/references/saas.models.resource-config.resources-registry.md +69 -0
  452. package/dist/knowledge/references/saas.models.resource-config.searchable-relation.md +89 -0
  453. package/dist/knowledge/references/saas.models.resource-config.system-access-policy.md +121 -0
  454. package/dist/knowledge/references/saas.models.resource-config.token-generation.md +145 -0
  455. package/dist/knowledge/references/saas.models.resource-field-identifier.md +25 -0
  456. package/dist/knowledge/references/saas.models.resource-operation-display-risk.md +77 -0
  457. package/dist/knowledge/references/saas.models.resource-operation-variant-runtime.md +58 -0
  458. package/dist/knowledge/references/saas.models.resource-primary-scope.md +36 -0
  459. package/dist/knowledge/references/saas.models.resource-relationship-access-scope.md +26 -0
  460. package/dist/knowledge/references/saas.models.resource-relationship-builder-parameters.md +100 -0
  461. package/dist/knowledge/references/saas.models.resource-relationship-cardinality.md +57 -0
  462. package/dist/knowledge/references/saas.models.resource-relationship-declaration.md +69 -0
  463. package/dist/knowledge/references/saas.models.resource-relationship-resolved-semantics.md +60 -0
  464. package/dist/knowledge/references/saas.models.resource-relationship-schema.md +172 -0
  465. package/dist/knowledge/references/saas.models.resource-server-instance.md +109 -0
  466. package/dist/knowledge/references/saas.models.resource-type.md +24 -0
  467. package/dist/knowledge/references/saas.models.schema-family-builder.md +242 -0
  468. package/dist/knowledge/references/saas.models.scope-membership.md +143 -0
  469. package/dist/knowledge/references/saas.models.shared-domain-module.md +36 -0
  470. package/dist/knowledge/references/saas.models.shared-saas-module.md +36 -0
  471. package/dist/knowledge/references/saas.public-runtime.contract.md +229 -0
  472. package/dist/knowledge/references/saas.rag.retrieval-bounds.md +106 -0
  473. package/dist/knowledge/references/saas.rag.retrieval-refusals.md +89 -0
  474. package/dist/knowledge/references/saas.rag.retrieval-request.md +130 -0
  475. package/dist/knowledge/references/saas.rag.retrieval-result.md +147 -0
  476. package/dist/knowledge/references/saas.rag.retrieval-scores.md +54 -0
  477. package/dist/knowledge/references/saas.specifications.application-document-fact-specification.contract.md +59 -0
  478. package/dist/knowledge/references/saas.specifications.application-document-publication.contract.md +74 -0
  479. package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +1158 -0
  480. package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +2602 -0
  481. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.catalog-spec-shared.md +180 -0
  482. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.discriminated-union.md +138 -0
  483. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-offer.md +46 -0
  484. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-rating.md +47 -0
  485. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-article.md +49 -0
  486. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-blog-posting.md +62 -0
  487. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-breadcrumb-list.md +46 -0
  488. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-faq-page.md +51 -0
  489. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-offer.md +46 -0
  490. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-organization.md +48 -0
  491. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-product.md +59 -0
  492. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-review.md +46 -0
  493. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-website.md +46 -0
  494. package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +530 -0
  495. package/dist/knowledge/references/saas.specifications.composite-view-specification.md +49 -0
  496. package/dist/knowledge/references/saas.specifications.error-message-specification.md +92 -0
  497. package/dist/knowledge/references/saas.specifications.family-specifications.md +109 -0
  498. package/dist/knowledge/references/saas.specifications.feature-specification.md +93 -0
  499. package/dist/knowledge/references/saas.specifications.frontend-component-spec-factory.md +113 -0
  500. package/dist/knowledge/references/saas.specifications.frontend-component-spec-model.md +366 -0
  501. package/dist/knowledge/references/saas.specifications.resource-frontend-configuration-aspect.md +41 -0
  502. package/dist/knowledge/references/saas.specifications.resource-operation-spec.md +1978 -0
  503. package/dist/knowledge/references/saas.specifications.resource-pdf-template-spec.md +58 -0
  504. package/dist/knowledge/references/saas.specifications.resource-spec-code-handling.md +49 -0
  505. package/dist/knowledge/references/saas.specifications.resource-spec-config.md +156 -0
  506. package/dist/knowledge/references/saas.specifications.resource-spec-factory.md +171 -0
  507. package/dist/knowledge/references/saas.specifications.resource-spec-frontend-config-type.md +54 -0
  508. package/dist/knowledge/references/saas.specifications.resource-spec-frontend-prose.md +171 -0
  509. package/dist/knowledge/references/saas.website.astro.bridge.md +262 -0
  510. package/dist/knowledge/references/saas.website.astro.head-renderer.md +271 -0
  511. package/dist/knowledge/references/saas.website.astro.headers-renderer.md +41 -0
  512. package/dist/knowledge/references/saas.website.astro.i18n-helper.md +121 -0
  513. package/dist/knowledge/references/saas.website.astro.label-key-collector.md +117 -0
  514. package/dist/knowledge/references/saas.website.astro.label-loader.md +377 -0
  515. package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +46 -0
  516. package/dist/knowledge/references/saas.website.astro.pick-labels-for-page.md +90 -0
  517. package/dist/knowledge/references/saas.website.astro.robots-renderer.md +174 -0
  518. package/dist/knowledge/references/saas.website.astro.runtime-helper.md +187 -0
  519. package/dist/knowledge/references/saas.website.astro.site-context.md +141 -0
  520. package/dist/knowledge/references/saas.website.astro.sitemap-coverage.md +188 -0
  521. package/dist/knowledge/references/saas.website.astro.structured-data-renderer.md +174 -0
  522. package/dist/knowledge/references/saas.website.blog.bridge.md +396 -0
  523. package/dist/knowledge/references/saas.website.blog.collection-config.md +180 -0
  524. package/dist/knowledge/references/saas.website.blog.frontmatter.md +116 -0
  525. package/dist/knowledge/references/saas.website.blog.head-renderer.md +292 -0
  526. package/dist/knowledge/references/saas.website.blog.mdx-provider.md +100 -0
  527. package/dist/knowledge/references/saas.website.blog.post-renderer.md +291 -0
  528. package/dist/knowledge/references/saas.website.design-tokens.bundle.md +29 -0
  529. package/dist/knowledge/references/saas.website.design-tokens.colors.md +64 -0
  530. package/dist/knowledge/references/saas.website.design-tokens.radius.md +38 -0
  531. package/dist/knowledge/references/saas.website.factories.define-page-manifest.md +98 -0
  532. package/dist/knowledge/references/saas.website.factories.define-section.md +128 -0
  533. package/dist/knowledge/references/saas.website.label-keys.compose-helper.md +36 -0
  534. package/dist/knowledge/references/saas.website.label-keys.format.md +67 -0
  535. package/dist/knowledge/references/saas.website.label-pack.validator.md +206 -0
  536. package/dist/knowledge/references/saas.website.page-layout.component.md +217 -0
  537. package/dist/knowledge/references/saas.website.page-manifest.meta-label-keys.md +47 -0
  538. package/dist/knowledge/references/saas.website.page-manifest.route-path.md +49 -0
  539. package/dist/knowledge/references/saas.website.page-manifest.schema.md +186 -0
  540. package/dist/knowledge/references/saas.website.page-manifest.seo.md +46 -0
  541. package/dist/knowledge/references/saas.website.page.context.md +57 -0
  542. package/dist/knowledge/references/saas.website.primitives.button.md +123 -0
  543. package/dist/knowledge/references/saas.website.primitives.heading.md +103 -0
  544. package/dist/knowledge/references/saas.website.primitives.image.md +103 -0
  545. package/dist/knowledge/references/saas.website.primitives.internal-button.md +151 -0
  546. package/dist/knowledge/references/saas.website.primitives.internal-link.md +193 -0
  547. package/dist/knowledge/references/saas.website.primitives.link.md +78 -0
  548. package/dist/knowledge/references/saas.website.primitives.text.md +82 -0
  549. package/dist/knowledge/references/saas.website.refs.page.md +56 -0
  550. package/dist/knowledge/references/saas.website.refs.section.md +57 -0
  551. package/dist/knowledge/references/saas.website.root-config.navigation.md +37 -0
  552. package/dist/knowledge/references/saas.website.root-config.schema.md +192 -0
  553. package/dist/knowledge/references/saas.website.root-config.seo.md +98 -0
  554. package/dist/knowledge/references/saas.website.routing.localized-path.md +84 -0
  555. package/dist/knowledge/references/saas.website.runtime.context.md +174 -0
  556. package/dist/knowledge/references/saas.website.section.component.md +138 -0
  557. package/dist/knowledge/references/saas.website.section.context.md +63 -0
  558. package/dist/knowledge/references/saas.website.sections.category-enum.md +72 -0
  559. package/dist/knowledge/references/saas.website.sections.definition-schema.md +121 -0
  560. package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +37 -0
  561. package/dist/knowledge/references/saas.website.seo.robots-config.md +106 -0
  562. package/dist/knowledge/references/saas.website.seo.sitemap-config.md +73 -0
  563. package/dist/knowledge/references/saas.website.structured-data.payload-shape.md +71 -0
  564. package/dist/knowledge/references/saas.website.use-label-by-key.hook.md +45 -0
  565. package/dist/knowledge/references/saas.website.use-label.hook.md +82 -0
  566. package/dist/knowledge/references/saas.website.use-page.hook.md +30 -0
  567. package/dist/knowledge/references/saas.website.use-runtime.hook.md +36 -0
  568. package/dist/knowledge/references/saas.website.use-section.hook.md +30 -0
  569. package/dist/knowledge/references/saas.website.use-tokens.hook.md +32 -0
  570. package/dist/knowledge/references/vision.authored-metadata.config.md +64 -0
  571. package/dist/knowledge/references/vision.constraint.config.md +66 -0
  572. package/dist/knowledge/references/vision.idea.config.md +45 -0
  573. package/dist/knowledge/references/vision.mission.config.md +46 -0
  574. package/dist/knowledge/references/vision.problem.config.md +51 -0
  575. package/dist/knowledge/references/vision.references.conventions.md +115 -0
  576. package/dist/knowledge/references/vision.snapshot.config.md +85 -0
  577. package/dist/knowledge/references/vision.snapshot.validation.md +226 -0
  578. package/dist/knowledge/references/vision.success-criterion.config.md +60 -0
  579. package/dist/knowledge/references/zod.decorators.chainable-runtime.md +550 -0
  580. package/dist/knowledge/references/zod.decorators.conditional-visibility.md +104 -0
  581. package/dist/knowledge/references/zod.decorators.data-categories.md +197 -0
  582. package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +436 -0
  583. package/dist/knowledge/references/zod.decorators.display-edit-modes.md +174 -0
  584. package/dist/knowledge/references/zod.decorators.enums.frontend-handling.md +101 -0
  585. package/dist/knowledge/references/zod.decorators.field-spec-params.md +317 -0
  586. package/dist/knowledge/references/zod.decorators.file-generation.md +36 -0
  587. package/dist/knowledge/references/zod.decorators.file-rag-source.md +56 -0
  588. package/dist/knowledge/references/zod.decorators.file-schema.md +319 -0
  589. package/dist/knowledge/references/zod.decorators.foreign-key-display-mode.md +83 -0
  590. package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +459 -0
  591. package/dist/knowledge/references/zod.decorators.primitive-ui.md +123 -0
  592. package/dist/knowledge/references/zod.decorators.rag-source.md +164 -0
  593. package/dist/knowledge/references/zod.decorators.schema-metadata.md +122 -0
  594. package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +152 -0
  595. package/dist/knowledge/references/zod.decorators.shared-structural-params.md +314 -0
  596. package/dist/knowledge/references/zod.decorators.structural-lifecycle-params.md +529 -0
  597. package/dist/knowledge/references/zod.factories.bigdecimal.md +155 -0
  598. package/dist/knowledge/references/zod.factories.code.md +127 -0
  599. package/dist/knowledge/references/zod.factories.duration.md +246 -0
  600. package/dist/knowledge/references/zod.factories.money.md +166 -0
  601. package/dist/knowledge/references/zod.factories.phone.md +88 -0
  602. package/dist/knowledge/references/zod.factories.range.md +174 -0
  603. package/dist/knowledge/registries/assurance-authority-bases.json +15 -0
  604. package/dist/knowledge/registries/framework-topics.json +5212 -0
  605. package/dist/knowledge/registries/playbooks.json +488 -0
  606. package/dist/knowledge/registries/source-tags.json +7664 -0
  607. package/dist/knowledge/rules/resource-schema-awareness.md +77 -0
  608. package/dist/knowledge/skills/INDEX.md +349 -0
  609. package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +415 -0
  610. package/dist/knowledge/skills/application-consumer-documentation-authoring/examples/domain-use-case-and-admin-task.example.md +49 -0
  611. package/dist/knowledge/skills/application-consumer-documentation-authoring/references/source-and-ownership-routing.md +52 -0
  612. package/dist/knowledge/skills/application-database-migrations/SKILL.md +218 -0
  613. package/dist/knowledge/skills/application-database-migrations/references/framework-application-database-api.md +84 -0
  614. package/dist/knowledge/skills/application-database-migrations/references/framework-migration-change-risk-api.md +37 -0
  615. package/dist/knowledge/skills/application-database-migrations/references/migration-refusals.md +64 -0
  616. package/dist/knowledge/skills/application-database-migrations/references/postgresql-vs-mongodb-obligations.md +34 -0
  617. package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +323 -0
  618. package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-unit-narrowing-declaration-api.md +84 -0
  619. package/dist/knowledge/skills/backend-addon-wiring/SKILL.md +324 -0
  620. package/dist/knowledge/skills/backend-addon-wiring/references/backend-di-routing.md +7 -0
  621. package/dist/knowledge/skills/backend-addon-wiring/references/framework-backend-bootstrap-api.md +276 -0
  622. package/dist/knowledge/skills/backend-custom-operation/SKILL.md +374 -0
  623. package/dist/knowledge/skills/backend-custom-operation/references/framework-error-handling-api.md +118 -0
  624. package/dist/knowledge/skills/backend-custom-operation/references/framework-operation-base-and-path-api.md +107 -0
  625. package/dist/knowledge/skills/backend-custom-operation/references/framework-transactional-core-api.md +134 -0
  626. package/dist/knowledge/skills/backend-custom-operation/references/operation-file-conventions.md +10 -0
  627. package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +192 -0
  628. package/dist/knowledge/skills/brand-logo-authoring/references/brand-authoring-decisions.md +55 -0
  629. package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-asset-api.md +184 -0
  630. package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-snapshot-api.md +279 -0
  631. package/dist/knowledge/skills/compliance-document-authoring/SKILL.md +346 -0
  632. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +160 -0
  633. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +518 -0
  634. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-service-terms.md +158 -0
  635. package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-fact-specification-contract.md +95 -0
  636. package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-publication-contract.md +100 -0
  637. package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +1210 -0
  638. package/dist/knowledge/skills/compliance-document-authoring/references/framework-governed-document-after-drafting.md +40 -0
  639. package/dist/knowledge/skills/config-app-shell/SKILL.md +698 -0
  640. package/dist/knowledge/skills/config-app-shell/references/app-shell-surfaces.md +5 -0
  641. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +415 -0
  642. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-hosted-components-api.md +170 -0
  643. package/dist/knowledge/skills/config-app-shell/references/framework-command-menu-omnibox-api.md +212 -0
  644. package/dist/knowledge/skills/config-app-shell/references/framework-quick-switcher-scope-field-api.md +178 -0
  645. package/dist/knowledge/skills/config-design-system/SKILL.md +424 -0
  646. package/dist/knowledge/skills/config-design-system/references/design-system-file.md +10 -0
  647. package/dist/knowledge/skills/config-design-system/references/framework-design-system-configuration-api.md +77 -0
  648. package/dist/knowledge/skills/config-design-system/references/framework-material-profile-api.md +200 -0
  649. package/dist/knowledge/skills/config-design-system/references/framework-material-runtime-policy-api.md +68 -0
  650. package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +1212 -0
  651. package/dist/knowledge/skills/config-design-system/references/surface-policy-authoring.md +92 -0
  652. package/dist/knowledge/skills/config-navigation/SKILL.md +249 -0
  653. package/dist/knowledge/skills/config-navigation/references/framework-navigation-layout-api.md +152 -0
  654. package/dist/knowledge/skills/config-navigation/references/navigation-zones.md +5 -0
  655. package/dist/knowledge/skills/config-saas/SKILL.md +209 -0
  656. package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +221 -0
  657. package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +408 -0
  658. package/dist/knowledge/skills/config-saas/references/saas-config-scope.md +9 -0
  659. package/dist/knowledge/skills/config-saas-backend/SKILL.md +183 -0
  660. package/dist/knowledge/skills/config-saas-backend/references/framework-backend-authored-config-api.md +40 -0
  661. package/dist/knowledge/skills/configure-billing/SKILL.md +261 -0
  662. package/dist/knowledge/skills/configure-billing/references/config-chain-and-failure-map.md +90 -0
  663. package/dist/knowledge/skills/configure-billing/references/example-backend-provider-module-shape.md +122 -0
  664. package/dist/knowledge/skills/configure-billing/references/example-provider-contribution-and-backend-config.md +48 -0
  665. package/dist/knowledge/skills/configure-billing/references/framework-backend-provider-reachability-api.md +69 -0
  666. package/dist/knowledge/skills/configure-billing/references/framework-billing-resolution-failure-api.md +57 -0
  667. package/dist/knowledge/skills/email-add-template/SKILL.md +439 -0
  668. package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +9 -0
  669. package/dist/knowledge/skills/email-add-template/references/framework-email-template-api.md +72 -0
  670. package/dist/knowledge/skills/email-definition-wiring/SKILL.md +62 -0
  671. package/dist/knowledge/skills/email-labels-authoring/SKILL.md +64 -0
  672. package/dist/knowledge/skills/email-template-authoring/SKILL.md +62 -0
  673. package/dist/knowledge/skills/engine-component-registration/SKILL.md +257 -0
  674. package/dist/knowledge/skills/engine-component-registration/references/component-registration-file.md +7 -0
  675. package/dist/knowledge/skills/engine-component-registration/references/framework-component-registration-api.md +24 -0
  676. package/dist/knowledge/skills/engine-product-definitions/SKILL.md +429 -0
  677. package/dist/knowledge/skills/engine-product-definitions/references/framework-engine-product-definitions-api.md +287 -0
  678. package/dist/knowledge/skills/engine-product-definitions/references/product-registry-scope.md +5 -0
  679. package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +491 -0
  680. package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +227 -0
  681. package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-named-a2a-agents-contract.md +143 -0
  682. package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +368 -0
  683. package/dist/knowledge/skills/flows-actors-chat-assistant/examples/todo-assistant.example.md +226 -0
  684. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-tool-api.md +208 -0
  685. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-view-api.md +286 -0
  686. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +376 -0
  687. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-definition-api.md +262 -0
  688. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-invocation-api.md +130 -0
  689. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-prompt-spec-api.md +214 -0
  690. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-operation-and-model-api.md +195 -0
  691. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/operation-key-selection.md +60 -0
  692. package/dist/knowledge/skills/frontend-cdn-publish/SKILL.md +237 -0
  693. package/dist/knowledge/skills/frontend-cdn-publish/references/cloudflare-and-operator-setup.md +56 -0
  694. package/dist/knowledge/skills/frontend-cdn-publish/references/framework-cdn-config-api.md +176 -0
  695. package/dist/knowledge/skills/i18n-label-generation/SKILL.md +261 -0
  696. package/dist/knowledge/skills/i18n-label-generation/references/framework-labelling-sections-api.md +67 -0
  697. package/dist/knowledge/skills/i18n-label-generation/references/label-placement.md +7 -0
  698. package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +269 -0
  699. package/dist/knowledge/skills/i18n-rerun-pipeline/references/framework-labelling-sections-api.md +67 -0
  700. package/dist/knowledge/skills/i18n-rerun-pipeline/references/i18n-routing.md +9 -0
  701. package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +245 -0
  702. package/dist/knowledge/skills/i18n-translation-rerun/references/framework-labelling-sections-api.md +67 -0
  703. package/dist/knowledge/skills/i18n-translation-rerun/references/translation-workflow.md +17 -0
  704. package/dist/knowledge/skills/infra-environment-config/SKILL.md +646 -0
  705. package/dist/knowledge/skills/infra-environment-config/references/framework-application-database-api.md +77 -0
  706. package/dist/knowledge/skills/infra-environment-config/references/framework-backing-services-api.md +282 -0
  707. package/dist/knowledge/skills/infra-environment-config/references/framework-environment-deployment-api.md +265 -0
  708. package/dist/knowledge/skills/infra-environment-config/references/infra-config-files.md +7 -0
  709. package/dist/knowledge/skills/journey-approve/SKILL.md +43 -0
  710. package/dist/knowledge/skills/journey-bootstrap-scope/SKILL.md +42 -0
  711. package/dist/knowledge/skills/journey-next/SKILL.md +42 -0
  712. package/dist/knowledge/skills/journey-report/SKILL.md +43 -0
  713. package/dist/knowledge/skills/journey-run/SKILL.md +55 -0
  714. package/dist/knowledge/skills/journey-status/SKILL.md +50 -0
  715. package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +370 -0
  716. package/dist/knowledge/skills/local-environment-bootstrap/references/initialization-recovery-recipe.md +50 -0
  717. package/dist/knowledge/skills/local-environment-bootstrap/references/local-environment-troubleshooting.md +409 -0
  718. package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +247 -0
  719. package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +474 -0
  720. package/dist/knowledge/skills/market-add-feature-benefit/references/framework-feature-benefit-api.md +139 -0
  721. package/dist/knowledge/skills/market-alternatives/SKILL.md +543 -0
  722. package/dist/knowledge/skills/market-authoring-overview/SKILL.md +354 -0
  723. package/dist/knowledge/skills/market-authoring-overview/references/framework-market-references-api.md +138 -0
  724. package/dist/knowledge/skills/market-authoring-overview/references/framework-market-snapshot-api.md +129 -0
  725. package/dist/knowledge/skills/market-category/SKILL.md +290 -0
  726. package/dist/knowledge/skills/market-channels/SKILL.md +361 -0
  727. package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +2752 -0
  728. package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +2443 -0
  729. package/dist/knowledge/skills/market-generation-cli/SKILL.md +1484 -0
  730. package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +1230 -0
  731. package/dist/knowledge/skills/market-icp/SKILL.md +625 -0
  732. package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +352 -0
  733. package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +415 -0
  734. package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1439 -0
  735. package/dist/knowledge/skills/market-persona/SKILL.md +407 -0
  736. package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +392 -0
  737. package/dist/knowledge/skills/market-positioning-authoring/references/framework-positioning-api.md +97 -0
  738. package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +665 -0
  739. package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +620 -0
  740. package/dist/knowledge/skills/market-scoring-interpretation/references/framework-scoring-api.md +291 -0
  741. package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1706 -0
  742. package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1228 -0
  743. package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +260 -0
  744. package/dist/knowledge/skills/market-triggers-and-journey/SKILL.md +579 -0
  745. package/dist/knowledge/skills/module-companion-exports/SKILL.md +318 -0
  746. package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +544 -0
  747. package/dist/knowledge/skills/module-registration/SKILL.md +212 -0
  748. package/dist/knowledge/skills/module-registration/references/framework-domain-modules-api.md +366 -0
  749. package/dist/knowledge/skills/module-registration/references/registry-files.md +9 -0
  750. package/dist/knowledge/skills/module-relationships/SKILL.md +523 -0
  751. package/dist/knowledge/skills/module-relationships/references/cross-resource-fk-checklist.md +7 -0
  752. package/dist/knowledge/skills/module-relationships/references/framework-resource-relationship-authoring-api.md +738 -0
  753. package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +174 -0
  754. package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-api.md +203 -0
  755. package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-spec-api.md +62 -0
  756. package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +239 -0
  757. package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-file-provider-constraints-api.md +90 -0
  758. package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-frontend-provider-module-api.md +50 -0
  759. package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +652 -0
  760. package/dist/knowledge/skills/rate-limit-authoring/references/framework-rate-limit-policy-api.md +182 -0
  761. package/dist/knowledge/skills/rate-limit-authoring/references/scope-key-and-bucket-conventions.md +137 -0
  762. package/dist/knowledge/skills/resource-add-field/SKILL.md +272 -0
  763. package/dist/knowledge/skills/resource-add-field/examples/add-priority-field-to-todos.example.md +153 -0
  764. package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +845 -0
  765. package/dist/knowledge/skills/resource-add-module/SKILL.md +322 -0
  766. package/dist/knowledge/skills/resource-add-module/references/framework-new-module-wiring-api.md +67 -0
  767. package/dist/knowledge/skills/resource-add-module/references/module-scaffold-layout.md +15 -0
  768. package/dist/knowledge/skills/resource-add-resource/SKILL.md +222 -0
  769. package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +540 -0
  770. package/dist/knowledge/skills/resource-add-resource/references/scaffold-surfaces-checklist.md +25 -0
  771. package/dist/knowledge/skills/resource-config-wiring/SKILL.md +370 -0
  772. package/dist/knowledge/skills/resource-config-wiring/references/config-change-routing.md +11 -0
  773. package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +622 -0
  774. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-operation-scope-enums-api.md +248 -0
  775. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +1769 -0
  776. package/dist/knowledge/skills/resource-config-wiring/references/framework-system-access-reads-api.md +1209 -0
  777. package/dist/knowledge/skills/resource-custom-view/SKILL.md +228 -0
  778. package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +693 -0
  779. package/dist/knowledge/skills/resource-external-data/SKILL.md +349 -0
  780. package/dist/knowledge/skills/resource-external-data/references/framework-external-data-pipeline-api.md +187 -0
  781. package/dist/knowledge/skills/resource-external-data/references/framework-http-api-binding-api.md +261 -0
  782. package/dist/knowledge/skills/resource-external-data/references/lane-selection.md +49 -0
  783. package/dist/knowledge/skills/resource-external-data/references/pipeline-destination-schema.md +43 -0
  784. package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +308 -0
  785. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-named-mcp-servers-contract.md +166 -0
  786. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-resource-mcp-exposure-contract.md +63 -0
  787. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-catalogue-withdrawal-and-verification.md +77 -0
  788. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-client-registration-postures.md +90 -0
  789. package/dist/knowledge/skills/resource-rag-source-fields/SKILL.md +424 -0
  790. package/dist/knowledge/skills/resource-rag-source-fields/references/corpus-field-selection.md +90 -0
  791. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +261 -0
  792. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-file-rag-source-api.md +117 -0
  793. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-retrieval-api.md +597 -0
  794. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-source-decorator-api.md +181 -0
  795. package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +318 -0
  796. package/dist/knowledge/skills/resource-schema-authoring/examples/add-enum-field-with-ui.example.md +132 -0
  797. package/dist/knowledge/skills/resource-schema-authoring/examples/basic-resource-schema.example.md +62 -0
  798. package/dist/knowledge/skills/resource-schema-authoring/references/decorator-layer-map.md +63 -0
  799. package/dist/knowledge/skills/resource-schema-authoring/references/field-type-selection.md +70 -0
  800. package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +559 -0
  801. package/dist/knowledge/skills/resource-schema-authoring/references/framework-personal-data-category-api.md +245 -0
  802. package/dist/knowledge/skills/resource-schema-authoring/references/framework-polymorphic-resources-api.md +147 -0
  803. package/dist/knowledge/skills/resource-schema-authoring/references/framework-schema-family-api.md +247 -0
  804. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +164 -0
  805. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +327 -0
  806. package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +1286 -0
  807. package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +1080 -0
  808. package/dist/knowledge/skills/resource-schema-authoring/references/polymorphic-per-scope-resources.md +75 -0
  809. package/dist/knowledge/skills/resource-schema-authoring/references/schema-variants-and-discriminators.md +62 -0
  810. package/dist/knowledge/skills/resource-schema-authoring/references/shared-layer-decorator-checklist.md +69 -0
  811. package/dist/knowledge/skills/resource-schema-authoring/references/special-factories.md +45 -0
  812. package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +389 -0
  813. package/dist/knowledge/skills/resource-ui-behavior/references/framework-conditional-visibility-api.md +106 -0
  814. package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +176 -0
  815. package/dist/knowledge/skills/resource-ui-behavior/references/framework-enum-frontend-handling-api.md +103 -0
  816. package/dist/knowledge/skills/resource-ui-behavior/references/framework-foreign-key-ui-api.md +97 -0
  817. package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +839 -0
  818. package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +461 -0
  819. package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +125 -0
  820. package/dist/knowledge/skills/resource-ui-behavior/references/framework-related-resource-embeds-api.md +245 -0
  821. package/dist/knowledge/skills/resource-ui-behavior/references/framework-resource-layout-templates-api.md +302 -0
  822. package/dist/knowledge/skills/resource-ui-behavior/references/ui-layer-boundaries.md +13 -0
  823. package/dist/knowledge/skills/seeding-authoring/SKILL.md +569 -0
  824. package/dist/knowledge/skills/seeding-authoring/references/data-seeding-mode-picker.md +154 -0
  825. package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +176 -0
  826. package/dist/knowledge/skills/seeding-operations/SKILL.md +505 -0
  827. package/dist/knowledge/skills/seeding-operations/references/data-seeding-admin-runbook.md +337 -0
  828. package/dist/knowledge/skills/seeding-operations/references/data-seeding-cron-scheduler.md +171 -0
  829. package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +662 -0
  830. package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +134 -0
  831. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +65 -0
  832. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +127 -0
  833. package/dist/knowledge/skills/spec-catalog-authoring/SKILL.md +726 -0
  834. package/dist/knowledge/skills/spec-catalog-authoring/references/catalog-spec-pattern-overview.md +242 -0
  835. package/dist/knowledge/skills/spec-companion-exports/SKILL.md +362 -0
  836. package/dist/knowledge/skills/spec-companion-exports/references/companion-export-checklist.md +8 -0
  837. package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +533 -0
  838. package/dist/knowledge/skills/spec-component-update/SKILL.md +315 -0
  839. package/dist/knowledge/skills/spec-component-update/references/component-spec-props.md +8 -0
  840. package/dist/knowledge/skills/spec-component-update/references/framework-frontend-component-spec-api.md +481 -0
  841. package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +283 -0
  842. package/dist/knowledge/skills/spec-composite-view-update/references/composite-spec-sections.md +5 -0
  843. package/dist/knowledge/skills/spec-composite-view-update/references/framework-composite-view-specification-api.md +51 -0
  844. package/dist/knowledge/skills/spec-family-update/SKILL.md +300 -0
  845. package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +13 -0
  846. package/dist/knowledge/skills/spec-family-update/references/framework-error-message-specifications-api.md +108 -0
  847. package/dist/knowledge/skills/spec-family-update/references/framework-family-specifications-api.md +111 -0
  848. package/dist/knowledge/skills/spec-feature-update/SKILL.md +306 -0
  849. package/dist/knowledge/skills/spec-feature-update/references/feature-spec-scope.md +5 -0
  850. package/dist/knowledge/skills/spec-feature-update/references/framework-feature-specification-api.md +95 -0
  851. package/dist/knowledge/skills/spec-resource-update/SKILL.md +220 -0
  852. package/dist/knowledge/skills/spec-resource-update/references/framework-field-spec-params-api.md +319 -0
  853. package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +2610 -0
  854. package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +12 -0
  855. package/dist/knowledge/skills/spec-update-after-change/SKILL.md +195 -0
  856. package/dist/knowledge/skills/spec-update-after-change/references/framework-spec-factory-api.md +173 -0
  857. package/dist/knowledge/skills/spec-update-after-change/references/spec-maintenance-by-surface.md +33 -0
  858. package/dist/knowledge/skills/spec-update-after-change/references/surface-to-spec-routing.md +14 -0
  859. package/dist/knowledge/skills/views-add-composite-view/SKILL.md +259 -0
  860. package/dist/knowledge/skills/views-add-composite-view/references/composite-view-routing.md +10 -0
  861. package/dist/knowledge/skills/views-add-composite-view/references/framework-inserted-view-identity-api.md +151 -0
  862. package/dist/knowledge/skills/views-add-custom-view/SKILL.md +225 -0
  863. package/dist/knowledge/skills/views-add-custom-view/references/custom-view-routing.md +10 -0
  864. package/dist/knowledge/skills/views-add-custom-view/references/framework-view-scope-and-full-custom-api.md +107 -0
  865. package/dist/knowledge/skills/views-app-level/SKILL.md +201 -0
  866. package/dist/knowledge/skills/views-app-level/references/app-level-views-routing.md +9 -0
  867. package/dist/knowledge/skills/views-app-level/references/framework-view-scope-and-full-custom-api.md +107 -0
  868. package/dist/knowledge/skills/views-chart-authoring/SKILL.md +264 -0
  869. package/dist/knowledge/skills/views-chart-authoring/references/chart-view-checklist.md +7 -0
  870. package/dist/knowledge/skills/views-chart-authoring/references/framework-chart-view-contracts-api.md +82 -0
  871. package/dist/knowledge/skills/views-chart-authoring/references/framework-inserted-view-identity-api.md +152 -0
  872. package/dist/knowledge/skills/views-composite-authoring/SKILL.md +302 -0
  873. package/dist/knowledge/skills/views-composite-authoring/references/composite-embedding-checklist.md +23 -0
  874. package/dist/knowledge/skills/views-composite-authoring/references/framework-composite-view-contracts-api.md +133 -0
  875. package/dist/knowledge/skills/views-composite-authoring/references/framework-inserted-view-identity-api.md +152 -0
  876. package/dist/knowledge/skills/views-execution-authoring/SKILL.md +209 -0
  877. package/dist/knowledge/skills/views-execution-authoring/references/execution-view-checklist.md +7 -0
  878. package/dist/knowledge/skills/views-execution-authoring/references/framework-execution-view-contracts-api.md +389 -0
  879. package/dist/knowledge/skills/views-execution-authoring/references/framework-inserted-view-identity-api.md +152 -0
  880. package/dist/knowledge/skills/website-anonymous-session/SKILL.md +444 -0
  881. package/dist/knowledge/skills/website-blog-authoring/SKILL.md +587 -0
  882. package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +1426 -0
  883. package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +553 -0
  884. package/dist/knowledge/skills/website-bundle-discipline/references/example-website-button-override.md +52 -0
  885. package/dist/knowledge/skills/website-bundle-discipline/references/website-bundle-rules.md +357 -0
  886. package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +511 -0
  887. package/dist/knowledge/skills/website-factory-advanced/SKILL.md +376 -0
  888. package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +304 -0
  889. package/dist/knowledge/skills/website-label-pack/SKILL.md +390 -0
  890. package/dist/knowledge/skills/website-layout-overrides/SKILL.md +461 -0
  891. package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +264 -0
  892. package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +414 -0
  893. package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +366 -0
  894. package/dist/knowledge/skills/website-page-authoring/SKILL.md +420 -0
  895. package/dist/knowledge/skills/website-page-variants/SKILL.md +256 -0
  896. package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +302 -0
  897. package/dist/knowledge/skills/website-section-contact/SKILL.md +950 -0
  898. package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +579 -0
  899. package/dist/knowledge/skills/website-section-cta/SKILL.md +822 -0
  900. package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +579 -0
  901. package/dist/knowledge/skills/website-section-faq/SKILL.md +917 -0
  902. package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +579 -0
  903. package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +878 -0
  904. package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +579 -0
  905. package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +895 -0
  906. package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +579 -0
  907. package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +814 -0
  908. package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +579 -0
  909. package/dist/knowledge/skills/website-section-hero/SKILL.md +944 -0
  910. package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +583 -0
  911. package/dist/knowledge/skills/website-section-pricing/SKILL.md +934 -0
  912. package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +579 -0
  913. package/dist/knowledge/skills/website-section-social-proof/SKILL.md +912 -0
  914. package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +579 -0
  915. package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +624 -0
  916. package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +633 -0
  917. package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +193 -0
  918. package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +790 -0
  919. package/dist/knowledge/topic-index.json +17510 -0
  920. package/dist/tsconfig.build.tsbuildinfo +1 -0
  921. package/dist/tsconfig.tsbuildinfo +1 -0
  922. package/package.json +49 -0
@@ -0,0 +1,994 @@
1
+ # saas.backend.system-access-service
2
+
3
+ ## Import Origins
4
+
5
+ - `@wildo-ai/saas-backend-lib`
6
+
7
+ ## Source Excerpts
8
+
9
+ ### Origin Package: `@wildo-ai/saas-backend-lib`
10
+
11
+ ```typescript
12
+ *
13
+ * Read a resource using a synthesised INTERNALLY_INITIATED_REQUEST execution
14
+ * context with system-level admin roles, regardless of the originating user's
15
+ * roles. Use this for server-side policy / configuration loads that drive runtime
16
+ * behaviour (webhook config, SSO config, SIEM export config, …) where the
17
+ * originating user is not necessarily the configurer of the policy and therefore
18
+ * cannot satisfy the resource's READ ACL.
19
+ *
20
+ * REQUIRES the target resource to opt in via `systemAccessPolicy.read = ALLOWED`
21
+ * on its resource configuration — otherwise this throws `ErrorType.CONFIGURATION`
22
+ * (fail-closed; a never-registered resource throws `ErrorType.INTERNAL` first).
23
+ * The returned record is the FULL super-admin view (every field, no feature
24
+ * gating), so the caller MUST enforce an explicit alternative authorization and
25
+ * project only what is safe to surface to the originating (often lower-privilege)
26
+ * request.
27
+ *
28
+ * Behaviour notes:
29
+ * - The synthesised EC is `INTERNALLY_INITIATED_REQUEST` — feature resolution
30
+ * returns "all features enabled" for it (the call is server-internal).
31
+ * - `scopeContext` (optional) seeds the EC's `contextResourcesFieldIdentifier`
32
+ * (the WHICH-resources-in-scope channel) so `buildContextualFilter` scopes
33
+ * the read to the right tenant FK (e.g. `organizationId`). It must NOT go on
34
+ * `initiatorIds` — the internal EC fail-closed rejects identity fields there
35
+ * (see {@link buildSystemScopeContextMap}). When omitted, the caller scopes
36
+ * via the filter argument.
37
+ * - Role injection is APPLICATION-scoped `APP_ADMIN_SUPER_ADMIN` — the broadest
38
+ * system role, accepted by every variant's READ ACL.
39
+ */
40
+ public async readAsSystem<T = any>(
41
+ resourceType: ResourceType,
42
+ id_or_ids_or_filter: IdOrIdsOrFilterType,
43
+ options?: ServiceOptions & {
44
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
45
+ /**
46
+ * Skip the `SYSTEM_CONTEXT_READ` privileged-access audit for THIS call. For SELF-REFERENTIAL
47
+ * internal reads that are framework plumbing rather than tenant-actionable access — e.g. the
48
+ * audit pipeline resolving a user's memberships / an org's SIEM config to ROUTE an audit event
49
+ * — where auditing the read would only amplify (and can recurse into) the audit trail. Genuine
50
+ * privileged reads leave this unset so they still audit.
51
+ */
52
+ suppressSystemAudit?: boolean;
53
+ },
54
+ ): Promise<T | null> {
55
+ // Guard 1 (fail-closed): the resource must explicitly opt into system READ.
56
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.READ);
57
+
58
+ const operationPath: ResourceConfiguration_OperationPath<any, any> = options?.variantKey
59
+ ? this.resourcesRegistry.getServiceOperationPath(resourceType, CoreResourceOperation.READ, options.variantKey)
60
+ : this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.READ);
61
+
62
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
63
+ operation: operationPath,
64
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
65
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
66
+ initiatorRoles: [
67
+ {
68
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
69
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
70
+ },
71
+ ],
72
+ });
73
+
74
+ const result = await this.getServicesRegistryHandler().read<T>(resourceType, systemContext, id_or_ids_or_filter, options);
75
+ // Guard 4: emit a best-effort privileged-access audit event. Never blocks or
76
+ // fails the read — `?.` short-circuits when audit is unbound and errors are
77
+ // swallowed (`logEvent` is already fire-and-forget internally).
78
+ if (!options?.suppressSystemAudit) {
79
+ await this.emitPrivilegedReadAudit({
80
+ resourceType: resourceType as string,
81
+ operation: CoreResourceOperation.READ,
82
+ resultCount: result == null ? 0 : 1,
83
+ organizationId: options?.scopeContext?.organizationId,
84
+ scopeContext: options?.scopeContext,
85
+ performedByRuntime: this.describeRuntimeForAudit(),
86
+ });
87
+ }
88
+ return result;
89
+ }
90
+
91
+ /**
92
+ * List resources using a synthesised INTERNALLY_INITIATED_REQUEST execution
93
+ * context with system-level admin roles. The cross-scope sibling of
94
+ * {@link readAsSystem}: use it for server-side LISTs that must span scopes the
95
+ * originating user is not a member of (e.g. "all pending invitations for this
96
+ * email across every organization"), where a normal scoped LIST would filter the
97
+ * rows out by the caller's scope. Same role/scope semantics as `readAsSystem`;
98
+ * with no `pagination` the return is a plain `T[]`.
99
+ */
100
+ public async listAsSystem<T = any>(
101
+ resourceType: ResourceType,
102
+ filter?: FilterQuery<any>,
103
+ pagination?: Partial<Resources_PaginationRequest>,
104
+ options?: ServiceOptions & {
105
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
106
+ /** Skip the `SYSTEM_CONTEXT_READ` audit for a self-referential internal routing read — see {@link readAsSystem}. */
107
+ suppressSystemAudit?: boolean;
108
+ },
109
+ ): Promise<T[] | Resources_PaginatedResult<T>> {
110
+ // Guard 1 (fail-closed): the resource must explicitly opt into system LIST.
111
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.LIST);
112
+
113
+ const operationPath: ResourceConfiguration_OperationPath<any, any> = options?.variantKey
114
+ ? this.resourcesRegistry.getServiceOperationPath(resourceType, CoreResourceOperation.LIST, options.variantKey)
115
+ : this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.LIST);
116
+
117
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
118
+ operation: operationPath,
119
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
120
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
121
+ initiatorRoles: [
122
+ {
123
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
124
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
125
+ },
126
+ ],
127
+ });
128
+
129
+ const result = await this.getServicesRegistryHandler().list<T>(resourceType, systemContext, filter, pagination, options);
130
+ // Guard 4: best-effort privileged-access audit (never blocks or fails the list).
131
+ if (!options?.suppressSystemAudit) {
132
+ const resultCount = Array.isArray(result) ? result.length : result.data?.length;
133
+ await this.emitPrivilegedReadAudit({
134
+ resourceType: resourceType as string,
135
+ operation: CoreResourceOperation.LIST,
136
+ resultCount,
137
+ organizationId: options?.scopeContext?.organizationId,
138
+ scopeContext: options?.scopeContext,
139
+ performedByRuntime: this.describeRuntimeForAudit(),
140
+ });
141
+ }
142
+ return result;
143
+ }
144
+
145
+ // ═══════════════════════════════════════════════════════════════════════════════════════════════
146
+ // RETENTION SEE-THROUGH primitives (M5b) — privileged reads that REVEAL retained (impersonalized-and-
147
+ // retained) rows the M5a hide-predicate keeps hidden from normal callers. Distinct from readAsSystem/
148
+ // listAsSystem: they assert the `seeRetained` policy verb (NOT read/list), require a privileged HUMAN
149
+ // role, SET the EC see-through flag, and emit the HUMAN-attributed `RETAINED_DATA_ACCESS` audit
150
+ // (accessingUserId + reason threaded in — this layer has no ambient user). Strictly read-only.
151
+ // ═══════════════════════════════════════════════════════════════════════════════════════════════
152
+
153
+ /**
154
+ * Fail-closed gate for the retention see-through verb. Unlike {@link assertSystemAccessAllowed}
155
+ * (whose op→verb map is 1:1), the see-through reads run over the resource's READ / LIST core op yet
156
+ * must assert the SEPARATE `seeRetained` verb — so this is a dedicated check, not a map entry.
157
+ */
158
+ private assertSeeRetainedAllowed(resourceType: ResourceType): void {
159
+ const config = this.resourcesRegistry.getResourceConfiguration(resourceType);
160
+ if (config.systemAccessPolicy?.seeRetained !== ResourceSystemAccessMode.ALLOWED) {
161
+ throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
162
+ context: {
163
+ reason: 'see_retained_access_not_permitted',
164
+ resourceType,
165
+ message:
166
+ `readRetainedAsSystem / listRetainedAsSystem is not permitted for resource ` +
167
+ `'${String(resourceType)}': its systemAccessPolicy.seeRetained is not ALLOWED (fail-closed). ` +
168
+ `This grant is derived automatically when the resource opts into retentionPolicy.`,
169
+ },
170
+ });
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Privileged-role gate for a see-through read: the HUMAN principal must hold a role authorized to
176
+ * reveal retained (scrubbed) PII. Phase 1 gates on `APP_ADMIN_SUPER_ADMIN` only (super-admin already
177
+ * has full access); a dedicated `COMPLIANCE_AUDITOR` role is a purely-additive follow-up — add it to
178
+ * the `authorized` set once that `_core` role lands. Thrown as AUTHORIZATION (a human 403), unlike the
179
+ * CONFIGURATION error above (a resource-opt-in problem).
180
+ */
181
+ private assertSeeThroughRole(accessingUserRoles: string[]): void {
182
+ const authorized = accessingUserRoles.some(r => r === CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN);
183
+ if (!authorized) {
184
+ throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {
185
+ context: {
186
+ reason: 'see_through_role_required',
187
+ message:
188
+ `A retention see-through read requires a privileged role ` +
189
+ `(${CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN}); the caller's roles do not include one.`,
190
+ },
191
+ });
192
+ }
193
+ }
194
+
195
+ /**
196
+ * Fail-closed attribution guard: a see-through reveal of scrubbed PII is only permitted with a REAL
197
+ * human id AND a real reason. The `RETAINED_DATA_ACCESS` event schema pins both as `.trim().min(1)`,
198
+ * but the audit store persists `eventData` as an unparsed record — so this is the ENFORCEMENT point
199
+ * that stops a blank/whitespace attribution from producing an anonymous, reason-less audited reveal
200
+ * (which would defeat the entire justification for allowing the read). Thrown as VALIDATION.
201
+ */
202
+ private assertSeeThroughAttribution(accessingUserId: string, reason: string): void {
203
+ if (!accessingUserId?.trim() || !reason?.trim()) {
204
+ throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
205
+ context: {
206
+ reason: 'see_through_attribution_required',
207
+ message:
208
+ `A retention see-through read requires a non-empty accessingUserId AND reason ` +
209
+ `(human attribution + justification for revealing scrubbed PII); neither may be blank.`,
210
+ },
211
+ });
212
+ }
213
+ }
214
+
215
+ /**
216
+ * SEE-THROUGH single-record read (M5b): reveals a RETAINED (impersonalized-and-retained) record that
217
+ * the M5a hide-predicate hides from normal callers. Fail-closed on the `seeRetained` policy verb + a
218
+ * privileged HUMAN role; sets the EC see-through flag so `buildContextualFilter` suppresses ONLY the
219
+ * retention predicate for THIS read (scope still applies); emits the HUMAN-attributed
220
+ * `RETAINED_DATA_ACCESS` audit. The human's id/roles + a `reason` are REQUIRED — this layer has no
221
+ * ambient user. Strictly read-only.
222
+ */
223
+ public async readRetainedAsSystem<T = any>(
224
+ resourceType: ResourceType,
225
+ id_or_ids_or_filter: IdOrIdsOrFilterType,
226
+ auth: { accessingUserId: string; accessingUserRoles: string[]; reason: string },
227
+ options?: ServiceOptions & {
228
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
229
+ },
230
+ ): Promise<T | null> {
231
+ this.assertSeeRetainedAllowed(resourceType);
232
+ this.assertSeeThroughRole(auth.accessingUserRoles);
233
+ this.assertSeeThroughAttribution(auth.accessingUserId, auth.reason);
234
+
235
+ const operationPath: ResourceConfiguration_OperationPath<any, any> = options?.variantKey
236
+ ? this.resourcesRegistry.getServiceOperationPath(resourceType, CoreResourceOperation.READ, options.variantKey)
237
+ : this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.READ);
238
+
239
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
240
+ operation: operationPath,
241
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
242
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
243
+ initiatorRoles: [
244
+ {
245
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
246
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
247
+ },
248
+ ],
249
+ });
250
+ // M5b: reveal retained rows for THIS read only (suppresses ONLY the retention predicate, not scope).
251
+ systemContext.setSeeRetainedData(true);
252
+
253
+ const result = await this.getServicesRegistryHandler().read<T>(resourceType, systemContext, id_or_ids_or_filter, options);
254
+
255
+ // M6: HUMAN-attributed, reason-bearing, best-effort (never blocks/fails the read).
256
+ this.auditLogsService?.logRetainedDataAccess({
257
+ accessingUserId: auth.accessingUserId,
258
+ roles: auth.accessingUserRoles,
259
+ reason: auth.reason,
260
+ resourceType: resourceType as string,
261
+ operationIdentifier: 'readRetainedAsSystem',
262
+ retainedRecordCount: result == null ? 0 : 1,
263
+ organizationId: options?.scopeContext?.organizationId,
264
+ }).catch(() => { /* audit is best-effort */ });
265
+
266
+ return result;
267
+ }
268
+
269
+ /**
270
+ * SEE-THROUGH collection read (M5b): the list sibling of {@link readRetainedAsSystem}. Same gates
271
+ * (`seeRetained` verb + privileged role), same EC see-through flag, same HUMAN-attributed audit.
272
+ */
273
+ public async listRetainedAsSystem<T = any>(
274
+ resourceType: ResourceType,
275
+ auth: { accessingUserId: string; accessingUserRoles: string[]; reason: string },
276
+ filter?: FilterQuery<any>,
277
+ pagination?: Partial<Resources_PaginationRequest>,
278
+ options?: ServiceOptions & {
279
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
280
+ },
281
+ ): Promise<T[] | Resources_PaginatedResult<T>> {
282
+ this.assertSeeRetainedAllowed(resourceType);
283
+ this.assertSeeThroughRole(auth.accessingUserRoles);
284
+ this.assertSeeThroughAttribution(auth.accessingUserId, auth.reason);
285
+
286
+ const operationPath: ResourceConfiguration_OperationPath<any, any> = options?.variantKey
287
+ ? this.resourcesRegistry.getServiceOperationPath(resourceType, CoreResourceOperation.LIST, options.variantKey)
288
+ : this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.LIST);
289
+
290
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
291
+ operation: operationPath,
292
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
293
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
294
+ initiatorRoles: [
295
+ {
296
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
297
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
298
+ },
299
+ ],
300
+ });
301
+ systemContext.setSeeRetainedData(true);
302
+
303
+ const result = await this.getServicesRegistryHandler().list<T>(resourceType, systemContext, filter, pagination, options);
304
+ const retainedRecordCount = Array.isArray(result) ? result.length : result.data?.length;
305
+
306
+ this.auditLogsService?.logRetainedDataAccess({
307
+ accessingUserId: auth.accessingUserId,
308
+ roles: auth.accessingUserRoles,
309
+ reason: auth.reason,
310
+ resourceType: resourceType as string,
311
+ operationIdentifier: 'listRetainedAsSystem',
312
+ retainedRecordCount,
313
+ organizationId: options?.scopeContext?.organizationId,
314
+ }).catch(() => { /* audit is best-effort */ });
315
+
316
+ return result;
317
+ }
318
+
319
+ /**
320
+ * Create a resource using a synthesised super-admin system context, RE-ATTACHING
321
+ * the fields the client-shaped request DTO strips: `.isBackendOnly()` material
322
+ * (e.g. a credential `passwordHash`) and the context-auto-populated FKs (e.g.
323
+ * `userId` on a system resource that has no HTTP surface to seed it). Use this
324
+ * for trusted in-process writes to system resources — e.g. registration
325
+ * persisting `USER_CREDENTIALS` / `USER_PROFILES` — where the payload IS the
326
+ * source of truth and there is no request context to inject the FKs.
327
+ *
328
+ * REQUIRES the target resource to opt in via `systemAccessPolicy.create = ALLOWED`
329
+ * (fail-closed; otherwise throws `ErrorType.CONFIGURATION`). The re-attach
330
+ * allowlist is DERIVED from the resource schema (never caller-supplied), and this
331
+ * primitive is reachable only from trusted engine code — never an HTTP payload —
332
+ * so it cannot be used to smuggle client-forbidden fields.
333
+ *
334
+ * `scopeContext` (optional) seeds the EC's `contextResourcesFieldIdentifier`
335
+ * (the WHICH-resources-in-scope channel — NOT `initiatorIds`, which fail-closed
336
+ * rejects identity fields on the internal EC; see
337
+ * {@link buildSystemScopeContextMap}) so `enrichDataWithContext`'s context-map
338
+ * loop injects the right scope FK. It is NOT required when the scope FKs are
339
+ * already present on `data` (they are preserved by the allowlist).
340
+ */
341
+ public async createAsSystem<T = any>(
342
+ resourceType: ResourceType,
343
+ data: Record<string, unknown>,
344
+ options?: ServiceOptions & {
345
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
346
+ },
347
+ ): Promise<T> {
348
+ // Guard 1 (fail-closed): the resource must explicitly opt into system CREATE.
349
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.CREATE);
350
+
351
+ const operationPath: ResourceConfiguration_OperationPath<any, any> =
352
+ this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.CREATE);
353
+
354
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
355
+ operation: operationPath,
356
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
357
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
358
+ initiatorRoles: [
359
+ {
360
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
361
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
362
+ },
363
+ ],
364
+ });
365
+
366
+ const preserveServerInjectedFields = [
367
+ ...(options?.preserveServerInjectedFields ?? []),
368
+ ...this.deriveWritePreserveFields(resourceType, data, CoreResourceOperation.CREATE),
369
+ ];
370
+
371
+ const result = await this.getServicesRegistryHandler().create<T>(
372
+ resourceType,
373
+ systemContext,
374
+ data,
375
+ { ...options, preserveServerInjectedFields },
376
+ );
377
+ // Guard 4: best-effort privileged-write audit (never blocks or fails the write).
378
+ this.scheduleSystemContextWriteAudit(
379
+ resourceType,
380
+ CoreResourceOperation.CREATE,
381
+ options,
382
+ );
383
+ return result;
384
+ }
385
+
386
+ /**
387
+ * Update a single resource using a synthesised super-admin system context,
388
+ * re-attaching the DTO-stripped fields (backend-only material like a rotated
389
+ * `passwordHash`, and context-auto-populated FKs). The single-target sibling of
390
+ * {@link createAsSystem}. Requires `systemAccessPolicy.update = ALLOWED`
391
+ * (fail-closed). `id_or_ids_or_filter` selects the target exactly as the normal
392
+ * `update` does (an id or a filter).
393
+ */
394
+ public async updateAsSystem<T = any>(
395
+ resourceType: ResourceType,
396
+ id_or_ids_or_filter: IdOrIdsOrFilterType,
397
+ data: Record<string, unknown>,
398
+ options?: ServiceOptions & {
399
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
400
+ },
401
+ ): Promise<T | null> {
402
+ // Guard 1 (fail-closed): the resource must explicitly opt into system UPDATE.
403
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.UPDATE);
404
+
405
+ const operationPath: ResourceConfiguration_OperationPath<any, any> =
406
+ this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.UPDATE);
407
+
408
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
409
+ operation: operationPath,
410
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
411
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
412
+ initiatorRoles: [
413
+ {
414
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
415
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
416
+ },
417
+ ],
418
+ });
419
+
420
+ const preserveServerInjectedFields = [
421
+ ...(options?.preserveServerInjectedFields ?? []),
422
+ ...this.deriveWritePreserveFields(resourceType, data, CoreResourceOperation.UPDATE),
423
+ ];
424
+
425
+ const result = await this.getServicesRegistryHandler().update<T>(
426
+ resourceType,
427
+ systemContext,
428
+ id_or_ids_or_filter,
429
+ data,
430
+ { ...options, preserveServerInjectedFields },
431
+ );
432
+ this.scheduleSystemContextWriteAudit(
433
+ resourceType,
434
+ CoreResourceOperation.UPDATE,
435
+ options,
436
+ );
437
+ return result;
438
+ }
439
+
440
+ /**
441
+ * Bulk-update resources matched by `id_or_ids_or_filter` using a synthesised
442
+ * super-admin system context, re-attaching the DTO-stripped fields. The
443
+ * many-target sibling of {@link updateAsSystem}; requires
444
+ * `systemAccessPolicy.updateMany = ALLOWED` (fail-closed). Used e.g. by
445
+ * anonymous→user ownership transposition, where a shared patch (`userId`,
446
+ * `anonymousUserId`) must land on many rows.
447
+ */
448
+ public async updateManyAsSystem<T = any>(
449
+ resourceType: ResourceType,
450
+ id_or_ids_or_filter: IdOrIdsOrFilterType,
451
+ data: Record<string, unknown>,
452
+ options?: ServiceOptions & {
453
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
454
+ },
455
+ ): Promise<T[]> {
456
+ // Guard 1 (fail-closed): the resource must explicitly opt into system UPDATE_MANY.
457
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.UPDATE_MANY);
458
+
459
+ const operationPath: ResourceConfiguration_OperationPath<any, any> =
460
+ this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.UPDATE_MANY);
461
+
462
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
463
+ operation: operationPath,
464
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
465
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
466
+ initiatorRoles: [
467
+ {
468
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
469
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
470
+ },
471
+ ],
472
+ });
473
+
474
+ const preserveServerInjectedFields = [
475
+ ...(options?.preserveServerInjectedFields ?? []),
476
+ ...this.deriveWritePreserveFields(resourceType, data, CoreResourceOperation.UPDATE_MANY),
477
+ ];
478
+
479
+ const result = await this.getServicesRegistryHandler().updateMany<T>(
480
+ resourceType,
481
+ systemContext,
482
+ id_or_ids_or_filter,
483
+ data,
484
+ { ...options, preserveServerInjectedFields },
485
+ );
486
+ this.scheduleSystemContextWriteAudit(
487
+ resourceType,
488
+ CoreResourceOperation.UPDATE_MANY,
489
+ options,
490
+ );
491
+ return result;
492
+ }
493
+
494
+ /**
495
+ * DIRECT subject erasure — impersonalize-and-retain the named rows of a retention-governed resource.
496
+ *
497
+ * This is the entry point for "erase this subject": scrub the personal fields in place, keep the row,
498
+ * and mark it `RETAINED` (hidden from normal reads, immutable, reachable only through the audited
499
+ * see-through path).
500
+ *
501
+ * WHY IT EXISTS: until now the ONLY way to reach impersonalization was the `onParentDelete` cascade —
502
+ * i.e. a PARENT being deleted. That structurally excludes every SCOPE ROOT, and `USERS` is a scope
503
+ * root, so the resource that actually holds the personal data could never be erased. A
504
+ * parent-delete-only trigger can only ever reach CHILD resources, which are precisely the ones
505
+ * holding no PII (a billing row points at a person; the name and address live on the user). This
506
+ * closes that gap: erasure can now be initiated on the subject itself.
507
+ *
508
+ * Shares ONE definition of "impersonalize these rows" with the cascade
509
+ * (`impersonalizeRowsInPlace`) — the asserts, the scrub patch, the marker write and the
510
+ * treatment-driven file erasure are not duplicated here, so the two entry points cannot drift on
511
+ * what counts as erased.
512
+ *
513
+ * Fail-closed twice over: the resource must grant system `updateMany` (Guard 1, as for every trusted
514
+ * write) AND must be retention-governed (asserted by the shared core — otherwise there is no
515
+ * `retentionStatus` marker to flip and no derived grant to flip it with).
516
+ *
517
+ * Takes EXPLICIT ids rather than a filter: an erasure is not a query, and resolving a filter here
518
+ * would need a system LIST grant plus a silent decision about what to do when it matches more (or
519
+ * fewer) rows than the caller expected. The caller knows the subject.
520
+ */
521
+ public async impersonalizeSubjectAsSystem(
522
+ resourceType: ResourceType,
523
+ id_or_ids: string | string[],
524
+ options?: ServiceOptions & {
525
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
526
+ },
527
+ ): Promise<void> {
528
+ // Guard 1 (fail-closed): the resource must explicitly opt into system UPDATE_MANY — the verb the
529
+ // scrub write uses.
530
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.UPDATE_MANY);
531
+
532
+ const rowIds = typeof id_or_ids === 'string' ? [id_or_ids] : id_or_ids;
533
+ if (rowIds.length === 0) {
534
+ return;
535
+ }
536
+
537
+ const operationPath: ResourceConfiguration_OperationPath<any, any> =
538
+ this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.UPDATE_MANY);
539
+
540
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
541
+ operation: operationPath,
542
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
543
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
544
+ initiatorRoles: [
545
+ {
546
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
547
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
548
+ },
549
+ ],
550
+ });
551
+
552
+ await this.getServicesRegistryHandler()
553
+ .getService(resourceType)
554
+ .impersonalizeRowsInPlace(resourceType, rowIds, systemContext, options);
555
+
556
+ // Best-effort privileged-write audit (never blocks or fails the erasure) — mirrors the other
557
+ // trusted writes. The per-row RETAINED_DATA_ACCESS audit covers later READS of the retained rows;
558
+ // this records the erasure itself.
559
+ this.auditLogsService?.logSystemContextWrite({
560
+ resourceType: resourceType as string,
561
+ operation: CoreResourceOperation.UPDATE_MANY,
562
+ organizationId: options?.scopeContext?.organizationId,
563
+ scopeContext: options?.scopeContext,
564
+ performedByRuntime: this.describeRuntimeForAudit(),
565
+ }).catch(() => { /* audit is best-effort */ });
566
+ }
567
+
568
+ /**
569
+ * SUBJECT ERASURE — the entry point a "delete my account" request calls.
570
+ *
571
+ * The whole erasure, not just its last step: tear down the subject's dependents according to what
572
+ * each edge declared, THEN scrub the subject row and flip it to `RETAINED`. Prefer this over
573
+ * {@link impersonalizeSubjectAsSystem} for any real erasure request — that method scrubs the
574
+ * subject row ALONE, which for a user leaves the profile holding the name, the bio and the avatar
575
+ * completely intact (the `USERS → USER_PROFILES` cascade is delete-driven, and an erasure does not
576
+ * delete the user). `impersonalizeSubjectAsSystem` remains the right call only when the caller has
577
+ * already dealt with the dependents, or when the subject genuinely has none.
578
+ *
579
+ * The delete-vs-retain decision per dependent is DERIVED FROM CONFIGURATION — each edge's
580
+ * `onParentDelete` declaration, read through the same authority the delete cascade uses — never
581
+ * from a hardcoded list of resource types. Edges the author never classified abort the erasure
582
+ * instead of being guessed at. See `classifySubjectErasureDisposition` for the full table.
583
+ *
584
+ * Fail-closed three times over: the resource must grant system `updateMany` (Guard 1, as for every
585
+ * trusted write), must be retention-governed (the subject is kept, so there must be a
586
+ * `retentionStatus` marker to flip), and must have an executable disposition for every dependent
587
+ * edge.
588
+ *
589
+ * Takes EXPLICIT ids for the same reason {@link impersonalizeSubjectAsSystem} does: an erasure is
590
+ * not a query, and resolving a filter here would silently decide what to do when it matches more
591
+ * (or fewer) subjects than the caller expected.
592
+ *
593
+ * @returns the `SubjectErasureReport` — every edge with the disposition applied and the
594
+ * configuration that justified it. Returned rather than only logged so the flow fronting the
595
+ * request can record or surface it as the evidence of what was erased.
596
+ */
597
+ /**
598
+ * Assemble a data subject's export bundle under a synthesised system context — the disclosure
599
+ * counterpart of {@link eraseSubjectAsSystem}, and the ONLY public door to a subject export.
600
+ *
601
+ * ## No route, deliberately
602
+ *
603
+ * There is no resource operation and no HTTP endpoint for this, exactly as there is none for
604
+ * erasure. GDPR Art. 15 and Art. 20 bind the data **controller** — the application built with this
605
+ * framework, not the framework — so WHO may request an export, what identity proof is required
606
+ * first, and how the result is delivered are the application's decisions. The framework's job is
607
+ * to make the bundle assemblable and to refuse to assemble a misleading one.
608
+ *
609
+ * Four routed export operations that claimed to do this were removed on 2026-08-01 for exactly
610
+ * this reason: each answered HTTP 200 with an unfiltered row while ignoring its whole request
611
+ * contract. This is the honest replacement, at the layer the decision actually belongs to.
612
+ *
613
+ * ## Two-key gate
614
+ *
615
+ * The caller's invocation is the first key — reaching this method at all is a deliberate act by
616
+ * the controller. The per-resource `systemAccessPolicy.exportSubject` opt-in is the second, and it
617
+ * is enforced inside the orchestrator across EVERY resource that would enter the bundle, not just
618
+ * the subject's own. A resource that never consented to disclosure cannot be swept in because it
619
+ * happens to sit on an edge.
620
+ *
621
+ * `// assurance-control: WILDO.PRIVACY.SUBJECT_DATA_EXPORT`
622
+ *
623
+ * ## Interaction with erasure RETENTION (checked 2026-08-09 — deliberate, not an oversight)
624
+ *
625
+ * This path does NOT set the see-through flag; only `readRetainedAsSystem` / `listRetainedAsSystem` do.
626
+ * So exporting a subject who has ALREADY been erased-and-retained reads through the ordinary chokepoint,
627
+ * finds the row hidden, and discloses nothing — which is the correct answer twice over: the row's
628
+ * personal fields are already scrubbed, and an export is a disclosure door, so it must not be the one
629
+ * that reveals what erasure withdrew.
630
+ *
631
+ * Do not "fix" a thin bundle for an erased subject by granting see-through here. The audited reveal has
632
+ * its own two primitives precisely so that a compliance auditor's read is separable, attributed and
633
+ * logged; routing it through export would make every export a potential retained-data disclosure.
634
+ *
635
+ * @param resourceType the subject's resource type.
636
+ * @param id_or_ids the explicit subject rows. An export is not a query.
637
+ * @param purpose WHICH right is being answered — the two produce genuinely different bundles.
638
+ * @returns the {@link SubjectExportBundle}. Only `bundle.report` is safe to log; `bundle.slices`
639
+ * carry the personal data itself.
640
+ */
641
+ public async exportSubjectAsSystem(
642
+ resourceType: ResourceType,
643
+ id_or_ids: string | string[],
644
+ purpose: SubjectExportPurpose,
645
+ options?: ServiceOptions & {
646
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
647
+ },
648
+ ): Promise<SubjectExportBundle> {
649
+ // Guard 1 (fail-closed): the subject's own resource must permit system READ — the verb every
650
+ // row of the bundle is gathered with. The narrower `exportSubject` opt-in is asserted per
651
+ // participating resource inside the orchestrator.
652
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.READ);
653
+
654
+ const subjectIds = typeof id_or_ids === 'string' ? [id_or_ids] : id_or_ids;
655
+ if (subjectIds.length === 0) {
656
+ return {
657
+ report: {
658
+ purpose,
659
+ subjectResourceType: resourceType,
660
+ subjectIds: [],
661
+ edges: [],
662
+ fieldsExcludedAsDerived: [],
663
+ fieldsWithheldAsNonDisclosable: [],
664
+ totalRecordCount: 0,
665
+ },
666
+ slices: [],
667
+ };
668
+ }
669
+
670
+ const operationPath: ResourceConfiguration_OperationPath<any, any> =
671
+ this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.READ);
672
+
673
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
674
+ operation: operationPath,
675
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
676
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
677
+ initiatorRoles: [
678
+ {
679
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
680
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
681
+ },
682
+ ],
683
+ });
684
+
685
+ const bundle = await this.getServicesRegistryHandler()
686
+ .getService(resourceType)
687
+ .exportSubjectInPlace(resourceType, subjectIds, purpose, systemContext, options);
688
+
689
+ // ── The audit event ──
690
+ //
691
+ // A subject export is arguably the most audit-worthy READ the framework performs: it assembles
692
+ // everything held about one person and hands it out. No framework mechanism would emit for it:
693
+ // `FIELD_ACCESS` fires only on first exposure of a backend-only secret at CREATE, and the
694
+ // risk-tiered `RESOURCE_OPERATION_PERFORMED` emission deliberately excludes read-shaped
695
+ // operations. The removed export operations produced no trail whatsoever — which is why this
696
+ // event is emitted explicitly here rather than inherited.
697
+ //
698
+ // The report is logged, never the slices: the report is designed to carry dispositions and
699
+ // counts and NO personal data, so it is safe to persist in an audit store. Logging the bundle
700
+ // would put the exported personal data into the audit trail — turning the record of a
701
+ // disclosure into a second copy of it.
702
+ await this.auditLogsService?.logSubjectDataExport({
703
+ purpose,
704
+ subjectResourceType: resourceType as string,
705
+ subjectIds,
706
+ includedResourceTypes: bundle.report.edges
707
+ .filter((edge) => edge.collected)
708
+ .map((edge) => String(edge.relatedResourceType)),
709
+ totalRecordCount: bundle.report.totalRecordCount,
710
+ fieldsExcludedAsDerived: bundle.report.fieldsExcludedAsDerived,
711
+ fieldsWithheldAsNonDisclosable: bundle.report.fieldsWithheldAsNonDisclosable,
712
+ organizationId: options?.scopeContext?.organizationId,
713
+ });
714
+
715
+ return bundle;
716
+ }
717
+
718
+ /**
719
+ * Guard 4 of {@link eraseSubjectAsSystem}: rows linked to the subject in an HTTP_API-bound
720
+ * external system declaring erasure stance `CONTROLLER_ACKNOWLEDGED_NON_ERASURE` (ETL D6, 6c)
721
+ * refuse the erasure until the CONTROLLER acknowledges the hole — per request, via
722
+ * `acknowledgeHttpApiNonErasure`, never as a standing posture.
723
+ *
724
+ * `CONFLICT` (409), like the floors: the caller is authorized and the payload valid — what
725
+ * refuses is the declared state of the subject's graph, and the refusal names its own remedy.
726
+ * Enumerates the subject's child-direction edges (the erasure's own discovery boundary — linkage
727
+ * no relationship declares is outside every part of the erasure, not only this guard). The
728
+ * acknowledged path's RECORD (the CRITICAL audit event + the report entry) is emitted by the
729
+ * per-resource external effect post-commit, where the outcome it records actually exists.
730
+ */
731
+ private assertHttpApiNonErasureAcknowledged(
732
+ subjectResourceType: ResourceType,
733
+ acknowledged: boolean | undefined,
734
+ executionContext: ExecutionContext<any>,
735
+ ): void {
736
+ const subjectConfiguration = this.resourcesRegistry.getResourceConfiguration(subjectResourceType) as {
737
+ resourceRelationships?: Parameters<typeof getChildDirectionRelationships>[0];
738
+ };
739
+ const childRelationships = subjectConfiguration?.resourceRelationships
740
+ ? getChildDirectionRelationships(subjectConfiguration.resourceRelationships)
741
+ : [];
742
+
743
+ const affected: Array<{ resourceType: string; providerRef: string; remoteEntityRef: string }> = [];
744
+ const seenChildResourceTypes = new Set<string>();
745
+ for (const relationship of childRelationships) {
746
+ if ((relationship as { isDisabled?: boolean }).isDisabled === true) continue;
747
+ const childResourceType = String((relationship as { resourceType2?: unknown }).resourceType2 ?? '');
748
+ if (!childResourceType || seenChildResourceTypes.has(childResourceType)) continue;
749
+ seenChildResourceTypes.add(childResourceType);
750
+
751
+ let childConfiguration: { httpApiBinding?: { providerRef: string; entityRef: string; erasure?: { stance?: string } } } | undefined;
752
+ try {
753
+ childConfiguration = this.resourcesRegistry.getResourceConfiguration(childResourceType as ResourceType);
754
+ } catch {
755
+ // An unregistered child is the erasure orchestrator's problem to name, not this guard's.
756
+ continue;
757
+ }
758
+ const binding = childConfiguration?.httpApiBinding;
759
+ if (!binding || binding.erasure?.stance !== HttpApiErasureStance.CONTROLLER_ACKNOWLEDGED_NON_ERASURE) continue;
760
+ affected.push({
761
+ resourceType: childResourceType,
762
+ providerRef: binding.providerRef,
763
+ remoteEntityRef: binding.entityRef,
764
+ });
765
+ }
766
+
767
+ if (affected.length === 0 || acknowledged === true) return;
768
+
769
+ throw this.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {
770
+ context: {
771
+ reason: 'http_api_non_erasure_unacknowledged',
772
+ message:
773
+ `Subject erasure of "${subjectResourceType}" is REFUSED: ${affected.length} linked HTTP_API-bound resource(s) `
774
+ + `declare erasure stance CONTROLLER_ACKNOWLEDGED_NON_ERASURE — their remote rows cannot be erased by the platform `
775
+ + `and would silently survive an erasure that reports itself complete. To proceed, pass `
776
+ + `'acknowledgeHttpApiNonErasure: true' on THIS request: the erasure will then complete locally, each named resource `
777
+ + `will be recorded as a CRITICAL audit event, and the report will carry the hole explicitly.`,
778
+ subjectResourceType,
779
+ resources: affected,
780
+ },
781
+ });
782
+ }
783
+
784
+ public async eraseSubjectAsSystem(
785
+ resourceType: ResourceType,
786
+ id_or_ids: string | string[],
787
+ options?: ServiceOptions & {
788
+ scopeContext?: { organizationId?: string; applicationId?: string; userId?: string };
789
+ /**
790
+ * The CONTROLLER's explicit decision to complete an erasure that would leave one or more
791
+ * organizations with no usable owner.
792
+ *
793
+ * Off by default, so stranding a tenant is never accidental. Supplied, the erasure proceeds and
794
+ * each stranded tenant is recorded as a CRITICAL audit event instead of the write being
795
+ * refused. See `assertOrganizationOwnerFloorForSubjectErasure` in the floor authority for why
796
+ * this door is defeasible while every administrative door is not — in short, GDPR Art. 17(3)
797
+ * does not recognise "the tenant would become unadministrable" as a ground to refuse erasure,
798
+ * and the framework must not impose that posture on the application that owes the answer.
799
+ */
800
+ acknowledgeOrganizationOwnerFloorBreach?: boolean;
801
+ /**
802
+ * The same controller decision for the APPLICATION-scope floor.
803
+ *
804
+ * Separate from its organization sibling on purpose: the two guard different populations with
805
+ * different remedies, and an erasure that may lawfully strand one tenant is not thereby
806
+ * licensed to leave the whole application unadministrable. Acknowledging one must never
807
+ * silently acknowledge the other.
808
+ */
809
+ acknowledgeAdministrativeContinuityFloorBreach?: boolean;
810
+ /**
811
+ * The CONTROLLER's explicit decision to complete an erasure although rows linked to the
812
+ * subject live in HTTP_API-bound EXTERNAL systems declaring erasure stance
813
+ * `CONTROLLER_ACKNOWLEDGED_NON_ERASURE` (ETL D6 stance 6c).
814
+ *
815
+ * Off by default and PER REQUEST, never a standing posture: unacknowledged, guard 4 refuses
816
+ * before anything is written, naming every such resource. Acknowledged, the erasure proceeds
817
+ * and each resource is recorded twice — a CRITICAL `HTTP_API_NON_ERASURE_ACKNOWLEDGED` audit
818
+ * event, and an `ACKNOWLEDGED_NON_ERASURE` entry in the report's `externalEffects` (which
819
+ * `isIncompleteSubjectErasureExternalEffect` deliberately counts as incomplete: the data is
820
+ * still live at the third party, however deliberate the decision).
821
+ *
822
+ * A THIRD acknowledgement, separate from the two floor acknowledgements on purpose — each
823
+ * guards a different consequence with a different remedy, and acknowledging one must never
824
+ * silently acknowledge another.
825
+ */
826
+ acknowledgeHttpApiNonErasure?: boolean;
827
+ },
828
+ ): Promise<SubjectErasureReport> {
829
+ // Guard 1 (fail-closed): the resource must explicitly opt into system UPDATE_MANY — the verb the
830
+ // subject's scrub write uses.
831
+ this.assertSystemAccessAllowed(resourceType, CoreResourceOperation.UPDATE_MANY);
832
+
833
+ const subjectIds = typeof id_or_ids === 'string' ? [id_or_ids] : id_or_ids;
834
+ if (subjectIds.length === 0) {
835
+ return {
836
+ subjectResourceType: resourceType,
837
+ subjectIds: [],
838
+ edges: [],
839
+ subjectImpersonalized: false,
840
+ // No subject means nothing to erase anywhere, including externally — and the effects below
841
+ // are deliberately never reached, so no provider is called for an empty request.
842
+ externalEffects: [],
843
+ };
844
+ }
845
+
846
+ const operationPath: ResourceConfiguration_OperationPath<any, any> =
847
+ this.resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.UPDATE_MANY);
848
+
849
+ const systemContext = await this.executionContextCreator.createForInternalOperation({
850
+ operation: operationPath,
851
+ contextResourcesFieldIdentifier: this.buildSystemScopeContextMap(options?.scopeContext),
852
+ initiatorIds: this.buildSystemInitiatorIds(options?.scopeContext),
853
+ initiatorRoles: [
854
+ {
855
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
856
+ relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
857
+ },
858
+ ],
859
+ });
860
+
861
+ // ── Guard 2: the last-super-administrator floor ──
862
+ //
863
+ // An erasure scrubs the subject's row and retention-hides it, so an erased administrator stops
864
+ // counting as decisively as a deleted or demoted one — and `appRoles` deliberately survives the
865
+ // scrub (`.isAuditEvidence()`, no `.impersonalizeWith()`), so a naive role query would keep
866
+ // counting a principal nobody can authenticate as.
867
+ //
868
+ // This runs BEFORE `eraseSubjectInPlace`, so a refusal leaves nothing written.
869
+ //
870
+ // The floor is NOT bypassed for this system path even though the ceiling gate exempts internal
871
+ // writes. An erasure that leaves the application unadministrable is not a completed
872
+ // data-protection request — it is an availability incident wearing one. The remedy the refusal
873
+ // names (appoint another administrator, then erase) satisfies both obligations; silently
874
+ // proceeding satisfies neither.
875
+ await this.assertSuperAdminFloorForSubjectErasure(
876
+ resourceType,
877
+ subjectIds,
878
+ systemContext,
879
+ options?.acknowledgeAdministrativeContinuityFloorBreach,
880
+ );
881
+
882
+ // ── Guard 3: the last-organization-owner floor ──
883
+ //
884
+ // The per-tenant sibling of Guard 2, and the only one of the two that can refuse on behalf of
885
+ // several populations at once. It runs SECOND because the application floor is the more
886
+ // fundamental condition: an application with no administrator cannot repair an ownerless tenant
887
+ // either, so reporting that first gives the operator the outer problem to solve.
888
+ //
889
+ // Also BEFORE `eraseSubjectInPlace`, so a refusal from either guard leaves nothing written.
890
+ await this.assertOrganizationOwnerFloorForSubjectErasure(
891
+ resourceType,
892
+ subjectIds,
893
+ systemContext,
894
+ options?.acknowledgeOrganizationOwnerFloorBreach,
895
+ );
896
+
897
+ // ── Guard 4: HTTP_API stance-6c resources demand a per-request acknowledgement ──
898
+ //
899
+ // Rows linked to the subject that live in an external system the platform CANNOT erase
900
+ // (D6 stance 6c) must not be silently skipped by an erasure that then reports itself done.
901
+ // Refusing HERE — before `eraseSubjectInPlace`, like the two floors — leaves nothing written;
902
+ // the stance's post-commit effect can only RECORD, never refuse. The refusal is escapable per
903
+ // request (`acknowledgeHttpApiNonErasure`), never by a standing configuration — the same
904
+ // defeasibility argument as the floors: GDPR Art. 17(3) does not list "a third party holds
905
+ // copies we cannot delete" as a ground for the FRAMEWORK to refuse indefinitely, so the
906
+ // controller decides, and the record is the control.
907
+ this.assertHttpApiNonErasureAcknowledged(
908
+ resourceType,
909
+ options?.acknowledgeHttpApiNonErasure,
910
+ systemContext,
911
+ );
912
+
913
+ const report = await this.getServicesRegistryHandler()
914
+ .getService(resourceType)
915
+ .eraseSubjectInPlace(resourceType, subjectIds, systemContext, options);
916
+
917
+ // ── External, non-transactional effects — POST-COMMIT by construction ──
918
+ //
919
+ // `eraseSubjectInPlace` has returned, so its transaction is closed and the local scrub is
920
+ // durable. Only now may we call out to systems we do not own (a billing provider anonymizing
921
+ // its customer, say). Running them inside the transaction would be wrong twice over: it would
922
+ // hold a database transaction open across third-party network latency, and a later rollback
923
+ // could not undo a provider-side erasure that had already applied.
924
+ //
925
+ // The consequence is deliberate and asymmetric: a failure here does NOT fail the erasure. The
926
+ // local rows are correctly scrubbed either way, and throwing would invite the caller to retry
927
+ // an erasure whose local half already succeeded. The incomplete state travels in the report
928
+ // instead — which is why `SubjectErasureReport.externalEffects` exists rather than a boolean.
929
+ // No registry bound → no effect ever declared itself for this subject, so an empty list is the
930
+ // truthful answer (NOT `NOT_REGISTERED`, which means a KNOWN effect had no handler).
931
+ report.externalEffects = this.subjectErasureExternalEffects
932
+ ? await this.subjectErasureExternalEffects.runAll({
933
+ subjectResourceType: resourceType,
934
+ subjectIds,
935
+ scopeContext: options?.scopeContext,
936
+ })
937
+ : [];
938
+
939
+ /**
940
+ * Tolerate a port that answers with nothing — because the LOCAL ERASURE IS ALREADY COMMITTED.
941
+ *
942
+ * `runAll` is typed to resolve an array, but this is an injected port: an implementation that
943
+ * returns `undefined` (or a stub standing in for one) satisfies the binding and violates the
944
+ * contract. Dereferencing it threw `Cannot read properties of undefined (reading 'filter')` AFTER
945
+ * the transaction committed — so a completed, correct erasure surfaced to its caller as a failure,
946
+ * inviting a retry of work already done. Turning a successful data-protection request into an
947
+ * apparent failure is the worse outcome, so the malformed answer is coerced and reported LOUDLY
948
+ * rather than thrown: nothing here can undo the erasure, and an operator still has to learn that
949
+ * external effects were not actually measured.
950
+ */
951
+ if (!Array.isArray(report.externalEffects)) {
952
+ this.logger?.error(
953
+ 'Subject-erasure external-effects port returned a non-array; treating it as NO effects measured. '
954
+ + 'The LOCAL erasure is committed and correct, but whether personal data is still live at a third '
955
+ + 'party is now UNKNOWN rather than reported.',
956
+ { subjectResourceType: resourceType, subjectCount: subjectIds.length, received: typeof report.externalEffects },
957
+ );
958
+ report.externalEffects = [];
959
+ }
960
+
961
+ const incompleteEffects = selectIncompleteExternalEffects(report.externalEffects);
962
+ if (incompleteEffects.length > 0) {
963
+ // ERROR, not warn: personal data is potentially still live at a third party after a
964
+ // completed data-protection request. That is an operator obligation, not a footnote — and the
965
+ // report is returned to a caller who may only persist it, so the log has to stand alone.
966
+ this.logger?.error('Subject erasure completed LOCALLY but external effects are incomplete', {
967
+ subjectResourceType: resourceType,
968
+ subjectCount: subjectIds.length,
969
+ incompleteEffects: incompleteEffects.map((effect) => ({
970
+ effectRef: effect.effectRef,
971
+ status: effect.status,
972
+ detail: effect.detail,
973
+ failedSteps: (effect.steps ?? [])
974
+ .filter((step) => !step.succeeded)
975
+ .map((step) => ({ step: step.step, targetRef: step.targetRef, error: step.error })),
976
+ })),
977
+ });
978
+ }
979
+
980
+ // Best-effort privileged-write audit of the erasure itself (never blocks or fails it) — mirrors
981
+ // the other trusted writes. The dependent teardowns audit themselves through the writers they
982
+ // run on; the per-edge dispositions are additionally carried by the returned report and the
983
+ // structured completion log.
984
+ this.auditLogsService?.logSystemContextWrite({
985
+ resourceType: resourceType as string,
986
+ operation: CoreResourceOperation.UPDATE_MANY,
987
+ organizationId: options?.scopeContext?.organizationId,
988
+ scopeContext: options?.scopeContext,
989
+ performedByRuntime: this.describeRuntimeForAudit(),
990
+ }).catch(() => { /* audit is best-effort */ });
991
+
992
+ return report;
993
+ }
994
+ ```