@wildo-ai/saas-specifications 1.1.0 → 1.1.2

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 (423) hide show
  1. package/dist/assurance/external-framework-mapping.json +980 -0
  2. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  3. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  4. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  5. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  9. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  11. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  12. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  13. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  14. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  15. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  17. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  18. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  19. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  20. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  21. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
  22. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  23. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
  24. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  25. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  26. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  27. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  28. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  29. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  31. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  32. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  33. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  34. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  35. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  36. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  37. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  39. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  40. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  41. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  42. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  43. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  44. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  45. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  46. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  47. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  48. package/dist/esm/_core/family-aspects.registry.js +60 -0
  49. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  50. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  51. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  52. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  53. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  54. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  55. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  56. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  57. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  58. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  59. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  60. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  61. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  62. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  63. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  64. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  65. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  66. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  67. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  68. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  69. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  70. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  71. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  72. package/dist/esm/_core/index.d.ts +2 -0
  73. package/dist/esm/_core/index.d.ts.map +1 -1
  74. package/dist/esm/_core/index.js +2 -0
  75. package/dist/esm/_core/index.js.map +1 -1
  76. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  77. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  78. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  79. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  80. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  81. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  82. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  84. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  85. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  86. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  87. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  88. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  89. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  90. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  91. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  92. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  93. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  94. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  95. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  96. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  97. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  98. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  99. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  100. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  101. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  102. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  103. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  104. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
  105. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  106. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
  107. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  108. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  109. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  110. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  111. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  112. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  113. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  114. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  115. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  116. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  117. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  118. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  119. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
  121. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  122. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
  123. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  125. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  126. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  127. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  128. package/dist/esm/application-creation.exports.d.ts +11 -0
  129. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  130. package/dist/esm/application-creation.exports.js +11 -0
  131. package/dist/esm/application-creation.exports.js.map +1 -1
  132. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
  133. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  134. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
  135. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  136. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
  137. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  138. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  139. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  140. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  141. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  142. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  143. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  144. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  145. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  146. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  147. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  148. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  149. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
  150. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  151. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
  152. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  153. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
  154. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  155. package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
  156. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  157. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  158. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  159. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  160. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  161. package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
  162. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  163. package/dist/esm/assurance/assurance-program.schemas.js +29 -6
  164. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  165. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  166. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  167. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  168. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  169. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  170. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  171. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  172. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  173. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  174. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  175. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  176. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  177. package/dist/esm/assurance.exports.d.ts +2 -0
  178. package/dist/esm/assurance.exports.d.ts.map +1 -1
  179. package/dist/esm/assurance.exports.js +2 -0
  180. package/dist/esm/assurance.exports.js.map +1 -1
  181. package/dist/esm/companion-exports.d.ts +19 -2
  182. package/dist/esm/companion-exports.d.ts.map +1 -1
  183. package/dist/esm/companion-exports.js.map +1 -1
  184. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  185. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
  186. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  187. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
  189. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  191. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
  192. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  193. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  194. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
  195. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  196. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
  198. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  200. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  201. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  202. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  203. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  204. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  205. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
  206. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
  209. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  211. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
  212. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  213. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  214. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  215. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
  216. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  217. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  218. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
  219. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  220. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  221. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
  222. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  223. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  224. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
  225. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  226. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  227. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
  228. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  229. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
  231. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  232. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  233. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  234. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  235. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  236. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  237. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
  238. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  239. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  240. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  241. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
  242. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  243. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  244. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  245. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
  246. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  247. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  248. package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
  249. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  251. package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
  252. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  253. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  254. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
  255. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  256. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  257. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
  258. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  259. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  260. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  261. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
  262. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  263. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
  264. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  265. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
  266. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  267. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  268. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
  269. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  270. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  271. package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
  272. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  273. package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
  274. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  275. package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
  276. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  277. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  278. package/dist/esm/engine/errors/error-messages.specification.js +30 -1
  279. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  280. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  281. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
  282. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  283. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  284. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
  285. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  287. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  288. package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
  289. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  290. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
  292. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  294. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  295. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
  296. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  297. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  298. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
  300. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  302. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  303. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
  304. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  306. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  307. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  308. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  310. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  311. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  312. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  313. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  314. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
  315. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  316. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  317. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  318. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
  319. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  320. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
  321. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  322. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
  323. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  324. package/dist/esm/engine/index.d.ts +1 -0
  325. package/dist/esm/engine/index.d.ts.map +1 -1
  326. package/dist/esm/engine/index.js +1 -0
  327. package/dist/esm/engine/index.js.map +1 -1
  328. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  329. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
  330. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  331. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  332. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
  333. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  334. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  335. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
  336. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  337. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  338. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
  339. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  340. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  341. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
  342. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  343. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  344. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  345. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
  346. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  347. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  348. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
  349. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  350. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  351. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  352. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
  353. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  354. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
  356. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  358. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
  359. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  360. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  361. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
  362. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  363. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  364. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
  365. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  366. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  367. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  368. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  369. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  370. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
  371. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  372. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  373. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
  374. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  375. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  376. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  377. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
  378. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  380. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  385. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
  386. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
  388. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
  390. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
  394. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
  396. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
  398. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  399. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  400. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  401. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
  402. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  403. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
  405. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
  408. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  409. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  410. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  411. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
  412. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  413. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
  414. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  415. package/dist/tsconfig.build.tsbuildinfo +1 -0
  416. package/package.json +8 -8
  417. package/dist/esm/.builder.pid +0 -9
  418. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  419. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  420. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  421. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  422. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  423. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"flow-actor-tasks.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,kCAAkC,EAClC,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,kCAAkC,GACnC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAmC,sB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KAAK,EAAE,oBAAoB,YAAY,CAAC,UAAU,aAAa;wBAC/D,OAAO,EAAE,EAAE,GAAG,YAAY,CAAC,aAAa,EAAE,GAAG,YAAY,CAAC,gBAAgB,EAAE;wBAC5E,QAAQ,EAAE,EAAE,EAAE,EAAE,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,0BAA0B,EAAE;wBACjF,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QAED,mBAAmB,EAAE;YACnB,qMAAqM;YACrM,yKAAyK;YACzK,qIAAqI;YACrI,wJAAwJ;SACzJ;KACF,CAAC;IACF,kFAAkF;IAClF,oFAAoF;IACpF,kFAAkF;IAClF,8CAA8C;IAC9C,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,uCAAuC,GAAG,uCAAuC,CAC5F,gBAAgB,CAAC,qBAAqB,EACtC,uBAAuB,CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,+CAA+C,GAAG,uCAAuC,CACpG,gBAAgB,CAAC,6BAA6B,EAC9C,+BAA+B,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,uCAAuC,CACnG,gBAAgB,CAAC,4BAA4B,EAC7C,8BAA8B,CAC/B,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n FlowActorTaskBaseSchema,\n FlowsActors_Status,\n ResourcePrimaryScope,\n flowActorTasksPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { type CoreResourceTypeMemberName, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\n/**\n * Framework-owned specification for the `flowActorTasks` POLYMORPHIC family: the\n * persisted WORK record that backs the A2A `Task` object. One base record is\n * stamped out as three genuine single-scope variants, each owned by its injected\n * owner FK:\n * - `userFlowActorTasks` (USER_SELF — user-delegated A2A)\n * - `organizationFlowActorTasks` (ORGANIZATIONS — org-machine A2A)\n * - `applicationFlowActorTasks` (APPLICATION — app-machine A2A)\n *\n * ## This is a different plane from `flowActorExecutions`\n *\n * Executions own CONVERSATIONAL session history (the message log). Tasks own an\n * addressable, pollable, cancelable WORK lifecycle. The architecture keeps them\n * apart deliberately — an A2A treatment links both concrete records rather than\n * copying the conversation into the task. A task therefore carries only a SOFT\n * link (`flowActorExecutionId`), not a declared foreign key, so it can outlive the\n * conversation that produced it.\n *\n * ## Not every turn has one\n *\n * A task is materialised only when the turn cannot complete inline — the client\n * asked for it (`blocking: false`) or the turn reached an interrupted state\n * (approval pause → `input-required`, which arrives with Phase 2 and is not live today). A blocking turn that answers in one shot\n * returns a `Message` and writes no task row; the A2A spec permits both shapes.\n *\n * The default API READ/LIST are the per-owner HTTP surface. They do NOT govern the A2A\n * `tasks/get` path, which reads through the system-access primitive and isolates by an\n * owner filter derived from the authenticated principal — so a cross-tenant read fails\n * closed, but by that filter rather than by these roles. CREATE/UPDATE are internal\n * (INTERNAL_CALL, service-tier): only the runtime materialises a task and advances\n * its lifecycle via `*AsSystem`. `tasks/cancel` is an UPDATE, never a delete — the\n * spec requires cancel to return the task's updated state.\n */\n\ntype FlowTaskResourceType =\n | CoreResourceType.USER_FLOW_ACTOR_TASKS\n | CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS\n | CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS;\ntype FlowTaskResourceTypeMember = CoreResourceTypeMemberName<FlowTaskResourceType>;\n\ninterface FlowActorTaskScopeExample {\n readonly scopeIdentity: Readonly<Record<string, string>>;\n readonly resourceIdentity: Readonly<Record<string, string>>;\n readonly scopeLabel: string;\n readonly machineCredentialId: string;\n}\n\n/** Exhaustive owner/route projection for the three public task contracts. */\nfunction createFlowActorTaskScopeExample(resourceType: FlowTaskResourceType): FlowActorTaskScopeExample {\n switch (resourceType) {\n case CoreResourceType.USER_FLOW_ACTOR_TASKS:\n return {\n scopeIdentity: { userId: 'user_01JEXAMPLE' },\n resourceIdentity: { userFlowActorTaskId: 'flow_task_user_01JEXAMPLE' },\n scopeLabel: 'user',\n machineCredentialId: FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n };\n case CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS:\n return {\n scopeIdentity: { organizationId: 'org_01JEXAMPLE' },\n resourceIdentity: { organizationFlowActorTaskId: 'flow_task_org_01JEXAMPLE' },\n scopeLabel: 'organization',\n machineCredentialId: 'machine_credential_org_finance_agent',\n };\n case CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS:\n return {\n scopeIdentity: { applicationId: 'app_01JEXAMPLE' },\n resourceIdentity: { applicationFlowActorTaskId: 'flow_task_app_01JEXAMPLE' },\n scopeLabel: 'application',\n machineCredentialId: 'machine_credential_app_finance_agent',\n };\n default: {\n const exhaustiveResourceType: never = resourceType;\n throw new Error(`Unsupported Flow Actor task resource type: ${String(exhaustiveResourceType)}`);\n }\n }\n}\n\nfunction createFlowActorTaskPage(data: readonly unknown[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: 1 },\n };\n}\n\nconst flowTaskPrimaryScopeByResourceType: Record<FlowTaskResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.USER_FLOW_ACTOR_TASKS]: ResourcePrimaryScope.USER_SELF,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype Cfg = ReturnType<(typeof flowActorTasksPolymorphicFactories)[CoreResourceType.USER_FLOW_ACTOR_TASKS]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof FlowActorTaskBaseSchema;\n\nfunction buildFlowActorTaskResourceSpecification(\n resourceType: FlowTaskResourceType,\n resourceTypeMemberName: FlowTaskResourceTypeMember,\n) {\n const exampleScope = createFlowActorTaskScopeExample(resourceType);\n const completedTaskExample = {\n _id: Object.values(exampleScope.resourceIdentity)[0],\n title: 'Prepare the weekly purchase-approval brief',\n status: FlowsActors_Status.COMPLETED,\n taskId: '22222222-2222-4222-8222-222222222222',\n flowActorExecutionId: '11111111-1111-4111-8111-111111111111',\n resourceServerInstanceRef: 'finance-operations-agent',\n machineCredentialId: exampleScope.machineCredentialId,\n contextId: 'finance-weekly-review-2026-w34',\n artifacts: [],\n createdAt: '2026-08-20T08:30:00.000Z',\n updatedAt: '2026-08-20T08:30:14.000Z',\n finishedAt: '2026-08-20T08:30:14.000Z',\n ...exampleScope.scopeIdentity,\n };\n const processingTaskExample = {\n ...completedTaskExample,\n _id: `${completedTaskExample._id}_processing`,\n title: 'Reconcile supplier exceptions',\n status: FlowsActors_Status.PROCESSING,\n taskId: '22222222-2222-4222-8222-222222222223',\n updatedAt: '2026-08-20T09:05:02.000Z',\n finishedAt: undefined,\n };\n const summarizeTask = (task: typeof completedTaskExample) => ({\n _id: task._id,\n taskId: task.taskId,\n status: task.status,\n title: task.title,\n });\n\n return resourceSpecification<undefined, Core, Main>(\n flowActorTasksPolymorphicFactories[resourceType],\n FlowActorTaskBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Track one addressable unit of agent work, including its lifecycle status, outputs, artifacts, and terminal outcome.',\n businessRole: 'The work record an authorized integration polls, collects results from, or cancels independently of the conversation that started it.',\n lifecycleRole: 'Materialised when a turn cannot complete inline — today that means the client asked for a non-blocking turn (`blocking: false`); the approval-pause trigger arrives with Phase 2 and is not live yet. Advances through working, and closes on completion, failure, or cancellation.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowActorTaskBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'flowActorTasksPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: resourceTypeMemberName,\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'Derived from the canonical `Actors_Task_Schema` — the same contract the platform persists as `wildoApplicationActorTasks`. Not a bespoke A2A task model.',\n 'Three variants under `FLOW_ACTOR_TASK_SCOPE_VARIANTS` — user row is `USER_SELF`; org/app rows are `ORGANIZATIONS`/`APPLICATION` (machine-owned).',\n '`input` and `output` carry no field specification because they are untyped passthrough (`any`) inherited from the canonical task contract, and the specification framework offers no builder for an untyped field. Their portability provenance IS declared at the schema — `input` is subject-provided, `output` is derived — so the classification a portability bundle needs is not lost by the omission. Neither is written by the A2A transport today.',\n ],\n },\n\n fields: {\n taskId: schemaShape.taskId.stringSpec({\n meaning: 'Stable business id of the task, and the identity the A2A protocol addresses.',\n whyItMatters: 'This is the value returned as `Task.id` and accepted by `tasks/get` / `tasks/cancel` — the only handle an A2A client holds. Uniqueness is enforced PER VARIANT despite the `scope: \\'global\\'` decorator — the three variants are separate stores and no index spans them. Nothing depends on family-wide uniqueness, and a v4 uuid collision is not a real risk. Note what that does NOT mean: the read is still OWNER-FIRST. `readTask` filters on the owner fields derived from the authenticated principal AND the id, so a task belonging to another tenant answers exactly as a non-existent one does. Uniqueness is not what authorizes the read under either reading, so do not reason from it to isolation. Two earlier revisions of this sentence were wrong in opposite directions: one claimed the id \"must resolve without the caller knowing which owner scope the task belongs to\" (a lookup this resource does not perform), and one claimed `scope: \\'global\\'` gives FAMILY-WIDE uniqueness — it does not, because `global` means \"unique across the entire COLLECTION\" and each polymorphic variant is its own collection.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Current lifecycle state of the work.',\n whyItMatters: 'It is the field the A2A surface projects onto protocol task states: `READY`/`PENDING` → submitted, `PROCESSING` → working, `AWAITING_APPROVAL` → input-required, `COMPLETED` → completed, `FAILED`/`ABORTED` → failed, `CANCELLED` → canceled. A status that depends on a pod being alive is reported as failed once its liveness lease has expired, so an abandoned task never reads as still working. Interrupted statuses are exempt: a task waiting on a human holds no lease by design, and applying the abandonment rule to it would read a correct pause as a dead pod.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowsActors_Status',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FlowsActors_Status.READY]: { meaning: 'Materialised and acknowledged, not yet processing — A2A `submitted`.' },\n [FlowsActors_Status.PENDING]: { meaning: 'Accepted but not yet actively processing — also projects to A2A `submitted`.' },\n [FlowsActors_Status.PROCESSING]: { meaning: 'Actively running — the agent is working the task. A2A `working`.' },\n [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Interrupted at a human-in-the-loop approval boundary, waiting on a human decision. A2A `input-required` — non-terminal. NOT EMITTED YET: the pausing runtime arrives with Phase 2; the state is declared so the projection is complete.' },\n [FlowsActors_Status.COMPLETED]: { meaning: 'Work finished successfully; outputs and artifacts are final. A2A `completed` (terminal).' },\n [FlowsActors_Status.FAILED]: { meaning: 'Work ended in error. A2A `failed` (terminal). Also the state an abandoned task resolves to when its liveness lease has expired.' },\n [FlowsActors_Status.CANCELLED]: { meaning: 'Cancelled before completion, via `tasks/cancel`. A2A `canceled` (terminal) — the record survives so the client can read its final state.' },\n [FlowsActors_Status.ABORTED]: { meaning: 'Halted by the runtime rather than by a caller (e.g. a circuit breaker tripped). Projects to A2A `failed` (terminal).' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n contextId: schemaShape.contextId.stringSpec({\n meaning: 'The A2A conversation thread this task belongs to.',\n whyItMatters: 'Indexed so a client can enumerate every task of one conversation without walking execution records — the two planes stay queryable independently.',\n semanticRole: 'identifier',\n }),\n\n resourceServerInstanceRef: schemaShape.resourceServerInstanceRef.stringSpec({\n meaning: 'Which A2A agent (resource-server instance) this task was created through. The default, unnamed agent is stored under a reserved sentinel rather than left empty.',\n whyItMatters: 'Part of the read and cancel FILTER, not descriptive metadata. A2A agents are declared as separate resource servers with per-instance token audiences, so an agent must have no side-door into another agent\\'s work. Without this dimension a token bound to one agent could read and cancel tasks created through another whenever both resolved to the same owner scope — and since `title` carries the opening characters of the originating prompt, that also disclosed prompt text across the boundary.',\n semanticRole: 'identifier',\n }),\n\n title: schemaShape.title.stringSpec({\n meaning: 'Short human-readable name for the work, shown wherever a task is listed.',\n whyItMatters: 'CONTENT-BEARING, and part of the summary projection: the A2A transport fills it with the opening characters of the ORIGINATING PROMPT. That is why it is classified as subject-provided for portability rather than observed, and why the read filter carries the agent-instance and machine-credential axes — a cross-principal read of this field discloses prompt text.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n description: schemaShape.description.stringSpec({\n meaning: 'Longer free-text description of the work, when the producer supplied one.',\n whyItMatters: 'Subject-provided content, like the title. Absent on an A2A-materialised task today — the transport sets only a title — but retained from the canonical task contract so an orchestration producer can populate it without a schema change.',\n }),\n\n topic: schemaShape.topic.stringSpec({\n meaning: 'Subject-matter grouping for the work, when the producer supplied one.',\n whyItMatters: 'Subject-provided, and unset by the A2A transport. Kept from the canonical contract for the same reason as the description.',\n }),\n\n artifacts: schemaShape.artifacts.arraySpec({\n meaning: 'Artifacts the work produced, projected onto the protocol object for the client to collect.',\n elementMeaning: 'One artifact the work produced — its stable reference plus the typed parts that carry the content.',\n whyItMatters: 'DERIVED, like the output, and the one field of this family that reaches the wire as structured content. No writer populates it yet: the projection exists and is correct, but is unreachable by construction until an orchestration producer sets it.',\n }),\n\n machineCredentialId: schemaShape.machineCredentialId.stringSpec({\n meaning: 'Which machine credential opened this task. A user-delegated turn stores a reserved sentinel, because there the human is the principal.',\n whyItMatters: 'Part of the read and cancel FILTER, alongside the owner scope and the agent instance. The scope foreign key does not identify the principal on the machine variants: the application scope is a deployment singleton, so every application-scope client resolves to the same owner, and the organization scope is shared by every machine client of one tenant. Without this axis a separately-credentialed client could read and cancel another client\\'s work — and the title carries the opening characters of the originating prompt.',\n semanticRole: 'identifier',\n }),\n\n flowActorExecutionId: schemaShape.flowActorExecutionId.stringSpec({\n meaning: 'The conversational execution this task was materialised from, when there was one.',\n whyItMatters: 'A SOFT link, not a foreign key, and optional on purpose: a task is owned by its scope, not by an execution, so it may outlive — or exist without — the conversation that produced it. Deleting a conversation must never delete its work records.',\n semanticRole: 'identifier',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the task was materialised.',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the task last advanced — a status transition, an artifact append, or a recorded outcome.',\n temporalRole: 'modified',\n }),\n\n finishedAt: schemaShape.finishedAt.dateSpec({\n meaning: 'When the task reached a terminal state (completed, failed, or canceled).',\n whyItMatters: 'Set when the repair — or a normal completion — lands. The sweep selects candidates by `updatedAt` older than a grace window AND a non-terminal `status`, then lets the liveness lease decide.',\n temporalRole: 'occurred',\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Materialise a task when a turn cannot complete inline — today, when the client asked for immediate return. The approval-pause trigger arrives with Phase 2.',\n outcome: 'The client receives an addressable task it can poll and cancel, instead of waiting on a response that will not arrive.',\n whenToUse: 'Never called directly by a client. A task comes into existence as a consequence of a turn, and only when that turn cannot answer in the response.',\n },\n [Op.READ]: {\n purpose: 'Read one addressable unit of agent work and its current lifecycle state.',\n outcome: 'The caller learns whether the work is queued, active, waiting, complete, failed, or canceled, and receives any available artifacts.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The task was found within the caller\\'s own scope and is returned in its current state.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to inspect agent work for this user, organization, or application scope.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No task exists for the id in the requested scope.' },\n ],\n rateLimitNote: 'Deliberately NOT rate-limited or budget-gated on the A2A path: polling a task is not a turn and consumes no model tokens, so throttling it would penalise exactly the clients that correctly asked not to block.',\n examples: [{\n title: `Inspect completed ${exampleScope.scopeLabel} agent work`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedTaskExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `Inspect completed ${exampleScope.scopeLabel} agent work with context`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedTaskExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `Inspect the compact ${exampleScope.scopeLabel} task state`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: summarizeTask(completedTaskExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List agent work visible in the requested scope, optionally filtered by conversation context or lifecycle status.',\n outcome: 'The caller can reconcile the work for one conversation or monitor unfinished work without walking conversation records.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller\\'s own tasks, scoped to their owner.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to list agent work for this scope.' },\n ],\n examples: [{\n title: `List active ${exampleScope.scopeLabel} tasks for one conversation`,\n request: {\n ...exampleScope.scopeIdentity,\n contextId: completedTaskExample.contextId,\n status: FlowsActors_Status.PROCESSING,\n page: 1,\n limit: 20,\n sort: 'updatedAt:desc',\n },\n response: createFlowActorTaskPage([processingTaskExample, completedTaskExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `List ${exampleScope.scopeLabel} tasks with resource context`,\n request: { ...exampleScope.scopeIdentity, contextId: completedTaskExample.contextId, page: 1, limit: 20 },\n response: createFlowActorTaskPage([completedTaskExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `List compact ${exampleScope.scopeLabel} task states`,\n request: { ...exampleScope.scopeIdentity, contextId: completedTaskExample.contextId, page: 1, limit: 20 },\n response: createFlowActorTaskPage([\n summarizeTask(processingTaskExample as typeof completedTaskExample),\n summarizeTask(completedTaskExample),\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Advance the task — status transitions, appended artifacts, terminal outcome — and record cancellation.',\n outcome: 'The stored record reflects what actually happened to the work, which is what every other reader depends on.',\n whenToUse: 'Backs `tasks/cancel`, which is a STATUS TRANSITION rather than a delete: the A2A spec requires cancel to return the task\\'s updated state, so the record must survive it.',\n },\n [Op.DELETE]: {\n purpose: 'Permanently remove one stored unit of agent work from the requested scope.',\n outcome: 'The selected task record and its stored results are no longer available.',\n whenToUse: 'Use for deliberate history cleanup after the task is no longer needed; use cancellation instead when active work must stop but its final state must remain observable.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The selected task record was removed.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks task-removal authority in the requested scope.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No task exists for the id in the requested scope.' },\n ],\n examples: [{\n title: `Remove completed ${exampleScope.scopeLabel} agent work`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: { id: completedTaskExample._id, deletedAt: '2026-08-20T10:20:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n\n businessConstraints: [\n 'A task belongs to exactly ONE owner scope — the injected owner FK is the only authority over its lifetime. The link to a conversational execution is soft and optional, and never governs deletion.',\n 'Not every turn produces a task. Turns that complete inline return a Message and write no row; a task is materialised only when the work needs an addressable lifecycle.',\n 'Cancellation is a status transition, never a deletion — a canceled task remains readable so the client can observe its final state.',\n 'A non-terminal task whose liveness lease has expired is reported as failed: the executing process died, and a task must never read as working forever.',\n ],\n }),\n // The owner is the injected scope FK, anchored by the `<SCOPE> → *FlowActorTasks`\n // primary-scope composition edge in `resources-registry.shared.core.definitions.ts`\n // (generated by `createPolymorphicScopeRelationships`). Feeds the spec ↔ registry\n // alignment guard and must match per variant.\n { resourcePrimaryScope: flowTaskPrimaryScopeByResourceType[resourceType] },\n );\n}\n\nexport const userFlowActorTasksResourceSpecification = buildFlowActorTaskResourceSpecification(\n CoreResourceType.USER_FLOW_ACTOR_TASKS,\n 'USER_FLOW_ACTOR_TASKS',\n);\n\nexport const organizationFlowActorTasksResourceSpecification = buildFlowActorTaskResourceSpecification(\n CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS,\n 'ORGANIZATION_FLOW_ACTOR_TASKS',\n);\n\nexport const applicationFlowActorTasksResourceSpecification = buildFlowActorTaskResourceSpecification(\n CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS,\n 'APPLICATION_FLOW_ACTOR_TASKS',\n);\n"]}
1
+ {"version":3,"file":"flow-actor-tasks.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAg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AC1F;gBACD,cAAc,EAAE;oBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,iEAAiE,EAAE;oBACvH,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,mDAAmD,EAAE;iBAC1G;gBACD,QAAQ,EAAE,CAAC;wBACT,KAAK,EAAE,oBAAoB,YAAY,CAAC,UAAU,aAAa;wBAC/D,OAAO,EAAE,EAAE,GAAG,YAAY,CAAC,aAAa,EAAE,GAAG,YAAY,CAAC,gBAAgB,EAAE;wBAC5E,QAAQ,EAAE,EAAE,EAAE,EAAE,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,0BAA0B,EAAE;wBACjF,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QAED,mBAAmB,EAAE;YACnB,qMAAqM;YACrM,yKAAyK;YACzK,qIAAqI;YACrI,wJAAwJ;SACzJ;KACF,CAAC;IACF,kFAAkF;IAClF,oFAAoF;IACpF,kFAAkF;IAClF,8CAA8C;IAC9C,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,uCAAuC,GAAG,uCAAuC,CAC5F,gBAAgB,CAAC,qBAAqB,EACtC,uBAAuB,CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,+CAA+C,GAAG,uCAAuC,CACpG,gBAAgB,CAAC,6BAA6B,EAC9C,+BAA+B,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,uCAAuC,CACnG,gBAAgB,CAAC,4BAA4B,EAC7C,8BAA8B,CAC/B,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n FlowActorTaskBaseSchema,\n FlowsActors_Status,\n ResourcePrimaryScope,\n flowActorTasksPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { type CoreResourceTypeMemberName, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * Framework-owned specification for the `flowActorTasks` POLYMORPHIC family: the\n * persisted WORK record that backs the A2A `Task` object. One base record is\n * stamped out as three genuine single-scope variants, each owned by its injected\n * owner FK:\n * - `userFlowActorTasks` (USER_SELF — user-delegated A2A)\n * - `organizationFlowActorTasks` (ORGANIZATIONS — org-machine A2A)\n * - `applicationFlowActorTasks` (APPLICATION — app-machine A2A)\n *\n * ## This is a different plane from `flowActorExecutions`\n *\n * Executions own CONVERSATIONAL session history (the message log). Tasks own an\n * addressable, pollable, cancelable WORK lifecycle. The architecture keeps them\n * apart deliberately — an A2A treatment links both concrete records rather than\n * copying the conversation into the task. A task therefore carries only a SOFT\n * link (`flowActorExecutionId`), not a declared foreign key, so it can outlive the\n * conversation that produced it.\n *\n * ## Not every turn has one\n *\n * A task is materialised only when the turn cannot complete inline — the client\n * asked for it (`blocking: false`) or the turn reached an interrupted state\n * (approval pause → `input-required`). Both triggers are live: the pause is proven end to end by\n * `examples/wonder-todos/e2e/a2a-approval-pause.e2e.ts` (the task reaches `input-required` and\n * persists the decision it waits on) and its release by `a2a-approval-resume.e2e.ts` (the task\n * LEAVES `input-required` once its execution moves on). A blocking turn that answers in one shot\n * returns a `Message` and writes no task row; the A2A spec permits both shapes.\n *\n * The default API READ/LIST are the per-owner HTTP surface. They do NOT govern the A2A\n * `tasks/get` path, which reads through the system-access primitive and isolates by an\n * owner filter derived from the authenticated principal — so a cross-tenant read fails\n * closed, but by that filter rather than by these roles. CREATE/UPDATE are internal\n * (INTERNAL_CALL, service-tier): only the runtime materialises a task and advances\n * its lifecycle via `*AsSystem`. `tasks/cancel` is an UPDATE, never a delete — the\n * spec requires cancel to return the task's updated state.\n */\n\ntype FlowTaskResourceType =\n | CoreResourceType.USER_FLOW_ACTOR_TASKS\n | CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS\n | CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS;\ntype FlowTaskResourceTypeMember = CoreResourceTypeMemberName<FlowTaskResourceType>;\n\ninterface FlowActorTaskScopeExample {\n readonly scopeIdentity: Readonly<Record<string, string>>;\n readonly resourceIdentity: Readonly<Record<string, string>>;\n readonly scopeLabel: string;\n readonly machineCredentialId: string;\n}\n\n/** Exhaustive owner/route projection for the three public task contracts. */\nfunction createFlowActorTaskScopeExample(resourceType: FlowTaskResourceType): FlowActorTaskScopeExample {\n switch (resourceType) {\n case CoreResourceType.USER_FLOW_ACTOR_TASKS:\n return {\n scopeIdentity: { userId: 'user_01JEXAMPLE' },\n resourceIdentity: { userFlowActorTaskId: 'flow_task_user_01JEXAMPLE' },\n scopeLabel: 'user',\n machineCredentialId: FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n };\n case CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS:\n return {\n scopeIdentity: { organizationId: 'org_01JEXAMPLE' },\n resourceIdentity: { organizationFlowActorTaskId: 'flow_task_org_01JEXAMPLE' },\n scopeLabel: 'organization',\n machineCredentialId: 'machine_credential_org_finance_agent',\n };\n case CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS:\n return {\n scopeIdentity: { applicationId: 'app_01JEXAMPLE' },\n resourceIdentity: { applicationFlowActorTaskId: 'flow_task_app_01JEXAMPLE' },\n scopeLabel: 'application',\n machineCredentialId: 'machine_credential_app_finance_agent',\n };\n default: {\n const exhaustiveResourceType: never = resourceType;\n throw new Error(`Unsupported Flow Actor task resource type: ${String(exhaustiveResourceType)}`);\n }\n }\n}\n\nfunction createFlowActorTaskPage(data: readonly unknown[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: 1 },\n };\n}\n\nconst flowTaskPrimaryScopeByResourceType: Record<FlowTaskResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.USER_FLOW_ACTOR_TASKS]: ResourcePrimaryScope.USER_SELF,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype Cfg = ReturnType<(typeof flowActorTasksPolymorphicFactories)[CoreResourceType.USER_FLOW_ACTOR_TASKS]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof FlowActorTaskBaseSchema;\n\nfunction buildFlowActorTaskResourceSpecification(\n resourceType: FlowTaskResourceType,\n resourceTypeMemberName: FlowTaskResourceTypeMember,\n) {\n const exampleScope = createFlowActorTaskScopeExample(resourceType);\n const completedTaskExample = {\n _id: Object.values(exampleScope.resourceIdentity)[0],\n title: 'Prepare the weekly purchase-approval brief',\n status: FlowsActors_Status.COMPLETED,\n taskId: '22222222-2222-4222-8222-222222222222',\n flowActorExecutionId: '11111111-1111-4111-8111-111111111111',\n resourceServerInstanceRef: 'finance-operations-agent',\n machineCredentialId: exampleScope.machineCredentialId,\n contextId: 'finance-weekly-review-2026-w34',\n artifacts: [],\n createdAt: '2026-08-20T08:30:00.000Z',\n updatedAt: '2026-08-20T08:30:14.000Z',\n finishedAt: '2026-08-20T08:30:14.000Z',\n ...exampleScope.scopeIdentity,\n };\n const processingTaskExample = {\n ...completedTaskExample,\n _id: `${completedTaskExample._id}_processing`,\n title: 'Reconcile supplier exceptions',\n status: FlowsActors_Status.PROCESSING,\n taskId: '22222222-2222-4222-8222-222222222223',\n updatedAt: '2026-08-20T09:05:02.000Z',\n finishedAt: undefined,\n };\n const summarizeTask = (task: typeof completedTaskExample) => ({\n _id: task._id,\n taskId: task.taskId,\n status: task.status,\n title: task.title,\n });\n\n return resourceSpecification<undefined, Core, Main>(\n flowActorTasksPolymorphicFactories[resourceType],\n FlowActorTaskBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Track one addressable unit of agent work, including its lifecycle status, outputs, artifacts, and terminal outcome.',\n businessRole: 'The work record an authorized integration polls, collects results from, or cancels independently of the conversation that started it.',\n lifecycleRole: 'Materialised when a turn cannot complete inline: either the client asked for a non-blocking turn (`blocking: false`), or the turn hit an approval pause and reached `input-required`. Advances through working, and closes on completion, failure, or cancellation.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowActorTaskBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'flowActorTasksPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: resourceTypeMemberName,\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'Derived from the canonical `Actors_Task_Schema` — the same contract the platform persists as `wildoApplicationActorTasks`. Not a bespoke A2A task model.',\n 'Three variants under `FLOW_ACTOR_TASK_SCOPE_VARIANTS` — user row is `USER_SELF`; org/app rows are `ORGANIZATIONS`/`APPLICATION` (machine-owned).',\n '`input` and `output` carry no field specification because they are untyped passthrough (`any`) inherited from the canonical task contract, and the specification framework offers no builder for an untyped field. Their portability provenance IS declared at the schema — `input` is subject-provided, `output` is derived — so the classification a portability bundle needs is not lost by the omission. Neither is written by the A2A transport today.',\n ],\n },\n\n fields: {\n taskId: schemaShape.taskId.stringSpec({\n meaning: 'Stable business id of the task, and the identity the A2A protocol addresses.',\n whyItMatters: 'This is the value returned as `Task.id` and accepted by `tasks/get` / `tasks/cancel` — the only handle an A2A client holds. Uniqueness is enforced PER VARIANT despite the `scope: \\'global\\'` decorator — the three variants are separate stores and no index spans them. Nothing depends on family-wide uniqueness, and a v4 uuid collision is not a real risk. Note what that does NOT mean: the read is still OWNER-FIRST. `readTask` filters on the owner fields derived from the authenticated principal AND the id, so a task belonging to another tenant answers exactly as a non-existent one does. Uniqueness is not what authorizes the read under either reading, so do not reason from it to isolation. Two earlier revisions of this sentence were wrong in opposite directions: one claimed the id \"must resolve without the caller knowing which owner scope the task belongs to\" (a lookup this resource does not perform), and one claimed `scope: \\'global\\'` gives FAMILY-WIDE uniqueness — it does not, because `global` means \"unique across the entire COLLECTION\" and each polymorphic variant is its own collection.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Current lifecycle state of the work.',\n whyItMatters: 'It is the field the A2A surface projects onto protocol task states: `READY`/`PENDING` → submitted, `PROCESSING` → working, `AWAITING_APPROVAL` → input-required, `COMPLETED` → completed, `FAILED`/`ABORTED` → failed, `CANCELLED` → canceled. A status that depends on a pod being alive is reported as failed once its liveness lease has expired, so an abandoned task never reads as still working. Interrupted statuses are exempt: a task waiting on a human holds no lease by design, and applying the abandonment rule to it would read a correct pause as a dead pod.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowsActors_Status',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FlowsActors_Status.READY]: { meaning: 'Materialised and acknowledged, not yet processing — A2A `submitted`.' },\n [FlowsActors_Status.PENDING]: { meaning: 'Accepted but not yet actively processing — also projects to A2A `submitted`.' },\n [FlowsActors_Status.PROCESSING]: { meaning: 'Actively running — the agent is working the task. A2A `working`.' },\n [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Interrupted at a human-in-the-loop approval boundary, waiting on a human decision. A2A `input-required` — non-terminal. NOT EMITTED YET: the pausing runtime arrives with Phase 2; the state is declared so the projection is complete.' },\n [FlowsActors_Status.COMPLETED]: { meaning: 'Work finished successfully; outputs and artifacts are final. A2A `completed` (terminal).' },\n [FlowsActors_Status.FAILED]: { meaning: 'Work ended in error. A2A `failed` (terminal). Also the state an abandoned task resolves to when its liveness lease has expired.' },\n [FlowsActors_Status.CANCELLED]: { meaning: 'Cancelled before completion, via `tasks/cancel`. A2A `canceled` (terminal) — the record survives so the client can read its final state.' },\n [FlowsActors_Status.ABORTED]: { meaning: 'Halted by the runtime rather than by a caller (e.g. a circuit breaker tripped). Projects to A2A `failed` (terminal).' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n contextId: schemaShape.contextId.stringSpec({\n meaning: 'The A2A conversation thread this task belongs to.',\n whyItMatters: 'Indexed so a client can enumerate every task of one conversation without walking execution records — the two planes stay queryable independently.',\n semanticRole: 'identifier',\n }),\n\n resourceServerInstanceRef: schemaShape.resourceServerInstanceRef.stringSpec({\n meaning: 'Which A2A agent (resource-server instance) this task was created through. The default, unnamed agent is stored under a reserved sentinel rather than left empty.',\n whyItMatters: 'Part of the read and cancel FILTER, not descriptive metadata. A2A agents are declared as separate resource servers with per-instance token audiences, so an agent must have no side-door into another agent\\'s work. Without this dimension a token bound to one agent could read and cancel tasks created through another whenever both resolved to the same owner scope — and since `title` carries the opening characters of the originating prompt, that also disclosed prompt text across the boundary.',\n semanticRole: 'identifier',\n }),\n\n title: schemaShape.title.stringSpec({\n meaning: 'Short human-readable name for the work, shown wherever a task is listed.',\n whyItMatters: 'CONTENT-BEARING, and part of the summary projection: the A2A transport fills it with the opening characters of the ORIGINATING PROMPT. That is why it is classified as subject-provided for portability rather than observed, and why the read filter carries the agent-instance and machine-credential axes — a cross-principal read of this field discloses prompt text.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n description: schemaShape.description.stringSpec({\n meaning: 'Longer free-text description of the work, when the producer supplied one.',\n whyItMatters: 'Subject-provided content, like the title. Absent on an A2A-materialised task today — the transport sets only a title — but retained from the canonical task contract so an orchestration producer can populate it without a schema change.',\n }),\n\n topic: schemaShape.topic.stringSpec({\n meaning: 'Subject-matter grouping for the work, when the producer supplied one.',\n whyItMatters: 'Subject-provided, and unset by the A2A transport. Kept from the canonical contract for the same reason as the description.',\n }),\n\n artifacts: schemaShape.artifacts.arraySpec({\n meaning: 'Artifacts the work produced, projected onto the protocol object for the client to collect.',\n elementMeaning: 'One artifact the work produced — its stable reference plus the typed parts that carry the content.',\n whyItMatters: 'DERIVED, like the output, and the one field of this family that reaches the wire as structured content. No writer populates it yet: the projection exists and is correct, but is unreachable by construction until an orchestration producer sets it.',\n }),\n\n machineCredentialId: schemaShape.machineCredentialId.stringSpec({\n meaning: 'Which machine credential opened this task. A user-delegated turn stores a reserved sentinel, because there the human is the principal.',\n whyItMatters: 'Part of the read and cancel FILTER, alongside the owner scope and the agent instance. The scope foreign key does not identify the principal on the machine variants: the application scope is a deployment singleton, so every application-scope client resolves to the same owner, and the organization scope is shared by every machine client of one tenant. Without this axis a separately-credentialed client could read and cancel another client\\'s work — and the title carries the opening characters of the originating prompt.',\n semanticRole: 'identifier',\n }),\n\n flowActorExecutionId: schemaShape.flowActorExecutionId.stringSpec({\n meaning: 'The conversational execution this task was materialised from, when there was one.',\n whyItMatters: 'A SOFT link, not a foreign key, and optional on purpose: a task is owned by its scope, not by an execution, so it may outlive — or exist without — the conversation that produced it. Deleting a conversation must never delete its work records.',\n semanticRole: 'identifier',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the task was materialised.',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the task last advanced — a status transition, an artifact append, or a recorded outcome.',\n temporalRole: 'modified',\n }),\n\n finishedAt: schemaShape.finishedAt.dateSpec({\n meaning: 'When the task reached a terminal state (completed, failed, or canceled).',\n whyItMatters: 'Set when the repair — or a normal completion — lands. The sweep selects candidates by `updatedAt` older than a grace window AND a non-terminal `status`, then lets the liveness lease decide.',\n temporalRole: 'occurred',\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Materialise a task when a turn cannot complete inline — today, when the client asked for immediate return. The approval-pause trigger arrives with Phase 2.',\n outcome: 'The client receives an addressable task it can poll and cancel, instead of waiting on a response that will not arrive.',\n whenToUse: 'Never called directly by a client. A task comes into existence as a consequence of a turn, and only when that turn cannot answer in the response.',\n },\n [Op.READ]: {\n purpose: 'Read one addressable unit of agent work and its current lifecycle state.',\n outcome: 'The caller learns whether the work is queued, active, waiting, complete, failed, or canceled, and receives any available artifacts.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The task was found within the caller\\'s own scope and is returned in its current state.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to inspect agent work for this user, organization, or application scope.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No task exists for the id in the requested scope.' },\n ],\n rateLimitNote: 'Deliberately NOT rate-limited or budget-gated on the A2A path: polling a task is not a turn and consumes no model tokens, so throttling it would penalise exactly the clients that correctly asked not to block.',\n examples: [{\n title: `Inspect completed ${exampleScope.scopeLabel} agent work`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedTaskExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `Inspect completed ${exampleScope.scopeLabel} agent work with context`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedTaskExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `Inspect the compact ${exampleScope.scopeLabel} task state`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: summarizeTask(completedTaskExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List agent work visible in the requested scope, optionally filtered by conversation context or lifecycle status.',\n outcome: 'The caller can reconcile the work for one conversation or monitor unfinished work without walking conversation records.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller\\'s own tasks, scoped to their owner.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to list agent work for this scope.' },\n ],\n examples: [{\n title: `List active ${exampleScope.scopeLabel} tasks for one conversation`,\n request: {\n ...exampleScope.scopeIdentity,\n contextId: completedTaskExample.contextId,\n status: FlowsActors_Status.PROCESSING,\n page: 1,\n limit: 20,\n sort: 'updatedAt:desc',\n },\n response: createFlowActorTaskPage([processingTaskExample, completedTaskExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `List ${exampleScope.scopeLabel} tasks with resource context`,\n request: { ...exampleScope.scopeIdentity, contextId: completedTaskExample.contextId, page: 1, limit: 20 },\n response: createFlowActorTaskPage([completedTaskExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `List compact ${exampleScope.scopeLabel} task states`,\n request: { ...exampleScope.scopeIdentity, contextId: completedTaskExample.contextId, page: 1, limit: 20 },\n response: createFlowActorTaskPage([\n summarizeTask(processingTaskExample as typeof completedTaskExample),\n summarizeTask(completedTaskExample),\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Advance the task — status transitions, appended artifacts, terminal outcome — and record cancellation.',\n outcome: 'The stored record reflects what actually happened to the work, which is what every other reader depends on.',\n whenToUse: 'Backs `tasks/cancel`, which is a STATUS TRANSITION rather than a delete: the A2A spec requires cancel to return the task\\'s updated state, so the record must survive it.',\n },\n [Op.DELETE]: {\n purpose: 'Permanently remove one stored unit of agent work from the requested scope.',\n outcome: 'The selected task record and its stored results are no longer available.',\n whenToUse: 'Use for deliberate history cleanup after the task is no longer needed; use cancellation instead when active work must stop but its final state must remain observable.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The selected task record was removed.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks task-removal authority in the requested scope.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No task exists for the id in the requested scope.' },\n ],\n examples: [{\n title: `Remove completed ${exampleScope.scopeLabel} agent work`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: { id: completedTaskExample._id, deletedAt: '2026-08-20T10:20:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n\n businessConstraints: [\n 'A task belongs to exactly ONE owner scope — the injected owner FK is the only authority over its lifetime. The link to a conversational execution is soft and optional, and never governs deletion.',\n 'Not every turn produces a task. Turns that complete inline return a Message and write no row; a task is materialised only when the work needs an addressable lifecycle.',\n 'Cancellation is a status transition, never a deletion — a canceled task remains readable so the client can observe its final state.',\n 'A non-terminal task whose liveness lease has expired is reported as failed: the executing process died, and a task must never read as working forever.',\n ],\n }),\n // The owner is the injected scope FK, anchored by the `<SCOPE> → *FlowActorTasks`\n // primary-scope composition edge in `resources-registry.shared.core.definitions.ts`\n // (generated by `createPolymorphicScopeRelationships`). Feeds the spec ↔ registry\n // alignment guard and must match per variant.\n { resourcePrimaryScope: flowTaskPrimaryScopeByResourceType[resourceType] },\n );\n}\n\nexport const userFlowActorTasksResourceSpecification = buildFlowActorTaskResourceSpecification(\n CoreResourceType.USER_FLOW_ACTOR_TASKS,\n 'USER_FLOW_ACTOR_TASKS',\n);\n\nexport const organizationFlowActorTasksResourceSpecification = buildFlowActorTaskResourceSpecification(\n CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS,\n 'ORGANIZATION_FLOW_ACTOR_TASKS',\n);\n\nexport const applicationFlowActorTasksResourceSpecification = buildFlowActorTaskResourceSpecification(\n CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS,\n 'APPLICATION_FLOW_ACTOR_TASKS',\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"public-layout-main-container.frontend-component.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,oCAAoC,EAC1C,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,0CAA0C,QAErD,CAAC;AAEH,eAAO,MAAM,wDAAwD,EAAE,oCAcnE,CAAC"}
1
+ {"version":3,"file":"public-layout-main-container.frontend-component.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,oCAAoC,EAC1C,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,0CAA0C,QAErD,CAAC;AAEH,eAAO,MAAM,wDAAwD,EAAE,oCAsBnE,CAAC"}
@@ -13,10 +13,15 @@ export const publicLayoutsMainContainerFrontendComponentSpecification = buildLow
13
13
  consumerExportName: 'PublicLayout_MainContainer',
14
14
  propsExportName: 'PublicLayoutPreset_MainContainer_DefaultProps',
15
15
  propsDeclarationKind: CodeDeclarationKind.INTERFACE,
16
- purpose: 'Public / unauthenticated layout container with optional centered card chrome.',
17
- uiRole: 'Minimal full-viewport wrapper driven by `usePublicShellLayout`.',
16
+ purpose: 'Public / unauthenticated layout container with optional centered card chrome, and — when the '
17
+ + 'application opts in via `publicShellIdentityMode` — the surface identity at the top of that card.',
18
+ uiRole: 'Minimal full-viewport wrapper driven by `usePublicShellLayout`. In card mode it may open the card '
19
+ + 'with a brand header: the mark when one resolves, and the name — set from the TYPOGRAPHY.HEADING '
20
+ + 'recipe, and not a heading element, since the card content owns the page heading.',
18
21
  useWhen: 'Use for auth flows, static marketing content, and other pre-app surfaces.',
19
22
  avoidWhen: 'Avoid for authenticated app shells — use `APP_LAYOUTS_MAIN_CONTAINER`.',
20
- translationRole: 'Static layout; per-surface copy is owned by child routes and layouts.',
23
+ translationRole: 'Static layout; per-surface copy is owned by child routes and layouts. The optional brand '
24
+ + 'header renders the application or shell NAME, which is configured data rather than '
25
+ + 'translated copy, and is therefore not a label key.',
21
26
  });
22
27
  //# sourceMappingURL=public-layout-main-container.frontend-component.specification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-layout-main-container.frontend-component.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EACL,sCAAsC,GAEvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wDAAwD,EAAE,MAAM,gDAAgD,CAAC;AAE1H,MAAM,CAAC,MAAM,0CAA0C,GAAG,sCAAsC,CAAC;IAC/F,YAAY,EAAE,qBAAqB,CAAC,6BAA6B;CAClE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wDAAwD,GACnE,wDAAwD,CAAC;IACvD,aAAa,EAAE,qBAAqB,CAAC,6BAA6B;IAClE,UAAU,EAAE,+BAA+B;IAC3C,WAAW,EAAE,yCAAyC;IACtD,wBAAwB,EAAE,0CAA0C;IACpE,kBAAkB,EAAE,4BAA4B;IAChD,eAAe,EAAE,+CAA+C;IAChE,oBAAoB,EAAE,mBAAmB,CAAC,SAAS;IACnD,OAAO,EAAE,+EAA+E;IACxF,MAAM,EAAE,iEAAiE;IACzE,OAAO,EAAE,2EAA2E;IACpF,SAAS,EAAE,wEAAwE;IACnF,eAAe,EAAE,uEAAuE;CACzF,CAAC,CAAC","sourcesContent":["import { CodeDeclarationKind } from '@wildo-ai/zod-decorators';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport {\n buildFrontendComponentSpecificationKey,\n type FrontendComponentSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { buildLowLevelPresetWrapperFrontendComponentSpecification } from '../form/_low-level-preset-wrapper-spec.factory';\n\nexport const publicLayoutsMainContainerSpecificationKey = buildFrontendComponentSpecificationKey({\n componentRef: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER,\n});\n\nexport const publicLayoutsMainContainerFrontendComponentSpecification: FrontendComponentSpecificationConfig =\n buildLowLevelPresetWrapperFrontendComponentSpecification({\n componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER,\n memberName: 'PUBLIC_LAYOUTS_MAIN_CONTAINER',\n componentId: 'framework.public-layouts.main-container',\n implementationExportName: 'PublicLayoutPreset_MainContainer_Default',\n consumerExportName: 'PublicLayout_MainContainer',\n propsExportName: 'PublicLayoutPreset_MainContainer_DefaultProps',\n propsDeclarationKind: CodeDeclarationKind.INTERFACE,\n purpose: 'Public / unauthenticated layout container with optional centered card chrome.',\n uiRole: 'Minimal full-viewport wrapper driven by `usePublicShellLayout`.',\n useWhen: 'Use for auth flows, static marketing content, and other pre-app surfaces.',\n avoidWhen: 'Avoid for authenticated app shells — use `APP_LAYOUTS_MAIN_CONTAINER`.',\n translationRole: 'Static layout; per-surface copy is owned by child routes and layouts.',\n });\n"]}
1
+ {"version":3,"file":"public-layout-main-container.frontend-component.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EACL,sCAAsC,GAEvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wDAAwD,EAAE,MAAM,gDAAgD,CAAC;AAE1H,MAAM,CAAC,MAAM,0CAA0C,GAAG,sCAAsC,CAAC;IAC/F,YAAY,EAAE,qBAAqB,CAAC,6BAA6B;CAClE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wDAAwD,GACnE,wDAAwD,CAAC;IACvD,aAAa,EAAE,qBAAqB,CAAC,6BAA6B;IAClE,UAAU,EAAE,+BAA+B;IAC3C,WAAW,EAAE,yCAAyC;IACtD,wBAAwB,EAAE,0CAA0C;IACpE,kBAAkB,EAAE,4BAA4B;IAChD,eAAe,EAAE,+CAA+C;IAChE,oBAAoB,EAAE,mBAAmB,CAAC,SAAS;IACnD,OAAO,EACL,+FAA+F;UAC7F,mGAAmG;IACvG,MAAM,EACJ,oGAAoG;UAClG,kGAAkG;UAClG,kFAAkF;IACtF,OAAO,EAAE,2EAA2E;IACpF,SAAS,EAAE,wEAAwE;IACnF,eAAe,EACb,2FAA2F;UACzF,qFAAqF;UACrF,oDAAoD;CACzD,CAAC,CAAC","sourcesContent":["import { CodeDeclarationKind } from '@wildo-ai/zod-decorators';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport {\n buildFrontendComponentSpecificationKey,\n type FrontendComponentSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { buildLowLevelPresetWrapperFrontendComponentSpecification } from '../form/_low-level-preset-wrapper-spec.factory';\n\nexport const publicLayoutsMainContainerSpecificationKey = buildFrontendComponentSpecificationKey({\n componentRef: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER,\n});\n\nexport const publicLayoutsMainContainerFrontendComponentSpecification: FrontendComponentSpecificationConfig =\n buildLowLevelPresetWrapperFrontendComponentSpecification({\n componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER,\n memberName: 'PUBLIC_LAYOUTS_MAIN_CONTAINER',\n componentId: 'framework.public-layouts.main-container',\n implementationExportName: 'PublicLayoutPreset_MainContainer_Default',\n consumerExportName: 'PublicLayout_MainContainer',\n propsExportName: 'PublicLayoutPreset_MainContainer_DefaultProps',\n propsDeclarationKind: CodeDeclarationKind.INTERFACE,\n purpose:\n 'Public / unauthenticated layout container with optional centered card chrome, and — when the '\n + 'application opts in via `publicShellIdentityMode` — the surface identity at the top of that card.',\n uiRole:\n 'Minimal full-viewport wrapper driven by `usePublicShellLayout`. In card mode it may open the card '\n + 'with a brand header: the mark when one resolves, and the name — set from the TYPOGRAPHY.HEADING '\n + 'recipe, and not a heading element, since the card content owns the page heading.',\n useWhen: 'Use for auth flows, static marketing content, and other pre-app surfaces.',\n avoidWhen: 'Avoid for authenticated app shells — use `APP_LAYOUTS_MAIN_CONTAINER`.',\n translationRole:\n 'Static layout; per-surface copy is owned by child routes and layouts. The optional brand '\n + 'header renders the application or shell NAME, which is configured data rather than '\n + 'translated copy, and is therefore not a label key.',\n });\n"]}
@@ -1,5 +1,5 @@
1
1
  import { CoreResourceOperation as Op } from '@wildo-ai/saas-models';
2
- export declare const userGuidanceStateResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
2
+ export declare const userGuidanceStateResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST | Op.SEARCH, import("zod").ZodObject<{
3
3
  flows: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
4
4
  status: import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").OnboardingStatus>;
5
5
  startedAt: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-state.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/guidance-state.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAM5B,MAAM,uBAAuB,CAAC;AAyO/B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;iCA0BlD,CAAC;AAEF,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;iCAyB1D,CAAC"}
1
+ {"version":3,"file":"guidance-state.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/guidance-state.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAM5B,MAAM,uBAAuB,CAAC;AA4O/B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;iCA0BlD,CAAC;AAEF,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;iCAyB1D,CAAC"}
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
3
3
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';
4
4
  import { CoreResourceOperation as Op, OrganizationGuidanceStateSchema, ResourcePrimaryScope, UserGuidanceStateSchema, organizationGuidanceStateResourceConfiguration_InitializationFactory as organizationGuidanceStateFactory, userGuidanceStateResourceConfiguration_InitializationFactory as userGuidanceStateFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const userGuidanceUI = userGuidancePlatformSource;
7
8
  const orgGuidancePlatformUI = orgGuidancePlatformSource;
8
9
  const orgGuidanceAdminUI = orgGuidanceAdminSource;
@@ -11,6 +12,7 @@ const userGuidanceBase = resourceSpecification(userGuidanceStateFactory, UserGui
11
12
  businessRole: 'The persisted progress map the companion and in-app coach use to avoid repeating finished tours and to resume partial flows.',
12
13
  lifecycleRole: 'App user upserts rows as the guidance engine or admin tooling advances flow state; not a public directory resource.',
13
14
  audience: LabelAudience.END_USER,
15
+ subDomain: EngineResourceSubDomain.GUIDANCE,
14
16
  codeHandling: {
15
17
  mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UserGuidanceStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
16
18
  resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'userGuidanceStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },
@@ -110,6 +112,7 @@ const organizationGuidanceBase = resourceSpecification(organizationGuidanceState
110
112
  businessRole: 'Holds which org-level flows are active, completed, or dismissed so admins and the engine can coordinate org rollout.',
111
113
  lifecycleRole: 'Created/updated by org admins, super-admins, or automation when org guidance policies change; member reads may be allowed in factory for transparency.',
112
114
  audience: LabelAudience.END_USER,
115
+ subDomain: EngineResourceSubDomain.GUIDANCE,
113
116
  codeHandling: {
114
117
  mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'OrganizationGuidanceStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
115
118
  resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'organizationGuidanceStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-state.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/guidance-state.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gDAAgD,IAAI,sBAAsB,EAC1E,mDAAmD,IAAI,yBAAyB,EAChF,2CAA2C,IAAI,0BAA0B,GAC1E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,+BAA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,mFAAmF,EAAE,SAAS,EAAE,yCAAyC,EAAE;QACnK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0GAA0G,EAAE,SAAS,EAAE,gDAAgD,EAAE;KAClM;CACF,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,8CAA8C,CAC1G,mCAAmC,CAAC,6BAA6B,CAAC,qBAAqB,CAAC,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAC,EAC5I,wBAAwB,EACxB,GAAG,EAAE,CAAC,CAAC;IACL,KAAK,EAAE,EAAE,OAAO,EAAE,sHAAsH,EAAE;IAC1I,MAAM,EAAE;QACN,OAAO,EAAE,wIAAwI;QACjJ,cAAc,EAAE,gHAAgH;QAChI,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,iDAAiD;gBAC1D,SAAS,EAAE,iEAAiE;gBAC5E,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,6CAA6C,EAAE;oBACjE,WAAW,EAAE,EAAE,OAAO,EAAE,qHAAqH,EAAE;iBAChJ;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,oGAAoG,EAAE,SAAS,EAAE,+DAA+D,EAAE;QACxM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yEAAyE,EAAE,SAAS,EAAE,mDAAmD,EAAE;QACnK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,wEAAwE,EAAE,SAAS,EAAE,mEAAmE,EAAE;KACnL;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationGuidanceStateAdminResourceUIBehavior as orgGuidanceAdminSource,\n organizationGuidanceStatePlatformResourceUIBehavior as orgGuidancePlatformSource,\n userGuidanceStatePlatformResourceUIBehavior as userGuidancePlatformSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OrganizationGuidanceStateSchema,\n ResourcePrimaryScope,\n UserGuidanceStateSchema,\n organizationGuidanceStateResourceConfiguration_InitializationFactory as organizationGuidanceStateFactory,\n userGuidanceStateResourceConfiguration_InitializationFactory as userGuidanceStateFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype UCfg = ReturnType<typeof userGuidanceStateFactory>;\ntype UCore = UCfg['coreOperations'][number];\ntype UserMain = UCfg['mainSchema'];\nconst userGuidanceUI = userGuidancePlatformSource as ResourceUIBehaviorConfig<Record<string, never>, UCore, UserMain>;\n\ntype OCfg = ReturnType<typeof organizationGuidanceStateFactory>;\ntype OCore = OCfg['coreOperations'][number];\ntype OrgMain = OCfg['mainSchema'];\nconst orgGuidancePlatformUI = orgGuidancePlatformSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OrgMain>;\nconst orgGuidanceAdminUI = orgGuidanceAdminSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OrgMain>;\n\nconst userGuidanceBase = resourceSpecification<Record<string, never>, UCore, UserMain>(\n userGuidanceStateFactory,\n UserGuidanceStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user guidance engine state: which onboarding/guidance flows are started, completed, or dismissed, plus per-element progress.',\n businessRole: 'The persisted progress map the companion and in-app coach use to avoid repeating finished tours and to resume partial flows.',\n lifecycleRole: 'App user upserts rows as the guidance engine or admin tooling advances flow state; not a public directory resource.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UserGuidanceStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'userGuidanceStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'USER_GUIDANCE_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [{ packageName: '@wildo-ai/presets-components', exportName: 'userGuidanceStatePlatformResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR }],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Owning user for the guidance state document; immutable after create.',\n whyItMatters: 'Scopes READ/UPDATE through the user-self access strategy so a user can never read another user’s guidance progress.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n flows: schemaShape.flows.objectSpec({ meaning: 'Map of `flowRef` to flow-level status, element map, and trigger counts for the guidance engine.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the current user guidance state for coach surfaces.',\n outcome: 'Flow and element status hydrate UI and the companion.',\n responseStatuses: [\n // Self-state read lazily materializes: when no row exists yet the runtime returns a default state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller’s guidance state is returned; if no row has been materialized yet a default empty-flows state is returned rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session, so the per-user guidance state cannot be resolved.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Initialize guidance state for a user (first run).',\n outcome: 'Empty or seeded `flows` map for subsequent updates.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A guidance state row was created for the caller with the seeded `flows` map.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded `flows` payload fails `GuidanceStateSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session to own the new guidance state row.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Initialize a user guidance state',\n request: {\n flows: {\n onboarding_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n response: {\n flows: {\n onboarding_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Patch flow/element state as users progress (partial `GuidanceStateSchema`).',\n outcome: 'Server merges into the document per request DTO in factory config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The partial flow/element patch was merged into the caller’s guidance state and the result is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial `GuidanceStateSchema` patch fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the guidance state being patched.' },\n ],\n // Convergent: completing/dismissing a flow merges to the same end state, so re-applying the same patch is side-effect-free.\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Repository-backed search entry (factory has non-searchable API variant for compatibility).',\n outcome: 'Typically unused in end-user UIs; platform presets keep it non-addressable in routes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of guidance state rows; search metadata is intentionally minimal for this resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the guidance search context.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user guidance state row when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user guidance state row was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Platform presets intentionally keep routes non-addressable; companion copy should not claim a public “guidance list” for end users unless product wiring changes.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n\nconst organizationGuidanceBase = resourceSpecification<Record<string, never>, OCore, OrgMain>(\n organizationGuidanceStateFactory,\n OrganizationGuidanceStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-organization guidance state: shared coach progress for org-wide onboarding and education flows (parallel shape to the user document).',\n businessRole: 'Holds which org-level flows are active, completed, or dismissed so admins and the engine can coordinate org rollout.',\n lifecycleRole: 'Created/updated by org admins, super-admins, or automation when org guidance policies change; member reads may be allowed in factory for transparency.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'OrganizationGuidanceStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'organizationGuidanceStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'ORGANIZATION_GUIDANCE_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationGuidanceStatePlatformResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationGuidanceStateAdminResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n ],\n },\n fields: {\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'Owning organization for the guidance state document; immutable after create.',\n whyItMatters: 'Scopes READ/UPDATE through the org access strategy so a tenant can never read another tenant’s guidance progress.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n flows: schemaShape.flows.objectSpec({ meaning: 'Same flow/element state shape as the user variant, stored at org scope for shared journeys.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Fetch org-level guidance state for security/billing org consoles.',\n outcome: 'Flow map for in-product coach tied to a tenant.',\n responseStatuses: [\n // Scoped-state read lazily materializes: an org with no row yet gets a default state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s guidance state is returned; if no row has been materialized yet a default empty-flows state is returned rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the tenant guidance state.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Initialize org guidance when first org-wide flows activate.',\n outcome: 'Baseline row the engine can update.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An org-level guidance state row was created with the seeded `flows` map.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded `flows` payload fails `GuidanceStateSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin or super-admin; org guidance state is initialized by admins only.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Initialize an organization guidance state',\n request: {\n flows: {\n org_rollout_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n response: {\n flows: {\n org_rollout_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Patch org state when admins advance or reset flows (admin/super-admin roles in factory).',\n outcome: 'Updated tour visibility and element completion for members when policies allow.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org guidance state patch was merged and the result is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial `GuidanceStateSchema` patch fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin or super-admin; advancing/resetting org flows is admin-gated.' },\n ],\n // Convergent: advancing/dismissing org flows merges to the same end state, so re-applying the same patch is side-effect-free.\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Factory search hook; merged admin bundle removes the SEARCH view — still describe the op for backend truth.',\n outcome: 'Not surfaced as a navigable list in merged presets for this resource.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org guidance state rows; not surfaced as a navigable list in merged presets.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the guidance search context.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization guidance state row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization guidance state row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Merged `guidance` admin preset removes SEARCH from the org guidance bundle; companion must not require a public org guidance directory route.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n\nexport const userGuidanceStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userGuidanceUI),\n userGuidanceBase,\n () => ({\n label: { purpose: 'Presets build a short label from flow count: “User guidance · N flows” when any flow exists, else “User guidance”.' },\n layout: {\n purpose: 'Single `overview` section rendering the `flows` map in platform presets — inline display/summary/edit share one card for engine-owned JSON.',\n displayPurpose: 'Not a CRUD form for arbitrary JSON; the edit template exists for administrative tooling, not self-serve in typical apps.',\n sections: {\n overview: {\n purpose: 'The entire guidance tree (flows, elements, status) in one place.',\n whenToUse: 'Any screen that must debug or show raw guidance progress in platform builds.',\n textSlots: {\n title: { purpose: 'Name the current guidance state record.' },\n description: { purpose: 'Clarify that flow keys map to `guidance-flow` definition refs in the product catalog, not ad-hoc strings.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-only host for the guidance JSON in platform presets; non-addressable in default `views` wiring.', whenToUse: 'When product routes expose read access for diagnostics.' },\n [Op.CREATE]: { purpose: 'First-write initialization path when no row yet exists; non-addressable in default `views` wiring.', whenToUse: 'Onboarding of the guidance state row during user bootstrap.' },\n [Op.UPDATE]: { purpose: 'Patch-level updates as flows progress; non-addressable in default `views` wiring.', whenToUse: 'Engine callbacks after each coach step.' },\n [Op.SEARCH]: { purpose: 'Factory exposes SEARCH for service compatibility; not addressable in platform preset list for this type.', whenToUse: 'Internal or future admin discovery tools only.' },\n },\n }),\n);\n\nexport const organizationGuidanceStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(orgGuidancePlatformUI), resourceFrontendConfiguration(orgGuidanceAdminUI)),\n organizationGuidanceBase,\n () => ({\n label: { purpose: '“Organization guidance · N flows” from flow map size in merged presets, matching the `guidanceLabel` helper pattern.' },\n layout: {\n purpose: 'Same single-section `overview` as the user platform preset; merged admin only removes the SEARCH view entry — layout chrome is shared.',\n displayPurpose: 'Admin merge keeps display/edit templates from the platform block so org and platform consoles stay consistent.',\n sections: {\n overview: {\n purpose: 'Flow map for the organization’s guidance state.',\n whenToUse: 'Org admin and super-admin org drill-downs for rollout tracking.',\n textSlots: {\n title: { purpose: 'Label the org-level guidance state surface.' },\n description: { purpose: 'Distinguish from per-user `USER_GUIDANCE_STATE` which tracks individual progress instead of the org rollout bucket.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read org guidance for merged platform+admin; non-addressable in default `views` wiring in presets.', whenToUse: 'When org admin routes surface the coach state for the tenant.' },\n [Op.CREATE]: { purpose: 'Create org state when missing; same non-addressable pattern in presets.', whenToUse: 'First activation of an org with guidance enabled.' },\n [Op.UPDATE]: { purpose: 'Admin and super-admin updates; non-addressable in default preset list.', whenToUse: 'When flows are advanced, dismissed, or reset in operator tooling.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"guidance-state.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/guidance-state.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gDAAgD,IAAI,sBAAsB,EAC1E,mDAAmD,IAAI,yBAAyB,EAChF,2CAA2C,IAAI,0BAA0B,GAC1E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,uBAAuB,EACvB,oEAAoE,IAAI,gCAAgC,EACxG,4DAA4D,IAAI,wBAAwB,GACzF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,E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AAE,SAAS,EAAE,yCAAyC,EAAE;QACnK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0GAA0G,EAAE,SAAS,EAAE,gDAAgD,EAAE;KAClM;CACF,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,8CAA8C,CAC1G,mCAAmC,CAAC,6BAA6B,CAAC,qBAAqB,CAAC,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAC,EAC5I,wBAAwB,EACxB,GAAG,EAAE,CAAC,CAAC;IACL,KAAK,EAAE,EAAE,OAAO,EAAE,sHAAsH,EAAE;IAC1I,MAAM,EAAE;QACN,OAAO,EAAE,wIAAwI;QACjJ,cAAc,EAAE,gHAAgH;QAChI,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,iDAAiD;gBAC1D,SAAS,EAAE,iEAAiE;gBAC5E,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,6CAA6C,EAAE;oBACjE,WAAW,EAAE,EAAE,OAAO,EAAE,qHAAqH,EAAE;iBAChJ;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,oGAAoG,EAAE,SAAS,EAAE,+DAA+D,EAAE;QACxM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yEAAyE,EAAE,SAAS,EAAE,mDAAmD,EAAE;QACnK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,wEAAwE,EAAE,SAAS,EAAE,mEAAmE,EAAE;KACnL;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationGuidanceStateAdminResourceUIBehavior as orgGuidanceAdminSource,\n organizationGuidanceStatePlatformResourceUIBehavior as orgGuidancePlatformSource,\n userGuidanceStatePlatformResourceUIBehavior as userGuidancePlatformSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OrganizationGuidanceStateSchema,\n ResourcePrimaryScope,\n UserGuidanceStateSchema,\n organizationGuidanceStateResourceConfiguration_InitializationFactory as organizationGuidanceStateFactory,\n userGuidanceStateResourceConfiguration_InitializationFactory as userGuidanceStateFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UCfg = ReturnType<typeof userGuidanceStateFactory>;\ntype UCore = UCfg['coreOperations'][number];\ntype UserMain = UCfg['mainSchema'];\nconst userGuidanceUI = userGuidancePlatformSource as ResourceUIBehaviorConfig<Record<string, never>, UCore, UserMain>;\n\ntype OCfg = ReturnType<typeof organizationGuidanceStateFactory>;\ntype OCore = OCfg['coreOperations'][number];\ntype OrgMain = OCfg['mainSchema'];\nconst orgGuidancePlatformUI = orgGuidancePlatformSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OrgMain>;\nconst orgGuidanceAdminUI = orgGuidanceAdminSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OrgMain>;\n\nconst userGuidanceBase = resourceSpecification<Record<string, never>, UCore, UserMain>(\n userGuidanceStateFactory,\n UserGuidanceStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user guidance engine state: which onboarding/guidance flows are started, completed, or dismissed, plus per-element progress.',\n businessRole: 'The persisted progress map the companion and in-app coach use to avoid repeating finished tours and to resume partial flows.',\n lifecycleRole: 'App user upserts rows as the guidance engine or admin tooling advances flow state; not a public directory resource.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.GUIDANCE,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UserGuidanceStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'userGuidanceStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'USER_GUIDANCE_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [{ packageName: '@wildo-ai/presets-components', exportName: 'userGuidanceStatePlatformResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR }],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Owning user for the guidance state document; immutable after create.',\n whyItMatters: 'Scopes READ/UPDATE through the user-self access strategy so a user can never read another user’s guidance progress.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n flows: schemaShape.flows.objectSpec({ meaning: 'Map of `flowRef` to flow-level status, element map, and trigger counts for the guidance engine.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the current user guidance state for coach surfaces.',\n outcome: 'Flow and element status hydrate UI and the companion.',\n responseStatuses: [\n // Self-state read lazily materializes: when no row exists yet the runtime returns a default state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller’s guidance state is returned; if no row has been materialized yet a default empty-flows state is returned rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session, so the per-user guidance state cannot be resolved.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Initialize guidance state for a user (first run).',\n outcome: 'Empty or seeded `flows` map for subsequent updates.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A guidance state row was created for the caller with the seeded `flows` map.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded `flows` payload fails `GuidanceStateSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session to own the new guidance state row.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Initialize a user guidance state',\n request: {\n flows: {\n onboarding_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n response: {\n flows: {\n onboarding_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Patch flow/element state as users progress (partial `GuidanceStateSchema`).',\n outcome: 'Server merges into the document per request DTO in factory config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The partial flow/element patch was merged into the caller’s guidance state and the result is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial `GuidanceStateSchema` patch fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the guidance state being patched.' },\n ],\n // Convergent: completing/dismissing a flow merges to the same end state, so re-applying the same patch is side-effect-free.\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Repository-backed search entry (factory has non-searchable API variant for compatibility).',\n outcome: 'Typically unused in end-user UIs; platform presets keep it non-addressable in routes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of guidance state rows; search metadata is intentionally minimal for this resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the guidance search context.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user guidance state row when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user guidance state row was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Platform presets intentionally keep routes non-addressable; companion copy should not claim a public “guidance list” for end users unless product wiring changes.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n\nconst organizationGuidanceBase = resourceSpecification<Record<string, never>, OCore, OrgMain>(\n organizationGuidanceStateFactory,\n OrganizationGuidanceStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-organization guidance state: shared coach progress for org-wide onboarding and education flows (parallel shape to the user document).',\n businessRole: 'Holds which org-level flows are active, completed, or dismissed so admins and the engine can coordinate org rollout.',\n lifecycleRole: 'Created/updated by org admins, super-admins, or automation when org guidance policies change; member reads may be allowed in factory for transparency.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.GUIDANCE,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'OrganizationGuidanceStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'organizationGuidanceStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'ORGANIZATION_GUIDANCE_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationGuidanceStatePlatformResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationGuidanceStateAdminResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n ],\n },\n fields: {\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'Owning organization for the guidance state document; immutable after create.',\n whyItMatters: 'Scopes READ/UPDATE through the org access strategy so a tenant can never read another tenant’s guidance progress.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n flows: schemaShape.flows.objectSpec({ meaning: 'Same flow/element state shape as the user variant, stored at org scope for shared journeys.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Fetch org-level guidance state for security/billing org consoles.',\n outcome: 'Flow map for in-product coach tied to a tenant.',\n responseStatuses: [\n // Scoped-state read lazily materializes: an org with no row yet gets a default state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s guidance state is returned; if no row has been materialized yet a default empty-flows state is returned rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the tenant guidance state.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Initialize org guidance when first org-wide flows activate.',\n outcome: 'Baseline row the engine can update.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An org-level guidance state row was created with the seeded `flows` map.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded `flows` payload fails `GuidanceStateSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin or super-admin; org guidance state is initialized by admins only.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Initialize an organization guidance state',\n request: {\n flows: {\n org_rollout_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n response: {\n flows: {\n org_rollout_tour: { status: 'IN_PROGRESS', elements: {}, triggerCount: 1 },\n },\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Patch org state when admins advance or reset flows (admin/super-admin roles in factory).',\n outcome: 'Updated tour visibility and element completion for members when policies allow.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org guidance state patch was merged and the result is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial `GuidanceStateSchema` patch fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin or super-admin; advancing/resetting org flows is admin-gated.' },\n ],\n // Convergent: advancing/dismissing org flows merges to the same end state, so re-applying the same patch is side-effect-free.\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Factory search hook; merged admin bundle removes the SEARCH view — still describe the op for backend truth.',\n outcome: 'Not surfaced as a navigable list in merged presets for this resource.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org guidance state rows; not surfaced as a navigable list in merged presets.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the guidance search context.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization guidance state row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization guidance state row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Merged `guidance` admin preset removes SEARCH from the org guidance bundle; companion must not require a public org guidance directory route.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n\nexport const userGuidanceStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userGuidanceUI),\n userGuidanceBase,\n () => ({\n label: { purpose: 'Presets build a short label from flow count: “User guidance · N flows” when any flow exists, else “User guidance”.' },\n layout: {\n purpose: 'Single `overview` section rendering the `flows` map in platform presets — inline display/summary/edit share one card for engine-owned JSON.',\n displayPurpose: 'Not a CRUD form for arbitrary JSON; the edit template exists for administrative tooling, not self-serve in typical apps.',\n sections: {\n overview: {\n purpose: 'The entire guidance tree (flows, elements, status) in one place.',\n whenToUse: 'Any screen that must debug or show raw guidance progress in platform builds.',\n textSlots: {\n title: { purpose: 'Name the current guidance state record.' },\n description: { purpose: 'Clarify that flow keys map to `guidance-flow` definition refs in the product catalog, not ad-hoc strings.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-only host for the guidance JSON in platform presets; non-addressable in default `views` wiring.', whenToUse: 'When product routes expose read access for diagnostics.' },\n [Op.CREATE]: { purpose: 'First-write initialization path when no row yet exists; non-addressable in default `views` wiring.', whenToUse: 'Onboarding of the guidance state row during user bootstrap.' },\n [Op.UPDATE]: { purpose: 'Patch-level updates as flows progress; non-addressable in default `views` wiring.', whenToUse: 'Engine callbacks after each coach step.' },\n [Op.SEARCH]: { purpose: 'Factory exposes SEARCH for service compatibility; not addressable in platform preset list for this type.', whenToUse: 'Internal or future admin discovery tools only.' },\n },\n }),\n);\n\nexport const organizationGuidanceStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(orgGuidancePlatformUI), resourceFrontendConfiguration(orgGuidanceAdminUI)),\n organizationGuidanceBase,\n () => ({\n label: { purpose: '“Organization guidance · N flows” from flow map size in merged presets, matching the `guidanceLabel` helper pattern.' },\n layout: {\n purpose: 'Same single-section `overview` as the user platform preset; merged admin only removes the SEARCH view entry — layout chrome is shared.',\n displayPurpose: 'Admin merge keeps display/edit templates from the platform block so org and platform consoles stay consistent.',\n sections: {\n overview: {\n purpose: 'Flow map for the organization’s guidance state.',\n whenToUse: 'Org admin and super-admin org drill-downs for rollout tracking.',\n textSlots: {\n title: { purpose: 'Label the org-level guidance state surface.' },\n description: { purpose: 'Distinguish from per-user `USER_GUIDANCE_STATE` which tracks individual progress instead of the org rollout bucket.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read org guidance for merged platform+admin; non-addressable in default `views` wiring in presets.', whenToUse: 'When org admin routes surface the coach state for the tenant.' },\n [Op.CREATE]: { purpose: 'Create org state when missing; same non-addressable pattern in presets.', whenToUse: 'First activation of an org with guidance enabled.' },\n [Op.UPDATE]: { purpose: 'Admin and super-admin updates; non-addressable in default preset list.', whenToUse: 'When flows are advanced, dismissed, or reset in operator tooling.' },\n },\n }),\n);\n"]}
@@ -1,5 +1,5 @@
1
1
  import { CoreResourceOperation as Op, LifecycleStage } from '@wildo-ai/saas-models';
2
- export declare const userLifecycleStateResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
2
+ export declare const userLifecycleStateResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST | Op.SEARCH, import("zod").ZodObject<{
3
3
  currentStage: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodEnum<typeof LifecycleStage>>>>;
4
4
  stageEnteredAt: import("zod").ZodDefault<import("zod").ZodCoercedDate<unknown>>;
5
5
  stageHistory: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle-state.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/lifecycle-state.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,cAAc,EAMf,MAAM,uBAAuB,CAAC;AA+X/B,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;iCAmBnD,CAAC;AAEF,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;iCAkB3D,CAAC"}
1
+ {"version":3,"file":"lifecycle-state.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/lifecycle-state.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAkY/B,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;iCAmBnD,CAAC;AAEF,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;iCAkB3D,CAAC"}
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
3
3
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';
4
4
  import { CoreResourceOperation as Op, LifecycleStage, OrganizationLifecycleStateSchema, ResourcePrimaryScope, UserLifecycleStateSchema, organizationLifecycleStateResourceConfiguration_InitializationFactory as organizationLifecycleStateFactory, userLifecycleStateResourceConfiguration_InitializationFactory as userLifecycleStateFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const userLcUI = userLcPlatformSource;
7
8
  const orgLcMainUI = orgLcMainSource;
8
9
  const orgLcAdminUI = orgLcAdminSource;
@@ -77,6 +78,7 @@ const userLifecycleBase = resourceSpecification(userLifecycleStateFactory, UserL
77
78
  businessRole: 'Drives “activation”, “dormant”, and churn messaging independent of billing state — a product-semantic lifecycle layer.',
78
79
  lifecycleRole: 'The state begins automatically at sign-up, evolves from application-defined activity, and remains readable as the user moves through activation, engagement, dormancy and reactivation.',
79
80
  audience: LabelAudience.ADMIN,
81
+ subDomain: EngineResourceSubDomain.GUIDANCE,
80
82
  codeHandling: {
81
83
  mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UserLifecycleStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
82
84
  resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'userLifecycleStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },
@@ -218,6 +220,7 @@ const organizationLifecycleBase = resourceSpecification(organizationLifecycleSta
218
220
  businessRole: 'Org-wide cohorts for CSM, marketing automation, and success dashboards — not the same as `ORGANIZATION` subscription status in billing.',
219
221
  lifecycleRole: 'The state begins automatically when the organization is created, evolves from organization activity, and remains readable as the tenant moves through activation, engagement, dormancy and reactivation.',
220
222
  audience: LabelAudience.ADMIN,
223
+ subDomain: EngineResourceSubDomain.GUIDANCE,
221
224
  codeHandling: {
222
225
  mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'OrganizationLifecycleStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
223
226
  resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'organizationLifecycleStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },