@deepraxis/cli 0.2.1-dev.0b9dd88 → 0.2.1-dev.136df1c

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/COMMANDS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Generated by `bun run commands`. DO NOT EDIT.
4
4
 
5
- 545 HTTP operations; 547 commands including aliases.
5
+ 546 HTTP operations; 548 commands including aliases.
6
6
 
7
7
  Environment: `PRAXIS_ENV=develop|production` (dev package defaults to `develop`; stable package defaults to `production`). No `--env` option.
8
8
 
@@ -26,6 +26,7 @@ Handwritten commands: `login`, `logout`, `whoami`, `org list`, `org switch <orga
26
26
  | `praxis api agent computer connect <computer_id>` | `agent.computers.connect` | POST `/agent/v1/computers/{computer_id}/connect` | `--need` |
27
27
  | `praxis api agent computer create` | `agent.computers.create` | POST `/agent/v1/computers` | `--name`, `--environment-id` |
28
28
  | `praxis api agent computer delete <computer_id>` | `agent.computers.delete` | DELETE `/agent/v1/computers/{computer_id}` | |
29
+ | `praxis api agent computer file convert create` | `agent.computers.files.convert.create` | POST `/agent/v1/computers/{computer_id}/files/convert` | `--computer`, `--name` |
29
30
  | `praxis api agent computer file get-content` | `agent.computers.files.retrieveContent` | GET `/agent/v1/computers/{computer_id}/files/content` | `--computer`, `--path` |
30
31
  | `praxis api agent computer file list` | `agent.computers.files.list` | GET `/agent/v1/computers/{computer_id}/files` | `--computer`, `--path` |
31
32
  | `praxis api agent computer get <computer_id>` | `agent.computers.retrieve` | GET `/agent/v1/computers/{computer_id}` | |
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",
@@ -10167,7 +10198,7 @@ Execution errors include error.details.prints containing output printed before f
10167
10198
  name: "loudness",
10168
10199
  type: "object",
10169
10200
  required: false,
10170
- description: "Optional loudness normalization target; normalization adds analysis and rendering work."
10201
+ description: "Loudness normalization target. Omitted, the export is normalized to -14 LUFS integrated and -1 dBTP true peak, the level short-video and streaming platforms play at; null renders without normalization. Normalization adds analysis and rendering work."
10171
10202
  }
10172
10203
  ]
10173
10204
  }
@@ -10391,7 +10422,158 @@ Execution errors include error.details.prints containing output printed before f
10391
10422
  resource: "cut.projects",
10392
10423
  method: "execute",
10393
10424
  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',
10425
+ description: `Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: \`const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);\`
10426
+
10427
+ <!-- cut-reference:start -->
10428
+ ### Script function, field and error reference
10429
+
10430
+ Every script function, clip field and error code has its own section, read one at a time:
10431
+
10432
+ \`\`\`
10433
+ codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
10434
+ codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
10435
+ codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
10436
+ codemode.describe("praxis.cut.script") // names, one page at a time
10437
+ \`\`\`
10438
+
10439
+ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
10440
+
10441
+ #### Script functions (script)
10442
+
10443
+ - \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
10444
+ - \`GetItem\` — One clip's compact view, by id.
10445
+ - \`FindItems\` — Visit every clip with its track; collect results.
10446
+ - \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
10447
+ - \`GetTranscript\` — Transcript words in source microseconds.
10448
+ - \`GetAnalysis\` — Silence, filler or scene segments.
10449
+ - \`ListTransitions\` — Join transition kinds and parameters.
10450
+ - \`ListEffects\` — Visual-effect catalog and parameters.
10451
+ - \`ListAnimations\` — Animation presets by phase and target.
10452
+ - \`ListFonts\` — Font families, weights and scripts.
10453
+ - \`ListTextStyles\` — Text style presets for \`style.preset\`.
10454
+ - \`ListTextTemplates\` — Multi-layer templates and their slots.
10455
+ - \`Insert\` — Add a clip; a track never overlaps itself.
10456
+ - \`Append\` — Add a clip at the end of a track.
10457
+ - \`Update\` — Change named fields; the rest stay.
10458
+ - \`SetSpeed\` — Change rate, keeping source or duration.
10459
+ - \`Delete\` — Remove a clip. There is no \`Remove\`.
10460
+ - \`Join\` — Overlap clips; followers shift, track shortens.
10461
+ - \`UpdateJoin\` — Change a join's length or effect.
10462
+ - \`DeleteJoin\` — Remove a join; restore the butt cut.
10463
+ - \`Split\` — Cut a clip in two at a time.
10464
+ - \`Trim\` — Move one clip edge by seconds.
10465
+ - \`Move\` — Set a clip's start or track.
10466
+ - \`RippleDeleteRange\` — Cut a time range and close the gap.
10467
+ - \`AddTrack\` — Add a video, audio or caption track.
10468
+ - \`UpdateTrack\` — Change a track's name, lock, gain or role.
10469
+ - \`DeleteTrack\` — Remove a track and its clips.
10470
+ - \`SetSettings\` — Change canvas, frame rate or background.
10471
+ - \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
10472
+ - \`InsertTemplate\` — Insert a template and fill its slots.
10473
+ - \`AlignCaptions\` — Rebuild captions from text punctuation.
10474
+ - \`ImportCaptions\` — Import SRT or WebVTT onto captions.
10475
+ - \`ExportCaptions\` — Export captions as SRT or WebVTT.
10476
+ - \`SetMarker\` — Label a timeline position.
10477
+ - \`Print\` — Append values to the result's \`prints\`.
10478
+ - \`Preview\` — Up to 8 frames as inline PNG data URLs.
10479
+
10480
+ #### Fields (fields)
10481
+
10482
+ - \`type\` — Clip kind; decides which fields apply.
10483
+ - \`start\` — Clip start in seconds; snaps to frames.
10484
+ - \`length\` — Duration; optional for video and audio.
10485
+ - \`media\` — Source \`{ libraryId, assetId }\`.
10486
+ - \`sourceIn\` — First source second kept; default 0.
10487
+ - \`sourceOut\` — Exclusive source end; read-only.
10488
+ - \`text\` — Text of a text or caption clip.
10489
+ - \`color\` — Solid colour of a color clip.
10490
+ - \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
10491
+ - \`width\` — Shape width, a fraction of canvas width.
10492
+ - \`height\` — Shape height, a fraction of canvas height.
10493
+ - \`radius\` — Rect corner rounding, in 1080-height px.
10494
+ - \`fill\` — Shape or text paint: colour or gradient.
10495
+ - \`stroke\` — Shape outline: colour and width.
10496
+ - \`transform\` — Position, scale, rotation, opacity, crop, blur.
10497
+ - \`fit\` — contain, cover, fill or none.
10498
+ - \`blend\` — Layer blend mode; null clears.
10499
+ - \`style\` — Text styling: font, fill, strokes, glow, position.
10500
+ - \`style.position\` — top, middle or bottom; omit it, never null.
10501
+ - \`playback\` — Rate, direction, audio policy, or freeze.
10502
+ - \`volumeDb\` — Audio level in dB; 0 is source level.
10503
+ - \`gain\` — Keyframed audio level in dB.
10504
+ - \`fadeIn\` — Fade-in seconds at the clip's start.
10505
+ - \`fadeOut\` — Fade-out seconds at the clip's end.
10506
+ - \`duck\` — Lower this clip while another track plays.
10507
+ - \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
10508
+ - \`reveal\` — Per-character, word or line reveal timing.
10509
+ - \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
10510
+ - \`effects\` — Effect stack, at most 8; null clears.
10511
+ - \`transitionIn\` — Entrance effect: kind plus seconds.
10512
+ - \`transitionOut\` — Exit effect: kind plus seconds.
10513
+ - \`mask\` — Shape, path or track matte.
10514
+ - \`words\` — Caption words with clip-local times.
10515
+
10516
+ #### Error codes (errors)
10517
+
10518
+ - \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
10519
+ - \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
10520
+ - \`INVALID_STYLE\` — A style value is out of range.
10521
+ - \`INVALID_MASK\` — A mask definition is malformed.
10522
+ - \`MASK_IN_USE\` — The edit would break a live mask.
10523
+ - \`TOO_MANY_MASKS\` — At most 16 masks per project.
10524
+ - \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
10525
+ - \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
10526
+ - \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
10527
+ - \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
10528
+ - \`UNKNOWN_FIELD\` — The field name is not accepted here.
10529
+ - \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
10530
+ - \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
10531
+ - \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
10532
+ - \`OVERLAP\` — Two clips on one track would share time.
10533
+ - \`OUT_OF_SOURCE\` — The clip would read past its source.
10534
+ - \`LOCKED_TRACK\` — The edit targets a locked track.
10535
+ - \`UNBOUND_LIBRARY\` — The library is not bound to the project.
10536
+ - \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
10537
+ - \`NOT_FOUND\` — The named id is not in this project.
10538
+ - \`TOO_SHORT\` — The result would be under one frame.
10539
+ - \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
10540
+ - \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
10541
+ - \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
10542
+ - \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
10543
+ - \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
10544
+ - \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
10545
+ - \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
10546
+ - \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
10547
+ - \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
10548
+ - \`PROJECT_NOT_FOUND\` — No visible project has this id.
10549
+ - \`EXPORT_NOT_FOUND\` — No such export in this project.
10550
+ - \`VERSION_NOT_FOUND\` — No saved version has this revision.
10551
+ - \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
10552
+ - \`BINDING_INVALID\` — The binding request is malformed.
10553
+ - \`BINDING_IN_USE\` — Clips still use this library's assets.
10554
+ - \`NOTHING_TO_UNDO\` — No earlier revision to return to.
10555
+ - \`NOTHING_TO_REDO\` — No undone revision is waiting.
10556
+ - \`UNDO_CONFLICT\` — The revision to undo is no longer head.
10557
+ - \`REVISION_CONFLICT\` — The project moved; your revision is stale.
10558
+ - \`CUT_BUSY\` — The project is busy; retry.
10559
+ - \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
10560
+ - \`SCRIPT_ERROR\` — The script threw or did not parse.
10561
+ - \`SCRIPT_LIMIT\` — An execute budget was exceeded.
10562
+ - \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
10563
+ - \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
10564
+ - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
10565
+ - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
10566
+ - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
10567
+ - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
10568
+ - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
10569
+ - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
10570
+ - \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
10571
+ - \`INVALID_PARAMS\` — The request is malformed.
10572
+ - \`PERMISSION_DENIED\` — This credential may not do that here.
10573
+ - \`NOT_IMPLEMENTED\` — Not available on this platform yet.
10574
+ - \`INTERNAL\` — Unexpected failure; retry with the request id.
10575
+ <!-- cut-reference:end -->
10576
+ `,
10395
10577
  http: "POST",
10396
10578
  path: "/cut/v1/projects/{project_id}:execute",
10397
10579
  streaming: "no",
@@ -23299,6 +23481,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
23299
23481
  url: "/agent/v1/computers/{computer_id}/files/content",
23300
23482
  ...options
23301
23483
  });
23484
+ var computersFilesConvert = (options) => (options.client ?? client).post({
23485
+ security: [{
23486
+ key: "BearerAuth",
23487
+ scheme: "bearer",
23488
+ type: "http"
23489
+ }, {
23490
+ key: "ApiKeyAuth",
23491
+ name: "X-API-Key",
23492
+ type: "apiKey"
23493
+ }],
23494
+ url: "/agent/v1/computers/{computer_id}/files/convert",
23495
+ ...options,
23496
+ headers: {
23497
+ "Content-Type": "application/json",
23498
+ ...options.headers
23499
+ }
23500
+ });
23302
23501
  var connectComputer = (options) => (options.client ?? client).post({
23303
23502
  security: [{
23304
23503
  key: "BearerAuth",
@@ -30599,6 +30798,9 @@ function createAgent(transport) {
30599
30798
  create: bind(transport, computersCreate),
30600
30799
  delete: bind(transport, computersDelete),
30601
30800
  files: {
30801
+ convert: {
30802
+ create: bind(transport, computersFilesConvert)
30803
+ },
30602
30804
  list: bind(transport, computersFilesList),
30603
30805
  retrieveContent: bind(transport, computersFilesContent)
30604
30806
  },
@@ -34717,7 +34919,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
34717
34919
  }
34718
34920
 
34719
34921
  // src/main.ts
34720
- var version = "0.2.1-dev.0b9dd88";
34922
+ var version = "0.2.1-dev.136df1c";
34721
34923
  var commands = commandTree(operations);
34722
34924
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
34723
34925
  function route(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepraxis/cli",
3
- "version": "0.2.1-dev.0b9dd88",
3
+ "version": "0.2.1-dev.136df1c",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "praxis": "dist/praxis.js"