@nodetool-ai/protocol 0.7.0-rc.23 → 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
@@ -0,0 +1,269 @@
1
+ /**
2
+ * @nodetool-ai/protocol – Creative production types
3
+ *
4
+ * Shared shapes for the creative-agent production spine:
5
+ * - Direction layer: a {@link Screenplay} of {@link Shot}s, the typed artifact
6
+ * a Director agent produces from a brief and the storyboard/timeline consume.
7
+ * - Entities ("ingredients"): reusable {@link Entity} objects (character,
8
+ * location, style, prop) that carry reference images / voice / LoRA and are
9
+ * injected into generation across shots for consistency.
10
+ * - Cost governance: {@link WorkflowCostEstimate} for the plan-before-spend
11
+ * view.
12
+ *
13
+ * These are transport/storage shapes only — no runtime behavior. Nodes emit
14
+ * screenplays and shots as `dict` / `list[dict]` values; the interfaces give
15
+ * web, agents, and nodes one contract to share.
16
+ */
17
+ import { z } from "zod";
18
+ import { ENTITY_METADATA_KEY } from "./style-presets.js";
19
+ /** The kinds an entity marker may declare. Anything else is not an entity. */
20
+ export const ENTITY_KINDS = new Set([
21
+ "character",
22
+ "location",
23
+ "style",
24
+ "prop"
25
+ ]);
26
+ /**
27
+ * The stored marker, parsed. Each field falls back rather than failing the
28
+ * whole read: a marker whose `name` went missing is still an entity with a
29
+ * blank name, and the library shows it instead of losing it. `kind` is the one
30
+ * field with no fallback — it is what makes the asset an entity at all.
31
+ */
32
+ const entityMarkerSchema = z.object({
33
+ kind: z.enum(["character", "location", "style", "prop"]),
34
+ name: z.string().catch(""),
35
+ descriptor: z.string().catch(""),
36
+ description: z.string().optional().catch(undefined),
37
+ voice_id: z.string().nullable().optional().catch(null),
38
+ // A stray non-string entry loses itself, not the whole list: a marker with
39
+ // one bad tag still has its good ones, and dropping them all would take a
40
+ // label off the library for a typo in the one beside it.
41
+ tags: z
42
+ .array(z.unknown())
43
+ .transform((items) => items.flatMap((item) => {
44
+ const tag = z.string().safeParse(item);
45
+ return tag.success ? [tag.data] : [];
46
+ }))
47
+ .optional()
48
+ .catch(undefined),
49
+ lora: z
50
+ .object({
51
+ url: z.string().optional(),
52
+ asset_id: z.string().nullable().optional(),
53
+ scale: z.number().optional()
54
+ })
55
+ .nullable()
56
+ .optional()
57
+ .catch(null),
58
+ palette: z
59
+ .array(z.object({ name: z.string().optional(), hex: z.string() }))
60
+ .nullable()
61
+ .optional()
62
+ .catch(null),
63
+ reference_asset_id: z.string().optional().catch(undefined),
64
+ source: z
65
+ .object({
66
+ workflow_id: z.string().optional(),
67
+ key: z.string().optional()
68
+ })
69
+ .optional()
70
+ .catch(undefined)
71
+ });
72
+ /**
73
+ * Read the entity marker off an asset's metadata, or null when it carries
74
+ * none. An unknown `kind` reads as no marker: an asset with a malformed one is
75
+ * not an entity, and every surface that lists the library agrees on that.
76
+ *
77
+ * Shared because three of them ask — the agent capabilities, the project
78
+ * rollup, and the browser's library — and a marker that reads as an entity in
79
+ * one place and not in another is the library disagreeing with itself.
80
+ */
81
+ export function readEntityMarker(metadata) {
82
+ const parsed = entityMarkerSchema.safeParse(metadata?.[ENTITY_METADATA_KEY]);
83
+ if (!parsed.success)
84
+ return null;
85
+ const marker = {
86
+ kind: parsed.data.kind,
87
+ name: parsed.data.name,
88
+ descriptor: parsed.data.descriptor,
89
+ voice_id: parsed.data.voice_id ?? null,
90
+ lora: parsed.data.lora ?? null,
91
+ palette: parsed.data.palette ?? null
92
+ };
93
+ if (parsed.data.description !== undefined) {
94
+ marker.description = parsed.data.description;
95
+ }
96
+ if (parsed.data.tags !== undefined) {
97
+ marker.tags = parsed.data.tags;
98
+ }
99
+ const swapped = parsed.data.reference_asset_id?.trim();
100
+ if (swapped) {
101
+ marker.reference_asset_id = swapped;
102
+ }
103
+ if (parsed.data.source !== undefined) {
104
+ marker.source = parsed.data.source;
105
+ }
106
+ return marker;
107
+ }
108
+ export function isEntity(value) {
109
+ return (!!value &&
110
+ typeof value === "object" &&
111
+ value.type === "entity");
112
+ }
113
+ /**
114
+ * Paste entity descriptors into a prompt, the mechanism that holds a character
115
+ * or a look steady across shots.
116
+ *
117
+ * An entity applies when its id is in `entityIds` (an explicit selection), or —
118
+ * with no ids given — when its name appears in the text. Empty text means every
119
+ * entity applies, which is what the pickers rely on when seasoning a prompt the
120
+ * user has not written yet.
121
+ *
122
+ * Pure and shared: the browser's `ui_entity_apply` tool, the `apply_entities`
123
+ * capability and the Director node all season a prompt through this, so what a
124
+ * model sees does not depend on which surface asked.
125
+ */
126
+ export function injectEntities(text, entities, entityIds) {
127
+ const base = text ?? "";
128
+ const lower = base.toLowerCase();
129
+ const empty = base.trim().length === 0;
130
+ const explicit = entityIds && entityIds.length > 0 ? new Set(entityIds) : null;
131
+ const lines = [];
132
+ const referenceAssetIds = [];
133
+ const applied = [];
134
+ const seen = new Set();
135
+ for (const entity of entities) {
136
+ const descriptor = (entity.descriptor ?? "").trim();
137
+ if (!descriptor) {
138
+ continue;
139
+ }
140
+ const name = (entity.name ?? "").trim();
141
+ const matches = explicit
142
+ ? explicit.has(entity.id)
143
+ : empty || (name.length > 0 && lower.includes(name.toLowerCase()));
144
+ if (!matches) {
145
+ continue;
146
+ }
147
+ const key = `${name}: ${descriptor}`;
148
+ if (seen.has(key)) {
149
+ continue;
150
+ }
151
+ seen.add(key);
152
+ applied.push(entity);
153
+ lines.push(name ? `- ${name}: ${descriptor}` : `- ${descriptor}`);
154
+ for (const image of entity.reference_images ?? []) {
155
+ if (image.asset_id) {
156
+ referenceAssetIds.push(image.asset_id);
157
+ }
158
+ }
159
+ }
160
+ return {
161
+ prompt: lines.length > 0
162
+ ? `${base}\n\nConsistency references:\n${lines.join("\n")}`
163
+ : base,
164
+ referenceAssetIds,
165
+ applied
166
+ };
167
+ }
168
+ /**
169
+ * Field-by-field equality of two render records, ignoring `recorded_at` — a
170
+ * timestamp is not an input, and every re-render would otherwise read as
171
+ * different.
172
+ */
173
+ export function renderInputsMatch(a, b) {
174
+ return (a.kind === b.kind &&
175
+ a.prompt_hash === b.prompt_hash &&
176
+ a.model === b.model &&
177
+ a.aspect_ratio === b.aspect_ratio &&
178
+ a.style_entity_id === b.style_entity_id &&
179
+ JSON.stringify(a.reference_asset_ids ?? []) ===
180
+ JSON.stringify(b.reference_asset_ids ?? []) &&
181
+ a.render_mode === b.render_mode &&
182
+ a.source_version_id === b.source_version_id);
183
+ }
184
+ /** A shot's coverage, or null when it renders its own picture. */
185
+ export const shotCoverage = (shot) => shot.covered_by ?? null;
186
+ /** A shot's render mode, with the default applied. */
187
+ export const shotRenderMode = (shot) => shot.render_mode === "direct" || shot.render_mode === "reference"
188
+ ? shot.render_mode
189
+ : "keyframe";
190
+ /** The provider tasks a board's clip model must support for its shot modes. */
191
+ export function requiredVideoTasksForShots(shots) {
192
+ const tasks = new Set();
193
+ for (const shot of shots) {
194
+ if (shot.covered_by) {
195
+ continue;
196
+ }
197
+ const mode = shotRenderMode(shot);
198
+ tasks.add(mode === "reference"
199
+ ? "reference_to_video"
200
+ : mode === "direct"
201
+ ? "text_to_video"
202
+ : "image_to_video");
203
+ }
204
+ return [...tasks];
205
+ }
206
+ export function isScreenplay(value) {
207
+ return (!!value &&
208
+ typeof value === "object" &&
209
+ value.type === "screenplay" &&
210
+ Array.isArray(value.shots));
211
+ }
212
+ /**
213
+ * The board entities that apply to `shot`.
214
+ *
215
+ * A shot with an explicit `entity_ids` override uses exactly that selection
216
+ * (an empty array means "none" — the user removed them all). Otherwise the
217
+ * default rule: styles and locations shape every shot, while characters and
218
+ * props apply when their name appears in the shot's text (action, motion,
219
+ * dialogue, narration, or slug), so a cast member only seasons the shots they
220
+ * are actually in.
221
+ *
222
+ * Pure, and shared: the editor's generation path and the server-side
223
+ * storyboard render tools season prompts with the same set.
224
+ */
225
+ export function entitiesForShot(shot, boardEntities) {
226
+ if (shot.entity_ids) {
227
+ const chosen = new Set(shot.entity_ids);
228
+ return boardEntities.filter((e) => chosen.has(e.id));
229
+ }
230
+ const text = [shot.action, shot.motion, shot.dialogue, shot.narration, shot.slug]
231
+ .filter((part) => !!part)
232
+ .join("\n")
233
+ .toLowerCase();
234
+ return boardEntities.filter((entity) => {
235
+ if (entity.kind === "style" || entity.kind === "location") {
236
+ return true;
237
+ }
238
+ const name = entity.name.trim().toLowerCase();
239
+ return name.length > 0 && text.includes(name);
240
+ });
241
+ }
242
+ /**
243
+ * The board's cast, widened to hold every entity its shots reference.
244
+ *
245
+ * A shot's `entity_ids` is a selection out of the board's cast:
246
+ * {@link entitiesForShot} filters the board's entities by it, so an id cast on
247
+ * a shot but never on the board resolves to nothing — the chip is on the shot,
248
+ * the entity is not in the board's library, and the prompt is not seasoned with
249
+ * it. Agents writing shots hit this routinely. Reconciling on read keeps the
250
+ * two in step: board cast first, in order, then each shot's unseen ids in shot
251
+ * order.
252
+ *
253
+ * Returns `entityIds` itself when nothing is missing, so a caller can compare
254
+ * by identity and skip a write.
255
+ */
256
+ export function boardEntityIdsWithShots(entityIds, shots) {
257
+ const seen = new Set(entityIds);
258
+ const added = [];
259
+ for (const shot of shots) {
260
+ for (const id of shot.entity_ids ?? []) {
261
+ if (!seen.has(id)) {
262
+ seen.add(id);
263
+ added.push(id);
264
+ }
265
+ }
266
+ }
267
+ return added.length === 0 ? entityIds : [...entityIds, ...added];
268
+ }
269
+ //# sourceMappingURL=creative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creative.js","sourceRoot":"","sources":["../src/creative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAyDzD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAa;IACnE,WAAW;IACX,UAAU;IACV,OAAO;IACP,MAAM;CACP,CAAC,CAAC;AA2BH;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACxD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;IACnD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IACtD,2EAA2E;IAC3E,0EAA0E;IAC1E,yDAAyD;IACzD,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAClB,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CACnB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,MAAM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,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBAClB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACb,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * User-defined OpenAI-compatible providers: a name, a base URL and an optional
3
+ * API key instead of a provider file and a `PROVIDER_IDS` entry.
4
+ *
5
+ * The wire id is `custom_<slug>`, which lands on model objects, spans and saved
6
+ * graphs. Base URL and key resolve per user through the ordinary secret store
7
+ * under the names below, so the same environment variables configure a provider
8
+ * on a server with no database writes:
9
+ *
10
+ * CUSTOM_MYPROXY_BASE_URL=https://proxy.example.com/v1
11
+ * CUSTOM_MYPROXY_API_KEY=sk-…
12
+ */
13
+ /** Prefix that marks a provider id as user-defined. */
14
+ export declare const CUSTOM_PROVIDER_PREFIX = "custom_";
15
+ /** Setting key holding the JSON catalog of custom provider definitions. */
16
+ export declare const CUSTOM_PROVIDERS_SETTING_KEY = "CUSTOM_OPENAI_PROVIDERS";
17
+ export interface CustomProvider {
18
+ /** Slug — unique per user, stable once created. */
19
+ slug: string;
20
+ /** Display name shown in the model menu and settings. */
21
+ name: string;
22
+ /**
23
+ * Model ids to offer instead of calling `GET <base_url>/models`. Empty means
24
+ * "ask the endpoint", which is what most OpenAI-compatible proxies support.
25
+ */
26
+ models?: string[];
27
+ /**
28
+ * Model ids to offer as image models (`POST <base_url>/images/generations`).
29
+ * Adds to what the endpoint's listing is detected to serve, for ids the
30
+ * detection misses.
31
+ */
32
+ image_models?: string[];
33
+ /**
34
+ * Model ids to offer as video models (`POST <base_url>/videos`). Adds to
35
+ * what the endpoint's listing is detected to serve.
36
+ */
37
+ video_models?: string[];
38
+ }
39
+ /** Wire provider id for a slug (`"myproxy"` → `"custom_myproxy"`). */
40
+ export declare function customProviderId(slug: string): string;
41
+ /** True when `providerId` names a user-defined provider. */
42
+ export declare function isCustomProviderId(providerId: string): boolean;
43
+ /** Secret key holding the endpoint URL for a slug. */
44
+ export declare function customProviderBaseUrlKey(slug: string): string;
45
+ /** Secret key holding the API key for a slug. */
46
+ export declare function customProviderApiKeyKey(slug: string): string;
47
+ /**
48
+ * Derive a slug from a display name. Non-alphanumerics collapse to `_`, and a
49
+ * name that starts with a digit gets a `p` in front so the result still parses
50
+ * as an identifier. Returns `""` when nothing usable survives — callers ask the
51
+ * user for a slug rather than inventing one.
52
+ */
53
+ export declare function slugifyProviderName(name: string): string;
54
+ /** Reason `slug` is unusable, or null when it is fine. */
55
+ export declare function customProviderSlugError(slug: string): string | null;
56
+ /**
57
+ * Reason `url` is unusable as an OpenAI-compatible base URL, or null when it is
58
+ * fine. Only the shape is checked here — whether the endpoint answers is the
59
+ * connection test's job.
60
+ */
61
+ export declare function customProviderBaseUrlError(url: string): string | null;
62
+ /** Drop the trailing slashes an endpoint URL must not carry. */
63
+ export declare function normalizeBaseUrl(url: string): string;
64
+ /**
65
+ * Read a stored catalog. The row is plaintext and hand-editable, so every shape
66
+ * that is not a usable definition is dropped rather than thrown on — one bad
67
+ * entry must not cost the user every other provider they configured.
68
+ */
69
+ export declare function parseCustomProviderCatalog(raw: string): CustomProvider[];
70
+ //# sourceMappingURL=custom-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-providers.d.ts","sourceRoot":"","sources":["../src/custom-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,uDAAuD;AACvD,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAEhD,2EAA2E;AAC3E,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAKtE,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,sDAAsD;AACtD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,iDAAiD;AACjD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQxD;AAED,0DAA0D;AAC1D,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYrE;AAED,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOpD;AAMD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,EAAE,CAsBxE"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * User-defined OpenAI-compatible providers: a name, a base URL and an optional
3
+ * API key instead of a provider file and a `PROVIDER_IDS` entry.
4
+ *
5
+ * The wire id is `custom_<slug>`, which lands on model objects, spans and saved
6
+ * graphs. Base URL and key resolve per user through the ordinary secret store
7
+ * under the names below, so the same environment variables configure a provider
8
+ * on a server with no database writes:
9
+ *
10
+ * CUSTOM_MYPROXY_BASE_URL=https://proxy.example.com/v1
11
+ * CUSTOM_MYPROXY_API_KEY=sk-…
12
+ */
13
+ import { isNonEmptyString, isRecord, isString } from "./predicates.js";
14
+ /** Prefix that marks a provider id as user-defined. */
15
+ export const CUSTOM_PROVIDER_PREFIX = "custom_";
16
+ /** Setting key holding the JSON catalog of custom provider definitions. */
17
+ export const CUSTOM_PROVIDERS_SETTING_KEY = "CUSTOM_OPENAI_PROVIDERS";
18
+ /** A slug is lowercase alphanumeric with underscores, and starts with a letter. */
19
+ const SLUG_PATTERN = /^[a-z][a-z0-9_]{0,31}$/;
20
+ /** Wire provider id for a slug (`"myproxy"` → `"custom_myproxy"`). */
21
+ export function customProviderId(slug) {
22
+ return `${CUSTOM_PROVIDER_PREFIX}${slug}`;
23
+ }
24
+ /** True when `providerId` names a user-defined provider. */
25
+ export function isCustomProviderId(providerId) {
26
+ return providerId.startsWith(CUSTOM_PROVIDER_PREFIX);
27
+ }
28
+ /** Secret key holding the endpoint URL for a slug. */
29
+ export function customProviderBaseUrlKey(slug) {
30
+ return `CUSTOM_${slug.toUpperCase()}_BASE_URL`;
31
+ }
32
+ /** Secret key holding the API key for a slug. */
33
+ export function customProviderApiKeyKey(slug) {
34
+ return `CUSTOM_${slug.toUpperCase()}_API_KEY`;
35
+ }
36
+ /**
37
+ * Derive a slug from a display name. Non-alphanumerics collapse to `_`, and a
38
+ * name that starts with a digit gets a `p` in front so the result still parses
39
+ * as an identifier. Returns `""` when nothing usable survives — callers ask the
40
+ * user for a slug rather than inventing one.
41
+ */
42
+ export function slugifyProviderName(name) {
43
+ const collapsed = name
44
+ .toLowerCase()
45
+ .replace(/[^a-z0-9]+/g, "_")
46
+ .replace(/^_+|_+$/g, "");
47
+ if (!collapsed)
48
+ return "";
49
+ const prefixed = /^[0-9]/.test(collapsed) ? `p${collapsed}` : collapsed;
50
+ return prefixed.slice(0, 32);
51
+ }
52
+ /** Reason `slug` is unusable, or null when it is fine. */
53
+ export function customProviderSlugError(slug) {
54
+ if (!slug)
55
+ return "A slug is required.";
56
+ if (!SLUG_PATTERN.test(slug)) {
57
+ return "Use 1–32 characters: a leading letter, then lowercase letters, digits or underscores.";
58
+ }
59
+ return null;
60
+ }
61
+ /**
62
+ * Reason `url` is unusable as an OpenAI-compatible base URL, or null when it is
63
+ * fine. Only the shape is checked here — whether the endpoint answers is the
64
+ * connection test's job.
65
+ */
66
+ export function customProviderBaseUrlError(url) {
67
+ if (!url.trim())
68
+ return "A base URL is required.";
69
+ let parsed;
70
+ try {
71
+ parsed = new URL(url.trim());
72
+ }
73
+ catch {
74
+ return "Enter a full URL, e.g. https://proxy.example.com/v1";
75
+ }
76
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
77
+ return "The URL must be http or https.";
78
+ }
79
+ return null;
80
+ }
81
+ /** Drop the trailing slashes an endpoint URL must not carry. */
82
+ export function normalizeBaseUrl(url) {
83
+ const trimmed = url.trim();
84
+ let end = trimmed.length;
85
+ while (end > 0 && trimmed[end - 1] === "/") {
86
+ end -= 1;
87
+ }
88
+ return trimmed.slice(0, end);
89
+ }
90
+ function stringList(value) {
91
+ return Array.isArray(value) ? value.filter(isString) : [];
92
+ }
93
+ /**
94
+ * Read a stored catalog. The row is plaintext and hand-editable, so every shape
95
+ * that is not a usable definition is dropped rather than thrown on — one bad
96
+ * entry must not cost the user every other provider they configured.
97
+ */
98
+ export function parseCustomProviderCatalog(raw) {
99
+ let parsed;
100
+ try {
101
+ parsed = JSON.parse(raw);
102
+ }
103
+ catch {
104
+ return [];
105
+ }
106
+ if (!Array.isArray(parsed))
107
+ return [];
108
+ return parsed.flatMap((entry) => {
109
+ if (!isRecord(entry))
110
+ return [];
111
+ const { slug, name, models, image_models, video_models } = entry;
112
+ if (!isString(slug) || customProviderSlugError(slug))
113
+ return [];
114
+ return [
115
+ {
116
+ slug,
117
+ name: isNonEmptyString(name) ? name : slug,
118
+ models: stringList(models),
119
+ image_models: stringList(image_models),
120
+ video_models: stringList(video_models)
121
+ }
122
+ ];
123
+ });
124
+ }
125
+ //# sourceMappingURL=custom-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-providers.js","sourceRoot":"","sources":["../src/custom-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEvE,uDAAuD;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAEhD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,4BAA4B,GAAG,yBAAyB,CAAC;AAEtE,mFAAmF;AACnF,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAyB9C,sEAAsE;AACtE,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,GAAG,sBAAsB,GAAG,IAAI,EAAE,CAAC;AAC5C,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,kBAAkB,CAAC,UAAkB;IACnD,OAAO,UAAU,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;AACvD,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,OAAO,UAAU,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC;AACjD,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,UAAU,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,MAAM,SAAS,GAAG,IAAI;SACnB,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC3B,IAAI,CAAC,SAAS;QAAE,OA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document write was made with.
3
+ *
4
+ * The headless `ui_*` bridges record the ops they replay and attach them to the
5
+ * document mutation (`meta.ops`); the model observer broadcasts them on the
6
+ * `resource_change` message so a dirty editor can merge the external change
7
+ * per merge unit instead of treating the whole document as replaced.
8
+ */
9
+ export interface DocumentOp {
10
+ /** The `ui_*` tool name the edit was made with, e.g. `update_shot`. */
11
+ tool: string;
12
+ /** The input the tool was called with. */
13
+ input: unknown;
14
+ }
15
+ //# sourceMappingURL=document-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-ops.d.ts","sourceRoot":"","sources":["../src/document-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,KAAK,EAAE,OAAO,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=document-ops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-ops.js","sourceRoot":"","sources":["../src/document-ops.ts"],"names":[],"mappings":""}