@wildo-ai/dev-companion 1.1.3 → 1.1.4

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 (549) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/__tests__/asset-noop.d.ts.map +1 -1
  3. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +1 -1
  4. package/dist/esm/__tests__/internal-test-view.d.ts.map +1 -1
  5. package/dist/esm/brand/models/logo-creative-brief.schemas.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  8. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +9 -3
  9. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  10. package/dist/esm/brand/models/logo-judge.schemas.d.ts.map +1 -1
  11. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +3 -24
  12. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  13. package/dist/esm/brand/services/brand-accept.companion.service.js +10 -48
  14. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  15. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
  16. package/dist/esm/brand/services/logo-deliberation.companion.service.js +2 -8
  17. package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
  18. package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
  19. package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
  20. package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
  21. package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
  22. package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
  23. package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
  24. package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
  25. package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
  26. package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
  27. package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
  28. package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
  29. package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
  30. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +52 -2
  31. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  32. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +45 -0
  33. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  34. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +45 -5
  35. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  36. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +192 -13
  37. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  38. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +12 -22
  39. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  40. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +151 -82
  41. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  42. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +30 -4
  43. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  44. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +30 -4
  45. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  46. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +16 -0
  47. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  48. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +17 -0
  49. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  50. package/dist/esm/code-compliance-check/check-label-placeholder-contract.companion.d.ts.map +1 -1
  51. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.d.ts.map +1 -1
  52. package/dist/esm/companion-api/companion-api.schemas.d.ts +57 -57
  53. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  54. package/dist/esm/companion-api/controllers/companion-i18n-api-contract.utils.d.ts.map +1 -1
  55. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
  56. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
  57. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +98 -0
  58. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
  59. package/dist/esm/companion-api/controllers/companion.controller.d.ts +33 -5
  60. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  61. package/dist/esm/companion-api/controllers/companion.controller.js +150 -40
  62. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  63. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +8 -1
  64. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
  65. package/dist/esm/core/auth/companion-auth-floor.companion.service.js +8 -1
  66. package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
  67. package/dist/esm/core/catalogs/catalog-context.factory.d.ts.map +1 -1
  68. package/dist/esm/core/catalogs/catalog-context.factory.models.d.ts.map +1 -1
  69. package/dist/esm/core/catalogs/schema-org/aggregate-offer-catalog-context.factory.d.ts.map +1 -1
  70. package/dist/esm/core/catalogs/schema-org/aggregate-rating-catalog-context.factory.d.ts.map +1 -1
  71. package/dist/esm/core/catalogs/schema-org/article-catalog-context.factory.d.ts.map +1 -1
  72. package/dist/esm/core/catalogs/schema-org/blog-posting-catalog-context.factory.d.ts.map +1 -1
  73. package/dist/esm/core/catalogs/schema-org/breadcrumb-list-catalog-context.factory.d.ts.map +1 -1
  74. package/dist/esm/core/catalogs/schema-org/faq-page-catalog-context.factory.d.ts.map +1 -1
  75. package/dist/esm/core/catalogs/schema-org/offer-catalog-context.factory.d.ts.map +1 -1
  76. package/dist/esm/core/catalogs/schema-org/organization-catalog-context.factory.d.ts.map +1 -1
  77. package/dist/esm/core/catalogs/schema-org/product-catalog-context.factory.d.ts.map +1 -1
  78. package/dist/esm/core/catalogs/schema-org/review-catalog-context.factory.d.ts.map +1 -1
  79. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
  80. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
  81. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
  82. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
  83. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
  84. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
  85. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
  86. package/dist/esm/core/catalogs/schema-org/software-application-catalog-context.factory.d.ts.map +1 -1
  87. package/dist/esm/core/catalogs/schema-org/website-catalog-context.factory.d.ts.map +1 -1
  88. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  89. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
  90. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  91. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  92. package/dist/esm/core/context/companion-context.d.ts.map +1 -1
  93. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  94. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  95. package/dist/esm/core/inject/models/container.js +0 -7
  96. package/dist/esm/core/inject/models/container.js.map +1 -1
  97. package/dist/esm/core/inject/models/service-types.d.ts +0 -1
  98. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  99. package/dist/esm/core/inject/models/service-types.js +0 -1
  100. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  101. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  102. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  103. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  104. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +8 -4
  105. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  106. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  107. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +8 -1
  108. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  109. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  110. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  111. package/dist/esm/core/introspection/services/companion-introspection-behavior-registry.companion.service.d.ts.map +1 -1
  112. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  113. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +42 -1
  114. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  115. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  116. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  117. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
  118. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
  119. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +4 -9
  120. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  121. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  122. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
  123. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
  124. package/dist/esm/core/introspection/subprocess/asset-noop-register.d.ts.map +1 -1
  125. package/dist/esm/core/introspection/subprocess/brand-prompt-renderer.d.ts.map +1 -1
  126. package/dist/esm/core/introspection/subprocess/chart-registration-refs.behavior.d.ts.map +1 -1
  127. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  128. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +3 -2
  129. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  130. package/dist/esm/core/introspection/subprocess/companion-introspection-child.d.ts.map +1 -1
  131. package/dist/esm/core/introspection/subprocess/companion-introspection-module-exports.utils.d.ts.map +1 -1
  132. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
  133. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  134. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
  135. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  136. package/dist/esm/core/introspection/subprocess/definition-specifications.behavior.d.ts.map +1 -1
  137. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
  138. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +0 -21
  139. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
  140. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +39 -1
  141. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
  142. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  143. package/dist/esm/core/introspection/subprocess/market-context-block.builder.d.ts.map +1 -1
  144. package/dist/esm/core/introspection/subprocess/market-prompt-renderer.d.ts.map +1 -1
  145. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +41 -2
  146. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  147. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +178 -41
  148. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  149. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  150. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
  151. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
  152. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
  153. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
  154. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
  155. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
  156. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
  157. package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
  158. package/dist/esm/core/runtime/companion-startup-assembly.js +5 -0
  159. package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
  160. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  161. package/dist/esm/core/runtime/models/companion-runtime.models.d.ts.map +1 -1
  162. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +16 -13
  163. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  164. package/dist/esm/core/runtime/services/start-companion-application.service.js +70 -45
  165. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  166. package/dist/esm/core/runtime/utils/companion-local-signing-key.companion.d.ts.map +1 -1
  167. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  168. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +9 -2
  169. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  170. package/dist/esm/core/runtime/utils/companion-workbench-topology.d.ts.map +1 -1
  171. package/dist/esm/core/runtime/utils/platform-core-domain-modules.companion.d.ts.map +1 -1
  172. package/dist/esm/core/specifications/chart-view-specification-context.factory.d.ts.map +1 -1
  173. package/dist/esm/core/specifications/composite-view-specification-context.factory.d.ts.map +1 -1
  174. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
  175. package/dist/esm/core/specifications/execution-view-specification-context.factory.d.ts.map +1 -1
  176. package/dist/esm/core/specifications/feature-specification-context.factory.d.ts.map +1 -1
  177. package/dist/esm/core/specifications/flows-actors-view-specification-context.factory.d.ts.map +1 -1
  178. package/dist/esm/core/specifications/frontend-component-specification-context.factory.d.ts.map +1 -1
  179. package/dist/esm/core/specifications/full-custom-view-specification-context.factory.d.ts.map +1 -1
  180. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
  181. package/dist/esm/core/specifications/milestone-specification-context.factory.d.ts.map +1 -1
  182. package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
  183. package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
  184. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
  185. package/dist/esm/core/specifications/product-specification-context.factory.d.ts.map +1 -1
  186. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  187. package/dist/esm/core/specifications/role-specification-context.factory.d.ts.map +1 -1
  188. package/dist/esm/core/specifications/specification-context-factory.d.ts.map +1 -1
  189. package/dist/esm/core/specifications/specification-context-factory.models.d.ts.map +1 -1
  190. package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
  191. package/dist/esm/core/specifications/system-email-template-specification-context.factory.d.ts.map +1 -1
  192. package/dist/esm/core/specifications/templates/composite-view/composite-view-all-information.template.d.ts.map +1 -1
  193. package/dist/esm/core/specifications/templates/composite-view/composite-view-custom-implementation-context.template.d.ts.map +1 -1
  194. package/dist/esm/core/specifications/templates/composite-view/composite-view-development-usage-context.template.d.ts.map +1 -1
  195. package/dist/esm/core/specifications/templates/composite-view/composite-view-translation-context.template.d.ts.map +1 -1
  196. package/dist/esm/core/specifications/templates/feature/feature-all-information.template.d.ts.map +1 -1
  197. package/dist/esm/core/specifications/templates/feature/feature-custom-implementation-context.template.d.ts.map +1 -1
  198. package/dist/esm/core/specifications/templates/feature/feature-development-usage-context.template.d.ts.map +1 -1
  199. package/dist/esm/core/specifications/templates/feature/feature-translation-context.template.d.ts.map +1 -1
  200. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-all-information.template.d.ts.map +1 -1
  201. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-custom-implementation-context.template.d.ts.map +1 -1
  202. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-development-usage-context.template.d.ts.map +1 -1
  203. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-translation-context.template.d.ts.map +1 -1
  204. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-all-information.template.d.ts.map +1 -1
  205. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-custom-implementation-context.template.d.ts.map +1 -1
  206. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-development-usage-context.template.d.ts.map +1 -1
  207. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-translation-context.template.d.ts.map +1 -1
  208. package/dist/esm/core/specifications/templates/milestone/milestone-all-information.template.d.ts.map +1 -1
  209. package/dist/esm/core/specifications/templates/milestone/milestone-custom-implementation-context.template.d.ts.map +1 -1
  210. package/dist/esm/core/specifications/templates/milestone/milestone-development-usage-context.template.d.ts.map +1 -1
  211. package/dist/esm/core/specifications/templates/milestone/milestone-translation-context.template.d.ts.map +1 -1
  212. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-all-information.template.d.ts.map +1 -1
  213. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-custom-implementation-context.template.d.ts.map +1 -1
  214. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-development-usage-context.template.d.ts.map +1 -1
  215. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-translation-context.template.d.ts.map +1 -1
  216. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-all-information.template.d.ts.map +1 -1
  217. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-custom-implementation-context.template.d.ts.map +1 -1
  218. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-development-usage-context.template.d.ts.map +1 -1
  219. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-translation-context.template.d.ts.map +1 -1
  220. package/dist/esm/core/specifications/templates/product/product-all-information.template.d.ts.map +1 -1
  221. package/dist/esm/core/specifications/templates/product/product-custom-implementation-context.template.d.ts.map +1 -1
  222. package/dist/esm/core/specifications/templates/product/product-development-usage-context.template.d.ts.map +1 -1
  223. package/dist/esm/core/specifications/templates/product/product-translation-context.template.d.ts.map +1 -1
  224. package/dist/esm/core/specifications/templates/resource/resource-all-information.template.d.ts.map +1 -1
  225. package/dist/esm/core/specifications/templates/resource/resource-custom-implementation-context.template.d.ts.map +1 -1
  226. package/dist/esm/core/specifications/templates/resource/resource-development-usage-context.template.d.ts.map +1 -1
  227. package/dist/esm/core/specifications/templates/resource/resource-translation-context.template.d.ts.map +1 -1
  228. package/dist/esm/core/specifications/templates/role/role-all-information.template.d.ts.map +1 -1
  229. package/dist/esm/core/specifications/templates/role/role-custom-implementation-context.template.d.ts.map +1 -1
  230. package/dist/esm/core/specifications/templates/role/role-development-usage-context.template.d.ts.map +1 -1
  231. package/dist/esm/core/specifications/templates/role/role-translation-context.template.d.ts.map +1 -1
  232. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-all-information.template.d.ts.map +1 -1
  233. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-custom-implementation-context.template.d.ts.map +1 -1
  234. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-development-usage-context.template.d.ts.map +1 -1
  235. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-translation-context.template.d.ts.map +1 -1
  236. package/dist/esm/core/specifications/validate-resource-field-completeness.d.ts.map +1 -1
  237. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
  238. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +4 -4
  239. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
  240. package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
  241. package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
  242. package/dist/esm/core/utils/atomic-write.utils.d.ts.map +1 -1
  243. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  244. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
  245. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  246. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  247. package/dist/esm/deliberations/services/deliberation.companion.service.js +0 -5
  248. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  249. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
  250. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +0 -2
  251. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
  252. package/dist/esm/deliberations/utils/load-committed-expert-agents.d.ts.map +1 -1
  253. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  254. package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
  255. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  256. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
  257. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts.map +1 -1
  258. package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
  259. package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
  260. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  261. package/dist/esm/email/services/email-template.companion.service.js +23 -1
  262. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  263. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
  264. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
  265. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +82 -3
  266. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  267. package/dist/esm/executions/services/companion-executions.companion.service.js +128 -6
  268. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  269. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  270. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
  271. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  272. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  273. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
  274. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  275. package/dist/esm/expert-personas/models/expert-persona-derivation.schemas.d.ts.map +1 -1
  276. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +9 -24
  277. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  278. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +11 -60
  279. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  280. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts.map +1 -1
  281. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts.map +1 -1
  282. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts.map +1 -1
  283. package/dist/esm/i18n/components/APPLICATION_LEVEL_MENUBAR.en.d.ts.map +1 -1
  284. package/dist/esm/i18n/components/APPLICATION_LEVEL_NAVIGATION_BACK.en.d.ts.map +1 -1
  285. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  286. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
  287. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts.map +1 -1
  288. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  289. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts.map +1 -1
  290. package/dist/esm/i18n/components/APPLICATION_LEVEL_TOOLBAR.en.d.ts.map +1 -1
  291. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
  292. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
  293. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
  294. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
  295. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts.map +1 -1
  296. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts.map +1 -1
  297. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
  298. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  299. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts.map +1 -1
  300. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  301. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
  302. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts.map +1 -1
  303. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts.map +1 -1
  304. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts.map +1 -1
  305. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
  306. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts.map +1 -1
  307. package/dist/esm/i18n/components/LOW_LEVEL_ACTION_BAR.en.d.ts.map +1 -1
  308. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts.map +1 -1
  309. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  310. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  311. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts.map +1 -1
  312. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts.map +1 -1
  313. package/dist/esm/i18n/components/LOW_LEVEL_AI_CHAIN_OF_THOUGHT.en.d.ts.map +1 -1
  314. package/dist/esm/i18n/components/LOW_LEVEL_AI_CODE_BLOCK.en.d.ts.map +1 -1
  315. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts.map +1 -1
  316. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts.map +1 -1
  317. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION.en.d.ts.map +1 -1
  318. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts.map +1 -1
  319. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts.map +1 -1
  320. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts.map +1 -1
  321. package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_EXECUTION.en.d.ts.map +1 -1
  322. package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_NODE.en.d.ts.map +1 -1
  323. package/dist/esm/i18n/components/LOW_LEVEL_AI_INLINE_CITATION.en.d.ts.map +1 -1
  324. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts.map +1 -1
  325. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts.map +1 -1
  326. package/dist/esm/i18n/components/LOW_LEVEL_AI_OPEN_IN_CHAT.en.d.ts.map +1 -1
  327. package/dist/esm/i18n/components/LOW_LEVEL_AI_PLAN.en.d.ts.map +1 -1
  328. package/dist/esm/i18n/components/LOW_LEVEL_AI_PROMPT_INPUT.en.d.ts.map +1 -1
  329. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  330. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts.map +1 -1
  331. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts.map +1 -1
  332. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts.map +1 -1
  333. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
  334. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
  335. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  336. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
  337. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  338. package/dist/esm/i18n/components/LOW_LEVEL_BREADCRUMB.en.d.ts.map +1 -1
  339. package/dist/esm/i18n/components/LOW_LEVEL_BUTTON.en.d.ts.map +1 -1
  340. package/dist/esm/i18n/components/LOW_LEVEL_CAROUSEL.en.d.ts.map +1 -1
  341. package/dist/esm/i18n/components/LOW_LEVEL_CELEBRATION_OVERLAY.en.d.ts.map +1 -1
  342. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts.map +1 -1
  343. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts.map +1 -1
  344. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  345. package/dist/esm/i18n/components/LOW_LEVEL_DIALOG.en.d.ts.map +1 -1
  346. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts.map +1 -1
  347. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BOOLEAN.en.d.ts.map +1 -1
  348. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts.map +1 -1
  349. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_DURATION.en.d.ts.map +1 -1
  350. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts.map +1 -1
  352. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
  353. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_GALLERY.en.d.ts.map +1 -1
  354. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts.map +1 -1
  355. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_VIDEO.en.d.ts.map +1 -1
  356. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_MONEY.en.d.ts.map +1 -1
  357. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts.map +1 -1
  359. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts.map +1 -1
  360. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts.map +1 -1
  361. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts.map +1 -1
  362. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts.map +1 -1
  363. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_LOCK_BADGE.en.d.ts.map +1 -1
  364. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts.map +1 -1
  365. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts.map +1 -1
  366. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  367. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_BOOLEAN.en.d.ts.map +1 -1
  368. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts.map +1 -1
  369. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  370. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_PHONE.en.d.ts.map +1 -1
  371. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  372. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts.map +1 -1
  373. package/dist/esm/i18n/components/LOW_LEVEL_IMAGE_CROP.en.d.ts.map +1 -1
  374. package/dist/esm/i18n/components/LOW_LEVEL_LOADING_OVERLAY.en.d.ts.map +1 -1
  375. package/dist/esm/i18n/components/LOW_LEVEL_LOADING_SPINNER.en.d.ts.map +1 -1
  376. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts.map +1 -1
  377. package/dist/esm/i18n/components/LOW_LEVEL_OVERLAY_CONTAINER.en.d.ts.map +1 -1
  378. package/dist/esm/i18n/components/LOW_LEVEL_PAGINATION.en.d.ts.map +1 -1
  379. package/dist/esm/i18n/components/LOW_LEVEL_SELECT_MULTIPLE.en.d.ts.map +1 -1
  380. package/dist/esm/i18n/components/LOW_LEVEL_SHEET.en.d.ts.map +1 -1
  381. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  382. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
  383. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
  384. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
  385. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
  386. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
  387. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
  388. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts.map +1 -1
  389. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  390. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts.map +1 -1
  391. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts.map +1 -1
  392. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts.map +1 -1
  393. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts.map +1 -1
  394. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  395. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
  396. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts.map +1 -1
  397. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
  398. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
  399. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
  400. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts.map +1 -1
  401. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts.map +1 -1
  402. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
  403. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
  404. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts.map +1 -1
  405. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts.map +1 -1
  407. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  408. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
  409. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_PAGINATION.en.d.ts.map +1 -1
  411. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts.map +1 -1
  412. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts.map +1 -1
  413. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts.map +1 -1
  414. package/dist/esm/i18n/components/guidance_announcement.en.d.ts.map +1 -1
  415. package/dist/esm/i18n/components/guidance_banner.en.d.ts.map +1 -1
  416. package/dist/esm/i18n/components/guidance_card.en.d.ts.map +1 -1
  417. package/dist/esm/i18n/components/guidance_checklist.en.d.ts.map +1 -1
  418. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
  419. package/dist/esm/i18n/components/guidance_modal.en.d.ts.map +1 -1
  420. package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts.map +1 -1
  421. package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
  422. package/dist/esm/i18n/components/guidance_tooltip.en.d.ts.map +1 -1
  423. package/dist/esm/i18n/components/guidance_tour.en.d.ts.map +1 -1
  424. package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts.map +1 -1
  425. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  426. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -1
  427. package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -1
  428. package/dist/esm/i18n/index.d.ts.map +1 -1
  429. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  430. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
  431. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
  432. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  433. package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -1
  434. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  435. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  436. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  437. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
  438. package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
  439. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +58 -0
  440. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  441. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +35 -0
  442. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  443. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  444. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
  445. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  446. package/dist/esm/i18n-labelling/services/component-labels-bootstrap.companion.service.d.ts.map +1 -1
  447. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +55 -1
  448. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  449. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +178 -73
  450. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  451. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +3 -3
  452. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  453. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +16 -5
  454. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  455. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +35 -2
  456. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  457. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +68 -29
  458. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  459. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  460. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +126 -35
  461. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  462. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
  463. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
  464. package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
  465. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
  466. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
  467. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
  468. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
  469. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
  470. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
  471. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
  472. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
  473. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  474. package/dist/esm/i18n-labelling/utils/role-lifecycle-keys.utils.d.ts.map +1 -1
  475. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +104 -0
  476. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  477. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +163 -18
  478. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  479. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
  480. package/dist/esm/i18n-labelling/utils/translate-locale-contract.utils.d.ts.map +1 -1
  481. package/dist/esm/index.d.ts.map +1 -1
  482. package/dist/esm/market/services/market-generation.companion.service.d.ts.map +1 -1
  483. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +82 -3
  484. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  485. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +210 -54
  486. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  487. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +27 -1
  488. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  489. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +38 -5
  490. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  491. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +49 -0
  492. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -0
  493. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +95 -0
  494. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -0
  495. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  496. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  497. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +9 -4
  498. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  499. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
  500. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +25 -6
  501. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  502. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +82 -25
  503. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  504. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +83 -2
  505. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  506. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +197 -4
  507. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  508. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  509. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
  510. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  511. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +1 -1
  512. package/dist/esm/meta-workflows/services/playbook-execution-trace.companion.service.d.ts.map +1 -1
  513. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +44 -3
  515. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  516. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +346 -42
  517. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  518. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +1 -1
  519. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +117 -2
  520. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
  521. package/dist/esm/technical-doc/services/technical-doc.companion.service.js +260 -69
  522. package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
  523. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +7 -1
  524. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
  525. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +179 -10
  526. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
  527. package/dist/esm/technical-doc/services/technical-documentation-environment-identity.companion.service.d.ts.map +1 -1
  528. package/dist/esm/technical-doc/services/technical-documentation-pilot-assets.companion.service.d.ts.map +1 -1
  529. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
  530. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  531. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +10 -2
  532. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  533. package/package.json +17 -17
  534. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
  535. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
  536. package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
  537. package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
  538. package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
  539. package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
  540. package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
  541. package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
  542. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +0 -19
  543. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +0 -1
  544. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +0 -19
  545. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +0 -1
  546. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
  547. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
  548. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
  549. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"technical-doc.companion.service.js","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-doc.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;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AK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAChD,aAAa,CAAC,KAAK,CAAC;mBACjB,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;mBACtC,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;mBACtC,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;mBAClC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CACrC,EACD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6DAA6D","sourcesContent":["/**\n * Companion-side orchestrator for the on-demand OpenAPI generation\n * flow declared in `saas-technical-doc.md` Step 3.\n *\n * Responsibility split (matching `MarketGenerationCompanionService`):\n *\n * - Subprocess (`'openapi-generation-input'`) — owns\n * `loadSharedModules()`, registry materialization, URL building,\n * and `z.toJSONSchema()` conversion. Returns a flat JSON-safe projection of\n * operations, organization-role semantics, explicitly unit-aware resources,\n * resource tags, error schema and diagnostics (see\n * `openapi-generation-input.behavior.ts`). Lives in the\n * subprocess because that is the only process that can load\n * the user app's `@wildo-ai/saas-models`-decorated schemas.\n *\n * - Parent (this service) — merges the subprocess projection\n * with `WildoSaasConfig` metadata it already has via the\n * companion context (`appSlug`, `appDisplayName`) and the per-service\n * `wildo.tech-doc.config.ts` (`supportedApiVersion`, `publicMarketingTitle`,\n * discovered via the unique `frontendType: TECH_DOC` service —\n * Step 7.5 refactor). It then pipes the assembled\n * `OpenApiGenerationInput` into the pure\n * `generateOpenApiDocuments(...)` from\n * `@wildo-ai/saas-technical-doc/companion`. The generator\n * handles filtering, audience splitting, and YAML emission.\n *\n * The generate route returns the in-memory `{ filename, yaml }` documents. The\n * publish route writes the same bytes into the app's managed OpenAPI directory,\n * removing canonical skipped-section files so stale API pages cannot survive.\n *\n * @wildo_source:part:start companion.technical-doc.service facet:layer:companion facet:family:technical-doc\n */\n\nimport { existsSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { inject, injectable } from 'inversify';\nimport {\n AppConfigurationService,\n ErrorBuilderBackendService,\n LoggerService,\n SAAS_SERVICE_TYPES,\n resolveFeatureGatedCoreResourceExclusions,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport { AuthMethod, CoreResourceType, ErrorCustomMessageReference, ErrorType, getEnabledMethods } from '@wildo-ai/saas-models';\nimport { AppFrontendType, loadConfig } from '@wildo-ai/platform-config-lib';\nimport {\n generateOpenApiDocuments,\n resolveTechnicalDocumentationForbiddenPublicSentinels,\n resolveTechnicalDocumentationOutputBudgets,\n OpenApiGenerationInputSchema,\n resolveApplicationOrganizationRoleDocumentation,\n type ApplicationOrganizationRoleDocumentationSource,\n type ApplicationOrganizationUnitResourceDocumentation,\n type OpenApiGenerationInput,\n type OpenApiGenerationProjectorStats,\n type OperationProjection,\n type ResourceTag,\n type TechnicalDocGenerateOpenApiResult,\n type ApplicationConnectionServer,\n type ApplicationAuthenticationDocumentationSource,\n} from '@wildo-ai/saas-technical-doc/companion';\nimport {\n createApiReferenceLinkIndex,\n resolveTechnicalDocumentationApiReferenceLink,\n type WildoTechnicalDocConfig,\n} from '@wildo-ai/saas-technical-doc';\nimport { createConservedApiReferenceModel } from '@wildo-ai/saas-technical-doc/openapi-reference-model';\n\nimport { TechnicalDocumentationPilotCompanionService } from './technical-documentation-pilot.companion.service';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n type TechnicalDocumentationApplicationDerivationCompanionService,\n type TechnicalDocumentationApplicationDerivationResult,\n} from './technical-documentation-application-derivation.companion.service';\nimport type {\n TechnicalDocumentationEnvironmentIdentityInput,\n} from './technical-documentation-environment-identity.companion.service';\nimport { getCompanionConfiguredPrimaryLanguage } from '../../core/config/primary-language.companion.utils';\nimport { readPerUnitLabels, resolvePerUnitFilePath } from '../../i18n-labelling/utils/per-unit-file.utils';\nimport { ROLE_LABELLING_UNIT_FILE_PATH_HINT } from '../../i18n-labelling/utils/role-lifecycle-keys.utils';\n\n/**\n * The diagnostics result is owned by the engine contract. The local companion\n * re-exports it only for its in-memory inspection route; managed publication\n * has its own pointer/fact result and never writes this diagnostic shape.\n */\nexport type {\n TechnicalDocGenerateOpenApiResult,\n};\n\n/**\n * Conventional file name for the per-service technical-documentation\n * configuration (Step 7.5 refactor — `saas-technical-doc.md`). Authored\n * at the docs service root next to `package.json` / `docusaurus.config.ts`.\n *\n * Discovery is \"by convention, not by configuration\":\n *\n * - The companion locates this file by walking the `services` entry\n * whose `frontendType === TECH_DOC` and joining `<saasRoot>/<service.path>/`.\n * The saas-config schema's `superRefine` already enforces \"at most\n * one TECH_DOC service per app\", so the lookup is deterministic.\n *\n * - File presence is the enable signal — there is NO `enabled` field\n * on `WildoTechnicalDocConfigSchema`. A TECH_DOC service without\n * this file is treated as a misconfiguration and the loader fails\n * closed (rather than silently shipping a docs site with no\n * OpenAPI metadata).\n */\nconst PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME = 'wildo.tech-doc.config.ts';\n\n/**\n * Subprocess wire shape — kept as a structural type rather than an imported\n * symbol because the source declaration lives inside the introspection-\n * subprocess module which intentionally is NOT exported from `src/index.ts`\n * (subprocess code must not load in the parent process).\n *\n * The `stats` field reuses {@link OpenApiGenerationProjectorStats} from the\n * engine package so the projector subprocess and the companion-side result\n * cannot drift on the diagnostic counts they exchange (H-C fix-up).\n */\ninterface OpenApiGenerationInputSubprocessOutput {\n operations: OperationProjection[];\n /** Source-derived application activation facts; independent from the API-reference selection. */\n readonly hasConfiguredMcpToolOperations: boolean;\n readonly hasConfiguredA2aSkills: boolean;\n /**\n * Source-derived role semantics cross the subprocess boundary unchanged.\n * The parent then joins the application's primary-locale labels before a\n * consumer-documentation fact is derived; labels are intentionally not\n * fabricated by the registry projector.\n */\n readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentationSource[];\n /** Exact resources selected by the application's unit-narrowing startup declaration. */\n readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];\n /** Canonical framework HTTP error envelope, JSON-safe across the subprocess boundary. */\n errorResponseSchema: unknown;\n /**\n * Per-resource OpenAPI tag descriptors (the resource's business purpose),\n * merged into {@link OpenApiGenerationInput.resourceTags}. Mirrors the\n * projector's wire shape; see `openapi-generation-input.behavior.ts`.\n */\n resourceTags: ResourceTag[];\n stats: OpenApiGenerationProjectorStats;\n}\n\n@injectable()\nexport class TechnicalDocCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService)\n private readonly appConfigService: AppConfigurationService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService)\n private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocumentationApplicationDerivationService)\n private readonly applicationDerivationService: TechnicalDocumentationApplicationDerivationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('TechnicalDocCompanionService');\n this.logger.setDebugTypeLogging('TechnicalDocCompanionService', true);\n }\n\n\n /**\n * Produces one framework private derivation, including the resolved\n * organization-role inventory, and its public pre-render bundle.\n * The caller selects the environment backend service; the companion resolves\n * the environment identity and source-derived operation-exposure evidence.\n * It does not read accepted application-family state or select application\n * documentation. The role inventory is a narrow configuration projection,\n * not an application-authored use-case selection.\n */\n public async deriveApplicationDocumentationBundles(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<TechnicalDocumentationApplicationDerivationResult> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n return this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: subprocessOutput.operations,\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n ...this.resolveApplicationConnectionInputs(technicalDocConfig),\n authentication: this.resolveApplicationAuthenticationInputs(),\n });\n }\n\n /**\n * The application facts the documentation names instead of hedging: the product's own name and\n * the base URLs it publishes.\n *\n * The name is what a customer calls the product — `displayName` from `wildo.saas.config.ts`,\n * falling back to the application's `name`. Deliberately NOT `publicMarketingTitle`: that is the documentation SITE's\n * title (\"Wonder Todos — Technical Documentation\") and reads wrong inside a sentence.\n *\n * The base URLs are the ones the application already authors for its API reference, so the\n * guides and the reference name the same origins by construction.\n */\n private resolveApplicationConnectionInputs(technicalDocConfig: WildoTechnicalDocConfig): {\n applicationName: string;\n apiServers: readonly ApplicationConnectionServer[];\n } {\n const saasConfig = this.companionContext.saasConfig;\n const applicationName = saasConfig.displayName?.trim() || saasConfig.name.trim();\n if (applicationName.length === 0) {\n throw new Error('technical-documentation requires the application to declare a name (displayName or name in wildo.saas.config.ts)');\n }\n return {\n applicationName,\n apiServers: (technicalDocConfig.apiServers ?? []).map((server) => ({\n url: server.url,\n ...(server.description === undefined ? {} : { description: server.description }),\n })),\n };\n }\n\n /**\n * The sign-in policy this application actually applies, per user type.\n *\n * Read from `userTypes[<key>].auth`, which is where all authentication policy lives — there are\n * no global defaults. Enabled methods go through `getEnabledMethods`, the same helper the runtime\n * uses, rather than re-reading the boolean-or-object shorthand here; and they are ordered by the\n * engine's own enum so two applications list the same methods in the same order.\n */\n private resolveApplicationAuthenticationInputs(): ApplicationAuthenticationDocumentationSource {\n const userTypes = Object.entries(this.appConfigService.config.userTypes ?? {}).map(([userTypeKey, definition]) => {\n const auth = definition.auth;\n const enabled = getEnabledMethods(auth.authMethodsEnabled);\n return {\n userTypeKey,\n enabledMethods: Object.values(AuthMethod).filter((method) => enabled.has(method)),\n multifactor: {\n required: auth.mfaPolicy.requireMFA,\n strongRequired: auth.mfaPolicy.requireStrongMFA,\n enrollmentGracePeriodDays: auth.mfaPolicy.enrollmentGracePeriodDays,\n passkeyExemptFromMultifactor: auth.mfaPolicy.passkeyExemptFromMFA,\n ...(auth.mfaPolicy.acceptableMFAMethods === undefined ? {} : { acceptableMethods: auth.mfaPolicy.acceptableMFAMethods }),\n },\n password: {\n minLength: auth.passwordPolicy.minLength,\n maxLength: auth.passwordPolicy.maxLength,\n requireUppercase: auth.passwordPolicy.requireUppercase,\n requireLowercase: auth.passwordPolicy.requireLowercase,\n requireNumbers: auth.passwordPolicy.requireNumbers,\n requireSpecialChars: auth.passwordPolicy.requireSpecialChars,\n expiryDays: auth.passwordPolicy.expiryDays,\n },\n session: {\n durationMinutes: auth.sessionDurationMinutes,\n ...(auth.maxConcurrentSessions === undefined ? {} : { maxConcurrentSessions: auth.maxConcurrentSessions }),\n },\n lockout: {\n maxLoginAttempts: auth.lockoutPolicy.maxLoginAttempts,\n lockoutDurationMinutes: auth.lockoutPolicy.lockoutDurationMinutes,\n progressive: auth.lockoutPolicy.progressiveLockout,\n maxProgressiveLockoutHours: auth.lockoutPolicy.maxProgressiveLockoutHours,\n },\n };\n });\n if (userTypes.length === 0) {\n throw new Error('technical-documentation requires the application to declare at least one user type');\n }\n return { userTypes };\n }\n\n /**\n * Publishes the complete managed documentation tree at stable generated paths.\n * This operation synchronizes the framework-owned consumer documentation into\n * `src/generated/consumer-documentation/**`. The directory is generator-owned;\n * Git provides history and rollback.\n *\n * **No capture.** Screenshots resolve to `PLACEHOLDER` (framework-materialized bytes), so\n * publication needs no browser, no provisioned tenant and no live stack. That was the\n * decision that collapsed this from a multi-precondition chain to one call: pictures are\n * a pre-production refinement, and `refuseProvisionalAssets` is how a production\n * environment declares it will not ship without them.\n *\n * Docusaurus runtime/build measurement happens against the generated publication after it\n * exists. Measuring the previous site before publication and applying that observation to\n * a different candidate made first cutover circular and, in practice, let the retired\n * 981-page OpenAPI site block publication of the much smaller generated tree.\n */\n public async publishManagedDocumentation(\n input: TechnicalDocumentationEnvironmentIdentityInput & { readonly refuseProvisionalAssets?: boolean },\n ) {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const generated = await this.generateVerifiedApplicationOpenApiDocuments(input);\n for (const section of generated.documents.sections) {\n createConservedApiReferenceModel(section);\n }\n const apiReferenceLinkIndex = createApiReferenceLinkIndex(generated.documents.sections);\n const publisher = new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot);\n await publisher.publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${this.companionContext.saasConfig.slug}`],\n });\n\n return publisher.generateValidateAndPublish({\n derivation: generated.derivation,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n forbiddenPublicSentinels: resolveTechnicalDocumentationForbiddenPublicSentinels(\n technicalDocConfig.forbiddenPublicSentinels,\n ),\n budgets: resolveTechnicalDocumentationOutputBudgets(technicalDocConfig.outputBudgets),\n resolveApiReferenceTarget: (target) => resolveTechnicalDocumentationApiReferenceLink(apiReferenceLinkIndex, target),\n ...(input.refuseProvisionalAssets === undefined\n ? {}\n : { refuseProvisionalAssets: input.refuseProvisionalAssets }),\n });\n }\n\n /**\n * Generates the complete API reference from the resolved application and\n * enabled framework resource catalog.\n *\n * Narrative documentation intentionally selects a small set of source-backed\n * customer journeys. It must not become an allow-list for API operations:\n * doing so hid every framework resource and every application resource other\n * than the one chosen for the current use-case page. The OpenAPI generator\n * already applies the API-call and API-key exposure filters to this complete\n * resolved catalog; the derivation remains part of publication for consumer\n * content and evidence, but does not truncate the API contract.\n */\n public async generateVerifiedApplicationOpenApiDocuments(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<{\n readonly derivation: TechnicalDocumentationApplicationDerivationResult;\n readonly documents: ReturnType<typeof generateOpenApiDocuments>;\n readonly sourceStats: OpenApiGenerationProjectorStats;\n readonly authorizedOperationCount: number;\n }> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n const derivation = await this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: subprocessOutput.operations,\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n ...this.resolveApplicationConnectionInputs(technicalDocConfig),\n authentication: this.resolveApplicationAuthenticationInputs(),\n });\n const generationInput = this.assembleGenerationInput(subprocessOutput, technicalDocConfig);\n\n return Object.freeze({\n derivation,\n documents: generateOpenApiDocuments(generationInput),\n sourceStats: subprocessOutput.stats,\n authorizedOperationCount: subprocessOutput.operations.length,\n });\n }\n\n /**\n * Generate the Application + Organization OpenAPI YAML\n * documents for the currently-loaded SaaS app. Returns the\n * pure-function generator output unchanged so the controller\n * can pass it straight through as JSON.\n *\n * The method does NOT short-circuit on a \"disabled docs site\" —\n * after the Step 7.5 refactor there is no `enabled` flag anywhere\n * (file presence under a TECH_DOC service IS the enable signal).\n * If the docs service or its `wildo.tech-doc.config.ts` is missing,\n * {@link loadTechnicalDocConfig} fails closed with a CONFIGURATION\n * error before generation runs.\n */\n public async generateOpenApiDocuments(): Promise<TechnicalDocGenerateOpenApiResult> {\n this.logDebug('technical-doc generate-openapi — start', {\n appSlug: this.companionContext.saasConfig.slug,\n });\n\n // Load the per-service config BEFORE the subprocess call: its\n // `apiDocResources` opt-in is threaded into the projector so the subprocess\n // also documents the named core (engine) resources.\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const generationInput = this.assembleGenerationInput(subprocessOutput, technicalDocConfig);\n const documents = generateOpenApiDocuments(generationInput);\n\n this.logDebug('technical-doc generate-openapi — success', {\n appSlug: generationInput.appSlug,\n sectionCount: documents.sections.length,\n resourceCount: subprocessOutput.stats.resourceCount,\n consideredOperationCount: subprocessOutput.stats.consideredOperationCount,\n projectedRowCount: subprocessOutput.stats.projectedRowCount,\n });\n\n return {\n documents,\n stats: subprocessOutput.stats,\n metadata: {\n appSlug: generationInput.appSlug,\n appDisplayName: generationInput.appDisplayName,\n ...(generationInput.publicMarketingTitle !== undefined\n ? { publicMarketingTitle: generationInput.publicMarketingTitle }\n : {}),\n supportedApiVersion: generationInput.supportedApiVersion,\n },\n };\n }\n\n /**\n * Materializes the two generated OpenAPI serializations at stable paths for\n * the docs application. This is companion-owned generation; Docusaurus reads\n * the resulting files and never regenerates or edits them.\n */\n public async publishOpenApiReference(): Promise<{ readonly rootPath: string; readonly outputPaths: readonly string[] }> {\n const generated = await this.generateOpenApiDocuments();\n return new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot).publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${generated.metadata.appSlug}`],\n });\n }\n\n /**\n * Call the `'openapi-generation-input'` introspection behavior\n * on any backend service (the projector behavior routes to\n * `library` which every backend service declares — same picker\n * pattern as `MarketGenerationCompanionService.pickMarketCarrierServiceKey`\n * and `getResourcesRegistry`'s carrier picker).\n *\n * Validates the subprocess wire format defensively: a structural\n * mismatch here would otherwise surface as a confusing Zod parse\n * failure deeper in the generator.\n */\n private async callSubprocessProjector(\n apiDocResources?: WildoTechnicalDocConfig['apiDocResources'],\n excludedCoreResourceTypes?: readonly string[],\n ): Promise<OpenApiGenerationInputSubprocessOutput> {\n const input = {\n ...(apiDocResources !== undefined ? { apiDocResources } : {}),\n ...(excludedCoreResourceTypes !== undefined ? { excludedCoreResourceTypes } : {}),\n };\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickProjectorCarrierServiceKey(),\n behavior: 'openapi-generation-input',\n // Thread both the authored core-resource selection and the canonical\n // runtime feature exclusions across the JSON-safe subprocess boundary.\n ...(Object.keys(input).length > 0 ? { input } : {}),\n });\n\n if (introspection.success === false) {\n const failure = introspection;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: failure.error.message,\n serviceKey: failure.serviceKey,\n behavior: failure.behavior,\n targetId: failure.targetId,\n },\n });\n }\n\n const data: unknown = introspection.data;\n if (\n !isPlainObject(data)\n || !Array.isArray(data.operations)\n || typeof data.hasConfiguredMcpToolOperations !== 'boolean'\n || typeof data.hasConfiguredA2aSkills !== 'boolean'\n || !isPlainObject(data.errorResponseSchema)\n || !Array.isArray(data.resourceTags)\n || !Array.isArray(data.organizationRoles)\n || !Array.isArray(data.organizationUnitAwareResources)\n || !isOpenApiGenerationProjectorStats(data.stats)\n ) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'openapi-generation-input subprocess returned a malformed payload — expected '\n + '`{ operations: OperationProjection[], hasConfiguredMcpToolOperations: boolean, hasConfiguredA2aSkills: boolean, organizationRoles: OrganizationRole[], organizationUnitAwareResources: OrganizationUnitAwareResource[], errorResponseSchema: object, resourceTags: ResourceTag[], stats: { ... } }`.',\n },\n });\n }\n const output = data as unknown as OpenApiGenerationInputSubprocessOutput;\n assertResolvedHttpOperationProjectionConservation(output);\n return output;\n }\n\n /**\n * Compose the subprocess projection with the\n * `WildoSaasConfig`-derived metadata the parent process owns +\n * the per-service `wildo.tech-doc.config.ts` block (Step 7.5\n * refactor — `saas-technical-doc.md`).\n *\n * The `publicMarketingTitle` projected into `openapi.info.title`\n * comes from the per-service config (NOT from\n * `WildoSaasConfig.technicalDoc?.publicMarketingTitle` — that root-\n * level field was removed in Step 7.5 in favor of co-locating the\n * tech-doc-specific config with the engine package that owns it).\n *\n * Re-parses the result through `OpenApiGenerationInputSchema`\n * so the generator only ever sees a fully-validated payload —\n * if a future field is added to the schema, this assembly step\n * must be updated in the same commit and the Zod parse will\n * fail fast otherwise.\n */\n private assembleGenerationInput(\n subprocessOutput: OpenApiGenerationInputSubprocessOutput,\n technicalDocConfig: WildoTechnicalDocConfig,\n ): OpenApiGenerationInput {\n const saasConfig = this.companionContext.saasConfig;\n const candidateInput: OpenApiGenerationInput = {\n appSlug: saasConfig.slug,\n appDisplayName: saasConfig.displayName,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n ...(technicalDocConfig.publicMarketingTitle\n ? { publicMarketingTitle: technicalDocConfig.publicMarketingTitle }\n : {}),\n operations: subprocessOutput.operations,\n errorResponseSchema: subprocessOutput.errorResponseSchema,\n ...(subprocessOutput.resourceTags && subprocessOutput.resourceTags.length > 0\n ? { resourceTags: applyApiReferenceResourceCategories(subprocessOutput.resourceTags, technicalDocConfig.apiReferenceResourceCategories) }\n : {}),\n // App-enriched OpenAPI `servers` (deployment base URLs). The framework\n // emits the security SCHEMES automatically (they are universal), but the\n // server URLs are app/environment knowledge → authored on the tech-doc\n // config and threaded straight through.\n ...(technicalDocConfig.apiServers && technicalDocConfig.apiServers.length > 0\n ? { servers: technicalDocConfig.apiServers }\n : {}),\n // App-authored landing-page intro; the generator prepends it to the\n // framework-universal API-conventions block to form `info.description`.\n ...(technicalDocConfig.apiOverview\n ? { apiOverview: technicalDocConfig.apiOverview }\n : {}),\n };\n\n const parsed = OpenApiGenerationInputSchema.safeParse(candidateInput);\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'Failed to assemble OpenApiGenerationInput — schema validation rejected the '\n + 'merged subprocess + saas-config payload. This usually means the subprocess produced '\n + 'an OperationProjection that fails the strict OperationProjectionSchema (e.g. an '\n + 'API_CALL_WITH_CALLBACK row missing `callbackPath`).',\n issues: parsed.error.issues,\n },\n });\n }\n return parsed.data;\n }\n\n /**\n * Load the per-service `wildo.tech-doc.config.ts` for the\n * (unique) `frontendType: TECH_DOC` service declared in\n * `wildo.saas.config.ts`.\n *\n * Discovery contract (Step 7.5 refactor — `saas-technical-doc.md`):\n *\n * - The TECH_DOC service is identified by `frontendType === TECH_DOC`,\n * NOT by service key. This decouples the companion from any\n * convention like `services.docs` — apps may name the service\n * anything (e.g. `'apiDocs'`, `'developerPortal'`).\n *\n * - The saas-config schema's `superRefine` enforces \"at most one\n * TECH_DOC service per app\", so the lookup either finds exactly\n * one match or zero. Two matches cannot reach this code.\n *\n * - File presence IS the enable signal. A TECH_DOC service without\n * `wildo.tech-doc.config.ts` is a misconfiguration we surface\n * immediately (CONFIGURATION error) rather than letting the OpenAPI\n * generator silently emit a docs-site-incompatible payload.\n *\n * - The Zod validation that rejects unknown keys / malformed values\n * runs inside `defineTechnicalDocConfig` (which the per-service\n * config file invokes via `export default defineTechnicalDocConfig({...})`).\n * `loadConfig` evaluates the file via jiti, so by the time it\n * returns we have an already-parsed `WildoTechnicalDocConfig`.\n *\n * - The config is evaluated for every derivation or publication request.\n * It is an application-owned input outside the companion package's\n * TypeScript watch graph, so a process-lifetime cache would make a valid\n * taxonomy, server or overview edit invisible until an unrelated restart.\n * Publication is infrequent and config loading is tiny beside the source\n * projection, making freshness the correct trade-off.\n *\n * - The `csp?` `@unimplemented` warning fires in the same evaluation\n * pass (also inside `defineTechnicalDocConfig`) — this loader does\n * not need to re-check authored fields.\n *\n * @throws CONFIGURATION error if no TECH_DOC service is declared OR if\n * the per-service config file is missing.\n */\n private async loadTechnicalDocConfig(): Promise<WildoTechnicalDocConfig> {\n const techDocServiceEntry = Object.entries(this.companionContext.saasConfig.services)\n .find(([, service]) => service.frontendType === AppFrontendType.TECH_DOC);\n\n if (!techDocServiceEntry) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'No frontend service with `frontendType: TECH_DOC` is declared in '\n + 'wildo.saas.config.ts. The technical-documentation companion routes '\n + '(diagnostic OpenAPI generation / managed publication) require an authored TECH_DOC service '\n + 'because that service folder owns the per-service '\n + '`wildo.tech-doc.config.ts` (publicMarketingTitle, API projection metadata, csp). '\n + 'Add a TECH_DOC service in wildo.saas.config.ts and ship the per-service '\n + 'config file under it.',\n },\n });\n }\n\n const [techDocServiceKey, techDocService] = techDocServiceEntry;\n const techDocConfigPath = path.resolve(\n this.companionContext.saasRoot,\n techDocService.path,\n PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME,\n );\n\n if (!existsSync(techDocConfigPath)) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `TECH_DOC service '${techDocServiceKey}' is declared in wildo.saas.config.ts `\n + `but the required per-service config file '${PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME}' `\n + `is missing under '${techDocService.path}/'. File presence IS the enable signal `\n + '(the retired `technicalDoc.enabled` setting was replaced by file '\n + 'presence). Create the file with '\n + '`export default defineTechnicalDocConfig({ ... })` from '\n + '`@wildo-ai/saas-technical-doc`.',\n expectedPath: techDocConfigPath,\n },\n });\n }\n\n let loaded: WildoTechnicalDocConfig;\n try {\n // `freshModuleCache` is what makes the docblock's \"evaluated for every request\" true. Calling\n // `loadConfig` again is NOT enough on its own: jiti's module cache is process-global, so\n // without this the second evaluation returns the first one's result and a valid taxonomy,\n // server or overview edit stays invisible until an unrelated restart — precisely the outcome\n // the contract above rejects. Same defect as issue #170, different read site.\n loaded = await loadConfig<WildoTechnicalDocConfig>(techDocConfigPath, { freshModuleCache: true });\n } catch (e) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Failed to load per-service technical-documentation config at ${techDocConfigPath}. `\n + 'The file MUST do `export default defineTechnicalDocConfig({...})` and pass '\n + 'WildoTechnicalDocConfigSchema (`z.strictObject` — unknown keys reject).',\n cause: describeCaughtError(e),\n },\n });\n }\n\n return loaded;\n }\n\n /**\n * Join source-derived role semantics to the exact primary-language labels\n * used by this application. The labels are not decoration: administrators\n * must see the same role names and descriptions in documentation and in the\n * member-management interface, so an incomplete label unit blocks\n * publication instead of falling back to a prettified role token.\n */\n private async resolveApplicationOrganizationRoles(\n backendServiceKey: string,\n roles: readonly ApplicationOrganizationRoleDocumentationSource[],\n ) {\n const backendService = this.companionContext.servicesByKey[backendServiceKey];\n if (backendService === undefined || backendService.frontendType !== undefined) {\n throw new Error(`technical-documentation role labels require a declared backend service key: ${backendServiceKey}`);\n }\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const i18nRoot = path.resolve(this.companionContext.saasRoot, backendService.path, 'src/engine/i18n');\n const roleLabelsPath = resolvePerUnitFilePath({\n i18nRoot,\n unit: { filePathHint: ROLE_LABELLING_UNIT_FILE_PATH_HINT },\n localeCode: primaryLocale,\n });\n const primaryLocaleLabels = await readPerUnitLabels(roleLabelsPath);\n return resolveApplicationOrganizationRoleDocumentation(roles, primaryLocaleLabels);\n }\n\n /**\n * Pick the first declared backend service key. Same picker\n * pattern as the existing companion services that route to\n * subprocess behaviors on the `library` target — every backend\n * declares the shared library, so any backend service is a\n * valid carrier.\n */\n private pickProjectorCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the openapi-generation-input '\n + 'introspection behavior. The behavior routes to the `library` target which every '\n + 'backend service declares — but the companion context has none.',\n },\n });\n }\n return backendServiceKey;\n }\n\n private pickFrontendApplicationServiceKey(): string {\n const frontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!frontendServiceKey) throw new Error('technical-documentation frontend runtime evidence requires one SAAS_APP service');\n return frontendServiceKey;\n }\n}\n\n/**\n * Attaches the documentation config's explicit API taxonomy to the resolved\n * resource tags before OpenAPI generation.\n *\n * The operation subprocess owns the resolved resource inventory and\n * specification facts; the TECH_DOC config owns an application's editorial\n * navigation taxonomy. Joining them here keeps both truths in their proper\n * owners, then makes the OpenAPI document the sole transport to the browser.\n * Once an application elects to declare categories, an exact inventory join is\n * required: an uncategorised new resource or a stale config name must stop\n * publication instead of quietly producing a misleading partial navigation.\n */\nexport function applyApiReferenceResourceCategories(\n resourceTags: readonly ResourceTag[],\n categories: WildoTechnicalDocConfig['apiReferenceResourceCategories'],\n): ResourceTag[] {\n if (categories === undefined) return [...resourceTags];\n const tagsByName = new Map(resourceTags.map((tag) => [tag.name, tag]));\n if (tagsByName.size !== resourceTags.length) throw new Error('OpenAPI resource tags must be unique before category assignment');\n\n const categoryByResourceName = new Map<string, WildoTechnicalDocConfig['apiReferenceResourceCategories'][number]>();\n const categoryIds = new Set<string>();\n const unavailableResourceNames: string[] = [];\n for (const category of categories) {\n if (categoryIds.has(category.id)) throw new Error(`API-reference category '${category.id}' is declared more than once`);\n categoryIds.add(category.id);\n for (const resourceName of category.resourceNames) {\n if (!tagsByName.has(resourceName)) {\n unavailableResourceNames.push(`${category.id}:${resourceName}`);\n continue;\n }\n const prior = categoryByResourceName.get(resourceName);\n if (prior !== undefined) throw new Error(`API-reference resource '${resourceName}' is assigned to both '${prior.id}' and '${category.id}'`);\n categoryByResourceName.set(resourceName, category);\n }\n }\n if (unavailableResourceNames.length > 0) {\n throw new Error(`API-reference categories name unavailable resources: ${unavailableResourceNames.sort().join(', ')}`);\n }\n const unassignedResourceNames = [...tagsByName.keys()].filter((resourceName) => !categoryByResourceName.has(resourceName)).sort();\n if (unassignedResourceNames.length > 0) {\n throw new Error(`API-reference resources have no configured category: ${unassignedResourceNames.join(', ')}`);\n }\n return resourceTags.map((tag) => {\n const category = categoryByResourceName.get(tag.name)!;\n return {\n ...tag,\n category: {\n id: category.id,\n label: category.label,\n ...(category.description === undefined ? {} : { description: category.description }),\n },\n };\n });\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonNegativeInteger(value: unknown): value is number {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0;\n}\n\n/**\n * Verifies the cross-process conservation boundary before the generator sees\n * the payload. The subprocess records the resolved HTTP inventory before\n * flattening it; this parent-side join prevents a future projector filter,\n * collapse or mapper change from merely adjusting a count while dropping the\n * operation that the count represented.\n */\nfunction assertResolvedHttpOperationProjectionConservation(output: OpenApiGenerationInputSubprocessOutput): void {\n const key = (entry: {\n readonly identity: {\n readonly contractVersion: number;\n readonly resourceRef: string;\n readonly operationFamilyRef: string;\n readonly operationVariantRef: string;\n readonly variantType: string;\n readonly httpVerb: string;\n readonly path: string;\n };\n readonly section: string;\n readonly roles: readonly string[];\n }): string => JSON.stringify([\n entry.identity.contractVersion,\n entry.identity.resourceRef,\n entry.identity.operationFamilyRef,\n entry.identity.operationVariantRef,\n entry.identity.variantType,\n entry.identity.httpVerb,\n entry.identity.path,\n entry.section,\n entry.roles,\n ]);\n const source = new Set(output.stats.resolvedExternalHttpOperations.map(key));\n const projections = new Set(output.operations.map((operation) => key({\n identity: operation.identity,\n section: operation.consumerApiSection,\n roles: operation.roles,\n })));\n if (\n source.size !== output.stats.resolvedExternalHttpOperations.length\n || projections.size !== output.operations.length\n || source.size !== projections.size\n || [...source].some((entry) => !projections.has(entry))\n ) {\n throw new Error('openapi-generation-input subprocess violated resolved HTTP operation → projection conservation');\n }\n}\n\n/** Validate the complete diagnostics object received from the subprocess. */\nfunction isOpenApiGenerationProjectorStats(value: unknown): value is OpenApiGenerationProjectorStats {\n if (!isPlainObject(value)) return false;\n if (\n !isNonNegativeInteger(value.resourceCount)\n || !isNonNegativeInteger(value.consideredOperationCount)\n || !isNonNegativeInteger(value.projectedRowCount)\n || !Array.isArray(value.resolvedExternalHttpOperations)\n || !isNonNegativeInteger(value.skippedOperationWithoutInitiatorInfosCount)\n || !Array.isArray(value.skippedOperationsWithoutInitiatorInfos)\n ) {\n return false;\n }\n\n if (\n value.resolvedExternalHttpOperations.length !== value.projectedRowCount\n || !value.resolvedExternalHttpOperations.every((entry) =>\n isPlainObject(entry)\n && isPlainObject(entry.identity)\n && typeof entry.section === 'string'\n && Array.isArray(entry.roles)\n && entry.roles.every((role) => typeof role === 'string'))\n ) {\n return false;\n }\n\n if (\n value.excludedCoreResources !== undefined\n && (\n !Array.isArray(value.excludedCoreResources)\n || !value.excludedCoreResources.every((entry) =>\n typeof entry === 'string' && Object.values(CoreResourceType).includes(entry as CoreResourceType))\n )\n ) {\n return false;\n }\n if (!value.skippedOperationsWithoutInitiatorInfos.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceIdentifier === 'string'\n && typeof entry.operationIdentifier === 'string'\n && typeof entry.variantType === 'string'\n && (entry.variantKey === undefined || typeof entry.variantKey === 'string')\n && (entry.isOperationDefault === undefined || typeof entry.isOperationDefault === 'boolean')\n && (entry.isBulkOperation === undefined || typeof entry.isBulkOperation === 'boolean'))) {\n return false;\n }\n if (\n value.skippedCoreResources !== undefined\n && (\n !Array.isArray(value.skippedCoreResources)\n || !value.skippedCoreResources.every((entry) => isPlainObject(entry) && typeof entry.resourceType === 'string' && typeof entry.reason === 'string')\n )\n ) {\n return false;\n }\n if (\n value.collapsedCoreOperations !== undefined\n && (\n !Array.isArray(value.collapsedCoreOperations)\n || !value.collapsedCoreOperations.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceType === 'string'\n && typeof entry.operationKey === 'string'\n && typeof entry.httpVerb === 'string'\n && typeof entry.path === 'string')\n )\n ) {\n return false;\n }\n\n return true;\n}\n\n/** @wildo_source:part:end companion.technical-doc.service */\n"]}
1
+ {"version":3,"file":"technical-doc.companion.service.js","sourceRoot":"","sources":["../../../../src/technical-doc/services/technical-doc.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,kBAAkB,EAClB,yCAAyC,EACzC,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAChI,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EACL,wBAAwB,EACxB,qDAAqD,EACrD,0CAA0C,EAC1C,4BAA4B,EAC5B,wCAAwC,EACxC,+CAA+C,GAYhD,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,2BAA2B,EAC3B,uDAAuD,EACvD,6CAA6C,EAC7C,oDAAoD,GAErD,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE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,CAAC,KAAc;IAC3C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,oBAAoB,CAAC;IACrD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAClC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,eAAe,KAAK,CAAC,MAAM,EAAE,CAAC;IAC/D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,WAAW,CAAC;IAClD,OAAO,GAAG,OAAO,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AAC/E,CAAC;AAED,6DAA6D","sourcesContent":["/**\n * Companion-side orchestrator for the on-demand OpenAPI generation\n * flow declared in `saas-technical-doc.md` Step 3.\n *\n * Responsibility split (matching `MarketGenerationCompanionService`):\n *\n * - Subprocess (`'openapi-generation-input'`) — owns\n * `loadSharedModules()`, registry materialization, URL building,\n * and `z.toJSONSchema()` conversion. Returns a flat JSON-safe projection of\n * operations, organization-role semantics, explicitly unit-aware resources,\n * resource tags, error schema and diagnostics (see\n * `openapi-generation-input.behavior.ts`). Lives in the\n * subprocess because that is the only process that can load\n * the user app's `@wildo-ai/saas-models`-decorated schemas.\n *\n * - Parent (this service) — merges the subprocess projection\n * with `WildoSaasConfig` metadata it already has via the\n * companion context (`appSlug`, `appDisplayName`) and the per-service\n * `wildo.tech-doc.config.ts` (`supportedApiVersion`, `publicMarketingTitle`,\n * discovered via the unique `frontendType: TECH_DOC` service —\n * Step 7.5 refactor). It then pipes the assembled\n * `OpenApiGenerationInput` into the pure\n * `generateOpenApiDocuments(...)` from\n * `@wildo-ai/saas-technical-doc/companion`. The generator\n * handles filtering, audience splitting, and YAML emission.\n *\n * The generate route returns the in-memory `{ filename, yaml }` documents. The\n * publish route writes the same bytes into the app's managed OpenAPI directory,\n * removing canonical skipped-section files so stale API pages cannot survive.\n *\n * @wildo_source:part:start companion.technical-doc.service facet:layer:companion facet:family:technical-doc\n */\n\nimport { existsSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { inject, injectable } from 'inversify';\nimport {\n AppConfigurationService,\n ErrorBuilderBackendService,\n LoggerService,\n SAAS_SERVICE_TYPES,\n resolveFeatureGatedCoreResourceExclusions,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport { AuthMethod, CoreResourceType, ErrorCustomMessageReference, ErrorType, getEnabledMethods } from '@wildo-ai/saas-models';\nimport { AppFrontendType, loadConfig } from '@wildo-ai/platform-config-lib';\nimport {\n generateOpenApiDocuments,\n resolveTechnicalDocumentationForbiddenPublicSentinels,\n resolveTechnicalDocumentationOutputBudgets,\n OpenApiGenerationInputSchema,\n applyAuthoredRoleLabelsToOperationAccess,\n resolveApplicationOrganizationRoleDocumentation,\n type ApplicationOrganizationRoleDocumentationSource,\n type ApplicationOrganizationUnitResourceDocumentation,\n type OpenApiGenerationInput,\n type OpenApiGenerationProjectorStats,\n type OperationProjection,\n type ResourceTag,\n type TechnicalDocGenerateOpenApiResult,\n type ApplicationConnectionServer,\n type ApplicationAuthenticationDocumentationSource,\n type ApplicationMcpToolSource,\n type ApplicationWebhookEventSource,\n} from '@wildo-ai/saas-technical-doc/companion';\nimport {\n createApiReferenceLinkIndex,\n getTechnicalDocumentationApiReferenceTargetAvailability,\n resolveTechnicalDocumentationApiReferenceLink,\n TechnicalDocumentationApiReferenceTargetAvailability,\n type WildoTechnicalDocConfig,\n} from '@wildo-ai/saas-technical-doc';\nimport type { TechnicalDocumentationApiReferenceTargetV1 } from '@wildo-ai/saas-specifications/technical-documentation';\nimport { createConservedApiReferenceModel } from '@wildo-ai/saas-technical-doc/openapi-reference-model';\n\nimport { TechnicalDocumentationPilotCompanionService } from './technical-documentation-pilot.companion.service';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n type TechnicalDocumentationApplicationDerivationCompanionService,\n type TechnicalDocumentationApplicationDerivationResult,\n} from './technical-documentation-application-derivation.companion.service';\nimport type {\n TechnicalDocumentationEnvironmentIdentityInput,\n} from './technical-documentation-environment-identity.companion.service';\nimport { getCompanionConfiguredPrimaryLanguage } from '../../core/config/primary-language.companion.utils';\nimport { readPerUnitLabels, resolvePerUnitFilePath } from '../../i18n-labelling/utils/per-unit-file.utils';\nimport { ROLE_LABELLING_UNIT_FILE_PATH_HINT } from '../../i18n-labelling/utils/role-lifecycle-keys.utils';\n\n/**\n * The diagnostics result is owned by the engine contract. The local companion\n * re-exports it only for its in-memory inspection route; managed publication\n * has its own pointer/fact result and never writes this diagnostic shape.\n */\nexport type {\n TechnicalDocGenerateOpenApiResult,\n};\n\n/**\n * Conventional file name for the per-service technical-documentation\n * configuration (Step 7.5 refactor — `saas-technical-doc.md`). Authored\n * at the docs service root next to `package.json` / `docusaurus.config.ts`.\n *\n * Discovery is \"by convention, not by configuration\":\n *\n * - The companion locates this file by walking the `services` entry\n * whose `frontendType === TECH_DOC` and joining `<saasRoot>/<service.path>/`.\n * The saas-config schema's `superRefine` already enforces \"at most\n * one TECH_DOC service per app\", so the lookup is deterministic.\n *\n * - File presence is the enable signal — there is NO `enabled` field\n * on `WildoTechnicalDocConfigSchema`. A TECH_DOC service without\n * this file is treated as a misconfiguration and the loader fails\n * closed (rather than silently shipping a docs site with no\n * OpenAPI metadata).\n */\nconst PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME = 'wildo.tech-doc.config.ts';\n\n/**\n * Subprocess wire shape — kept as a structural type rather than an imported\n * symbol because the source declaration lives inside the introspection-\n * subprocess module which intentionally is NOT exported from `src/index.ts`\n * (subprocess code must not load in the parent process).\n *\n * The `stats` field reuses {@link OpenApiGenerationProjectorStats} from the\n * engine package so the projector subprocess and the companion-side result\n * cannot drift on the diagnostic counts they exchange (H-C fix-up).\n */\ninterface OpenApiGenerationInputSubprocessOutput {\n operations: OperationProjection[];\n /** Source-derived application activation facts; independent from the API-reference selection. */\n readonly hasConfiguredMcpToolOperations: boolean;\n readonly hasConfiguredA2aSkills: boolean;\n /**\n * The two integration inventories the same walk collects. Row types come from the ENGINE, not\n * from the subprocess module, so this mirror cannot drift on their shape while the parent still\n * never loads subprocess code.\n */\n readonly mcpTools: readonly ApplicationMcpToolSource[];\n readonly webhookEvents: readonly ApplicationWebhookEventSource[];\n /**\n * Source-derived role semantics cross the subprocess boundary unchanged.\n * The parent then joins the application's primary-locale labels before a\n * consumer-documentation fact is derived; labels are intentionally not\n * fabricated by the registry projector.\n */\n readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentationSource[];\n /** Exact resources selected by the application's unit-narrowing startup declaration. */\n readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];\n /** Canonical framework HTTP error envelope, JSON-safe across the subprocess boundary. */\n errorResponseSchema: unknown;\n /**\n * Per-resource OpenAPI tag descriptors (the resource's business purpose),\n * merged into {@link OpenApiGenerationInput.resourceTags}. Mirrors the\n * projector's wire shape; see `openapi-generation-input.behavior.ts`.\n */\n resourceTags: ResourceTag[];\n /**\n * Which of those resources come from the application's OWN registry rather than the core map.\n *\n * Optional on this mirror, and read with a `?? []` at the call site, because the parent must not\n * import subprocess code: an older projector build reaching a newer parent is a real state\n * during a watch cycle, and it should publish documentation with no domain section rather than\n * throw on a field it has never heard of.\n */\n applicationOwnedResourceIdentifiers?: string[];\n stats: OpenApiGenerationProjectorStats;\n}\n\n@injectable()\nexport class TechnicalDocCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService)\n private readonly appConfigService: AppConfigurationService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService)\n private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocumentationApplicationDerivationService)\n private readonly applicationDerivationService: TechnicalDocumentationApplicationDerivationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('TechnicalDocCompanionService');\n this.logger.setDebugTypeLogging('TechnicalDocCompanionService', true);\n }\n\n\n /**\n * Produces one framework private derivation, including the resolved\n * organization-role inventory, and its public pre-render bundle.\n * The caller selects the environment backend service; the companion resolves\n * the environment identity and source-derived operation-exposure evidence.\n * It does not read accepted application-family state or select application\n * documentation. The role inventory is a narrow configuration projection,\n * not an application-authored use-case selection.\n */\n public async deriveApplicationDocumentationBundles(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<TechnicalDocumentationApplicationDerivationResult> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n return this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: applyAuthoredRoleLabelsToOperationAccess(subprocessOutput.operations, TechnicalDocCompanionService.roleLabels(organizationRoles)),\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n ...this.resolveApplicationConnectionInputs(technicalDocConfig),\n authentication: this.resolveApplicationAuthenticationInputs(),\n integration: { mcpTools: subprocessOutput.mcpTools, webhookEvents: subprocessOutput.webhookEvents },\n /*\n * The CATEGORISED tags, not the raw ones. The categoriser is what attaches the application's\n * own grouping and validates it (every published resource named exactly once, no unknown\n * names), so passing the raw list would silently drop the grouping and put the whole domain\n * in one unnamed pile.\n */\n resourceTags: applyApiReferenceResourceCategories(subprocessOutput.resourceTags, technicalDocConfig.apiReferenceResourceCategories),\n applicationOwnedResourceIdentifiers: subprocessOutput.applicationOwnedResourceIdentifiers ?? [],\n });\n }\n\n /**\n * The application facts the documentation names instead of hedging: the product's own name and\n * the base URLs it publishes.\n *\n * The name is what a customer calls the product — `displayName` from `wildo.saas.config.ts`,\n * falling back to the application's `name`. Deliberately NOT `publicMarketingTitle`: that is the documentation SITE's\n * title (\"Wonder Todos — Technical Documentation\") and reads wrong inside a sentence.\n *\n * The base URLs are the ones the application already authors for its API reference, so the\n * guides and the reference name the same origins by construction.\n */\n private resolveApplicationConnectionInputs(technicalDocConfig: WildoTechnicalDocConfig): {\n applicationName: string;\n apiServers: readonly ApplicationConnectionServer[];\n } {\n const saasConfig = this.companionContext.saasConfig;\n const applicationName = saasConfig.displayName?.trim() || saasConfig.name.trim();\n if (applicationName.length === 0) {\n throw new Error('technical-documentation requires the application to declare a name (displayName or name in wildo.saas.config.ts)');\n }\n return {\n applicationName,\n apiServers: (technicalDocConfig.apiServers ?? []).map((server) => ({\n url: server.url,\n ...(server.description === undefined ? {} : { description: server.description }),\n })),\n };\n }\n\n /**\n * The sign-in policy this application actually applies, per user type.\n *\n * Read from `userTypes[<key>].auth`, which is where all authentication policy lives — there are\n * no global defaults. Enabled methods go through `getEnabledMethods`, the same helper the runtime\n * uses, rather than re-reading the boolean-or-object shorthand here; and they are ordered by the\n * engine's own enum so two applications list the same methods in the same order.\n */\n private resolveApplicationAuthenticationInputs(): ApplicationAuthenticationDocumentationSource {\n const userTypes = Object.entries(this.appConfigService.config.userTypes ?? {}).map(([userTypeKey, definition]) => {\n const auth = definition.auth;\n const enabled = getEnabledMethods(auth.authMethodsEnabled);\n return {\n userTypeKey,\n enabledMethods: Object.values(AuthMethod).filter((method) => enabled.has(method)),\n multifactor: {\n required: auth.mfaPolicy.requireMFA,\n strongRequired: auth.mfaPolicy.requireStrongMFA,\n enrollmentGracePeriodDays: auth.mfaPolicy.enrollmentGracePeriodDays,\n passkeyExemptFromMultifactor: auth.mfaPolicy.passkeyExemptFromMFA,\n ...(auth.mfaPolicy.acceptableMFAMethods === undefined ? {} : { acceptableMethods: auth.mfaPolicy.acceptableMFAMethods }),\n },\n password: {\n minLength: auth.passwordPolicy.minLength,\n maxLength: auth.passwordPolicy.maxLength,\n requireUppercase: auth.passwordPolicy.requireUppercase,\n requireLowercase: auth.passwordPolicy.requireLowercase,\n requireNumbers: auth.passwordPolicy.requireNumbers,\n requireSpecialChars: auth.passwordPolicy.requireSpecialChars,\n expiryDays: auth.passwordPolicy.expiryDays,\n },\n session: {\n durationMinutes: auth.sessionDurationMinutes,\n ...(auth.maxConcurrentSessions === undefined ? {} : { maxConcurrentSessions: auth.maxConcurrentSessions }),\n },\n lockout: {\n maxLoginAttempts: auth.lockoutPolicy.maxLoginAttempts,\n lockoutDurationMinutes: auth.lockoutPolicy.lockoutDurationMinutes,\n progressive: auth.lockoutPolicy.progressiveLockout,\n maxProgressiveLockoutHours: auth.lockoutPolicy.maxProgressiveLockoutHours,\n },\n };\n });\n if (userTypes.length === 0) {\n throw new Error('technical-documentation requires the application to declare at least one user type');\n }\n return { userTypes };\n }\n\n /**\n * Publishes the complete managed documentation tree at stable generated paths.\n * This operation synchronizes the framework-owned consumer documentation into\n * `src/generated/consumer-documentation/**`. The directory is generator-owned;\n * Git provides history and rollback.\n *\n * **No capture.** Screenshots resolve to `PLACEHOLDER` (framework-materialized bytes), so\n * publication needs no browser, no provisioned tenant and no live stack. That was the\n * decision that collapsed this from a multi-precondition chain to one call: pictures are\n * a pre-production refinement, and `refuseProvisionalAssets` is how a production\n * environment declares it will not ship without them.\n *\n * Docusaurus runtime/build measurement happens against the generated publication after it\n * exists. Measuring the previous site before publication and applying that observation to\n * a different candidate made first cutover circular and, in practice, let the retired\n * 981-page OpenAPI site block publication of the much smaller generated tree.\n */\n public async publishManagedDocumentation(\n input: TechnicalDocumentationEnvironmentIdentityInput & { readonly refuseProvisionalAssets?: boolean },\n ) {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const generated = await this.generateVerifiedApplicationOpenApiDocuments(input);\n for (const section of generated.documents.sections) {\n createConservedApiReferenceModel(section);\n }\n const apiReferenceLinkIndex = createApiReferenceLinkIndex(generated.documents.sections);\n const publisher = new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot);\n await publisher.publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${this.companionContext.saasConfig.slug}`],\n });\n\n /*\n * A guide may link to an API-reference target this application does not publish — the engine\n * hardcodes 43 `apiReferenceTargets` naming engine resources an application may feature-gate\n * off. Those links DEGRADE to plain text and the rest of the portal publishes (#472).\n *\n * Reporting is the half that keeps the degradation from becoming the next silent gap: every\n * dropped target is collected here and named after publication, so an author sees which links\n * their configuration removed rather than discovering a thinner portal.\n */\n const degradedApiReferenceTargets: string[] = [];\n const resolveApiReferenceTarget = (target: TechnicalDocumentationApiReferenceTargetV1): string | null => {\n if (getTechnicalDocumentationApiReferenceTargetAvailability(apiReferenceLinkIndex, target)\n === TechnicalDocumentationApiReferenceTargetAvailability.UNAVAILABLE) {\n degradedApiReferenceTargets.push(JSON.stringify(target));\n return null;\n }\n return resolveTechnicalDocumentationApiReferenceLink(apiReferenceLinkIndex, target);\n };\n\n const publication = await publisher.generateValidateAndPublish({\n derivation: generated.derivation,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n forbiddenPublicSentinels: resolveTechnicalDocumentationForbiddenPublicSentinels(\n technicalDocConfig.forbiddenPublicSentinels,\n ),\n budgets: resolveTechnicalDocumentationOutputBudgets(technicalDocConfig.outputBudgets),\n resolveApiReferenceTarget,\n ...(input.refuseProvisionalAssets === undefined\n ? {}\n : { refuseProvisionalAssets: input.refuseProvisionalAssets }),\n });\n\n if (degradedApiReferenceTargets.length > 0) {\n // Deduplicated: one target linked from several guides is ONE configuration fact, and\n // repeating it per link would bury the distinct ones.\n const distinct = [...new Set(degradedApiReferenceTargets)].sort();\n this.logger.warn('technical-documentation API-reference links degraded to plain text — this application does not publish these targets', {\n count: distinct.length,\n targets: distinct,\n });\n }\n\n return publication;\n }\n\n /**\n * Generates the complete API reference from the resolved application and\n * enabled framework resource catalog.\n *\n * Narrative documentation intentionally selects a small set of source-backed\n * customer journeys. It must not become an allow-list for API operations:\n * doing so hid every framework resource and every application resource other\n * than the one chosen for the current use-case page. The OpenAPI generator\n * already applies the API-call and API-key exposure filters to this complete\n * resolved catalog; the derivation remains part of publication for consumer\n * content and evidence, but does not truncate the API contract.\n */\n public async generateVerifiedApplicationOpenApiDocuments(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<{\n readonly derivation: TechnicalDocumentationApplicationDerivationResult;\n readonly documents: ReturnType<typeof generateOpenApiDocuments>;\n readonly sourceStats: OpenApiGenerationProjectorStats;\n readonly authorizedOperationCount: number;\n }> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n const derivation = await this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: applyAuthoredRoleLabelsToOperationAccess(subprocessOutput.operations, TechnicalDocCompanionService.roleLabels(organizationRoles)),\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n ...this.resolveApplicationConnectionInputs(technicalDocConfig),\n authentication: this.resolveApplicationAuthenticationInputs(),\n integration: { mcpTools: subprocessOutput.mcpTools, webhookEvents: subprocessOutput.webhookEvents },\n /*\n * The CATEGORISED tags, not the raw ones. The categoriser is what attaches the application's\n * own grouping and validates it (every published resource named exactly once, no unknown\n * names), so passing the raw list would silently drop the grouping and put the whole domain\n * in one unnamed pile.\n */\n resourceTags: applyApiReferenceResourceCategories(subprocessOutput.resourceTags, technicalDocConfig.apiReferenceResourceCategories),\n applicationOwnedResourceIdentifiers: subprocessOutput.applicationOwnedResourceIdentifiers ?? [],\n });\n const generationInput = this.assembleGenerationInput(\n subprocessOutput,\n technicalDocConfig,\n TechnicalDocCompanionService.roleLabels(organizationRoles),\n );\n\n return Object.freeze({\n derivation,\n documents: generateOpenApiDocuments(generationInput),\n sourceStats: subprocessOutput.stats,\n authorizedOperationCount: subprocessOutput.operations.length,\n });\n }\n\n /**\n * Generate the Application + Organization OpenAPI YAML\n * documents for the currently-loaded SaaS app. Returns the\n * pure-function generator output unchanged so the controller\n * can pass it straight through as JSON.\n *\n * The method does NOT short-circuit on a \"disabled docs site\" —\n * after the Step 7.5 refactor there is no `enabled` flag anywhere\n * (file presence under a TECH_DOC service IS the enable signal).\n * If the docs service or its `wildo.tech-doc.config.ts` is missing,\n * {@link loadTechnicalDocConfig} fails closed with a CONFIGURATION\n * error before generation runs.\n */\n public async generateOpenApiDocuments(): Promise<TechnicalDocGenerateOpenApiResult> {\n this.logDebug('technical-doc generate-openapi — start', {\n appSlug: this.companionContext.saasConfig.slug,\n });\n\n // Load the per-service config BEFORE the subprocess call: its\n // `apiDocResources` opt-in is threaded into the projector so the subprocess\n // also documents the named core (engine) resources.\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const generationInput = this.assembleGenerationInput(\n subprocessOutput,\n technicalDocConfig,\n await this.resolveRoleLabelsBestEffort(subprocessOutput.organizationRoles),\n );\n const documents = generateOpenApiDocuments(generationInput);\n\n this.logDebug('technical-doc generate-openapi — success', {\n appSlug: generationInput.appSlug,\n sectionCount: documents.sections.length,\n resourceCount: subprocessOutput.stats.resourceCount,\n consideredOperationCount: subprocessOutput.stats.consideredOperationCount,\n projectedRowCount: subprocessOutput.stats.projectedRowCount,\n });\n\n return {\n documents,\n stats: subprocessOutput.stats,\n metadata: {\n appSlug: generationInput.appSlug,\n appDisplayName: generationInput.appDisplayName,\n ...(generationInput.publicMarketingTitle !== undefined\n ? { publicMarketingTitle: generationInput.publicMarketingTitle }\n : {}),\n supportedApiVersion: generationInput.supportedApiVersion,\n },\n };\n }\n\n /**\n * Materializes the two generated OpenAPI serializations at stable paths for\n * the docs application. This is companion-owned generation; Docusaurus reads\n * the resulting files and never regenerates or edits them.\n */\n public async publishOpenApiReference(): Promise<{ readonly rootPath: string; readonly outputPaths: readonly string[] }> {\n const generated = await this.generateOpenApiDocuments();\n return new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot).publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${generated.metadata.appSlug}`],\n });\n }\n\n /**\n * Call the `'openapi-generation-input'` introspection behavior\n * on any backend service (the projector behavior routes to\n * `library` which every backend service declares — same picker\n * pattern as `MarketGenerationCompanionService.pickMarketCarrierServiceKey`\n * and `getResourcesRegistry`'s carrier picker).\n *\n * Validates the subprocess wire format defensively: a structural\n * mismatch here would otherwise surface as a confusing Zod parse\n * failure deeper in the generator.\n */\n private async callSubprocessProjector(\n apiDocResources?: WildoTechnicalDocConfig['apiDocResources'],\n excludedCoreResourceTypes?: readonly string[],\n ): Promise<OpenApiGenerationInputSubprocessOutput> {\n const input = {\n ...(apiDocResources !== undefined ? { apiDocResources } : {}),\n ...(excludedCoreResourceTypes !== undefined ? { excludedCoreResourceTypes } : {}),\n };\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickProjectorCarrierServiceKey(),\n behavior: 'openapi-generation-input',\n // Thread both the authored core-resource selection and the canonical\n // runtime feature exclusions across the JSON-safe subprocess boundary.\n ...(Object.keys(input).length > 0 ? { input } : {}),\n });\n\n if (introspection.success === false) {\n const failure = introspection;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: failure.error.message,\n serviceKey: failure.serviceKey,\n behavior: failure.behavior,\n targetId: failure.targetId,\n },\n });\n }\n\n const data: unknown = introspection.data;\n /*\n * Collect EVERY unmet expectation rather than short-circuiting on the first, and name each one.\n * The previous form was a single `||` chain whose message listed all eight expectations and\n * identified none of them, so a real refusal — the row-conservation clause, once the projector\n * grew a second producer of operations — presented as an opaque 500 and had to be re-derived by\n * hand from a running companion. Which clause refused, and on which numbers, is knowable here.\n */\n const violations: string[] = [];\n if (!isPlainObject(data)) {\n violations.push(`payload: expected an object, received ${describeReceivedValue(data)}`);\n } else {\n if (!Array.isArray(data.operations)) violations.push(`operations: expected OperationProjection[], received ${describeReceivedValue(data.operations)}`);\n if (typeof data.hasConfiguredMcpToolOperations !== 'boolean') violations.push(`hasConfiguredMcpToolOperations: expected boolean, received ${describeReceivedValue(data.hasConfiguredMcpToolOperations)}`);\n if (typeof data.hasConfiguredA2aSkills !== 'boolean') violations.push(`hasConfiguredA2aSkills: expected boolean, received ${describeReceivedValue(data.hasConfiguredA2aSkills)}`);\n if (!isPlainObject(data.errorResponseSchema)) violations.push(`errorResponseSchema: expected object, received ${describeReceivedValue(data.errorResponseSchema)}`);\n if (!Array.isArray(data.resourceTags)) violations.push(`resourceTags: expected ResourceTag[], received ${describeReceivedValue(data.resourceTags)}`);\n if (!Array.isArray(data.organizationRoles)) violations.push(`organizationRoles: expected OrganizationRole[], received ${describeReceivedValue(data.organizationRoles)}`);\n if (!Array.isArray(data.organizationUnitAwareResources)) violations.push(`organizationUnitAwareResources: expected OrganizationUnitAwareResource[], received ${describeReceivedValue(data.organizationUnitAwareResources)}`);\n violations.push(...describeOpenApiGenerationProjectorStatsViolations(data.stats));\n }\n if (violations.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `openapi-generation-input subprocess returned a malformed payload — ${violations.join('; ')}`,\n },\n });\n }\n const output = data as unknown as OpenApiGenerationInputSubprocessOutput;\n assertResolvedHttpOperationProjectionConservation(output);\n return output;\n }\n\n /**\n * Compose the subprocess projection with the\n * `WildoSaasConfig`-derived metadata the parent process owns +\n * the per-service `wildo.tech-doc.config.ts` block (Step 7.5\n * refactor — `saas-technical-doc.md`).\n *\n * The `publicMarketingTitle` projected into `openapi.info.title`\n * comes from the per-service config (NOT from\n * `WildoSaasConfig.technicalDoc?.publicMarketingTitle` — that root-\n * level field was removed in Step 7.5 in favor of co-locating the\n * tech-doc-specific config with the engine package that owns it).\n *\n * Re-parses the result through `OpenApiGenerationInputSchema`\n * so the generator only ever sees a fully-validated payload —\n * if a future field is added to the schema, this assembly step\n * must be updated in the same commit and the Zod parse will\n * fail fast otherwise.\n */\n private assembleGenerationInput(\n subprocessOutput: OpenApiGenerationInputSubprocessOutput,\n technicalDocConfig: WildoTechnicalDocConfig,\n roleLabelsByRole: Readonly<Record<string, string>>,\n ): OpenApiGenerationInput {\n const saasConfig = this.companionContext.saasConfig;\n const candidateInput: OpenApiGenerationInput = {\n appSlug: saasConfig.slug,\n appDisplayName: saasConfig.displayName,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n ...(technicalDocConfig.publicMarketingTitle\n ? { publicMarketingTitle: technicalDocConfig.publicMarketingTitle }\n : {}),\n operations: [...applyAuthoredRoleLabelsToOperationAccess(subprocessOutput.operations, roleLabelsByRole)],\n errorResponseSchema: subprocessOutput.errorResponseSchema,\n ...(subprocessOutput.resourceTags && subprocessOutput.resourceTags.length > 0\n ? { resourceTags: applyApiReferenceResourceCategories(subprocessOutput.resourceTags, technicalDocConfig.apiReferenceResourceCategories) }\n : {}),\n // App-enriched OpenAPI `servers` (deployment base URLs). The framework\n // emits the security SCHEMES automatically (they are universal), but the\n // server URLs are app/environment knowledge → authored on the tech-doc\n // config and threaded straight through.\n ...(technicalDocConfig.apiServers && technicalDocConfig.apiServers.length > 0\n ? { servers: technicalDocConfig.apiServers }\n : {}),\n // App-authored landing-page intro; the generator prepends it to the\n // framework-universal API-conventions block to form `info.description`.\n ...(technicalDocConfig.apiOverview\n ? { apiOverview: technicalDocConfig.apiOverview }\n : {}),\n };\n\n const parsed = OpenApiGenerationInputSchema.safeParse(candidateInput);\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'Failed to assemble OpenApiGenerationInput — schema validation rejected the '\n + 'merged subprocess + saas-config payload. This usually means the subprocess produced '\n + 'an OperationProjection that fails the strict OperationProjectionSchema (e.g. an '\n + 'API_CALL_WITH_CALLBACK row missing `callbackPath`).',\n issues: parsed.error.issues,\n },\n });\n }\n return parsed.data;\n }\n\n /**\n * Load the per-service `wildo.tech-doc.config.ts` for the\n * (unique) `frontendType: TECH_DOC` service declared in\n * `wildo.saas.config.ts`.\n *\n * Discovery contract (Step 7.5 refactor — `saas-technical-doc.md`):\n *\n * - The TECH_DOC service is identified by `frontendType === TECH_DOC`,\n * NOT by service key. This decouples the companion from any\n * convention like `services.docs` — apps may name the service\n * anything (e.g. `'apiDocs'`, `'developerPortal'`).\n *\n * - The saas-config schema's `superRefine` enforces \"at most one\n * TECH_DOC service per app\", so the lookup either finds exactly\n * one match or zero. Two matches cannot reach this code.\n *\n * - File presence IS the enable signal. A TECH_DOC service without\n * `wildo.tech-doc.config.ts` is a misconfiguration we surface\n * immediately (CONFIGURATION error) rather than letting the OpenAPI\n * generator silently emit a docs-site-incompatible payload.\n *\n * - The Zod validation that rejects unknown keys / malformed values\n * runs inside `defineTechnicalDocConfig` (which the per-service\n * config file invokes via `export default defineTechnicalDocConfig({...})`).\n * `loadConfig` evaluates the file via jiti, so by the time it\n * returns we have an already-parsed `WildoTechnicalDocConfig`.\n *\n * - The config is evaluated for every derivation or publication request.\n * It is an application-owned input outside the companion package's\n * TypeScript watch graph, so a process-lifetime cache would make a valid\n * taxonomy, server or overview edit invisible until an unrelated restart.\n * Publication is infrequent and config loading is tiny beside the source\n * projection, making freshness the correct trade-off.\n *\n * - The `csp?` `@unimplemented` warning fires in the same evaluation\n * pass (also inside `defineTechnicalDocConfig`) — this loader does\n * not need to re-check authored fields.\n *\n * @throws CONFIGURATION error if no TECH_DOC service is declared OR if\n * the per-service config file is missing.\n */\n private async loadTechnicalDocConfig(): Promise<WildoTechnicalDocConfig> {\n const techDocServiceEntry = Object.entries(this.companionContext.saasConfig.services)\n .find(([, service]) => service.frontendType === AppFrontendType.TECH_DOC);\n\n if (!techDocServiceEntry) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'No frontend service with `frontendType: TECH_DOC` is declared in '\n + 'wildo.saas.config.ts. The technical-documentation companion routes '\n + '(diagnostic OpenAPI generation / managed publication) require an authored TECH_DOC service '\n + 'because that service folder owns the per-service '\n + '`wildo.tech-doc.config.ts` (publicMarketingTitle, API projection metadata, csp). '\n + 'Add a TECH_DOC service in wildo.saas.config.ts and ship the per-service '\n + 'config file under it.',\n },\n });\n }\n\n const [techDocServiceKey, techDocService] = techDocServiceEntry;\n const techDocConfigPath = path.resolve(\n this.companionContext.saasRoot,\n techDocService.path,\n PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME,\n );\n\n if (!existsSync(techDocConfigPath)) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `TECH_DOC service '${techDocServiceKey}' is declared in wildo.saas.config.ts `\n + `but the required per-service config file '${PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME}' `\n + `is missing under '${techDocService.path}/'. File presence IS the enable signal `\n + '(the retired `technicalDoc.enabled` setting was replaced by file '\n + 'presence). Create the file with '\n + '`export default defineTechnicalDocConfig({ ... })` from '\n + '`@wildo-ai/saas-technical-doc`.',\n expectedPath: techDocConfigPath,\n },\n });\n }\n\n let loaded: WildoTechnicalDocConfig;\n try {\n // `freshModuleCache` is what makes the docblock's \"evaluated for every request\" true. Calling\n // `loadConfig` again is NOT enough on its own: jiti's module cache is process-global, so\n // without this the second evaluation returns the first one's result and a valid taxonomy,\n // server or overview edit stays invisible until an unrelated restart — precisely the outcome\n // the contract above rejects. Same defect as issue #170, different read site.\n loaded = await loadConfig<WildoTechnicalDocConfig>(techDocConfigPath, { freshModuleCache: true });\n } catch (e) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Failed to load per-service technical-documentation config at ${techDocConfigPath}. `\n + 'The file MUST do `export default defineTechnicalDocConfig({...})` and pass '\n + 'WildoTechnicalDocConfigSchema (`z.strictObject` — unknown keys reject).',\n cause: describeCaughtError(e),\n },\n });\n }\n\n return loaded;\n }\n\n /**\n * Join source-derived role semantics to the exact primary-language labels\n * used by this application. The labels are not decoration: administrators\n * must see the same role names and descriptions in documentation and in the\n * member-management interface, so an incomplete label unit blocks\n * publication instead of falling back to a prettified role token.\n */\n /**\n * The authored label per role, as the join needs it.\n *\n * Reached only AFTER {@link resolveApplicationOrganizationRoles}, which refuses a role whose\n * primary-locale label the application has not generated — so on this path every role has one.\n */\n private static roleLabels(roles: readonly { readonly role: string; readonly label: string }[]): Readonly<Record<string, string>> {\n return Object.fromEntries(roles.map((role) => [role.role, role.label]));\n }\n\n /**\n * The same labels for the READ door, WITHOUT the refusal.\n *\n * `generateOpenApiDocuments` generates a document and writes nothing. Failing it closed because an\n * application has not generated its role labels yet would make a read unavailable for an authoring\n * gap whose remedy is elsewhere — the shape `.claude/rules/continuity-drift-and-cas-basis.md`\n * Rule 3 warns about. Publication keeps the refusal, which is where it belongs; here a role with\n * no authored label keeps its token.\n */\n private async resolveRoleLabelsBestEffort(roles: readonly ApplicationOrganizationRoleDocumentationSource[]): Promise<Readonly<Record<string, string>>> {\n try {\n const resolved = await this.resolveApplicationOrganizationRoles(this.pickProjectorCarrierServiceKey(), roles);\n return TechnicalDocCompanionService.roleLabels(resolved);\n } catch (error) {\n this.logDebug('technical-doc generate-openapi — role labels unavailable, roles keep their tokens', {\n reason: describeCaughtError(error),\n });\n return {};\n }\n }\n\n private async resolveApplicationOrganizationRoles(\n backendServiceKey: string,\n roles: readonly ApplicationOrganizationRoleDocumentationSource[],\n ) {\n const backendService = this.companionContext.servicesByKey[backendServiceKey];\n if (backendService === undefined || backendService.frontendType !== undefined) {\n throw new Error(`technical-documentation role labels require a declared backend service key: ${backendServiceKey}`);\n }\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const i18nRoot = path.resolve(this.companionContext.saasRoot, backendService.path, 'src/engine/i18n');\n const roleLabelsPath = resolvePerUnitFilePath({\n i18nRoot,\n unit: { filePathHint: ROLE_LABELLING_UNIT_FILE_PATH_HINT },\n localeCode: primaryLocale,\n });\n const primaryLocaleLabels = await readPerUnitLabels(roleLabelsPath);\n return resolveApplicationOrganizationRoleDocumentation(roles, primaryLocaleLabels);\n }\n\n /**\n * Pick the first declared backend service key. Same picker\n * pattern as the existing companion services that route to\n * subprocess behaviors on the `library` target — every backend\n * declares the shared library, so any backend service is a\n * valid carrier.\n */\n private pickProjectorCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the openapi-generation-input '\n + 'introspection behavior. The behavior routes to the `library` target which every '\n + 'backend service declares — but the companion context has none.',\n },\n });\n }\n return backendServiceKey;\n }\n}\n\n/**\n * Attaches the documentation config's explicit API taxonomy to the resolved\n * resource tags before OpenAPI generation.\n *\n * The operation subprocess owns the resolved resource inventory and\n * specification facts; the TECH_DOC config owns an application's editorial\n * navigation taxonomy. Joining them here keeps both truths in their proper\n * owners, then makes the OpenAPI document the sole transport to the browser.\n * Once an application elects to declare categories, an exact inventory join is\n * required: an uncategorised new resource or a stale config name must stop\n * publication instead of quietly producing a misleading partial navigation.\n *\n * The completeness rule is about the RESULT, not about this config: a resource\n * satisfies it either by being assigned here or by already carrying the\n * engine's own sub-domain category (`projectResourceTag`). That distinction is\n * what makes the declaration usable at all — a generated application publishes\n * roughly eight resources of its own beside fifty-two of the engine's, so a\n * rule demanding the config name every one of them means an application must\n * hand-classify the engine's catalogue, and re-classify it whenever the engine\n * grows. Wonder CRM opted out entirely for that reason and rendered its whole\n * reference as one flat list. An explicit assignment still WINS over the\n * engine's default, so an application that wants its own product-shaped\n * taxonomy across engine and application resources keeps it.\n */\nexport function applyApiReferenceResourceCategories(\n resourceTags: readonly ResourceTag[],\n categories: WildoTechnicalDocConfig['apiReferenceResourceCategories'],\n): ResourceTag[] {\n if (categories === undefined) return [...resourceTags];\n const tagsByName = new Map(resourceTags.map((tag) => [tag.name, tag]));\n if (tagsByName.size !== resourceTags.length) throw new Error('OpenAPI resource tags must be unique before category assignment');\n\n const categoryByResourceName = new Map<string, WildoTechnicalDocConfig['apiReferenceResourceCategories'][number]>();\n const categoryIds = new Set<string>();\n const unavailableResourceNames: string[] = [];\n for (const category of categories) {\n if (categoryIds.has(category.id)) throw new Error(`API-reference category '${category.id}' is declared more than once`);\n categoryIds.add(category.id);\n for (const resourceName of category.resourceNames) {\n if (!tagsByName.has(resourceName)) {\n unavailableResourceNames.push(`${category.id}:${resourceName}`);\n continue;\n }\n const prior = categoryByResourceName.get(resourceName);\n if (prior !== undefined) throw new Error(`API-reference resource '${resourceName}' is assigned to both '${prior.id}' and '${category.id}'`);\n categoryByResourceName.set(resourceName, category);\n }\n }\n if (unavailableResourceNames.length > 0) {\n throw new Error(`API-reference categories name unavailable resources: ${unavailableResourceNames.sort().join(', ')}`);\n }\n const uncategorisedResourceNames = resourceTags\n .filter((tag) => !categoryByResourceName.has(tag.name) && tag.category === undefined)\n .map((tag) => tag.name)\n .sort();\n if (uncategorisedResourceNames.length > 0) {\n throw new Error(`API-reference resources have no category, from this config or from the engine: ${uncategorisedResourceNames.join(', ')}`);\n }\n return resourceTags.map((tag) => {\n const category = categoryByResourceName.get(tag.name);\n if (category === undefined) return { ...tag };\n return {\n ...tag,\n category: {\n id: category.id,\n label: category.label,\n ...(category.description === undefined ? {} : { description: category.description }),\n },\n };\n });\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonNegativeInteger(value: unknown): value is number {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0;\n}\n\n/**\n * Verifies the cross-process conservation boundary before the generator sees\n * the payload. The subprocess records the resolved HTTP inventory before\n * flattening it; this parent-side join prevents a future projector filter,\n * collapse or mapper change from merely adjusting a count while dropping the\n * operation that the count represented.\n *\n * TOTAL OVER THE PROJECTOR'S PRODUCERS, and that is the part that has to be\n * maintained. The registry inventory is a bijection onto its own rows; the\n * manual controller-route catalog contributes rows that are deliberately not in\n * that inventory and are counted separately. So the identity is\n * `registry + manual = payload`, with every registry entry present. Written\n * flat (`registry = payload`) it silently became false the day the manual\n * family was added, and refused every publication in the whole fleet.\n *\n * A future third producer belongs in this sum as its own named term. Do NOT\n * relax the equality to an inequality or a subset test to accommodate one — the\n * whole value of this join is that a dropped operation cannot hide inside slack.\n */\nexport function assertResolvedHttpOperationProjectionConservation(output: OpenApiGenerationInputSubprocessOutput): void {\n const key = (entry: {\n readonly identity: {\n readonly contractVersion: number;\n readonly resourceRef: string;\n readonly operationFamilyRef: string;\n readonly operationVariantRef: string;\n readonly variantType: string;\n readonly httpVerb: string;\n readonly path: string;\n };\n readonly section: string;\n readonly roles: readonly string[];\n }): string => JSON.stringify([\n entry.identity.contractVersion,\n entry.identity.resourceRef,\n entry.identity.operationFamilyRef,\n entry.identity.operationVariantRef,\n entry.identity.variantType,\n entry.identity.httpVerb,\n entry.identity.path,\n entry.section,\n entry.roles,\n ]);\n const source = new Set(output.stats.resolvedExternalHttpOperations.map(key));\n const projections = new Set(output.operations.map((operation) => key({\n identity: operation.identity,\n section: operation.consumerApiSection,\n roles: operation.roles,\n })));\n const manualRowCount = output.stats.manualControllerRouteRowCount;\n const violations: string[] = [];\n if (source.size !== output.stats.resolvedExternalHttpOperations.length) {\n violations.push(\n `stats.resolvedExternalHttpOperations contains duplicate identities: ${output.stats.resolvedExternalHttpOperations.length} entries collapse to ${source.size} distinct keys`,\n );\n }\n if (projections.size !== output.operations.length) {\n violations.push(\n `operations contains duplicate identities: ${output.operations.length} rows collapse to ${projections.size} distinct keys`,\n );\n }\n if (projections.size !== source.size + manualRowCount) {\n violations.push(\n `row conservation: ${projections.size} distinct projected rows ≠ ${source.size} registry-resolved + ${manualRowCount} manual controller-route rows (${source.size + manualRowCount})`,\n );\n }\n const dropped = [...source].filter((entry) => !projections.has(entry));\n if (dropped.length > 0) {\n violations.push(\n `${dropped.length} registry-resolved HTTP operation(s) reached no projection row; first: ${dropped[0]}`,\n );\n }\n if (violations.length > 0) {\n throw new Error(\n `openapi-generation-input subprocess violated resolved HTTP operation → projection conservation — ${violations.join('; ')}`,\n );\n }\n}\n\n/**\n * Validate the complete diagnostics object received from the subprocess, and\n * REPORT WHICH EXPECTATION FAILED.\n *\n * This used to be a boolean type predicate feeding one `||` chain, so the\n * caller could only say that some one of eight expectations was unmet. When the\n * payload really did stop conserving rows, establishing WHICH clause refused\n * cost a companion log, an auth token, a hand-driven introspection call and a\n * predicate-by-predicate comparison — for a fact the guard held in its hand at\n * the moment it threw. A guard that refuses without naming the failed clause\n * charges an investigation every time it fires, so this returns the clause and\n * its two numbers instead.\n *\n * @returns one message per unmet expectation; empty means the value is a\n * well-formed {@link OpenApiGenerationProjectorStats}.\n */\nexport function describeOpenApiGenerationProjectorStatsViolations(value: unknown): string[] {\n if (!isPlainObject(value)) return [`stats: expected an object, received ${describeReceivedValue(value)}`];\n\n const violations: string[] = [];\n const requireNonNegativeInteger = (field: keyof OpenApiGenerationProjectorStats): boolean => {\n if (isNonNegativeInteger(value[field])) return true;\n violations.push(`stats.${field}: expected a non-negative integer, received ${describeReceivedValue(value[field])}`);\n return false;\n };\n const requireArray = (field: string): boolean => {\n if (Array.isArray(value[field])) return true;\n violations.push(`stats.${field}: expected an array, received ${describeReceivedValue(value[field])}`);\n return false;\n };\n\n const hasProjectedRowCount = requireNonNegativeInteger('projectedRowCount');\n const hasManualRowCount = requireNonNegativeInteger('manualControllerRouteRowCount');\n requireNonNegativeInteger('resourceCount');\n requireNonNegativeInteger('consideredOperationCount');\n requireNonNegativeInteger('skippedOperationWithoutInitiatorInfosCount');\n const hasResolvedOperations = requireArray('resolvedExternalHttpOperations');\n const hasSkippedOperations = requireArray('skippedOperationsWithoutInitiatorInfos');\n\n if (hasResolvedOperations && hasManualRowCount && hasProjectedRowCount) {\n /*\n * The projector has TWO producers of `OperationProjection` rows and this is where their sum is\n * checked, so the message names all three terms. Compare the identity join in\n * `assertResolvedHttpOperationProjectionConservation`, which checks the same statement against\n * the actual rows rather than against the counts — a count can be adjusted, identities cannot.\n */\n const resolved = (value.resolvedExternalHttpOperations as unknown[]).length;\n const manual = value.manualControllerRouteRowCount as number;\n const projected = value.projectedRowCount as number;\n if (resolved + manual !== projected) {\n violations.push(\n `stats row conservation: resolvedExternalHttpOperations (${resolved}) + manualControllerRouteRowCount (${manual}) = ${resolved + manual}, but projectedRowCount is ${projected}`,\n );\n }\n }\n\n if (hasResolvedOperations && !(value.resolvedExternalHttpOperations as unknown[]).every((entry) =>\n isPlainObject(entry)\n && isPlainObject(entry.identity)\n && typeof entry.section === 'string'\n && Array.isArray(entry.roles)\n && entry.roles.every((role) => typeof role === 'string'))) {\n violations.push('stats.resolvedExternalHttpOperations: every entry must be `{ identity: object, section: string, roles: string[] }`');\n }\n\n if (value.excludedCoreResources !== undefined) {\n if (\n !Array.isArray(value.excludedCoreResources)\n || !value.excludedCoreResources.every((entry) =>\n typeof entry === 'string' && Object.values(CoreResourceType).includes(entry as CoreResourceType))\n ) {\n violations.push('stats.excludedCoreResources: expected an array of CoreResourceType values');\n }\n }\n\n if (hasSkippedOperations && !(value.skippedOperationsWithoutInitiatorInfos as unknown[]).every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceIdentifier === 'string'\n && typeof entry.operationIdentifier === 'string'\n && typeof entry.variantType === 'string'\n && (entry.variantKey === undefined || typeof entry.variantKey === 'string')\n && (entry.isOperationDefault === undefined || typeof entry.isOperationDefault === 'boolean')\n && (entry.isBulkOperation === undefined || typeof entry.isBulkOperation === 'boolean'))) {\n violations.push('stats.skippedOperationsWithoutInitiatorInfos: every entry must carry string `resourceIdentifier`, `operationIdentifier` and `variantType`');\n }\n\n if (value.skippedCoreResources !== undefined) {\n if (\n !Array.isArray(value.skippedCoreResources)\n || !value.skippedCoreResources.every((entry) => isPlainObject(entry) && typeof entry.resourceType === 'string' && typeof entry.reason === 'string')\n ) {\n violations.push('stats.skippedCoreResources: expected an array of `{ resourceType: string, reason: string }`');\n }\n }\n\n if (value.collapsedCoreOperations !== undefined) {\n if (\n !Array.isArray(value.collapsedCoreOperations)\n || !value.collapsedCoreOperations.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceType === 'string'\n && typeof entry.operationKey === 'string'\n && typeof entry.httpVerb === 'string'\n && typeof entry.path === 'string')\n ) {\n violations.push('stats.collapsedCoreOperations: expected an array of `{ resourceType, operationKey, httpVerb, path }` strings');\n }\n }\n\n return violations;\n}\n\n/**\n * A short, safe rendering of a rejected value for a diagnostic message.\n *\n * Type plus a bounded preview: the point of the message is to tell the reader\n * whether the field is absent, the wrong type, or the right type with a wrong\n * value, and the first two are invisible if only the type is printed.\n */\nfunction describeReceivedValue(value: unknown): string {\n if (value === undefined) return 'undefined (absent)';\n if (value === null) return 'null';\n if (Array.isArray(value)) return `an array of ${value.length}`;\n if (typeof value === 'object') return 'an object';\n return `${typeof value} ${JSON.stringify(value)?.slice(0, 40) ?? ''}`.trim();\n}\n\n/** @wildo_source:part:end companion.technical-doc.service */\n"]}
@@ -1,6 +1,6 @@
1
1
  import { type EngineDocumentationSpecificationCatalogV1 } from '@wildo-ai/saas-specifications/companion';
2
2
  import { type TechnicalDocumentationAuthorizedBundleManifestV1, type TechnicalDocumentationEvidenceObservationV1, type TechnicalDocumentationPrivateDerivationManifestV1 } from '@wildo-ai/saas-specifications/technical-documentation';
3
- import { type ApplicationOrganizationRoleDocumentation, type ApplicationOrganizationUnitResourceDocumentation, type OperationProjection, type ApplicationConnectionServer, type ApplicationAuthenticationDocumentationSource } from '@wildo-ai/saas-technical-doc/companion';
3
+ import { type ApplicationOrganizationRoleDocumentation, type ApplicationOrganizationUnitResourceDocumentation, type OperationProjection, type ResourceTag, type ApplicationConnectionServer, type ApplicationAuthenticationDocumentationSource, type ApplicationIntegrationDocumentationSource } from '@wildo-ai/saas-technical-doc/companion';
4
4
  import type { TechnicalDocumentationEnvironmentIdentityCompanionService, TechnicalDocumentationEnvironmentIdentityInput } from './technical-documentation-environment-identity.companion.service';
5
5
  export interface TechnicalDocumentationApplicationDerivationInput extends TechnicalDocumentationEnvironmentIdentityInput {
6
6
  readonly operations: readonly OperationProjection[];
@@ -17,6 +17,12 @@ export interface TechnicalDocumentationApplicationDerivationInput extends Techni
17
17
  readonly apiServers: readonly ApplicationConnectionServer[];
18
18
  /** Per-user-type sign-in policy, read from the application's own configuration. */
19
19
  readonly authentication: ApplicationAuthenticationDocumentationSource;
20
+ /** The tools and events this application publishes, from the same walk that gates those pages. */
21
+ readonly integration: ApplicationIntegrationDocumentationSource;
22
+ /** Per-resource purpose and lifecycle prose, already grouped by the application's own categories. */
23
+ readonly resourceTags: readonly ResourceTag[];
24
+ /** Which of those resources are the application's own rather than the framework's. */
25
+ readonly applicationOwnedResourceIdentifiers: readonly string[];
20
26
  }
21
27
  export interface TechnicalDocumentationApplicationDerivationResult {
22
28
  readonly privateDerivation: TechnicalDocumentationPrivateDerivationManifestV1;
@@ -1 +1 @@
1
- {"version":3,"file":"technical-documentation-application-derivation.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-documentation-application-derivation.companion.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,yCAAyC,EAC/C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EASL,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EAChD,KAAK,iDAAiD,EACvD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAML,KAAK,wCAAwC,EAC7C,KAAK,gDAAgD,EACrD,KAAK,mBAAmB,EAGxB,KAAK,2BAA2B,EAChC,KAAK,4CAA4C,EAClD,MAAM,wCAAwC,CAAC;AAKhD,OAAO,KAAK,EACV,yDAAyD,EACzD,8CAA8C,EAC/C,MAAM,kEAAkE,CAAC;AA0C1E,MAAM,WAAW,gDAAiD,SAAQ,8CAA8C;IACtH,QAAQ,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACpD,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC;IACjD,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,wCAAwC,EAAE,CAAC;IAChF,QAAQ,CAAC,8BAA8B,EAAE,SAAS,gDAAgD,EAAE,CAAC;IACrG;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAC5D,mFAAmF;IACnF,QAAQ,CAAC,cAAc,EAAE,4CAA4C,CAAC;CACvE;AAED,MAAM,WAAW,iDAAiD;IAChE,QAAQ,CAAC,iBAAiB,EAAE,iDAAiD,CAAC;IAC9E,QAAQ,CAAC,YAAY,EAAE,gDAAgD,CAAC;CACzE;AAED;;;;;;;GAOG;AACH,qBACa,2DAA2D;IAGpE,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,yDAAyD;IAGpF,uBAAuB,CAClC,KAAK,EAAE,gDAAgD,GACtD,OAAO,CAAC,iDAAiD,CAAC;CA2E9D;AAwGD,mFAAmF;AACnF,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,yCAAyC,EAClD,UAAU,EAAE,MAAM,GACjB,2CAA2C,CAuB7C"}
1
+ {"version":3,"file":"technical-documentation-application-derivation.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/technical-doc/services/technical-documentation-application-derivation.companion.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,yCAAyC,EAC/C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EASL,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EAChD,KAAK,iDAAiD,EACvD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAML,KAAK,wCAAwC,EAC7C,KAAK,gDAAgD,EACrD,KAAK,mBAAmB,EAexB,KAAK,WAAW,EAChB,KAAK,2BAA2B,EAChC,KAAK,4CAA4C,EAGjD,KAAK,yCAAyC,EAC/C,MAAM,wCAAwC,CAAC;AAKhD,OAAO,KAAK,EACV,yDAAyD,EACzD,8CAA8C,EAC/C,MAAM,kEAAkE,CAAC;AAyN1E,MAAM,WAAW,gDAAiD,SAAQ,8CAA8C;IACtH,QAAQ,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACpD,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC;IACjD,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,wCAAwC,EAAE,CAAC;IAChF,QAAQ,CAAC,8BAA8B,EAAE,SAAS,gDAAgD,EAAE,CAAC;IACrG;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAC5D,mFAAmF;IACnF,QAAQ,CAAC,cAAc,EAAE,4CAA4C,CAAC;IACtE,kGAAkG;IAClG,QAAQ,CAAC,WAAW,EAAE,yCAAyC,CAAC;IAChE,qGAAqG;IACrG,QAAQ,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9C,sFAAsF;IACtF,QAAQ,CAAC,mCAAmC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjE;AAED,MAAM,WAAW,iDAAiD;IAChE,QAAQ,CAAC,iBAAiB,EAAE,iDAAiD,CAAC;IAC9E,QAAQ,CAAC,YAAY,EAAE,gDAAgD,CAAC;CACzE;AAED;;;;;;;GAOG;AACH,qBACa,2DAA2D;IAGpE,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,yDAAyD;IAGpF,uBAAuB,CAClC,KAAK,EAAE,gDAAgD,GACtD,OAAO,CAAC,iDAAiD,CAAC;CAgF9D;AAwGD,mFAAmF;AACnF,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,yCAAyC,EAClD,UAAU,EAAE,MAAM,GACjB,2CAA2C,CAuB7C"}
@@ -10,11 +10,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
- import { createHash } from 'node:crypto';
14
13
  import { CoreResourceType } from '@wildo-ai/saas-models';
15
14
  import { ENGINE_DOCUMENTATION_OUTBOUND_WEBHOOK_SIGNATURE_SOURCE_REF, createEngineDocumentationSpecificationCatalogV1, } from '@wildo-ai/saas-specifications/companion';
16
15
  import { TechnicalDocumentationApplicabilityEvidenceAxis, TechnicalDocumentationApplicabilityEvidenceReason, TechnicalDocumentationApplicabilityEvidenceStatus, TechnicalDocumentationChannel, TechnicalDocumentationEvidenceAuthorityKind, TechnicalDocumentationEvidenceSubjectRef, createTechnicalDocumentationEnvironmentEvidenceSnapshotV1, } from '@wildo-ai/saas-specifications/technical-documentation';
17
- import { createTechnicalDocumentationPrivateDerivation, loadApplicationConsumerDocumentationContentBundleV1, projectTechnicalDocumentationAuthorizedBundle, createApplicationOrganizationRolesDocumentationFact, createApplicationOrganizationUnitResourcesDocumentationFact, projectApplicationConnectionDocumentation, projectApplicationAuthenticationDocumentation, } from '@wildo-ai/saas-technical-doc/companion';
16
+ import { createTechnicalDocumentationPrivateDerivation, loadApplicationConsumerDocumentationContentBundleV1, projectTechnicalDocumentationAuthorizedBundle, createApplicationOrganizationRolesDocumentationFact, createApplicationOrganizationUnitResourcesDocumentationFact, projectApplicationConnectionDocumentation, projectApplicationAuthenticationDocumentation, projectApplicationAdministrationDocumentation, projectApplicationIntegrationDocumentation, projectApplicationDomainDocumentation, RESOURCE_RELATIONSHIP_CARDINALITY_MEANINGS, RESOURCE_RELATIONSHIP_NATURE_MEANINGS, ResourceRelationshipDocumentationCardinality, ResourceRelationshipDocumentationDeleteStrategy, } from '@wildo-ai/saas-technical-doc/companion';
18
17
  import { inject, injectable } from 'inversify';
19
18
  import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
20
19
  const APPLICATION_DOCUMENTATION_POLICY_REF = 'technical-documentation:policy/application-consumer-public-v1';
@@ -50,10 +49,175 @@ const ORGANIZATION_SIEM_EXPORT_RESOURCE_IDENTIFIERS = Object.freeze([
50
49
  const ORGANIZATION_SIEM_RECOVERY_RESOURCE_IDENTIFIERS = Object.freeze([
51
50
  CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ,
52
51
  ]);
53
- const ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS = Object.freeze([
54
- CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,
55
- CoreResourceType.ORGANIZATION_SUBSCRIPTIONS,
56
- ]);
52
+ /**
53
+ * The administrative matrix, joined from two things the derivation already has: the operations this
54
+ * application admits, and its own role labels.
55
+ *
56
+ * Only ADMITTED operations are considered — the same inventory that gates every other page — so an
57
+ * action this application does not publish never appears. Role identifiers are resolved to the
58
+ * application's labels; an identifier with no label falls back to the identifier itself rather than
59
+ * being dropped, because a reader is better served by an unfamiliar name than by a silently short
60
+ * list. Repository-only and internal variants are excluded: they are not doors anyone can open.
61
+ */
62
+ function administrationSourceFromOperations(operations, organizationRoles) {
63
+ const labelByRole = new Map(organizationRoles.map((role) => [role.role, role.label]));
64
+ const collect = (resourceIdentifiers) => {
65
+ const seen = new Set();
66
+ const actions = [];
67
+ for (const operation of operations) {
68
+ if (!resourceIdentifiers.includes(operation.resourceIdentifier))
69
+ continue;
70
+ const action = operation.summary?.trim();
71
+ if (action === undefined || action.length === 0 || seen.has(action))
72
+ continue;
73
+ seen.add(action);
74
+ actions.push({
75
+ action,
76
+ roleLabels: operation.roles.map((role) => labelByRole.get(role) ?? role),
77
+ openToEveryMember: operation.roles.length === 0,
78
+ });
79
+ }
80
+ return actions;
81
+ };
82
+ return {
83
+ memberActions: collect([CoreResourceType.ORGANIZATION_MEMBERS]),
84
+ organizationUnitActions: collect([CoreResourceType.ORGANIZATION_UNITS, CoreResourceType.ORGANIZATION_UNIT_MEMBERS]),
85
+ };
86
+ }
87
+ /**
88
+ * Turns one relationship row into something a customer can read, and refuses the part it cannot
89
+ * resolve.
90
+ *
91
+ * `onParentDelete` is a CHILD-side policy (`childOperations.lifecycle.onParentDelete`) copied onto
92
+ * both sides of the relationship, so the row alone does not say whether this resource is the parent
93
+ * or the child. Cardinality settles it for a one-to-many — the ONE side is the parent, and the
94
+ * foreign key sits on the many side — and settles nothing for one-to-one or many-to-many, which is
95
+ * 51 of the rows carrying a policy on the dogfood application.
96
+ *
97
+ * Where it is unresolved the cascade is simply ABSENT, and the page says an empty cell means "not
98
+ * stated here". Telling somebody their data survives a delete when it does not is the most
99
+ * expensive sentence this documentation could carry; making them look it up is cheap.
100
+ */
101
+ function domainRelationshipFrom(relationship) {
102
+ const many = [
103
+ ResourceRelationshipDocumentationCardinality.MANY,
104
+ ResourceRelationshipDocumentationCardinality.ONE_OR_MANY,
105
+ ];
106
+ const thisIsParent = relationship.resourceCardinality === ResourceRelationshipDocumentationCardinality.ONE
107
+ && many.includes(relationship.relatedResourceCardinality);
108
+ const thisIsChild = many.includes(relationship.resourceCardinality)
109
+ && relationship.relatedResourceCardinality === ResourceRelationshipDocumentationCardinality.ONE;
110
+ const policy = relationship.onParentDelete;
111
+ const removes = policy?.strategy === ResourceRelationshipDocumentationDeleteStrategy.IMPERSONALIZE_AND_RETAIN
112
+ ? 'kept but stripped of personal detail'
113
+ : 'deleted';
114
+ const cascade = policy?.enabled !== true
115
+ ? undefined
116
+ : thisIsParent
117
+ ? `Deleting one of these leaves its \`${relationship.relatedResourceName}\` ${removes}`
118
+ : thisIsChild
119
+ ? `${removes === 'deleted' ? 'Deleted' : 'Kept but stripped of personal detail'} when its \`${relationship.relatedResourceName}\` is deleted`
120
+ : undefined;
121
+ return {
122
+ relatedResourceIdentifier: relationship.relatedResourceName,
123
+ relatedCardinalityWords: RESOURCE_RELATIONSHIP_CARDINALITY_MEANINGS[relationship.relatedResourceCardinality],
124
+ natureWords: RESOURCE_RELATIONSHIP_NATURE_MEANINGS[relationship.nature],
125
+ ...(relationship.foreignKeyField === undefined ? {} : { foreignKeyField: relationship.foreignKeyField }),
126
+ ...(cascade === undefined ? {} : { cascade }),
127
+ };
128
+ }
129
+ /**
130
+ * The application's own domain, assembled from three sources it already accepted.
131
+ *
132
+ * Only APPLICATION-OWNED resources appear. That split is the whole reason this page does not
133
+ * restate the rest of the site: a core resource such as `organizationMembers` already has pages
134
+ * about administering it, while `todos` had none anywhere.
135
+ *
136
+ * Grouping comes from `apiReferenceResourceCategories`, which an application already declares for
137
+ * its API reference and which the categoriser has already validated (every published resource
138
+ * named exactly once, no unknown names). Reusing it means the documentation and the reference
139
+ * group the product the same way, and an application that renames a category renames it in one
140
+ * place.
141
+ *
142
+ * When an application declares no categories the resources land in a single group named after the
143
+ * application. That is deliberately not an invented taxonomy: guessing at domain groupings from
144
+ * resource names is exactly the kind of inference the quality contract forbids.
145
+ */
146
+ function domainSourceFromResourceTags(input) {
147
+ const owned = new Set(input.applicationOwnedResourceIdentifiers);
148
+ const labelByRole = new Map(input.organizationRoles.map((role) => [role.role, role.label]));
149
+ const operationsFor = (resourceIdentifier) => {
150
+ const seen = new Set();
151
+ const projected = [];
152
+ for (const operation of input.operations) {
153
+ if (operation.resourceIdentifier !== resourceIdentifier)
154
+ continue;
155
+ // One row per operation identifier: variants differ by transport and qualifier, which a
156
+ // reader deciding whether they may do something does not need and cannot act on.
157
+ if (seen.has(operation.baseOperationIdentifier))
158
+ continue;
159
+ seen.add(operation.baseOperationIdentifier);
160
+ const summary = operation.summary?.trim();
161
+ /*
162
+ * The wire facts, when the projection resolved them. A page that says what a thing is and
163
+ * who may change it, and then cannot say how to send the request, stops one step short of
164
+ * useful — and the method, the path and one worked example are all already here.
165
+ */
166
+ const example = operation.examples?.find((candidate) => candidate.request !== undefined || candidate.response !== undefined);
167
+ projected.push({
168
+ operationIdentifier: operation.baseOperationIdentifier,
169
+ ...(summary === undefined || summary.length === 0 ? {} : { summary }),
170
+ roleLabels: operation.roles.map((role) => labelByRole.get(role) ?? role),
171
+ openToEveryMember: operation.roles.length === 0,
172
+ ...(operation.httpVerb === undefined ? {} : { httpMethod: String(operation.httpVerb).toUpperCase() }),
173
+ ...(operation.path === undefined ? {} : { path: operation.path }),
174
+ ...(example === undefined ? {} : {
175
+ example: {
176
+ title: example.title,
177
+ ...(example.request === undefined ? {} : { request: example.request }),
178
+ ...(example.response === undefined ? {} : { response: example.response }),
179
+ },
180
+ }),
181
+ });
182
+ }
183
+ return projected;
184
+ };
185
+ const byCategoryId = new Map();
186
+ for (const tag of input.resourceTags) {
187
+ if (!owned.has(tag.name))
188
+ continue;
189
+ const categoryId = tag.category?.id ?? 'application-resources';
190
+ const label = tag.category?.label ?? input.applicationName;
191
+ const existing = byCategoryId.get(categoryId)
192
+ ?? { label, ...(tag.category?.description === undefined ? {} : { description: tag.category.description }), resources: [] };
193
+ /*
194
+ * EVERY relationship, not only those to resources this application owns.
195
+ *
196
+ * The first cut filtered to owned resources so every row could be a link. Measured against
197
+ * Wonder CRM, that was wrong: its `deal` relates to `organizations` and `users` and to none of
198
+ * its own resources, so the filter left the section empty on a resource with two real
199
+ * connections. The projection links a related resource that has a page and names one that does
200
+ * not, which keeps the fact and loses only the hyperlink.
201
+ */
202
+ const relationships = (tag.relationships ?? [])
203
+ .map(domainRelationshipFrom)
204
+ .sort((left, right) => left.relatedResourceIdentifier.localeCompare(right.relatedResourceIdentifier, 'en-US'));
205
+ existing.resources.push({
206
+ resourceIdentifier: tag.name,
207
+ ...(tag.description === undefined ? {} : { purpose: tag.description }),
208
+ ...(tag.lifecycleRole === undefined ? {} : { lifecycleRole: tag.lifecycleRole }),
209
+ operations: operationsFor(tag.name),
210
+ ...(relationships.length === 0 ? {} : { relationships }),
211
+ });
212
+ byCategoryId.set(categoryId, existing);
213
+ }
214
+ return {
215
+ applicationName: input.applicationName,
216
+ categories: [...byCategoryId.entries()]
217
+ .map(([id, category]) => ({ id, ...category }))
218
+ .sort((left, right) => left.label.localeCompare(right.label, 'en-US')),
219
+ };
220
+ }
57
221
  /**
58
222
  * Creates the public documentation bundle from engine-owned content and
59
223
  * framework introspection plus the resolved organization-role configuration.
@@ -82,7 +246,6 @@ let TechnicalDocumentationApplicationDerivationCompanionService = class Technica
82
246
  outboundWebhookSignatureContractObservation(engineCatalog, derivedAt),
83
247
  admittedResourceSurfaceObservation(input.operations, derivedAt, TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_SIEM_EXPORT, ORGANIZATION_SIEM_EXPORT_RESOURCE_IDENTIFIERS),
84
248
  admittedResourceSurfaceObservation(input.operations, derivedAt, TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_SIEM_DELIVERY_RECOVERY, ORGANIZATION_SIEM_RECOVERY_RESOURCE_IDENTIFIERS),
85
- admittedResourceSurfaceObservation(input.operations, derivedAt, TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_BILLING_ADMINISTRATION, ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS),
86
249
  ],
87
250
  });
88
251
  const privateDerivation = createTechnicalDocumentationPrivateDerivation({
@@ -93,6 +256,15 @@ let TechnicalDocumentationApplicationDerivationCompanionService = class Technica
93
256
  applicationOrganizationRolesFact: createApplicationOrganizationRolesDocumentationFact(input.organizationRoles),
94
257
  applicationOrganizationUnitResourcesFact: createApplicationOrganizationUnitResourcesDocumentationFact(input.organizationUnitAwareResources),
95
258
  applicationAuthenticationFact: projectApplicationAuthenticationDocumentation(input.authentication),
259
+ applicationIntegrationFact: projectApplicationIntegrationDocumentation(input.integration),
260
+ applicationDomainFact: projectApplicationDomainDocumentation(domainSourceFromResourceTags({
261
+ applicationName: input.applicationName,
262
+ resourceTags: input.resourceTags,
263
+ applicationOwnedResourceIdentifiers: input.applicationOwnedResourceIdentifiers,
264
+ operations: input.operations,
265
+ organizationRoles: input.organizationRoles,
266
+ })),
267
+ applicationAdministrationFact: projectApplicationAdministrationDocumentation(administrationSourceFromOperations(input.operations, input.organizationRoles)),
96
268
  applicationConnectionFact: projectApplicationConnectionDocumentation({
97
269
  applicationName: input.applicationName,
98
270
  apiServers: input.apiServers,
@@ -226,7 +398,4 @@ export function outboundWebhookSignatureContractObservation(catalog, observedAt)
226
398
  validUntil: null,
227
399
  };
228
400
  }
229
- function digest(canonicalJson) {
230
- return `sha256:${createHash('sha256').update(canonicalJson).digest('hex')}`;
231
- }
232
401
  //# sourceMappingURL=technical-documentation-application-derivation.companion.service.js.map