@wildo-ai/saas-specifications 1.1.1 → 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":"a2a-token-budget-state.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/a2a-token-budget-state.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,yBAAyB,EACzB,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,uCAAuC,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAmC,sBAAsB,EAAE,qBAAqB,EAAE,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;AAEF,MAAM,CAAC,MAAM,oDAAoD,GAAG,6CAA6C,CAC/G,gBAAgB,CAAC,mCAAmC,EACpD,qCAAqC,CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,mDAAmD,GAAG,6CAA6C,CAC9G,gBAAgB,CAAC,kCAAkC,EACnD,oCAAoC,CACrC,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 A2ATokenBudgetStateSchema,\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n a2aTokenBudgetStatePolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { type CoreResourceTypeMemberName, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\n/**\n * Framework-owned specification for the `a2aTokenBudgetState` POLYMORPHIC SINGLETON\n * family: the per-tenant LLM **token budget accumulator** that lets the inbound\n * Agent2Agent (A2A) transport fail-closed BEFORE dispatch once a tenant has spent its\n * plan-granted period allowance. One base envelope is stamped out as three genuine\n * single-scope variants, each owned by its injected owner FK:\n * - `userA2aTokenBudgetState` (USER_SELF — user-delegated A2A turns)\n * - `organizationA2aTokenBudgetState` (ORGANIZATIONS — org-machine A2A turns)\n * - `applicationA2aTokenBudgetState` (APPLICATION — app-machine A2A turns)\n *\n * This is INTERNAL ENFORCEMENT STATE, not user-authored data. The A2A runtime\n * (`A2ATokenBudgetBackendService`) is the only writer — it opens the singleton on the\n * first budgeted turn (CREATE, INTERNAL_CALL super-admin via `*AsSystem`) and then\n * advances the counter through an ATOMIC repository-tier increment rather than a\n * service-tier update, so concurrent turns cannot lose tokens to a read-modify-write\n * race. That is why NO `UPDATE` operation is declared. The tenant's own surface is READ\n * only: an owner-level \"how much of my allowance have I used?\" view. DELETE exists solely\n * as the cascade teardown and is INTERNAL_CALL — it gets NO HTTP route at all, because\n * zeroing this row would reset a tenant's recorded spend (see the DELETE operation prose).\n *\n * TWO HALVES, DELIBERATELY SEPARATED: the ALLOWANCE (the cap) is NOT stored here — it\n * is resolved live from the tenant's billing plan via the `a2a.llm.tokensPerPeriod`\n * LIMIT feature (`A2A_TOKEN_BUDGET_FEATURE_ID`), so a plan upgrade/downgrade applies\n * immediately with no copy to keep in sync. This row accumulates CONSUMPTION only.\n *\n * ONE spec covers all three variants (per the flow-actor-executions / billing / SSO\n * polymorphic-spec precedent).\n */\n\ntype A2ABudgetResourceType =\n | CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE\n | CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE\n | CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE;\ntype A2ABudgetResourceTypeMember = CoreResourceTypeMemberName<A2ABudgetResourceType>;\n\nconst a2aBudgetPrimaryScopeByResourceType: Record<A2ABudgetResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE]: ResourcePrimaryScope.USER_SELF,\n [CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE]: ResourcePrimaryScope.APPLICATION,\n};\n\ninterface A2ATokenBudgetScopeExample {\n readonly scopeIdentity: Readonly<Record<string, string>>;\n /** Human-readable prose fragment for example titles, not a semantic vocabulary. */\n readonly scopeLabel: string;\n}\n\n/**\n * Owns the concrete path and response FK for each polymorphic budget contract.\n * The budget semantics are shared, but the public scope identity is not: an\n * example for one tenant type must never teach a sibling's URL parameter.\n */\nfunction createA2ATokenBudgetScopeExample(resourceType: A2ABudgetResourceType): A2ATokenBudgetScopeExample {\n switch (resourceType) {\n case CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE:\n return { scopeIdentity: { userId: 'user_01JEXAMPLE' }, scopeLabel: 'user' };\n case CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE:\n return { scopeIdentity: { organizationId: 'org_01JEXAMPLE' }, scopeLabel: 'organization' };\n case CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE:\n return { scopeIdentity: { applicationId: 'app_01JEXAMPLE' }, scopeLabel: 'application' };\n default: {\n const exhaustiveResourceType: never = resourceType;\n throw new Error(`Unsupported A2A token-budget resource type: ${String(exhaustiveResourceType)}`);\n }\n }\n}\n\ntype Cfg = ReturnType<(typeof a2aTokenBudgetStatePolymorphicFactories)[CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof A2ATokenBudgetStateSchema;\n\nfunction buildA2ATokenBudgetStateResourceSpecification(\n resourceType: A2ABudgetResourceType,\n resourceTypeMemberName: A2ABudgetResourceTypeMember,\n) {\n const exampleScope = createA2ATokenBudgetScopeExample(resourceType);\n const currentBudgetExample = {\n _id: `a2a_budget_${exampleScope.scopeLabel}_01JEXAMPLE`,\n periodKey: '2026-08',\n consumedTokens: 72_450,\n lastTurnAt: '2026-08-20T11:18:42.000Z',\n createdAt: '2026-08-02T08:15:00.000Z',\n updatedAt: '2026-08-20T11:18:42.000Z',\n ...exampleScope.scopeIdentity,\n };\n const currentBudgetSummaryExample = {\n _id: currentBudgetExample._id,\n periodKey: currentBudgetExample.periodKey,\n consumedTokens: currentBudgetExample.consumedTokens,\n lastTurnAt: currentBudgetExample.lastTurnAt,\n };\n\n return resourceSpecification<undefined, Core, Main>(\n a2aTokenBudgetStatePolymorphicFactories[resourceType],\n A2ATokenBudgetStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Report how many LLM tokens this user, organization, or application has consumed through inbound A2A agent turns in the current budget period.',\n businessRole: 'Current-period A2A consumption used with the plan allowance to decide whether another agent turn may start; the allowance itself is resolved separately and is not part of this response.',\n lifecycleRole: 'Created after the first budgeted A2A turn, incremented after completed turns, and reset in place when the period changes; this resource does not retain prior-period history.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'A2ATokenBudgetStateSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'a2aTokenBudgetStatePolymorphicFactories', 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 'Three variants under `A2A_TOKEN_BUDGET_SCOPE_VARIANTS` — user row is `USER_SELF`; org/app rows are `ORGANIZATIONS`/`APPLICATION` (machine-owned A2A).',\n 'SINGLETON: the injected owner FK is the auto business key, so the declaration deliberately does NOT opt out of the singleton auto-business-key. NOTE the uniqueness is index-enforced on MongoDB only — the SQL planner leaves index creation to migrations, so on PostgreSQL the one-row invariant is upheld by the runtime rather than the database (see businessConstraints).',\n 'The allowance is NOT persisted here: it is resolved live from the `a2a.llm.tokensPerPeriod` LIMIT feature (`A2A_TOKEN_BUDGET_FEATURE_ID` in `@wildo-ai/saas-models`) via feature resolution for the owner scope.',\n 'Sole runtime reader/writer is `A2ATokenBudgetBackendService` (`@wildo-ai/saas-backend-lib`); CREATE and READ go through `*AsSystem` under the resource\\'s `systemAccessPolicy`, while the counter is advanced by the atomic repository-tier increment primitive (there is deliberately no UPDATE operation).',\n 'Runtime has no userNotifications / m2mNotifications — do not add communications.* (DF-1).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document id of this tenant\\'s single A2A token-budget row.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n periodKey: schemaShape.periodKey.stringSpec({\n meaning: 'Stable id of the budget WINDOW this counter currently covers — a UTC calendar month (`YYYY-MM`) in v1.',\n whyItMatters: 'It is the reset boundary: when the runtime resolves a different current period, the accumulator resets `consumedTokens` and advances this key in place, so a stale period reads as zero consumption rather than carrying spend forward.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n consumedTokens: schemaShape.consumedTokens.numberSpec({\n meaning: 'Tokens (prompt + completion) this tenant\\'s A2A agent turns have consumed within `periodKey`.',\n whyItMatters: 'It is the single value the pre-dispatch gate compares against the plan allowance; once it reaches the allowance the transport denies further turns for the rest of the period.',\n unit: 'tokens',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n lastTurnAt: schemaShape.lastTurnAt.dateSpec({\n meaning: 'When the last A2A turn was recorded against this budget.',\n whyItMatters: 'Observability only — it lets an operator see whether a tenant is actively spending without reconstructing the turn log; nothing in the gate reads it.',\n temporalRole: 'occurred',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the tenant\\'s budget row was first opened (its first budgeted A2A turn).',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the counter was last incremented or rolled to a new period.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open the tenant\\'s budget singleton on its first budgeted A2A turn.',\n outcome: 'The tenant has exactly one counter row, stamped with the current period and that first turn\\'s tokens, against which every later turn is measured.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The tenant\\'s single budget row was opened. Internal/system write path (INTERNAL_CALL, service-tier) — the A2A runtime writes on the tenant\\'s behalf via `createAsSystem`; there is no self-serve create surface.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails schema validation (e.g. a missing `periodKey` or the injected owner FK).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A concurrent turn already opened the tenant\\'s singleton — the injected owner FK is a unique business key, so only one racer creates. The accumulator swallows this and increments the winner\\'s row instead of surfacing the conflict to the turn.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts to create a budget row — the operation is INTERNAL_CALL with a super-admin floor, reachable only through the A2A runtime.' },\n ],\n idempotent: false,\n },\n\n [Op.READ]: {\n purpose: 'Read the current A2A token-consumption period, consumed-token count, and latest recorded turn for this scope.',\n outcome: 'The integration owner can monitor current-period A2A consumption without treating this state as the plan allowance or as historical usage.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The current consumption state for this scope is returned, including its period key, consumed tokens, and latest recorded turn when available.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to inspect A2A consumption for this user, organization, or application scope.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No budgeted A2A turn has been recorded for this scope yet, or the requested scope belongs to another owner.' },\n ],\n idempotent: true,\n examples: [{\n title: `Inspect current ${exampleScope.scopeLabel} A2A consumption`,\n request: exampleScope.scopeIdentity,\n response: currentBudgetExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `Inspect current ${exampleScope.scopeLabel} A2A consumption with context`,\n request: exampleScope.scopeIdentity,\n response: currentBudgetExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `Inspect the compact ${exampleScope.scopeLabel} A2A consumption summary`,\n request: exampleScope.scopeIdentity,\n response: currentBudgetSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n\n // No UPDATE operation is declared, deliberately: advancing the counter after a turn\n // (increment, or roll the period in place) is an ATOMIC repository-tier increment, not a\n // service-tier update, precisely so concurrent turns cannot lose tokens to a\n // read-modify-write race. Documenting an UPDATE here would describe a write path that does\n // not exist and invite routing the counter through it.\n\n [Op.DELETE]: {\n purpose: 'Remove a tenant\\'s budget row — platform teardown, and the cleanup the owning user/org/app deletion cascades to.',\n outcome: 'The counter row is physically removed, so a deleted tenant leaves no orphaned enforcement state behind.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The budget row was removed. The role floor is deliberately PLATFORM-ONLY (`APP_ADMIN_SUPER_ADMIN`) — NOT the owner-read roles and NOT an org admin: deleting this row zeroes the tenant\\'s recorded consumption, which is a spend-cap bypass. Read-authority does not imply delete-authority here, because the counter is enforcement state ABOUT the tenant rather than data BELONGING to it. The same default op powers the composition onParentDelete cascade, which runs at the repository tier below role checks and is therefore unaffected by the floor.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No budget row exists for the targeted tenant (it never ran a budgeted turn, or it was already removed).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A caller below the platform super-admin floor — including the owning tenant\\'s own admin — attempts to delete the row and reset its recorded spend.' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'One row per tenant: the injected owner FK (`userId` / `organizationId` / `applicationId`) is the unique business key (database-enforced on MongoDB only — see the PostgreSQL caveat below). The period lives INSIDE the row and is rolled in place, so the resource holds current-period state only — per-period history and multi-budget-feature accounting are documented follow-ons.',\n 'The plan ALLOWANCE is never stored here. It is resolved live from the `a2a.llm.tokensPerPeriod` LIMIT feature for the owner scope, so a plan change takes effect on the next turn with no copy to reconcile. This resource is the CONSUMPTION half only.',\n 'This is internal enforcement state, not user-authored data: only the A2A runtime writes it. It CREATES the row via `*AsSystem` (INTERNAL_CALL, super-admin, under the resource\\'s `systemAccessPolicy`), then advances the counter through an ATOMIC repository-tier increment rather than an update operation — which is why no UPDATE operation is declared at all. The tenant\\'s only surface is reading its own consumption.',\n 'DELETE authority is strictly platform-level and intentionally diverges from read authority: zeroing recorded consumption would let a tenant admin reset their own spend cap at will.',\n 'The budget window is a UTC calendar month (`YYYY-MM`) in v1 — deterministic and free of a per-turn billing-account lookup on the hot path. Anchoring the window to the tenant\\'s actual subscription period is a documented follow-on, isolated to the single function that resolves the current period key.',\n 'Overage is bounded but is NOT a single turn: usage is only known AFTER a turn completes and recording is fire-and-forget, so every turn already in flight when the allowance is reached passes the gate on the same reading. The burst throttle that bounds it is per-PRINCIPAL while the budget is per-TENANT, so a tenant with many members or machine credentials can overshoot proportionally to how many act at once. Pre-charging an estimate was rejected because it would require a refund/reconcile path on every turn.',\n 'Accumulation is adapter-portable: the counter is advanced through a per-adapter atomic increment primitive (a single document update on MongoDB, a single `UPDATE … RETURNING` on PostgreSQL) rather than raw MongoDB operators, so a concurrent increment cannot be lost to a read-modify-write race on either backend. Both arms are covered by real-database integration tests, including the concurrent compare-and-set on a REAL PostgreSQL: a racing writer holds the row lock while a guarded reset blocks on it, and on resuming the reset correctly matches nothing rather than overwriting the racer\\'s accumulated total. The in-memory SQL engine also used in tests models neither MVCC nor the row-lock recheck, so it covers SQL shape and sequential semantics only — the concurrency proof comes from the real-engine suite.',\n 'Exactly one row per tenant is declared through the injected owner foreign key, but the unique index is emitted only by the MongoDB adapter — the SQL planner leaves index creation to migrations. On PostgreSQL the invariant is therefore NOT database-enforced today: the runtime repairs the common race (a rejected create falls through to an increment), but two truly simultaneous first-ever turns can leave two rows, splitting consumption and under-reporting spend until a unique constraint on the owner foreign key is added to the migration.',\n 'A budget row is owned by exactly ONE scope; the polymorphic owner FK is injected on each concrete variant schema, not on `A2ATokenBudgetStateSchema` itself, and the owner primary-scope filter must never expose another tenant\\'s counter.',\n ],\n }),\n // The owner is the injected scope FK, anchored by the `<SCOPE> → *A2aTokenBudgetState`\n // primary-scope COMPOSITION edge in `resources-registry.shared.core.definitions.ts`\n // (generated by `createPolymorphicScopeRelationships` with `childCardinality: ONE`).\n // The registry factory derives the scope from `isPrimaryScope: true`; this declaration\n // feeds the spec ↔ registry alignment guard and must match per variant.\n { resourcePrimaryScope: a2aBudgetPrimaryScopeByResourceType[resourceType] },\n );\n}\n\nexport const userA2aTokenBudgetStateResourceSpecification = buildA2ATokenBudgetStateResourceSpecification(\n CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE,\n 'USER_A2A_TOKEN_BUDGET_STATE',\n);\n\nexport const organizationA2aTokenBudgetStateResourceSpecification = buildA2ATokenBudgetStateResourceSpecification(\n CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE,\n 'ORGANIZATION_A2A_TOKEN_BUDGET_STATE',\n);\n\nexport const applicationA2aTokenBudgetStateResourceSpecification = buildA2ATokenBudgetStateResourceSpecification(\n CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE,\n 'APPLICATION_A2A_TOKEN_BUDGET_STATE',\n);\n"]}
1
+ {"version":3,"file":"a2a-token-budget-state.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/a2a-token-budget-state.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,yBAAyB,EACzB,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,uCAAuC,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAmC,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC7H,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAqC3E,MAAM,mCAAmC,GAAwD;IAC/F,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,EAAE,oBAAoB,CAAC,SAAS;IAC9E,CAAC,gBAAgB,CAAC,mCAAmC,CAAC,EAAE,oBAAoB,CAAC,aAAa;IAC1F,CAAC,gBAAgB,CAAC,kCAAkC,C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D,oCAAoC,CACrC,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 A2ATokenBudgetStateSchema,\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n a2aTokenBudgetStatePolymorphicFactories,\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 `a2aTokenBudgetState` POLYMORPHIC SINGLETON\n * family: the per-tenant LLM **token budget accumulator** that lets the inbound\n * Agent2Agent (A2A) transport fail-closed BEFORE dispatch once a tenant has spent its\n * plan-granted period allowance. One base envelope is stamped out as three genuine\n * single-scope variants, each owned by its injected owner FK:\n * - `userA2aTokenBudgetState` (USER_SELF — user-delegated A2A turns)\n * - `organizationA2aTokenBudgetState` (ORGANIZATIONS — org-machine A2A turns)\n * - `applicationA2aTokenBudgetState` (APPLICATION — app-machine A2A turns)\n *\n * This is INTERNAL ENFORCEMENT STATE, not user-authored data. The A2A runtime\n * (`A2ATokenBudgetBackendService`) is the only writer — it opens the singleton on the\n * first budgeted turn (CREATE, INTERNAL_CALL super-admin via `*AsSystem`) and then\n * advances the counter through an ATOMIC repository-tier increment rather than a\n * service-tier update, so concurrent turns cannot lose tokens to a read-modify-write\n * race. That is why NO `UPDATE` operation is declared. The tenant's own surface is READ\n * only: an owner-level \"how much of my allowance have I used?\" view. DELETE exists solely\n * as the cascade teardown and is INTERNAL_CALL — it gets NO HTTP route at all, because\n * zeroing this row would reset a tenant's recorded spend (see the DELETE operation prose).\n *\n * TWO HALVES, DELIBERATELY SEPARATED: the ALLOWANCE (the cap) is NOT stored here — it\n * is resolved live from the tenant's billing plan via the `a2a.llm.tokensPerPeriod`\n * LIMIT feature (`A2A_TOKEN_BUDGET_FEATURE_ID`), so a plan upgrade/downgrade applies\n * immediately with no copy to keep in sync. This row accumulates CONSUMPTION only.\n *\n * ONE spec covers all three variants (per the flow-actor-executions / billing / SSO\n * polymorphic-spec precedent).\n */\n\ntype A2ABudgetResourceType =\n | CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE\n | CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE\n | CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE;\ntype A2ABudgetResourceTypeMember = CoreResourceTypeMemberName<A2ABudgetResourceType>;\n\nconst a2aBudgetPrimaryScopeByResourceType: Record<A2ABudgetResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE]: ResourcePrimaryScope.USER_SELF,\n [CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE]: ResourcePrimaryScope.APPLICATION,\n};\n\ninterface A2ATokenBudgetScopeExample {\n readonly scopeIdentity: Readonly<Record<string, string>>;\n /** Human-readable prose fragment for example titles, not a semantic vocabulary. */\n readonly scopeLabel: string;\n}\n\n/**\n * Owns the concrete path and response FK for each polymorphic budget contract.\n * The budget semantics are shared, but the public scope identity is not: an\n * example for one tenant type must never teach a sibling's URL parameter.\n */\nfunction createA2ATokenBudgetScopeExample(resourceType: A2ABudgetResourceType): A2ATokenBudgetScopeExample {\n switch (resourceType) {\n case CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE:\n return { scopeIdentity: { userId: 'user_01JEXAMPLE' }, scopeLabel: 'user' };\n case CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE:\n return { scopeIdentity: { organizationId: 'org_01JEXAMPLE' }, scopeLabel: 'organization' };\n case CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE:\n return { scopeIdentity: { applicationId: 'app_01JEXAMPLE' }, scopeLabel: 'application' };\n default: {\n const exhaustiveResourceType: never = resourceType;\n throw new Error(`Unsupported A2A token-budget resource type: ${String(exhaustiveResourceType)}`);\n }\n }\n}\n\ntype Cfg = ReturnType<(typeof a2aTokenBudgetStatePolymorphicFactories)[CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof A2ATokenBudgetStateSchema;\n\nfunction buildA2ATokenBudgetStateResourceSpecification(\n resourceType: A2ABudgetResourceType,\n resourceTypeMemberName: A2ABudgetResourceTypeMember,\n) {\n const exampleScope = createA2ATokenBudgetScopeExample(resourceType);\n const currentBudgetExample = {\n _id: `a2a_budget_${exampleScope.scopeLabel}_01JEXAMPLE`,\n periodKey: '2026-08',\n consumedTokens: 72_450,\n lastTurnAt: '2026-08-20T11:18:42.000Z',\n createdAt: '2026-08-02T08:15:00.000Z',\n updatedAt: '2026-08-20T11:18:42.000Z',\n ...exampleScope.scopeIdentity,\n };\n const currentBudgetSummaryExample = {\n _id: currentBudgetExample._id,\n periodKey: currentBudgetExample.periodKey,\n consumedTokens: currentBudgetExample.consumedTokens,\n lastTurnAt: currentBudgetExample.lastTurnAt,\n };\n\n return resourceSpecification<undefined, Core, Main>(\n a2aTokenBudgetStatePolymorphicFactories[resourceType],\n A2ATokenBudgetStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Report how many LLM tokens this user, organization, or application has consumed through inbound A2A agent turns in the current budget period.',\n businessRole: 'Current-period A2A consumption used with the plan allowance to decide whether another agent turn may start; the allowance itself is resolved separately and is not part of this response.',\n lifecycleRole: 'Created after the first budgeted A2A turn, incremented after completed turns, and reset in place when the period changes; this resource does not retain prior-period history.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'A2ATokenBudgetStateSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'a2aTokenBudgetStatePolymorphicFactories', 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 'Three variants under `A2A_TOKEN_BUDGET_SCOPE_VARIANTS` — user row is `USER_SELF`; org/app rows are `ORGANIZATIONS`/`APPLICATION` (machine-owned A2A).',\n 'SINGLETON: the injected owner FK is the auto business key, so the declaration deliberately does NOT opt out of the singleton auto-business-key. NOTE the uniqueness is index-enforced on MongoDB only — the SQL planner leaves index creation to migrations, so on PostgreSQL the one-row invariant is upheld by the runtime rather than the database (see businessConstraints).',\n 'The allowance is NOT persisted here: it is resolved live from the `a2a.llm.tokensPerPeriod` LIMIT feature (`A2A_TOKEN_BUDGET_FEATURE_ID` in `@wildo-ai/saas-models`) via feature resolution for the owner scope.',\n 'Sole runtime reader/writer is `A2ATokenBudgetBackendService` (`@wildo-ai/saas-backend-lib`); CREATE and READ go through `*AsSystem` under the resource\\'s `systemAccessPolicy`, while the counter is advanced by the atomic repository-tier increment primitive (there is deliberately no UPDATE operation).',\n 'Runtime has no userNotifications / m2mNotifications — do not add communications.* (DF-1).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document id of this tenant\\'s single A2A token-budget row.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n periodKey: schemaShape.periodKey.stringSpec({\n meaning: 'Stable id of the budget WINDOW this counter currently covers — a UTC calendar month (`YYYY-MM`) in v1.',\n whyItMatters: 'It is the reset boundary: when the runtime resolves a different current period, the accumulator resets `consumedTokens` and advances this key in place, so a stale period reads as zero consumption rather than carrying spend forward.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n consumedTokens: schemaShape.consumedTokens.numberSpec({\n meaning: 'Tokens (prompt + completion) this tenant\\'s A2A agent turns have consumed within `periodKey`.',\n whyItMatters: 'It is the single value the pre-dispatch gate compares against the plan allowance; once it reaches the allowance the transport denies further turns for the rest of the period.',\n unit: 'tokens',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n lastTurnAt: schemaShape.lastTurnAt.dateSpec({\n meaning: 'When the last A2A turn was recorded against this budget.',\n whyItMatters: 'Observability only — it lets an operator see whether a tenant is actively spending without reconstructing the turn log; nothing in the gate reads it.',\n temporalRole: 'occurred',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the tenant\\'s budget row was first opened (its first budgeted A2A turn).',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the counter was last incremented or rolled to a new period.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open the tenant\\'s budget singleton on its first budgeted A2A turn.',\n outcome: 'The tenant has exactly one counter row, stamped with the current period and that first turn\\'s tokens, against which every later turn is measured.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The tenant\\'s single budget row was opened. Internal/system write path (INTERNAL_CALL, service-tier) — the A2A runtime writes on the tenant\\'s behalf via `createAsSystem`; there is no self-serve create surface.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails schema validation (e.g. a missing `periodKey` or the injected owner FK).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A concurrent turn already opened the tenant\\'s singleton — the injected owner FK is a unique business key, so only one racer creates. The accumulator swallows this and increments the winner\\'s row instead of surfacing the conflict to the turn.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts to create a budget row — the operation is INTERNAL_CALL with a super-admin floor, reachable only through the A2A runtime.' },\n ],\n idempotent: false,\n },\n\n [Op.READ]: {\n purpose: 'Read the current A2A token-consumption period, consumed-token count, and latest recorded turn for this scope.',\n outcome: 'The integration owner can monitor current-period A2A consumption without treating this state as the plan allowance or as historical usage.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The current consumption state for this scope is returned, including its period key, consumed tokens, and latest recorded turn when available.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to inspect A2A consumption for this user, organization, or application scope.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No budgeted A2A turn has been recorded for this scope yet, or the requested scope belongs to another owner.' },\n ],\n idempotent: true,\n examples: [{\n title: `Inspect current ${exampleScope.scopeLabel} A2A consumption`,\n request: exampleScope.scopeIdentity,\n response: currentBudgetExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `Inspect current ${exampleScope.scopeLabel} A2A consumption with context`,\n request: exampleScope.scopeIdentity,\n response: currentBudgetExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `Inspect the compact ${exampleScope.scopeLabel} A2A consumption summary`,\n request: exampleScope.scopeIdentity,\n response: currentBudgetSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n\n // No UPDATE operation is declared, deliberately: advancing the counter after a turn\n // (increment, or roll the period in place) is an ATOMIC repository-tier increment, not a\n // service-tier update, precisely so concurrent turns cannot lose tokens to a\n // read-modify-write race. Documenting an UPDATE here would describe a write path that does\n // not exist and invite routing the counter through it.\n\n [Op.DELETE]: {\n purpose: 'Remove a tenant\\'s budget row — platform teardown, and the cleanup the owning user/org/app deletion cascades to.',\n outcome: 'The counter row is physically removed, so a deleted tenant leaves no orphaned enforcement state behind.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The budget row was removed. The role floor is deliberately PLATFORM-ONLY (`APP_ADMIN_SUPER_ADMIN`) — NOT the owner-read roles and NOT an org admin: deleting this row zeroes the tenant\\'s recorded consumption, which is a spend-cap bypass. Read-authority does not imply delete-authority here, because the counter is enforcement state ABOUT the tenant rather than data BELONGING to it. The same default op powers the composition onParentDelete cascade, which runs at the repository tier below role checks and is therefore unaffected by the floor.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No budget row exists for the targeted tenant (it never ran a budgeted turn, or it was already removed).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A caller below the platform super-admin floor — including the owning tenant\\'s own admin — attempts to delete the row and reset its recorded spend.' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'One row per tenant: the injected owner FK (`userId` / `organizationId` / `applicationId`) is the unique business key (database-enforced on MongoDB only — see the PostgreSQL caveat below). The period lives INSIDE the row and is rolled in place, so the resource holds current-period state only — per-period history and multi-budget-feature accounting are documented follow-ons.',\n 'The plan ALLOWANCE is never stored here. It is resolved live from the `a2a.llm.tokensPerPeriod` LIMIT feature for the owner scope, so a plan change takes effect on the next turn with no copy to reconcile. This resource is the CONSUMPTION half only.',\n 'This is internal enforcement state, not user-authored data: only the A2A runtime writes it. It CREATES the row via `*AsSystem` (INTERNAL_CALL, super-admin, under the resource\\'s `systemAccessPolicy`), then advances the counter through an ATOMIC repository-tier increment rather than an update operation — which is why no UPDATE operation is declared at all. The tenant\\'s only surface is reading its own consumption.',\n 'DELETE authority is strictly platform-level and intentionally diverges from read authority: zeroing recorded consumption would let a tenant admin reset their own spend cap at will.',\n 'The budget window is a UTC calendar month (`YYYY-MM`) in v1 — deterministic and free of a per-turn billing-account lookup on the hot path. Anchoring the window to the tenant\\'s actual subscription period is a documented follow-on, isolated to the single function that resolves the current period key.',\n 'Overage is bounded but is NOT a single turn: usage is only known AFTER a turn completes and recording is fire-and-forget, so every turn already in flight when the allowance is reached passes the gate on the same reading. The burst throttle that bounds it is per-PRINCIPAL while the budget is per-TENANT, so a tenant with many members or machine credentials can overshoot proportionally to how many act at once. Pre-charging an estimate was rejected because it would require a refund/reconcile path on every turn.',\n 'Accumulation is adapter-portable: the counter is advanced through a per-adapter atomic increment primitive (a single document update on MongoDB, a single `UPDATE … RETURNING` on PostgreSQL) rather than raw MongoDB operators, so a concurrent increment cannot be lost to a read-modify-write race on either backend. Both arms are covered by real-database integration tests, including the concurrent compare-and-set on a REAL PostgreSQL: a racing writer holds the row lock while a guarded reset blocks on it, and on resuming the reset correctly matches nothing rather than overwriting the racer\\'s accumulated total. The in-memory SQL engine also used in tests models neither MVCC nor the row-lock recheck, so it covers SQL shape and sequential semantics only — the concurrency proof comes from the real-engine suite.',\n 'Exactly one row per tenant is declared through the injected owner foreign key, but the unique index is emitted only by the MongoDB adapter — the SQL planner leaves index creation to migrations. On PostgreSQL the invariant is therefore NOT database-enforced today: the runtime repairs the common race (a rejected create falls through to an increment), but two truly simultaneous first-ever turns can leave two rows, splitting consumption and under-reporting spend until a unique constraint on the owner foreign key is added to the migration.',\n 'A budget row is owned by exactly ONE scope; the polymorphic owner FK is injected on each concrete variant schema, not on `A2ATokenBudgetStateSchema` itself, and the owner primary-scope filter must never expose another tenant\\'s counter.',\n ],\n }),\n // The owner is the injected scope FK, anchored by the `<SCOPE> → *A2aTokenBudgetState`\n // primary-scope COMPOSITION edge in `resources-registry.shared.core.definitions.ts`\n // (generated by `createPolymorphicScopeRelationships` with `childCardinality: ONE`).\n // The registry factory derives the scope from `isPrimaryScope: true`; this declaration\n // feeds the spec ↔ registry alignment guard and must match per variant.\n { resourcePrimaryScope: a2aBudgetPrimaryScopeByResourceType[resourceType] },\n );\n}\n\nexport const userA2aTokenBudgetStateResourceSpecification = buildA2ATokenBudgetStateResourceSpecification(\n CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE,\n 'USER_A2A_TOKEN_BUDGET_STATE',\n);\n\nexport const organizationA2aTokenBudgetStateResourceSpecification = buildA2ATokenBudgetStateResourceSpecification(\n CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE,\n 'ORGANIZATION_A2A_TOKEN_BUDGET_STATE',\n);\n\nexport const applicationA2aTokenBudgetStateResourceSpecification = buildA2ATokenBudgetStateResourceSpecification(\n CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE,\n 'APPLICATION_A2A_TOKEN_BUDGET_STATE',\n);\n"]}
@@ -1,5 +1,5 @@
1
1
  import { CoreResourceOperation as Op, FlowsActors_ConversationRole, FlowsActors_MessageContentType, FlowActorSystem_Kind, FlowsActors_Status } from '@wildo-ai/saas-models';
2
- export declare const userFlowActorExecutionsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
2
+ export declare const userFlowActorExecutionsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
3
3
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
4
4
  executionId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodUUID>>>;
5
5
  systemRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
@@ -24,7 +24,7 @@ export declare const userFlowActorExecutionsResourceSpecification: import("../..
24
24
  updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>>;
25
25
  finishedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodDate>>>;
26
26
  }, import("zod/v4/core").$strip>>;
27
- export declare const organizationFlowActorExecutionsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
27
+ export declare const organizationFlowActorExecutionsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
28
28
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
29
29
  executionId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodUUID>>>;
30
30
  systemRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
@@ -49,7 +49,7 @@ export declare const organizationFlowActorExecutionsResourceSpecification: impor
49
49
  updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>>;
50
50
  finishedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodDate>>>;
51
51
  }, import("zod/v4/core").$strip>>;
52
- export declare const applicationFlowActorExecutionsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
52
+ export declare const applicationFlowActorExecutionsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
53
53
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
54
54
  executionId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodUUID>>>;
55
55
  systemRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"flow-actor-executions.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-executions.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AA4Y/B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;iCAGxD,CAAC;AAEF,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;iCAGhE,CAAC;AAEF,eAAO,MAAM,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;iCAG/D,CAAC"}
1
+ {"version":3,"file":"flow-actor-executions.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-executions.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AA8Y/B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;iCAGxD,CAAC;AAEF,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;iCAGhE,CAAC;AAEF,eAAO,MAAM,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;iCAG/D,CAAC"}
@@ -2,6 +2,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
2
2
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
3
3
  import { CoreResourceOperation as Op, CoreResourceType, FLOWS_ACTORS_NO_MACHINE_CREDENTIAL, FlowActorExecutionBaseSchema, FlowsActors_ConversationRole, FlowsActors_MessageContentType, FlowActorSystem_Kind, FlowsActors_Status, ResourcePrimaryScope, flowActorExecutionsPolymorphicFactories, } from '@wildo-ai/saas-models';
4
4
  import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
5
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
5
6
  /**
6
7
  * Owns the concrete scope and route identity for each polymorphic contract.
7
8
  * Keeping this exhaustive prevents a user example from silently teaching an
@@ -107,6 +108,7 @@ function buildFlowActorExecutionResourceSpecification(resourceType, resourceType
107
108
  businessRole: 'Conversation history an authorized caller uses to revisit an agent exchange and determine whether it is still running or has finished.',
108
109
  lifecycleRole: 'Opens when an agent conversation starts, accumulates messages and status changes while work proceeds, and finishes on completion, failure, or cancellation.',
109
110
  audience: LabelAudience.DEVELOPER,
111
+ subDomain: EngineResourceSubDomain.FLOWS_ACTORS,
110
112
  codeHandling: {
111
113
  mainSchema: {
112
114
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"flow-actor-executions.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-executions.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,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uCAAuC,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAoC5F;;;;GAIG;AACH,SAAS,oCAAoC,CAAC,YAAkC;IAC9E,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,gBAAgB,CAAC,0BAA0B;YAC9C,OAAO;gBACL,aAAa,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE;gBAC5C,gBAAgB,EAAE,EAAE,wBAAwB,EAAE,2BAA2B,EAAE;gBAC3E,UAAU,EAAE,MAAM;gBAClB,mBAAmB,EAAE,kCAAkC;aACxD,CAAC;QACJ,KAAK,gBAAgB,CAAC,kCAAkC;YACtD,OAAO;gBACL,aAAa,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE;gBACnD,gBAAgB,EAAE,EAAE,gCAAgC,EAAE,0BAA0B,EAAE;gBAClF,UAAU,EAAE,cAAc;gBAC1B,mBAAmB,EAAE,sCAAsC;aAC5D,CAAC;QACJ,KAAK,gBAAgB,CAAC,iCAAiC;YACrD,OAAO;gBACL,aAAa,EAAE,EAAE,aAAa,EAAE,gBAAgB,EAAE;gBAClD,gBAAgB,EAAE,EAAE,+BAA+B,EAAE,0BAA0B,EAAE;gBACjF,UAAU,EAAE,aAAa;gBACzB,mBAAmB,EAAE,sCAAsC;aAC5D,C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a,EAAE,IAAI,EAAE,gGAAgG,EAAE;oBACtJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,iIAAiI,EAAE;iBACxL;gBACD,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,CAAC;wBACT,KAAK,EAAE,sBAAsB,YAAY,CAAC,UAAU,qBAAqB;wBACzE,OAAO,EAAE,EAAE,GAAG,YAAY,CAAC,aAAa,EAAE,GAAG,YAAY,CAAC,gBAAgB,EAAE;wBAC5E,QAAQ,EAAE,EAAE,EAAE,EAAE,yBAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,0BAA0B,EAAE;wBACtF,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QAED,mBAAmB,EAAE;YACnB,iOAAiO;YACjO,qHAAqH;YACrH,uJAAuJ;YACvJ,gSAAgS;SACjS;KACF,CAAC;IACF,uFAAuF;IACvF,oFAAoF;IACpF,qFAAqF;IACrF,oFAAoF;IACpF,8CAA8C;IAC9C,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,4CAA4C,GAAG,4CAA4C,CACtG,gBAAgB,CAAC,0BAA0B,EAC3C,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,oDAAoD,GAAG,4CAA4C,CAC9G,gBAAgB,CAAC,kCAAkC,EACnD,oCAAoC,CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,mDAAmD,GAAG,4CAA4C,CAC7G,gBAAgB,CAAC,iCAAiC,EAClD,mCAAmC,CACpC,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 FlowActorExecutionBaseSchema,\n FlowsActors_ConversationRole,\n FlowsActors_MessageContentType,\n FlowActorSystem_Kind,\n FlowsActors_Status,\n ResourcePrimaryScope,\n flowActorExecutionsPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\n/**\n * Framework-owned specification for the `flowActorExecutions` POLYMORPHIC family:\n * the persisted record of a single flow/actor system execution (conversational\n * chat history + kind-discriminated runtime state). One base envelope is stamped\n * out as three genuine single-scope variants, each owned by its injected owner FK:\n * - `userFlowActorExecutions` (USER_SELF — WS chat + user-delegated A2A)\n * - `organizationFlowActorExecutions` (ORGANIZATIONS — org-machine A2A)\n * - `applicationFlowActorExecutions` (APPLICATION — app-machine A2A)\n *\n * The default API READ/LIST are the per-owner chat-history surface. CREATE/UPDATE\n * are internal (INTERNAL_CALL, service-tier) — only the flows-actors conversational\n * runtime persists executions and appends messages via `*AsSystem`. DELETE is a single\n * owner-facing API_CALL (default) with a role floor DISTINCT from read (a user deletes\n * only their own chat; org/app conversations require org/app admin); the same default op\n * also powers the owning-scope deletion cascade at the repository tier. One spec covers\n * all three variants (per the billing / SSO polymorphic-spec precedent).\n */\n\ntype FlowExecResourceType =\n | CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS\n | CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS\n | CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS;\ntype FlowExecResourceTypeMember =\n | 'USER_FLOW_ACTOR_EXECUTIONS'\n | 'ORGANIZATION_FLOW_ACTOR_EXECUTIONS'\n | 'APPLICATION_FLOW_ACTOR_EXECUTIONS';\n\ninterface FlowActorExecutionScopeExample {\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/**\n * Owns the concrete scope and route identity for each polymorphic contract.\n * Keeping this exhaustive prevents a user example from silently teaching an\n * organization/application parameter (or the inverse).\n */\nfunction createFlowActorExecutionScopeExample(resourceType: FlowExecResourceType): FlowActorExecutionScopeExample {\n switch (resourceType) {\n case CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS:\n return {\n scopeIdentity: { userId: 'user_01JEXAMPLE' },\n resourceIdentity: { userFlowActorExecutionId: 'flow_exec_user_01JEXAMPLE' },\n scopeLabel: 'user',\n machineCredentialId: FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n };\n case CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS:\n return {\n scopeIdentity: { organizationId: 'org_01JEXAMPLE' },\n resourceIdentity: { organizationFlowActorExecutionId: 'flow_exec_org_01JEXAMPLE' },\n scopeLabel: 'organization',\n machineCredentialId: 'machine_credential_org_finance_agent',\n };\n case CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS:\n return {\n scopeIdentity: { applicationId: 'app_01JEXAMPLE' },\n resourceIdentity: { applicationFlowActorExecutionId: 'flow_exec_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 execution resource type: ${String(exhaustiveResourceType)}`);\n }\n }\n}\n\nfunction createFlowActorExecutionPage(data: readonly unknown[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: 1 },\n };\n}\n\nconst flowExecPrimaryScopeByResourceType: Record<FlowExecResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]: ResourcePrimaryScope.USER_SELF,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype Cfg = ReturnType<(typeof flowActorExecutionsPolymorphicFactories)[CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof FlowActorExecutionBaseSchema;\n\nfunction buildFlowActorExecutionResourceSpecification(\n resourceType: FlowExecResourceType,\n resourceTypeMemberName: FlowExecResourceTypeMember,\n) {\n const exampleScope = createFlowActorExecutionScopeExample(resourceType);\n const completedExecutionExample = {\n _id: Object.values(exampleScope.resourceIdentity)[0],\n executionId: '11111111-1111-4111-8111-111111111111',\n systemRef: 'finance-operations-assistant',\n kind: FlowActorSystem_Kind.ACTOR,\n resourceServerInstanceRef: 'finance-operations-agent',\n machineCredentialId: exampleScope.machineCredentialId,\n status: FlowsActors_Status.COMPLETED,\n statusChanges: [\n { status: FlowsActors_Status.READY, timestamp: '2026-08-20T08:30:00.000Z' },\n { status: FlowsActors_Status.PROCESSING, timestamp: '2026-08-20T08:30:02.000Z' },\n { status: FlowsActors_Status.COMPLETED, timestamp: '2026-08-20T08:30:14.000Z' },\n ],\n messages: [\n {\n id: '11111111-1111-4111-8111-111111111112',\n role: FlowsActors_ConversationRole.USER,\n contentType: FlowsActors_MessageContentType.TEXT,\n content: 'Summarize the overdue purchase approvals for this week.',\n createdAt: '2026-08-20T08:30:00.000Z',\n },\n {\n id: '11111111-1111-4111-8111-111111111113',\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: 'Three approvals are overdue; the highest-value request is waiting on Finance.',\n createdAt: '2026-08-20T08:30:14.000Z',\n },\n ],\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 activeExecutionExample = {\n ...completedExecutionExample,\n _id: `${completedExecutionExample._id}_active`,\n executionId: '11111111-1111-4111-8111-111111111121',\n status: FlowsActors_Status.PROCESSING,\n statusChanges: completedExecutionExample.statusChanges.slice(0, 2),\n messages: completedExecutionExample.messages.slice(0, 1),\n updatedAt: '2026-08-20T09:05:02.000Z',\n finishedAt: undefined,\n };\n const summarizeExecution = (execution: typeof completedExecutionExample) => ({\n _id: execution._id,\n executionId: execution.executionId,\n systemRef: execution.systemRef,\n kind: execution.kind,\n status: execution.status,\n updatedAt: execution.updatedAt,\n ...(execution.finishedAt === undefined ? {} : { finishedAt: execution.finishedAt }),\n });\n\n return resourceSpecification<undefined, Core, Main>(\n flowActorExecutionsPolymorphicFactories[resourceType],\n FlowActorExecutionBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Track one conversation with an application agent, including its messages and current lifecycle state.',\n businessRole: 'Conversation history an authorized caller uses to revisit an agent exchange and determine whether it is still running or has finished.',\n lifecycleRole: 'Opens when an agent conversation starts, accumulates messages and status changes while work proceeds, and finishes on completion, failure, or cancellation.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowActorExecutionBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'flowActorExecutionsPolymorphicFactories', 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: ['Three variants under `FLOW_ACTOR_EXECUTION_SCOPE_VARIANTS` — user row is `USER_SELF`; org/app rows are `ORGANIZATIONS`/`APPLICATION` (machine-owned).'],\n },\n\n fields: {\n executionId: schemaShape.executionId.stringSpec({\n meaning: 'Stable business identifier for one execution, generated by the conversational runtime and echoed over the WebSocket channel.',\n whyItMatters: 'It is the address by which the live WebSocket stream, the persisted record, and the frontend view all refer to the same running execution.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n systemRef: schemaShape.systemRef.stringSpec({\n meaning: 'Ref of the flow/actor system that was executed.',\n whyItMatters: 'It links the execution back to the authored system whose graph the standalone view renders, so history and live status attach to the right system.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n kind: schemaShape.kind.enumSpec({\n meaning: 'Whether this execution belongs to a FLOW system or an ACTOR system.',\n whyItMatters: 'It discriminates flow vs actor executions (which graph renderer the view uses); the same resource persists both kinds. Richer per-kind runtime-state overlays are a documented follow-on — v1 persists the conversational envelope only.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowActorSystem_Kind',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FlowActorSystem_Kind.FLOW]: { meaning: 'A trigger→steps→edges→finish flow graph execution (near-term follow-on).' },\n [FlowActorSystem_Kind.ACTOR]: { meaning: 'An actor-system execution; the vehicle for the v1 conversational assistant.' },\n },\n }),\n\n resourceServerInstanceRef: schemaShape.resourceServerInstanceRef.stringSpec({\n meaning: 'Which A2A agent this conversation was opened through. The WebSocket surface and the default unnamed agent both store a reserved sentinel.',\n whyItMatters: 'Part of the continuation FILTER, not metadata. A2A agents are declared as separate resource servers with per-instance token audiences, so without this axis a caller holding a context identifier could continue the thread through a different agent and load the prior transcript into that agent\\'s context — and this plane carries the full message log, not a short title.',\n semanticRole: 'identifier',\n }),\n\n machineCredentialId: schemaShape.machineCredentialId.stringSpec({\n meaning: 'Which machine credential opened this conversation. A user-delegated turn stores a reserved sentinel, because there the human is the principal.',\n whyItMatters: 'Part of the read FILTER alongside the owner scope, not descriptive metadata. 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 continue another client\\'s conversation and read its entire message log.',\n semanticRole: 'identifier',\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Current runtime state of the execution.',\n whyItMatters: 'It is the primary signal the frontend uses to drive the live execution-status overlay and to know whether the conversation is still progressing.',\n importance: FieldSemanticImportance.PRIMARY,\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: 'Created and ready to begin processing.' },\n [FlowsActors_Status.PENDING]: { meaning: 'Accepted but not yet actively processing.' },\n [FlowsActors_Status.PROCESSING]: { meaning: 'Actively running — the agent is responding / tools are executing.' },\n [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Suspended at a human-in-the-loop approval boundary — the agent called an approval-gated tool and the turn is waiting for a human decision before resuming. Non-terminal; resolves to PROCESSING→COMPLETED on approval or a terminal state on denial/expiry.' },\n [FlowsActors_Status.COMPLETED]: { meaning: 'Finished successfully.' },\n [FlowsActors_Status.FAILED]: { meaning: 'Finished unsuccessfully and stands in a failed state.' },\n [FlowsActors_Status.CANCELLED]: { meaning: 'Intentionally stopped before completion.' },\n [FlowsActors_Status.ABORTED]: { meaning: 'Terminated abnormally (e.g. transport loss or unrecoverable error).' },\n },\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open a new execution record when the conversational runtime starts a system.',\n outcome: 'One flow/actor execution begins to be tracked, ready to accumulate messages and status changes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An execution row was registered. This is an internal/system write path (INTERNAL_CALL, service-tier), not a self-serve API create — the conversational runtime writes on the owner\\'s behalf via *AsSystem.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The execution payload fails schema validation (e.g. missing `kind`/`status`/`systemRef`, or the injected owner FK).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts to create an execution — rows are created only by the flows-actors runtime through the internal repository service.' },\n ],\n idempotent: false,\n },\n\n [Op.READ]: {\n purpose: 'Read one past or in-progress agent conversation and its current state.',\n outcome: 'The authorized caller receives the representation selected by the route: the full conversation and lifecycle history, relationship context, or a compact lifecycle summary.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested conversation is returned in the full, context, or summary representation selected by the route.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No conversation exists for the id in the requested user, organization, or application scope.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to read agent conversation history for this scope.' },\n ],\n idempotent: true,\n examples: [{\n title: `Inspect a completed ${exampleScope.scopeLabel} agent conversation`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedExecutionExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `Inspect a completed ${exampleScope.scopeLabel} agent conversation with context`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedExecutionExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `Inspect the compact ${exampleScope.scopeLabel} conversation state`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: summarizeExecution(completedExecutionExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n\n [Op.LIST]: {\n purpose: 'List agent conversations visible in the requested user, organization, or application scope.',\n outcome: 'The authorized caller can browse recent conversations and distinguish active work from completed history.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A possibly empty page of conversations visible in the requested scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to list agent conversation history for this scope.' },\n ],\n idempotent: true,\n examples: [{\n title: `List recent ${exampleScope.scopeLabel} agent conversations`,\n request: { ...exampleScope.scopeIdentity, page: 1, limit: 20, sort: 'updatedAt:desc' },\n response: createFlowActorExecutionPage([activeExecutionExample, completedExecutionExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `List recent ${exampleScope.scopeLabel} conversations with context`,\n request: { ...exampleScope.scopeIdentity, page: 1, limit: 20 },\n response: createFlowActorExecutionPage([completedExecutionExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `List compact ${exampleScope.scopeLabel} conversation states`,\n request: { ...exampleScope.scopeIdentity, page: 1, limit: 20 },\n response: createFlowActorExecutionPage([\n summarizeExecution(activeExecutionExample as typeof completedExecutionExample),\n summarizeExecution(completedExecutionExample),\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n\n [Op.UPDATE]: {\n purpose: 'Advance the execution — append messages, record status transitions, and evolve runtime state.',\n outcome: 'The persisted record stays synchronized with the live conversation streamed over the WebSocket channel.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The execution recorded a new message / status change / runtime-state update. Internal/system write path — the conversational runtime owns these transitions.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No execution row exists for the supplied id to advance.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The update patch fails schema validation (e.g. an unrecognized `status`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts to mutate execution state.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Permanently remove one agent conversation from the requested scope.',\n outcome: 'The selected conversation and its transcript are no longer available.',\n whenToUse: 'Use when an authorized user or administrator intentionally removes conversation history that is no longer needed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The execution row was removed. Owner-facing API_CALL (default) via the `/flows-actors/history` DELETE route; delete authority is DISTINCT from read (a user deletes only their own chat; org/app conversations require org/app admin). The same default op also powers the composition onParentDelete cascade at the repository tier.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The executionId is unknown or belongs to another owner (the owner-scope filter yields no row).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the delete authority — a non-owner user, or an org/app member without admin — attempts to delete an execution.' },\n ],\n idempotent: true,\n examples: [{\n title: `Remove a completed ${exampleScope.scopeLabel} agent conversation`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: { id: completedExecutionExample._id, deletedAt: '2026-08-20T10:15:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n\n businessConstraints: [\n 'A conversation is owned by exactly ONE scope (the injected owner FK — `userId` / `organizationId` / `applicationId`); the default API surface must never expose another owner\\'s conversation (the owner primary-scope filter).',\n 'The polymorphic owner FK is injected on each concrete variant schema, not on `FlowActorExecutionBaseSchema` itself.',\n 'Writes are system-internal — only the flows-actors conversational runtime persists executions and appends messages; there is no self-serve write API.',\n 'The record is kind-agnostic: the `kind` discriminant lets it persist both FLOW and ACTOR executions, so the flow system can adopt it without reshaping the base envelope. Typed per-kind runtime-state overlays are a documented follow-on (v1 persists the conversational envelope + status).',\n ],\n }),\n // The owner is the injected scope FK, anchored by the `<SCOPE> → *FlowActorExecutions`\n // primary-scope composition edge in `resources-registry.shared.core.definitions.ts`\n // (generated by `createPolymorphicScopeRelationships`). The registry factory derives\n // the scope from `isPrimaryScope: true`; this declaration feeds the spec ↔ registry\n // alignment guard and must match per variant.\n { resourcePrimaryScope: flowExecPrimaryScopeByResourceType[resourceType] },\n );\n}\n\nexport const userFlowActorExecutionsResourceSpecification = buildFlowActorExecutionResourceSpecification(\n CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS,\n 'USER_FLOW_ACTOR_EXECUTIONS',\n);\n\nexport const organizationFlowActorExecutionsResourceSpecification = buildFlowActorExecutionResourceSpecification(\n CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS,\n 'ORGANIZATION_FLOW_ACTOR_EXECUTIONS',\n);\n\nexport const applicationFlowActorExecutionsResourceSpecification = buildFlowActorExecutionResourceSpecification(\n CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS,\n 'APPLICATION_FLOW_ACTOR_EXECUTIONS',\n);\n"]}
1
+ {"version":3,"file":"flow-actor-executions.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-executions.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,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uCAAuC,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAoC3E;;;;GAIG;AACH,SAAS,oCAAoC,CAAC,YAAkC;IAC9E,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,gBAAgB,CAAC,0BAA0B;YAC9C,OAAO;gBACL,aAAa,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE;gBAC5C,gBAAgB,EAAE,EAAE,wBAAwB,EAAE,2BAA2B,EAAE;gBAC3E,UAAU,EAAE,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CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,4CAA4C,GAAG,4CAA4C,CACtG,gBAAgB,CAAC,0BAA0B,EAC3C,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,oDAAoD,GAAG,4CAA4C,CAC9G,gBAAgB,CAAC,kCAAkC,EACnD,oCAAoC,CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,mDAAmD,GAAG,4CAA4C,CAC7G,gBAAgB,CAAC,iCAAiC,EAClD,mCAAmC,CACpC,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 FlowActorExecutionBaseSchema,\n FlowsActors_ConversationRole,\n FlowsActors_MessageContentType,\n FlowActorSystem_Kind,\n FlowsActors_Status,\n ResourcePrimaryScope,\n flowActorExecutionsPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * Framework-owned specification for the `flowActorExecutions` POLYMORPHIC family:\n * the persisted record of a single flow/actor system execution (conversational\n * chat history + kind-discriminated runtime state). One base envelope is stamped\n * out as three genuine single-scope variants, each owned by its injected owner FK:\n * - `userFlowActorExecutions` (USER_SELF — WS chat + user-delegated A2A)\n * - `organizationFlowActorExecutions` (ORGANIZATIONS — org-machine A2A)\n * - `applicationFlowActorExecutions` (APPLICATION — app-machine A2A)\n *\n * The default API READ/LIST are the per-owner chat-history surface. CREATE/UPDATE\n * are internal (INTERNAL_CALL, service-tier) — only the flows-actors conversational\n * runtime persists executions and appends messages via `*AsSystem`. DELETE is a single\n * owner-facing API_CALL (default) with a role floor DISTINCT from read (a user deletes\n * only their own chat; org/app conversations require org/app admin); the same default op\n * also powers the owning-scope deletion cascade at the repository tier. One spec covers\n * all three variants (per the billing / SSO polymorphic-spec precedent).\n */\n\ntype FlowExecResourceType =\n | CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS\n | CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS\n | CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS;\ntype FlowExecResourceTypeMember =\n | 'USER_FLOW_ACTOR_EXECUTIONS'\n | 'ORGANIZATION_FLOW_ACTOR_EXECUTIONS'\n | 'APPLICATION_FLOW_ACTOR_EXECUTIONS';\n\ninterface FlowActorExecutionScopeExample {\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/**\n * Owns the concrete scope and route identity for each polymorphic contract.\n * Keeping this exhaustive prevents a user example from silently teaching an\n * organization/application parameter (or the inverse).\n */\nfunction createFlowActorExecutionScopeExample(resourceType: FlowExecResourceType): FlowActorExecutionScopeExample {\n switch (resourceType) {\n case CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS:\n return {\n scopeIdentity: { userId: 'user_01JEXAMPLE' },\n resourceIdentity: { userFlowActorExecutionId: 'flow_exec_user_01JEXAMPLE' },\n scopeLabel: 'user',\n machineCredentialId: FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n };\n case CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS:\n return {\n scopeIdentity: { organizationId: 'org_01JEXAMPLE' },\n resourceIdentity: { organizationFlowActorExecutionId: 'flow_exec_org_01JEXAMPLE' },\n scopeLabel: 'organization',\n machineCredentialId: 'machine_credential_org_finance_agent',\n };\n case CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS:\n return {\n scopeIdentity: { applicationId: 'app_01JEXAMPLE' },\n resourceIdentity: { applicationFlowActorExecutionId: 'flow_exec_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 execution resource type: ${String(exhaustiveResourceType)}`);\n }\n }\n}\n\nfunction createFlowActorExecutionPage(data: readonly unknown[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: 1 },\n };\n}\n\nconst flowExecPrimaryScopeByResourceType: Record<FlowExecResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]: ResourcePrimaryScope.USER_SELF,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype Cfg = ReturnType<(typeof flowActorExecutionsPolymorphicFactories)[CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof FlowActorExecutionBaseSchema;\n\nfunction buildFlowActorExecutionResourceSpecification(\n resourceType: FlowExecResourceType,\n resourceTypeMemberName: FlowExecResourceTypeMember,\n) {\n const exampleScope = createFlowActorExecutionScopeExample(resourceType);\n const completedExecutionExample = {\n _id: Object.values(exampleScope.resourceIdentity)[0],\n executionId: '11111111-1111-4111-8111-111111111111',\n systemRef: 'finance-operations-assistant',\n kind: FlowActorSystem_Kind.ACTOR,\n resourceServerInstanceRef: 'finance-operations-agent',\n machineCredentialId: exampleScope.machineCredentialId,\n status: FlowsActors_Status.COMPLETED,\n statusChanges: [\n { status: FlowsActors_Status.READY, timestamp: '2026-08-20T08:30:00.000Z' },\n { status: FlowsActors_Status.PROCESSING, timestamp: '2026-08-20T08:30:02.000Z' },\n { status: FlowsActors_Status.COMPLETED, timestamp: '2026-08-20T08:30:14.000Z' },\n ],\n messages: [\n {\n id: '11111111-1111-4111-8111-111111111112',\n role: FlowsActors_ConversationRole.USER,\n contentType: FlowsActors_MessageContentType.TEXT,\n content: 'Summarize the overdue purchase approvals for this week.',\n createdAt: '2026-08-20T08:30:00.000Z',\n },\n {\n id: '11111111-1111-4111-8111-111111111113',\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: 'Three approvals are overdue; the highest-value request is waiting on Finance.',\n createdAt: '2026-08-20T08:30:14.000Z',\n },\n ],\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 activeExecutionExample = {\n ...completedExecutionExample,\n _id: `${completedExecutionExample._id}_active`,\n executionId: '11111111-1111-4111-8111-111111111121',\n status: FlowsActors_Status.PROCESSING,\n statusChanges: completedExecutionExample.statusChanges.slice(0, 2),\n messages: completedExecutionExample.messages.slice(0, 1),\n updatedAt: '2026-08-20T09:05:02.000Z',\n finishedAt: undefined,\n };\n const summarizeExecution = (execution: typeof completedExecutionExample) => ({\n _id: execution._id,\n executionId: execution.executionId,\n systemRef: execution.systemRef,\n kind: execution.kind,\n status: execution.status,\n updatedAt: execution.updatedAt,\n ...(execution.finishedAt === undefined ? {} : { finishedAt: execution.finishedAt }),\n });\n\n return resourceSpecification<undefined, Core, Main>(\n flowActorExecutionsPolymorphicFactories[resourceType],\n FlowActorExecutionBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Track one conversation with an application agent, including its messages and current lifecycle state.',\n businessRole: 'Conversation history an authorized caller uses to revisit an agent exchange and determine whether it is still running or has finished.',\n lifecycleRole: 'Opens when an agent conversation starts, accumulates messages and status changes while work proceeds, and finishes 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: 'FlowActorExecutionBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'flowActorExecutionsPolymorphicFactories', 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: ['Three variants under `FLOW_ACTOR_EXECUTION_SCOPE_VARIANTS` — user row is `USER_SELF`; org/app rows are `ORGANIZATIONS`/`APPLICATION` (machine-owned).'],\n },\n\n fields: {\n executionId: schemaShape.executionId.stringSpec({\n meaning: 'Stable business identifier for one execution, generated by the conversational runtime and echoed over the WebSocket channel.',\n whyItMatters: 'It is the address by which the live WebSocket stream, the persisted record, and the frontend view all refer to the same running execution.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n systemRef: schemaShape.systemRef.stringSpec({\n meaning: 'Ref of the flow/actor system that was executed.',\n whyItMatters: 'It links the execution back to the authored system whose graph the standalone view renders, so history and live status attach to the right system.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n kind: schemaShape.kind.enumSpec({\n meaning: 'Whether this execution belongs to a FLOW system or an ACTOR system.',\n whyItMatters: 'It discriminates flow vs actor executions (which graph renderer the view uses); the same resource persists both kinds. Richer per-kind runtime-state overlays are a documented follow-on — v1 persists the conversational envelope only.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FlowActorSystem_Kind',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FlowActorSystem_Kind.FLOW]: { meaning: 'A trigger→steps→edges→finish flow graph execution (near-term follow-on).' },\n [FlowActorSystem_Kind.ACTOR]: { meaning: 'An actor-system execution; the vehicle for the v1 conversational assistant.' },\n },\n }),\n\n resourceServerInstanceRef: schemaShape.resourceServerInstanceRef.stringSpec({\n meaning: 'Which A2A agent this conversation was opened through. The WebSocket surface and the default unnamed agent both store a reserved sentinel.',\n whyItMatters: 'Part of the continuation FILTER, not metadata. A2A agents are declared as separate resource servers with per-instance token audiences, so without this axis a caller holding a context identifier could continue the thread through a different agent and load the prior transcript into that agent\\'s context — and this plane carries the full message log, not a short title.',\n semanticRole: 'identifier',\n }),\n\n machineCredentialId: schemaShape.machineCredentialId.stringSpec({\n meaning: 'Which machine credential opened this conversation. A user-delegated turn stores a reserved sentinel, because there the human is the principal.',\n whyItMatters: 'Part of the read FILTER alongside the owner scope, not descriptive metadata. 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 continue another client\\'s conversation and read its entire message log.',\n semanticRole: 'identifier',\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Current runtime state of the execution.',\n whyItMatters: 'It is the primary signal the frontend uses to drive the live execution-status overlay and to know whether the conversation is still progressing.',\n importance: FieldSemanticImportance.PRIMARY,\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: 'Created and ready to begin processing.' },\n [FlowsActors_Status.PENDING]: { meaning: 'Accepted but not yet actively processing.' },\n [FlowsActors_Status.PROCESSING]: { meaning: 'Actively running — the agent is responding / tools are executing.' },\n [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Suspended at a human-in-the-loop approval boundary — the agent called an approval-gated tool and the turn is waiting for a human decision before resuming. Non-terminal; resolves to PROCESSING→COMPLETED on approval or a terminal state on denial/expiry.' },\n [FlowsActors_Status.COMPLETED]: { meaning: 'Finished successfully.' },\n [FlowsActors_Status.FAILED]: { meaning: 'Finished unsuccessfully and stands in a failed state.' },\n [FlowsActors_Status.CANCELLED]: { meaning: 'Intentionally stopped before completion.' },\n [FlowsActors_Status.ABORTED]: { meaning: 'Terminated abnormally (e.g. transport loss or unrecoverable error).' },\n },\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open a new execution record when the conversational runtime starts a system.',\n outcome: 'One flow/actor execution begins to be tracked, ready to accumulate messages and status changes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An execution row was registered. This is an internal/system write path (INTERNAL_CALL, service-tier), not a self-serve API create — the conversational runtime writes on the owner\\'s behalf via *AsSystem.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The execution payload fails schema validation (e.g. missing `kind`/`status`/`systemRef`, or the injected owner FK).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts to create an execution — rows are created only by the flows-actors runtime through the internal repository service.' },\n ],\n idempotent: false,\n },\n\n [Op.READ]: {\n purpose: 'Read one past or in-progress agent conversation and its current state.',\n outcome: 'The authorized caller receives the representation selected by the route: the full conversation and lifecycle history, relationship context, or a compact lifecycle summary.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested conversation is returned in the full, context, or summary representation selected by the route.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No conversation exists for the id in the requested user, organization, or application scope.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to read agent conversation history for this scope.' },\n ],\n idempotent: true,\n examples: [{\n title: `Inspect a completed ${exampleScope.scopeLabel} agent conversation`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedExecutionExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `Inspect a completed ${exampleScope.scopeLabel} agent conversation with context`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: completedExecutionExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `Inspect the compact ${exampleScope.scopeLabel} conversation state`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: summarizeExecution(completedExecutionExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n\n [Op.LIST]: {\n purpose: 'List agent conversations visible in the requested user, organization, or application scope.',\n outcome: 'The authorized caller can browse recent conversations and distinguish active work from completed history.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A possibly empty page of conversations visible in the requested scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not allowed to list agent conversation history for this scope.' },\n ],\n idempotent: true,\n examples: [{\n title: `List recent ${exampleScope.scopeLabel} agent conversations`,\n request: { ...exampleScope.scopeIdentity, page: 1, limit: 20, sort: 'updatedAt:desc' },\n response: createFlowActorExecutionPage([activeExecutionExample, completedExecutionExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: `List recent ${exampleScope.scopeLabel} conversations with context`,\n request: { ...exampleScope.scopeIdentity, page: 1, limit: 20 },\n response: createFlowActorExecutionPage([completedExecutionExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: `List compact ${exampleScope.scopeLabel} conversation states`,\n request: { ...exampleScope.scopeIdentity, page: 1, limit: 20 },\n response: createFlowActorExecutionPage([\n summarizeExecution(activeExecutionExample as typeof completedExecutionExample),\n summarizeExecution(completedExecutionExample),\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n\n [Op.UPDATE]: {\n purpose: 'Advance the execution — append messages, record status transitions, and evolve runtime state.',\n outcome: 'The persisted record stays synchronized with the live conversation streamed over the WebSocket channel.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The execution recorded a new message / status change / runtime-state update. Internal/system write path — the conversational runtime owns these transitions.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No execution row exists for the supplied id to advance.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The update patch fails schema validation (e.g. an unrecognized `status`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts to mutate execution state.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Permanently remove one agent conversation from the requested scope.',\n outcome: 'The selected conversation and its transcript are no longer available.',\n whenToUse: 'Use when an authorized user or administrator intentionally removes conversation history that is no longer needed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The execution row was removed. Owner-facing API_CALL (default) via the `/flows-actors/history` DELETE route; delete authority is DISTINCT from read (a user deletes only their own chat; org/app conversations require org/app admin). The same default op also powers the composition onParentDelete cascade at the repository tier.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The executionId is unknown or belongs to another owner (the owner-scope filter yields no row).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the delete authority — a non-owner user, or an org/app member without admin — attempts to delete an execution.' },\n ],\n idempotent: true,\n examples: [{\n title: `Remove a completed ${exampleScope.scopeLabel} agent conversation`,\n request: { ...exampleScope.scopeIdentity, ...exampleScope.resourceIdentity },\n response: { id: completedExecutionExample._id, deletedAt: '2026-08-20T10:15:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n\n businessConstraints: [\n 'A conversation is owned by exactly ONE scope (the injected owner FK — `userId` / `organizationId` / `applicationId`); the default API surface must never expose another owner\\'s conversation (the owner primary-scope filter).',\n 'The polymorphic owner FK is injected on each concrete variant schema, not on `FlowActorExecutionBaseSchema` itself.',\n 'Writes are system-internal — only the flows-actors conversational runtime persists executions and appends messages; there is no self-serve write API.',\n 'The record is kind-agnostic: the `kind` discriminant lets it persist both FLOW and ACTOR executions, so the flow system can adopt it without reshaping the base envelope. Typed per-kind runtime-state overlays are a documented follow-on (v1 persists the conversational envelope + status).',\n ],\n }),\n // The owner is the injected scope FK, anchored by the `<SCOPE> → *FlowActorExecutions`\n // primary-scope composition edge in `resources-registry.shared.core.definitions.ts`\n // (generated by `createPolymorphicScopeRelationships`). The registry factory derives\n // the scope from `isPrimaryScope: true`; this declaration feeds the spec ↔ registry\n // alignment guard and must match per variant.\n { resourcePrimaryScope: flowExecPrimaryScopeByResourceType[resourceType] },\n );\n}\n\nexport const userFlowActorExecutionsResourceSpecification = buildFlowActorExecutionResourceSpecification(\n CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS,\n 'USER_FLOW_ACTOR_EXECUTIONS',\n);\n\nexport const organizationFlowActorExecutionsResourceSpecification = buildFlowActorExecutionResourceSpecification(\n CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS,\n 'ORGANIZATION_FLOW_ACTOR_EXECUTIONS',\n);\n\nexport const applicationFlowActorExecutionsResourceSpecification = buildFlowActorExecutionResourceSpecification(\n CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS,\n 'APPLICATION_FLOW_ACTOR_EXECUTIONS',\n);\n"]}
@@ -1,5 +1,5 @@
1
1
  import { CoreResourceOperation as Op, FlowsActors_Status } from '@wildo-ai/saas-models';
2
- export declare const userFlowActorTasksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
2
+ export declare const userFlowActorTasksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
3
3
  description: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>>;
4
4
  topic: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").Actor_Task_Topics>>>>;
5
5
  input: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodAny>>>;
@@ -118,7 +118,7 @@ export declare const userFlowActorTasksResourceSpecification: import("../../../_
118
118
  finishedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodDate>>;
119
119
  pushNotificationConfigs: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>>>;
120
120
  }, import("zod/v4/core").$strip>>;
121
- export declare const organizationFlowActorTasksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
121
+ export declare const organizationFlowActorTasksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
122
122
  description: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>>;
123
123
  topic: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").Actor_Task_Topics>>>>;
124
124
  input: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodAny>>>;
@@ -237,7 +237,7 @@ export declare const organizationFlowActorTasksResourceSpecification: import("..
237
237
  finishedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodDate>>;
238
238
  pushNotificationConfigs: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>>>;
239
239
  }, import("zod/v4/core").$strip>>;
240
- export declare const applicationFlowActorTasksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
240
+ export declare const applicationFlowActorTasksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
241
241
  description: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>>;
242
242
  topic: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").Actor_Task_Topics>>>>;
243
243
  input: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodAny>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"flow-actor-tasks.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AA6Y/B,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAGnD,CAAC;AAEF,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG1D,CAAC"}
1
+ {"version":3,"file":"flow-actor-tasks.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AAkZ/B,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAGnD,CAAC;AAEF,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG1D,CAAC"}
@@ -2,6 +2,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
2
2
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
3
3
  import { CoreResourceOperation as Op, CoreResourceType, FLOWS_ACTORS_NO_MACHINE_CREDENTIAL, FlowActorTaskBaseSchema, FlowsActors_Status, ResourcePrimaryScope, flowActorTasksPolymorphicFactories, } from '@wildo-ai/saas-models';
4
4
  import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
5
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
5
6
  /** Exhaustive owner/route projection for the three public task contracts. */
6
7
  function createFlowActorTaskScopeExample(resourceType) {
7
8
  switch (resourceType) {
@@ -78,8 +79,9 @@ function buildFlowActorTaskResourceSpecification(resourceType, resourceTypeMembe
78
79
  return resourceSpecification(flowActorTasksPolymorphicFactories[resourceType], FlowActorTaskBaseSchema, ({ schemaShape }) => ({
79
80
  purpose: 'Track one addressable unit of agent work, including its lifecycle status, outputs, artifacts, and terminal outcome.',
80
81
  businessRole: 'The work record an authorized integration polls, collects results from, or cancels independently of the conversation that started it.',
81
- 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.',
82
+ 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.',
82
83
  audience: LabelAudience.DEVELOPER,
84
+ subDomain: EngineResourceSubDomain.FLOWS_ACTORS,
83
85
  codeHandling: {
84
86
  mainSchema: {
85
87
  packageName: '@wildo-ai/saas-models',