@nocha/cli 4.6.1 → 4.13.0

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 (250) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/NOCHA.schema.json +1670 -3
  3. package/dist/build-info.json +4 -4
  4. package/dist/dev-offline-compiler.js +682 -7
  5. package/dist/dev-offline-runner.js +48 -6
  6. package/dist/development-live-host.js +13 -1
  7. package/dist/nocha.js +804 -60
  8. package/dist/reference-integrity.json +135 -101
  9. package/dist/references/api/README.md +24 -23
  10. package/dist/references/api/signatures.md +23 -2
  11. package/dist/references/base/server/tooling/sdk-sources.ts +2 -2
  12. package/dist/references/base/src/platform/failure.ts +1 -1
  13. package/dist/references/base/src/types/nocha/assets-media.d.ts +8 -0
  14. package/dist/references/base/src/types/nocha/assets-operations.d.ts +3 -0
  15. package/dist/references/base/src/types/nocha/capability-deadlines.d.ts +6 -0
  16. package/dist/references/base/src/types/nocha/capability-needs.d.ts +7 -0
  17. package/dist/references/base/src/types/nocha/capability-operations.d.ts +3 -1
  18. package/dist/references/base/src/types/nocha/drive-operations.d.ts +56 -0
  19. package/dist/references/base/src/types/nocha/drive-types.d.ts +77 -0
  20. package/dist/references/base/src/types/nocha/drive.d.ts +54 -0
  21. package/dist/references/base/src/types/nocha/error-codes.d.ts +9 -0
  22. package/dist/references/base/src/types/nocha/execution.d.ts +1 -1
  23. package/dist/references/base/src/types/nocha/index.d.ts +4 -0
  24. package/dist/references/base/src/types/nocha/media-read.d.ts +29 -0
  25. package/dist/references/base/src/types/nocha/operation-waiting.d.ts +8 -0
  26. package/dist/references/base/src/types/nocha/operation-wire-types.d.ts +30 -2
  27. package/dist/references/base/src/types/nocha/protocol.d.ts +7 -3
  28. package/dist/references/base/src/types/nocha/types/ai-wire.d.ts +40 -1
  29. package/dist/references/base/src/types/nocha/types/ai.d.ts +1 -1
  30. package/dist/references/base/src/types/nocha/types/assets-wire.d.ts +9 -1
  31. package/dist/references/base/src/types/nocha/types/assets.d.ts +22 -5
  32. package/dist/references/base/src/types/nocha/types/video-sdk-wire.d.ts +174 -13
  33. package/dist/references/base/src/types/nocha/types/video-wire.d.ts +120 -7
  34. package/dist/references/base/src/types/nocha/types/video.d.ts +5 -2
  35. package/dist/references/base/src/types/nocha/video-analysis.d.ts +10 -0
  36. package/dist/references/base/src/types/nocha/video-media.d.ts +1 -3
  37. package/dist/references/duel/server/tooling/sdk-sources.ts +2 -2
  38. package/dist/references/duel/src/types/nocha/assets-media.d.ts +8 -0
  39. package/dist/references/duel/src/types/nocha/assets-operations.d.ts +3 -0
  40. package/dist/references/duel/src/types/nocha/capability-deadlines.d.ts +6 -0
  41. package/dist/references/duel/src/types/nocha/capability-needs.d.ts +7 -0
  42. package/dist/references/duel/src/types/nocha/capability-operations.d.ts +3 -1
  43. package/dist/references/duel/src/types/nocha/drive-operations.d.ts +56 -0
  44. package/dist/references/duel/src/types/nocha/drive-types.d.ts +77 -0
  45. package/dist/references/duel/src/types/nocha/drive.d.ts +54 -0
  46. package/dist/references/duel/src/types/nocha/error-codes.d.ts +9 -0
  47. package/dist/references/duel/src/types/nocha/execution.d.ts +1 -1
  48. package/dist/references/duel/src/types/nocha/index.d.ts +4 -0
  49. package/dist/references/duel/src/types/nocha/media-read.d.ts +29 -0
  50. package/dist/references/duel/src/types/nocha/operation-waiting.d.ts +8 -0
  51. package/dist/references/duel/src/types/nocha/operation-wire-types.d.ts +30 -2
  52. package/dist/references/duel/src/types/nocha/protocol.d.ts +7 -3
  53. package/dist/references/duel/src/types/nocha/types/ai-wire.d.ts +40 -1
  54. package/dist/references/duel/src/types/nocha/types/ai.d.ts +1 -1
  55. package/dist/references/duel/src/types/nocha/types/assets-wire.d.ts +9 -1
  56. package/dist/references/duel/src/types/nocha/types/assets.d.ts +22 -5
  57. package/dist/references/duel/src/types/nocha/types/video-sdk-wire.d.ts +174 -13
  58. package/dist/references/duel/src/types/nocha/types/video-wire.d.ts +120 -7
  59. package/dist/references/duel/src/types/nocha/types/video.d.ts +5 -2
  60. package/dist/references/duel/src/types/nocha/video-analysis.d.ts +10 -0
  61. package/dist/references/duel/src/types/nocha/video-media.d.ts +1 -3
  62. package/dist/references/recipes/README.md +1 -0
  63. package/dist/references/recipes/backend-transaction/src/platform/failure.ts +1 -1
  64. package/dist/references/recipes/drive/NOCHA.json +24 -0
  65. package/dist/references/recipes/drive/README.md +15 -0
  66. package/dist/references/recipes/drive/SKILL.md +24 -0
  67. package/dist/references/recipes/drive/recipe.ts +34 -0
  68. package/dist/references/recipes/music/README.md +1 -1
  69. package/dist/references/recipes/types/nocha/assets-media.d.ts +8 -0
  70. package/dist/references/recipes/types/nocha/assets-operations.d.ts +3 -0
  71. package/dist/references/recipes/types/nocha/capability-deadlines.d.ts +6 -0
  72. package/dist/references/recipes/types/nocha/capability-needs.d.ts +7 -0
  73. package/dist/references/recipes/types/nocha/capability-operations.d.ts +3 -1
  74. package/dist/references/recipes/types/nocha/drive-operations.d.ts +56 -0
  75. package/dist/references/recipes/types/nocha/drive-types.d.ts +77 -0
  76. package/dist/references/recipes/types/nocha/drive.d.ts +54 -0
  77. package/dist/references/recipes/types/nocha/error-codes.d.ts +9 -0
  78. package/dist/references/recipes/types/nocha/execution.d.ts +1 -1
  79. package/dist/references/recipes/types/nocha/index.d.ts +4 -0
  80. package/dist/references/recipes/types/nocha/media-read.d.ts +29 -0
  81. package/dist/references/recipes/types/nocha/operation-waiting.d.ts +8 -0
  82. package/dist/references/recipes/types/nocha/operation-wire-types.d.ts +30 -2
  83. package/dist/references/recipes/types/nocha/protocol.d.ts +7 -3
  84. package/dist/references/recipes/types/nocha/types/ai-wire.d.ts +40 -1
  85. package/dist/references/recipes/types/nocha/types/ai.d.ts +1 -1
  86. package/dist/references/recipes/types/nocha/types/assets-wire.d.ts +9 -1
  87. package/dist/references/recipes/types/nocha/types/assets.d.ts +22 -5
  88. package/dist/references/recipes/types/nocha/types/video-sdk-wire.d.ts +174 -13
  89. package/dist/references/recipes/types/nocha/types/video-wire.d.ts +120 -7
  90. package/dist/references/recipes/types/nocha/types/video.d.ts +5 -2
  91. package/dist/references/recipes/types/nocha/video-analysis.d.ts +10 -0
  92. package/dist/references/recipes/types/nocha/video-media.d.ts +1 -3
  93. package/dist/references/stage/server/tooling/sdk-sources.ts +2 -2
  94. package/dist/references/stage/src/types/nocha/assets-media.d.ts +8 -0
  95. package/dist/references/stage/src/types/nocha/assets-operations.d.ts +3 -0
  96. package/dist/references/stage/src/types/nocha/capability-deadlines.d.ts +6 -0
  97. package/dist/references/stage/src/types/nocha/capability-needs.d.ts +7 -0
  98. package/dist/references/stage/src/types/nocha/capability-operations.d.ts +3 -1
  99. package/dist/references/stage/src/types/nocha/drive-operations.d.ts +56 -0
  100. package/dist/references/stage/src/types/nocha/drive-types.d.ts +77 -0
  101. package/dist/references/stage/src/types/nocha/drive.d.ts +54 -0
  102. package/dist/references/stage/src/types/nocha/error-codes.d.ts +9 -0
  103. package/dist/references/stage/src/types/nocha/execution.d.ts +1 -1
  104. package/dist/references/stage/src/types/nocha/index.d.ts +4 -0
  105. package/dist/references/stage/src/types/nocha/media-read.d.ts +29 -0
  106. package/dist/references/stage/src/types/nocha/operation-waiting.d.ts +8 -0
  107. package/dist/references/stage/src/types/nocha/operation-wire-types.d.ts +30 -2
  108. package/dist/references/stage/src/types/nocha/protocol.d.ts +7 -3
  109. package/dist/references/stage/src/types/nocha/types/ai-wire.d.ts +40 -1
  110. package/dist/references/stage/src/types/nocha/types/ai.d.ts +1 -1
  111. package/dist/references/stage/src/types/nocha/types/assets-wire.d.ts +9 -1
  112. package/dist/references/stage/src/types/nocha/types/assets.d.ts +22 -5
  113. package/dist/references/stage/src/types/nocha/types/video-sdk-wire.d.ts +174 -13
  114. package/dist/references/stage/src/types/nocha/types/video-wire.d.ts +120 -7
  115. package/dist/references/stage/src/types/nocha/types/video.d.ts +5 -2
  116. package/dist/references/stage/src/types/nocha/video-analysis.d.ts +10 -0
  117. package/dist/references/stage/src/types/nocha/video-media.d.ts +1 -3
  118. package/dist/references/workshop/server/tooling/sdk-sources.ts +2 -2
  119. package/dist/references/workshop/src/types/nocha/assets-media.d.ts +8 -0
  120. package/dist/references/workshop/src/types/nocha/assets-operations.d.ts +3 -0
  121. package/dist/references/workshop/src/types/nocha/capability-deadlines.d.ts +6 -0
  122. package/dist/references/workshop/src/types/nocha/capability-needs.d.ts +7 -0
  123. package/dist/references/workshop/src/types/nocha/capability-operations.d.ts +3 -1
  124. package/dist/references/workshop/src/types/nocha/drive-operations.d.ts +56 -0
  125. package/dist/references/workshop/src/types/nocha/drive-types.d.ts +77 -0
  126. package/dist/references/workshop/src/types/nocha/drive.d.ts +54 -0
  127. package/dist/references/workshop/src/types/nocha/error-codes.d.ts +9 -0
  128. package/dist/references/workshop/src/types/nocha/execution.d.ts +1 -1
  129. package/dist/references/workshop/src/types/nocha/index.d.ts +4 -0
  130. package/dist/references/workshop/src/types/nocha/media-read.d.ts +29 -0
  131. package/dist/references/workshop/src/types/nocha/operation-waiting.d.ts +8 -0
  132. package/dist/references/workshop/src/types/nocha/operation-wire-types.d.ts +30 -2
  133. package/dist/references/workshop/src/types/nocha/protocol.d.ts +7 -3
  134. package/dist/references/workshop/src/types/nocha/types/ai-wire.d.ts +40 -1
  135. package/dist/references/workshop/src/types/nocha/types/ai.d.ts +1 -1
  136. package/dist/references/workshop/src/types/nocha/types/assets-wire.d.ts +9 -1
  137. package/dist/references/workshop/src/types/nocha/types/assets.d.ts +22 -5
  138. package/dist/references/workshop/src/types/nocha/types/video-sdk-wire.d.ts +174 -13
  139. package/dist/references/workshop/src/types/nocha/types/video-wire.d.ts +120 -7
  140. package/dist/references/workshop/src/types/nocha/types/video.d.ts +5 -2
  141. package/dist/references/workshop/src/types/nocha/video-analysis.d.ts +10 -0
  142. package/dist/references/workshop/src/types/nocha/video-media.d.ts +1 -3
  143. package/dist/sdk-versions.json +1 -1
  144. package/dist/sdks/@nocha/sdk/dist/assets-operations.d.ts +3 -0
  145. package/dist/sdks/@nocha/sdk/dist/bridge.js +3 -3
  146. package/dist/sdks/@nocha/sdk/dist/capabilities.js +2 -2
  147. package/dist/sdks/@nocha/sdk/dist/capability-deadlines.d.ts +6 -0
  148. package/dist/sdks/@nocha/sdk/dist/capability-needs.d.ts +7 -0
  149. package/dist/sdks/@nocha/sdk/dist/capability-operations.d.ts +3 -1
  150. package/dist/sdks/@nocha/sdk/dist/{chunk-A3QFRV4K.js → chunk-7SH7NNX6.js} +2 -2
  151. package/dist/sdks/@nocha/sdk/dist/{chunk-3ULBSRGX.js → chunk-B34FPFNB.js} +1 -1
  152. package/dist/sdks/@nocha/sdk/dist/{chunk-MNRQELK7.js → chunk-EAC27UOG.js} +152 -7
  153. package/dist/sdks/{@watchirl/experience-sdk/dist/nocha/network-operations.d.ts → @nocha/sdk/dist/drive-operations.d.ts} +21 -18
  154. package/dist/sdks/@nocha/sdk/dist/drive-types.d.ts +76 -0
  155. package/dist/sdks/@nocha/sdk/dist/drive.d.ts +53 -0
  156. package/dist/sdks/@nocha/sdk/dist/error-codes.d.ts +9 -0
  157. package/dist/sdks/@nocha/sdk/dist/execution.d.ts +1 -1
  158. package/dist/sdks/@nocha/sdk/dist/host.js +1 -1
  159. package/dist/sdks/@nocha/sdk/dist/index.d.ts +4 -0
  160. package/dist/sdks/@nocha/sdk/dist/index.js +521 -125
  161. package/dist/sdks/@nocha/sdk/dist/operation-wire-types.d.ts +30 -2
  162. package/dist/sdks/@nocha/sdk/dist/protocol.d.ts +7 -3
  163. package/dist/sdks/@nocha/sdk/dist/protocol.js +19 -1
  164. package/dist/sdks/@nocha/sdk/dist/types/ai-wire.d.ts +40 -1
  165. package/dist/sdks/@nocha/sdk/dist/types/ai.d.ts +1 -1
  166. package/dist/sdks/@nocha/sdk/dist/types/assets-wire.d.ts +9 -1
  167. package/dist/sdks/@nocha/sdk/dist/types/assets.d.ts +22 -5
  168. package/dist/sdks/@nocha/sdk/dist/types/video-sdk-wire.d.ts +174 -13
  169. package/dist/sdks/@nocha/sdk/dist/types/video-wire.d.ts +120 -7
  170. package/dist/sdks/@nocha/sdk/dist/types/video.d.ts +5 -2
  171. package/dist/sdks/@nocha/sdk/dist/video-analysis.d.ts +9 -0
  172. package/dist/sdks/@nocha/sdk/dist/vite.js +3 -1
  173. package/dist/sdks/@nocha/sdk/package.json +1 -1
  174. package/dist/sdks/@watchirl/experience-sdk/dist/index.d.ts +2 -2
  175. package/dist/sdks/@watchirl/experience-sdk/dist/index.js +339 -4523
  176. package/dist/sdks/@watchirl/experience-sdk/dist/legacy-video.d.ts +2 -2
  177. package/dist/sdks/@watchirl/experience-sdk/dist/types.d.ts +1 -1
  178. package/dist/watchirl-sdk.js +333 -4515
  179. package/package.json +1 -1
  180. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/access.d.ts +0 -23
  181. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/ai-operations.d.ts +0 -252
  182. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assets-operations.d.ts +0 -102
  183. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assistant-contract.d.ts +0 -29
  184. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assistant-controls.d.ts +0 -11
  185. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assistant.d.ts +0 -57
  186. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/automations-operations.d.ts +0 -377
  187. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/automations-types.d.ts +0 -156
  188. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/automations.d.ts +0 -27
  189. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-database.d.ts +0 -17
  190. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-operations.d.ts +0 -71
  191. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-requests.d.ts +0 -57
  192. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-runtime.d.ts +0 -106
  193. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-transactions.d.ts +0 -53
  194. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/bridge.d.ts +0 -6
  195. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/capability-deadlines.d.ts +0 -63
  196. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/capability-needs.d.ts +0 -154
  197. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/capability-operations.d.ts +0 -73
  198. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/clipping-types.d.ts +0 -134
  199. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/connectors-operations.d.ts +0 -103
  200. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/connectors-types.d.ts +0 -10
  201. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/connectors.d.ts +0 -14
  202. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/context.d.ts +0 -18
  203. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/device-operations.d.ts +0 -452
  204. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/device-types.d.ts +0 -53
  205. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/email-operations.d.ts +0 -30
  206. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/email.d.ts +0 -9
  207. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/error-codes.d.ts +0 -299
  208. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/errors.d.ts +0 -36
  209. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/execution.d.ts +0 -15
  210. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/experience-context-types.d.ts +0 -12
  211. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/experience-context.d.ts +0 -8
  212. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/inbox-operations.d.ts +0 -58
  213. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/inbox.d.ts +0 -23
  214. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/index.d.ts +0 -101
  215. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/multiplayer-facade.d.ts +0 -44
  216. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/multiplayer-operations.d.ts +0 -80
  217. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/multiplayer.d.ts +0 -16
  218. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/navigation.d.ts +0 -16
  219. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/network.d.ts +0 -13
  220. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/notifications-operations.d.ts +0 -29
  221. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/notifications.d.ts +0 -9
  222. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/operation-metadata.d.ts +0 -67
  223. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/operation-wire-types.d.ts +0 -319
  224. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/outirl-operations.d.ts +0 -352
  225. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/outirl.d.ts +0 -31
  226. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/presence-operations.d.ts +0 -24
  227. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/protocol.d.ts +0 -378
  228. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/state.d.ts +0 -13
  229. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/storage-operation-types.d.ts +0 -49
  230. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/storage-operations.d.ts +0 -229
  231. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/storage.d.ts +0 -32
  232. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/transport.d.ts +0 -36
  233. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/ai-wire.d.ts +0 -337
  234. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/ai.d.ts +0 -20
  235. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/assets-wire.d.ts +0 -27
  236. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/assets.d.ts +0 -40
  237. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/json.d.ts +0 -8
  238. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/network.d.ts +0 -16
  239. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/outirl.d.ts +0 -326
  240. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/storage.d.ts +0 -74
  241. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/video-sdk-wire.d.ts +0 -460
  242. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/video-wire.d.ts +0 -440
  243. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/video.d.ts +0 -164
  244. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/voice-wire.d.ts +0 -17
  245. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/video-operations.d.ts +0 -646
  246. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/video-properties.d.ts +0 -6
  247. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/viewport-types.d.ts +0 -14
  248. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/viewport.d.ts +0 -7
  249. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/voice.d.ts +0 -13
  250. package/dist/sdks/@watchirl/experience-sdk/dist/nocha/workspace.d.ts +0 -7
@@ -6,7 +6,7 @@ export type AssetUploadInput = {
6
6
  file: Blob;
7
7
  filename?: string;
8
8
  };
9
- /** `onProgress` reports the bytes the host has sent, for a video only. */
9
+ /** `onProgress` reports the bytes the host has sent, for a video or an audio file only. */
10
10
  export type AssetUploadOptions = RequestOptions & {
11
11
  onProgress?: (progress: {
12
12
  loaded: number;
@@ -24,15 +24,32 @@ export type AttachmentUploadOptions = RequestOptions & {
24
24
  total: number;
25
25
  }) => void;
26
26
  };
27
+ /** Bytes received by the host; `total` is null until the host knows the file size. */
28
+ export type AssetMediaProgress = {
29
+ loaded: number;
30
+ total: number | null;
31
+ };
32
+ /** Aborting `signal` or reaching `timeoutMs` (10 minutes by default) stops the host read; hosts stop it after 15 minutes. */
33
+ export type AssetMediaOptions = Pick<RequestOptions, 'signal' | 'timeoutMs'> & {
34
+ onProgress?: (progress: AssetMediaProgress) => void;
35
+ };
27
36
  export type NochaAssets = {
28
37
  /** Reads an asset this participant may see. Store asset ids, never base64 or data URLs. */
29
38
  read(input: {
30
39
  assetId: string;
31
40
  }, options?: RequestOptions): Promise<ReadAssetResult>;
32
- /** Uploads a JPEG, PNG or WebP image (12 MiB at most), or an MP4 or QuickTime video (64 MiB at most) sent through the
33
- * host's binary transport, such as the `source_video` reference of a video workflow. The asset follows the media
34
- * usage's retention (`durable` keeps it) and stays readable by its author only; `read` returns images and audio, never
35
- * a video. Persist the `idempotencyKey` before a video upload and reuse it after a lost reply. */
41
+ /** Reads the same assets as `read`, and the MP4 or QuickTime videos this participant sent with `assets.upload` under this
42
+ * usage, as a `Blob` of at most 64 MiB (`AssetMediaType`). The usage declares `assets.read`; a generated film goes through
43
+ * `video.media`. The host reads the file with its own identity: no address reaches the frame. Show it through
44
+ * `URL.createObjectURL(blob)` and revoke the URL after use. An older host rejects with `media_unsupported_host`. */
45
+ media(input: {
46
+ assetId: string;
47
+ }, options?: AssetMediaOptions): Promise<Blob>;
48
+ /** Uploads a JPEG, PNG or WebP image (12 MiB at most), or an MP4 or QuickTime video or an MP3 (`audio/mpeg`) or WAV
49
+ * (`audio/wav`) audio file (64 MiB at most) sent through the host's binary transport, such as the `source_video` or
50
+ * `soundtrack` reference of a video workflow. The host checks the content against the type. The asset follows the media
51
+ * usage's retention (`durable` keeps it) and stays readable by its author only; `read` returns images and audio, `media`
52
+ * a video too. Persist the `idempotencyKey` before a video or audio upload and reuse it after a lost reply. */
36
53
  upload(input: AssetUploadInput, options?: AssetUploadOptions): Promise<UploadedAsset>;
37
54
  /** Uploads a workspace attachment through the host's binary transport; the host checks the workspace contribution right. */
38
55
  uploadAttachment(input: AttachmentUploadInput, options?: AttachmentUploadOptions): Promise<UploadedAsset>;
@@ -26,14 +26,15 @@ export type EffectiveVideoProperties = TripirlEffectiveVideoProperties & {
26
26
  * (`VideoGeneration`) is one concrete run of a workflow. Results keep the wire format; an enumeration value this SDK
27
27
  * does not know is reported as `null` (or dropped from a list), never as an invalid result.
28
28
  */
29
- export type VideoWorkflowFamily = 'classic' | 'narrative' | 'image_loop';
29
+ /** `analysis`: the source-video analysis (`analyse-video`), whose result is text, never a film. */
30
+ export type VideoWorkflowFamily = 'classic' | 'narrative' | 'image_loop' | 'analysis';
30
31
  export type VideoSpeechMode = 'none' | 'auto' | 'required';
31
32
  export type VideoAspectRatio = '9:16' | '16:9' | '1:1';
32
33
  /** Every spoken language a workflow may publish (`VideoWorkflow.locales` is the subset that workflow renders). */
33
34
  export declare const videoLocales: readonly ["fr-FR", "en-US", "es-ES", "de-DE", "it-IT", "pt-PT", "nl-NL", "pl-PL", "sv-SE", "da-DK", "nb-NO", "fi-FI", "cs-CZ", "sk-SK", "hr-HR", "bg-BG", "ro-RO", "hu-HU", "el-GR", "ru-RU", "uk-UA", "tr-TR", "ar-SA", "hi-IN", "ta-IN", "id-ID", "ms-MY", "vi-VN", "zh-CN", "ja-JP", "ko-KR", "th-TH"];
34
35
  export type VideoLocale = typeof videoLocales[number];
35
36
  export type VideoOutputResolution = '720p' | '1080p';
36
- export type VideoGenerationKind = 'film' | 'image_loop';
37
+ export type VideoGenerationKind = 'film' | 'image_loop' | 'analysis';
37
38
  export type VideoGenerationStatus = 'queued' | 'running' | 'cancelling' | 'succeeded' | 'failed' | 'cancelled';
38
39
  export type VideoGenerationStage = 'preparing' | 'planning' | 'generating_speech' | 'generating_media' | 'assembling';
39
40
  export type VideoGenerationFailure = {
@@ -41,6 +42,25 @@ export type VideoGenerationFailure = {
41
42
  message: string;
42
43
  retryable: boolean;
43
44
  };
45
+ /** Why a failed film can resume (the first six) or cannot (the last four). */
46
+ export type VideoGenerationResumeReason = 'interrupted' | 'inputs_changed' | 'provider_unavailable' | 'storage_full' | 'paid_work_retained' | 'retryable_failure' | 'final_failure' | 'budget_exhausted' | 'workflow_taken_over' | 'media_expired';
47
+ /**
48
+ * A failed film's resume, as `video.retry` would run it: each step `keep` (done, not run again), `redo` or `run`
49
+ * (not run yet), and whether it may cost (`paid`). `estimated_microcredits` is the most the retry may spend: "0" when
50
+ * it buys nothing again, else what is left of the confirmed maximum; null once the film continues in its Tripirl
51
+ * workflow. `retry` still confirms the original `estimated_maximum_microcredits`: the cap is cumulative.
52
+ */
53
+ export type VideoGenerationResume = {
54
+ available: boolean;
55
+ reason: VideoGenerationResumeReason | null;
56
+ steps: {
57
+ id: string;
58
+ action: 'keep' | 'redo' | 'run';
59
+ paid: boolean;
60
+ }[];
61
+ estimated_microcredits: Microcredits | null;
62
+ remaining_microcredits: Microcredits;
63
+ };
44
64
  export type VideoParameterScalar = string | number | boolean;
45
65
  export type VideoRenderRoute = {
46
66
  provider: string;
@@ -124,6 +144,18 @@ export type VideoWorkflowStep = {
124
144
  restartable?: boolean;
125
145
  properties?: VideoPropertyDefinition[];
126
146
  };
147
+ /** A module role of a workflow (`start_frame`, `end_frame`, `source_video`, `soundtrack`, `voice`): a request sends from `min` to
148
+ * `max` references of it. Several files of an audio role play in the order sent as one track: `gap_seconds` of silence
149
+ * between two (the voices, back to back), or `crossfade_seconds` of cross-fade from one into the next (the music, the last
150
+ * one fading out); `null` for an image or a video. */
151
+ export type VideoWorkflowReferenceRole = {
152
+ role: string;
153
+ media: 'image' | 'video' | 'audio';
154
+ min: number;
155
+ max: number;
156
+ gap_seconds: number | null;
157
+ crossfade_seconds: number | null;
158
+ };
127
159
  /** A circuit format a generation can run, with what it accepts. Read it with `video.workflows` or `video.workflow`. */
128
160
  export type VideoWorkflow = {
129
161
  id: string;
@@ -156,12 +188,16 @@ export type VideoWorkflow = {
156
188
  mode: VideoSpeechMode;
157
189
  durations_seconds: number[] | null;
158
190
  }[];
159
- /** `mime_types` lists the accepted types; a video type (`video/mp4`, `video/quicktime`) admits one `source_video` reference. */
191
+ /** `mime_types` lists the accepted types; a video type (`video/mp4`, `video/quicktime`) admits the `source_video` reference,
192
+ * an audio type (`audio/mpeg`, `audio/wav`) the audio roles' files. `roles` bounds each module role the workflow reads;
193
+ * `max` counts every reference, the audio files taking no image slot: the images take at most `max` minus the audio
194
+ * roles' `max`. An older host publishes no `roles` (`[]`): one `soundtrack` and one `voice` at most. */
160
195
  references: {
161
196
  min: number;
162
197
  max: number;
163
198
  mime_types: string[];
164
199
  requires_non_character: boolean;
200
+ roles: VideoWorkflowReferenceRole[];
165
201
  };
166
202
  /** True when `referencePreparation: 'auto'` is accepted. */
167
203
  reference_preparation: boolean;
@@ -188,22 +224,37 @@ export type VideoWorkflowsRequest = {
188
224
  family?: VideoWorkflowFamily;
189
225
  };
190
226
  /** Roles Tripirl workflows read: `character` (`name` and `description` say who it shows, or whom it replaces in a source
191
- * video), `location` and `style` (the set and the look), and `source_video`, the one MP4 or QuickTime video (stored by
192
- * `assets.upload`) that a workflow listing a video type in `references.mime_types` edits. Any other role is relayed as written. */
193
- export type VideoReferenceRole = 'character' | 'location' | 'style' | 'source_video';
194
- /** One reference: an asset available to the participant, or a prepared Studio reference of this revision. Images, or one
195
- * `source_video` video. A reference without a `role` is not a `character`; a `source_video` is neither a character nor a
196
- * place, so it never satisfies `requires_non_character`. */
227
+ * video), `location` and `style` (the set and the look), `source_video`, the one MP4 or QuickTime video (stored by
228
+ * `assets.upload`) that a workflow listing a video type in `references.mime_types` edits, `soundtrack`, the MP3 or WAV
229
+ * audio files (stored by `assets.upload`, 64 MiB and 1 s to 10 minutes each) that a workflow listing it in
230
+ * `references.roles` lays under the film, and `voice`, those a music + voice workflow has its characters say. Each role
231
+ * takes up to its `max` files, played in the order sent as one track of at most 10 minutes; each clip gets the slice at
232
+ * its offset in the film, cut to the clip; a longer track is truncated, a shorter one ends in silence. Any other role is
233
+ * relayed as written. */
234
+ export type VideoReferenceRole = 'character' | 'location' | 'style' | 'source_video' | 'soundtrack' | 'voice';
235
+ /** One reference: an asset available to the participant, or a prepared Studio reference of this revision. Images, one
236
+ * `source_video` video, or the `soundtrack` and `voice` audio files. A reference without a `role` is not a `character`; a
237
+ * `source_video` or an audio file is neither a character nor a place, so it never satisfies `requires_non_character`. A
238
+ * video must take the role `source_video` and an audio file the role `soundtrack` or `voice`. */
197
239
  export type VideoReferenceInput = {
198
240
  assetId: string;
199
241
  role?: VideoReferenceRole | (string & {});
200
242
  name?: string;
201
243
  description?: string;
244
+ replaces?: VideoReferenceReplaces;
202
245
  } | {
203
246
  studioReferenceId: string;
204
247
  role?: VideoReferenceRole | (string & {});
205
248
  name?: string;
206
249
  description?: string;
250
+ replaces?: VideoReferenceReplaces;
251
+ };
252
+ /** A video edit's character or place: what it takes the place of in the source video, by a subject id of the source's
253
+ * analysis (`p1`, `l1`, `o1`: `/^[plo][1-9]\d{0,2}$/`) and/or a description (1,000 characters at most). Absent, the
254
+ * edit infers it and reports it in `edit_plan`. Workflows without a source video ignore it. */
255
+ export type VideoReferenceReplaces = {
256
+ subjectId?: string;
257
+ description?: string;
207
258
  };
208
259
  export type VideoRequest = {
209
260
  workflow: VideoWorkflowRef;
@@ -223,10 +274,16 @@ export type VideoRequest = {
223
274
  parameters?: VideoParameterValues;
224
275
  /** Public module properties keyed by step, such as `{ clips: { resolution: '1080p' } }`. */
225
276
  properties?: VideoProperties;
226
- /** Within the workflow's `references` bounds, eight at most; roles in `VideoReferenceRole`. */
277
+ /** Within the workflow's `references` bounds and roles (twenty at most: eight images, then the audio files, in the order
278
+ * each role plays them); roles in `VideoReferenceRole`. */
227
279
  references?: VideoReferenceInput[];
228
- /** Workflows with `reference_preparation`: prepare the references before writing the film. */
280
+ /** Workflows with `reference_preparation`: prepare the references before writing the film. A video edit prepares
281
+ * each character's visual sheet (cut-out and four views) by default; `properties.worldReferences.mode` set to a
282
+ * value its `worldReferences` step publishes other than `auto` sends the raw images instead. */
229
283
  referencePreparation?: 'auto';
284
+ /** A video edit: a succeeded `analyse-video` generation of the same participant and the same source video (same
285
+ * SHA-256), reused instead of a new analysis. Absent, the edit analyses its source itself. */
286
+ sourceAnalysisId?: string;
230
287
  effort?: GenerationEffort;
231
288
  };
232
289
  /** One push notification text. `{error}` in a `failed` body is replaced by the generation's error message. */
@@ -262,9 +319,12 @@ export type VideoRetryRequest = {
262
319
  confirmedMaximumMicrocredits: Microcredits;
263
320
  restartFrom?: string;
264
321
  };
322
+ /** `workflow`: only your own generations of that workflow id (`analyse-video`, `edition-video`, a saved `fmt_…`), from
323
+ * SDK 6.13 hosts; generations others share are not listed. A filtered page may hold fewer than `limit` items, even none, while `has_more` is true: read on. */
265
324
  export type VideoListRequest = {
266
325
  cursor?: string;
267
326
  limit?: number;
327
+ workflow?: string;
268
328
  };
269
329
  /** The workflow a generation runs, frozen when Tripirl accepted it. */
270
330
  export type VideoGenerationWorkflowRef = {
@@ -300,6 +360,96 @@ export type VideoGenerationResult = {
300
360
  height?: number;
301
361
  aspect_ratio?: VideoAspectRatio;
302
362
  };
363
+ /** Ids inside one analysis: `p1…` people, `l1…` places, `o1…` objects; times in milliseconds from the source's start. */
364
+ export type VideoSourceAnalysis = {
365
+ duration_ms: number;
366
+ summary: string;
367
+ places: {
368
+ id: string;
369
+ label: string;
370
+ description: string;
371
+ }[];
372
+ people: {
373
+ id: string;
374
+ label: string;
375
+ description: string;
376
+ appearance: string;
377
+ appearances: {
378
+ start_ms: number;
379
+ end_ms: number;
380
+ }[];
381
+ speaks: boolean;
382
+ }[];
383
+ objects: {
384
+ id: string;
385
+ label: string;
386
+ description: string;
387
+ }[];
388
+ shots: {
389
+ start_ms: number;
390
+ end_ms: number;
391
+ camera: string;
392
+ action: string;
393
+ people: string[];
394
+ }[];
395
+ events: {
396
+ start_ms: number;
397
+ end_ms: number | null;
398
+ kind: string;
399
+ description: string;
400
+ people: string[];
401
+ }[];
402
+ transcript: {
403
+ start_ms: number;
404
+ end_ms: number;
405
+ speaker: string | null;
406
+ text: string;
407
+ }[];
408
+ audio: {
409
+ music: string | null;
410
+ ambience: string | null;
411
+ speech: string | null;
412
+ };
413
+ source: {
414
+ sha256: string;
415
+ width: number;
416
+ height: number;
417
+ fps: number | null;
418
+ };
419
+ };
420
+ export type VideoAnalysisPerson = VideoSourceAnalysis['people'][number];
421
+ export type VideoAnalysisPlace = VideoSourceAnalysis['places'][number];
422
+ export type VideoAnalysisObject = VideoSourceAnalysis['objects'][number];
423
+ export type VideoAnalysisShot = VideoSourceAnalysis['shots'][number];
424
+ export type VideoAnalysisEvent = VideoSourceAnalysis['events'][number];
425
+ export type VideoAnalysisTranscriptLine = VideoSourceAnalysis['transcript'][number];
426
+ /** The result of an `analyse-video` generation (`kind: 'analysis'`). */
427
+ export type VideoAnalysisResult = {
428
+ kind: 'analysis';
429
+ analysis: VideoSourceAnalysis;
430
+ };
431
+ /** How a video edit mapped its references onto the source video. */
432
+ export type VideoEditPlan = {
433
+ source_analysis_id: string | null;
434
+ mappings: {
435
+ reference: {
436
+ asset_id: string;
437
+ role: string | null;
438
+ name: string | null;
439
+ };
440
+ replaces: {
441
+ subject_id: string | null;
442
+ description: string | null;
443
+ };
444
+ source: 'explicit' | 'inferred';
445
+ image_index: number | null;
446
+ visual_sheet: boolean;
447
+ }[];
448
+ warnings: string[];
449
+ };
450
+ /** One reference of a video edit's plan. `reference.asset_id` is the asset the generation reads (`references`), which
451
+ * may be the participant's copy of the asset sent. */
452
+ export type VideoEditMapping = VideoEditPlan['mappings'][number];
303
453
  export type VideoGenerationRequest = {
304
454
  workflow: VideoWorkflowRef;
305
455
  goal: string;
@@ -311,6 +461,7 @@ export type VideoGenerationRequest = {
311
461
  /** Requested values only. Absent on generations created before parameter snapshots. */
312
462
  parameters?: VideoParameterValues;
313
463
  reference_preparation?: 'auto';
464
+ source_analysis_id?: string;
314
465
  properties?: VideoProperties;
315
466
  effort?: GenerationEffort | null;
316
467
  collection_id: string | null;
@@ -335,6 +486,10 @@ export type VideoGenerationReference = {
335
486
  role?: string;
336
487
  name?: string;
337
488
  description?: string;
489
+ replaces?: {
490
+ subject_id?: string;
491
+ description?: string;
492
+ };
338
493
  availability: 'available' | 'expired' | 'pending' | null;
339
494
  };
340
495
  export type VideoGenerationOrigin = {
@@ -421,7 +576,12 @@ export type VideoGeneration = {
421
576
  };
422
577
  actual_duration_seconds: number | null;
423
578
  error: VideoGenerationFailure | null;
424
- result: VideoGenerationResult | null;
579
+ /** A failed film's resume, from SDK 6.10 hosts: null for any other generation, absent from older hosts. */
580
+ resume?: VideoGenerationResume | null;
581
+ /** A film, or the text analysis of an `analyse-video` generation (`kind: 'analysis'`, from SDK 6.13 hosts). */
582
+ result: VideoGenerationResult | VideoAnalysisResult | null;
583
+ /** A video edit's mapping of its references, from SDK 6.13 hosts; absent otherwise. */
584
+ edit_plan?: VideoEditPlan | null;
425
585
  created_at: string;
426
586
  updated_at: string;
427
587
  };
@@ -434,7 +594,8 @@ export type VideoSharedGeneration = {
434
594
  status: 'succeeded';
435
595
  created_at: string;
436
596
  updated_at: string;
437
- result: VideoGenerationResult;
597
+ /** The film, or the text analysis of a shared `analyse-video` generation (from SDK 6.13 hosts). */
598
+ result: VideoGenerationResult | VideoAnalysisResult;
438
599
  };
439
600
  export type VideoReadableGeneration = VideoGeneration | VideoSharedGeneration;
440
601
  export type VideoGenerationList = {
@@ -127,6 +127,7 @@ export type TripirlVideoGenerationReference = {
127
127
  "role"?: string;
128
128
  "name"?: string;
129
129
  "description"?: string;
130
+ "replaces"?: TripirlVideoReferenceReplaces;
130
131
  };
131
132
  export type TripirlDataAuthorization = {
132
133
  "need": string;
@@ -159,7 +160,7 @@ export type TripirlNochaRequest = {
159
160
  };
160
161
  export type TripirlEstimateRequest = {
161
162
  "workflow": TripirlWorkflowRef;
162
- "goal": string;
163
+ "goal"?: string;
163
164
  "duration_seconds": number;
164
165
  "aspect_ratio": "9:16" | "16:9" | "1:1";
165
166
  "locale": "fr-FR" | "en-US" | "es-ES" | "de-DE" | "it-IT" | "pt-PT" | "nl-NL" | "pl-PL" | "sv-SE" | "da-DK" | "nb-NO" | "fi-FI" | "cs-CZ" | "sk-SK" | "hr-HR" | "bg-BG" | "ro-RO" | "hu-HU" | "el-GR" | "ru-RU" | "uk-UA" | "tr-TR" | "ar-SA" | "hi-IN" | "ta-IN" | "id-ID" | "ms-MY" | "vi-VN" | "zh-CN" | "ja-JP" | "ko-KR" | "th-TH";
@@ -168,11 +169,12 @@ export type TripirlEstimateRequest = {
168
169
  "effort"?: "auto" | "low" | "medium" | "high";
169
170
  "collection_id"?: TripirlIdentifier;
170
171
  "properties"?: TripirlVideoProperties;
172
+ "source_analysis_id"?: TripirlUuid;
171
173
  "nocha"?: TripirlNochaRequest;
172
174
  };
173
175
  export type TripirlCreateRequest = {
174
176
  "workflow": TripirlWorkflowRef;
175
- "goal": string;
177
+ "goal"?: string;
176
178
  "duration_seconds": number;
177
179
  "aspect_ratio": "9:16" | "16:9" | "1:1";
178
180
  "locale": "fr-FR" | "en-US" | "es-ES" | "de-DE" | "it-IT" | "pt-PT" | "nl-NL" | "pl-PL" | "sv-SE" | "da-DK" | "nb-NO" | "fi-FI" | "cs-CZ" | "sk-SK" | "hr-HR" | "bg-BG" | "ro-RO" | "hu-HU" | "el-GR" | "ru-RU" | "uk-UA" | "tr-TR" | "ar-SA" | "hi-IN" | "ta-IN" | "id-ID" | "ms-MY" | "vi-VN" | "zh-CN" | "ja-JP" | "ko-KR" | "th-TH";
@@ -181,6 +183,7 @@ export type TripirlCreateRequest = {
181
183
  "effort"?: "auto" | "low" | "medium" | "high";
182
184
  "collection_id"?: TripirlIdentifier;
183
185
  "properties"?: TripirlVideoProperties;
186
+ "source_analysis_id"?: TripirlUuid;
184
187
  "nocha"?: TripirlNochaRequest;
185
188
  "confirmed_maximum_microcredits": string;
186
189
  };
@@ -202,6 +205,7 @@ export type TripirlDataRoutesRequest = {
202
205
  "effort"?: "auto" | "low" | "medium" | "high";
203
206
  "collection_id"?: TripirlIdentifier;
204
207
  "properties"?: TripirlVideoProperties;
208
+ "source_analysis_id"?: TripirlUuid;
205
209
  "nocha"?: TripirlNochaRequest;
206
210
  "purpose"?: "generation";
207
211
  "metadata_only"?: boolean;
@@ -226,6 +230,14 @@ export type TripirlEstimateResponse = {
226
230
  "valid_until": TripirlTimestamp;
227
231
  "workflow": TripirlWorkflowIdentity;
228
232
  };
233
+ export type TripirlVideoWorkflowReferenceRole = {
234
+ "role": string;
235
+ "media": "image" | "video" | "audio";
236
+ "min": number;
237
+ "max": number;
238
+ "gap_seconds"?: number;
239
+ "crossfade_seconds"?: number;
240
+ };
229
241
  export type TripirlVideoWorkflow = {
230
242
  "id": TripirlIdentifier;
231
243
  "origin": "builtin" | "saved";
@@ -235,7 +247,7 @@ export type TripirlVideoWorkflow = {
235
247
  "base_id": TripirlIdentifier | null;
236
248
  "name": string;
237
249
  "description": string;
238
- "family": "classic" | "narrative" | "image_loop";
250
+ "family": "classic" | "narrative" | "image_loop" | "analysis";
239
251
  "interaction": "none" | "recordings" | "live";
240
252
  "availability": {
241
253
  "status": "available";
@@ -261,6 +273,7 @@ export type TripirlVideoWorkflow = {
261
273
  "max": number;
262
274
  "mime_types": (string)[];
263
275
  "requires_non_character": boolean;
276
+ "roles": (TripirlVideoWorkflowReferenceRole)[];
264
277
  };
265
278
  };
266
279
  "steps": ({
@@ -279,7 +292,7 @@ export type TripirlVideoWorkflowList = {
279
292
  };
280
293
  export type TripirlVideoGenerationRequest = {
281
294
  "workflow": TripirlWorkflowRef;
282
- "goal": string;
295
+ "goal"?: string;
283
296
  "duration_seconds": number;
284
297
  "aspect_ratio": "9:16" | "16:9" | "1:1";
285
298
  "locale": "fr-FR" | "en-US" | "es-ES" | "de-DE" | "it-IT" | "pt-PT" | "nl-NL" | "pl-PL" | "sv-SE" | "da-DK" | "nb-NO" | "fi-FI" | "cs-CZ" | "sk-SK" | "hr-HR" | "bg-BG" | "ro-RO" | "hu-HU" | "el-GR" | "ru-RU" | "uk-UA" | "tr-TR" | "ar-SA" | "hi-IN" | "ta-IN" | "id-ID" | "ms-MY" | "vi-VN" | "zh-CN" | "ja-JP" | "ko-KR" | "th-TH";
@@ -288,6 +301,7 @@ export type TripirlVideoGenerationRequest = {
288
301
  "effort"?: "auto" | "low" | "medium" | "high";
289
302
  "collection_id": TripirlIdentifier | null;
290
303
  "properties"?: TripirlVideoProperties;
304
+ "source_analysis_id"?: TripirlUuid;
291
305
  "confirmed_maximum_microcredits": string | null;
292
306
  };
293
307
  export type TripirlVideoGeneration = {
@@ -301,8 +315,10 @@ export type TripirlVideoGeneration = {
301
315
  "role"?: string;
302
316
  "name"?: string;
303
317
  "description"?: string;
318
+ "replaces"?: TripirlVideoReferenceReplaces;
304
319
  "availability": "available" | "expired" | "pending";
305
320
  "image_url": string | null;
321
+ "media_url": string | null;
306
322
  })[];
307
323
  "origin": TripirlNochaOrigin | null;
308
324
  "progress": {
@@ -322,7 +338,9 @@ export type TripirlVideoGeneration = {
322
338
  "cost": TripirlVideoGenerationCost;
323
339
  "actual_duration_seconds": number | null;
324
340
  "error": TripirlVideoGenerationFailure | null;
325
- "result": TripirlVideoGenerationResult | null;
341
+ "resume": TripirlVideoGenerationResume | null;
342
+ "result": TripirlVideoGenerationAnyResult | null;
343
+ "edit_plan"?: TripirlVideoEditPlan;
326
344
  "created_at": TripirlTimestamp;
327
345
  "updated_at": TripirlTimestamp;
328
346
  };
@@ -343,6 +361,18 @@ export type TripirlVideoGenerationFailure = {
343
361
  "message": string;
344
362
  "retryable": boolean;
345
363
  };
364
+ export type TripirlVideoGenerationResume = {
365
+ "available": boolean;
366
+ "reason": "interrupted" | "inputs_changed" | "provider_unavailable" | "storage_full" | "paid_work_retained" | "retryable_failure" | "final_failure" | "budget_exhausted" | "workflow_taken_over" | "media_expired";
367
+ "steps": (TripirlVideoGenerationResumeStep)[];
368
+ "estimated_microcredits": string | null;
369
+ "remaining_microcredits": string;
370
+ };
371
+ export type TripirlVideoGenerationResumeStep = {
372
+ "id": TripirlStepId;
373
+ "action": "keep" | "redo" | "run";
374
+ "paid": boolean;
375
+ };
346
376
  export type TripirlVideoGenerationResult = {
347
377
  "actual_duration_seconds": number;
348
378
  "download_url": string;
@@ -355,8 +385,91 @@ export type TripirlVideoGenerationResult = {
355
385
  "height"?: number;
356
386
  "filename"?: TripirlIdentifier;
357
387
  };
388
+ export type TripirlVideoGenerationAnyResult = TripirlVideoGenerationResult | TripirlVideoAnalysisResult;
389
+ export type TripirlVideoSourceAnalysis = {
390
+ "duration_ms": number;
391
+ "summary": string;
392
+ "places": ({
393
+ "id": string;
394
+ "label": string;
395
+ "description": string;
396
+ })[];
397
+ "people": ({
398
+ "id": string;
399
+ "label": string;
400
+ "description": string;
401
+ "appearance": string;
402
+ "appearances": ({
403
+ "start_ms": number;
404
+ "end_ms": number;
405
+ })[];
406
+ "speaks": boolean;
407
+ })[];
408
+ "objects": ({
409
+ "id": string;
410
+ "label": string;
411
+ "description": string;
412
+ })[];
413
+ "shots": ({
414
+ "start_ms": number;
415
+ "end_ms": number;
416
+ "camera": string;
417
+ "action": string;
418
+ "people": (string)[];
419
+ })[];
420
+ "events": ({
421
+ "start_ms": number;
422
+ "end_ms": number | null;
423
+ "kind": string;
424
+ "description": string;
425
+ "people": (string)[];
426
+ })[];
427
+ "transcript": ({
428
+ "start_ms": number;
429
+ "end_ms": number;
430
+ "speaker": string | null;
431
+ "text": string;
432
+ })[];
433
+ "audio": {
434
+ "music": string | null;
435
+ "ambience": string | null;
436
+ "speech": string | null;
437
+ };
438
+ "source": {
439
+ "sha256": string;
440
+ "width": number;
441
+ "height": number;
442
+ "fps": number | null;
443
+ };
444
+ };
445
+ export type TripirlVideoAnalysisResult = {
446
+ "kind": "analysis";
447
+ "analysis": TripirlVideoSourceAnalysis;
448
+ };
449
+ export type TripirlVideoReferenceReplaces = {
450
+ "subject_id"?: string;
451
+ "description"?: string;
452
+ };
453
+ export type TripirlVideoEditPlan = {
454
+ "source_analysis_id": TripirlUuid | null;
455
+ "mappings": ({
456
+ "reference": {
457
+ "asset_id": TripirlUuid;
458
+ "role": string | null;
459
+ "name": string | null;
460
+ };
461
+ "replaces": {
462
+ "subject_id": string | null;
463
+ "description": string | null;
464
+ };
465
+ "source": "explicit" | "inferred";
466
+ "image_index": number | null;
467
+ "visual_sheet": boolean;
468
+ })[];
469
+ "warnings": (string)[];
470
+ };
358
471
  export type TripirlVideoGenerationResultResponse = {
359
- "result": TripirlVideoGenerationResult;
472
+ "result": TripirlVideoGenerationAnyResult;
360
473
  };
361
474
  export type TripirlVideoGenerationEvent = {
362
475
  "created_at": TripirlTimestamp;
@@ -427,7 +540,7 @@ export type TripirlError = {
427
540
  "trace_id": string;
428
541
  "correlation_id": string;
429
542
  "error": {
430
- "code": "invalid_request" | "authentication_required" | "insufficient_scope" | "generation_not_found" | "reference_asset_not_found" | "reference_asset_invalid" | "estimate_exceeded" | "idempotency_conflict" | "generation_not_cancellable" | "generation_not_terminal" | "result_not_ready" | "subscription_required" | "insufficient_credits" | "queue_limit_reached" | "concurrency_limit_reached" | "provider_unavailable" | "speech_requirement_unsatisfied" | "speech_casting_unattributed" | "speech_take_too_long" | "speech_lines_missing" | "workflow_unknown" | "workflow_unsupported" | "request_failed";
543
+ "code": "invalid_request" | "authentication_required" | "insufficient_scope" | "generation_not_found" | "reference_asset_not_found" | "reference_asset_invalid" | "estimate_exceeded" | "idempotency_conflict" | "generation_not_cancellable" | "generation_not_terminal" | "result_not_ready" | "subscription_required" | "insufficient_credits" | "queue_limit_reached" | "concurrency_limit_reached" | "provider_unavailable" | "speech_requirement_unsatisfied" | "speech_casting_unattributed" | "speech_take_too_long" | "speech_lines_missing" | "workflow_unknown" | "workflow_unsupported" | "workflow_blocked" | "request_failed";
431
544
  "message": string;
432
545
  "retryable": boolean;
433
546
  "trace_id": string;
@@ -131,8 +131,11 @@ export type NochaVideo = {
131
131
  /** One workflow, at a revision for a saved `fmt_…` one. */
132
132
  workflow(input: VideoWorkflowRef, options?: RequestOptions): Promise<VideoWorkflow>;
133
133
  estimate(input: VideoRequest, options?: RequestOptions): Promise<VideoEstimate>;
134
- /** Persist `options.idempotencyKey` before the call and reuse it to resume after a lost reply. */
134
+ /** Persist `options.idempotencyKey` before the call and reuse it to resume after a lost reply. The `analyse-video`
135
+ * workflow takes one `source_video` reference and answers `result: { kind: 'analysis', analysis }`, no film; a video
136
+ * edit reuses it with `sourceAnalysisId` and names what each character replaces (`references[].replaces`). */
135
137
  create(input: VideoCreateRequest, options: VideoPaidOptions): Promise<VideoGeneration>;
138
+ /** This experience's generations, newest first; `workflow` keeps one workflow's, such as the `analyse-video` analyses. */
136
139
  list(input?: VideoListRequest, options?: RequestOptions): Promise<VideoGenerationList>;
137
140
  get(input: {
138
141
  id: string;
@@ -155,7 +158,7 @@ export type NochaVideo = {
155
158
  playback(input: {
156
159
  id: string;
157
160
  }, options?: VideoPlaybackOptions): Promise<VideoPlayback>;
158
- /** Reads a succeeded film as an MP4 `Blob` of at most 256 MiB. The host authorizes it with `video.get`
161
+ /** Reads a succeeded film as an MP4 `Blob` of at most 256 MiB; an analysis has no media (`media_unsupported`). The host authorizes it with `video.get`
159
162
  * and fetches it with its own identity: `download_url` alone is not readable from the experience frame.
160
163
  * Show it through `URL.createObjectURL(blob)` (`<video>`, Three.js `VideoTexture`) and revoke the URL after use. */
161
164
  media(input: {
@@ -0,0 +1,10 @@
1
+ // Generated by npm run references:generate -w nocha; do not edit.
2
+ import type { VideoAnalysisResult, VideoEditPlan, VideoGenerationReference, VideoSourceAnalysis } from './types/video-sdk-wire.js';
3
+ export declare function readVideoSourceAnalysis(value: unknown): VideoSourceAnalysis | null;
4
+ /** `{ kind: 'analysis', analysis }`, or null when the value is not a usable analysis. */
5
+ export declare function readVideoAnalysisResult(value: unknown): VideoAnalysisResult | null;
6
+ /** A reference's `replaces` as Tripirl returns it; undefined when it names nothing. */
7
+ export declare function readVideoReferenceReplaces(value: unknown): VideoGenerationReference['replaces'];
8
+ /** A video edit's plan: undefined when the host sends none, null when it is null or unusable. A mapping source this
9
+ * SDK does not know reads as `inferred`: the edit chose it. */
10
+ export declare function readVideoEditPlan(value: unknown): VideoEditPlan | null | undefined;
@@ -1,9 +1,7 @@
1
1
  // Generated by npm run references:generate -w nocha; do not edit.
2
2
  import type { NochaContext } from './context.js';
3
3
  import type { VideoMediaOptions } from './types/video.js';
4
- /** Binary read channel, the reverse of `nocha.upload.v1`: the host authorizes the read with `video.get`,
5
- * fetches the relative media URL with its own identity and posts the bytes back. Tokens and cookies stay
6
- * in the host. A read has no remote effect, so the local deadline also stops it. */
4
+ /** `video.media` on `nocha.media.v1`: the host authorizes the read with `video.get` and fetches the relative media URL. */
7
5
  export declare function readVideoMedia(context: NochaContext, input: {
8
6
  id: string;
9
7
  }, options?: VideoMediaOptions): Promise<Blob>;
@@ -1,4 +1,4 @@
1
1
  {
2
- "@nocha/sdk": "6.7.0",
2
+ "@nocha/sdk": "6.14.0",
3
3
  "@watchirl/experience-sdk": "2.0.0"
4
4
  }
@@ -3,6 +3,9 @@ export declare const assetsOperationDefinitions: {
3
3
  readonly facades: readonly [{
4
4
  readonly path: "assets.read";
5
5
  readonly kind: "direct";
6
+ }, {
7
+ readonly path: "assets.media";
8
+ readonly kind: "composite";
6
9
  }];
7
10
  readonly publicRead: "eligible";
8
11
  readonly observer: "declared-public-read";