@mindstudio-ai/agent 0.1.142 → 0.1.144

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/llms.txt CHANGED
@@ -531,6 +531,14 @@ Remove watermarks from an image using AI.
531
531
  - Input: `{ imageUrl: string, engine: string, intermediateAsset?: boolean }`
532
532
  - Output: `{ imageUrl: string }`
533
533
 
534
+ #### importFromUrl
535
+ Copy a file at a URL into one of the app's file stores, without the bytes passing through the method
536
+ - For a direct link to a file (a recording, an export, a podcast episode's mp3), up to 5 GiB. The file is fetched and stored as it is.
537
+ - Requires a store: pass the store handle as `store` in the options. `Store.importFromUrl(url)` is the same call, returning a StoredFile.
538
+ - A share page (a Google Drive or Dropbox page, YouTube) is not the file: pass the file's own download link, or use downloadVideo for a hosted video.
539
+ - Input: `{ url: string, contentType?: string }`
540
+ - Output: `{ fileUrl: string, key: string, size: number, contentType: string }`
541
+
534
542
  #### insertVideoClips
535
543
  Insert b-roll clips into a base video at a timecode, optionally with an xfade transition.
536
544
  - Input: `{ baseVideoUrl: string, overlayVideos: { videoUrl: string, startTimeSec: number }[], transition?: string, transitionDuration?: number, useOverlayAudio?: boolean, intermediateAsset?: boolean }`
@@ -651,11 +659,34 @@ Remove the background from an image using AI, producing a transparent PNG.
651
659
  - Input: `{ type?: "standard" | "advanced", imageUrl: string, autoCrop?: boolean }`
652
660
  - Output: `{ imageUrl: string }`
653
661
 
662
+ #### renderVideoFromHtmlComposition
663
+ Render an HTML composition (HTML, CSS, media and seekable animation on a timeline) to a video file
664
+ - Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.97, in Chrome off the app's own sandbox; author for that version
665
+ - Pass the composition as `html`, the page itself (up to 10 MB), or as `project`, the URL of a zip of a project's folder (`index.html` at its root, or the file `entryFile` names) or of one HTML file, up to 2 GiB: an app file or any public URL
666
+ - `variables` overrides the composition's `data-composition-variables` defaults, which it reads with `window.__hyperframes.getVariables()`
667
+ - Whatever the composition loads itself (fonts, scripts, images, video) is fetched as it renders, so each is in the project or at a public URL; a private app file needs a signed URL
668
+ - fps 24, 30 or 60 (default 30); quality draft, standard or high (default standard); format mp4 (default), webm or mov (both keep transparency), or gif
669
+ - One render per call, finishing within 15 minutes
670
+ - A composition HyperFrames can't render fails with HyperFrames' own reason
671
+ - Input: `{ html?: string, project?: string, entryFile?: string, variables?: object, fps?: 24 | 30 | 60, quality?: "draft" | "standard" | "high", format?: "mp4" | "webm" | "mov" | "gif", intermediateAsset?: boolean }`
672
+ - Output: `{ videoUrl: string, durationSec: number, frames: number }`
673
+
654
674
  #### resizeVideo
655
675
  Resize a video file
656
676
  - Input: `{ videoUrl: string, mode: "fit" | "exact", maxWidth?: number, maxHeight?: number, width?: number, height?: number, strategy?: "pad" | "crop", intermediateAsset?: boolean }`
657
677
  - Output: `{ videoUrl: string }`
658
678
 
679
+ #### runFfmpeg
680
+ Run an ffmpeg command on media files
681
+ - Runs one ffmpeg command, its arguments exactly as given, off the app's own sandbox (ffmpeg 9, a static build with the common codecs and filters)
682
+ - `inputs` names each input file by URL; `{in:<name>}` anywhere in an argument, a filter graph included, is that file's local path
683
+ - `{out:<file.ext>}` anywhere in an argument is an output's path; every output the arguments name comes back in `outputs` by its file name, its type from its extension
684
+ - One command per call, finishing within 15 minutes; up to 10 GB of inputs and outputs together, 5 GB per output
685
+ - The system fonts are Noto Sans (`drawtext`'s default), DejaVu Sans, Liberation Sans and Noto Color Emoji: pass a font file as an input for any other
686
+ - A command ffmpeg refuses fails with ffmpeg's own error lines
687
+ - Input: `{ inputs: object, args: string[], intermediateAsset?: boolean }`
688
+ - Output: `{ outputs: object }`
689
+
659
690
  #### runFromConnectorRegistry
660
691
  Run a raw API connector to a third-party service
661
692
  - Use the /developer/v2/helpers/connectors endpoint to list available services and actions.
@@ -1712,8 +1743,11 @@ await file.shareUrl(); // absolute signed URL that works with NO session (email/
1712
1743
  ```
1713
1744
 
1714
1745
  Store methods:
1715
- - `put(content, { key?, contentType?, filename?, contentAddressed?, cacheControl? })` → `StoredFile`. `content` is `Buffer | Uint8Array | string` — any size up to 5 GiB (large content transparently uploads direct to storage via a presigned POST, so there is no request-body cap). Omit `key` for a random UUID; `contentAddressed: true` derives an immutable `<sha256>.<ext>` key. `cacheControl` sets how long a browser may keep a public object, at most an hour (defaults: auto-minted keys an hour, named keys `public, max-age=300`).
1716
- - `get(key)` → `Buffer` · `head(key)` → `StoredFile` · `exists(key)` → `boolean`
1746
+ - `put(content, { key?, contentType?, filename?, contentAddressed?, cacheControl? })` → `StoredFile`. `content` is `Buffer | Uint8Array | string`, or a stream (Node `Readable`, web `ReadableStream`, async iterable of bytes) — any size up to 5 GiB, straight to storage (a stream goes up a part at a time, and needs `key` or `filename`, not `contentAddressed`). Omit `key` for a random UUID; `contentAddressed: true` derives an immutable `<sha256>.<ext>` key. `cacheControl` sets how long a browser may keep a public object, at most an hour (defaults: auto-minted keys an hour, named keys `public, max-age=300`).
1747
+ - `putFile(path, options?)` → `StoredFile` — a file on disk, a part at a time (never held in memory): use it for anything large a method writes, like an ffmpeg output.
1748
+ - `importFromUrl(url, { contentType? })` → `StoredFile` — the platform fetches a direct link to a file straight into the store (up to 5 GiB, stored as it is, key chosen for it); never fetch a large file into a method to `put` it. A share page isn't the file; a hosted video is `downloadVideo`'s.
1749
+ - `get(key)` → `Buffer` (the whole file in memory) · `download(key, path)` → `void` (streamed to disk) · `getStream(key, { start?, end? })` → web `ReadableStream` (all of it, or a byte range). All three read straight from storage; a missing key throws `file_not_found`.
1750
+ - `head(key)` → `StoredFile` · `exists(key)` → `boolean`
1717
1751
  - `list({ prefix?, cursor?, limit? })` → `{ files: StoredFile[]; cursor? }`
1718
1752
  - `delete(key)` → `void`
1719
1753
  - `shareUrl(key, { expiresIn? })` → signed absolute URL (private stores; no session needed)
@@ -1731,6 +1765,7 @@ return token;
1731
1765
  import { platform } from '@mindstudio-ai/interface';
1732
1766
  const { url } = await platform.upload(token, file, { onProgress });
1733
1767
  ```
1768
+ A token must start its upload within 10 minutes of minting (`expiresIn`: 60 to 900 seconds). A file of 64 MB or more goes up in parts and resumes: `platform.upload` again with a token for the same `key` and the same file sends only what hadn't arrived (mint with a stable `key` to resume across a reload). In the frontend, `fetch(file.url)` works with default credentials, never `credentials: 'include'`.
1734
1769
 
1735
1770
  Generated assets: EVERY action that produces a file can put its output straight into one of these stores — pass the store handle as `store` in the OPTIONS object (second argument). There is no allowlist; if an action returns a file URL, it takes `store`. Optional: omit it and the asset goes to the shared MindStudio CDN as before. Reach for it when the asset belongs to the app — private to a user, or listed alongside its other files. Inputs are never published either way: a file you hand an action is read where it sits, and any intermediate the platform needs is written to private storage and dropped when the call finishes.
1736
1771
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.142",
3
+ "version": "0.1.144",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",