@deepraxis/cli 0.2.1-dev.bb2d647 → 0.2.1-dev.bbfaae8

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",
@@ -10162,6 +10193,18 @@ Execution errors include error.details.prints containing output printed before f
10162
10193
  type: "integer",
10163
10194
  required: false,
10164
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."
10202
+ },
10203
+ {
10204
+ name: "poster",
10205
+ type: "object",
10206
+ required: false,
10207
+ description: "Cover frame, in seconds on the project clock. Omitted, the cover is the first frame with picture that is not inside a fade-in or a transition — a black opening no longer makes the library thumbnail black. A frame inside a transition is skipped, and a timeline that is black throughout keeps its first frame (reported as BLACK_FIRST_FRAME). The frame actually used is reported as poster_at on the export."
10165
10208
  }
10166
10209
  ]
10167
10210
  }
@@ -10170,7 +10213,7 @@ Execution errors include error.details.prints containing output printed before f
10170
10213
  resource: "cut.projects.frames",
10171
10214
  method: "list",
10172
10215
  summary: "Render preview frames",
10173
- 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. FRAME_UNAVAILABLE warnings on execute mean a source preview could not be fetched and an offline tile was drawn; edits still commit, and this warning alone does not establish that the source media is broken. 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.",
10216
+ 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.",
10174
10217
  http: "GET",
10175
10218
  path: "/cut/v1/projects/{project_id}/frames",
10176
10219
  streaming: "no",
@@ -10244,6 +10287,57 @@ Execution errors include error.details.prints containing output printed before f
10244
10287
  ]
10245
10288
  }
10246
10289
  },
10290
+ {
10291
+ resource: "cut.projects.renders",
10292
+ method: "create",
10293
+ summary: "Create draft range render",
10294
+ 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.",
10295
+ http: "POST",
10296
+ path: "/cut/v1/projects/{project_id}/renders",
10297
+ streaming: "no",
10298
+ pagination: false,
10299
+ pathParams: [
10300
+ {
10301
+ name: "project_id",
10302
+ sdkName: "project_id",
10303
+ description: "Project identifier returned by its create or list operation; use the id, not a display name."
10304
+ }
10305
+ ],
10306
+ query: [],
10307
+ body: {
10308
+ required: true,
10309
+ fields: [
10310
+ {
10311
+ name: "kind",
10312
+ type: "string",
10313
+ enum: [
10314
+ "audio",
10315
+ "video"
10316
+ ],
10317
+ required: true,
10318
+ 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."
10319
+ },
10320
+ {
10321
+ name: "from",
10322
+ type: "number",
10323
+ required: true,
10324
+ description: "Start of the interval in seconds on the project clock, inclusive. Must be less than to."
10325
+ },
10326
+ {
10327
+ name: "to",
10328
+ type: "number",
10329
+ required: true,
10330
+ 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."
10331
+ },
10332
+ {
10333
+ name: "revision",
10334
+ type: "integer",
10335
+ required: false,
10336
+ description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
10337
+ }
10338
+ ]
10339
+ }
10340
+ },
10247
10341
  {
10248
10342
  resource: "cut.projects",
10249
10343
  method: "retrieveState",
@@ -10385,7 +10479,159 @@ Execution errors include error.details.prints containing output printed before f
10385
10479
  resource: "cut.projects",
10386
10480
  method: "execute",
10387
10481
  summary: "Execute editing script",
10388
- 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);`\n\n### Script function reference\n\nFunctions 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. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.\n\n```ts\nGetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;\nGetItem(id: ClipId): ItemView;\nFindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];\nGetMedia(ref: MediaRef): MediaInfo;\nGetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];\nGetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];\nListTransitions(): TransitionInfo[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };\nDelete(id: ClipId, o?: { ripple?: boolean }): void;\nJoin(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;\nUpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;\nDeleteJoin(id: JoinId): void;\nSplit(id: ClipId, at: number): ClipId;\nTrim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;\nMove(id: ClipId, start: number, track?: TrackId): void;\nRippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;\nAddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;\nUpdateTrack(id: TrackId, patch: TrackPatch): void;\nDeleteTrack(id: TrackId): void;\nSetSettings(patch: Partial<ProjectSettingsView>): void;\nAddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];\nSetMarker(at: number, label: string): string;\nPrint(...values: unknown[]): void;\nPreview(at: number[]): void;\n```\n\n| Functions | Behavior and arguments |\n| --- | --- |\n| GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |\n| ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |\n| FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |\n| GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |\n| 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. |\n| 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. |\n| SetSpeed | Change video/audio rate in 0.25–4; keep is required. source preserves consumed source and changes length, duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |\n| Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |\n| 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. |\n| RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |\n| 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. |\n| SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |\n| 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. |\n| SetMarker | Add a label at a timeline time and return its ID. |\n| 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. |\n\n#### Joins between clips\n\nEndpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint\'s length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection\'s code and message, shorten or remove conflicting joins, and retry the saved edit.\n\nTransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use the catalog defaults. Unknown kinds and unknown or invalid parameters are rejected. Effects: dissolve (no parameters); dip (color black/white, default black); push and wipe (direction left/right/up/down, default left); wipe also has softness 0–1, default 0; iris has centerX/centerY 0–1, both default 0.5; blinds has integer count 2–64, default 8, and orientation vertical/horizontal, default vertical; blur has radius 0–100 pixels at 1080-pixel frame height, default 24. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\n\nMinimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.\n\n#### Insert fields (ItemInit)\n\nEvery 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.\n\n| type | Required fields beyond type/start | Optional fields |\n| --- | --- | --- |\n| video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |\n| image | media, length | transform, fit, animate, transitionIn, transitionOut |\n| text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |\n| color | color, length | transform, fill, animate, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |\n| caption | text, length | — |\n\nVideo 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.\n\n| Field | Value |\n| --- | --- |\n| 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. |\n| style | Partial `{fontFamily, fontSize, fontWeight, color, stroke, background, align, maxWidth, position, margin}`. 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}`. Text and captions support position (top/middle/bottom; box centers at 12%/50%/85% of height without margin) and optional margin (0–0.4 of canvas height, box edge distance for top/bottom; middle ignores it). Omitted position preserves the text transform (center by default); explicit position controls vertical placement, so omit it for y animation. Caption style additionally supports highlightColor and maxLines: 2. GetItem and GetTimeline return text style and current caption track style. Caption tracks only accept captions; use AddCaptionsFromTranscript, and place text on video tracks. |\n| 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. |\n| 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. |\n| 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. |\n| 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. |\n| 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}`. |\n| 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. |\n\n#### Update fields (ItemPatchView)\n\nAll fields are optional; use only fields relevant to the item\'s type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, 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})`.\n\n#### Speed, reverse and freeze\n\nVideo/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.\n\nUpdate of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.\n\nExample for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.\n\n#### Script names versus HTTP response names\n\nUse 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.\n\nUnrecognized 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.\n',
10482
+ 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);\`
10483
+
10484
+ <!-- cut-reference:start -->
10485
+ ### Script function, field and error reference
10486
+
10487
+ Every script function, clip field and error code has its own section, read one at a time:
10488
+
10489
+ \`\`\`
10490
+ codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
10491
+ codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
10492
+ codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
10493
+ codemode.describe("praxis.cut.script") // names, one page at a time
10494
+ \`\`\`
10495
+
10496
+ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
10497
+
10498
+ #### Script functions (script)
10499
+
10500
+ - \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
10501
+ - \`GetItem\` — One clip's compact view, by id.
10502
+ - \`FindItems\` — Visit every clip with its track; collect results.
10503
+ - \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
10504
+ - \`GetTranscript\` — Transcript words in source microseconds.
10505
+ - \`GetAnalysis\` — Silence, filler or scene segments.
10506
+ - \`ListTransitions\` — Join transition kinds and parameters.
10507
+ - \`ListEffects\` — Visual-effect catalog and parameters.
10508
+ - \`ListAnimations\` — Animation presets by phase and target.
10509
+ - \`ListFonts\` — Font families, weights and scripts.
10510
+ - \`ListTextStyles\` — Text style presets for \`style.preset\`.
10511
+ - \`ListTextTemplates\` — Multi-layer templates and their slots.
10512
+ - \`Insert\` — Add a clip; a track never overlaps itself.
10513
+ - \`Append\` — Add a clip at the end of a track.
10514
+ - \`Update\` — Change named fields; the rest stay.
10515
+ - \`SetSpeed\` — Change rate, keeping source or duration.
10516
+ - \`Delete\` — Remove a clip. There is no \`Remove\`.
10517
+ - \`Join\` — Overlap clips; followers shift, track shortens.
10518
+ - \`UpdateJoin\` — Change a join's length or effect.
10519
+ - \`DeleteJoin\` — Remove a join; restore the butt cut.
10520
+ - \`Split\` — Cut a clip in two at a time.
10521
+ - \`Trim\` — Move one clip edge by seconds.
10522
+ - \`Move\` — Set a clip's start or track.
10523
+ - \`RippleDeleteRange\` — Cut a time range and close the gap.
10524
+ - \`AddTrack\` — Add a video, audio or caption track.
10525
+ - \`UpdateTrack\` — Change a track's name, lock, gain or role.
10526
+ - \`DeleteTrack\` — Remove a track and its clips.
10527
+ - \`SetSettings\` — Change canvas, frame rate or background.
10528
+ - \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
10529
+ - \`InsertTemplate\` — Insert a template and fill its slots.
10530
+ - \`AlignCaptions\` — Rebuild captions from text punctuation.
10531
+ - \`ImportCaptions\` — Import SRT or WebVTT onto captions.
10532
+ - \`ExportCaptions\` — Export captions as SRT or WebVTT.
10533
+ - \`SetMarker\` — Label a timeline position.
10534
+ - \`Print\` — Append values to the result's \`prints\`.
10535
+ - \`Preview\` — Up to 8 frames as inline PNG data URLs.
10536
+
10537
+ #### Fields (fields)
10538
+
10539
+ - \`type\` — Clip kind; decides which fields apply.
10540
+ - \`start\` — Clip start in seconds; snaps to frames.
10541
+ - \`length\` — Duration; optional for video and audio.
10542
+ - \`media\` — Source \`{ libraryId, assetId }\`.
10543
+ - \`sourceIn\` — First source second kept; default 0.
10544
+ - \`sourceOut\` — Exclusive source end; read-only.
10545
+ - \`text\` — Text of a text or caption clip.
10546
+ - \`color\` — Solid colour of a color clip.
10547
+ - \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
10548
+ - \`width\` — Shape width, a fraction of canvas width.
10549
+ - \`height\` — Shape height, a fraction of canvas height.
10550
+ - \`radius\` — Rect corner rounding, in 1080-height px.
10551
+ - \`fill\` — Shape or text paint: colour or gradient.
10552
+ - \`stroke\` — Shape outline: colour and width.
10553
+ - \`transform\` — Position, scale, rotation, opacity, crop, blur.
10554
+ - \`fit\` — contain, cover, fill or none.
10555
+ - \`blend\` — Layer blend mode; null clears.
10556
+ - \`style\` — Text styling: font, fill, strokes, glow, position.
10557
+ - \`style.position\` — top, middle or bottom; omit it, never null.
10558
+ - \`playback\` — Rate, direction, audio policy, or freeze.
10559
+ - \`volumeDb\` — Audio level in dB; 0 is source level.
10560
+ - \`gain\` — Keyframed audio level in dB.
10561
+ - \`fadeIn\` — Fade-in seconds at the clip's start.
10562
+ - \`fadeOut\` — Fade-out seconds at the clip's end.
10563
+ - \`duck\` — Lower this clip while another track plays.
10564
+ - \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
10565
+ - \`reveal\` — Per-character, word or line reveal timing.
10566
+ - \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
10567
+ - \`effects\` — Effect stack, at most 8; null clears.
10568
+ - \`transitionIn\` — Entrance effect: kind plus seconds.
10569
+ - \`transitionOut\` — Exit effect: kind plus seconds.
10570
+ - \`mask\` — Shape, path or track matte.
10571
+ - \`words\` — Caption words with clip-local times.
10572
+
10573
+ #### Error codes (errors)
10574
+
10575
+ - \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
10576
+ - \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
10577
+ - \`INVALID_STYLE\` — A style value is out of range.
10578
+ - \`INVALID_MASK\` — A mask definition is malformed.
10579
+ - \`MASK_IN_USE\` — The edit would break a live mask.
10580
+ - \`TOO_MANY_MASKS\` — At most 16 masks per project.
10581
+ - \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
10582
+ - \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
10583
+ - \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
10584
+ - \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
10585
+ - \`UNKNOWN_FIELD\` — The field name is not accepted here.
10586
+ - \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
10587
+ - \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
10588
+ - \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
10589
+ - \`OVERLAP\` — Two clips on one track would share time.
10590
+ - \`OUT_OF_SOURCE\` — The clip would read past its source.
10591
+ - \`LOCKED_TRACK\` — The edit targets a locked track.
10592
+ - \`UNBOUND_LIBRARY\` — The library is not bound to the project.
10593
+ - \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
10594
+ - \`NOT_FOUND\` — The named id is not in this project.
10595
+ - \`TOO_SHORT\` — The result would be under one frame.
10596
+ - \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
10597
+ - \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
10598
+ - \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
10599
+ - \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
10600
+ - \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
10601
+ - \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
10602
+ - \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
10603
+ - \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
10604
+ - \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
10605
+ - \`PROJECT_NOT_FOUND\` — No visible project has this id.
10606
+ - \`EXPORT_NOT_FOUND\` — No such export in this project.
10607
+ - \`DRAFT_RENDER_NOT_FOUND\` — No such draft render.
10608
+ - \`VERSION_NOT_FOUND\` — No saved version has this revision.
10609
+ - \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
10610
+ - \`BINDING_INVALID\` — The binding request is malformed.
10611
+ - \`BINDING_IN_USE\` — Clips still use this library's assets.
10612
+ - \`NOTHING_TO_UNDO\` — No earlier revision to return to.
10613
+ - \`NOTHING_TO_REDO\` — No undone revision is waiting.
10614
+ - \`UNDO_CONFLICT\` — The revision to undo is no longer head.
10615
+ - \`REVISION_CONFLICT\` — The project moved; your revision is stale.
10616
+ - \`CUT_BUSY\` — The project is busy; retry.
10617
+ - \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
10618
+ - \`SCRIPT_ERROR\` — The script threw or did not parse.
10619
+ - \`SCRIPT_LIMIT\` — An execute budget was exceeded.
10620
+ - \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
10621
+ - \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
10622
+ - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
10623
+ - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
10624
+ - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
10625
+ - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
10626
+ - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
10627
+ - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
10628
+ - \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
10629
+ - \`INVALID_PARAMS\` — The request is malformed.
10630
+ - \`PERMISSION_DENIED\` — This credential may not do that here.
10631
+ - \`NOT_IMPLEMENTED\` — Not available on this platform yet.
10632
+ - \`INTERNAL\` — Unexpected failure; retry with the request id.
10633
+ <!-- cut-reference:end -->
10634
+ `,
10389
10635
  http: "POST",
10390
10636
  path: "/cut/v1/projects/{project_id}:execute",
10391
10637
  streaming: "no",
@@ -10447,6 +10693,24 @@ Execution errors include error.details.prints containing output printed before f
10447
10693
  ],
10448
10694
  query: []
10449
10695
  },
10696
+ {
10697
+ resource: "cut.renders",
10698
+ method: "retrieve",
10699
+ summary: "Retrieve draft range render",
10700
+ 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.",
10701
+ http: "GET",
10702
+ path: "/cut/v1/renders/{render_id}",
10703
+ streaming: "no",
10704
+ pagination: false,
10705
+ pathParams: [
10706
+ {
10707
+ name: "render_id",
10708
+ sdkName: "render_id",
10709
+ description: "Draft render id (cutr_…) returned by projects.renders.create."
10710
+ }
10711
+ ],
10712
+ query: []
10713
+ },
10450
10714
  {
10451
10715
  resource: "cut.versions",
10452
10716
  method: "restore",
@@ -11419,6 +11683,696 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11419
11683
  ]
11420
11684
  }
11421
11685
  },
11686
+ {
11687
+ resource: "devops.projects.testCases",
11688
+ method: "list",
11689
+ summary: "List test cases",
11690
+ 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.",
11691
+ http: "GET",
11692
+ path: "/devops/v1/projects/{project}/test-cases",
11693
+ streaming: "no",
11694
+ pagination: false,
11695
+ pathParams: [
11696
+ {
11697
+ name: "project",
11698
+ sdkName: "project",
11699
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11700
+ }
11701
+ ],
11702
+ query: [
11703
+ {
11704
+ name: "pageSize",
11705
+ type: "integer",
11706
+ required: false,
11707
+ 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."
11708
+ },
11709
+ {
11710
+ name: "pageToken",
11711
+ type: "string",
11712
+ required: false,
11713
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11714
+ },
11715
+ {
11716
+ name: "filter",
11717
+ type: "string",
11718
+ required: false,
11719
+ 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."
11720
+ },
11721
+ {
11722
+ name: "orderBy",
11723
+ type: "string",
11724
+ required: false,
11725
+ 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."
11726
+ }
11727
+ ]
11728
+ },
11729
+ {
11730
+ resource: "devops.projects",
11731
+ method: "retrieveTestCatalog",
11732
+ summary: "Read a commit's test catalog",
11733
+ 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.',
11734
+ http: "GET",
11735
+ path: "/devops/v1/projects/{project}/test-catalog",
11736
+ streaming: "no",
11737
+ pagination: false,
11738
+ pathParams: [
11739
+ {
11740
+ name: "project",
11741
+ sdkName: "project",
11742
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11743
+ }
11744
+ ],
11745
+ query: [
11746
+ {
11747
+ name: "commit",
11748
+ type: "string",
11749
+ required: false,
11750
+ 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."
11751
+ }
11752
+ ]
11753
+ },
11754
+ {
11755
+ resource: "devops.projects.testPlans",
11756
+ method: "list",
11757
+ summary: "List test plans",
11758
+ 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.",
11759
+ http: "GET",
11760
+ path: "/devops/v1/projects/{project}/test-plans",
11761
+ streaming: "no",
11762
+ pagination: false,
11763
+ pathParams: [
11764
+ {
11765
+ name: "project",
11766
+ sdkName: "project",
11767
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11768
+ }
11769
+ ],
11770
+ query: [
11771
+ {
11772
+ name: "pageSize",
11773
+ type: "integer",
11774
+ required: false,
11775
+ 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."
11776
+ },
11777
+ {
11778
+ name: "pageToken",
11779
+ type: "string",
11780
+ required: false,
11781
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11782
+ },
11783
+ {
11784
+ name: "orderBy",
11785
+ type: "string",
11786
+ required: false,
11787
+ 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."
11788
+ }
11789
+ ]
11790
+ },
11791
+ {
11792
+ resource: "devops.projects.testPlans",
11793
+ method: "create",
11794
+ summary: "Create a test plan",
11795
+ 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.",
11796
+ http: "POST",
11797
+ path: "/devops/v1/projects/{project}/test-plans",
11798
+ streaming: "no",
11799
+ pagination: false,
11800
+ pathParams: [
11801
+ {
11802
+ name: "project",
11803
+ sdkName: "project",
11804
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11805
+ }
11806
+ ],
11807
+ query: [],
11808
+ body: {
11809
+ required: true,
11810
+ fields: [
11811
+ {
11812
+ name: "key",
11813
+ type: "string",
11814
+ required: true,
11815
+ description: "Short name for the plan, unique inside the project; a key already in use is refused rather than silently reused."
11816
+ },
11817
+ {
11818
+ name: "title",
11819
+ type: "string",
11820
+ required: true,
11821
+ description: "Display title of the plan, shown wherever the plan is listed."
11822
+ },
11823
+ {
11824
+ name: "stage",
11825
+ type: "string",
11826
+ enum: [
11827
+ "dev",
11828
+ "presubmit",
11829
+ "postsubmit",
11830
+ "nightly",
11831
+ "production"
11832
+ ],
11833
+ required: true,
11834
+ description: "Which stage of delivery this plan belongs to, which decides when it is expected to run."
11835
+ },
11836
+ {
11837
+ name: "trigger",
11838
+ type: "object",
11839
+ required: true,
11840
+ description: "What starts a run of this plan. Exactly one kind applies; the fields a kind needs are the ones it carries."
11841
+ },
11842
+ {
11843
+ name: "selector",
11844
+ type: "object",
11845
+ required: true,
11846
+ 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."
11847
+ },
11848
+ {
11849
+ name: "environment",
11850
+ type: "string",
11851
+ required: false,
11852
+ 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."
11853
+ },
11854
+ {
11855
+ name: "gate",
11856
+ type: "string",
11857
+ enum: [
11858
+ "merge",
11859
+ "promotion",
11860
+ "observation",
11861
+ "none"
11862
+ ],
11863
+ required: true,
11864
+ description: "Whether this plan's result blocks a stage; a merge or promotion gate must name its environment."
11865
+ },
11866
+ {
11867
+ name: "repeat",
11868
+ type: "integer",
11869
+ required: false,
11870
+ 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."
11871
+ },
11872
+ {
11873
+ name: "timeoutMinutes",
11874
+ type: "integer",
11875
+ required: false,
11876
+ description: "How many minutes a run of this plan may take before it is timed out; omit for the service's default."
11877
+ }
11878
+ ]
11879
+ }
11880
+ },
11881
+ {
11882
+ resource: "devops.projects.testReports",
11883
+ method: "create",
11884
+ summary: "Upload an external test report",
11885
+ 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.",
11886
+ http: "POST",
11887
+ path: "/devops/v1/projects/{project}/test-reports",
11888
+ streaming: "no",
11889
+ pagination: false,
11890
+ pathParams: [
11891
+ {
11892
+ name: "project",
11893
+ sdkName: "project",
11894
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11895
+ }
11896
+ ],
11897
+ query: [],
11898
+ body: {
11899
+ required: true,
11900
+ fields: [
11901
+ {
11902
+ name: "reportId",
11903
+ type: "string",
11904
+ required: true,
11905
+ 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."
11906
+ },
11907
+ {
11908
+ name: "format",
11909
+ type: "string",
11910
+ enum: [
11911
+ "ctrf",
11912
+ "junit"
11913
+ ],
11914
+ required: true,
11915
+ description: "Which report format the document is in; it decides how the document is parsed."
11916
+ },
11917
+ {
11918
+ name: "ref",
11919
+ type: "object",
11920
+ required: true,
11921
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
11922
+ },
11923
+ {
11924
+ name: "report",
11925
+ type: "string",
11926
+ required: true,
11927
+ 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."
11928
+ }
11929
+ ]
11930
+ }
11931
+ },
11932
+ {
11933
+ resource: "devops.projects.testRuns",
11934
+ method: "list",
11935
+ summary: "List test runs",
11936
+ 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.",
11937
+ http: "GET",
11938
+ path: "/devops/v1/projects/{project}/test-runs",
11939
+ streaming: "no",
11940
+ pagination: false,
11941
+ pathParams: [
11942
+ {
11943
+ name: "project",
11944
+ sdkName: "project",
11945
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11946
+ }
11947
+ ],
11948
+ query: [
11949
+ {
11950
+ name: "pageSize",
11951
+ type: "integer",
11952
+ required: false,
11953
+ 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."
11954
+ },
11955
+ {
11956
+ name: "pageToken",
11957
+ type: "string",
11958
+ required: false,
11959
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11960
+ },
11961
+ {
11962
+ name: "filter",
11963
+ type: "string",
11964
+ required: false,
11965
+ 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."
11966
+ },
11967
+ {
11968
+ name: "orderBy",
11969
+ type: "string",
11970
+ required: false,
11971
+ 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."
11972
+ }
11973
+ ]
11974
+ },
11975
+ {
11976
+ resource: "devops.projects.testRuns",
11977
+ method: "create",
11978
+ summary: "Create a test run",
11979
+ 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, the default, returns as soon as the run exists; started waits until the run has begun, except for an external run, which is answered at once because it leaves queued only when your own CI uploads; finished waits for a verdict. The wait is bounded at about 25 seconds, and a wait that reaches that bound returns the run as it stands rather than failing — read state to see whether it finished. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.",
11980
+ http: "POST",
11981
+ path: "/devops/v1/projects/{project}/test-runs",
11982
+ streaming: "no",
11983
+ pagination: false,
11984
+ pathParams: [
11985
+ {
11986
+ name: "project",
11987
+ sdkName: "project",
11988
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11989
+ }
11990
+ ],
11991
+ query: [],
11992
+ body: {
11993
+ required: true,
11994
+ fields: [
11995
+ {
11996
+ name: "ref",
11997
+ type: "object",
11998
+ required: true,
11999
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
12000
+ },
12001
+ {
12002
+ name: "plan",
12003
+ type: "string",
12004
+ required: false,
12005
+ 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."
12006
+ },
12007
+ {
12008
+ name: "selector",
12009
+ type: "object",
12010
+ required: false,
12011
+ 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."
12012
+ },
12013
+ {
12014
+ name: "environment",
12015
+ type: "string",
12016
+ required: false,
12017
+ description: "Environment to run against; it decides whether production-only cases become selectable. Omit it for a run that needs no environment."
12018
+ },
12019
+ {
12020
+ name: "repeat",
12021
+ type: "integer",
12022
+ required: false,
12023
+ description: "How many times each selected case runs, which is how a flake is told apart from a real failure; omit for once."
12024
+ },
12025
+ {
12026
+ name: "waitUntil",
12027
+ type: "string",
12028
+ enum: [
12029
+ "queued",
12030
+ "started",
12031
+ "finished"
12032
+ ],
12033
+ required: false,
12034
+ description: "How far the call waits before answering, bounded at about 25 seconds; omit it for queued, which returns at once. The wait reads the run's own state, so a wait that reaches the bound returns the run as it stands instead of failing — check state before assuming the request was honoured."
12035
+ },
12036
+ {
12037
+ name: "executor",
12038
+ type: "string",
12039
+ enum: [
12040
+ "cloud",
12041
+ "external"
12042
+ ],
12043
+ required: false,
12044
+ 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."
12045
+ },
12046
+ {
12047
+ name: "requestId",
12048
+ type: "string",
12049
+ required: false,
12050
+ 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."
12051
+ }
12052
+ ]
12053
+ }
12054
+ },
12055
+ {
12056
+ resource: "devops.projects.testSuites",
12057
+ method: "list",
12058
+ summary: "List test suites",
12059
+ 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.",
12060
+ http: "GET",
12061
+ path: "/devops/v1/projects/{project}/test-suites",
12062
+ streaming: "no",
12063
+ pagination: false,
12064
+ pathParams: [
12065
+ {
12066
+ name: "project",
12067
+ sdkName: "project",
12068
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
12069
+ }
12070
+ ],
12071
+ query: [
12072
+ {
12073
+ name: "pageSize",
12074
+ type: "integer",
12075
+ required: false,
12076
+ 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."
12077
+ },
12078
+ {
12079
+ name: "pageToken",
12080
+ type: "string",
12081
+ required: false,
12082
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12083
+ },
12084
+ {
12085
+ name: "orderBy",
12086
+ type: "string",
12087
+ required: false,
12088
+ 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."
12089
+ }
12090
+ ]
12091
+ },
12092
+ {
12093
+ resource: "devops.testCases",
12094
+ method: "retrieve",
12095
+ summary: "Retrieve a test case",
12096
+ 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.",
12097
+ http: "GET",
12098
+ path: "/devops/v1/test-cases/{id}",
12099
+ streaming: "no",
12100
+ pagination: false,
12101
+ pathParams: [
12102
+ {
12103
+ name: "id",
12104
+ sdkName: "id",
12105
+ description: "The case identifier returned by a case list, or an older id listed in that case's aliases."
12106
+ }
12107
+ ],
12108
+ query: []
12109
+ },
12110
+ {
12111
+ resource: "devops.testPlans",
12112
+ method: "delete",
12113
+ summary: "Delete a test plan",
12114
+ 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.",
12115
+ http: "DELETE",
12116
+ path: "/devops/v1/test-plans/{id}",
12117
+ streaming: "no",
12118
+ pagination: false,
12119
+ pathParams: [
12120
+ {
12121
+ name: "id",
12122
+ sdkName: "id",
12123
+ description: "The plan identifier returned by a plan list or create answer."
12124
+ }
12125
+ ],
12126
+ query: []
12127
+ },
12128
+ {
12129
+ resource: "devops.testPlans",
12130
+ method: "retrieve",
12131
+ summary: "Retrieve a test plan",
12132
+ 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.",
12133
+ http: "GET",
12134
+ path: "/devops/v1/test-plans/{id}",
12135
+ streaming: "no",
12136
+ pagination: false,
12137
+ pathParams: [
12138
+ {
12139
+ name: "id",
12140
+ sdkName: "id",
12141
+ description: "The plan identifier returned by a plan list or create answer."
12142
+ }
12143
+ ],
12144
+ query: []
12145
+ },
12146
+ {
12147
+ resource: "devops.testPlans",
12148
+ method: "update",
12149
+ summary: "Update a test plan",
12150
+ 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.",
12151
+ http: "PATCH",
12152
+ path: "/devops/v1/test-plans/{id}",
12153
+ streaming: "no",
12154
+ pagination: false,
12155
+ pathParams: [
12156
+ {
12157
+ name: "id",
12158
+ sdkName: "id",
12159
+ description: "The plan identifier returned by a plan list or create answer."
12160
+ }
12161
+ ],
12162
+ query: [],
12163
+ body: {
12164
+ required: true,
12165
+ fields: [
12166
+ {
12167
+ name: "plan",
12168
+ type: "object",
12169
+ required: true,
12170
+ 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."
12171
+ },
12172
+ {
12173
+ name: "updateMask",
12174
+ type: "string",
12175
+ required: false,
12176
+ 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."
12177
+ }
12178
+ ]
12179
+ }
12180
+ },
12181
+ {
12182
+ resource: "devops.testPlans",
12183
+ method: "pause",
12184
+ summary: "Pause a test plan",
12185
+ 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.",
12186
+ http: "POST",
12187
+ path: "/devops/v1/test-plans/{id}:pause",
12188
+ streaming: "no",
12189
+ pagination: false,
12190
+ pathParams: [
12191
+ {
12192
+ name: "id",
12193
+ sdkName: "id",
12194
+ description: "The plan identifier returned by a plan list or create answer."
12195
+ }
12196
+ ],
12197
+ query: [],
12198
+ body: {
12199
+ required: true,
12200
+ fields: [
12201
+ {
12202
+ name: "reason",
12203
+ type: "string",
12204
+ required: true,
12205
+ description: "Why the plan is being paused; it is stored on the plan and read by whoever finds it stopped."
12206
+ },
12207
+ {
12208
+ name: "until",
12209
+ type: "string",
12210
+ required: false,
12211
+ description: "RFC 3339 UTC time the plan resumes by itself; omit it to stay paused until someone resumes it."
12212
+ }
12213
+ ]
12214
+ }
12215
+ },
12216
+ {
12217
+ resource: "devops.testPlans",
12218
+ method: "resume",
12219
+ summary: "Resume a test plan",
12220
+ 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.",
12221
+ http: "POST",
12222
+ path: "/devops/v1/test-plans/{id}:resume",
12223
+ streaming: "no",
12224
+ pagination: false,
12225
+ pathParams: [
12226
+ {
12227
+ name: "id",
12228
+ sdkName: "id",
12229
+ description: "The plan identifier returned by a plan list or create answer."
12230
+ }
12231
+ ],
12232
+ query: []
12233
+ },
12234
+ {
12235
+ resource: "devops.testRuns",
12236
+ method: "retrieve",
12237
+ summary: "Retrieve a test run",
12238
+ 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.",
12239
+ http: "GET",
12240
+ path: "/devops/v1/test-runs/{id}",
12241
+ streaming: "no",
12242
+ pagination: false,
12243
+ pathParams: [
12244
+ {
12245
+ name: "id",
12246
+ sdkName: "id",
12247
+ description: "The run identifier returned by a run list or create answer."
12248
+ }
12249
+ ],
12250
+ query: [
12251
+ {
12252
+ name: "expand",
12253
+ type: "array",
12254
+ itemType: "string",
12255
+ enum: [
12256
+ "failedExecutions"
12257
+ ],
12258
+ required: false,
12259
+ 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."
12260
+ }
12261
+ ]
12262
+ },
12263
+ {
12264
+ resource: "devops.testRuns",
12265
+ method: "cancel",
12266
+ summary: "Cancel a test run",
12267
+ 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.",
12268
+ http: "POST",
12269
+ path: "/devops/v1/test-runs/{id}:cancel",
12270
+ streaming: "no",
12271
+ pagination: false,
12272
+ pathParams: [
12273
+ {
12274
+ name: "id",
12275
+ sdkName: "id",
12276
+ description: "The run identifier returned by a run list or create answer."
12277
+ }
12278
+ ],
12279
+ query: [],
12280
+ body: {
12281
+ required: true,
12282
+ fields: [
12283
+ {
12284
+ name: "reason",
12285
+ type: "string",
12286
+ required: true,
12287
+ description: "Why the run is being cancelled; it is stored on the run and is what a later reader finds instead of a result."
12288
+ }
12289
+ ]
12290
+ }
12291
+ },
12292
+ {
12293
+ resource: "devops.testRuns.executions",
12294
+ method: "list",
12295
+ summary: "List a run's executions",
12296
+ 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.",
12297
+ http: "GET",
12298
+ path: "/devops/v1/test-runs/{run}/executions",
12299
+ streaming: "no",
12300
+ pagination: false,
12301
+ pathParams: [
12302
+ {
12303
+ name: "run",
12304
+ sdkName: "run",
12305
+ description: "The run whose executions you are reading, from a run list or create answer."
12306
+ }
12307
+ ],
12308
+ query: [
12309
+ {
12310
+ name: "pageSize",
12311
+ type: "integer",
12312
+ required: false,
12313
+ 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."
12314
+ },
12315
+ {
12316
+ name: "pageToken",
12317
+ type: "string",
12318
+ required: false,
12319
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12320
+ },
12321
+ {
12322
+ name: "filter",
12323
+ type: "string",
12324
+ required: false,
12325
+ 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."
12326
+ },
12327
+ {
12328
+ name: "orderBy",
12329
+ type: "string",
12330
+ required: false,
12331
+ 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."
12332
+ }
12333
+ ]
12334
+ },
12335
+ {
12336
+ resource: "devops.testRuns.executions",
12337
+ method: "retrieve",
12338
+ summary: "Retrieve one case's execution in a run",
12339
+ 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.",
12340
+ http: "GET",
12341
+ path: "/devops/v1/test-runs/{run}/executions/{case}",
12342
+ streaming: "no",
12343
+ pagination: false,
12344
+ pathParams: [
12345
+ {
12346
+ name: "run",
12347
+ sdkName: "run",
12348
+ description: "The run whose executions you are reading, from a run list or create answer."
12349
+ },
12350
+ {
12351
+ name: "case",
12352
+ sdkName: "case",
12353
+ description: "The case to read inside that run, from the run's execution list or the project's case list."
12354
+ }
12355
+ ],
12356
+ query: []
12357
+ },
12358
+ {
12359
+ resource: "devops.testSuites",
12360
+ method: "retrieve",
12361
+ summary: "Retrieve a test suite",
12362
+ 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.",
12363
+ http: "GET",
12364
+ path: "/devops/v1/test-suites/{id}",
12365
+ streaming: "no",
12366
+ pagination: false,
12367
+ pathParams: [
12368
+ {
12369
+ name: "id",
12370
+ sdkName: "id",
12371
+ description: "The suite identifier returned by a suite list, not the file path it was discovered from."
12372
+ }
12373
+ ],
12374
+ query: []
12375
+ },
11422
12376
  {
11423
12377
  resource: "file.files",
11424
12378
  method: "list",
@@ -11630,7 +12584,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11630
12584
  resource: "file.uploads",
11631
12585
  method: "create",
11632
12586
  summary: "Create an upload",
11633
- description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data, assistants and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
12587
+ 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.",
11634
12588
  http: "POST",
11635
12589
  path: "/file/v1/uploads",
11636
12590
  streaming: "no",
@@ -11644,7 +12598,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11644
12598
  name: "bytes",
11645
12599
  type: "integer",
11646
12600
  required: true,
11647
- description: "Exact complete file length in bytes, from 1 through 2147483648 (2 GiB); the sum of completed parts must match."
12601
+ description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
11648
12602
  },
11649
12603
  {
11650
12604
  name: "filename",
@@ -11688,7 +12642,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11688
12642
  resource: "file.uploads",
11689
12643
  method: "createSigned",
11690
12644
  summary: "Create a one-time upload URL",
11691
- 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\"}.",
12645
+ 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\"}.",
11692
12646
  http: "POST",
11693
12647
  path: "/file/v1/uploads/signed",
11694
12648
  streaming: "no",
@@ -11708,7 +12662,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11708
12662
  name: "bytes",
11709
12663
  type: "integer",
11710
12664
  required: true,
11711
- 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."
12665
+ 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."
11712
12666
  },
11713
12667
  {
11714
12668
  name: "content_type",
@@ -11731,7 +12685,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11731
12685
  name: "expires_in",
11732
12686
  type: "integer",
11733
12687
  required: false,
11734
- 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."
12688
+ 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."
11735
12689
  },
11736
12690
  {
11737
12691
  name: "part_size",
@@ -11742,6 +12696,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11742
12696
  ]
11743
12697
  }
11744
12698
  },
12699
+ {
12700
+ resource: "file.uploads",
12701
+ method: "retrieve",
12702
+ summary: "Retrieve an upload",
12703
+ 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.",
12704
+ http: "GET",
12705
+ path: "/file/v1/uploads/{upload_id}",
12706
+ streaming: "no",
12707
+ pagination: false,
12708
+ pathParams: [
12709
+ {
12710
+ name: "upload_id",
12711
+ sdkName: "upload_id",
12712
+ description: "Upload identifier returned by create; the upload must belong to your organization."
12713
+ }
12714
+ ],
12715
+ query: []
12716
+ },
11745
12717
  {
11746
12718
  resource: "file.uploads",
11747
12719
  method: "cancel",
@@ -11764,7 +12736,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11764
12736
  resource: "file.uploads",
11765
12737
  method: "complete",
11766
12738
  summary: "Complete an upload",
11767
- 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.",
12739
+ 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.",
11768
12740
  http: "POST",
11769
12741
  path: "/file/v1/uploads/{upload_id}/complete",
11770
12742
  streaming: "no",
@@ -11800,7 +12772,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11800
12772
  resource: "file.uploads.parts",
11801
12773
  method: "create",
11802
12774
  summary: "Add an upload part",
11803
- 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.",
12775
+ 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.",
11804
12776
  http: "POST",
11805
12777
  path: "/file/v1/uploads/{upload_id}/parts",
11806
12778
  streaming: "no",
@@ -11888,7 +12860,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11888
12860
  resource: "knowledge.vectorStores",
11889
12861
  method: "create",
11890
12862
  summary: "Create knowledge base",
11891
- 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"}.',
12863
+ 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"}.',
11892
12864
  http: "POST",
11893
12865
  path: "/knowledge/v1/vector_stores",
11894
12866
  streaming: "no",
@@ -11927,7 +12899,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11927
12899
  name: "chunking_strategy",
11928
12900
  type: "object",
11929
12901
  required: false,
11930
- 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."
12902
+ 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."
11931
12903
  },
11932
12904
  {
11933
12905
  name: "description",
@@ -12274,7 +13246,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12274
13246
  resource: "knowledge.vectorStores.files",
12275
13247
  method: "create",
12276
13248
  summary: "Add file",
12277
- 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.",
13249
+ 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.",
12278
13250
  http: "POST",
12279
13251
  path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
12280
13252
  streaming: "no",
@@ -12306,7 +13278,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12306
13278
  name: "chunking_strategy",
12307
13279
  type: "object",
12308
13280
  required: false,
12309
- 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."
13281
+ 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."
12310
13282
  }
12311
13283
  ]
12312
13284
  }
@@ -12613,11 +13585,23 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12613
13585
  ],
12614
13586
  query: []
12615
13587
  },
13588
+ {
13589
+ resource: "media.generation.capabilities",
13590
+ method: "list",
13591
+ summary: "Get generation capabilities",
13592
+ 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.",
13593
+ http: "GET",
13594
+ path: "/media/v1/generation/capabilities",
13595
+ streaming: "no",
13596
+ pagination: false,
13597
+ pathParams: [],
13598
+ query: []
13599
+ },
12616
13600
  {
12617
13601
  resource: "media.libraries",
12618
13602
  method: "list",
12619
13603
  summary: "List libraries",
12620
- 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.",
13604
+ 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.",
12621
13605
  http: "GET",
12622
13606
  path: "/media/v1/libraries",
12623
13607
  streaming: "no",
@@ -12699,7 +13683,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12699
13683
  resource: "media.libraries",
12700
13684
  method: "delete",
12701
13685
  summary: "Delete library",
12702
- 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.",
13686
+ 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.",
12703
13687
  http: "DELETE",
12704
13688
  path: "/media/v1/libraries/{library_id}",
12705
13689
  streaming: "no",
@@ -12717,7 +13701,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12717
13701
  resource: "media.libraries",
12718
13702
  method: "retrieve",
12719
13703
  summary: "Get library",
12720
- 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.",
13704
+ 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.",
12721
13705
  http: "GET",
12722
13706
  path: "/media/v1/libraries/{library_id}",
12723
13707
  streaming: "no",
@@ -12735,7 +13719,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12735
13719
  resource: "media.libraries",
12736
13720
  method: "update",
12737
13721
  summary: "Update library",
12738
- 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.",
13722
+ 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.",
12739
13723
  http: "PATCH",
12740
13724
  path: "/media/v1/libraries/{library_id}",
12741
13725
  streaming: "no",
@@ -12789,7 +13773,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12789
13773
  resource: "media.libraries.assets",
12790
13774
  method: "list",
12791
13775
  summary: "List assets",
12792
- 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.",
13776
+ 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.",
12793
13777
  http: "GET",
12794
13778
  path: "/media/v1/libraries/{library_id}/assets",
12795
13779
  streaming: "no",
@@ -12837,7 +13821,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12837
13821
  resource: "media.libraries.assets",
12838
13822
  method: "create",
12839
13823
  summary: "Upload asset",
12840
- 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.",
13824
+ 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.",
12841
13825
  http: "POST",
12842
13826
  path: "/media/v1/libraries/{library_id}/assets",
12843
13827
  streaming: "no",
@@ -12882,7 +13866,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12882
13866
  name: "asset_folder",
12883
13867
  type: "string",
12884
13868
  required: false,
12885
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13869
+ 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."
12886
13870
  },
12887
13871
  {
12888
13872
  name: "use_filename",
@@ -12961,7 +13945,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12961
13945
  resource: "media.libraries.assets.import",
12962
13946
  method: "create",
12963
13947
  summary: "Import file",
12964
- 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.",
13948
+ 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.",
12965
13949
  http: "POST",
12966
13950
  path: "/media/v1/libraries/{library_id}/assets/import",
12967
13951
  streaming: "no",
@@ -12981,7 +13965,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12981
13965
  name: "file_id",
12982
13966
  type: "string",
12983
13967
  required: true,
12984
- 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."
13968
+ 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."
12985
13969
  },
12986
13970
  {
12987
13971
  name: "public_id",
@@ -13005,7 +13989,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13005
13989
  name: "asset_folder",
13006
13990
  type: "string",
13007
13991
  required: false,
13008
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
13992
+ 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."
13009
13993
  },
13010
13994
  {
13011
13995
  name: "use_filename",
@@ -13084,7 +14068,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13084
14068
  resource: "media.libraries.assets",
13085
14069
  method: "delete",
13086
14070
  summary: "Delete asset",
13087
- 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.",
14071
+ 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.",
13088
14072
  http: "DELETE",
13089
14073
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13090
14074
  streaming: "no",
@@ -13107,7 +14091,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13107
14091
  resource: "media.libraries.assets",
13108
14092
  method: "retrieve",
13109
14093
  summary: "Get asset",
13110
- 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.",
14094
+ 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.",
13111
14095
  http: "GET",
13112
14096
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13113
14097
  streaming: "no",
@@ -13130,7 +14114,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13130
14114
  resource: "media.libraries.assets",
13131
14115
  method: "update",
13132
14116
  summary: "Update asset",
13133
- 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.",
14117
+ 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.",
13134
14118
  http: "PATCH",
13135
14119
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
13136
14120
  streaming: "no",
@@ -13161,7 +14145,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13161
14145
  name: "asset_folder",
13162
14146
  type: "string",
13163
14147
  required: false,
13164
- description: "Organizational folder path, separate from public_id. Empty selects the root; leading or trailing slashes, empty path segments, and . or .. segments are rejected."
14148
+ 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."
13165
14149
  },
13166
14150
  {
13167
14151
  name: "tags",
@@ -13179,11 +14163,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13179
14163
  ]
13180
14164
  }
13181
14165
  },
14166
+ {
14167
+ resource: "media.libraries.assets.frames",
14168
+ method: "create",
14169
+ summary: "Create frame URLs",
14170
+ 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.',
14171
+ http: "POST",
14172
+ path: "/media/v1/libraries/{library_id}/assets/{asset_id}/frames",
14173
+ streaming: "no",
14174
+ pagination: false,
14175
+ pathParams: [
14176
+ {
14177
+ name: "library_id",
14178
+ sdkName: "library_id",
14179
+ description: "Library identifier returned by library creation or listing; must be accessible to the current credential."
14180
+ },
14181
+ {
14182
+ name: "asset_id",
14183
+ sdkName: "asset_id",
14184
+ description: "Video asset identifier returned by asset upload or listing in this library; read its duration before choosing timestamps."
14185
+ }
14186
+ ],
14187
+ query: [],
14188
+ body: {
14189
+ required: true,
14190
+ fields: [
14191
+ {
14192
+ name: "at_micros",
14193
+ type: "array",
14194
+ itemType: "integer",
14195
+ required: true,
14196
+ 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."
14197
+ },
14198
+ {
14199
+ name: "width",
14200
+ type: "integer",
14201
+ enum: [
14202
+ 160,
14203
+ 320,
14204
+ 640
14205
+ ],
14206
+ required: false,
14207
+ 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."
14208
+ }
14209
+ ]
14210
+ }
14211
+ },
13182
14212
  {
13183
14213
  resource: "media.libraries.assets.reprocess",
13184
14214
  method: "create",
13185
14215
  summary: "Reprocess asset",
13186
- 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.",
14216
+ 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.",
13187
14217
  http: "POST",
13188
14218
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
13189
14219
  streaming: "no",
@@ -13215,7 +14245,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13215
14245
  "embedding"
13216
14246
  ],
13217
14247
  required: false,
13218
- 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."
14248
+ 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."
13219
14249
  }
13220
14250
  ]
13221
14251
  }
@@ -13224,7 +14254,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13224
14254
  resource: "media.libraries.assets.understandings",
13225
14255
  method: "list",
13226
14256
  summary: "List understandings",
13227
- 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.",
14257
+ 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.",
13228
14258
  http: "GET",
13229
14259
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/understandings",
13230
14260
  streaming: "no",
@@ -13256,10 +14286,16 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13256
14286
  "tags",
13257
14287
  "ocr",
13258
14288
  "transcript",
13259
- "frame"
14289
+ "frame",
14290
+ "overview",
14291
+ "audio",
14292
+ "loudness",
14293
+ "beats",
14294
+ "content",
14295
+ "embedding"
13260
14296
  ],
13261
14297
  required: false,
13262
- 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."
14298
+ 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."
13263
14299
  },
13264
14300
  {
13265
14301
  name: "cursor",
@@ -13279,7 +14315,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13279
14315
  resource: "media.libraries.assets",
13280
14316
  method: "batch",
13281
14317
  summary: "Batch assets alias",
13282
- 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.",
14318
+ 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.',
13283
14319
  http: "POST",
13284
14320
  path: "/media/v1/libraries/{library_id}/assets:batch",
13285
14321
  streaming: "no",
@@ -13300,6 +14336,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13300
14336
  type: "object",
13301
14337
  required: true,
13302
14338
  description: "Select assets by ids or by expression, never both. Expression results and exclusions are resolved when the job is created."
14339
+ },
14340
+ {
14341
+ name: "reason",
14342
+ type: "string",
14343
+ required: false,
14344
+ description: "Audit reason for the operation; required for staff Admin reprocessing and recorded with the initiating actor. Nonblank, at most 2000 characters."
13303
14345
  }
13304
14346
  ]
13305
14347
  }
@@ -13308,7 +14350,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13308
14350
  resource: "media.libraries.batches",
13309
14351
  method: "create",
13310
14352
  summary: "Create batch",
13311
- 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.",
14353
+ 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.',
13312
14354
  http: "POST",
13313
14355
  path: "/media/v1/libraries/{library_id}/batches",
13314
14356
  streaming: "no",
@@ -13329,6 +14371,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13329
14371
  type: "object",
13330
14372
  required: true,
13331
14373
  description: "Select assets by ids or by expression, never both. Expression results and exclusions are resolved when the job is created."
14374
+ },
14375
+ {
14376
+ name: "reason",
14377
+ type: "string",
14378
+ required: false,
14379
+ description: "Audit reason for the operation; required for staff Admin reprocessing and recorded with the initiating actor. Nonblank, at most 2000 characters."
13332
14380
  }
13333
14381
  ]
13334
14382
  }
@@ -13337,7 +14385,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13337
14385
  resource: "media.libraries.batches",
13338
14386
  method: "retrieve",
13339
14387
  summary: "Get batch",
13340
- 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.",
14388
+ 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.",
13341
14389
  http: "GET",
13342
14390
  path: "/media/v1/libraries/{library_id}/batches/{job_id}",
13343
14391
  streaming: "no",
@@ -13395,7 +14443,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13395
14443
  resource: "media.libraries.events",
13396
14444
  method: "list",
13397
14445
  summary: "List events",
13398
- 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.",
14446
+ 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.",
13399
14447
  http: "GET",
13400
14448
  path: "/media/v1/libraries/{library_id}/events",
13401
14449
  streaming: "no",
@@ -13442,7 +14490,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13442
14490
  resource: "media.libraries.folders",
13443
14491
  method: "list",
13444
14492
  summary: "List folders",
13445
- 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.",
14493
+ description: "undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.",
13446
14494
  http: "GET",
13447
14495
  path: "/media/v1/libraries/{library_id}/folders",
13448
14496
  streaming: "no",
@@ -13463,11 +14511,155 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13463
14511
  }
13464
14512
  ]
13465
14513
  },
14514
+ {
14515
+ resource: "media.libraries.generations",
14516
+ method: "create",
14517
+ summary: "Create video generation",
14518
+ 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.",
14519
+ http: "POST",
14520
+ path: "/media/v1/libraries/{library_id}/generations",
14521
+ streaming: "no",
14522
+ pagination: false,
14523
+ pathParams: [
14524
+ {
14525
+ name: "library_id",
14526
+ sdkName: "library_id",
14527
+ description: "Library ID returned by creation."
14528
+ }
14529
+ ],
14530
+ query: [],
14531
+ body: {
14532
+ required: true,
14533
+ fields: [
14534
+ {
14535
+ name: "intent",
14536
+ type: "string",
14537
+ required: true,
14538
+ description: "Generation operation; v1 accepts only video.generate text-to-video requests."
14539
+ },
14540
+ {
14541
+ name: "prompt",
14542
+ type: "string",
14543
+ required: true,
14544
+ description: "Text prompt describing the video to generate."
14545
+ },
14546
+ {
14547
+ name: "count",
14548
+ type: "integer",
14549
+ required: false,
14550
+ description: "Number of videos to generate; defaults to 1 and must be from 1 to 4."
14551
+ },
14552
+ {
14553
+ name: "duration_seconds",
14554
+ type: "integer",
14555
+ required: false,
14556
+ description: "Requested video duration in seconds; Router validates the model-specific supported durations."
14557
+ },
14558
+ {
14559
+ name: "aspect_ratio",
14560
+ type: "string",
14561
+ required: false,
14562
+ description: "Requested output aspect ratio; defaults to 16:9 and Router validates model support."
14563
+ },
14564
+ {
14565
+ name: "model",
14566
+ type: "string",
14567
+ required: false,
14568
+ description: "Router model with video_generation capability; defaults to wan2.7-t2v."
14569
+ },
14570
+ {
14571
+ name: "save",
14572
+ type: "string",
14573
+ enum: [
14574
+ "candidate",
14575
+ "library"
14576
+ ],
14577
+ required: false,
14578
+ description: "candidate keeps outputs temporary for explicit save calls; library saves successful outputs automatically."
14579
+ },
14580
+ {
14581
+ name: "asset_folder",
14582
+ type: "string",
14583
+ required: false,
14584
+ 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."
14585
+ },
14586
+ {
14587
+ name: "tags",
14588
+ type: "array",
14589
+ itemType: "string",
14590
+ required: false,
14591
+ description: "Tags applied when an output becomes a library asset."
14592
+ },
14593
+ {
14594
+ name: "understanding",
14595
+ type: "string",
14596
+ enum: [
14597
+ "auto",
14598
+ "skip"
14599
+ ],
14600
+ required: false,
14601
+ description: "Understanding behavior when a candidate is saved as an asset; defaults to auto."
14602
+ },
14603
+ {
14604
+ name: "references",
14605
+ type: "array",
14606
+ itemType: "object",
14607
+ required: false,
14608
+ description: "Not supported in v1; omit this field. Only text-to-video is currently available."
14609
+ }
14610
+ ]
14611
+ }
14612
+ },
14613
+ {
14614
+ resource: "media.libraries.jobs",
14615
+ method: "list",
14616
+ summary: "List jobs",
14617
+ 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.",
14618
+ http: "GET",
14619
+ path: "/media/v1/libraries/{library_id}/jobs",
14620
+ streaming: "no",
14621
+ pagination: true,
14622
+ pathParams: [
14623
+ {
14624
+ name: "library_id",
14625
+ sdkName: "library_id",
14626
+ description: "Library ID returned by creation."
14627
+ }
14628
+ ],
14629
+ query: [
14630
+ {
14631
+ name: "status",
14632
+ type: "string",
14633
+ enum: [
14634
+ "queued",
14635
+ "running",
14636
+ "completed",
14637
+ "completed_with_errors",
14638
+ "failed",
14639
+ "cancelled"
14640
+ ],
14641
+ required: false,
14642
+ description: "Filter jobs by their current status."
14643
+ },
14644
+ {
14645
+ name: "limit",
14646
+ type: "integer",
14647
+ required: false,
14648
+ description: "Maximum entries in this page, from 1 through 100; defaults to 100."
14649
+ },
14650
+ {
14651
+ name: "cursor",
14652
+ type: "string",
14653
+ required: false,
14654
+ description: "Job id from the previous page’s next_cursor; omit for the first page."
14655
+ }
14656
+ ]
14657
+ },
13466
14658
  {
13467
14659
  resource: "media.libraries.jobs",
13468
14660
  method: "retrieve",
13469
- summary: "Get job alias",
13470
- description: "Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.",
14661
+ summary: "Get job",
14662
+ 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.",
13471
14663
  http: "GET",
13472
14664
  path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
13473
14665
  streaming: "no",
@@ -13481,16 +14673,101 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13481
14673
  {
13482
14674
  name: "job_id",
13483
14675
  sdkName: "job_id",
13484
- description: "Batch identifier returned by createBatch or batchAssets; resolved within this library."
14676
+ description: "Job identifier returned by batch creation, video-generation creation or job listing; resolved within this library."
14677
+ }
14678
+ ],
14679
+ query: []
14680
+ },
14681
+ {
14682
+ resource: "media.libraries.jobs",
14683
+ method: "cancel",
14684
+ summary: "Cancel job",
14685
+ 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.",
14686
+ http: "POST",
14687
+ path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
14688
+ streaming: "no",
14689
+ pagination: false,
14690
+ pathParams: [
14691
+ {
14692
+ name: "library_id",
14693
+ sdkName: "library_id",
14694
+ description: "Library ID returned by creation."
14695
+ },
14696
+ {
14697
+ name: "job_id",
14698
+ sdkName: "job_id",
14699
+ description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
13485
14700
  }
13486
14701
  ],
13487
14702
  query: []
13488
14703
  },
14704
+ {
14705
+ resource: "media.libraries.jobs.outputs.save",
14706
+ method: "create",
14707
+ summary: "Save generation output",
14708
+ 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.",
14709
+ http: "POST",
14710
+ path: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
14711
+ streaming: "no",
14712
+ pagination: false,
14713
+ pathParams: [
14714
+ {
14715
+ name: "library_id",
14716
+ sdkName: "library_id",
14717
+ description: "Library ID returned by creation."
14718
+ },
14719
+ {
14720
+ name: "job_id",
14721
+ sdkName: "job_id",
14722
+ description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
14723
+ },
14724
+ {
14725
+ name: "index",
14726
+ sdkName: "index",
14727
+ description: "Zero-based position of the candidate in the Job outputs array."
14728
+ }
14729
+ ],
14730
+ query: [],
14731
+ body: {
14732
+ required: false,
14733
+ fields: [
14734
+ {
14735
+ name: "public_id",
14736
+ type: "string",
14737
+ required: false,
14738
+ description: "Delivery identifier for the saved asset; defaults to gen_<job_id>_<index> and is idempotent."
14739
+ },
14740
+ {
14741
+ name: "asset_folder",
14742
+ type: "string",
14743
+ required: false,
14744
+ 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."
14745
+ },
14746
+ {
14747
+ name: "tags",
14748
+ type: "array",
14749
+ itemType: "string",
14750
+ required: false,
14751
+ description: "Tags to apply to the saved asset."
14752
+ },
14753
+ {
14754
+ name: "understanding",
14755
+ type: "string",
14756
+ enum: [
14757
+ "auto",
14758
+ "skip"
14759
+ ],
14760
+ required: false,
14761
+ description: "Understanding behavior for the saved asset; defaults to auto."
14762
+ }
14763
+ ]
14764
+ }
14765
+ },
13489
14766
  {
13490
14767
  resource: "media.libraries.purge",
13491
14768
  method: "create",
13492
14769
  summary: "Purge library",
13493
- 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.",
14770
+ 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.",
13494
14771
  http: "POST",
13495
14772
  path: "/media/v1/libraries/{library_id}/purge",
13496
14773
  streaming: "no",
@@ -13508,7 +14785,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13508
14785
  resource: "media.libraries",
13509
14786
  method: "restore",
13510
14787
  summary: "Restore library",
13511
- 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.",
14788
+ 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.",
13512
14789
  http: "POST",
13513
14790
  path: "/media/v1/libraries/{library_id}/restore",
13514
14791
  streaming: "no",
@@ -13526,7 +14803,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13526
14803
  resource: "media.libraries.search",
13527
14804
  method: "create",
13528
14805
  summary: "Semantic search alias",
13529
- 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.",
14806
+ 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.",
13530
14807
  http: "POST",
13531
14808
  path: "/media/v1/libraries/{library_id}/search",
13532
14809
  streaming: "no",
@@ -13577,7 +14854,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13577
14854
  resource: "media.libraries.search.expression",
13578
14855
  method: "create",
13579
14856
  summary: "Expression search",
13580
- 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.",
14857
+ 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.",
13581
14858
  http: "POST",
13582
14859
  path: "/media/v1/libraries/{library_id}/search/expression",
13583
14860
  streaming: "no",
@@ -13597,7 +14874,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13597
14874
  name: "expression",
13598
14875
  type: "string",
13599
14876
  required: false,
13600
- 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.'
14877
+ 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.'
13601
14878
  },
13602
14879
  {
13603
14880
  name: "sort_by",
@@ -13649,7 +14926,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13649
14926
  resource: "media.libraries.search.semantic",
13650
14927
  method: "create",
13651
14928
  summary: "Semantic search",
13652
- 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.",
14929
+ 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.",
13653
14930
  http: "POST",
13654
14931
  path: "/media/v1/libraries/{library_id}/search/semantic",
13655
14932
  streaming: "no",
@@ -13700,7 +14977,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13700
14977
  resource: "media.libraries.search.visual",
13701
14978
  method: "create",
13702
14979
  summary: "Visual search",
13703
- 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.",
14980
+ 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.",
13704
14981
  http: "POST",
13705
14982
  path: "/media/v1/libraries/{library_id}/search/visual",
13706
14983
  streaming: "no",
@@ -13743,6 +15020,67 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13743
15020
  ]
13744
15021
  }
13745
15022
  },
15023
+ {
15024
+ resource: "media.libraries.understandings",
15025
+ method: "list",
15026
+ summary: "List understanding results across a library",
15027
+ 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.",
15028
+ http: "GET",
15029
+ path: "/media/v1/libraries/{library_id}/understandings",
15030
+ streaming: "no",
15031
+ pagination: true,
15032
+ pathParams: [
15033
+ {
15034
+ name: "library_id",
15035
+ sdkName: "library_id",
15036
+ description: "Library ID returned by creation."
15037
+ }
15038
+ ],
15039
+ query: [
15040
+ {
15041
+ name: "folder",
15042
+ type: "string",
15043
+ required: false,
15044
+ description: "Folder path including all descendants; omitted or empty selects the entire library."
15045
+ },
15046
+ {
15047
+ name: "kinds",
15048
+ type: "string",
15049
+ required: false,
15050
+ description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, loudness, beats, content, embedding. Omit or empty to include every kind."
15051
+ },
15052
+ {
15053
+ name: "cursor",
15054
+ type: "string",
15055
+ required: false,
15056
+ description: "Cursor from the previous next_cursor."
15057
+ },
15058
+ {
15059
+ name: "limit",
15060
+ type: "integer",
15061
+ required: false,
15062
+ description: "Maximum entries in this page, from 1 through 100; defaults to 100."
15063
+ }
15064
+ ]
15065
+ },
15066
+ {
15067
+ resource: "media.libraries.understandings",
15068
+ method: "retrieveFailureSummary",
15069
+ summary: "Summarize understanding failures",
15070
+ 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.",
15071
+ http: "GET",
15072
+ path: "/media/v1/libraries/{library_id}/understandings/failure_summary",
15073
+ streaming: "no",
15074
+ pagination: false,
15075
+ pathParams: [
15076
+ {
15077
+ name: "library_id",
15078
+ sdkName: "library_id",
15079
+ description: "Library ID returned by creation."
15080
+ }
15081
+ ],
15082
+ query: []
15083
+ },
13746
15084
  {
13747
15085
  resource: "meta.docs",
13748
15086
  method: "search",
@@ -14030,25 +15368,25 @@ services (model, agent, automation…); call the operation you need and read its
14030
15368
  name: "model",
14031
15369
  type: "string",
14032
15370
  required: true,
14033
- 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."
15371
+ description: "Model catalog identifier declaring openai.audio.transcriptions; use it unchanged, including any creator prefix."
14034
15372
  },
14035
15373
  {
14036
15374
  name: "file",
14037
15375
  type: "string",
14038
15376
  required: true,
14039
- description: "Audio file to transcribe, uploaded as multipart/form-data. Router support (supported): Verified to take effect."
15377
+ description: "Audio bytes uploaded as a multipart file; supported formats and input limits depend on the selected model."
14040
15378
  },
14041
15379
  {
14042
15380
  name: "language",
14043
15381
  type: "string",
14044
15382
  required: false,
14045
- 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."
15383
+ description: "Source language code when known; omit to let the model detect the language."
14046
15384
  },
14047
15385
  {
14048
15386
  name: "prompt",
14049
15387
  type: "string",
14050
15388
  required: false,
14051
- 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."
15389
+ description: "Optional vocabulary or contextual guidance for recognizing the audio; support depends on the selected model."
14052
15390
  },
14053
15391
  {
14054
15392
  name: "response_format",
@@ -14056,20 +15394,22 @@ services (model, agent, automation…); call the operation you need and read its
14056
15394
  enum: [
14057
15395
  "json",
14058
15396
  "text",
14059
- "verbose_json"
15397
+ "verbose_json",
15398
+ "diarized_json"
14060
15399
  ],
14061
15400
  required: false,
14062
- 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."
15401
+ 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."
14063
15402
  },
14064
15403
  {
14065
15404
  name: "timestamp_granularities[]",
14066
15405
  type: "array",
14067
15406
  itemType: "string",
14068
15407
  enum: [
15408
+ "word",
14069
15409
  "segment"
14070
15410
  ],
14071
15411
  required: false,
14072
- 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."
15412
+ 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."
14073
15413
  },
14074
15414
  {
14075
15415
  name: "temperature",
@@ -15946,279 +17286,812 @@ for more details.`
15946
17286
  pagination: false,
15947
17287
  pathParams: [
15948
17288
  {
15949
- name: "response_id",
15950
- sdkName: "response_id",
15951
- 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."
17289
+ name: "response_id",
17290
+ sdkName: "response_id",
17291
+ 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."
17292
+ }
17293
+ ],
17294
+ query: []
17295
+ },
17296
+ {
17297
+ resource: "model.systemone",
17298
+ method: "create",
17299
+ summary: "Ask structured decision questions",
17300
+ 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.",
17301
+ http: "POST",
17302
+ path: "/model/v1/systemone",
17303
+ streaming: "no",
17304
+ pagination: false,
17305
+ pathParams: [],
17306
+ query: [],
17307
+ body: {
17308
+ required: true,
17309
+ fields: [
17310
+ {
17311
+ name: "model",
17312
+ type: "string",
17313
+ required: true,
17314
+ description: "Published model id from model.models.list with supported_apis containing typesafe.systemone; returned unchanged in the response."
17315
+ },
17316
+ {
17317
+ name: "state",
17318
+ type: "object",
17319
+ required: true,
17320
+ description: "Shared content evaluated by every question, supplied as text, a JSON object or an array."
17321
+ },
17322
+ {
17323
+ name: "questions",
17324
+ type: "object",
17325
+ required: true,
17326
+ 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."
17327
+ },
17328
+ {
17329
+ name: "assets",
17330
+ type: "object",
17331
+ required: false,
17332
+ description: "Unsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported."
17333
+ }
17334
+ ]
17335
+ }
17336
+ },
17337
+ {
17338
+ resource: "model.videos",
17339
+ method: "list",
17340
+ summary: "List videos",
17341
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17342
+ http: "GET",
17343
+ path: "/model/v1/videos",
17344
+ streaming: "no",
17345
+ pagination: false,
17346
+ pathParams: [],
17347
+ query: [
17348
+ {
17349
+ name: "after",
17350
+ type: "string",
17351
+ required: false,
17352
+ 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."
17353
+ },
17354
+ {
17355
+ name: "limit",
17356
+ type: "integer",
17357
+ required: false,
17358
+ description: "Maximum number of jobs per page, from 1 to 100; defaults to 20."
17359
+ },
17360
+ {
17361
+ name: "order",
17362
+ type: "string",
17363
+ enum: [
17364
+ "asc",
17365
+ "desc"
17366
+ ],
17367
+ required: false,
17368
+ description: "Sort order by creation time: desc (default) lists the newest job first, asc the oldest first."
17369
+ }
17370
+ ]
17371
+ },
17372
+ {
17373
+ resource: "model.videos",
17374
+ method: "create",
17375
+ summary: "Create video",
17376
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17377
+ http: "POST",
17378
+ path: "/model/v1/videos",
17379
+ streaming: "no",
17380
+ pagination: false,
17381
+ multipart: true,
17382
+ pathParams: [],
17383
+ query: [],
17384
+ body: {
17385
+ required: true,
17386
+ fields: [
17387
+ {
17388
+ name: "model",
17389
+ type: "string",
17390
+ required: false,
17391
+ 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."
17392
+ },
17393
+ {
17394
+ name: "prompt",
17395
+ type: "string",
17396
+ required: true,
17397
+ description: "Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400."
17398
+ },
17399
+ {
17400
+ name: "seconds",
17401
+ type: "object",
17402
+ required: false,
17403
+ description: "Takes precedence over duration."
17404
+ },
17405
+ {
17406
+ name: "duration",
17407
+ type: "integer",
17408
+ required: false,
17409
+ description: "Length of the video in whole seconds. `seconds` takes precedence when both are given."
17410
+ },
17411
+ {
17412
+ name: "size",
17413
+ type: "string",
17414
+ required: false,
17415
+ 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."
17416
+ },
17417
+ {
17418
+ name: "input_reference",
17419
+ type: "object",
17420
+ required: false,
17421
+ 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)."
17422
+ },
17423
+ {
17424
+ name: "input_references",
17425
+ type: "array",
17426
+ itemType: "object",
17427
+ required: false,
17428
+ description: "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
17429
+ },
17430
+ {
17431
+ name: "frame_images",
17432
+ type: "array",
17433
+ itemType: "object",
17434
+ required: false,
17435
+ description: "Images that pin the first and last frame; at most 2 entries."
17436
+ },
17437
+ {
17438
+ name: "resolution",
17439
+ type: "string",
17440
+ required: false,
17441
+ description: "Output resolution label such as `720p`, for models that take a label instead of `size`."
17442
+ },
17443
+ {
17444
+ name: "aspect_ratio",
17445
+ type: "string",
17446
+ required: false,
17447
+ description: "Aspect ratio of the video such as `16:9`."
17448
+ },
17449
+ {
17450
+ name: "generate_audio",
17451
+ type: "boolean",
17452
+ required: false,
17453
+ 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."
17454
+ },
17455
+ {
17456
+ name: "seed",
17457
+ type: "integer",
17458
+ required: false,
17459
+ description: "Seed for reproducible generation, on models that support it."
17460
+ },
17461
+ {
17462
+ name: "callback_url",
17463
+ type: "string",
17464
+ required: false,
17465
+ description: "HTTP or HTTPS callback URL, forwarded to models that support completion callbacks."
17466
+ },
17467
+ {
17468
+ name: "quality",
17469
+ type: "string",
17470
+ required: false,
17471
+ description: "Provider-specific quality setting."
17472
+ }
17473
+ ]
17474
+ }
17475
+ },
17476
+ {
17477
+ resource: "model.videos",
17478
+ method: "delete",
17479
+ summary: "Delete video",
17480
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17481
+ http: "DELETE",
17482
+ path: "/model/v1/videos/{video_id}",
17483
+ streaming: "no",
17484
+ pagination: false,
17485
+ pathParams: [
17486
+ {
17487
+ name: "video_id",
17488
+ sdkName: "video_id",
17489
+ 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."
17490
+ }
17491
+ ],
17492
+ query: []
17493
+ },
17494
+ {
17495
+ resource: "model.videos",
17496
+ method: "retrieve",
17497
+ summary: "Retrieve video",
17498
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17499
+ http: "GET",
17500
+ path: "/model/v1/videos/{video_id}",
17501
+ streaming: "no",
17502
+ pagination: false,
17503
+ pathParams: [
17504
+ {
17505
+ name: "video_id",
17506
+ sdkName: "video_id",
17507
+ 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."
17508
+ }
17509
+ ],
17510
+ query: []
17511
+ },
17512
+ {
17513
+ resource: "model.videos",
17514
+ method: "retrieveContent",
17515
+ summary: "Download video",
17516
+ description: "OpenAI video API with OpenRouter request and response extensions.",
17517
+ http: "GET",
17518
+ path: "/model/v1/videos/{video_id}/content",
17519
+ streaming: "no",
17520
+ pagination: false,
17521
+ pathParams: [
17522
+ {
17523
+ name: "video_id",
17524
+ sdkName: "video_id",
17525
+ 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."
17526
+ }
17527
+ ],
17528
+ query: [
17529
+ {
17530
+ name: "variant",
17531
+ type: "string",
17532
+ enum: [
17533
+ "video",
17534
+ "thumbnail",
17535
+ "spritesheet"
17536
+ ],
17537
+ required: false,
17538
+ description: "Spritesheet is not available in this release (400)."
17539
+ },
17540
+ {
17541
+ name: "index",
17542
+ type: "integer",
17543
+ required: false,
17544
+ description: "Output index; this release produces index 0. variant takes precedence."
17545
+ }
17546
+ ]
17547
+ },
17548
+ {
17549
+ resource: "model.videos",
17550
+ method: "remix",
17551
+ summary: "Remix video",
17552
+ description: "Not supported in this release; always returns 400.",
17553
+ http: "POST",
17554
+ path: "/model/v1/videos/{video_id}/remix",
17555
+ streaming: "no",
17556
+ pagination: false,
17557
+ pathParams: [
17558
+ {
17559
+ name: "video_id",
17560
+ sdkName: "video_id",
17561
+ 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."
17562
+ }
17563
+ ],
17564
+ query: []
17565
+ },
17566
+ {
17567
+ resource: "ontology.changesets",
17568
+ method: "create",
17569
+ summary: "Apply changeset",
17570
+ 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.",
17571
+ http: "POST",
17572
+ path: "/ontology/v1/changesets",
17573
+ streaming: "no",
17574
+ pagination: false,
17575
+ pathParams: [],
17576
+ query: [],
17577
+ body: {
17578
+ required: true,
17579
+ fields: [
17580
+ {
17581
+ name: "at",
17582
+ type: "string",
17583
+ required: true,
17584
+ description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
17585
+ },
17586
+ {
17587
+ name: "scope",
17588
+ type: "string",
17589
+ required: false,
17590
+ description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
17591
+ },
17592
+ {
17593
+ name: "ops",
17594
+ type: "array",
17595
+ itemType: "object",
17596
+ required: true,
17597
+ description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
17598
+ }
17599
+ ]
17600
+ }
17601
+ },
17602
+ {
17603
+ resource: "ontology.nodes",
17604
+ method: "list",
17605
+ summary: "List nodes",
17606
+ 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.",
17607
+ http: "GET",
17608
+ path: "/ontology/v1/nodes",
17609
+ streaming: "no",
17610
+ pagination: true,
17611
+ pathParams: [],
17612
+ query: [
17613
+ {
17614
+ name: "type",
17615
+ type: "array",
17616
+ itemType: "string",
17617
+ required: false,
17618
+ description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
17619
+ },
17620
+ {
17621
+ name: "q",
17622
+ type: "string",
17623
+ required: false,
17624
+ description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
17625
+ },
17626
+ {
17627
+ name: "owner",
17628
+ type: "string",
17629
+ required: false,
17630
+ description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
17631
+ },
17632
+ {
17633
+ name: "as_of",
17634
+ type: "string",
17635
+ required: false,
17636
+ description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
17637
+ },
17638
+ {
17639
+ name: "limit",
17640
+ type: "integer",
17641
+ required: false,
17642
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17643
+ },
17644
+ {
17645
+ name: "cursor",
17646
+ type: "string",
17647
+ required: false,
17648
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
17649
+ }
17650
+ ]
17651
+ },
17652
+ {
17653
+ resource: "ontology.nodes",
17654
+ method: "create",
17655
+ summary: "Create node",
17656
+ 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.",
17657
+ http: "POST",
17658
+ path: "/ontology/v1/nodes",
17659
+ streaming: "no",
17660
+ pagination: false,
17661
+ pathParams: [],
17662
+ query: [],
17663
+ body: {
17664
+ required: true,
17665
+ fields: [
17666
+ {
17667
+ name: "type",
17668
+ type: "string",
17669
+ required: true,
17670
+ description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
17671
+ },
17672
+ {
17673
+ name: "ref",
17674
+ type: "string",
17675
+ required: false,
17676
+ 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."
17677
+ },
17678
+ {
17679
+ name: "name",
17680
+ type: "string",
17681
+ required: true,
17682
+ description: "Display name of the entity, at most 200 characters."
17683
+ },
17684
+ {
17685
+ name: "aliases",
17686
+ type: "array",
17687
+ itemType: "string",
17688
+ required: false,
17689
+ description: "Other names this entity is known by; they are matched by search alongside the name."
17690
+ },
17691
+ {
17692
+ name: "description",
17693
+ type: "string",
17694
+ required: false,
17695
+ description: "Profile of the entity, at most 500 characters; omit or null for none."
17696
+ },
17697
+ {
17698
+ name: "owner",
17699
+ type: "string",
17700
+ required: false,
17701
+ description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
17702
+ }
17703
+ ]
17704
+ }
17705
+ },
17706
+ {
17707
+ resource: "ontology.nodes",
17708
+ method: "retrieve",
17709
+ summary: "Retrieve node",
17710
+ 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.",
17711
+ http: "GET",
17712
+ path: "/ontology/v1/nodes/{node_id}",
17713
+ streaming: "no",
17714
+ pagination: false,
17715
+ pathParams: [
17716
+ {
17717
+ name: "node_id",
17718
+ sdkName: "node_id",
17719
+ 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."
17720
+ }
17721
+ ],
17722
+ query: [
17723
+ {
17724
+ name: "expand",
17725
+ type: "string",
17726
+ enum: [
17727
+ "relations"
17728
+ ],
17729
+ required: false,
17730
+ description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
17731
+ },
17732
+ {
17733
+ name: "as_of",
17734
+ type: "string",
17735
+ required: false,
17736
+ description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
17737
+ }
17738
+ ]
17739
+ },
17740
+ {
17741
+ resource: "ontology.nodes",
17742
+ method: "update",
17743
+ summary: "Update node",
17744
+ 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.",
17745
+ http: "PATCH",
17746
+ path: "/ontology/v1/nodes/{node_id}",
17747
+ streaming: "no",
17748
+ pagination: false,
17749
+ pathParams: [
17750
+ {
17751
+ name: "node_id",
17752
+ sdkName: "node_id",
17753
+ 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."
15952
17754
  }
15953
17755
  ],
15954
- query: []
17756
+ query: [],
17757
+ body: {
17758
+ required: true,
17759
+ fields: [
17760
+ {
17761
+ name: "name",
17762
+ type: "string",
17763
+ required: false,
17764
+ description: "New display name, at most 200 characters; omit to keep the current name."
17765
+ },
17766
+ {
17767
+ name: "aliases",
17768
+ type: "array",
17769
+ itemType: "string",
17770
+ required: false,
17771
+ description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
17772
+ },
17773
+ {
17774
+ name: "description",
17775
+ type: "string",
17776
+ required: false,
17777
+ description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
17778
+ }
17779
+ ]
17780
+ }
15955
17781
  },
15956
17782
  {
15957
- resource: "model.systemone",
17783
+ resource: "ontology.nodes.merge",
15958
17784
  method: "create",
15959
- summary: "Ask structured decision questions",
15960
- 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.",
17785
+ summary: "Merge node",
17786
+ 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.",
15961
17787
  http: "POST",
15962
- path: "/model/v1/systemone",
17788
+ path: "/ontology/v1/nodes/{node_id}/merge",
15963
17789
  streaming: "no",
15964
17790
  pagination: false,
15965
- pathParams: [],
17791
+ pathParams: [
17792
+ {
17793
+ name: "node_id",
17794
+ sdkName: "node_id",
17795
+ 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."
17796
+ }
17797
+ ],
15966
17798
  query: [],
15967
17799
  body: {
15968
17800
  required: true,
15969
17801
  fields: [
15970
17802
  {
15971
- name: "model",
17803
+ name: "into",
15972
17804
  type: "string",
15973
17805
  required: true,
15974
- description: "Published model id from model.models.list with supported_apis containing typesafe.systemone; returned unchanged in the response."
15975
- },
15976
- {
15977
- name: "state",
15978
- type: "object",
15979
- required: true,
15980
- description: "Shared content evaluated by every question, supplied as text, a JSON object or an array."
15981
- },
15982
- {
15983
- name: "questions",
15984
- type: "object",
15985
- required: true,
15986
- 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."
15987
- },
15988
- {
15989
- name: "assets",
15990
- type: "object",
15991
- required: false,
15992
- description: "Unsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported."
17806
+ description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
15993
17807
  }
15994
17808
  ]
15995
17809
  }
15996
17810
  },
15997
17811
  {
15998
- resource: "model.videos",
17812
+ resource: "ontology.relations",
15999
17813
  method: "list",
16000
- summary: "List videos",
16001
- description: "OpenAI video API with OpenRouter request and response extensions.",
17814
+ summary: "List relations",
17815
+ 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.",
16002
17816
  http: "GET",
16003
- path: "/model/v1/videos",
17817
+ path: "/ontology/v1/relations",
16004
17818
  streaming: "no",
16005
- pagination: false,
17819
+ pagination: true,
16006
17820
  pathParams: [],
16007
17821
  query: [
16008
17822
  {
16009
- name: "after",
17823
+ name: "node",
16010
17824
  type: "string",
16011
17825
  required: false,
16012
- 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."
17826
+ 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."
16013
17827
  },
16014
17828
  {
16015
- name: "limit",
16016
- type: "integer",
17829
+ name: "type",
17830
+ type: "array",
17831
+ itemType: "string",
16017
17832
  required: false,
16018
- description: "Maximum number of jobs per page, from 1 to 100; defaults to 20."
17833
+ description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
16019
17834
  },
16020
17835
  {
16021
- name: "order",
17836
+ name: "direction",
16022
17837
  type: "string",
16023
17838
  enum: [
16024
- "asc",
16025
- "desc"
17839
+ "out",
17840
+ "in",
17841
+ "both"
16026
17842
  ],
16027
17843
  required: false,
16028
- description: "Sort order by creation time: desc (default) lists the newest job first, asc the oldest first."
17844
+ 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."
17845
+ },
17846
+ {
17847
+ name: "as_of",
17848
+ type: "string",
17849
+ required: false,
17850
+ 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."
17851
+ },
17852
+ {
17853
+ name: "include_invalid",
17854
+ type: "boolean",
17855
+ required: false,
17856
+ 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."
17857
+ },
17858
+ {
17859
+ name: "limit",
17860
+ type: "integer",
17861
+ required: false,
17862
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17863
+ },
17864
+ {
17865
+ name: "cursor",
17866
+ type: "string",
17867
+ required: false,
17868
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
16029
17869
  }
16030
17870
  ]
16031
17871
  },
16032
17872
  {
16033
- resource: "model.videos",
17873
+ resource: "ontology.relations",
16034
17874
  method: "create",
16035
- summary: "Create video",
16036
- description: "OpenAI video API with OpenRouter request and response extensions.",
17875
+ summary: "Create relation",
17876
+ 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.",
16037
17877
  http: "POST",
16038
- path: "/model/v1/videos",
17878
+ path: "/ontology/v1/relations",
16039
17879
  streaming: "no",
16040
17880
  pagination: false,
16041
- multipart: true,
16042
17881
  pathParams: [],
16043
17882
  query: [],
16044
17883
  body: {
16045
17884
  required: true,
16046
17885
  fields: [
16047
17886
  {
16048
- name: "model",
17887
+ name: "type",
16049
17888
  type: "string",
16050
- required: false,
16051
- 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."
17889
+ required: true,
17890
+ description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
16052
17891
  },
16053
17892
  {
16054
- name: "prompt",
17893
+ name: "source",
16055
17894
  type: "string",
16056
17895
  required: true,
16057
- description: "Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400."
16058
- },
16059
- {
16060
- name: "seconds",
16061
- type: "object",
16062
- required: false,
16063
- description: "Takes precedence over duration."
17896
+ description: "Node id the fact starts from, from nodes.list or nodes.create."
16064
17897
  },
16065
17898
  {
16066
- name: "duration",
16067
- type: "integer",
16068
- required: false,
16069
- description: "Length of the video in whole seconds. `seconds` takes precedence when both are given."
17899
+ name: "target",
17900
+ type: "string",
17901
+ required: true,
17902
+ description: "Node id the fact points at, from nodes.list or nodes.create."
16070
17903
  },
16071
17904
  {
16072
- name: "size",
17905
+ name: "fact",
16073
17906
  type: "string",
16074
- required: false,
16075
- 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."
17907
+ required: true,
17908
+ description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
16076
17909
  },
16077
17910
  {
16078
- name: "input_reference",
16079
- type: "object",
17911
+ name: "valid_at",
17912
+ type: "string",
16080
17913
  required: false,
16081
- 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)."
17914
+ description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
16082
17915
  },
16083
17916
  {
16084
- name: "input_references",
16085
- type: "array",
16086
- itemType: "object",
17917
+ name: "owner",
17918
+ type: "string",
16087
17919
  required: false,
16088
- description: "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
16089
- },
17920
+ description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
17921
+ }
17922
+ ]
17923
+ }
17924
+ },
17925
+ {
17926
+ resource: "ontology.relations",
17927
+ method: "retrieve",
17928
+ summary: "Retrieve relation",
17929
+ 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.",
17930
+ http: "GET",
17931
+ path: "/ontology/v1/relations/{relation_id}",
17932
+ streaming: "no",
17933
+ pagination: false,
17934
+ pathParams: [
17935
+ {
17936
+ name: "relation_id",
17937
+ sdkName: "relation_id",
17938
+ 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."
17939
+ }
17940
+ ],
17941
+ query: []
17942
+ },
17943
+ {
17944
+ resource: "ontology.relations.invalidate",
17945
+ method: "create",
17946
+ summary: "Invalidate relation",
17947
+ 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.",
17948
+ http: "POST",
17949
+ path: "/ontology/v1/relations/{relation_id}/invalidate",
17950
+ streaming: "no",
17951
+ pagination: false,
17952
+ pathParams: [
17953
+ {
17954
+ name: "relation_id",
17955
+ sdkName: "relation_id",
17956
+ 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."
17957
+ }
17958
+ ],
17959
+ query: [],
17960
+ body: {
17961
+ required: true,
17962
+ fields: [
16090
17963
  {
16091
- name: "frame_images",
16092
- type: "array",
16093
- itemType: "object",
16094
- required: false,
16095
- description: "Images that pin the first and last frame; at most 2 entries."
17964
+ name: "invalid_at",
17965
+ type: "string",
17966
+ required: true,
17967
+ description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
16096
17968
  },
16097
17969
  {
16098
- name: "resolution",
17970
+ name: "superseded_by",
16099
17971
  type: "string",
16100
17972
  required: false,
16101
- description: "Output resolution label such as `720p`, for models that take a label instead of `size`."
17973
+ description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
16102
17974
  },
16103
17975
  {
16104
- name: "aspect_ratio",
17976
+ name: "reason",
16105
17977
  type: "string",
16106
17978
  required: false,
16107
- description: "Aspect ratio of the video such as `16:9`."
16108
- },
17979
+ description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
17980
+ }
17981
+ ]
17982
+ }
17983
+ },
17984
+ {
17985
+ resource: "ontology.search",
17986
+ method: "create",
17987
+ summary: "Search nodes",
17988
+ 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.",
17989
+ http: "POST",
17990
+ path: "/ontology/v1/search",
17991
+ streaming: "no",
17992
+ pagination: false,
17993
+ pathParams: [],
17994
+ query: [],
17995
+ body: {
17996
+ required: true,
17997
+ fields: [
16109
17998
  {
16110
- name: "generate_audio",
16111
- type: "boolean",
16112
- required: false,
16113
- 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."
17999
+ name: "text",
18000
+ type: "string",
18001
+ required: true,
18002
+ description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
16114
18003
  },
16115
18004
  {
16116
- name: "seed",
16117
- type: "integer",
18005
+ name: "types",
18006
+ type: "array",
18007
+ itemType: "string",
16118
18008
  required: false,
16119
- description: "Seed for reproducible generation, on models that support it."
18009
+ description: "Registered node type names to search within; omit to search every type."
16120
18010
  },
16121
18011
  {
16122
- name: "callback_url",
16123
- type: "string",
18012
+ name: "window",
18013
+ type: "object",
16124
18014
  required: false,
16125
- description: "HTTP or HTTPS callback URL, forwarded to models that support completion callbacks."
18015
+ description: "Restrict matches to facts recorded within a period; omit to search all time."
16126
18016
  },
16127
18017
  {
16128
- name: "quality",
16129
- type: "string",
18018
+ name: "limit",
18019
+ type: "integer",
16130
18020
  required: false,
16131
- description: "Provider-specific quality setting."
18021
+ description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
16132
18022
  }
16133
18023
  ]
16134
18024
  }
16135
18025
  },
16136
18026
  {
16137
- resource: "model.videos",
16138
- method: "delete",
16139
- summary: "Delete video",
16140
- description: "OpenAI video API with OpenRouter request and response extensions.",
16141
- http: "DELETE",
16142
- path: "/model/v1/videos/{video_id}",
16143
- streaming: "no",
16144
- pagination: false,
16145
- pathParams: [
16146
- {
16147
- name: "video_id",
16148
- sdkName: "video_id",
16149
- 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."
16150
- }
16151
- ],
16152
- query: []
16153
- },
16154
- {
16155
- resource: "model.videos",
16156
- method: "retrieve",
16157
- summary: "Retrieve video",
16158
- description: "OpenAI video API with OpenRouter request and response extensions.",
18027
+ resource: "ontology.types",
18028
+ method: "list",
18029
+ summary: "List types",
18030
+ 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.",
16159
18031
  http: "GET",
16160
- path: "/model/v1/videos/{video_id}",
18032
+ path: "/ontology/v1/types",
16161
18033
  streaming: "no",
16162
18034
  pagination: false,
16163
- pathParams: [
16164
- {
16165
- name: "video_id",
16166
- sdkName: "video_id",
16167
- 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."
16168
- }
16169
- ],
18035
+ pathParams: [],
16170
18036
  query: []
16171
18037
  },
16172
18038
  {
16173
- resource: "model.videos",
16174
- method: "retrieveContent",
16175
- summary: "Download video",
16176
- description: "OpenAI video API with OpenRouter request and response extensions.",
16177
- http: "GET",
16178
- path: "/model/v1/videos/{video_id}/content",
18039
+ resource: "ontology.types",
18040
+ method: "create",
18041
+ summary: "Register type",
18042
+ 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.",
18043
+ http: "POST",
18044
+ path: "/ontology/v1/types",
16179
18045
  streaming: "no",
16180
18046
  pagination: false,
16181
- pathParams: [
16182
- {
16183
- name: "video_id",
16184
- sdkName: "video_id",
16185
- 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."
16186
- }
16187
- ],
16188
- query: [
16189
- {
16190
- name: "variant",
16191
- type: "string",
16192
- enum: [
16193
- "video",
16194
- "thumbnail",
16195
- "spritesheet"
16196
- ],
16197
- required: false,
16198
- description: "Spritesheet is not available in this release (400)."
16199
- },
16200
- {
16201
- name: "index",
16202
- type: "integer",
16203
- required: false,
16204
- description: "Output index; this release produces index 0. variant takes precedence."
16205
- }
16206
- ]
18047
+ pathParams: [],
18048
+ query: [],
18049
+ body: {
18050
+ required: true,
18051
+ fields: [
18052
+ {
18053
+ name: "owner",
18054
+ type: "string",
18055
+ required: true,
18056
+ description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
18057
+ },
18058
+ {
18059
+ name: "version",
18060
+ type: "integer",
18061
+ required: true,
18062
+ description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
18063
+ },
18064
+ {
18065
+ name: "nodes",
18066
+ type: "array",
18067
+ itemType: "object",
18068
+ required: true,
18069
+ description: "Node types this owner registers."
18070
+ },
18071
+ {
18072
+ name: "edges",
18073
+ type: "array",
18074
+ itemType: "object",
18075
+ required: true,
18076
+ description: "Relation types this owner registers."
18077
+ }
18078
+ ]
18079
+ }
16207
18080
  },
16208
18081
  {
16209
- resource: "model.videos",
16210
- method: "remix",
16211
- summary: "Remix video",
16212
- description: "Not supported in this release; always returns 400.",
16213
- http: "POST",
16214
- path: "/model/v1/videos/{video_id}/remix",
18082
+ resource: "ontology.types",
18083
+ method: "retrieve",
18084
+ summary: "Retrieve type",
18085
+ 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.",
18086
+ http: "GET",
18087
+ path: "/ontology/v1/types/{name}",
16215
18088
  streaming: "no",
16216
18089
  pagination: false,
16217
18090
  pathParams: [
16218
18091
  {
16219
- name: "video_id",
16220
- sdkName: "video_id",
16221
- 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."
18092
+ name: "name",
18093
+ sdkName: "name",
18094
+ description: "A type name from types.list, with its dots preserved — a display label is not accepted."
16222
18095
  }
16223
18096
  ],
16224
18097
  query: []
@@ -18946,7 +20819,7 @@ for more details.`
18946
20819
  resource: "ticket.labels",
18947
20820
  method: "create",
18948
20821
  summary: "Create or add labels",
18949
- 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.",
20822
+ 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.",
18950
20823
  http: "POST",
18951
20824
  path: "/ticket/v1/labels",
18952
20825
  streaming: "no",
@@ -18988,7 +20861,7 @@ for more details.`
18988
20861
  resource: "ticket.labels",
18989
20862
  method: "delete",
18990
20863
  summary: "Remove labels",
18991
- 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.",
20864
+ 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.",
18992
20865
  http: "DELETE",
18993
20866
  path: "/ticket/v1/labels/{name}",
18994
20867
  streaming: "no",
@@ -19013,7 +20886,7 @@ for more details.`
19013
20886
  resource: "ticket.labels",
19014
20887
  method: "update",
19015
20888
  summary: "Update labels",
19016
- 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.",
20889
+ 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.",
19017
20890
  http: "PATCH",
19018
20891
  path: "/ticket/v1/labels/{name}",
19019
20892
  streaming: "no",
@@ -19309,7 +21182,7 @@ for more details.`
19309
21182
  name: "filter",
19310
21183
  type: "string",
19311
21184
  required: false,
19312
- 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."
21185
+ 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."
19313
21186
  }
19314
21187
  ]
19315
21188
  },
@@ -20415,7 +22288,7 @@ for more details.`
20415
22288
  resource: "vault.vaults",
20416
22289
  method: "create",
20417
22290
  summary: "Create vault",
20418
- 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.",
22291
+ 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.",
20419
22292
  http: "POST",
20420
22293
  path: "/vault/v1/vaults",
20421
22294
  streaming: "no",
@@ -20948,6 +22821,8 @@ function problemFrom(status, headers, body, statusText) {
20948
22821
  param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
20949
22822
  errors: Array.isArray(value.errors) ? value.errors : [],
20950
22823
  requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
22824
+ docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
22825
+ describe: string(nested.describe) ?? string(value.describe),
20951
22826
  raw: body
20952
22827
  };
20953
22828
  }
@@ -20961,6 +22836,8 @@ class PraxisError extends Error {
20961
22836
  errors;
20962
22837
  requestId;
20963
22838
  param;
22839
+ docUrl;
22840
+ describe;
20964
22841
  raw;
20965
22842
  constructor(problem = {}, options) {
20966
22843
  super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
@@ -20973,6 +22850,8 @@ class PraxisError extends Error {
20973
22850
  this.errors = problem.errors ?? [];
20974
22851
  this.requestId = problem.requestId;
20975
22852
  this.param = problem.param;
22853
+ this.docUrl = problem.docUrl;
22854
+ this.describe = problem.describe;
20976
22855
  this.raw = problem.raw;
20977
22856
  }
20978
22857
  static fromResponse(response, body) {
@@ -22377,6 +24256,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
22377
24256
  url: "/agent/v1/computers/{computer_id}/files/content",
22378
24257
  ...options
22379
24258
  });
24259
+ var computersFilesConvert = (options) => (options.client ?? client).post({
24260
+ security: [{
24261
+ key: "BearerAuth",
24262
+ scheme: "bearer",
24263
+ type: "http"
24264
+ }, {
24265
+ key: "ApiKeyAuth",
24266
+ name: "X-API-Key",
24267
+ type: "apiKey"
24268
+ }],
24269
+ url: "/agent/v1/computers/{computer_id}/files/convert",
24270
+ ...options,
24271
+ headers: {
24272
+ "Content-Type": "application/json",
24273
+ ...options.headers
24274
+ }
24275
+ });
22380
24276
  var connectComputer = (options) => (options.client ?? client).post({
22381
24277
  security: [{
22382
24278
  key: "BearerAuth",
@@ -22875,6 +24771,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
22875
24771
  url: "/file/v1/uploads/{upload_id}/cancel",
22876
24772
  ...options
22877
24773
  });
24774
+ var fileRetrieveUpload = (options) => (options.client ?? client).get({
24775
+ security: [{
24776
+ key: "BearerAuth",
24777
+ scheme: "bearer",
24778
+ type: "http"
24779
+ }],
24780
+ url: "/file/v1/uploads/{upload_id}",
24781
+ ...options
24782
+ });
22878
24783
  var fileCreateSignedUpload = (options) => (options.client ?? client).post({
22879
24784
  security: [{
22880
24785
  key: "BearerAuth",
@@ -26751,6 +28656,36 @@ var cutCreateExport = (options) => (options.client ?? client).post({
26751
28656
  ...options.headers
26752
28657
  }
26753
28658
  });
28659
+ var cutCreateRender = (options) => (options.client ?? client).post({
28660
+ security: [{
28661
+ key: "BearerAuth",
28662
+ scheme: "bearer",
28663
+ type: "http"
28664
+ }, {
28665
+ key: "ApiKeyAuth",
28666
+ name: "X-API-Key",
28667
+ type: "apiKey"
28668
+ }],
28669
+ url: "/cut/v1/projects/{project_id}/renders",
28670
+ ...options,
28671
+ headers: {
28672
+ "Content-Type": "application/json",
28673
+ ...options.headers
28674
+ }
28675
+ });
28676
+ var cutRetrieveRender = (options) => (options.client ?? client).get({
28677
+ security: [{
28678
+ key: "BearerAuth",
28679
+ scheme: "bearer",
28680
+ type: "http"
28681
+ }, {
28682
+ key: "ApiKeyAuth",
28683
+ name: "X-API-Key",
28684
+ type: "apiKey"
28685
+ }],
28686
+ url: "/cut/v1/renders/{render_id}",
28687
+ ...options
28688
+ });
26754
28689
  var cutRetrieveExport = (options) => (options.client ?? client).get({
26755
28690
  security: [{
26756
28691
  key: "BearerAuth",
@@ -27041,6 +28976,201 @@ var databaseInsert = (options) => (options.client ?? client).post({
27041
28976
  ...options.headers
27042
28977
  }
27043
28978
  });
28979
+ var devopsTestCatalogGet = (options) => (options.client ?? client).get({
28980
+ security: [{
28981
+ key: "devops-bearerAuth",
28982
+ scheme: "bearer",
28983
+ type: "http"
28984
+ }],
28985
+ url: "/devops/v1/projects/{project}/test-catalog",
28986
+ ...options
28987
+ });
28988
+ var devopsTestSuitesList = (options) => (options.client ?? client).get({
28989
+ security: [{
28990
+ key: "devops-bearerAuth",
28991
+ scheme: "bearer",
28992
+ type: "http"
28993
+ }],
28994
+ url: "/devops/v1/projects/{project}/test-suites",
28995
+ ...options
28996
+ });
28997
+ var devopsTestSuitesGet = (options) => (options.client ?? client).get({
28998
+ security: [{
28999
+ key: "devops-bearerAuth",
29000
+ scheme: "bearer",
29001
+ type: "http"
29002
+ }],
29003
+ url: "/devops/v1/test-suites/{id}",
29004
+ ...options
29005
+ });
29006
+ var devopsTestCasesList = (options) => (options.client ?? client).get({
29007
+ security: [{
29008
+ key: "devops-bearerAuth",
29009
+ scheme: "bearer",
29010
+ type: "http"
29011
+ }],
29012
+ url: "/devops/v1/projects/{project}/test-cases",
29013
+ ...options
29014
+ });
29015
+ var devopsTestCasesGet = (options) => (options.client ?? client).get({
29016
+ security: [{
29017
+ key: "devops-bearerAuth",
29018
+ scheme: "bearer",
29019
+ type: "http"
29020
+ }],
29021
+ url: "/devops/v1/test-cases/{id}",
29022
+ ...options
29023
+ });
29024
+ var devopsTestPlansList = (options) => (options.client ?? client).get({
29025
+ security: [{
29026
+ key: "devops-bearerAuth",
29027
+ scheme: "bearer",
29028
+ type: "http"
29029
+ }],
29030
+ url: "/devops/v1/projects/{project}/test-plans",
29031
+ ...options
29032
+ });
29033
+ var devopsTestPlansCreate = (options) => (options.client ?? client).post({
29034
+ security: [{
29035
+ key: "devops-bearerAuth",
29036
+ scheme: "bearer",
29037
+ type: "http"
29038
+ }],
29039
+ url: "/devops/v1/projects/{project}/test-plans",
29040
+ ...options,
29041
+ headers: {
29042
+ "Content-Type": "application/json",
29043
+ ...options.headers
29044
+ }
29045
+ });
29046
+ var devopsTestPlansDelete = (options) => (options.client ?? client).delete({
29047
+ security: [{
29048
+ key: "devops-bearerAuth",
29049
+ scheme: "bearer",
29050
+ type: "http"
29051
+ }],
29052
+ url: "/devops/v1/test-plans/{id}",
29053
+ ...options
29054
+ });
29055
+ var devopsTestPlansGet = (options) => (options.client ?? client).get({
29056
+ security: [{
29057
+ key: "devops-bearerAuth",
29058
+ scheme: "bearer",
29059
+ type: "http"
29060
+ }],
29061
+ url: "/devops/v1/test-plans/{id}",
29062
+ ...options
29063
+ });
29064
+ var devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
29065
+ security: [{
29066
+ key: "devops-bearerAuth",
29067
+ scheme: "bearer",
29068
+ type: "http"
29069
+ }],
29070
+ url: "/devops/v1/test-plans/{id}",
29071
+ ...options,
29072
+ headers: {
29073
+ "Content-Type": "application/json",
29074
+ ...options.headers
29075
+ }
29076
+ });
29077
+ var devopsTestPlansPause = (options) => (options.client ?? client).post({
29078
+ security: [{
29079
+ key: "devops-bearerAuth",
29080
+ scheme: "bearer",
29081
+ type: "http"
29082
+ }],
29083
+ url: "/devops/v1/test-plans/{id}:pause",
29084
+ ...options,
29085
+ headers: {
29086
+ "Content-Type": "application/json",
29087
+ ...options.headers
29088
+ }
29089
+ });
29090
+ var devopsTestPlansResume = (options) => (options.client ?? client).post({
29091
+ security: [{
29092
+ key: "devops-bearerAuth",
29093
+ scheme: "bearer",
29094
+ type: "http"
29095
+ }],
29096
+ url: "/devops/v1/test-plans/{id}:resume",
29097
+ ...options
29098
+ });
29099
+ var devopsTestRunsList = (options) => (options.client ?? client).get({
29100
+ security: [{
29101
+ key: "devops-bearerAuth",
29102
+ scheme: "bearer",
29103
+ type: "http"
29104
+ }],
29105
+ url: "/devops/v1/projects/{project}/test-runs",
29106
+ ...options
29107
+ });
29108
+ var devopsTestRunsCreate = (options) => (options.client ?? client).post({
29109
+ security: [{
29110
+ key: "devops-bearerAuth",
29111
+ scheme: "bearer",
29112
+ type: "http"
29113
+ }],
29114
+ url: "/devops/v1/projects/{project}/test-runs",
29115
+ ...options,
29116
+ headers: {
29117
+ "Content-Type": "application/json",
29118
+ ...options.headers
29119
+ }
29120
+ });
29121
+ var devopsTestRunsGet = (options) => (options.client ?? client).get({
29122
+ security: [{
29123
+ key: "devops-bearerAuth",
29124
+ scheme: "bearer",
29125
+ type: "http"
29126
+ }],
29127
+ url: "/devops/v1/test-runs/{id}",
29128
+ ...options
29129
+ });
29130
+ var devopsTestRunsCancel = (options) => (options.client ?? client).post({
29131
+ security: [{
29132
+ key: "devops-bearerAuth",
29133
+ scheme: "bearer",
29134
+ type: "http"
29135
+ }],
29136
+ url: "/devops/v1/test-runs/{id}:cancel",
29137
+ ...options,
29138
+ headers: {
29139
+ "Content-Type": "application/json",
29140
+ ...options.headers
29141
+ }
29142
+ });
29143
+ var devopsTestExecutionsList = (options) => (options.client ?? client).get({
29144
+ security: [{
29145
+ key: "devops-bearerAuth",
29146
+ scheme: "bearer",
29147
+ type: "http"
29148
+ }],
29149
+ url: "/devops/v1/test-runs/{run}/executions",
29150
+ ...options
29151
+ });
29152
+ var devopsTestExecutionsGet = (options) => (options.client ?? client).get({
29153
+ security: [{
29154
+ key: "devops-bearerAuth",
29155
+ scheme: "bearer",
29156
+ type: "http"
29157
+ }],
29158
+ url: "/devops/v1/test-runs/{run}/executions/{case}",
29159
+ ...options
29160
+ });
29161
+ var devopsTestReportsUpload = (options) => (options.client ?? client).post({
29162
+ security: [{
29163
+ key: "devops-bearerAuth",
29164
+ scheme: "bearer",
29165
+ type: "http"
29166
+ }],
29167
+ url: "/devops/v1/projects/{project}/test-reports",
29168
+ ...options,
29169
+ headers: {
29170
+ "Content-Type": "application/json",
29171
+ ...options.headers
29172
+ }
29173
+ });
27044
29174
  var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
27045
29175
  security: [{
27046
29176
  key: "knowledge-bearerAuth",
@@ -27285,6 +29415,19 @@ var mediaCreateLibrary = (options) => (options.client ?? client).post({
27285
29415
  ...options.headers
27286
29416
  }
27287
29417
  });
29418
+ var mediaCreateFrameUrls = (options) => (options.client ?? client).post({
29419
+ security: [{
29420
+ key: "media-BearerAuth",
29421
+ scheme: "bearer",
29422
+ type: "http"
29423
+ }],
29424
+ url: "/media/v1/libraries/{library_id}/assets/{asset_id}/frames",
29425
+ ...options,
29426
+ headers: {
29427
+ "Content-Type": "application/json",
29428
+ ...options.headers
29429
+ }
29430
+ });
27288
29431
  var mediaDeleteLibrary = (options) => (options.client ?? client).delete({
27289
29432
  security: [{
27290
29433
  key: "media-BearerAuth",
@@ -27549,6 +29692,235 @@ var mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
27549
29692
  ...options.headers
27550
29693
  }
27551
29694
  });
29695
+ var mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
29696
+ security: [{
29697
+ key: "media-BearerAuth",
29698
+ scheme: "bearer",
29699
+ type: "http"
29700
+ }],
29701
+ url: "/media/v1/libraries/{library_id}/understandings/failure_summary",
29702
+ ...options
29703
+ });
29704
+ var mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
29705
+ security: [{
29706
+ key: "media-BearerAuth",
29707
+ scheme: "bearer",
29708
+ type: "http"
29709
+ }],
29710
+ url: "/media/v1/libraries/{library_id}/understandings",
29711
+ ...options
29712
+ });
29713
+ var mediaCreateGeneration = (options) => (options.client ?? client).post({
29714
+ security: [{
29715
+ key: "media-BearerAuth",
29716
+ scheme: "bearer",
29717
+ type: "http"
29718
+ }],
29719
+ url: "/media/v1/libraries/{library_id}/generations",
29720
+ ...options,
29721
+ headers: {
29722
+ "Content-Type": "application/json",
29723
+ ...options.headers
29724
+ }
29725
+ });
29726
+ var mediaListJobs = (options) => (options.client ?? client).get({
29727
+ security: [{
29728
+ key: "media-BearerAuth",
29729
+ scheme: "bearer",
29730
+ type: "http"
29731
+ }],
29732
+ url: "/media/v1/libraries/{library_id}/jobs",
29733
+ ...options
29734
+ });
29735
+ var mediaCancelJob = (options) => (options.client ?? client).post({
29736
+ security: [{
29737
+ key: "media-BearerAuth",
29738
+ scheme: "bearer",
29739
+ type: "http"
29740
+ }],
29741
+ url: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
29742
+ ...options
29743
+ });
29744
+ var mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
29745
+ security: [{
29746
+ key: "media-BearerAuth",
29747
+ scheme: "bearer",
29748
+ type: "http"
29749
+ }],
29750
+ url: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
29751
+ ...options,
29752
+ headers: {
29753
+ "Content-Type": "application/json",
29754
+ ...options.headers
29755
+ }
29756
+ });
29757
+ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
29758
+ security: [{
29759
+ key: "media-BearerAuth",
29760
+ scheme: "bearer",
29761
+ type: "http"
29762
+ }],
29763
+ url: "/media/v1/generation/capabilities",
29764
+ ...options
29765
+ });
29766
+ var ontologyListTypes = (options) => (options?.client ?? client).get({
29767
+ security: [{
29768
+ key: "ontology-bearerAuth",
29769
+ scheme: "bearer",
29770
+ type: "http"
29771
+ }],
29772
+ url: "/ontology/v1/types",
29773
+ ...options
29774
+ });
29775
+ var ontologyRegisterType = (options) => (options.client ?? client).post({
29776
+ security: [{
29777
+ key: "ontology-bearerAuth",
29778
+ scheme: "bearer",
29779
+ type: "http"
29780
+ }],
29781
+ url: "/ontology/v1/types",
29782
+ ...options,
29783
+ headers: {
29784
+ "Content-Type": "application/json",
29785
+ ...options.headers
29786
+ }
29787
+ });
29788
+ var ontologyRetrieveType = (options) => (options.client ?? client).get({
29789
+ security: [{
29790
+ key: "ontology-bearerAuth",
29791
+ scheme: "bearer",
29792
+ type: "http"
29793
+ }],
29794
+ url: "/ontology/v1/types/{name}",
29795
+ ...options
29796
+ });
29797
+ var ontologyListNodes = (options) => (options?.client ?? client).get({
29798
+ security: [{
29799
+ key: "ontology-bearerAuth",
29800
+ scheme: "bearer",
29801
+ type: "http"
29802
+ }],
29803
+ url: "/ontology/v1/nodes",
29804
+ ...options
29805
+ });
29806
+ var ontologyCreateNode = (options) => (options.client ?? client).post({
29807
+ security: [{
29808
+ key: "ontology-bearerAuth",
29809
+ scheme: "bearer",
29810
+ type: "http"
29811
+ }],
29812
+ url: "/ontology/v1/nodes",
29813
+ ...options,
29814
+ headers: {
29815
+ "Content-Type": "application/json",
29816
+ ...options.headers
29817
+ }
29818
+ });
29819
+ var ontologyRetrieveNode = (options) => (options.client ?? client).get({
29820
+ security: [{
29821
+ key: "ontology-bearerAuth",
29822
+ scheme: "bearer",
29823
+ type: "http"
29824
+ }],
29825
+ url: "/ontology/v1/nodes/{node_id}",
29826
+ ...options
29827
+ });
29828
+ var ontologyUpdateNode = (options) => (options.client ?? client).patch({
29829
+ security: [{
29830
+ key: "ontology-bearerAuth",
29831
+ scheme: "bearer",
29832
+ type: "http"
29833
+ }],
29834
+ url: "/ontology/v1/nodes/{node_id}",
29835
+ ...options,
29836
+ headers: {
29837
+ "Content-Type": "application/json",
29838
+ ...options.headers
29839
+ }
29840
+ });
29841
+ var ontologyMergeNode = (options) => (options.client ?? client).post({
29842
+ security: [{
29843
+ key: "ontology-bearerAuth",
29844
+ scheme: "bearer",
29845
+ type: "http"
29846
+ }],
29847
+ url: "/ontology/v1/nodes/{node_id}/merge",
29848
+ ...options,
29849
+ headers: {
29850
+ "Content-Type": "application/json",
29851
+ ...options.headers
29852
+ }
29853
+ });
29854
+ var ontologyListRelations = (options) => (options?.client ?? client).get({
29855
+ security: [{
29856
+ key: "ontology-bearerAuth",
29857
+ scheme: "bearer",
29858
+ type: "http"
29859
+ }],
29860
+ url: "/ontology/v1/relations",
29861
+ ...options
29862
+ });
29863
+ var ontologyCreateRelation = (options) => (options.client ?? client).post({
29864
+ security: [{
29865
+ key: "ontology-bearerAuth",
29866
+ scheme: "bearer",
29867
+ type: "http"
29868
+ }],
29869
+ url: "/ontology/v1/relations",
29870
+ ...options,
29871
+ headers: {
29872
+ "Content-Type": "application/json",
29873
+ ...options.headers
29874
+ }
29875
+ });
29876
+ var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
29877
+ security: [{
29878
+ key: "ontology-bearerAuth",
29879
+ scheme: "bearer",
29880
+ type: "http"
29881
+ }],
29882
+ url: "/ontology/v1/relations/{relation_id}",
29883
+ ...options
29884
+ });
29885
+ var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
29886
+ security: [{
29887
+ key: "ontology-bearerAuth",
29888
+ scheme: "bearer",
29889
+ type: "http"
29890
+ }],
29891
+ url: "/ontology/v1/relations/{relation_id}/invalidate",
29892
+ ...options,
29893
+ headers: {
29894
+ "Content-Type": "application/json",
29895
+ ...options.headers
29896
+ }
29897
+ });
29898
+ var ontologyApplyChangeset = (options) => (options.client ?? client).post({
29899
+ security: [{
29900
+ key: "ontology-bearerAuth",
29901
+ scheme: "bearer",
29902
+ type: "http"
29903
+ }],
29904
+ url: "/ontology/v1/changesets",
29905
+ ...options,
29906
+ headers: {
29907
+ "Content-Type": "application/json",
29908
+ ...options.headers
29909
+ }
29910
+ });
29911
+ var ontologySearch = (options) => (options.client ?? client).post({
29912
+ security: [{
29913
+ key: "ontology-bearerAuth",
29914
+ scheme: "bearer",
29915
+ type: "http"
29916
+ }],
29917
+ url: "/ontology/v1/search",
29918
+ ...options,
29919
+ headers: {
29920
+ "Content-Type": "application/json",
29921
+ ...options.headers
29922
+ }
29923
+ });
27552
29924
  var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
27553
29925
  querySerializer: { parameters: { state: { array: { explode: false } } } },
27554
29926
  security: [
@@ -29426,6 +31798,9 @@ function createAgent(transport) {
29426
31798
  create: bind(transport, computersCreate),
29427
31799
  delete: bind(transport, computersDelete),
29428
31800
  files: {
31801
+ convert: {
31802
+ create: bind(transport, computersFilesConvert)
31803
+ },
29429
31804
  list: bind(transport, computersFilesList),
29430
31805
  retrieveContent: bind(transport, computersFilesContent)
29431
31806
  },
@@ -29873,6 +32248,9 @@ function createCut(transport) {
29873
32248
  media: {
29874
32249
  import: bind(transport, cutImportMedia)
29875
32250
  },
32251
+ renders: {
32252
+ create: bind(transport, cutCreateRender)
32253
+ },
29876
32254
  retrieve: bind(transport, cutRetrieveProject),
29877
32255
  retrieveState: bind(transport, cutRetrieveState),
29878
32256
  retrieveTimeline: bind(transport, cutRetrieveTimeline),
@@ -29883,6 +32261,9 @@ function createCut(transport) {
29883
32261
  list: bind(transport, cutListVersions)
29884
32262
  }
29885
32263
  },
32264
+ renders: {
32265
+ retrieve: bind(transport, cutRetrieveRender)
32266
+ },
29886
32267
  versions: {
29887
32268
  restore: bind(transport, cutRestoreVersion)
29888
32269
  }
@@ -29925,6 +32306,51 @@ function createDatabase(transport) {
29925
32306
  }
29926
32307
  };
29927
32308
  }
32309
+ function createDevops(transport) {
32310
+ return {
32311
+ projects: {
32312
+ retrieveTestCatalog: bind(transport, devopsTestCatalogGet),
32313
+ testCases: {
32314
+ list: bind(transport, devopsTestCasesList)
32315
+ },
32316
+ testPlans: {
32317
+ create: bind(transport, devopsTestPlansCreate),
32318
+ list: bind(transport, devopsTestPlansList)
32319
+ },
32320
+ testReports: {
32321
+ create: bind(transport, devopsTestReportsUpload)
32322
+ },
32323
+ testRuns: {
32324
+ create: bind(transport, devopsTestRunsCreate),
32325
+ list: bind(transport, devopsTestRunsList)
32326
+ },
32327
+ testSuites: {
32328
+ list: bind(transport, devopsTestSuitesList)
32329
+ }
32330
+ },
32331
+ testCases: {
32332
+ retrieve: bind(transport, devopsTestCasesGet)
32333
+ },
32334
+ testPlans: {
32335
+ delete: bind(transport, devopsTestPlansDelete),
32336
+ pause: bind(transport, devopsTestPlansPause),
32337
+ resume: bind(transport, devopsTestPlansResume),
32338
+ retrieve: bind(transport, devopsTestPlansGet),
32339
+ update: bind(transport, devopsTestPlansUpdate)
32340
+ },
32341
+ testRuns: {
32342
+ cancel: bind(transport, devopsTestRunsCancel),
32343
+ executions: {
32344
+ list: bind(transport, devopsTestExecutionsList),
32345
+ retrieve: bind(transport, devopsTestExecutionsGet)
32346
+ },
32347
+ retrieve: bind(transport, devopsTestRunsGet)
32348
+ },
32349
+ testSuites: {
32350
+ retrieve: bind(transport, devopsTestSuitesGet)
32351
+ }
32352
+ };
32353
+ }
29928
32354
  function createFile(transport) {
29929
32355
  return {
29930
32356
  files: {
@@ -29947,7 +32373,8 @@ function createFile(transport) {
29947
32373
  createSigned: bind(transport, fileCreateSignedUpload),
29948
32374
  parts: {
29949
32375
  create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
29950
- }
32376
+ },
32377
+ retrieve: bind(transport, fileRetrieveUpload)
29951
32378
  }
29952
32379
  };
29953
32380
  }
@@ -29999,11 +32426,19 @@ function createKnowledge(transport) {
29999
32426
  }
30000
32427
  function createMedia(transport) {
30001
32428
  return {
32429
+ generation: {
32430
+ capabilities: {
32431
+ list: bind(transport, mediaGetGenerationCapabilities)
32432
+ }
32433
+ },
30002
32434
  libraries: {
30003
32435
  assets: {
30004
32436
  batch: bind(transport, mediaBatchAssets),
30005
32437
  create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
30006
32438
  delete: bind(transport, mediaDeleteAsset),
32439
+ frames: {
32440
+ create: bind(transport, mediaCreateFrameUrls)
32441
+ },
30007
32442
  import: {
30008
32443
  create: bind(transport, mediaImportAsset)
30009
32444
  },
@@ -30032,7 +32467,17 @@ function createMedia(transport) {
30032
32467
  folders: {
30033
32468
  list: bind(transport, mediaListFolders)
30034
32469
  },
32470
+ generations: {
32471
+ create: bind(transport, mediaCreateGeneration)
32472
+ },
30035
32473
  jobs: {
32474
+ cancel: bind(transport, mediaCancelJob),
32475
+ list: bindPage(transport, mediaListJobs),
32476
+ outputs: {
32477
+ save: {
32478
+ create: bind(transport, mediaSaveGenerationOutput)
32479
+ }
32480
+ },
30036
32481
  retrieve: bind(transport, mediaGetJob)
30037
32482
  },
30038
32483
  list: bindPage(transport, mediaListLibraries),
@@ -30053,6 +32498,10 @@ function createMedia(transport) {
30053
32498
  create: bind(transport, mediaVisualSearch)
30054
32499
  }
30055
32500
  },
32501
+ understandings: {
32502
+ list: bindPage(transport, mediaListUnderstandingsByLibrary),
32503
+ retrieveFailureSummary: bind(transport, mediaUnderstandingFailureSummary)
32504
+ },
30056
32505
  update: bind(transport, mediaUpdateLibrary)
30057
32506
  }
30058
32507
  };
@@ -30153,6 +32602,38 @@ function createModel(transport) {
30153
32602
  }
30154
32603
  };
30155
32604
  }
32605
+ function createOntology(transport) {
32606
+ return {
32607
+ changesets: {
32608
+ create: bind(transport, ontologyApplyChangeset)
32609
+ },
32610
+ nodes: {
32611
+ create: bind(transport, ontologyCreateNode),
32612
+ list: bindPage(transport, ontologyListNodes),
32613
+ merge: {
32614
+ create: bind(transport, ontologyMergeNode)
32615
+ },
32616
+ retrieve: bind(transport, ontologyRetrieveNode),
32617
+ update: bind(transport, ontologyUpdateNode)
32618
+ },
32619
+ relations: {
32620
+ create: bind(transport, ontologyCreateRelation),
32621
+ invalidate: {
32622
+ create: bind(transport, ontologyInvalidateRelation)
32623
+ },
32624
+ list: bindPage(transport, ontologyListRelations),
32625
+ retrieve: bind(transport, ontologyRetrieveRelation)
32626
+ },
32627
+ search: {
32628
+ create: bind(transport, ontologySearch)
32629
+ },
32630
+ types: {
32631
+ create: bind(transport, ontologyRegisterType),
32632
+ list: bind(transport, ontologyListTypes),
32633
+ retrieve: bind(transport, ontologyRetrieveType)
32634
+ }
32635
+ };
32636
+ }
30156
32637
  function createOrganization(transport) {
30157
32638
  return {
30158
32639
  charges: {
@@ -30414,11 +32895,13 @@ var resourceFactories = {
30414
32895
  crm: createCrm,
30415
32896
  cut: createCut,
30416
32897
  database: createDatabase,
32898
+ devops: createDevops,
30417
32899
  file: createFile,
30418
32900
  knowledge: createKnowledge,
30419
32901
  media: createMedia,
30420
32902
  meta: createMeta,
30421
32903
  model: createModel,
32904
+ ontology: createOntology,
30422
32905
  organization: createOrganization,
30423
32906
  sandbox: createSandbox,
30424
32907
  search: createSearch,
@@ -31492,6 +33975,26 @@ async function prepareMultipart(op, opts) {
31492
33975
  opts.body = body;
31493
33976
  }
31494
33977
 
33978
+ // src/core/pagination.ts
33979
+ var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
33980
+ function pageTokenField(op) {
33981
+ return op.query.find((field) => PAGE_TOKENS.test(field.name));
33982
+ }
33983
+ function nextPageToken(result) {
33984
+ const value = result;
33985
+ const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
33986
+ return typeof token === "string" && token ? token : undefined;
33987
+ }
33988
+ function pageOf(result) {
33989
+ const value = result;
33990
+ const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
33991
+ const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
33992
+ if (!Array.isArray(data))
33993
+ return;
33994
+ const token = nextPageToken(result);
33995
+ return { items: data, ...token ? { token } : {} };
33996
+ }
33997
+
31495
33998
  // src/core/bind-args.ts
31496
33999
  var globalOptions = [
31497
34000
  { name: "org", type: "string" },
@@ -31707,7 +34210,7 @@ function bindArgs(parsed, op, data) {
31707
34210
  (opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
31708
34211
  }
31709
34212
  }
31710
- if (globals.all && !op.pagination)
34213
+ if (globals.all && !op.pagination && !pageTokenField(op))
31711
34214
  throw new UsageError("--all requires a paginated operation");
31712
34215
  for (const p of op.pathParams)
31713
34216
  if (p !== target && opts.path?.[p.sdkName] === undefined)
@@ -31733,8 +34236,8 @@ function bindArgs(parsed, op, data) {
31733
34236
  }
31734
34237
 
31735
34238
  // src/core/help.ts
31736
- function describeOption(s) {
31737
- 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, " ")}` : ""}`;
34239
+ function describeOption(s, required = s.required) {
34240
+ 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, " ")}` : ""}`;
31738
34241
  }
31739
34242
  function example(command) {
31740
34243
  const target = targetParam(command.op);
@@ -31750,18 +34253,22 @@ function example(command) {
31750
34253
  args.push("--yes");
31751
34254
  return args.join(" ");
31752
34255
  }
34256
+ function fieldRequired(op, field, location) {
34257
+ return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
34258
+ }
31753
34259
  function help(commands, prefix, command) {
31754
34260
  if (command) {
31755
34261
  const target = targetParam(command.op);
34262
+ const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
31756
34263
  return [
31757
- `praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
34264
+ `praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
31758
34265
  `SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
31759
34266
  `${command.op.http} ${command.op.path}`,
31760
34267
  ...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
31761
34268
  "",
31762
34269
  "Options:",
31763
34270
  ...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
31764
- ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
34271
+ ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
31765
34272
  ...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" : ""})`) ?? [],
31766
34273
  " -h is an alias of --help",
31767
34274
  "PRAXIS_ENV=develop|production (default: develop); no --env option.",
@@ -31829,6 +34336,7 @@ var workflows = [
31829
34336
  { 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" },
31830
34337
  { 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" },
31831
34338
  { 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>" },
34339
+ { 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" },
31832
34340
  { words: ["skill"], usage: "skill [--install <dir>]", summary: "Print the AI skill, or write <dir>/praxis-cli/SKILL.md." }
31833
34341
  ];
31834
34342
  var workflowNouns = [...new Set(workflows.filter((w) => w.words.length > 1).map((w) => w.words[0]))];
@@ -32285,7 +34793,18 @@ function skillDocument(commands) {
32285
34793
  "## Account and CLI",
32286
34794
  "",
32287
34795
  ...workflows.map((w) => `praxis ${w.usage} — ${w.summary.replace("Print the AI skill, or write", "Print this skill; use --install <dir> to write")}`),
32288
- "praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)"
34796
+ "praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)",
34797
+ "",
34798
+ "## devops test run (workflow)",
34799
+ "",
34800
+ "Run the project's tests at the commit HEAD is on, on the Praxis cloud executor, and wait for the verdict:",
34801
+ "",
34802
+ "- 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.",
34803
+ "- 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.",
34804
+ "- `--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).",
34805
+ "- The run waits by default and polls every 5s; `--no-wait` returns as soon as the run exists, with `result` still `pending`.",
34806
+ "- 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.",
34807
+ "- The run URL is on the Console of the environment the CLI talks to; the run id is also on stdout with `--json`."
32289
34808
  ];
32290
34809
  let domain;
32291
34810
  for (const command of commands) {
@@ -32831,6 +35350,191 @@ async function appRollback(args, client2, ports) {
32831
35350
  ports.emit({ kind: "object", data: { url: worker.subdomain?.url ?? null, worker_id: worker.id, from_version: from, to_version: to, deployment_id: done.id } });
32832
35351
  }
32833
35352
 
35353
+ // src/commands/devops.ts
35354
+ import { join as join4 } from "node:path";
35355
+
35356
+ // src/devops/pure.ts
35357
+ import { createHash as createHash2 } from "node:crypto";
35358
+ var PROJECT_ID = /^dvp_[a-z0-9]+$/;
35359
+ var POLL_MS = 5000;
35360
+ var FAILURE_LIMIT = 20;
35361
+ var hint = 'Pass --project dvp_…, or add "devops": { "project": "dvp_…" } to praxis.jsonc in the current directory.';
35362
+ function checkProject(value, hintText = hint) {
35363
+ if (typeof value !== "string" || !value.trim())
35364
+ throw new UsageError("A DevOps project id must be a non-empty string", hintText);
35365
+ if (!PROJECT_ID.test(value.trim()))
35366
+ throw new UsageError(`Not a DevOps project id: ${value}`, "A project id starts with dvp_ and comes from the project list. " + hintText);
35367
+ return value.trim();
35368
+ }
35369
+ function parseDevopsProject(value) {
35370
+ if (value === null || value === undefined || typeof value !== "object" || Array.isArray(value))
35371
+ return;
35372
+ const devops = value.devops;
35373
+ if (devops === undefined)
35374
+ return;
35375
+ if (devops === null || typeof devops !== "object" || Array.isArray(devops))
35376
+ throw new UsageError("praxis.jsonc devops must be an object", 'Write {"devops":{"project":"dvp_…"}}. ' + hint);
35377
+ const project = devops.project;
35378
+ if (project === undefined)
35379
+ return;
35380
+ return checkProject(project);
35381
+ }
35382
+ function resolveProject(flag, projectFile) {
35383
+ if (flag !== undefined)
35384
+ return checkProject(flag);
35385
+ const fromFile = parseDevopsProject(projectFile);
35386
+ if (fromFile !== undefined)
35387
+ return fromFile;
35388
+ throw new UsageError("No DevOps project named for this run", hint);
35389
+ }
35390
+ var sorted = (values) => [...values].sort();
35391
+ var SELECT_KINDS = { tag: "anyTags", package: "packages", suite: "packages", file: "packages" };
35392
+ function parseSelect(values) {
35393
+ if (!values.length)
35394
+ return;
35395
+ const tags = [], packages = [];
35396
+ for (const raw of values) {
35397
+ const at = raw.indexOf(":");
35398
+ const kind = at < 0 ? "tag" : raw.slice(0, at).trim().toLowerCase();
35399
+ const value = (at < 0 ? raw : raw.slice(at + 1)).trim();
35400
+ const kinds = Object.keys(SELECT_KINDS).join(", ");
35401
+ if (!value)
35402
+ throw new UsageError(`--select ${raw} names no value`, `Use --select <kind>:<value>, or a bare tag name; kinds are ${kinds}.`);
35403
+ if (!Object.hasOwn(SELECT_KINDS, kind))
35404
+ throw new UsageError(`--select ${raw}: unknown kind "${kind}"`, `Use one of: ${kinds}.`);
35405
+ (SELECT_KINDS[kind] === "anyTags" ? tags : packages).push(value);
35406
+ }
35407
+ return { ...tags.length ? { anyTags: sorted(tags) } : {}, ...packages.length ? { packages: sorted(packages) } : {} };
35408
+ }
35409
+ function parseRepeat(value) {
35410
+ if (value === undefined)
35411
+ return 1;
35412
+ const n = typeof value === "string" && value.trim() ? Number(value) : NaN;
35413
+ if (!Number.isSafeInteger(n) || n < 1)
35414
+ throw new UsageError("--repeat must be an integer of at least 1");
35415
+ return n;
35416
+ }
35417
+ function requireRemote(remote) {
35418
+ if (!remote)
35419
+ throw new UsageError("Only remote test runs are available", "Add --remote to run the selected cases on the Praxis cloud executor.");
35420
+ }
35421
+ function requestIdFor(input) {
35422
+ const selector = input.selector === undefined ? null : {
35423
+ sizes: sorted(input.selector.sizes ?? []),
35424
+ anyTags: sorted(input.selector.anyTags ?? []),
35425
+ packages: sorted(input.selector.packages ?? []),
35426
+ cases: sorted(input.selector.cases ?? [])
35427
+ };
35428
+ const material = JSON.stringify(["devops-test-run", input.project, input.commit, input.repeat, selector]);
35429
+ return `req_${createHash2("sha256").update(material).digest("hex").slice(0, 32)}`;
35430
+ }
35431
+ var isTerminal = (state) => state === "finished";
35432
+ function shortSha(commit) {
35433
+ return commit.slice(0, 7);
35434
+ }
35435
+ function headBranch(output) {
35436
+ const name = output.trim();
35437
+ return !name || name === "HEAD" ? undefined : name;
35438
+ }
35439
+ function requirePushed(remoteContains, commit, branch) {
35440
+ if (remoteContains.trim())
35441
+ return;
35442
+ 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.`);
35443
+ }
35444
+ function dirtyNotice(status, commit) {
35445
+ const files = status.split(`
35446
+ `).filter((line) => line.trim()).length;
35447
+ if (files === 0)
35448
+ return;
35449
+ return `Warning: ${files} uncommitted change${files === 1 ? "" : "s"}; the run tests the pushed commit ${shortSha(commit)}, not this working tree.`;
35450
+ }
35451
+ function exitCodeFor(result) {
35452
+ return result === "passed" || result === "pending" ? 0 : 1;
35453
+ }
35454
+ var wantsFailures = (result) => result !== "passed" && result !== "pending";
35455
+ function failedList(items, nextPageToken2, url) {
35456
+ const shown = items.slice(0, FAILURE_LIMIT);
35457
+ if (items.length <= FAILURE_LIMIT && !nextPageToken2)
35458
+ return { shown };
35459
+ return { shown, hint: `Showing ${FAILURE_LIMIT} of the failed cases; the run page lists them all: ${url}` };
35460
+ }
35461
+ var CONSOLE = { develop: "https://console-develop.deepraxis.com", production: "https://console.deepraxis.com" };
35462
+ function runUrl(env, project, id, viewerUrl) {
35463
+ return viewerUrl?.trim() || `${CONSOLE[env]}/devops/projects/${project}/test-runs/${id}`;
35464
+ }
35465
+
35466
+ // src/commands/devops.ts
35467
+ async function projectFile(cwd, ports) {
35468
+ let text;
35469
+ try {
35470
+ text = await ports.readFile(join4(cwd, "praxis.jsonc"));
35471
+ } catch (error) {
35472
+ if (error.code === "ENOENT")
35473
+ return;
35474
+ throw error;
35475
+ }
35476
+ try {
35477
+ return parseJsonc(text);
35478
+ } catch (error) {
35479
+ throw new UsageError(`praxis.jsonc is not valid JSONC: ${error.message}`);
35480
+ }
35481
+ }
35482
+ var COUNT_ORDER = ["passed", "failed", "flaky", "skipped", "pending", "other"];
35483
+ var countLine = (counts) => COUNT_ORDER.filter((key) => counts?.[key]).map((key) => `${counts[key]} ${key}`).join(", ") || "no counts reported";
35484
+ async function devopsTestRun(args, connect, env, ports) {
35485
+ requireRemote(args.remote);
35486
+ const project = resolveProject(args.project, await projectFile(ports.cwd, ports));
35487
+ const selector = parseSelect(args.select ?? []);
35488
+ const repeat = parseRepeat(args.repeat);
35489
+ const git = async (gitArgs) => (await ports.git(gitArgs, ports.cwd)).output;
35490
+ const commit = (await git(["rev-parse", "HEAD"])).trim();
35491
+ if (!commit)
35492
+ throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
35493
+ const branch = headBranch(await git(["rev-parse", "--abbrev-ref", "HEAD"]));
35494
+ requirePushed(await git(["branch", "-r", "--contains", "HEAD"]), commit, branch);
35495
+ const notice = dirtyNotice(await git(["status", "--porcelain"]), commit);
35496
+ if (notice)
35497
+ ports.emit({ kind: "message", channel: "stderr", text: notice });
35498
+ const client2 = await connect();
35499
+ const requestId = requestIdFor({ project, commit, selector, repeat });
35500
+ let run = await client2.devops.projects.testRuns.create({ path: { project }, body: { ref: { ...branch ? { branch } : {}, commit }, ...selector ? { selector } : {}, repeat, executor: "cloud", requestId } });
35501
+ while (args.wait && !isTerminal(run.state)) {
35502
+ await ports.wait(POLL_MS);
35503
+ run = await client2.devops.testRuns.retrieve({ path: { id: run.id } });
35504
+ }
35505
+ const url = runUrl(env, project, run.id, run.viewerUrl);
35506
+ let failures = [], failureHint;
35507
+ if (wantsFailures(run.result)) {
35508
+ const page = await client2.devops.testRuns.executions.list({ path: { run: run.id }, query: { pageSize: FAILURE_LIMIT, filter: "result=failed" } });
35509
+ ({ shown: failures, hint: failureHint } = failedList(page.items, page.nextPageToken, url));
35510
+ }
35511
+ const data = {
35512
+ id: run.id,
35513
+ url,
35514
+ project,
35515
+ state: run.state,
35516
+ result: run.result,
35517
+ repeat,
35518
+ commit,
35519
+ ...branch ? { branch } : {},
35520
+ selected: run.selection?.selectedCount ?? null,
35521
+ counts: run.counts ?? null,
35522
+ request_id: requestId,
35523
+ failures: failures.map((execution) => ({ case: execution.case, title: execution.title, package: execution.package ?? null, status: execution.status })),
35524
+ ...failureHint ? { failures_hint: failureHint } : {}
35525
+ };
35526
+ ports.emit({ kind: "object", data });
35527
+ ports.human([
35528
+ `${run.result} — ${project} @ ${commit.slice(0, 7)}${branch ? ` (${branch})` : ""}`,
35529
+ `state ${run.state}, ${countLine(run.counts)}`,
35530
+ url,
35531
+ ...failures.map((execution) => ` failed ${execution.title}`),
35532
+ ...failureHint ? [failureHint] : []
35533
+ ].join(`
35534
+ `));
35535
+ return exitCodeFor(run.result);
35536
+ }
35537
+
32834
35538
  // src/main.ts
32835
35539
  import { spawnSync } from "node:child_process";
32836
35540
 
@@ -33129,9 +35833,11 @@ function renderHuman(result, ctx) {
33129
35833
  const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
33130
35834
  const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
33131
35835
  ` : "";
35836
+ const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
35837
+ `).join("");
33132
35838
  return { stderr: err.red(`✗ ${plain(result.message)}`) + `
33133
35839
  ` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
33134
- ` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
35840
+ ` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
33135
35841
  ` : "") };
33136
35842
  }
33137
35843
  case "list":
@@ -33219,8 +35925,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
33219
35925
  }
33220
35926
 
33221
35927
  // src/output/render.ts
35928
+ var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
35929
+ function serverProblem(raw) {
35930
+ const value = record(raw);
35931
+ const problem = {};
35932
+ for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
35933
+ const entry = value[member];
35934
+ if (entry !== undefined && entry !== null)
35935
+ problem[member] = entry;
35936
+ }
35937
+ const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
35938
+ return adds ? problem : undefined;
35939
+ }
35940
+ function problemLines(problem) {
35941
+ const lines = [];
35942
+ for (const group of [problem?.errors, problem?.violations]) {
35943
+ for (const item of Array.isArray(group) ? group : []) {
35944
+ const entry = record(item);
35945
+ const where = scalar(entry.pointer ?? entry.field);
35946
+ const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
35947
+ if (where || detail)
35948
+ lines.push(`${where ? `${where}: ` : ""}${detail}`);
35949
+ }
35950
+ }
35951
+ return lines;
35952
+ }
33222
35953
  function errorJSON(result, ctx) {
33223
- 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 } : {} } }) + `
35954
+ 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 } : {} } }) + `
33224
35955
  `;
33225
35956
  }
33226
35957
  function render(result, ctx) {
@@ -33376,6 +36107,8 @@ function errorInput(error, ctx) {
33376
36107
  const raw = record(sdk?.raw), nested = record(raw.error);
33377
36108
  const candidate = nested.details ?? raw.details;
33378
36109
  const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
36110
+ const problem = serverProblem(Object.keys(nested).length ? nested : raw);
36111
+ const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
33379
36112
  let message = error instanceof Error ? error.message : "Unexpected error";
33380
36113
  const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
33381
36114
  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");
@@ -33387,22 +36120,25 @@ function errorInput(error, ctx) {
33387
36120
  if (stripped)
33388
36121
  message = `${humanize(code)}${message ? `: ${message}` : ""}`;
33389
36122
  const status = sdk?.status, request_id = sdk?.requestId;
36123
+ message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
33390
36124
  const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
33391
36125
  const source = ctx.credentialSource ?? "login";
33392
- let hint = genericHint;
36126
+ let hint2 = genericHint;
33393
36127
  if (error instanceof UsageError)
33394
- hint = error.hint;
36128
+ hint2 = error.hint;
36129
+ else if (serverText(problem?.hint))
36130
+ hint2 = serverText(problem?.hint);
33395
36131
  else if (authFailure)
33396
- hint = authHint(source);
36132
+ hint2 = authHint(source);
33397
36133
  else if (status === 404)
33398
- hint = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
36134
+ hint2 = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
33399
36135
  else if (status === 403)
33400
- hint = "Check that your account or API key has permission to access this resource.";
36136
+ hint2 = "Check that your account or API key has permission to access this resource.";
33401
36137
  else if (status === 429)
33402
- hint = "Rate limited; retry later.";
36138
+ hint2 = "Rate limited; retry later.";
33403
36139
  else if (status !== undefined && status >= 500)
33404
- hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
33405
- return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
36140
+ hint2 = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
36141
+ 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 } : {} };
33406
36142
  }
33407
36143
 
33408
36144
  // src/output/progress.ts
@@ -33432,7 +36168,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
33432
36168
  }
33433
36169
 
33434
36170
  // src/main.ts
33435
- var version = "0.2.1-dev.bb2d647";
36171
+ var version = "0.2.1-dev.bbfaae8";
33436
36172
  var commands = commandTree(operations);
33437
36173
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
33438
36174
  function route(argv) {
@@ -33517,7 +36253,14 @@ var defaults = {
33517
36253
  var appOptions = {
33518
36254
  "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." }],
33519
36255
  "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." }],
33520
- "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)." }]
36256
+ "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)." }],
36257
+ "devops test run": [
36258
+ { name: "project", type: "string", description: "DevOps project id (dvp_…); default: the devops.project field of praxis.jsonc in the current directory." },
36259
+ { name: "remote", type: "boolean", description: "Run the cases on the Praxis cloud executor. Required; local execution does not exist yet." },
36260
+ { name: "no-wait", type: "boolean", description: "Return as soon as the run exists instead of waiting for a verdict." },
36261
+ { name: "repeat", type: "string", description: "How many times each selected case runs (default: 1)." },
36262
+ { 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>." }
36263
+ ]
33521
36264
  };
33522
36265
  async function main(argv, injected = {}) {
33523
36266
  const ports = { ...defaults, ...injected };
@@ -33650,7 +36393,7 @@ Examples:
33650
36393
  let owner = client2;
33651
36394
  for (const part of op.resource.split("."))
33652
36395
  owner = owner[part];
33653
- const result = await owner[op.method](opts);
36396
+ let result = await owner[op.method](opts);
33654
36397
  const name2 = `${op.resource}.${op.method}`;
33655
36398
  const list = (items) => {
33656
36399
  const view = clientList(items, op, flags.limit, ctx.mode);
@@ -33664,7 +36407,21 @@ Examples:
33664
36407
  const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
33665
36408
  if (typeof cursor === "string" && cursor)
33666
36409
  ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
33667
- if (result instanceof Page) {
36410
+ const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
36411
+ const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
36412
+ if (flags.all && !(result instanceof Page) && token && !firstPage)
36413
+ throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
36414
+ if (firstPage) {
36415
+ const items = [...firstPage.items];
36416
+ const seen = new Set;
36417
+ for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
36418
+ seen.add(next);
36419
+ result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
36420
+ items.push(...pageOf(result)?.items ?? []);
36421
+ }
36422
+ ctx.nextCommand = undefined;
36423
+ emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
36424
+ } else if (result instanceof Page) {
33668
36425
  if (flags.all) {
33669
36426
  const items = [];
33670
36427
  for await (const item of result)
@@ -33738,6 +36495,26 @@ Examples:
33738
36495
  await appRollback({ dir, to: parsed.flags.to?.[0] }, client2, appPorts);
33739
36496
  break;
33740
36497
  }
36498
+ case "devops test run": {
36499
+ return await devopsTestRun({
36500
+ project: parsed.flags.project?.[0],
36501
+ remote: Boolean(parsed.flags.remote),
36502
+ wait: !parsed.flags["no-wait"],
36503
+ repeat: parsed.flags.repeat?.[0],
36504
+ select: parsed.flags.select
36505
+ }, async () => await auth.client(org), config.env, {
36506
+ git: (args, cwd) => ports.spawnCapture("git", args, { cwd }),
36507
+ readFile: ports.readFile,
36508
+ wait: ports.wait,
36509
+ mode: ctx.mode,
36510
+ emit,
36511
+ human: (text) => {
36512
+ if (ctx.mode === "human")
36513
+ emit({ kind: "message", channel: "stdout", text });
36514
+ },
36515
+ cwd: ports.cwd
36516
+ });
36517
+ }
33741
36518
  case "api": {
33742
36519
  const method = parsed.positional[0];
33743
36520
  if (!HTTP_METHOD.test(method))
@@ -33760,7 +36537,7 @@ Examples:
33760
36537
  }
33761
36538
  }
33762
36539
  if (true)
33763
- process.exit(await main(process.argv.slice(2)));
36540
+ process.exitCode = await main(process.argv.slice(2));
33764
36541
  export {
33765
36542
  main
33766
36543
  };