@deepraxis/cli 0.2.1-dev.463d5b5 → 0.2.1-dev.4786c3d

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 (3) hide show
  1. package/COMMANDS.md +29 -5
  2. package/dist/praxis.js +1588 -150
  3. package/package.json +1 -1
package/dist/praxis.js CHANGED
@@ -143,7 +143,7 @@ across all toolsets allowed.`
143
143
  type: "array",
144
144
  itemType: "object",
145
145
  required: false,
146
- description: "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general and personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search or browser. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for no bindings. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time."
146
+ description: "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general and personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search, browser, ticket, crm, canvas or cut. There is no binding by default; enabling one opens every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for no bindings. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time."
147
147
  },
148
148
  {
149
149
  name: "kind",
@@ -1218,6 +1218,37 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
1218
1218
  }
1219
1219
  ]
1220
1220
  },
1221
+ {
1222
+ resource: "agent.computers.files.convert",
1223
+ method: "create",
1224
+ summary: "Convert a Computer Document to PDF",
1225
+ description: `Convert an Office document (docx, doc, ppt, pptx, rtf, odt; up to 16 MiB) to PDF inside a platform-owned ephemeral document sandbox, whatever machine family the computer itself runs on. Returns base64 PDF bytes.
1226
+
1227
+ Praxis extension: the preview conversion endpoint. The browser never parses an untrusted document — LibreOffice runs only inside an ephemeral document-family sandbox and the converter instance is killed after use. The file stays tenant-owned; non-convertible types answer EXTENSION_NOT_CONVERTIBLE and a failed conversion answers CONVERSION_FAILED.`,
1228
+ http: "POST",
1229
+ path: "/agent/v1/computers/{computer_id}/files/convert",
1230
+ streaming: "no",
1231
+ pagination: false,
1232
+ pathParams: [
1233
+ {
1234
+ name: "computer_id",
1235
+ sdkName: "computer_id",
1236
+ description: "Computer id (cmp_...), as returned by computers.create or computers.list."
1237
+ }
1238
+ ],
1239
+ query: [],
1240
+ body: {
1241
+ required: true,
1242
+ fields: [
1243
+ {
1244
+ name: "name",
1245
+ type: "string",
1246
+ required: true,
1247
+ description: "Name of the entry or object."
1248
+ }
1249
+ ]
1250
+ }
1251
+ },
1221
1252
  {
1222
1253
  resource: "agent.computers.leases",
1223
1254
  method: "delete",
@@ -6100,7 +6131,7 @@ file at the root of that directory.`
6100
6131
  "allow"
6101
6132
  ],
6102
6133
  required: false,
6103
- description: "skip (default) skips when a previous run is still active; allow permits overlapping runs."
6134
+ description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
6104
6135
  },
6105
6136
  {
6106
6137
  name: "catchup_window_seconds",
@@ -6274,7 +6305,7 @@ file at the root of that directory.`
6274
6305
  "allow"
6275
6306
  ],
6276
6307
  required: false,
6277
- description: "skip (default) skips when a previous run is still active; allow permits overlapping runs."
6308
+ description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
6278
6309
  },
6279
6310
  {
6280
6311
  name: "catchup_window_seconds",
@@ -9962,7 +9993,7 @@ Execution errors include error.details.prints containing output printed before f
9962
9993
  resource: "cut.projects.analysis",
9963
9994
  method: "create",
9964
9995
  summary: "Analyze project media",
9965
- description: "Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible.",
9996
+ description: "Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed.",
9966
9997
  http: "POST",
9967
9998
  path: "/cut/v1/projects/{project_id}/analysis",
9968
9999
  streaming: "no",
@@ -10133,6 +10164,18 @@ Execution errors include error.details.prints containing output printed before f
10133
10164
  body: {
10134
10165
  required: true,
10135
10166
  fields: [
10167
+ {
10168
+ name: "folder",
10169
+ type: "string",
10170
+ required: false,
10171
+ description: "Optional destination path within the bound media library; omitted uses its default folder."
10172
+ },
10173
+ {
10174
+ name: "name",
10175
+ type: "string",
10176
+ required: false,
10177
+ description: "Nonempty display name, frozen with the export. Path separators and control characters become hyphens; limited to 200 characters. Omitted uses project name and timestamp."
10178
+ },
10136
10179
  {
10137
10180
  name: "output",
10138
10181
  type: "object",
@@ -10150,6 +10193,12 @@ Execution errors include error.details.prints containing output printed before f
10150
10193
  type: "integer",
10151
10194
  required: false,
10152
10195
  description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
10196
+ },
10197
+ {
10198
+ name: "loudness",
10199
+ type: "object",
10200
+ required: false,
10201
+ description: "Loudness normalization target. Omitted, the export is normalized to -14 LUFS integrated and -1 dBTP true peak, the level short-video and streaming platforms play at; null renders without normalization. Normalization adds analysis and rendering work."
10153
10202
  }
10154
10203
  ]
10155
10204
  }
@@ -10158,7 +10207,7 @@ Execution errors include error.details.prints containing output printed before f
10158
10207
  resource: "cut.projects.frames",
10159
10208
  method: "list",
10160
10209
  summary: "Render preview frames",
10161
- description: "Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. Decode its base64 payload to save the image. Codemode returns at most four images per call, so request at most four times when reviewing there.",
10210
+ description: "Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. The default scale is 0.25; use 0.5 for subtitle layout inspection (1080×1920 renders at 540×960). The maximum is 0.5; values above it return INVALID_PARAMS. Actual width and height are returned per frame. PNGs above 2 MiB or responses above 4 MiB return RESPONSE_TOO_LARGE without silently lowering resolution. The response always includes warnings; FRAME_UNAVAILABLE means a source preview could not be obtained and an offline tile was drawn. Its message identifies a timeout, delivery capacity limit, or unavailable source and contains no source URL. Decode each image's base64 payload to save it. Codemode returns at most four images per call, so request at most four times when reviewing there.",
10162
10211
  http: "GET",
10163
10212
  path: "/cut/v1/projects/{project_id}/frames",
10164
10213
  streaming: "no",
@@ -10181,7 +10230,7 @@ Execution errors include error.details.prints containing output printed before f
10181
10230
  name: "scale",
10182
10231
  type: "number",
10183
10232
  required: false,
10184
- description: "Positive image size multiplier; 0.5 renders at half the project dimensions."
10233
+ description: "Image size multiplier, default 0.25, greater than zero and at most 0.5. Larger values return INVALID_PARAMS; pixel-area limits may reduce actual dimensions, reported as width and height."
10185
10234
  },
10186
10235
  {
10187
10236
  name: "revision",
@@ -10375,85 +10424,154 @@ Execution errors include error.details.prints containing output printed before f
10375
10424
  summary: "Execute editing script",
10376
10425
  description: `Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: \`const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);\`
10377
10426
 
10378
- ### Script function reference
10427
+ <!-- cut-reference:start -->
10428
+ ### Script function, field and error reference
10379
10429
 
10380
- Functions are synchronous globals; do not import them. \`project\` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. Reads see earlier writes in the same script.
10430
+ Every script function, clip field and error code has its own section, read one at a time:
10381
10431
 
10382
- \`\`\`ts
10383
- GetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;
10384
- GetItem(id: ClipId): ItemView;
10385
- FindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];
10386
- GetMedia(ref: MediaRef): MediaInfo;
10387
- GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
10388
- GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
10389
- Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
10390
- Update(id: ClipId, patch: ItemPatchView): void;
10391
- Delete(id: ClipId, o?: { ripple?: boolean }): void;
10392
- Split(id: ClipId, at: number): ClipId;
10393
- Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
10394
- Move(id: ClipId, start: number, track?: TrackId): void;
10395
- RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
10396
- AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
10397
- UpdateTrack(id: TrackId, patch: TrackPatch): void;
10398
- DeleteTrack(id: TrackId): void;
10399
- SetSettings(patch: Partial<ProjectSettingsView>): void;
10400
- AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
10401
- SetMarker(at: number, label: string): string;
10402
- Print(...values: unknown[]): void;
10403
- Preview(at: number[]): void;
10432
+ \`\`\`
10433
+ codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
10434
+ codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
10435
+ codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
10436
+ codemode.describe("praxis.cut.script") // names, one page at a time
10404
10437
  \`\`\`
10405
10438
 
10406
- | Functions | Behavior and arguments |
10407
- | --- | --- |
10408
- | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration and tracks (id, kind, name, index, locked, items); from/to and tracks narrow the read. |
10409
- | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
10410
- | GetMedia | Read metadata for \`{libraryId, assetId}\` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
10411
- | 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. |
10412
- | 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. |
10413
- | 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. |
10414
- | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
10415
- | 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. |
10416
- | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
10417
- | 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. |
10418
- | SetMarker | Add a label at a timeline time and return its ID. |
10419
- | 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. |
10420
-
10421
- #### Insert fields (ItemInit)
10422
-
10423
- Every item requires \`type\` and \`start\`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.
10424
-
10425
- | type | Required fields beyond type/start | Optional fields |
10426
- | --- | --- | --- |
10427
- | video | media | length, sourceIn, volumeDb, transform, fit, animate, transitionIn, transitionOut |
10428
- | image | media, length | transform, fit, animate, transitionIn, transitionOut |
10429
- | text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |
10430
- | color | color, length | transform, fill, animate, transitionIn, transitionOut |
10431
- | shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |
10432
- | audio | media | length, sourceIn, volumeDb, fadeIn, fadeOut, transitionIn, transitionOut |
10433
- | caption | text, length | — |
10434
-
10435
- 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.
10439
+ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
10436
10440
 
10437
- | Field | Value |
10438
- | --- | --- |
10439
- | transform | Partial \`{x, y, scale, rotation, opacity, crop, blur}\`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is \`{top,right,bottom,left}\`. blur is 0–100 pixels at 1080-pixel frame height. |
10440
- | style | Partial \`{fontFamily, fontSize, fontWeight, color, stroke, background, align, maxWidth}\`. fontFamily: Geist or Noto Sans SC (default); fontSize defaults to 48; fontWeight: 400 (default), 500 or 700; color defaults to #FFFFFF; align: left, center (default), right; maxWidth is a fraction of canvas width (default 0.9). stroke is \`{color,width}\`. Caption style additionally supports position (top/middle/bottom), margin (0–0.4 of canvas height), highlightColor and maxLines: 2. |
10441
- | animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of \`{at: number, value: number, ease?: Ease}\` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |
10442
- | Ease | linear, in, out, inOut, \`{bezier: [x1,y1,x2,y2]}\` or \`{spring: {stiffness, damping, mass?}}\`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |
10443
- | reveal | \`{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}\`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |
10444
- | fill | A color string (#RRGGBB or #RRGGBBAA), \`{linear: {angle, stops: [{at,color}, ...]}}\` or \`{radial: {stops: [{at,color}, ...]}}\`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |
10445
- | 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}\`. |
10446
- | 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. |
10441
+ #### Script functions (script)
10447
10442
 
10448
- #### Update fields (ItemPatchView)
10443
+ - \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
10444
+ - \`GetItem\` — One clip's compact view, by id.
10445
+ - \`FindItems\` — Visit every clip with its track; collect results.
10446
+ - \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
10447
+ - \`GetTranscript\` — Transcript words in source microseconds.
10448
+ - \`GetAnalysis\` — Silence, filler or scene segments.
10449
+ - \`ListTransitions\` — Join transition kinds and parameters.
10450
+ - \`ListEffects\` — Visual-effect catalog and parameters.
10451
+ - \`ListAnimations\` — Animation presets by phase and target.
10452
+ - \`ListFonts\` — Font families, weights and scripts.
10453
+ - \`ListTextStyles\` — Text style presets for \`style.preset\`.
10454
+ - \`ListTextTemplates\` — Multi-layer templates and their slots.
10455
+ - \`Insert\` — Add a clip; a track never overlaps itself.
10456
+ - \`Update\` — Change named fields; the rest stay.
10457
+ - \`SetSpeed\` — Change rate, keeping source or duration.
10458
+ - \`Delete\` — Remove a clip. There is no \`Remove\`.
10459
+ - \`Join\` — Overlap clips; followers shift, track shortens.
10460
+ - \`UpdateJoin\` — Change a join's length or effect.
10461
+ - \`DeleteJoin\` — Remove a join; restore the butt cut.
10462
+ - \`Split\` — Cut a clip in two at a time.
10463
+ - \`Trim\` — Move one clip edge by seconds.
10464
+ - \`Move\` — Set a clip's start or track.
10465
+ - \`RippleDeleteRange\` — Cut a time range and close the gap.
10466
+ - \`AddTrack\` — Add a video, audio or caption track.
10467
+ - \`UpdateTrack\` — Change a track's name, lock, gain or role.
10468
+ - \`DeleteTrack\` — Remove a track and its clips.
10469
+ - \`SetSettings\` — Change canvas, frame rate or background.
10470
+ - \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
10471
+ - \`InsertTemplate\` — Insert a template and fill its slots.
10472
+ - \`AlignCaptions\` — Rebuild captions from text punctuation.
10473
+ - \`ImportCaptions\` — Import SRT or WebVTT onto captions.
10474
+ - \`ExportCaptions\` — Export captions as SRT or WebVTT.
10475
+ - \`SetMarker\` — Label a timeline position.
10476
+ - \`Print\` — Append values to the result's \`prints\`.
10477
+ - \`Preview\` — Up to 8 frames as inline PNG data URLs.
10449
10478
 
10450
- All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: \`Update(id, {volumeDb: -12})\` or \`Update(id, {transitionIn: null})\`.
10479
+ #### Fields (fields)
10451
10480
 
10452
- #### Script names versus HTTP response names
10481
+ - \`type\` — Clip kind; decides which fields apply.
10482
+ - \`start\` — Clip start in seconds; snaps to frames.
10483
+ - \`length\` — Duration; optional for video and audio.
10484
+ - \`media\` — Source \`{ libraryId, assetId }\`.
10485
+ - \`sourceIn\` — First source second kept; default 0.
10486
+ - \`sourceOut\` — Exclusive source end; read-only.
10487
+ - \`text\` — Text of a text or caption clip.
10488
+ - \`color\` — Solid colour of a color clip.
10489
+ - \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
10490
+ - \`width\` — Shape width, a fraction of canvas width.
10491
+ - \`height\` — Shape height, a fraction of canvas height.
10492
+ - \`radius\` — Rect corner rounding, in 1080-height px.
10493
+ - \`fill\` — Shape or text paint: colour or gradient.
10494
+ - \`stroke\` — Shape outline: colour and width.
10495
+ - \`transform\` — Position, scale, rotation, opacity, crop, blur.
10496
+ - \`fit\` — contain, cover, fill or none.
10497
+ - \`blend\` — Layer blend mode; null clears.
10498
+ - \`style\` — Text styling: font, fill, strokes, glow, position.
10499
+ - \`style.position\` — top, middle or bottom; omit it, never null.
10500
+ - \`playback\` — Rate, direction, audio policy, or freeze.
10501
+ - \`volumeDb\` — Audio level in dB; 0 is source level.
10502
+ - \`gain\` — Keyframed audio level in dB.
10503
+ - \`fadeIn\` — Fade-in seconds at the clip's start.
10504
+ - \`fadeOut\` — Fade-out seconds at the clip's end.
10505
+ - \`duck\` — Lower this clip while another track plays.
10506
+ - \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
10507
+ - \`reveal\` — Per-character, word or line reveal timing.
10508
+ - \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
10509
+ - \`effects\` — Effect stack, at most 8; null clears.
10510
+ - \`transitionIn\` — Entrance effect: kind plus seconds.
10511
+ - \`transitionOut\` — Exit effect: kind plus seconds.
10512
+ - \`mask\` — Shape, path or track matte.
10513
+ - \`words\` — Caption words with clip-local times.
10453
10514
 
10454
- Use camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.
10515
+ #### Error codes (errors)
10455
10516
 
10456
- Unrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection's #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.
10517
+ - \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
10518
+ - \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
10519
+ - \`INVALID_STYLE\` — A style value is out of range.
10520
+ - \`INVALID_MASK\` — A mask definition is malformed.
10521
+ - \`MASK_IN_USE\` — The edit would break a live mask.
10522
+ - \`TOO_MANY_MASKS\` — At most 16 masks per project.
10523
+ - \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
10524
+ - \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
10525
+ - \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
10526
+ - \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
10527
+ - \`UNKNOWN_FIELD\` — The field name is not accepted here.
10528
+ - \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
10529
+ - \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
10530
+ - \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
10531
+ - \`OVERLAP\` — Two clips on one track would share time.
10532
+ - \`OUT_OF_SOURCE\` — The clip would read past its source.
10533
+ - \`LOCKED_TRACK\` — The edit targets a locked track.
10534
+ - \`UNBOUND_LIBRARY\` — The library is not bound to the project.
10535
+ - \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
10536
+ - \`NOT_FOUND\` — The named id is not in this project.
10537
+ - \`TOO_SHORT\` — The result would be under one frame.
10538
+ - \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
10539
+ - \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
10540
+ - \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
10541
+ - \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
10542
+ - \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
10543
+ - \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
10544
+ - \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
10545
+ - \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
10546
+ - \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
10547
+ - \`PROJECT_NOT_FOUND\` — No visible project has this id.
10548
+ - \`EXPORT_NOT_FOUND\` — No such export in this project.
10549
+ - \`VERSION_NOT_FOUND\` — No saved version has this revision.
10550
+ - \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
10551
+ - \`BINDING_INVALID\` — The binding request is malformed.
10552
+ - \`BINDING_IN_USE\` — Clips still use this library's assets.
10553
+ - \`NOTHING_TO_UNDO\` — No earlier revision to return to.
10554
+ - \`NOTHING_TO_REDO\` — No undone revision is waiting.
10555
+ - \`UNDO_CONFLICT\` — The revision to undo is no longer head.
10556
+ - \`REVISION_CONFLICT\` — The project moved; your revision is stale.
10557
+ - \`CUT_BUSY\` — The project is busy; retry.
10558
+ - \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
10559
+ - \`SCRIPT_ERROR\` — The script threw or did not parse.
10560
+ - \`SCRIPT_LIMIT\` — An execute budget was exceeded.
10561
+ - \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
10562
+ - \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
10563
+ - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
10564
+ - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
10565
+ - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
10566
+ - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
10567
+ - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
10568
+ - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
10569
+ - \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
10570
+ - \`INVALID_PARAMS\` — The request is malformed.
10571
+ - \`PERMISSION_DENIED\` — This credential may not do that here.
10572
+ - \`NOT_IMPLEMENTED\` — Not available on this platform yet.
10573
+ - \`INTERNAL\` — Unexpected failure; retry with the request id.
10574
+ <!-- cut-reference:end -->
10457
10575
  `,
10458
10576
  http: "POST",
10459
10577
  path: "/cut/v1/projects/{project_id}:execute",
@@ -11641,7 +11759,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11641
11759
  resource: "file.files.contentLinks",
11642
11760
  method: "revoke",
11643
11761
  summary: "Revoke a file content link",
11644
- description: 'Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 30 seconds; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.',
11762
+ description: 'Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 15 minutes; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.',
11645
11763
  http: "POST",
11646
11764
  path: "/file/v1/files/{file_id}/content_links:revoke",
11647
11765
  streaming: "no",
@@ -11670,7 +11788,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11670
11788
  resource: "file.files.contentUrl",
11671
11789
  method: "create",
11672
11790
  summary: "Create a download URL",
11673
- description: `Download a file's bytes to a local disk from a coding agent without sending them through the model. Use file_id from file creation or listing, then run curl -fsSL -o <filename> '<url>' locally with the returned URL; GET needs no Authorization header. The link is reusable until expiry and supports a single byte Range (for example Range: bytes=0-9 returns 206). Revoke it with files.contentLinks.revoke, passing the token after /c/ in the URL. Expired, revoked, invalid or cross-organization URLs return 404. Lifetime defaults to 3600 seconds and is at most 604800 seconds. Issuance requires the same credential and file-read access as files.retrieveContent; a processing file returns 409 FILE_NOT_READY, so poll files.retrieve until active before retrying. A missing, expired or other-organization file returns 404. Each issuance creates a new link. OpenAI Files has no signed download URL; this follows S3 presigned GET semantics. Example body: {"ttl_seconds":3600}.`,
11791
+ description: `Download a file's bytes to a local disk from a coding agent without sending them through the model. Use file_id from file creation or listing, then run curl -fsSL -o <filename> '<url>' locally with the returned URL; GET needs no Authorization header. The link is reusable until expiry and supports a single byte Range (for example Range: bytes=0-9 returns 206). Revoke it with files.contentLinks.revoke, passing the token after /c/ in the URL. Expired, revoked, invalid or cross-organization URLs return 404. Lifetime defaults to 900 seconds and is at most 604800 seconds. Issuance requires the same credential and file-read access as files.retrieveContent; a processing file returns 409 FILE_NOT_READY, so poll files.retrieve until active before retrying. A missing, expired or other-organization file returns 404. Each issuance creates a new link. OpenAI Files has no signed download URL; this follows S3 presigned GET semantics. Example body: {"ttl_seconds":3600}.`,
11674
11792
  http: "POST",
11675
11793
  path: "/file/v1/files/{file_id}/content_url",
11676
11794
  streaming: "no",
@@ -11690,7 +11808,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11690
11808
  name: "ttl_seconds",
11691
11809
  type: "integer",
11692
11810
  required: false,
11693
- description: "Download link lifetime in seconds, from 1 through 604800; omitted means 3600. This does not change the file's own expiry."
11811
+ description: "Download link lifetime in seconds, from 1 through 604800; omitted means 900. This does not change the file's own expiry."
11694
11812
  }
11695
11813
  ]
11696
11814
  }
@@ -11699,7 +11817,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11699
11817
  resource: "file.uploads",
11700
11818
  method: "create",
11701
11819
  summary: "Create an upload",
11702
- description: "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.",
11820
+ description: "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.",
11703
11821
  http: "POST",
11704
11822
  path: "/file/v1/uploads",
11705
11823
  streaming: "no",
@@ -11713,7 +11831,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11713
11831
  name: "bytes",
11714
11832
  type: "integer",
11715
11833
  required: true,
11716
- description: "Exact complete file length in bytes, from 1 through 2147483648 (2 GiB); the sum of completed parts must match."
11834
+ description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
11717
11835
  },
11718
11836
  {
11719
11837
  name: "filename",
@@ -11757,7 +11875,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11757
11875
  resource: "file.uploads",
11758
11876
  method: "createSigned",
11759
11877
  summary: "Create a one-time upload URL",
11760
- description: "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\"}.",
11878
+ description: "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\"}.",
11761
11879
  http: "POST",
11762
11880
  path: "/file/v1/uploads/signed",
11763
11881
  streaming: "no",
@@ -11777,7 +11895,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11777
11895
  name: "bytes",
11778
11896
  type: "integer",
11779
11897
  required: true,
11780
- description: "Exact local file size in bytes, from 1 through 2147483648 (2 GiB). Up to 104857600 bytes returns one PUT URL; larger files return numbered part URLs and a completion URL. Every PUT requires its exact signed Content-Length."
11898
+ description: "Exact local file size in bytes, from 1 through 21474836480 (20 GiB). Up to 104857600 bytes returns one PUT URL; larger files return numbered part URLs, a completion URL and a status URL. Every PUT requires its exact signed Content-Length."
11781
11899
  },
11782
11900
  {
11783
11901
  name: "content_type",
@@ -11800,7 +11918,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11800
11918
  name: "expires_in",
11801
11919
  type: "integer",
11802
11920
  required: false,
11803
- description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or 3600 for multipart. All part URLs and the completion URL share one expiry. This does not set the resulting file's lifetime."
11921
+ description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or 604800 (7 days) for multipart. All part URLs, the status URL and the completion URL share one expiry. This does not set the resulting file's lifetime."
11804
11922
  },
11805
11923
  {
11806
11924
  name: "part_size",
@@ -11811,6 +11929,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11811
11929
  ]
11812
11930
  }
11813
11931
  },
11932
+ {
11933
+ resource: "file.uploads",
11934
+ method: "retrieve",
11935
+ summary: "Retrieve an upload",
11936
+ description: "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.",
11937
+ http: "GET",
11938
+ path: "/file/v1/uploads/{upload_id}",
11939
+ streaming: "no",
11940
+ pagination: false,
11941
+ pathParams: [
11942
+ {
11943
+ name: "upload_id",
11944
+ sdkName: "upload_id",
11945
+ description: "Upload identifier returned by create; the upload must belong to your organization."
11946
+ }
11947
+ ],
11948
+ query: []
11949
+ },
11814
11950
  {
11815
11951
  resource: "file.uploads",
11816
11952
  method: "cancel",
@@ -11833,7 +11969,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11833
11969
  resource: "file.uploads",
11834
11970
  method: "complete",
11835
11971
  summary: "Complete an upload",
11836
- description: "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.",
11972
+ description: "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.",
11837
11973
  http: "POST",
11838
11974
  path: "/file/v1/uploads/{upload_id}/complete",
11839
11975
  streaming: "no",
@@ -11869,7 +12005,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11869
12005
  resource: "file.uploads.parts",
11870
12006
  method: "create",
11871
12007
  summary: "Add an upload part",
11872
- description: "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.",
12008
+ description: "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.",
11873
12009
  http: "POST",
11874
12010
  path: "/file/v1/uploads/{upload_id}/parts",
11875
12011
  streaming: "no",
@@ -11957,7 +12093,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11957
12093
  resource: "knowledge.vectorStores",
11958
12094
  method: "create",
11959
12095
  summary: "Create knowledge base",
11960
- description: 'Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.',
12096
+ description: 'Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.',
11961
12097
  http: "POST",
11962
12098
  path: "/knowledge/v1/vector_stores",
11963
12099
  streaming: "no",
@@ -11996,7 +12132,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11996
12132
  name: "chunking_strategy",
11997
12133
  type: "object",
11998
12134
  required: false,
11999
- description: "auto resolves to static with 800 estimated tokens and 400 overlap tokens. Unlike OpenAI vector stores, token counts are estimates; each Han character counts as one, and other whitespace-delimited words count as their UTF-16 length divided by four, rounded up."
12135
+ description: "Native attachment strategy. auto uses static chunks of 800 estimated tokens with 400 overlap; static supplies explicit chunk sizes; hierarchical indexes child chunks and supplies bounded parent context. Existing attachments are reused unchanged; remove and reattach a file to change its strategy."
12000
12136
  },
12001
12137
  {
12002
12138
  name: "description",
@@ -12343,7 +12479,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12343
12479
  resource: "knowledge.vectorStores.files",
12344
12480
  method: "create",
12345
12481
  summary: "Add file",
12346
- description: "Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.",
12482
+ description: "Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.",
12347
12483
  http: "POST",
12348
12484
  path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
12349
12485
  streaming: "no",
@@ -12375,7 +12511,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12375
12511
  name: "chunking_strategy",
12376
12512
  type: "object",
12377
12513
  required: false,
12378
- description: "auto resolves to static with 800 estimated tokens and 400 overlap tokens. Unlike OpenAI vector stores, token counts are estimates; each Han character counts as one, and other whitespace-delimited words count as their UTF-16 length divided by four, rounded up."
12514
+ description: "Native attachment strategy. auto uses static chunks of 800 estimated tokens with 400 overlap; static supplies explicit chunk sizes; hierarchical indexes child chunks and supplies bounded parent context. Existing attachments are reused unchanged; remove and reattach a file to change its strategy."
12379
12515
  }
12380
12516
  ]
12381
12517
  }
@@ -12682,11 +12818,23 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12682
12818
  ],
12683
12819
  query: []
12684
12820
  },
12821
+ {
12822
+ resource: "media.generation.capabilities",
12823
+ method: "list",
12824
+ summary: "Get generation capabilities",
12825
+ description: "Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.",
12826
+ http: "GET",
12827
+ path: "/media/v1/generation/capabilities",
12828
+ streaming: "no",
12829
+ pagination: false,
12830
+ pathParams: [],
12831
+ query: []
12832
+ },
12685
12833
  {
12686
12834
  resource: "media.libraries",
12687
12835
  method: "list",
12688
12836
  summary: "List libraries",
12689
- description: "List libraries owned by the caller, newest first. By default, deleting and deleted libraries are excluded; use status=deleting to find libraries awaiting purge. All supplied label pairs must match.",
12837
+ description: "Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.",
12690
12838
  http: "GET",
12691
12839
  path: "/media/v1/libraries",
12692
12840
  streaming: "no",
@@ -12768,7 +12916,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12768
12916
  resource: "media.libraries",
12769
12917
  method: "delete",
12770
12918
  summary: "Delete library",
12771
- description: "Soft-delete an active library, returning its deleting status and purge_at deadline. Asset operations and delivery become unavailable; the library can be restored before purge_at. Repeated deletion while deleting returns the current library.",
12919
+ description: "Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.",
12772
12920
  http: "DELETE",
12773
12921
  path: "/media/v1/libraries/{library_id}",
12774
12922
  streaming: "no",
@@ -12786,7 +12934,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12786
12934
  resource: "media.libraries",
12787
12935
  method: "retrieve",
12788
12936
  summary: "Get library",
12789
- description: "Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.",
12937
+ description: "Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.",
12790
12938
  http: "GET",
12791
12939
  path: "/media/v1/libraries/{library_id}",
12792
12940
  streaming: "no",
@@ -12804,7 +12952,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12804
12952
  resource: "media.libraries",
12805
12953
  method: "update",
12806
12954
  summary: "Update library",
12807
- description: "Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.",
12955
+ description: "Update an active library. Set hotwords for spelling evidence in subsequent transcripts; [] disables inferred vocabulary. Transcript understanding calls the timestamped ASR, optional reference ASR and correction model through the existing metered model path. Reprocess assets to apply new settings to existing transcripts.",
12808
12956
  http: "PATCH",
12809
12957
  path: "/media/v1/libraries/{library_id}",
12810
12958
  streaming: "no",
@@ -12820,6 +12968,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12820
12968
  body: {
12821
12969
  required: true,
12822
12970
  fields: [
12971
+ {
12972
+ name: "hotwords",
12973
+ type: "array",
12974
+ itemType: "string",
12975
+ required: false,
12976
+ description: "Correction vocabulary, at most 200 nonblank terms of at most 32 Unicode characters each. Omitted on an unconfigured library: correction derives up to 200 distinct names from the library name and every folder level, excluding generic names such as 原始素材 and 混剪成品. An explicit empty array disables this vocabulary. Updating affects subsequent understanding and explicit reprocessing, not existing results."
12977
+ },
12823
12978
  {
12824
12979
  name: "models",
12825
12980
  type: "object",
@@ -12851,7 +13006,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12851
13006
  resource: "media.libraries.assets",
12852
13007
  method: "list",
12853
13008
  summary: "List assets",
12854
- description: "List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.",
13009
+ description: "Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.",
12855
13010
  http: "GET",
12856
13011
  path: "/media/v1/libraries/{library_id}/assets",
12857
13012
  streaming: "no",
@@ -12899,7 +13054,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12899
13054
  resource: "media.libraries.assets",
12900
13055
  method: "create",
12901
13056
  summary: "Upload asset",
12902
- description: "Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.",
13057
+ description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
12903
13058
  http: "POST",
12904
13059
  path: "/media/v1/libraries/{library_id}/assets",
12905
13060
  streaming: "no",
@@ -12944,7 +13099,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12944
13099
  name: "asset_folder",
12945
13100
  type: "string",
12946
13101
  required: false,
12947
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13102
+ description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
12948
13103
  },
12949
13104
  {
12950
13105
  name: "use_filename",
@@ -13023,7 +13178,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13023
13178
  resource: "media.libraries.assets.import",
13024
13179
  method: "create",
13025
13180
  summary: "Import file",
13026
- description: "Copy source content into an active library using upload options and return the full native Asset. The imported asset is independent of the source after copying. Reusing public_id follows overwrite semantics.",
13181
+ description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
13027
13182
  http: "POST",
13028
13183
  path: "/media/v1/libraries/{library_id}/assets/import",
13029
13184
  streaming: "no",
@@ -13043,7 +13198,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13043
13198
  name: "file_id",
13044
13199
  type: "string",
13045
13200
  required: true,
13046
- description: "File ID to copy into this library instead of file bytes. This independent copy defaults to public delivery; set type=authenticated for private delivery. Deleting the source File does not delete this asset."
13201
+ description: "File ID to copy into this library instead of file bytes. This independent copy defaults to organization-private delivery (type=authenticated); explicitly set type=upload for public delivery. Deleting the source File does not delete this asset."
13047
13202
  },
13048
13203
  {
13049
13204
  name: "public_id",
@@ -13067,7 +13222,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13067
13222
  name: "asset_folder",
13068
13223
  type: "string",
13069
13224
  required: false,
13070
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13225
+ description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
13071
13226
  },
13072
13227
  {
13073
13228
  name: "use_filename",
@@ -13146,7 +13301,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13146
13301
  resource: "media.libraries.assets",
13147
13302
  method: "delete",
13148
13303
  summary: "Delete asset",
13149
- description: "Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.",
13304
+ description: "Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks and legacy source-size unsupported tasks; explicit kinds rerun applicable completed tasks and recoverable source-size unsupported tasks. Other unsupported causes remain unchanged. Replaced understandings become superseded, and processing finishes asynchronously.",
13150
13305
  http: "DELETE",
13151
13306
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13152
13307
  streaming: "no",
@@ -13169,7 +13324,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13169
13324
  resource: "media.libraries.assets",
13170
13325
  method: "retrieve",
13171
13326
  summary: "Get asset",
13172
- description: "Read a non-deleted asset by its asset_id in an active library, including content hashes, processing progress and available previews. Missing or deleted assets return ASSET_NOT_FOUND.",
13327
+ description: "Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.",
13173
13328
  http: "GET",
13174
13329
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13175
13330
  streaming: "no",
@@ -13192,7 +13347,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13192
13347
  resource: "media.libraries.assets",
13193
13348
  method: "update",
13194
13349
  summary: "Update asset",
13195
- description: "Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.",
13350
+ description: "Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.",
13196
13351
  http: "PATCH",
13197
13352
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13198
13353
  streaming: "no",
@@ -13223,7 +13378,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13223
13378
  name: "asset_folder",
13224
13379
  type: "string",
13225
13380
  required: false,
13226
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13381
+ description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
13227
13382
  },
13228
13383
  {
13229
13384
  name: "tags",
@@ -13241,11 +13396,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13241
13396
  ]
13242
13397
  }
13243
13398
  },
13399
+ {
13400
+ resource: "media.libraries.assets.frames",
13401
+ method: "create",
13402
+ summary: "Create frame URLs",
13403
+ description: 'Media creates JPEG frame URLs for inspecting one or more moments in a video without downloading the original. Obtain library_id from libraries and asset_id plus duration from assets. Send 1–20 integer microsecond timestamps strictly below duration, for example {"at_micros":[0,1000000],"width":640}. Only video assets are supported; audio and images return INVALID_PARAMS. Width defaults to 640 and accepts 160, 320 or 640. This read operation does not store a new asset or rerun understanding. Fetch each returned URL to obtain the frame; delivery usage follows media pricing. Authenticated links expire after 300 seconds; upload links remain public and permanent. Reissue expired links. Foreign libraries and assets return 404 without revealing their existence.',
13404
+ http: "POST",
13405
+ path: "/media/v1/libraries/{library_id}/assets/{asset_id}/frames",
13406
+ streaming: "no",
13407
+ pagination: false,
13408
+ pathParams: [
13409
+ {
13410
+ name: "library_id",
13411
+ sdkName: "library_id",
13412
+ description: "Library identifier returned by library creation or listing; must be accessible to the current credential."
13413
+ },
13414
+ {
13415
+ name: "asset_id",
13416
+ sdkName: "asset_id",
13417
+ description: "Video asset identifier returned by asset upload or listing in this library; read its duration before choosing timestamps."
13418
+ }
13419
+ ],
13420
+ query: [],
13421
+ body: {
13422
+ required: true,
13423
+ fields: [
13424
+ {
13425
+ name: "at_micros",
13426
+ type: "array",
13427
+ itemType: "integer",
13428
+ required: true,
13429
+ description: "One to twenty timestamps in microseconds from the start of the video. Each must be a nonnegative safe integer strictly below the video duration; order and duplicates are preserved."
13430
+ },
13431
+ {
13432
+ name: "width",
13433
+ type: "integer",
13434
+ enum: [
13435
+ 160,
13436
+ 320,
13437
+ 640
13438
+ ],
13439
+ required: false,
13440
+ description: "Maximum JPEG width in pixels: 160 is a small thumbnail, 320 a preview and 640 a larger preview. Defaults to 640; larger widths are unavailable."
13441
+ }
13442
+ ]
13443
+ }
13444
+ },
13244
13445
  {
13245
13446
  resource: "media.libraries.assets.reprocess",
13246
13447
  method: "create",
13247
13448
  summary: "Reprocess asset",
13248
- description: "Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks; explicit kinds rerun applicable completed tasks. Replaced understandings become superseded, and processing finishes asynchronously.",
13449
+ description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
13249
13450
  http: "POST",
13250
13451
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
13251
13452
  streaming: "no",
@@ -13277,7 +13478,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13277
13478
  "embedding"
13278
13479
  ],
13279
13480
  required: false,
13280
- description: "Processing tasks to rerun. Omit to retry failed tasks only; explicit kinds rerun applicable ready, failed or unsupported tasks. Pending and running tasks are unchanged; an empty array does nothing."
13481
+ description: "Processing tasks to rerun. Omit to retry failed tasks and legacy source-size unsupported tasks; explicit kinds rerun applicable ready or failed tasks and recoverable source-size unsupported tasks. Other unsupported causes remain unchanged. Pending and running tasks are unchanged; an empty array does nothing."
13281
13482
  }
13282
13483
  ]
13283
13484
  }
@@ -13286,7 +13487,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13286
13487
  resource: "media.libraries.assets.understandings",
13287
13488
  method: "list",
13288
13489
  summary: "List understandings",
13289
- description: "List an asset’s understanding results in creation order. By default only current, non-superseded results are returned; use include_superseded=true for history or kind to select an output type.",
13490
+ description: "List understanding results for an asset, ordered by creation time. Use the cursor to continue; include_superseded also returns replaced records. The optional shots array contains current-version shot boundaries and per-shot captions, scene, location guesses, visible text and confidence flags; it is absent on legacy records. Location guesses and folder mismatch are unverified hints. Correction-enabled transcripts expose text_original, corrected text and a correction audit. Their timed data array remains suitable for subtitles. Reference failure is marked missing; correction failure returns the original verbatim. Model inference uses the existing metered model path.",
13290
13491
  http: "GET",
13291
13492
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/understandings",
13292
13493
  streaming: "no",
@@ -13318,10 +13519,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13318
13519
  "tags",
13319
13520
  "ocr",
13320
13521
  "transcript",
13321
- "frame"
13522
+ "frame",
13523
+ "overview",
13524
+ "audio",
13525
+ "embedding"
13322
13526
  ],
13323
13527
  required: false,
13324
- description: "Filter result kind: caption is a visual description, tags are recognized labels, ocr is recognized image text, transcript is speech text, and frame describes a video segment."
13528
+ description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, and embedding reports a failed embedding step."
13325
13529
  },
13326
13530
  {
13327
13531
  name: "cursor",
@@ -13341,7 +13545,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13341
13545
  resource: "media.libraries.assets",
13342
13546
  method: "batch",
13343
13547
  summary: "Batch assets alias",
13344
- description: "Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.",
13548
+ description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
13345
13549
  http: "POST",
13346
13550
  path: "/media/v1/libraries/{library_id}/assets:batch",
13347
13551
  streaming: "no",
@@ -13362,6 +13566,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13362
13566
  type: "object",
13363
13567
  required: true,
13364
13568
  description: "Select assets by ids or by expression, never both. Expression results and exclusions are resolved when the job is created."
13569
+ },
13570
+ {
13571
+ name: "reason",
13572
+ type: "string",
13573
+ required: false,
13574
+ description: "Audit reason for the operation; required for staff Admin reprocessing and recorded with the initiating actor. Nonblank, at most 2000 characters."
13365
13575
  }
13366
13576
  ]
13367
13577
  }
@@ -13370,7 +13580,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13370
13580
  resource: "media.libraries.batches",
13371
13581
  method: "create",
13372
13582
  summary: "Create batch",
13373
- description: "Create an asynchronous batch for tagging, untagging, replacing context, moving or deleting assets. Select ids or an expression; selection is frozen at creation. Poll the returned job id for completion and per-item failures.",
13583
+ description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
13374
13584
  http: "POST",
13375
13585
  path: "/media/v1/libraries/{library_id}/batches",
13376
13586
  streaming: "no",
@@ -13391,6 +13601,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13391
13601
  type: "object",
13392
13602
  required: true,
13393
13603
  description: "Select assets by ids or by expression, never both. Expression results and exclusions are resolved when the job is created."
13604
+ },
13605
+ {
13606
+ name: "reason",
13607
+ type: "string",
13608
+ required: false,
13609
+ description: "Audit reason for the operation; required for staff Admin reprocessing and recorded with the initiating actor. Nonblank, at most 2000 characters."
13394
13610
  }
13395
13611
  ]
13396
13612
  }
@@ -13399,7 +13615,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13399
13615
  resource: "media.libraries.batches",
13400
13616
  method: "retrieve",
13401
13617
  summary: "Get batch",
13402
- description: "Read a batch job’s status, successful and failed item counts, and a bounded list of failed items. Use the id returned by batch creation; a job outside this library is not found.",
13618
+ description: "Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.",
13403
13619
  http: "GET",
13404
13620
  path: "/media/v1/libraries/{library_id}/batches/{job_id}",
13405
13621
  streaming: "no",
@@ -13422,7 +13638,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13422
13638
  resource: "media.libraries.deliveryTokens",
13423
13639
  method: "create",
13424
13640
  summary: "Create delivery token",
13425
- description: "Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 3600 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.",
13641
+ description: "Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 900 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.",
13426
13642
  http: "POST",
13427
13643
  path: "/media/v1/libraries/{library_id}/delivery_tokens",
13428
13644
  streaming: "no",
@@ -13448,7 +13664,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13448
13664
  name: "expires_in",
13449
13665
  type: "integer",
13450
13666
  required: false,
13451
- description: "Token lifetime in seconds, from 1 to 604800 inclusive; defaults to 3600."
13667
+ description: "Token lifetime in seconds, from 1 to 604800 inclusive; defaults to 900."
13452
13668
  }
13453
13669
  ]
13454
13670
  }
@@ -13457,7 +13673,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13457
13673
  resource: "media.libraries.events",
13458
13674
  method: "list",
13459
13675
  summary: "List events",
13460
- description: "Read library events in sequence order, including while the library is deleting. Page forward with asc and after_seq, or backward with desc and before_seq; never combine the two sequence cursors.",
13676
+ description: "Read library events in sequence order for observing asset writes and understanding progress. Obtain library_id from creation or listing; continue with after_seq for asc or before_seq for desc, without combining both. Use next_cursor when supplied. Reads do not start or retry understanding.",
13461
13677
  http: "GET",
13462
13678
  path: "/media/v1/libraries/{library_id}/events",
13463
13679
  streaming: "no",
@@ -13504,7 +13720,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13504
13720
  resource: "media.libraries.folders",
13505
13721
  method: "list",
13506
13722
  summary: "List folders",
13507
- description: "List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.",
13723
+ description: "undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.",
13508
13724
  http: "GET",
13509
13725
  path: "/media/v1/libraries/{library_id}/folders",
13510
13726
  streaming: "no",
@@ -13525,11 +13741,155 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13525
13741
  }
13526
13742
  ]
13527
13743
  },
13744
+ {
13745
+ resource: "media.libraries.generations",
13746
+ method: "create",
13747
+ summary: "Create video generation",
13748
+ description: "Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.",
13749
+ http: "POST",
13750
+ path: "/media/v1/libraries/{library_id}/generations",
13751
+ streaming: "no",
13752
+ pagination: false,
13753
+ pathParams: [
13754
+ {
13755
+ name: "library_id",
13756
+ sdkName: "library_id",
13757
+ description: "Library ID returned by creation."
13758
+ }
13759
+ ],
13760
+ query: [],
13761
+ body: {
13762
+ required: true,
13763
+ fields: [
13764
+ {
13765
+ name: "intent",
13766
+ type: "string",
13767
+ required: true,
13768
+ description: "Generation operation; v1 accepts only video.generate text-to-video requests."
13769
+ },
13770
+ {
13771
+ name: "prompt",
13772
+ type: "string",
13773
+ required: true,
13774
+ description: "Text prompt describing the video to generate."
13775
+ },
13776
+ {
13777
+ name: "count",
13778
+ type: "integer",
13779
+ required: false,
13780
+ description: "Number of videos to generate; defaults to 1 and must be from 1 to 4."
13781
+ },
13782
+ {
13783
+ name: "duration_seconds",
13784
+ type: "integer",
13785
+ required: false,
13786
+ description: "Requested video duration in seconds; Router validates the model-specific supported durations."
13787
+ },
13788
+ {
13789
+ name: "aspect_ratio",
13790
+ type: "string",
13791
+ required: false,
13792
+ description: "Requested output aspect ratio; defaults to 16:9 and Router validates model support."
13793
+ },
13794
+ {
13795
+ name: "model",
13796
+ type: "string",
13797
+ required: false,
13798
+ description: "Router model with video_generation capability; defaults to wan2.7-t2v."
13799
+ },
13800
+ {
13801
+ name: "save",
13802
+ type: "string",
13803
+ enum: [
13804
+ "candidate",
13805
+ "library"
13806
+ ],
13807
+ required: false,
13808
+ description: "candidate keeps outputs temporary for explicit save calls; library saves successful outputs automatically."
13809
+ },
13810
+ {
13811
+ name: "asset_folder",
13812
+ type: "string",
13813
+ required: false,
13814
+ description: "Folder for assets saved automatically or by later save calls; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
13815
+ },
13816
+ {
13817
+ name: "tags",
13818
+ type: "array",
13819
+ itemType: "string",
13820
+ required: false,
13821
+ description: "Tags applied when an output becomes a library asset."
13822
+ },
13823
+ {
13824
+ name: "understanding",
13825
+ type: "string",
13826
+ enum: [
13827
+ "auto",
13828
+ "skip"
13829
+ ],
13830
+ required: false,
13831
+ description: "Understanding behavior when a candidate is saved as an asset; defaults to auto."
13832
+ },
13833
+ {
13834
+ name: "references",
13835
+ type: "array",
13836
+ itemType: "object",
13837
+ required: false,
13838
+ description: "Not supported in v1; omit this field. Only text-to-video is currently available."
13839
+ }
13840
+ ]
13841
+ }
13842
+ },
13843
+ {
13844
+ resource: "media.libraries.jobs",
13845
+ method: "list",
13846
+ summary: "List jobs",
13847
+ description: "List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.",
13848
+ http: "GET",
13849
+ path: "/media/v1/libraries/{library_id}/jobs",
13850
+ streaming: "no",
13851
+ pagination: true,
13852
+ pathParams: [
13853
+ {
13854
+ name: "library_id",
13855
+ sdkName: "library_id",
13856
+ description: "Library ID returned by creation."
13857
+ }
13858
+ ],
13859
+ query: [
13860
+ {
13861
+ name: "status",
13862
+ type: "string",
13863
+ enum: [
13864
+ "queued",
13865
+ "running",
13866
+ "completed",
13867
+ "completed_with_errors",
13868
+ "failed",
13869
+ "cancelled"
13870
+ ],
13871
+ required: false,
13872
+ description: "Filter jobs by their current status."
13873
+ },
13874
+ {
13875
+ name: "limit",
13876
+ type: "integer",
13877
+ required: false,
13878
+ description: "Maximum entries in this page, from 1 through 100; defaults to 100."
13879
+ },
13880
+ {
13881
+ name: "cursor",
13882
+ type: "string",
13883
+ required: false,
13884
+ description: "Job id from the previous page’s next_cursor; omit for the first page."
13885
+ }
13886
+ ]
13887
+ },
13528
13888
  {
13529
13889
  resource: "media.libraries.jobs",
13530
13890
  method: "retrieve",
13531
- summary: "Get job alias",
13532
- description: "Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.",
13891
+ summary: "Get job",
13892
+ description: "Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.",
13533
13893
  http: "GET",
13534
13894
  path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
13535
13895
  streaming: "no",
@@ -13543,16 +13903,101 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13543
13903
  {
13544
13904
  name: "job_id",
13545
13905
  sdkName: "job_id",
13546
- description: "Batch identifier returned by createBatch or batchAssets; resolved within this library."
13906
+ description: "Job identifier returned by batch creation, video-generation creation or job listing; resolved within this library."
13907
+ }
13908
+ ],
13909
+ query: []
13910
+ },
13911
+ {
13912
+ resource: "media.libraries.jobs",
13913
+ method: "cancel",
13914
+ summary: "Cancel job",
13915
+ description: "Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.",
13916
+ http: "POST",
13917
+ path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
13918
+ streaming: "no",
13919
+ pagination: false,
13920
+ pathParams: [
13921
+ {
13922
+ name: "library_id",
13923
+ sdkName: "library_id",
13924
+ description: "Library ID returned by creation."
13925
+ },
13926
+ {
13927
+ name: "job_id",
13928
+ sdkName: "job_id",
13929
+ description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
13547
13930
  }
13548
13931
  ],
13549
13932
  query: []
13550
13933
  },
13934
+ {
13935
+ resource: "media.libraries.jobs.outputs.save",
13936
+ method: "create",
13937
+ summary: "Save generation output",
13938
+ description: "Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.",
13939
+ http: "POST",
13940
+ path: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
13941
+ streaming: "no",
13942
+ pagination: false,
13943
+ pathParams: [
13944
+ {
13945
+ name: "library_id",
13946
+ sdkName: "library_id",
13947
+ description: "Library ID returned by creation."
13948
+ },
13949
+ {
13950
+ name: "job_id",
13951
+ sdkName: "job_id",
13952
+ description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
13953
+ },
13954
+ {
13955
+ name: "index",
13956
+ sdkName: "index",
13957
+ description: "Zero-based position of the candidate in the Job outputs array."
13958
+ }
13959
+ ],
13960
+ query: [],
13961
+ body: {
13962
+ required: false,
13963
+ fields: [
13964
+ {
13965
+ name: "public_id",
13966
+ type: "string",
13967
+ required: false,
13968
+ description: "Delivery identifier for the saved asset; defaults to gen_<job_id>_<index> and is idempotent."
13969
+ },
13970
+ {
13971
+ name: "asset_folder",
13972
+ type: "string",
13973
+ required: false,
13974
+ description: "Destination folder for the saved asset; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
13975
+ },
13976
+ {
13977
+ name: "tags",
13978
+ type: "array",
13979
+ itemType: "string",
13980
+ required: false,
13981
+ description: "Tags to apply to the saved asset."
13982
+ },
13983
+ {
13984
+ name: "understanding",
13985
+ type: "string",
13986
+ enum: [
13987
+ "auto",
13988
+ "skip"
13989
+ ],
13990
+ required: false,
13991
+ description: "Understanding behavior for the saved asset; defaults to auto."
13992
+ }
13993
+ ]
13994
+ }
13995
+ },
13551
13996
  {
13552
13997
  resource: "media.libraries.purge",
13553
13998
  method: "create",
13554
13999
  summary: "Purge library",
13555
- description: "Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.",
14000
+ description: "List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.",
13556
14001
  http: "POST",
13557
14002
  path: "/media/v1/libraries/{library_id}/purge",
13558
14003
  streaming: "no",
@@ -13570,7 +14015,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13570
14015
  resource: "media.libraries",
13571
14016
  method: "restore",
13572
14017
  summary: "Restore library",
13573
- description: "Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.",
14018
+ description: "Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.",
13574
14019
  http: "POST",
13575
14020
  path: "/media/v1/libraries/{library_id}/restore",
13576
14021
  streaming: "no",
@@ -13588,7 +14033,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13588
14033
  resource: "media.libraries.search",
13589
14034
  method: "create",
13590
14035
  summary: "Semantic search alias",
13591
- description: "Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.",
14036
+ description: "List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.",
13592
14037
  http: "POST",
13593
14038
  path: "/media/v1/libraries/{library_id}/search",
13594
14039
  streaming: "no",
@@ -13639,7 +14084,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13639
14084
  resource: "media.libraries.search.expression",
13640
14085
  method: "create",
13641
14086
  summary: "Expression search",
13642
- description: "Search active assets using the supported filter-expression syntax, sorting and cursor pagination. Empty expression matches all assets. Tags and context require with_field; inspect the exactness flags before treating counts as complete.",
14087
+ description: "Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.",
13643
14088
  http: "POST",
13644
14089
  path: "/media/v1/libraries/{library_id}/search/expression",
13645
14090
  streaming: "no",
@@ -13659,7 +14104,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13659
14104
  name: "expression",
13660
14105
  type: "string",
13661
14106
  required: false,
13662
- description: 'Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context.'
14107
+ description: 'Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context. Quality filters: flags:watermark matches any current shot with a watermark; flags.watermark:false requires an assessed video with no positive watermark judgment. The same syntax supports slideshow, hand_frame, text_sticker and low_quality. folder_mismatch:true selects lexical folder/location hints. Geometry filters support width, height, resolution:1920x1080, numeric aspect_ratio (width/height), and orientation:landscape, portrait or square. Missing geometry or unassessed legacy flags do not match positive filters. has_music:true AND audio_genre:jazz AND audio_mood:calm selects current-version audio profiles with music and matching model labels; has_music:false applies only to sampled ranges, not the entire source. failure_code=UPSTREAM_FAILED selects assets with a current failed understanding carrying that code; combine with processing_state=failed or processing_state=partial.'
13663
14108
  },
13664
14109
  {
13665
14110
  name: "sort_by",
@@ -13711,7 +14156,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13711
14156
  resource: "media.libraries.search.semantic",
13712
14157
  method: "create",
13713
14158
  summary: "Semantic search",
13714
- description: "Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.",
14159
+ description: "Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.",
13715
14160
  http: "POST",
13716
14161
  path: "/media/v1/libraries/{library_id}/search/semantic",
13717
14162
  streaming: "no",
@@ -13762,7 +14207,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13762
14207
  resource: "media.libraries.search.visual",
13763
14208
  method: "create",
13764
14209
  summary: "Visual search",
13765
- description: "Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.",
14210
+ description: "Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.",
13766
14211
  http: "POST",
13767
14212
  path: "/media/v1/libraries/{library_id}/search/visual",
13768
14213
  streaming: "no",
@@ -13805,6 +14250,67 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13805
14250
  ]
13806
14251
  }
13807
14252
  },
14253
+ {
14254
+ resource: "media.libraries.understandings",
14255
+ method: "list",
14256
+ summary: "List understanding results across a library",
14257
+ description: "Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.",
14258
+ http: "GET",
14259
+ path: "/media/v1/libraries/{library_id}/understandings",
14260
+ streaming: "no",
14261
+ pagination: true,
14262
+ pathParams: [
14263
+ {
14264
+ name: "library_id",
14265
+ sdkName: "library_id",
14266
+ description: "Library ID returned by creation."
14267
+ }
14268
+ ],
14269
+ query: [
14270
+ {
14271
+ name: "folder",
14272
+ type: "string",
14273
+ required: false,
14274
+ description: "Folder path including all descendants; omitted or empty selects the entire library."
14275
+ },
14276
+ {
14277
+ name: "kinds",
14278
+ type: "string",
14279
+ required: false,
14280
+ description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, embedding. Omit or empty to include every kind."
14281
+ },
14282
+ {
14283
+ name: "cursor",
14284
+ type: "string",
14285
+ required: false,
14286
+ description: "Cursor from the previous next_cursor."
14287
+ },
14288
+ {
14289
+ name: "limit",
14290
+ type: "integer",
14291
+ required: false,
14292
+ description: "Maximum entries in this page, from 1 through 100; defaults to 100."
14293
+ }
14294
+ ]
14295
+ },
14296
+ {
14297
+ resource: "media.libraries.understandings",
14298
+ method: "retrieveFailureSummary",
14299
+ summary: "Summarize understanding failures",
14300
+ description: "Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.",
14301
+ http: "GET",
14302
+ path: "/media/v1/libraries/{library_id}/understandings/failure_summary",
14303
+ streaming: "no",
14304
+ pagination: false,
14305
+ pathParams: [
14306
+ {
14307
+ name: "library_id",
14308
+ sdkName: "library_id",
14309
+ description: "Library ID returned by creation."
14310
+ }
14311
+ ],
14312
+ query: []
14313
+ },
13808
14314
  {
13809
14315
  resource: "meta.docs",
13810
14316
  method: "search",
@@ -14092,25 +14598,25 @@ services (model, agent, automation…); call the operation you need and read its
14092
14598
  name: "model",
14093
14599
  type: "string",
14094
14600
  required: true,
14095
- description: "Transcription model id, for example `whisper-large-v3-turbo` or `qwen3-asr-flash`; list candidates with listModels?type=transcription. Router support (supported): Verified to take effect."
14601
+ description: "Model catalog identifier declaring openai.audio.transcriptions; use it unchanged, including any creator prefix."
14096
14602
  },
14097
14603
  {
14098
14604
  name: "file",
14099
14605
  type: "string",
14100
14606
  required: true,
14101
- description: "Audio file to transcribe, uploaded as multipart/form-data. Router support (supported): Verified to take effect."
14607
+ description: "Audio bytes uploaded as a multipart file; supported formats and input limits depend on the selected model."
14102
14608
  },
14103
14609
  {
14104
14610
  name: "language",
14105
14611
  type: "string",
14106
14612
  required: false,
14107
- description: "Language of the audio as an ISO-639-1 code such as `en` or `zh`. Router support (partial): Both models accept ISO language codes. qwen3-asr-flash may translate output to that language; whisper-large-v3-turbo treats it as an input hint. Non-ISO names may return 502."
14613
+ description: "Source language code when known; omit to let the model detect the language."
14108
14614
  },
14109
14615
  {
14110
14616
  name: "prompt",
14111
14617
  type: "string",
14112
14618
  required: false,
14113
- description: "Text that primes the model with vocabulary or context. Router support (partial): Vocabulary hints work on whisper-large-v3-turbo only; qwen3-asr-flash returns 400."
14619
+ description: "Optional vocabulary or contextual guidance for recognizing the audio; support depends on the selected model."
14114
14620
  },
14115
14621
  {
14116
14622
  name: "response_format",
@@ -14118,20 +14624,22 @@ services (model, agent, automation…); call the operation you need and read its
14118
14624
  enum: [
14119
14625
  "json",
14120
14626
  "text",
14121
- "verbose_json"
14627
+ "verbose_json",
14628
+ "diarized_json"
14122
14629
  ],
14123
14630
  required: false,
14124
- description: "Format of the response body. `json` and `text` are the commonly supported formats. Router support (partial): json/text work on both; verbose_json works only on whisper-large-v3-turbo. srt/vtt return 400."
14631
+ description: "Output format: json returns text in JSON; text returns plain text; verbose_json includes requested timestamps; diarized_json includes speaker-labelled segments when supported. Defaults to json."
14125
14632
  },
14126
14633
  {
14127
14634
  name: "timestamp_granularities[]",
14128
14635
  type: "array",
14129
14636
  itemType: "string",
14130
14637
  enum: [
14638
+ "word",
14131
14639
  "segment"
14132
14640
  ],
14133
14641
  required: false,
14134
- description: "Timestamp levels to include with `verbose_json`; only `segment` exists in this schema. Router support (partial): Only whisper-large-v3-turbo supports segment with verbose_json. word returns 400; qwen3-asr-flash does not support timestamps."
14642
+ description: "Timestamp levels to request as repeated multipart fields: word returns per-word times; segment returns segment times. Omit for the model default. Use verbose_json, or diarized_json on supporting models."
14135
14643
  },
14136
14644
  {
14137
14645
  name: "temperature",
@@ -16285,6 +16793,539 @@ for more details.`
16285
16793
  ],
16286
16794
  query: []
16287
16795
  },
16796
+ {
16797
+ resource: "ontology.changesets",
16798
+ method: "create",
16799
+ summary: "Apply changeset",
16800
+ description: "Apply a batch of node, relation and invalidation operations as one transaction, when a mirror has several records to write together and a partial write would leave the graph inconsistent. Every operation succeeds or none is applied. Send an Idempotency-Key header; the same key with the same content replays the first result, and the same key with different content is ONTOLOGY_CONFLICT.",
16801
+ http: "POST",
16802
+ path: "/ontology/v1/changesets",
16803
+ streaming: "no",
16804
+ pagination: false,
16805
+ pathParams: [],
16806
+ query: [],
16807
+ body: {
16808
+ required: true,
16809
+ fields: [
16810
+ {
16811
+ name: "at",
16812
+ type: "string",
16813
+ required: true,
16814
+ description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
16815
+ },
16816
+ {
16817
+ name: "scope",
16818
+ type: "string",
16819
+ required: false,
16820
+ description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
16821
+ },
16822
+ {
16823
+ name: "ops",
16824
+ type: "array",
16825
+ itemType: "object",
16826
+ required: true,
16827
+ description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
16828
+ }
16829
+ ]
16830
+ }
16831
+ },
16832
+ {
16833
+ resource: "ontology.nodes",
16834
+ method: "list",
16835
+ summary: "List nodes",
16836
+ description: "Discover the entities in this organization's graph and obtain node ids for retrieval, updates and relations. Filter by type, by free text over names, aliases, descriptions and facts, or by owner; limit is 1–100 and defaults to 50. Omit cursor for the first page, then copy next_cursor into the next request until it is null. A node whose content belongs to somebody else comes back as a restricted entry carrying only its id, type and name.",
16837
+ http: "GET",
16838
+ path: "/ontology/v1/nodes",
16839
+ streaming: "no",
16840
+ pagination: true,
16841
+ pathParams: [],
16842
+ query: [
16843
+ {
16844
+ name: "type",
16845
+ type: "array",
16846
+ itemType: "string",
16847
+ required: false,
16848
+ description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
16849
+ },
16850
+ {
16851
+ name: "q",
16852
+ type: "string",
16853
+ required: false,
16854
+ description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
16855
+ },
16856
+ {
16857
+ name: "owner",
16858
+ type: "string",
16859
+ required: false,
16860
+ description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
16861
+ },
16862
+ {
16863
+ name: "as_of",
16864
+ type: "string",
16865
+ required: false,
16866
+ description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
16867
+ },
16868
+ {
16869
+ name: "limit",
16870
+ type: "integer",
16871
+ required: false,
16872
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
16873
+ },
16874
+ {
16875
+ name: "cursor",
16876
+ type: "string",
16877
+ required: false,
16878
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
16879
+ }
16880
+ ]
16881
+ },
16882
+ {
16883
+ resource: "ontology.nodes",
16884
+ method: "create",
16885
+ summary: "Create node",
16886
+ description: "Record one entity in the graph, for a system mirroring a record it owns. type must already be registered and ref, when given, must match that type's ref_prefix. Send an Idempotency-Key header; repeating the same key with the same content returns the first result instead of creating a second node. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.",
16887
+ http: "POST",
16888
+ path: "/ontology/v1/nodes",
16889
+ streaming: "no",
16890
+ pagination: false,
16891
+ pathParams: [],
16892
+ query: [],
16893
+ body: {
16894
+ required: true,
16895
+ fields: [
16896
+ {
16897
+ name: "type",
16898
+ type: "string",
16899
+ required: true,
16900
+ description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
16901
+ },
16902
+ {
16903
+ name: "ref",
16904
+ type: "string",
16905
+ required: false,
16906
+ description: "Id of the mirrored record in the owning service, which must start with the type's ref_prefix; omit or null for a concept with no external record."
16907
+ },
16908
+ {
16909
+ name: "name",
16910
+ type: "string",
16911
+ required: true,
16912
+ description: "Display name of the entity, at most 200 characters."
16913
+ },
16914
+ {
16915
+ name: "aliases",
16916
+ type: "array",
16917
+ itemType: "string",
16918
+ required: false,
16919
+ description: "Other names this entity is known by; they are matched by search alongside the name."
16920
+ },
16921
+ {
16922
+ name: "description",
16923
+ type: "string",
16924
+ required: false,
16925
+ description: "Profile of the entity, at most 500 characters; omit or null for none."
16926
+ },
16927
+ {
16928
+ name: "owner",
16929
+ type: "string",
16930
+ required: false,
16931
+ description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
16932
+ }
16933
+ ]
16934
+ }
16935
+ },
16936
+ {
16937
+ resource: "ontology.nodes",
16938
+ method: "retrieve",
16939
+ summary: "Retrieve node",
16940
+ description: "Read one node's content and, with expand=relations, every relation on and around it. as_of reads the node as it was at that time. A node id from another organization, or one that never existed, answers ONTOLOGY_NODE_NOT_FOUND; a node you may reach but not read returns restricted true with its name only.",
16941
+ http: "GET",
16942
+ path: "/ontology/v1/nodes/{node_id}",
16943
+ streaming: "no",
16944
+ pagination: false,
16945
+ pathParams: [
16946
+ {
16947
+ name: "node_id",
16948
+ sdkName: "node_id",
16949
+ description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
16950
+ }
16951
+ ],
16952
+ query: [
16953
+ {
16954
+ name: "expand",
16955
+ type: "string",
16956
+ enum: [
16957
+ "relations"
16958
+ ],
16959
+ required: false,
16960
+ description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
16961
+ },
16962
+ {
16963
+ name: "as_of",
16964
+ type: "string",
16965
+ required: false,
16966
+ description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
16967
+ }
16968
+ ]
16969
+ },
16970
+ {
16971
+ resource: "ontology.nodes",
16972
+ method: "update",
16973
+ summary: "Update node",
16974
+ description: "Change a node's name, aliases or description when the mirrored record was renamed, without touching its type or identity. Send only the fields to change; omitted fields keep their current values and an explicitly null description clears it. Repeating the same edit converges on the same node, so this needs no Idempotency-Key.",
16975
+ http: "PATCH",
16976
+ path: "/ontology/v1/nodes/{node_id}",
16977
+ streaming: "no",
16978
+ pagination: false,
16979
+ pathParams: [
16980
+ {
16981
+ name: "node_id",
16982
+ sdkName: "node_id",
16983
+ description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
16984
+ }
16985
+ ],
16986
+ query: [],
16987
+ body: {
16988
+ required: true,
16989
+ fields: [
16990
+ {
16991
+ name: "name",
16992
+ type: "string",
16993
+ required: false,
16994
+ description: "New display name, at most 200 characters; omit to keep the current name."
16995
+ },
16996
+ {
16997
+ name: "aliases",
16998
+ type: "array",
16999
+ itemType: "string",
17000
+ required: false,
17001
+ description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
17002
+ },
17003
+ {
17004
+ name: "description",
17005
+ type: "string",
17006
+ required: false,
17007
+ description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
17008
+ }
17009
+ ]
17010
+ }
17011
+ },
17012
+ {
17013
+ resource: "ontology.nodes.merge",
17014
+ method: "create",
17015
+ summary: "Merge node",
17016
+ description: "Fold a duplicate node into the node that should survive, when two records are discovered to be the same entity. The merged node's relations and aliases move to the survivor and later reads of the duplicate resolve to it. Send an Idempotency-Key header; repeating the same key replays the first result. Reversal is a staff operation, not available here.",
17017
+ http: "POST",
17018
+ path: "/ontology/v1/nodes/{node_id}/merge",
17019
+ streaming: "no",
17020
+ pagination: false,
17021
+ pathParams: [
17022
+ {
17023
+ name: "node_id",
17024
+ sdkName: "node_id",
17025
+ description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
17026
+ }
17027
+ ],
17028
+ query: [],
17029
+ body: {
17030
+ required: true,
17031
+ fields: [
17032
+ {
17033
+ name: "into",
17034
+ type: "string",
17035
+ required: true,
17036
+ description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
17037
+ }
17038
+ ]
17039
+ }
17040
+ },
17041
+ {
17042
+ resource: "ontology.relations",
17043
+ method: "list",
17044
+ summary: "List relations",
17045
+ description: "Read the facts in the graph and obtain relation ids for retrieval, invalidation or spreading. Filter by endpoint node, by type and by direction; as_of reads the relations as they were then. Invalidated relations are omitted unless include_invalid is true. limit is 1–100 and defaults to 50; follow next_cursor until it is null.",
17046
+ http: "GET",
17047
+ path: "/ontology/v1/relations",
17048
+ streaming: "no",
17049
+ pagination: true,
17050
+ pathParams: [],
17051
+ query: [
17052
+ {
17053
+ name: "node",
17054
+ type: "string",
17055
+ required: false,
17056
+ description: "A node id from nodes.list or nodes.create; returns the relations this node takes part in, narrowed by direction. Omit to list relations between every node."
17057
+ },
17058
+ {
17059
+ name: "type",
17060
+ type: "array",
17061
+ itemType: "string",
17062
+ required: false,
17063
+ description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
17064
+ },
17065
+ {
17066
+ name: "direction",
17067
+ type: "string",
17068
+ enum: [
17069
+ "out",
17070
+ "in",
17071
+ "both"
17072
+ ],
17073
+ required: false,
17074
+ description: "Which side of node to follow; out returns relations the node is the source of, in returns those it is the target of. Only meaningful together with node."
17075
+ },
17076
+ {
17077
+ name: "as_of",
17078
+ type: "string",
17079
+ required: false,
17080
+ description: "ISO 8601 timestamp; read relations as they were then, so one recorded or invalidated later is judged by that time. Omit to read current state."
17081
+ },
17082
+ {
17083
+ name: "include_invalid",
17084
+ type: "boolean",
17085
+ required: false,
17086
+ description: "Set true to include relations whose invalid_at has passed, which is how a relation that stopped being true stays readable. Omit or false for currently valid relations only."
17087
+ },
17088
+ {
17089
+ name: "limit",
17090
+ type: "integer",
17091
+ required: false,
17092
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17093
+ },
17094
+ {
17095
+ name: "cursor",
17096
+ type: "string",
17097
+ required: false,
17098
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
17099
+ }
17100
+ ]
17101
+ },
17102
+ {
17103
+ resource: "ontology.relations",
17104
+ method: "create",
17105
+ summary: "Create relation",
17106
+ description: "Record one fact between two existing nodes, for a system mirroring a relationship it owns. type must be registered and must admit these endpoints; fact states the relationship in one sentence. Send an Idempotency-Key header; repeating the same key returns the first result instead of writing a second relation. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.",
17107
+ http: "POST",
17108
+ path: "/ontology/v1/relations",
17109
+ streaming: "no",
17110
+ pagination: false,
17111
+ pathParams: [],
17112
+ query: [],
17113
+ body: {
17114
+ required: true,
17115
+ fields: [
17116
+ {
17117
+ name: "type",
17118
+ type: "string",
17119
+ required: true,
17120
+ description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
17121
+ },
17122
+ {
17123
+ name: "source",
17124
+ type: "string",
17125
+ required: true,
17126
+ description: "Node id the fact starts from, from nodes.list or nodes.create."
17127
+ },
17128
+ {
17129
+ name: "target",
17130
+ type: "string",
17131
+ required: true,
17132
+ description: "Node id the fact points at, from nodes.list or nodes.create."
17133
+ },
17134
+ {
17135
+ name: "fact",
17136
+ type: "string",
17137
+ required: true,
17138
+ description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
17139
+ },
17140
+ {
17141
+ name: "valid_at",
17142
+ type: "string",
17143
+ required: false,
17144
+ description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
17145
+ },
17146
+ {
17147
+ name: "owner",
17148
+ type: "string",
17149
+ required: false,
17150
+ description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
17151
+ }
17152
+ ]
17153
+ }
17154
+ },
17155
+ {
17156
+ resource: "ontology.relations",
17157
+ method: "retrieve",
17158
+ summary: "Retrieve relation",
17159
+ description: "Read one relation's fact and both of its clocks — valid_at and invalid_at for when it was true in the world, created_at and expired_at for when it was recorded and retired. An id from another organization, or one that never existed, answers ONTOLOGY_EDGE_NOT_FOUND.",
17160
+ http: "GET",
17161
+ path: "/ontology/v1/relations/{relation_id}",
17162
+ streaming: "no",
17163
+ pagination: false,
17164
+ pathParams: [
17165
+ {
17166
+ name: "relation_id",
17167
+ sdkName: "relation_id",
17168
+ description: "Relation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted."
17169
+ }
17170
+ ],
17171
+ query: []
17172
+ },
17173
+ {
17174
+ resource: "ontology.relations.invalidate",
17175
+ method: "create",
17176
+ summary: "Invalidate relation",
17177
+ description: "Mark a relation as no longer true from a world time, when the mirrored record changed. The relation is kept — invalid_at moves and the relation still reads at an earlier as_of, so history stays answerable. Send an Idempotency-Key header; repeating the same key replays the first result. There is no delete.",
17178
+ http: "POST",
17179
+ path: "/ontology/v1/relations/{relation_id}/invalidate",
17180
+ streaming: "no",
17181
+ pagination: false,
17182
+ pathParams: [
17183
+ {
17184
+ name: "relation_id",
17185
+ sdkName: "relation_id",
17186
+ description: "Relation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted."
17187
+ }
17188
+ ],
17189
+ query: [],
17190
+ body: {
17191
+ required: true,
17192
+ fields: [
17193
+ {
17194
+ name: "invalid_at",
17195
+ type: "string",
17196
+ required: true,
17197
+ description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
17198
+ },
17199
+ {
17200
+ name: "superseded_by",
17201
+ type: "string",
17202
+ required: false,
17203
+ description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
17204
+ },
17205
+ {
17206
+ name: "reason",
17207
+ type: "string",
17208
+ required: false,
17209
+ description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
17210
+ }
17211
+ ]
17212
+ }
17213
+ },
17214
+ {
17215
+ resource: "ontology.search",
17216
+ method: "create",
17217
+ summary: "Search nodes",
17218
+ description: "Resolve text to the nodes it most likely names, when a mirror holds a name and needs the node id it corresponds to. Results are ranked candidates, not an answer, each reporting whether the match came from the node's name, an alias, its description or a relation's fact. Narrow with types, and cap the result count with limit (1–50, default 20). This reads structure; it is not an agent recall — agents recall through POST /agent/v1/agents/{agent_id}/consolidations.",
17219
+ http: "POST",
17220
+ path: "/ontology/v1/search",
17221
+ streaming: "no",
17222
+ pagination: false,
17223
+ pathParams: [],
17224
+ query: [],
17225
+ body: {
17226
+ required: true,
17227
+ fields: [
17228
+ {
17229
+ name: "text",
17230
+ type: "string",
17231
+ required: true,
17232
+ description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
17233
+ },
17234
+ {
17235
+ name: "types",
17236
+ type: "array",
17237
+ itemType: "string",
17238
+ required: false,
17239
+ description: "Registered node type names to search within; omit to search every type."
17240
+ },
17241
+ {
17242
+ name: "window",
17243
+ type: "object",
17244
+ required: false,
17245
+ description: "Restrict matches to facts recorded within a period; omit to search all time."
17246
+ },
17247
+ {
17248
+ name: "limit",
17249
+ type: "integer",
17250
+ required: false,
17251
+ description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
17252
+ }
17253
+ ]
17254
+ }
17255
+ },
17256
+ {
17257
+ resource: "ontology.types",
17258
+ method: "list",
17259
+ summary: "List types",
17260
+ description: "Read the node and relation types registered for this organization before writing, so a create names a type the graph accepts. Each entry is one registrant's registration with its owner, version and definitions. Types cannot be created at runtime; they are registered by the owning service at deploy time, so a type missing here is not available to write.",
17261
+ http: "GET",
17262
+ path: "/ontology/v1/types",
17263
+ streaming: "no",
17264
+ pagination: false,
17265
+ pathParams: [],
17266
+ query: []
17267
+ },
17268
+ {
17269
+ resource: "ontology.types",
17270
+ method: "create",
17271
+ summary: "Register type",
17272
+ description: "Register a node or relation type for this organization. Not open yet — this call currently answers 501 NOT_IMPLEMENTED and writes nothing, because a registration is checked and stored by the deploy gate that ships the registering service, not by a runtime call. Until it opens, read the types already in force with praxis.ontology.types.list and create records only of those types.",
17273
+ http: "POST",
17274
+ path: "/ontology/v1/types",
17275
+ streaming: "no",
17276
+ pagination: false,
17277
+ pathParams: [],
17278
+ query: [],
17279
+ body: {
17280
+ required: true,
17281
+ fields: [
17282
+ {
17283
+ name: "owner",
17284
+ type: "string",
17285
+ required: true,
17286
+ description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
17287
+ },
17288
+ {
17289
+ name: "version",
17290
+ type: "integer",
17291
+ required: true,
17292
+ description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
17293
+ },
17294
+ {
17295
+ name: "nodes",
17296
+ type: "array",
17297
+ itemType: "object",
17298
+ required: true,
17299
+ description: "Node types this owner registers."
17300
+ },
17301
+ {
17302
+ name: "edges",
17303
+ type: "array",
17304
+ itemType: "object",
17305
+ required: true,
17306
+ description: "Relation types this owner registers."
17307
+ }
17308
+ ]
17309
+ }
17310
+ },
17311
+ {
17312
+ resource: "ontology.types",
17313
+ method: "retrieve",
17314
+ summary: "Retrieve type",
17315
+ description: "Read one registered type's definition before writing a record of it, to learn whether it is a node or an edge, which endpoints an edge type admits, and which origins it accepts. The name comes from types.list; a name that is not registered answers ONTOLOGY_TYPE_UNKNOWN, and writes of that type are refused.",
17316
+ http: "GET",
17317
+ path: "/ontology/v1/types/{name}",
17318
+ streaming: "no",
17319
+ pagination: false,
17320
+ pathParams: [
17321
+ {
17322
+ name: "name",
17323
+ sdkName: "name",
17324
+ description: "A type name from types.list, with its dots preserved — a display label is not accepted."
17325
+ }
17326
+ ],
17327
+ query: []
17328
+ },
16288
17329
  {
16289
17330
  resource: "organization.charges",
16290
17331
  method: "list",
@@ -19008,7 +20049,7 @@ for more details.`
19008
20049
  resource: "ticket.labels",
19009
20050
  method: "create",
19010
20051
  summary: "Create or add labels",
19011
- description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20052
+ description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19012
20053
  http: "POST",
19013
20054
  path: "/ticket/v1/labels",
19014
20055
  streaming: "no",
@@ -19050,7 +20091,7 @@ for more details.`
19050
20091
  resource: "ticket.labels",
19051
20092
  method: "delete",
19052
20093
  summary: "Remove labels",
19053
- description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20094
+ description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19054
20095
  http: "DELETE",
19055
20096
  path: "/ticket/v1/labels/{name}",
19056
20097
  streaming: "no",
@@ -19075,7 +20116,7 @@ for more details.`
19075
20116
  resource: "ticket.labels",
19076
20117
  method: "update",
19077
20118
  summary: "Update labels",
19078
- description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20119
+ description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19079
20120
  http: "PATCH",
19080
20121
  path: "/ticket/v1/labels/{name}",
19081
20122
  streaming: "no",
@@ -19371,7 +20412,7 @@ for more details.`
19371
20412
  name: "filter",
19372
20413
  type: "string",
19373
20414
  required: false,
19374
- description: "Search qualifier subset: is/state, reason, label/-label, no, assignee, author, mentions, milestone, type, kind, assignee-kind, in and sort; unknown qualifiers return INVALID_PARAMS. Passed unchanged to the service."
20415
+ description: "Search qualifier subset: is/state, reason, label/-label, no, assignee, author, mentions, milestone, type, kind, assignee-kind, in and sort; write each qualifier as field:value (for example, is:open milestone:5), never field=value. Unknown qualifiers return INVALID_PARAMS. Passed unchanged to the service."
19375
20416
  }
19376
20417
  ]
19377
20418
  },
@@ -20477,7 +21518,7 @@ for more details.`
20477
21518
  resource: "vault.vaults",
20478
21519
  method: "create",
20479
21520
  summary: "Create vault",
20480
- description: "Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Unlike Anthropic, Agent sessions do not accept nonempty vault_ids; storing a credential or adding its ID to metadata does not enable vault-backed MCP authentication. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.",
21521
+ description: "Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Agent sessions and deployments accept up to 50 vault_ids and match their credentials against the session's MCP servers, so a stored static or oauth credential does serve as vault-backed MCP authentication; only environment_variable credentials are not yet placed, because the egress proxy ADR-058 §6 gives them is not built. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.",
20481
21522
  http: "POST",
20482
21523
  path: "/vault/v1/vaults",
20483
21524
  streaming: "no",
@@ -22439,6 +23480,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
22439
23480
  url: "/agent/v1/computers/{computer_id}/files/content",
22440
23481
  ...options
22441
23482
  });
23483
+ var computersFilesConvert = (options) => (options.client ?? client).post({
23484
+ security: [{
23485
+ key: "BearerAuth",
23486
+ scheme: "bearer",
23487
+ type: "http"
23488
+ }, {
23489
+ key: "ApiKeyAuth",
23490
+ name: "X-API-Key",
23491
+ type: "apiKey"
23492
+ }],
23493
+ url: "/agent/v1/computers/{computer_id}/files/convert",
23494
+ ...options,
23495
+ headers: {
23496
+ "Content-Type": "application/json",
23497
+ ...options.headers
23498
+ }
23499
+ });
22442
23500
  var connectComputer = (options) => (options.client ?? client).post({
22443
23501
  security: [{
22444
23502
  key: "BearerAuth",
@@ -22937,6 +23995,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
22937
23995
  url: "/file/v1/uploads/{upload_id}/cancel",
22938
23996
  ...options
22939
23997
  });
23998
+ var fileRetrieveUpload = (options) => (options.client ?? client).get({
23999
+ security: [{
24000
+ key: "BearerAuth",
24001
+ scheme: "bearer",
24002
+ type: "http"
24003
+ }],
24004
+ url: "/file/v1/uploads/{upload_id}",
24005
+ ...options
24006
+ });
22940
24007
  var fileCreateSignedUpload = (options) => (options.client ?? client).post({
22941
24008
  security: [{
22942
24009
  key: "BearerAuth",
@@ -27347,6 +28414,19 @@ var mediaCreateLibrary = (options) => (options.client ?? client).post({
27347
28414
  ...options.headers
27348
28415
  }
27349
28416
  });
28417
+ var mediaCreateFrameUrls = (options) => (options.client ?? client).post({
28418
+ security: [{
28419
+ key: "media-BearerAuth",
28420
+ scheme: "bearer",
28421
+ type: "http"
28422
+ }],
28423
+ url: "/media/v1/libraries/{library_id}/assets/{asset_id}/frames",
28424
+ ...options,
28425
+ headers: {
28426
+ "Content-Type": "application/json",
28427
+ ...options.headers
28428
+ }
28429
+ });
27350
28430
  var mediaDeleteLibrary = (options) => (options.client ?? client).delete({
27351
28431
  security: [{
27352
28432
  key: "media-BearerAuth",
@@ -27611,6 +28691,235 @@ var mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
27611
28691
  ...options.headers
27612
28692
  }
27613
28693
  });
28694
+ var mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
28695
+ security: [{
28696
+ key: "media-BearerAuth",
28697
+ scheme: "bearer",
28698
+ type: "http"
28699
+ }],
28700
+ url: "/media/v1/libraries/{library_id}/understandings/failure_summary",
28701
+ ...options
28702
+ });
28703
+ var mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
28704
+ security: [{
28705
+ key: "media-BearerAuth",
28706
+ scheme: "bearer",
28707
+ type: "http"
28708
+ }],
28709
+ url: "/media/v1/libraries/{library_id}/understandings",
28710
+ ...options
28711
+ });
28712
+ var mediaCreateGeneration = (options) => (options.client ?? client).post({
28713
+ security: [{
28714
+ key: "media-BearerAuth",
28715
+ scheme: "bearer",
28716
+ type: "http"
28717
+ }],
28718
+ url: "/media/v1/libraries/{library_id}/generations",
28719
+ ...options,
28720
+ headers: {
28721
+ "Content-Type": "application/json",
28722
+ ...options.headers
28723
+ }
28724
+ });
28725
+ var mediaListJobs = (options) => (options.client ?? client).get({
28726
+ security: [{
28727
+ key: "media-BearerAuth",
28728
+ scheme: "bearer",
28729
+ type: "http"
28730
+ }],
28731
+ url: "/media/v1/libraries/{library_id}/jobs",
28732
+ ...options
28733
+ });
28734
+ var mediaCancelJob = (options) => (options.client ?? client).post({
28735
+ security: [{
28736
+ key: "media-BearerAuth",
28737
+ scheme: "bearer",
28738
+ type: "http"
28739
+ }],
28740
+ url: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
28741
+ ...options
28742
+ });
28743
+ var mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
28744
+ security: [{
28745
+ key: "media-BearerAuth",
28746
+ scheme: "bearer",
28747
+ type: "http"
28748
+ }],
28749
+ url: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
28750
+ ...options,
28751
+ headers: {
28752
+ "Content-Type": "application/json",
28753
+ ...options.headers
28754
+ }
28755
+ });
28756
+ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
28757
+ security: [{
28758
+ key: "media-BearerAuth",
28759
+ scheme: "bearer",
28760
+ type: "http"
28761
+ }],
28762
+ url: "/media/v1/generation/capabilities",
28763
+ ...options
28764
+ });
28765
+ var ontologyListTypes = (options) => (options?.client ?? client).get({
28766
+ security: [{
28767
+ key: "ontology-bearerAuth",
28768
+ scheme: "bearer",
28769
+ type: "http"
28770
+ }],
28771
+ url: "/ontology/v1/types",
28772
+ ...options
28773
+ });
28774
+ var ontologyRegisterType = (options) => (options.client ?? client).post({
28775
+ security: [{
28776
+ key: "ontology-bearerAuth",
28777
+ scheme: "bearer",
28778
+ type: "http"
28779
+ }],
28780
+ url: "/ontology/v1/types",
28781
+ ...options,
28782
+ headers: {
28783
+ "Content-Type": "application/json",
28784
+ ...options.headers
28785
+ }
28786
+ });
28787
+ var ontologyRetrieveType = (options) => (options.client ?? client).get({
28788
+ security: [{
28789
+ key: "ontology-bearerAuth",
28790
+ scheme: "bearer",
28791
+ type: "http"
28792
+ }],
28793
+ url: "/ontology/v1/types/{name}",
28794
+ ...options
28795
+ });
28796
+ var ontologyListNodes = (options) => (options?.client ?? client).get({
28797
+ security: [{
28798
+ key: "ontology-bearerAuth",
28799
+ scheme: "bearer",
28800
+ type: "http"
28801
+ }],
28802
+ url: "/ontology/v1/nodes",
28803
+ ...options
28804
+ });
28805
+ var ontologyCreateNode = (options) => (options.client ?? client).post({
28806
+ security: [{
28807
+ key: "ontology-bearerAuth",
28808
+ scheme: "bearer",
28809
+ type: "http"
28810
+ }],
28811
+ url: "/ontology/v1/nodes",
28812
+ ...options,
28813
+ headers: {
28814
+ "Content-Type": "application/json",
28815
+ ...options.headers
28816
+ }
28817
+ });
28818
+ var ontologyRetrieveNode = (options) => (options.client ?? client).get({
28819
+ security: [{
28820
+ key: "ontology-bearerAuth",
28821
+ scheme: "bearer",
28822
+ type: "http"
28823
+ }],
28824
+ url: "/ontology/v1/nodes/{node_id}",
28825
+ ...options
28826
+ });
28827
+ var ontologyUpdateNode = (options) => (options.client ?? client).patch({
28828
+ security: [{
28829
+ key: "ontology-bearerAuth",
28830
+ scheme: "bearer",
28831
+ type: "http"
28832
+ }],
28833
+ url: "/ontology/v1/nodes/{node_id}",
28834
+ ...options,
28835
+ headers: {
28836
+ "Content-Type": "application/json",
28837
+ ...options.headers
28838
+ }
28839
+ });
28840
+ var ontologyMergeNode = (options) => (options.client ?? client).post({
28841
+ security: [{
28842
+ key: "ontology-bearerAuth",
28843
+ scheme: "bearer",
28844
+ type: "http"
28845
+ }],
28846
+ url: "/ontology/v1/nodes/{node_id}/merge",
28847
+ ...options,
28848
+ headers: {
28849
+ "Content-Type": "application/json",
28850
+ ...options.headers
28851
+ }
28852
+ });
28853
+ var ontologyListRelations = (options) => (options?.client ?? client).get({
28854
+ security: [{
28855
+ key: "ontology-bearerAuth",
28856
+ scheme: "bearer",
28857
+ type: "http"
28858
+ }],
28859
+ url: "/ontology/v1/relations",
28860
+ ...options
28861
+ });
28862
+ var ontologyCreateRelation = (options) => (options.client ?? client).post({
28863
+ security: [{
28864
+ key: "ontology-bearerAuth",
28865
+ scheme: "bearer",
28866
+ type: "http"
28867
+ }],
28868
+ url: "/ontology/v1/relations",
28869
+ ...options,
28870
+ headers: {
28871
+ "Content-Type": "application/json",
28872
+ ...options.headers
28873
+ }
28874
+ });
28875
+ var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
28876
+ security: [{
28877
+ key: "ontology-bearerAuth",
28878
+ scheme: "bearer",
28879
+ type: "http"
28880
+ }],
28881
+ url: "/ontology/v1/relations/{relation_id}",
28882
+ ...options
28883
+ });
28884
+ var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
28885
+ security: [{
28886
+ key: "ontology-bearerAuth",
28887
+ scheme: "bearer",
28888
+ type: "http"
28889
+ }],
28890
+ url: "/ontology/v1/relations/{relation_id}/invalidate",
28891
+ ...options,
28892
+ headers: {
28893
+ "Content-Type": "application/json",
28894
+ ...options.headers
28895
+ }
28896
+ });
28897
+ var ontologyApplyChangeset = (options) => (options.client ?? client).post({
28898
+ security: [{
28899
+ key: "ontology-bearerAuth",
28900
+ scheme: "bearer",
28901
+ type: "http"
28902
+ }],
28903
+ url: "/ontology/v1/changesets",
28904
+ ...options,
28905
+ headers: {
28906
+ "Content-Type": "application/json",
28907
+ ...options.headers
28908
+ }
28909
+ });
28910
+ var ontologySearch = (options) => (options.client ?? client).post({
28911
+ security: [{
28912
+ key: "ontology-bearerAuth",
28913
+ scheme: "bearer",
28914
+ type: "http"
28915
+ }],
28916
+ url: "/ontology/v1/search",
28917
+ ...options,
28918
+ headers: {
28919
+ "Content-Type": "application/json",
28920
+ ...options.headers
28921
+ }
28922
+ });
27614
28923
  var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
27615
28924
  querySerializer: { parameters: { state: { array: { explode: false } } } },
27616
28925
  security: [
@@ -29488,6 +30797,9 @@ function createAgent(transport) {
29488
30797
  create: bind(transport, computersCreate),
29489
30798
  delete: bind(transport, computersDelete),
29490
30799
  files: {
30800
+ convert: {
30801
+ create: bind(transport, computersFilesConvert)
30802
+ },
29491
30803
  list: bind(transport, computersFilesList),
29492
30804
  retrieveContent: bind(transport, computersFilesContent)
29493
30805
  },
@@ -30009,7 +31321,8 @@ function createFile(transport) {
30009
31321
  createSigned: bind(transport, fileCreateSignedUpload),
30010
31322
  parts: {
30011
31323
  create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
30012
- }
31324
+ },
31325
+ retrieve: bind(transport, fileRetrieveUpload)
30013
31326
  }
30014
31327
  };
30015
31328
  }
@@ -30061,11 +31374,19 @@ function createKnowledge(transport) {
30061
31374
  }
30062
31375
  function createMedia(transport) {
30063
31376
  return {
31377
+ generation: {
31378
+ capabilities: {
31379
+ list: bind(transport, mediaGetGenerationCapabilities)
31380
+ }
31381
+ },
30064
31382
  libraries: {
30065
31383
  assets: {
30066
31384
  batch: bind(transport, mediaBatchAssets),
30067
31385
  create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
30068
31386
  delete: bind(transport, mediaDeleteAsset),
31387
+ frames: {
31388
+ create: bind(transport, mediaCreateFrameUrls)
31389
+ },
30069
31390
  import: {
30070
31391
  create: bind(transport, mediaImportAsset)
30071
31392
  },
@@ -30094,7 +31415,17 @@ function createMedia(transport) {
30094
31415
  folders: {
30095
31416
  list: bind(transport, mediaListFolders)
30096
31417
  },
31418
+ generations: {
31419
+ create: bind(transport, mediaCreateGeneration)
31420
+ },
30097
31421
  jobs: {
31422
+ cancel: bind(transport, mediaCancelJob),
31423
+ list: bindPage(transport, mediaListJobs),
31424
+ outputs: {
31425
+ save: {
31426
+ create: bind(transport, mediaSaveGenerationOutput)
31427
+ }
31428
+ },
30098
31429
  retrieve: bind(transport, mediaGetJob)
30099
31430
  },
30100
31431
  list: bindPage(transport, mediaListLibraries),
@@ -30115,6 +31446,10 @@ function createMedia(transport) {
30115
31446
  create: bind(transport, mediaVisualSearch)
30116
31447
  }
30117
31448
  },
31449
+ understandings: {
31450
+ list: bindPage(transport, mediaListUnderstandingsByLibrary),
31451
+ retrieveFailureSummary: bind(transport, mediaUnderstandingFailureSummary)
31452
+ },
30118
31453
  update: bind(transport, mediaUpdateLibrary)
30119
31454
  }
30120
31455
  };
@@ -30215,6 +31550,38 @@ function createModel(transport) {
30215
31550
  }
30216
31551
  };
30217
31552
  }
31553
+ function createOntology(transport) {
31554
+ return {
31555
+ changesets: {
31556
+ create: bind(transport, ontologyApplyChangeset)
31557
+ },
31558
+ nodes: {
31559
+ create: bind(transport, ontologyCreateNode),
31560
+ list: bindPage(transport, ontologyListNodes),
31561
+ merge: {
31562
+ create: bind(transport, ontologyMergeNode)
31563
+ },
31564
+ retrieve: bind(transport, ontologyRetrieveNode),
31565
+ update: bind(transport, ontologyUpdateNode)
31566
+ },
31567
+ relations: {
31568
+ create: bind(transport, ontologyCreateRelation),
31569
+ invalidate: {
31570
+ create: bind(transport, ontologyInvalidateRelation)
31571
+ },
31572
+ list: bindPage(transport, ontologyListRelations),
31573
+ retrieve: bind(transport, ontologyRetrieveRelation)
31574
+ },
31575
+ search: {
31576
+ create: bind(transport, ontologySearch)
31577
+ },
31578
+ types: {
31579
+ create: bind(transport, ontologyRegisterType),
31580
+ list: bind(transport, ontologyListTypes),
31581
+ retrieve: bind(transport, ontologyRetrieveType)
31582
+ }
31583
+ };
31584
+ }
30218
31585
  function createOrganization(transport) {
30219
31586
  return {
30220
31587
  charges: {
@@ -30481,6 +31848,7 @@ var resourceFactories = {
30481
31848
  media: createMedia,
30482
31849
  meta: createMeta,
30483
31850
  model: createModel,
31851
+ ontology: createOntology,
30484
31852
  organization: createOrganization,
30485
31853
  sandbox: createSandbox,
30486
31854
  search: createSearch,
@@ -31554,6 +32922,26 @@ async function prepareMultipart(op, opts) {
31554
32922
  opts.body = body;
31555
32923
  }
31556
32924
 
32925
+ // src/core/pagination.ts
32926
+ var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
32927
+ function pageTokenField(op) {
32928
+ return op.query.find((field) => PAGE_TOKENS.test(field.name));
32929
+ }
32930
+ function nextPageToken(result) {
32931
+ const value = result;
32932
+ const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
32933
+ return typeof token === "string" && token ? token : undefined;
32934
+ }
32935
+ function pageOf(result) {
32936
+ const value = result;
32937
+ const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
32938
+ const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
32939
+ if (!Array.isArray(data))
32940
+ return;
32941
+ const token = nextPageToken(result);
32942
+ return { items: data, ...token ? { token } : {} };
32943
+ }
32944
+
31557
32945
  // src/core/bind-args.ts
31558
32946
  var globalOptions = [
31559
32947
  { name: "org", type: "string" },
@@ -31769,7 +33157,7 @@ function bindArgs(parsed, op, data) {
31769
33157
  (opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
31770
33158
  }
31771
33159
  }
31772
- if (globals.all && !op.pagination)
33160
+ if (globals.all && !op.pagination && !pageTokenField(op))
31773
33161
  throw new UsageError("--all requires a paginated operation");
31774
33162
  for (const p of op.pathParams)
31775
33163
  if (p !== target && opts.path?.[p.sdkName] === undefined)
@@ -31795,8 +33183,8 @@ function bindArgs(parsed, op, data) {
31795
33183
  }
31796
33184
 
31797
33185
  // src/core/help.ts
31798
- function describeOption(s) {
31799
- return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${s.required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
33186
+ function describeOption(s, required = s.required) {
33187
+ return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
31800
33188
  }
31801
33189
  function example(command) {
31802
33190
  const target = targetParam(command.op);
@@ -31812,18 +33200,22 @@ function example(command) {
31812
33200
  args.push("--yes");
31813
33201
  return args.join(" ");
31814
33202
  }
33203
+ function fieldRequired(op, field, location) {
33204
+ return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
33205
+ }
31815
33206
  function help(commands, prefix, command) {
31816
33207
  if (command) {
31817
33208
  const target = targetParam(command.op);
33209
+ const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
31818
33210
  return [
31819
- `praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
33211
+ `praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
31820
33212
  `SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
31821
33213
  `${command.op.http} ${command.op.path}`,
31822
33214
  ...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
31823
33215
  "",
31824
33216
  "Options:",
31825
33217
  ...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
31826
- ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
33218
+ ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
31827
33219
  ...command.op.body?.fields.filter((f) => !operationOptions(command.op).some((s) => s.location === "body" && s.field === f) && (f.type === "object" || f.type === "array" && !["string", "number", "integer", "boolean"].includes(f.itemType ?? ""))).map((f) => ` --data: ${f.name} (${f.type}${f.required ? ", required" : ""})`) ?? [],
31828
33220
  " -h is an alias of --help",
31829
33221
  "PRAXIS_ENV=develop|production (default: develop); no --env option.",
@@ -33191,9 +34583,11 @@ function renderHuman(result, ctx) {
33191
34583
  const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
33192
34584
  const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
33193
34585
  ` : "";
34586
+ const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
34587
+ `).join("");
33194
34588
  return { stderr: err.red(`✗ ${plain(result.message)}`) + `
33195
34589
  ` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
33196
- ` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
34590
+ ` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
33197
34591
  ` : "") };
33198
34592
  }
33199
34593
  case "list":
@@ -33281,8 +34675,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
33281
34675
  }
33282
34676
 
33283
34677
  // src/output/render.ts
34678
+ var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
34679
+ function serverProblem(raw) {
34680
+ const value = record(raw);
34681
+ const problem = {};
34682
+ for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
34683
+ const entry = value[member];
34684
+ if (entry !== undefined && entry !== null)
34685
+ problem[member] = entry;
34686
+ }
34687
+ const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
34688
+ return adds ? problem : undefined;
34689
+ }
34690
+ function problemLines(problem) {
34691
+ const lines = [];
34692
+ for (const group of [problem?.errors, problem?.violations]) {
34693
+ for (const item of Array.isArray(group) ? group : []) {
34694
+ const entry = record(item);
34695
+ const where = scalar(entry.pointer ?? entry.field);
34696
+ const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
34697
+ if (where || detail)
34698
+ lines.push(`${where ? `${where}: ` : ""}${detail}`);
34699
+ }
34700
+ }
34701
+ return lines;
34702
+ }
33284
34703
  function errorJSON(result, ctx) {
33285
- return JSON.stringify({ error: { code: result.code, ...result.details !== undefined ? { details: result.details } : {}, message: result.message, hint: result.hint ?? null, env: result.env, command: ctx.command ?? null, status: result.status ?? null, request_id: result.request_id ?? null, ...result.credential_source ? { credential_source: result.credential_source } : {} } }) + `
34704
+ return JSON.stringify({ error: { code: result.code, ...result.details !== undefined ? { details: result.details } : {}, message: result.message, hint: result.hint ?? null, env: result.env, command: ctx.command ?? null, status: result.status ?? null, request_id: result.request_id ?? null, ...result.problem !== undefined ? { problem: result.problem } : {}, ...result.credential_source ? { credential_source: result.credential_source } : {} } }) + `
33286
34705
  `;
33287
34706
  }
33288
34707
  function render(result, ctx) {
@@ -33438,6 +34857,8 @@ function errorInput(error, ctx) {
33438
34857
  const raw = record(sdk?.raw), nested = record(raw.error);
33439
34858
  const candidate = nested.details ?? raw.details;
33440
34859
  const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
34860
+ const problem = serverProblem(Object.keys(nested).length ? nested : raw);
34861
+ const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
33441
34862
  let message = error instanceof Error ? error.message : "Unexpected error";
33442
34863
  const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
33443
34864
  const code = error instanceof UsageError ? error.code : businessCode(raw.code) ?? businessCode(nested.code) ?? businessCode(raw.error_code) ?? prefix ?? businessCode(sdk?.code) ?? (sdk?.status ? `HTTP_${sdk.status}` : sdk ? "API_ERROR" : "RUNTIME_ERROR");
@@ -33449,11 +34870,14 @@ function errorInput(error, ctx) {
33449
34870
  if (stripped)
33450
34871
  message = `${humanize(code)}${message ? `: ${message}` : ""}`;
33451
34872
  const status = sdk?.status, request_id = sdk?.requestId;
34873
+ message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
33452
34874
  const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
33453
34875
  const source = ctx.credentialSource ?? "login";
33454
34876
  let hint = genericHint;
33455
34877
  if (error instanceof UsageError)
33456
34878
  hint = error.hint;
34879
+ else if (serverText(problem?.hint))
34880
+ hint = serverText(problem?.hint);
33457
34881
  else if (authFailure)
33458
34882
  hint = authHint(source);
33459
34883
  else if (status === 404)
@@ -33464,7 +34888,7 @@ function errorInput(error, ctx) {
33464
34888
  hint = "Rate limited; retry later.";
33465
34889
  else if (status !== undefined && status >= 500)
33466
34890
  hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
33467
- return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
34891
+ return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, ...problem !== undefined ? { problem } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
33468
34892
  }
33469
34893
 
33470
34894
  // src/output/progress.ts
@@ -33494,7 +34918,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
33494
34918
  }
33495
34919
 
33496
34920
  // src/main.ts
33497
- var version = "0.2.1-dev.463d5b5";
34921
+ var version = "0.2.1-dev.4786c3d";
33498
34922
  var commands = commandTree(operations);
33499
34923
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
33500
34924
  function route(argv) {
@@ -33712,7 +35136,7 @@ Examples:
33712
35136
  let owner = client2;
33713
35137
  for (const part of op.resource.split("."))
33714
35138
  owner = owner[part];
33715
- const result = await owner[op.method](opts);
35139
+ let result = await owner[op.method](opts);
33716
35140
  const name2 = `${op.resource}.${op.method}`;
33717
35141
  const list = (items) => {
33718
35142
  const view = clientList(items, op, flags.limit, ctx.mode);
@@ -33726,7 +35150,21 @@ Examples:
33726
35150
  const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
33727
35151
  if (typeof cursor === "string" && cursor)
33728
35152
  ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
33729
- if (result instanceof Page) {
35153
+ const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
35154
+ const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
35155
+ if (flags.all && !(result instanceof Page) && token && !firstPage)
35156
+ throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
35157
+ if (firstPage) {
35158
+ const items = [...firstPage.items];
35159
+ const seen = new Set;
35160
+ for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
35161
+ seen.add(next);
35162
+ result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
35163
+ items.push(...pageOf(result)?.items ?? []);
35164
+ }
35165
+ ctx.nextCommand = undefined;
35166
+ emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
35167
+ } else if (result instanceof Page) {
33730
35168
  if (flags.all) {
33731
35169
  const items = [];
33732
35170
  for await (const item of result)
@@ -33822,7 +35260,7 @@ Examples:
33822
35260
  }
33823
35261
  }
33824
35262
  if (true)
33825
- process.exit(await main(process.argv.slice(2)));
35263
+ process.exitCode = await main(process.argv.slice(2));
33826
35264
  export {
33827
35265
  main
33828
35266
  };