@deepraxis/cli 0.2.1-dev.2cec3b3 → 0.2.1-dev.2d26f96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/COMMANDS.md +23 -1
  2. package/dist/praxis.js +1338 -21
  3. package/package.json +1 -1
package/dist/praxis.js CHANGED
@@ -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",
@@ -10167,7 +10198,7 @@ Execution errors include error.details.prints containing output printed before f
10167
10198
  name: "loudness",
10168
10199
  type: "object",
10169
10200
  required: false,
10170
- description: "Optional loudness normalization target; normalization adds analysis and rendering work."
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."
10171
10202
  }
10172
10203
  ]
10173
10204
  }
@@ -10250,6 +10281,57 @@ Execution errors include error.details.prints containing output printed before f
10250
10281
  ]
10251
10282
  }
10252
10283
  },
10284
+ {
10285
+ resource: "cut.projects.renders",
10286
+ method: "create",
10287
+ summary: "Create draft range render",
10288
+ description: "Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration, and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.",
10289
+ http: "POST",
10290
+ path: "/cut/v1/projects/{project_id}/renders",
10291
+ streaming: "no",
10292
+ pagination: false,
10293
+ pathParams: [
10294
+ {
10295
+ name: "project_id",
10296
+ sdkName: "project_id",
10297
+ description: "Project identifier returned by its create or list operation; use the id, not a display name."
10298
+ }
10299
+ ],
10300
+ query: [],
10301
+ body: {
10302
+ required: true,
10303
+ fields: [
10304
+ {
10305
+ name: "kind",
10306
+ type: "string",
10307
+ enum: [
10308
+ "audio",
10309
+ "video"
10310
+ ],
10311
+ required: true,
10312
+ description: "audio renders the mixed soundtrack alone as an .m4a file for listening; video renders a draft-quality .mp4 with picture and sound for looking at. An audio draft is the cheaper of the two and is what a loudness or mix measurement asks for."
10313
+ },
10314
+ {
10315
+ name: "from",
10316
+ type: "number",
10317
+ required: true,
10318
+ description: "Start of the interval in seconds on the project clock, inclusive. Must be less than to."
10319
+ },
10320
+ {
10321
+ name: "to",
10322
+ type: "number",
10323
+ required: true,
10324
+ description: "End of the interval in seconds on the project clock, exclusive. At most 120 seconds after from, and never beyond the timeline duration; a longer passage is requested as several ranges."
10325
+ },
10326
+ {
10327
+ name: "revision",
10328
+ type: "integer",
10329
+ required: false,
10330
+ description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
10331
+ }
10332
+ ]
10333
+ }
10334
+ },
10253
10335
  {
10254
10336
  resource: "cut.projects",
10255
10337
  method: "retrieveState",
@@ -10391,7 +10473,158 @@ Execution errors include error.details.prints containing output printed before f
10391
10473
  resource: "cut.projects",
10392
10474
  method: "execute",
10393
10475
  summary: "Execute editing script",
10394
- 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[];\nListEffects(): EffectInfo[];\nListTextStyles(): TextStylePreset[];\nListTextTemplates(): TextTemplate[];\nListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];\nListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number | { curve: { at: number; rate: number; ease?: Ease }[]; audio?: "mute" | "resample" }, 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; role?: "voice" | "music" | "sfx" }, 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> & { preset?: string }; maxChars?: number }): ClipId[];\nInsertTemplate(track: TrackId, o: { template: string; start: number; slots?: Record<string, string> }): ClipId[];\nAlignCaptions(trackId: TrackId, script: string, options?: { resplit?: boolean; maxChars?: number }): { replaced: number; added: number; deleted: number };\nImportCaptions(trackId: TrackId, text: string, o?: { format?: "srt" | "vtt"; offset?: number }): ClipId[];\nExportCaptions(trackId: TrackId, o: { format: "srt" | "vtt" }): string;\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, effects, blend and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |\n| ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |\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| ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |\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. A `{curve: [{at, rate, ease?}, ...], audio?: "mute" | "resample"}` rate is forward-only and holds output duration fixed; pitch preservation is unavailable. Scalar rates: source preserves consumed source and changes length; duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |\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, audio role (`voice`, `music`, `sfx`) 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| ImportCaptions, ExportCaptions | Import SRT or WebVTT text onto a caption track and export it back. format is inferred from a WEBVTT header when omitted. offset shifts imported cues in seconds. Import rejects more than 100000 bytes, more than 5000 cues, malformed or overlapping file cues with INVALID_CAPTION_FILE; overlap with existing timeline clips uses the normal OVERLAP rejection. Export sorts by timeline start and writes millisecond timecodes. |\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 catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o\'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. 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, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| image | media, length | transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| text | text, length | style, transform, blend, reveal, animate, animation, effects, mask, transitionIn, transitionOut |\n| color | color, length | transform, fill, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, gain, fadeIn, fadeOut, duck |\n| caption | text, length | — |\n\nVisual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.\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, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |\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| animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |\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#### Visual effects\n\n`effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Entries include blur, color adjustment, vignette, film grain, chromatic aberration, pixelate, glitch, shake, flash, light leak and built-in `lut` looks; user `.cube` LUTs are not supported. `speed` is cycles per second. Effects run on CPU during export and increase render time. Parameters are discovered with ListEffects(). Catalog entries expose their own parameters through ListEffects(), including `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.\n\nNumeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter\'s catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.\n\n`blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.\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, duck, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend, mask, gain. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.\n\n#### Animation presets\n\nDiscover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.\n\nPresets replace the clip\'s existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.\n\nErrors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.\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',
10476
+ description: `Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: \`const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);\`
10477
+
10478
+ <!-- cut-reference:start -->
10479
+ ### Script function, field and error reference
10480
+
10481
+ Every script function, clip field and error code has its own section, read one at a time:
10482
+
10483
+ \`\`\`
10484
+ codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
10485
+ codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
10486
+ codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
10487
+ codemode.describe("praxis.cut.script") // names, one page at a time
10488
+ \`\`\`
10489
+
10490
+ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
10491
+
10492
+ #### Script functions (script)
10493
+
10494
+ - \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
10495
+ - \`GetItem\` — One clip's compact view, by id.
10496
+ - \`FindItems\` — Visit every clip with its track; collect results.
10497
+ - \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
10498
+ - \`GetTranscript\` — Transcript words in source microseconds.
10499
+ - \`GetAnalysis\` — Silence, filler or scene segments.
10500
+ - \`ListTransitions\` — Join transition kinds and parameters.
10501
+ - \`ListEffects\` — Visual-effect catalog and parameters.
10502
+ - \`ListAnimations\` — Animation presets by phase and target.
10503
+ - \`ListFonts\` — Font families, weights and scripts.
10504
+ - \`ListTextStyles\` — Text style presets for \`style.preset\`.
10505
+ - \`ListTextTemplates\` — Multi-layer templates and their slots.
10506
+ - \`Insert\` — Add a clip; a track never overlaps itself.
10507
+ - \`Append\` — Add a clip at the end of a track.
10508
+ - \`Update\` — Change named fields; the rest stay.
10509
+ - \`SetSpeed\` — Change rate, keeping source or duration.
10510
+ - \`Delete\` — Remove a clip. There is no \`Remove\`.
10511
+ - \`Join\` — Overlap clips; followers shift, track shortens.
10512
+ - \`UpdateJoin\` — Change a join's length or effect.
10513
+ - \`DeleteJoin\` — Remove a join; restore the butt cut.
10514
+ - \`Split\` — Cut a clip in two at a time.
10515
+ - \`Trim\` — Move one clip edge by seconds.
10516
+ - \`Move\` — Set a clip's start or track.
10517
+ - \`RippleDeleteRange\` — Cut a time range and close the gap.
10518
+ - \`AddTrack\` — Add a video, audio or caption track.
10519
+ - \`UpdateTrack\` — Change a track's name, lock, gain or role.
10520
+ - \`DeleteTrack\` — Remove a track and its clips.
10521
+ - \`SetSettings\` — Change canvas, frame rate or background.
10522
+ - \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
10523
+ - \`InsertTemplate\` — Insert a template and fill its slots.
10524
+ - \`AlignCaptions\` — Rebuild captions from text punctuation.
10525
+ - \`ImportCaptions\` — Import SRT or WebVTT onto captions.
10526
+ - \`ExportCaptions\` — Export captions as SRT or WebVTT.
10527
+ - \`SetMarker\` — Label a timeline position.
10528
+ - \`Print\` — Append values to the result's \`prints\`.
10529
+ - \`Preview\` — Up to 8 frames as inline PNG data URLs.
10530
+
10531
+ #### Fields (fields)
10532
+
10533
+ - \`type\` — Clip kind; decides which fields apply.
10534
+ - \`start\` — Clip start in seconds; snaps to frames.
10535
+ - \`length\` — Duration; optional for video and audio.
10536
+ - \`media\` — Source \`{ libraryId, assetId }\`.
10537
+ - \`sourceIn\` — First source second kept; default 0.
10538
+ - \`sourceOut\` — Exclusive source end; read-only.
10539
+ - \`text\` — Text of a text or caption clip.
10540
+ - \`color\` — Solid colour of a color clip.
10541
+ - \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
10542
+ - \`width\` — Shape width, a fraction of canvas width.
10543
+ - \`height\` — Shape height, a fraction of canvas height.
10544
+ - \`radius\` — Rect corner rounding, in 1080-height px.
10545
+ - \`fill\` — Shape or text paint: colour or gradient.
10546
+ - \`stroke\` — Shape outline: colour and width.
10547
+ - \`transform\` — Position, scale, rotation, opacity, crop, blur.
10548
+ - \`fit\` — contain, cover, fill or none.
10549
+ - \`blend\` — Layer blend mode; null clears.
10550
+ - \`style\` — Text styling: font, fill, strokes, glow, position.
10551
+ - \`style.position\` — top, middle or bottom; omit it, never null.
10552
+ - \`playback\` — Rate, direction, audio policy, or freeze.
10553
+ - \`volumeDb\` — Audio level in dB; 0 is source level.
10554
+ - \`gain\` — Keyframed audio level in dB.
10555
+ - \`fadeIn\` — Fade-in seconds at the clip's start.
10556
+ - \`fadeOut\` — Fade-out seconds at the clip's end.
10557
+ - \`duck\` — Lower this clip while another track plays.
10558
+ - \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
10559
+ - \`reveal\` — Per-character, word or line reveal timing.
10560
+ - \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
10561
+ - \`effects\` — Effect stack, at most 8; null clears.
10562
+ - \`transitionIn\` — Entrance effect: kind plus seconds.
10563
+ - \`transitionOut\` — Exit effect: kind plus seconds.
10564
+ - \`mask\` — Shape, path or track matte.
10565
+ - \`words\` — Caption words with clip-local times.
10566
+
10567
+ #### Error codes (errors)
10568
+
10569
+ - \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
10570
+ - \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
10571
+ - \`INVALID_STYLE\` — A style value is out of range.
10572
+ - \`INVALID_MASK\` — A mask definition is malformed.
10573
+ - \`MASK_IN_USE\` — The edit would break a live mask.
10574
+ - \`TOO_MANY_MASKS\` — At most 16 masks per project.
10575
+ - \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
10576
+ - \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
10577
+ - \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
10578
+ - \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
10579
+ - \`UNKNOWN_FIELD\` — The field name is not accepted here.
10580
+ - \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
10581
+ - \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
10582
+ - \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
10583
+ - \`OVERLAP\` — Two clips on one track would share time.
10584
+ - \`OUT_OF_SOURCE\` — The clip would read past its source.
10585
+ - \`LOCKED_TRACK\` — The edit targets a locked track.
10586
+ - \`UNBOUND_LIBRARY\` — The library is not bound to the project.
10587
+ - \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
10588
+ - \`NOT_FOUND\` — The named id is not in this project.
10589
+ - \`TOO_SHORT\` — The result would be under one frame.
10590
+ - \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
10591
+ - \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
10592
+ - \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
10593
+ - \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
10594
+ - \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
10595
+ - \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
10596
+ - \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
10597
+ - \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
10598
+ - \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
10599
+ - \`PROJECT_NOT_FOUND\` — No visible project has this id.
10600
+ - \`EXPORT_NOT_FOUND\` — No such export in this project.
10601
+ - \`VERSION_NOT_FOUND\` — No saved version has this revision.
10602
+ - \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
10603
+ - \`BINDING_INVALID\` — The binding request is malformed.
10604
+ - \`BINDING_IN_USE\` — Clips still use this library's assets.
10605
+ - \`NOTHING_TO_UNDO\` — No earlier revision to return to.
10606
+ - \`NOTHING_TO_REDO\` — No undone revision is waiting.
10607
+ - \`UNDO_CONFLICT\` — The revision to undo is no longer head.
10608
+ - \`REVISION_CONFLICT\` — The project moved; your revision is stale.
10609
+ - \`CUT_BUSY\` — The project is busy; retry.
10610
+ - \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
10611
+ - \`SCRIPT_ERROR\` — The script threw or did not parse.
10612
+ - \`SCRIPT_LIMIT\` — An execute budget was exceeded.
10613
+ - \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
10614
+ - \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
10615
+ - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
10616
+ - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
10617
+ - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
10618
+ - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
10619
+ - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
10620
+ - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
10621
+ - \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
10622
+ - \`INVALID_PARAMS\` — The request is malformed.
10623
+ - \`PERMISSION_DENIED\` — This credential may not do that here.
10624
+ - \`NOT_IMPLEMENTED\` — Not available on this platform yet.
10625
+ - \`INTERNAL\` — Unexpected failure; retry with the request id.
10626
+ <!-- cut-reference:end -->
10627
+ `,
10395
10628
  http: "POST",
10396
10629
  path: "/cut/v1/projects/{project_id}:execute",
10397
10630
  streaming: "no",
@@ -10453,6 +10686,24 @@ Execution errors include error.details.prints containing output printed before f
10453
10686
  ],
10454
10687
  query: []
10455
10688
  },
10689
+ {
10690
+ resource: "cut.renders",
10691
+ method: "retrieve",
10692
+ summary: "Retrieve draft range render",
10693
+ description: "Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.",
10694
+ http: "GET",
10695
+ path: "/cut/v1/renders/{render_id}",
10696
+ streaming: "no",
10697
+ pagination: false,
10698
+ pathParams: [
10699
+ {
10700
+ name: "render_id",
10701
+ sdkName: "render_id",
10702
+ description: "Draft render id (cutr_…) returned by projects.renders.create."
10703
+ }
10704
+ ],
10705
+ query: []
10706
+ },
10456
10707
  {
10457
10708
  resource: "cut.versions",
10458
10709
  method: "restore",
@@ -11425,6 +11676,696 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11425
11676
  ]
11426
11677
  }
11427
11678
  },
11679
+ {
11680
+ resource: "devops.projects.testCases",
11681
+ method: "list",
11682
+ summary: "List test cases",
11683
+ description: "List a project's cases with their health, state and recent statistics, so you can decide which ones a plan must run and which are quarantined. This is the read a test dashboard is built on; filter it to narrow by state or health instead of paging through everything. A case's id is a fingerprint of its own title and path, so it survives a rename — read aliases when reconciling history recorded under an older title.",
11684
+ http: "GET",
11685
+ path: "/devops/v1/projects/{project}/test-cases",
11686
+ streaming: "no",
11687
+ pagination: false,
11688
+ pathParams: [
11689
+ {
11690
+ name: "project",
11691
+ sdkName: "project",
11692
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11693
+ }
11694
+ ],
11695
+ query: [
11696
+ {
11697
+ name: "pageSize",
11698
+ type: "integer",
11699
+ required: false,
11700
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11701
+ },
11702
+ {
11703
+ name: "pageToken",
11704
+ type: "string",
11705
+ required: false,
11706
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11707
+ },
11708
+ {
11709
+ name: "filter",
11710
+ type: "string",
11711
+ required: false,
11712
+ description: "AIP-160 equality filter over one declared field at a time, for example state=quarantined or health=broken. Fields a case list does not declare are refused with INVALID_ARGUMENT rather than ignored, so a typo never silently widens the result."
11713
+ },
11714
+ {
11715
+ name: "orderBy",
11716
+ type: "string",
11717
+ required: false,
11718
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11719
+ }
11720
+ ]
11721
+ },
11722
+ {
11723
+ resource: "devops.projects",
11724
+ method: "retrieveTestCatalog",
11725
+ summary: "Read a commit's test catalog",
11726
+ description: 'Read the catalog version discovered at one commit — how many suites and cases it holds, which frameworks they come from, and how the commit changed them. Call this first: it tells you which suites, cases and sizes exist before you list them or select them into a plan, and the reported diff explains why a case count moved. A commit whose discovery has not finished answers CATALOG_NOT_READY, which means "not yet", not "no tests"; wait and read again. Omit commit to read the newest catalog published for the project.',
11727
+ http: "GET",
11728
+ path: "/devops/v1/projects/{project}/test-catalog",
11729
+ streaming: "no",
11730
+ pagination: false,
11731
+ pathParams: [
11732
+ {
11733
+ name: "project",
11734
+ sdkName: "project",
11735
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11736
+ }
11737
+ ],
11738
+ query: [
11739
+ {
11740
+ name: "commit",
11741
+ type: "string",
11742
+ required: false,
11743
+ description: "Full 40-character commit sha whose catalog you want, from a project branch or commit read. Omit it to read the newest catalog published for the project."
11744
+ }
11745
+ ]
11746
+ },
11747
+ {
11748
+ resource: "devops.projects.testPlans",
11749
+ method: "list",
11750
+ summary: "List test plans",
11751
+ description: "List the project's plans — what each one selects, which stage and gate it belongs to, and when it runs next. Read this before creating a plan, so a new plan extends what exists instead of duplicating a selector an existing plan already covers.",
11752
+ http: "GET",
11753
+ path: "/devops/v1/projects/{project}/test-plans",
11754
+ streaming: "no",
11755
+ pagination: false,
11756
+ pathParams: [
11757
+ {
11758
+ name: "project",
11759
+ sdkName: "project",
11760
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11761
+ }
11762
+ ],
11763
+ query: [
11764
+ {
11765
+ name: "pageSize",
11766
+ type: "integer",
11767
+ required: false,
11768
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11769
+ },
11770
+ {
11771
+ name: "pageToken",
11772
+ type: "string",
11773
+ required: false,
11774
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11775
+ },
11776
+ {
11777
+ name: "orderBy",
11778
+ type: "string",
11779
+ required: false,
11780
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11781
+ }
11782
+ ]
11783
+ },
11784
+ {
11785
+ resource: "devops.projects.testPlans",
11786
+ method: "create",
11787
+ summary: "Create a test plan",
11788
+ description: "Create a plan that decides which cases a stage must run. The plan's key is unique inside the project and is what a later run names; the selector chooses cases by size, purpose, tag, package or explicit ids, and the trigger says when the plan fires by itself. A merge or promotion gate must name the environment it guards, and a plan with a gate but no environment is refused with PLAN_GATE_ENVIRONMENT_MISMATCH rather than created and silently ignored. A plan has no revision history: update it with a patch.",
11789
+ http: "POST",
11790
+ path: "/devops/v1/projects/{project}/test-plans",
11791
+ streaming: "no",
11792
+ pagination: false,
11793
+ pathParams: [
11794
+ {
11795
+ name: "project",
11796
+ sdkName: "project",
11797
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11798
+ }
11799
+ ],
11800
+ query: [],
11801
+ body: {
11802
+ required: true,
11803
+ fields: [
11804
+ {
11805
+ name: "key",
11806
+ type: "string",
11807
+ required: true,
11808
+ description: "Short name for the plan, unique inside the project; a key already in use is refused rather than silently reused."
11809
+ },
11810
+ {
11811
+ name: "title",
11812
+ type: "string",
11813
+ required: true,
11814
+ description: "Display title of the plan, shown wherever the plan is listed."
11815
+ },
11816
+ {
11817
+ name: "stage",
11818
+ type: "string",
11819
+ enum: [
11820
+ "dev",
11821
+ "presubmit",
11822
+ "postsubmit",
11823
+ "nightly",
11824
+ "production"
11825
+ ],
11826
+ required: true,
11827
+ description: "Which stage of delivery this plan belongs to, which decides when it is expected to run."
11828
+ },
11829
+ {
11830
+ name: "trigger",
11831
+ type: "object",
11832
+ required: true,
11833
+ description: "What starts a run of this plan. Exactly one kind applies; the fields a kind needs are the ones it carries."
11834
+ },
11835
+ {
11836
+ name: "selector",
11837
+ type: "object",
11838
+ required: true,
11839
+ description: "Which cases a plan or run selects. Every member is optional and they combine as an intersection, so a selector with no member selects every case in the catalog."
11840
+ },
11841
+ {
11842
+ name: "environment",
11843
+ type: "string",
11844
+ required: false,
11845
+ description: "The environment this plan runs against; required by a merge or promotion gate, and refused with PLAN_GATE_ENVIRONMENT_MISMATCH when it disagrees with the gate."
11846
+ },
11847
+ {
11848
+ name: "gate",
11849
+ type: "string",
11850
+ enum: [
11851
+ "merge",
11852
+ "promotion",
11853
+ "observation",
11854
+ "none"
11855
+ ],
11856
+ required: true,
11857
+ description: "Whether this plan's result blocks a stage; a merge or promotion gate must name its environment."
11858
+ },
11859
+ {
11860
+ name: "repeat",
11861
+ type: "integer",
11862
+ required: false,
11863
+ description: "How many times each selected case runs in one run; omit for once. More than one is how a flake is told apart from a real failure."
11864
+ },
11865
+ {
11866
+ name: "timeoutMinutes",
11867
+ type: "integer",
11868
+ required: false,
11869
+ description: "How many minutes a run of this plan may take before it is timed out; omit for the service's default."
11870
+ }
11871
+ ]
11872
+ }
11873
+ },
11874
+ {
11875
+ resource: "devops.projects.testReports",
11876
+ method: "create",
11877
+ summary: "Upload an external test report",
11878
+ description: "Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. The report is folded into the run named by ref and the run's counts and verdict are recomputed from it. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe; a different reportId for the same run adds its results. Pass the run you created with executor external — a report for a run that does not exist is NOT_FOUND, never silently recorded against another run.",
11879
+ http: "POST",
11880
+ path: "/devops/v1/projects/{project}/test-reports",
11881
+ streaming: "no",
11882
+ pagination: false,
11883
+ pathParams: [
11884
+ {
11885
+ name: "project",
11886
+ sdkName: "project",
11887
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11888
+ }
11889
+ ],
11890
+ query: [],
11891
+ body: {
11892
+ required: true,
11893
+ fields: [
11894
+ {
11895
+ name: "reportId",
11896
+ type: "string",
11897
+ required: true,
11898
+ description: "Your own identifier for this report. Uploading the same id again is idempotent and counts once, so a retry after a timeout is safe."
11899
+ },
11900
+ {
11901
+ name: "format",
11902
+ type: "string",
11903
+ enum: [
11904
+ "ctrf",
11905
+ "junit"
11906
+ ],
11907
+ required: true,
11908
+ description: "Which report format the document is in; it decides how the document is parsed."
11909
+ },
11910
+ {
11911
+ name: "ref",
11912
+ type: "object",
11913
+ required: true,
11914
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
11915
+ },
11916
+ {
11917
+ name: "report",
11918
+ type: "string",
11919
+ required: true,
11920
+ description: "The report document itself, as text — JSON for ctrf, XML for junit. Send the file's contents unchanged; a malformed document is refused with REPORT_INVALID and records nothing."
11921
+ }
11922
+ ]
11923
+ }
11924
+ },
11925
+ {
11926
+ resource: "devops.projects.testRuns",
11927
+ method: "list",
11928
+ summary: "List test runs",
11929
+ description: "List the project's runs newest first, with each run's state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit's tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.",
11930
+ http: "GET",
11931
+ path: "/devops/v1/projects/{project}/test-runs",
11932
+ streaming: "no",
11933
+ pagination: false,
11934
+ pathParams: [
11935
+ {
11936
+ name: "project",
11937
+ sdkName: "project",
11938
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11939
+ }
11940
+ ],
11941
+ query: [
11942
+ {
11943
+ name: "pageSize",
11944
+ type: "integer",
11945
+ required: false,
11946
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11947
+ },
11948
+ {
11949
+ name: "pageToken",
11950
+ type: "string",
11951
+ required: false,
11952
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11953
+ },
11954
+ {
11955
+ name: "filter",
11956
+ type: "string",
11957
+ required: false,
11958
+ description: "AIP-160 equality filter over one declared field, for example state=running or result=failed. An undeclared field is refused with INVALID_ARGUMENT; it is never ignored, so a mistyped filter cannot quietly return everything."
11959
+ },
11960
+ {
11961
+ name: "orderBy",
11962
+ type: "string",
11963
+ required: false,
11964
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11965
+ }
11966
+ ]
11967
+ },
11968
+ {
11969
+ resource: "devops.projects.testRuns",
11970
+ method: "create",
11971
+ summary: "Create a test run",
11972
+ description: "Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued returns as soon as the run exists, finished waits for a verdict and may take minutes. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.",
11973
+ http: "POST",
11974
+ path: "/devops/v1/projects/{project}/test-runs",
11975
+ streaming: "no",
11976
+ pagination: false,
11977
+ pathParams: [
11978
+ {
11979
+ name: "project",
11980
+ sdkName: "project",
11981
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11982
+ }
11983
+ ],
11984
+ query: [],
11985
+ body: {
11986
+ required: true,
11987
+ fields: [
11988
+ {
11989
+ name: "ref",
11990
+ type: "object",
11991
+ required: true,
11992
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
11993
+ },
11994
+ {
11995
+ name: "plan",
11996
+ type: "string",
11997
+ required: false,
11998
+ description: "Plan whose selector this run uses; omit it when passing selector instead. Naming a plan records the run against that plan, which is what a gate reads."
11999
+ },
12000
+ {
12001
+ name: "selector",
12002
+ type: "object",
12003
+ required: false,
12004
+ description: "An ad-hoc selector for this run alone, used instead of a plan's; it is not saved as a plan, so a run you want to repeat should name a plan."
12005
+ },
12006
+ {
12007
+ name: "environment",
12008
+ type: "string",
12009
+ required: false,
12010
+ description: "Environment to run against; it decides whether production-only cases become selectable. Omit it for a run that needs no environment."
12011
+ },
12012
+ {
12013
+ name: "repeat",
12014
+ type: "integer",
12015
+ required: false,
12016
+ description: "How many times each selected case runs, which is how a flake is told apart from a real failure; omit for once."
12017
+ },
12018
+ {
12019
+ name: "waitUntil",
12020
+ type: "string",
12021
+ enum: [
12022
+ "queued",
12023
+ "started",
12024
+ "finished"
12025
+ ],
12026
+ required: false,
12027
+ description: "How far the call waits before answering — queued returns at once, started waits for execution to begin, finished waits for a verdict and may take minutes."
12028
+ },
12029
+ {
12030
+ name: "executor",
12031
+ type: "string",
12032
+ enum: [
12033
+ "cloud",
12034
+ "external"
12035
+ ],
12036
+ required: false,
12037
+ description: "Who carries the run out. cloud, the default, runs the selected cases in Praxis at the commit; external creates a run that waits for your own CI to upload a report with test-reports."
12038
+ },
12039
+ {
12040
+ name: "requestId",
12041
+ type: "string",
12042
+ required: false,
12043
+ description: "A key you choose to make creating this run idempotent: repeating the call with the same requestId returns the run it created instead of starting another, so a retry after a timeout is safe."
12044
+ }
12045
+ ]
12046
+ }
12047
+ },
12048
+ {
12049
+ resource: "devops.projects.testSuites",
12050
+ method: "list",
12051
+ summary: "List test suites",
12052
+ description: "List the suites the project's newest catalog discovered — one suite per test file and framework pair, with its size, purposes and question count. Use it to find the suite id a case belongs to, or to see which files make up an area before selecting cases from them. Suites come from the catalog, so a file added in code appears only after its commit's catalog is published. Archived suites are returned too; they carry archived true and no case is ever silently dropped from the list.",
12053
+ http: "GET",
12054
+ path: "/devops/v1/projects/{project}/test-suites",
12055
+ streaming: "no",
12056
+ pagination: false,
12057
+ pathParams: [
12058
+ {
12059
+ name: "project",
12060
+ sdkName: "project",
12061
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
12062
+ }
12063
+ ],
12064
+ query: [
12065
+ {
12066
+ name: "pageSize",
12067
+ type: "integer",
12068
+ required: false,
12069
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
12070
+ },
12071
+ {
12072
+ name: "pageToken",
12073
+ type: "string",
12074
+ required: false,
12075
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12076
+ },
12077
+ {
12078
+ name: "orderBy",
12079
+ type: "string",
12080
+ required: false,
12081
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
12082
+ }
12083
+ ]
12084
+ },
12085
+ {
12086
+ resource: "devops.testCases",
12087
+ method: "retrieve",
12088
+ summary: "Retrieve a test case",
12089
+ description: "Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.",
12090
+ http: "GET",
12091
+ path: "/devops/v1/test-cases/{id}",
12092
+ streaming: "no",
12093
+ pagination: false,
12094
+ pathParams: [
12095
+ {
12096
+ name: "id",
12097
+ sdkName: "id",
12098
+ description: "The case identifier returned by a case list, or an older id listed in that case's aliases."
12099
+ }
12100
+ ],
12101
+ query: []
12102
+ },
12103
+ {
12104
+ resource: "devops.testPlans",
12105
+ method: "delete",
12106
+ summary: "Delete a test plan",
12107
+ description: "Delete a plan so it schedules nothing further. The plan stops firing immediately; runs it already produced keep their own record and are not deleted with it. To stop a plan temporarily and keep it for later, pause it instead — deleting cannot be undone and the plan's key becomes free for another plan to take.",
12108
+ http: "DELETE",
12109
+ path: "/devops/v1/test-plans/{id}",
12110
+ streaming: "no",
12111
+ pagination: false,
12112
+ pathParams: [
12113
+ {
12114
+ name: "id",
12115
+ sdkName: "id",
12116
+ description: "The plan identifier returned by a plan list or create answer."
12117
+ }
12118
+ ],
12119
+ query: []
12120
+ },
12121
+ {
12122
+ resource: "devops.testPlans",
12123
+ method: "retrieve",
12124
+ summary: "Retrieve a test plan",
12125
+ description: "Read one plan by the id a plan list returned, to see its selector, gate, repeat count, timeout and pause state before updating or deleting it. A paused plan carries the reason, the actor and the time it resumes, so a pause you did not set is explained here rather than guessed at.",
12126
+ http: "GET",
12127
+ path: "/devops/v1/test-plans/{id}",
12128
+ streaming: "no",
12129
+ pagination: false,
12130
+ pathParams: [
12131
+ {
12132
+ name: "id",
12133
+ sdkName: "id",
12134
+ description: "The plan identifier returned by a plan list or create answer."
12135
+ }
12136
+ ],
12137
+ query: []
12138
+ },
12139
+ {
12140
+ resource: "devops.testPlans",
12141
+ method: "update",
12142
+ summary: "Update a test plan",
12143
+ description: "Change a plan's title, trigger, selector, gate, repeat count, timeout or enabled flag. Only the fields present in the body are changed, so a body naming one field leaves the rest exactly as they were. Changing a selector does not create a version — the plan is not a published artefact, and runs already started keep the selection they were created with. Read the plan first to know what you are leaving unchanged.",
12144
+ http: "PATCH",
12145
+ path: "/devops/v1/test-plans/{id}",
12146
+ streaming: "no",
12147
+ pagination: false,
12148
+ pathParams: [
12149
+ {
12150
+ name: "id",
12151
+ sdkName: "id",
12152
+ description: "The plan identifier returned by a plan list or create answer."
12153
+ }
12154
+ ],
12155
+ query: [],
12156
+ body: {
12157
+ required: true,
12158
+ fields: [
12159
+ {
12160
+ name: "plan",
12161
+ type: "object",
12162
+ required: true,
12163
+ description: "The fields to change. Anything absent keeps its current value, so read the plan first if you need to know what you are leaving alone."
12164
+ },
12165
+ {
12166
+ name: "updateMask",
12167
+ type: "string",
12168
+ required: false,
12169
+ description: "Comma-separated names of the plan fields this patch intends to change, for example title,enabled. Omit it to apply every field present in plan; naming fields makes the intent explicit and keeps a concurrent edit from being overwritten by accident."
12170
+ }
12171
+ ]
12172
+ }
12173
+ },
12174
+ {
12175
+ resource: "devops.testPlans",
12176
+ method: "pause",
12177
+ summary: "Pause a test plan",
12178
+ description: "Stop a plan from starting new runs while keeping it and its history. A reason is required and is recorded on the plan, so the next reader learns why it stopped. Give until to resume automatically at a time; omit it to stay paused until someone resumes it. Runs already in flight are not cancelled — cancel those individually.",
12179
+ http: "POST",
12180
+ path: "/devops/v1/test-plans/{id}:pause",
12181
+ streaming: "no",
12182
+ pagination: false,
12183
+ pathParams: [
12184
+ {
12185
+ name: "id",
12186
+ sdkName: "id",
12187
+ description: "The plan identifier returned by a plan list or create answer."
12188
+ }
12189
+ ],
12190
+ query: [],
12191
+ body: {
12192
+ required: true,
12193
+ fields: [
12194
+ {
12195
+ name: "reason",
12196
+ type: "string",
12197
+ required: true,
12198
+ description: "Why the plan is being paused; it is stored on the plan and read by whoever finds it stopped."
12199
+ },
12200
+ {
12201
+ name: "until",
12202
+ type: "string",
12203
+ required: false,
12204
+ description: "RFC 3339 UTC time the plan resumes by itself; omit it to stay paused until someone resumes it."
12205
+ }
12206
+ ]
12207
+ }
12208
+ },
12209
+ {
12210
+ resource: "devops.testPlans",
12211
+ method: "resume",
12212
+ summary: "Resume a test plan",
12213
+ description: "Clear a plan's pause so it schedules runs again. Resuming an active plan changes nothing and is safe to repeat. The plan keeps its selector, gate and key; only the pause is removed.",
12214
+ http: "POST",
12215
+ path: "/devops/v1/test-plans/{id}:resume",
12216
+ streaming: "no",
12217
+ pagination: false,
12218
+ pathParams: [
12219
+ {
12220
+ name: "id",
12221
+ sdkName: "id",
12222
+ description: "The plan identifier returned by a plan list or create answer."
12223
+ }
12224
+ ],
12225
+ query: []
12226
+ },
12227
+ {
12228
+ resource: "devops.testRuns",
12229
+ method: "retrieve",
12230
+ summary: "Retrieve a test run",
12231
+ description: "Read one run's current state, result and counts, and ask for its failed executions inline with expand. Poll this after creating a run whose result was pending. A result is monotonic once it reaches a verdict — a failed run never becomes passed by a later report, so read the run rather than the last report to know where it ended.",
12232
+ http: "GET",
12233
+ path: "/devops/v1/test-runs/{id}",
12234
+ streaming: "no",
12235
+ pagination: false,
12236
+ pathParams: [
12237
+ {
12238
+ name: "id",
12239
+ sdkName: "id",
12240
+ description: "The run identifier returned by a run list or create answer."
12241
+ }
12242
+ ],
12243
+ query: [
12244
+ {
12245
+ name: "expand",
12246
+ type: "array",
12247
+ itemType: "string",
12248
+ enum: [
12249
+ "failedExecutions"
12250
+ ],
12251
+ required: false,
12252
+ description: "Repeatable field to expand inline. failedExecutions returns the non-passed executions with the run, which saves a second call when you only need to see what broke; omit it for the bare run."
12253
+ }
12254
+ ]
12255
+ },
12256
+ {
12257
+ resource: "devops.testRuns",
12258
+ method: "cancel",
12259
+ summary: "Cancel a test run",
12260
+ description: "Stop a run that is still going. A reason is required and is recorded on the run, because a cancelled run is read later as evidence about why a commit was not verified. Cancelling a run that already reached a verdict is refused with RUN_ALREADY_FINISHED: its result is final and cancelling it would erase the verdict. Executions already recorded stay readable.",
12261
+ http: "POST",
12262
+ path: "/devops/v1/test-runs/{id}:cancel",
12263
+ streaming: "no",
12264
+ pagination: false,
12265
+ pathParams: [
12266
+ {
12267
+ name: "id",
12268
+ sdkName: "id",
12269
+ description: "The run identifier returned by a run list or create answer."
12270
+ }
12271
+ ],
12272
+ query: [],
12273
+ body: {
12274
+ required: true,
12275
+ fields: [
12276
+ {
12277
+ name: "reason",
12278
+ type: "string",
12279
+ required: true,
12280
+ description: "Why the run is being cancelled; it is stored on the run and is what a later reader finds instead of a result."
12281
+ }
12282
+ ]
12283
+ }
12284
+ },
12285
+ {
12286
+ resource: "devops.testRuns.executions",
12287
+ method: "list",
12288
+ summary: "List a run's executions",
12289
+ description: "List the executions recorded against one run — one entry per case the run selected, with its status, duration, attempts and evidence. Use it to find the case that failed, or to compare a repeat run against the previous one case by case. Reads happen while the run is still going, so a case may still be pending; filter by status to watch only the failures.",
12290
+ http: "GET",
12291
+ path: "/devops/v1/test-runs/{run}/executions",
12292
+ streaming: "no",
12293
+ pagination: false,
12294
+ pathParams: [
12295
+ {
12296
+ name: "run",
12297
+ sdkName: "run",
12298
+ description: "The run whose executions you are reading, from a run list or create answer."
12299
+ }
12300
+ ],
12301
+ query: [
12302
+ {
12303
+ name: "pageSize",
12304
+ type: "integer",
12305
+ required: false,
12306
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
12307
+ },
12308
+ {
12309
+ name: "pageToken",
12310
+ type: "string",
12311
+ required: false,
12312
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12313
+ },
12314
+ {
12315
+ name: "filter",
12316
+ type: "string",
12317
+ required: false,
12318
+ description: "AIP-160 equality filter over one declared field, for example result=failed to read only a run's failures. Fields an execution list does not declare are refused with INVALID_ARGUMENT rather than ignored."
12319
+ },
12320
+ {
12321
+ name: "orderBy",
12322
+ type: "string",
12323
+ required: false,
12324
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
12325
+ }
12326
+ ]
12327
+ },
12328
+ {
12329
+ resource: "devops.testRuns.executions",
12330
+ method: "retrieve",
12331
+ summary: "Retrieve one case's execution in a run",
12332
+ description: "Read one case's execution inside one run, including every attempt with its own duration and message. Use it after a run reports a failure to see whether the case failed once and passed on retry — that is what flaky true means — and to reach the evidence files a triage needs. Both ids come from the run and case reads; an execution that does not exist for that pair is NOT_FOUND rather than an empty answer.",
12333
+ http: "GET",
12334
+ path: "/devops/v1/test-runs/{run}/executions/{case}",
12335
+ streaming: "no",
12336
+ pagination: false,
12337
+ pathParams: [
12338
+ {
12339
+ name: "run",
12340
+ sdkName: "run",
12341
+ description: "The run whose executions you are reading, from a run list or create answer."
12342
+ },
12343
+ {
12344
+ name: "case",
12345
+ sdkName: "case",
12346
+ description: "The case to read inside that run, from the run's execution list or the project's case list."
12347
+ }
12348
+ ],
12349
+ query: []
12350
+ },
12351
+ {
12352
+ resource: "devops.testSuites",
12353
+ method: "retrieve",
12354
+ summary: "Retrieve a test suite",
12355
+ description: "Read one suite by the id a suite list returned, to learn its file, framework, size, purposes and how many cases it holds. Use it when a case's suite id needs a name for display, or to confirm which commit's catalog a suite came from. The id is opaque; it comes from the list, never from the file path.",
12356
+ http: "GET",
12357
+ path: "/devops/v1/test-suites/{id}",
12358
+ streaming: "no",
12359
+ pagination: false,
12360
+ pathParams: [
12361
+ {
12362
+ name: "id",
12363
+ sdkName: "id",
12364
+ description: "The suite identifier returned by a suite list, not the file path it was discovered from."
12365
+ }
12366
+ ],
12367
+ query: []
12368
+ },
11428
12369
  {
11429
12370
  resource: "file.files",
11430
12371
  method: "list",
@@ -13341,10 +14282,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13341
14282
  "frame",
13342
14283
  "overview",
13343
14284
  "audio",
14285
+ "loudness",
14286
+ "beats",
14287
+ "content",
13344
14288
  "embedding"
13345
14289
  ],
13346
14290
  required: false,
13347
- description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, and embedding reports a failed embedding step."
14291
+ description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, loudness is measured loudness, beats is the measured tempo and beat grid, content is the derived speech, music and silence split, and embedding reports a failed embedding step."
13348
14292
  },
13349
14293
  {
13350
14294
  name: "cursor",
@@ -14096,7 +15040,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
14096
15040
  name: "kinds",
14097
15041
  type: "string",
14098
15042
  required: false,
14099
- description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, embedding. Omit or empty to include every kind."
15043
+ description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, loudness, beats, content, embedding. Omit or empty to include every kind."
14100
15044
  },
14101
15045
  {
14102
15046
  name: "cursor",
@@ -19868,7 +20812,7 @@ for more details.`
19868
20812
  resource: "ticket.labels",
19869
20813
  method: "create",
19870
20814
  summary: "Create or add labels",
19871
- description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20815
+ description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19872
20816
  http: "POST",
19873
20817
  path: "/ticket/v1/labels",
19874
20818
  streaming: "no",
@@ -19910,7 +20854,7 @@ for more details.`
19910
20854
  resource: "ticket.labels",
19911
20855
  method: "delete",
19912
20856
  summary: "Remove labels",
19913
- description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20857
+ description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19914
20858
  http: "DELETE",
19915
20859
  path: "/ticket/v1/labels/{name}",
19916
20860
  streaming: "no",
@@ -19935,7 +20879,7 @@ for more details.`
19935
20879
  resource: "ticket.labels",
19936
20880
  method: "update",
19937
20881
  summary: "Update labels",
19938
- description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20882
+ description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19939
20883
  http: "PATCH",
19940
20884
  path: "/ticket/v1/labels/{name}",
19941
20885
  streaming: "no",
@@ -21870,6 +22814,8 @@ function problemFrom(status, headers, body, statusText) {
21870
22814
  param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
21871
22815
  errors: Array.isArray(value.errors) ? value.errors : [],
21872
22816
  requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
22817
+ docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
22818
+ describe: string(nested.describe) ?? string(value.describe),
21873
22819
  raw: body
21874
22820
  };
21875
22821
  }
@@ -21883,6 +22829,8 @@ class PraxisError extends Error {
21883
22829
  errors;
21884
22830
  requestId;
21885
22831
  param;
22832
+ docUrl;
22833
+ describe;
21886
22834
  raw;
21887
22835
  constructor(problem = {}, options) {
21888
22836
  super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
@@ -21895,6 +22843,8 @@ class PraxisError extends Error {
21895
22843
  this.errors = problem.errors ?? [];
21896
22844
  this.requestId = problem.requestId;
21897
22845
  this.param = problem.param;
22846
+ this.docUrl = problem.docUrl;
22847
+ this.describe = problem.describe;
21898
22848
  this.raw = problem.raw;
21899
22849
  }
21900
22850
  static fromResponse(response, body) {
@@ -23299,6 +24249,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
23299
24249
  url: "/agent/v1/computers/{computer_id}/files/content",
23300
24250
  ...options
23301
24251
  });
24252
+ var computersFilesConvert = (options) => (options.client ?? client).post({
24253
+ security: [{
24254
+ key: "BearerAuth",
24255
+ scheme: "bearer",
24256
+ type: "http"
24257
+ }, {
24258
+ key: "ApiKeyAuth",
24259
+ name: "X-API-Key",
24260
+ type: "apiKey"
24261
+ }],
24262
+ url: "/agent/v1/computers/{computer_id}/files/convert",
24263
+ ...options,
24264
+ headers: {
24265
+ "Content-Type": "application/json",
24266
+ ...options.headers
24267
+ }
24268
+ });
23302
24269
  var connectComputer = (options) => (options.client ?? client).post({
23303
24270
  security: [{
23304
24271
  key: "BearerAuth",
@@ -27682,6 +28649,36 @@ var cutCreateExport = (options) => (options.client ?? client).post({
27682
28649
  ...options.headers
27683
28650
  }
27684
28651
  });
28652
+ var cutCreateRender = (options) => (options.client ?? client).post({
28653
+ security: [{
28654
+ key: "BearerAuth",
28655
+ scheme: "bearer",
28656
+ type: "http"
28657
+ }, {
28658
+ key: "ApiKeyAuth",
28659
+ name: "X-API-Key",
28660
+ type: "apiKey"
28661
+ }],
28662
+ url: "/cut/v1/projects/{project_id}/renders",
28663
+ ...options,
28664
+ headers: {
28665
+ "Content-Type": "application/json",
28666
+ ...options.headers
28667
+ }
28668
+ });
28669
+ var cutRetrieveRender = (options) => (options.client ?? client).get({
28670
+ security: [{
28671
+ key: "BearerAuth",
28672
+ scheme: "bearer",
28673
+ type: "http"
28674
+ }, {
28675
+ key: "ApiKeyAuth",
28676
+ name: "X-API-Key",
28677
+ type: "apiKey"
28678
+ }],
28679
+ url: "/cut/v1/renders/{render_id}",
28680
+ ...options
28681
+ });
27685
28682
  var cutRetrieveExport = (options) => (options.client ?? client).get({
27686
28683
  security: [{
27687
28684
  key: "BearerAuth",
@@ -27972,6 +28969,201 @@ var databaseInsert = (options) => (options.client ?? client).post({
27972
28969
  ...options.headers
27973
28970
  }
27974
28971
  });
28972
+ var devopsTestCatalogGet = (options) => (options.client ?? client).get({
28973
+ security: [{
28974
+ key: "devops-bearerAuth",
28975
+ scheme: "bearer",
28976
+ type: "http"
28977
+ }],
28978
+ url: "/devops/v1/projects/{project}/test-catalog",
28979
+ ...options
28980
+ });
28981
+ var devopsTestSuitesList = (options) => (options.client ?? client).get({
28982
+ security: [{
28983
+ key: "devops-bearerAuth",
28984
+ scheme: "bearer",
28985
+ type: "http"
28986
+ }],
28987
+ url: "/devops/v1/projects/{project}/test-suites",
28988
+ ...options
28989
+ });
28990
+ var devopsTestSuitesGet = (options) => (options.client ?? client).get({
28991
+ security: [{
28992
+ key: "devops-bearerAuth",
28993
+ scheme: "bearer",
28994
+ type: "http"
28995
+ }],
28996
+ url: "/devops/v1/test-suites/{id}",
28997
+ ...options
28998
+ });
28999
+ var devopsTestCasesList = (options) => (options.client ?? client).get({
29000
+ security: [{
29001
+ key: "devops-bearerAuth",
29002
+ scheme: "bearer",
29003
+ type: "http"
29004
+ }],
29005
+ url: "/devops/v1/projects/{project}/test-cases",
29006
+ ...options
29007
+ });
29008
+ var devopsTestCasesGet = (options) => (options.client ?? client).get({
29009
+ security: [{
29010
+ key: "devops-bearerAuth",
29011
+ scheme: "bearer",
29012
+ type: "http"
29013
+ }],
29014
+ url: "/devops/v1/test-cases/{id}",
29015
+ ...options
29016
+ });
29017
+ var devopsTestPlansList = (options) => (options.client ?? client).get({
29018
+ security: [{
29019
+ key: "devops-bearerAuth",
29020
+ scheme: "bearer",
29021
+ type: "http"
29022
+ }],
29023
+ url: "/devops/v1/projects/{project}/test-plans",
29024
+ ...options
29025
+ });
29026
+ var devopsTestPlansCreate = (options) => (options.client ?? client).post({
29027
+ security: [{
29028
+ key: "devops-bearerAuth",
29029
+ scheme: "bearer",
29030
+ type: "http"
29031
+ }],
29032
+ url: "/devops/v1/projects/{project}/test-plans",
29033
+ ...options,
29034
+ headers: {
29035
+ "Content-Type": "application/json",
29036
+ ...options.headers
29037
+ }
29038
+ });
29039
+ var devopsTestPlansDelete = (options) => (options.client ?? client).delete({
29040
+ security: [{
29041
+ key: "devops-bearerAuth",
29042
+ scheme: "bearer",
29043
+ type: "http"
29044
+ }],
29045
+ url: "/devops/v1/test-plans/{id}",
29046
+ ...options
29047
+ });
29048
+ var devopsTestPlansGet = (options) => (options.client ?? client).get({
29049
+ security: [{
29050
+ key: "devops-bearerAuth",
29051
+ scheme: "bearer",
29052
+ type: "http"
29053
+ }],
29054
+ url: "/devops/v1/test-plans/{id}",
29055
+ ...options
29056
+ });
29057
+ var devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
29058
+ security: [{
29059
+ key: "devops-bearerAuth",
29060
+ scheme: "bearer",
29061
+ type: "http"
29062
+ }],
29063
+ url: "/devops/v1/test-plans/{id}",
29064
+ ...options,
29065
+ headers: {
29066
+ "Content-Type": "application/json",
29067
+ ...options.headers
29068
+ }
29069
+ });
29070
+ var devopsTestPlansPause = (options) => (options.client ?? client).post({
29071
+ security: [{
29072
+ key: "devops-bearerAuth",
29073
+ scheme: "bearer",
29074
+ type: "http"
29075
+ }],
29076
+ url: "/devops/v1/test-plans/{id}:pause",
29077
+ ...options,
29078
+ headers: {
29079
+ "Content-Type": "application/json",
29080
+ ...options.headers
29081
+ }
29082
+ });
29083
+ var devopsTestPlansResume = (options) => (options.client ?? client).post({
29084
+ security: [{
29085
+ key: "devops-bearerAuth",
29086
+ scheme: "bearer",
29087
+ type: "http"
29088
+ }],
29089
+ url: "/devops/v1/test-plans/{id}:resume",
29090
+ ...options
29091
+ });
29092
+ var devopsTestRunsList = (options) => (options.client ?? client).get({
29093
+ security: [{
29094
+ key: "devops-bearerAuth",
29095
+ scheme: "bearer",
29096
+ type: "http"
29097
+ }],
29098
+ url: "/devops/v1/projects/{project}/test-runs",
29099
+ ...options
29100
+ });
29101
+ var devopsTestRunsCreate = (options) => (options.client ?? client).post({
29102
+ security: [{
29103
+ key: "devops-bearerAuth",
29104
+ scheme: "bearer",
29105
+ type: "http"
29106
+ }],
29107
+ url: "/devops/v1/projects/{project}/test-runs",
29108
+ ...options,
29109
+ headers: {
29110
+ "Content-Type": "application/json",
29111
+ ...options.headers
29112
+ }
29113
+ });
29114
+ var devopsTestRunsGet = (options) => (options.client ?? client).get({
29115
+ security: [{
29116
+ key: "devops-bearerAuth",
29117
+ scheme: "bearer",
29118
+ type: "http"
29119
+ }],
29120
+ url: "/devops/v1/test-runs/{id}",
29121
+ ...options
29122
+ });
29123
+ var devopsTestRunsCancel = (options) => (options.client ?? client).post({
29124
+ security: [{
29125
+ key: "devops-bearerAuth",
29126
+ scheme: "bearer",
29127
+ type: "http"
29128
+ }],
29129
+ url: "/devops/v1/test-runs/{id}:cancel",
29130
+ ...options,
29131
+ headers: {
29132
+ "Content-Type": "application/json",
29133
+ ...options.headers
29134
+ }
29135
+ });
29136
+ var devopsTestExecutionsList = (options) => (options.client ?? client).get({
29137
+ security: [{
29138
+ key: "devops-bearerAuth",
29139
+ scheme: "bearer",
29140
+ type: "http"
29141
+ }],
29142
+ url: "/devops/v1/test-runs/{run}/executions",
29143
+ ...options
29144
+ });
29145
+ var devopsTestExecutionsGet = (options) => (options.client ?? client).get({
29146
+ security: [{
29147
+ key: "devops-bearerAuth",
29148
+ scheme: "bearer",
29149
+ type: "http"
29150
+ }],
29151
+ url: "/devops/v1/test-runs/{run}/executions/{case}",
29152
+ ...options
29153
+ });
29154
+ var devopsTestReportsUpload = (options) => (options.client ?? client).post({
29155
+ security: [{
29156
+ key: "devops-bearerAuth",
29157
+ scheme: "bearer",
29158
+ type: "http"
29159
+ }],
29160
+ url: "/devops/v1/projects/{project}/test-reports",
29161
+ ...options,
29162
+ headers: {
29163
+ "Content-Type": "application/json",
29164
+ ...options.headers
29165
+ }
29166
+ });
27975
29167
  var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
27976
29168
  security: [{
27977
29169
  key: "knowledge-bearerAuth",
@@ -30599,6 +31791,9 @@ function createAgent(transport) {
30599
31791
  create: bind(transport, computersCreate),
30600
31792
  delete: bind(transport, computersDelete),
30601
31793
  files: {
31794
+ convert: {
31795
+ create: bind(transport, computersFilesConvert)
31796
+ },
30602
31797
  list: bind(transport, computersFilesList),
30603
31798
  retrieveContent: bind(transport, computersFilesContent)
30604
31799
  },
@@ -31046,6 +32241,9 @@ function createCut(transport) {
31046
32241
  media: {
31047
32242
  import: bind(transport, cutImportMedia)
31048
32243
  },
32244
+ renders: {
32245
+ create: bind(transport, cutCreateRender)
32246
+ },
31049
32247
  retrieve: bind(transport, cutRetrieveProject),
31050
32248
  retrieveState: bind(transport, cutRetrieveState),
31051
32249
  retrieveTimeline: bind(transport, cutRetrieveTimeline),
@@ -31056,6 +32254,9 @@ function createCut(transport) {
31056
32254
  list: bind(transport, cutListVersions)
31057
32255
  }
31058
32256
  },
32257
+ renders: {
32258
+ retrieve: bind(transport, cutRetrieveRender)
32259
+ },
31059
32260
  versions: {
31060
32261
  restore: bind(transport, cutRestoreVersion)
31061
32262
  }
@@ -31098,6 +32299,51 @@ function createDatabase(transport) {
31098
32299
  }
31099
32300
  };
31100
32301
  }
32302
+ function createDevops(transport) {
32303
+ return {
32304
+ projects: {
32305
+ retrieveTestCatalog: bind(transport, devopsTestCatalogGet),
32306
+ testCases: {
32307
+ list: bind(transport, devopsTestCasesList)
32308
+ },
32309
+ testPlans: {
32310
+ create: bind(transport, devopsTestPlansCreate),
32311
+ list: bind(transport, devopsTestPlansList)
32312
+ },
32313
+ testReports: {
32314
+ create: bind(transport, devopsTestReportsUpload)
32315
+ },
32316
+ testRuns: {
32317
+ create: bind(transport, devopsTestRunsCreate),
32318
+ list: bind(transport, devopsTestRunsList)
32319
+ },
32320
+ testSuites: {
32321
+ list: bind(transport, devopsTestSuitesList)
32322
+ }
32323
+ },
32324
+ testCases: {
32325
+ retrieve: bind(transport, devopsTestCasesGet)
32326
+ },
32327
+ testPlans: {
32328
+ delete: bind(transport, devopsTestPlansDelete),
32329
+ pause: bind(transport, devopsTestPlansPause),
32330
+ resume: bind(transport, devopsTestPlansResume),
32331
+ retrieve: bind(transport, devopsTestPlansGet),
32332
+ update: bind(transport, devopsTestPlansUpdate)
32333
+ },
32334
+ testRuns: {
32335
+ cancel: bind(transport, devopsTestRunsCancel),
32336
+ executions: {
32337
+ list: bind(transport, devopsTestExecutionsList),
32338
+ retrieve: bind(transport, devopsTestExecutionsGet)
32339
+ },
32340
+ retrieve: bind(transport, devopsTestRunsGet)
32341
+ },
32342
+ testSuites: {
32343
+ retrieve: bind(transport, devopsTestSuitesGet)
32344
+ }
32345
+ };
32346
+ }
31101
32347
  function createFile(transport) {
31102
32348
  return {
31103
32349
  files: {
@@ -31642,6 +32888,7 @@ var resourceFactories = {
31642
32888
  crm: createCrm,
31643
32889
  cut: createCut,
31644
32890
  database: createDatabase,
32891
+ devops: createDevops,
31645
32892
  file: createFile,
31646
32893
  knowledge: createKnowledge,
31647
32894
  media: createMedia,
@@ -32721,6 +33968,26 @@ async function prepareMultipart(op, opts) {
32721
33968
  opts.body = body;
32722
33969
  }
32723
33970
 
33971
+ // src/core/pagination.ts
33972
+ var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
33973
+ function pageTokenField(op) {
33974
+ return op.query.find((field) => PAGE_TOKENS.test(field.name));
33975
+ }
33976
+ function nextPageToken(result) {
33977
+ const value = result;
33978
+ const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
33979
+ return typeof token === "string" && token ? token : undefined;
33980
+ }
33981
+ function pageOf(result) {
33982
+ const value = result;
33983
+ const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
33984
+ const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
33985
+ if (!Array.isArray(data))
33986
+ return;
33987
+ const token = nextPageToken(result);
33988
+ return { items: data, ...token ? { token } : {} };
33989
+ }
33990
+
32724
33991
  // src/core/bind-args.ts
32725
33992
  var globalOptions = [
32726
33993
  { name: "org", type: "string" },
@@ -32936,7 +34203,7 @@ function bindArgs(parsed, op, data) {
32936
34203
  (opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
32937
34204
  }
32938
34205
  }
32939
- if (globals.all && !op.pagination)
34206
+ if (globals.all && !op.pagination && !pageTokenField(op))
32940
34207
  throw new UsageError("--all requires a paginated operation");
32941
34208
  for (const p of op.pathParams)
32942
34209
  if (p !== target && opts.path?.[p.sdkName] === undefined)
@@ -32962,8 +34229,8 @@ function bindArgs(parsed, op, data) {
32962
34229
  }
32963
34230
 
32964
34231
  // src/core/help.ts
32965
- function describeOption(s) {
32966
- return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${s.required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
34232
+ function describeOption(s, required = s.required) {
34233
+ return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
32967
34234
  }
32968
34235
  function example(command) {
32969
34236
  const target = targetParam(command.op);
@@ -32979,18 +34246,22 @@ function example(command) {
32979
34246
  args.push("--yes");
32980
34247
  return args.join(" ");
32981
34248
  }
34249
+ function fieldRequired(op, field, location) {
34250
+ return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
34251
+ }
32982
34252
  function help(commands, prefix, command) {
32983
34253
  if (command) {
32984
34254
  const target = targetParam(command.op);
34255
+ const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
32985
34256
  return [
32986
- `praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
34257
+ `praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
32987
34258
  `SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
32988
34259
  `${command.op.http} ${command.op.path}`,
32989
34260
  ...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
32990
34261
  "",
32991
34262
  "Options:",
32992
34263
  ...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
32993
- ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
34264
+ ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
32994
34265
  ...command.op.body?.fields.filter((f) => !operationOptions(command.op).some((s) => s.location === "body" && s.field === f) && (f.type === "object" || f.type === "array" && !["string", "number", "integer", "boolean"].includes(f.itemType ?? ""))).map((f) => ` --data: ${f.name} (${f.type}${f.required ? ", required" : ""})`) ?? [],
32995
34266
  " -h is an alias of --help",
32996
34267
  "PRAXIS_ENV=develop|production (default: develop); no --env option.",
@@ -34358,9 +35629,11 @@ function renderHuman(result, ctx) {
34358
35629
  const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
34359
35630
  const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
34360
35631
  ` : "";
35632
+ const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
35633
+ `).join("");
34361
35634
  return { stderr: err.red(`✗ ${plain(result.message)}`) + `
34362
35635
  ` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
34363
- ` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
35636
+ ` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
34364
35637
  ` : "") };
34365
35638
  }
34366
35639
  case "list":
@@ -34448,8 +35721,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
34448
35721
  }
34449
35722
 
34450
35723
  // src/output/render.ts
35724
+ var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
35725
+ function serverProblem(raw) {
35726
+ const value = record(raw);
35727
+ const problem = {};
35728
+ for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
35729
+ const entry = value[member];
35730
+ if (entry !== undefined && entry !== null)
35731
+ problem[member] = entry;
35732
+ }
35733
+ const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
35734
+ return adds ? problem : undefined;
35735
+ }
35736
+ function problemLines(problem) {
35737
+ const lines = [];
35738
+ for (const group of [problem?.errors, problem?.violations]) {
35739
+ for (const item of Array.isArray(group) ? group : []) {
35740
+ const entry = record(item);
35741
+ const where = scalar(entry.pointer ?? entry.field);
35742
+ const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
35743
+ if (where || detail)
35744
+ lines.push(`${where ? `${where}: ` : ""}${detail}`);
35745
+ }
35746
+ }
35747
+ return lines;
35748
+ }
34451
35749
  function errorJSON(result, ctx) {
34452
- 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 } : {} } }) + `
35750
+ 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 } : {} } }) + `
34453
35751
  `;
34454
35752
  }
34455
35753
  function render(result, ctx) {
@@ -34605,6 +35903,8 @@ function errorInput(error, ctx) {
34605
35903
  const raw = record(sdk?.raw), nested = record(raw.error);
34606
35904
  const candidate = nested.details ?? raw.details;
34607
35905
  const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
35906
+ const problem = serverProblem(Object.keys(nested).length ? nested : raw);
35907
+ const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
34608
35908
  let message = error instanceof Error ? error.message : "Unexpected error";
34609
35909
  const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
34610
35910
  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");
@@ -34616,11 +35916,14 @@ function errorInput(error, ctx) {
34616
35916
  if (stripped)
34617
35917
  message = `${humanize(code)}${message ? `: ${message}` : ""}`;
34618
35918
  const status = sdk?.status, request_id = sdk?.requestId;
35919
+ message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
34619
35920
  const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
34620
35921
  const source = ctx.credentialSource ?? "login";
34621
35922
  let hint = genericHint;
34622
35923
  if (error instanceof UsageError)
34623
35924
  hint = error.hint;
35925
+ else if (serverText(problem?.hint))
35926
+ hint = serverText(problem?.hint);
34624
35927
  else if (authFailure)
34625
35928
  hint = authHint(source);
34626
35929
  else if (status === 404)
@@ -34631,7 +35934,7 @@ function errorInput(error, ctx) {
34631
35934
  hint = "Rate limited; retry later.";
34632
35935
  else if (status !== undefined && status >= 500)
34633
35936
  hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
34634
- return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
35937
+ return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, ...problem !== undefined ? { problem } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
34635
35938
  }
34636
35939
 
34637
35940
  // src/output/progress.ts
@@ -34661,7 +35964,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
34661
35964
  }
34662
35965
 
34663
35966
  // src/main.ts
34664
- var version = "0.2.1-dev.2cec3b3";
35967
+ var version = "0.2.1-dev.2d26f96";
34665
35968
  var commands = commandTree(operations);
34666
35969
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
34667
35970
  function route(argv) {
@@ -34879,7 +36182,7 @@ Examples:
34879
36182
  let owner = client2;
34880
36183
  for (const part of op.resource.split("."))
34881
36184
  owner = owner[part];
34882
- const result = await owner[op.method](opts);
36185
+ let result = await owner[op.method](opts);
34883
36186
  const name2 = `${op.resource}.${op.method}`;
34884
36187
  const list = (items) => {
34885
36188
  const view = clientList(items, op, flags.limit, ctx.mode);
@@ -34893,7 +36196,21 @@ Examples:
34893
36196
  const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
34894
36197
  if (typeof cursor === "string" && cursor)
34895
36198
  ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
34896
- if (result instanceof Page) {
36199
+ const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
36200
+ const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
36201
+ if (flags.all && !(result instanceof Page) && token && !firstPage)
36202
+ throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
36203
+ if (firstPage) {
36204
+ const items = [...firstPage.items];
36205
+ const seen = new Set;
36206
+ for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
36207
+ seen.add(next);
36208
+ result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
36209
+ items.push(...pageOf(result)?.items ?? []);
36210
+ }
36211
+ ctx.nextCommand = undefined;
36212
+ emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
36213
+ } else if (result instanceof Page) {
34897
36214
  if (flags.all) {
34898
36215
  const items = [];
34899
36216
  for await (const item of result)
@@ -34989,7 +36306,7 @@ Examples:
34989
36306
  }
34990
36307
  }
34991
36308
  if (true)
34992
- process.exit(await main(process.argv.slice(2)));
36309
+ process.exitCode = await main(process.argv.slice(2));
34993
36310
  export {
34994
36311
  main
34995
36312
  };