@oxygen-agent/cli 1.1014.1895 → 1.1014.2040

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 (351) hide show
  1. package/README.md +1 -1
  2. package/dist/auto-update.d.ts +1 -1
  3. package/dist/auto-update.js +3 -3
  4. package/dist/cli-install.d.ts +65 -0
  5. package/dist/cli-install.js +165 -0
  6. package/dist/command-families/tables/options.d.ts +1 -0
  7. package/dist/command-families/tables/register-automation.js +3 -1
  8. package/dist/commands/billing.js +1 -1
  9. package/dist/commands/managed-inboxes.js +6 -2
  10. package/dist/commands/observability.js +4 -4
  11. package/dist/commands/sequences.js +1 -1
  12. package/dist/commands/subscriptions.js +7 -5
  13. package/dist/commands/table-runs.js +10 -0
  14. package/dist/commands/tags.js +2 -2
  15. package/dist/commands/workflows.js +31 -10
  16. package/dist/http-client.d.ts +1 -1
  17. package/dist/http-client.js +1 -1
  18. package/dist/update.d.ts +4 -57
  19. package/dist/update.js +17 -163
  20. package/node_modules/@oxygen/formula/dist/cross-row-function.d.ts +13 -0
  21. package/node_modules/@oxygen/formula/dist/cross-row-function.js +1 -0
  22. package/node_modules/@oxygen/formula/dist/{refactor-internals → cross-row-functions}/novelty-score.d.ts +2 -0
  23. package/node_modules/@oxygen/formula/dist/{refactor-internals → cross-row-functions}/novelty-score.js +1 -0
  24. package/node_modules/@oxygen/formula/dist/cross-row-functions.generated.d.ts +3 -0
  25. package/node_modules/@oxygen/formula/dist/cross-row-functions.generated.js +3 -0
  26. package/node_modules/@oxygen/formula/dist/evaluate.d.ts +12 -1
  27. package/node_modules/@oxygen/formula/dist/evaluate.js +28 -3
  28. package/node_modules/@oxygen/recipe-sdk/dist/index.d.ts +2 -0
  29. package/node_modules/@oxygen/shared/dist/billing.d.ts +5 -1
  30. package/node_modules/@oxygen/shared/dist/billing.js +5 -1
  31. package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.d.ts +30 -0
  32. package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.js +33 -0
  33. package/node_modules/@oxygen/shared/dist/capability-discovery-skills.d.ts +39 -0
  34. package/node_modules/@oxygen/shared/dist/capability-discovery-skills.js +86 -0
  35. package/node_modules/@oxygen/shared/dist/capability-discovery-types.d.ts +93 -0
  36. package/node_modules/@oxygen/shared/dist/capability-discovery-types.js +1 -0
  37. package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +12 -270
  38. package/node_modules/@oxygen/shared/dist/capability-discovery.js +124 -3713
  39. package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.d.ts +2 -0
  40. package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.js +5 -0
  41. package/node_modules/@oxygen/shared/dist/capability-intents/agents.d.ts +10 -0
  42. package/node_modules/@oxygen/shared/dist/capability-intents/agents.js +53 -0
  43. package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.d.ts +2 -0
  44. package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.js +25 -0
  45. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.d.ts +31 -0
  46. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.js +70 -0
  47. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.d.ts +2 -0
  48. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.js +85 -0
  49. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.d.ts +9 -0
  50. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.js +54 -0
  51. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.d.ts +2 -0
  52. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.js +28 -0
  53. package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.d.ts +2 -0
  54. package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.js +23 -0
  55. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.d.ts +43 -0
  56. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.js +90 -0
  57. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.d.ts +2 -0
  58. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.js +58 -0
  59. package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.d.ts +2 -0
  60. package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.js +14 -0
  61. package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.d.ts +2 -0
  62. package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.js +9 -0
  63. package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.d.ts +365 -0
  64. package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.js +90 -0
  65. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.d.ts +20 -0
  66. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.js +37 -0
  67. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.d.ts +2 -0
  68. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.js +43 -0
  69. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.d.ts +4 -0
  70. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.js +26 -0
  71. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.d.ts +2 -0
  72. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.js +42 -0
  73. package/node_modules/@oxygen/shared/dist/capability-intents/messages.d.ts +6 -0
  74. package/node_modules/@oxygen/shared/dist/capability-intents/messages.js +16 -0
  75. package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.d.ts +2 -0
  76. package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.js +68 -0
  77. package/node_modules/@oxygen/shared/dist/capability-intents/normalize.d.ts +2 -0
  78. package/node_modules/@oxygen/shared/dist/capability-intents/normalize.js +4 -0
  79. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.d.ts +6 -0
  80. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.js +23 -0
  81. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.d.ts +2 -0
  82. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.js +25 -0
  83. package/node_modules/@oxygen/shared/dist/capability-intents/posts.d.ts +1 -0
  84. package/node_modules/@oxygen/shared/dist/capability-intents/posts.js +12 -0
  85. package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.d.ts +2 -0
  86. package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.js +20 -0
  87. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.d.ts +86 -0
  88. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.js +135 -0
  89. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.d.ts +2 -0
  90. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.js +89 -0
  91. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.d.ts +7 -0
  92. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.js +85 -0
  93. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.d.ts +2 -0
  94. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.js +28 -0
  95. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.d.ts +7 -0
  96. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.js +73 -0
  97. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.d.ts +2 -0
  98. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.js +36 -0
  99. package/node_modules/@oxygen/shared/dist/capability-intents/records.d.ts +86 -0
  100. package/node_modules/@oxygen/shared/dist/capability-intents/records.js +240 -0
  101. package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.d.ts +2 -0
  102. package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.js +71 -0
  103. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.d.ts +27 -0
  104. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.js +67 -0
  105. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.d.ts +2 -0
  106. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.js +115 -0
  107. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.d.ts +71 -0
  108. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.js +150 -0
  109. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.d.ts +2 -0
  110. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.js +149 -0
  111. package/node_modules/@oxygen/shared/dist/capability-intents/signals.d.ts +42 -0
  112. package/node_modules/@oxygen/shared/dist/capability-intents/signals.js +42 -0
  113. package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.d.ts +2 -0
  114. package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.js +47 -0
  115. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.d.ts +60 -0
  116. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.js +94 -0
  117. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.d.ts +2 -0
  118. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.js +94 -0
  119. package/node_modules/@oxygen/shared/dist/capability-intents/tables.d.ts +196 -0
  120. package/node_modules/@oxygen/shared/dist/capability-intents/tables.js +394 -0
  121. package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.d.ts +2 -0
  122. package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.js +384 -0
  123. package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.d.ts +2 -0
  124. package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.js +5 -0
  125. package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.d.ts +2 -0
  126. package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.js +8 -0
  127. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.d.ts +2 -0
  128. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.js +20 -0
  129. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.d.ts +2 -0
  130. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.js +90 -0
  131. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.d.ts +59 -0
  132. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.js +121 -0
  133. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.d.ts +2 -0
  134. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.js +58 -0
  135. package/node_modules/@oxygen/shared/dist/capability-routes/ads.d.ts +2 -0
  136. package/node_modules/@oxygen/shared/dist/capability-routes/ads.js +17 -0
  137. package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.d.ts +2 -0
  138. package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.js +17 -0
  139. package/node_modules/@oxygen/shared/dist/capability-routes/agents.d.ts +2 -0
  140. package/node_modules/@oxygen/shared/dist/capability-routes/agents.js +17 -0
  141. package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.d.ts +2 -0
  142. package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.js +17 -0
  143. package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.d.ts +2 -0
  144. package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.js +39 -0
  145. package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.d.ts +2 -0
  146. package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.js +17 -0
  147. package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.d.ts +2 -0
  148. package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.js +17 -0
  149. package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.d.ts +2 -0
  150. package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.js +17 -0
  151. package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.d.ts +2 -0
  152. package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.js +28 -0
  153. package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.d.ts +2 -0
  154. package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.js +22 -0
  155. package/node_modules/@oxygen/shared/dist/capability-routes/geo.d.ts +2 -0
  156. package/node_modules/@oxygen/shared/dist/capability-routes/geo.js +13 -0
  157. package/node_modules/@oxygen/shared/dist/capability-routes/index.d.ts +2 -0
  158. package/node_modules/@oxygen/shared/dist/capability-routes/index.js +64 -0
  159. package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.d.ts +2 -0
  160. package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.js +17 -0
  161. package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.d.ts +2 -0
  162. package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.js +18 -0
  163. package/node_modules/@oxygen/shared/dist/capability-routes/messages.d.ts +2 -0
  164. package/node_modules/@oxygen/shared/dist/capability-routes/messages.js +21 -0
  165. package/node_modules/@oxygen/shared/dist/capability-routes/observability.d.ts +2 -0
  166. package/node_modules/@oxygen/shared/dist/capability-routes/observability.js +17 -0
  167. package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.d.ts +2 -0
  168. package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.js +23 -0
  169. package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.d.ts +2 -0
  170. package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.js +17 -0
  171. package/node_modules/@oxygen/shared/dist/capability-routes/posts.d.ts +2 -0
  172. package/node_modules/@oxygen/shared/dist/capability-routes/posts.js +17 -0
  173. package/node_modules/@oxygen/shared/dist/capability-routes/publishing.d.ts +2 -0
  174. package/node_modules/@oxygen/shared/dist/capability-routes/publishing.js +20 -0
  175. package/node_modules/@oxygen/shared/dist/capability-routes/recipes.d.ts +2 -0
  176. package/node_modules/@oxygen/shared/dist/capability-routes/recipes.js +17 -0
  177. package/node_modules/@oxygen/shared/dist/capability-routes/records.d.ts +2 -0
  178. package/node_modules/@oxygen/shared/dist/capability-routes/records.js +20 -0
  179. package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.d.ts +2 -0
  180. package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.js +42 -0
  181. package/node_modules/@oxygen/shared/dist/capability-routes/sequences.d.ts +2 -0
  182. package/node_modules/@oxygen/shared/dist/capability-routes/sequences.js +32 -0
  183. package/node_modules/@oxygen/shared/dist/capability-routes/signals.d.ts +2 -0
  184. package/node_modules/@oxygen/shared/dist/capability-routes/signals.js +17 -0
  185. package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.d.ts +2 -0
  186. package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.js +21 -0
  187. package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.d.ts +2 -0
  188. package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.js +17 -0
  189. package/node_modules/@oxygen/shared/dist/capability-routes/tables.d.ts +2 -0
  190. package/node_modules/@oxygen/shared/dist/capability-routes/tables.js +34 -0
  191. package/node_modules/@oxygen/shared/dist/capability-routes/tags.d.ts +2 -0
  192. package/node_modules/@oxygen/shared/dist/capability-routes/tags.js +17 -0
  193. package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.d.ts +2 -0
  194. package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.js +17 -0
  195. package/node_modules/@oxygen/shared/dist/capability-routes/workflows.d.ts +2 -0
  196. package/node_modules/@oxygen/shared/dist/capability-routes/workflows.js +17 -0
  197. package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.d.ts +2 -0
  198. package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.js +26 -0
  199. package/node_modules/@oxygen/shared/dist/cell-format.js +2 -2
  200. package/node_modules/@oxygen/shared/dist/collab.d.ts +1 -1
  201. package/node_modules/@oxygen/shared/dist/contracts/connectors.js +2 -0
  202. package/node_modules/@oxygen/shared/dist/contracts/customer-operations.d.ts +1 -1
  203. package/node_modules/@oxygen/shared/dist/contracts/geo.js +1 -1
  204. package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.d.ts +1 -0
  205. package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.js +1 -0
  206. package/node_modules/@oxygen/shared/dist/contracts/operations/browser.d.ts +1 -0
  207. package/node_modules/@oxygen/shared/dist/contracts/operations/browser.js +1 -0
  208. package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.d.ts +2 -0
  209. package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.js +2 -0
  210. package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.d.ts +2 -0
  211. package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.js +2 -0
  212. package/node_modules/@oxygen/shared/dist/contracts/operations/geo.d.ts +1 -0
  213. package/node_modules/@oxygen/shared/dist/contracts/operations/geo.js +1 -0
  214. package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.d.ts +1 -0
  215. package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.js +1 -0
  216. package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.d.ts +2 -0
  217. package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.js +26 -0
  218. package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.d.ts +1 -0
  219. package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.js +1 -0
  220. package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.d.ts +2 -0
  221. package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.js +2 -0
  222. package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.d.ts +2 -0
  223. package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.js +2 -0
  224. package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.d.ts +1 -0
  225. package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.js +1 -0
  226. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.d.ts +2 -0
  227. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.js +2 -0
  228. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.d.ts +1 -0
  229. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.js +1 -0
  230. package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +6 -0
  231. package/node_modules/@oxygen/shared/dist/contracts/operations.js +7 -15
  232. package/node_modules/@oxygen/shared/dist/contracts/sender-limits.js +1 -0
  233. package/node_modules/@oxygen/shared/dist/diagnostic-storage-lock.js +33 -22
  234. package/node_modules/@oxygen/shared/dist/diagnostics.js +11 -8
  235. package/node_modules/@oxygen/shared/dist/dnc-identities.js +1 -1
  236. package/node_modules/@oxygen/shared/dist/error-redaction.d.ts +1 -1
  237. package/node_modules/@oxygen/shared/dist/error-redaction.js +2 -2
  238. package/node_modules/@oxygen/shared/dist/esp-contract.d.ts +133 -0
  239. package/node_modules/@oxygen/shared/dist/esp-contract.js +121 -0
  240. package/node_modules/@oxygen/shared/dist/first-month-offer-window.d.ts +3 -0
  241. package/node_modules/@oxygen/shared/dist/first-month-offer.d.ts +15 -7
  242. package/node_modules/@oxygen/shared/dist/first-month-offer.js +23 -9
  243. package/node_modules/@oxygen/shared/dist/{geo.js → geo/geo.js} +2 -2
  244. package/node_modules/@oxygen/shared/dist/guided-activation.d.ts +2 -0
  245. package/node_modules/@oxygen/shared/dist/index.d.ts +6 -5
  246. package/node_modules/@oxygen/shared/dist/index.js +7 -5
  247. package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +1 -1
  248. package/node_modules/@oxygen/shared/dist/linkedin-connection-identity.js +1 -1
  249. package/node_modules/@oxygen/shared/dist/listed-website-platforms.d.ts +1 -1
  250. package/node_modules/@oxygen/shared/dist/listed-website-platforms.js +23 -1
  251. package/node_modules/@oxygen/shared/dist/{sending-domain-rollout.js → mailboxes/sending-domain-rollout.js} +1 -1
  252. package/node_modules/@oxygen/shared/dist/mcp-event-contract.js +1 -1
  253. package/node_modules/@oxygen/shared/dist/onboarding-leads.d.ts +67 -0
  254. package/node_modules/@oxygen/shared/dist/onboarding-leads.js +78 -0
  255. package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +20 -0
  256. package/node_modules/@oxygen/shared/dist/plan-capabilities.js +1 -1
  257. package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +2 -2
  258. package/node_modules/@oxygen/shared/dist/plan-limits.js +6 -7
  259. package/node_modules/@oxygen/shared/dist/{social-post-metrics-core.d.ts → posts/metrics-core.d.ts} +1 -1
  260. package/node_modules/@oxygen/shared/dist/{social-post-metrics-linkedin.d.ts → posts/metrics-linkedin.d.ts} +1 -1
  261. package/node_modules/@oxygen/shared/dist/{social-post-metrics-linkedin.js → posts/metrics-linkedin.js} +2 -2
  262. package/node_modules/@oxygen/shared/dist/{social-post-metrics-series.d.ts → posts/metrics-series.d.ts} +1 -1
  263. package/node_modules/@oxygen/shared/dist/{social-post-metrics-series.js → posts/metrics-series.js} +1 -1
  264. package/node_modules/@oxygen/shared/dist/{social-post-metrics-x.d.ts → posts/metrics-x.d.ts} +1 -1
  265. package/node_modules/@oxygen/shared/dist/{social-post-metrics-x.js → posts/metrics-x.js} +2 -2
  266. package/node_modules/@oxygen/shared/dist/{social-post-metrics.d.ts → posts/metrics.d.ts} +3 -3
  267. package/node_modules/@oxygen/shared/dist/{social-post-metrics.js → posts/metrics.js} +3 -3
  268. package/node_modules/@oxygen/shared/dist/recipient-provider.d.ts +2 -10
  269. package/node_modules/@oxygen/shared/dist/recipient-provider.js +1 -9
  270. package/node_modules/@oxygen/shared/dist/sending-domain-faults.d.ts +1 -1
  271. package/node_modules/@oxygen/shared/dist/sending-domain-faults.js +1 -1
  272. package/node_modules/@oxygen/shared/dist/sequence-internals/esp-policy.d.ts +2 -118
  273. package/node_modules/@oxygen/shared/dist/sequence-internals/esp-policy.js +2 -107
  274. package/node_modules/@oxygen/shared/dist/sequences.d.ts +0 -1
  275. package/node_modules/@oxygen/shared/dist/sequences.js +0 -2
  276. package/node_modules/@oxygen/shared/dist/{native-chat-discovery.d.ts → support/native-chat-discovery.d.ts} +1 -1
  277. package/node_modules/@oxygen/shared/dist/{native-chat-discovery.js → support/native-chat-discovery.js} +1 -1
  278. package/node_modules/@oxygen/shared/dist/suppression-entries.js +1 -1
  279. package/node_modules/@oxygen/shared/dist/table-field-types.d.ts +1 -1
  280. package/node_modules/@oxygen/shared/dist/table-field-types.js +2 -2
  281. package/node_modules/@oxygen/shared/dist/{column-output-fields.js → tables/column-output-fields.js} +4 -4
  282. package/node_modules/@oxygen/shared/dist/{tags.d.ts → tags/tags.d.ts} +1 -1
  283. package/node_modules/@oxygen/shared/dist/{tags.js → tags/tags.js} +1 -1
  284. package/node_modules/@oxygen/shared/dist/tenant-migration-names.d.ts +5 -0
  285. package/node_modules/@oxygen/shared/dist/tenant-migration-names.js +8 -0
  286. package/node_modules/@oxygen/shared/dist/ugc-amplification-identity.js +1 -1
  287. package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
  288. package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
  289. package/node_modules/@oxygen/shared/dist/workspace-placement-bulk.d.ts +6 -0
  290. package/node_modules/@oxygen/shared/dist/workspace-placement-bulk.js +9 -2
  291. package/node_modules/@oxygen/shared/dist/workspace-placement-schedule.d.ts +44 -0
  292. package/node_modules/@oxygen/shared/dist/workspace-placement-schedule.js +90 -0
  293. package/node_modules/@oxygen/shared/dist/workspace-placement-view.d.ts +24 -0
  294. package/node_modules/@oxygen/shared/dist/workspace-placement-view.js +5 -4
  295. package/node_modules/@oxygen/shared/dist/workspace-placement.d.ts +4 -0
  296. package/node_modules/@oxygen/shared/dist/workspace-placement.js +7 -1
  297. package/node_modules/@oxygen/shared/package.json +0 -25
  298. package/node_modules/@oxygen/workflows/dist/cron.d.ts +42 -0
  299. package/node_modules/@oxygen/workflows/dist/cron.js +271 -0
  300. package/node_modules/@oxygen/workflows/dist/event-dispatch.d.ts +2 -1
  301. package/node_modules/@oxygen/workflows/dist/graph/condition.d.ts +3 -0
  302. package/node_modules/@oxygen/workflows/dist/graph/condition.js +19 -0
  303. package/node_modules/@oxygen/workflows/dist/graph/expression.d.ts +1 -2
  304. package/node_modules/@oxygen/workflows/dist/graph/expression.js +2 -19
  305. package/node_modules/@oxygen/workflows/dist/graph/lint.d.ts +1 -1
  306. package/node_modules/@oxygen/workflows/dist/graph/lint.js +4 -3
  307. package/node_modules/@oxygen/workflows/dist/graph/types.d.ts +4 -3
  308. package/node_modules/@oxygen/workflows/dist/index.d.ts +9 -1043
  309. package/node_modules/@oxygen/workflows/dist/index.js +11 -2124
  310. package/node_modules/@oxygen/workflows/dist/manifest-builders.d.ts +73 -0
  311. package/node_modules/@oxygen/workflows/dist/manifest-builders.js +102 -0
  312. package/node_modules/@oxygen/workflows/dist/manifest-guards.d.ts +16 -0
  313. package/node_modules/@oxygen/workflows/dist/manifest-guards.js +34 -0
  314. package/node_modules/@oxygen/workflows/dist/manifest-hash.d.ts +47 -0
  315. package/node_modules/@oxygen/workflows/dist/manifest-hash.js +102 -0
  316. package/node_modules/@oxygen/workflows/dist/manifest-lint.d.ts +17 -0
  317. package/node_modules/@oxygen/workflows/dist/manifest-lint.js +474 -0
  318. package/node_modules/@oxygen/workflows/dist/manifest-types.d.ts +256 -0
  319. package/node_modules/@oxygen/workflows/dist/manifest-types.js +9 -0
  320. package/node_modules/@oxygen/workflows/dist/manifest-validation.d.ts +75 -0
  321. package/node_modules/@oxygen/workflows/dist/manifest-validation.js +903 -0
  322. package/node_modules/@oxygen/workflows/dist/pure-function.d.ts +17 -0
  323. package/node_modules/@oxygen/workflows/dist/pure-function.js +130 -0
  324. package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-comparison.d.ts +1 -17
  325. package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-comparison.js +1 -93
  326. package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-pattern.d.ts +16 -0
  327. package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-pattern.js +92 -0
  328. package/node_modules/@oxygen/workflows/dist/workflow-schemas.d.ts +545 -0
  329. package/node_modules/@oxygen/workflows/dist/workflow-schemas.js +135 -0
  330. package/node_modules/@oxygen/workflows/package.json +4 -0
  331. package/package.json +1 -1
  332. /package/node_modules/@oxygen/shared/dist/{geo.d.ts → geo/geo.d.ts} +0 -0
  333. /package/node_modules/@oxygen/shared/dist/{sending-domain-rollout.d.ts → mailboxes/sending-domain-rollout.d.ts} +0 -0
  334. /package/node_modules/@oxygen/shared/dist/{attempt-provenance.d.ts → observability/attempt-provenance.d.ts} +0 -0
  335. /package/node_modules/@oxygen/shared/dist/{attempt-provenance.js → observability/attempt-provenance.js} +0 -0
  336. /package/node_modules/@oxygen/shared/dist/{linkedin-mentions.d.ts → posts/linkedin-mentions.d.ts} +0 -0
  337. /package/node_modules/@oxygen/shared/dist/{linkedin-mentions.js → posts/linkedin-mentions.js} +0 -0
  338. /package/node_modules/@oxygen/shared/dist/{linkedin-post-keywords.d.ts → posts/linkedin-post-keywords.d.ts} +0 -0
  339. /package/node_modules/@oxygen/shared/dist/{linkedin-post-keywords.js → posts/linkedin-post-keywords.js} +0 -0
  340. /package/node_modules/@oxygen/shared/dist/{linkedin-post-url.d.ts → posts/linkedin-post-url.d.ts} +0 -0
  341. /package/node_modules/@oxygen/shared/dist/{linkedin-post-url.js → posts/linkedin-post-url.js} +0 -0
  342. /package/node_modules/@oxygen/shared/dist/{social-post-metrics-core.js → posts/metrics-core.js} +0 -0
  343. /package/node_modules/@oxygen/shared/dist/{native-chat.d.ts → support/native-chat.d.ts} +0 -0
  344. /package/node_modules/@oxygen/shared/dist/{native-chat.js → support/native-chat.js} +0 -0
  345. /package/node_modules/@oxygen/shared/dist/{plain-support-events.d.ts → support/plain-support-events.d.ts} +0 -0
  346. /package/node_modules/@oxygen/shared/dist/{plain-support-events.js → support/plain-support-events.js} +0 -0
  347. /package/node_modules/@oxygen/shared/dist/{column-output-fields.d.ts → tables/column-output-fields.d.ts} +0 -0
  348. /package/node_modules/@oxygen/shared/dist/{linkedin-url.d.ts → tables/linkedin-url.d.ts} +0 -0
  349. /package/node_modules/@oxygen/shared/dist/{linkedin-url.js → tables/linkedin-url.js} +0 -0
  350. /package/node_modules/@oxygen/shared/dist/{select-options.d.ts → tables/select-options.d.ts} +0 -0
  351. /package/node_modules/@oxygen/shared/dist/{select-options.js → tables/select-options.js} +0 -0
@@ -0,0 +1,474 @@
1
+ import { isNonEmptyString, isRecord, isValidWorkflowStatus, isWorkflowToolRejected, lintRecipeManifest, validateBranchTarget, validateOptionalMaxCredits, validatePureFunctionSource, validateRecipeBundleSafety, validateTrigger, WORKFLOW_MANIFEST_VERSION } from "./manifest-validation.js";
2
+ import { BLUEPRINT_COMPILER_VERSION, BLUEPRINT_VERSION, WORKFLOW_COMPILER_VERSION } from "./manifest-types.js";
3
+ import { hashWorkflowSource, workflowJsonReplacer } from "./manifest-hash.js";
4
+ import { isWorkflowGraphManifest } from "./graph/types.js";
5
+ import { lintWorkflowGraphManifest } from "./graph/lint.js";
6
+ /**
7
+ * v1 manifest and blueprint linting, assertion and compilation. Graph manifests lint through `graph/lint.ts`.
8
+ */
9
+ // Step ids that must not be used: they collide with JavaScript object internals
10
+ // when the runtime assembles ctx.steps, so their outputs would be silently lost.
11
+ const RESERVED_STEP_IDS = new Set(["__proto__", "constructor", "prototype"]);
12
+ export function compileWorkflowDefinition(// skipcq: JS-R1005 -- compiler validates workflow metadata, trigger, steps, branch targets, and defaults together.
13
+ definition, options = {}) {
14
+ const sourceHash = options.sourceHash
15
+ ?? hashWorkflowSource(options.source ?? JSON.stringify(definition, workflowJsonReplacer));
16
+ const manifest = {
17
+ manifest_version: WORKFLOW_MANIFEST_VERSION,
18
+ workflow: {
19
+ id: definition.id,
20
+ name: definition.name,
21
+ ...(definition.status ? { status: definition.status } : {}),
22
+ },
23
+ ...(definition.specification ? { specification: definition.specification } : {}),
24
+ ...(definition.trigger ? { trigger: definition.trigger } : {}),
25
+ ...(definition.inputSchema ? { input_schema: definition.inputSchema } : {}),
26
+ ...(definition.maxCredits != null ? { max_credits: definition.maxCredits } : {}),
27
+ steps: definition.steps.map((step) => {
28
+ if (step.kind === "transform") {
29
+ return {
30
+ kind: "transform",
31
+ id: step.id,
32
+ ...(step.description ? { description: step.description } : {}),
33
+ run_source: serializeWorkflowFunction(step.run, `steps.${step.id}.run`),
34
+ };
35
+ }
36
+ if (step.kind === "branch") {
37
+ return {
38
+ kind: "branch",
39
+ id: step.id,
40
+ ...(step.description ? { description: step.description } : {}),
41
+ condition_source: serializeWorkflowFunction(step.condition, `steps.${step.id}.condition`),
42
+ then_id: step.then,
43
+ ...(step.else !== undefined ? { else_id: step.else } : {}),
44
+ ...(step.join !== undefined ? { join_id: step.join } : {}),
45
+ };
46
+ }
47
+ return {
48
+ kind: "tool",
49
+ id: step.id,
50
+ ...(step.description ? { description: step.description } : {}),
51
+ tool: step.tool,
52
+ effect: step.effect ?? "external_read",
53
+ ...(step.mode ? { mode: step.mode } : {}),
54
+ ...(step.connectionId !== undefined ? { connection_id: step.connectionId } : {}),
55
+ ...(step.maxCredits != null ? { max_credits: step.maxCredits } : {}),
56
+ payload_source: serializeWorkflowFunction(step.payload, `steps.${step.id}.payload`),
57
+ };
58
+ }),
59
+ source_hash: sourceHash,
60
+ compiler_version: WORKFLOW_COMPILER_VERSION,
61
+ created_at: (options.createdAt ?? new Date()).toISOString(),
62
+ };
63
+ assertWorkflowManifest(manifest);
64
+ return manifest;
65
+ }
66
+ export function lintWorkflowManifest(// skipcq: JS-R1005
67
+ value, options = {}) {
68
+ if (isWorkflowGraphManifest(value)) {
69
+ return lintWorkflowGraphManifest(value, options);
70
+ }
71
+ if (isRecord(value)
72
+ && typeof value.compiler_version === "string"
73
+ && value.compiler_version.startsWith("oxygen-recipes-")) {
74
+ return lintRecipeManifest(value, options);
75
+ }
76
+ const issues = [];
77
+ const add = (path, code, message) => issues.push({ path, code, message });
78
+ if (!isRecord(value)) {
79
+ add("$", "invalid_manifest", "Workflow manifest must be an object.");
80
+ return { ok: false, issues };
81
+ }
82
+ if (value.manifest_version !== WORKFLOW_MANIFEST_VERSION) {
83
+ add("$.manifest_version", "invalid_manifest_version", "Workflow manifest version must be 1.");
84
+ }
85
+ const workflow = value.workflow;
86
+ if (!isRecord(workflow)) {
87
+ add("$.workflow", "missing_workflow", "Workflow metadata is required.");
88
+ }
89
+ else {
90
+ if (!isNonEmptyString(workflow.id))
91
+ add("$.workflow.id", "invalid_workflow_id", "Workflow id is required.");
92
+ if (!isNonEmptyString(workflow.name))
93
+ add("$.workflow.name", "invalid_workflow_name", "Workflow name is required.");
94
+ if (workflow.status !== undefined && !isValidWorkflowStatus(workflow.status)) {
95
+ add("$.workflow.status", "invalid_workflow_status", "Workflow status must be active or disabled.");
96
+ }
97
+ }
98
+ if (value.trigger !== undefined)
99
+ validateTrigger(value.trigger, "$.trigger", add);
100
+ validateOptionalMaxCredits(value.max_credits, "$.max_credits", add);
101
+ if (!Array.isArray(value.steps) || value.steps.length === 0) {
102
+ add("$.steps", "missing_steps", "At least one workflow step is required.");
103
+ }
104
+ else {
105
+ // Pre-pass: collect id → declared-index so branch targets can be
106
+ // validated for existence + forward-only direction in the main pass.
107
+ const idToIndex = new Map();
108
+ value.steps.forEach((step, index) => {
109
+ if (isRecord(step) && isNonEmptyString(step.id)) {
110
+ if (!idToIndex.has(step.id))
111
+ idToIndex.set(step.id, index);
112
+ }
113
+ });
114
+ const ids = new Set();
115
+ value.steps.forEach((step, index) => {
116
+ const path = `$.steps.${index}`;
117
+ if (!isRecord(step)) {
118
+ add(path, "invalid_step", "Workflow step must be an object.");
119
+ return;
120
+ }
121
+ if (!isNonEmptyString(step.id)) {
122
+ add(`${path}.id`, "invalid_step_id", "Step id is required.");
123
+ }
124
+ else if (RESERVED_STEP_IDS.has(step.id)) {
125
+ // Step ids become keys on the ctx.steps object the runtime assembles.
126
+ // "__proto__" / "constructor" / "prototype" collide with JavaScript
127
+ // object internals: assigning ctx.steps["__proto__"] = output hits the
128
+ // prototype setter, so the output is silently dropped from step outputs
129
+ // and unreadable downstream while the run still reports success. Reject
130
+ // at authoring time instead of letting that data loss happen at runtime.
131
+ add(`${path}.id`, "reserved_step_id", `Step id '${step.id}' is reserved (it collides with a JavaScript object key and would be dropped from step outputs). Choose another id.`);
132
+ }
133
+ else if (ids.has(step.id)) {
134
+ add(`${path}.id`, "duplicate_step_id", `Step id '${step.id}' is duplicated.`);
135
+ }
136
+ else {
137
+ ids.add(step.id);
138
+ }
139
+ if (step.kind === "transform") {
140
+ if (!isNonEmptyString(step.run_source)) {
141
+ add(`${path}.run_source`, "missing_step_code", "Transform step run_source is required.");
142
+ }
143
+ else {
144
+ validatePureFunctionSource(step.run_source, `${path}.run_source`, add);
145
+ }
146
+ return;
147
+ }
148
+ if (step.kind === "tool") {
149
+ if (!isNonEmptyString(step.tool)) {
150
+ add(`${path}.tool`, "missing_tool", "Tool step tool id is required.");
151
+ }
152
+ else if (isWorkflowToolRejected(step.tool)) {
153
+ add(`${path}.tool`, "unsupported_workflow_tool", `Tool '${step.tool}' is not allowed in workflow automations.`);
154
+ }
155
+ else if (options.isToolAllowed && !options.isToolAllowed(step.tool)) {
156
+ add(`${path}.tool`, "tool_not_allowed", `Tool '${step.tool}' is not available for workflow automations.`);
157
+ }
158
+ if (!isNonEmptyString(step.payload_source)) {
159
+ add(`${path}.payload_source`, "missing_step_code", "Tool step payload_source is required.");
160
+ }
161
+ else {
162
+ validatePureFunctionSource(step.payload_source, `${path}.payload_source`, add);
163
+ }
164
+ if (step.effect !== "none"
165
+ && step.effect !== "external_read"
166
+ && step.effect !== "external_write") {
167
+ add(`${path}.effect`, "invalid_step_effect", "Step effect is invalid.");
168
+ }
169
+ else if (isNonEmptyString(step.tool)) {
170
+ // No resolver: skip the canonical cross-check rather than refuse.
171
+ //
172
+ // This function is reached by compileWorkflowDefinition, which the CLI
173
+ // calls locally — and the CLI deliberately cannot classify effects,
174
+ // because that is exactly the dependency removed from this package.
175
+ // Refusing here would make `oxygen workflows` unable to compile any
176
+ // manifest containing a tool step.
177
+ //
178
+ // Skipping is safe because this check is a CONVENIENCE, not the gate:
179
+ // apply and the worker runtime both resolve the effect canonically and
180
+ // both REFUSE what they cannot classify. The divergence v1.513.2 fixed
181
+ // was lint disagreeing with apply, and that is addressed by the server
182
+ // lint path always injecting resolveWorkflowToolEffect (see
183
+ // apps/web/src/lib/workflows.ts lintHostedWorkflowManifest) — not by a
184
+ // default inside this package.
185
+ const resolveEffect = options.resolveToolEffect;
186
+ if (resolveEffect) {
187
+ const canonicalEffect = resolveEffect(step.tool);
188
+ if (canonicalEffect !== null && step.effect !== canonicalEffect) {
189
+ add(`${path}.effect`, "tool_effect_mismatch", `Tool '${step.tool}' has canonical effect '${canonicalEffect}', not '${String(step.effect)}'. Set step.effect to '${canonicalEffect}'.`);
190
+ }
191
+ }
192
+ }
193
+ if (step.mode !== undefined
194
+ && step.mode !== "dry_run"
195
+ && step.mode !== "live"
196
+ && step.mode !== "smoke_test") {
197
+ add(`${path}.mode`, "invalid_step_mode", "Step mode is invalid.");
198
+ }
199
+ if (step.connection_id !== undefined && !isNonEmptyString(step.connection_id)) {
200
+ add(`${path}.connection_id`, "invalid_connection_id", "Tool step connection_id must be a non-empty string.");
201
+ }
202
+ validateOptionalMaxCredits(step.max_credits, `${path}.max_credits`, add);
203
+ return;
204
+ }
205
+ if (step.kind === "branch") {
206
+ if (!isNonEmptyString(step.condition_source)) {
207
+ add(`${path}.condition_source`, "missing_step_code", "Branch step condition_source is required.");
208
+ }
209
+ else {
210
+ validatePureFunctionSource(step.condition_source, `${path}.condition_source`, add);
211
+ }
212
+ validateBranchTarget(step.then_id, `${path}.then_id`, "then_id", index, idToIndex, add);
213
+ if (step.else_id !== undefined) {
214
+ validateBranchTarget(step.else_id, `${path}.else_id`, "else_id", index, idToIndex, add);
215
+ }
216
+ if (step.join_id !== undefined) {
217
+ validateBranchTarget(step.join_id, `${path}.join_id`, "join_id", index, idToIndex, add);
218
+ }
219
+ return;
220
+ }
221
+ add(`${path}.kind`, "invalid_step_kind", "Step kind must be transform, tool, or branch.");
222
+ });
223
+ }
224
+ if (!isNonEmptyString(value.source_hash)) {
225
+ add("$.source_hash", "missing_source_hash", "Manifest source_hash is required.");
226
+ }
227
+ if (!isNonEmptyString(value.compiler_version)) {
228
+ add("$.compiler_version", "missing_compiler_version", "Manifest compiler_version is required.");
229
+ }
230
+ return { ok: issues.length === 0, issues };
231
+ }
232
+ export function assertRecipeManifest(value, options = {}) {
233
+ const result = lintRecipeManifest(value, options);
234
+ if (result.ok)
235
+ return;
236
+ const first = result.issues[0];
237
+ throw new Error(first ? `${first.code}: ${first.message}` : "Invalid recipe manifest.");
238
+ }
239
+ export function assertWorkflowManifest(value, options = {}) {
240
+ const result = lintWorkflowManifest(value, options);
241
+ if (result.ok)
242
+ return;
243
+ const first = result.issues[0];
244
+ throw new Error(first ? `${first.code}: ${first.message}` : "Invalid workflow manifest.");
245
+ }
246
+ const BLUEPRINT_REF_PATTERN = /^[a-z][a-z0-9_-]{0,79}$/;
247
+ const BLUEPRINT_PROMPT_SLUG_PATTERN = /^[a-z][a-z0-9_-]{0,119}$/;
248
+ export function lintBlueprint(// skipcq: JS-R1005
249
+ value, options = {}) {
250
+ const issues = [];
251
+ const add = (path, code, message) => issues.push({ path, code, message });
252
+ if (!isRecord(value)) {
253
+ add("$", "invalid_blueprint", "Blueprint must be an object.");
254
+ return { ok: false, issues };
255
+ }
256
+ if (value.blueprint_version !== BLUEPRINT_VERSION) {
257
+ add("$.blueprint_version", "invalid_blueprint_version", "Blueprint version must be 1.");
258
+ }
259
+ if (value.compiler_version !== BLUEPRINT_COMPILER_VERSION) {
260
+ add("$.compiler_version", "invalid_compiler_version", `Blueprint compiler_version must be '${BLUEPRINT_COMPILER_VERSION}'.`);
261
+ }
262
+ if (!isNonEmptyString(value.id))
263
+ add("$.id", "invalid_blueprint_id", "Blueprint id is required.");
264
+ if (!isNonEmptyString(value.name))
265
+ add("$.name", "invalid_blueprint_name", "Blueprint name is required.");
266
+ if (typeof value.summary !== "string")
267
+ add("$.summary", "invalid_summary", "Blueprint summary must be a string.");
268
+ if (!Array.isArray(value.tags)) {
269
+ add("$.tags", "invalid_tags", "Blueprint tags must be an array of strings.");
270
+ }
271
+ if (!isNonEmptyString(value.exported_at)) {
272
+ add("$.exported_at", "invalid_exported_at", "Blueprint exported_at must be an ISO timestamp.");
273
+ }
274
+ if (!isNonEmptyString(value.source_hash)) {
275
+ add("$.source_hash", "missing_source_hash", "Blueprint source_hash is required.");
276
+ }
277
+ const tableRefs = new Set();
278
+ if (!Array.isArray(value.tables)) {
279
+ add("$.tables", "invalid_tables", "Blueprint tables must be an array.");
280
+ }
281
+ else {
282
+ value.tables.forEach((table, index) => {
283
+ const path = `$.tables.${index}`;
284
+ if (!isRecord(table)) {
285
+ add(path, "invalid_table", "Blueprint table must be an object.");
286
+ return;
287
+ }
288
+ if (!isNonEmptyString(table.ref) || !BLUEPRINT_REF_PATTERN.test(table.ref)) {
289
+ add(`${path}.ref`, "invalid_table_ref", "Blueprint table ref must be lowercase kebab/snake_case (a-z0-9_-).");
290
+ }
291
+ else {
292
+ if (tableRefs.has(table.ref)) {
293
+ add(`${path}.ref`, "duplicate_table_ref", `Blueprint table ref '${table.ref}' is duplicated.`);
294
+ }
295
+ tableRefs.add(table.ref);
296
+ }
297
+ if (!isNonEmptyString(table.name))
298
+ add(`${path}.name`, "invalid_table_name", "Blueprint table name is required.");
299
+ if (!Array.isArray(table.columns) || table.columns.length === 0) {
300
+ add(`${path}.columns`, "invalid_table_columns", "Blueprint table must declare at least one column.");
301
+ }
302
+ else {
303
+ table.columns.forEach((column, columnIndex) => {
304
+ const columnPath = `${path}.columns.${columnIndex}`;
305
+ if (!isRecord(column)) {
306
+ add(columnPath, "invalid_column", "Blueprint column must be an object.");
307
+ return;
308
+ }
309
+ if (!isNonEmptyString(column.label)) {
310
+ add(`${columnPath}.label`, "invalid_column_label", "Blueprint column label is required.");
311
+ }
312
+ });
313
+ }
314
+ });
315
+ }
316
+ if (value.column_grafts !== undefined) {
317
+ if (!Array.isArray(value.column_grafts)) {
318
+ add("$.column_grafts", "invalid_column_grafts", "Blueprint column_grafts must be an array.");
319
+ }
320
+ else {
321
+ value.column_grafts.forEach((graft, index) => {
322
+ const path = `$.column_grafts.${index}`;
323
+ if (!isRecord(graft)) {
324
+ add(path, "invalid_column_graft", "Column graft must be an object.");
325
+ return;
326
+ }
327
+ if (!isNonEmptyString(graft.table_ref) || !tableRefs.has(graft.table_ref)) {
328
+ add(`${path}.table_ref`, "invalid_graft_ref", "Column graft table_ref must match a declared blueprint table ref.");
329
+ }
330
+ if (!isRecord(graft.column) || !isNonEmptyString(graft.column.label)) {
331
+ add(`${path}.column`, "invalid_graft_column", "Column graft column must be an object with a label.");
332
+ }
333
+ });
334
+ }
335
+ }
336
+ const promptSlugs = new Set();
337
+ if (!Array.isArray(value.prompt_templates)) {
338
+ add("$.prompt_templates", "invalid_prompt_templates", "Blueprint prompt_templates must be an array.");
339
+ }
340
+ else {
341
+ value.prompt_templates.forEach((prompt, index) => {
342
+ const path = `$.prompt_templates.${index}`;
343
+ if (!isRecord(prompt)) {
344
+ add(path, "invalid_prompt", "Blueprint prompt must be an object.");
345
+ return;
346
+ }
347
+ if (!isNonEmptyString(prompt.slug) || !BLUEPRINT_PROMPT_SLUG_PATTERN.test(prompt.slug)) {
348
+ add(`${path}.slug`, "invalid_prompt_slug", "Prompt slug must be lowercase kebab/snake_case (a-z0-9_-).");
349
+ }
350
+ else {
351
+ if (promptSlugs.has(prompt.slug)) {
352
+ add(`${path}.slug`, "duplicate_prompt_slug", `Prompt slug '${prompt.slug}' is duplicated.`);
353
+ }
354
+ promptSlugs.add(prompt.slug);
355
+ }
356
+ if (!isNonEmptyString(prompt.name))
357
+ add(`${path}.name`, "invalid_prompt_name", "Prompt name is required.");
358
+ if (!isNonEmptyString(prompt.body))
359
+ add(`${path}.body`, "invalid_prompt_body", "Prompt body is required.");
360
+ if (prompt.kind !== "ai_column_system" && prompt.kind !== "scoring_rubric" && prompt.kind !== "other") {
361
+ add(`${path}.kind`, "invalid_prompt_kind", "Prompt kind must be ai_column_system, scoring_rubric, or other.");
362
+ }
363
+ });
364
+ }
365
+ if (!Array.isArray(value.workflows)) {
366
+ add("$.workflows", "invalid_workflows", "Blueprint workflows must be an array.");
367
+ }
368
+ else if (value.workflows.length === 0) {
369
+ add("$.workflows", "missing_workflows", "Blueprint must include at least one workflow.");
370
+ }
371
+ else {
372
+ value.workflows.forEach((entry, index) => {
373
+ const path = `$.workflows.${index}`;
374
+ if (!isRecord(entry)) {
375
+ add(path, "invalid_workflow_entry", "Workflow entry must be an object.");
376
+ return;
377
+ }
378
+ const manifest = entry.manifest;
379
+ const manifestResult = lintWorkflowManifest(manifest, options);
380
+ if (!manifestResult.ok) {
381
+ manifestResult.issues.forEach((issue) => {
382
+ add(`${path}.manifest${issue.path.replace(/^\$/, "")}`, issue.code, issue.message);
383
+ });
384
+ }
385
+ if (entry.table_refs !== undefined && !isRecord(entry.table_refs)) {
386
+ add(`${path}.table_refs`, "invalid_workflow_table_refs", "Workflow table_refs must be an object map.");
387
+ }
388
+ else if (isRecord(entry.table_refs)) {
389
+ for (const refName of Object.keys(entry.table_refs)) {
390
+ if (!tableRefs.has(refName)) {
391
+ add(`${path}.table_refs.${refName}`, "unknown_workflow_table_ref", `Workflow references table ref '${refName}' which is not declared on this blueprint.`);
392
+ }
393
+ }
394
+ }
395
+ if (entry.prompt_template_slugs !== undefined) {
396
+ if (!Array.isArray(entry.prompt_template_slugs)) {
397
+ add(`${path}.prompt_template_slugs`, "invalid_prompt_slug_list", "Workflow prompt_template_slugs must be an array of strings.");
398
+ }
399
+ else {
400
+ entry.prompt_template_slugs.forEach((slug, slugIndex) => {
401
+ if (!isNonEmptyString(slug)) {
402
+ add(`${path}.prompt_template_slugs.${slugIndex}`, "invalid_prompt_slug", "Workflow prompt slug references must be non-empty strings.");
403
+ }
404
+ else if (!promptSlugs.has(slug)) {
405
+ add(`${path}.prompt_template_slugs.${slugIndex}`, "unknown_prompt_slug", `Workflow references prompt slug '${slug}' which is not declared on this blueprint.`);
406
+ }
407
+ });
408
+ }
409
+ }
410
+ });
411
+ }
412
+ const requires = value.requires;
413
+ if (!isRecord(requires)) {
414
+ add("$.requires", "invalid_requires", "Blueprint requires must be an object.");
415
+ }
416
+ else {
417
+ if (requires.integrations !== undefined) {
418
+ if (!Array.isArray(requires.integrations)) {
419
+ add("$.requires.integrations", "invalid_requires_integrations", "Blueprint requires.integrations must be an array.");
420
+ }
421
+ else {
422
+ requires.integrations.forEach((entry, index) => {
423
+ const path = `$.requires.integrations.${index}`;
424
+ if (!isRecord(entry)) {
425
+ add(path, "invalid_integration", "Integration requirement must be an object.");
426
+ return;
427
+ }
428
+ if (!isNonEmptyString(entry.kind)) {
429
+ add(`${path}.kind`, "invalid_integration_kind", "Integration requirement kind is required (e.g. 'instantly', 'apollo').");
430
+ }
431
+ });
432
+ }
433
+ }
434
+ if (requires.context_keys !== undefined && !Array.isArray(requires.context_keys)) {
435
+ add("$.requires.context_keys", "invalid_context_keys", "Blueprint requires.context_keys must be an array of strings.");
436
+ }
437
+ }
438
+ return { ok: issues.length === 0, issues };
439
+ }
440
+ export function assertBlueprint(value, options = {}) {
441
+ const result = lintBlueprint(value, options);
442
+ if (result.ok)
443
+ return;
444
+ const first = result.issues[0];
445
+ throw new Error(first ? `${first.code}: ${first.message}` : "Invalid blueprint.");
446
+ }
447
+ export function assertRecipeBundleSafe(bundle) {
448
+ const issues = lintRecipeBundleSafety(bundle, "$.bundle");
449
+ const first = issues[0];
450
+ if (first)
451
+ throw new Error(`${first.code}: ${first.message}`);
452
+ }
453
+ export function lintRecipeBundleSafety(bundle, path = "$.bundle") {
454
+ const issues = [];
455
+ validateRecipeBundleSafety(bundle, path, (issuePath, code, message) => {
456
+ issues.push({ path: issuePath, code, message });
457
+ });
458
+ return issues;
459
+ }
460
+ function serializeWorkflowFunction(fn, path) {
461
+ if (typeof fn !== "function") {
462
+ throw new Error(`${path} must be a function.`);
463
+ }
464
+ const source = Function.prototype.toString.call(fn);
465
+ const issues = [];
466
+ validatePureFunctionSource(source, path, (issuePath, code, message) => {
467
+ issues.push({ path: issuePath, code, message });
468
+ });
469
+ if (issues.length > 0) {
470
+ const first = issues[0];
471
+ throw new Error(first ? `${first.code}: ${first.message}` : `${path} is invalid.`);
472
+ }
473
+ return source;
474
+ }