@deepraxis/cli 0.2.1-dev.eb022f5 → 0.2.1-dev.edf8922

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.
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",
@@ -10232,6 +10281,57 @@ Execution errors include error.details.prints containing output printed before f
10232
10281
  ]
10233
10282
  }
10234
10283
  },
10284
+ {
10285
+ resource: "cut.projects.renders",
10286
+ method: "create",
10287
+ summary: "Create draft range render",
10288
+ description: "Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration, and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.",
10289
+ http: "POST",
10290
+ path: "/cut/v1/projects/{project_id}/renders",
10291
+ streaming: "no",
10292
+ pagination: false,
10293
+ pathParams: [
10294
+ {
10295
+ name: "project_id",
10296
+ sdkName: "project_id",
10297
+ description: "Project identifier returned by its create or list operation; use the id, not a display name."
10298
+ }
10299
+ ],
10300
+ query: [],
10301
+ body: {
10302
+ required: true,
10303
+ fields: [
10304
+ {
10305
+ name: "kind",
10306
+ type: "string",
10307
+ enum: [
10308
+ "audio",
10309
+ "video"
10310
+ ],
10311
+ required: true,
10312
+ description: "audio renders the mixed soundtrack alone as an .m4a file for listening; video renders a draft-quality .mp4 with picture and sound for looking at. An audio draft is the cheaper of the two and is what a loudness or mix measurement asks for."
10313
+ },
10314
+ {
10315
+ name: "from",
10316
+ type: "number",
10317
+ required: true,
10318
+ description: "Start of the interval in seconds on the project clock, inclusive. Must be less than to."
10319
+ },
10320
+ {
10321
+ name: "to",
10322
+ type: "number",
10323
+ required: true,
10324
+ description: "End of the interval in seconds on the project clock, exclusive. At most 120 seconds after from, and never beyond the timeline duration; a longer passage is requested as several ranges."
10325
+ },
10326
+ {
10327
+ name: "revision",
10328
+ type: "integer",
10329
+ required: false,
10330
+ description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
10331
+ }
10332
+ ]
10333
+ }
10334
+ },
10235
10335
  {
10236
10336
  resource: "cut.projects",
10237
10337
  method: "retrieveState",
@@ -10375,85 +10475,155 @@ Execution errors include error.details.prints containing output printed before f
10375
10475
  summary: "Execute editing script",
10376
10476
  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
10477
 
10378
- ### Script function reference
10478
+ <!-- cut-reference:start -->
10479
+ ### Script function, field and error reference
10379
10480
 
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.
10481
+ Every script function, clip field and error code has its own section, read one at a time:
10381
10482
 
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;
10483
+ \`\`\`
10484
+ codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
10485
+ codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
10486
+ codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
10487
+ codemode.describe("praxis.cut.script") // names, one page at a time
10404
10488
  \`\`\`
10405
10489
 
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.
10490
+ 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
10491
 
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. |
10492
+ #### Script functions (script)
10447
10493
 
10448
- #### Update fields (ItemPatchView)
10494
+ - \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
10495
+ - \`GetItem\` — One clip's compact view, by id.
10496
+ - \`FindItems\` — Visit every clip with its track; collect results.
10497
+ - \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
10498
+ - \`GetTranscript\` — Transcript words in source microseconds.
10499
+ - \`GetAnalysis\` — Silence, filler or scene segments.
10500
+ - \`ListTransitions\` — Join transition kinds and parameters.
10501
+ - \`ListEffects\` — Visual-effect catalog and parameters.
10502
+ - \`ListAnimations\` — Animation presets by phase and target.
10503
+ - \`ListFonts\` — Font families, weights and scripts.
10504
+ - \`ListTextStyles\` — Text style presets for \`style.preset\`.
10505
+ - \`ListTextTemplates\` — Multi-layer templates and their slots.
10506
+ - \`Insert\` — Add a clip; a track never overlaps itself.
10507
+ - \`Append\` — Add a clip at the end of a track.
10508
+ - \`Update\` — Change named fields; the rest stay.
10509
+ - \`SetSpeed\` — Change rate, keeping source or duration.
10510
+ - \`Delete\` — Remove a clip. There is no \`Remove\`.
10511
+ - \`Join\` — Overlap clips; followers shift, track shortens.
10512
+ - \`UpdateJoin\` — Change a join's length or effect.
10513
+ - \`DeleteJoin\` — Remove a join; restore the butt cut.
10514
+ - \`Split\` — Cut a clip in two at a time.
10515
+ - \`Trim\` — Move one clip edge by seconds.
10516
+ - \`Move\` — Set a clip's start or track.
10517
+ - \`RippleDeleteRange\` — Cut a time range and close the gap.
10518
+ - \`AddTrack\` — Add a video, audio or caption track.
10519
+ - \`UpdateTrack\` — Change a track's name, lock, gain or role.
10520
+ - \`DeleteTrack\` — Remove a track and its clips.
10521
+ - \`SetSettings\` — Change canvas, frame rate or background.
10522
+ - \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
10523
+ - \`InsertTemplate\` — Insert a template and fill its slots.
10524
+ - \`AlignCaptions\` — Rebuild captions from text punctuation.
10525
+ - \`ImportCaptions\` — Import SRT or WebVTT onto captions.
10526
+ - \`ExportCaptions\` — Export captions as SRT or WebVTT.
10527
+ - \`SetMarker\` — Label a timeline position.
10528
+ - \`Print\` — Append values to the result's \`prints\`.
10529
+ - \`Preview\` — Up to 8 frames as inline PNG data URLs.
10449
10530
 
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})\`.
10531
+ #### Fields (fields)
10451
10532
 
10452
- #### Script names versus HTTP response names
10533
+ - \`type\` — Clip kind; decides which fields apply.
10534
+ - \`start\` — Clip start in seconds; snaps to frames.
10535
+ - \`length\` — Duration; optional for video and audio.
10536
+ - \`media\` — Source \`{ libraryId, assetId }\`.
10537
+ - \`sourceIn\` — First source second kept; default 0.
10538
+ - \`sourceOut\` — Exclusive source end; read-only.
10539
+ - \`text\` — Text of a text or caption clip.
10540
+ - \`color\` — Solid colour of a color clip.
10541
+ - \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
10542
+ - \`width\` — Shape width, a fraction of canvas width.
10543
+ - \`height\` — Shape height, a fraction of canvas height.
10544
+ - \`radius\` — Rect corner rounding, in 1080-height px.
10545
+ - \`fill\` — Shape or text paint: colour or gradient.
10546
+ - \`stroke\` — Shape outline: colour and width.
10547
+ - \`transform\` — Position, scale, rotation, opacity, crop, blur.
10548
+ - \`fit\` — contain, cover, fill or none.
10549
+ - \`blend\` — Layer blend mode; null clears.
10550
+ - \`style\` — Text styling: font, fill, strokes, glow, position.
10551
+ - \`style.position\` — top, middle or bottom; omit it, never null.
10552
+ - \`playback\` — Rate, direction, audio policy, or freeze.
10553
+ - \`volumeDb\` — Audio level in dB; 0 is source level.
10554
+ - \`gain\` — Keyframed audio level in dB.
10555
+ - \`fadeIn\` — Fade-in seconds at the clip's start.
10556
+ - \`fadeOut\` — Fade-out seconds at the clip's end.
10557
+ - \`duck\` — Lower this clip while another track plays.
10558
+ - \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
10559
+ - \`reveal\` — Per-character, word or line reveal timing.
10560
+ - \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
10561
+ - \`effects\` — Effect stack, at most 8; null clears.
10562
+ - \`transitionIn\` — Entrance effect: kind plus seconds.
10563
+ - \`transitionOut\` — Exit effect: kind plus seconds.
10564
+ - \`mask\` — Shape, path or track matte.
10565
+ - \`words\` — Caption words with clip-local times.
10453
10566
 
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.
10567
+ #### Error codes (errors)
10455
10568
 
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.
10569
+ - \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
10570
+ - \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
10571
+ - \`INVALID_STYLE\` — A style value is out of range.
10572
+ - \`INVALID_MASK\` — A mask definition is malformed.
10573
+ - \`MASK_IN_USE\` — The edit would break a live mask.
10574
+ - \`TOO_MANY_MASKS\` — At most 16 masks per project.
10575
+ - \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
10576
+ - \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
10577
+ - \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
10578
+ - \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
10579
+ - \`UNKNOWN_FIELD\` — The field name is not accepted here.
10580
+ - \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
10581
+ - \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
10582
+ - \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
10583
+ - \`OVERLAP\` — Two clips on one track would share time.
10584
+ - \`OUT_OF_SOURCE\` — The clip would read past its source.
10585
+ - \`LOCKED_TRACK\` — The edit targets a locked track.
10586
+ - \`UNBOUND_LIBRARY\` — The library is not bound to the project.
10587
+ - \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
10588
+ - \`NOT_FOUND\` — The named id is not in this project.
10589
+ - \`TOO_SHORT\` — The result would be under one frame.
10590
+ - \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
10591
+ - \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
10592
+ - \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
10593
+ - \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
10594
+ - \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
10595
+ - \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
10596
+ - \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
10597
+ - \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
10598
+ - \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
10599
+ - \`PROJECT_NOT_FOUND\` — No visible project has this id.
10600
+ - \`EXPORT_NOT_FOUND\` — No such export in this project.
10601
+ - \`VERSION_NOT_FOUND\` — No saved version has this revision.
10602
+ - \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
10603
+ - \`BINDING_INVALID\` — The binding request is malformed.
10604
+ - \`BINDING_IN_USE\` — Clips still use this library's assets.
10605
+ - \`NOTHING_TO_UNDO\` — No earlier revision to return to.
10606
+ - \`NOTHING_TO_REDO\` — No undone revision is waiting.
10607
+ - \`UNDO_CONFLICT\` — The revision to undo is no longer head.
10608
+ - \`REVISION_CONFLICT\` — The project moved; your revision is stale.
10609
+ - \`CUT_BUSY\` — The project is busy; retry.
10610
+ - \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
10611
+ - \`SCRIPT_ERROR\` — The script threw or did not parse.
10612
+ - \`SCRIPT_LIMIT\` — An execute budget was exceeded.
10613
+ - \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
10614
+ - \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
10615
+ - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
10616
+ - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
10617
+ - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
10618
+ - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
10619
+ - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
10620
+ - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
10621
+ - \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
10622
+ - \`INVALID_PARAMS\` — The request is malformed.
10623
+ - \`PERMISSION_DENIED\` — This credential may not do that here.
10624
+ - \`NOT_IMPLEMENTED\` — Not available on this platform yet.
10625
+ - \`INTERNAL\` — Unexpected failure; retry with the request id.
10626
+ <!-- cut-reference:end -->
10457
10627
  `,
10458
10628
  http: "POST",
10459
10629
  path: "/cut/v1/projects/{project_id}:execute",
@@ -10516,6 +10686,24 @@ Unrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIE
10516
10686
  ],
10517
10687
  query: []
10518
10688
  },
10689
+ {
10690
+ resource: "cut.renders",
10691
+ method: "retrieve",
10692
+ summary: "Retrieve draft range render",
10693
+ description: "Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.",
10694
+ http: "GET",
10695
+ path: "/cut/v1/renders/{render_id}",
10696
+ streaming: "no",
10697
+ pagination: false,
10698
+ pathParams: [
10699
+ {
10700
+ name: "render_id",
10701
+ sdkName: "render_id",
10702
+ description: "Draft render id (cutr_…) returned by projects.renders.create."
10703
+ }
10704
+ ],
10705
+ query: []
10706
+ },
10519
10707
  {
10520
10708
  resource: "cut.versions",
10521
10709
  method: "restore",
@@ -11488,6 +11676,696 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11488
11676
  ]
11489
11677
  }
11490
11678
  },
11679
+ {
11680
+ resource: "devops.projects.testCases",
11681
+ method: "list",
11682
+ summary: "List test cases",
11683
+ description: "List a project's cases with their health, state and recent statistics, so you can decide which ones a plan must run and which are quarantined. This is the read a test dashboard is built on; filter it to narrow by state or health instead of paging through everything. A case's id is a fingerprint of its own title and path, so it survives a rename — read aliases when reconciling history recorded under an older title.",
11684
+ http: "GET",
11685
+ path: "/devops/v1/projects/{project}/test-cases",
11686
+ streaming: "no",
11687
+ pagination: false,
11688
+ pathParams: [
11689
+ {
11690
+ name: "project",
11691
+ sdkName: "project",
11692
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11693
+ }
11694
+ ],
11695
+ query: [
11696
+ {
11697
+ name: "pageSize",
11698
+ type: "integer",
11699
+ required: false,
11700
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11701
+ },
11702
+ {
11703
+ name: "pageToken",
11704
+ type: "string",
11705
+ required: false,
11706
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11707
+ },
11708
+ {
11709
+ name: "filter",
11710
+ type: "string",
11711
+ required: false,
11712
+ description: "AIP-160 equality filter over one declared field at a time, for example state=quarantined or health=broken. Fields a case list does not declare are refused with INVALID_ARGUMENT rather than ignored, so a typo never silently widens the result."
11713
+ },
11714
+ {
11715
+ name: "orderBy",
11716
+ type: "string",
11717
+ required: false,
11718
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11719
+ }
11720
+ ]
11721
+ },
11722
+ {
11723
+ resource: "devops.projects",
11724
+ method: "retrieveTestCatalog",
11725
+ summary: "Read a commit's test catalog",
11726
+ description: 'Read the catalog version discovered at one commit — how many suites and cases it holds, which frameworks they come from, and how the commit changed them. Call this first: it tells you which suites, cases and sizes exist before you list them or select them into a plan, and the reported diff explains why a case count moved. A commit whose discovery has not finished answers CATALOG_NOT_READY, which means "not yet", not "no tests"; wait and read again. Omit commit to read the newest catalog published for the project.',
11727
+ http: "GET",
11728
+ path: "/devops/v1/projects/{project}/test-catalog",
11729
+ streaming: "no",
11730
+ pagination: false,
11731
+ pathParams: [
11732
+ {
11733
+ name: "project",
11734
+ sdkName: "project",
11735
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11736
+ }
11737
+ ],
11738
+ query: [
11739
+ {
11740
+ name: "commit",
11741
+ type: "string",
11742
+ required: false,
11743
+ description: "Full 40-character commit sha whose catalog you want, from a project branch or commit read. Omit it to read the newest catalog published for the project."
11744
+ }
11745
+ ]
11746
+ },
11747
+ {
11748
+ resource: "devops.projects.testPlans",
11749
+ method: "list",
11750
+ summary: "List test plans",
11751
+ description: "List the project's plans — what each one selects, which stage and gate it belongs to, and when it runs next. Read this before creating a plan, so a new plan extends what exists instead of duplicating a selector an existing plan already covers.",
11752
+ http: "GET",
11753
+ path: "/devops/v1/projects/{project}/test-plans",
11754
+ streaming: "no",
11755
+ pagination: false,
11756
+ pathParams: [
11757
+ {
11758
+ name: "project",
11759
+ sdkName: "project",
11760
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11761
+ }
11762
+ ],
11763
+ query: [
11764
+ {
11765
+ name: "pageSize",
11766
+ type: "integer",
11767
+ required: false,
11768
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11769
+ },
11770
+ {
11771
+ name: "pageToken",
11772
+ type: "string",
11773
+ required: false,
11774
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11775
+ },
11776
+ {
11777
+ name: "orderBy",
11778
+ type: "string",
11779
+ required: false,
11780
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11781
+ }
11782
+ ]
11783
+ },
11784
+ {
11785
+ resource: "devops.projects.testPlans",
11786
+ method: "create",
11787
+ summary: "Create a test plan",
11788
+ description: "Create a plan that decides which cases a stage must run. The plan's key is unique inside the project and is what a later run names; the selector chooses cases by size, purpose, tag, package or explicit ids, and the trigger says when the plan fires by itself. A merge or promotion gate must name the environment it guards, and a plan with a gate but no environment is refused with PLAN_GATE_ENVIRONMENT_MISMATCH rather than created and silently ignored. A plan has no revision history: update it with a patch.",
11789
+ http: "POST",
11790
+ path: "/devops/v1/projects/{project}/test-plans",
11791
+ streaming: "no",
11792
+ pagination: false,
11793
+ pathParams: [
11794
+ {
11795
+ name: "project",
11796
+ sdkName: "project",
11797
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11798
+ }
11799
+ ],
11800
+ query: [],
11801
+ body: {
11802
+ required: true,
11803
+ fields: [
11804
+ {
11805
+ name: "key",
11806
+ type: "string",
11807
+ required: true,
11808
+ description: "Short name for the plan, unique inside the project; a key already in use is refused rather than silently reused."
11809
+ },
11810
+ {
11811
+ name: "title",
11812
+ type: "string",
11813
+ required: true,
11814
+ description: "Display title of the plan, shown wherever the plan is listed."
11815
+ },
11816
+ {
11817
+ name: "stage",
11818
+ type: "string",
11819
+ enum: [
11820
+ "dev",
11821
+ "presubmit",
11822
+ "postsubmit",
11823
+ "nightly",
11824
+ "production"
11825
+ ],
11826
+ required: true,
11827
+ description: "Which stage of delivery this plan belongs to, which decides when it is expected to run."
11828
+ },
11829
+ {
11830
+ name: "trigger",
11831
+ type: "object",
11832
+ required: true,
11833
+ description: "What starts a run of this plan. Exactly one kind applies; the fields a kind needs are the ones it carries."
11834
+ },
11835
+ {
11836
+ name: "selector",
11837
+ type: "object",
11838
+ required: true,
11839
+ description: "Which cases a plan or run selects. Every member is optional and they combine as an intersection, so a selector with no member selects every case in the catalog."
11840
+ },
11841
+ {
11842
+ name: "environment",
11843
+ type: "string",
11844
+ required: false,
11845
+ description: "The environment this plan runs against; required by a merge or promotion gate, and refused with PLAN_GATE_ENVIRONMENT_MISMATCH when it disagrees with the gate."
11846
+ },
11847
+ {
11848
+ name: "gate",
11849
+ type: "string",
11850
+ enum: [
11851
+ "merge",
11852
+ "promotion",
11853
+ "observation",
11854
+ "none"
11855
+ ],
11856
+ required: true,
11857
+ description: "Whether this plan's result blocks a stage; a merge or promotion gate must name its environment."
11858
+ },
11859
+ {
11860
+ name: "repeat",
11861
+ type: "integer",
11862
+ required: false,
11863
+ description: "How many times each selected case runs in one run; omit for once. More than one is how a flake is told apart from a real failure."
11864
+ },
11865
+ {
11866
+ name: "timeoutMinutes",
11867
+ type: "integer",
11868
+ required: false,
11869
+ description: "How many minutes a run of this plan may take before it is timed out; omit for the service's default."
11870
+ }
11871
+ ]
11872
+ }
11873
+ },
11874
+ {
11875
+ resource: "devops.projects.testReports",
11876
+ method: "create",
11877
+ summary: "Upload an external test report",
11878
+ description: "Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable.",
11879
+ http: "POST",
11880
+ path: "/devops/v1/projects/{project}/test-reports",
11881
+ streaming: "no",
11882
+ pagination: false,
11883
+ pathParams: [
11884
+ {
11885
+ name: "project",
11886
+ sdkName: "project",
11887
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11888
+ }
11889
+ ],
11890
+ query: [],
11891
+ body: {
11892
+ required: true,
11893
+ fields: [
11894
+ {
11895
+ name: "reportId",
11896
+ type: "string",
11897
+ required: true,
11898
+ description: "Your own identifier for this report. Uploading the same id again is idempotent and counts once, so a retry after a timeout is safe."
11899
+ },
11900
+ {
11901
+ name: "format",
11902
+ type: "string",
11903
+ enum: [
11904
+ "ctrf",
11905
+ "junit"
11906
+ ],
11907
+ required: true,
11908
+ description: "Which report format the document is in; it decides how the document is parsed."
11909
+ },
11910
+ {
11911
+ name: "ref",
11912
+ type: "object",
11913
+ required: true,
11914
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
11915
+ },
11916
+ {
11917
+ name: "report",
11918
+ type: "string",
11919
+ required: true,
11920
+ description: "The report document itself, as text — JSON for ctrf, XML for junit. Send the file's contents unchanged; a malformed document is refused with REPORT_INVALID and records nothing."
11921
+ }
11922
+ ]
11923
+ }
11924
+ },
11925
+ {
11926
+ resource: "devops.projects.testRuns",
11927
+ method: "list",
11928
+ summary: "List test runs",
11929
+ description: "List the project's runs newest first, with each run's state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit's tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.",
11930
+ http: "GET",
11931
+ path: "/devops/v1/projects/{project}/test-runs",
11932
+ streaming: "no",
11933
+ pagination: false,
11934
+ pathParams: [
11935
+ {
11936
+ name: "project",
11937
+ sdkName: "project",
11938
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11939
+ }
11940
+ ],
11941
+ query: [
11942
+ {
11943
+ name: "pageSize",
11944
+ type: "integer",
11945
+ required: false,
11946
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11947
+ },
11948
+ {
11949
+ name: "pageToken",
11950
+ type: "string",
11951
+ required: false,
11952
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11953
+ },
11954
+ {
11955
+ name: "filter",
11956
+ type: "string",
11957
+ required: false,
11958
+ description: "AIP-160 equality filter over one declared field, for example state=running or result=failed. An undeclared field is refused with INVALID_ARGUMENT; it is never ignored, so a mistyped filter cannot quietly return everything."
11959
+ },
11960
+ {
11961
+ name: "orderBy",
11962
+ type: "string",
11963
+ required: false,
11964
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11965
+ }
11966
+ ]
11967
+ },
11968
+ {
11969
+ resource: "devops.projects.testRuns",
11970
+ method: "create",
11971
+ summary: "Create a test run",
11972
+ description: "Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued returns as soon as the run exists, finished waits for a verdict and may take minutes. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.",
11973
+ http: "POST",
11974
+ path: "/devops/v1/projects/{project}/test-runs",
11975
+ streaming: "no",
11976
+ pagination: false,
11977
+ pathParams: [
11978
+ {
11979
+ name: "project",
11980
+ sdkName: "project",
11981
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11982
+ }
11983
+ ],
11984
+ query: [],
11985
+ body: {
11986
+ required: true,
11987
+ fields: [
11988
+ {
11989
+ name: "ref",
11990
+ type: "object",
11991
+ required: true,
11992
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
11993
+ },
11994
+ {
11995
+ name: "plan",
11996
+ type: "string",
11997
+ required: false,
11998
+ description: "Plan whose selector this run uses; omit it when passing selector instead. Naming a plan records the run against that plan, which is what a gate reads."
11999
+ },
12000
+ {
12001
+ name: "selector",
12002
+ type: "object",
12003
+ required: false,
12004
+ description: "An ad-hoc selector for this run alone, used instead of a plan's; it is not saved as a plan, so a run you want to repeat should name a plan."
12005
+ },
12006
+ {
12007
+ name: "environment",
12008
+ type: "string",
12009
+ required: false,
12010
+ description: "Environment to run against; it decides whether production-only cases become selectable. Omit it for a run that needs no environment."
12011
+ },
12012
+ {
12013
+ name: "repeat",
12014
+ type: "integer",
12015
+ required: false,
12016
+ description: "How many times each selected case runs, which is how a flake is told apart from a real failure; omit for once."
12017
+ },
12018
+ {
12019
+ name: "waitUntil",
12020
+ type: "string",
12021
+ enum: [
12022
+ "queued",
12023
+ "started",
12024
+ "finished"
12025
+ ],
12026
+ required: false,
12027
+ description: "How far the call waits before answering — queued returns at once, started waits for execution to begin, finished waits for a verdict and may take minutes."
12028
+ },
12029
+ {
12030
+ name: "executor",
12031
+ type: "string",
12032
+ enum: [
12033
+ "cloud",
12034
+ "external"
12035
+ ],
12036
+ required: false,
12037
+ description: "Who carries the run out. cloud, the default, runs the selected cases in Praxis at the commit; external creates a run that waits for your own CI to upload a report with test-reports."
12038
+ },
12039
+ {
12040
+ name: "requestId",
12041
+ type: "string",
12042
+ required: false,
12043
+ description: "A key you choose to make creating this run idempotent: repeating the call with the same requestId returns the run it created instead of starting another, so a retry after a timeout is safe."
12044
+ }
12045
+ ]
12046
+ }
12047
+ },
12048
+ {
12049
+ resource: "devops.projects.testSuites",
12050
+ method: "list",
12051
+ summary: "List test suites",
12052
+ description: "List the suites the project's newest catalog discovered — one suite per test file and framework pair, with its size, purposes and question count. Use it to find the suite id a case belongs to, or to see which files make up an area before selecting cases from them. Suites come from the catalog, so a file added in code appears only after its commit's catalog is published. Archived suites are returned too; they carry archived true and no case is ever silently dropped from the list.",
12053
+ http: "GET",
12054
+ path: "/devops/v1/projects/{project}/test-suites",
12055
+ streaming: "no",
12056
+ pagination: false,
12057
+ pathParams: [
12058
+ {
12059
+ name: "project",
12060
+ sdkName: "project",
12061
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
12062
+ }
12063
+ ],
12064
+ query: [
12065
+ {
12066
+ name: "pageSize",
12067
+ type: "integer",
12068
+ required: false,
12069
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
12070
+ },
12071
+ {
12072
+ name: "pageToken",
12073
+ type: "string",
12074
+ required: false,
12075
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12076
+ },
12077
+ {
12078
+ name: "orderBy",
12079
+ type: "string",
12080
+ required: false,
12081
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
12082
+ }
12083
+ ]
12084
+ },
12085
+ {
12086
+ resource: "devops.testCases",
12087
+ method: "retrieve",
12088
+ summary: "Retrieve a test case",
12089
+ description: "Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.",
12090
+ http: "GET",
12091
+ path: "/devops/v1/test-cases/{id}",
12092
+ streaming: "no",
12093
+ pagination: false,
12094
+ pathParams: [
12095
+ {
12096
+ name: "id",
12097
+ sdkName: "id",
12098
+ description: "The case identifier returned by a case list, or an older id listed in that case's aliases."
12099
+ }
12100
+ ],
12101
+ query: []
12102
+ },
12103
+ {
12104
+ resource: "devops.testPlans",
12105
+ method: "delete",
12106
+ summary: "Delete a test plan",
12107
+ description: "Delete a plan so it schedules nothing further. The plan stops firing immediately; runs it already produced keep their own record and are not deleted with it. To stop a plan temporarily and keep it for later, pause it instead — deleting cannot be undone and the plan's key becomes free for another plan to take.",
12108
+ http: "DELETE",
12109
+ path: "/devops/v1/test-plans/{id}",
12110
+ streaming: "no",
12111
+ pagination: false,
12112
+ pathParams: [
12113
+ {
12114
+ name: "id",
12115
+ sdkName: "id",
12116
+ description: "The plan identifier returned by a plan list or create answer."
12117
+ }
12118
+ ],
12119
+ query: []
12120
+ },
12121
+ {
12122
+ resource: "devops.testPlans",
12123
+ method: "retrieve",
12124
+ summary: "Retrieve a test plan",
12125
+ description: "Read one plan by the id a plan list returned, to see its selector, gate, repeat count, timeout and pause state before updating or deleting it. A paused plan carries the reason, the actor and the time it resumes, so a pause you did not set is explained here rather than guessed at.",
12126
+ http: "GET",
12127
+ path: "/devops/v1/test-plans/{id}",
12128
+ streaming: "no",
12129
+ pagination: false,
12130
+ pathParams: [
12131
+ {
12132
+ name: "id",
12133
+ sdkName: "id",
12134
+ description: "The plan identifier returned by a plan list or create answer."
12135
+ }
12136
+ ],
12137
+ query: []
12138
+ },
12139
+ {
12140
+ resource: "devops.testPlans",
12141
+ method: "update",
12142
+ summary: "Update a test plan",
12143
+ description: "Change a plan's title, trigger, selector, gate, repeat count, timeout or enabled flag. Only the fields present in the body are changed, so a body naming one field leaves the rest exactly as they were. Changing a selector does not create a version — the plan is not a published artefact, and runs already started keep the selection they were created with. Read the plan first to know what you are leaving unchanged.",
12144
+ http: "PATCH",
12145
+ path: "/devops/v1/test-plans/{id}",
12146
+ streaming: "no",
12147
+ pagination: false,
12148
+ pathParams: [
12149
+ {
12150
+ name: "id",
12151
+ sdkName: "id",
12152
+ description: "The plan identifier returned by a plan list or create answer."
12153
+ }
12154
+ ],
12155
+ query: [],
12156
+ body: {
12157
+ required: true,
12158
+ fields: [
12159
+ {
12160
+ name: "plan",
12161
+ type: "object",
12162
+ required: true,
12163
+ description: "The fields to change. Anything absent keeps its current value, so read the plan first if you need to know what you are leaving alone."
12164
+ },
12165
+ {
12166
+ name: "updateMask",
12167
+ type: "string",
12168
+ required: false,
12169
+ description: "Comma-separated names of the plan fields this patch intends to change, for example title,enabled. Omit it to apply every field present in plan; naming fields makes the intent explicit and keeps a concurrent edit from being overwritten by accident."
12170
+ }
12171
+ ]
12172
+ }
12173
+ },
12174
+ {
12175
+ resource: "devops.testPlans",
12176
+ method: "pause",
12177
+ summary: "Pause a test plan",
12178
+ description: "Stop a plan from starting new runs while keeping it and its history. A reason is required and is recorded on the plan, so the next reader learns why it stopped. Give until to resume automatically at a time; omit it to stay paused until someone resumes it. Runs already in flight are not cancelled — cancel those individually.",
12179
+ http: "POST",
12180
+ path: "/devops/v1/test-plans/{id}:pause",
12181
+ streaming: "no",
12182
+ pagination: false,
12183
+ pathParams: [
12184
+ {
12185
+ name: "id",
12186
+ sdkName: "id",
12187
+ description: "The plan identifier returned by a plan list or create answer."
12188
+ }
12189
+ ],
12190
+ query: [],
12191
+ body: {
12192
+ required: true,
12193
+ fields: [
12194
+ {
12195
+ name: "reason",
12196
+ type: "string",
12197
+ required: true,
12198
+ description: "Why the plan is being paused; it is stored on the plan and read by whoever finds it stopped."
12199
+ },
12200
+ {
12201
+ name: "until",
12202
+ type: "string",
12203
+ required: false,
12204
+ description: "RFC 3339 UTC time the plan resumes by itself; omit it to stay paused until someone resumes it."
12205
+ }
12206
+ ]
12207
+ }
12208
+ },
12209
+ {
12210
+ resource: "devops.testPlans",
12211
+ method: "resume",
12212
+ summary: "Resume a test plan",
12213
+ description: "Clear a plan's pause so it schedules runs again. Resuming an active plan changes nothing and is safe to repeat. The plan keeps its selector, gate and key; only the pause is removed.",
12214
+ http: "POST",
12215
+ path: "/devops/v1/test-plans/{id}:resume",
12216
+ streaming: "no",
12217
+ pagination: false,
12218
+ pathParams: [
12219
+ {
12220
+ name: "id",
12221
+ sdkName: "id",
12222
+ description: "The plan identifier returned by a plan list or create answer."
12223
+ }
12224
+ ],
12225
+ query: []
12226
+ },
12227
+ {
12228
+ resource: "devops.testRuns",
12229
+ method: "retrieve",
12230
+ summary: "Retrieve a test run",
12231
+ description: "Read one run's current state, result and counts, and ask for its failed executions inline with expand. Poll this after creating a run whose result was pending. A result is monotonic once it reaches a verdict — a failed run never becomes passed by a later report, so read the run rather than the last report to know where it ended.",
12232
+ http: "GET",
12233
+ path: "/devops/v1/test-runs/{id}",
12234
+ streaming: "no",
12235
+ pagination: false,
12236
+ pathParams: [
12237
+ {
12238
+ name: "id",
12239
+ sdkName: "id",
12240
+ description: "The run identifier returned by a run list or create answer."
12241
+ }
12242
+ ],
12243
+ query: [
12244
+ {
12245
+ name: "expand",
12246
+ type: "array",
12247
+ itemType: "string",
12248
+ enum: [
12249
+ "failedExecutions"
12250
+ ],
12251
+ required: false,
12252
+ description: "Repeatable field to expand inline. failedExecutions returns the non-passed executions with the run, which saves a second call when you only need to see what broke; omit it for the bare run."
12253
+ }
12254
+ ]
12255
+ },
12256
+ {
12257
+ resource: "devops.testRuns",
12258
+ method: "cancel",
12259
+ summary: "Cancel a test run",
12260
+ description: "Stop a run that is still going. A reason is required and is recorded on the run, because a cancelled run is read later as evidence about why a commit was not verified. Cancelling a run that already reached a verdict is refused with RUN_ALREADY_FINISHED: its result is final and cancelling it would erase the verdict. Executions already recorded stay readable.",
12261
+ http: "POST",
12262
+ path: "/devops/v1/test-runs/{id}:cancel",
12263
+ streaming: "no",
12264
+ pagination: false,
12265
+ pathParams: [
12266
+ {
12267
+ name: "id",
12268
+ sdkName: "id",
12269
+ description: "The run identifier returned by a run list or create answer."
12270
+ }
12271
+ ],
12272
+ query: [],
12273
+ body: {
12274
+ required: true,
12275
+ fields: [
12276
+ {
12277
+ name: "reason",
12278
+ type: "string",
12279
+ required: true,
12280
+ description: "Why the run is being cancelled; it is stored on the run and is what a later reader finds instead of a result."
12281
+ }
12282
+ ]
12283
+ }
12284
+ },
12285
+ {
12286
+ resource: "devops.testRuns.executions",
12287
+ method: "list",
12288
+ summary: "List a run's executions",
12289
+ description: "List the executions recorded against one run — one entry per case the run selected, with its status, duration, attempts and evidence. Use it to find the case that failed, or to compare a repeat run against the previous one case by case. Reads happen while the run is still going, so a case may still be pending; filter by status to watch only the failures.",
12290
+ http: "GET",
12291
+ path: "/devops/v1/test-runs/{run}/executions",
12292
+ streaming: "no",
12293
+ pagination: false,
12294
+ pathParams: [
12295
+ {
12296
+ name: "run",
12297
+ sdkName: "run",
12298
+ description: "The run whose executions you are reading, from a run list or create answer."
12299
+ }
12300
+ ],
12301
+ query: [
12302
+ {
12303
+ name: "pageSize",
12304
+ type: "integer",
12305
+ required: false,
12306
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
12307
+ },
12308
+ {
12309
+ name: "pageToken",
12310
+ type: "string",
12311
+ required: false,
12312
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12313
+ },
12314
+ {
12315
+ name: "filter",
12316
+ type: "string",
12317
+ required: false,
12318
+ description: "AIP-160 equality filter over one declared field, for example result=failed to read only a run's failures. Fields an execution list does not declare are refused with INVALID_ARGUMENT rather than ignored."
12319
+ },
12320
+ {
12321
+ name: "orderBy",
12322
+ type: "string",
12323
+ required: false,
12324
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
12325
+ }
12326
+ ]
12327
+ },
12328
+ {
12329
+ resource: "devops.testRuns.executions",
12330
+ method: "retrieve",
12331
+ summary: "Retrieve one case's execution in a run",
12332
+ description: "Read one case's execution inside one run, including every attempt with its own duration and message. Use it after a run reports a failure to see whether the case failed once and passed on retry — that is what flaky true means — and to reach the evidence files a triage needs. Both ids come from the run and case reads; an execution that does not exist for that pair is NOT_FOUND rather than an empty answer.",
12333
+ http: "GET",
12334
+ path: "/devops/v1/test-runs/{run}/executions/{case}",
12335
+ streaming: "no",
12336
+ pagination: false,
12337
+ pathParams: [
12338
+ {
12339
+ name: "run",
12340
+ sdkName: "run",
12341
+ description: "The run whose executions you are reading, from a run list or create answer."
12342
+ },
12343
+ {
12344
+ name: "case",
12345
+ sdkName: "case",
12346
+ description: "The case to read inside that run, from the run's execution list or the project's case list."
12347
+ }
12348
+ ],
12349
+ query: []
12350
+ },
12351
+ {
12352
+ resource: "devops.testSuites",
12353
+ method: "retrieve",
12354
+ summary: "Retrieve a test suite",
12355
+ description: "Read one suite by the id a suite list returned, to learn its file, framework, size, purposes and how many cases it holds. Use it when a case's suite id needs a name for display, or to confirm which commit's catalog a suite came from. The id is opaque; it comes from the list, never from the file path.",
12356
+ http: "GET",
12357
+ path: "/devops/v1/test-suites/{id}",
12358
+ streaming: "no",
12359
+ pagination: false,
12360
+ pathParams: [
12361
+ {
12362
+ name: "id",
12363
+ sdkName: "id",
12364
+ description: "The suite identifier returned by a suite list, not the file path it was discovered from."
12365
+ }
12366
+ ],
12367
+ query: []
12368
+ },
11491
12369
  {
11492
12370
  resource: "file.files",
11493
12371
  method: "list",
@@ -11546,7 +12424,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11546
12424
  resource: "file.files",
11547
12425
  method: "create",
11548
12426
  summary: "Upload file",
11549
- description: 'Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.',
12427
+ description: 'Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data, assistants and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.',
11550
12428
  http: "POST",
11551
12429
  path: "/file/v1/files",
11552
12430
  streaming: "no",
@@ -11568,10 +12446,11 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11568
12446
  type: "string",
11569
12447
  enum: [
11570
12448
  "user_data",
12449
+ "assistants",
11571
12450
  "vision"
11572
12451
  ],
11573
12452
  required: true,
11574
- description: "Purpose label stored with the file: user_data or vision. The vision purpose accepts only PNG, JPEG, GIF and WebP images. Conversation image references require user_data."
12453
+ description: "Purpose label stored with the file: user_data, assistants or vision. The label is stored and returned unchanged; assistants follows the same rules as user_data. The vision purpose accepts only PNG, JPEG, GIF and WebP images. Conversation image references require user_data."
11575
12454
  },
11576
12455
  {
11577
12456
  name: "expires_after",
@@ -11640,7 +12519,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11640
12519
  resource: "file.files.contentLinks",
11641
12520
  method: "revoke",
11642
12521
  summary: "Revoke a file content link",
11643
- 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/>"}.',
12522
+ 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/>"}.',
11644
12523
  http: "POST",
11645
12524
  path: "/file/v1/files/{file_id}/content_links:revoke",
11646
12525
  streaming: "no",
@@ -11669,7 +12548,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11669
12548
  resource: "file.files.contentUrl",
11670
12549
  method: "create",
11671
12550
  summary: "Create a download URL",
11672
- 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}.`,
12551
+ 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}.`,
11673
12552
  http: "POST",
11674
12553
  path: "/file/v1/files/{file_id}/content_url",
11675
12554
  streaming: "no",
@@ -11689,7 +12568,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11689
12568
  name: "ttl_seconds",
11690
12569
  type: "integer",
11691
12570
  required: false,
11692
- description: "Download link lifetime in seconds, from 1 through 604800; omitted means 3600. This does not change the file's own expiry."
12571
+ description: "Download link lifetime in seconds, from 1 through 604800; omitted means 900. This does not change the file's own expiry."
11693
12572
  }
11694
12573
  ]
11695
12574
  }
@@ -11698,7 +12577,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11698
12577
  resource: "file.uploads",
11699
12578
  method: "create",
11700
12579
  summary: "Create an upload",
11701
- 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 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.",
12580
+ 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.",
11702
12581
  http: "POST",
11703
12582
  path: "/file/v1/uploads",
11704
12583
  streaming: "no",
@@ -11712,7 +12591,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11712
12591
  name: "bytes",
11713
12592
  type: "integer",
11714
12593
  required: true,
11715
- description: "Exact complete file length in bytes, from 1 through 2147483648 (2 GiB); the sum of completed parts must match."
12594
+ description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
11716
12595
  },
11717
12596
  {
11718
12597
  name: "filename",
@@ -11731,10 +12610,11 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11731
12610
  type: "string",
11732
12611
  enum: [
11733
12612
  "user_data",
12613
+ "assistants",
11734
12614
  "vision"
11735
12615
  ],
11736
12616
  required: true,
11737
- description: "Use user_data for conversation attachments, or vision for PNG, JPEG, GIF and WebP images."
12617
+ description: "Use user_data for conversation attachments, assistants for assistant files, or vision for PNG, JPEG, GIF and WebP images."
11738
12618
  },
11739
12619
  {
11740
12620
  name: "expires_after",
@@ -11755,7 +12635,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11755
12635
  resource: "file.uploads",
11756
12636
  method: "createSigned",
11757
12637
  summary: "Create a one-time upload URL",
11758
- 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\"}.",
12638
+ 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\"}.",
11759
12639
  http: "POST",
11760
12640
  path: "/file/v1/uploads/signed",
11761
12641
  streaming: "no",
@@ -11775,7 +12655,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11775
12655
  name: "bytes",
11776
12656
  type: "integer",
11777
12657
  required: true,
11778
- 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."
12658
+ 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."
11779
12659
  },
11780
12660
  {
11781
12661
  name: "content_type",
@@ -11788,16 +12668,17 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11788
12668
  type: "string",
11789
12669
  enum: [
11790
12670
  "user_data",
12671
+ "assistants",
11791
12672
  "vision"
11792
12673
  ],
11793
12674
  required: false,
11794
- description: "user_data stores ordinary files and conversation images; vision accepts PNG, JPEG, GIF or WebP images only. Omitted means user_data."
12675
+ description: "user_data and assistants store ordinary files and conversation images with their original purpose label; vision accepts PNG, JPEG, GIF or WebP images only. Omitted means user_data."
11795
12676
  },
11796
12677
  {
11797
12678
  name: "expires_in",
11798
12679
  type: "integer",
11799
12680
  required: false,
11800
- 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."
12681
+ 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."
11801
12682
  },
11802
12683
  {
11803
12684
  name: "part_size",
@@ -11808,6 +12689,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11808
12689
  ]
11809
12690
  }
11810
12691
  },
12692
+ {
12693
+ resource: "file.uploads",
12694
+ method: "retrieve",
12695
+ summary: "Retrieve an upload",
12696
+ 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.",
12697
+ http: "GET",
12698
+ path: "/file/v1/uploads/{upload_id}",
12699
+ streaming: "no",
12700
+ pagination: false,
12701
+ pathParams: [
12702
+ {
12703
+ name: "upload_id",
12704
+ sdkName: "upload_id",
12705
+ description: "Upload identifier returned by create; the upload must belong to your organization."
12706
+ }
12707
+ ],
12708
+ query: []
12709
+ },
11811
12710
  {
11812
12711
  resource: "file.uploads",
11813
12712
  method: "cancel",
@@ -11830,7 +12729,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11830
12729
  resource: "file.uploads",
11831
12730
  method: "complete",
11832
12731
  summary: "Complete an upload",
11833
- 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.",
12732
+ 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.",
11834
12733
  http: "POST",
11835
12734
  path: "/file/v1/uploads/{upload_id}/complete",
11836
12735
  streaming: "no",
@@ -11866,7 +12765,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11866
12765
  resource: "file.uploads.parts",
11867
12766
  method: "create",
11868
12767
  summary: "Add an upload part",
11869
- 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.",
12768
+ 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.",
11870
12769
  http: "POST",
11871
12770
  path: "/file/v1/uploads/{upload_id}/parts",
11872
12771
  streaming: "no",
@@ -11954,7 +12853,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11954
12853
  resource: "knowledge.vectorStores",
11955
12854
  method: "create",
11956
12855
  summary: "Create knowledge base",
11957
- 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"}.',
12856
+ 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"}.',
11958
12857
  http: "POST",
11959
12858
  path: "/knowledge/v1/vector_stores",
11960
12859
  streaming: "no",
@@ -11993,7 +12892,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11993
12892
  name: "chunking_strategy",
11994
12893
  type: "object",
11995
12894
  required: false,
11996
- 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."
12895
+ 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."
11997
12896
  },
11998
12897
  {
11999
12898
  name: "description",
@@ -12340,7 +13239,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12340
13239
  resource: "knowledge.vectorStores.files",
12341
13240
  method: "create",
12342
13241
  summary: "Add file",
12343
- 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.",
13242
+ 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.",
12344
13243
  http: "POST",
12345
13244
  path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
12346
13245
  streaming: "no",
@@ -12372,7 +13271,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12372
13271
  name: "chunking_strategy",
12373
13272
  type: "object",
12374
13273
  required: false,
12375
- 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."
13274
+ 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."
12376
13275
  }
12377
13276
  ]
12378
13277
  }
@@ -12679,11 +13578,23 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12679
13578
  ],
12680
13579
  query: []
12681
13580
  },
13581
+ {
13582
+ resource: "media.generation.capabilities",
13583
+ method: "list",
13584
+ summary: "Get generation capabilities",
13585
+ 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.",
13586
+ http: "GET",
13587
+ path: "/media/v1/generation/capabilities",
13588
+ streaming: "no",
13589
+ pagination: false,
13590
+ pathParams: [],
13591
+ query: []
13592
+ },
12682
13593
  {
12683
13594
  resource: "media.libraries",
12684
13595
  method: "list",
12685
13596
  summary: "List libraries",
12686
- 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.",
13597
+ 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.",
12687
13598
  http: "GET",
12688
13599
  path: "/media/v1/libraries",
12689
13600
  streaming: "no",
@@ -12765,7 +13676,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12765
13676
  resource: "media.libraries",
12766
13677
  method: "delete",
12767
13678
  summary: "Delete library",
12768
- 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.",
13679
+ 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.",
12769
13680
  http: "DELETE",
12770
13681
  path: "/media/v1/libraries/{library_id}",
12771
13682
  streaming: "no",
@@ -12783,7 +13694,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12783
13694
  resource: "media.libraries",
12784
13695
  method: "retrieve",
12785
13696
  summary: "Get library",
12786
- 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.",
13697
+ 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.",
12787
13698
  http: "GET",
12788
13699
  path: "/media/v1/libraries/{library_id}",
12789
13700
  streaming: "no",
@@ -12801,7 +13712,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12801
13712
  resource: "media.libraries",
12802
13713
  method: "update",
12803
13714
  summary: "Update library",
12804
- 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.",
13715
+ 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.",
12805
13716
  http: "PATCH",
12806
13717
  path: "/media/v1/libraries/{library_id}",
12807
13718
  streaming: "no",
@@ -12817,6 +13728,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12817
13728
  body: {
12818
13729
  required: true,
12819
13730
  fields: [
13731
+ {
13732
+ name: "hotwords",
13733
+ type: "array",
13734
+ itemType: "string",
13735
+ required: false,
13736
+ 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."
13737
+ },
12820
13738
  {
12821
13739
  name: "models",
12822
13740
  type: "object",
@@ -12848,7 +13766,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12848
13766
  resource: "media.libraries.assets",
12849
13767
  method: "list",
12850
13768
  summary: "List assets",
12851
- 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.",
13769
+ 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.",
12852
13770
  http: "GET",
12853
13771
  path: "/media/v1/libraries/{library_id}/assets",
12854
13772
  streaming: "no",
@@ -12896,7 +13814,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12896
13814
  resource: "media.libraries.assets",
12897
13815
  method: "create",
12898
13816
  summary: "Upload asset",
12899
- 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.",
13817
+ 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.",
12900
13818
  http: "POST",
12901
13819
  path: "/media/v1/libraries/{library_id}/assets",
12902
13820
  streaming: "no",
@@ -12941,7 +13859,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12941
13859
  name: "asset_folder",
12942
13860
  type: "string",
12943
13861
  required: false,
12944
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13862
+ 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."
12945
13863
  },
12946
13864
  {
12947
13865
  name: "use_filename",
@@ -13020,7 +13938,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13020
13938
  resource: "media.libraries.assets.import",
13021
13939
  method: "create",
13022
13940
  summary: "Import file",
13023
- 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.",
13941
+ 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.",
13024
13942
  http: "POST",
13025
13943
  path: "/media/v1/libraries/{library_id}/assets/import",
13026
13944
  streaming: "no",
@@ -13040,7 +13958,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13040
13958
  name: "file_id",
13041
13959
  type: "string",
13042
13960
  required: true,
13043
- 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."
13961
+ 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."
13044
13962
  },
13045
13963
  {
13046
13964
  name: "public_id",
@@ -13064,7 +13982,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13064
13982
  name: "asset_folder",
13065
13983
  type: "string",
13066
13984
  required: false,
13067
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13985
+ 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."
13068
13986
  },
13069
13987
  {
13070
13988
  name: "use_filename",
@@ -13143,7 +14061,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13143
14061
  resource: "media.libraries.assets",
13144
14062
  method: "delete",
13145
14063
  summary: "Delete asset",
13146
- 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.",
14064
+ 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.",
13147
14065
  http: "DELETE",
13148
14066
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13149
14067
  streaming: "no",
@@ -13166,7 +14084,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13166
14084
  resource: "media.libraries.assets",
13167
14085
  method: "retrieve",
13168
14086
  summary: "Get asset",
13169
- 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.",
14087
+ 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.",
13170
14088
  http: "GET",
13171
14089
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13172
14090
  streaming: "no",
@@ -13189,7 +14107,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13189
14107
  resource: "media.libraries.assets",
13190
14108
  method: "update",
13191
14109
  summary: "Update asset",
13192
- 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.",
14110
+ 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.",
13193
14111
  http: "PATCH",
13194
14112
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13195
14113
  streaming: "no",
@@ -13220,7 +14138,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13220
14138
  name: "asset_folder",
13221
14139
  type: "string",
13222
14140
  required: false,
13223
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
14141
+ 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."
13224
14142
  },
13225
14143
  {
13226
14144
  name: "tags",
@@ -13238,11 +14156,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13238
14156
  ]
13239
14157
  }
13240
14158
  },
14159
+ {
14160
+ resource: "media.libraries.assets.frames",
14161
+ method: "create",
14162
+ summary: "Create frame URLs",
14163
+ 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.',
14164
+ http: "POST",
14165
+ path: "/media/v1/libraries/{library_id}/assets/{asset_id}/frames",
14166
+ streaming: "no",
14167
+ pagination: false,
14168
+ pathParams: [
14169
+ {
14170
+ name: "library_id",
14171
+ sdkName: "library_id",
14172
+ description: "Library identifier returned by library creation or listing; must be accessible to the current credential."
14173
+ },
14174
+ {
14175
+ name: "asset_id",
14176
+ sdkName: "asset_id",
14177
+ description: "Video asset identifier returned by asset upload or listing in this library; read its duration before choosing timestamps."
14178
+ }
14179
+ ],
14180
+ query: [],
14181
+ body: {
14182
+ required: true,
14183
+ fields: [
14184
+ {
14185
+ name: "at_micros",
14186
+ type: "array",
14187
+ itemType: "integer",
14188
+ required: true,
14189
+ 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."
14190
+ },
14191
+ {
14192
+ name: "width",
14193
+ type: "integer",
14194
+ enum: [
14195
+ 160,
14196
+ 320,
14197
+ 640
14198
+ ],
14199
+ required: false,
14200
+ 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."
14201
+ }
14202
+ ]
14203
+ }
14204
+ },
13241
14205
  {
13242
14206
  resource: "media.libraries.assets.reprocess",
13243
14207
  method: "create",
13244
14208
  summary: "Reprocess asset",
13245
- 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.",
14209
+ 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.",
13246
14210
  http: "POST",
13247
14211
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
13248
14212
  streaming: "no",
@@ -13274,7 +14238,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13274
14238
  "embedding"
13275
14239
  ],
13276
14240
  required: false,
13277
- 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."
14241
+ 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."
13278
14242
  }
13279
14243
  ]
13280
14244
  }
@@ -13283,7 +14247,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13283
14247
  resource: "media.libraries.assets.understandings",
13284
14248
  method: "list",
13285
14249
  summary: "List understandings",
13286
- 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.",
14250
+ 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.",
13287
14251
  http: "GET",
13288
14252
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/understandings",
13289
14253
  streaming: "no",
@@ -13315,10 +14279,16 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13315
14279
  "tags",
13316
14280
  "ocr",
13317
14281
  "transcript",
13318
- "frame"
14282
+ "frame",
14283
+ "overview",
14284
+ "audio",
14285
+ "loudness",
14286
+ "beats",
14287
+ "content",
14288
+ "embedding"
13319
14289
  ],
13320
14290
  required: false,
13321
- 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."
14291
+ 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, loudness is measured loudness, beats is the measured tempo and beat grid, content is the derived speech, music and silence split, and embedding reports a failed embedding step."
13322
14292
  },
13323
14293
  {
13324
14294
  name: "cursor",
@@ -13338,7 +14308,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13338
14308
  resource: "media.libraries.assets",
13339
14309
  method: "batch",
13340
14310
  summary: "Batch assets alias",
13341
- 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.",
14311
+ 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.',
13342
14312
  http: "POST",
13343
14313
  path: "/media/v1/libraries/{library_id}/assets:batch",
13344
14314
  streaming: "no",
@@ -13359,6 +14329,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13359
14329
  type: "object",
13360
14330
  required: true,
13361
14331
  description: "Select assets by ids or by expression, never both. Expression results and exclusions are resolved when the job is created."
14332
+ },
14333
+ {
14334
+ name: "reason",
14335
+ type: "string",
14336
+ required: false,
14337
+ description: "Audit reason for the operation; required for staff Admin reprocessing and recorded with the initiating actor. Nonblank, at most 2000 characters."
13362
14338
  }
13363
14339
  ]
13364
14340
  }
@@ -13367,7 +14343,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13367
14343
  resource: "media.libraries.batches",
13368
14344
  method: "create",
13369
14345
  summary: "Create batch",
13370
- 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.",
14346
+ 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.',
13371
14347
  http: "POST",
13372
14348
  path: "/media/v1/libraries/{library_id}/batches",
13373
14349
  streaming: "no",
@@ -13388,6 +14364,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13388
14364
  type: "object",
13389
14365
  required: true,
13390
14366
  description: "Select assets by ids or by expression, never both. Expression results and exclusions are resolved when the job is created."
14367
+ },
14368
+ {
14369
+ name: "reason",
14370
+ type: "string",
14371
+ required: false,
14372
+ description: "Audit reason for the operation; required for staff Admin reprocessing and recorded with the initiating actor. Nonblank, at most 2000 characters."
13391
14373
  }
13392
14374
  ]
13393
14375
  }
@@ -13396,7 +14378,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13396
14378
  resource: "media.libraries.batches",
13397
14379
  method: "retrieve",
13398
14380
  summary: "Get batch",
13399
- 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.",
14381
+ 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.",
13400
14382
  http: "GET",
13401
14383
  path: "/media/v1/libraries/{library_id}/batches/{job_id}",
13402
14384
  streaming: "no",
@@ -13419,7 +14401,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13419
14401
  resource: "media.libraries.deliveryTokens",
13420
14402
  method: "create",
13421
14403
  summary: "Create delivery token",
13422
- 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.",
14404
+ 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.",
13423
14405
  http: "POST",
13424
14406
  path: "/media/v1/libraries/{library_id}/delivery_tokens",
13425
14407
  streaming: "no",
@@ -13445,7 +14427,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13445
14427
  name: "expires_in",
13446
14428
  type: "integer",
13447
14429
  required: false,
13448
- description: "Token lifetime in seconds, from 1 to 604800 inclusive; defaults to 3600."
14430
+ description: "Token lifetime in seconds, from 1 to 604800 inclusive; defaults to 900."
13449
14431
  }
13450
14432
  ]
13451
14433
  }
@@ -13454,7 +14436,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13454
14436
  resource: "media.libraries.events",
13455
14437
  method: "list",
13456
14438
  summary: "List events",
13457
- 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.",
14439
+ 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.",
13458
14440
  http: "GET",
13459
14441
  path: "/media/v1/libraries/{library_id}/events",
13460
14442
  streaming: "no",
@@ -13501,7 +14483,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13501
14483
  resource: "media.libraries.folders",
13502
14484
  method: "list",
13503
14485
  summary: "List folders",
13504
- 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.",
14486
+ description: "undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.",
13505
14487
  http: "GET",
13506
14488
  path: "/media/v1/libraries/{library_id}/folders",
13507
14489
  streaming: "no",
@@ -13522,11 +14504,155 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13522
14504
  }
13523
14505
  ]
13524
14506
  },
14507
+ {
14508
+ resource: "media.libraries.generations",
14509
+ method: "create",
14510
+ summary: "Create video generation",
14511
+ 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.",
14512
+ http: "POST",
14513
+ path: "/media/v1/libraries/{library_id}/generations",
14514
+ streaming: "no",
14515
+ pagination: false,
14516
+ pathParams: [
14517
+ {
14518
+ name: "library_id",
14519
+ sdkName: "library_id",
14520
+ description: "Library ID returned by creation."
14521
+ }
14522
+ ],
14523
+ query: [],
14524
+ body: {
14525
+ required: true,
14526
+ fields: [
14527
+ {
14528
+ name: "intent",
14529
+ type: "string",
14530
+ required: true,
14531
+ description: "Generation operation; v1 accepts only video.generate text-to-video requests."
14532
+ },
14533
+ {
14534
+ name: "prompt",
14535
+ type: "string",
14536
+ required: true,
14537
+ description: "Text prompt describing the video to generate."
14538
+ },
14539
+ {
14540
+ name: "count",
14541
+ type: "integer",
14542
+ required: false,
14543
+ description: "Number of videos to generate; defaults to 1 and must be from 1 to 4."
14544
+ },
14545
+ {
14546
+ name: "duration_seconds",
14547
+ type: "integer",
14548
+ required: false,
14549
+ description: "Requested video duration in seconds; Router validates the model-specific supported durations."
14550
+ },
14551
+ {
14552
+ name: "aspect_ratio",
14553
+ type: "string",
14554
+ required: false,
14555
+ description: "Requested output aspect ratio; defaults to 16:9 and Router validates model support."
14556
+ },
14557
+ {
14558
+ name: "model",
14559
+ type: "string",
14560
+ required: false,
14561
+ description: "Router model with video_generation capability; defaults to wan2.7-t2v."
14562
+ },
14563
+ {
14564
+ name: "save",
14565
+ type: "string",
14566
+ enum: [
14567
+ "candidate",
14568
+ "library"
14569
+ ],
14570
+ required: false,
14571
+ description: "candidate keeps outputs temporary for explicit save calls; library saves successful outputs automatically."
14572
+ },
14573
+ {
14574
+ name: "asset_folder",
14575
+ type: "string",
14576
+ required: false,
14577
+ 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."
14578
+ },
14579
+ {
14580
+ name: "tags",
14581
+ type: "array",
14582
+ itemType: "string",
14583
+ required: false,
14584
+ description: "Tags applied when an output becomes a library asset."
14585
+ },
14586
+ {
14587
+ name: "understanding",
14588
+ type: "string",
14589
+ enum: [
14590
+ "auto",
14591
+ "skip"
14592
+ ],
14593
+ required: false,
14594
+ description: "Understanding behavior when a candidate is saved as an asset; defaults to auto."
14595
+ },
14596
+ {
14597
+ name: "references",
14598
+ type: "array",
14599
+ itemType: "object",
14600
+ required: false,
14601
+ description: "Not supported in v1; omit this field. Only text-to-video is currently available."
14602
+ }
14603
+ ]
14604
+ }
14605
+ },
14606
+ {
14607
+ resource: "media.libraries.jobs",
14608
+ method: "list",
14609
+ summary: "List jobs",
14610
+ 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.",
14611
+ http: "GET",
14612
+ path: "/media/v1/libraries/{library_id}/jobs",
14613
+ streaming: "no",
14614
+ pagination: true,
14615
+ pathParams: [
14616
+ {
14617
+ name: "library_id",
14618
+ sdkName: "library_id",
14619
+ description: "Library ID returned by creation."
14620
+ }
14621
+ ],
14622
+ query: [
14623
+ {
14624
+ name: "status",
14625
+ type: "string",
14626
+ enum: [
14627
+ "queued",
14628
+ "running",
14629
+ "completed",
14630
+ "completed_with_errors",
14631
+ "failed",
14632
+ "cancelled"
14633
+ ],
14634
+ required: false,
14635
+ description: "Filter jobs by their current status."
14636
+ },
14637
+ {
14638
+ name: "limit",
14639
+ type: "integer",
14640
+ required: false,
14641
+ description: "Maximum entries in this page, from 1 through 100; defaults to 100."
14642
+ },
14643
+ {
14644
+ name: "cursor",
14645
+ type: "string",
14646
+ required: false,
14647
+ description: "Job id from the previous page’s next_cursor; omit for the first page."
14648
+ }
14649
+ ]
14650
+ },
13525
14651
  {
13526
14652
  resource: "media.libraries.jobs",
13527
14653
  method: "retrieve",
13528
- summary: "Get job alias",
13529
- description: "Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.",
14654
+ summary: "Get job",
14655
+ 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.",
13530
14656
  http: "GET",
13531
14657
  path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
13532
14658
  streaming: "no",
@@ -13540,16 +14666,101 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13540
14666
  {
13541
14667
  name: "job_id",
13542
14668
  sdkName: "job_id",
13543
- description: "Batch identifier returned by createBatch or batchAssets; resolved within this library."
14669
+ description: "Job identifier returned by batch creation, video-generation creation or job listing; resolved within this library."
14670
+ }
14671
+ ],
14672
+ query: []
14673
+ },
14674
+ {
14675
+ resource: "media.libraries.jobs",
14676
+ method: "cancel",
14677
+ summary: "Cancel job",
14678
+ 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.",
14679
+ http: "POST",
14680
+ path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
14681
+ streaming: "no",
14682
+ pagination: false,
14683
+ pathParams: [
14684
+ {
14685
+ name: "library_id",
14686
+ sdkName: "library_id",
14687
+ description: "Library ID returned by creation."
14688
+ },
14689
+ {
14690
+ name: "job_id",
14691
+ sdkName: "job_id",
14692
+ description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
13544
14693
  }
13545
14694
  ],
13546
14695
  query: []
13547
14696
  },
14697
+ {
14698
+ resource: "media.libraries.jobs.outputs.save",
14699
+ method: "create",
14700
+ summary: "Save generation output",
14701
+ 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.",
14702
+ http: "POST",
14703
+ path: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
14704
+ streaming: "no",
14705
+ pagination: false,
14706
+ pathParams: [
14707
+ {
14708
+ name: "library_id",
14709
+ sdkName: "library_id",
14710
+ description: "Library ID returned by creation."
14711
+ },
14712
+ {
14713
+ name: "job_id",
14714
+ sdkName: "job_id",
14715
+ description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
14716
+ },
14717
+ {
14718
+ name: "index",
14719
+ sdkName: "index",
14720
+ description: "Zero-based position of the candidate in the Job outputs array."
14721
+ }
14722
+ ],
14723
+ query: [],
14724
+ body: {
14725
+ required: false,
14726
+ fields: [
14727
+ {
14728
+ name: "public_id",
14729
+ type: "string",
14730
+ required: false,
14731
+ description: "Delivery identifier for the saved asset; defaults to gen_<job_id>_<index> and is idempotent."
14732
+ },
14733
+ {
14734
+ name: "asset_folder",
14735
+ type: "string",
14736
+ required: false,
14737
+ 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."
14738
+ },
14739
+ {
14740
+ name: "tags",
14741
+ type: "array",
14742
+ itemType: "string",
14743
+ required: false,
14744
+ description: "Tags to apply to the saved asset."
14745
+ },
14746
+ {
14747
+ name: "understanding",
14748
+ type: "string",
14749
+ enum: [
14750
+ "auto",
14751
+ "skip"
14752
+ ],
14753
+ required: false,
14754
+ description: "Understanding behavior for the saved asset; defaults to auto."
14755
+ }
14756
+ ]
14757
+ }
14758
+ },
13548
14759
  {
13549
14760
  resource: "media.libraries.purge",
13550
14761
  method: "create",
13551
14762
  summary: "Purge library",
13552
- 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.",
14763
+ 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.",
13553
14764
  http: "POST",
13554
14765
  path: "/media/v1/libraries/{library_id}/purge",
13555
14766
  streaming: "no",
@@ -13567,7 +14778,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13567
14778
  resource: "media.libraries",
13568
14779
  method: "restore",
13569
14780
  summary: "Restore library",
13570
- 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.",
14781
+ 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.",
13571
14782
  http: "POST",
13572
14783
  path: "/media/v1/libraries/{library_id}/restore",
13573
14784
  streaming: "no",
@@ -13585,7 +14796,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13585
14796
  resource: "media.libraries.search",
13586
14797
  method: "create",
13587
14798
  summary: "Semantic search alias",
13588
- 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.",
14799
+ 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.",
13589
14800
  http: "POST",
13590
14801
  path: "/media/v1/libraries/{library_id}/search",
13591
14802
  streaming: "no",
@@ -13636,7 +14847,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13636
14847
  resource: "media.libraries.search.expression",
13637
14848
  method: "create",
13638
14849
  summary: "Expression search",
13639
- 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.",
14850
+ 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.",
13640
14851
  http: "POST",
13641
14852
  path: "/media/v1/libraries/{library_id}/search/expression",
13642
14853
  streaming: "no",
@@ -13656,7 +14867,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13656
14867
  name: "expression",
13657
14868
  type: "string",
13658
14869
  required: false,
13659
- 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.'
14870
+ 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.'
13660
14871
  },
13661
14872
  {
13662
14873
  name: "sort_by",
@@ -13708,7 +14919,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13708
14919
  resource: "media.libraries.search.semantic",
13709
14920
  method: "create",
13710
14921
  summary: "Semantic search",
13711
- 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.",
14922
+ 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.",
13712
14923
  http: "POST",
13713
14924
  path: "/media/v1/libraries/{library_id}/search/semantic",
13714
14925
  streaming: "no",
@@ -13759,7 +14970,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13759
14970
  resource: "media.libraries.search.visual",
13760
14971
  method: "create",
13761
14972
  summary: "Visual search",
13762
- 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.",
14973
+ 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.",
13763
14974
  http: "POST",
13764
14975
  path: "/media/v1/libraries/{library_id}/search/visual",
13765
14976
  streaming: "no",
@@ -13802,6 +15013,67 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13802
15013
  ]
13803
15014
  }
13804
15015
  },
15016
+ {
15017
+ resource: "media.libraries.understandings",
15018
+ method: "list",
15019
+ summary: "List understanding results across a library",
15020
+ 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.",
15021
+ http: "GET",
15022
+ path: "/media/v1/libraries/{library_id}/understandings",
15023
+ streaming: "no",
15024
+ pagination: true,
15025
+ pathParams: [
15026
+ {
15027
+ name: "library_id",
15028
+ sdkName: "library_id",
15029
+ description: "Library ID returned by creation."
15030
+ }
15031
+ ],
15032
+ query: [
15033
+ {
15034
+ name: "folder",
15035
+ type: "string",
15036
+ required: false,
15037
+ description: "Folder path including all descendants; omitted or empty selects the entire library."
15038
+ },
15039
+ {
15040
+ name: "kinds",
15041
+ type: "string",
15042
+ required: false,
15043
+ description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, loudness, beats, content, embedding. Omit or empty to include every kind."
15044
+ },
15045
+ {
15046
+ name: "cursor",
15047
+ type: "string",
15048
+ required: false,
15049
+ description: "Cursor from the previous next_cursor."
15050
+ },
15051
+ {
15052
+ name: "limit",
15053
+ type: "integer",
15054
+ required: false,
15055
+ description: "Maximum entries in this page, from 1 through 100; defaults to 100."
15056
+ }
15057
+ ]
15058
+ },
15059
+ {
15060
+ resource: "media.libraries.understandings",
15061
+ method: "retrieveFailureSummary",
15062
+ summary: "Summarize understanding failures",
15063
+ 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.",
15064
+ http: "GET",
15065
+ path: "/media/v1/libraries/{library_id}/understandings/failure_summary",
15066
+ streaming: "no",
15067
+ pagination: false,
15068
+ pathParams: [
15069
+ {
15070
+ name: "library_id",
15071
+ sdkName: "library_id",
15072
+ description: "Library ID returned by creation."
15073
+ }
15074
+ ],
15075
+ query: []
15076
+ },
13805
15077
  {
13806
15078
  resource: "meta.docs",
13807
15079
  method: "search",
@@ -14089,25 +15361,25 @@ services (model, agent, automation…); call the operation you need and read its
14089
15361
  name: "model",
14090
15362
  type: "string",
14091
15363
  required: true,
14092
- 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."
15364
+ description: "Model catalog identifier declaring openai.audio.transcriptions; use it unchanged, including any creator prefix."
14093
15365
  },
14094
15366
  {
14095
15367
  name: "file",
14096
15368
  type: "string",
14097
15369
  required: true,
14098
- description: "Audio file to transcribe, uploaded as multipart/form-data. Router support (supported): Verified to take effect."
15370
+ description: "Audio bytes uploaded as a multipart file; supported formats and input limits depend on the selected model."
14099
15371
  },
14100
15372
  {
14101
15373
  name: "language",
14102
15374
  type: "string",
14103
15375
  required: false,
14104
- 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."
15376
+ description: "Source language code when known; omit to let the model detect the language."
14105
15377
  },
14106
15378
  {
14107
15379
  name: "prompt",
14108
15380
  type: "string",
14109
15381
  required: false,
14110
- 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."
15382
+ description: "Optional vocabulary or contextual guidance for recognizing the audio; support depends on the selected model."
14111
15383
  },
14112
15384
  {
14113
15385
  name: "response_format",
@@ -14115,20 +15387,22 @@ services (model, agent, automation…); call the operation you need and read its
14115
15387
  enum: [
14116
15388
  "json",
14117
15389
  "text",
14118
- "verbose_json"
15390
+ "verbose_json",
15391
+ "diarized_json"
14119
15392
  ],
14120
15393
  required: false,
14121
- 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."
15394
+ 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."
14122
15395
  },
14123
15396
  {
14124
15397
  name: "timestamp_granularities[]",
14125
15398
  type: "array",
14126
15399
  itemType: "string",
14127
15400
  enum: [
15401
+ "word",
14128
15402
  "segment"
14129
15403
  ],
14130
15404
  required: false,
14131
- 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."
15405
+ 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."
14132
15406
  },
14133
15407
  {
14134
15408
  name: "temperature",
@@ -16005,279 +17279,812 @@ for more details.`
16005
17279
  pagination: false,
16006
17280
  pathParams: [
16007
17281
  {
16008
- name: "response_id",
16009
- sdkName: "response_id",
16010
- description: "Id of the stored response, the `id` returned by createResponse (it looks like resp_...). An unknown id, a response created with store false, an expired response and another tenant's response all answer 404."
17282
+ name: "response_id",
17283
+ sdkName: "response_id",
17284
+ description: "Id of the stored response, the `id` returned by createResponse (it looks like resp_...). An unknown id, a response created with store false, an expired response and another tenant's response all answer 404."
17285
+ }
17286
+ ],
17287
+ query: []
17288
+ },
17289
+ {
17290
+ resource: "model.systemone",
17291
+ method: "create",
17292
+ summary: "Ask structured decision questions",
17293
+ description: "Ask typed questions about a state and get calibrated probabilities instead of generated text. Same request and response as TypeSafe System One. Use model ids from model.models.list declaring typesafe.systemone. Send one or more noul, choice or score questions; answers use the same question ids. Input tokens are charged at the catalog input price; output tokens are free. usage.cost and X-Praxis-Cost-Usd expose the same customer charge in USD. box questions and assets are unsupported and return 400: images are not supported. Unknown top-level fields pass unchanged to the native upstream.",
17294
+ http: "POST",
17295
+ path: "/model/v1/systemone",
17296
+ streaming: "no",
17297
+ pagination: false,
17298
+ pathParams: [],
17299
+ query: [],
17300
+ body: {
17301
+ required: true,
17302
+ fields: [
17303
+ {
17304
+ name: "model",
17305
+ type: "string",
17306
+ required: true,
17307
+ description: "Published model id from model.models.list with supported_apis containing typesafe.systemone; returned unchanged in the response."
17308
+ },
17309
+ {
17310
+ name: "state",
17311
+ type: "object",
17312
+ required: true,
17313
+ description: "Shared content evaluated by every question, supplied as text, a JSON object or an array."
17314
+ },
17315
+ {
17316
+ name: "questions",
17317
+ type: "object",
17318
+ required: true,
17319
+ description: "Non-empty map of caller-chosen question ids to typed questions; answers preserve these ids. noul evaluates yes/no, choice selects a named option, score rates ordered levels. box is unsupported."
17320
+ },
17321
+ {
17322
+ name: "assets",
17323
+ type: "object",
17324
+ required: false,
17325
+ description: "Unsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported."
17326
+ }
17327
+ ]
17328
+ }
17329
+ },
17330
+ {
17331
+ resource: "model.videos",
17332
+ method: "list",
17333
+ summary: "List videos",
17334
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17335
+ http: "GET",
17336
+ path: "/model/v1/videos",
17337
+ streaming: "no",
17338
+ pagination: false,
17339
+ pathParams: [],
17340
+ query: [
17341
+ {
17342
+ name: "after",
17343
+ type: "string",
17344
+ required: false,
17345
+ description: "Cursor: the id of the video job after which the page starts, normally the `last_id` of the previous page. It must refer to an existing job of yours, otherwise the call fails."
17346
+ },
17347
+ {
17348
+ name: "limit",
17349
+ type: "integer",
17350
+ required: false,
17351
+ description: "Maximum number of jobs per page, from 1 to 100; defaults to 20."
17352
+ },
17353
+ {
17354
+ name: "order",
17355
+ type: "string",
17356
+ enum: [
17357
+ "asc",
17358
+ "desc"
17359
+ ],
17360
+ required: false,
17361
+ description: "Sort order by creation time: desc (default) lists the newest job first, asc the oldest first."
17362
+ }
17363
+ ]
17364
+ },
17365
+ {
17366
+ resource: "model.videos",
17367
+ method: "create",
17368
+ summary: "Create video",
17369
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17370
+ http: "POST",
17371
+ path: "/model/v1/videos",
17372
+ streaming: "no",
17373
+ pagination: false,
17374
+ multipart: true,
17375
+ pathParams: [],
17376
+ query: [],
17377
+ body: {
17378
+ required: true,
17379
+ fields: [
17380
+ {
17381
+ name: "model",
17382
+ type: "string",
17383
+ required: false,
17384
+ description: "Video model id, for example `wan2.7-t2v`; list candidates with listModels?type=video. Router support (partial): Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation."
17385
+ },
17386
+ {
17387
+ name: "prompt",
17388
+ type: "string",
17389
+ required: true,
17390
+ description: "Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400."
17391
+ },
17392
+ {
17393
+ name: "seconds",
17394
+ type: "object",
17395
+ required: false,
17396
+ description: "Takes precedence over duration."
17397
+ },
17398
+ {
17399
+ name: "duration",
17400
+ type: "integer",
17401
+ required: false,
17402
+ description: "Length of the video in whole seconds. `seconds` takes precedence when both are given."
17403
+ },
17404
+ {
17405
+ name: "size",
17406
+ type: "string",
17407
+ required: false,
17408
+ description: "Output resolution as `WIDTHxHEIGHT`, for example `1280x720`. Router support (partial): Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel."
17409
+ },
17410
+ {
17411
+ name: "input_reference",
17412
+ type: "object",
17413
+ required: false,
17414
+ description: "Reference image for image-to-video: a URL or base64 data URL, an object with `image_url`, or an uploaded image file (multipart, at most 20 MiB)."
17415
+ },
17416
+ {
17417
+ name: "input_references",
17418
+ type: "array",
17419
+ itemType: "object",
17420
+ required: false,
17421
+ description: "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
17422
+ },
17423
+ {
17424
+ name: "frame_images",
17425
+ type: "array",
17426
+ itemType: "object",
17427
+ required: false,
17428
+ description: "Images that pin the first and last frame; at most 2 entries."
17429
+ },
17430
+ {
17431
+ name: "resolution",
17432
+ type: "string",
17433
+ required: false,
17434
+ description: "Output resolution label such as `720p`, for models that take a label instead of `size`."
17435
+ },
17436
+ {
17437
+ name: "aspect_ratio",
17438
+ type: "string",
17439
+ required: false,
17440
+ description: "Aspect ratio of the video such as `16:9`."
17441
+ },
17442
+ {
17443
+ name: "generate_audio",
17444
+ type: "boolean",
17445
+ required: false,
17446
+ description: "Whether the video carries a generated audio track. Router support (supported): false produces no audio track on wan2.7-t2v; the default output includes audio."
17447
+ },
17448
+ {
17449
+ name: "seed",
17450
+ type: "integer",
17451
+ required: false,
17452
+ description: "Seed for reproducible generation, on models that support it."
17453
+ },
17454
+ {
17455
+ name: "callback_url",
17456
+ type: "string",
17457
+ required: false,
17458
+ description: "HTTP or HTTPS callback URL, forwarded to models that support completion callbacks."
17459
+ },
17460
+ {
17461
+ name: "quality",
17462
+ type: "string",
17463
+ required: false,
17464
+ description: "Provider-specific quality setting."
17465
+ }
17466
+ ]
17467
+ }
17468
+ },
17469
+ {
17470
+ resource: "model.videos",
17471
+ method: "delete",
17472
+ summary: "Delete video",
17473
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17474
+ http: "DELETE",
17475
+ path: "/model/v1/videos/{video_id}",
17476
+ streaming: "no",
17477
+ pagination: false,
17478
+ pathParams: [
17479
+ {
17480
+ name: "video_id",
17481
+ sdkName: "video_id",
17482
+ description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
17483
+ }
17484
+ ],
17485
+ query: []
17486
+ },
17487
+ {
17488
+ resource: "model.videos",
17489
+ method: "retrieve",
17490
+ summary: "Retrieve video",
17491
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17492
+ http: "GET",
17493
+ path: "/model/v1/videos/{video_id}",
17494
+ streaming: "no",
17495
+ pagination: false,
17496
+ pathParams: [
17497
+ {
17498
+ name: "video_id",
17499
+ sdkName: "video_id",
17500
+ description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
17501
+ }
17502
+ ],
17503
+ query: []
17504
+ },
17505
+ {
17506
+ resource: "model.videos",
17507
+ method: "retrieveContent",
17508
+ summary: "Download video",
17509
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17510
+ http: "GET",
17511
+ path: "/model/v1/videos/{video_id}/content",
17512
+ streaming: "no",
17513
+ pagination: false,
17514
+ pathParams: [
17515
+ {
17516
+ name: "video_id",
17517
+ sdkName: "video_id",
17518
+ description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
17519
+ }
17520
+ ],
17521
+ query: [
17522
+ {
17523
+ name: "variant",
17524
+ type: "string",
17525
+ enum: [
17526
+ "video",
17527
+ "thumbnail",
17528
+ "spritesheet"
17529
+ ],
17530
+ required: false,
17531
+ description: "Spritesheet is not available in this release (400)."
17532
+ },
17533
+ {
17534
+ name: "index",
17535
+ type: "integer",
17536
+ required: false,
17537
+ description: "Output index; this release produces index 0. variant takes precedence."
17538
+ }
17539
+ ]
17540
+ },
17541
+ {
17542
+ resource: "model.videos",
17543
+ method: "remix",
17544
+ summary: "Remix video",
17545
+ description: "Not supported in this release; always returns 400.",
17546
+ http: "POST",
17547
+ path: "/model/v1/videos/{video_id}/remix",
17548
+ streaming: "no",
17549
+ pagination: false,
17550
+ pathParams: [
17551
+ {
17552
+ name: "video_id",
17553
+ sdkName: "video_id",
17554
+ description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
17555
+ }
17556
+ ],
17557
+ query: []
17558
+ },
17559
+ {
17560
+ resource: "ontology.changesets",
17561
+ method: "create",
17562
+ summary: "Apply changeset",
17563
+ 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.",
17564
+ http: "POST",
17565
+ path: "/ontology/v1/changesets",
17566
+ streaming: "no",
17567
+ pagination: false,
17568
+ pathParams: [],
17569
+ query: [],
17570
+ body: {
17571
+ required: true,
17572
+ fields: [
17573
+ {
17574
+ name: "at",
17575
+ type: "string",
17576
+ required: true,
17577
+ description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
17578
+ },
17579
+ {
17580
+ name: "scope",
17581
+ type: "string",
17582
+ required: false,
17583
+ description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
17584
+ },
17585
+ {
17586
+ name: "ops",
17587
+ type: "array",
17588
+ itemType: "object",
17589
+ required: true,
17590
+ description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
17591
+ }
17592
+ ]
17593
+ }
17594
+ },
17595
+ {
17596
+ resource: "ontology.nodes",
17597
+ method: "list",
17598
+ summary: "List nodes",
17599
+ 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.",
17600
+ http: "GET",
17601
+ path: "/ontology/v1/nodes",
17602
+ streaming: "no",
17603
+ pagination: true,
17604
+ pathParams: [],
17605
+ query: [
17606
+ {
17607
+ name: "type",
17608
+ type: "array",
17609
+ itemType: "string",
17610
+ required: false,
17611
+ description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
17612
+ },
17613
+ {
17614
+ name: "q",
17615
+ type: "string",
17616
+ required: false,
17617
+ description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
17618
+ },
17619
+ {
17620
+ name: "owner",
17621
+ type: "string",
17622
+ required: false,
17623
+ description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
17624
+ },
17625
+ {
17626
+ name: "as_of",
17627
+ type: "string",
17628
+ required: false,
17629
+ description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
17630
+ },
17631
+ {
17632
+ name: "limit",
17633
+ type: "integer",
17634
+ required: false,
17635
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17636
+ },
17637
+ {
17638
+ name: "cursor",
17639
+ type: "string",
17640
+ required: false,
17641
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
17642
+ }
17643
+ ]
17644
+ },
17645
+ {
17646
+ resource: "ontology.nodes",
17647
+ method: "create",
17648
+ summary: "Create node",
17649
+ 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.",
17650
+ http: "POST",
17651
+ path: "/ontology/v1/nodes",
17652
+ streaming: "no",
17653
+ pagination: false,
17654
+ pathParams: [],
17655
+ query: [],
17656
+ body: {
17657
+ required: true,
17658
+ fields: [
17659
+ {
17660
+ name: "type",
17661
+ type: "string",
17662
+ required: true,
17663
+ description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
17664
+ },
17665
+ {
17666
+ name: "ref",
17667
+ type: "string",
17668
+ required: false,
17669
+ 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."
17670
+ },
17671
+ {
17672
+ name: "name",
17673
+ type: "string",
17674
+ required: true,
17675
+ description: "Display name of the entity, at most 200 characters."
17676
+ },
17677
+ {
17678
+ name: "aliases",
17679
+ type: "array",
17680
+ itemType: "string",
17681
+ required: false,
17682
+ description: "Other names this entity is known by; they are matched by search alongside the name."
17683
+ },
17684
+ {
17685
+ name: "description",
17686
+ type: "string",
17687
+ required: false,
17688
+ description: "Profile of the entity, at most 500 characters; omit or null for none."
17689
+ },
17690
+ {
17691
+ name: "owner",
17692
+ type: "string",
17693
+ required: false,
17694
+ description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
17695
+ }
17696
+ ]
17697
+ }
17698
+ },
17699
+ {
17700
+ resource: "ontology.nodes",
17701
+ method: "retrieve",
17702
+ summary: "Retrieve node",
17703
+ 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.",
17704
+ http: "GET",
17705
+ path: "/ontology/v1/nodes/{node_id}",
17706
+ streaming: "no",
17707
+ pagination: false,
17708
+ pathParams: [
17709
+ {
17710
+ name: "node_id",
17711
+ sdkName: "node_id",
17712
+ 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."
17713
+ }
17714
+ ],
17715
+ query: [
17716
+ {
17717
+ name: "expand",
17718
+ type: "string",
17719
+ enum: [
17720
+ "relations"
17721
+ ],
17722
+ required: false,
17723
+ description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
17724
+ },
17725
+ {
17726
+ name: "as_of",
17727
+ type: "string",
17728
+ required: false,
17729
+ description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
17730
+ }
17731
+ ]
17732
+ },
17733
+ {
17734
+ resource: "ontology.nodes",
17735
+ method: "update",
17736
+ summary: "Update node",
17737
+ 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.",
17738
+ http: "PATCH",
17739
+ path: "/ontology/v1/nodes/{node_id}",
17740
+ streaming: "no",
17741
+ pagination: false,
17742
+ pathParams: [
17743
+ {
17744
+ name: "node_id",
17745
+ sdkName: "node_id",
17746
+ 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."
16011
17747
  }
16012
17748
  ],
16013
- query: []
17749
+ query: [],
17750
+ body: {
17751
+ required: true,
17752
+ fields: [
17753
+ {
17754
+ name: "name",
17755
+ type: "string",
17756
+ required: false,
17757
+ description: "New display name, at most 200 characters; omit to keep the current name."
17758
+ },
17759
+ {
17760
+ name: "aliases",
17761
+ type: "array",
17762
+ itemType: "string",
17763
+ required: false,
17764
+ description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
17765
+ },
17766
+ {
17767
+ name: "description",
17768
+ type: "string",
17769
+ required: false,
17770
+ description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
17771
+ }
17772
+ ]
17773
+ }
16014
17774
  },
16015
17775
  {
16016
- resource: "model.systemone",
17776
+ resource: "ontology.nodes.merge",
16017
17777
  method: "create",
16018
- summary: "Ask structured decision questions",
16019
- description: "Ask typed questions about a state and get calibrated probabilities instead of generated text. Same request and response as TypeSafe System One. Use model ids from model.models.list declaring typesafe.systemone. Send one or more noul, choice or score questions; answers use the same question ids. Input tokens are charged at the catalog input price; output tokens are free. usage.cost and X-Praxis-Cost-Usd expose the same customer charge in USD. box questions and assets are unsupported and return 400: images are not supported. Unknown top-level fields pass unchanged to the native upstream.",
17778
+ summary: "Merge node",
17779
+ 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.",
16020
17780
  http: "POST",
16021
- path: "/model/v1/systemone",
17781
+ path: "/ontology/v1/nodes/{node_id}/merge",
16022
17782
  streaming: "no",
16023
17783
  pagination: false,
16024
- pathParams: [],
17784
+ pathParams: [
17785
+ {
17786
+ name: "node_id",
17787
+ sdkName: "node_id",
17788
+ 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."
17789
+ }
17790
+ ],
16025
17791
  query: [],
16026
17792
  body: {
16027
17793
  required: true,
16028
17794
  fields: [
16029
17795
  {
16030
- name: "model",
17796
+ name: "into",
16031
17797
  type: "string",
16032
17798
  required: true,
16033
- description: "Published model id from model.models.list with supported_apis containing typesafe.systemone; returned unchanged in the response."
16034
- },
16035
- {
16036
- name: "state",
16037
- type: "object",
16038
- required: true,
16039
- description: "Shared content evaluated by every question, supplied as text, a JSON object or an array."
16040
- },
16041
- {
16042
- name: "questions",
16043
- type: "object",
16044
- required: true,
16045
- description: "Non-empty map of caller-chosen question ids to typed questions; answers preserve these ids. noul evaluates yes/no, choice selects a named option, score rates ordered levels. box is unsupported."
16046
- },
16047
- {
16048
- name: "assets",
16049
- type: "object",
16050
- required: false,
16051
- description: "Unsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported."
17799
+ description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
16052
17800
  }
16053
17801
  ]
16054
17802
  }
16055
17803
  },
16056
17804
  {
16057
- resource: "model.videos",
17805
+ resource: "ontology.relations",
16058
17806
  method: "list",
16059
- summary: "List videos",
16060
- description: "OpenAI video API with OpenRouter request and response extensions.",
17807
+ summary: "List relations",
17808
+ 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.",
16061
17809
  http: "GET",
16062
- path: "/model/v1/videos",
17810
+ path: "/ontology/v1/relations",
16063
17811
  streaming: "no",
16064
- pagination: false,
17812
+ pagination: true,
16065
17813
  pathParams: [],
16066
17814
  query: [
16067
17815
  {
16068
- name: "after",
17816
+ name: "node",
16069
17817
  type: "string",
16070
17818
  required: false,
16071
- description: "Cursor: the id of the video job after which the page starts, normally the `last_id` of the previous page. It must refer to an existing job of yours, otherwise the call fails."
17819
+ 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."
16072
17820
  },
16073
17821
  {
16074
- name: "limit",
16075
- type: "integer",
17822
+ name: "type",
17823
+ type: "array",
17824
+ itemType: "string",
16076
17825
  required: false,
16077
- description: "Maximum number of jobs per page, from 1 to 100; defaults to 20."
17826
+ description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
16078
17827
  },
16079
17828
  {
16080
- name: "order",
17829
+ name: "direction",
16081
17830
  type: "string",
16082
17831
  enum: [
16083
- "asc",
16084
- "desc"
17832
+ "out",
17833
+ "in",
17834
+ "both"
16085
17835
  ],
16086
17836
  required: false,
16087
- description: "Sort order by creation time: desc (default) lists the newest job first, asc the oldest first."
17837
+ 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."
17838
+ },
17839
+ {
17840
+ name: "as_of",
17841
+ type: "string",
17842
+ required: false,
17843
+ 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."
17844
+ },
17845
+ {
17846
+ name: "include_invalid",
17847
+ type: "boolean",
17848
+ required: false,
17849
+ 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."
17850
+ },
17851
+ {
17852
+ name: "limit",
17853
+ type: "integer",
17854
+ required: false,
17855
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17856
+ },
17857
+ {
17858
+ name: "cursor",
17859
+ type: "string",
17860
+ required: false,
17861
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
16088
17862
  }
16089
17863
  ]
16090
17864
  },
16091
17865
  {
16092
- resource: "model.videos",
17866
+ resource: "ontology.relations",
16093
17867
  method: "create",
16094
- summary: "Create video",
16095
- description: "OpenAI video API with OpenRouter request and response extensions.",
17868
+ summary: "Create relation",
17869
+ 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.",
16096
17870
  http: "POST",
16097
- path: "/model/v1/videos",
17871
+ path: "/ontology/v1/relations",
16098
17872
  streaming: "no",
16099
17873
  pagination: false,
16100
- multipart: true,
16101
17874
  pathParams: [],
16102
17875
  query: [],
16103
17876
  body: {
16104
17877
  required: true,
16105
17878
  fields: [
16106
17879
  {
16107
- name: "model",
17880
+ name: "type",
16108
17881
  type: "string",
16109
- required: false,
16110
- description: "Video model id, for example `wan2.7-t2v`; list candidates with listModels?type=video. Router support (partial): Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation."
17882
+ required: true,
17883
+ description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
16111
17884
  },
16112
17885
  {
16113
- name: "prompt",
17886
+ name: "source",
16114
17887
  type: "string",
16115
17888
  required: true,
16116
- description: "Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400."
16117
- },
16118
- {
16119
- name: "seconds",
16120
- type: "object",
16121
- required: false,
16122
- description: "Takes precedence over duration."
17889
+ description: "Node id the fact starts from, from nodes.list or nodes.create."
16123
17890
  },
16124
17891
  {
16125
- name: "duration",
16126
- type: "integer",
16127
- required: false,
16128
- description: "Length of the video in whole seconds. `seconds` takes precedence when both are given."
17892
+ name: "target",
17893
+ type: "string",
17894
+ required: true,
17895
+ description: "Node id the fact points at, from nodes.list or nodes.create."
16129
17896
  },
16130
17897
  {
16131
- name: "size",
17898
+ name: "fact",
16132
17899
  type: "string",
16133
- required: false,
16134
- description: "Output resolution as `WIDTHxHEIGHT`, for example `1280x720`. Router support (partial): Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel."
17900
+ required: true,
17901
+ description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
16135
17902
  },
16136
17903
  {
16137
- name: "input_reference",
16138
- type: "object",
17904
+ name: "valid_at",
17905
+ type: "string",
16139
17906
  required: false,
16140
- description: "Reference image for image-to-video: a URL or base64 data URL, an object with `image_url`, or an uploaded image file (multipart, at most 20 MiB)."
17907
+ description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
16141
17908
  },
16142
17909
  {
16143
- name: "input_references",
16144
- type: "array",
16145
- itemType: "object",
17910
+ name: "owner",
17911
+ type: "string",
16146
17912
  required: false,
16147
- description: "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
16148
- },
17913
+ description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
17914
+ }
17915
+ ]
17916
+ }
17917
+ },
17918
+ {
17919
+ resource: "ontology.relations",
17920
+ method: "retrieve",
17921
+ summary: "Retrieve relation",
17922
+ 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.",
17923
+ http: "GET",
17924
+ path: "/ontology/v1/relations/{relation_id}",
17925
+ streaming: "no",
17926
+ pagination: false,
17927
+ pathParams: [
17928
+ {
17929
+ name: "relation_id",
17930
+ sdkName: "relation_id",
17931
+ 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."
17932
+ }
17933
+ ],
17934
+ query: []
17935
+ },
17936
+ {
17937
+ resource: "ontology.relations.invalidate",
17938
+ method: "create",
17939
+ summary: "Invalidate relation",
17940
+ 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.",
17941
+ http: "POST",
17942
+ path: "/ontology/v1/relations/{relation_id}/invalidate",
17943
+ streaming: "no",
17944
+ pagination: false,
17945
+ pathParams: [
17946
+ {
17947
+ name: "relation_id",
17948
+ sdkName: "relation_id",
17949
+ 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."
17950
+ }
17951
+ ],
17952
+ query: [],
17953
+ body: {
17954
+ required: true,
17955
+ fields: [
16149
17956
  {
16150
- name: "frame_images",
16151
- type: "array",
16152
- itemType: "object",
16153
- required: false,
16154
- description: "Images that pin the first and last frame; at most 2 entries."
17957
+ name: "invalid_at",
17958
+ type: "string",
17959
+ required: true,
17960
+ description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
16155
17961
  },
16156
17962
  {
16157
- name: "resolution",
17963
+ name: "superseded_by",
16158
17964
  type: "string",
16159
17965
  required: false,
16160
- description: "Output resolution label such as `720p`, for models that take a label instead of `size`."
17966
+ description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
16161
17967
  },
16162
17968
  {
16163
- name: "aspect_ratio",
17969
+ name: "reason",
16164
17970
  type: "string",
16165
17971
  required: false,
16166
- description: "Aspect ratio of the video such as `16:9`."
16167
- },
17972
+ description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
17973
+ }
17974
+ ]
17975
+ }
17976
+ },
17977
+ {
17978
+ resource: "ontology.search",
17979
+ method: "create",
17980
+ summary: "Search nodes",
17981
+ 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.",
17982
+ http: "POST",
17983
+ path: "/ontology/v1/search",
17984
+ streaming: "no",
17985
+ pagination: false,
17986
+ pathParams: [],
17987
+ query: [],
17988
+ body: {
17989
+ required: true,
17990
+ fields: [
16168
17991
  {
16169
- name: "generate_audio",
16170
- type: "boolean",
16171
- required: false,
16172
- description: "Whether the video carries a generated audio track. Router support (supported): false produces no audio track on wan2.7-t2v; the default output includes audio."
17992
+ name: "text",
17993
+ type: "string",
17994
+ required: true,
17995
+ description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
16173
17996
  },
16174
17997
  {
16175
- name: "seed",
16176
- type: "integer",
17998
+ name: "types",
17999
+ type: "array",
18000
+ itemType: "string",
16177
18001
  required: false,
16178
- description: "Seed for reproducible generation, on models that support it."
18002
+ description: "Registered node type names to search within; omit to search every type."
16179
18003
  },
16180
18004
  {
16181
- name: "callback_url",
16182
- type: "string",
18005
+ name: "window",
18006
+ type: "object",
16183
18007
  required: false,
16184
- description: "HTTP or HTTPS callback URL, forwarded to models that support completion callbacks."
18008
+ description: "Restrict matches to facts recorded within a period; omit to search all time."
16185
18009
  },
16186
18010
  {
16187
- name: "quality",
16188
- type: "string",
18011
+ name: "limit",
18012
+ type: "integer",
16189
18013
  required: false,
16190
- description: "Provider-specific quality setting."
18014
+ description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
16191
18015
  }
16192
18016
  ]
16193
18017
  }
16194
18018
  },
16195
18019
  {
16196
- resource: "model.videos",
16197
- method: "delete",
16198
- summary: "Delete video",
16199
- description: "OpenAI video API with OpenRouter request and response extensions.",
16200
- http: "DELETE",
16201
- path: "/model/v1/videos/{video_id}",
16202
- streaming: "no",
16203
- pagination: false,
16204
- pathParams: [
16205
- {
16206
- name: "video_id",
16207
- sdkName: "video_id",
16208
- description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
16209
- }
16210
- ],
16211
- query: []
16212
- },
16213
- {
16214
- resource: "model.videos",
16215
- method: "retrieve",
16216
- summary: "Retrieve video",
16217
- description: "OpenAI video API with OpenRouter request and response extensions.",
18020
+ resource: "ontology.types",
18021
+ method: "list",
18022
+ summary: "List types",
18023
+ 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.",
16218
18024
  http: "GET",
16219
- path: "/model/v1/videos/{video_id}",
18025
+ path: "/ontology/v1/types",
16220
18026
  streaming: "no",
16221
18027
  pagination: false,
16222
- pathParams: [
16223
- {
16224
- name: "video_id",
16225
- sdkName: "video_id",
16226
- description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
16227
- }
16228
- ],
18028
+ pathParams: [],
16229
18029
  query: []
16230
18030
  },
16231
18031
  {
16232
- resource: "model.videos",
16233
- method: "retrieveContent",
16234
- summary: "Download video",
16235
- description: "OpenAI video API with OpenRouter request and response extensions.",
16236
- http: "GET",
16237
- path: "/model/v1/videos/{video_id}/content",
18032
+ resource: "ontology.types",
18033
+ method: "create",
18034
+ summary: "Register type",
18035
+ 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.",
18036
+ http: "POST",
18037
+ path: "/ontology/v1/types",
16238
18038
  streaming: "no",
16239
18039
  pagination: false,
16240
- pathParams: [
16241
- {
16242
- name: "video_id",
16243
- sdkName: "video_id",
16244
- description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
16245
- }
16246
- ],
16247
- query: [
16248
- {
16249
- name: "variant",
16250
- type: "string",
16251
- enum: [
16252
- "video",
16253
- "thumbnail",
16254
- "spritesheet"
16255
- ],
16256
- required: false,
16257
- description: "Spritesheet is not available in this release (400)."
16258
- },
16259
- {
16260
- name: "index",
16261
- type: "integer",
16262
- required: false,
16263
- description: "Output index; this release produces index 0. variant takes precedence."
16264
- }
16265
- ]
18040
+ pathParams: [],
18041
+ query: [],
18042
+ body: {
18043
+ required: true,
18044
+ fields: [
18045
+ {
18046
+ name: "owner",
18047
+ type: "string",
18048
+ required: true,
18049
+ description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
18050
+ },
18051
+ {
18052
+ name: "version",
18053
+ type: "integer",
18054
+ required: true,
18055
+ description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
18056
+ },
18057
+ {
18058
+ name: "nodes",
18059
+ type: "array",
18060
+ itemType: "object",
18061
+ required: true,
18062
+ description: "Node types this owner registers."
18063
+ },
18064
+ {
18065
+ name: "edges",
18066
+ type: "array",
18067
+ itemType: "object",
18068
+ required: true,
18069
+ description: "Relation types this owner registers."
18070
+ }
18071
+ ]
18072
+ }
16266
18073
  },
16267
18074
  {
16268
- resource: "model.videos",
16269
- method: "remix",
16270
- summary: "Remix video",
16271
- description: "Not supported in this release; always returns 400.",
16272
- http: "POST",
16273
- path: "/model/v1/videos/{video_id}/remix",
18075
+ resource: "ontology.types",
18076
+ method: "retrieve",
18077
+ summary: "Retrieve type",
18078
+ 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.",
18079
+ http: "GET",
18080
+ path: "/ontology/v1/types/{name}",
16274
18081
  streaming: "no",
16275
18082
  pagination: false,
16276
18083
  pathParams: [
16277
18084
  {
16278
- name: "video_id",
16279
- sdkName: "video_id",
16280
- description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
18085
+ name: "name",
18086
+ sdkName: "name",
18087
+ description: "A type name from types.list, with its dots preserved — a display label is not accepted."
16281
18088
  }
16282
18089
  ],
16283
18090
  query: []
@@ -19005,7 +20812,7 @@ for more details.`
19005
20812
  resource: "ticket.labels",
19006
20813
  method: "create",
19007
20814
  summary: "Create or add labels",
19008
- 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.",
20815
+ 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.",
19009
20816
  http: "POST",
19010
20817
  path: "/ticket/v1/labels",
19011
20818
  streaming: "no",
@@ -19047,7 +20854,7 @@ for more details.`
19047
20854
  resource: "ticket.labels",
19048
20855
  method: "delete",
19049
20856
  summary: "Remove labels",
19050
- 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.",
20857
+ 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.",
19051
20858
  http: "DELETE",
19052
20859
  path: "/ticket/v1/labels/{name}",
19053
20860
  streaming: "no",
@@ -19072,7 +20879,7 @@ for more details.`
19072
20879
  resource: "ticket.labels",
19073
20880
  method: "update",
19074
20881
  summary: "Update labels",
19075
- 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.",
20882
+ 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.",
19076
20883
  http: "PATCH",
19077
20884
  path: "/ticket/v1/labels/{name}",
19078
20885
  streaming: "no",
@@ -19368,7 +21175,7 @@ for more details.`
19368
21175
  name: "filter",
19369
21176
  type: "string",
19370
21177
  required: false,
19371
- 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."
21178
+ 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."
19372
21179
  }
19373
21180
  ]
19374
21181
  },
@@ -20474,7 +22281,7 @@ for more details.`
20474
22281
  resource: "vault.vaults",
20475
22282
  method: "create",
20476
22283
  summary: "Create vault",
20477
- 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.",
22284
+ 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.",
20478
22285
  http: "POST",
20479
22286
  path: "/vault/v1/vaults",
20480
22287
  streaming: "no",
@@ -21007,6 +22814,8 @@ function problemFrom(status, headers, body, statusText) {
21007
22814
  param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
21008
22815
  errors: Array.isArray(value.errors) ? value.errors : [],
21009
22816
  requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
22817
+ docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
22818
+ describe: string(nested.describe) ?? string(value.describe),
21010
22819
  raw: body
21011
22820
  };
21012
22821
  }
@@ -21020,6 +22829,8 @@ class PraxisError extends Error {
21020
22829
  errors;
21021
22830
  requestId;
21022
22831
  param;
22832
+ docUrl;
22833
+ describe;
21023
22834
  raw;
21024
22835
  constructor(problem = {}, options) {
21025
22836
  super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
@@ -21032,6 +22843,8 @@ class PraxisError extends Error {
21032
22843
  this.errors = problem.errors ?? [];
21033
22844
  this.requestId = problem.requestId;
21034
22845
  this.param = problem.param;
22846
+ this.docUrl = problem.docUrl;
22847
+ this.describe = problem.describe;
21035
22848
  this.raw = problem.raw;
21036
22849
  }
21037
22850
  static fromResponse(response, body) {
@@ -22436,6 +24249,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
22436
24249
  url: "/agent/v1/computers/{computer_id}/files/content",
22437
24250
  ...options
22438
24251
  });
24252
+ var computersFilesConvert = (options) => (options.client ?? client).post({
24253
+ security: [{
24254
+ key: "BearerAuth",
24255
+ scheme: "bearer",
24256
+ type: "http"
24257
+ }, {
24258
+ key: "ApiKeyAuth",
24259
+ name: "X-API-Key",
24260
+ type: "apiKey"
24261
+ }],
24262
+ url: "/agent/v1/computers/{computer_id}/files/convert",
24263
+ ...options,
24264
+ headers: {
24265
+ "Content-Type": "application/json",
24266
+ ...options.headers
24267
+ }
24268
+ });
22439
24269
  var connectComputer = (options) => (options.client ?? client).post({
22440
24270
  security: [{
22441
24271
  key: "BearerAuth",
@@ -22934,6 +24764,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
22934
24764
  url: "/file/v1/uploads/{upload_id}/cancel",
22935
24765
  ...options
22936
24766
  });
24767
+ var fileRetrieveUpload = (options) => (options.client ?? client).get({
24768
+ security: [{
24769
+ key: "BearerAuth",
24770
+ scheme: "bearer",
24771
+ type: "http"
24772
+ }],
24773
+ url: "/file/v1/uploads/{upload_id}",
24774
+ ...options
24775
+ });
22937
24776
  var fileCreateSignedUpload = (options) => (options.client ?? client).post({
22938
24777
  security: [{
22939
24778
  key: "BearerAuth",
@@ -26810,6 +28649,36 @@ var cutCreateExport = (options) => (options.client ?? client).post({
26810
28649
  ...options.headers
26811
28650
  }
26812
28651
  });
28652
+ var cutCreateRender = (options) => (options.client ?? client).post({
28653
+ security: [{
28654
+ key: "BearerAuth",
28655
+ scheme: "bearer",
28656
+ type: "http"
28657
+ }, {
28658
+ key: "ApiKeyAuth",
28659
+ name: "X-API-Key",
28660
+ type: "apiKey"
28661
+ }],
28662
+ url: "/cut/v1/projects/{project_id}/renders",
28663
+ ...options,
28664
+ headers: {
28665
+ "Content-Type": "application/json",
28666
+ ...options.headers
28667
+ }
28668
+ });
28669
+ var cutRetrieveRender = (options) => (options.client ?? client).get({
28670
+ security: [{
28671
+ key: "BearerAuth",
28672
+ scheme: "bearer",
28673
+ type: "http"
28674
+ }, {
28675
+ key: "ApiKeyAuth",
28676
+ name: "X-API-Key",
28677
+ type: "apiKey"
28678
+ }],
28679
+ url: "/cut/v1/renders/{render_id}",
28680
+ ...options
28681
+ });
26813
28682
  var cutRetrieveExport = (options) => (options.client ?? client).get({
26814
28683
  security: [{
26815
28684
  key: "BearerAuth",
@@ -27100,6 +28969,201 @@ var databaseInsert = (options) => (options.client ?? client).post({
27100
28969
  ...options.headers
27101
28970
  }
27102
28971
  });
28972
+ var devopsTestCatalogGet = (options) => (options.client ?? client).get({
28973
+ security: [{
28974
+ key: "devops-bearerAuth",
28975
+ scheme: "bearer",
28976
+ type: "http"
28977
+ }],
28978
+ url: "/devops/v1/projects/{project}/test-catalog",
28979
+ ...options
28980
+ });
28981
+ var devopsTestSuitesList = (options) => (options.client ?? client).get({
28982
+ security: [{
28983
+ key: "devops-bearerAuth",
28984
+ scheme: "bearer",
28985
+ type: "http"
28986
+ }],
28987
+ url: "/devops/v1/projects/{project}/test-suites",
28988
+ ...options
28989
+ });
28990
+ var devopsTestSuitesGet = (options) => (options.client ?? client).get({
28991
+ security: [{
28992
+ key: "devops-bearerAuth",
28993
+ scheme: "bearer",
28994
+ type: "http"
28995
+ }],
28996
+ url: "/devops/v1/test-suites/{id}",
28997
+ ...options
28998
+ });
28999
+ var devopsTestCasesList = (options) => (options.client ?? client).get({
29000
+ security: [{
29001
+ key: "devops-bearerAuth",
29002
+ scheme: "bearer",
29003
+ type: "http"
29004
+ }],
29005
+ url: "/devops/v1/projects/{project}/test-cases",
29006
+ ...options
29007
+ });
29008
+ var devopsTestCasesGet = (options) => (options.client ?? client).get({
29009
+ security: [{
29010
+ key: "devops-bearerAuth",
29011
+ scheme: "bearer",
29012
+ type: "http"
29013
+ }],
29014
+ url: "/devops/v1/test-cases/{id}",
29015
+ ...options
29016
+ });
29017
+ var devopsTestPlansList = (options) => (options.client ?? client).get({
29018
+ security: [{
29019
+ key: "devops-bearerAuth",
29020
+ scheme: "bearer",
29021
+ type: "http"
29022
+ }],
29023
+ url: "/devops/v1/projects/{project}/test-plans",
29024
+ ...options
29025
+ });
29026
+ var devopsTestPlansCreate = (options) => (options.client ?? client).post({
29027
+ security: [{
29028
+ key: "devops-bearerAuth",
29029
+ scheme: "bearer",
29030
+ type: "http"
29031
+ }],
29032
+ url: "/devops/v1/projects/{project}/test-plans",
29033
+ ...options,
29034
+ headers: {
29035
+ "Content-Type": "application/json",
29036
+ ...options.headers
29037
+ }
29038
+ });
29039
+ var devopsTestPlansDelete = (options) => (options.client ?? client).delete({
29040
+ security: [{
29041
+ key: "devops-bearerAuth",
29042
+ scheme: "bearer",
29043
+ type: "http"
29044
+ }],
29045
+ url: "/devops/v1/test-plans/{id}",
29046
+ ...options
29047
+ });
29048
+ var devopsTestPlansGet = (options) => (options.client ?? client).get({
29049
+ security: [{
29050
+ key: "devops-bearerAuth",
29051
+ scheme: "bearer",
29052
+ type: "http"
29053
+ }],
29054
+ url: "/devops/v1/test-plans/{id}",
29055
+ ...options
29056
+ });
29057
+ var devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
29058
+ security: [{
29059
+ key: "devops-bearerAuth",
29060
+ scheme: "bearer",
29061
+ type: "http"
29062
+ }],
29063
+ url: "/devops/v1/test-plans/{id}",
29064
+ ...options,
29065
+ headers: {
29066
+ "Content-Type": "application/json",
29067
+ ...options.headers
29068
+ }
29069
+ });
29070
+ var devopsTestPlansPause = (options) => (options.client ?? client).post({
29071
+ security: [{
29072
+ key: "devops-bearerAuth",
29073
+ scheme: "bearer",
29074
+ type: "http"
29075
+ }],
29076
+ url: "/devops/v1/test-plans/{id}:pause",
29077
+ ...options,
29078
+ headers: {
29079
+ "Content-Type": "application/json",
29080
+ ...options.headers
29081
+ }
29082
+ });
29083
+ var devopsTestPlansResume = (options) => (options.client ?? client).post({
29084
+ security: [{
29085
+ key: "devops-bearerAuth",
29086
+ scheme: "bearer",
29087
+ type: "http"
29088
+ }],
29089
+ url: "/devops/v1/test-plans/{id}:resume",
29090
+ ...options
29091
+ });
29092
+ var devopsTestRunsList = (options) => (options.client ?? client).get({
29093
+ security: [{
29094
+ key: "devops-bearerAuth",
29095
+ scheme: "bearer",
29096
+ type: "http"
29097
+ }],
29098
+ url: "/devops/v1/projects/{project}/test-runs",
29099
+ ...options
29100
+ });
29101
+ var devopsTestRunsCreate = (options) => (options.client ?? client).post({
29102
+ security: [{
29103
+ key: "devops-bearerAuth",
29104
+ scheme: "bearer",
29105
+ type: "http"
29106
+ }],
29107
+ url: "/devops/v1/projects/{project}/test-runs",
29108
+ ...options,
29109
+ headers: {
29110
+ "Content-Type": "application/json",
29111
+ ...options.headers
29112
+ }
29113
+ });
29114
+ var devopsTestRunsGet = (options) => (options.client ?? client).get({
29115
+ security: [{
29116
+ key: "devops-bearerAuth",
29117
+ scheme: "bearer",
29118
+ type: "http"
29119
+ }],
29120
+ url: "/devops/v1/test-runs/{id}",
29121
+ ...options
29122
+ });
29123
+ var devopsTestRunsCancel = (options) => (options.client ?? client).post({
29124
+ security: [{
29125
+ key: "devops-bearerAuth",
29126
+ scheme: "bearer",
29127
+ type: "http"
29128
+ }],
29129
+ url: "/devops/v1/test-runs/{id}:cancel",
29130
+ ...options,
29131
+ headers: {
29132
+ "Content-Type": "application/json",
29133
+ ...options.headers
29134
+ }
29135
+ });
29136
+ var devopsTestExecutionsList = (options) => (options.client ?? client).get({
29137
+ security: [{
29138
+ key: "devops-bearerAuth",
29139
+ scheme: "bearer",
29140
+ type: "http"
29141
+ }],
29142
+ url: "/devops/v1/test-runs/{run}/executions",
29143
+ ...options
29144
+ });
29145
+ var devopsTestExecutionsGet = (options) => (options.client ?? client).get({
29146
+ security: [{
29147
+ key: "devops-bearerAuth",
29148
+ scheme: "bearer",
29149
+ type: "http"
29150
+ }],
29151
+ url: "/devops/v1/test-runs/{run}/executions/{case}",
29152
+ ...options
29153
+ });
29154
+ var devopsTestReportsUpload = (options) => (options.client ?? client).post({
29155
+ security: [{
29156
+ key: "devops-bearerAuth",
29157
+ scheme: "bearer",
29158
+ type: "http"
29159
+ }],
29160
+ url: "/devops/v1/projects/{project}/test-reports",
29161
+ ...options,
29162
+ headers: {
29163
+ "Content-Type": "application/json",
29164
+ ...options.headers
29165
+ }
29166
+ });
27103
29167
  var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
27104
29168
  security: [{
27105
29169
  key: "knowledge-bearerAuth",
@@ -27344,6 +29408,19 @@ var mediaCreateLibrary = (options) => (options.client ?? client).post({
27344
29408
  ...options.headers
27345
29409
  }
27346
29410
  });
29411
+ var mediaCreateFrameUrls = (options) => (options.client ?? client).post({
29412
+ security: [{
29413
+ key: "media-BearerAuth",
29414
+ scheme: "bearer",
29415
+ type: "http"
29416
+ }],
29417
+ url: "/media/v1/libraries/{library_id}/assets/{asset_id}/frames",
29418
+ ...options,
29419
+ headers: {
29420
+ "Content-Type": "application/json",
29421
+ ...options.headers
29422
+ }
29423
+ });
27347
29424
  var mediaDeleteLibrary = (options) => (options.client ?? client).delete({
27348
29425
  security: [{
27349
29426
  key: "media-BearerAuth",
@@ -27608,6 +29685,235 @@ var mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
27608
29685
  ...options.headers
27609
29686
  }
27610
29687
  });
29688
+ var mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
29689
+ security: [{
29690
+ key: "media-BearerAuth",
29691
+ scheme: "bearer",
29692
+ type: "http"
29693
+ }],
29694
+ url: "/media/v1/libraries/{library_id}/understandings/failure_summary",
29695
+ ...options
29696
+ });
29697
+ var mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
29698
+ security: [{
29699
+ key: "media-BearerAuth",
29700
+ scheme: "bearer",
29701
+ type: "http"
29702
+ }],
29703
+ url: "/media/v1/libraries/{library_id}/understandings",
29704
+ ...options
29705
+ });
29706
+ var mediaCreateGeneration = (options) => (options.client ?? client).post({
29707
+ security: [{
29708
+ key: "media-BearerAuth",
29709
+ scheme: "bearer",
29710
+ type: "http"
29711
+ }],
29712
+ url: "/media/v1/libraries/{library_id}/generations",
29713
+ ...options,
29714
+ headers: {
29715
+ "Content-Type": "application/json",
29716
+ ...options.headers
29717
+ }
29718
+ });
29719
+ var mediaListJobs = (options) => (options.client ?? client).get({
29720
+ security: [{
29721
+ key: "media-BearerAuth",
29722
+ scheme: "bearer",
29723
+ type: "http"
29724
+ }],
29725
+ url: "/media/v1/libraries/{library_id}/jobs",
29726
+ ...options
29727
+ });
29728
+ var mediaCancelJob = (options) => (options.client ?? client).post({
29729
+ security: [{
29730
+ key: "media-BearerAuth",
29731
+ scheme: "bearer",
29732
+ type: "http"
29733
+ }],
29734
+ url: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
29735
+ ...options
29736
+ });
29737
+ var mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
29738
+ security: [{
29739
+ key: "media-BearerAuth",
29740
+ scheme: "bearer",
29741
+ type: "http"
29742
+ }],
29743
+ url: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
29744
+ ...options,
29745
+ headers: {
29746
+ "Content-Type": "application/json",
29747
+ ...options.headers
29748
+ }
29749
+ });
29750
+ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
29751
+ security: [{
29752
+ key: "media-BearerAuth",
29753
+ scheme: "bearer",
29754
+ type: "http"
29755
+ }],
29756
+ url: "/media/v1/generation/capabilities",
29757
+ ...options
29758
+ });
29759
+ var ontologyListTypes = (options) => (options?.client ?? client).get({
29760
+ security: [{
29761
+ key: "ontology-bearerAuth",
29762
+ scheme: "bearer",
29763
+ type: "http"
29764
+ }],
29765
+ url: "/ontology/v1/types",
29766
+ ...options
29767
+ });
29768
+ var ontologyRegisterType = (options) => (options.client ?? client).post({
29769
+ security: [{
29770
+ key: "ontology-bearerAuth",
29771
+ scheme: "bearer",
29772
+ type: "http"
29773
+ }],
29774
+ url: "/ontology/v1/types",
29775
+ ...options,
29776
+ headers: {
29777
+ "Content-Type": "application/json",
29778
+ ...options.headers
29779
+ }
29780
+ });
29781
+ var ontologyRetrieveType = (options) => (options.client ?? client).get({
29782
+ security: [{
29783
+ key: "ontology-bearerAuth",
29784
+ scheme: "bearer",
29785
+ type: "http"
29786
+ }],
29787
+ url: "/ontology/v1/types/{name}",
29788
+ ...options
29789
+ });
29790
+ var ontologyListNodes = (options) => (options?.client ?? client).get({
29791
+ security: [{
29792
+ key: "ontology-bearerAuth",
29793
+ scheme: "bearer",
29794
+ type: "http"
29795
+ }],
29796
+ url: "/ontology/v1/nodes",
29797
+ ...options
29798
+ });
29799
+ var ontologyCreateNode = (options) => (options.client ?? client).post({
29800
+ security: [{
29801
+ key: "ontology-bearerAuth",
29802
+ scheme: "bearer",
29803
+ type: "http"
29804
+ }],
29805
+ url: "/ontology/v1/nodes",
29806
+ ...options,
29807
+ headers: {
29808
+ "Content-Type": "application/json",
29809
+ ...options.headers
29810
+ }
29811
+ });
29812
+ var ontologyRetrieveNode = (options) => (options.client ?? client).get({
29813
+ security: [{
29814
+ key: "ontology-bearerAuth",
29815
+ scheme: "bearer",
29816
+ type: "http"
29817
+ }],
29818
+ url: "/ontology/v1/nodes/{node_id}",
29819
+ ...options
29820
+ });
29821
+ var ontologyUpdateNode = (options) => (options.client ?? client).patch({
29822
+ security: [{
29823
+ key: "ontology-bearerAuth",
29824
+ scheme: "bearer",
29825
+ type: "http"
29826
+ }],
29827
+ url: "/ontology/v1/nodes/{node_id}",
29828
+ ...options,
29829
+ headers: {
29830
+ "Content-Type": "application/json",
29831
+ ...options.headers
29832
+ }
29833
+ });
29834
+ var ontologyMergeNode = (options) => (options.client ?? client).post({
29835
+ security: [{
29836
+ key: "ontology-bearerAuth",
29837
+ scheme: "bearer",
29838
+ type: "http"
29839
+ }],
29840
+ url: "/ontology/v1/nodes/{node_id}/merge",
29841
+ ...options,
29842
+ headers: {
29843
+ "Content-Type": "application/json",
29844
+ ...options.headers
29845
+ }
29846
+ });
29847
+ var ontologyListRelations = (options) => (options?.client ?? client).get({
29848
+ security: [{
29849
+ key: "ontology-bearerAuth",
29850
+ scheme: "bearer",
29851
+ type: "http"
29852
+ }],
29853
+ url: "/ontology/v1/relations",
29854
+ ...options
29855
+ });
29856
+ var ontologyCreateRelation = (options) => (options.client ?? client).post({
29857
+ security: [{
29858
+ key: "ontology-bearerAuth",
29859
+ scheme: "bearer",
29860
+ type: "http"
29861
+ }],
29862
+ url: "/ontology/v1/relations",
29863
+ ...options,
29864
+ headers: {
29865
+ "Content-Type": "application/json",
29866
+ ...options.headers
29867
+ }
29868
+ });
29869
+ var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
29870
+ security: [{
29871
+ key: "ontology-bearerAuth",
29872
+ scheme: "bearer",
29873
+ type: "http"
29874
+ }],
29875
+ url: "/ontology/v1/relations/{relation_id}",
29876
+ ...options
29877
+ });
29878
+ var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
29879
+ security: [{
29880
+ key: "ontology-bearerAuth",
29881
+ scheme: "bearer",
29882
+ type: "http"
29883
+ }],
29884
+ url: "/ontology/v1/relations/{relation_id}/invalidate",
29885
+ ...options,
29886
+ headers: {
29887
+ "Content-Type": "application/json",
29888
+ ...options.headers
29889
+ }
29890
+ });
29891
+ var ontologyApplyChangeset = (options) => (options.client ?? client).post({
29892
+ security: [{
29893
+ key: "ontology-bearerAuth",
29894
+ scheme: "bearer",
29895
+ type: "http"
29896
+ }],
29897
+ url: "/ontology/v1/changesets",
29898
+ ...options,
29899
+ headers: {
29900
+ "Content-Type": "application/json",
29901
+ ...options.headers
29902
+ }
29903
+ });
29904
+ var ontologySearch = (options) => (options.client ?? client).post({
29905
+ security: [{
29906
+ key: "ontology-bearerAuth",
29907
+ scheme: "bearer",
29908
+ type: "http"
29909
+ }],
29910
+ url: "/ontology/v1/search",
29911
+ ...options,
29912
+ headers: {
29913
+ "Content-Type": "application/json",
29914
+ ...options.headers
29915
+ }
29916
+ });
27611
29917
  var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
27612
29918
  querySerializer: { parameters: { state: { array: { explode: false } } } },
27613
29919
  security: [
@@ -29485,6 +31791,9 @@ function createAgent(transport) {
29485
31791
  create: bind(transport, computersCreate),
29486
31792
  delete: bind(transport, computersDelete),
29487
31793
  files: {
31794
+ convert: {
31795
+ create: bind(transport, computersFilesConvert)
31796
+ },
29488
31797
  list: bind(transport, computersFilesList),
29489
31798
  retrieveContent: bind(transport, computersFilesContent)
29490
31799
  },
@@ -29932,6 +32241,9 @@ function createCut(transport) {
29932
32241
  media: {
29933
32242
  import: bind(transport, cutImportMedia)
29934
32243
  },
32244
+ renders: {
32245
+ create: bind(transport, cutCreateRender)
32246
+ },
29935
32247
  retrieve: bind(transport, cutRetrieveProject),
29936
32248
  retrieveState: bind(transport, cutRetrieveState),
29937
32249
  retrieveTimeline: bind(transport, cutRetrieveTimeline),
@@ -29942,6 +32254,9 @@ function createCut(transport) {
29942
32254
  list: bind(transport, cutListVersions)
29943
32255
  }
29944
32256
  },
32257
+ renders: {
32258
+ retrieve: bind(transport, cutRetrieveRender)
32259
+ },
29945
32260
  versions: {
29946
32261
  restore: bind(transport, cutRestoreVersion)
29947
32262
  }
@@ -29984,6 +32299,51 @@ function createDatabase(transport) {
29984
32299
  }
29985
32300
  };
29986
32301
  }
32302
+ function createDevops(transport) {
32303
+ return {
32304
+ projects: {
32305
+ retrieveTestCatalog: bind(transport, devopsTestCatalogGet),
32306
+ testCases: {
32307
+ list: bind(transport, devopsTestCasesList)
32308
+ },
32309
+ testPlans: {
32310
+ create: bind(transport, devopsTestPlansCreate),
32311
+ list: bind(transport, devopsTestPlansList)
32312
+ },
32313
+ testReports: {
32314
+ create: bind(transport, devopsTestReportsUpload)
32315
+ },
32316
+ testRuns: {
32317
+ create: bind(transport, devopsTestRunsCreate),
32318
+ list: bind(transport, devopsTestRunsList)
32319
+ },
32320
+ testSuites: {
32321
+ list: bind(transport, devopsTestSuitesList)
32322
+ }
32323
+ },
32324
+ testCases: {
32325
+ retrieve: bind(transport, devopsTestCasesGet)
32326
+ },
32327
+ testPlans: {
32328
+ delete: bind(transport, devopsTestPlansDelete),
32329
+ pause: bind(transport, devopsTestPlansPause),
32330
+ resume: bind(transport, devopsTestPlansResume),
32331
+ retrieve: bind(transport, devopsTestPlansGet),
32332
+ update: bind(transport, devopsTestPlansUpdate)
32333
+ },
32334
+ testRuns: {
32335
+ cancel: bind(transport, devopsTestRunsCancel),
32336
+ executions: {
32337
+ list: bind(transport, devopsTestExecutionsList),
32338
+ retrieve: bind(transport, devopsTestExecutionsGet)
32339
+ },
32340
+ retrieve: bind(transport, devopsTestRunsGet)
32341
+ },
32342
+ testSuites: {
32343
+ retrieve: bind(transport, devopsTestSuitesGet)
32344
+ }
32345
+ };
32346
+ }
29987
32347
  function createFile(transport) {
29988
32348
  return {
29989
32349
  files: {
@@ -30006,7 +32366,8 @@ function createFile(transport) {
30006
32366
  createSigned: bind(transport, fileCreateSignedUpload),
30007
32367
  parts: {
30008
32368
  create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
30009
- }
32369
+ },
32370
+ retrieve: bind(transport, fileRetrieveUpload)
30010
32371
  }
30011
32372
  };
30012
32373
  }
@@ -30058,11 +32419,19 @@ function createKnowledge(transport) {
30058
32419
  }
30059
32420
  function createMedia(transport) {
30060
32421
  return {
32422
+ generation: {
32423
+ capabilities: {
32424
+ list: bind(transport, mediaGetGenerationCapabilities)
32425
+ }
32426
+ },
30061
32427
  libraries: {
30062
32428
  assets: {
30063
32429
  batch: bind(transport, mediaBatchAssets),
30064
32430
  create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
30065
32431
  delete: bind(transport, mediaDeleteAsset),
32432
+ frames: {
32433
+ create: bind(transport, mediaCreateFrameUrls)
32434
+ },
30066
32435
  import: {
30067
32436
  create: bind(transport, mediaImportAsset)
30068
32437
  },
@@ -30091,7 +32460,17 @@ function createMedia(transport) {
30091
32460
  folders: {
30092
32461
  list: bind(transport, mediaListFolders)
30093
32462
  },
32463
+ generations: {
32464
+ create: bind(transport, mediaCreateGeneration)
32465
+ },
30094
32466
  jobs: {
32467
+ cancel: bind(transport, mediaCancelJob),
32468
+ list: bindPage(transport, mediaListJobs),
32469
+ outputs: {
32470
+ save: {
32471
+ create: bind(transport, mediaSaveGenerationOutput)
32472
+ }
32473
+ },
30095
32474
  retrieve: bind(transport, mediaGetJob)
30096
32475
  },
30097
32476
  list: bindPage(transport, mediaListLibraries),
@@ -30112,6 +32491,10 @@ function createMedia(transport) {
30112
32491
  create: bind(transport, mediaVisualSearch)
30113
32492
  }
30114
32493
  },
32494
+ understandings: {
32495
+ list: bindPage(transport, mediaListUnderstandingsByLibrary),
32496
+ retrieveFailureSummary: bind(transport, mediaUnderstandingFailureSummary)
32497
+ },
30115
32498
  update: bind(transport, mediaUpdateLibrary)
30116
32499
  }
30117
32500
  };
@@ -30212,6 +32595,38 @@ function createModel(transport) {
30212
32595
  }
30213
32596
  };
30214
32597
  }
32598
+ function createOntology(transport) {
32599
+ return {
32600
+ changesets: {
32601
+ create: bind(transport, ontologyApplyChangeset)
32602
+ },
32603
+ nodes: {
32604
+ create: bind(transport, ontologyCreateNode),
32605
+ list: bindPage(transport, ontologyListNodes),
32606
+ merge: {
32607
+ create: bind(transport, ontologyMergeNode)
32608
+ },
32609
+ retrieve: bind(transport, ontologyRetrieveNode),
32610
+ update: bind(transport, ontologyUpdateNode)
32611
+ },
32612
+ relations: {
32613
+ create: bind(transport, ontologyCreateRelation),
32614
+ invalidate: {
32615
+ create: bind(transport, ontologyInvalidateRelation)
32616
+ },
32617
+ list: bindPage(transport, ontologyListRelations),
32618
+ retrieve: bind(transport, ontologyRetrieveRelation)
32619
+ },
32620
+ search: {
32621
+ create: bind(transport, ontologySearch)
32622
+ },
32623
+ types: {
32624
+ create: bind(transport, ontologyRegisterType),
32625
+ list: bind(transport, ontologyListTypes),
32626
+ retrieve: bind(transport, ontologyRetrieveType)
32627
+ }
32628
+ };
32629
+ }
30215
32630
  function createOrganization(transport) {
30216
32631
  return {
30217
32632
  charges: {
@@ -30473,11 +32888,13 @@ var resourceFactories = {
30473
32888
  crm: createCrm,
30474
32889
  cut: createCut,
30475
32890
  database: createDatabase,
32891
+ devops: createDevops,
30476
32892
  file: createFile,
30477
32893
  knowledge: createKnowledge,
30478
32894
  media: createMedia,
30479
32895
  meta: createMeta,
30480
32896
  model: createModel,
32897
+ ontology: createOntology,
30481
32898
  organization: createOrganization,
30482
32899
  sandbox: createSandbox,
30483
32900
  search: createSearch,
@@ -31551,6 +33968,26 @@ async function prepareMultipart(op, opts) {
31551
33968
  opts.body = body;
31552
33969
  }
31553
33970
 
33971
+ // src/core/pagination.ts
33972
+ var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
33973
+ function pageTokenField(op) {
33974
+ return op.query.find((field) => PAGE_TOKENS.test(field.name));
33975
+ }
33976
+ function nextPageToken(result) {
33977
+ const value = result;
33978
+ const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
33979
+ return typeof token === "string" && token ? token : undefined;
33980
+ }
33981
+ function pageOf(result) {
33982
+ const value = result;
33983
+ const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
33984
+ const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
33985
+ if (!Array.isArray(data))
33986
+ return;
33987
+ const token = nextPageToken(result);
33988
+ return { items: data, ...token ? { token } : {} };
33989
+ }
33990
+
31554
33991
  // src/core/bind-args.ts
31555
33992
  var globalOptions = [
31556
33993
  { name: "org", type: "string" },
@@ -31766,7 +34203,7 @@ function bindArgs(parsed, op, data) {
31766
34203
  (opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
31767
34204
  }
31768
34205
  }
31769
- if (globals.all && !op.pagination)
34206
+ if (globals.all && !op.pagination && !pageTokenField(op))
31770
34207
  throw new UsageError("--all requires a paginated operation");
31771
34208
  for (const p of op.pathParams)
31772
34209
  if (p !== target && opts.path?.[p.sdkName] === undefined)
@@ -31792,8 +34229,8 @@ function bindArgs(parsed, op, data) {
31792
34229
  }
31793
34230
 
31794
34231
  // src/core/help.ts
31795
- function describeOption(s) {
31796
- 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, " ")}` : ""}`;
34232
+ function describeOption(s, required = s.required) {
34233
+ 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, " ")}` : ""}`;
31797
34234
  }
31798
34235
  function example(command) {
31799
34236
  const target = targetParam(command.op);
@@ -31809,18 +34246,22 @@ function example(command) {
31809
34246
  args.push("--yes");
31810
34247
  return args.join(" ");
31811
34248
  }
34249
+ function fieldRequired(op, field, location) {
34250
+ return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
34251
+ }
31812
34252
  function help(commands, prefix, command) {
31813
34253
  if (command) {
31814
34254
  const target = targetParam(command.op);
34255
+ const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
31815
34256
  return [
31816
- `praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
34257
+ `praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
31817
34258
  `SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
31818
34259
  `${command.op.http} ${command.op.path}`,
31819
34260
  ...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
31820
34261
  "",
31821
34262
  "Options:",
31822
34263
  ...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
31823
- ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
34264
+ ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
31824
34265
  ...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" : ""})`) ?? [],
31825
34266
  " -h is an alias of --help",
31826
34267
  "PRAXIS_ENV=develop|production (default: develop); no --env option.",
@@ -31888,6 +34329,7 @@ var workflows = [
31888
34329
  { words: ["app", "create"], usage: "app create <name> [--dir <path>] [--template <dir>] [--no-install]", summary: "Create an application project from the standard template and install its dependencies.", example: "praxis app create my-app" },
31889
34330
  { words: ["app", "deploy"], usage: "app deploy [--dir <path>] [--no-build]", summary: "Build the project, publish it, create declared secrets, run the health check and print the URL.", example: "praxis app deploy --dir ./my-app" },
31890
34331
  { words: ["app", "rollback"], usage: "app rollback [--dir <path>] [--to <version_id>]", summary: "Deploy the previous version again (or --to a given version) and wait until it is active.", example: "praxis app rollback --to <version_id>" },
34332
+ { words: ["devops", "test", "run"], usage: "devops test run --remote [--project <dvp_…>] [--no-wait] [--repeat <n>] [--select <kind:value>]", summary: "Run the DevOps test selection for the pushed HEAD on the Praxis cloud, wait for the verdict and list the failed cases.", example: "praxis devops test run --remote --select smoke" },
31891
34333
  { words: ["skill"], usage: "skill [--install <dir>]", summary: "Print the AI skill, or write <dir>/praxis-cli/SKILL.md." }
31892
34334
  ];
31893
34335
  var workflowNouns = [...new Set(workflows.filter((w) => w.words.length > 1).map((w) => w.words[0]))];
@@ -32344,7 +34786,18 @@ function skillDocument(commands) {
32344
34786
  "## Account and CLI",
32345
34787
  "",
32346
34788
  ...workflows.map((w) => `praxis ${w.usage} — ${w.summary.replace("Print the AI skill, or write", "Print this skill; use --install <dir> to write")}`),
32347
- "praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)"
34789
+ "praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)",
34790
+ "",
34791
+ "## devops test run (workflow)",
34792
+ "",
34793
+ "Run the project's tests at the commit HEAD is on, on the Praxis cloud executor, and wait for the verdict:",
34794
+ "",
34795
+ "- Only the pushed commit is tested. HEAD must be on a remote branch (`git push` first); this command never pushes for you. Uncommitted changes are a warning only — the working tree is not what runs.",
34796
+ "- The project comes from `--project dvp_…`, or from `devops.project` in the current directory's praxis.jsonc. Neither present is a usage error, exit code 2.",
34797
+ "- `--select` narrows the run: `tag:<tag>` (a bare word reads as a tag), `package:<path>`, `suite:<path>`, `file:<path>`. `--repeat N` runs each selected case N times (a flake then shows up as flaky, not as a failure).",
34798
+ "- The run waits by default and polls every 5s; `--no-wait` returns as soon as the run exists, with `result` still `pending`.",
34799
+ "- Exit code 0 means the verdict passed (or is still pending); 1 means failed, errored, cancelled or timed out — the failed cases are listed, up to 20, with the run URL for the rest; 2 is a usage error.",
34800
+ "- The run URL is on the Console of the environment the CLI talks to; the run id is also on stdout with `--json`."
32348
34801
  ];
32349
34802
  let domain;
32350
34803
  for (const command of commands) {
@@ -32890,6 +35343,191 @@ async function appRollback(args, client2, ports) {
32890
35343
  ports.emit({ kind: "object", data: { url: worker.subdomain?.url ?? null, worker_id: worker.id, from_version: from, to_version: to, deployment_id: done.id } });
32891
35344
  }
32892
35345
 
35346
+ // src/commands/devops.ts
35347
+ import { join as join4 } from "node:path";
35348
+
35349
+ // src/devops/pure.ts
35350
+ import { createHash as createHash2 } from "node:crypto";
35351
+ var PROJECT_ID = /^dvp_[a-z0-9]+$/;
35352
+ var POLL_MS = 5000;
35353
+ var FAILURE_LIMIT = 20;
35354
+ var hint = 'Pass --project dvp_…, or add "devops": { "project": "dvp_…" } to praxis.jsonc in the current directory.';
35355
+ function checkProject(value, hintText = hint) {
35356
+ if (typeof value !== "string" || !value.trim())
35357
+ throw new UsageError("A DevOps project id must be a non-empty string", hintText);
35358
+ if (!PROJECT_ID.test(value.trim()))
35359
+ throw new UsageError(`Not a DevOps project id: ${value}`, "A project id starts with dvp_ and comes from the project list. " + hintText);
35360
+ return value.trim();
35361
+ }
35362
+ function parseDevopsProject(value) {
35363
+ if (value === null || value === undefined || typeof value !== "object" || Array.isArray(value))
35364
+ return;
35365
+ const devops = value.devops;
35366
+ if (devops === undefined)
35367
+ return;
35368
+ if (devops === null || typeof devops !== "object" || Array.isArray(devops))
35369
+ throw new UsageError("praxis.jsonc devops must be an object", 'Write {"devops":{"project":"dvp_…"}}. ' + hint);
35370
+ const project = devops.project;
35371
+ if (project === undefined)
35372
+ return;
35373
+ return checkProject(project);
35374
+ }
35375
+ function resolveProject(flag, projectFile) {
35376
+ if (flag !== undefined)
35377
+ return checkProject(flag);
35378
+ const fromFile = parseDevopsProject(projectFile);
35379
+ if (fromFile !== undefined)
35380
+ return fromFile;
35381
+ throw new UsageError("No DevOps project named for this run", hint);
35382
+ }
35383
+ var sorted = (values) => [...values].sort();
35384
+ var SELECT_KINDS = { tag: "anyTags", package: "packages", suite: "packages", file: "packages" };
35385
+ function parseSelect(values) {
35386
+ if (!values.length)
35387
+ return;
35388
+ const tags = [], packages = [];
35389
+ for (const raw of values) {
35390
+ const at = raw.indexOf(":");
35391
+ const kind = at < 0 ? "tag" : raw.slice(0, at).trim().toLowerCase();
35392
+ const value = (at < 0 ? raw : raw.slice(at + 1)).trim();
35393
+ const kinds = Object.keys(SELECT_KINDS).join(", ");
35394
+ if (!value)
35395
+ throw new UsageError(`--select ${raw} names no value`, `Use --select <kind>:<value>, or a bare tag name; kinds are ${kinds}.`);
35396
+ if (!Object.hasOwn(SELECT_KINDS, kind))
35397
+ throw new UsageError(`--select ${raw}: unknown kind "${kind}"`, `Use one of: ${kinds}.`);
35398
+ (SELECT_KINDS[kind] === "anyTags" ? tags : packages).push(value);
35399
+ }
35400
+ return { ...tags.length ? { anyTags: sorted(tags) } : {}, ...packages.length ? { packages: sorted(packages) } : {} };
35401
+ }
35402
+ function parseRepeat(value) {
35403
+ if (value === undefined)
35404
+ return 1;
35405
+ const n = typeof value === "string" && value.trim() ? Number(value) : NaN;
35406
+ if (!Number.isSafeInteger(n) || n < 1)
35407
+ throw new UsageError("--repeat must be an integer of at least 1");
35408
+ return n;
35409
+ }
35410
+ function requireRemote(remote) {
35411
+ if (!remote)
35412
+ throw new UsageError("Only remote test runs are available", "Add --remote to run the selected cases on the Praxis cloud executor.");
35413
+ }
35414
+ function requestIdFor(input) {
35415
+ const selector = input.selector === undefined ? null : {
35416
+ sizes: sorted(input.selector.sizes ?? []),
35417
+ anyTags: sorted(input.selector.anyTags ?? []),
35418
+ packages: sorted(input.selector.packages ?? []),
35419
+ cases: sorted(input.selector.cases ?? [])
35420
+ };
35421
+ const material = JSON.stringify(["devops-test-run", input.project, input.commit, input.repeat, selector]);
35422
+ return `req_${createHash2("sha256").update(material).digest("hex").slice(0, 32)}`;
35423
+ }
35424
+ var isTerminal = (state) => state === "finished";
35425
+ function shortSha(commit) {
35426
+ return commit.slice(0, 7);
35427
+ }
35428
+ function headBranch(output) {
35429
+ const name = output.trim();
35430
+ return !name || name === "HEAD" ? undefined : name;
35431
+ }
35432
+ function requirePushed(remoteContains, commit, branch) {
35433
+ if (remoteContains.trim())
35434
+ return;
35435
+ throw new UsageError(`Commit ${shortSha(commit)}${branch ? ` on ${branch}` : ""} is not on any remote branch`, `Push it first (git push${branch ? ` origin ${branch}` : ""}); the run tests the pushed commit, and this command never pushes for you.`);
35436
+ }
35437
+ function dirtyNotice(status, commit) {
35438
+ const files = status.split(`
35439
+ `).filter((line) => line.trim()).length;
35440
+ if (files === 0)
35441
+ return;
35442
+ return `Warning: ${files} uncommitted change${files === 1 ? "" : "s"}; the run tests the pushed commit ${shortSha(commit)}, not this working tree.`;
35443
+ }
35444
+ function exitCodeFor(result) {
35445
+ return result === "passed" || result === "pending" ? 0 : 1;
35446
+ }
35447
+ var wantsFailures = (result) => result !== "passed" && result !== "pending";
35448
+ function failedList(items, nextPageToken2, url) {
35449
+ const shown = items.slice(0, FAILURE_LIMIT);
35450
+ if (items.length <= FAILURE_LIMIT && !nextPageToken2)
35451
+ return { shown };
35452
+ return { shown, hint: `Showing ${FAILURE_LIMIT} of the failed cases; the run page lists them all: ${url}` };
35453
+ }
35454
+ var CONSOLE = { develop: "https://console-develop.deepraxis.com", production: "https://console.deepraxis.com" };
35455
+ function runUrl(env, project, id, viewerUrl) {
35456
+ return viewerUrl?.trim() || `${CONSOLE[env]}/devops/projects/${project}/test-runs/${id}`;
35457
+ }
35458
+
35459
+ // src/commands/devops.ts
35460
+ async function projectFile(cwd, ports) {
35461
+ let text;
35462
+ try {
35463
+ text = await ports.readFile(join4(cwd, "praxis.jsonc"));
35464
+ } catch (error) {
35465
+ if (error.code === "ENOENT")
35466
+ return;
35467
+ throw error;
35468
+ }
35469
+ try {
35470
+ return parseJsonc(text);
35471
+ } catch (error) {
35472
+ throw new UsageError(`praxis.jsonc is not valid JSONC: ${error.message}`);
35473
+ }
35474
+ }
35475
+ var COUNT_ORDER = ["passed", "failed", "flaky", "skipped", "pending", "other"];
35476
+ var countLine = (counts) => COUNT_ORDER.filter((key) => counts?.[key]).map((key) => `${counts[key]} ${key}`).join(", ") || "no counts reported";
35477
+ async function devopsTestRun(args, connect, env, ports) {
35478
+ requireRemote(args.remote);
35479
+ const project = resolveProject(args.project, await projectFile(ports.cwd, ports));
35480
+ const selector = parseSelect(args.select ?? []);
35481
+ const repeat = parseRepeat(args.repeat);
35482
+ const git = async (gitArgs) => (await ports.git(gitArgs, ports.cwd)).output;
35483
+ const commit = (await git(["rev-parse", "HEAD"])).trim();
35484
+ if (!commit)
35485
+ throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
35486
+ const branch = headBranch(await git(["rev-parse", "--abbrev-ref", "HEAD"]));
35487
+ requirePushed(await git(["branch", "-r", "--contains", "HEAD"]), commit, branch);
35488
+ const notice = dirtyNotice(await git(["status", "--porcelain"]), commit);
35489
+ if (notice)
35490
+ ports.emit({ kind: "message", channel: "stderr", text: notice });
35491
+ const client2 = await connect();
35492
+ const requestId = requestIdFor({ project, commit, selector, repeat });
35493
+ let run = await client2.devops.projects.testRuns.create({ path: { project }, body: { ref: { ...branch ? { branch } : {}, commit }, ...selector ? { selector } : {}, repeat, executor: "cloud", requestId } });
35494
+ while (args.wait && !isTerminal(run.state)) {
35495
+ await ports.wait(POLL_MS);
35496
+ run = await client2.devops.testRuns.retrieve({ path: { id: run.id } });
35497
+ }
35498
+ const url = runUrl(env, project, run.id, run.viewerUrl);
35499
+ let failures = [], failureHint;
35500
+ if (wantsFailures(run.result)) {
35501
+ const page = await client2.devops.testRuns.executions.list({ path: { run: run.id }, query: { pageSize: FAILURE_LIMIT, filter: "result=failed" } });
35502
+ ({ shown: failures, hint: failureHint } = failedList(page.items, page.nextPageToken, url));
35503
+ }
35504
+ const data = {
35505
+ id: run.id,
35506
+ url,
35507
+ project,
35508
+ state: run.state,
35509
+ result: run.result,
35510
+ repeat,
35511
+ commit,
35512
+ ...branch ? { branch } : {},
35513
+ selected: run.selection?.selectedCount ?? null,
35514
+ counts: run.counts ?? null,
35515
+ request_id: requestId,
35516
+ failures: failures.map((execution) => ({ case: execution.case, title: execution.title, package: execution.package ?? null, status: execution.status })),
35517
+ ...failureHint ? { failures_hint: failureHint } : {}
35518
+ };
35519
+ ports.emit({ kind: "object", data });
35520
+ ports.human([
35521
+ `${run.result} — ${project} @ ${commit.slice(0, 7)}${branch ? ` (${branch})` : ""}`,
35522
+ `state ${run.state}, ${countLine(run.counts)}`,
35523
+ url,
35524
+ ...failures.map((execution) => ` failed ${execution.title}`),
35525
+ ...failureHint ? [failureHint] : []
35526
+ ].join(`
35527
+ `));
35528
+ return exitCodeFor(run.result);
35529
+ }
35530
+
32893
35531
  // src/main.ts
32894
35532
  import { spawnSync } from "node:child_process";
32895
35533
 
@@ -33188,9 +35826,11 @@ function renderHuman(result, ctx) {
33188
35826
  const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
33189
35827
  const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
33190
35828
  ` : "";
35829
+ const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
35830
+ `).join("");
33191
35831
  return { stderr: err.red(`✗ ${plain(result.message)}`) + `
33192
35832
  ` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
33193
- ` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
35833
+ ` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
33194
35834
  ` : "") };
33195
35835
  }
33196
35836
  case "list":
@@ -33278,8 +35918,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
33278
35918
  }
33279
35919
 
33280
35920
  // src/output/render.ts
35921
+ var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
35922
+ function serverProblem(raw) {
35923
+ const value = record(raw);
35924
+ const problem = {};
35925
+ for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
35926
+ const entry = value[member];
35927
+ if (entry !== undefined && entry !== null)
35928
+ problem[member] = entry;
35929
+ }
35930
+ const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
35931
+ return adds ? problem : undefined;
35932
+ }
35933
+ function problemLines(problem) {
35934
+ const lines = [];
35935
+ for (const group of [problem?.errors, problem?.violations]) {
35936
+ for (const item of Array.isArray(group) ? group : []) {
35937
+ const entry = record(item);
35938
+ const where = scalar(entry.pointer ?? entry.field);
35939
+ const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
35940
+ if (where || detail)
35941
+ lines.push(`${where ? `${where}: ` : ""}${detail}`);
35942
+ }
35943
+ }
35944
+ return lines;
35945
+ }
33281
35946
  function errorJSON(result, ctx) {
33282
- 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 } : {} } }) + `
35947
+ 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 } : {} } }) + `
33283
35948
  `;
33284
35949
  }
33285
35950
  function render(result, ctx) {
@@ -33435,6 +36100,8 @@ function errorInput(error, ctx) {
33435
36100
  const raw = record(sdk?.raw), nested = record(raw.error);
33436
36101
  const candidate = nested.details ?? raw.details;
33437
36102
  const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
36103
+ const problem = serverProblem(Object.keys(nested).length ? nested : raw);
36104
+ const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
33438
36105
  let message = error instanceof Error ? error.message : "Unexpected error";
33439
36106
  const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
33440
36107
  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");
@@ -33446,22 +36113,25 @@ function errorInput(error, ctx) {
33446
36113
  if (stripped)
33447
36114
  message = `${humanize(code)}${message ? `: ${message}` : ""}`;
33448
36115
  const status = sdk?.status, request_id = sdk?.requestId;
36116
+ message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
33449
36117
  const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
33450
36118
  const source = ctx.credentialSource ?? "login";
33451
- let hint = genericHint;
36119
+ let hint2 = genericHint;
33452
36120
  if (error instanceof UsageError)
33453
- hint = error.hint;
36121
+ hint2 = error.hint;
36122
+ else if (serverText(problem?.hint))
36123
+ hint2 = serverText(problem?.hint);
33454
36124
  else if (authFailure)
33455
- hint = authHint(source);
36125
+ hint2 = authHint(source);
33456
36126
  else if (status === 404)
33457
- hint = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
36127
+ hint2 = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
33458
36128
  else if (status === 403)
33459
- hint = "Check that your account or API key has permission to access this resource.";
36129
+ hint2 = "Check that your account or API key has permission to access this resource.";
33460
36130
  else if (status === 429)
33461
- hint = "Rate limited; retry later.";
36131
+ hint2 = "Rate limited; retry later.";
33462
36132
  else if (status !== undefined && status >= 500)
33463
- hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
33464
- return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
36133
+ hint2 = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
36134
+ return { kind: "error", code, message, hint: hint2, ...details !== undefined ? { details } : {}, ...problem !== undefined ? { problem } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
33465
36135
  }
33466
36136
 
33467
36137
  // src/output/progress.ts
@@ -33491,7 +36161,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
33491
36161
  }
33492
36162
 
33493
36163
  // src/main.ts
33494
- var version = "0.2.1-dev.eb022f5";
36164
+ var version = "0.2.1-dev.edf8922";
33495
36165
  var commands = commandTree(operations);
33496
36166
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
33497
36167
  function route(argv) {
@@ -33576,7 +36246,14 @@ var defaults = {
33576
36246
  var appOptions = {
33577
36247
  "app create": [{ name: "dir", type: "string", description: "Directory to create the project in (default: ./<name>)." }, { name: "template", type: "string", description: "Copy a local template directory instead of downloading the standard template." }, { name: "no-install", type: "boolean", description: "Skip installing dependencies." }],
33578
36248
  "app deploy": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "no-build", type: "boolean", description: "Publish the existing dist/ output without building." }],
33579
- "app rollback": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "to", type: "string", description: "Version id to deploy (default: the previous version)." }]
36249
+ "app rollback": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "to", type: "string", description: "Version id to deploy (default: the previous version)." }],
36250
+ "devops test run": [
36251
+ { name: "project", type: "string", description: "DevOps project id (dvp_…); default: the devops.project field of praxis.jsonc in the current directory." },
36252
+ { name: "remote", type: "boolean", description: "Run the cases on the Praxis cloud executor. Required; local execution does not exist yet." },
36253
+ { name: "no-wait", type: "boolean", description: "Return as soon as the run exists instead of waiting for a verdict." },
36254
+ { name: "repeat", type: "string", description: "How many times each selected case runs (default: 1)." },
36255
+ { name: "select", type: "string", repeated: true, description: "Narrow the selection; repeatable. tag:<tag> (a bare word reads as a tag), package:<path>, suite:<path> or file:<path>." }
36256
+ ]
33580
36257
  };
33581
36258
  async function main(argv, injected = {}) {
33582
36259
  const ports = { ...defaults, ...injected };
@@ -33709,7 +36386,7 @@ Examples:
33709
36386
  let owner = client2;
33710
36387
  for (const part of op.resource.split("."))
33711
36388
  owner = owner[part];
33712
- const result = await owner[op.method](opts);
36389
+ let result = await owner[op.method](opts);
33713
36390
  const name2 = `${op.resource}.${op.method}`;
33714
36391
  const list = (items) => {
33715
36392
  const view = clientList(items, op, flags.limit, ctx.mode);
@@ -33723,7 +36400,21 @@ Examples:
33723
36400
  const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
33724
36401
  if (typeof cursor === "string" && cursor)
33725
36402
  ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
33726
- if (result instanceof Page) {
36403
+ const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
36404
+ const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
36405
+ if (flags.all && !(result instanceof Page) && token && !firstPage)
36406
+ throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
36407
+ if (firstPage) {
36408
+ const items = [...firstPage.items];
36409
+ const seen = new Set;
36410
+ for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
36411
+ seen.add(next);
36412
+ result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
36413
+ items.push(...pageOf(result)?.items ?? []);
36414
+ }
36415
+ ctx.nextCommand = undefined;
36416
+ emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
36417
+ } else if (result instanceof Page) {
33727
36418
  if (flags.all) {
33728
36419
  const items = [];
33729
36420
  for await (const item of result)
@@ -33797,6 +36488,26 @@ Examples:
33797
36488
  await appRollback({ dir, to: parsed.flags.to?.[0] }, client2, appPorts);
33798
36489
  break;
33799
36490
  }
36491
+ case "devops test run": {
36492
+ return await devopsTestRun({
36493
+ project: parsed.flags.project?.[0],
36494
+ remote: Boolean(parsed.flags.remote),
36495
+ wait: !parsed.flags["no-wait"],
36496
+ repeat: parsed.flags.repeat?.[0],
36497
+ select: parsed.flags.select
36498
+ }, async () => await auth.client(org), config.env, {
36499
+ git: (args, cwd) => ports.spawnCapture("git", args, { cwd }),
36500
+ readFile: ports.readFile,
36501
+ wait: ports.wait,
36502
+ mode: ctx.mode,
36503
+ emit,
36504
+ human: (text) => {
36505
+ if (ctx.mode === "human")
36506
+ emit({ kind: "message", channel: "stdout", text });
36507
+ },
36508
+ cwd: ports.cwd
36509
+ });
36510
+ }
33800
36511
  case "api": {
33801
36512
  const method = parsed.positional[0];
33802
36513
  if (!HTTP_METHOD.test(method))
@@ -33819,7 +36530,7 @@ Examples:
33819
36530
  }
33820
36531
  }
33821
36532
  if (true)
33822
- process.exit(await main(process.argv.slice(2)));
36533
+ process.exitCode = await main(process.argv.slice(2));
33823
36534
  export {
33824
36535
  main
33825
36536
  };