@mindstudio-ai/agent 0.1.150 → 0.1.152

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
@@ -285,8 +285,10 @@ Analyze an image using a vision model based on a text prompt.
285
285
 
286
286
  #### analyzeVideo
287
287
  Analyze a video using a video analysis model based on a text prompt.
288
- - Uses the configured video analysis model to generate a text analysis of the video.
289
- - The prompt should describe what to look for or extract from the video.
288
+ - The prompt describes what to look for or extract from the video.
289
+ - The default model is gemini-3.8-flash. Any Gemini chat model reads video (the 3.x Flash and Flash Lite models, gemini-3.1-pro, and the 2.5 family), as does TwelveLabs' pegasus-1.6; set one with `videoAnalysisModelOverride`, with `temperature` and `maxResponseTokens` beside `model`.
290
+ - `videoUrl` is a video file's URL (an app file, a Google Drive share link, or any public URL). Gemini also reads a public YouTube link; Pegasus doesn't.
291
+ - Length: Pegasus takes 1 second to 1 hour. Gemini takes about 3 hours at its default resolution; the 3.x models read a second of video as about 66 tokens and the 2.5 models as about 258, which is what a long video costs.
290
292
  - Input: `{ prompt: string, videoUrl: string, videoAnalysisModelOverride?: { model: string, config?: object } | { model: string, temperature: number, maxResponseTokens: number, ignorePreamble?: boolean, userMessagePreprocessor?: { dataSource?: string, messageTemplate?: string, maxResults?: number, enabled?: boolean, shouldInherit?: boolean }, preamble?: string, multiModelEnabled?: boolean, editResponseEnabled?: boolean, promptCaching?: boolean, config?: object } }`
291
293
  - Output: `{ analysis: string }`
292
294
 
@@ -332,10 +334,11 @@ Create a draft email in the connected Gmail account.
332
334
 
333
335
  #### decomposeImage
334
336
  Split an image into a base image and transparent layers.
335
- - Uses Seedream 5.0 Flash layer decomposition. There is no model picker.
336
- - An optional prompt can name the objects or groupings to separate.
337
- - The output is an array of hosted image URLs. PNG output keeps layer transparency.
338
- - Input: `{ image: string, prompt?: string, intermediateAsset?: boolean }`
337
+ - Uses Seedream 5.0 Flash layer decomposition by default, and Seedream 5.0 Pro when type is "advanced", which separates more cleanly and costs more (and twice as much at 2K).
338
+ - `resolution` is "1k", "1.5k" or "2k" (the default).
339
+ - An optional prompt names the objects or groupings to separate. Left out, the model separates the main elements itself: text, subjects, decorations and background.
340
+ - The output is an array of hosted PNG image URLs: first the base image at full size, then each separated element as a transparent layer cropped to the element. The layers come with no position, so placing one back over the base means finding where it sat. Flash returned 13 layers for one photo and Pro 16.
341
+ - Input: `{ image: string, prompt?: string, type?: "standard" | "advanced", resolution?: "1k" | "1.5k" | "2k", intermediateAsset?: boolean }`
339
342
  - Output: `{ imageUrls: string[] }`
340
343
 
341
344
  #### deleteDataSource
@@ -395,6 +398,27 @@ Generate or enhance a video generation prompt using a language model. Optionally
395
398
  - Input: `{ initialPrompt: string, includeNegativePrompt: boolean, negativePromptDestinationVariableName?: string, systemPrompt: string, modelOverride?: unknown }`
396
399
  - Output: `{ prompt: string, negativePrompt?: string }`
397
400
 
401
+ #### evaluateDecision
402
+ Ask structured questions about text, JSON, or images and get calibrated answers from a decision model. The model returns a probability, a selected option, or a score. It does not write a reply. Each question is a noul (yes or no, as a probability from 0 to 1), a choice (one option from a set you define, with a probability for each), or a score (a rating against ordered levels). Put every question in the same call. The question id is yours: answers come back under the same ids. The model defaults to Jev (jev-latest).
403
+ - state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).
404
+ - questions is a map. The key is an id you choose. It is not shown to the model. The answer comes back under the same id.
405
+ - A noul asks a yes/no question and returns noul, a probability from 0 (no) to 1 (yes). Optional criteria.true and criteria.false say what a yes and a no mean.
406
+ - A choice picks one option. criteria is a map of option id to a short description (or null). At most 255 options. The answer includes the winning choice, a probability for every option, and confidence.
407
+ - A score rates the state on an ordered rubric. criteria is 2 to 10 level descriptions, low to high. The answer's score can land between levels, and includes a probability per level plus confidence.
408
+ - An answer of type refusal means the model declined that question (GPT-6 Luna Decisions can).
409
+ - instructions may be a string, or an object that keeps the question in one field and reference data in the others. Refer to those fields by name in backticks.
410
+ - Send every question you need in one call. The model reads the state once and answers them together.
411
+ - Probabilities from different models are not comparable: tune a threshold against the model, and the version, it will run on.
412
+ - decisionModelOverride.model picks the model:
413
+ - jev-latest (the default) is TypeSafe's current stable release, text only, up to 64k tokens. jev-preview tracks TypeSafe's newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version.
414
+ - clef and clef-flash run Cloudflare Clef, which also reads up to 4 PNG, JPEG, or WebP images, each at most 4 MiB and 8 MiB together, and takes at most 64 questions, each id using only letters, digits, underscore, dot, and hyphen, up to 100 characters. clef is the larger model, clef-flash the faster one. @cf/cloudflare/clef and @cf/cloudflare/clef-flash name the same two.
415
+ - gpt-6-luna-decisions runs OpenAI's Decisions API (in beta), which reads up to 922k tokens and PNG, JPEG, WebP, or GIF images of up to 20 MB each. It takes up to 200 questions, and a choice needs at least 2 options. gpt-6-luna names it too.
416
+ - images is for a model that reads them. Pass URLs or data URLs. A model that reads none refuses the call.
417
+ - The response model field is the version that answered.
418
+ - Billed per input token. Output tokens are free. Each model has its own rate, and GPT-6 Luna Decisions bills a prompt over 272k tokens at twice its rate.
419
+ - Input: `{ state: string | object | unknown[], questions: object, images?: string[], decisionModelOverride?: { model: string, config?: object } }`
420
+ - Output: `{ model: string, answers: object, usage: { input_tokens: number, output_tokens: number } }`
421
+
398
422
  #### extractAudioFromVideo
399
423
  Extract audio MP3 from a video file
400
424
  - Input: `{ videoUrl: string }`
@@ -404,12 +428,19 @@ Extract audio MP3 from a video file
404
428
  Download a file from a URL and extract its text content. Supports PDFs (including scanned/image-based PDFs via OCR), plain text files, and other document formats.
405
429
  - Best suited for PDFs and raw text/document files. For web pages, use the scrapeUrl step instead.
406
430
  - Handles both text-layer PDFs and image-based/scanned PDFs (e.g. Figma/Canva exports, scanned documents). Image-based PDFs are processed with OCR automatically — there is no need to convert PDF pages to images first.
431
+ - Plain text, code, HTML, spreadsheets and Office documents (docx, pptx, odt, rtf, epub) are read without a model and cost nothing. PDFs and images go to the extraction model, billed per page.
407
432
  - Accepts a single URL, a comma-separated list of URLs, or a JSON array of URLs.
408
433
  - Nothing is published. One of the app's own files — including a private one, or a share link — is read where it sits; any other URL is downloaded and staged privately for the extraction model, then discarded when extraction finishes.
409
- - Optionally set `model` to a specific document-extraction model (`mistral-ocr-latest`, `llamaparse`, `google-document-ai`); omit to use the platform default.
434
+ - `text` is each document's text: a string for one URL, an array for several. `documents` has each document page by page, with its page numbers and the pages billed. Set `includeBlocks` to add each page's typed blocks (title, text, table, image, header, footer…) with their bounding boxes, and the page's size.
435
+ - A file that can't be read (unreachable, an unsupported type, past the model's limits, or refused by the model) fails the step with the reason.
436
+ - `extractionModelOverride.model` picks the model; omit it to use the workspace's default:
437
+ - `mistral-ocr-4.1` (the default): PDFs and images up to 50 MB and 1,000 pages, with typed blocks.
438
+ - `mistral-document-ai-2512`: Mistral Document AI on Microsoft Foundry, up to 30 MB and 30 pages, with typed blocks.
439
+ - `llamaparse`: LlamaParse's agentic mode, up to 100 MB and 1,000 pages, markdown without blocks.
440
+ - `google-document-ai`: Google Document AI OCR, up to 500 pages, where the deployment has set it up.
410
441
  - Maximum file size is 50MB per URL.
411
- - Input: `{ url: string | string[], model?: string }`
412
- - Output: `{ text: string | string[] }`
442
+ - Input: `{ url: string | string[], extractionModelOverride?: { model: string, config?: object }, model?: string, includeBlocks?: boolean }`
443
+ - Output: `{ text: string | string[], documents: { url: string, text: string, pages: { pageNumber: number, markdown: string, blocks?: unknown[], dimensions?: { width: number, height: number, dpi?: number } }[], pagesProcessed: number }[] }`
413
444
 
414
445
  #### fetchDataSourceDocument
415
446
  Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from @mindstudio-ai/agent instead, which owns parsing, chunking, embedding and citations. Fetch the full extracted text contents of a document in a data source.
@@ -427,8 +458,12 @@ Fetch recent message history from a Slack channel.
427
458
 
428
459
  #### generate3dModel
429
460
  Generate a 3D model using a 3D generation model.
430
- - Text-to-3D models use the prompt field.
431
- - Image-to-3D and multi-view models take image URLs through the selected model's configuration inputs.
461
+ - The default model is wavespeed-tripo3d-h3.1 (Tripo v3.1), which makes a model from the prompt, from one `image`, or from `images`: 2–4 views of the same object, in order front, left, back, right.
462
+ - Models and what they take, set in `threeDModelOverride.config`:
463
+ - From text or an image: wavespeed-tripo3d-h3.1, wavespeed-meshy7.1 (also `images`, 1–4 views), wavespeed-hunyuan3d-v3 (an `image`, plus optional `back_image_url`, `left_image_url`, `right_image_url`), wavespeed-hunyuan-3d-v3.1-rapid, wavespeed-tripo3d-p2, wavespeed-rodin-v2.5 (`images`, 1–5).
464
+ - From an image only: trellis-2, wavespeed-meshy7 (or `images`, 1–4 views), wavespeed-tripo3d-v2.5, seed3d-2.0, wavespeed-sam-3d-objects (with optional `mask_images`).
465
+ - From views: wavespeed-hi3d-v3.0 (`front_image`, and optional `back_image`, `left_image`, `right_image`).
466
+ - `$mode` in the config picks a model's mode (`text-to-3d`, `image-to-3d`, or its multi-view mode). Left out, `images` picks the multi-view mode and `image` picks image-to-3d; with neither, the model's default mode. A text mode needs the prompt; in the others the prompt is optional guidance. A prompt longer than the model reads is refused, not cut.
432
467
  - The output is standardized as a GLB URL plus optional FBX/OBJ/USDZ, thumbnail, texture maps, and provider task ID.
433
468
  - Input: `{ prompt?: string, intermediateAsset?: boolean, threeDModelOverride?: { model: string, config?: object } }`
434
469
  - Output: `{ prompt?: string, glbUrl: string, fbxUrl?: string, objUrl?: string, usdzUrl?: string, thumbnailUrl?: string, textureUrls?: object[], providerTaskId?: string, resolvedConfig?: object }`
@@ -461,14 +496,23 @@ Generate a lip sync video from audio and an image or video.
461
496
 
462
497
  #### generateMusic
463
498
  Generate an audio file from provided instructions (text) using a music model.
464
- - The text field contains the instructions (prompt) for the music generation.
499
+ - `text` describes the song: genre, mood, instruments, tempo, vocals, and for Lyria its structure (`[Verse]`, `[Chorus]`, timestamps such as `[0:00-0:20] Intro`). A text longer than the model reads is refused, not cut.
500
+ - The default model is elevenlabs-music_v2.5. Options go in `musicModelOverride.config`, and differ by model:
501
+ - elevenlabs-music_v2.5, elevenlabs-music_v2: `musicLengthMs`, the song's length from 3,000 to 600,000 (the model chooses one from the text otherwise, and holds a length it's given), and `forceInstrumental: true` for no vocals.
502
+ - lyria-3.5: songs of up to about three minutes, their length steered from the text; `image`, the URL of an image for the song to take its mood and subject from. lyria-3 makes 30-second clips, lyria-3-pro songs of up to about three minutes.
503
+ - minimax-music-3.0: `lyrics` (written from the text when left out), `is_instrumental: true`, `bitrate`, `sample_rate`. minimax-music-2.5 requires `lyrics`.
465
504
  - In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.
466
505
  - Input: `{ text: string, intermediateAsset?: boolean, musicModelOverride?: { model: string, config?: object } }`
467
506
  - Output: `{ audioUrl: string }`
468
507
 
469
508
  #### generateSound
470
509
  Generate a sound effect from a text description using a sound model.
471
- - The text field contains the description of the sound effect to generate.
510
+ - `text` describes the sound effect to generate.
511
+ - The default model is elevenlabs-sound_v2. Options go in `soundModelOverride.config`:
512
+ - `durationSeconds` — the length, from 0.5 to 30. Left out, the model picks one from the text, and the effect is billed as 5 seconds whatever its length.
513
+ - `loop: true` — a sound that repeats with no audible start or end, for ambience and backgrounds.
514
+ - `promptInfluence` — how literally the text is followed, from 0 to 1 (default 0.3).
515
+ - `outputFormat` — MP3 (`mp3_44100_128` by default, up to `mp3_44100_192`) or Opus (`opus_48000_32` to `opus_48000_192`).
472
516
  - In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.
473
517
  - Input: `{ text: string, intermediateAsset?: boolean, soundModelOverride?: { model: string, config?: object } }`
474
518
  - Output: `{ audioUrl: string }`
@@ -1432,17 +1476,8 @@ Call any QuickBooks Online Accounting API route using a connected company.
1432
1476
  ### TypeSafe
1433
1477
 
1434
1478
  #### typesafeEvaluate
1435
- Ask structured questions about text, JSON, or images and get calibrated answers. The model returns a probability, a selected option, or a score. It does not write a reply. Each question is a noul (yes or no, as a probability from 0 to 1), a choice (one option from a set you define, with a probability for each), or a score (a rating against ordered levels). Put every question in the same call. The question id is yours: answers come back under the same ids. The model defaults to Jev (jev-latest). Pass clef or clef-flash to run Cloudflare Clef with the same questions and answers. Clef and Clef Flash can also read up to 4 images.
1436
- - state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).
1437
- - images is for Clef and Clef Flash. Pass up to 4 PNG, JPEG, or WebP images as URLs. Each file is at most 4 MiB, and 8 MiB together. A call on Jev that includes images is rejected.
1438
- - questions is a map. The key is an id you choose. It is not shown to the model. The answer comes back under the same id.
1439
- - A noul asks a yes/no question and returns noul, a probability from 0 (no) to 1 (yes). Optional criteria.true and criteria.false say what a yes and a no mean.
1440
- - A choice picks one option. criteria is a map of option id to a short description (or null). At most 255 options. The answer includes the winning choice, a probability for every option, and confidence.
1441
- - A score rates the state on an ordered rubric. criteria is 2 to 10 level descriptions, low to high. The answer's score can land between levels, and includes a probability per level plus confidence.
1442
- - instructions may be a string, or an object that keeps the question in one field and reference data in the others. Refer to those fields by name in backticks.
1443
- - Send every question you need in one call. The model reads the state once and answers them together.
1444
- - model defaults to jev-latest, the current stable TypeSafe release. jev-preview tracks the newest TypeSafe release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version. clef and clef-flash run Cloudflare Clef on the same questions and answers. clef is the larger model. clef-flash is the faster one. @cf/cloudflare/clef and @cf/cloudflare/clef-flash name the same two. Clef accepts at most 64 questions, and a question id may use only letters, digits, underscore, dot, and hyphen, up to 100 characters. The response model field is the version that answered.
1445
- - Billed per input token. Output tokens are free. Clef and Clef-flash have their own rates.
1479
+ Use evaluateDecision: the same questions, answers and models, with decisionModelOverride in place of model. evaluateDecision's earlier name, which still runs: ask structured questions about text, JSON, or images and get calibrated answers from a decision model.
1480
+ - Runs exactly as evaluateDecision does, with the same questions, answers, models and limits (see its notes), and model in place of decisionModelOverride.model.
1446
1481
  - Input: `{ state: string | object | unknown[], questions: object, model?: string, images?: string[] }`
1447
1482
  - Output: `{ model: string, answers: object, usage: { input_tokens: number, output_tokens: number } }`
1448
1483
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.150",
3
+ "version": "0.1.152",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",