@deepraxis/cli 0.2.1-dev.9b41ea1 → 0.2.1-dev.9c5dc2f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/praxis.js CHANGED
@@ -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,13 @@ 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."
10202
+ },
10203
+ {
10204
+ name: "poster",
10205
+ type: "object",
10206
+ required: false,
10207
+ description: "Cover frame, in seconds on the project clock. Omitted, the cover is the first frame with picture that is not inside a fade-in or a transition — a black opening no longer makes the library thumbnail black. A frame inside a transition is skipped, and a timeline that is black throughout keeps its first frame (reported as BLACK_FIRST_FRAME). The frame actually used is reported as poster_at on the export."
10171
10208
  }
10172
10209
  ]
10173
10210
  }
@@ -10250,6 +10287,57 @@ Execution errors include error.details.prints containing output printed before f
10250
10287
  ]
10251
10288
  }
10252
10289
  },
10290
+ {
10291
+ resource: "cut.projects.renders",
10292
+ method: "create",
10293
+ summary: "Create draft range render",
10294
+ description: "Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration, and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.",
10295
+ http: "POST",
10296
+ path: "/cut/v1/projects/{project_id}/renders",
10297
+ streaming: "no",
10298
+ pagination: false,
10299
+ pathParams: [
10300
+ {
10301
+ name: "project_id",
10302
+ sdkName: "project_id",
10303
+ description: "Project identifier returned by its create or list operation; use the id, not a display name."
10304
+ }
10305
+ ],
10306
+ query: [],
10307
+ body: {
10308
+ required: true,
10309
+ fields: [
10310
+ {
10311
+ name: "kind",
10312
+ type: "string",
10313
+ enum: [
10314
+ "audio",
10315
+ "video"
10316
+ ],
10317
+ required: true,
10318
+ description: "audio renders the mixed soundtrack alone as an .m4a file for listening; video renders a draft-quality .mp4 with picture and sound for looking at. An audio draft is the cheaper of the two and is what a loudness or mix measurement asks for."
10319
+ },
10320
+ {
10321
+ name: "from",
10322
+ type: "number",
10323
+ required: true,
10324
+ description: "Start of the interval in seconds on the project clock, inclusive. Must be less than to."
10325
+ },
10326
+ {
10327
+ name: "to",
10328
+ type: "number",
10329
+ required: true,
10330
+ description: "End of the interval in seconds on the project clock, exclusive. At most 120 seconds after from, and never beyond the timeline duration; a longer passage is requested as several ranges."
10331
+ },
10332
+ {
10333
+ name: "revision",
10334
+ type: "integer",
10335
+ required: false,
10336
+ description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
10337
+ }
10338
+ ]
10339
+ }
10340
+ },
10253
10341
  {
10254
10342
  resource: "cut.projects",
10255
10343
  method: "retrieveState",
@@ -10391,7 +10479,159 @@ Execution errors include error.details.prints containing output printed before f
10391
10479
  resource: "cut.projects",
10392
10480
  method: "execute",
10393
10481
  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',
10482
+ description: `Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: \`const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);\`
10483
+
10484
+ <!-- cut-reference:start -->
10485
+ ### Script function, field and error reference
10486
+
10487
+ Every script function, clip field and error code has its own section, read one at a time:
10488
+
10489
+ \`\`\`
10490
+ codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
10491
+ codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
10492
+ codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
10493
+ codemode.describe("praxis.cut.script") // names, one page at a time
10494
+ \`\`\`
10495
+
10496
+ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
10497
+
10498
+ #### Script functions (script)
10499
+
10500
+ - \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
10501
+ - \`GetItem\` — One clip's compact view, by id.
10502
+ - \`FindItems\` — Visit every clip with its track; collect results.
10503
+ - \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
10504
+ - \`GetTranscript\` — Transcript words in source microseconds.
10505
+ - \`GetAnalysis\` — Silence, filler or scene segments.
10506
+ - \`ListTransitions\` — Join transition kinds and parameters.
10507
+ - \`ListEffects\` — Visual-effect catalog and parameters.
10508
+ - \`ListAnimations\` — Animation presets by phase and target.
10509
+ - \`ListFonts\` — Font families, weights and scripts.
10510
+ - \`ListTextStyles\` — Text style presets for \`style.preset\`.
10511
+ - \`ListTextTemplates\` — Multi-layer templates and their slots.
10512
+ - \`Insert\` — Add a clip; a track never overlaps itself.
10513
+ - \`Append\` — Add a clip at the end of a track.
10514
+ - \`Update\` — Change named fields; the rest stay.
10515
+ - \`SetSpeed\` — Change rate, keeping source or duration.
10516
+ - \`Delete\` — Remove a clip. There is no \`Remove\`.
10517
+ - \`Join\` — Overlap clips; followers shift, track shortens.
10518
+ - \`UpdateJoin\` — Change a join's length or effect.
10519
+ - \`DeleteJoin\` — Remove a join; restore the butt cut.
10520
+ - \`Split\` — Cut a clip in two at a time.
10521
+ - \`Trim\` — Move one clip edge by seconds.
10522
+ - \`Move\` — Set a clip's start or track.
10523
+ - \`RippleDeleteRange\` — Cut a time range and close the gap.
10524
+ - \`AddTrack\` — Add a video, audio or caption track.
10525
+ - \`UpdateTrack\` — Change a track's name, lock, gain or role.
10526
+ - \`DeleteTrack\` — Remove a track and its clips.
10527
+ - \`SetSettings\` — Change canvas, frame rate or background.
10528
+ - \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
10529
+ - \`InsertTemplate\` — Insert a template and fill its slots.
10530
+ - \`AlignCaptions\` — Rebuild captions from text punctuation.
10531
+ - \`ImportCaptions\` — Import SRT or WebVTT onto captions.
10532
+ - \`ExportCaptions\` — Export captions as SRT or WebVTT.
10533
+ - \`SetMarker\` — Label a timeline position.
10534
+ - \`Print\` — Append values to the result's \`prints\`.
10535
+ - \`Preview\` — Up to 8 frames as inline PNG data URLs.
10536
+
10537
+ #### Fields (fields)
10538
+
10539
+ - \`type\` — Clip kind; decides which fields apply.
10540
+ - \`start\` — Clip start in seconds; snaps to frames.
10541
+ - \`length\` — Duration; optional for video and audio.
10542
+ - \`media\` — Source \`{ libraryId, assetId }\`.
10543
+ - \`sourceIn\` — First source second kept; default 0.
10544
+ - \`sourceOut\` — Exclusive source end; read-only.
10545
+ - \`text\` — Text of a text or caption clip.
10546
+ - \`color\` — Solid colour of a color clip.
10547
+ - \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
10548
+ - \`width\` — Shape width, a fraction of canvas width.
10549
+ - \`height\` — Shape height, a fraction of canvas height.
10550
+ - \`radius\` — Rect corner rounding, in 1080-height px.
10551
+ - \`fill\` — Shape or text paint: colour or gradient.
10552
+ - \`stroke\` — Shape outline: colour and width.
10553
+ - \`transform\` — Position, scale, rotation, opacity, crop, blur.
10554
+ - \`fit\` — contain, cover, fill or none.
10555
+ - \`blend\` — Layer blend mode; null clears.
10556
+ - \`style\` — Text styling: font, fill, strokes, glow, position.
10557
+ - \`style.position\` — top, middle or bottom; omit it, never null.
10558
+ - \`playback\` — Rate, direction, audio policy, or freeze.
10559
+ - \`volumeDb\` — Audio level in dB; 0 is source level.
10560
+ - \`gain\` — Keyframed audio level in dB.
10561
+ - \`fadeIn\` — Fade-in seconds at the clip's start.
10562
+ - \`fadeOut\` — Fade-out seconds at the clip's end.
10563
+ - \`duck\` — Lower this clip while another track plays.
10564
+ - \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
10565
+ - \`reveal\` — Per-character, word or line reveal timing.
10566
+ - \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
10567
+ - \`effects\` — Effect stack, at most 8; null clears.
10568
+ - \`transitionIn\` — Entrance effect: kind plus seconds.
10569
+ - \`transitionOut\` — Exit effect: kind plus seconds.
10570
+ - \`mask\` — Shape, path or track matte.
10571
+ - \`words\` — Caption words with clip-local times.
10572
+
10573
+ #### Error codes (errors)
10574
+
10575
+ - \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
10576
+ - \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
10577
+ - \`INVALID_STYLE\` — A style value is out of range.
10578
+ - \`INVALID_MASK\` — A mask definition is malformed.
10579
+ - \`MASK_IN_USE\` — The edit would break a live mask.
10580
+ - \`TOO_MANY_MASKS\` — At most 16 masks per project.
10581
+ - \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
10582
+ - \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
10583
+ - \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
10584
+ - \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
10585
+ - \`UNKNOWN_FIELD\` — The field name is not accepted here.
10586
+ - \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
10587
+ - \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
10588
+ - \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
10589
+ - \`OVERLAP\` — Two clips on one track would share time.
10590
+ - \`OUT_OF_SOURCE\` — The clip would read past its source.
10591
+ - \`LOCKED_TRACK\` — The edit targets a locked track.
10592
+ - \`UNBOUND_LIBRARY\` — The library is not bound to the project.
10593
+ - \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
10594
+ - \`NOT_FOUND\` — The named id is not in this project.
10595
+ - \`TOO_SHORT\` — The result would be under one frame.
10596
+ - \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
10597
+ - \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
10598
+ - \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
10599
+ - \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
10600
+ - \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
10601
+ - \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
10602
+ - \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
10603
+ - \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
10604
+ - \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
10605
+ - \`PROJECT_NOT_FOUND\` — No visible project has this id.
10606
+ - \`EXPORT_NOT_FOUND\` — No such export in this project.
10607
+ - \`DRAFT_RENDER_NOT_FOUND\` — No such draft render.
10608
+ - \`VERSION_NOT_FOUND\` — No saved version has this revision.
10609
+ - \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
10610
+ - \`BINDING_INVALID\` — The binding request is malformed.
10611
+ - \`BINDING_IN_USE\` — Clips still use this library's assets.
10612
+ - \`NOTHING_TO_UNDO\` — No earlier revision to return to.
10613
+ - \`NOTHING_TO_REDO\` — No undone revision is waiting.
10614
+ - \`UNDO_CONFLICT\` — The revision to undo is no longer head.
10615
+ - \`REVISION_CONFLICT\` — The project moved; your revision is stale.
10616
+ - \`CUT_BUSY\` — The project is busy; retry.
10617
+ - \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
10618
+ - \`SCRIPT_ERROR\` — The script threw or did not parse.
10619
+ - \`SCRIPT_LIMIT\` — An execute budget was exceeded.
10620
+ - \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
10621
+ - \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
10622
+ - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
10623
+ - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
10624
+ - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
10625
+ - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
10626
+ - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
10627
+ - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
10628
+ - \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
10629
+ - \`INVALID_PARAMS\` — The request is malformed.
10630
+ - \`PERMISSION_DENIED\` — This credential may not do that here.
10631
+ - \`NOT_IMPLEMENTED\` — Not available on this platform yet.
10632
+ - \`INTERNAL\` — Unexpected failure; retry with the request id.
10633
+ <!-- cut-reference:end -->
10634
+ `,
10395
10635
  http: "POST",
10396
10636
  path: "/cut/v1/projects/{project_id}:execute",
10397
10637
  streaming: "no",
@@ -10453,6 +10693,24 @@ Execution errors include error.details.prints containing output printed before f
10453
10693
  ],
10454
10694
  query: []
10455
10695
  },
10696
+ {
10697
+ resource: "cut.renders",
10698
+ method: "retrieve",
10699
+ summary: "Retrieve draft range render",
10700
+ description: "Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.",
10701
+ http: "GET",
10702
+ path: "/cut/v1/renders/{render_id}",
10703
+ streaming: "no",
10704
+ pagination: false,
10705
+ pathParams: [
10706
+ {
10707
+ name: "render_id",
10708
+ sdkName: "render_id",
10709
+ description: "Draft render id (cutr_…) returned by projects.renders.create."
10710
+ }
10711
+ ],
10712
+ query: []
10713
+ },
10456
10714
  {
10457
10715
  resource: "cut.versions",
10458
10716
  method: "restore",
@@ -11425,6 +11683,696 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
11425
11683
  ]
11426
11684
  }
11427
11685
  },
11686
+ {
11687
+ resource: "devops.projects.testCases",
11688
+ method: "list",
11689
+ summary: "List test cases",
11690
+ description: "List a project's cases with their health, state and recent statistics, so you can decide which ones a plan must run and which are quarantined. This is the read a test dashboard is built on; filter it to narrow by state or health instead of paging through everything. A case's id is a fingerprint of its own title and path, so it survives a rename — read aliases when reconciling history recorded under an older title.",
11691
+ http: "GET",
11692
+ path: "/devops/v1/projects/{project}/test-cases",
11693
+ streaming: "no",
11694
+ pagination: false,
11695
+ pathParams: [
11696
+ {
11697
+ name: "project",
11698
+ sdkName: "project",
11699
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11700
+ }
11701
+ ],
11702
+ query: [
11703
+ {
11704
+ name: "pageSize",
11705
+ type: "integer",
11706
+ required: false,
11707
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11708
+ },
11709
+ {
11710
+ name: "pageToken",
11711
+ type: "string",
11712
+ required: false,
11713
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11714
+ },
11715
+ {
11716
+ name: "filter",
11717
+ type: "string",
11718
+ required: false,
11719
+ description: "AIP-160 equality filter over one declared field at a time, for example state=quarantined or health=broken. Fields a case list does not declare are refused with INVALID_ARGUMENT rather than ignored, so a typo never silently widens the result."
11720
+ },
11721
+ {
11722
+ name: "orderBy",
11723
+ type: "string",
11724
+ required: false,
11725
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11726
+ }
11727
+ ]
11728
+ },
11729
+ {
11730
+ resource: "devops.projects",
11731
+ method: "retrieveTestCatalog",
11732
+ summary: "Read a commit's test catalog",
11733
+ description: 'Read the catalog version discovered at one commit — how many suites and cases it holds, which frameworks they come from, and how the commit changed them. Call this first: it tells you which suites, cases and sizes exist before you list them or select them into a plan, and the reported diff explains why a case count moved. A commit whose discovery has not finished answers CATALOG_NOT_READY, which means "not yet", not "no tests"; wait and read again. Omit commit to read the newest catalog published for the project.',
11734
+ http: "GET",
11735
+ path: "/devops/v1/projects/{project}/test-catalog",
11736
+ streaming: "no",
11737
+ pagination: false,
11738
+ pathParams: [
11739
+ {
11740
+ name: "project",
11741
+ sdkName: "project",
11742
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11743
+ }
11744
+ ],
11745
+ query: [
11746
+ {
11747
+ name: "commit",
11748
+ type: "string",
11749
+ required: false,
11750
+ description: "Full 40-character commit sha whose catalog you want, from a project branch or commit read. Omit it to read the newest catalog published for the project."
11751
+ }
11752
+ ]
11753
+ },
11754
+ {
11755
+ resource: "devops.projects.testPlans",
11756
+ method: "list",
11757
+ summary: "List test plans",
11758
+ description: "List the project's plans — what each one selects, which stage and gate it belongs to, and when it runs next. Read this before creating a plan, so a new plan extends what exists instead of duplicating a selector an existing plan already covers.",
11759
+ http: "GET",
11760
+ path: "/devops/v1/projects/{project}/test-plans",
11761
+ streaming: "no",
11762
+ pagination: false,
11763
+ pathParams: [
11764
+ {
11765
+ name: "project",
11766
+ sdkName: "project",
11767
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11768
+ }
11769
+ ],
11770
+ query: [
11771
+ {
11772
+ name: "pageSize",
11773
+ type: "integer",
11774
+ required: false,
11775
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11776
+ },
11777
+ {
11778
+ name: "pageToken",
11779
+ type: "string",
11780
+ required: false,
11781
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11782
+ },
11783
+ {
11784
+ name: "orderBy",
11785
+ type: "string",
11786
+ required: false,
11787
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11788
+ }
11789
+ ]
11790
+ },
11791
+ {
11792
+ resource: "devops.projects.testPlans",
11793
+ method: "create",
11794
+ summary: "Create a test plan",
11795
+ description: "Create a plan that decides which cases a stage must run. The plan's key is unique inside the project and is what a later run names; the selector chooses cases by size, purpose, tag, package or explicit ids, and the trigger says when the plan fires by itself. A merge or promotion gate must name the environment it guards, and a plan with a gate but no environment is refused with PLAN_GATE_ENVIRONMENT_MISMATCH rather than created and silently ignored. A plan has no revision history: update it with a patch.",
11796
+ http: "POST",
11797
+ path: "/devops/v1/projects/{project}/test-plans",
11798
+ streaming: "no",
11799
+ pagination: false,
11800
+ pathParams: [
11801
+ {
11802
+ name: "project",
11803
+ sdkName: "project",
11804
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11805
+ }
11806
+ ],
11807
+ query: [],
11808
+ body: {
11809
+ required: true,
11810
+ fields: [
11811
+ {
11812
+ name: "key",
11813
+ type: "string",
11814
+ required: true,
11815
+ description: "Short name for the plan, unique inside the project; a key already in use is refused rather than silently reused."
11816
+ },
11817
+ {
11818
+ name: "title",
11819
+ type: "string",
11820
+ required: true,
11821
+ description: "Display title of the plan, shown wherever the plan is listed."
11822
+ },
11823
+ {
11824
+ name: "stage",
11825
+ type: "string",
11826
+ enum: [
11827
+ "dev",
11828
+ "presubmit",
11829
+ "postsubmit",
11830
+ "nightly",
11831
+ "production"
11832
+ ],
11833
+ required: true,
11834
+ description: "Which stage of delivery this plan belongs to, which decides when it is expected to run."
11835
+ },
11836
+ {
11837
+ name: "trigger",
11838
+ type: "object",
11839
+ required: true,
11840
+ description: "What starts a run of this plan. Exactly one kind applies; the fields a kind needs are the ones it carries."
11841
+ },
11842
+ {
11843
+ name: "selector",
11844
+ type: "object",
11845
+ required: true,
11846
+ description: "Which cases a plan or run selects. Every member is optional and they combine as an intersection, so a selector with no member selects every case in the catalog."
11847
+ },
11848
+ {
11849
+ name: "environment",
11850
+ type: "string",
11851
+ required: false,
11852
+ description: "The environment this plan runs against; required by a merge or promotion gate, and refused with PLAN_GATE_ENVIRONMENT_MISMATCH when it disagrees with the gate."
11853
+ },
11854
+ {
11855
+ name: "gate",
11856
+ type: "string",
11857
+ enum: [
11858
+ "merge",
11859
+ "promotion",
11860
+ "observation",
11861
+ "none"
11862
+ ],
11863
+ required: true,
11864
+ description: "Whether this plan's result blocks a stage; a merge or promotion gate must name its environment."
11865
+ },
11866
+ {
11867
+ name: "repeat",
11868
+ type: "integer",
11869
+ required: false,
11870
+ description: "How many times each selected case runs in one run; omit for once. More than one is how a flake is told apart from a real failure."
11871
+ },
11872
+ {
11873
+ name: "timeoutMinutes",
11874
+ type: "integer",
11875
+ required: false,
11876
+ description: "How many minutes a run of this plan may take before it is timed out; omit for the service's default."
11877
+ }
11878
+ ]
11879
+ }
11880
+ },
11881
+ {
11882
+ resource: "devops.projects.testReports",
11883
+ method: "create",
11884
+ summary: "Upload an external test report",
11885
+ description: "Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable.",
11886
+ http: "POST",
11887
+ path: "/devops/v1/projects/{project}/test-reports",
11888
+ streaming: "no",
11889
+ pagination: false,
11890
+ pathParams: [
11891
+ {
11892
+ name: "project",
11893
+ sdkName: "project",
11894
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11895
+ }
11896
+ ],
11897
+ query: [],
11898
+ body: {
11899
+ required: true,
11900
+ fields: [
11901
+ {
11902
+ name: "reportId",
11903
+ type: "string",
11904
+ required: true,
11905
+ description: "Your own identifier for this report. Uploading the same id again is idempotent and counts once, so a retry after a timeout is safe."
11906
+ },
11907
+ {
11908
+ name: "format",
11909
+ type: "string",
11910
+ enum: [
11911
+ "ctrf",
11912
+ "junit"
11913
+ ],
11914
+ required: true,
11915
+ description: "Which report format the document is in; it decides how the document is parsed."
11916
+ },
11917
+ {
11918
+ name: "ref",
11919
+ type: "object",
11920
+ required: true,
11921
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
11922
+ },
11923
+ {
11924
+ name: "report",
11925
+ type: "string",
11926
+ required: true,
11927
+ description: "The report document itself, as text — JSON for ctrf, XML for junit. Send the file's contents unchanged; a malformed document is refused with REPORT_INVALID and records nothing."
11928
+ }
11929
+ ]
11930
+ }
11931
+ },
11932
+ {
11933
+ resource: "devops.projects.testRuns",
11934
+ method: "list",
11935
+ summary: "List test runs",
11936
+ description: "List the project's runs newest first, with each run's state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit's tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.",
11937
+ http: "GET",
11938
+ path: "/devops/v1/projects/{project}/test-runs",
11939
+ streaming: "no",
11940
+ pagination: false,
11941
+ pathParams: [
11942
+ {
11943
+ name: "project",
11944
+ sdkName: "project",
11945
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11946
+ }
11947
+ ],
11948
+ query: [
11949
+ {
11950
+ name: "pageSize",
11951
+ type: "integer",
11952
+ required: false,
11953
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
11954
+ },
11955
+ {
11956
+ name: "pageToken",
11957
+ type: "string",
11958
+ required: false,
11959
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
11960
+ },
11961
+ {
11962
+ name: "filter",
11963
+ type: "string",
11964
+ required: false,
11965
+ description: "AIP-160 equality filter over one declared field, for example state=running or result=failed. An undeclared field is refused with INVALID_ARGUMENT; it is never ignored, so a mistyped filter cannot quietly return everything."
11966
+ },
11967
+ {
11968
+ name: "orderBy",
11969
+ type: "string",
11970
+ required: false,
11971
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
11972
+ }
11973
+ ]
11974
+ },
11975
+ {
11976
+ resource: "devops.projects.testRuns",
11977
+ method: "create",
11978
+ summary: "Create a test run",
11979
+ description: "Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued, the default, returns as soon as the run exists; started waits until the run has begun, except for an external run, which is answered at once because it leaves queued only when your own CI uploads; finished waits for a verdict. The wait is bounded at about 25 seconds, and a wait that reaches that bound returns the run as it stands rather than failing — read state to see whether it finished. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.",
11980
+ http: "POST",
11981
+ path: "/devops/v1/projects/{project}/test-runs",
11982
+ streaming: "no",
11983
+ pagination: false,
11984
+ pathParams: [
11985
+ {
11986
+ name: "project",
11987
+ sdkName: "project",
11988
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
11989
+ }
11990
+ ],
11991
+ query: [],
11992
+ body: {
11993
+ required: true,
11994
+ fields: [
11995
+ {
11996
+ name: "ref",
11997
+ type: "object",
11998
+ required: true,
11999
+ description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
12000
+ },
12001
+ {
12002
+ name: "plan",
12003
+ type: "string",
12004
+ required: false,
12005
+ description: "Plan whose selector this run uses; omit it when passing selector instead. Naming a plan records the run against that plan, which is what a gate reads."
12006
+ },
12007
+ {
12008
+ name: "selector",
12009
+ type: "object",
12010
+ required: false,
12011
+ description: "An ad-hoc selector for this run alone, used instead of a plan's; it is not saved as a plan, so a run you want to repeat should name a plan."
12012
+ },
12013
+ {
12014
+ name: "environment",
12015
+ type: "string",
12016
+ required: false,
12017
+ description: "Environment to run against; it decides whether production-only cases become selectable. Omit it for a run that needs no environment."
12018
+ },
12019
+ {
12020
+ name: "repeat",
12021
+ type: "integer",
12022
+ required: false,
12023
+ description: "How many times each selected case runs, which is how a flake is told apart from a real failure; omit for once."
12024
+ },
12025
+ {
12026
+ name: "waitUntil",
12027
+ type: "string",
12028
+ enum: [
12029
+ "queued",
12030
+ "started",
12031
+ "finished"
12032
+ ],
12033
+ required: false,
12034
+ description: "How far the call waits before answering, bounded at about 25 seconds; omit it for queued, which returns at once. The wait reads the run's own state, so a wait that reaches the bound returns the run as it stands instead of failing — check state before assuming the request was honoured."
12035
+ },
12036
+ {
12037
+ name: "executor",
12038
+ type: "string",
12039
+ enum: [
12040
+ "cloud",
12041
+ "external"
12042
+ ],
12043
+ required: false,
12044
+ description: "Who carries the run out. cloud, the default, runs the selected cases in Praxis at the commit; external creates a run that waits for your own CI to upload a report with test-reports."
12045
+ },
12046
+ {
12047
+ name: "requestId",
12048
+ type: "string",
12049
+ required: false,
12050
+ description: "A key you choose to make creating this run idempotent: repeating the call with the same requestId returns the run it created instead of starting another, so a retry after a timeout is safe."
12051
+ }
12052
+ ]
12053
+ }
12054
+ },
12055
+ {
12056
+ resource: "devops.projects.testSuites",
12057
+ method: "list",
12058
+ summary: "List test suites",
12059
+ description: "List the suites the project's newest catalog discovered — one suite per test file and framework pair, with its size, purposes and question count. Use it to find the suite id a case belongs to, or to see which files make up an area before selecting cases from them. Suites come from the catalog, so a file added in code appears only after its commit's catalog is published. Archived suites are returned too; they carry archived true and no case is ever silently dropped from the list.",
12060
+ http: "GET",
12061
+ path: "/devops/v1/projects/{project}/test-suites",
12062
+ streaming: "no",
12063
+ pagination: false,
12064
+ pathParams: [
12065
+ {
12066
+ name: "project",
12067
+ sdkName: "project",
12068
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
12069
+ }
12070
+ ],
12071
+ query: [
12072
+ {
12073
+ name: "pageSize",
12074
+ type: "integer",
12075
+ required: false,
12076
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
12077
+ },
12078
+ {
12079
+ name: "pageToken",
12080
+ type: "string",
12081
+ required: false,
12082
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12083
+ },
12084
+ {
12085
+ name: "orderBy",
12086
+ type: "string",
12087
+ required: false,
12088
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
12089
+ }
12090
+ ]
12091
+ },
12092
+ {
12093
+ resource: "devops.testCases",
12094
+ method: "retrieve",
12095
+ summary: "Retrieve a test case",
12096
+ description: "Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.",
12097
+ http: "GET",
12098
+ path: "/devops/v1/test-cases/{id}",
12099
+ streaming: "no",
12100
+ pagination: false,
12101
+ pathParams: [
12102
+ {
12103
+ name: "id",
12104
+ sdkName: "id",
12105
+ description: "The case identifier returned by a case list, or an older id listed in that case's aliases."
12106
+ }
12107
+ ],
12108
+ query: []
12109
+ },
12110
+ {
12111
+ resource: "devops.testPlans",
12112
+ method: "delete",
12113
+ summary: "Delete a test plan",
12114
+ description: "Delete a plan so it schedules nothing further. The plan stops firing immediately; runs it already produced keep their own record and are not deleted with it. To stop a plan temporarily and keep it for later, pause it instead — deleting cannot be undone and the plan's key becomes free for another plan to take.",
12115
+ http: "DELETE",
12116
+ path: "/devops/v1/test-plans/{id}",
12117
+ streaming: "no",
12118
+ pagination: false,
12119
+ pathParams: [
12120
+ {
12121
+ name: "id",
12122
+ sdkName: "id",
12123
+ description: "The plan identifier returned by a plan list or create answer."
12124
+ }
12125
+ ],
12126
+ query: []
12127
+ },
12128
+ {
12129
+ resource: "devops.testPlans",
12130
+ method: "retrieve",
12131
+ summary: "Retrieve a test plan",
12132
+ description: "Read one plan by the id a plan list returned, to see its selector, gate, repeat count, timeout and pause state before updating or deleting it. A paused plan carries the reason, the actor and the time it resumes, so a pause you did not set is explained here rather than guessed at.",
12133
+ http: "GET",
12134
+ path: "/devops/v1/test-plans/{id}",
12135
+ streaming: "no",
12136
+ pagination: false,
12137
+ pathParams: [
12138
+ {
12139
+ name: "id",
12140
+ sdkName: "id",
12141
+ description: "The plan identifier returned by a plan list or create answer."
12142
+ }
12143
+ ],
12144
+ query: []
12145
+ },
12146
+ {
12147
+ resource: "devops.testPlans",
12148
+ method: "update",
12149
+ summary: "Update a test plan",
12150
+ description: "Change a plan's title, trigger, selector, gate, repeat count, timeout or enabled flag. Only the fields present in the body are changed, so a body naming one field leaves the rest exactly as they were. Changing a selector does not create a version — the plan is not a published artefact, and runs already started keep the selection they were created with. Read the plan first to know what you are leaving unchanged.",
12151
+ http: "PATCH",
12152
+ path: "/devops/v1/test-plans/{id}",
12153
+ streaming: "no",
12154
+ pagination: false,
12155
+ pathParams: [
12156
+ {
12157
+ name: "id",
12158
+ sdkName: "id",
12159
+ description: "The plan identifier returned by a plan list or create answer."
12160
+ }
12161
+ ],
12162
+ query: [],
12163
+ body: {
12164
+ required: true,
12165
+ fields: [
12166
+ {
12167
+ name: "plan",
12168
+ type: "object",
12169
+ required: true,
12170
+ description: "The fields to change. Anything absent keeps its current value, so read the plan first if you need to know what you are leaving alone."
12171
+ },
12172
+ {
12173
+ name: "updateMask",
12174
+ type: "string",
12175
+ required: false,
12176
+ description: "Comma-separated names of the plan fields this patch intends to change, for example title,enabled. Omit it to apply every field present in plan; naming fields makes the intent explicit and keeps a concurrent edit from being overwritten by accident."
12177
+ }
12178
+ ]
12179
+ }
12180
+ },
12181
+ {
12182
+ resource: "devops.testPlans",
12183
+ method: "pause",
12184
+ summary: "Pause a test plan",
12185
+ description: "Stop a plan from starting new runs while keeping it and its history. A reason is required and is recorded on the plan, so the next reader learns why it stopped. Give until to resume automatically at a time; omit it to stay paused until someone resumes it. Runs already in flight are not cancelled — cancel those individually.",
12186
+ http: "POST",
12187
+ path: "/devops/v1/test-plans/{id}:pause",
12188
+ streaming: "no",
12189
+ pagination: false,
12190
+ pathParams: [
12191
+ {
12192
+ name: "id",
12193
+ sdkName: "id",
12194
+ description: "The plan identifier returned by a plan list or create answer."
12195
+ }
12196
+ ],
12197
+ query: [],
12198
+ body: {
12199
+ required: true,
12200
+ fields: [
12201
+ {
12202
+ name: "reason",
12203
+ type: "string",
12204
+ required: true,
12205
+ description: "Why the plan is being paused; it is stored on the plan and read by whoever finds it stopped."
12206
+ },
12207
+ {
12208
+ name: "until",
12209
+ type: "string",
12210
+ required: false,
12211
+ description: "RFC 3339 UTC time the plan resumes by itself; omit it to stay paused until someone resumes it."
12212
+ }
12213
+ ]
12214
+ }
12215
+ },
12216
+ {
12217
+ resource: "devops.testPlans",
12218
+ method: "resume",
12219
+ summary: "Resume a test plan",
12220
+ description: "Clear a plan's pause so it schedules runs again. Resuming an active plan changes nothing and is safe to repeat. The plan keeps its selector, gate and key; only the pause is removed.",
12221
+ http: "POST",
12222
+ path: "/devops/v1/test-plans/{id}:resume",
12223
+ streaming: "no",
12224
+ pagination: false,
12225
+ pathParams: [
12226
+ {
12227
+ name: "id",
12228
+ sdkName: "id",
12229
+ description: "The plan identifier returned by a plan list or create answer."
12230
+ }
12231
+ ],
12232
+ query: []
12233
+ },
12234
+ {
12235
+ resource: "devops.testRuns",
12236
+ method: "retrieve",
12237
+ summary: "Retrieve a test run",
12238
+ description: "Read one run's current state, result and counts, and ask for its failed executions inline with expand. Poll this after creating a run whose result was pending. A result is monotonic once it reaches a verdict — a failed run never becomes passed by a later report, so read the run rather than the last report to know where it ended.",
12239
+ http: "GET",
12240
+ path: "/devops/v1/test-runs/{id}",
12241
+ streaming: "no",
12242
+ pagination: false,
12243
+ pathParams: [
12244
+ {
12245
+ name: "id",
12246
+ sdkName: "id",
12247
+ description: "The run identifier returned by a run list or create answer."
12248
+ }
12249
+ ],
12250
+ query: [
12251
+ {
12252
+ name: "expand",
12253
+ type: "array",
12254
+ itemType: "string",
12255
+ enum: [
12256
+ "failedExecutions"
12257
+ ],
12258
+ required: false,
12259
+ description: "Repeatable field to expand inline. failedExecutions returns the non-passed executions with the run, which saves a second call when you only need to see what broke; omit it for the bare run."
12260
+ }
12261
+ ]
12262
+ },
12263
+ {
12264
+ resource: "devops.testRuns",
12265
+ method: "cancel",
12266
+ summary: "Cancel a test run",
12267
+ description: "Stop a run that is still going. A reason is required and is recorded on the run, because a cancelled run is read later as evidence about why a commit was not verified. Cancelling a run that already reached a verdict is refused with RUN_ALREADY_FINISHED: its result is final and cancelling it would erase the verdict. Executions already recorded stay readable.",
12268
+ http: "POST",
12269
+ path: "/devops/v1/test-runs/{id}:cancel",
12270
+ streaming: "no",
12271
+ pagination: false,
12272
+ pathParams: [
12273
+ {
12274
+ name: "id",
12275
+ sdkName: "id",
12276
+ description: "The run identifier returned by a run list or create answer."
12277
+ }
12278
+ ],
12279
+ query: [],
12280
+ body: {
12281
+ required: true,
12282
+ fields: [
12283
+ {
12284
+ name: "reason",
12285
+ type: "string",
12286
+ required: true,
12287
+ description: "Why the run is being cancelled; it is stored on the run and is what a later reader finds instead of a result."
12288
+ }
12289
+ ]
12290
+ }
12291
+ },
12292
+ {
12293
+ resource: "devops.testRuns.executions",
12294
+ method: "list",
12295
+ summary: "List a run's executions",
12296
+ description: "List the executions recorded against one run — one entry per case the run selected, with its status, duration, attempts and evidence. Use it to find the case that failed, or to compare a repeat run against the previous one case by case. Reads happen while the run is still going, so a case may still be pending; filter by status to watch only the failures.",
12297
+ http: "GET",
12298
+ path: "/devops/v1/test-runs/{run}/executions",
12299
+ streaming: "no",
12300
+ pagination: false,
12301
+ pathParams: [
12302
+ {
12303
+ name: "run",
12304
+ sdkName: "run",
12305
+ description: "The run whose executions you are reading, from a run list or create answer."
12306
+ }
12307
+ ],
12308
+ query: [
12309
+ {
12310
+ name: "pageSize",
12311
+ type: "integer",
12312
+ required: false,
12313
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
12314
+ },
12315
+ {
12316
+ name: "pageToken",
12317
+ type: "string",
12318
+ required: false,
12319
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
12320
+ },
12321
+ {
12322
+ name: "filter",
12323
+ type: "string",
12324
+ required: false,
12325
+ description: "AIP-160 equality filter over one declared field, for example result=failed to read only a run's failures. Fields an execution list does not declare are refused with INVALID_ARGUMENT rather than ignored."
12326
+ },
12327
+ {
12328
+ name: "orderBy",
12329
+ type: "string",
12330
+ required: false,
12331
+ description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
12332
+ }
12333
+ ]
12334
+ },
12335
+ {
12336
+ resource: "devops.testRuns.executions",
12337
+ method: "retrieve",
12338
+ summary: "Retrieve one case's execution in a run",
12339
+ description: "Read one case's execution inside one run, including every attempt with its own duration and message. Use it after a run reports a failure to see whether the case failed once and passed on retry — that is what flaky true means — and to reach the evidence files a triage needs. Both ids come from the run and case reads; an execution that does not exist for that pair is NOT_FOUND rather than an empty answer.",
12340
+ http: "GET",
12341
+ path: "/devops/v1/test-runs/{run}/executions/{case}",
12342
+ streaming: "no",
12343
+ pagination: false,
12344
+ pathParams: [
12345
+ {
12346
+ name: "run",
12347
+ sdkName: "run",
12348
+ description: "The run whose executions you are reading, from a run list or create answer."
12349
+ },
12350
+ {
12351
+ name: "case",
12352
+ sdkName: "case",
12353
+ description: "The case to read inside that run, from the run's execution list or the project's case list."
12354
+ }
12355
+ ],
12356
+ query: []
12357
+ },
12358
+ {
12359
+ resource: "devops.testSuites",
12360
+ method: "retrieve",
12361
+ summary: "Retrieve a test suite",
12362
+ description: "Read one suite by the id a suite list returned, to learn its file, framework, size, purposes and how many cases it holds. Use it when a case's suite id needs a name for display, or to confirm which commit's catalog a suite came from. The id is opaque; it comes from the list, never from the file path.",
12363
+ http: "GET",
12364
+ path: "/devops/v1/test-suites/{id}",
12365
+ streaming: "no",
12366
+ pagination: false,
12367
+ pathParams: [
12368
+ {
12369
+ name: "id",
12370
+ sdkName: "id",
12371
+ description: "The suite identifier returned by a suite list, not the file path it was discovered from."
12372
+ }
12373
+ ],
12374
+ query: []
12375
+ },
11428
12376
  {
11429
12377
  resource: "file.files",
11430
12378
  method: "list",
@@ -12873,7 +13821,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12873
13821
  resource: "media.libraries.assets",
12874
13822
  method: "create",
12875
13823
  summary: "Upload asset",
12876
- description: " For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
13824
+ description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
12877
13825
  http: "POST",
12878
13826
  path: "/media/v1/libraries/{library_id}/assets",
12879
13827
  streaming: "no",
@@ -12997,7 +13945,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
12997
13945
  resource: "media.libraries.assets.import",
12998
13946
  method: "create",
12999
13947
  summary: "Import file",
13000
- description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
13948
+ description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
13001
13949
  http: "POST",
13002
13950
  path: "/media/v1/libraries/{library_id}/assets/import",
13003
13951
  streaming: "no",
@@ -13265,7 +14213,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13265
14213
  resource: "media.libraries.assets.reprocess",
13266
14214
  method: "create",
13267
14215
  summary: "Reprocess asset",
13268
- description: " For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
14216
+ description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
13269
14217
  http: "POST",
13270
14218
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
13271
14219
  streaming: "no",
@@ -13341,10 +14289,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13341
14289
  "frame",
13342
14290
  "overview",
13343
14291
  "audio",
14292
+ "loudness",
14293
+ "beats",
14294
+ "content",
13344
14295
  "embedding"
13345
14296
  ],
13346
14297
  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."
14298
+ description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, loudness is measured loudness, beats is the measured tempo and beat grid, content is the derived speech, music and silence split, and embedding reports a failed embedding step."
13348
14299
  },
13349
14300
  {
13350
14301
  name: "cursor",
@@ -13364,7 +14315,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13364
14315
  resource: "media.libraries.assets",
13365
14316
  method: "batch",
13366
14317
  summary: "Batch assets alias",
13367
- description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
14318
+ description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
13368
14319
  http: "POST",
13369
14320
  path: "/media/v1/libraries/{library_id}/assets:batch",
13370
14321
  streaming: "no",
@@ -13399,7 +14350,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
13399
14350
  resource: "media.libraries.batches",
13400
14351
  method: "create",
13401
14352
  summary: "Create batch",
13402
- description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
14353
+ description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
13403
14354
  http: "POST",
13404
14355
  path: "/media/v1/libraries/{library_id}/batches",
13405
14356
  streaming: "no",
@@ -14096,7 +15047,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
14096
15047
  name: "kinds",
14097
15048
  type: "string",
14098
15049
  required: false,
14099
- description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, embedding. Omit or empty to include every kind."
15050
+ description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, loudness, beats, content, embedding. Omit or empty to include every kind."
14100
15051
  },
14101
15052
  {
14102
15053
  name: "cursor",
@@ -16612,6 +17563,539 @@ for more details.`
16612
17563
  ],
16613
17564
  query: []
16614
17565
  },
17566
+ {
17567
+ resource: "ontology.changesets",
17568
+ method: "create",
17569
+ summary: "Apply changeset",
17570
+ description: "Apply a batch of node, relation and invalidation operations as one transaction, when a mirror has several records to write together and a partial write would leave the graph inconsistent. Every operation succeeds or none is applied. Send an Idempotency-Key header; the same key with the same content replays the first result, and the same key with different content is ONTOLOGY_CONFLICT.",
17571
+ http: "POST",
17572
+ path: "/ontology/v1/changesets",
17573
+ streaming: "no",
17574
+ pagination: false,
17575
+ pathParams: [],
17576
+ query: [],
17577
+ body: {
17578
+ required: true,
17579
+ fields: [
17580
+ {
17581
+ name: "at",
17582
+ type: "string",
17583
+ required: true,
17584
+ description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
17585
+ },
17586
+ {
17587
+ name: "scope",
17588
+ type: "string",
17589
+ required: false,
17590
+ description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
17591
+ },
17592
+ {
17593
+ name: "ops",
17594
+ type: "array",
17595
+ itemType: "object",
17596
+ required: true,
17597
+ description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
17598
+ }
17599
+ ]
17600
+ }
17601
+ },
17602
+ {
17603
+ resource: "ontology.nodes",
17604
+ method: "list",
17605
+ summary: "List nodes",
17606
+ description: "Discover the entities in this organization's graph and obtain node ids for retrieval, updates and relations. Filter by type, by free text over names, aliases, descriptions and facts, or by owner; limit is 1–100 and defaults to 50. Omit cursor for the first page, then copy next_cursor into the next request until it is null. A node whose content belongs to somebody else comes back as a restricted entry carrying only its id, type and name.",
17607
+ http: "GET",
17608
+ path: "/ontology/v1/nodes",
17609
+ streaming: "no",
17610
+ pagination: true,
17611
+ pathParams: [],
17612
+ query: [
17613
+ {
17614
+ name: "type",
17615
+ type: "array",
17616
+ itemType: "string",
17617
+ required: false,
17618
+ description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
17619
+ },
17620
+ {
17621
+ name: "q",
17622
+ type: "string",
17623
+ required: false,
17624
+ description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
17625
+ },
17626
+ {
17627
+ name: "owner",
17628
+ type: "string",
17629
+ required: false,
17630
+ description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
17631
+ },
17632
+ {
17633
+ name: "as_of",
17634
+ type: "string",
17635
+ required: false,
17636
+ description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
17637
+ },
17638
+ {
17639
+ name: "limit",
17640
+ type: "integer",
17641
+ required: false,
17642
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17643
+ },
17644
+ {
17645
+ name: "cursor",
17646
+ type: "string",
17647
+ required: false,
17648
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
17649
+ }
17650
+ ]
17651
+ },
17652
+ {
17653
+ resource: "ontology.nodes",
17654
+ method: "create",
17655
+ summary: "Create node",
17656
+ description: "Record one entity in the graph, for a system mirroring a record it owns. type must already be registered and ref, when given, must match that type's ref_prefix. Send an Idempotency-Key header; repeating the same key with the same content returns the first result instead of creating a second node. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.",
17657
+ http: "POST",
17658
+ path: "/ontology/v1/nodes",
17659
+ streaming: "no",
17660
+ pagination: false,
17661
+ pathParams: [],
17662
+ query: [],
17663
+ body: {
17664
+ required: true,
17665
+ fields: [
17666
+ {
17667
+ name: "type",
17668
+ type: "string",
17669
+ required: true,
17670
+ description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
17671
+ },
17672
+ {
17673
+ name: "ref",
17674
+ type: "string",
17675
+ required: false,
17676
+ description: "Id of the mirrored record in the owning service, which must start with the type's ref_prefix; omit or null for a concept with no external record."
17677
+ },
17678
+ {
17679
+ name: "name",
17680
+ type: "string",
17681
+ required: true,
17682
+ description: "Display name of the entity, at most 200 characters."
17683
+ },
17684
+ {
17685
+ name: "aliases",
17686
+ type: "array",
17687
+ itemType: "string",
17688
+ required: false,
17689
+ description: "Other names this entity is known by; they are matched by search alongside the name."
17690
+ },
17691
+ {
17692
+ name: "description",
17693
+ type: "string",
17694
+ required: false,
17695
+ description: "Profile of the entity, at most 500 characters; omit or null for none."
17696
+ },
17697
+ {
17698
+ name: "owner",
17699
+ type: "string",
17700
+ required: false,
17701
+ description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
17702
+ }
17703
+ ]
17704
+ }
17705
+ },
17706
+ {
17707
+ resource: "ontology.nodes",
17708
+ method: "retrieve",
17709
+ summary: "Retrieve node",
17710
+ description: "Read one node's content and, with expand=relations, every relation on and around it. as_of reads the node as it was at that time. A node id from another organization, or one that never existed, answers ONTOLOGY_NODE_NOT_FOUND; a node you may reach but not read returns restricted true with its name only.",
17711
+ http: "GET",
17712
+ path: "/ontology/v1/nodes/{node_id}",
17713
+ streaming: "no",
17714
+ pagination: false,
17715
+ pathParams: [
17716
+ {
17717
+ name: "node_id",
17718
+ sdkName: "node_id",
17719
+ description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
17720
+ }
17721
+ ],
17722
+ query: [
17723
+ {
17724
+ name: "expand",
17725
+ type: "string",
17726
+ enum: [
17727
+ "relations"
17728
+ ],
17729
+ required: false,
17730
+ description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
17731
+ },
17732
+ {
17733
+ name: "as_of",
17734
+ type: "string",
17735
+ required: false,
17736
+ description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
17737
+ }
17738
+ ]
17739
+ },
17740
+ {
17741
+ resource: "ontology.nodes",
17742
+ method: "update",
17743
+ summary: "Update node",
17744
+ description: "Change a node's name, aliases or description when the mirrored record was renamed, without touching its type or identity. Send only the fields to change; omitted fields keep their current values and an explicitly null description clears it. Repeating the same edit converges on the same node, so this needs no Idempotency-Key.",
17745
+ http: "PATCH",
17746
+ path: "/ontology/v1/nodes/{node_id}",
17747
+ streaming: "no",
17748
+ pagination: false,
17749
+ pathParams: [
17750
+ {
17751
+ name: "node_id",
17752
+ sdkName: "node_id",
17753
+ description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
17754
+ }
17755
+ ],
17756
+ query: [],
17757
+ body: {
17758
+ required: true,
17759
+ fields: [
17760
+ {
17761
+ name: "name",
17762
+ type: "string",
17763
+ required: false,
17764
+ description: "New display name, at most 200 characters; omit to keep the current name."
17765
+ },
17766
+ {
17767
+ name: "aliases",
17768
+ type: "array",
17769
+ itemType: "string",
17770
+ required: false,
17771
+ description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
17772
+ },
17773
+ {
17774
+ name: "description",
17775
+ type: "string",
17776
+ required: false,
17777
+ description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
17778
+ }
17779
+ ]
17780
+ }
17781
+ },
17782
+ {
17783
+ resource: "ontology.nodes.merge",
17784
+ method: "create",
17785
+ summary: "Merge node",
17786
+ description: "Fold a duplicate node into the node that should survive, when two records are discovered to be the same entity. The merged node's relations and aliases move to the survivor and later reads of the duplicate resolve to it. Send an Idempotency-Key header; repeating the same key replays the first result. Reversal is a staff operation, not available here.",
17787
+ http: "POST",
17788
+ path: "/ontology/v1/nodes/{node_id}/merge",
17789
+ streaming: "no",
17790
+ pagination: false,
17791
+ pathParams: [
17792
+ {
17793
+ name: "node_id",
17794
+ sdkName: "node_id",
17795
+ description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
17796
+ }
17797
+ ],
17798
+ query: [],
17799
+ body: {
17800
+ required: true,
17801
+ fields: [
17802
+ {
17803
+ name: "into",
17804
+ type: "string",
17805
+ required: true,
17806
+ description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
17807
+ }
17808
+ ]
17809
+ }
17810
+ },
17811
+ {
17812
+ resource: "ontology.relations",
17813
+ method: "list",
17814
+ summary: "List relations",
17815
+ description: "Read the facts in the graph and obtain relation ids for retrieval, invalidation or spreading. Filter by endpoint node, by type and by direction; as_of reads the relations as they were then. Invalidated relations are omitted unless include_invalid is true. limit is 1–100 and defaults to 50; follow next_cursor until it is null.",
17816
+ http: "GET",
17817
+ path: "/ontology/v1/relations",
17818
+ streaming: "no",
17819
+ pagination: true,
17820
+ pathParams: [],
17821
+ query: [
17822
+ {
17823
+ name: "node",
17824
+ type: "string",
17825
+ required: false,
17826
+ description: "A node id from nodes.list or nodes.create; returns the relations this node takes part in, narrowed by direction. Omit to list relations between every node."
17827
+ },
17828
+ {
17829
+ name: "type",
17830
+ type: "array",
17831
+ itemType: "string",
17832
+ required: false,
17833
+ description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
17834
+ },
17835
+ {
17836
+ name: "direction",
17837
+ type: "string",
17838
+ enum: [
17839
+ "out",
17840
+ "in",
17841
+ "both"
17842
+ ],
17843
+ required: false,
17844
+ description: "Which side of node to follow; out returns relations the node is the source of, in returns those it is the target of. Only meaningful together with node."
17845
+ },
17846
+ {
17847
+ name: "as_of",
17848
+ type: "string",
17849
+ required: false,
17850
+ description: "ISO 8601 timestamp; read relations as they were then, so one recorded or invalidated later is judged by that time. Omit to read current state."
17851
+ },
17852
+ {
17853
+ name: "include_invalid",
17854
+ type: "boolean",
17855
+ required: false,
17856
+ description: "Set true to include relations whose invalid_at has passed, which is how a relation that stopped being true stays readable. Omit or false for currently valid relations only."
17857
+ },
17858
+ {
17859
+ name: "limit",
17860
+ type: "integer",
17861
+ required: false,
17862
+ description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
17863
+ },
17864
+ {
17865
+ name: "cursor",
17866
+ type: "string",
17867
+ required: false,
17868
+ description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
17869
+ }
17870
+ ]
17871
+ },
17872
+ {
17873
+ resource: "ontology.relations",
17874
+ method: "create",
17875
+ summary: "Create relation",
17876
+ description: "Record one fact between two existing nodes, for a system mirroring a relationship it owns. type must be registered and must admit these endpoints; fact states the relationship in one sentence. Send an Idempotency-Key header; repeating the same key returns the first result instead of writing a second relation. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.",
17877
+ http: "POST",
17878
+ path: "/ontology/v1/relations",
17879
+ streaming: "no",
17880
+ pagination: false,
17881
+ pathParams: [],
17882
+ query: [],
17883
+ body: {
17884
+ required: true,
17885
+ fields: [
17886
+ {
17887
+ name: "type",
17888
+ type: "string",
17889
+ required: true,
17890
+ description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
17891
+ },
17892
+ {
17893
+ name: "source",
17894
+ type: "string",
17895
+ required: true,
17896
+ description: "Node id the fact starts from, from nodes.list or nodes.create."
17897
+ },
17898
+ {
17899
+ name: "target",
17900
+ type: "string",
17901
+ required: true,
17902
+ description: "Node id the fact points at, from nodes.list or nodes.create."
17903
+ },
17904
+ {
17905
+ name: "fact",
17906
+ type: "string",
17907
+ required: true,
17908
+ description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
17909
+ },
17910
+ {
17911
+ name: "valid_at",
17912
+ type: "string",
17913
+ required: false,
17914
+ description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
17915
+ },
17916
+ {
17917
+ name: "owner",
17918
+ type: "string",
17919
+ required: false,
17920
+ description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
17921
+ }
17922
+ ]
17923
+ }
17924
+ },
17925
+ {
17926
+ resource: "ontology.relations",
17927
+ method: "retrieve",
17928
+ summary: "Retrieve relation",
17929
+ description: "Read one relation's fact and both of its clocks — valid_at and invalid_at for when it was true in the world, created_at and expired_at for when it was recorded and retired. An id from another organization, or one that never existed, answers ONTOLOGY_EDGE_NOT_FOUND.",
17930
+ http: "GET",
17931
+ path: "/ontology/v1/relations/{relation_id}",
17932
+ streaming: "no",
17933
+ pagination: false,
17934
+ pathParams: [
17935
+ {
17936
+ name: "relation_id",
17937
+ sdkName: "relation_id",
17938
+ description: "Relation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted."
17939
+ }
17940
+ ],
17941
+ query: []
17942
+ },
17943
+ {
17944
+ resource: "ontology.relations.invalidate",
17945
+ method: "create",
17946
+ summary: "Invalidate relation",
17947
+ description: "Mark a relation as no longer true from a world time, when the mirrored record changed. The relation is kept — invalid_at moves and the relation still reads at an earlier as_of, so history stays answerable. Send an Idempotency-Key header; repeating the same key replays the first result. There is no delete.",
17948
+ http: "POST",
17949
+ path: "/ontology/v1/relations/{relation_id}/invalidate",
17950
+ streaming: "no",
17951
+ pagination: false,
17952
+ pathParams: [
17953
+ {
17954
+ name: "relation_id",
17955
+ sdkName: "relation_id",
17956
+ description: "Relation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted."
17957
+ }
17958
+ ],
17959
+ query: [],
17960
+ body: {
17961
+ required: true,
17962
+ fields: [
17963
+ {
17964
+ name: "invalid_at",
17965
+ type: "string",
17966
+ required: true,
17967
+ description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
17968
+ },
17969
+ {
17970
+ name: "superseded_by",
17971
+ type: "string",
17972
+ required: false,
17973
+ description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
17974
+ },
17975
+ {
17976
+ name: "reason",
17977
+ type: "string",
17978
+ required: false,
17979
+ description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
17980
+ }
17981
+ ]
17982
+ }
17983
+ },
17984
+ {
17985
+ resource: "ontology.search",
17986
+ method: "create",
17987
+ summary: "Search nodes",
17988
+ description: "Resolve text to the nodes it most likely names, when a mirror holds a name and needs the node id it corresponds to. Results are ranked candidates, not an answer, each reporting whether the match came from the node's name, an alias, its description or a relation's fact. Narrow with types, and cap the result count with limit (1–50, default 20). This reads structure; it is not an agent recall — agents recall through POST /agent/v1/agents/{agent_id}/consolidations.",
17989
+ http: "POST",
17990
+ path: "/ontology/v1/search",
17991
+ streaming: "no",
17992
+ pagination: false,
17993
+ pathParams: [],
17994
+ query: [],
17995
+ body: {
17996
+ required: true,
17997
+ fields: [
17998
+ {
17999
+ name: "text",
18000
+ type: "string",
18001
+ required: true,
18002
+ description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
18003
+ },
18004
+ {
18005
+ name: "types",
18006
+ type: "array",
18007
+ itemType: "string",
18008
+ required: false,
18009
+ description: "Registered node type names to search within; omit to search every type."
18010
+ },
18011
+ {
18012
+ name: "window",
18013
+ type: "object",
18014
+ required: false,
18015
+ description: "Restrict matches to facts recorded within a period; omit to search all time."
18016
+ },
18017
+ {
18018
+ name: "limit",
18019
+ type: "integer",
18020
+ required: false,
18021
+ description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
18022
+ }
18023
+ ]
18024
+ }
18025
+ },
18026
+ {
18027
+ resource: "ontology.types",
18028
+ method: "list",
18029
+ summary: "List types",
18030
+ description: "Read the node and relation types registered for this organization before writing, so a create names a type the graph accepts. Each entry is one registrant's registration with its owner, version and definitions. Types cannot be created at runtime; they are registered by the owning service at deploy time, so a type missing here is not available to write.",
18031
+ http: "GET",
18032
+ path: "/ontology/v1/types",
18033
+ streaming: "no",
18034
+ pagination: false,
18035
+ pathParams: [],
18036
+ query: []
18037
+ },
18038
+ {
18039
+ resource: "ontology.types",
18040
+ method: "create",
18041
+ summary: "Register type",
18042
+ description: "Register a node or relation type for this organization. Not open yet — this call currently answers 501 NOT_IMPLEMENTED and writes nothing, because a registration is checked and stored by the deploy gate that ships the registering service, not by a runtime call. Until it opens, read the types already in force with praxis.ontology.types.list and create records only of those types.",
18043
+ http: "POST",
18044
+ path: "/ontology/v1/types",
18045
+ streaming: "no",
18046
+ pagination: false,
18047
+ pathParams: [],
18048
+ query: [],
18049
+ body: {
18050
+ required: true,
18051
+ fields: [
18052
+ {
18053
+ name: "owner",
18054
+ type: "string",
18055
+ required: true,
18056
+ description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
18057
+ },
18058
+ {
18059
+ name: "version",
18060
+ type: "integer",
18061
+ required: true,
18062
+ description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
18063
+ },
18064
+ {
18065
+ name: "nodes",
18066
+ type: "array",
18067
+ itemType: "object",
18068
+ required: true,
18069
+ description: "Node types this owner registers."
18070
+ },
18071
+ {
18072
+ name: "edges",
18073
+ type: "array",
18074
+ itemType: "object",
18075
+ required: true,
18076
+ description: "Relation types this owner registers."
18077
+ }
18078
+ ]
18079
+ }
18080
+ },
18081
+ {
18082
+ resource: "ontology.types",
18083
+ method: "retrieve",
18084
+ summary: "Retrieve type",
18085
+ description: "Read one registered type's definition before writing a record of it, to learn whether it is a node or an edge, which endpoints an edge type admits, and which origins it accepts. The name comes from types.list; a name that is not registered answers ONTOLOGY_TYPE_UNKNOWN, and writes of that type are refused.",
18086
+ http: "GET",
18087
+ path: "/ontology/v1/types/{name}",
18088
+ streaming: "no",
18089
+ pagination: false,
18090
+ pathParams: [
18091
+ {
18092
+ name: "name",
18093
+ sdkName: "name",
18094
+ description: "A type name from types.list, with its dots preserved — a display label is not accepted."
18095
+ }
18096
+ ],
18097
+ query: []
18098
+ },
16615
18099
  {
16616
18100
  resource: "organization.charges",
16617
18101
  method: "list",
@@ -19335,7 +20819,7 @@ for more details.`
19335
20819
  resource: "ticket.labels",
19336
20820
  method: "create",
19337
20821
  summary: "Create or add labels",
19338
- description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20822
+ description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19339
20823
  http: "POST",
19340
20824
  path: "/ticket/v1/labels",
19341
20825
  streaming: "no",
@@ -19377,7 +20861,7 @@ for more details.`
19377
20861
  resource: "ticket.labels",
19378
20862
  method: "delete",
19379
20863
  summary: "Remove labels",
19380
- description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20864
+ description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19381
20865
  http: "DELETE",
19382
20866
  path: "/ticket/v1/labels/{name}",
19383
20867
  streaming: "no",
@@ -19402,7 +20886,7 @@ for more details.`
19402
20886
  resource: "ticket.labels",
19403
20887
  method: "update",
19404
20888
  summary: "Update labels",
19405
- description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.",
20889
+ description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
19406
20890
  http: "PATCH",
19407
20891
  path: "/ticket/v1/labels/{name}",
19408
20892
  streaming: "no",
@@ -21337,6 +22821,8 @@ function problemFrom(status, headers, body, statusText) {
21337
22821
  param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
21338
22822
  errors: Array.isArray(value.errors) ? value.errors : [],
21339
22823
  requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
22824
+ docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
22825
+ describe: string(nested.describe) ?? string(value.describe),
21340
22826
  raw: body
21341
22827
  };
21342
22828
  }
@@ -21350,6 +22836,8 @@ class PraxisError extends Error {
21350
22836
  errors;
21351
22837
  requestId;
21352
22838
  param;
22839
+ docUrl;
22840
+ describe;
21353
22841
  raw;
21354
22842
  constructor(problem = {}, options) {
21355
22843
  super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
@@ -21362,6 +22850,8 @@ class PraxisError extends Error {
21362
22850
  this.errors = problem.errors ?? [];
21363
22851
  this.requestId = problem.requestId;
21364
22852
  this.param = problem.param;
22853
+ this.docUrl = problem.docUrl;
22854
+ this.describe = problem.describe;
21365
22855
  this.raw = problem.raw;
21366
22856
  }
21367
22857
  static fromResponse(response, body) {
@@ -22766,6 +24256,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
22766
24256
  url: "/agent/v1/computers/{computer_id}/files/content",
22767
24257
  ...options
22768
24258
  });
24259
+ var computersFilesConvert = (options) => (options.client ?? client).post({
24260
+ security: [{
24261
+ key: "BearerAuth",
24262
+ scheme: "bearer",
24263
+ type: "http"
24264
+ }, {
24265
+ key: "ApiKeyAuth",
24266
+ name: "X-API-Key",
24267
+ type: "apiKey"
24268
+ }],
24269
+ url: "/agent/v1/computers/{computer_id}/files/convert",
24270
+ ...options,
24271
+ headers: {
24272
+ "Content-Type": "application/json",
24273
+ ...options.headers
24274
+ }
24275
+ });
22769
24276
  var connectComputer = (options) => (options.client ?? client).post({
22770
24277
  security: [{
22771
24278
  key: "BearerAuth",
@@ -27149,6 +28656,36 @@ var cutCreateExport = (options) => (options.client ?? client).post({
27149
28656
  ...options.headers
27150
28657
  }
27151
28658
  });
28659
+ var cutCreateRender = (options) => (options.client ?? client).post({
28660
+ security: [{
28661
+ key: "BearerAuth",
28662
+ scheme: "bearer",
28663
+ type: "http"
28664
+ }, {
28665
+ key: "ApiKeyAuth",
28666
+ name: "X-API-Key",
28667
+ type: "apiKey"
28668
+ }],
28669
+ url: "/cut/v1/projects/{project_id}/renders",
28670
+ ...options,
28671
+ headers: {
28672
+ "Content-Type": "application/json",
28673
+ ...options.headers
28674
+ }
28675
+ });
28676
+ var cutRetrieveRender = (options) => (options.client ?? client).get({
28677
+ security: [{
28678
+ key: "BearerAuth",
28679
+ scheme: "bearer",
28680
+ type: "http"
28681
+ }, {
28682
+ key: "ApiKeyAuth",
28683
+ name: "X-API-Key",
28684
+ type: "apiKey"
28685
+ }],
28686
+ url: "/cut/v1/renders/{render_id}",
28687
+ ...options
28688
+ });
27152
28689
  var cutRetrieveExport = (options) => (options.client ?? client).get({
27153
28690
  security: [{
27154
28691
  key: "BearerAuth",
@@ -27439,6 +28976,201 @@ var databaseInsert = (options) => (options.client ?? client).post({
27439
28976
  ...options.headers
27440
28977
  }
27441
28978
  });
28979
+ var devopsTestCatalogGet = (options) => (options.client ?? client).get({
28980
+ security: [{
28981
+ key: "devops-bearerAuth",
28982
+ scheme: "bearer",
28983
+ type: "http"
28984
+ }],
28985
+ url: "/devops/v1/projects/{project}/test-catalog",
28986
+ ...options
28987
+ });
28988
+ var devopsTestSuitesList = (options) => (options.client ?? client).get({
28989
+ security: [{
28990
+ key: "devops-bearerAuth",
28991
+ scheme: "bearer",
28992
+ type: "http"
28993
+ }],
28994
+ url: "/devops/v1/projects/{project}/test-suites",
28995
+ ...options
28996
+ });
28997
+ var devopsTestSuitesGet = (options) => (options.client ?? client).get({
28998
+ security: [{
28999
+ key: "devops-bearerAuth",
29000
+ scheme: "bearer",
29001
+ type: "http"
29002
+ }],
29003
+ url: "/devops/v1/test-suites/{id}",
29004
+ ...options
29005
+ });
29006
+ var devopsTestCasesList = (options) => (options.client ?? client).get({
29007
+ security: [{
29008
+ key: "devops-bearerAuth",
29009
+ scheme: "bearer",
29010
+ type: "http"
29011
+ }],
29012
+ url: "/devops/v1/projects/{project}/test-cases",
29013
+ ...options
29014
+ });
29015
+ var devopsTestCasesGet = (options) => (options.client ?? client).get({
29016
+ security: [{
29017
+ key: "devops-bearerAuth",
29018
+ scheme: "bearer",
29019
+ type: "http"
29020
+ }],
29021
+ url: "/devops/v1/test-cases/{id}",
29022
+ ...options
29023
+ });
29024
+ var devopsTestPlansList = (options) => (options.client ?? client).get({
29025
+ security: [{
29026
+ key: "devops-bearerAuth",
29027
+ scheme: "bearer",
29028
+ type: "http"
29029
+ }],
29030
+ url: "/devops/v1/projects/{project}/test-plans",
29031
+ ...options
29032
+ });
29033
+ var devopsTestPlansCreate = (options) => (options.client ?? client).post({
29034
+ security: [{
29035
+ key: "devops-bearerAuth",
29036
+ scheme: "bearer",
29037
+ type: "http"
29038
+ }],
29039
+ url: "/devops/v1/projects/{project}/test-plans",
29040
+ ...options,
29041
+ headers: {
29042
+ "Content-Type": "application/json",
29043
+ ...options.headers
29044
+ }
29045
+ });
29046
+ var devopsTestPlansDelete = (options) => (options.client ?? client).delete({
29047
+ security: [{
29048
+ key: "devops-bearerAuth",
29049
+ scheme: "bearer",
29050
+ type: "http"
29051
+ }],
29052
+ url: "/devops/v1/test-plans/{id}",
29053
+ ...options
29054
+ });
29055
+ var devopsTestPlansGet = (options) => (options.client ?? client).get({
29056
+ security: [{
29057
+ key: "devops-bearerAuth",
29058
+ scheme: "bearer",
29059
+ type: "http"
29060
+ }],
29061
+ url: "/devops/v1/test-plans/{id}",
29062
+ ...options
29063
+ });
29064
+ var devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
29065
+ security: [{
29066
+ key: "devops-bearerAuth",
29067
+ scheme: "bearer",
29068
+ type: "http"
29069
+ }],
29070
+ url: "/devops/v1/test-plans/{id}",
29071
+ ...options,
29072
+ headers: {
29073
+ "Content-Type": "application/json",
29074
+ ...options.headers
29075
+ }
29076
+ });
29077
+ var devopsTestPlansPause = (options) => (options.client ?? client).post({
29078
+ security: [{
29079
+ key: "devops-bearerAuth",
29080
+ scheme: "bearer",
29081
+ type: "http"
29082
+ }],
29083
+ url: "/devops/v1/test-plans/{id}:pause",
29084
+ ...options,
29085
+ headers: {
29086
+ "Content-Type": "application/json",
29087
+ ...options.headers
29088
+ }
29089
+ });
29090
+ var devopsTestPlansResume = (options) => (options.client ?? client).post({
29091
+ security: [{
29092
+ key: "devops-bearerAuth",
29093
+ scheme: "bearer",
29094
+ type: "http"
29095
+ }],
29096
+ url: "/devops/v1/test-plans/{id}:resume",
29097
+ ...options
29098
+ });
29099
+ var devopsTestRunsList = (options) => (options.client ?? client).get({
29100
+ security: [{
29101
+ key: "devops-bearerAuth",
29102
+ scheme: "bearer",
29103
+ type: "http"
29104
+ }],
29105
+ url: "/devops/v1/projects/{project}/test-runs",
29106
+ ...options
29107
+ });
29108
+ var devopsTestRunsCreate = (options) => (options.client ?? client).post({
29109
+ security: [{
29110
+ key: "devops-bearerAuth",
29111
+ scheme: "bearer",
29112
+ type: "http"
29113
+ }],
29114
+ url: "/devops/v1/projects/{project}/test-runs",
29115
+ ...options,
29116
+ headers: {
29117
+ "Content-Type": "application/json",
29118
+ ...options.headers
29119
+ }
29120
+ });
29121
+ var devopsTestRunsGet = (options) => (options.client ?? client).get({
29122
+ security: [{
29123
+ key: "devops-bearerAuth",
29124
+ scheme: "bearer",
29125
+ type: "http"
29126
+ }],
29127
+ url: "/devops/v1/test-runs/{id}",
29128
+ ...options
29129
+ });
29130
+ var devopsTestRunsCancel = (options) => (options.client ?? client).post({
29131
+ security: [{
29132
+ key: "devops-bearerAuth",
29133
+ scheme: "bearer",
29134
+ type: "http"
29135
+ }],
29136
+ url: "/devops/v1/test-runs/{id}:cancel",
29137
+ ...options,
29138
+ headers: {
29139
+ "Content-Type": "application/json",
29140
+ ...options.headers
29141
+ }
29142
+ });
29143
+ var devopsTestExecutionsList = (options) => (options.client ?? client).get({
29144
+ security: [{
29145
+ key: "devops-bearerAuth",
29146
+ scheme: "bearer",
29147
+ type: "http"
29148
+ }],
29149
+ url: "/devops/v1/test-runs/{run}/executions",
29150
+ ...options
29151
+ });
29152
+ var devopsTestExecutionsGet = (options) => (options.client ?? client).get({
29153
+ security: [{
29154
+ key: "devops-bearerAuth",
29155
+ scheme: "bearer",
29156
+ type: "http"
29157
+ }],
29158
+ url: "/devops/v1/test-runs/{run}/executions/{case}",
29159
+ ...options
29160
+ });
29161
+ var devopsTestReportsUpload = (options) => (options.client ?? client).post({
29162
+ security: [{
29163
+ key: "devops-bearerAuth",
29164
+ scheme: "bearer",
29165
+ type: "http"
29166
+ }],
29167
+ url: "/devops/v1/projects/{project}/test-reports",
29168
+ ...options,
29169
+ headers: {
29170
+ "Content-Type": "application/json",
29171
+ ...options.headers
29172
+ }
29173
+ });
27442
29174
  var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
27443
29175
  security: [{
27444
29176
  key: "knowledge-bearerAuth",
@@ -28031,6 +29763,164 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
28031
29763
  url: "/media/v1/generation/capabilities",
28032
29764
  ...options
28033
29765
  });
29766
+ var ontologyListTypes = (options) => (options?.client ?? client).get({
29767
+ security: [{
29768
+ key: "ontology-bearerAuth",
29769
+ scheme: "bearer",
29770
+ type: "http"
29771
+ }],
29772
+ url: "/ontology/v1/types",
29773
+ ...options
29774
+ });
29775
+ var ontologyRegisterType = (options) => (options.client ?? client).post({
29776
+ security: [{
29777
+ key: "ontology-bearerAuth",
29778
+ scheme: "bearer",
29779
+ type: "http"
29780
+ }],
29781
+ url: "/ontology/v1/types",
29782
+ ...options,
29783
+ headers: {
29784
+ "Content-Type": "application/json",
29785
+ ...options.headers
29786
+ }
29787
+ });
29788
+ var ontologyRetrieveType = (options) => (options.client ?? client).get({
29789
+ security: [{
29790
+ key: "ontology-bearerAuth",
29791
+ scheme: "bearer",
29792
+ type: "http"
29793
+ }],
29794
+ url: "/ontology/v1/types/{name}",
29795
+ ...options
29796
+ });
29797
+ var ontologyListNodes = (options) => (options?.client ?? client).get({
29798
+ security: [{
29799
+ key: "ontology-bearerAuth",
29800
+ scheme: "bearer",
29801
+ type: "http"
29802
+ }],
29803
+ url: "/ontology/v1/nodes",
29804
+ ...options
29805
+ });
29806
+ var ontologyCreateNode = (options) => (options.client ?? client).post({
29807
+ security: [{
29808
+ key: "ontology-bearerAuth",
29809
+ scheme: "bearer",
29810
+ type: "http"
29811
+ }],
29812
+ url: "/ontology/v1/nodes",
29813
+ ...options,
29814
+ headers: {
29815
+ "Content-Type": "application/json",
29816
+ ...options.headers
29817
+ }
29818
+ });
29819
+ var ontologyRetrieveNode = (options) => (options.client ?? client).get({
29820
+ security: [{
29821
+ key: "ontology-bearerAuth",
29822
+ scheme: "bearer",
29823
+ type: "http"
29824
+ }],
29825
+ url: "/ontology/v1/nodes/{node_id}",
29826
+ ...options
29827
+ });
29828
+ var ontologyUpdateNode = (options) => (options.client ?? client).patch({
29829
+ security: [{
29830
+ key: "ontology-bearerAuth",
29831
+ scheme: "bearer",
29832
+ type: "http"
29833
+ }],
29834
+ url: "/ontology/v1/nodes/{node_id}",
29835
+ ...options,
29836
+ headers: {
29837
+ "Content-Type": "application/json",
29838
+ ...options.headers
29839
+ }
29840
+ });
29841
+ var ontologyMergeNode = (options) => (options.client ?? client).post({
29842
+ security: [{
29843
+ key: "ontology-bearerAuth",
29844
+ scheme: "bearer",
29845
+ type: "http"
29846
+ }],
29847
+ url: "/ontology/v1/nodes/{node_id}/merge",
29848
+ ...options,
29849
+ headers: {
29850
+ "Content-Type": "application/json",
29851
+ ...options.headers
29852
+ }
29853
+ });
29854
+ var ontologyListRelations = (options) => (options?.client ?? client).get({
29855
+ security: [{
29856
+ key: "ontology-bearerAuth",
29857
+ scheme: "bearer",
29858
+ type: "http"
29859
+ }],
29860
+ url: "/ontology/v1/relations",
29861
+ ...options
29862
+ });
29863
+ var ontologyCreateRelation = (options) => (options.client ?? client).post({
29864
+ security: [{
29865
+ key: "ontology-bearerAuth",
29866
+ scheme: "bearer",
29867
+ type: "http"
29868
+ }],
29869
+ url: "/ontology/v1/relations",
29870
+ ...options,
29871
+ headers: {
29872
+ "Content-Type": "application/json",
29873
+ ...options.headers
29874
+ }
29875
+ });
29876
+ var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
29877
+ security: [{
29878
+ key: "ontology-bearerAuth",
29879
+ scheme: "bearer",
29880
+ type: "http"
29881
+ }],
29882
+ url: "/ontology/v1/relations/{relation_id}",
29883
+ ...options
29884
+ });
29885
+ var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
29886
+ security: [{
29887
+ key: "ontology-bearerAuth",
29888
+ scheme: "bearer",
29889
+ type: "http"
29890
+ }],
29891
+ url: "/ontology/v1/relations/{relation_id}/invalidate",
29892
+ ...options,
29893
+ headers: {
29894
+ "Content-Type": "application/json",
29895
+ ...options.headers
29896
+ }
29897
+ });
29898
+ var ontologyApplyChangeset = (options) => (options.client ?? client).post({
29899
+ security: [{
29900
+ key: "ontology-bearerAuth",
29901
+ scheme: "bearer",
29902
+ type: "http"
29903
+ }],
29904
+ url: "/ontology/v1/changesets",
29905
+ ...options,
29906
+ headers: {
29907
+ "Content-Type": "application/json",
29908
+ ...options.headers
29909
+ }
29910
+ });
29911
+ var ontologySearch = (options) => (options.client ?? client).post({
29912
+ security: [{
29913
+ key: "ontology-bearerAuth",
29914
+ scheme: "bearer",
29915
+ type: "http"
29916
+ }],
29917
+ url: "/ontology/v1/search",
29918
+ ...options,
29919
+ headers: {
29920
+ "Content-Type": "application/json",
29921
+ ...options.headers
29922
+ }
29923
+ });
28034
29924
  var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
28035
29925
  querySerializer: { parameters: { state: { array: { explode: false } } } },
28036
29926
  security: [
@@ -29908,6 +31798,9 @@ function createAgent(transport) {
29908
31798
  create: bind(transport, computersCreate),
29909
31799
  delete: bind(transport, computersDelete),
29910
31800
  files: {
31801
+ convert: {
31802
+ create: bind(transport, computersFilesConvert)
31803
+ },
29911
31804
  list: bind(transport, computersFilesList),
29912
31805
  retrieveContent: bind(transport, computersFilesContent)
29913
31806
  },
@@ -30355,6 +32248,9 @@ function createCut(transport) {
30355
32248
  media: {
30356
32249
  import: bind(transport, cutImportMedia)
30357
32250
  },
32251
+ renders: {
32252
+ create: bind(transport, cutCreateRender)
32253
+ },
30358
32254
  retrieve: bind(transport, cutRetrieveProject),
30359
32255
  retrieveState: bind(transport, cutRetrieveState),
30360
32256
  retrieveTimeline: bind(transport, cutRetrieveTimeline),
@@ -30365,6 +32261,9 @@ function createCut(transport) {
30365
32261
  list: bind(transport, cutListVersions)
30366
32262
  }
30367
32263
  },
32264
+ renders: {
32265
+ retrieve: bind(transport, cutRetrieveRender)
32266
+ },
30368
32267
  versions: {
30369
32268
  restore: bind(transport, cutRestoreVersion)
30370
32269
  }
@@ -30407,6 +32306,51 @@ function createDatabase(transport) {
30407
32306
  }
30408
32307
  };
30409
32308
  }
32309
+ function createDevops(transport) {
32310
+ return {
32311
+ projects: {
32312
+ retrieveTestCatalog: bind(transport, devopsTestCatalogGet),
32313
+ testCases: {
32314
+ list: bind(transport, devopsTestCasesList)
32315
+ },
32316
+ testPlans: {
32317
+ create: bind(transport, devopsTestPlansCreate),
32318
+ list: bind(transport, devopsTestPlansList)
32319
+ },
32320
+ testReports: {
32321
+ create: bind(transport, devopsTestReportsUpload)
32322
+ },
32323
+ testRuns: {
32324
+ create: bind(transport, devopsTestRunsCreate),
32325
+ list: bind(transport, devopsTestRunsList)
32326
+ },
32327
+ testSuites: {
32328
+ list: bind(transport, devopsTestSuitesList)
32329
+ }
32330
+ },
32331
+ testCases: {
32332
+ retrieve: bind(transport, devopsTestCasesGet)
32333
+ },
32334
+ testPlans: {
32335
+ delete: bind(transport, devopsTestPlansDelete),
32336
+ pause: bind(transport, devopsTestPlansPause),
32337
+ resume: bind(transport, devopsTestPlansResume),
32338
+ retrieve: bind(transport, devopsTestPlansGet),
32339
+ update: bind(transport, devopsTestPlansUpdate)
32340
+ },
32341
+ testRuns: {
32342
+ cancel: bind(transport, devopsTestRunsCancel),
32343
+ executions: {
32344
+ list: bind(transport, devopsTestExecutionsList),
32345
+ retrieve: bind(transport, devopsTestExecutionsGet)
32346
+ },
32347
+ retrieve: bind(transport, devopsTestRunsGet)
32348
+ },
32349
+ testSuites: {
32350
+ retrieve: bind(transport, devopsTestSuitesGet)
32351
+ }
32352
+ };
32353
+ }
30410
32354
  function createFile(transport) {
30411
32355
  return {
30412
32356
  files: {
@@ -30658,6 +32602,38 @@ function createModel(transport) {
30658
32602
  }
30659
32603
  };
30660
32604
  }
32605
+ function createOntology(transport) {
32606
+ return {
32607
+ changesets: {
32608
+ create: bind(transport, ontologyApplyChangeset)
32609
+ },
32610
+ nodes: {
32611
+ create: bind(transport, ontologyCreateNode),
32612
+ list: bindPage(transport, ontologyListNodes),
32613
+ merge: {
32614
+ create: bind(transport, ontologyMergeNode)
32615
+ },
32616
+ retrieve: bind(transport, ontologyRetrieveNode),
32617
+ update: bind(transport, ontologyUpdateNode)
32618
+ },
32619
+ relations: {
32620
+ create: bind(transport, ontologyCreateRelation),
32621
+ invalidate: {
32622
+ create: bind(transport, ontologyInvalidateRelation)
32623
+ },
32624
+ list: bindPage(transport, ontologyListRelations),
32625
+ retrieve: bind(transport, ontologyRetrieveRelation)
32626
+ },
32627
+ search: {
32628
+ create: bind(transport, ontologySearch)
32629
+ },
32630
+ types: {
32631
+ create: bind(transport, ontologyRegisterType),
32632
+ list: bind(transport, ontologyListTypes),
32633
+ retrieve: bind(transport, ontologyRetrieveType)
32634
+ }
32635
+ };
32636
+ }
30661
32637
  function createOrganization(transport) {
30662
32638
  return {
30663
32639
  charges: {
@@ -30919,11 +32895,13 @@ var resourceFactories = {
30919
32895
  crm: createCrm,
30920
32896
  cut: createCut,
30921
32897
  database: createDatabase,
32898
+ devops: createDevops,
30922
32899
  file: createFile,
30923
32900
  knowledge: createKnowledge,
30924
32901
  media: createMedia,
30925
32902
  meta: createMeta,
30926
32903
  model: createModel,
32904
+ ontology: createOntology,
30927
32905
  organization: createOrganization,
30928
32906
  sandbox: createSandbox,
30929
32907
  search: createSearch,
@@ -31997,6 +33975,26 @@ async function prepareMultipart(op, opts) {
31997
33975
  opts.body = body;
31998
33976
  }
31999
33977
 
33978
+ // src/core/pagination.ts
33979
+ var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
33980
+ function pageTokenField(op) {
33981
+ return op.query.find((field) => PAGE_TOKENS.test(field.name));
33982
+ }
33983
+ function nextPageToken(result) {
33984
+ const value = result;
33985
+ const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
33986
+ return typeof token === "string" && token ? token : undefined;
33987
+ }
33988
+ function pageOf(result) {
33989
+ const value = result;
33990
+ const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
33991
+ const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
33992
+ if (!Array.isArray(data))
33993
+ return;
33994
+ const token = nextPageToken(result);
33995
+ return { items: data, ...token ? { token } : {} };
33996
+ }
33997
+
32000
33998
  // src/core/bind-args.ts
32001
33999
  var globalOptions = [
32002
34000
  { name: "org", type: "string" },
@@ -32212,7 +34210,7 @@ function bindArgs(parsed, op, data) {
32212
34210
  (opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
32213
34211
  }
32214
34212
  }
32215
- if (globals.all && !op.pagination)
34213
+ if (globals.all && !op.pagination && !pageTokenField(op))
32216
34214
  throw new UsageError("--all requires a paginated operation");
32217
34215
  for (const p of op.pathParams)
32218
34216
  if (p !== target && opts.path?.[p.sdkName] === undefined)
@@ -32238,8 +34236,8 @@ function bindArgs(parsed, op, data) {
32238
34236
  }
32239
34237
 
32240
34238
  // src/core/help.ts
32241
- function describeOption(s) {
32242
- return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${s.required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
34239
+ function describeOption(s, required = s.required) {
34240
+ return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
32243
34241
  }
32244
34242
  function example(command) {
32245
34243
  const target = targetParam(command.op);
@@ -32255,18 +34253,22 @@ function example(command) {
32255
34253
  args.push("--yes");
32256
34254
  return args.join(" ");
32257
34255
  }
34256
+ function fieldRequired(op, field, location) {
34257
+ return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
34258
+ }
32258
34259
  function help(commands, prefix, command) {
32259
34260
  if (command) {
32260
34261
  const target = targetParam(command.op);
34262
+ const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
32261
34263
  return [
32262
- `praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
34264
+ `praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
32263
34265
  `SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
32264
34266
  `${command.op.http} ${command.op.path}`,
32265
34267
  ...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
32266
34268
  "",
32267
34269
  "Options:",
32268
34270
  ...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
32269
- ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
34271
+ ...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
32270
34272
  ...command.op.body?.fields.filter((f) => !operationOptions(command.op).some((s) => s.location === "body" && s.field === f) && (f.type === "object" || f.type === "array" && !["string", "number", "integer", "boolean"].includes(f.itemType ?? ""))).map((f) => ` --data: ${f.name} (${f.type}${f.required ? ", required" : ""})`) ?? [],
32271
34273
  " -h is an alias of --help",
32272
34274
  "PRAXIS_ENV=develop|production (default: develop); no --env option.",
@@ -32334,6 +34336,7 @@ var workflows = [
32334
34336
  { words: ["app", "create"], usage: "app create <name> [--dir <path>] [--template <dir>] [--no-install]", summary: "Create an application project from the standard template and install its dependencies.", example: "praxis app create my-app" },
32335
34337
  { words: ["app", "deploy"], usage: "app deploy [--dir <path>] [--no-build]", summary: "Build the project, publish it, create declared secrets, run the health check and print the URL.", example: "praxis app deploy --dir ./my-app" },
32336
34338
  { words: ["app", "rollback"], usage: "app rollback [--dir <path>] [--to <version_id>]", summary: "Deploy the previous version again (or --to a given version) and wait until it is active.", example: "praxis app rollback --to <version_id>" },
34339
+ { words: ["devops", "test", "run"], usage: "devops test run --remote [--project <dvp_…>] [--no-wait] [--repeat <n>] [--select <kind:value>]", summary: "Run the DevOps test selection for the pushed HEAD on the Praxis cloud, wait for the verdict and list the failed cases.", example: "praxis devops test run --remote --select smoke" },
32337
34340
  { words: ["skill"], usage: "skill [--install <dir>]", summary: "Print the AI skill, or write <dir>/praxis-cli/SKILL.md." }
32338
34341
  ];
32339
34342
  var workflowNouns = [...new Set(workflows.filter((w) => w.words.length > 1).map((w) => w.words[0]))];
@@ -32790,7 +34793,18 @@ function skillDocument(commands) {
32790
34793
  "## Account and CLI",
32791
34794
  "",
32792
34795
  ...workflows.map((w) => `praxis ${w.usage} — ${w.summary.replace("Print the AI skill, or write", "Print this skill; use --install <dir> to write")}`),
32793
- "praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)"
34796
+ "praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)",
34797
+ "",
34798
+ "## devops test run (workflow)",
34799
+ "",
34800
+ "Run the project's tests at the commit HEAD is on, on the Praxis cloud executor, and wait for the verdict:",
34801
+ "",
34802
+ "- Only the pushed commit is tested. HEAD must be on a remote branch (`git push` first); this command never pushes for you. Uncommitted changes are a warning only — the working tree is not what runs.",
34803
+ "- The project comes from `--project dvp_…`, or from `devops.project` in the current directory's praxis.jsonc. Neither present is a usage error, exit code 2.",
34804
+ "- `--select` narrows the run: `tag:<tag>` (a bare word reads as a tag), `package:<path>`, `suite:<path>`, `file:<path>`. `--repeat N` runs each selected case N times (a flake then shows up as flaky, not as a failure).",
34805
+ "- The run waits by default and polls every 5s; `--no-wait` returns as soon as the run exists, with `result` still `pending`.",
34806
+ "- Exit code 0 means the verdict passed (or is still pending); 1 means failed, errored, cancelled or timed out — the failed cases are listed, up to 20, with the run URL for the rest; 2 is a usage error.",
34807
+ "- The run URL is on the Console of the environment the CLI talks to; the run id is also on stdout with `--json`."
32794
34808
  ];
32795
34809
  let domain;
32796
34810
  for (const command of commands) {
@@ -33336,6 +35350,191 @@ async function appRollback(args, client2, ports) {
33336
35350
  ports.emit({ kind: "object", data: { url: worker.subdomain?.url ?? null, worker_id: worker.id, from_version: from, to_version: to, deployment_id: done.id } });
33337
35351
  }
33338
35352
 
35353
+ // src/commands/devops.ts
35354
+ import { join as join4 } from "node:path";
35355
+
35356
+ // src/devops/pure.ts
35357
+ import { createHash as createHash2 } from "node:crypto";
35358
+ var PROJECT_ID = /^dvp_[a-z0-9]+$/;
35359
+ var POLL_MS = 5000;
35360
+ var FAILURE_LIMIT = 20;
35361
+ var hint = 'Pass --project dvp_…, or add "devops": { "project": "dvp_…" } to praxis.jsonc in the current directory.';
35362
+ function checkProject(value, hintText = hint) {
35363
+ if (typeof value !== "string" || !value.trim())
35364
+ throw new UsageError("A DevOps project id must be a non-empty string", hintText);
35365
+ if (!PROJECT_ID.test(value.trim()))
35366
+ throw new UsageError(`Not a DevOps project id: ${value}`, "A project id starts with dvp_ and comes from the project list. " + hintText);
35367
+ return value.trim();
35368
+ }
35369
+ function parseDevopsProject(value) {
35370
+ if (value === null || value === undefined || typeof value !== "object" || Array.isArray(value))
35371
+ return;
35372
+ const devops = value.devops;
35373
+ if (devops === undefined)
35374
+ return;
35375
+ if (devops === null || typeof devops !== "object" || Array.isArray(devops))
35376
+ throw new UsageError("praxis.jsonc devops must be an object", 'Write {"devops":{"project":"dvp_…"}}. ' + hint);
35377
+ const project = devops.project;
35378
+ if (project === undefined)
35379
+ return;
35380
+ return checkProject(project);
35381
+ }
35382
+ function resolveProject(flag, projectFile) {
35383
+ if (flag !== undefined)
35384
+ return checkProject(flag);
35385
+ const fromFile = parseDevopsProject(projectFile);
35386
+ if (fromFile !== undefined)
35387
+ return fromFile;
35388
+ throw new UsageError("No DevOps project named for this run", hint);
35389
+ }
35390
+ var sorted = (values) => [...values].sort();
35391
+ var SELECT_KINDS = { tag: "anyTags", package: "packages", suite: "packages", file: "packages" };
35392
+ function parseSelect(values) {
35393
+ if (!values.length)
35394
+ return;
35395
+ const tags = [], packages = [];
35396
+ for (const raw of values) {
35397
+ const at = raw.indexOf(":");
35398
+ const kind = at < 0 ? "tag" : raw.slice(0, at).trim().toLowerCase();
35399
+ const value = (at < 0 ? raw : raw.slice(at + 1)).trim();
35400
+ const kinds = Object.keys(SELECT_KINDS).join(", ");
35401
+ if (!value)
35402
+ throw new UsageError(`--select ${raw} names no value`, `Use --select <kind>:<value>, or a bare tag name; kinds are ${kinds}.`);
35403
+ if (!Object.hasOwn(SELECT_KINDS, kind))
35404
+ throw new UsageError(`--select ${raw}: unknown kind "${kind}"`, `Use one of: ${kinds}.`);
35405
+ (SELECT_KINDS[kind] === "anyTags" ? tags : packages).push(value);
35406
+ }
35407
+ return { ...tags.length ? { anyTags: sorted(tags) } : {}, ...packages.length ? { packages: sorted(packages) } : {} };
35408
+ }
35409
+ function parseRepeat(value) {
35410
+ if (value === undefined)
35411
+ return 1;
35412
+ const n = typeof value === "string" && value.trim() ? Number(value) : NaN;
35413
+ if (!Number.isSafeInteger(n) || n < 1)
35414
+ throw new UsageError("--repeat must be an integer of at least 1");
35415
+ return n;
35416
+ }
35417
+ function requireRemote(remote) {
35418
+ if (!remote)
35419
+ throw new UsageError("Only remote test runs are available", "Add --remote to run the selected cases on the Praxis cloud executor.");
35420
+ }
35421
+ function requestIdFor(input) {
35422
+ const selector = input.selector === undefined ? null : {
35423
+ sizes: sorted(input.selector.sizes ?? []),
35424
+ anyTags: sorted(input.selector.anyTags ?? []),
35425
+ packages: sorted(input.selector.packages ?? []),
35426
+ cases: sorted(input.selector.cases ?? [])
35427
+ };
35428
+ const material = JSON.stringify(["devops-test-run", input.project, input.commit, input.repeat, selector]);
35429
+ return `req_${createHash2("sha256").update(material).digest("hex").slice(0, 32)}`;
35430
+ }
35431
+ var isTerminal = (state) => state === "finished";
35432
+ function shortSha(commit) {
35433
+ return commit.slice(0, 7);
35434
+ }
35435
+ function headBranch(output) {
35436
+ const name = output.trim();
35437
+ return !name || name === "HEAD" ? undefined : name;
35438
+ }
35439
+ function requirePushed(remoteContains, commit, branch) {
35440
+ if (remoteContains.trim())
35441
+ return;
35442
+ throw new UsageError(`Commit ${shortSha(commit)}${branch ? ` on ${branch}` : ""} is not on any remote branch`, `Push it first (git push${branch ? ` origin ${branch}` : ""}); the run tests the pushed commit, and this command never pushes for you.`);
35443
+ }
35444
+ function dirtyNotice(status, commit) {
35445
+ const files = status.split(`
35446
+ `).filter((line) => line.trim()).length;
35447
+ if (files === 0)
35448
+ return;
35449
+ return `Warning: ${files} uncommitted change${files === 1 ? "" : "s"}; the run tests the pushed commit ${shortSha(commit)}, not this working tree.`;
35450
+ }
35451
+ function exitCodeFor(result) {
35452
+ return result === "passed" || result === "pending" ? 0 : 1;
35453
+ }
35454
+ var wantsFailures = (result) => result !== "passed" && result !== "pending";
35455
+ function failedList(items, nextPageToken2, url) {
35456
+ const shown = items.slice(0, FAILURE_LIMIT);
35457
+ if (items.length <= FAILURE_LIMIT && !nextPageToken2)
35458
+ return { shown };
35459
+ return { shown, hint: `Showing ${FAILURE_LIMIT} of the failed cases; the run page lists them all: ${url}` };
35460
+ }
35461
+ var CONSOLE = { develop: "https://console-develop.deepraxis.com", production: "https://console.deepraxis.com" };
35462
+ function runUrl(env, project, id, viewerUrl) {
35463
+ return viewerUrl?.trim() || `${CONSOLE[env]}/devops/projects/${project}/test-runs/${id}`;
35464
+ }
35465
+
35466
+ // src/commands/devops.ts
35467
+ async function projectFile(cwd, ports) {
35468
+ let text;
35469
+ try {
35470
+ text = await ports.readFile(join4(cwd, "praxis.jsonc"));
35471
+ } catch (error) {
35472
+ if (error.code === "ENOENT")
35473
+ return;
35474
+ throw error;
35475
+ }
35476
+ try {
35477
+ return parseJsonc(text);
35478
+ } catch (error) {
35479
+ throw new UsageError(`praxis.jsonc is not valid JSONC: ${error.message}`);
35480
+ }
35481
+ }
35482
+ var COUNT_ORDER = ["passed", "failed", "flaky", "skipped", "pending", "other"];
35483
+ var countLine = (counts) => COUNT_ORDER.filter((key) => counts?.[key]).map((key) => `${counts[key]} ${key}`).join(", ") || "no counts reported";
35484
+ async function devopsTestRun(args, connect, env, ports) {
35485
+ requireRemote(args.remote);
35486
+ const project = resolveProject(args.project, await projectFile(ports.cwd, ports));
35487
+ const selector = parseSelect(args.select ?? []);
35488
+ const repeat = parseRepeat(args.repeat);
35489
+ const git = async (gitArgs) => (await ports.git(gitArgs, ports.cwd)).output;
35490
+ const commit = (await git(["rev-parse", "HEAD"])).trim();
35491
+ if (!commit)
35492
+ throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
35493
+ const branch = headBranch(await git(["rev-parse", "--abbrev-ref", "HEAD"]));
35494
+ requirePushed(await git(["branch", "-r", "--contains", "HEAD"]), commit, branch);
35495
+ const notice = dirtyNotice(await git(["status", "--porcelain"]), commit);
35496
+ if (notice)
35497
+ ports.emit({ kind: "message", channel: "stderr", text: notice });
35498
+ const client2 = await connect();
35499
+ const requestId = requestIdFor({ project, commit, selector, repeat });
35500
+ let run = await client2.devops.projects.testRuns.create({ path: { project }, body: { ref: { ...branch ? { branch } : {}, commit }, ...selector ? { selector } : {}, repeat, executor: "cloud", requestId } });
35501
+ while (args.wait && !isTerminal(run.state)) {
35502
+ await ports.wait(POLL_MS);
35503
+ run = await client2.devops.testRuns.retrieve({ path: { id: run.id } });
35504
+ }
35505
+ const url = runUrl(env, project, run.id, run.viewerUrl);
35506
+ let failures = [], failureHint;
35507
+ if (wantsFailures(run.result)) {
35508
+ const page = await client2.devops.testRuns.executions.list({ path: { run: run.id }, query: { pageSize: FAILURE_LIMIT, filter: "result=failed" } });
35509
+ ({ shown: failures, hint: failureHint } = failedList(page.items, page.nextPageToken, url));
35510
+ }
35511
+ const data = {
35512
+ id: run.id,
35513
+ url,
35514
+ project,
35515
+ state: run.state,
35516
+ result: run.result,
35517
+ repeat,
35518
+ commit,
35519
+ ...branch ? { branch } : {},
35520
+ selected: run.selection?.selectedCount ?? null,
35521
+ counts: run.counts ?? null,
35522
+ request_id: requestId,
35523
+ failures: failures.map((execution) => ({ case: execution.case, title: execution.title, package: execution.package ?? null, status: execution.status })),
35524
+ ...failureHint ? { failures_hint: failureHint } : {}
35525
+ };
35526
+ ports.emit({ kind: "object", data });
35527
+ ports.human([
35528
+ `${run.result} — ${project} @ ${commit.slice(0, 7)}${branch ? ` (${branch})` : ""}`,
35529
+ `state ${run.state}, ${countLine(run.counts)}`,
35530
+ url,
35531
+ ...failures.map((execution) => ` failed ${execution.title}`),
35532
+ ...failureHint ? [failureHint] : []
35533
+ ].join(`
35534
+ `));
35535
+ return exitCodeFor(run.result);
35536
+ }
35537
+
33339
35538
  // src/main.ts
33340
35539
  import { spawnSync } from "node:child_process";
33341
35540
 
@@ -33634,9 +35833,11 @@ function renderHuman(result, ctx) {
33634
35833
  const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
33635
35834
  const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
33636
35835
  ` : "";
35836
+ const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
35837
+ `).join("");
33637
35838
  return { stderr: err.red(`✗ ${plain(result.message)}`) + `
33638
35839
  ` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
33639
- ` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
35840
+ ` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
33640
35841
  ` : "") };
33641
35842
  }
33642
35843
  case "list":
@@ -33724,8 +35925,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
33724
35925
  }
33725
35926
 
33726
35927
  // src/output/render.ts
35928
+ var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
35929
+ function serverProblem(raw) {
35930
+ const value = record(raw);
35931
+ const problem = {};
35932
+ for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
35933
+ const entry = value[member];
35934
+ if (entry !== undefined && entry !== null)
35935
+ problem[member] = entry;
35936
+ }
35937
+ const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
35938
+ return adds ? problem : undefined;
35939
+ }
35940
+ function problemLines(problem) {
35941
+ const lines = [];
35942
+ for (const group of [problem?.errors, problem?.violations]) {
35943
+ for (const item of Array.isArray(group) ? group : []) {
35944
+ const entry = record(item);
35945
+ const where = scalar(entry.pointer ?? entry.field);
35946
+ const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
35947
+ if (where || detail)
35948
+ lines.push(`${where ? `${where}: ` : ""}${detail}`);
35949
+ }
35950
+ }
35951
+ return lines;
35952
+ }
33727
35953
  function errorJSON(result, ctx) {
33728
- return JSON.stringify({ error: { code: result.code, ...result.details !== undefined ? { details: result.details } : {}, message: result.message, hint: result.hint ?? null, env: result.env, command: ctx.command ?? null, status: result.status ?? null, request_id: result.request_id ?? null, ...result.credential_source ? { credential_source: result.credential_source } : {} } }) + `
35954
+ return JSON.stringify({ error: { code: result.code, ...result.details !== undefined ? { details: result.details } : {}, message: result.message, hint: result.hint ?? null, env: result.env, command: ctx.command ?? null, status: result.status ?? null, request_id: result.request_id ?? null, ...result.problem !== undefined ? { problem: result.problem } : {}, ...result.credential_source ? { credential_source: result.credential_source } : {} } }) + `
33729
35955
  `;
33730
35956
  }
33731
35957
  function render(result, ctx) {
@@ -33881,6 +36107,8 @@ function errorInput(error, ctx) {
33881
36107
  const raw = record(sdk?.raw), nested = record(raw.error);
33882
36108
  const candidate = nested.details ?? raw.details;
33883
36109
  const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
36110
+ const problem = serverProblem(Object.keys(nested).length ? nested : raw);
36111
+ const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
33884
36112
  let message = error instanceof Error ? error.message : "Unexpected error";
33885
36113
  const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
33886
36114
  const code = error instanceof UsageError ? error.code : businessCode(raw.code) ?? businessCode(nested.code) ?? businessCode(raw.error_code) ?? prefix ?? businessCode(sdk?.code) ?? (sdk?.status ? `HTTP_${sdk.status}` : sdk ? "API_ERROR" : "RUNTIME_ERROR");
@@ -33892,22 +36120,25 @@ function errorInput(error, ctx) {
33892
36120
  if (stripped)
33893
36121
  message = `${humanize(code)}${message ? `: ${message}` : ""}`;
33894
36122
  const status = sdk?.status, request_id = sdk?.requestId;
36123
+ message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
33895
36124
  const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
33896
36125
  const source = ctx.credentialSource ?? "login";
33897
- let hint = genericHint;
36126
+ let hint2 = genericHint;
33898
36127
  if (error instanceof UsageError)
33899
- hint = error.hint;
36128
+ hint2 = error.hint;
36129
+ else if (serverText(problem?.hint))
36130
+ hint2 = serverText(problem?.hint);
33900
36131
  else if (authFailure)
33901
- hint = authHint(source);
36132
+ hint2 = authHint(source);
33902
36133
  else if (status === 404)
33903
- hint = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
36134
+ hint2 = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
33904
36135
  else if (status === 403)
33905
- hint = "Check that your account or API key has permission to access this resource.";
36136
+ hint2 = "Check that your account or API key has permission to access this resource.";
33906
36137
  else if (status === 429)
33907
- hint = "Rate limited; retry later.";
36138
+ hint2 = "Rate limited; retry later.";
33908
36139
  else if (status !== undefined && status >= 500)
33909
- hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
33910
- return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
36140
+ hint2 = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
36141
+ return { kind: "error", code, message, hint: hint2, ...details !== undefined ? { details } : {}, ...problem !== undefined ? { problem } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
33911
36142
  }
33912
36143
 
33913
36144
  // src/output/progress.ts
@@ -33937,7 +36168,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
33937
36168
  }
33938
36169
 
33939
36170
  // src/main.ts
33940
- var version = "0.2.1-dev.9b41ea1";
36171
+ var version = "0.2.1-dev.9c5dc2f";
33941
36172
  var commands = commandTree(operations);
33942
36173
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
33943
36174
  function route(argv) {
@@ -34022,7 +36253,14 @@ var defaults = {
34022
36253
  var appOptions = {
34023
36254
  "app create": [{ name: "dir", type: "string", description: "Directory to create the project in (default: ./<name>)." }, { name: "template", type: "string", description: "Copy a local template directory instead of downloading the standard template." }, { name: "no-install", type: "boolean", description: "Skip installing dependencies." }],
34024
36255
  "app deploy": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "no-build", type: "boolean", description: "Publish the existing dist/ output without building." }],
34025
- "app rollback": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "to", type: "string", description: "Version id to deploy (default: the previous version)." }]
36256
+ "app rollback": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "to", type: "string", description: "Version id to deploy (default: the previous version)." }],
36257
+ "devops test run": [
36258
+ { name: "project", type: "string", description: "DevOps project id (dvp_…); default: the devops.project field of praxis.jsonc in the current directory." },
36259
+ { name: "remote", type: "boolean", description: "Run the cases on the Praxis cloud executor. Required; local execution does not exist yet." },
36260
+ { name: "no-wait", type: "boolean", description: "Return as soon as the run exists instead of waiting for a verdict." },
36261
+ { name: "repeat", type: "string", description: "How many times each selected case runs (default: 1)." },
36262
+ { name: "select", type: "string", repeated: true, description: "Narrow the selection; repeatable. tag:<tag> (a bare word reads as a tag), package:<path>, suite:<path> or file:<path>." }
36263
+ ]
34026
36264
  };
34027
36265
  async function main(argv, injected = {}) {
34028
36266
  const ports = { ...defaults, ...injected };
@@ -34155,7 +36393,7 @@ Examples:
34155
36393
  let owner = client2;
34156
36394
  for (const part of op.resource.split("."))
34157
36395
  owner = owner[part];
34158
- const result = await owner[op.method](opts);
36396
+ let result = await owner[op.method](opts);
34159
36397
  const name2 = `${op.resource}.${op.method}`;
34160
36398
  const list = (items) => {
34161
36399
  const view = clientList(items, op, flags.limit, ctx.mode);
@@ -34169,7 +36407,21 @@ Examples:
34169
36407
  const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
34170
36408
  if (typeof cursor === "string" && cursor)
34171
36409
  ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
34172
- if (result instanceof Page) {
36410
+ const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
36411
+ const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
36412
+ if (flags.all && !(result instanceof Page) && token && !firstPage)
36413
+ throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
36414
+ if (firstPage) {
36415
+ const items = [...firstPage.items];
36416
+ const seen = new Set;
36417
+ for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
36418
+ seen.add(next);
36419
+ result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
36420
+ items.push(...pageOf(result)?.items ?? []);
36421
+ }
36422
+ ctx.nextCommand = undefined;
36423
+ emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
36424
+ } else if (result instanceof Page) {
34173
36425
  if (flags.all) {
34174
36426
  const items = [];
34175
36427
  for await (const item of result)
@@ -34243,6 +36495,26 @@ Examples:
34243
36495
  await appRollback({ dir, to: parsed.flags.to?.[0] }, client2, appPorts);
34244
36496
  break;
34245
36497
  }
36498
+ case "devops test run": {
36499
+ return await devopsTestRun({
36500
+ project: parsed.flags.project?.[0],
36501
+ remote: Boolean(parsed.flags.remote),
36502
+ wait: !parsed.flags["no-wait"],
36503
+ repeat: parsed.flags.repeat?.[0],
36504
+ select: parsed.flags.select
36505
+ }, async () => await auth.client(org), config.env, {
36506
+ git: (args, cwd) => ports.spawnCapture("git", args, { cwd }),
36507
+ readFile: ports.readFile,
36508
+ wait: ports.wait,
36509
+ mode: ctx.mode,
36510
+ emit,
36511
+ human: (text) => {
36512
+ if (ctx.mode === "human")
36513
+ emit({ kind: "message", channel: "stdout", text });
36514
+ },
36515
+ cwd: ports.cwd
36516
+ });
36517
+ }
34246
36518
  case "api": {
34247
36519
  const method = parsed.positional[0];
34248
36520
  if (!HTTP_METHOD.test(method))
@@ -34265,7 +36537,7 @@ Examples:
34265
36537
  }
34266
36538
  }
34267
36539
  if (true)
34268
- process.exit(await main(process.argv.slice(2)));
36540
+ process.exitCode = await main(process.argv.slice(2));
34269
36541
  export {
34270
36542
  main
34271
36543
  };