@wildo-ai/dev-companion 1.1.3 → 1.1.5

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 (1095) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/__time-gov.probe.d.mts +0 -0
  3. package/dist/esm/__time-gov.probe.d.mts.map +0 -0
  4. package/dist/esm/__time-gov.probe.mjs.map +0 -0
  5. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +9 -3
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  8. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +3 -24
  9. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  10. package/dist/esm/brand/services/brand-accept.companion.service.js +34 -53
  11. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  12. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts +7 -0
  13. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
  14. package/dist/esm/brand/services/logo-deliberation.companion.service.js +9 -8
  15. package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
  16. package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
  17. package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
  18. package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
  19. package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
  20. package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
  21. package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
  22. package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
  23. package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
  24. package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
  25. package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
  26. package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
  27. package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
  28. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts +143 -0
  29. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts.map +1 -0
  30. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js +84 -0
  31. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js.map +1 -0
  32. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +177 -14
  33. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  34. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +215 -8
  35. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  36. package/dist/esm/claude-cli/models/coding-session-frame-retention.d.ts +85 -0
  37. package/dist/esm/claude-cli/models/coding-session-frame-retention.d.ts.map +1 -0
  38. package/dist/esm/claude-cli/models/coding-session-frame-retention.js +122 -0
  39. package/dist/esm/claude-cli/models/coding-session-frame-retention.js.map +1 -0
  40. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +98 -0
  41. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -0
  42. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +135 -0
  43. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -0
  44. package/dist/esm/claude-cli/models/parked-question-answer.models.d.ts +94 -0
  45. package/dist/esm/claude-cli/models/parked-question-answer.models.d.ts.map +1 -0
  46. package/dist/esm/claude-cli/models/parked-question-answer.models.js +137 -0
  47. package/dist/esm/claude-cli/models/parked-question-answer.models.js.map +1 -0
  48. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.d.ts +16 -0
  49. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.d.ts.map +1 -0
  50. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +46 -0
  51. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -0
  52. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +46 -0
  53. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -0
  54. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +135 -0
  55. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -0
  56. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +131 -0
  57. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -0
  58. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +371 -0
  59. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -0
  60. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +717 -76
  61. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  62. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +2056 -388
  63. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  64. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +109 -0
  65. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -0
  66. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +186 -0
  67. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -0
  68. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +227 -29
  69. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  70. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +666 -125
  71. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  72. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +57 -10
  73. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  74. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +127 -10
  75. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  76. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +16 -0
  77. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  78. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +17 -0
  79. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  80. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +8 -1
  81. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
  82. package/dist/esm/companion-api/companion-api.schemas.d.ts +164 -87
  83. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  84. package/dist/esm/companion-api/companion-api.schemas.js +52 -6
  85. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  86. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
  87. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
  88. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +109 -0
  89. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
  90. package/dist/esm/companion-api/controllers/companion.controller.d.ts +201 -16
  91. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  92. package/dist/esm/companion-api/controllers/companion.controller.js +660 -117
  93. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  94. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +47 -5
  95. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
  96. package/dist/esm/core/auth/companion-auth-floor.companion.service.js +47 -5
  97. package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
  98. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
  99. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
  100. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
  101. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
  102. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
  103. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
  104. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
  105. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  106. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
  107. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  108. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.d.ts +54 -0
  109. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.d.ts.map +1 -0
  110. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.js +78 -0
  111. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.js.map +1 -0
  112. package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
  113. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  114. package/dist/esm/core/config/primary-language.companion.utils.js +12 -0
  115. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  116. package/dist/esm/core/context/companion-context.d.ts.map +1 -1
  117. package/dist/esm/core/context/companion-context.js +4 -0
  118. package/dist/esm/core/context/companion-context.js.map +1 -1
  119. package/dist/esm/core/context/companion-package-loaders.companion.d.ts +57 -0
  120. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  121. package/dist/esm/core/context/companion-package-loaders.companion.js +181 -7
  122. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  123. package/dist/esm/core/context/draft-family-values.companion.d.ts +23 -0
  124. package/dist/esm/core/context/draft-family-values.companion.d.ts.map +1 -0
  125. package/dist/esm/core/context/draft-family-values.companion.js +49 -0
  126. package/dist/esm/core/context/draft-family-values.companion.js.map +1 -0
  127. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  128. package/dist/esm/core/inject/models/container.js +28 -11
  129. package/dist/esm/core/inject/models/container.js.map +1 -1
  130. package/dist/esm/core/inject/models/service-types.d.ts +12 -3
  131. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  132. package/dist/esm/core/inject/models/service-types.js +14 -3
  133. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  134. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  135. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +74 -2
  136. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
  137. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +37 -1
  138. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  139. package/dist/esm/core/introspection/models/companion-introspection.models.js +55 -0
  140. package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
  141. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +93 -0
  142. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -0
  143. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +290 -0
  144. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -0
  145. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  146. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +636 -18
  147. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  148. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +592 -17
  149. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  150. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +1425 -94
  151. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  152. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +61 -4
  153. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  154. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +136 -10
  155. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
  156. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  157. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +11 -0
  158. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
  159. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +21 -0
  160. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  161. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +63 -4
  162. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  163. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  164. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +11 -3
  165. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -1
  166. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +15 -5
  167. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  168. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +28 -15
  169. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  170. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts +24 -0
  171. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
  172. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js +29 -5
  173. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js.map +1 -1
  174. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +116 -0
  175. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -0
  176. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +223 -0
  177. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -0
  178. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +13 -15
  179. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  180. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  181. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts +2 -1
  182. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
  183. package/dist/esm/core/introspection/subprocess/assertions.behavior.js.map +1 -1
  184. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  185. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +85 -51
  186. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  187. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
  188. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  189. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
  190. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  191. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.d.ts +33 -0
  192. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.d.ts.map +1 -0
  193. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.js +59 -0
  194. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.js.map +1 -0
  195. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +12 -0
  196. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
  197. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
  198. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
  199. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
  200. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +46 -102
  201. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
  202. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +15 -0
  203. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  204. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +140 -46
  205. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
  206. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +65 -2
  207. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  208. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +292 -49
  209. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  210. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.d.ts +79 -0
  211. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.d.ts.map +1 -0
  212. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.js +49 -0
  213. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.js.map +1 -0
  214. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  215. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +314 -212
  216. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  217. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.d.ts +72 -0
  218. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.d.ts.map +1 -0
  219. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.js +123 -0
  220. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.js.map +1 -0
  221. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +184 -0
  222. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -0
  223. package/dist/esm/core/introspection/workspace-element-index.companion.js +311 -0
  224. package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -0
  225. package/dist/esm/core/introspection/workspace-elements.companion.d.ts +54 -0
  226. package/dist/esm/core/introspection/workspace-elements.companion.d.ts.map +1 -0
  227. package/dist/esm/core/introspection/workspace-elements.companion.js +43 -0
  228. package/dist/esm/core/introspection/workspace-elements.companion.js.map +1 -0
  229. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
  230. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
  231. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
  232. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
  233. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts +7 -0
  234. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
  235. package/dist/esm/core/lock/wildo-saas-lock.models.js.map +1 -1
  236. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +3 -0
  237. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
  238. package/dist/esm/core/lock/wildo-saas-lock.schemas.js +1 -0
  239. package/dist/esm/core/lock/wildo-saas-lock.schemas.js.map +1 -1
  240. package/dist/esm/core/runtime/application-runtime-liveness.companion.d.ts +31 -0
  241. package/dist/esm/core/runtime/application-runtime-liveness.companion.d.ts.map +1 -0
  242. package/dist/esm/core/runtime/application-runtime-liveness.companion.js +53 -0
  243. package/dist/esm/core/runtime/application-runtime-liveness.companion.js.map +1 -0
  244. package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
  245. package/dist/esm/core/runtime/companion-startup-assembly.js +35 -1
  246. package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
  247. package/dist/esm/core/runtime/services/file-storage-initialization.companion.d.ts +54 -0
  248. package/dist/esm/core/runtime/services/file-storage-initialization.companion.d.ts.map +1 -0
  249. package/dist/esm/core/runtime/services/file-storage-initialization.companion.js +54 -0
  250. package/dist/esm/core/runtime/services/file-storage-initialization.companion.js.map +1 -0
  251. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +26 -14
  252. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  253. package/dist/esm/core/runtime/services/start-companion-application.service.js +243 -67
  254. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  255. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +3 -3
  256. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  257. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +35 -10
  258. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  259. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts +0 -4
  260. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
  261. package/dist/esm/core/specifications/cross-registry-rendering.shared.js +0 -4
  262. package/dist/esm/core/specifications/cross-registry-rendering.shared.js.map +1 -1
  263. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
  264. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.js.map +1 -1
  265. package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
  266. package/dist/esm/core/specifications/onboarding-element-rendering.shared.js +6 -34
  267. package/dist/esm/core/specifications/onboarding-element-rendering.shared.js.map +1 -1
  268. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
  269. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.js.map +1 -1
  270. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  271. package/dist/esm/core/specifications/resource-specification-context.factory.js +2 -0
  272. package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
  273. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts +4 -2
  274. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
  275. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +16 -6
  276. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
  277. package/dist/esm/core/traceability/companion-traceability.service.d.ts +21 -1
  278. package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
  279. package/dist/esm/core/traceability/companion-traceability.service.js +25 -1
  280. package/dist/esm/core/traceability/companion-traceability.service.js.map +1 -1
  281. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts +45 -0
  282. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts.map +1 -0
  283. package/dist/esm/core/utils/derived-input-signature.companion.utils.js +96 -0
  284. package/dist/esm/core/utils/derived-input-signature.companion.utils.js.map +1 -0
  285. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts +35 -0
  286. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -0
  287. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +118 -0
  288. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -0
  289. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +34 -0
  290. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -0
  291. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +280 -0
  292. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -0
  293. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  294. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
  295. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  296. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts +19 -1
  297. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  298. package/dist/esm/deliberations/services/deliberation.companion.service.js +61 -10
  299. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  300. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts +3 -1
  301. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
  302. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +7 -4
  303. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
  304. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  305. package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
  306. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  307. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
  308. package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
  309. package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
  310. package/dist/esm/email/services/email-template.companion.service.d.ts +30 -0
  311. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  312. package/dist/esm/email/services/email-template.companion.service.js +92 -19
  313. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  314. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +34 -0
  315. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -0
  316. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +130 -0
  317. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -0
  318. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +117 -5
  319. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  320. package/dist/esm/executions/services/companion-executions.companion.service.js +263 -10
  321. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  322. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  323. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
  324. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  325. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  326. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
  327. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  328. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +14 -24
  329. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  330. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +69 -68
  331. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  332. package/dist/esm/expert-personas/services/persona-source-ownership.d.ts +8 -0
  333. package/dist/esm/expert-personas/services/persona-source-ownership.d.ts.map +1 -0
  334. package/dist/esm/expert-personas/services/persona-source-ownership.js +83 -0
  335. package/dist/esm/expert-personas/services/persona-source-ownership.js.map +1 -0
  336. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts +1 -1
  337. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.js +1 -1
  338. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.js.map +1 -1
  339. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts +4 -4
  340. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.js +4 -4
  341. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.js.map +1 -1
  342. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts +2 -2
  343. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.js +2 -2
  344. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.js.map +1 -1
  345. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +4 -2
  346. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  347. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +5 -3
  348. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
  349. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts +2 -1
  350. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.js +2 -1
  352. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.js.map +1 -1
  353. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts +1 -1
  354. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.js +1 -1
  355. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.js.map +1 -1
  356. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts +6 -5
  357. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.js +7 -6
  359. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.js.map +1 -1
  360. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts +3 -3
  361. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.js +3 -3
  362. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.js.map +1 -1
  363. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -2
  364. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +2 -2
  365. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
  366. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts +2 -1
  367. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
  368. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.js +2 -1
  369. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.js.map +1 -1
  370. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +1 -1
  371. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +1 -1
  372. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
  373. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +1 -1
  374. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +1 -1
  375. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
  376. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +43 -0
  377. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -0
  378. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +43 -0
  379. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -0
  380. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.d.ts +26 -0
  381. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.d.ts.map +1 -0
  382. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.js +26 -0
  383. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.js.map +1 -0
  384. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.d.ts +18 -0
  385. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.d.ts.map +1 -0
  386. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.js +18 -0
  387. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.js.map +1 -0
  388. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts +3 -3
  389. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.js +3 -3
  390. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.js.map +1 -1
  391. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts +1 -1
  392. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.js +1 -1
  393. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.js.map +1 -1
  394. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +2 -2
  395. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +2 -2
  396. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
  397. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -1
  398. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  399. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +4 -1
  400. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
  401. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts +10 -10
  402. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.js +10 -10
  403. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.js.map +1 -1
  404. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +25 -13
  405. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +26 -14
  407. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
  408. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts +1 -0
  409. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.js +2 -1
  411. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.js.map +1 -1
  412. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.d.ts +17 -0
  413. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.d.ts.map +1 -0
  414. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.js +17 -0
  415. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.js.map +1 -0
  416. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts +5 -5
  417. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.js +5 -5
  418. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.js.map +1 -1
  419. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts +1 -1
  420. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.js +1 -1
  421. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.js.map +1 -1
  422. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts +1 -1
  423. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.js +1 -1
  424. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.js.map +1 -1
  425. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts +16 -2
  426. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
  427. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.js +16 -2
  428. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.js.map +1 -1
  429. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts +3 -3
  430. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.js +3 -3
  431. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.js.map +1 -1
  432. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts +8 -8
  433. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.js +8 -8
  434. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.js.map +1 -1
  435. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +14 -14
  436. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +14 -14
  437. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  438. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +22 -6
  439. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  440. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +23 -7
  441. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  442. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts +2 -2
  443. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.js +2 -2
  444. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.js.map +1 -1
  445. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts +1 -1
  446. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.js +1 -1
  447. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.js.map +1 -1
  448. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts +1 -1
  449. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.js +1 -1
  450. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.js.map +1 -1
  451. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts +1 -1
  452. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.js +1 -1
  453. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.js.map +1 -1
  454. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts +2 -2
  455. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.js +2 -2
  456. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.js.map +1 -1
  457. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.d.ts +21 -0
  458. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.d.ts.map +1 -0
  459. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.js +21 -0
  460. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.js.map +1 -0
  461. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts +1 -1
  462. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.js +1 -1
  463. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.js.map +1 -1
  464. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts +1 -1
  465. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.js +1 -1
  466. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.js.map +1 -1
  467. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts +2 -2
  468. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.js +2 -2
  469. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.js.map +1 -1
  470. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts +1 -1
  471. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.js +1 -1
  472. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.js.map +1 -1
  473. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +4 -5
  474. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  475. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +4 -5
  476. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
  477. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts +4 -4
  478. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.js +4 -4
  479. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.js.map +1 -1
  480. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts +2 -2
  481. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.js +2 -2
  482. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.js.map +1 -1
  483. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts +1 -1
  484. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.js +1 -1
  485. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.js.map +1 -1
  486. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts +1 -0
  487. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
  488. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.js +2 -1
  489. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.js.map +1 -1
  490. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +12 -6
  491. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -1
  492. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +12 -6
  493. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -1
  494. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts +1 -0
  495. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
  496. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.js +2 -1
  497. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.js.map +1 -1
  498. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +3 -2
  499. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  500. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +4 -3
  501. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
  502. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts +3 -2
  503. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
  504. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.js +4 -3
  505. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.js.map +1 -1
  506. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +3 -1
  507. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  508. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +4 -2
  509. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
  510. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts +3 -3
  511. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.js +3 -3
  512. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.js.map +1 -1
  513. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts +1 -1
  514. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.js +1 -1
  515. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.js.map +1 -1
  516. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +3 -3
  517. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +3 -3
  518. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
  519. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.d.ts +15 -0
  520. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.d.ts.map +1 -0
  521. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.js +15 -0
  522. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.js.map +1 -0
  523. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.d.ts +12 -0
  524. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.d.ts.map +1 -0
  525. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.js +12 -0
  526. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.js.map +1 -0
  527. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts +1 -1
  528. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.js +1 -1
  529. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.js.map +1 -1
  530. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts +1 -1
  531. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.js +1 -1
  532. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.js.map +1 -1
  533. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +4 -3
  534. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  535. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +4 -3
  536. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
  537. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts +1 -1
  538. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.js +1 -1
  539. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.js.map +1 -1
  540. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts +3 -0
  541. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
  542. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.js +4 -1
  543. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.js.map +1 -1
  544. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts +1 -1
  545. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.js +1 -1
  546. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.js.map +1 -1
  547. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts +1 -1
  548. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.js +1 -1
  549. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.js.map +1 -1
  550. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts +1 -1
  551. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.js +1 -1
  552. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.js.map +1 -1
  553. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts +1 -1
  554. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.js +1 -1
  555. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.js.map +1 -1
  556. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts +1 -1
  557. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.js +1 -1
  558. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.js.map +1 -1
  559. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts +1 -1
  560. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.js +1 -1
  561. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.js.map +1 -1
  562. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.d.ts +22 -0
  563. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.d.ts.map +1 -0
  564. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.js +22 -0
  565. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.js.map +1 -0
  566. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts +2 -2
  567. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.js +2 -2
  568. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.js.map +1 -1
  569. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts +6 -6
  570. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.js +6 -6
  571. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.js.map +1 -1
  572. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts +3 -3
  573. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.js +3 -3
  574. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.js.map +1 -1
  575. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +15 -8
  576. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  577. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +16 -9
  578. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
  579. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +20 -0
  580. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -0
  581. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +20 -0
  582. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -0
  583. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts +1 -1
  584. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.js +1 -1
  585. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.js.map +1 -1
  586. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +39 -20
  587. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  588. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +39 -20
  589. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
  590. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts +5 -5
  591. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.js +5 -5
  592. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.js.map +1 -1
  593. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts +1 -1
  594. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.js +1 -1
  595. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.js.map +1 -1
  596. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.d.ts +13 -0
  597. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.d.ts.map +1 -0
  598. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.js +13 -0
  599. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.js.map +1 -0
  600. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.d.ts +13 -0
  601. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.d.ts.map +1 -0
  602. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.js +13 -0
  603. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.js.map +1 -0
  604. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts +3 -3
  605. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.js +3 -3
  606. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.js.map +1 -1
  607. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.d.ts +15 -0
  608. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.d.ts.map +1 -0
  609. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.js +15 -0
  610. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.js.map +1 -0
  611. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts +5 -3
  612. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
  613. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.js +6 -4
  614. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.js.map +1 -1
  615. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts +10 -9
  616. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
  617. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.js +11 -10
  618. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.js.map +1 -1
  619. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
  620. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
  621. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
  622. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
  623. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts +5 -5
  624. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.js +5 -5
  625. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.js.map +1 -1
  626. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +6 -6
  627. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +6 -6
  628. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
  629. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts +7 -7
  630. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.js +7 -7
  631. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.js.map +1 -1
  632. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts +1 -1
  633. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.js +1 -1
  634. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.js.map +1 -1
  635. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts +1 -1
  636. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.js +1 -1
  637. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.js.map +1 -1
  638. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts +4 -4
  639. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.js +4 -4
  640. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.js.map +1 -1
  641. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.d.ts +24 -0
  642. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.d.ts.map +1 -0
  643. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.js +24 -0
  644. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.js.map +1 -0
  645. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +6 -4
  646. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  647. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +6 -4
  648. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
  649. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +14 -10
  650. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
  651. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +14 -10
  652. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
  653. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts +6 -6
  654. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.js +6 -6
  655. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.js.map +1 -1
  656. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts +11 -8
  657. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
  658. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.js +12 -9
  659. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.js.map +1 -1
  660. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts +9 -8
  661. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
  662. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.js +9 -8
  663. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.js.map +1 -1
  664. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts +25 -9
  665. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
  666. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.js +25 -9
  667. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.js.map +1 -1
  668. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts +1 -1
  669. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.js +1 -1
  670. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.js.map +1 -1
  671. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts +2 -2
  672. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.js +2 -2
  673. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.js.map +1 -1
  674. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts +1 -0
  675. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
  676. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.js +2 -1
  677. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.js.map +1 -1
  678. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts +25 -24
  679. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
  680. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.js +26 -25
  681. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.js.map +1 -1
  682. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts +1 -1
  683. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.js +1 -1
  684. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.js.map +1 -1
  685. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +3 -1
  686. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  687. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +4 -2
  688. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
  689. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts +2 -2
  690. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.js +2 -2
  691. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.js.map +1 -1
  692. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +11 -11
  693. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +11 -11
  694. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  695. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +1 -1
  696. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +1 -1
  697. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
  698. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +12 -0
  699. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  700. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +13 -1
  701. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
  702. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts +6 -6
  703. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.js +6 -6
  704. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.js.map +1 -1
  705. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts +2 -2
  706. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.js +2 -2
  707. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.js.map +1 -1
  708. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts +2 -2
  709. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.js +2 -2
  710. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.js.map +1 -1
  711. package/dist/esm/i18n/components/guidance_banner.en.d.ts +1 -1
  712. package/dist/esm/i18n/components/guidance_banner.en.js +1 -1
  713. package/dist/esm/i18n/components/guidance_banner.en.js.map +1 -1
  714. package/dist/esm/i18n/components/guidance_checklist.en.d.ts +2 -2
  715. package/dist/esm/i18n/components/guidance_checklist.en.js +2 -2
  716. package/dist/esm/i18n/components/guidance_checklist.en.js.map +1 -1
  717. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts +1 -0
  718. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
  719. package/dist/esm/i18n/components/guidance_checklist_item.en.js +2 -1
  720. package/dist/esm/i18n/components/guidance_checklist_item.en.js.map +1 -1
  721. package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts +1 -1
  722. package/dist/esm/i18n/components/guidance_onboarding_view.en.js +1 -1
  723. package/dist/esm/i18n/components/guidance_onboarding_view.en.js.map +1 -1
  724. package/dist/esm/i18n/components/guidance_survey.en.d.ts +1 -0
  725. package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
  726. package/dist/esm/i18n/components/guidance_survey.en.js +2 -1
  727. package/dist/esm/i18n/components/guidance_survey.en.js.map +1 -1
  728. package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts +1 -1
  729. package/dist/esm/i18n/components/progression_achievement_badge.en.js +1 -1
  730. package/dist/esm/i18n/components/progression_achievement_badge.en.js.map +1 -1
  731. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +5 -1
  732. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  733. package/dist/esm/i18n/components/progression_milestone_tracker.en.js +6 -2
  734. package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
  735. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -13
  736. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -1
  737. package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -1
  738. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +17 -0
  739. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -0
  740. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +252 -0
  741. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -0
  742. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts +15 -0
  743. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -0
  744. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +58 -0
  745. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -0
  746. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +96 -0
  747. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -0
  748. package/dist/esm/i18n/errors_messages/errors-messages.en.js +54 -0
  749. package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -0
  750. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +2014 -1
  751. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  752. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +516 -0
  753. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
  754. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts +878 -8
  755. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
  756. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js +247 -0
  757. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js.map +1 -1
  758. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts +504 -1
  759. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
  760. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js +153 -0
  761. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js.map +1 -1
  762. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts +78 -0
  763. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -0
  764. package/dist/esm/i18n/resources/workbenchAspects.en.js +255 -0
  765. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -0
  766. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts +149 -0
  767. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts.map +1 -0
  768. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js +79 -0
  769. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js.map +1 -0
  770. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +89 -0
  771. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -0
  772. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +74 -0
  773. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -0
  774. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +70 -5
  775. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  776. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +67 -0
  777. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -1
  778. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +80 -0
  779. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -0
  780. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +50 -0
  781. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -0
  782. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.d.ts +95 -0
  783. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.d.ts.map +1 -0
  784. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.js +54 -0
  785. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.js.map +1 -0
  786. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.d.ts +95 -0
  787. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.d.ts.map +1 -0
  788. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.js +51 -0
  789. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.js.map +1 -0
  790. package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts +1 -1
  791. package/dist/esm/i18n/resources/workbenchDomainResources.en.js +2 -2
  792. package/dist/esm/i18n/resources/workbenchDomainResources.en.js.map +1 -1
  793. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +108 -0
  794. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -0
  795. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +61 -0
  796. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -0
  797. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +99 -0
  798. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -0
  799. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +87 -0
  800. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -0
  801. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.d.ts +121 -0
  802. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.d.ts.map +1 -0
  803. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.js +84 -0
  804. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.js.map +1 -0
  805. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +83 -0
  806. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -0
  807. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +71 -0
  808. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -0
  809. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +159 -0
  810. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -0
  811. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +103 -0
  812. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -0
  813. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +142 -6
  814. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  815. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +103 -0
  816. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
  817. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +94 -4
  818. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  819. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +79 -0
  820. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
  821. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +5074 -257
  822. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  823. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +1201 -44
  824. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  825. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts +86 -3
  826. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
  827. package/dist/esm/i18n/resources/workbenchTraceSessions.en.js +90 -0
  828. package/dist/esm/i18n/resources/workbenchTraceSessions.en.js.map +1 -1
  829. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +97 -0
  830. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -0
  831. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +77 -0
  832. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -0
  833. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +272 -0
  834. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -0
  835. package/dist/esm/i18n/system_enums/application-creation.en.js +319 -0
  836. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -0
  837. package/dist/esm/i18n/system_enums/compliance-programme.en.d.ts +154 -0
  838. package/dist/esm/i18n/system_enums/compliance-programme.en.d.ts.map +1 -0
  839. package/dist/esm/i18n/system_enums/compliance-programme.en.js +154 -0
  840. package/dist/esm/i18n/system_enums/compliance-programme.en.js.map +1 -0
  841. package/dist/esm/i18n/system_enums/flows-actors.en.d.ts +54 -0
  842. package/dist/esm/i18n/system_enums/flows-actors.en.d.ts.map +1 -0
  843. package/dist/esm/i18n/system_enums/flows-actors.en.js +54 -0
  844. package/dist/esm/i18n/system_enums/flows-actors.en.js.map +1 -0
  845. package/dist/esm/i18n/system_enums/market.en.d.ts +12 -2
  846. package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
  847. package/dist/esm/i18n/system_enums/market.en.js +12 -2
  848. package/dist/esm/i18n/system_enums/market.en.js.map +1 -1
  849. package/dist/esm/i18n/system_enums/processor-register.en.d.ts +43 -0
  850. package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -0
  851. package/dist/esm/i18n/system_enums/processor-register.en.js +43 -0
  852. package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -0
  853. package/dist/esm/i18n/system_enums/risk-register.en.d.ts +56 -0
  854. package/dist/esm/i18n/system_enums/risk-register.en.d.ts.map +1 -0
  855. package/dist/esm/i18n/system_enums/risk-register.en.js +56 -0
  856. package/dist/esm/i18n/system_enums/risk-register.en.js.map +1 -0
  857. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +50 -0
  858. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -0
  859. package/dist/esm/i18n/system_enums/workbench-build.en.js +55 -0
  860. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -0
  861. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +47 -0
  862. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -0
  863. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +48 -0
  864. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -0
  865. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +18 -0
  866. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -0
  867. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +18 -0
  868. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -0
  869. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.d.ts +29 -0
  870. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.d.ts.map +1 -0
  871. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.js +29 -0
  872. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.js.map +1 -0
  873. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +24 -0
  874. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -0
  875. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +24 -0
  876. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -0
  877. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +106 -0
  878. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  879. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +69 -0
  880. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  881. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  882. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
  883. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  884. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +68 -4
  885. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  886. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +320 -88
  887. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  888. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +11 -11
  889. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  890. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +61 -44
  891. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  892. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +139 -2
  893. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  894. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +521 -42
  895. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  896. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  897. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +156 -36
  898. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  899. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.d.ts +91 -0
  900. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.d.ts.map +1 -0
  901. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.js +149 -0
  902. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.js.map +1 -0
  903. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +27 -0
  904. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -0
  905. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +44 -0
  906. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -0
  907. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +27 -0
  908. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
  909. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js +27 -0
  910. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
  911. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts +12 -0
  912. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
  913. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.js +58 -1
  914. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.js.map +1 -1
  915. package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
  916. package/dist/esm/i18n-labelling/utils/label-file-source.utils.js +19 -0
  917. package/dist/esm/i18n-labelling/utils/label-file-source.utils.js.map +1 -1
  918. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
  919. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
  920. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
  921. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
  922. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
  923. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
  924. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
  925. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
  926. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  927. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js +10 -0
  928. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js.map +1 -1
  929. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +108 -1
  930. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  931. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +289 -104
  932. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  933. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts +11 -0
  934. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
  935. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.js +27 -3
  936. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.js.map +1 -1
  937. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts +29 -0
  938. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -0
  939. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +59 -0
  940. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -0
  941. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +117 -3
  942. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  943. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +277 -55
  944. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  945. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +27 -1
  946. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  947. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +43 -8
  948. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  949. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +50 -0
  950. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -0
  951. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +116 -0
  952. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -0
  953. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts +46 -0
  954. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts.map +1 -0
  955. package/dist/esm/meta-workflows/models/build-task-rearm.models.js +43 -0
  956. package/dist/esm/meta-workflows/models/build-task-rearm.models.js.map +1 -0
  957. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +34 -0
  958. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -0
  959. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +59 -0
  960. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -0
  961. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +65 -0
  962. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -0
  963. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +83 -0
  964. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -0
  965. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +69 -7
  966. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  967. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +70 -7
  968. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  969. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  970. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +36 -9
  971. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  972. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +208 -0
  973. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -0
  974. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +273 -0
  975. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -0
  976. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +356 -0
  977. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -0
  978. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +417 -0
  979. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -0
  980. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.d.ts +14 -0
  981. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.d.ts.map +1 -0
  982. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.js +21 -0
  983. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.js.map +1 -0
  984. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
  985. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js +3 -1
  986. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js.map +1 -1
  987. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +65 -0
  988. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -0
  989. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +148 -0
  990. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -0
  991. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +933 -36
  992. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  993. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +2092 -134
  994. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  995. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +183 -23
  996. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  997. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +422 -6
  998. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  999. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +402 -16
  1000. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  1001. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +1398 -70
  1002. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  1003. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts +47 -0
  1004. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts.map +1 -0
  1005. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js +103 -0
  1006. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js.map +1 -0
  1007. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +29 -0
  1008. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -0
  1009. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +88 -0
  1010. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -0
  1011. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +47 -0
  1012. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -0
  1013. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +102 -0
  1014. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -0
  1015. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
  1016. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
  1017. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
  1018. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +81 -0
  1019. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -0
  1020. package/dist/esm/meta-workflows/services/dossier.companion.service.js +231 -0
  1021. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -0
  1022. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.d.ts +36 -0
  1023. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.d.ts.map +1 -0
  1024. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.js +72 -0
  1025. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.js.map +1 -0
  1026. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts +82 -1
  1027. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
  1028. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js +200 -31
  1029. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js.map +1 -1
  1030. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.d.ts +16 -0
  1031. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.d.ts.map +1 -0
  1032. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.js +29 -0
  1033. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.js.map +1 -0
  1034. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +196 -1
  1035. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  1036. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +380 -10
  1037. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  1038. package/dist/esm/meta-workflows/services/landed-module-import.companion.d.ts +2 -0
  1039. package/dist/esm/meta-workflows/services/landed-module-import.companion.d.ts.map +1 -0
  1040. package/dist/esm/meta-workflows/services/landed-module-import.companion.js +36 -0
  1041. package/dist/esm/meta-workflows/services/landed-module-import.companion.js.map +1 -0
  1042. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +57 -0
  1043. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  1044. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +83 -3
  1045. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  1046. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +980 -167
  1047. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  1048. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +3410 -409
  1049. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  1050. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts +100 -0
  1051. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts.map +1 -0
  1052. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js +156 -0
  1053. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js.map +1 -0
  1054. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.d.ts +49 -0
  1055. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.d.ts.map +1 -0
  1056. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.js +93 -0
  1057. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.js.map +1 -0
  1058. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.d.ts +45 -0
  1059. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.d.ts.map +1 -0
  1060. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.js +145 -0
  1061. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.js.map +1 -0
  1062. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +148 -9
  1063. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
  1064. package/dist/esm/technical-doc/services/technical-doc.companion.service.js +317 -85
  1065. package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
  1066. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +27 -6
  1067. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
  1068. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +211 -20
  1069. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
  1070. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
  1071. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  1072. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +10 -2
  1073. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  1074. package/package.json +18 -18
  1075. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
  1076. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
  1077. package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
  1078. package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
  1079. package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
  1080. package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
  1081. package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
  1082. package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
  1083. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
  1084. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
  1085. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
  1086. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
  1087. package/dist/esm/i18n/composite_views/app.creation-board.en.js +0 -91
  1088. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts +0 -92
  1089. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +0 -1
  1090. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.js +0 -178
  1091. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.js.map +0 -1
  1092. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts +0 -107
  1093. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +0 -1
  1094. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js +0 -188
  1095. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js.map +0 -1
@@ -10,7 +10,7 @@ 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, randomUUID } from 'node:crypto';
13
+ import { randomUUID } from 'node:crypto';
14
14
  import { mkdir, writeFile } from 'node:fs/promises';
15
15
  import { resolve } from 'node:path';
16
16
  import { inject, injectable } from 'inversify';
@@ -30,6 +30,13 @@ const BRAND_STAGING_DIR_SEGMENTS = ['.wildo-saas', 'generated', 'brand'];
30
30
  const LOGO_REVIEWER_ROLES = ['art-director', 'design-system-guardian', 'brand-strategist'];
31
31
  const LOGO_COORDINATOR_ROLE = 'brand-strategist';
32
32
  const LOGO_RUBRIC_DERIVER_ROLE = 'art-director';
33
+ /**
34
+ * Every role the logo step SEATS, for the roster `top_down.expert-personas` staffs (#572). Derived from
35
+ * the three constants above rather than re-listed, so a seat added to the panel is staffed by existing.
36
+ * A generation step is not a playbook declaration, which is why the runtime's roster function takes
37
+ * these as `additionalConveners` instead of reading them off the catalog.
38
+ */
39
+ export const LOGO_PANEL_ROLE_REFS = [...new Set([...LOGO_REVIEWER_ROLES, LOGO_COORDINATOR_ROLE, LOGO_RUBRIC_DERIVER_ROLE])];
33
40
  /**
34
41
  * Brand-logo DELIBERATION (agentic deliberation system, Step 4) — the
35
42
  * IMAGE adopter that REPLACES the deleted taste-as-code interim
@@ -189,11 +196,6 @@ let LogoDeliberationCompanionService = class LogoDeliberationCompanionService {
189
196
  initialCandidates,
190
197
  roundBudget: options.roundBudget ?? 2,
191
198
  shortlistSize: options.shortlistSize ?? 1,
192
- charterInputsDigests: Object.fromEntries([...new Set([...reviewers, coordinator, rubricDeriver].map((binding) => binding.profile.charterRef))]
193
- .map((charterRef) => [
194
- charterRef,
195
- charters.find((entry) => entry.charterRef === charterRef)?.inputsDigest ?? 'unknown',
196
- ])),
197
199
  };
198
200
  const record = await this.actorsSystemService.executeDeliberation(plan, traceContext);
199
201
  const recordPath = `${DELIBERATIONS_DIR_SEGMENTS.join('/')}/${deliberationRef}/record.json`;
@@ -215,13 +217,12 @@ let LogoDeliberationCompanionService = class LogoDeliberationCompanionService {
215
217
  masterBuffer: winnerBytes,
216
218
  masterComposition: BrandAssetComposition.SYMBOL,
217
219
  generatedAt: new Date().toISOString(),
218
- promptDigest: createHash('sha256').update(briefContext).digest('hex'),
219
220
  storageDir: BRAND_STAGING_DIR_SEGMENTS.join('/'),
220
221
  onDeriveDegraded: (reason) => {
221
222
  warnings.push(`Derived-asset pipeline unavailable — winner staged master-only: ${reason}`);
222
223
  },
223
224
  });
224
- await writeFile(resolve(brandDir, 'manifest.json'), `${JSON.stringify({ promptDigest: createHash('sha256').update(briefContext).digest('hex'), assets: staged.assets }, null, 2)}\n`, 'utf8');
225
+ await writeFile(resolve(brandDir, 'manifest.json'), `${JSON.stringify({ assets: staged.assets }, null, 2)}\n`, 'utf8');
225
226
  this.logDebug('logo deliberation complete', {
226
227
  deliberationRef,
227
228
  status: record.status,
@@ -1 +1 @@
1
- {"version":3,"file":"logo-deliberation.companion.service.js","sourceRoot":"","sources":["../../../../../src/brand/services/logo-deliberation.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EAErB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,SAAS,EACT,gBAAgB,EAChB,uBAAuB,GAMxB,MAAM,uBAAuB,CAAC;AAS/B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,GAEhC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,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AC,CAAA;qCAXQ,aAAa;QAE1C,0BAA0B;QAEnB,0BAA0B,oBAMhB,6BAA6B;QAEtC,4BAA4B;GAhB1D,gCAAgC,CAka5C","sourcesContent":["import { createHash, randomUUID } from 'node:crypto';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport {\n ActorsSystemBackendService,\n ErrorBuilderBackendService,\n LoggerService,\n removeSolidBackground,\n SAAS_SERVICE_TYPES,\n trimTransparentBorder,\n type AgentsBackendService,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n ExpertWorkDomain,\n FlowsActors_IO_PartKind,\n type AgentTraceContext,\n type DeliberationCandidateInput,\n type DeliberationPlan,\n type DeliberationRecord,\n type FlowsActors_Agent_Invocation,\n} from '@wildo-ai/saas-models';\nimport {\n ImageProvider_GenerateImageInputSchema,\n ImageProvider_GenerateImageOutputSchema,\n ImageProvider_OperationContext_BaseSchema,\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n type ImageProvider_GenerateImageOutput,\n} from '@wildo-ai/external-connectors-models';\nimport {\n BrandAssetComposition,\n BrandRenderPromptResponseSchema,\n type BrandAssetConfig,\n} from '@wildo-ai/saas-specifications';\n\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 { DeliberationCompanionService } from '../../deliberations/services/deliberation.companion.service';\nimport { expertAgentRefForRole } from '../../deliberations/models/deliberation-agents.actors-system.definitions';\nimport { LOGO_GENERATION_AGENT_REF } from '../models/logo-generation.actors-system.definitions';\nimport {\n LogoCreativeBriefOutputSchema,\n LogoCreativeBriefOutputStrictSchema,\n LogoRevisedDirectionOutputSchema,\n LogoRevisedDirectionOutputStrictSchema,\n type LogoCreativeDirection,\n} from '../models/logo-creative-brief.schemas';\nimport { stageBrandCandidate } from '../utils/stage-brand-candidate';\n\nexport interface LogoDeliberationOptions {\n /** How many concept directions the art-director authors (default 4). */\n directionCount?: number;\n roundBudget?: number;\n shortlistSize?: number;\n}\n\nexport interface LogoDeliberationResult {\n record: DeliberationRecord;\n /** saasRoot-relative path of the persisted record. */\n recordPath: string;\n /** The art-director's derived creative brief (audit). */\n directions: LogoCreativeDirection[];\n /** The winner, staged as the standard single-candidate manifest for accept-logo. */\n staged: { winnerRef: string; assets: BrandAssetConfig[] };\n warnings: string[];\n}\n\nconst DELIBERATIONS_DIR_SEGMENTS = ['.wildo-saas', 'generated', 'deliberations'] as const;\nconst BRAND_STAGING_DIR_SEGMENTS = ['.wildo-saas', 'generated', 'brand'] as const;\n\n/** The logo deliberation's fixed panel (v1): craft + coherence + strategy lenses. */\nconst LOGO_REVIEWER_ROLES = ['art-director', 'design-system-guardian', 'brand-strategist'] as const;\nconst LOGO_COORDINATOR_ROLE = 'brand-strategist';\nconst LOGO_RUBRIC_DERIVER_ROLE = 'art-director';\n\n/**\n * Brand-logo DELIBERATION (agentic deliberation system, Step 4) — the\n * IMAGE adopter that REPLACES the deleted taste-as-code interim\n * (`LOGO_CONCEPT_LENSES` + the hardcoded selection judge):\n *\n * 1. The BRIEF comes from the DOMAIN OWNER: the art-director expert\n * (charter-built agent, `BRIEF` capability) authors N genuinely\n * distinct concept directions from the assembled brand prompt — art\n * direction is DERIVED per app, never framework vocabulary.\n * 2. One candidate is GENERATED per direction (transparent-first\n * `gpt-image-1.5` via the logo agent) and cleaned + squared\n * (`removeSolidBackground` → `trimTransparentBorder`).\n * 3. The ENGINE deliberation runs the panel: art-director (craft lens) +\n * design-system-guardian (coherence lens) + brand-strategist\n * (strategy lens) review every candidate against the art-director's\n * per-run rubric; the coordinator (brand-strategist) shortlists;\n * REVISION = REGENERATION (RF-4): the producer re-invokes the image\n * agent with the candidate's ROOT DIRECTION + the panel's critique\n * addendum, then cleans + squares the new master.\n * 4. The WINNER is staged as the standard single-candidate brand manifest\n * (`stageBrandCandidate` + `manifest.json`) — the EXISTING\n * `POST /brand/accept-logo` review point promotes it to the SSOT\n * unchanged (human authority preserved).\n *\n * Charter/narrowness composition is delegated to the shared\n * `DeliberationCompanionService` seams (`readCommittedCharters` +\n * `bindExpert`) — reviewers gate on `reviewScopes` (lens reach), the\n * rubric deriver on `workDomains` (ownership).\n */\n@injectable()\nexport class LogoDeliberationCompanionService {\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.ActorsSystemBackendService)\n private readonly actorsSystemService: ActorsSystemBackendService,\n @inject(SAAS_SERVICE_TYPES.AgentsBackendService)\n private readonly agentsService: AgentsBackendService,\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.DeliberationService)\n private readonly deliberationComposer: DeliberationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('LogoDeliberationCompanionService');\n this.logger.setDebugTypeLogging('LogoDeliberationCompanionService', true);\n }\n\n public async run(\n options: LogoDeliberationOptions = {},\n traceContext?: AgentTraceContext,\n ): Promise<LogoDeliberationResult> {\n const warnings: string[] = [];\n const directionCount = options.directionCount ?? 4;\n\n // ── 1. Assemble the brand prompt (shared brand-render-prompt seam) ──\n const basePrompt = await this.assembleBrandPrompt();\n\n // ── 2. Panel composition (shared composer seams; narrowness gated) ──\n const charters = await this.deliberationComposer.readCommittedCharters();\n const charterByRole = new Map(charters.map((charter) => [charter.roleRef, charter]));\n const reviewers = LOGO_REVIEWER_ROLES.map((roleRef) =>\n this.deliberationComposer.bindExpert(roleRef, charterByRole, {\n reviewDomain: ExpertWorkDomain.VISUAL_BRAND_MARK,\n }));\n const coordinator = this.deliberationComposer.bindExpert(LOGO_COORDINATOR_ROLE, charterByRole, {});\n const rubricDeriver = this.deliberationComposer.bindExpert(LOGO_RUBRIC_DERIVER_ROLE, charterByRole, {\n ownDomain: ExpertWorkDomain.VISUAL_BRAND_MARK,\n });\n\n // ── 3. Creative brief from the DOMAIN OWNER (BRIEF capability) ──\n const directions = await this.deriveCreativeBrief(basePrompt, directionCount, traceContext);\n\n const deliberationRef = `delib-visual_brand_mark-${randomUUID().slice(0, 8)}`;\n const deliberationDirAbs = resolve(\n this.companionContext.saasRoot, ...DELIBERATIONS_DIR_SEGMENTS, deliberationRef,\n );\n const candidatesDirAbs = resolve(deliberationDirAbs, 'candidates');\n await mkdir(candidatesDirAbs, { recursive: true });\n const relDir = `${DELIBERATIONS_DIR_SEGMENTS.join('/')}/${deliberationRef}/candidates`;\n\n // ── 4. One candidate per direction (parallel; failures degrade with a warning) ──\n const rootDirectionByRef = new Map<string, LogoCreativeDirection>();\n const generated = await Promise.all(directions.map(async (direction) => {\n try {\n const master = await this.generateCleanMaster(\n this.composeMasterPrompt(\n basePrompt,\n `CONCEPT DIRECTION for this specific mark — ${direction.label}: ${direction.artDirection}`,\n ),\n traceContext,\n );\n const fileName = `${direction.ref}.png`;\n await writeFile(resolve(candidatesDirAbs, fileName), master);\n const candidate: DeliberationCandidateInput = {\n ref: direction.ref,\n storageRef: `${relDir}/${fileName}`,\n content: {\n kind: FlowsActors_IO_PartKind.IMAGE,\n imageDataUri: `data:image/png;base64,${master.toString('base64')}`,\n },\n };\n rootDirectionByRef.set(direction.ref, direction);\n return candidate;\n } catch (error) {\n warnings.push(`Direction '${direction.ref}' failed to generate and was skipped: `\n + describeCaughtError(error));\n return null;\n }\n }));\n const initialCandidates = generated.filter(\n (candidate): candidate is DeliberationCandidateInput => candidate !== null,\n );\n if (initialCandidates.length < 2) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `Logo deliberation needs ≥2 generated candidates to deliberate (got ${initialCandidates.length}). `\n + 'Check the OpenAI IMAGE_PROVIDER configuration.',\n },\n });\n }\n\n // ── 5. IMAGE producer: revision = REGENERATION (RF-4) ──────\n let revisionSequence = 0;\n const producer = {\n produceRevision: async (\n parent: DeliberationCandidateInput,\n revisionPrompt: string,\n ): Promise<DeliberationCandidateInput> => {\n const rootDirection = rootDirectionByRef.get(parent.ref);\n if (!rootDirection) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `No root direction tracked for candidate '${parent.ref}'.` },\n });\n }\n // TRANSLATE, then regenerate: the engine's revisionPrompt is a\n // critique DIFF (\"address every point below\") written for an LLM —\n // image models execute target-state descriptions, not diffs. The\n // art-director (domain owner) rewrites {root direction + critiques}\n // into one self-contained revised direction; the record still carries\n // the raw revisionPrompt as revision provenance.\n const revisedArtDirection = await this.deriveRevisedDirection(\n basePrompt, rootDirection, revisionPrompt, traceContext,\n );\n const master = await this.generateCleanMaster(\n this.composeMasterPrompt(\n basePrompt,\n `CONCEPT DIRECTION for this specific mark — ${rootDirection.label} (revised after panel review): ${revisedArtDirection}`,\n ),\n traceContext,\n );\n revisionSequence += 1;\n const ref = `${parent.ref}-rev${revisionSequence}`;\n const fileName = `${ref}.png`;\n await writeFile(resolve(candidatesDirAbs, fileName), master);\n rootDirectionByRef.set(ref, rootDirection);\n return {\n ref,\n storageRef: `${relDir}/${fileName}`,\n content: {\n kind: FlowsActors_IO_PartKind.IMAGE,\n imageDataUri: `data:image/png;base64,${master.toString('base64')}`,\n },\n };\n },\n };\n\n // ── 6. Engine deliberation ─────────────────────────────────\n const briefContext = [\n basePrompt,\n '',\n '# Creative brief (derived by the art-director)',\n ...directions.map((direction) => `- \\`${direction.ref}\\` — ${direction.label}: ${direction.artDirection}`),\n ].join('\\n');\n const plan: DeliberationPlan = {\n deliberationRef,\n workDomain: ExpertWorkDomain.VISUAL_BRAND_MARK,\n subjectKind: FlowsActors_IO_PartKind.IMAGE,\n briefContext,\n reviewers,\n coordinator,\n rubricDeriver,\n producerAgentRef: LOGO_GENERATION_AGENT_REF,\n producer,\n initialCandidates,\n roundBudget: options.roundBudget ?? 2,\n shortlistSize: options.shortlistSize ?? 1,\n charterInputsDigests: Object.fromEntries(\n [...new Set([...reviewers, coordinator, rubricDeriver].map((binding) => binding.profile.charterRef))]\n .map((charterRef) => [\n charterRef,\n charters.find((entry) => entry.charterRef === charterRef)?.inputsDigest ?? 'unknown',\n ]),\n ),\n };\n const record = await this.actorsSystemService.executeDeliberation(plan, traceContext);\n const recordPath = `${DELIBERATIONS_DIR_SEGMENTS.join('/')}/${deliberationRef}/record.json`;\n await writeFile(resolve(deliberationDirAbs, 'record.json'), `${JSON.stringify(record, null, 2)}\\n`, 'utf8');\n\n // ── 7. Stage the WINNER for the existing accept-logo review point ──\n const winnerRef = record.synthesis?.winnerRef;\n if (!winnerRef) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: 'Deliberation finished without a synthesis winner — nothing to stage.' },\n });\n }\n const winnerFile = resolve(candidatesDirAbs, `${winnerRef}.png`);\n const { readFile } = await import('node:fs/promises');\n const winnerBytes = await readFile(winnerFile);\n const brandDir = resolve(this.companionContext.saasRoot, ...BRAND_STAGING_DIR_SEGMENTS);\n const staged = await stageBrandCandidate({\n brandDir,\n masterBuffer: winnerBytes,\n masterComposition: BrandAssetComposition.SYMBOL,\n generatedAt: new Date().toISOString(),\n promptDigest: createHash('sha256').update(briefContext).digest('hex'),\n storageDir: BRAND_STAGING_DIR_SEGMENTS.join('/'),\n onDeriveDegraded: (reason) => {\n warnings.push(`Derived-asset pipeline unavailable — winner staged master-only: ${reason}`);\n },\n });\n await writeFile(\n resolve(brandDir, 'manifest.json'),\n `${JSON.stringify({ promptDigest: createHash('sha256').update(briefContext).digest('hex'), assets: staged.assets }, null, 2)}\\n`,\n 'utf8',\n );\n\n this.logDebug('logo deliberation complete', {\n deliberationRef,\n status: record.status,\n rounds: record.rounds.length,\n winnerRef,\n directions: directions.length,\n candidates: initialCandidates.length,\n });\n return {\n record,\n recordPath,\n directions,\n staged: { winnerRef, assets: staged.assets },\n warnings,\n };\n }\n\n /** Assemble the brand prompt through the shared `brand-render-prompt` behavior. */\n private async assembleBrandPrompt(): Promise<string> {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'No backend service available to resolve brand-render-prompt.' },\n });\n }\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: backendServiceKey,\n behavior: 'brand-render-prompt',\n input: {},\n });\n if (introspection.success === false) {\n const failure = introspection;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: failure.error.message, behavior: failure.behavior },\n });\n }\n return BrandRenderPromptResponseSchema.parse(introspection.data).prompt;\n }\n\n /**\n * The art-director authors the creative brief (BRIEF capability): N\n * genuinely distinct concept directions, derived from the brand prompt.\n * Direction refs are service-validated (kebab-case, unique) — a bad echo\n * re-asks once, then fails.\n */\n private async deriveCreativeBrief(\n basePrompt: string,\n directionCount: number,\n traceContext?: AgentTraceContext,\n ): Promise<LogoCreativeDirection[]> {\n const refPattern = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;\n let lastError = '';\n for (let attempt = 1; attempt <= 2; attempt += 1) {\n const prompt = [\n basePrompt,\n '',\n '# Your task — author the CREATIVE BRIEF for a logo exploration',\n `Author exactly ${directionCount} genuinely DISTINCT concept directions for this mark — one `\n + 'compositional idea each, studio-voiced, concrete enough for an image model to execute. '\n + 'Each direction: a stable kebab-case `ref`, a short `label`, and the `artDirection` naming '\n + 'the ONE idea, the two-color application (which color leads, where the single accent beat '\n + 'lands), and the craft posture. The directions must explore meaningfully different '\n + 'territories (e.g. negative space vs continuous line vs modular construction vs contained '\n + 'emblem) — no two variations of the same idea.',\n attempt === 2 ? `# PREVIOUS ATTEMPT REJECTED\\n${lastError}\\nCorrect the output.` : '',\n ].filter((part) => part.length > 0).join('\\n');\n\n const invocation: FlowsActors_Agent_Invocation<\n typeof LLMProvider_GenerateStructuredInputSchema,\n typeof LLMProvider_GenerateStructuredOutputSchema\n > = {\n agentRef: expertAgentRefForRole(LOGO_RUBRIC_DERIVER_ROLE),\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: LogoCreativeBriefOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await this.agentsService.invokeAgent(invocation, traceContext);\n const raw = (response.output as { object?: unknown } | undefined)?.object;\n const parsed = LogoCreativeBriefOutputStrictSchema.safeParse(raw);\n if (!parsed.success) {\n lastError = parsed.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ');\n continue;\n }\n const refs = parsed.data.directions.map((direction) => direction.ref);\n if (new Set(refs).size !== refs.length || refs.some((ref) => !refPattern.test(ref))) {\n lastError = `Direction refs must be unique kebab-case (got [${refs.join(', ')}]).`;\n continue;\n }\n return parsed.data.directions;\n }\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `Creative-brief derivation failed validation twice: ${lastError}` },\n });\n }\n\n /**\n * Compose one image-model prompt with a stable section structure: brand\n * prompt → concept direction → MECHANICAL master constraints LAST (image\n * models weight the prompt tail; the flat run-on composition of the first\n * live run buried the base prompt's guardrails under the long direction\n * text and shipped gradients/halos/border boxes).\n *\n * The trailing block is deliberately TRANSPORT-mechanical, not taste: the\n * master feeds `removeSolidBackground` → `trimTransparentBorder`, and\n * glows/soft edges break background removal while an enclosing frame\n * survives the trim and poisons every derived asset. Taste stays derived\n * (the direction text) — this block only protects the derivation pipeline.\n */\n private composeMasterPrompt(basePrompt: string, directionBlock: string): string {\n return [\n basePrompt,\n '',\n directionBlock,\n '',\n 'MASTER OUTPUT REQUIREMENTS (mechanical — this master is post-processed by background '\n + 'removal and border trimming): exactly one isolated mark; fully transparent or solid '\n + 'uniform background only; NO enclosing frame, border box, outline rectangle, or '\n + 'background panel around the mark; flat solid color fills with hard, sharp edges — no '\n + 'gradients, glows, halos, soft shadows, or blur (they break background removal); '\n + 'no text or letters anywhere.',\n ].join('\\n');\n }\n\n /**\n * The art-director translates {root direction + panel critiques} into ONE\n * revised, self-contained direction (target-state prose an image model can\n * execute). Retry-once-then-throw, mirroring `deriveCreativeBrief`.\n */\n private async deriveRevisedDirection(\n basePrompt: string,\n rootDirection: LogoCreativeDirection,\n revisionPrompt: string,\n traceContext?: AgentTraceContext,\n ): Promise<string> {\n let lastError = '';\n for (let attempt = 1; attempt <= 2; attempt += 1) {\n const prompt = [\n basePrompt,\n '',\n `# Root concept direction — ${rootDirection.label}`,\n rootDirection.artDirection,\n '',\n '# Panel review of the previous execution',\n revisionPrompt,\n '',\n '# Your task — rewrite the direction for regeneration',\n 'Author the REVISED `artDirection`: the same ONE concept as the root direction with every '\n + 'panel critique incorporated as a positive, observable property of the mark to CREATE. '\n + 'Self-contained target-state prose for an image model — describe only what the mark IS; '\n + 'never mention the previous attempt, the panel, or what to avoid fixing.',\n attempt === 2 ? `# PREVIOUS ATTEMPT REJECTED\\n${lastError}\\nCorrect the output.` : '',\n ].filter((part) => part.length > 0).join('\\n');\n\n const invocation: FlowsActors_Agent_Invocation<\n typeof LLMProvider_GenerateStructuredInputSchema,\n typeof LLMProvider_GenerateStructuredOutputSchema\n > = {\n agentRef: expertAgentRefForRole(LOGO_RUBRIC_DERIVER_ROLE),\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: LogoRevisedDirectionOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await this.agentsService.invokeAgent(invocation, traceContext);\n const raw = (response.output as { object?: unknown } | undefined)?.object;\n const parsed = LogoRevisedDirectionOutputStrictSchema.safeParse(raw);\n if (!parsed.success) {\n lastError = parsed.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ');\n continue;\n }\n return parsed.data.artDirection;\n }\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `Revised-direction derivation failed validation twice: ${lastError}` },\n });\n }\n\n /** One image generation + the mandatory master cleanup (bg removal → trim/square). */\n private async generateCleanMaster(prompt: string, traceContext?: AgentTraceContext): Promise<Buffer> {\n const invocation: FlowsActors_Agent_Invocation<\n typeof ImageProvider_GenerateImageInputSchema,\n typeof ImageProvider_GenerateImageOutputSchema,\n typeof ImageProvider_OperationContext_BaseSchema\n > = {\n agentRef: LOGO_GENERATION_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt },\n output: { images: [] },\n executionContext: { callTimestamp: new Date().toISOString() },\n artifactBindings: [],\n };\n const result = await this.agentsService.invokeAgent(invocation, traceContext);\n const output = result.output as ImageProvider_GenerateImageOutput;\n const image = output?.images?.[0];\n if (!image || typeof image.base64 !== 'string' || image.base64.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: 'The logo generation agent returned no image.' },\n });\n }\n const cleaned = await removeSolidBackground(Buffer.from(image.base64, 'base64'));\n return trimTransparentBorder(cleaned);\n }\n}\n"]}
1
+ {"version":3,"file":"logo-deliberation.companion.service.js","sourceRoot":"","sources":["../../../../../src/brand/services/logo-deliberation.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB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AAC,CAAA;qCAXQ,aAAa;QAE1C,0BAA0B;QAEnB,0BAA0B,oBAMhB,6BAA6B;QAEtC,4BAA4B;GAhB1D,gCAAgC,CA0Z5C","sourcesContent":["import { createHash, randomUUID } from 'node:crypto';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport {\n ActorsSystemBackendService,\n ErrorBuilderBackendService,\n LoggerService,\n removeSolidBackground,\n SAAS_SERVICE_TYPES,\n trimTransparentBorder,\n type AgentsBackendService,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n ExpertWorkDomain,\n FlowsActors_IO_PartKind,\n type AgentTraceContext,\n type DeliberationCandidateInput,\n type DeliberationPlan,\n type DeliberationRecord,\n type FlowsActors_Agent_Invocation,\n} from '@wildo-ai/saas-models';\nimport {\n ImageProvider_GenerateImageInputSchema,\n ImageProvider_GenerateImageOutputSchema,\n ImageProvider_OperationContext_BaseSchema,\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n type ImageProvider_GenerateImageOutput,\n} from '@wildo-ai/external-connectors-models';\nimport {\n BrandAssetComposition,\n BrandRenderPromptResponseSchema,\n type BrandAssetConfig,\n} from '@wildo-ai/saas-specifications';\n\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 { DeliberationCompanionService } from '../../deliberations/services/deliberation.companion.service';\nimport { expertAgentRefForRole } from '../../deliberations/models/deliberation-agents.actors-system.definitions';\nimport { LOGO_GENERATION_AGENT_REF } from '../models/logo-generation.actors-system.definitions';\nimport {\n LogoCreativeBriefOutputSchema,\n LogoCreativeBriefOutputStrictSchema,\n LogoRevisedDirectionOutputSchema,\n LogoRevisedDirectionOutputStrictSchema,\n type LogoCreativeDirection,\n} from '../models/logo-creative-brief.schemas';\nimport { stageBrandCandidate } from '../utils/stage-brand-candidate';\n\nexport interface LogoDeliberationOptions {\n /** How many concept directions the art-director authors (default 4). */\n directionCount?: number;\n roundBudget?: number;\n shortlistSize?: number;\n}\n\nexport interface LogoDeliberationResult {\n record: DeliberationRecord;\n /** saasRoot-relative path of the persisted record. */\n recordPath: string;\n /** The art-director's derived creative brief (audit). */\n directions: LogoCreativeDirection[];\n /** The winner, staged as the standard single-candidate manifest for accept-logo. */\n staged: { winnerRef: string; assets: BrandAssetConfig[] };\n warnings: string[];\n}\n\nconst DELIBERATIONS_DIR_SEGMENTS = ['.wildo-saas', 'generated', 'deliberations'] as const;\nconst BRAND_STAGING_DIR_SEGMENTS = ['.wildo-saas', 'generated', 'brand'] as const;\n\n/** The logo deliberation's fixed panel (v1): craft + coherence + strategy lenses. */\nconst LOGO_REVIEWER_ROLES = ['art-director', 'design-system-guardian', 'brand-strategist'] as const;\nconst LOGO_COORDINATOR_ROLE = 'brand-strategist';\nconst LOGO_RUBRIC_DERIVER_ROLE = 'art-director';\n/**\n * Every role the logo step SEATS, for the roster `top_down.expert-personas` staffs (#572). Derived from\n * the three constants above rather than re-listed, so a seat added to the panel is staffed by existing.\n * A generation step is not a playbook declaration, which is why the runtime's roster function takes\n * these as `additionalConveners` instead of reading them off the catalog.\n */\nexport const LOGO_PANEL_ROLE_REFS: readonly string[] = [...new Set([...LOGO_REVIEWER_ROLES, LOGO_COORDINATOR_ROLE, LOGO_RUBRIC_DERIVER_ROLE])];\n\n/**\n * Brand-logo DELIBERATION (agentic deliberation system, Step 4) — the\n * IMAGE adopter that REPLACES the deleted taste-as-code interim\n * (`LOGO_CONCEPT_LENSES` + the hardcoded selection judge):\n *\n * 1. The BRIEF comes from the DOMAIN OWNER: the art-director expert\n * (charter-built agent, `BRIEF` capability) authors N genuinely\n * distinct concept directions from the assembled brand prompt — art\n * direction is DERIVED per app, never framework vocabulary.\n * 2. One candidate is GENERATED per direction (transparent-first\n * `gpt-image-1.5` via the logo agent) and cleaned + squared\n * (`removeSolidBackground` → `trimTransparentBorder`).\n * 3. The ENGINE deliberation runs the panel: art-director (craft lens) +\n * design-system-guardian (coherence lens) + brand-strategist\n * (strategy lens) review every candidate against the art-director's\n * per-run rubric; the coordinator (brand-strategist) shortlists;\n * REVISION = REGENERATION (RF-4): the producer re-invokes the image\n * agent with the candidate's ROOT DIRECTION + the panel's critique\n * addendum, then cleans + squares the new master.\n * 4. The WINNER is staged as the standard single-candidate brand manifest\n * (`stageBrandCandidate` + `manifest.json`) — the EXISTING\n * `POST /brand/accept-logo` review point promotes it to the SSOT\n * unchanged (human authority preserved).\n *\n * Charter/narrowness composition is delegated to the shared\n * `DeliberationCompanionService` seams (`readCommittedCharters` +\n * `bindExpert`) — reviewers gate on `reviewScopes` (lens reach), the\n * rubric deriver on `workDomains` (ownership).\n */\n@injectable()\nexport class LogoDeliberationCompanionService {\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.ActorsSystemBackendService)\n private readonly actorsSystemService: ActorsSystemBackendService,\n @inject(SAAS_SERVICE_TYPES.AgentsBackendService)\n private readonly agentsService: AgentsBackendService,\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.DeliberationService)\n private readonly deliberationComposer: DeliberationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('LogoDeliberationCompanionService');\n this.logger.setDebugTypeLogging('LogoDeliberationCompanionService', true);\n }\n\n public async run(\n options: LogoDeliberationOptions = {},\n traceContext?: AgentTraceContext,\n ): Promise<LogoDeliberationResult> {\n const warnings: string[] = [];\n const directionCount = options.directionCount ?? 4;\n\n // ── 1. Assemble the brand prompt (shared brand-render-prompt seam) ──\n const basePrompt = await this.assembleBrandPrompt();\n\n // ── 2. Panel composition (shared composer seams; narrowness gated) ──\n const charters = await this.deliberationComposer.readCommittedCharters();\n const charterByRole = new Map(charters.map((charter) => [charter.roleRef, charter]));\n const reviewers = LOGO_REVIEWER_ROLES.map((roleRef) =>\n this.deliberationComposer.bindExpert(roleRef, charterByRole, {\n reviewDomain: ExpertWorkDomain.VISUAL_BRAND_MARK,\n }));\n const coordinator = this.deliberationComposer.bindExpert(LOGO_COORDINATOR_ROLE, charterByRole, {});\n const rubricDeriver = this.deliberationComposer.bindExpert(LOGO_RUBRIC_DERIVER_ROLE, charterByRole, {\n ownDomain: ExpertWorkDomain.VISUAL_BRAND_MARK,\n });\n\n // ── 3. Creative brief from the DOMAIN OWNER (BRIEF capability) ──\n const directions = await this.deriveCreativeBrief(basePrompt, directionCount, traceContext);\n\n const deliberationRef = `delib-visual_brand_mark-${randomUUID().slice(0, 8)}`;\n const deliberationDirAbs = resolve(\n this.companionContext.saasRoot, ...DELIBERATIONS_DIR_SEGMENTS, deliberationRef,\n );\n const candidatesDirAbs = resolve(deliberationDirAbs, 'candidates');\n await mkdir(candidatesDirAbs, { recursive: true });\n const relDir = `${DELIBERATIONS_DIR_SEGMENTS.join('/')}/${deliberationRef}/candidates`;\n\n // ── 4. One candidate per direction (parallel; failures degrade with a warning) ──\n const rootDirectionByRef = new Map<string, LogoCreativeDirection>();\n const generated = await Promise.all(directions.map(async (direction) => {\n try {\n const master = await this.generateCleanMaster(\n this.composeMasterPrompt(\n basePrompt,\n `CONCEPT DIRECTION for this specific mark — ${direction.label}: ${direction.artDirection}`,\n ),\n traceContext,\n );\n const fileName = `${direction.ref}.png`;\n await writeFile(resolve(candidatesDirAbs, fileName), master);\n const candidate: DeliberationCandidateInput = {\n ref: direction.ref,\n storageRef: `${relDir}/${fileName}`,\n content: {\n kind: FlowsActors_IO_PartKind.IMAGE,\n imageDataUri: `data:image/png;base64,${master.toString('base64')}`,\n },\n };\n rootDirectionByRef.set(direction.ref, direction);\n return candidate;\n } catch (error) {\n warnings.push(`Direction '${direction.ref}' failed to generate and was skipped: `\n + describeCaughtError(error));\n return null;\n }\n }));\n const initialCandidates = generated.filter(\n (candidate): candidate is DeliberationCandidateInput => candidate !== null,\n );\n if (initialCandidates.length < 2) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `Logo deliberation needs ≥2 generated candidates to deliberate (got ${initialCandidates.length}). `\n + 'Check the OpenAI IMAGE_PROVIDER configuration.',\n },\n });\n }\n\n // ── 5. IMAGE producer: revision = REGENERATION (RF-4) ──────\n let revisionSequence = 0;\n const producer = {\n produceRevision: async (\n parent: DeliberationCandidateInput,\n revisionPrompt: string,\n ): Promise<DeliberationCandidateInput> => {\n const rootDirection = rootDirectionByRef.get(parent.ref);\n if (!rootDirection) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `No root direction tracked for candidate '${parent.ref}'.` },\n });\n }\n // TRANSLATE, then regenerate: the engine's revisionPrompt is a\n // critique DIFF (\"address every point below\") written for an LLM —\n // image models execute target-state descriptions, not diffs. The\n // art-director (domain owner) rewrites {root direction + critiques}\n // into one self-contained revised direction; the record still carries\n // the raw revisionPrompt as revision provenance.\n const revisedArtDirection = await this.deriveRevisedDirection(\n basePrompt, rootDirection, revisionPrompt, traceContext,\n );\n const master = await this.generateCleanMaster(\n this.composeMasterPrompt(\n basePrompt,\n `CONCEPT DIRECTION for this specific mark — ${rootDirection.label} (revised after panel review): ${revisedArtDirection}`,\n ),\n traceContext,\n );\n revisionSequence += 1;\n const ref = `${parent.ref}-rev${revisionSequence}`;\n const fileName = `${ref}.png`;\n await writeFile(resolve(candidatesDirAbs, fileName), master);\n rootDirectionByRef.set(ref, rootDirection);\n return {\n ref,\n storageRef: `${relDir}/${fileName}`,\n content: {\n kind: FlowsActors_IO_PartKind.IMAGE,\n imageDataUri: `data:image/png;base64,${master.toString('base64')}`,\n },\n };\n },\n };\n\n // ── 6. Engine deliberation ─────────────────────────────────\n const briefContext = [\n basePrompt,\n '',\n '# Creative brief (derived by the art-director)',\n ...directions.map((direction) => `- \\`${direction.ref}\\` — ${direction.label}: ${direction.artDirection}`),\n ].join('\\n');\n const plan: DeliberationPlan = {\n deliberationRef,\n workDomain: ExpertWorkDomain.VISUAL_BRAND_MARK,\n subjectKind: FlowsActors_IO_PartKind.IMAGE,\n briefContext,\n reviewers,\n coordinator,\n rubricDeriver,\n producerAgentRef: LOGO_GENERATION_AGENT_REF,\n producer,\n initialCandidates,\n roundBudget: options.roundBudget ?? 2,\n shortlistSize: options.shortlistSize ?? 1,\n };\n const record = await this.actorsSystemService.executeDeliberation(plan, traceContext);\n const recordPath = `${DELIBERATIONS_DIR_SEGMENTS.join('/')}/${deliberationRef}/record.json`;\n await writeFile(resolve(deliberationDirAbs, 'record.json'), `${JSON.stringify(record, null, 2)}\\n`, 'utf8');\n\n // ── 7. Stage the WINNER for the existing accept-logo review point ──\n const winnerRef = record.synthesis?.winnerRef;\n if (!winnerRef) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: 'Deliberation finished without a synthesis winner — nothing to stage.' },\n });\n }\n const winnerFile = resolve(candidatesDirAbs, `${winnerRef}.png`);\n const { readFile } = await import('node:fs/promises');\n const winnerBytes = await readFile(winnerFile);\n const brandDir = resolve(this.companionContext.saasRoot, ...BRAND_STAGING_DIR_SEGMENTS);\n const staged = await stageBrandCandidate({\n brandDir,\n masterBuffer: winnerBytes,\n masterComposition: BrandAssetComposition.SYMBOL,\n generatedAt: new Date().toISOString(),\n storageDir: BRAND_STAGING_DIR_SEGMENTS.join('/'),\n onDeriveDegraded: (reason) => {\n warnings.push(`Derived-asset pipeline unavailable — winner staged master-only: ${reason}`);\n },\n });\n await writeFile(\n resolve(brandDir, 'manifest.json'),\n `${JSON.stringify({ assets: staged.assets }, null, 2)}\\n`,\n 'utf8',\n );\n\n this.logDebug('logo deliberation complete', {\n deliberationRef,\n status: record.status,\n rounds: record.rounds.length,\n winnerRef,\n directions: directions.length,\n candidates: initialCandidates.length,\n });\n return {\n record,\n recordPath,\n directions,\n staged: { winnerRef, assets: staged.assets },\n warnings,\n };\n }\n\n /** Assemble the brand prompt through the shared `brand-render-prompt` behavior. */\n private async assembleBrandPrompt(): Promise<string> {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'No backend service available to resolve brand-render-prompt.' },\n });\n }\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: backendServiceKey,\n behavior: 'brand-render-prompt',\n input: {},\n });\n if (introspection.success === false) {\n const failure = introspection;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: failure.error.message, behavior: failure.behavior },\n });\n }\n return BrandRenderPromptResponseSchema.parse(introspection.data).prompt;\n }\n\n /**\n * The art-director authors the creative brief (BRIEF capability): N\n * genuinely distinct concept directions, derived from the brand prompt.\n * Direction refs are service-validated (kebab-case, unique) — a bad echo\n * re-asks once, then fails.\n */\n private async deriveCreativeBrief(\n basePrompt: string,\n directionCount: number,\n traceContext?: AgentTraceContext,\n ): Promise<LogoCreativeDirection[]> {\n const refPattern = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;\n let lastError = '';\n for (let attempt = 1; attempt <= 2; attempt += 1) {\n const prompt = [\n basePrompt,\n '',\n '# Your task — author the CREATIVE BRIEF for a logo exploration',\n `Author exactly ${directionCount} genuinely DISTINCT concept directions for this mark — one `\n + 'compositional idea each, studio-voiced, concrete enough for an image model to execute. '\n + 'Each direction: a stable kebab-case `ref`, a short `label`, and the `artDirection` naming '\n + 'the ONE idea, the two-color application (which color leads, where the single accent beat '\n + 'lands), and the craft posture. The directions must explore meaningfully different '\n + 'territories (e.g. negative space vs continuous line vs modular construction vs contained '\n + 'emblem) — no two variations of the same idea.',\n attempt === 2 ? `# PREVIOUS ATTEMPT REJECTED\\n${lastError}\\nCorrect the output.` : '',\n ].filter((part) => part.length > 0).join('\\n');\n\n const invocation: FlowsActors_Agent_Invocation<\n typeof LLMProvider_GenerateStructuredInputSchema,\n typeof LLMProvider_GenerateStructuredOutputSchema\n > = {\n agentRef: expertAgentRefForRole(LOGO_RUBRIC_DERIVER_ROLE),\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: LogoCreativeBriefOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await this.agentsService.invokeAgent(invocation, traceContext);\n const raw = (response.output as { object?: unknown } | undefined)?.object;\n const parsed = LogoCreativeBriefOutputStrictSchema.safeParse(raw);\n if (!parsed.success) {\n lastError = parsed.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ');\n continue;\n }\n const refs = parsed.data.directions.map((direction) => direction.ref);\n if (new Set(refs).size !== refs.length || refs.some((ref) => !refPattern.test(ref))) {\n lastError = `Direction refs must be unique kebab-case (got [${refs.join(', ')}]).`;\n continue;\n }\n return parsed.data.directions;\n }\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `Creative-brief derivation failed validation twice: ${lastError}` },\n });\n }\n\n /**\n * Compose one image-model prompt with a stable section structure: brand\n * prompt → concept direction → MECHANICAL master constraints LAST (image\n * models weight the prompt tail; the flat run-on composition of the first\n * live run buried the base prompt's guardrails under the long direction\n * text and shipped gradients/halos/border boxes).\n *\n * The trailing block is deliberately TRANSPORT-mechanical, not taste: the\n * master feeds `removeSolidBackground` → `trimTransparentBorder`, and\n * glows/soft edges break background removal while an enclosing frame\n * survives the trim and poisons every derived asset. Taste stays derived\n * (the direction text) — this block only protects the derivation pipeline.\n */\n private composeMasterPrompt(basePrompt: string, directionBlock: string): string {\n return [\n basePrompt,\n '',\n directionBlock,\n '',\n 'MASTER OUTPUT REQUIREMENTS (mechanical — this master is post-processed by background '\n + 'removal and border trimming): exactly one isolated mark; fully transparent or solid '\n + 'uniform background only; NO enclosing frame, border box, outline rectangle, or '\n + 'background panel around the mark; flat solid color fills with hard, sharp edges — no '\n + 'gradients, glows, halos, soft shadows, or blur (they break background removal); '\n + 'no text or letters anywhere.',\n ].join('\\n');\n }\n\n /**\n * The art-director translates {root direction + panel critiques} into ONE\n * revised, self-contained direction (target-state prose an image model can\n * execute). Retry-once-then-throw, mirroring `deriveCreativeBrief`.\n */\n private async deriveRevisedDirection(\n basePrompt: string,\n rootDirection: LogoCreativeDirection,\n revisionPrompt: string,\n traceContext?: AgentTraceContext,\n ): Promise<string> {\n let lastError = '';\n for (let attempt = 1; attempt <= 2; attempt += 1) {\n const prompt = [\n basePrompt,\n '',\n `# Root concept direction — ${rootDirection.label}`,\n rootDirection.artDirection,\n '',\n '# Panel review of the previous execution',\n revisionPrompt,\n '',\n '# Your task — rewrite the direction for regeneration',\n 'Author the REVISED `artDirection`: the same ONE concept as the root direction with every '\n + 'panel critique incorporated as a positive, observable property of the mark to CREATE. '\n + 'Self-contained target-state prose for an image model — describe only what the mark IS; '\n + 'never mention the previous attempt, the panel, or what to avoid fixing.',\n attempt === 2 ? `# PREVIOUS ATTEMPT REJECTED\\n${lastError}\\nCorrect the output.` : '',\n ].filter((part) => part.length > 0).join('\\n');\n\n const invocation: FlowsActors_Agent_Invocation<\n typeof LLMProvider_GenerateStructuredInputSchema,\n typeof LLMProvider_GenerateStructuredOutputSchema\n > = {\n agentRef: expertAgentRefForRole(LOGO_RUBRIC_DERIVER_ROLE),\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: LogoRevisedDirectionOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await this.agentsService.invokeAgent(invocation, traceContext);\n const raw = (response.output as { object?: unknown } | undefined)?.object;\n const parsed = LogoRevisedDirectionOutputStrictSchema.safeParse(raw);\n if (!parsed.success) {\n lastError = parsed.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ');\n continue;\n }\n return parsed.data.artDirection;\n }\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `Revised-direction derivation failed validation twice: ${lastError}` },\n });\n }\n\n /** One image generation + the mandatory master cleanup (bg removal → trim/square). */\n private async generateCleanMaster(prompt: string, traceContext?: AgentTraceContext): Promise<Buffer> {\n const invocation: FlowsActors_Agent_Invocation<\n typeof ImageProvider_GenerateImageInputSchema,\n typeof ImageProvider_GenerateImageOutputSchema,\n typeof ImageProvider_OperationContext_BaseSchema\n > = {\n agentRef: LOGO_GENERATION_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt },\n output: { images: [] },\n executionContext: { callTimestamp: new Date().toISOString() },\n artifactBindings: [],\n };\n const result = await this.agentsService.invokeAgent(invocation, traceContext);\n const output = result.output as ImageProvider_GenerateImageOutput;\n const image = output?.images?.[0];\n if (!image || typeof image.base64 !== 'string' || image.base64.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: 'The logo generation agent returned no image.' },\n });\n }\n const cleaned = await removeSolidBackground(Buffer.from(image.base64, 'base64'));\n return trimTransparentBorder(cleaned);\n }\n}\n"]}
@@ -24,7 +24,10 @@ export interface LogoGenerationOptions {
24
24
  * `BrandSnapshot.resolvedAssets`, which the authored snapshot leaves empty).
25
25
  * A prompt digest gives a freshness skip: an unchanged brief with the master
26
26
  * still on disk short-circuits the (paid) image call. Derived assets (favicon /
27
- * OG / mono / dark-light) land once the derived-asset pipeline ships.
27
+ * OG / mono / dark-light) are staged too: `stageBrandCandidate` cleans and squares
28
+ * the master and then derives the full variant set from it. If the derive step is
29
+ * unavailable the run degrades to master-only and says so through
30
+ * `onDeriveDegraded`, rather than failing.
28
31
  */
29
32
  export declare class LogoGenerationCompanionService {
30
33
  private readonly logger;
@@ -36,8 +39,8 @@ export declare class LogoGenerationCompanionService {
36
39
  constructor(logger: LoggerService, errorBuilder: ErrorBuilderBackendService, agentsService: AgentsBackendService, companionContext: CompanionContext, companionIntrospectionService: CompanionIntrospectionService);
37
40
  generate(options?: LogoGenerationOptions, traceContext?: AgentTraceContext): Promise<LogoGenerationResponse>;
38
41
  /**
39
- * Returns the persisted manifest iff its digest matches AND every referenced
40
- * file is still on disk — a hand-deleted file forces regeneration.
42
+ * Returns the persisted manifest iff it was generated from exactly this brief AND every
43
+ * referenced file is still on disk — a changed brief or a hand-deleted file forces regeneration.
41
44
  */
42
45
  private readManifestIfFresh;
43
46
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"logo-generation.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/brand/services/logo-generation.companion.service.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,aAAa,EAIb,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAU5H,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,8BAA8B;IAIJ,OAAO,CAAC,QAAQ,CAAC,MAAM;IAE1D,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAEjC,OAAO,CAAC,QAAQ,CAAC,6BAA6B;IAXhD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+D;gBAGlC,MAAM,EAAE,aAAa,EAExD,YAAY,EAAE,0BAA0B,EAExC,aAAa,EAAE,oBAAoB,EAEnC,gBAAgB,EAAE,gBAAgB,EAElC,6BAA6B,EAAE,6BAA6B;IAMlE,QAAQ,CACnB,OAAO,GAAE,qBAA0B,EACnC,YAAY,CAAC,EAAE,iBAAiB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;IAsHlC;;;OAGG;YACW,mBAAmB;IAkBjC;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;CAcnC"}
1
+ {"version":3,"file":"logo-generation.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/brand/services/logo-generation.companion.service.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,0BAA0B,EAC1B,aAAa,EAIb,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAgB5H,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBACa,8BAA8B;IAIJ,OAAO,CAAC,QAAQ,CAAC,MAAM;IAE1D,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAEjC,OAAO,CAAC,QAAQ,CAAC,6BAA6B;IAXhD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+D;gBAGlC,MAAM,EAAE,aAAa,EAExD,YAAY,EAAE,0BAA0B,EAExC,aAAa,EAAE,oBAAoB,EAEnC,gBAAgB,EAAE,gBAAgB,EAElC,6BAA6B,EAAE,6BAA6B;IAMlE,QAAQ,CACnB,OAAO,GAAE,qBAA0B,EACnC,YAAY,CAAC,EAAE,iBAAiB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;IAkHlC;;;OAGG;YACW,mBAAmB;IAkBjC;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;CAcnC"}
@@ -10,7 +10,6 @@ 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 { readFile, writeFile } from 'node:fs/promises';
15
14
  import { resolve } from 'node:path';
16
15
  import { inject, injectable } from 'inversify';
@@ -38,7 +37,10 @@ import { stageBrandCandidate } from '../utils/stage-brand-candidate.js';
38
37
  * `BrandSnapshot.resolvedAssets`, which the authored snapshot leaves empty).
39
38
  * A prompt digest gives a freshness skip: an unchanged brief with the master
40
39
  * still on disk short-circuits the (paid) image call. Derived assets (favicon /
41
- * OG / mono / dark-light) land once the derived-asset pipeline ships.
40
+ * OG / mono / dark-light) are staged too: `stageBrandCandidate` cleans and squares
41
+ * the master and then derives the full variant set from it. If the derive step is
42
+ * unavailable the run degrades to master-only and says so through
43
+ * `onDeriveDegraded`, rather than failing.
42
44
  */
43
45
  let LogoGenerationCompanionService = class LogoGenerationCompanionService {
44
46
  logger;
@@ -93,12 +95,11 @@ let LogoGenerationCompanionService = class LogoGenerationCompanionService {
93
95
  warnings: render.trace.warnings,
94
96
  });
95
97
  const brandDir = resolve(this.companionContext.saasRoot, '.wildo-saas', 'generated', 'brand');
96
- const promptDigest = createHash('sha256').update(render.prompt).digest('hex');
97
98
  // ── 2. Freshness skip ──────────────────────────────────────
98
99
  if (!options.forceRegenerate) {
99
- const cached = await this.readManifestIfFresh(brandDir, promptDigest);
100
+ const cached = await this.readManifestIfFresh(brandDir, render.prompt);
100
101
  if (cached) {
101
- this.logDebug('logo up to date — skipping generation', { promptDigest });
102
+ this.logDebug('logo up to date — brief unchanged since the staged generation, skipping');
102
103
  return { prompt: render.prompt, agentRef: LOGO_GENERATION_AGENT_REF, generatedAssets: cached.assets, trace: render.trace };
103
104
  }
104
105
  }
@@ -141,26 +142,24 @@ let LogoGenerationCompanionService = class LogoGenerationCompanionService {
141
142
  masterBuffer,
142
143
  masterComposition: composition,
143
144
  generatedAt,
144
- promptDigest,
145
145
  storageDir: '.wildo-saas/generated/brand',
146
146
  onDeriveDegraded: (reason) => this.logDebug('[logo-generation] derived-asset pipeline unavailable — shipping master only', { reason }),
147
147
  });
148
148
  const assets = staged.assets;
149
- const manifest = { promptDigest, assets };
149
+ const manifest = { prompt: render.prompt, assets };
150
150
  await writeFile(resolve(brandDir, 'manifest.json'), `${JSON.stringify(manifest, null, 2)}\n`, 'utf8');
151
151
  this.logDebug('logo generated + persisted', {
152
152
  fileName: staged.masterFileName,
153
153
  composition,
154
- promptDigest,
155
154
  assetCount: assets.length,
156
155
  });
157
156
  return { prompt: render.prompt, agentRef: LOGO_GENERATION_AGENT_REF, generatedAssets: assets, trace: render.trace };
158
157
  }
159
158
  /**
160
- * Returns the persisted manifest iff its digest matches AND every referenced
161
- * file is still on disk — a hand-deleted file forces regeneration.
159
+ * Returns the persisted manifest iff it was generated from exactly this brief AND every
160
+ * referenced file is still on disk — a changed brief or a hand-deleted file forces regeneration.
162
161
  */
163
- async readManifestIfFresh(brandDir, promptDigest) {
162
+ async readManifestIfFresh(brandDir, prompt) {
164
163
  let manifest;
165
164
  try {
166
165
  manifest = JSON.parse(await readFile(resolve(brandDir, 'manifest.json'), 'utf8'));
@@ -168,7 +167,7 @@ let LogoGenerationCompanionService = class LogoGenerationCompanionService {
168
167
  catch {
169
168
  return undefined;
170
169
  }
171
- if (manifest.promptDigest !== promptDigest)
170
+ if (manifest.prompt !== prompt)
172
171
  return undefined;
173
172
  for (const asset of manifest.assets) {
174
173
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"logo-generation.companion.service.js","sourceRoot":"","sources":["../../../../../src/brand/services/logo-generation.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EAErB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,SAAS,GAGV,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,GAGhC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAC5H,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAarE;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAIa;IAEnC;IAEA;IAEA;IAEA;IAXF,QAAQ,CAA+D;IAExF,YACsD,MAAqB,EAExD,YAAwC,EAExC,aAAmC,EAEnC,gBAAkC,EAElC,6BAA4D;QARzB,WAAM,GAAN,MAAM,C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oB,CAAC,CAAA;qCAPO,aAAa;QAE1C,0BAA0B,oBAMT,6BAA6B;GAZpE,8BAA8B,CAoL1C;;AAED;;;;;GAKG;AACH,SAAS,sBAAsB,CAAC,SAAwB;IACtD,OAAO,qBAAqB,CAAC,MAAM,CAAC;AACtC,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport {\n ErrorBuilderBackendService,\n LoggerService,\n removeSolidBackground,\n SAAS_SERVICE_TYPES,\n trimTransparentBorder,\n type AgentsBackendService,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n type AgentTraceContext,\n type FlowsActors_Agent_Invocation,\n} from '@wildo-ai/saas-models';\nimport {\n ImageProvider_GenerateImageInputSchema,\n ImageProvider_GenerateImageOutputSchema,\n ImageProvider_OperationContext_BaseSchema,\n type ImageProvider_GenerateImageOutput,\n} from '@wildo-ai/external-connectors-models';\nimport {\n BrandAssetComposition,\n BrandRenderPromptResponseSchema,\n type BrandAssetConfig,\n type LogoGenerationResponse,\n} from '@wildo-ai/saas-specifications';\n\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 { LOGO_GENERATION_AGENT_REF } from '../models/logo-generation.actors-system.definitions';\nimport { stageBrandCandidate } from '../utils/stage-brand-candidate';\n\n/** A companion-owned generated brand-asset manifest entry + its on-disk file. */\ninterface GeneratedAssetManifest {\n promptDigest: string;\n assets: BrandAssetConfig[];\n}\n\nexport interface LogoGenerationOptions {\n /** Regenerate even when the prompt digest is unchanged and the file exists. */\n forceRegenerate?: boolean;\n}\n\n/**\n * Logo generation companion service — the parent-process orchestrator of the\n * brand/logo step (mirror of `MarketGenerationCompanionService`).\n *\n * Two boundaries:\n * 1. **Subprocess** (`brand-render-prompt`) — assembles the text-to-image\n * prompt from the authored `BrandSnapshot` (+ optional market voice).\n * 2. **Parent** (`AgentsBackendService.invokeAgent`) — feeds the prompt to the\n * IMAGE-modality `brand.logo.generation.agent`, which the engine routes to\n * the `IMAGE_PROVIDER` transport (`experimental_generateImage`).\n *\n * The generated master is persisted under\n * `<saasRoot>/.wildo-saas/generated/brand/` alongside a `manifest.json`\n * carrying the `BrandAssetConfig` records (the runtime-consumable projection of\n * `BrandSnapshot.resolvedAssets`, which the authored snapshot leaves empty).\n * A prompt digest gives a freshness skip: an unchanged brief with the master\n * still on disk short-circuits the (paid) image call. Derived assets (favicon /\n * OG / mono / dark-light) land once the derived-asset pipeline ships.\n */\n@injectable()\nexport class LogoGenerationCompanionService {\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.AgentsBackendService)\n private readonly agentsService: AgentsBackendService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService)\n private readonly companionIntrospectionService: CompanionIntrospectionService,\n ) {\n this.logDebug = this.logger.debugByType('LogoGenerationCompanionService');\n this.logger.setDebugTypeLogging('LogoGenerationCompanionService', true);\n }\n\n public async generate(\n options: LogoGenerationOptions = {},\n traceContext?: AgentTraceContext,\n ): Promise<LogoGenerationResponse> {\n // ── 1. Subprocess prompt assembly ──────────────────────────\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickBrandCarrierServiceKey(),\n behavior: 'brand-render-prompt',\n 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 let render;\n try {\n render = BrandRenderPromptResponseSchema.parse(introspection.data);\n } catch (error) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `brand-render-prompt subprocess returned an unexpected payload shape: ${describeCaughtError(error)}`,\n },\n });\n }\n\n this.logDebug('brand prompt assembled', {\n brandName: render.trace.brandName,\n markType: render.trace.markType,\n warnings: render.trace.warnings,\n });\n\n const brandDir = resolve(this.companionContext.saasRoot, '.wildo-saas', 'generated', 'brand');\n const promptDigest = createHash('sha256').update(render.prompt).digest('hex');\n\n // ── 2. Freshness skip ──────────────────────────────────────\n if (!options.forceRegenerate) {\n const cached = await this.readManifestIfFresh(brandDir, promptDigest);\n if (cached) {\n this.logDebug('logo up to date — skipping generation', { promptDigest });\n return { prompt: render.prompt, agentRef: LOGO_GENERATION_AGENT_REF, generatedAssets: cached.assets, trace: render.trace };\n }\n }\n\n // ── 3. Parent-process image call ───────────────────────────\n const invocation: FlowsActors_Agent_Invocation<\n typeof ImageProvider_GenerateImageInputSchema,\n typeof ImageProvider_GenerateImageOutputSchema,\n typeof ImageProvider_OperationContext_BaseSchema\n > = {\n agentRef: LOGO_GENERATION_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt: render.prompt },\n output: { images: [] },\n executionContext: { callTimestamp: new Date().toISOString() },\n artifactBindings: [],\n };\n\n const result = await this.agentsService.invokeAgent(invocation, traceContext);\n const output = result.output as ImageProvider_GenerateImageOutput;\n const masterImage = output?.images?.[0];\n if (!masterImage || typeof masterImage.base64 !== 'string' || masterImage.base64.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: 'Logo generation agent returned no image. Check the OpenAI IMAGE_PROVIDER configuration and prompt validity.' },\n });\n }\n\n // ── 4. Clean + square the master, then stage (master + derived + manifest) ──\n const generatedAt = new Date().toISOString();\n const composition = compositionForMarkType(render.trace.markType);\n // Master cleanup, in order:\n // 1. removeSolidBackground — text-to-image models bake a solid/near-solid\n // background even when transparency is requested; flood-fill it away so\n // the mark is integrable on any surface (no white/colored tile).\n // 2. trimTransparentBorder — trims the now-transparent border so the mark\n // FILLS the frame (models float a small mark in the middle → microscopic\n // favicons), then re-squares the canvas (a square master is mandatory for\n // all downstream icon handling). Trim once; store AND derive from it.\n const cleaned = await removeSolidBackground(Buffer.from(masterImage.base64, 'base64'));\n const masterBuffer = await trimTransparentBorder(cleaned);\n\n // Stage master + full derived asset set via the shared helper (the SAME\n // layout the batch generator stages its winner with — one authored place).\n const staged = await stageBrandCandidate({\n brandDir,\n masterBuffer,\n masterComposition: composition,\n generatedAt,\n promptDigest,\n storageDir: '.wildo-saas/generated/brand',\n onDeriveDegraded: (reason) => this.logDebug(\n '[logo-generation] derived-asset pipeline unavailable — shipping master only',\n { reason },\n ),\n });\n const assets = staged.assets;\n\n const manifest: GeneratedAssetManifest = { promptDigest, assets };\n await writeFile(resolve(brandDir, 'manifest.json'), `${JSON.stringify(manifest, null, 2)}\\n`, 'utf8');\n\n this.logDebug('logo generated + persisted', {\n fileName: staged.masterFileName,\n composition,\n promptDigest,\n assetCount: assets.length,\n });\n return { prompt: render.prompt, agentRef: LOGO_GENERATION_AGENT_REF, generatedAssets: assets, trace: render.trace };\n }\n\n /**\n * Returns the persisted manifest iff its digest matches AND every referenced\n * file is still on disk — a hand-deleted file forces regeneration.\n */\n private async readManifestIfFresh(brandDir: string, promptDigest: string): Promise<GeneratedAssetManifest | undefined> {\n let manifest: GeneratedAssetManifest;\n try {\n manifest = JSON.parse(await readFile(resolve(brandDir, 'manifest.json'), 'utf8')) as GeneratedAssetManifest;\n } catch {\n return undefined;\n }\n if (manifest.promptDigest !== promptDigest) return undefined;\n for (const asset of manifest.assets) {\n try {\n await readFile(resolve(this.companionContext.saasRoot, asset.storageRef));\n } catch {\n return undefined;\n }\n }\n return manifest;\n }\n\n /**\n * Pick the first backend service — the `brand-render-prompt` behavior routes\n * to the `specifications` target every backend service declares (mirror of\n * `MarketGenerationCompanionService.pickMarketCarrierServiceKey`).\n */\n private pickBrandCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\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 brand-render-prompt behavior. '\n + 'It routes to the `specifications` target, declared on every backend service.',\n },\n });\n }\n return backendServiceKey;\n }\n}\n\n/**\n * The generated master is ALWAYS a text-free SYMBOL (the renderer forbids text\n * in the image; the wordmark is typography, composed downstream). So the master\n * composition is `SYMBOL` regardless of the authored `markType` — a LOCKUP\n * (symbol + typeset wordmark) is assembled at render time, never generated.\n */\nfunction compositionForMarkType(_markType: string | null): BrandAssetComposition {\n return BrandAssetComposition.SYMBOL;\n}\n"]}
1
+ {"version":3,"file":"logo-generation.companion.service.js","sourceRoot":"","sources":["../../../../../src/brand/services/logo-generation.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EAErB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,SAAS,GAGV,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,GAGhC,MAAM,+BAA+B,CAAC;AAEvC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B;IAD1C,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAE9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;IAE/C,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAEhD,WAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;qCAPO,aAAa;QAE1C,0BAA0B,oBAMT,6BAA6B;GAZpE,8BAA8B,CAgL1C;;AAED;;;;;GAKG;AACH,SAAS,sBAAsB,CAAC,SAAwB;IACtD,OAAO,qBAAqB,CAAC,MAAM,CAAC;AACtC,CAAC","sourcesContent":["import { readFile, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport {\n ErrorBuilderBackendService,\n LoggerService,\n removeSolidBackground,\n SAAS_SERVICE_TYPES,\n trimTransparentBorder,\n type AgentsBackendService,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n type AgentTraceContext,\n type FlowsActors_Agent_Invocation,\n} from '@wildo-ai/saas-models';\nimport {\n ImageProvider_GenerateImageInputSchema,\n ImageProvider_GenerateImageOutputSchema,\n ImageProvider_OperationContext_BaseSchema,\n type ImageProvider_GenerateImageOutput,\n} from '@wildo-ai/external-connectors-models';\nimport {\n BrandAssetComposition,\n BrandRenderPromptResponseSchema,\n type BrandAssetConfig,\n type LogoGenerationResponse,\n} from '@wildo-ai/saas-specifications';\n\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 { LOGO_GENERATION_AGENT_REF } from '../models/logo-generation.actors-system.definitions';\nimport { stageBrandCandidate } from '../utils/stage-brand-candidate';\n\n/**\n * A companion-owned generated brand-asset manifest + its on-disk files.\n *\n * `prompt` is the rendered brief the assets were generated from, stored VERBATIM so the next run can\n * skip a paid image generation when the brief has not changed. It is a throwaway cache key in a\n * gitignored staging file: compared as text, never hashed, never promoted to the committed SSOT.\n */\ninterface GeneratedAssetManifest {\n prompt: string;\n assets: BrandAssetConfig[];\n}\n\nexport interface LogoGenerationOptions {\n /** Regenerate even when the prompt digest is unchanged and the file exists. */\n forceRegenerate?: boolean;\n}\n\n/**\n * Logo generation companion service — the parent-process orchestrator of the\n * brand/logo step (mirror of `MarketGenerationCompanionService`).\n *\n * Two boundaries:\n * 1. **Subprocess** (`brand-render-prompt`) — assembles the text-to-image\n * prompt from the authored `BrandSnapshot` (+ optional market voice).\n * 2. **Parent** (`AgentsBackendService.invokeAgent`) — feeds the prompt to the\n * IMAGE-modality `brand.logo.generation.agent`, which the engine routes to\n * the `IMAGE_PROVIDER` transport (`experimental_generateImage`).\n *\n * The generated master is persisted under\n * `<saasRoot>/.wildo-saas/generated/brand/` alongside a `manifest.json`\n * carrying the `BrandAssetConfig` records (the runtime-consumable projection of\n * `BrandSnapshot.resolvedAssets`, which the authored snapshot leaves empty).\n * A prompt digest gives a freshness skip: an unchanged brief with the master\n * still on disk short-circuits the (paid) image call. Derived assets (favicon /\n * OG / mono / dark-light) are staged too: `stageBrandCandidate` cleans and squares\n * the master and then derives the full variant set from it. If the derive step is\n * unavailable the run degrades to master-only and says so through\n * `onDeriveDegraded`, rather than failing.\n */\n@injectable()\nexport class LogoGenerationCompanionService {\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.AgentsBackendService)\n private readonly agentsService: AgentsBackendService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService)\n private readonly companionIntrospectionService: CompanionIntrospectionService,\n ) {\n this.logDebug = this.logger.debugByType('LogoGenerationCompanionService');\n this.logger.setDebugTypeLogging('LogoGenerationCompanionService', true);\n }\n\n public async generate(\n options: LogoGenerationOptions = {},\n traceContext?: AgentTraceContext,\n ): Promise<LogoGenerationResponse> {\n // ── 1. Subprocess prompt assembly ──────────────────────────\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickBrandCarrierServiceKey(),\n behavior: 'brand-render-prompt',\n 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 let render;\n try {\n render = BrandRenderPromptResponseSchema.parse(introspection.data);\n } catch (error) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `brand-render-prompt subprocess returned an unexpected payload shape: ${describeCaughtError(error)}`,\n },\n });\n }\n\n this.logDebug('brand prompt assembled', {\n brandName: render.trace.brandName,\n markType: render.trace.markType,\n warnings: render.trace.warnings,\n });\n\n const brandDir = resolve(this.companionContext.saasRoot, '.wildo-saas', 'generated', 'brand');\n // ── 2. Freshness skip ──────────────────────────────────────\n if (!options.forceRegenerate) {\n const cached = await this.readManifestIfFresh(brandDir, render.prompt);\n if (cached) {\n this.logDebug('logo up to date — brief unchanged since the staged generation, skipping');\n return { prompt: render.prompt, agentRef: LOGO_GENERATION_AGENT_REF, generatedAssets: cached.assets, trace: render.trace };\n }\n }\n\n // ── 3. Parent-process image call ───────────────────────────\n const invocation: FlowsActors_Agent_Invocation<\n typeof ImageProvider_GenerateImageInputSchema,\n typeof ImageProvider_GenerateImageOutputSchema,\n typeof ImageProvider_OperationContext_BaseSchema\n > = {\n agentRef: LOGO_GENERATION_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt: render.prompt },\n output: { images: [] },\n executionContext: { callTimestamp: new Date().toISOString() },\n artifactBindings: [],\n };\n\n const result = await this.agentsService.invokeAgent(invocation, traceContext);\n const output = result.output as ImageProvider_GenerateImageOutput;\n const masterImage = output?.images?.[0];\n if (!masterImage || typeof masterImage.base64 !== 'string' || masterImage.base64.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: 'Logo generation agent returned no image. Check the OpenAI IMAGE_PROVIDER configuration and prompt validity.' },\n });\n }\n\n // ── 4. Clean + square the master, then stage (master + derived + manifest) ──\n const generatedAt = new Date().toISOString();\n const composition = compositionForMarkType(render.trace.markType);\n // Master cleanup, in order:\n // 1. removeSolidBackground — text-to-image models bake a solid/near-solid\n // background even when transparency is requested; flood-fill it away so\n // the mark is integrable on any surface (no white/colored tile).\n // 2. trimTransparentBorder — trims the now-transparent border so the mark\n // FILLS the frame (models float a small mark in the middle → microscopic\n // favicons), then re-squares the canvas (a square master is mandatory for\n // all downstream icon handling). Trim once; store AND derive from it.\n const cleaned = await removeSolidBackground(Buffer.from(masterImage.base64, 'base64'));\n const masterBuffer = await trimTransparentBorder(cleaned);\n\n // Stage master + full derived asset set via the shared helper (the SAME\n // layout the batch generator stages its winner with — one authored place).\n const staged = await stageBrandCandidate({\n brandDir,\n masterBuffer,\n masterComposition: composition,\n generatedAt,\n storageDir: '.wildo-saas/generated/brand',\n onDeriveDegraded: (reason) => this.logDebug(\n '[logo-generation] derived-asset pipeline unavailable — shipping master only',\n { reason },\n ),\n });\n const assets = staged.assets;\n\n const manifest: GeneratedAssetManifest = { prompt: render.prompt, assets };\n await writeFile(resolve(brandDir, 'manifest.json'), `${JSON.stringify(manifest, null, 2)}\\n`, 'utf8');\n\n this.logDebug('logo generated + persisted', {\n fileName: staged.masterFileName,\n composition,\n assetCount: assets.length,\n });\n return { prompt: render.prompt, agentRef: LOGO_GENERATION_AGENT_REF, generatedAssets: assets, trace: render.trace };\n }\n\n /**\n * Returns the persisted manifest iff it was generated from exactly this brief AND every\n * referenced file is still on disk — a changed brief or a hand-deleted file forces regeneration.\n */\n private async readManifestIfFresh(brandDir: string, prompt: string): Promise<GeneratedAssetManifest | undefined> {\n let manifest: GeneratedAssetManifest;\n try {\n manifest = JSON.parse(await readFile(resolve(brandDir, 'manifest.json'), 'utf8')) as GeneratedAssetManifest;\n } catch {\n return undefined;\n }\n if (manifest.prompt !== prompt) return undefined;\n for (const asset of manifest.assets) {\n try {\n await readFile(resolve(this.companionContext.saasRoot, asset.storageRef));\n } catch {\n return undefined;\n }\n }\n return manifest;\n }\n\n /**\n * Pick the first backend service — the `brand-render-prompt` behavior routes\n * to the `specifications` target every backend service declares (mirror of\n * `MarketGenerationCompanionService.pickMarketCarrierServiceKey`).\n */\n private pickBrandCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\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 brand-render-prompt behavior. '\n + 'It routes to the `specifications` target, declared on every backend service.',\n },\n });\n }\n return backendServiceKey;\n }\n}\n\n/**\n * The generated master is ALWAYS a text-free SYMBOL (the renderer forbids text\n * in the image; the wordmark is typography, composed downstream). So the master\n * composition is `SYMBOL` regardless of the authored `markType` — a LOCKUP\n * (symbol + typeset wordmark) is assembled at render time, never generated.\n */\nfunction compositionForMarkType(_markType: string | null): BrandAssetComposition {\n return BrandAssetComposition.SYMBOL;\n}\n"]}
@@ -32,7 +32,6 @@ export declare function deriveBrandAssets(params: {
32
32
  masterRef: string;
33
33
  masterComposition: BrandAssetComposition;
34
34
  generatedAt: string;
35
- promptDigest?: string;
36
35
  /** Relative dir the storageRef is rooted at, e.g. `.wildo-saas/generated/brand`. */
37
36
  storageDir: string;
38
37
  }): Promise<DerivedAssetFile[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"derived-brand-assets.d.ts","sourceRoot":"","sources":["../../../../../src/brand/utils/derived-brand-assets.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EAIrB,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAkBD,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA+C9B"}
1
+ {"version":3,"file":"derived-brand-assets.d.ts","sourceRoot":"","sources":["../../../../../src/brand/utils/derived-brand-assets.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EAIrB,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAkBD,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA8C9B"}
@@ -11,7 +11,7 @@ import { BrandAssetFormat, BrandAssetPurpose, BrandAssetTheme, } from '@wildo-ai
11
11
  */
12
12
  const DISPLAY_MARK_SIZE = 512;
13
13
  export async function deriveBrandAssets(params) {
14
- const { master, masterRef, masterComposition, generatedAt, promptDigest, storageDir } = params;
14
+ const { master, masterRef, masterComposition, generatedAt, storageDir } = params;
15
15
  // Every variant is TRANSPARENT (no flattened background) so the mark drops
16
16
  // cleanly onto any surface — the SSOT is an integrable symbol, not a framed
17
17
  // tile. The DARK variant ships the COLORED mark UNCHANGED: a well-designed
@@ -47,7 +47,6 @@ export async function deriveBrandAssets(params) {
47
47
  height: image.height,
48
48
  derivedFrom: masterRef,
49
49
  generatedAt,
50
- promptDigest,
51
50
  };
52
51
  return { fileName, buffer: image.buffer, asset };
53
52
  });
@@ -1 +1 @@
1
- {"version":3,"file":"derived-brand-assets.js","sourceRoot":"","sources":["../../../../../src/brand/utils/derived-brand-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA4B,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAEL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAEhB,MAAM,+BAA+B,CAAC;AA+BvC;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAO9B,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAQvC;IACC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAE/F,2EAA2E;IAC3E,4EAA4E;IAC5E,2EAA2E;IAC3E,6EAA6E;IAC7E,0EAA0E;IAC1E,+EAA+E;IAC/E,yDAAyD;IACzD,MAAM,KAAK,GA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AAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,WAAW,EAAE,SAAS;YACtB,WAAW;YACX,YAAY;SACb,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { deriveImageVariants, type ImageDerivationSpec } from '@wildo-ai/saas-backend-lib';\nimport {\n BrandAssetComposition,\n BrandAssetFormat,\n BrandAssetPurpose,\n BrandAssetTheme,\n type BrandAssetConfig,\n} from '@wildo-ai/saas-specifications';\n\n/**\n * Derives the full brand-asset set from the generated master, mapping the\n * generic engine derivation results into `BrandAssetConfig` records (composition\n * × theme × purpose). The engine util owns the pixels (libvips/sharp); this util\n * owns the brand vocabulary. Every derived asset carries `derivedFrom = masterRef`.\n *\n * Full coverage (Decision 3): display + favicon + apple-touch + maskable + OG +\n * email + monochrome + dark. Notes on raster limits: FAVICON is emitted as PNG\n * (no ICO encoder is bundled — a legacy `.ico` needs a dedicated dep) and no\n * vector FAVICON_SVG (the master is raster). A cleaner square symbol would come\n * from a dedicated SYMBOL master (Layer-3 two-master generation) — until then the\n * square icons are a contain-fit of the master.\n *\n * `display` is the DEFAULT-theme `PRIMARY`, and it is derived rather than aliased\n * to the master for a measured reason: `PRIMARY` is the slot every non-exact\n * `resolveBrandAsset` query falls back to, so it is the most-served asset in the\n * system. Leaving the unbounded master there made Wonder Todos' app-shell sidebar\n * fetch 1,043,409 bytes to draw a ~32px mark, while the DARK and MONOCHROME\n * entries of the same slot — already derived here at 512 — were 123 KB and 69 KB.\n * The three PRIMARY themes are interchangeable to a resolving consumer (it may\n * receive any of them depending on the active UI theme), so they must be\n * dimensionally comparable. The master remains addressable at `MASTER`.\n */\nexport interface DerivedAssetFile {\n fileName: string;\n buffer: Buffer;\n asset: BrandAssetConfig;\n}\n\n/**\n * Edge size of every `PRIMARY` display mark, shared by all three themes.\n *\n * ONE constant on purpose: `resolveBrandAsset` may hand a consumer the DEFAULT,\n * DARK or MONOCHROME entry of this slot depending on the active UI theme, so a\n * surface that sizes its container from one of them must get the same geometry\n * from the others. 512 is large enough for a 2x retina header lockup and small\n * enough to serve on every page — the full-resolution source stays at `MASTER`.\n */\nconst DISPLAY_MARK_SIZE = 512;\n\ninterface BrandDerivationSpec extends ImageDerivationSpec {\n purpose: BrandAssetPurpose;\n theme: BrandAssetTheme;\n}\n\nexport async function deriveBrandAssets(params: {\n master: Buffer;\n masterRef: string;\n masterComposition: BrandAssetComposition;\n generatedAt: string;\n promptDigest?: string;\n /** Relative dir the storageRef is rooted at, e.g. `.wildo-saas/generated/brand`. */\n storageDir: string;\n}): Promise<DerivedAssetFile[]> {\n const { master, masterRef, masterComposition, generatedAt, promptDigest, storageDir } = params;\n\n // Every variant is TRANSPARENT (no flattened background) so the mark drops\n // cleanly onto any surface — the SSOT is an integrable symbol, not a framed\n // tile. The DARK variant ships the COLORED mark UNCHANGED: a well-designed\n // 2-color mark (indigo + coral accent) reads on a dark surface as-is, so the\n // dark-theme slot preserves brand identity rather than flattening it to a\n // silhouette. (`recolorTo` remains available in the engine util for marks that\n // genuinely need a mono treatment; this brand does not.)\n const specs: BrandDerivationSpec[] = [\n { key: 'display', width: DISPLAY_MARK_SIZE, height: DISPLAY_MARK_SIZE, purpose: BrandAssetPurpose.PRIMARY, theme: BrandAssetTheme.DEFAULT },\n { key: 'favicon', width: 32, height: 32, purpose: BrandAssetPurpose.FAVICON, theme: BrandAssetTheme.DEFAULT },\n { key: 'apple-touch', width: 180, height: 180, purpose: BrandAssetPurpose.APPLE_TOUCH_ICON, theme: BrandAssetTheme.DEFAULT },\n { key: 'maskable', width: 512, height: 512, paddingRatio: 0.2, purpose: BrandAssetPurpose.MASKABLE_ICON, theme: BrandAssetTheme.DEFAULT },\n { key: 'og', width: 1200, height: 630, purpose: BrandAssetPurpose.OG_IMAGE, theme: BrandAssetTheme.DEFAULT },\n { key: 'email', width: 600, height: 200, purpose: BrandAssetPurpose.EMAIL, theme: BrandAssetTheme.DEFAULT },\n { key: 'monochrome', width: DISPLAY_MARK_SIZE, height: DISPLAY_MARK_SIZE, grayscale: true, purpose: BrandAssetPurpose.PRIMARY, theme: BrandAssetTheme.MONOCHROME },\n { key: 'dark', width: DISPLAY_MARK_SIZE, height: DISPLAY_MARK_SIZE, purpose: BrandAssetPurpose.PRIMARY, theme: BrandAssetTheme.DARK },\n ];\n\n const derived = await deriveImageVariants(\n master,\n specs.map(({ key, width, height, fit, paddingRatio, background, grayscale, negate, recolorTo }) => ({\n key, width, height, fit, paddingRatio, background, grayscale, negate, recolorTo,\n })),\n );\n\n return derived.map((image) => {\n const spec = specs.find((s) => s.key === image.key)!;\n const themeSlug = spec.theme.toLowerCase();\n const fileName = `${image.key}-${masterComposition.toLowerCase()}-${themeSlug}.png`;\n const asset: BrandAssetConfig = {\n ref: `asset-${masterComposition.toLowerCase()}-${themeSlug}-${spec.purpose.toLowerCase()}-${image.key}`,\n composition: masterComposition,\n theme: spec.theme,\n purpose: spec.purpose,\n storageRef: `${storageDir}/${fileName}`,\n format: BrandAssetFormat.PNG,\n width: image.width,\n height: image.height,\n derivedFrom: masterRef,\n generatedAt,\n promptDigest,\n };\n return { fileName, buffer: image.buffer, asset };\n });\n}\n"]}
1
+ {"version":3,"file":"derived-brand-assets.js","sourceRoot":"","sources":["../../../../../src/brand/utils/derived-brand-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA4B,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAEL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAEhB,MAAM,+BAA+B,CAAC;AA+BvC;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAO9B,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAOvC;IACC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,GA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,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,GAAG,UAAU,IAAI,QAAQ,EAAE;YACvC,MAAM,EAAE,gBAAgB,CAAC,GAAG;YAC5B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,WAAW,EAAE,SAAS;YACtB,WAAW;SACZ,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { deriveImageVariants, type ImageDerivationSpec } from '@wildo-ai/saas-backend-lib';\nimport {\n BrandAssetComposition,\n BrandAssetFormat,\n BrandAssetPurpose,\n BrandAssetTheme,\n type BrandAssetConfig,\n} from '@wildo-ai/saas-specifications';\n\n/**\n * Derives the full brand-asset set from the generated master, mapping the\n * generic engine derivation results into `BrandAssetConfig` records (composition\n * × theme × purpose). The engine util owns the pixels (libvips/sharp); this util\n * owns the brand vocabulary. Every derived asset carries `derivedFrom = masterRef`.\n *\n * Full coverage (Decision 3): display + favicon + apple-touch + maskable + OG +\n * email + monochrome + dark. Notes on raster limits: FAVICON is emitted as PNG\n * (no ICO encoder is bundled — a legacy `.ico` needs a dedicated dep) and no\n * vector FAVICON_SVG (the master is raster). A cleaner square symbol would come\n * from a dedicated SYMBOL master (Layer-3 two-master generation) — until then the\n * square icons are a contain-fit of the master.\n *\n * `display` is the DEFAULT-theme `PRIMARY`, and it is derived rather than aliased\n * to the master for a measured reason: `PRIMARY` is the slot every non-exact\n * `resolveBrandAsset` query falls back to, so it is the most-served asset in the\n * system. Leaving the unbounded master there made Wonder Todos' app-shell sidebar\n * fetch 1,043,409 bytes to draw a ~32px mark, while the DARK and MONOCHROME\n * entries of the same slot — already derived here at 512 — were 123 KB and 69 KB.\n * The three PRIMARY themes are interchangeable to a resolving consumer (it may\n * receive any of them depending on the active UI theme), so they must be\n * dimensionally comparable. The master remains addressable at `MASTER`.\n */\nexport interface DerivedAssetFile {\n fileName: string;\n buffer: Buffer;\n asset: BrandAssetConfig;\n}\n\n/**\n * Edge size of every `PRIMARY` display mark, shared by all three themes.\n *\n * ONE constant on purpose: `resolveBrandAsset` may hand a consumer the DEFAULT,\n * DARK or MONOCHROME entry of this slot depending on the active UI theme, so a\n * surface that sizes its container from one of them must get the same geometry\n * from the others. 512 is large enough for a 2x retina header lockup and small\n * enough to serve on every page — the full-resolution source stays at `MASTER`.\n */\nconst DISPLAY_MARK_SIZE = 512;\n\ninterface BrandDerivationSpec extends ImageDerivationSpec {\n purpose: BrandAssetPurpose;\n theme: BrandAssetTheme;\n}\n\nexport async function deriveBrandAssets(params: {\n master: Buffer;\n masterRef: string;\n masterComposition: BrandAssetComposition;\n generatedAt: string;\n /** Relative dir the storageRef is rooted at, e.g. `.wildo-saas/generated/brand`. */\n storageDir: string;\n}): Promise<DerivedAssetFile[]> {\n const { master, masterRef, masterComposition, generatedAt, storageDir } = params;\n\n // Every variant is TRANSPARENT (no flattened background) so the mark drops\n // cleanly onto any surface — the SSOT is an integrable symbol, not a framed\n // tile. The DARK variant ships the COLORED mark UNCHANGED: a well-designed\n // 2-color mark (indigo + coral accent) reads on a dark surface as-is, so the\n // dark-theme slot preserves brand identity rather than flattening it to a\n // silhouette. (`recolorTo` remains available in the engine util for marks that\n // genuinely need a mono treatment; this brand does not.)\n const specs: BrandDerivationSpec[] = [\n { key: 'display', width: DISPLAY_MARK_SIZE, height: DISPLAY_MARK_SIZE, purpose: BrandAssetPurpose.PRIMARY, theme: BrandAssetTheme.DEFAULT },\n { key: 'favicon', width: 32, height: 32, purpose: BrandAssetPurpose.FAVICON, theme: BrandAssetTheme.DEFAULT },\n { key: 'apple-touch', width: 180, height: 180, purpose: BrandAssetPurpose.APPLE_TOUCH_ICON, theme: BrandAssetTheme.DEFAULT },\n { key: 'maskable', width: 512, height: 512, paddingRatio: 0.2, purpose: BrandAssetPurpose.MASKABLE_ICON, theme: BrandAssetTheme.DEFAULT },\n { key: 'og', width: 1200, height: 630, purpose: BrandAssetPurpose.OG_IMAGE, theme: BrandAssetTheme.DEFAULT },\n { key: 'email', width: 600, height: 200, purpose: BrandAssetPurpose.EMAIL, theme: BrandAssetTheme.DEFAULT },\n { key: 'monochrome', width: DISPLAY_MARK_SIZE, height: DISPLAY_MARK_SIZE, grayscale: true, purpose: BrandAssetPurpose.PRIMARY, theme: BrandAssetTheme.MONOCHROME },\n { key: 'dark', width: DISPLAY_MARK_SIZE, height: DISPLAY_MARK_SIZE, purpose: BrandAssetPurpose.PRIMARY, theme: BrandAssetTheme.DARK },\n ];\n\n const derived = await deriveImageVariants(\n master,\n specs.map(({ key, width, height, fit, paddingRatio, background, grayscale, negate, recolorTo }) => ({\n key, width, height, fit, paddingRatio, background, grayscale, negate, recolorTo,\n })),\n );\n\n return derived.map((image) => {\n const spec = specs.find((s) => s.key === image.key)!;\n const themeSlug = spec.theme.toLowerCase();\n const fileName = `${image.key}-${masterComposition.toLowerCase()}-${themeSlug}.png`;\n const asset: BrandAssetConfig = {\n ref: `asset-${masterComposition.toLowerCase()}-${themeSlug}-${spec.purpose.toLowerCase()}-${image.key}`,\n composition: masterComposition,\n theme: spec.theme,\n purpose: spec.purpose,\n storageRef: `${storageDir}/${fileName}`,\n format: BrandAssetFormat.PNG,\n width: image.width,\n height: image.height,\n derivedFrom: masterRef,\n generatedAt,\n };\n return { fileName, buffer: image.buffer, asset };\n });\n}\n"]}
@@ -12,15 +12,14 @@ export interface StagedBrandCandidate {
12
12
  * Stage an ALREADY-cleaned, ALREADY-squared master into the generation staging
13
13
  * area: write the master PNG, derive the full role/theme asset set, write each
14
14
  * derived PNG, and return the `BrandAssetConfig[]` (master first). It does NOT
15
- * write `manifest.json` — the caller owns manifest shape (the single-candidate
16
- * generator writes one manifest; the batch generator writes the WINNER's
17
- * manifest plus a separate batch manifest).
15
+ * write `manifest.json`: the caller owns manifest shape.
18
16
  *
19
- * Shared by `LogoGenerationCompanionService` (single candidate) and
20
- * `LogoBatchGenerationCompanionService` (the selected winner) so the master +
21
- * derived + storageRef layout is authored in exactly ONE place — a drift here
22
- * would desync the two generation paths and the accept/promote step that reads
23
- * their manifests.
17
+ * Shared by `LogoGenerationCompanionService` (a single generated candidate) and
18
+ * `LogoDeliberationCompanionService` (the candidate a deliberation selected as
19
+ * winner), each of which writes its own `manifest.json` afterwards. Staging
20
+ * lives here so the master + derived + storageRef layout is authored in exactly
21
+ * ONE place: a drift here would desync the two generation paths and the
22
+ * accept/promote step that reads their manifests.
24
23
  *
25
24
  * Derivation is best-effort: it needs the native `sharp` module. If `sharp` is
26
25
  * absent the master still stages and the result degrades to master-only (via
@@ -47,7 +46,6 @@ export declare function stageBrandCandidate(params: {
47
46
  masterBuffer: Buffer;
48
47
  masterComposition: BrandAssetComposition;
49
48
  generatedAt: string;
50
- promptDigest?: string;
51
49
  /** saasRoot-relative dir the storageRefs are rooted at (e.g. `.wildo-saas/generated/brand`). */
52
50
  storageDir: string;
53
51
  /** Called (non-fatally) when derivation is unavailable, so the caller can log the degrade. */
@@ -1 +1 @@
1
- {"version":3,"file":"stage-brand-candidate.d.ts","sourceRoot":"","sources":["../../../../../src/brand/utils/stage-brand-candidate.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AAKvC,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACnC,qFAAqF;IACrF,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gGAAgG;IAChG,UAAU,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAuDhC"}
1
+ {"version":3,"file":"stage-brand-candidate.d.ts","sourceRoot":"","sources":["../../../../../src/brand/utils/stage-brand-candidate.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AAKvC,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACnC,qFAAqF;IACrF,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,UAAU,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAqDhC"}
@@ -7,15 +7,14 @@ import { deriveBrandAssets } from './derived-brand-assets.js';
7
7
  * Stage an ALREADY-cleaned, ALREADY-squared master into the generation staging
8
8
  * area: write the master PNG, derive the full role/theme asset set, write each
9
9
  * derived PNG, and return the `BrandAssetConfig[]` (master first). It does NOT
10
- * write `manifest.json` — the caller owns manifest shape (the single-candidate
11
- * generator writes one manifest; the batch generator writes the WINNER's
12
- * manifest plus a separate batch manifest).
10
+ * write `manifest.json`: the caller owns manifest shape.
13
11
  *
14
- * Shared by `LogoGenerationCompanionService` (single candidate) and
15
- * `LogoBatchGenerationCompanionService` (the selected winner) so the master +
16
- * derived + storageRef layout is authored in exactly ONE place — a drift here
17
- * would desync the two generation paths and the accept/promote step that reads
18
- * their manifests.
12
+ * Shared by `LogoGenerationCompanionService` (a single generated candidate) and
13
+ * `LogoDeliberationCompanionService` (the candidate a deliberation selected as
14
+ * winner), each of which writes its own `manifest.json` afterwards. Staging
15
+ * lives here so the master + derived + storageRef layout is authored in exactly
16
+ * ONE place: a drift here would desync the two generation paths and the
17
+ * accept/promote step that reads their manifests.
19
18
  *
20
19
  * Derivation is best-effort: it needs the native `sharp` module. If `sharp` is
21
20
  * absent the master still stages and the result degrades to master-only (via
@@ -37,7 +36,7 @@ import { deriveBrandAssets } from './derived-brand-assets.js';
37
36
  * that makes the bad state visible if it is ever reached another way.
38
37
  */
39
38
  export async function stageBrandCandidate(params) {
40
- const { brandDir, masterBuffer, masterComposition, generatedAt, promptDigest, storageDir, onDeriveDegraded } = params;
39
+ const { brandDir, masterBuffer, masterComposition, generatedAt, storageDir, onDeriveDegraded } = params;
41
40
  await mkdir(brandDir, { recursive: true });
42
41
  const compositionSlug = masterComposition.toLowerCase();
43
42
  const masterFileName = `master-${compositionSlug}-default.png`;
@@ -56,7 +55,6 @@ export async function stageBrandCandidate(params) {
56
55
  masterRef,
57
56
  masterComposition,
58
57
  generatedAt,
59
- promptDigest,
60
58
  storageDir,
61
59
  });
62
60
  for (const file of derived) {
@@ -79,7 +77,6 @@ export async function stageBrandCandidate(params) {
79
77
  storageRef: masterStorageRef,
80
78
  format: BrandAssetFormat.PNG,
81
79
  generatedAt,
82
- ...(promptDigest !== undefined ? { promptDigest } : {}),
83
80
  };
84
81
  return {
85
82
  assets: [masterAsset, ...derivedAssets],