@deepraxis/sdk 0.1.1-dev.71b291b → 0.1.1-dev.7567028

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.
@@ -1169,7 +1169,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
1169
1169
  /**
1170
1170
  * Create an upload
1171
1171
  *
1172
- * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data, assistants and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1172
+ * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 20 GiB (21474836480 bytes) and only user_data, assistants and vision purposes. Send parts of at most 64000000 bytes; an unfinished upload waits for them for 7 days, so a client can create → send parts → query GET /file/v1/uploads/{upload_id} → resend only the missing parts → complete. Optional part_size fixes every part length and makes each numbered part retryable with identical bytes. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1173
1173
  */
1174
1174
  export const fileCreateUpload = (options) => (options.client ?? client).post({
1175
1175
  security: [{
@@ -1187,7 +1187,7 @@ export const fileCreateUpload = (options) => (options.client ?? client).post({
1187
1187
  /**
1188
1188
  * Add an upload part
1189
1189
  *
1190
- * Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.
1190
+ * Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID, and query GET /file/v1/uploads/{upload_id} to see which numbers already arrived. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.
1191
1191
  */
1192
1192
  export const fileAddUploadPart = (options) => (options.client ?? client).post({
1193
1193
  ...formDataBodySerializer,
@@ -1206,7 +1206,7 @@ export const fileAddUploadPart = (options) => (options.client ?? client).post({
1206
1206
  /**
1207
1207
  * Complete an upload
1208
1208
  *
1209
- * Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.
1209
+ * Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. When parts were lost, query GET /file/v1/uploads/{upload_id} and resend them before completing. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.
1210
1210
  */
1211
1211
  export const fileCompleteUpload = (options) => (options.client ?? client).post({
1212
1212
  security: [{
@@ -1235,10 +1235,24 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
1235
1235
  url: '/file/v1/uploads/{upload_id}/cancel',
1236
1236
  ...options
1237
1237
  });
1238
+ /**
1239
+ * Retrieve an upload
1240
+ *
1241
+ * Read the state of an unfinished upload — its status, declared bytes, fixed part_size and the parts it already holds (received_parts, each with part_number, bytes and sha256). After a break or a failed part, call it to resend only the missing numbers, then complete. A cancelled or expired upload is refused; a completed one returns its file. A missing or other-organization upload returns 404.
1242
+ */
1243
+ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
1244
+ security: [{
1245
+ key: 'BearerAuth',
1246
+ scheme: 'bearer',
1247
+ type: 'http'
1248
+ }],
1249
+ url: '/file/v1/uploads/{upload_id}',
1250
+ ...options
1251
+ });
1238
1252
  /**
1239
1253
  * Create a one-time upload URL
1240
1254
  *
1241
- * Upload a local file of up to 2 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes), PUT each chunk to its numbered parts[].url in any order, then POST complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 3600 for multipart, at most 604800; all multipart URLs share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
1255
+ * Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
1242
1256
  */
1243
1257
  export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
1244
1258
  security: [{
@@ -6383,11 +6397,14 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6383
6397
  * GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
6384
6398
  * GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
6385
6399
  * ListTransitions(): TransitionInfo[];
6400
+ * ListEffects(): EffectInfo[];
6401
+ * ListTextStyles(): TextStylePreset[];
6402
+ * ListTextTemplates(): TextTemplate[];
6386
6403
  * ListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];
6387
6404
  * ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
6388
6405
  * Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
6389
6406
  * Update(id: ClipId, patch: ItemPatchView): void;
6390
- * SetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
6407
+ * SetSpeed(id: ClipId, rate: number | { curve: { at: number; rate: number; ease?: Ease }[]; audio?: "mute" | "resample" }, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
6391
6408
  * Delete(id: ClipId, o?: { ripple?: boolean }): void;
6392
6409
  * Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
6393
6410
  * UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
@@ -6396,11 +6413,15 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6396
6413
  * Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
6397
6414
  * Move(id: ClipId, start: number, track?: TrackId): void;
6398
6415
  * RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
6399
- * AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
6416
+ * AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string; role?: "voice" | "music" | "sfx" }, index?: number): TrackId;
6400
6417
  * UpdateTrack(id: TrackId, patch: TrackPatch): void;
6401
6418
  * DeleteTrack(id: TrackId): void;
6402
6419
  * SetSettings(patch: Partial<ProjectSettingsView>): void;
6403
- * AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
6420
+ * AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle> & { preset?: string }; maxChars?: number }): ClipId[];
6421
+ * InsertTemplate(track: TrackId, o: { template: string; start: number; slots?: Record<string, string> }): ClipId[];
6422
+ * AlignCaptions(trackId: TrackId, script: string): { replaced: number; added: number; deleted: number };
6423
+ * ImportCaptions(trackId: TrackId, text: string, o?: { format?: "srt" | "vtt"; offset?: number }): ClipId[];
6424
+ * ExportCaptions(trackId: TrackId, o: { format: "srt" | "vtt" }): string;
6404
6425
  * SetMarker(at: number, label: string): string;
6405
6426
  * Print(...values: unknown[]): void;
6406
6427
  * Preview(at: number[]): void;
@@ -6408,20 +6429,22 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6408
6429
  *
6409
6430
  * | Functions | Behavior and arguments |
6410
6431
  * | --- | --- |
6411
- * | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
6432
+ * | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text, effects, blend and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
6433
+ * | ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |
6412
6434
  * | ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |
6413
6435
  * | ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |
6414
6436
  * | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
6415
6437
  * | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
6416
6438
  * | GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |
6417
6439
  * | Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |
6418
- * | SetSpeed | Change video/audio rate in 0.25–4; keep is required. source preserves consumed source and changes length, duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |
6440
+ * | SetSpeed | Change video/audio rate in 0.25–4; keep is required. A `{curve: [{at, rate, ease?}, ...], audio?: "mute" | "resample"}` rate is forward-only and holds output duration fixed; pitch preservation is unavailable. Scalar rates: source preserves consumed source and changes length; duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |
6419
6441
  * | Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |
6420
6442
  * | Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |
6421
6443
  * | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
6422
- * | AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb and style as appropriate to track kind. |
6444
+ * | AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb, audio role (`voice`, `music`, `sfx`) and style as appropriate to track kind. |
6423
6445
  * | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
6424
6446
  * | AddCaptionsFromTranscript | Create captions from an audio/video clip's kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |
6447
+ * | ImportCaptions, ExportCaptions | Import SRT or WebVTT text onto a caption track and export it back. format is inferred from a WEBVTT header when omitted. offset shifts imported cues in seconds. Import rejects more than 100000 bytes, more than 5000 cues, malformed or overlapping file cues with INVALID_CAPTION_FILE; overlap with existing timeline clips uses the normal OVERLAP rejection. Export sorts by timeline start and writes millisecond timecodes. |
6425
6448
  * | SetMarker | Add a label at a timeline time and return its ID. |
6426
6449
  * | Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result's frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |
6427
6450
  *
@@ -6439,15 +6462,15 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6439
6462
  *
6440
6463
  * | type | Required fields beyond type/start | Optional fields |
6441
6464
  * | --- | --- | --- |
6442
- * | video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, animation, transitionIn, transitionOut |
6443
- * | image | media, length | transform, fit, animate, animation, transitionIn, transitionOut |
6444
- * | text | text, length | style, transform, reveal, animate, animation, transitionIn, transitionOut |
6445
- * | color | color, length | transform, fill, animate, animation, transitionIn, transitionOut |
6446
- * | shape | shape, length, width, height, fill | radius, stroke, transform, animate, animation, transitionIn, transitionOut |
6447
- * | audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |
6465
+ * | video | media | length, sourceIn, playback, volumeDb, transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6466
+ * | image | media, length | transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6467
+ * | text | text, length | style, transform, blend, reveal, animate, animation, effects, mask, transitionIn, transitionOut |
6468
+ * | color | color, length | transform, fill, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6469
+ * | shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6470
+ * | audio | media | length, sourceIn, playback, volumeDb, gain, fadeIn, fadeOut, duck |
6448
6471
  * | caption | text, length | — |
6449
6472
  *
6450
- * Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
6473
+ * Visual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
6451
6474
  *
6452
6475
  * | Field | Value |
6453
6476
  * | --- | --- |
@@ -6461,9 +6484,17 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6461
6484
  * | shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |
6462
6485
  * | transitionIn, transitionOut | `{kind, length: number}` at the clip's beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |
6463
6486
  *
6487
+ * #### Visual effects
6488
+ *
6489
+ * `effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Entries include blur, color adjustment, vignette, film grain, chromatic aberration, pixelate, glitch, shake, flash, light leak and built-in `lut` looks; user `.cube` LUTs are not supported. `speed` is cycles per second. Effects run on CPU during export and increase render time. Parameters are discovered with ListEffects(). Catalog entries expose their own parameters through ListEffects(), including `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.
6490
+ *
6491
+ * Numeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter's catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.
6492
+ *
6493
+ * `blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.
6494
+ *
6464
6495
  * #### Update fields (ItemPatchView)
6465
6496
  *
6466
- * All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.
6497
+ * All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, duck, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend, mask, gain. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.
6467
6498
  *
6468
6499
  * #### Animation presets
6469
6500
  *