@nodetool-ai/protocol 0.7.0-rc.22 → 0.8.1

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 (419) hide show
  1. package/README.md +56 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/ai-video-production.d.ts +249 -0
  4. package/dist/ai-video-production.d.ts.map +1 -0
  5. package/dist/ai-video-production.js +131 -0
  6. package/dist/ai-video-production.js.map +1 -0
  7. package/dist/api-schemas/agent-access.d.ts +134 -0
  8. package/dist/api-schemas/agent-access.d.ts.map +1 -0
  9. package/dist/api-schemas/agent-access.js +93 -0
  10. package/dist/api-schemas/agent-access.js.map +1 -0
  11. package/dist/api-schemas/api-error-code.d.ts +11 -1
  12. package/dist/api-schemas/api-error-code.d.ts.map +1 -1
  13. package/dist/api-schemas/api-error-code.js +10 -0
  14. package/dist/api-schemas/api-error-code.js.map +1 -1
  15. package/dist/api-schemas/applications.d.ts +1411 -0
  16. package/dist/api-schemas/applications.d.ts.map +1 -0
  17. package/dist/api-schemas/applications.js +333 -0
  18. package/dist/api-schemas/applications.js.map +1 -0
  19. package/dist/api-schemas/assets.d.ts +230 -0
  20. package/dist/api-schemas/assets.d.ts.map +1 -1
  21. package/dist/api-schemas/assets.js +131 -5
  22. package/dist/api-schemas/assets.js.map +1 -1
  23. package/dist/api-schemas/code-gen.d.ts +176 -0
  24. package/dist/api-schemas/code-gen.d.ts.map +1 -0
  25. package/dist/api-schemas/code-gen.js +205 -0
  26. package/dist/api-schemas/code-gen.js.map +1 -0
  27. package/dist/api-schemas/collections.d.ts.map +1 -1
  28. package/dist/api-schemas/collections.js +3 -4
  29. package/dist/api-schemas/collections.js.map +1 -1
  30. package/dist/api-schemas/costs.d.ts +179 -0
  31. package/dist/api-schemas/costs.d.ts.map +1 -1
  32. package/dist/api-schemas/costs.js +100 -4
  33. package/dist/api-schemas/costs.js.map +1 -1
  34. package/dist/api-schemas/credits.d.ts +42 -0
  35. package/dist/api-schemas/credits.d.ts.map +1 -0
  36. package/dist/api-schemas/credits.js +43 -0
  37. package/dist/api-schemas/credits.js.map +1 -0
  38. package/dist/api-schemas/documents.d.ts +163 -0
  39. package/dist/api-schemas/documents.d.ts.map +1 -0
  40. package/dist/api-schemas/documents.js +75 -0
  41. package/dist/api-schemas/documents.js.map +1 -0
  42. package/dist/api-schemas/files.d.ts +13 -0
  43. package/dist/api-schemas/files.d.ts.map +1 -1
  44. package/dist/api-schemas/files.js +8 -0
  45. package/dist/api-schemas/files.js.map +1 -1
  46. package/dist/api-schemas/fonts.d.ts +17 -1
  47. package/dist/api-schemas/fonts.d.ts.map +1 -1
  48. package/dist/api-schemas/fonts.js +19 -3
  49. package/dist/api-schemas/fonts.js.map +1 -1
  50. package/dist/api-schemas/index.d.ts +23 -1
  51. package/dist/api-schemas/index.d.ts.map +1 -1
  52. package/dist/api-schemas/index.js +23 -1
  53. package/dist/api-schemas/index.js.map +1 -1
  54. package/dist/api-schemas/jobs.d.ts +12 -0
  55. package/dist/api-schemas/jobs.d.ts.map +1 -1
  56. package/dist/api-schemas/jobs.js +12 -2
  57. package/dist/api-schemas/jobs.js.map +1 -1
  58. package/dist/api-schemas/js-scripts.d.ts +364 -0
  59. package/dist/api-schemas/js-scripts.d.ts.map +1 -0
  60. package/dist/api-schemas/js-scripts.js +333 -0
  61. package/dist/api-schemas/js-scripts.js.map +1 -0
  62. package/dist/api-schemas/mcp-config.d.ts.map +1 -1
  63. package/dist/api-schemas/mcp-config.js +3 -1
  64. package/dist/api-schemas/mcp-config.js.map +1 -1
  65. package/dist/api-schemas/memories.d.ts +84 -0
  66. package/dist/api-schemas/memories.d.ts.map +1 -0
  67. package/dist/api-schemas/memories.js +54 -0
  68. package/dist/api-schemas/memories.js.map +1 -0
  69. package/dist/api-schemas/messages.d.ts +1 -0
  70. package/dist/api-schemas/messages.d.ts.map +1 -1
  71. package/dist/api-schemas/messages.js +4 -4
  72. package/dist/api-schemas/messages.js.map +1 -1
  73. package/dist/api-schemas/models.d.ts +156 -0
  74. package/dist/api-schemas/models.d.ts.map +1 -1
  75. package/dist/api-schemas/models.js +51 -6
  76. package/dist/api-schemas/models.js.map +1 -1
  77. package/dist/api-schemas/nodes.d.ts +97 -0
  78. package/dist/api-schemas/nodes.d.ts.map +1 -1
  79. package/dist/api-schemas/nodes.js +89 -0
  80. package/dist/api-schemas/nodes.js.map +1 -1
  81. package/dist/api-schemas/projects.d.ts +427 -0
  82. package/dist/api-schemas/projects.d.ts.map +1 -0
  83. package/dist/api-schemas/projects.js +224 -0
  84. package/dist/api-schemas/projects.js.map +1 -0
  85. package/dist/api-schemas/recipes.d.ts +172 -0
  86. package/dist/api-schemas/recipes.d.ts.map +1 -0
  87. package/dist/api-schemas/recipes.js +144 -0
  88. package/dist/api-schemas/recipes.js.map +1 -0
  89. package/dist/api-schemas/resources.d.ts +112 -0
  90. package/dist/api-schemas/resources.d.ts.map +1 -0
  91. package/dist/api-schemas/resources.js +44 -0
  92. package/dist/api-schemas/resources.js.map +1 -0
  93. package/dist/api-schemas/scripts.d.ts +1571 -0
  94. package/dist/api-schemas/scripts.d.ts.map +1 -0
  95. package/dist/api-schemas/scripts.js +153 -0
  96. package/dist/api-schemas/scripts.js.map +1 -0
  97. package/dist/api-schemas/sdk-execution-v1.d.ts +467 -0
  98. package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -0
  99. package/dist/api-schemas/sdk-execution-v1.js +115 -0
  100. package/dist/api-schemas/sdk-execution-v1.js.map +1 -0
  101. package/dist/api-schemas/sdk-lifecycle-v1.d.ts +217 -0
  102. package/dist/api-schemas/sdk-lifecycle-v1.d.ts.map +1 -0
  103. package/dist/api-schemas/sdk-lifecycle-v1.js +117 -0
  104. package/dist/api-schemas/sdk-lifecycle-v1.js.map +1 -0
  105. package/dist/api-schemas/sdk-models-v1.d.ts +181 -0
  106. package/dist/api-schemas/sdk-models-v1.d.ts.map +1 -0
  107. package/dist/api-schemas/sdk-models-v1.js +108 -0
  108. package/dist/api-schemas/sdk-models-v1.js.map +1 -0
  109. package/dist/api-schemas/sdk-v1-http-operations.d.ts +941 -0
  110. package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -0
  111. package/dist/api-schemas/sdk-v1-http-operations.js +465 -0
  112. package/dist/api-schemas/sdk-v1-http-operations.js.map +1 -0
  113. package/dist/api-schemas/sdk-v1-operations.d.ts +151 -0
  114. package/dist/api-schemas/sdk-v1-operations.d.ts.map +1 -0
  115. package/dist/api-schemas/sdk-v1-operations.js +97 -0
  116. package/dist/api-schemas/sdk-v1-operations.js.map +1 -0
  117. package/dist/api-schemas/sdk-v1-websocket-operations.d.ts +97 -0
  118. package/dist/api-schemas/sdk-v1-websocket-operations.d.ts.map +1 -0
  119. package/dist/api-schemas/sdk-v1-websocket-operations.js +96 -0
  120. package/dist/api-schemas/sdk-v1-websocket-operations.js.map +1 -0
  121. package/dist/api-schemas/sdk-v1.d.ts +15 -0
  122. package/dist/api-schemas/sdk-v1.d.ts.map +1 -0
  123. package/dist/api-schemas/sdk-v1.js +22 -0
  124. package/dist/api-schemas/sdk-v1.js.map +1 -0
  125. package/dist/api-schemas/segmentation.d.ts +75 -0
  126. package/dist/api-schemas/segmentation.d.ts.map +1 -0
  127. package/dist/api-schemas/segmentation.js +54 -0
  128. package/dist/api-schemas/segmentation.js.map +1 -0
  129. package/dist/api-schemas/settings.d.ts +159 -0
  130. package/dist/api-schemas/settings.d.ts.map +1 -1
  131. package/dist/api-schemas/settings.js +70 -0
  132. package/dist/api-schemas/settings.js.map +1 -1
  133. package/dist/api-schemas/sketch.d.ts +847 -0
  134. package/dist/api-schemas/sketch.d.ts.map +1 -0
  135. package/dist/api-schemas/sketch.js +544 -0
  136. package/dist/api-schemas/sketch.js.map +1 -0
  137. package/dist/api-schemas/skills.d.ts +27 -14
  138. package/dist/api-schemas/skills.d.ts.map +1 -1
  139. package/dist/api-schemas/skills.js +64 -11
  140. package/dist/api-schemas/skills.js.map +1 -1
  141. package/dist/api-schemas/storage.d.ts +8 -0
  142. package/dist/api-schemas/storage.d.ts.map +1 -1
  143. package/dist/api-schemas/storage.js +7 -0
  144. package/dist/api-schemas/storage.js.map +1 -1
  145. package/dist/api-schemas/storyboards.d.ts +7026 -0
  146. package/dist/api-schemas/storyboards.d.ts.map +1 -0
  147. package/dist/api-schemas/storyboards.js +393 -0
  148. package/dist/api-schemas/storyboards.js.map +1 -0
  149. package/dist/api-schemas/threads.d.ts +12 -4
  150. package/dist/api-schemas/threads.d.ts.map +1 -1
  151. package/dist/api-schemas/threads.js +12 -4
  152. package/dist/api-schemas/threads.js.map +1 -1
  153. package/dist/api-schemas/timeline-tool-contracts.d.ts +1650 -0
  154. package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -0
  155. package/dist/api-schemas/timeline-tool-contracts.js +725 -0
  156. package/dist/api-schemas/timeline-tool-contracts.js.map +1 -0
  157. package/dist/api-schemas/timeline-tool-params.d.ts +1237 -0
  158. package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -0
  159. package/dist/api-schemas/timeline-tool-params.js +1518 -0
  160. package/dist/api-schemas/timeline-tool-params.js.map +1 -0
  161. package/dist/api-schemas/timeline.d.ts +12803 -0
  162. package/dist/api-schemas/timeline.d.ts.map +1 -0
  163. package/dist/api-schemas/timeline.js +1838 -0
  164. package/dist/api-schemas/timeline.js.map +1 -0
  165. package/dist/api-schemas/ui-tool-contract.d.ts +35 -0
  166. package/dist/api-schemas/ui-tool-contract.d.ts.map +1 -0
  167. package/dist/api-schemas/ui-tool-contract.js +31 -0
  168. package/dist/api-schemas/ui-tool-contract.js.map +1 -0
  169. package/dist/api-schemas/workflows.d.ts +852 -18
  170. package/dist/api-schemas/workflows.d.ts.map +1 -1
  171. package/dist/api-schemas/workflows.js +484 -6
  172. package/dist/api-schemas/workflows.js.map +1 -1
  173. package/dist/api-schemas/workspace.d.ts +45 -0
  174. package/dist/api-schemas/workspace.d.ts.map +1 -1
  175. package/dist/api-schemas/workspace.js +47 -1
  176. package/dist/api-schemas/workspace.js.map +1 -1
  177. package/dist/api-types.d.ts +621 -27
  178. package/dist/api-types.d.ts.map +1 -1
  179. package/dist/api-types.js +246 -1
  180. package/dist/api-types.js.map +1 -1
  181. package/dist/app-deployment.d.ts +37 -0
  182. package/dist/app-deployment.d.ts.map +1 -0
  183. package/dist/app-deployment.js +42 -0
  184. package/dist/app-deployment.js.map +1 -0
  185. package/dist/asset-generation.d.ts +58 -0
  186. package/dist/asset-generation.d.ts.map +1 -0
  187. package/dist/asset-generation.js +147 -0
  188. package/dist/asset-generation.js.map +1 -0
  189. package/dist/blend-modes.d.ts +20 -0
  190. package/dist/blend-modes.d.ts.map +1 -0
  191. package/dist/blend-modes.js +33 -0
  192. package/dist/blend-modes.js.map +1 -0
  193. package/dist/bridge-frames.d.ts +654 -0
  194. package/dist/bridge-frames.d.ts.map +1 -0
  195. package/dist/bridge-frames.js +448 -0
  196. package/dist/bridge-frames.js.map +1 -0
  197. package/dist/bridge-frames.schema.json +862 -0
  198. package/dist/bridge-protocol.d.ts +57 -20
  199. package/dist/bridge-protocol.d.ts.map +1 -1
  200. package/dist/bridge-protocol.js +57 -20
  201. package/dist/bridge-protocol.js.map +1 -1
  202. package/dist/builtin-packs.d.ts +45 -0
  203. package/dist/builtin-packs.d.ts.map +1 -0
  204. package/dist/builtin-packs.js +115 -0
  205. package/dist/builtin-packs.js.map +1 -0
  206. package/dist/caption-word.d.ts +15 -0
  207. package/dist/caption-word.d.ts.map +1 -0
  208. package/dist/caption-word.js +10 -0
  209. package/dist/caption-word.js.map +1 -0
  210. package/dist/cloud-profile.d.ts +187 -0
  211. package/dist/cloud-profile.d.ts.map +1 -0
  212. package/dist/cloud-profile.js +281 -0
  213. package/dist/cloud-profile.js.map +1 -0
  214. package/dist/creative.d.ts +486 -0
  215. package/dist/creative.d.ts.map +1 -0
  216. package/dist/creative.js +269 -0
  217. package/dist/creative.js.map +1 -0
  218. package/dist/custom-providers.d.ts +70 -0
  219. package/dist/custom-providers.d.ts.map +1 -0
  220. package/dist/custom-providers.js +125 -0
  221. package/dist/custom-providers.js.map +1 -0
  222. package/dist/document-ops.d.ts +15 -0
  223. package/dist/document-ops.d.ts.map +1 -0
  224. package/dist/document-ops.js +2 -0
  225. package/dist/document-ops.js.map +1 -0
  226. package/dist/game-assets.d.ts +344 -0
  227. package/dist/game-assets.d.ts.map +1 -0
  228. package/dist/game-assets.js +297 -0
  229. package/dist/game-assets.js.map +1 -0
  230. package/dist/game-design.d.ts +90 -0
  231. package/dist/game-design.d.ts.map +1 -0
  232. package/dist/game-design.js +417 -0
  233. package/dist/game-design.js.map +1 -0
  234. package/dist/game-flow-prompt.d.ts +68 -0
  235. package/dist/game-flow-prompt.d.ts.map +1 -0
  236. package/dist/game-flow-prompt.js +121 -0
  237. package/dist/game-flow-prompt.js.map +1 -0
  238. package/dist/game-graph.d.ts +96 -0
  239. package/dist/game-graph.d.ts.map +1 -0
  240. package/dist/game-graph.js +481 -0
  241. package/dist/game-graph.js.map +1 -0
  242. package/dist/game-migration.d.ts +4 -0
  243. package/dist/game-migration.d.ts.map +1 -0
  244. package/dist/game-migration.js +6 -0
  245. package/dist/game-migration.js.map +1 -0
  246. package/dist/game-slot-prompt.d.ts +90 -0
  247. package/dist/game-slot-prompt.d.ts.map +1 -0
  248. package/dist/game-slot-prompt.js +237 -0
  249. package/dist/game-slot-prompt.js.map +1 -0
  250. package/dist/game.d.ts +1663 -0
  251. package/dist/game.d.ts.map +1 -0
  252. package/dist/game.js +228 -0
  253. package/dist/game.js.map +1 -0
  254. package/dist/graph.d.ts +191 -5
  255. package/dist/graph.d.ts.map +1 -1
  256. package/dist/graph.js +497 -0
  257. package/dist/graph.js.map +1 -1
  258. package/dist/index.d.ts +47 -2
  259. package/dist/index.d.ts.map +1 -1
  260. package/dist/index.js +46 -2
  261. package/dist/index.js.map +1 -1
  262. package/dist/loop.d.ts +38 -0
  263. package/dist/loop.d.ts.map +1 -0
  264. package/dist/loop.js +69 -0
  265. package/dist/loop.js.map +1 -0
  266. package/dist/mcp-server-config.d.ts +113 -0
  267. package/dist/mcp-server-config.d.ts.map +1 -0
  268. package/dist/mcp-server-config.js +147 -0
  269. package/dist/mcp-server-config.js.map +1 -0
  270. package/dist/messages.d.ts +1565 -243
  271. package/dist/messages.d.ts.map +1 -1
  272. package/dist/messages.js +709 -22
  273. package/dist/messages.js.map +1 -1
  274. package/dist/model-selection.d.ts +20 -0
  275. package/dist/model-selection.d.ts.map +1 -0
  276. package/dist/model-selection.js +27 -0
  277. package/dist/model-selection.js.map +1 -0
  278. package/dist/nodetool-models.d.ts +71 -0
  279. package/dist/nodetool-models.d.ts.map +1 -0
  280. package/dist/nodetool-models.js +138 -0
  281. package/dist/nodetool-models.js.map +1 -0
  282. package/dist/package-assets.d.ts +39 -0
  283. package/dist/package-assets.d.ts.map +1 -0
  284. package/dist/package-assets.js +63 -0
  285. package/dist/package-assets.js.map +1 -0
  286. package/dist/platform.d.ts +66 -0
  287. package/dist/platform.d.ts.map +1 -0
  288. package/dist/platform.js +68 -0
  289. package/dist/platform.js.map +1 -0
  290. package/dist/predicates.d.ts +43 -0
  291. package/dist/predicates.d.ts.map +1 -0
  292. package/dist/predicates.js +65 -0
  293. package/dist/predicates.js.map +1 -0
  294. package/dist/processing-messages.schema.json +2525 -0
  295. package/dist/production-authoring.d.ts +757 -0
  296. package/dist/production-authoring.d.ts.map +1 -0
  297. package/dist/production-authoring.js +736 -0
  298. package/dist/production-authoring.js.map +1 -0
  299. package/dist/render-record.d.ts +86 -0
  300. package/dist/render-record.d.ts.map +1 -0
  301. package/dist/render-record.js +133 -0
  302. package/dist/render-record.js.map +1 -0
  303. package/dist/resource-id.d.ts +22 -0
  304. package/dist/resource-id.d.ts.map +1 -0
  305. package/dist/resource-id.js +32 -0
  306. package/dist/resource-id.js.map +1 -0
  307. package/dist/resource-uri.d.ts +15 -0
  308. package/dist/resource-uri.d.ts.map +1 -0
  309. package/dist/resource-uri.js +88 -0
  310. package/dist/resource-uri.js.map +1 -0
  311. package/dist/sandbox-capability.d.ts +86 -0
  312. package/dist/sandbox-capability.d.ts.map +1 -0
  313. package/dist/sandbox-capability.js +106 -0
  314. package/dist/sandbox-capability.js.map +1 -0
  315. package/dist/sandbox-host.d.ts +98 -0
  316. package/dist/sandbox-host.d.ts.map +1 -0
  317. package/dist/sandbox-host.js +311 -0
  318. package/dist/sandbox-host.js.map +1 -0
  319. package/dist/sandbox-package.d.ts +674 -0
  320. package/dist/sandbox-package.d.ts.map +1 -0
  321. package/dist/sandbox-package.js +622 -0
  322. package/dist/sandbox-package.js.map +1 -0
  323. package/dist/sandbox-wasm.d.ts +84 -0
  324. package/dist/sandbox-wasm.d.ts.map +1 -0
  325. package/dist/sandbox-wasm.js +139 -0
  326. package/dist/sandbox-wasm.js.map +1 -0
  327. package/dist/screenplay-authoring.d.ts +69 -0
  328. package/dist/screenplay-authoring.d.ts.map +1 -0
  329. package/dist/screenplay-authoring.js +351 -0
  330. package/dist/screenplay-authoring.js.map +1 -0
  331. package/dist/script-authoring.d.ts +161 -0
  332. package/dist/script-authoring.d.ts.map +1 -0
  333. package/dist/script-authoring.js +503 -0
  334. package/dist/script-authoring.js.map +1 -0
  335. package/dist/script-fill.d.ts +39 -0
  336. package/dist/script-fill.d.ts.map +1 -0
  337. package/dist/script-fill.js +67 -0
  338. package/dist/script-fill.js.map +1 -0
  339. package/dist/script-link.d.ts +110 -0
  340. package/dist/script-link.d.ts.map +1 -0
  341. package/dist/script-link.js +252 -0
  342. package/dist/script-link.js.map +1 -0
  343. package/dist/sha256.d.ts +11 -0
  344. package/dist/sha256.d.ts.map +1 -0
  345. package/dist/sha256.js +110 -0
  346. package/dist/sha256.js.map +1 -0
  347. package/dist/shot-prompt.d.ts +78 -0
  348. package/dist/shot-prompt.d.ts.map +1 -0
  349. package/dist/shot-prompt.js +120 -0
  350. package/dist/shot-prompt.js.map +1 -0
  351. package/dist/skill-document.d.ts +36 -0
  352. package/dist/skill-document.d.ts.map +1 -0
  353. package/dist/skill-document.js +137 -0
  354. package/dist/skill-document.js.map +1 -0
  355. package/dist/style-presets.d.ts +73 -0
  356. package/dist/style-presets.d.ts.map +1 -0
  357. package/dist/style-presets.js +147 -0
  358. package/dist/style-presets.js.map +1 -0
  359. package/dist/supervisor.d.ts +227 -0
  360. package/dist/supervisor.d.ts.map +1 -0
  361. package/dist/supervisor.js +116 -0
  362. package/dist/supervisor.js.map +1 -0
  363. package/dist/token-providers.d.ts +31 -0
  364. package/dist/token-providers.d.ts.map +1 -0
  365. package/dist/token-providers.js +52 -0
  366. package/dist/token-providers.js.map +1 -0
  367. package/dist/toolSchemas.d.ts +10 -14
  368. package/dist/toolSchemas.d.ts.map +1 -1
  369. package/dist/toolSchemas.js +13 -23
  370. package/dist/toolSchemas.js.map +1 -1
  371. package/dist/triggers.d.ts +41 -0
  372. package/dist/triggers.d.ts.map +1 -0
  373. package/dist/triggers.js +50 -0
  374. package/dist/triggers.js.map +1 -0
  375. package/dist/trpc-policy.d.ts +3 -0
  376. package/dist/trpc-policy.d.ts.map +1 -0
  377. package/dist/trpc-policy.js +3 -0
  378. package/dist/trpc-policy.js.map +1 -0
  379. package/dist/type-metadata.d.ts +5 -0
  380. package/dist/type-metadata.d.ts.map +1 -1
  381. package/dist/type-metadata.js +17 -8
  382. package/dist/type-metadata.js.map +1 -1
  383. package/dist/typecheck.d.ts.map +1 -1
  384. package/dist/typecheck.js +5 -4
  385. package/dist/typecheck.js.map +1 -1
  386. package/dist/wasm-binary.d.ts +61 -0
  387. package/dist/wasm-binary.d.ts.map +1 -0
  388. package/dist/wasm-binary.js +215 -0
  389. package/dist/wasm-binary.js.map +1 -0
  390. package/dist/workflow-plan.d.ts +197 -0
  391. package/dist/workflow-plan.d.ts.map +1 -0
  392. package/dist/workflow-plan.js +438 -0
  393. package/dist/workflow-plan.js.map +1 -0
  394. package/dist/wrap-primitives.d.ts +0 -11
  395. package/dist/wrap-primitives.d.ts.map +1 -1
  396. package/dist/wrap-primitives.js +3 -9
  397. package/dist/wrap-primitives.js.map +1 -1
  398. package/dist/ws-commands.d.ts +665 -0
  399. package/dist/ws-commands.d.ts.map +1 -0
  400. package/dist/ws-commands.js +610 -0
  401. package/dist/ws-commands.js.map +1 -0
  402. package/dist/zod-schema.d.ts +20 -0
  403. package/dist/zod-schema.d.ts.map +1 -0
  404. package/dist/zod-schema.js +298 -0
  405. package/dist/zod-schema.js.map +1 -0
  406. package/package.json +84 -7
  407. package/schema/sdk-v1.asyncapi.implemented.json +65 -0
  408. package/schema/sdk-v1.asyncapi.json +65 -0
  409. package/schema/sdk-v1.discovery.schema.json +1218 -0
  410. package/schema/sdk-v1.execution.schema.json +2792 -0
  411. package/schema/sdk-v1.lifecycle.schema.json +1031 -0
  412. package/schema/sdk-v1.manifest.json +71 -0
  413. package/schema/sdk-v1.openapi.implemented.json +730 -0
  414. package/schema/sdk-v1.openapi.json +730 -0
  415. package/schema/sdk-v1.operations.json +732 -0
  416. package/dist/agent-protocol.d.ts +0 -217
  417. package/dist/agent-protocol.d.ts.map +0 -1
  418. package/dist/agent-protocol.js +0 -85
  419. package/dist/agent-protocol.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/api-schemas/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,SAAS;;;;;;;;;iBAWN,CAAC;AAEjB,eAAO,MAAM,SAAS;;;;;;;;iBAUN,CAAC;AAEjB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;iBAGhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAK1C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAErB,CAAC;AACjB,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAGjE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAezB"}
@@ -1,10 +1,74 @@
1
1
  import { z } from "zod";
2
+ import { isRecord } from "../predicates.js";
3
+ // ── WorkflowRunMode ──────────────────────────────────────────────────────────
4
+ /**
5
+ * All recognised run_mode values for a workflow row.
6
+ *
7
+ * Standalone modes (appear in regular workflow listings):
8
+ * "workflow" | null — standard workflows (null is legacy, treated as "workflow")
9
+ * "chat" — chat-oriented workflows
10
+ * "app" — HTML mini-app workflows
11
+ * "tool" — workflow exposed as an agent tool
12
+ *
13
+ * Embedded modes (excluded from standalone listings):
14
+ * "clip" — timeline clip (cloned from a standalone workflow)
15
+ * "layer" — image-editor layer workflow
16
+ * "image" — image-editor root workflow
17
+ */
18
+ export const workflowRunModes = [
19
+ "workflow",
20
+ "chat",
21
+ "app",
22
+ "tool",
23
+ "clip",
24
+ "layer",
25
+ "image"
26
+ ];
27
+ export const workflowRunModeSchema = z.enum(workflowRunModes);
28
+ /**
29
+ * Run modes that appear in standalone workflow listings.
30
+ * Standalone listings use `run_mode IN ("workflow", null)` by default;
31
+ * explicit filters may include "chat", "app", or "tool".
32
+ */
33
+ export const STANDALONE_RUN_MODES = [
34
+ "workflow",
35
+ "chat",
36
+ "app",
37
+ "tool"
38
+ ];
39
+ /**
40
+ * Run modes that are embedded/non-standalone — always excluded from
41
+ * regular workflow listings.
42
+ */
43
+ export const EMBEDDED_RUN_MODES = [
44
+ "clip",
45
+ "layer",
46
+ "image"
47
+ ];
2
48
  // ── Graph shapes ─────────────────────────────────────────────────────────────
3
49
  // Validate the required fields of Node/Edge while allowing extra properties
4
50
  // to pass through (matches the `[key: string]: unknown` index signatures on
5
51
  // `Node` and `Edge` in api-types.ts / graph.ts). This rejects malformed input
6
52
  // (strings, nulls, objects missing `id`/`type`) at the tRPC boundary while
7
53
  // remaining permissive about unknown fields added by clients or Python.
54
+ // A single dynamic output's type metadata. Mirrors PropertyTypeMetadata in
55
+ // api-types.ts: it must be an object carrying at least a `type` string, and
56
+ // nests recursively through `type_args`. Validating this shape (instead of
57
+ // z.unknown()) rejects malformed metadata — primitives, null, or entries
58
+ // missing a type — at the tRPC boundary, while .passthrough() tolerates the
59
+ // extra transport fields clients/Python may add.
60
+ export const dynamicOutputTypeMetadata = z.lazy(() => z
61
+ .object({
62
+ type: z.string(),
63
+ optional: z.boolean().optional(),
64
+ values: z
65
+ .array(z.union([z.string(), z.number()]))
66
+ .nullable()
67
+ .optional(),
68
+ type_args: z.array(dynamicOutputTypeMetadata).optional(),
69
+ type_name: z.string().nullable().optional()
70
+ })
71
+ .passthrough());
8
72
  export const graphNode = z
9
73
  .object({
10
74
  id: z.string(),
@@ -13,8 +77,7 @@ export const graphNode = z
13
77
  data: z.unknown().optional(),
14
78
  ui_properties: z.unknown().optional(),
15
79
  dynamic_properties: z.record(z.string(), z.unknown()).optional(),
16
- dynamic_outputs: z.record(z.string(), z.unknown()).optional(),
17
- sync_mode: z.string().optional()
80
+ dynamic_outputs: z.record(z.string(), dynamicOutputTypeMetadata).optional()
18
81
  })
19
82
  .passthrough();
20
83
  export const graphEdge = z
@@ -36,6 +99,8 @@ export const graph = z.object({
36
99
  // Mirrors toWorkflowResponse() in http-api.ts
37
100
  export const workflowResponse = z.object({
38
101
  id: z.string(),
102
+ /** Project ownership. Optional for clients during the rollout. */
103
+ project_id: z.string().optional(),
39
104
  access: z.string(),
40
105
  created_at: z.string().nullable().optional(),
41
106
  updated_at: z.string().nullable().optional(),
@@ -56,12 +121,93 @@ export const workflowResponse = z.object({
56
121
  required_providers: z.unknown().nullable(),
57
122
  required_models: z.unknown().nullable(),
58
123
  html_app: z.string().nullable(),
124
+ app_doc: z.record(z.string(), z.unknown()).nullable().optional(),
59
125
  etag: z.string().nullable()
60
126
  });
127
+ // ── SDK workflow interface v1 ──────────────────────────────────────────────
128
+ export const workflowInterfaceType = dynamicOutputTypeMetadata;
129
+ export const workflowInterfaceDiagnostic = z.object({
130
+ severity: z.enum(["warning", "error"]),
131
+ code: z.string(),
132
+ message: z.string(),
133
+ node_id: z.string().optional(),
134
+ pin_name: z.string().optional()
135
+ });
136
+ const workflowInterfacePin = z.object({
137
+ node_id: z.string(),
138
+ name: z.string(),
139
+ description: z.string(),
140
+ type: workflowInterfaceType
141
+ });
142
+ export const workflowInterfaceInputPin = workflowInterfacePin.extend({
143
+ required: z.boolean(),
144
+ default: z.json(),
145
+ min: z.number().optional(),
146
+ max: z.number().optional()
147
+ });
148
+ export const workflowInterfaceOutputPin = workflowInterfacePin.extend({
149
+ stream: z.boolean()
150
+ });
151
+ export const workflowInterfaceV1 = z.object({
152
+ version: z.literal(1),
153
+ workflow_id: z.string(),
154
+ etag: z.string().nullable(),
155
+ source: z.literal("server"),
156
+ inputs: z.array(workflowInterfaceInputPin),
157
+ outputs: z.array(workflowInterfaceOutputPin),
158
+ diagnostics: z.array(workflowInterfaceDiagnostic)
159
+ });
160
+ export const workflowInterfaceInput = z.object({
161
+ id: z.string().min(1),
162
+ version: z.literal(1)
163
+ });
164
+ export const workflowInterfacesInput = z.object({
165
+ ids: z
166
+ .array(z.string().min(1))
167
+ .min(1)
168
+ .max(100)
169
+ .refine((ids) => new Set(ids).size === ids.length, {
170
+ message: "Workflow ids must be unique"
171
+ }),
172
+ version: z.literal(1)
173
+ });
174
+ export const workflowInterfaceError = z.object({
175
+ workflow_id: z.string(),
176
+ code: z.enum(["workflow_not_found", "invalid_graph"]),
177
+ message: z.string()
178
+ });
179
+ export const workflowInterfacesOutput = z.object({
180
+ interfaces: z.array(workflowInterfaceV1),
181
+ errors: z.array(workflowInterfaceError)
182
+ });
183
+ export const sdkWorkflowSummariesInput = z.object({
184
+ limit: z.number().int().min(1).max(100).default(50),
185
+ cursor: z.string().optional()
186
+ });
187
+ export const sdkWorkflowSummary = z.object({
188
+ id: z.string(),
189
+ name: z.string(),
190
+ description: z.string(),
191
+ revision: z.string(),
192
+ /**
193
+ * Revision of the node registry used to derive workflow interfaces. A
194
+ * client must refresh a cached interface when either this value or the
195
+ * workflow revision changes.
196
+ */
197
+ registry_revision: z.number().int().nonnegative().nullable(),
198
+ run_mode: z.string().nullable()
199
+ });
200
+ export const sdkWorkflowSummariesOutput = z.object({
201
+ workflows: z.array(sdkWorkflowSummary),
202
+ next: z.string().nullable()
203
+ });
61
204
  // ── list (GET /api/workflows) ─────────────────────────────────────────────────
62
205
  export const listInput = z.object({
63
206
  limit: z.number().int().min(1).default(100),
64
207
  run_mode: z.string().optional(),
208
+ mediaOutput: z.boolean().optional(),
209
+ tag: z.string().optional(),
210
+ project_id: z.string().optional(),
65
211
  cursor: z.string().optional()
66
212
  });
67
213
  export const listOutput = z.object({
@@ -77,6 +223,7 @@ export const getInput = z.object({
77
223
  // ── Workflow body for create/update ──────────────────────────────────────────
78
224
  export const workflowBody = z.object({
79
225
  name: z.string().min(1),
226
+ project_id: z.string().optional(),
80
227
  tool_name: z.string().nullable().optional(),
81
228
  package_name: z.string().nullable().optional(),
82
229
  path: z.string().nullable().optional(),
@@ -95,17 +242,20 @@ export const workflowBody = z.object({
95
242
  settings: z.record(z.string(), z.unknown()).nullable().optional(),
96
243
  run_mode: z.string().nullable().optional(),
97
244
  workspace_id: z.string().nullable().optional(),
98
- html_app: z.string().nullable().optional()
245
+ html_app: z.string().nullable().optional(),
246
+ app_doc: z.record(z.string(), z.unknown()).nullable().optional()
99
247
  });
100
248
  // ── create (POST /api/workflows) ─────────────────────────────────────────────
101
249
  export const createInput = workflowBody.extend({
250
+ project_id: z.string().default("default"),
102
251
  // Optional query params for example-seeding
103
252
  from_example_package: z.string().optional(),
104
253
  from_example_name: z.string().optional()
105
254
  });
106
255
  // ── update (PUT /api/workflows/:id) ──────────────────────────────────────────
107
256
  export const updateInput = workflowBody.extend({
108
- id: z.string().min(1)
257
+ id: z.string().min(1),
258
+ expected_updated_at: z.string().optional()
109
259
  });
110
260
  // ── delete (DELETE /api/workflows/:id) ───────────────────────────────────────
111
261
  export const deleteInput = z.object({
@@ -140,7 +290,8 @@ export const autosaveInput = z.object({
140
290
  save_type: z.string().optional(),
141
291
  client_id: z.string().optional(),
142
292
  force: z.boolean().optional(),
143
- max_versions: z.number().int().optional()
293
+ max_versions: z.number().int().optional(),
294
+ expected_updated_at: z.string().optional()
144
295
  });
145
296
  const versionInfo = z.object({
146
297
  id: z.string(),
@@ -152,7 +303,8 @@ const versionInfo = z.object({
152
303
  export const autosaveOutput = z.object({
153
304
  version: versionInfo.nullable(),
154
305
  message: z.string(),
155
- skipped: z.boolean()
306
+ skipped: z.boolean(),
307
+ updated_at: z.string().nullable()
156
308
  });
157
309
  // ── tools (GET /api/workflows/tools) ─────────────────────────────────────────
158
310
  export const toolsInput = z.object({
@@ -245,4 +397,330 @@ export const versionDeleteInput = z.object({
245
397
  version_id: z.string().min(1)
246
398
  });
247
399
  export const versionDeleteOutput = z.object({ ok: z.literal(true) });
400
+ // ── terminalOutputs (GET /api/workflows/:id/terminal-outputs) ────────────────
401
+ // Lists the terminal media-output nodes of a workflow.
402
+ // Used by AddClipMenu to prompt the user when a workflow has multiple outputs.
403
+ export const terminalOutputsInput = z.object({
404
+ id: z.string().min(1)
405
+ });
406
+ export const terminalOutputItem = z.object({
407
+ /** Node id in the workflow graph. */
408
+ id: z.string(),
409
+ /** Full node type string, e.g. "nodetool.output.ImageOutput". */
410
+ type: z.string(),
411
+ /** Resolved media type. */
412
+ mediaType: z.enum(["image", "video", "audio"]),
413
+ /** Human-readable node name from its `data.name` property (may be empty). */
414
+ name: z.string()
415
+ });
416
+ export const terminalOutputsOutput = z.object({
417
+ outputs: z.array(terminalOutputItem)
418
+ });
419
+ // ── sharing ──────────────────────────────────────────────────────────────────
420
+ // Private sharing: the owner mints role-scoped share links; any authenticated
421
+ // user who redeems one becomes a collaborator ("viewer" opens and runs,
422
+ // "editor" also modifies). See packages/models workflow-collaborator/share.
423
+ export const collaboratorRoleSchema = z.enum(["viewer", "editor"]);
424
+ export const collaboratorItem = z.object({
425
+ workflow_id: z.string(),
426
+ user_id: z.string(),
427
+ role: collaboratorRoleSchema,
428
+ invited_by: z.string(),
429
+ created_at: z.string().nullable().optional()
430
+ });
431
+ export const shareItem = z.object({
432
+ id: z.string(),
433
+ workflow_id: z.string(),
434
+ token: z.string(),
435
+ role: collaboratorRoleSchema,
436
+ created_at: z.string().nullable().optional(),
437
+ revoked_at: z.string().nullable().optional()
438
+ });
439
+ export const sharingGetInput = z.object({ id: z.string().min(1) });
440
+ export const sharingGetOutput = z.object({
441
+ collaborators: z.array(collaboratorItem),
442
+ shares: z.array(shareItem)
443
+ });
444
+ export const sharingCreateLinkInput = z.object({
445
+ id: z.string().min(1),
446
+ role: collaboratorRoleSchema
447
+ });
448
+ export const sharingRevokeLinkInput = z.object({
449
+ id: z.string().min(1),
450
+ share_id: z.string().min(1)
451
+ });
452
+ export const sharingSetRoleInput = z.object({
453
+ id: z.string().min(1),
454
+ user_id: z.string().min(1),
455
+ role: collaboratorRoleSchema
456
+ });
457
+ export const sharingRemoveCollaboratorInput = z.object({
458
+ id: z.string().min(1),
459
+ user_id: z.string().min(1)
460
+ });
461
+ export const sharingOkOutput = z.object({ ok: z.literal(true) });
462
+ export const sharingAcceptInput = z.object({ token: z.string().min(1) });
463
+ export const sharingAcceptOutput = z.object({
464
+ workflow: workflowResponse,
465
+ role: collaboratorRoleSchema
466
+ });
467
+ export const myRoleInput = z.object({ id: z.string().min(1) });
468
+ export const myRoleOutput = z.object({
469
+ role: z.enum(["owner", "editor", "viewer"]).nullable()
470
+ });
471
+ export const sharedWithMeInput = z.object({
472
+ limit: z.number().int().min(1).max(200).default(100)
473
+ });
474
+ export const sharedWorkflowItem = workflowResponse.extend({
475
+ shared_role: collaboratorRoleSchema
476
+ });
477
+ export const sharedWithMeOutput = z.object({
478
+ workflows: z.array(sharedWorkflowItem)
479
+ });
480
+ // ── Guided setup (PRD § 11.5) ────────────────────────────────────────────────
481
+ // The Workflow creation flow keeps its state on the workflow it produces, under
482
+ // `settings.setup`. One optional field on an existing bag: a workflow saved
483
+ // before the flow existed has no `setup` key, parses fine, and opens as the
484
+ // editor it always did.
485
+ /** Where a workflow sits in the guided setup. One built before it reads "done". */
486
+ export const workflowSetupStage = z.enum([
487
+ "idea",
488
+ "category",
489
+ "review",
490
+ "setup",
491
+ "done"
492
+ ]);
493
+ /** How the finished workflow is meant to be run (PRD § 11.3). */
494
+ export const workflowSetupRunMode = z.enum(["manual", "app", "trigger"]);
495
+ export const workflowPlanInput = z
496
+ .object({
497
+ name: z.string(),
498
+ type: z.string(),
499
+ /** Prefilled sample the test run uses. Editable on the setup step. */
500
+ sample: z.unknown().optional()
501
+ })
502
+ .passthrough();
503
+ export const workflowPlanStep = z
504
+ .object({
505
+ id: z.string(),
506
+ title: z.string(),
507
+ summary: z.string(),
508
+ /**
509
+ * The registry node type this step maps to, or null when the planner could
510
+ * not name one. Null blocks step 3 rather than the build (D23): a step the
511
+ * plan cannot name never reaches `ui_add_node`.
512
+ */
513
+ node_type: z.string().nullable(),
514
+ /** "language" | "image" | "video" | "audio" — the model tile row it needs. */
515
+ model_role: z.string().optional()
516
+ })
517
+ .passthrough();
518
+ export const workflowPlanOutput = z
519
+ .object({ name: z.string(), type: z.string() })
520
+ .passthrough();
521
+ export const workflowSetupPlan = z
522
+ .object({
523
+ inputs: z.array(workflowPlanInput).default([]),
524
+ steps: z.array(workflowPlanStep).default([]),
525
+ outputs: z.array(workflowPlanOutput).default([])
526
+ })
527
+ .passthrough();
528
+ /**
529
+ * The model that writes the plan. Kept on the workflow rather than in the
530
+ * flow's own state so a reload plans with the model the creator picked — the
531
+ * default is whichever model the provider list returns first, and that one can
532
+ * be out of quota or retired.
533
+ */
534
+ export const workflowSetupPlannerModel = z
535
+ .object({ provider: z.string(), id: z.string() })
536
+ .passthrough();
537
+ export const workflowSetup = z
538
+ .object({
539
+ stage: workflowSetupStage.default("done"),
540
+ brief: z.string().default(""),
541
+ category: z.string().optional(),
542
+ plan: workflowSetupPlan.optional(),
543
+ planner_model: workflowSetupPlannerModel.optional(),
544
+ run_mode: workflowSetupRunMode.optional()
545
+ })
546
+ .passthrough();
547
+ /**
548
+ * A workflow's `settings` bag, with the one field this flow owns. Additive and
549
+ * permissive on purpose: `settings` is a client-owned record shared with
550
+ * `hide_ui` and whatever else a surface put there, so anything but `setup`
551
+ * travels untouched.
552
+ */
553
+ export const workflowSettingsWithSetup = z
554
+ .object({ setup: workflowSetup.optional() })
555
+ .passthrough();
556
+ /**
557
+ * Read `settings.setup` off a workflow's settings bag.
558
+ *
559
+ * Returns null both for a workflow that never went through the flow and for one
560
+ * whose `setup` is malformed — the flow then does not open, which is the same
561
+ * thing the creator sees today. Callers get a stage or nothing, never a
562
+ * half-parsed plan.
563
+ */
564
+ export function readWorkflowSetup(settings) {
565
+ const parsed = workflowSettingsWithSetup.safeParse(settings ?? {});
566
+ return parsed.success ? (parsed.data.setup ?? null) : null;
567
+ }
568
+ /**
569
+ * Merge a patch into `settings.setup` and hand back the whole settings bag.
570
+ * The flow writes one field at a time (the brief as it is typed, then the
571
+ * category, then the plan), and every write has to leave the rest of the bag —
572
+ * and the rest of `setup` — alone.
573
+ */
574
+ export function writeWorkflowSetup(settings, patch) {
575
+ const parsed = workflowSettingsWithSetup.safeParse(settings ?? {});
576
+ // Keep the caller's own keys even when `setup` does not parse. A `setup` a
577
+ // newer client or an agent wrote — a stage outside this build's enum, say —
578
+ // fails the parse, and starting from `{}` would drop every sibling setting
579
+ // (`hide_ui` and the rest) on the next write. Only `setup` is replaced.
580
+ const base = parsed.success
581
+ ? { ...parsed.data }
582
+ : isRecord(settings)
583
+ ? { ...settings }
584
+ : {};
585
+ const current = parsed.success ? (parsed.data.setup ?? null) : null;
586
+ base["setup"] = workflowSetup.parse({
587
+ stage: "idea",
588
+ brief: "",
589
+ ...(current ?? {}),
590
+ ...patch
591
+ });
592
+ return base;
593
+ }
594
+ // ── Guided game setup (game-prd § 5.1) ───────────────────────────────────────
595
+ // The Game flow's document is a workflow too (D25), so its state is a second
596
+ // optional bag beside `settings.setup`. A workflow saved before this flow
597
+ // existed has no `game` key, parses fine, and opens as the editor it always
598
+ // did — and a workflow that went through the Workflow flow keeps its `setup`
599
+ // untouched when the Game flow writes.
600
+ /** Where a workflow sits in the guided game setup. One built before it reads "done". */
601
+ export const gameSetupStage = z.enum([
602
+ "idea",
603
+ "template",
604
+ "review",
605
+ "look",
606
+ "done"
607
+ ]);
608
+ /** One playable or enemy character, bound to the spritesheet slot it fills. */
609
+ export const gameCastMember = z
610
+ .object({
611
+ /** The spritesheet slot this character fills. */
612
+ slot_id: z.string(),
613
+ name: z.string(),
614
+ /** Silhouette, colours, proportions; no pose — the slot prompt sets that. */
615
+ descriptor: z.string()
616
+ })
617
+ .passthrough();
618
+ export const gameEnemy = z
619
+ .object({
620
+ slot_id: z.string(),
621
+ name: z.string(),
622
+ behaviour: z.string()
623
+ })
624
+ .passthrough();
625
+ /**
626
+ * The subject half of one slot's prompt. Style words, pixel size and sheet
627
+ * boilerplate are added by `gameSlotPrompt`, never stored here.
628
+ */
629
+ export const gameSlotPrompt = z
630
+ .object({
631
+ slot_id: z.string(),
632
+ prompt: z.string()
633
+ })
634
+ .passthrough();
635
+ export const gameDesign = z
636
+ .object({
637
+ title: z.string(),
638
+ premise: z.string(),
639
+ core_loop: z.string(),
640
+ player_verbs: z.array(z.string()).default([]),
641
+ enemies: z.array(gameEnemy).default([]),
642
+ level: z.string(),
643
+ win: z.string(),
644
+ lose: z.string(),
645
+ cast: z.array(gameCastMember).default([]),
646
+ slot_prompts: z.array(gameSlotPrompt).default([])
647
+ })
648
+ .passthrough();
649
+ /**
650
+ * The model that writes the design. Kept on the workflow for the same reason
651
+ * the Workflow flow keeps its planner model: a reload designs with the model
652
+ * the creator picked, not with whatever the provider list returns first.
653
+ */
654
+ export const gameSetupModel = z
655
+ .object({ provider: z.string(), id: z.string() })
656
+ .passthrough();
657
+ export const gameSetup = z
658
+ .object({
659
+ stage: gameSetupStage.default("done"),
660
+ brief: z.string().default(""),
661
+ /** Native manifest template id. */
662
+ template: z.string().optional(),
663
+ /** Built-in game that receives staged assets from this workflow. */
664
+ game_id: z.string().optional(),
665
+ designer_model: gameSetupModel.optional(),
666
+ design: gameDesign.optional(),
667
+ /**
668
+ * What the stored design was written from, so the template step can tell
669
+ * "keep it" from "re-design". `${template}\n${brief}`, written by
670
+ * `designSourceOf`.
671
+ */
672
+ design_source: z.string().optional(),
673
+ style_entity_id: z.string().optional(),
674
+ /** `${provider}:${id}` tile id of the text-to-image model. */
675
+ image_model: z.string().optional(),
676
+ /** Registry node type of the sound-effect generator, absent for placeholders. */
677
+ sfx_node_type: z.string().optional(),
678
+ /** Tile id of the music model, absent for placeholders. */
679
+ music_model: z.string().optional(),
680
+ project_name: z.string().optional()
681
+ })
682
+ .passthrough();
683
+ /**
684
+ * A workflow's `settings` bag with the one field the Game flow owns. Same
685
+ * additive, permissive shape as {@link workflowSettingsWithSetup}: `hide_ui`,
686
+ * `setup` and whatever else a surface put there travel untouched.
687
+ */
688
+ export const workflowSettingsWithGame = z
689
+ .object({ game: gameSetup.optional() })
690
+ .passthrough();
691
+ /**
692
+ * Read `settings.game` off a workflow's settings bag.
693
+ *
694
+ * Null both for a workflow that never went through the flow and for one whose
695
+ * `game` is malformed — the flow then does not open, which is what a creator
696
+ * sees today. Callers get a stage or nothing, never a half-parsed design.
697
+ */
698
+ export function readGameSetup(settings) {
699
+ const parsed = workflowSettingsWithGame.safeParse(settings ?? {});
700
+ return parsed.success ? (parsed.data.game ?? null) : null;
701
+ }
702
+ /**
703
+ * Merge a patch into `settings.game` and hand back the whole settings bag.
704
+ *
705
+ * As with `writeWorkflowSetup`, the caller's own keys survive even when `game`
706
+ * does not parse — a `game` a newer client wrote fails this build's parse, and
707
+ * starting from `{}` would drop `hide_ui`, `setup` and every other sibling on
708
+ * the next write. Only `game` is replaced.
709
+ */
710
+ export function writeGameSetup(settings, patch) {
711
+ const parsed = workflowSettingsWithGame.safeParse(settings ?? {});
712
+ const base = parsed.success
713
+ ? { ...parsed.data }
714
+ : isRecord(settings)
715
+ ? { ...settings }
716
+ : {};
717
+ const current = parsed.success ? (parsed.data.game ?? null) : null;
718
+ base["game"] = gameSetup.parse({
719
+ stage: "idea",
720
+ brief: "",
721
+ ...(current ?? {}),
722
+ ...patch
723
+ });
724
+ return base;
725
+ }
248
726
  //# sourceMappingURL=workflows.js.map