@mindstudio-ai/agent 0.1.148 → 0.1.150
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/cli.js +126 -113
- package/dist/index.d.ts +188 -33
- package/dist/index.js +131 -119
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +126 -113
- package/llms.txt +40 -27
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -320,7 +320,7 @@ Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from
|
|
|
320
320
|
- The data source is created empty — use the "Upload Data Source Document" block to add documents.
|
|
321
321
|
- Returns the new data source ID which can be used in subsequent blocks.
|
|
322
322
|
- Input: `{ name: string }`
|
|
323
|
-
- Output: `
|
|
323
|
+
- Output: `{ dataSourceId: string, name: string }`
|
|
324
324
|
|
|
325
325
|
#### createGmailDraft
|
|
326
326
|
Create a draft email in the connected Gmail account.
|
|
@@ -344,7 +344,7 @@ Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from
|
|
|
344
344
|
- The Milvus partition is cleaned up asynchronously by a background cron job.
|
|
345
345
|
- The data source must belong to the current app version.
|
|
346
346
|
- Input: `{ dataSourceId: string }`
|
|
347
|
-
- Output: `
|
|
347
|
+
- Output: `{ dataSourceId: string }`
|
|
348
348
|
|
|
349
349
|
#### deleteDataSourceDocument
|
|
350
350
|
Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from @mindstudio-ai/agent instead, which owns parsing, chunking, embedding and citations. Delete a single document from a data source.
|
|
@@ -352,7 +352,7 @@ Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from
|
|
|
352
352
|
- Requires both the data source ID and document ID.
|
|
353
353
|
- After deletion, reloads vectors into Milvus so the data source reflects the change immediately.
|
|
354
354
|
- Input: `{ dataSourceId: string, documentId: string }`
|
|
355
|
-
- Output: `
|
|
355
|
+
- Output: `{ dataSourceId: string, documentId: string }`
|
|
356
356
|
|
|
357
357
|
#### detectChanges
|
|
358
358
|
Detect changes between runs by comparing current input against previously stored state. Routes execution based on whether a change occurred.
|
|
@@ -417,7 +417,7 @@ Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from
|
|
|
417
417
|
- The document must have been successfully processed (status "done").
|
|
418
418
|
- Also returns document metadata (name, summary, word count).
|
|
419
419
|
- Input: `{ dataSourceId: string, documentId: string }`
|
|
420
|
-
- Output: `
|
|
420
|
+
- Output: `{ documentId: string, name: string, content: string, summary: string, numWords: number }`
|
|
421
421
|
|
|
422
422
|
#### fetchSlackChannelHistory
|
|
423
423
|
Fetch recent message history from a Slack channel.
|
|
@@ -454,17 +454,17 @@ Generate an image from a text prompt using an AI model.
|
|
|
454
454
|
- Output: `{ imageUrl: string | string[] }`
|
|
455
455
|
|
|
456
456
|
#### generateLipsync
|
|
457
|
-
Generate a lip sync video from
|
|
457
|
+
Generate a lip sync video from audio and an image or video.
|
|
458
458
|
- In foreground mode, the video is displayed to the user. In background mode, the URL is saved to a variable.
|
|
459
459
|
- Input: `{ intermediateAsset?: boolean, addWatermark?: boolean, lipsyncModelOverride?: { model: string, config?: object } }`
|
|
460
|
-
- Output: `
|
|
460
|
+
- Output: `{ videoUrl: string }`
|
|
461
461
|
|
|
462
462
|
#### generateMusic
|
|
463
463
|
Generate an audio file from provided instructions (text) using a music model.
|
|
464
464
|
- The text field contains the instructions (prompt) for the music generation.
|
|
465
465
|
- In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.
|
|
466
466
|
- Input: `{ text: string, intermediateAsset?: boolean, musicModelOverride?: { model: string, config?: object } }`
|
|
467
|
-
- Output: `
|
|
467
|
+
- Output: `{ audioUrl: string }`
|
|
468
468
|
|
|
469
469
|
#### generateSound
|
|
470
470
|
Generate a sound effect from a text description using a sound model.
|
|
@@ -513,7 +513,7 @@ Download attachments from a Gmail email and store them on the app's own storage.
|
|
|
513
513
|
- Attachments larger than 25MB are skipped.
|
|
514
514
|
- Use the message ID from Search Gmail Emails, List Recent Gmail Emails, or Get Gmail Email steps.
|
|
515
515
|
- Input: `{ messageId: string, connectionId?: string }`
|
|
516
|
-
- Output: `
|
|
516
|
+
- Output: `{ attachments: { filename: string, mimeType: string, size: number, url: string }[] }`
|
|
517
517
|
|
|
518
518
|
#### getGmailUnreadCount
|
|
519
519
|
Get the number of unread emails in the connected Gmail inbox.
|
|
@@ -521,7 +521,7 @@ Get the number of unread emails in the connected Gmail inbox.
|
|
|
521
521
|
- Returns the unread message count for the inbox label.
|
|
522
522
|
- This is a lightweight call that does not fetch any email content.
|
|
523
523
|
- Input: `{ connectionId?: string }`
|
|
524
|
-
- Output: `
|
|
524
|
+
- Output: `{ unreadCount: number }`
|
|
525
525
|
|
|
526
526
|
#### getMediaMetadata
|
|
527
527
|
Get info about a media file
|
|
@@ -559,7 +559,7 @@ Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from
|
|
|
559
559
|
- Returns metadata for every data source associated with the current app version.
|
|
560
560
|
- Each entry includes the data source ID, name, description, status, and document list.
|
|
561
561
|
- Input: `object`
|
|
562
|
-
- Output: `
|
|
562
|
+
- Output: `{ dataSources: ({ id: string, name: string, description: string, status: "loaded" | "hibernating", dateCreated: string, documents: ({ id: string, name: string, status: "processing" | "done" | "error", numWords?: number, dateUploaded: string })[] })[] }`
|
|
563
563
|
|
|
564
564
|
#### listGmailLabels
|
|
565
565
|
List all labels in the connected Gmail account. Use these label IDs or names with the Update Gmail Labels step.
|
|
@@ -567,7 +567,7 @@ List all labels in the connected Gmail account. Use these label IDs or names wit
|
|
|
567
567
|
- Returns both system labels (INBOX, SENT, TRASH, etc.) and user-created labels.
|
|
568
568
|
- Label type is "system" for built-in labels or "user" for custom labels.
|
|
569
569
|
- Input: `{ connectionId?: string }`
|
|
570
|
-
- Output: `
|
|
570
|
+
- Output: `{ labels: { id: string, name: string, type: string }[] }`
|
|
571
571
|
|
|
572
572
|
#### listRecentGmailEmails
|
|
573
573
|
List recent emails from the connected Gmail inbox.
|
|
@@ -575,7 +575,7 @@ List recent emails from the connected Gmail inbox.
|
|
|
575
575
|
- Returns up to 100 emails (default 5), ordered by most recent first.
|
|
576
576
|
- Functionally equivalent to Search Gmail Emails with an "in:inbox" query.
|
|
577
577
|
- Input: `{ connectionId?: string, exportType: "json" | "text", limit: string }`
|
|
578
|
-
- Output: `
|
|
578
|
+
- Output: `{ emails: { id: string, subject: string, from: string, to: string, date: string, plainBody: string, htmlBody: string, labels: string }[] }`
|
|
579
579
|
|
|
580
580
|
#### logic
|
|
581
581
|
Route execution to different branches based on AI evaluation, comparison operators, or workflow jumps.
|
|
@@ -839,7 +839,7 @@ Send an existing draft from the connected Gmail account.
|
|
|
839
839
|
- The draft is sent and removed from the Drafts folder.
|
|
840
840
|
- Use the draft ID returned by the Create Gmail Draft or List Gmail Drafts steps.
|
|
841
841
|
- Input: `{ draftId: string, connectionId?: string }`
|
|
842
|
-
- Output: `
|
|
842
|
+
- Output: `{ messageId: string }`
|
|
843
843
|
|
|
844
844
|
#### sendGmailMessage
|
|
845
845
|
Send an email from the connected Gmail account.
|
|
@@ -872,7 +872,7 @@ Mark one or more Gmail emails as read or unread.
|
|
|
872
872
|
- Accepts one or more message IDs as a comma-separated string or array.
|
|
873
873
|
- Set markAsRead to true to mark as read, false to mark as unread.
|
|
874
874
|
- Input: `{ messageIds: string, markAsRead: boolean, connectionId?: string }`
|
|
875
|
-
- Output: `
|
|
875
|
+
- Output: `{ messageIds: string[] }`
|
|
876
876
|
|
|
877
877
|
#### setRunTitle
|
|
878
878
|
Set the title of the agent run for the user's history
|
|
@@ -890,21 +890,33 @@ Explicitly set a variable to a given value.
|
|
|
890
890
|
#### textToSpeech
|
|
891
891
|
Generate an audio file from provided text using a speech model.
|
|
892
892
|
- The text field contains the exact words to be spoken (not instructions).
|
|
893
|
+
- Voice, delivery and format are set through `speechModelOverride.config`, whose keys are the model's own (look a model up with its id). Delivery direction, where a model takes one, is never spoken: `styleInstruction` on gemini-3.8-flash-tts and gemini-3.8-flash-lite-tts, `instructions` on gpt-realtime-2.1-mini-tts, `voice_instruction` on seed-speech-tts-2.0, `emotion` on cartesia-sonic-3.6 and the MiniMax models.
|
|
894
|
+
- Tags in the text act at that point, in each vendor's own syntax: `[laughs]` or `[whispers]` on elevenlabs-tts with Eleven v4 or v3; `<laugh>`, `<sigh>` or `<whispers>` on the Gemini 3.8 models; `[laugh]`, `[pause]` or `<whisper>…</whisper>` on grok-voice-tts; `[laughter]` or `<emotion value="excited"/>` on cartesia-sonic-3.6; `[be happy and upbeat]` on inworld-tts-2.
|
|
895
|
+
- A dialogue between voices: set `$mode: 'dialogue'` and name each speaker (`speaker1_name`, `speaker1_voice`, `speaker2_name`, …), then write the text as a script, one `Name: line` per turn. Supported by elevenlabs-tts (Eleven v4 or v3, up to 4 speakers) and the Gemini 3.8 models (exactly 2).
|
|
896
|
+
- A text longer than a model takes in one request is spoken in pieces and joined, and then comes back as MP3 whatever format was asked for.
|
|
893
897
|
- In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.
|
|
894
898
|
- Input: `{ text: string, intermediateAsset?: boolean, speechModelOverride?: { model: string, config?: object } }`
|
|
895
899
|
- Output: `{ audioUrl: string }`
|
|
896
900
|
|
|
897
901
|
#### transcribeAudio
|
|
898
902
|
Convert an audio file to text using a transcription model.
|
|
899
|
-
- The
|
|
900
|
-
-
|
|
901
|
-
-
|
|
902
|
-
- `
|
|
903
|
-
- `detectLanguage: 'yes'` — detect the
|
|
904
|
-
-
|
|
903
|
+
- The default model is elevenlabs-scribe-v2: speakers, word timings, key terms and redaction, at any length.
|
|
904
|
+
- The prompt field gives context (speaker names, domain) to OpenAI's and DeepInfra's models. Other models ignore it; give them `keyterms` instead.
|
|
905
|
+
- Options go in `transcriptionModelOverride.config`, and support varies by model:
|
|
906
|
+
- `language` — the spoken language as a code such as `en` or `es`; left out, the model detects it. Every model takes it. deepgram-nova-3 assumes `en` unless told, and also takes `multi` for speech that switches language (billed at its multilingual rate).
|
|
907
|
+
- `detectLanguage: 'yes'` — detect the language instead of assuming English (deepgram-nova-3 only).
|
|
908
|
+
- `includeSpeakers: 'yes'` — label each passage with a speaker. Supported by elevenlabs-scribe-v2, elevenlabs-scribe-v2-medical, deepgram-nova-3, grok-stt, voxtral-mini-transcribe-2 and gemini-3.5-transcribe; gpt-4o-transcribe-diarize always does. Scribe and Voxtral also switch `text` to a timestamped, speaker-labelled block format; Deepgram, Gemini and gpt-4o-transcribe-diarize to `Speaker N:` lines.
|
|
909
|
+
- `numSpeakers` — the most people talking, to help tell them apart (Scribe).
|
|
910
|
+
- `keyterms` — a list of names, products and terms the audio contains, so they're spelled right. Supported by gpt-transcribe, Scribe, deepgram-nova-3, grok-stt, voxtral-mini-transcribe-2 and gemini-3.5-transcribe. Billed as an add-on on Scribe and Deepgram.
|
|
911
|
+
- `redactPii: 'yes'` — replace names, phone numbers, addresses and other personal information with a label of what was there (Scribe, deepgram-nova-3). Billed as an add-on.
|
|
912
|
+
- `includeWordTimings: 'yes'` — add per-word timings and confidence inside each segment. Supported by Scribe, deepgram-nova-3, whisper-1, grok-stt, voxtral-mini-transcribe-2 and gemini-3.5-transcribe. Off by default because an hour of speech is roughly ten thousand words.
|
|
913
|
+
- `subtitles: 'srt' | 'vtt'` — also return the transcript as a subtitle file, in the `subtitles` output, timed by the segments. Any model that returns segments.
|
|
914
|
+
- gemini-3.5-transcribe can't take `keyterms` together with speakers, word timings or subtitles, and voxtral-mini-transcribe-2 can't take `language` together with word timings or subtitles; either asked for both is refused.
|
|
915
|
+
- The `segments` output carries timings, confidence and speakers as structured data, so there is no need to slice the audio up to recover them. It is populated by Scribe, deepgram-nova-3, grok-stt, whisper-1, gpt-4o-transcribe-diarize, voxtral-mini-transcribe-2 (unless given a language), gemini-3.5-transcribe (with word timings or subtitles) and the DeepInfra-served whisper and qwen models, and absent for models that return nothing but text (gpt-transcribe, gpt-4o-transcribe, gpt-4o-mini-transcribe, the DeepInfra-served voxtral models).
|
|
916
|
+
- A recording of any length can be transcribed. One longer than a model takes at once (OpenAI's and DeepInfra's models, Gemini) is transcribed in pieces and joined, its timings running from the start of the recording. Speakers can't be followed from one piece to the next, so with speakers on, such a recording is refused; Scribe and Deepgram label speakers at any length.
|
|
905
917
|
- `confidence` is always 0..1 with higher meaning more confident, whichever model produced it.
|
|
906
918
|
- Input: `{ audioUrl: string, prompt: string, transcriptionModelOverride?: { model: string, config?: object } }`
|
|
907
|
-
- Output: `{ text: string, segments?: { start: number, end: number, text: string, confidence?: number, speaker?: string, language?: string, words?: { text: string, start?: number, end?: number, confidence?: number, speaker?: string }[] }[], language?: string, durationSeconds?: number }`
|
|
919
|
+
- Output: `{ text: string, segments?: { start: number, end: number, text: string, confidence?: number, speaker?: string, language?: string, words?: { text: string, start?: number, end?: number, confidence?: number, speaker?: string }[] }[], language?: string, durationSeconds?: number, subtitles?: string }`
|
|
908
920
|
|
|
909
921
|
#### trimMedia
|
|
910
922
|
Trim an audio or video clip
|
|
@@ -927,7 +939,7 @@ Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from
|
|
|
927
939
|
- Once processing finishes, vectors are loaded into Milvus so the data source is immediately queryable.
|
|
928
940
|
- Supported file types (when using a URL) are the same as the data source upload UI (PDF, DOCX, TXT, etc.).
|
|
929
941
|
- Input: `{ dataSourceId: string, file: string, fileName: string }`
|
|
930
|
-
- Output: `
|
|
942
|
+
- Output: `{ documentId: string, dataSourceId: string, fileName: string }`
|
|
931
943
|
|
|
932
944
|
#### upscaleImage
|
|
933
945
|
Increase the resolution of an image using AI upscaling.
|
|
@@ -1420,17 +1432,18 @@ Call any QuickBooks Online Accounting API route using a connected company.
|
|
|
1420
1432
|
### TypeSafe
|
|
1421
1433
|
|
|
1422
1434
|
#### typesafeEvaluate
|
|
1423
|
-
Ask
|
|
1424
|
-
- state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).
|
|
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.
|
|
1425
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.
|
|
1426
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.
|
|
1427
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.
|
|
1428
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.
|
|
1429
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.
|
|
1430
1443
|
- Send every question you need in one call. The model reads the state once and answers them together.
|
|
1431
|
-
- model defaults to jev-latest, the current stable release. jev-preview tracks the newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version. The response model field is the version that answered.
|
|
1432
|
-
- Billed per input token. Output tokens are free.
|
|
1433
|
-
- Input: `{ state: string | object | unknown[], questions: object, model?: string }`
|
|
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.
|
|
1446
|
+
- Input: `{ state: string | object | unknown[], questions: object, model?: string, images?: string[] }`
|
|
1434
1447
|
- Output: `{ model: string, answers: object, usage: { input_tokens: number, output_tokens: number } }`
|
|
1435
1448
|
|
|
1436
1449
|
### X
|