@vertesia/common 1.3.0 → 1.4.0-dev.20260615.042033Z

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 (632) hide show
  1. package/LICENSE +198 -10
  2. package/lib/{types/Progress.d.ts → Progress.d.ts} +1 -0
  3. package/lib/Progress.d.ts.map +1 -0
  4. package/lib/{esm/Progress.js → Progress.js} +2 -2
  5. package/lib/Progress.js.map +1 -0
  6. package/lib/{types/access-control.d.ts → access-control.d.ts} +15 -5
  7. package/lib/access-control.d.ts.map +1 -0
  8. package/lib/{esm/access-control.js → access-control.js} +10 -7
  9. package/lib/access-control.js.map +1 -0
  10. package/lib/agent-request-template.d.ts +4 -0
  11. package/lib/agent-request-template.d.ts.map +1 -0
  12. package/lib/agent-request-template.js +46 -0
  13. package/lib/agent-request-template.js.map +1 -0
  14. package/lib/{types/analytics.d.ts → analytics.d.ts} +3 -2
  15. package/lib/analytics.d.ts.map +1 -0
  16. package/lib/{cjs/analytics.js.map → analytics.js.map} +1 -1
  17. package/lib/{types/apikey.d.ts → apikey.d.ts} +21 -5
  18. package/lib/apikey.d.ts.map +1 -0
  19. package/lib/{esm/apikey.js → apikey.js} +1 -0
  20. package/lib/apikey.js.map +1 -0
  21. package/lib/{types/apps.d.ts → apps.d.ts} +430 -35
  22. package/lib/apps.d.ts.map +1 -0
  23. package/lib/apps.js +158 -0
  24. package/lib/apps.js.map +1 -0
  25. package/lib/{types/ask-user.d.ts → ask-user.d.ts} +1 -0
  26. package/lib/ask-user.d.ts.map +1 -0
  27. package/lib/{esm/ask-user.js.map → ask-user.js.map} +1 -1
  28. package/lib/{types/audit-trail.d.ts → audit-trail.d.ts} +2 -1
  29. package/lib/audit-trail.d.ts.map +1 -0
  30. package/lib/audit-trail.js +3 -0
  31. package/lib/audit-trail.js.map +1 -0
  32. package/lib/browser-credentials.d.ts +123 -0
  33. package/lib/browser-credentials.d.ts.map +1 -0
  34. package/lib/browser-credentials.js +2 -0
  35. package/lib/browser-credentials.js.map +1 -0
  36. package/lib/{types/channels.d.ts → channels.d.ts} +3 -2
  37. package/lib/channels.d.ts.map +1 -0
  38. package/lib/{esm/channels.js → channels.js} +3 -3
  39. package/lib/channels.js.map +1 -0
  40. package/lib/{types/common.d.ts → common.d.ts} +18 -10
  41. package/lib/common.d.ts.map +1 -0
  42. package/lib/common.js.map +1 -0
  43. package/lib/{types/cost-analytics.d.ts → cost-analytics.d.ts} +2 -3
  44. package/lib/cost-analytics.d.ts.map +1 -0
  45. package/lib/cost-analytics.js.map +1 -0
  46. package/lib/{types/data-platform.d.ts → data-platform.d.ts} +134 -7
  47. package/lib/data-platform.d.ts.map +1 -0
  48. package/lib/data-platform.js.map +1 -0
  49. package/lib/{types/email.d.ts → email.d.ts} +6 -2
  50. package/lib/email.d.ts.map +1 -0
  51. package/lib/{esm/email.js → email.js} +2 -2
  52. package/lib/email.js.map +1 -0
  53. package/lib/embeddings.d.ts +65 -0
  54. package/lib/embeddings.d.ts.map +1 -0
  55. package/lib/embeddings.js +2 -0
  56. package/lib/embeddings.js.map +1 -0
  57. package/lib/{types/environment.d.ts → environment.d.ts} +18 -5
  58. package/lib/environment.d.ts.map +1 -0
  59. package/lib/{esm/environment.js → environment.js} +17 -7
  60. package/lib/environment.js.map +1 -0
  61. package/lib/{types/facets.d.ts → facets.d.ts} +6 -5
  62. package/lib/facets.d.ts.map +1 -0
  63. package/lib/facets.js.map +1 -0
  64. package/lib/{types/group.d.ts → group.d.ts} +5 -4
  65. package/lib/group.d.ts.map +1 -0
  66. package/lib/group.js.map +1 -0
  67. package/lib/host-utils.d.ts +8 -0
  68. package/lib/host-utils.d.ts.map +1 -0
  69. package/lib/host-utils.js +84 -0
  70. package/lib/host-utils.js.map +1 -0
  71. package/lib/{types/index.d.ts → index.d.ts} +19 -10
  72. package/lib/index.d.ts.map +1 -0
  73. package/lib/{esm/index.js → index.js} +18 -10
  74. package/lib/index.js.map +1 -0
  75. package/lib/integrations.d.ts +151 -0
  76. package/lib/integrations.d.ts.map +1 -0
  77. package/lib/{esm/integrations.js → integrations.js} +6 -0
  78. package/lib/integrations.js.map +1 -0
  79. package/lib/{types/interaction.d.ts → interaction.d.ts} +99 -56
  80. package/lib/interaction.d.ts.map +1 -0
  81. package/lib/{esm/interaction.js → interaction.js} +3 -3
  82. package/lib/interaction.js.map +1 -0
  83. package/lib/json-schema.d.ts +2 -0
  84. package/lib/json-schema.d.ts.map +1 -0
  85. package/lib/{cjs/json-schema.js.map → json-schema.js.map} +1 -1
  86. package/lib/json.d.ts +2 -0
  87. package/lib/json.d.ts.map +1 -0
  88. package/lib/json.js.map +1 -0
  89. package/lib/{types/meters.d.ts → meters.d.ts} +2 -1
  90. package/lib/meters.d.ts.map +1 -0
  91. package/lib/meters.js.map +1 -0
  92. package/lib/model_utility.d.ts +2 -0
  93. package/lib/model_utility.d.ts.map +1 -0
  94. package/lib/model_utility.js +2 -0
  95. package/lib/model_utility.js.map +1 -0
  96. package/lib/oauth-scopes.d.ts +18 -0
  97. package/lib/oauth-scopes.d.ts.map +1 -0
  98. package/lib/oauth-scopes.js +57 -0
  99. package/lib/oauth-scopes.js.map +1 -0
  100. package/lib/{types/oauth-server.d.ts → oauth-server.d.ts} +50 -7
  101. package/lib/oauth-server.d.ts.map +1 -0
  102. package/lib/{cjs/oauth-server.js.map → oauth-server.js.map} +1 -1
  103. package/lib/{types/oauth.d.ts → oauth.d.ts} +1 -0
  104. package/lib/oauth.d.ts.map +1 -0
  105. package/lib/oauth.js.map +1 -0
  106. package/lib/{types/payload.d.ts → payload.d.ts} +5 -4
  107. package/lib/payload.d.ts.map +1 -0
  108. package/lib/{cjs/payload.js.map → payload.js.map} +1 -1
  109. package/lib/{types/pending-asks.d.ts → pending-asks.d.ts} +8 -1
  110. package/lib/pending-asks.d.ts.map +1 -0
  111. package/lib/pending-asks.js.map +1 -0
  112. package/lib/principal-context.d.ts +27 -0
  113. package/lib/principal-context.d.ts.map +1 -0
  114. package/lib/principal-context.js +2 -0
  115. package/lib/principal-context.js.map +1 -0
  116. package/lib/{types/project.d.ts → project.d.ts} +253 -22
  117. package/lib/project.d.ts.map +1 -0
  118. package/lib/project.js +230 -0
  119. package/lib/project.js.map +1 -0
  120. package/lib/{types/prompt.d.ts → prompt.d.ts} +16 -9
  121. package/lib/prompt.d.ts.map +1 -0
  122. package/lib/prompt.js.map +1 -0
  123. package/lib/{types/query.d.ts → query.d.ts} +11 -8
  124. package/lib/query.d.ts.map +1 -0
  125. package/lib/query.js.map +1 -0
  126. package/lib/{types/rate-limiter.d.ts → rate-limiter.d.ts} +1 -0
  127. package/lib/rate-limiter.d.ts.map +1 -0
  128. package/lib/rate-limiter.js.map +1 -0
  129. package/lib/{types/refs.d.ts → refs.d.ts} +1 -0
  130. package/lib/refs.d.ts.map +1 -0
  131. package/lib/refs.js.map +1 -0
  132. package/lib/roles.d.ts +19 -0
  133. package/lib/roles.d.ts.map +1 -0
  134. package/lib/roles.js +228 -0
  135. package/lib/roles.js.map +1 -0
  136. package/lib/{types/runs.d.ts → runs.d.ts} +3 -2
  137. package/lib/runs.d.ts.map +1 -0
  138. package/lib/runs.js.map +1 -0
  139. package/lib/secrets.d.ts +47 -0
  140. package/lib/secrets.d.ts.map +1 -0
  141. package/lib/secrets.js +2 -0
  142. package/lib/secrets.js.map +1 -0
  143. package/lib/{types/skill.d.ts → skill.d.ts} +2 -1
  144. package/lib/skill.d.ts.map +1 -0
  145. package/lib/skill.js.map +1 -0
  146. package/lib/{types/store → store}/activity-catalog.d.ts +2 -1
  147. package/lib/store/activity-catalog.d.ts.map +1 -0
  148. package/lib/store/activity-catalog.js.map +1 -0
  149. package/lib/{types/store → store}/agent-run.d.ts +206 -35
  150. package/lib/store/agent-run.d.ts.map +1 -0
  151. package/lib/store/agent-run.js.map +1 -0
  152. package/lib/{types/store → store}/collections.d.ts +10 -9
  153. package/lib/store/collections.d.ts.map +1 -0
  154. package/lib/store/collections.js.map +1 -0
  155. package/lib/{types/store → store}/common.d.ts +1 -0
  156. package/lib/store/common.d.ts.map +1 -0
  157. package/lib/{cjs → store}/common.js.map +1 -1
  158. package/lib/{types/store → store}/conversation-state.d.ts +36 -5
  159. package/lib/store/conversation-state.d.ts.map +1 -0
  160. package/lib/{esm/store → store}/conversation-state.js +3 -0
  161. package/lib/store/conversation-state.js.map +1 -0
  162. package/lib/{types/store → store}/doc-analyzer.d.ts +20 -14
  163. package/lib/store/doc-analyzer.d.ts.map +1 -0
  164. package/lib/{cjs/store → store}/doc-analyzer.js.map +1 -1
  165. package/lib/{types/store → store}/dsl-workflow.d.ts +42 -24
  166. package/lib/store/dsl-workflow.d.ts.map +1 -0
  167. package/lib/store/dsl-workflow.js +8 -0
  168. package/lib/store/dsl-workflow.js.map +1 -0
  169. package/lib/{types/store → store}/hive-memory.d.ts +2 -1
  170. package/lib/store/hive-memory.d.ts.map +1 -0
  171. package/lib/{cjs/store → store}/hive-memory.js.map +1 -1
  172. package/lib/store/index.d.ts +20 -0
  173. package/lib/store/index.d.ts.map +1 -0
  174. package/lib/store/index.js +20 -0
  175. package/lib/store/index.js.map +1 -0
  176. package/lib/{types/store → store}/object-types.d.ts +2 -1
  177. package/lib/store/object-types.d.ts.map +1 -0
  178. package/lib/store/object-types.js +95 -0
  179. package/lib/store/object-types.js.map +1 -0
  180. package/lib/store/process-schema.d.ts +481 -0
  181. package/lib/store/process-schema.d.ts.map +1 -0
  182. package/lib/store/process-schema.js +482 -0
  183. package/lib/store/process-schema.js.map +1 -0
  184. package/lib/store/process-validation.d.ts +17 -0
  185. package/lib/store/process-validation.d.ts.map +1 -0
  186. package/lib/store/process-validation.js +428 -0
  187. package/lib/store/process-validation.js.map +1 -0
  188. package/lib/store/process.d.ts +261 -0
  189. package/lib/store/process.d.ts.map +1 -0
  190. package/lib/store/process.js +2 -0
  191. package/lib/store/process.js.map +1 -0
  192. package/lib/{types/store → store}/rendering.d.ts +5 -4
  193. package/lib/store/rendering.d.ts.map +1 -0
  194. package/lib/{esm/store → store}/rendering.js +6 -6
  195. package/lib/store/rendering.js.map +1 -0
  196. package/lib/{types/store → store}/schedule.d.ts +4 -3
  197. package/lib/store/schedule.d.ts.map +1 -0
  198. package/lib/store/schedule.js.map +1 -0
  199. package/lib/{types/store → store}/signals.d.ts +2 -1
  200. package/lib/store/signals.d.ts.map +1 -0
  201. package/lib/{cjs/store → store}/signals.js.map +1 -1
  202. package/lib/{types/store → store}/store.d.ts +63 -38
  203. package/lib/store/store.d.ts.map +1 -0
  204. package/lib/{esm/store → store}/store.js +17 -8
  205. package/lib/store/store.js.map +1 -0
  206. package/lib/store/task.d.ts +63 -0
  207. package/lib/store/task.d.ts.map +1 -0
  208. package/lib/store/task.js +5 -0
  209. package/lib/store/task.js.map +1 -0
  210. package/lib/store/temporalio.d.ts +17 -0
  211. package/lib/store/temporalio.d.ts.map +1 -0
  212. package/lib/{esm/store → store}/temporalio.js +6 -6
  213. package/lib/store/temporalio.js.map +1 -0
  214. package/lib/{types/store → store}/workflow.d.ts +87 -33
  215. package/lib/store/workflow.d.ts.map +1 -0
  216. package/lib/{esm/store → store}/workflow.js +36 -37
  217. package/lib/store/workflow.js.map +1 -0
  218. package/lib/{types/sts-token-types.d.ts → sts-token-types.d.ts} +29 -2
  219. package/lib/sts-token-types.d.ts.map +1 -0
  220. package/lib/{esm/sts-token-types.js → sts-token-types.js} +0 -4
  221. package/lib/sts-token-types.js.map +1 -0
  222. package/lib/{types/tenant.d.ts → tenant.d.ts} +1 -0
  223. package/lib/tenant.d.ts.map +1 -0
  224. package/lib/tenant.js.map +1 -0
  225. package/lib/{types/tool-execution.d.ts → tool-execution.d.ts} +3 -2
  226. package/lib/tool-execution.d.ts.map +1 -0
  227. package/lib/tool-execution.js.map +1 -0
  228. package/lib/tools.d.ts +101 -0
  229. package/lib/tools.d.ts.map +1 -0
  230. package/lib/tools.js +2 -0
  231. package/lib/tools.js.map +1 -0
  232. package/lib/{types/training.d.ts → training.d.ts} +10 -9
  233. package/lib/training.d.ts.map +1 -0
  234. package/lib/training.js.map +1 -0
  235. package/lib/{types/transient-tokens.d.ts → transient-tokens.d.ts} +3 -2
  236. package/lib/transient-tokens.d.ts.map +1 -0
  237. package/lib/transient-tokens.js.map +1 -0
  238. package/lib/{types/user.d.ts → user.d.ts} +6 -9
  239. package/lib/user.d.ts.map +1 -0
  240. package/lib/{esm/user.js → user.js} +2 -2
  241. package/lib/user.js.map +1 -0
  242. package/lib/{types/utils → utils}/auth.d.ts +2 -1
  243. package/lib/utils/auth.d.ts.map +1 -0
  244. package/lib/{esm/utils → utils}/auth.js +1 -1
  245. package/lib/utils/auth.js.map +1 -0
  246. package/lib/{types/utils → utils}/schemas.d.ts +5 -4
  247. package/lib/utils/schemas.d.ts.map +1 -0
  248. package/lib/{esm/utils → utils}/schemas.js +24 -22
  249. package/lib/utils/schemas.js.map +1 -0
  250. package/lib/{types/utils → utils}/type-helpers.d.ts +1 -0
  251. package/lib/utils/type-helpers.d.ts.map +1 -0
  252. package/lib/{cjs/utils → utils}/type-helpers.js.map +1 -1
  253. package/lib/{types/versions.d.ts → versions.d.ts} +1 -0
  254. package/lib/versions.d.ts.map +1 -0
  255. package/lib/versions.js.map +1 -0
  256. package/lib/vertesia-common.js +1 -1
  257. package/lib/vertesia-common.js.map +1 -1
  258. package/lib/{types/workflow-analytics.d.ts → workflow-analytics.d.ts} +10 -3
  259. package/lib/workflow-analytics.d.ts.map +1 -0
  260. package/lib/workflow-analytics.js.map +1 -0
  261. package/package.json +19 -19
  262. package/src/Progress.ts +9 -7
  263. package/src/access-control.ts +66 -70
  264. package/src/agent-request-template.test.ts +40 -0
  265. package/src/agent-request-template.ts +45 -0
  266. package/src/analytics.ts +11 -16
  267. package/src/apikey.ts +28 -12
  268. package/src/apps.test.ts +37 -0
  269. package/src/apps.ts +562 -78
  270. package/src/audit-trail.ts +3 -5
  271. package/src/browser-credentials.ts +133 -0
  272. package/src/channels.ts +5 -5
  273. package/src/common.ts +17 -11
  274. package/src/cost-analytics.ts +10 -4
  275. package/src/data-platform.ts +142 -7
  276. package/src/email.ts +7 -4
  277. package/src/embeddings.ts +76 -0
  278. package/src/environment.ts +44 -25
  279. package/src/facets.ts +19 -21
  280. package/src/group.ts +4 -5
  281. package/src/host-utils.test.ts +61 -0
  282. package/src/host-utils.ts +93 -0
  283. package/src/index.ts +18 -10
  284. package/src/integrations.ts +134 -26
  285. package/src/interaction.ts +185 -141
  286. package/src/json-schema.ts +1 -1
  287. package/src/json.ts +6 -3
  288. package/src/meters.ts +6 -9
  289. package/src/model_utility.ts +1 -1
  290. package/src/oauth-scopes.ts +72 -0
  291. package/src/oauth-server.ts +65 -8
  292. package/src/payload.ts +6 -6
  293. package/src/pending-asks.ts +8 -1
  294. package/src/principal-context.ts +27 -0
  295. package/src/project.ts +383 -75
  296. package/src/prompt.ts +30 -27
  297. package/src/query.ts +19 -17
  298. package/src/rate-limiter.ts +1 -1
  299. package/src/refs.ts +19 -24
  300. package/src/roles.test.ts +30 -0
  301. package/src/roles.ts +251 -0
  302. package/src/runs.ts +14 -15
  303. package/src/secrets.ts +60 -0
  304. package/src/skill.ts +1 -2
  305. package/src/store/activity-catalog.ts +13 -1
  306. package/src/store/agent-run.ts +269 -42
  307. package/src/store/collections.ts +13 -13
  308. package/src/store/common.ts +1 -2
  309. package/src/store/conversation-state.ts +42 -5
  310. package/src/store/doc-analyzer.ts +22 -14
  311. package/src/store/dsl-workflow.ts +54 -29
  312. package/src/store/hive-memory.ts +10 -10
  313. package/src/store/index.ts +19 -17
  314. package/src/store/ms.d.ts +34 -3
  315. package/src/store/object-types.ts +75 -79
  316. package/src/store/process-schema.test.ts +106 -0
  317. package/src/store/process-schema.ts +485 -0
  318. package/src/store/process-validation.test.ts +432 -0
  319. package/src/store/process-validation.ts +548 -0
  320. package/src/store/process.ts +305 -0
  321. package/src/store/rendering.ts +12 -12
  322. package/src/store/schedule.ts +3 -3
  323. package/src/store/signals.ts +1 -1
  324. package/src/store/store.ts +115 -89
  325. package/src/store/task.ts +71 -0
  326. package/src/store/temporalio.ts +14 -14
  327. package/src/store/workflow.test.ts +16 -14
  328. package/src/store/workflow.ts +177 -119
  329. package/src/sts-token-types.ts +30 -4
  330. package/src/tool-execution.ts +2 -2
  331. package/src/tools.ts +103 -0
  332. package/src/training.ts +25 -27
  333. package/src/transient-tokens.ts +4 -7
  334. package/src/user.ts +18 -37
  335. package/src/utils/auth.ts +2 -2
  336. package/src/utils/schemas.ts +36 -31
  337. package/src/utils/type-helpers.ts +2 -4
  338. package/src/workflow-analytics.ts +15 -18
  339. package/lib/cjs/Progress.js +0 -61
  340. package/lib/cjs/Progress.js.map +0 -1
  341. package/lib/cjs/access-control.js +0 -91
  342. package/lib/cjs/access-control.js.map +0 -1
  343. package/lib/cjs/analytics.js +0 -3
  344. package/lib/cjs/apikey.js +0 -17
  345. package/lib/cjs/apikey.js.map +0 -1
  346. package/lib/cjs/apps.js +0 -89
  347. package/lib/cjs/apps.js.map +0 -1
  348. package/lib/cjs/ask-user.js +0 -8
  349. package/lib/cjs/ask-user.js.map +0 -1
  350. package/lib/cjs/audit-trail.js +0 -10
  351. package/lib/cjs/audit-trail.js.map +0 -1
  352. package/lib/cjs/channels.js +0 -63
  353. package/lib/cjs/channels.js.map +0 -1
  354. package/lib/cjs/common.js +0 -3
  355. package/lib/cjs/cost-analytics.js +0 -13
  356. package/lib/cjs/cost-analytics.js.map +0 -1
  357. package/lib/cjs/data-platform.js +0 -127
  358. package/lib/cjs/data-platform.js.map +0 -1
  359. package/lib/cjs/email.js +0 -20
  360. package/lib/cjs/email.js.map +0 -1
  361. package/lib/cjs/environment.js +0 -44
  362. package/lib/cjs/environment.js.map +0 -1
  363. package/lib/cjs/facets.js +0 -3
  364. package/lib/cjs/facets.js.map +0 -1
  365. package/lib/cjs/group.js +0 -6
  366. package/lib/cjs/group.js.map +0 -1
  367. package/lib/cjs/index.js +0 -60
  368. package/lib/cjs/index.js.map +0 -1
  369. package/lib/cjs/integrations.js +0 -16
  370. package/lib/cjs/integrations.js.map +0 -1
  371. package/lib/cjs/interaction.js +0 -101
  372. package/lib/cjs/interaction.js.map +0 -1
  373. package/lib/cjs/json-schema.js +0 -3
  374. package/lib/cjs/json.js +0 -3
  375. package/lib/cjs/json.js.map +0 -1
  376. package/lib/cjs/meters.js +0 -13
  377. package/lib/cjs/meters.js.map +0 -1
  378. package/lib/cjs/model_utility.js +0 -6
  379. package/lib/cjs/model_utility.js.map +0 -1
  380. package/lib/cjs/oauth-server.js +0 -3
  381. package/lib/cjs/oauth.js +0 -7
  382. package/lib/cjs/oauth.js.map +0 -1
  383. package/lib/cjs/openapi.js +0 -3
  384. package/lib/cjs/openapi.js.map +0 -1
  385. package/lib/cjs/package.json +0 -3
  386. package/lib/cjs/payload.js +0 -3
  387. package/lib/cjs/pending-asks.js +0 -7
  388. package/lib/cjs/pending-asks.js.map +0 -1
  389. package/lib/cjs/project.js +0 -143
  390. package/lib/cjs/project.js.map +0 -1
  391. package/lib/cjs/prompt.js +0 -21
  392. package/lib/cjs/prompt.js.map +0 -1
  393. package/lib/cjs/query.js +0 -3
  394. package/lib/cjs/query.js.map +0 -1
  395. package/lib/cjs/rate-limiter.js +0 -6
  396. package/lib/cjs/rate-limiter.js.map +0 -1
  397. package/lib/cjs/refs.js +0 -14
  398. package/lib/cjs/refs.js.map +0 -1
  399. package/lib/cjs/runs.js +0 -3
  400. package/lib/cjs/runs.js.map +0 -1
  401. package/lib/cjs/skill.js +0 -14
  402. package/lib/cjs/skill.js.map +0 -1
  403. package/lib/cjs/store/activity-catalog.js +0 -3
  404. package/lib/cjs/store/activity-catalog.js.map +0 -1
  405. package/lib/cjs/store/agent-run.js +0 -16
  406. package/lib/cjs/store/agent-run.js.map +0 -1
  407. package/lib/cjs/store/collections.js +0 -9
  408. package/lib/cjs/store/collections.js.map +0 -1
  409. package/lib/cjs/store/common.js +0 -3
  410. package/lib/cjs/store/common.js.map +0 -1
  411. package/lib/cjs/store/conversation-state.js +0 -19
  412. package/lib/cjs/store/conversation-state.js.map +0 -1
  413. package/lib/cjs/store/doc-analyzer.js +0 -3
  414. package/lib/cjs/store/dsl-workflow.js +0 -5
  415. package/lib/cjs/store/dsl-workflow.js.map +0 -1
  416. package/lib/cjs/store/hive-memory.js +0 -3
  417. package/lib/cjs/store/index.js +0 -33
  418. package/lib/cjs/store/index.js.map +0 -1
  419. package/lib/cjs/store/object-types.js +0 -98
  420. package/lib/cjs/store/object-types.js.map +0 -1
  421. package/lib/cjs/store/rendering.js +0 -26
  422. package/lib/cjs/store/rendering.js.map +0 -1
  423. package/lib/cjs/store/schedule.js +0 -32
  424. package/lib/cjs/store/schedule.js.map +0 -1
  425. package/lib/cjs/store/signals.js +0 -3
  426. package/lib/cjs/store/store.js +0 -182
  427. package/lib/cjs/store/store.js.map +0 -1
  428. package/lib/cjs/store/temporalio.js +0 -44
  429. package/lib/cjs/store/temporalio.js.map +0 -1
  430. package/lib/cjs/store/worker.js +0 -3
  431. package/lib/cjs/store/worker.js.map +0 -1
  432. package/lib/cjs/store/workflow.js +0 -306
  433. package/lib/cjs/store/workflow.js.map +0 -1
  434. package/lib/cjs/sts-token-types.js +0 -32
  435. package/lib/cjs/sts-token-types.js.map +0 -1
  436. package/lib/cjs/tenant.js +0 -3
  437. package/lib/cjs/tenant.js.map +0 -1
  438. package/lib/cjs/tool-execution.js +0 -6
  439. package/lib/cjs/tool-execution.js.map +0 -1
  440. package/lib/cjs/training.js +0 -14
  441. package/lib/cjs/training.js.map +0 -1
  442. package/lib/cjs/transient-tokens.js +0 -9
  443. package/lib/cjs/transient-tokens.js.map +0 -1
  444. package/lib/cjs/user.js +0 -26
  445. package/lib/cjs/user.js.map +0 -1
  446. package/lib/cjs/utils/auth.js +0 -15
  447. package/lib/cjs/utils/auth.js.map +0 -1
  448. package/lib/cjs/utils/schemas.js +0 -182
  449. package/lib/cjs/utils/schemas.js.map +0 -1
  450. package/lib/cjs/utils/type-helpers.js +0 -3
  451. package/lib/cjs/versions.js +0 -10
  452. package/lib/cjs/versions.js.map +0 -1
  453. package/lib/cjs/workflow-analytics.js +0 -52
  454. package/lib/cjs/workflow-analytics.js.map +0 -1
  455. package/lib/esm/Progress.js.map +0 -1
  456. package/lib/esm/access-control.js.map +0 -1
  457. package/lib/esm/analytics.js.map +0 -1
  458. package/lib/esm/apikey.js.map +0 -1
  459. package/lib/esm/apps.js +0 -79
  460. package/lib/esm/apps.js.map +0 -1
  461. package/lib/esm/audit-trail.js +0 -7
  462. package/lib/esm/audit-trail.js.map +0 -1
  463. package/lib/esm/channels.js.map +0 -1
  464. package/lib/esm/common.js.map +0 -1
  465. package/lib/esm/cost-analytics.js.map +0 -1
  466. package/lib/esm/data-platform.js.map +0 -1
  467. package/lib/esm/email.js.map +0 -1
  468. package/lib/esm/environment.js.map +0 -1
  469. package/lib/esm/facets.js.map +0 -1
  470. package/lib/esm/group.js.map +0 -1
  471. package/lib/esm/index.js.map +0 -1
  472. package/lib/esm/integrations.js.map +0 -1
  473. package/lib/esm/interaction.js.map +0 -1
  474. package/lib/esm/json-schema.js.map +0 -1
  475. package/lib/esm/json.js.map +0 -1
  476. package/lib/esm/meters.js.map +0 -1
  477. package/lib/esm/model_utility.js +0 -2
  478. package/lib/esm/model_utility.js.map +0 -1
  479. package/lib/esm/oauth-server.js.map +0 -1
  480. package/lib/esm/oauth.js.map +0 -1
  481. package/lib/esm/openapi.js +0 -2
  482. package/lib/esm/openapi.js.map +0 -1
  483. package/lib/esm/payload.js.map +0 -1
  484. package/lib/esm/pending-asks.js.map +0 -1
  485. package/lib/esm/project.js +0 -138
  486. package/lib/esm/project.js.map +0 -1
  487. package/lib/esm/prompt.js.map +0 -1
  488. package/lib/esm/query.js.map +0 -1
  489. package/lib/esm/rate-limiter.js.map +0 -1
  490. package/lib/esm/refs.js.map +0 -1
  491. package/lib/esm/runs.js.map +0 -1
  492. package/lib/esm/skill.js.map +0 -1
  493. package/lib/esm/store/activity-catalog.js.map +0 -1
  494. package/lib/esm/store/agent-run.js.map +0 -1
  495. package/lib/esm/store/collections.js.map +0 -1
  496. package/lib/esm/store/common.js.map +0 -1
  497. package/lib/esm/store/conversation-state.js.map +0 -1
  498. package/lib/esm/store/doc-analyzer.js.map +0 -1
  499. package/lib/esm/store/dsl-workflow.js +0 -2
  500. package/lib/esm/store/dsl-workflow.js.map +0 -1
  501. package/lib/esm/store/hive-memory.js.map +0 -1
  502. package/lib/esm/store/index.js +0 -17
  503. package/lib/esm/store/index.js.map +0 -1
  504. package/lib/esm/store/object-types.js +0 -95
  505. package/lib/esm/store/object-types.js.map +0 -1
  506. package/lib/esm/store/rendering.js.map +0 -1
  507. package/lib/esm/store/schedule.js.map +0 -1
  508. package/lib/esm/store/signals.js.map +0 -1
  509. package/lib/esm/store/store.js.map +0 -1
  510. package/lib/esm/store/temporalio.js.map +0 -1
  511. package/lib/esm/store/worker.js +0 -2
  512. package/lib/esm/store/worker.js.map +0 -1
  513. package/lib/esm/store/workflow.js.map +0 -1
  514. package/lib/esm/sts-token-types.js.map +0 -1
  515. package/lib/esm/tenant.js.map +0 -1
  516. package/lib/esm/tool-execution.js.map +0 -1
  517. package/lib/esm/training.js.map +0 -1
  518. package/lib/esm/transient-tokens.js.map +0 -1
  519. package/lib/esm/user.js.map +0 -1
  520. package/lib/esm/utils/auth.js.map +0 -1
  521. package/lib/esm/utils/schemas.js.map +0 -1
  522. package/lib/esm/utils/type-helpers.js.map +0 -1
  523. package/lib/esm/versions.js.map +0 -1
  524. package/lib/esm/workflow-analytics.js.map +0 -1
  525. package/lib/tsconfig.tsbuildinfo +0 -1
  526. package/lib/types/Progress.d.ts.map +0 -1
  527. package/lib/types/access-control.d.ts.map +0 -1
  528. package/lib/types/analytics.d.ts.map +0 -1
  529. package/lib/types/apikey.d.ts.map +0 -1
  530. package/lib/types/apps.d.ts.map +0 -1
  531. package/lib/types/ask-user.d.ts.map +0 -1
  532. package/lib/types/audit-trail.d.ts.map +0 -1
  533. package/lib/types/channels.d.ts.map +0 -1
  534. package/lib/types/common.d.ts.map +0 -1
  535. package/lib/types/cost-analytics.d.ts.map +0 -1
  536. package/lib/types/data-platform.d.ts.map +0 -1
  537. package/lib/types/email.d.ts.map +0 -1
  538. package/lib/types/environment.d.ts.map +0 -1
  539. package/lib/types/facets.d.ts.map +0 -1
  540. package/lib/types/group.d.ts.map +0 -1
  541. package/lib/types/index.d.ts.map +0 -1
  542. package/lib/types/integrations.d.ts +0 -83
  543. package/lib/types/integrations.d.ts.map +0 -1
  544. package/lib/types/interaction.d.ts.map +0 -1
  545. package/lib/types/json-schema.d.ts +0 -1
  546. package/lib/types/json-schema.d.ts.map +0 -1
  547. package/lib/types/json.d.ts +0 -1
  548. package/lib/types/json.d.ts.map +0 -1
  549. package/lib/types/meters.d.ts.map +0 -1
  550. package/lib/types/model_utility.d.ts +0 -1
  551. package/lib/types/model_utility.d.ts.map +0 -1
  552. package/lib/types/oauth-server.d.ts.map +0 -1
  553. package/lib/types/oauth.d.ts.map +0 -1
  554. package/lib/types/openapi.d.ts +0 -90
  555. package/lib/types/openapi.d.ts.map +0 -1
  556. package/lib/types/payload.d.ts.map +0 -1
  557. package/lib/types/pending-asks.d.ts.map +0 -1
  558. package/lib/types/project.d.ts.map +0 -1
  559. package/lib/types/prompt.d.ts.map +0 -1
  560. package/lib/types/query.d.ts.map +0 -1
  561. package/lib/types/rate-limiter.d.ts.map +0 -1
  562. package/lib/types/refs.d.ts.map +0 -1
  563. package/lib/types/runs.d.ts.map +0 -1
  564. package/lib/types/skill.d.ts.map +0 -1
  565. package/lib/types/store/activity-catalog.d.ts.map +0 -1
  566. package/lib/types/store/agent-run.d.ts.map +0 -1
  567. package/lib/types/store/collections.d.ts.map +0 -1
  568. package/lib/types/store/common.d.ts.map +0 -1
  569. package/lib/types/store/conversation-state.d.ts.map +0 -1
  570. package/lib/types/store/doc-analyzer.d.ts.map +0 -1
  571. package/lib/types/store/dsl-workflow.d.ts.map +0 -1
  572. package/lib/types/store/hive-memory.d.ts.map +0 -1
  573. package/lib/types/store/index.d.ts +0 -16
  574. package/lib/types/store/index.d.ts.map +0 -1
  575. package/lib/types/store/object-types.d.ts.map +0 -1
  576. package/lib/types/store/rendering.d.ts.map +0 -1
  577. package/lib/types/store/schedule.d.ts.map +0 -1
  578. package/lib/types/store/signals.d.ts.map +0 -1
  579. package/lib/types/store/store.d.ts.map +0 -1
  580. package/lib/types/store/temporalio.d.ts +0 -16
  581. package/lib/types/store/temporalio.d.ts.map +0 -1
  582. package/lib/types/store/worker.d.ts +0 -18
  583. package/lib/types/store/worker.d.ts.map +0 -1
  584. package/lib/types/store/workflow.d.ts.map +0 -1
  585. package/lib/types/sts-token-types.d.ts.map +0 -1
  586. package/lib/types/tenant.d.ts.map +0 -1
  587. package/lib/types/tool-execution.d.ts.map +0 -1
  588. package/lib/types/training.d.ts.map +0 -1
  589. package/lib/types/transient-tokens.d.ts.map +0 -1
  590. package/lib/types/user.d.ts.map +0 -1
  591. package/lib/types/utils/auth.d.ts.map +0 -1
  592. package/lib/types/utils/schemas.d.ts.map +0 -1
  593. package/lib/types/utils/type-helpers.d.ts.map +0 -1
  594. package/lib/types/versions.d.ts.map +0 -1
  595. package/lib/types/workflow-analytics.d.ts.map +0 -1
  596. package/src/openapi.ts +0 -102
  597. package/src/store/worker.ts +0 -19
  598. /package/lib/{esm/analytics.js → analytics.js} +0 -0
  599. /package/lib/{esm/ask-user.js → ask-user.js} +0 -0
  600. /package/lib/{esm/common.js → common.js} +0 -0
  601. /package/lib/{esm/cost-analytics.js → cost-analytics.js} +0 -0
  602. /package/lib/{esm/data-platform.js → data-platform.js} +0 -0
  603. /package/lib/{esm/facets.js → facets.js} +0 -0
  604. /package/lib/{esm/group.js → group.js} +0 -0
  605. /package/lib/{esm/json-schema.js → json-schema.js} +0 -0
  606. /package/lib/{esm/json.js → json.js} +0 -0
  607. /package/lib/{esm/meters.js → meters.js} +0 -0
  608. /package/lib/{esm/oauth-server.js → oauth-server.js} +0 -0
  609. /package/lib/{esm/oauth.js → oauth.js} +0 -0
  610. /package/lib/{esm/payload.js → payload.js} +0 -0
  611. /package/lib/{esm/pending-asks.js → pending-asks.js} +0 -0
  612. /package/lib/{esm/prompt.js → prompt.js} +0 -0
  613. /package/lib/{esm/query.js → query.js} +0 -0
  614. /package/lib/{esm/rate-limiter.js → rate-limiter.js} +0 -0
  615. /package/lib/{esm/refs.js → refs.js} +0 -0
  616. /package/lib/{esm/runs.js → runs.js} +0 -0
  617. /package/lib/{esm/skill.js → skill.js} +0 -0
  618. /package/lib/{esm/store → store}/activity-catalog.js +0 -0
  619. /package/lib/{esm/store → store}/agent-run.js +0 -0
  620. /package/lib/{esm/store → store}/collections.js +0 -0
  621. /package/lib/{esm/store → store}/common.js +0 -0
  622. /package/lib/{esm/store → store}/doc-analyzer.js +0 -0
  623. /package/lib/{esm/store → store}/hive-memory.js +0 -0
  624. /package/lib/{esm/store → store}/schedule.js +0 -0
  625. /package/lib/{esm/store → store}/signals.js +0 -0
  626. /package/lib/{esm/tenant.js → tenant.js} +0 -0
  627. /package/lib/{esm/tool-execution.js → tool-execution.js} +0 -0
  628. /package/lib/{esm/training.js → training.js} +0 -0
  629. /package/lib/{esm/transient-tokens.js → transient-tokens.js} +0 -0
  630. /package/lib/{esm/utils → utils}/type-helpers.js +0 -0
  631. /package/lib/{esm/versions.js → versions.js} +0 -0
  632. /package/lib/{esm/workflow-analytics.js → workflow-analytics.js} +0 -0
@@ -0,0 +1,305 @@
1
+ import type { JSONSchema } from '../json-schema.js';
2
+ import type { TaskField } from './task.js';
3
+
4
+ export type JsonLogicRule = Record<string, unknown>;
5
+
6
+ export type ProcessDefinitionStatus = 'draft' | 'published' | 'archived';
7
+ export const PROCESS_DEFINITION_FORMAT_VERSION = 1 as const;
8
+ export type ProcessDefinitionFormatVersion = typeof PROCESS_DEFINITION_FORMAT_VERSION;
9
+
10
+ export type ProcessNodeType =
11
+ | 'tool'
12
+ | 'interaction'
13
+ | 'agent'
14
+ | 'process'
15
+ | 'human_task'
16
+ | 'foreach'
17
+ | 'branch'
18
+ | 'condition'
19
+ | 'final';
20
+
21
+ export type TransitionTrigger = 'auto' | 'agent' | 'user';
22
+ export type ParallelFailurePolicy = 'fail_fast' | 'collect_errors';
23
+ export type ProcessNodeRunType = 'supervised' | 'programmatic';
24
+ export type ParallelCollectMode = 'array';
25
+ export type BranchJoinPolicy = 'all';
26
+ export type ProcessDefinitionMetadata = Record<string, unknown>;
27
+ export type ParallelCollectField =
28
+ | 'status'
29
+ | 'index'
30
+ | 'item'
31
+ | 'item_id'
32
+ | 'branch_id'
33
+ | 'branch_title'
34
+ | 'output'
35
+ | 'context_update'
36
+ | 'error'
37
+ | 'child_run_id'
38
+ | 'child_workflow_id'
39
+ | 'child_workflow_run_id';
40
+
41
+ export interface TransitionDefinition {
42
+ to: string;
43
+ guard?: JsonLogicRule;
44
+ trigger?: TransitionTrigger;
45
+ label?: string;
46
+ metadata?: ProcessDefinitionMetadata;
47
+ }
48
+
49
+ export interface BranchDefinition {
50
+ to: string;
51
+ when?: JsonLogicRule;
52
+ default?: boolean;
53
+ metadata?: ProcessDefinitionMetadata;
54
+ }
55
+
56
+ export interface BranchNodeBranchDefinition {
57
+ id: string;
58
+ title?: string;
59
+ description?: string;
60
+ node: NodeDefinition;
61
+ metadata?: ProcessDefinitionMetadata;
62
+ }
63
+
64
+ export interface HumanTaskDefinition {
65
+ title: string;
66
+ description?: string;
67
+ /**
68
+ * Who owns the task. Either a group reference (`group:<name>`) or a
69
+ * concrete user id. Leave unset to make the task available to anyone
70
+ * who can see the inbox. `role:<name>` is not supported — use
71
+ * `group:<name>` instead.
72
+ */
73
+ assignee?: string;
74
+ fields: TaskField[];
75
+ }
76
+
77
+ export interface ProcessNodeReturnsDefinition {
78
+ /**
79
+ * Path to read from the completed child process state. Use `context.foo`
80
+ * for child context values or `state.sequence` for process-state fields.
81
+ * If omitted, the child context is used as the node output.
82
+ */
83
+ from?: string;
84
+ /**
85
+ * Select specific fields from the completed child process context.
86
+ * Ignored when `from` is set.
87
+ */
88
+ context?: string[];
89
+ }
90
+
91
+ export interface ParallelCollectDefinition {
92
+ /**
93
+ * Context key that receives the collected results.
94
+ */
95
+ into: string;
96
+ mode?: ParallelCollectMode;
97
+ /**
98
+ * Fields to include in each collected item. Defaults to the operational
99
+ * envelope: status, index, item_id, output, error, and child_run_id.
100
+ */
101
+ include?: ParallelCollectField[];
102
+ }
103
+
104
+ export interface NodeDefinition {
105
+ type: ProcessNodeType;
106
+ tool?: string;
107
+ interaction?: string;
108
+ process?: string;
109
+ process_definition?: ProcessDefinitionBody;
110
+ process_version?: number;
111
+ run_type?: ProcessNodeRunType;
112
+ returns?: ProcessNodeReturnsDefinition;
113
+ /**
114
+ * Optional JSON Schema for structured output produced by interaction and
115
+ * agent nodes. When omitted, the process engine derives a schema from
116
+ * `writes` and the process context schema.
117
+ */
118
+ result_schema?: JSONSchema;
119
+ prompt?: string;
120
+ input?: Record<string, unknown>;
121
+ config?: Record<string, unknown>;
122
+ title?: string;
123
+ description?: string;
124
+ /**
125
+ * End-user-facing explanation of what this node does. Authored by the
126
+ * process designer (often an LLM) in plain language — one or two
127
+ * sentences — and rendered in run observability so a human reading the
128
+ * run can understand why this node exists without reading the config.
129
+ * Distinct from `description`, which is developer-facing.
130
+ */
131
+ human_description?: string;
132
+ writes?: string[];
133
+ skippable?: boolean;
134
+ max_retries?: number;
135
+ transitions?: TransitionDefinition[];
136
+ tools?: string[];
137
+ /**
138
+ * Model id override for this node. If unset, falls back to the process
139
+ * run's `config.model`, then to the project's default. Useful when a
140
+ * specific node needs heavier reasoning (e.g. Opus for legal flagging)
141
+ * while the rest of the process uses a cheaper default.
142
+ */
143
+ model?: string;
144
+ task?: HumanTaskDefinition;
145
+ foreach?: string;
146
+ as?: string;
147
+ item_id?: string;
148
+ node?: NodeDefinition;
149
+ max_concurrency?: number;
150
+ collect?: string | ParallelCollectDefinition;
151
+ failure_policy?: ParallelFailurePolicy;
152
+ join?: BranchJoinPolicy;
153
+ branches?: BranchDefinition[] | BranchNodeBranchDefinition[];
154
+ metadata?: ProcessDefinitionMetadata;
155
+ }
156
+
157
+ export interface ProcessContextDefinition {
158
+ schema: JSONSchema;
159
+ initial: Record<string, unknown>;
160
+ }
161
+
162
+ export interface ProcessDefinitionBody {
163
+ format_version: ProcessDefinitionFormatVersion;
164
+ process: string;
165
+ description?: string;
166
+ initial: string;
167
+ model?: string;
168
+ context: ProcessContextDefinition;
169
+ nodes: Record<string, NodeDefinition>;
170
+ metadata?: ProcessDefinitionMetadata;
171
+ }
172
+
173
+ export interface InCodeProcessDefinition {
174
+ /**
175
+ * Process identifier exposed by an app package. App-local ids are normalized
176
+ * by Studio to `app:<app-name>:<id>` when returned to callers.
177
+ */
178
+ id: string;
179
+ /** Human-readable or app-local process name. */
180
+ name: string;
181
+ title?: string;
182
+ description?: string;
183
+ tags?: string[];
184
+ definition: ProcessDefinitionBody;
185
+ }
186
+
187
+ export interface ProcessDefinitionRevisionInfo {
188
+ /** Direct parent revision id. Omitted for the first revision in a bucket. */
189
+ parent?: string;
190
+ /** Root revision id shared by all revisions of the same process definition. */
191
+ root: string;
192
+ /** True when this is the latest revision returned by default list/resolve calls. */
193
+ head: boolean;
194
+ /** Optional human-readable label for the revision. */
195
+ label?: string;
196
+ /** Optional publish note captured when a draft is promoted. */
197
+ comment?: string;
198
+ }
199
+
200
+ export interface ProcessDefinition {
201
+ id: string;
202
+ account: string;
203
+ project: string;
204
+ name: string;
205
+ description?: string;
206
+ status: ProcessDefinitionStatus;
207
+ version: number;
208
+ revision?: ProcessDefinitionRevisionInfo;
209
+ tags?: string[];
210
+ definition: ProcessDefinitionBody;
211
+ created_at: Date;
212
+ updated_at: Date;
213
+ created_by: string;
214
+ updated_by: string;
215
+ }
216
+
217
+ export interface NodeHistoryEntry {
218
+ id?: string;
219
+ node: string;
220
+ attempt?: number;
221
+ entered_at: Date | string;
222
+ exited_at?: Date | string;
223
+ status: 'running' | 'completed' | 'skipped' | 'failed' | 'cancelled';
224
+ context_diff?: Record<string, unknown>;
225
+ data_ref?: string;
226
+ sequence?: number;
227
+ child_run_id?: string;
228
+ child_workflow_id?: string;
229
+ child_workflow_run_id?: string;
230
+ }
231
+
232
+ export interface ProcessHistoryRef {
233
+ path: string;
234
+ latest_sequence: number;
235
+ count: number;
236
+ }
237
+
238
+ export interface ProcessHistoryCheckpoint {
239
+ sequence: number;
240
+ current_node: string;
241
+ written_at: Date | string;
242
+ entries: NodeHistoryEntry[];
243
+ }
244
+
245
+ export interface ProcessState {
246
+ context: Record<string, unknown>;
247
+ current_node: string;
248
+ node_history: NodeHistoryEntry[];
249
+ node_history_ref?: ProcessHistoryRef;
250
+ sequence: number;
251
+ _current_node?: string;
252
+ _previous_node?: string;
253
+ _transition_count?: number;
254
+ _node_entries?: Record<string, number>;
255
+ _node_tool_calls?: Record<string, number>;
256
+ }
257
+
258
+ export interface CreateProcessDefinitionPayload {
259
+ name: string;
260
+ description?: string;
261
+ /**
262
+ * @deprecated Process definitions are created as drafts. Use the publish endpoint
263
+ * to create immutable published versions.
264
+ */
265
+ status?: ProcessDefinitionStatus;
266
+ /**
267
+ * @deprecated Version is server-owned. Use the publish endpoint to create the next version.
268
+ */
269
+ version?: number;
270
+ tags?: string[];
271
+ definition: ProcessDefinitionBody;
272
+ }
273
+
274
+ export interface UpdateProcessDefinitionPayload {
275
+ name?: string;
276
+ description?: string;
277
+ /**
278
+ * @deprecated Status is server-owned. Use publish/archive endpoints instead of updating it directly.
279
+ */
280
+ status?: ProcessDefinitionStatus;
281
+ /**
282
+ * @deprecated Version is server-owned. Use the publish endpoint to create the next version.
283
+ */
284
+ version?: number;
285
+ tags?: string[];
286
+ definition?: ProcessDefinitionBody;
287
+ }
288
+
289
+ export interface PublishProcessDefinitionPayload {
290
+ /** Required explicit confirmation from the caller. */
291
+ confirmed: boolean;
292
+ /** Optional tags to merge into the published revision. */
293
+ tags?: string[];
294
+ /** Optional human-readable revision label. */
295
+ label?: string;
296
+ /** Optional publish note. */
297
+ comment?: string;
298
+ }
299
+
300
+ export interface RevertProcessDefinitionPayload {
301
+ /** Required explicit confirmation from the caller. */
302
+ confirmed: boolean;
303
+ /** Optional note explaining why this version is being restored as the draft. */
304
+ comment?: string;
305
+ }
@@ -4,15 +4,15 @@
4
4
  * Types for rendering content to various formats (PDF, DOCX, images)
5
5
  */
6
6
 
7
- import { ImageRenditionFormat, MarkdownRenditionFormat } from "./store.js";
8
- import { WorkflowExecutionStatus, WorkflowRunStatus } from "./workflow.js";
7
+ import type { ImageRenditionFormat, MarkdownRenditionFormat } from './store.js';
8
+ import { WorkflowExecutionStatus, type WorkflowRunStatus } from './workflow.js';
9
9
 
10
10
  // ============================================================================
11
11
  // Workflow Vars Types (Discriminated Union)
12
12
  // ============================================================================
13
13
 
14
14
  /** Base vars shared by all rendition types */
15
- interface BaseRenditionVars {
15
+ interface BaseRenditionVars extends Record<string, unknown> {
16
16
  mime_type?: string;
17
17
  /** Custom upload path — overrides the default renditions/{etag}/{name} path */
18
18
  outputPath?: string;
@@ -84,9 +84,7 @@ export interface MarkdownRenditionVars extends BaseRenditionVars {
84
84
  export type GenerateRenditionVars = ImageRenditionVars | MarkdownRenditionVars;
85
85
 
86
86
  /** Type guard for markdown rendition vars */
87
- export function isMarkdownRenditionVars(
88
- vars: GenerateRenditionVars
89
- ): vars is MarkdownRenditionVars {
87
+ export function isMarkdownRenditionVars(vars: GenerateRenditionVars): vars is MarkdownRenditionVars {
90
88
  return vars.format === 'pdf' || vars.format === 'docx';
91
89
  }
92
90
 
@@ -185,7 +183,7 @@ export interface GenerateRenditionsResult {
185
183
  */
186
184
  export interface RenderMarkdownResponse {
187
185
  /** Rendering status */
188
- status: "success";
186
+ status: 'success';
189
187
  /** Output format */
190
188
  format: MarkdownRenditionFormat;
191
189
  /** Download URL for the rendered document */
@@ -240,9 +238,11 @@ export interface RenderSlidesDeckResult {
240
238
  }
241
239
 
242
240
  export function isWorkflowTerminalStatus(status: WorkflowExecutionStatus): boolean {
243
- return status === WorkflowExecutionStatus.COMPLETED
244
- || status === WorkflowExecutionStatus.FAILED
245
- || status === WorkflowExecutionStatus.CANCELED
246
- || status === WorkflowExecutionStatus.TERMINATED
247
- || status === WorkflowExecutionStatus.TIMED_OUT;
241
+ return (
242
+ status === WorkflowExecutionStatus.COMPLETED ||
243
+ status === WorkflowExecutionStatus.FAILED ||
244
+ status === WorkflowExecutionStatus.CANCELED ||
245
+ status === WorkflowExecutionStatus.TERMINATED ||
246
+ status === WorkflowExecutionStatus.TIMED_OUT
247
+ );
248
248
  }
@@ -44,7 +44,7 @@ export interface AgentSchedule {
44
44
  timezone?: string;
45
45
 
46
46
  /** Variables to pass to the agent workflow */
47
- vars?: Record<string, any>;
47
+ vars?: Record<string, unknown>;
48
48
 
49
49
  /** Optional task queue override for the workflow */
50
50
  task_queue?: string;
@@ -97,7 +97,7 @@ export interface CreateSchedulePayload {
97
97
  timezone?: string;
98
98
 
99
99
  /** Variables to pass to the agent workflow */
100
- vars?: Record<string, any>;
100
+ vars?: Record<string, unknown>;
101
101
 
102
102
  /** Optional task queue override */
103
103
  task_queue?: string;
@@ -126,7 +126,7 @@ export interface UpdateSchedulePayload {
126
126
  timezone?: string;
127
127
 
128
128
  /** Updated variables */
129
- vars?: Record<string, any>;
129
+ vars?: Record<string, unknown>;
130
130
 
131
131
  /** Updated task queue */
132
132
  task_queue?: string;
@@ -1,6 +1,6 @@
1
1
  export interface UserInputSignal {
2
2
  message: string;
3
- metadata?: Record<string, any>;
3
+ metadata?: Record<string, unknown>;
4
4
  auth_token?: string;
5
5
  /**
6
6
  * Attachments to be processed as store objects.