@mindstudio-ai/agent 0.1.181 → 0.1.183
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/CHANGELOG.md +20 -0
- package/dist/cli.js +74 -16
- package/dist/files/store.d.ts +18 -0
- package/dist/generated/steps.d.ts +43 -5
- package/dist/generated/types.d.ts +303 -28
- package/dist/index.js +66 -8
- package/dist/index.js.map +2 -2
- package/llms.txt +59 -37
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ What changed in `@mindstudio-ai/agent`, newest first, each version under its own
|
|
|
4
4
|
|
|
5
5
|
Versions before 0.1.163 aren't recorded here.
|
|
6
6
|
|
|
7
|
+
## 0.1.183
|
|
8
|
+
|
|
9
|
+
### Changed behavior
|
|
10
|
+
|
|
11
|
+
- `mindstudio login` waits for the browser's approval for as long as the platform keeps the sign-in open, which the platform now says when the sign-in starts: three minutes. It waited two minutes whatever the platform's own limit was, and against a platform that doesn't say it still does. Check: nothing in app code. A script that drives `mindstudio login` and expects it to give up after two minutes should allow three.
|
|
12
|
+
- `extractText`'s usage notes say which size limit applies to a file: 50 MB for a URL that isn't one of the app's own files, and for a kind read without a model (text, HTML, spreadsheets, office documents); the model's own limit for one of the app's files that a model reads. They used to say both "up to 100 MB" for LlamaParse and "50MB per URL". Nothing changed at run time. Check: nothing.
|
|
13
|
+
|
|
14
|
+
## 0.1.182
|
|
15
|
+
|
|
16
|
+
### New
|
|
17
|
+
|
|
18
|
+
- A store's `fileFromUrl(url)` is the file one of its URLs names: the URL an action given `{ store }` returned, a `file.url` kept in a row, or a share link. It makes no call and returns the `key`, `url` and `shareUrl()`, and throws `not_a_store_url` for a URL that isn't one of that store's files. Check: code that parses `/_/files/<access>/<store>/<key>` by hand to get a key can call it instead.
|
|
19
|
+
|
|
20
|
+
- `runExternalModel` runs a public community model on Replicate, for a kind of model no other action covers (stem separation, alignment, depth or segmentation maps, a published fine-tune): `replicate: { model, input, timeoutSeconds? }`, the model as `owner/name:version` and the input the model's own. It returns the model's `output`, every file in it copied into the store passed or onto the CDN, and `runSeconds`, which the run is billed for at the model's own per-second price. `describeExternalModel` is free and returns a model pinned to its latest version, its input and output schemas, its licence and that price. Check: an app that calls Replicate with its own client and key for a public community model can call these instead, and drop the key, the polling and the copy of each output.
|
|
21
|
+
|
|
22
|
+
### Changed behavior
|
|
23
|
+
|
|
24
|
+
- Types only, nothing at run time. An input or output that is a map says what its values are, where it was `Record<string, unknown>`: `runFfmpeg`'s `inputs` and `outputs` and the `textureUrls` of the 3D actions are `Record<string, string>`, and the map inputs of the webhook and API-request actions (`input`, `queryParams`, `headers`, `customFields`) take strings. Check: a cast written to read these (`outputs as Record<string, string>`) can go, and a non-string value passed in one of the map inputs is now a type error.
|
|
25
|
+
- `fetchYoutubeVideo`, `fetchYoutubeChannel` and `searchYoutubeTrends` type what they return, where each was `Record<string, unknown>`: `video`, `channel` and `comment` for a video, `videos` for a channel, `trending` for trends, every field optional, and any other field still reachable as `unknown`. Check: a cast written to read these can go.
|
|
26
|
+
|
|
7
27
|
## 0.1.181
|
|
8
28
|
|
|
9
29
|
### Changed behavior
|
package/dist/cli.js
CHANGED
|
@@ -254,6 +254,13 @@ var init_metadata = __esm({
|
|
|
254
254
|
inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Spreadsheet ID or URL" }, "sheetName": { "type": "string", "description": "Sheet/tab name (defaults to first sheet)" }, "startRow": { "type": "string", "description": "First row to delete (1-based, inclusive)" }, "endRow": { "type": "string", "description": "Last row to delete (1-based, inclusive)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["documentId", "startRow", "endRow"] },
|
|
255
255
|
outputSchema: { "description": "This step does not produce output data." }
|
|
256
256
|
},
|
|
257
|
+
"describeExternalModel": {
|
|
258
|
+
stepType: "describeExternalModel",
|
|
259
|
+
description: "Read what a community model on Replicate takes, returns and costs, before running it",
|
|
260
|
+
usageNotes: "- Returns the model pinned to a version (`model`, to pass to `runExternalModel` as it is), its input and output schemas, its licence and its price per second of run time\n- Free. Use it while building, to learn a model's field names, and keep the pinned `model` in the app's code: a model's latest version can change its fields\n- Models Replicate maintains itself (\"official\" models) and private models are refused",
|
|
261
|
+
inputSchema: { "type": "object", "properties": { "replicate": { "type": "object", "properties": { "model": { "type": "string", "description": "The model, as `owner/name`, or `owner/name:version` for one version of it. Without a version, the latest" } }, "required": ["model"], "description": "A public community model on Replicate" } }, "required": ["replicate"] },
|
|
262
|
+
outputSchema: { "type": "object", "properties": { "model": { "type": "string", "description": "The model pinned to a version, as `owner/name:version`: what `runExternalModel` takes" }, "url": { "type": "string", "description": "The model's page" }, "description": { "type": "string", "description": "What the model does, in its author's words" }, "inputSchema": { "type": "object", "properties": {}, "required": [], "description": "The JSON Schema of the model's input: its field names, types, defaults and which are required" }, "outputSchema": { "type": "object", "properties": {}, "required": [], "description": "The JSON Schema of what the model returns" }, "licenseUrl": { "type": "string", "description": "Where the model's licence is published, when its author names one" }, "pricePerSecond": { "type": "number", "description": "Dollars a second of run time costs" }, "priceIsUpperBound": { "type": "boolean", "description": "True when the model's own price couldn't be read, and `pricePerSecond` is the highest rate a run can bill at" } }, "required": ["model", "url", "description", "inputSchema", "outputSchema", "pricePerSecond", "priceIsUpperBound"] }
|
|
263
|
+
},
|
|
257
264
|
"detectChanges": {
|
|
258
265
|
stepType: "detectChanges",
|
|
259
266
|
description: "Detect changes between runs by comparing current input against previously stored state. Routes execution based on whether a change occurred.",
|
|
@@ -313,7 +320,7 @@ var init_metadata = __esm({
|
|
|
313
320
|
"extractText": {
|
|
314
321
|
stepType: "extractText",
|
|
315
322
|
description: "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.",
|
|
316
|
-
usageNotes: "- Best suited for PDFs and raw text/document files. For web pages, use the scrapeUrl step instead.\n- 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 \u2014 there is no need to convert PDF pages to images first.\n- 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.\n- Accepts a single URL, a comma-separated list of URLs, or a JSON array of URLs.\n- Nothing is published. One of the app's own files \u2014 including a private one, or a share link \u2014 is read where it sits; any other URL is downloaded and staged privately for the extraction model, then discarded when extraction finishes.\n- `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\u2026) with their bounding boxes, and the page's size.\n- 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.\n- `extractionModelOverride.model` picks the model; omit it to use the workspace's default:\n - `mistral-ocr-4.1` (the default): PDFs and images up to 50 MB and 1,000 pages, with typed blocks.\n - `mistral-document-ai-2512`: Mistral Document AI on Microsoft Foundry, up to 30 MB and 30 pages, with typed blocks.\n - `llamaparse`: LlamaParse's agentic mode, up to 100 MB and 1,000 pages, markdown without blocks.\n - `google-document-ai`: Google Document AI OCR, up to 500 pages, where the deployment has set it up.\n-
|
|
323
|
+
usageNotes: "- Best suited for PDFs and raw text/document files. For web pages, use the scrapeUrl step instead.\n- 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 \u2014 there is no need to convert PDF pages to images first.\n- 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.\n- Accepts a single URL, a comma-separated list of URLs, or a JSON array of URLs.\n- Nothing is published. One of the app's own files \u2014 including a private one, or a share link \u2014 is read where it sits; any other URL is downloaded and staged privately for the extraction model, then discarded when extraction finishes.\n- `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\u2026) with their bounding boxes, and the page's size.\n- 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.\n- `extractionModelOverride.model` picks the model; omit it to use the workspace's default:\n - `mistral-ocr-4.1` (the default): PDFs and images up to 50 MB and 1,000 pages, with typed blocks.\n - `mistral-document-ai-2512`: Mistral Document AI on Microsoft Foundry, up to 30 MB and 30 pages, with typed blocks.\n - `llamaparse`: LlamaParse's agentic mode, up to 100 MB and 1,000 pages, markdown without blocks.\n - `google-document-ai`: Google Document AI OCR, up to 500 pages, where the deployment has set it up.\n- A URL that isn't one of the app's own files is downloaded first, and can be at most 50 MB. One of the app's own files is read where it sits: up to the model's limit when a model reads it (a PDF, an image), and up to 50 MB for a kind read without a model (text, HTML, spreadsheets and office documents).",
|
|
317
324
|
inputSchema: { "type": "object", "properties": { "url": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "extractionModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Document extraction model identifier" }, "config": { "type": "object", "properties": {}, "required": [], "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model override. Uses the workspace's default document extraction model if not specified" }, "model": { "type": "string", "description": "Optional extraction model id." }, "includeBlocks": { "type": "boolean", "description": "Add each page's typed blocks, with their bounding boxes, and the page's size to `documents`. Off by default, since they're several times the size of the text." } }, "required": ["url"] },
|
|
318
325
|
outputSchema: { "type": "object", "properties": { "text": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "documents": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL the document was read from." }, "text": { "type": "string", "description": "The whole document's text." }, "pages": { "type": "array", "items": { "type": "object", "properties": { "pageNumber": { "type": "number", "description": "1-based." }, "markdown": { "type": "string", "description": "The page's text, as markdown." }, "blocks": { "type": "array", "items": { "type": "string" }, "description": "The page's typed regions (title, text, table, image, header, footer\u2026), each with its bounding box, when `includeBlocks` was set and the model returns them." }, "dimensions": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "dpi": { "type": "number" } }, "required": ["width", "height"], "description": "The page's size in pixels, the space `blocks`' bounding boxes are in." } }, "required": ["pageNumber", "markdown"], "description": "One page of an extracted document." }, "description": "Its pages, in order. A format read without a model is one page." }, "pagesProcessed": { "type": "number", "description": "The pages the model read and billed, 0 for a format read without one." } }, "required": ["url", "text", "pages", "pagesProcessed"] }, "description": "Each URL's document, in the order given, page by page." } }, "required": ["text", "documents"] }
|
|
319
326
|
},
|
|
@@ -354,10 +361,10 @@ var init_metadata = __esm({
|
|
|
354
361
|
},
|
|
355
362
|
"fetchYoutubeChannel": {
|
|
356
363
|
stepType: "fetchYoutubeChannel",
|
|
357
|
-
description: "Retrieve
|
|
358
|
-
usageNotes: "- Accepts a YouTube channel URL (e.g. https://www.youtube.com/@ChannelName or /channel/ID).\n- Returns channel
|
|
364
|
+
description: "Retrieve the recent videos of a YouTube channel.",
|
|
365
|
+
usageNotes: "- Accepts a YouTube channel URL (e.g. https://www.youtube.com/@ChannelName or /channel/ID).\n- Returns `videos`, the channel's most recent first, each with id, title, link, views, length, published_time and thumbnail.",
|
|
359
366
|
inputSchema: { "type": "object", "properties": { "channelUrl": { "type": "string", "description": "YouTube channel URL (e.g. https://www.youtube.com/@ChannelName or /channel/ID)" } }, "required": ["channelUrl"] },
|
|
360
|
-
outputSchema: { "type": "object", "properties": {}, "
|
|
367
|
+
outputSchema: { "type": "object", "properties": { "videos": { "type": "array", "items": { "type": "object", "properties": { "position": { "type": "number" }, "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "views": { "type": "number" }, "length": { "type": "string", "description": `The video's length as YouTube shows it, e.g. "3:26:40"` }, "published_time": { "type": "string", "description": 'When it was published, relative to now, e.g. "18 hours ago"' }, "channel": { "type": "object", "properties": { "is_verified": { "type": "boolean" } } }, "thumbnail": { "type": "object", "properties": { "static": { "type": "string" }, "rich": { "type": "string" } }, "description": "URLs of the still thumbnail and the animated preview" } } }, "description": "The channel's videos, most recent first" } } }
|
|
361
368
|
},
|
|
362
369
|
"fetchYoutubeComments": {
|
|
363
370
|
stepType: "fetchYoutubeComments",
|
|
@@ -369,9 +376,9 @@ var init_metadata = __esm({
|
|
|
369
376
|
"fetchYoutubeVideo": {
|
|
370
377
|
stepType: "fetchYoutubeVideo",
|
|
371
378
|
description: "Retrieve metadata for a YouTube video (title, description, stats, channel info).",
|
|
372
|
-
usageNotes: "- Returns video
|
|
379
|
+
usageNotes: "- Returns `video` (title, description, author, length_seconds, views, likes, published_time, thumbnail), `channel` (name, link, subscribers) and `comment.total`, plus chapters, key moments and recommended videos when the video has them.\n- A field YouTube doesn't show for the video is absent.\n- Video format data is excluded from the response.",
|
|
373
380
|
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "YouTube video URL to fetch metadata for" } }, "required": ["videoUrl"] },
|
|
374
|
-
outputSchema: { "type": "object", "properties": {}, "
|
|
381
|
+
outputSchema: { "type": "object", "properties": { "video": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "author": { "type": "string", "description": "The channel's name" }, "category": { "type": "string" }, "length_seconds": { "type": "number" }, "views": { "type": "number" }, "likes": { "type": "number" }, "published_time": { "type": "string", "description": "The publish date as YouTube shows it" }, "keywords": { "type": "array", "items": { "type": "string" } }, "is_family_safe": { "type": "boolean" }, "thumbnail": { "type": "string", "description": "URL of the video's thumbnail" } }, "description": "The video itself" }, "channel": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "link": { "type": "string" }, "subscribers": { "type": "number" }, "thumbnail": { "type": "string" } }, "description": "The channel that published it" }, "comment": { "type": "object", "properties": { "total": { "type": "number", "description": "How many comments the video has" } } }, "chapters": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "timestamp": { "type": "string" }, "thumbnail": { "type": "string" } } } }, "key_moments": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "start_seconds": { "type": "number" }, "thumbnail": { "type": "string" } } } }, "available_transcripts_languages": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "lang": { "type": "string" } } }, "description": "The languages `fetchYoutubeCaptions` can return for this video" }, "recommended_videos": { "type": "object", "properties": { "videos": { "type": "array", "items": { "type": "object", "properties": { "position": { "type": "number" }, "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "views": { "type": "number" }, "channel": { "type": "string" }, "length": { "type": "string" }, "published_time": { "type": "string" }, "thumbnail": { "type": "string" } } } } } } } }
|
|
375
382
|
},
|
|
376
383
|
"generate3dModel": {
|
|
377
384
|
stepType: "generate3dModel",
|
|
@@ -843,6 +850,13 @@ var init_metadata = __esm({
|
|
|
843
850
|
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to resize" }, "mode": { "enum": ["fit", "exact"], "type": "string", "description": "Resize mode: 'fit' scales within max dimensions, 'exact' forces exact dimensions" }, "maxWidth": { "type": "number", "description": "Maximum width in pixels (used with 'fit' mode)" }, "maxHeight": { "type": "number", "description": "Maximum height in pixels (used with 'fit' mode)" }, "width": { "type": "number", "description": "Exact width in pixels (used with 'exact' mode)" }, "height": { "type": "number", "description": "Exact height in pixels (used with 'exact' mode)" }, "strategy": { "enum": ["pad", "crop"], "type": "string", "description": "Strategy for handling aspect ratio mismatch in 'exact' mode" }, "intermediateAsset": { "type": "boolean", "description": "When true, the asset is created but hidden from the user's gallery (tagged as intermediate)" } }, "required": ["videoUrl", "mode"] },
|
|
844
851
|
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the resized video" } }, "required": ["videoUrl"] }
|
|
845
852
|
},
|
|
853
|
+
"runExternalModel": {
|
|
854
|
+
stepType: "runExternalModel",
|
|
855
|
+
description: "Run a public community model the model catalog doesn't carry, on Replicate",
|
|
856
|
+
usageNotes: "- For a kind of model no other action covers (separating a song's stems, aligning words to audio, depth or segmentation maps, a published fine-tune). A model the catalog has is run with its own action\n- `replicate.model` is `owner/name:version`. Call `describeExternalModel` first: it returns the model pinned to its latest version, its input and output schemas, its licence and its price\n- `replicate.input` is the model's own input, passed through as given. A file input is a URL; a private file of the app's own is signed for the run\n- `output` is whatever the model returns. Its files are copied before Replicate deletes them, an hour after the run: into the store passed as `store`, or onto the public CDN without one, so pass a private store for anything confidential\n- Billed for the seconds the model ran (`runSeconds`), at the model's own per-second price. A cold start is waited for and not billed, and can take minutes on a model that hasn't run lately: `timeoutSeconds` covers the wait and the run together\n- A run that fails throws with the model's own error. One that passes `timeoutSeconds` is cancelled and throws `external_model_timed_out`\n- Models Replicate maintains itself (\"official\" models) and private models are refused. Each model's licence is its author's: `describeExternalModel` links it",
|
|
857
|
+
inputSchema: { "type": "object", "properties": { "replicate": { "type": "object", "properties": { "model": { "type": "string", "description": "The model and the version of it to run, as `owner/name:version`. `describeExternalModel` returns it" }, "input": { "type": "object", "properties": {}, "required": [], "description": "The model's input, by the field names its input schema gives. A file is a URL, and one of the app's own private files is signed for the run" }, "timeoutSeconds": { "type": "number", "description": "Seconds the whole run may take, a cold start included, before it's cancelled. 600 by default, at most 1500" } }, "required": ["model", "input"], "description": "A public community model on Replicate" }, "intermediateAsset": { "type": "boolean", "description": "When true, the output's files are created but hidden from the user's gallery (tagged as intermediate)" } }, "required": ["replicate"] },
|
|
858
|
+
outputSchema: { "type": "object", "properties": { "output": { "description": "The model's output, in the model's own shape. Every file in it is a URL in the app's store when the call named one, on the CDN otherwise" }, "runSeconds": { "type": "number", "description": "Seconds the model ran, which is what the run is billed for" } }, "required": ["output", "runSeconds"] }
|
|
859
|
+
},
|
|
846
860
|
"runFfmpeg": {
|
|
847
861
|
stepType: "runFfmpeg",
|
|
848
862
|
description: "Run an ffmpeg command on media files",
|
|
@@ -976,9 +990,9 @@ var init_metadata = __esm({
|
|
|
976
990
|
"searchYoutubeTrends": {
|
|
977
991
|
stepType: "searchYoutubeTrends",
|
|
978
992
|
description: "Retrieve trending videos on YouTube by category and region.",
|
|
979
|
-
usageNotes: '- Categories: "now" (trending now), "music", "gaming", "films".\n- Supports country and language filtering
|
|
993
|
+
usageNotes: '- Categories: "now" (trending now), "music", "gaming", "films".\n- Supports country and language filtering.\n- Returns `trending`, each video with id, title, link, views, channel, length, published_time and thumbnail; some categories add `recently_trending` and `shorts`.',
|
|
980
994
|
inputSchema: { "type": "object", "properties": { "bp": { "enum": ["now", "music", "gaming", "films"], "type": "string", "description": 'Trending category: "now" (trending now), "music", "gaming", or "films"' }, "hl": { "type": "string", "description": 'Language code (e.g. "en")' }, "gl": { "type": "string", "description": 'Country code (e.g. "US")' } }, "required": ["bp", "hl", "gl"] },
|
|
981
|
-
outputSchema: { "type": "object", "properties": {}, "
|
|
995
|
+
outputSchema: { "type": "object", "properties": { "trending": { "type": "array", "items": { "type": "object", "properties": { "position": { "type": "number" }, "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "views": { "type": "number" }, "channel": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "is_verified": { "type": "boolean" }, "thumbnail": { "type": "string" } } }, "length": { "type": "string", "description": "The video's length as YouTube shows it" }, "published_time": { "type": "string", "description": "When it was published, relative to now" }, "thumbnail": { "type": "string" } } }, "description": "The videos trending in the category and region" }, "recently_trending": { "type": "array", "items": { "type": "object", "properties": { "position": { "type": "number" }, "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "views": { "type": "number" }, "channel": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "is_verified": { "type": "boolean" }, "thumbnail": { "type": "string" } } }, "length": { "type": "string", "description": "The video's length as YouTube shows it" }, "published_time": { "type": "string", "description": "When it was published, relative to now" }, "thumbnail": { "type": "string" } } } }, "shorts": { "type": "array", "items": { "type": "object", "properties": { "position": { "type": "number" }, "id": { "type": "string" }, "title": { "type": "string" }, "link": { "type": "string" }, "views": { "type": "number" }, "thumbnail": { "type": "string" } } }, "description": "Trending Shorts" } } }
|
|
982
996
|
},
|
|
983
997
|
"sendEmail": {
|
|
984
998
|
stepType: "sendEmail",
|
|
@@ -4907,6 +4921,42 @@ var init_store = __esm({
|
|
|
4907
4921
|
});
|
|
4908
4922
|
return this._toFile(key, meta);
|
|
4909
4923
|
}
|
|
4924
|
+
/**
|
|
4925
|
+
* The file one of this store's URLs names: the URL an action given
|
|
4926
|
+
* `{ store }` returned, a `file.url` kept in a row, a share link. Makes no
|
|
4927
|
+
* call, so it carries the key, `url` and `shareUrl()` but no size or type
|
|
4928
|
+
* (`head(key)` reads those), and doesn't say the object exists.
|
|
4929
|
+
*
|
|
4930
|
+
* Throws `not_a_store_url` for a URL that isn't a file of this store.
|
|
4931
|
+
*
|
|
4932
|
+
* @example
|
|
4933
|
+
* ```ts
|
|
4934
|
+
* const { videoUrl } = await mindstudio.downloadVideo(
|
|
4935
|
+
* { videoUrl: input.url, format: 'mp3' },
|
|
4936
|
+
* { store: Recordings },
|
|
4937
|
+
* );
|
|
4938
|
+
* const { key } = Recordings.fileFromUrl(videoUrl);
|
|
4939
|
+
* ```
|
|
4940
|
+
*/
|
|
4941
|
+
fileFromUrl(url) {
|
|
4942
|
+
const prefix = `/_/files/${this._access}/${this._store}/`;
|
|
4943
|
+
let key;
|
|
4944
|
+
try {
|
|
4945
|
+
const { pathname } = new URL(url, "https://app.invalid");
|
|
4946
|
+
if (pathname.startsWith(prefix) && pathname.length > prefix.length) {
|
|
4947
|
+
key = pathname.slice(prefix.length).split("/").map(decodeURIComponent).join("/");
|
|
4948
|
+
}
|
|
4949
|
+
} catch {
|
|
4950
|
+
}
|
|
4951
|
+
if (key === void 0) {
|
|
4952
|
+
throw new MindStudioError(
|
|
4953
|
+
`Not a URL of a file in the ${this._access} store "${this._store}": ${url}`,
|
|
4954
|
+
"not_a_store_url",
|
|
4955
|
+
400
|
|
4956
|
+
);
|
|
4957
|
+
}
|
|
4958
|
+
return this._toFile(key, void 0);
|
|
4959
|
+
}
|
|
4910
4960
|
/** Whether an object exists. */
|
|
4911
4961
|
async exists(key) {
|
|
4912
4962
|
try {
|
|
@@ -7180,6 +7230,9 @@ function applyStepMethods(AgentClass) {
|
|
|
7180
7230
|
proto.deleteGoogleSheetRows = function(step, options) {
|
|
7181
7231
|
return this.executeStep("deleteGoogleSheetRows", step, options);
|
|
7182
7232
|
};
|
|
7233
|
+
proto.describeExternalModel = function(step, options) {
|
|
7234
|
+
return this.executeStep("describeExternalModel", step, options);
|
|
7235
|
+
};
|
|
7183
7236
|
proto.detectChanges = function(step, options) {
|
|
7184
7237
|
return this.executeStep("detectChanges", step, options);
|
|
7185
7238
|
};
|
|
@@ -7420,6 +7473,9 @@ function applyStepMethods(AgentClass) {
|
|
|
7420
7473
|
proto.resizeVideo = function(step, options) {
|
|
7421
7474
|
return this.executeStep("resizeVideo", step, options);
|
|
7422
7475
|
};
|
|
7476
|
+
proto.runExternalModel = function(step, options) {
|
|
7477
|
+
return this.executeStep("runExternalModel", step, options);
|
|
7478
|
+
};
|
|
7423
7479
|
proto.runFfmpeg = function(step, options) {
|
|
7424
7480
|
return this.executeStep("runFfmpeg", step, options);
|
|
7425
7481
|
};
|
|
@@ -10087,7 +10143,7 @@ async function startMcpServer(options) {
|
|
|
10087
10143
|
capabilities: { tools: {} },
|
|
10088
10144
|
serverInfo: {
|
|
10089
10145
|
name: "mindstudio-agent",
|
|
10090
|
-
version: "0.1.
|
|
10146
|
+
version: "0.1.183"
|
|
10091
10147
|
},
|
|
10092
10148
|
instructions: 'Welcome to MindStudio \u2014 a platform with 200+ AI models, 850+ third-party integrations, and pre-built agents.\n\nGetting started:\n1. Call `ask` with any question about the SDK \u2014 it knows every action, model, and connector and returns working code with real model IDs and config options. Examples: ask("generate an image with FLUX"), ask("what models support vision?"), ask("how do I send a Slack message?").\n2. Call `changeName` to set your display name \u2014 use your name or whatever your user calls you. This is how you\'ll appear in MindStudio request logs.\n3. If you have a profile picture, pass its public image URL to `changeProfilePicture`.\n4. For manual browsing, call `listActions` to discover all available actions.\n\nThen use the tools to generate text, images, video, audio, search the web, work with data sources, run agents, and more.\n\nImportant:\n- AI-powered actions (text generation, image generation, video, audio, etc.) cost money. Before running these, call `estimateActionCost` and confirm with the user before proceeding \u2014 unless they\'ve explicitly told you to go ahead.\n- Not all agents from `listAgents` are configured for API use. Do not try to run an agent just because it appears in the list \u2014 it will likely fail. Only run agents the user specifically asks you to run.'
|
|
10093
10149
|
});
|
|
@@ -11127,7 +11183,7 @@ function isNewerVersion(current, latest) {
|
|
|
11127
11183
|
return false;
|
|
11128
11184
|
}
|
|
11129
11185
|
async function checkForUpdate() {
|
|
11130
|
-
const currentVersion = "0.1.
|
|
11186
|
+
const currentVersion = "0.1.183";
|
|
11131
11187
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
11132
11188
|
return null;
|
|
11133
11189
|
}
|
|
@@ -11162,7 +11218,7 @@ async function checkForUpdate() {
|
|
|
11162
11218
|
}
|
|
11163
11219
|
}
|
|
11164
11220
|
function printUpdateNotice(latestVersion) {
|
|
11165
|
-
const currentVersion = "0.1.
|
|
11221
|
+
const currentVersion = "0.1.183";
|
|
11166
11222
|
process.stderr.write(
|
|
11167
11223
|
`
|
|
11168
11224
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -11175,7 +11231,7 @@ function isStandaloneBinary() {
|
|
|
11175
11231
|
return !argv1.includes("node_modules");
|
|
11176
11232
|
}
|
|
11177
11233
|
async function cmdUpdate() {
|
|
11178
|
-
const currentVersion = "0.1.
|
|
11234
|
+
const currentVersion = "0.1.183";
|
|
11179
11235
|
process.stderr.write(
|
|
11180
11236
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
11181
11237
|
`
|
|
@@ -11316,7 +11372,7 @@ async function cmdLogin(options) {
|
|
|
11316
11372
|
process.stderr.write("\n");
|
|
11317
11373
|
printLogo();
|
|
11318
11374
|
process.stderr.write("\n");
|
|
11319
|
-
const ver = "0.1.
|
|
11375
|
+
const ver = "0.1.183";
|
|
11320
11376
|
process.stderr.write(
|
|
11321
11377
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
11322
11378
|
`
|
|
@@ -11351,7 +11407,7 @@ async function cmdLogin(options) {
|
|
|
11351
11407
|
`Failed to request auth URL: ${authRes.status} ${authRes.statusText}`
|
|
11352
11408
|
);
|
|
11353
11409
|
}
|
|
11354
|
-
const { url, token } = await authRes.json();
|
|
11410
|
+
const { url, token, expiresInSeconds } = await authRes.json();
|
|
11355
11411
|
openBrowser(url);
|
|
11356
11412
|
process.stderr.write(
|
|
11357
11413
|
` ${ansi2.cyanBright("Opening browser to authenticate...")}
|
|
@@ -11362,7 +11418,9 @@ async function cmdLogin(options) {
|
|
|
11362
11418
|
`
|
|
11363
11419
|
);
|
|
11364
11420
|
const POLL_INTERVAL = 2e3;
|
|
11365
|
-
const MAX_ATTEMPTS =
|
|
11421
|
+
const MAX_ATTEMPTS = Math.ceil(
|
|
11422
|
+
(expiresInSeconds ?? 120) * 1e3 / POLL_INTERVAL
|
|
11423
|
+
);
|
|
11366
11424
|
for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
|
|
11367
11425
|
await sleep5(POLL_INTERVAL);
|
|
11368
11426
|
const frame = SPINNER_FRAMES[attempt % SPINNER_FRAMES.length];
|
|
@@ -11644,7 +11702,7 @@ async function main() {
|
|
|
11644
11702
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
11645
11703
|
try {
|
|
11646
11704
|
if (command === "version" || command === "-v") {
|
|
11647
|
-
process.stdout.write("0.1.
|
|
11705
|
+
process.stdout.write("0.1.183\n");
|
|
11648
11706
|
return;
|
|
11649
11707
|
}
|
|
11650
11708
|
if (command === "login") {
|
package/dist/files/store.d.ts
CHANGED
|
@@ -179,6 +179,24 @@ export declare class Store {
|
|
|
179
179
|
private _read;
|
|
180
180
|
/** Metadata without downloading. Rejects if the object doesn't exist. */
|
|
181
181
|
head(key: string): Promise<StoredFile>;
|
|
182
|
+
/**
|
|
183
|
+
* The file one of this store's URLs names: the URL an action given
|
|
184
|
+
* `{ store }` returned, a `file.url` kept in a row, a share link. Makes no
|
|
185
|
+
* call, so it carries the key, `url` and `shareUrl()` but no size or type
|
|
186
|
+
* (`head(key)` reads those), and doesn't say the object exists.
|
|
187
|
+
*
|
|
188
|
+
* Throws `not_a_store_url` for a URL that isn't a file of this store.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```ts
|
|
192
|
+
* const { videoUrl } = await mindstudio.downloadVideo(
|
|
193
|
+
* { videoUrl: input.url, format: 'mp3' },
|
|
194
|
+
* { store: Recordings },
|
|
195
|
+
* );
|
|
196
|
+
* const { key } = Recordings.fileFromUrl(videoUrl);
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
fileFromUrl(url: string): StoredFile;
|
|
182
200
|
/** Whether an object exists. */
|
|
183
201
|
exists(key: string): Promise<boolean>;
|
|
184
202
|
/** List objects in the store (optionally under `prefix`), one page at a time. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActiveCampaignAddNoteStepInput, ActiveCampaignCreateContactStepInput, AddSubtitlesToVideoStepInput, AddThumbnailToVideoStepInput, AirtableCreateUpdateRecordStepInput, AirtableDeleteRecordStepInput, AirtableGetRecordStepInput, AirtableGetTableRecordsStepInput, AnalyzeImageStepInput, AnalyzeVideoStepInput, CaptureThumbnailStepInput, CheckAppRoleStepInput, CodaCreateUpdatePageStepInput, CodaCreateUpdateRowStepInput, CodaFindRowStepInput, CodaGetPageStepInput, CodaGetTableRowsStepInput, ConvertPdfToImagesStepInput, CreateDataSourceStepInput, CreateGmailDraftStepInput, CreateGoogleCalendarEventStepInput, CreateGoogleDocStepInput, CreateGoogleSheetStepInput, DecomposeImageStepInput, DeleteDataSourceStepInput, DeleteDataSourceDocumentStepInput, DeleteGmailEmailStepInput, DeleteGoogleCalendarEventStepInput, DeleteGoogleSheetRowsStepInput, DetectChangesStepInput, DetectPIIStepInput, DownloadVideoStepInput, EnhanceImageGenerationPromptStepInput, EnhanceVideoGenerationPromptStepInput, EnrichPersonStepInput, EvaluateDecisionStepInput, ExtractAudioFromVideoStepInput, ExtractTextStepInput, FetchDataSourceDocumentStepInput, FetchGoogleDocStepInput, FetchGoogleSheetStepInput, FetchSlackChannelHistoryStepInput, FetchYoutubeCaptionsStepInput, FetchYoutubeChannelStepInput, FetchYoutubeCommentsStepInput, FetchYoutubeVideoStepInput, Generate3dModelStepInput, GenerateImageStepInput, GenerateLipsyncStepInput, GenerateMusicStepInput, GeneratePdfStepInput, GenerateSoundStepInput, GenerateStaticVideoFromImageStepInput, GenerateVideoStepInput, GetGmailAttachmentsStepInput, GetGmailDraftStepInput, GetGmailEmailStepInput, GetGmailUnreadCountStepInput, GetGoogleCalendarEventStepInput, GetGoogleDriveFileStepInput, GetGoogleSheetInfoStepInput, GetMediaMetadataStepInput, HubspotCreateCompanyStepInput, HubspotCreateContactStepInput, HubspotGetCompanyStepInput, HubspotGetContactStepInput, HunterApiCompanyEnrichmentStepInput, HunterApiDomainSearchStepInput, HunterApiEmailFinderStepInput, HunterApiEmailVerificationStepInput, HunterApiPersonEnrichmentStepInput, ImageFaceSwapStepInput, ImageRemoveWatermarkStepInput, ImportFromUrlStepInput, InsertVideoClipsStepInput, ListDataSourcesStepInput, ListGmailDraftsStepInput, ListGmailLabelsStepInput, ListGoogleCalendarEventsStepInput, ListGoogleDriveFilesStepInput, ListRecentGmailEmailsStepInput, LogicStepInput, MakeDotComRunScenarioStepInput, MergeAudioStepInput, MergeVideosStepInput, MeshyAnimateStepInput, MeshyImageTo3dStepInput, MeshyRemeshStepInput, MeshyRigStepInput, MeshyTextTo3dStepInput, MeshyTextureStepInput, MixAudioIntoVideoStepInput, MuteVideoStepInput, N8nRunNodeStepInput, NotionCreatePageStepInput, NotionUpdatePageStepInput, PeopleSearchStepInput, PostToLinkedInStepInput, PostToSlackChannelStepInput, PostToXStepInput, PostToZapierStepInput, QueryDataSourceStepInput, QueryExternalDatabaseStepInput, QuickbooksApiRequestStepInput, RedactPIIStepInput, RemoveBackgroundFromImageStepInput, RenderVideoFromHtmlCompositionStepInput, ReplyToGmailEmailStepInput, ResizeVideoStepInput, RunFfmpegStepInput, RunFromConnectorRegistryStepInput, ScrapeLinkedInCompanyStepInput, ScrapeLinkedInProfileStepInput, ScrapeUrlStepInput, ScrapeXPostStepInput, ScrapeXProfileStepInput, ScreenshotUrlStepInput, SearchGmailEmailsStepInput, SearchGoogleStepInput, SearchGoogleCalendarEventsStepInput, SearchGoogleDriveStepInput, SearchGoogleImagesStepInput, SearchGoogleNewsStepInput, SearchGoogleTrendsStepInput, SearchPerplexityStepInput, SearchXPostsStepInput, SearchYoutubeStepInput, SearchYoutubeTrendsStepInput, SendEmailStepInput, SendGmailDraftStepInput, SendGmailMessageStepInput, SendSlackDirectMessageStepInput, SendSMSStepInput, SetGmailReadStatusStepInput, SetRunTitleStepInput, SetVariableStepInput, TextToSpeechStepInput, TranscribeAudioStepInput, TrimMediaStepInput, TypesafeEvaluateStepInput, UpdateGmailLabelsStepInput, UpdateGoogleCalendarEventStepInput, UpdateGoogleDocStepInput, UpdateGoogleSheetStepInput, UploadDataSourceDocumentStepInput, UpscaleImageStepInput, UpscaleVideoStepInput, UserMessageStepInput, VideoFaceSwapStepInput, VideoRemoveBackgroundStepInput, VideoRemoveWatermarkStepInput, WatermarkImageStepInput, WatermarkVideoStepInput, YouDotComFinanceResearchStepInput, YouDotComGetPageContentStepInput, YouDotComLiveNewsStepInput, YouDotComWebResearchStepInput, YouDotComWebSearchStepInput, ActiveCampaignAddNoteStepOutput, ActiveCampaignCreateContactStepOutput, AddSubtitlesToVideoStepOutput, AddThumbnailToVideoStepOutput, AirtableCreateUpdateRecordStepOutput, AirtableDeleteRecordStepOutput, AirtableGetRecordStepOutput, AirtableGetTableRecordsStepOutput, AnalyzeImageStepOutput, AnalyzeVideoStepOutput, CaptureThumbnailStepOutput, CheckAppRoleStepOutput, CodaCreateUpdatePageStepOutput, CodaCreateUpdateRowStepOutput, CodaFindRowStepOutput, CodaGetPageStepOutput, CodaGetTableRowsStepOutput, ConvertPdfToImagesStepOutput, CreateDataSourceStepOutput, CreateGmailDraftStepOutput, CreateGoogleCalendarEventStepOutput, CreateGoogleDocStepOutput, CreateGoogleSheetStepOutput, DecomposeImageStepOutput, DeleteDataSourceStepOutput, DeleteDataSourceDocumentStepOutput, DeleteGmailEmailStepOutput, DeleteGoogleCalendarEventStepOutput, DeleteGoogleSheetRowsStepOutput, DetectChangesStepOutput, DetectPIIStepOutput, DownloadVideoStepOutput, EnhanceImageGenerationPromptStepOutput, EnhanceVideoGenerationPromptStepOutput, EnrichPersonStepOutput, EvaluateDecisionStepOutput, ExtractAudioFromVideoStepOutput, ExtractTextStepOutput, FetchDataSourceDocumentStepOutput, FetchGoogleDocStepOutput, FetchGoogleSheetStepOutput, FetchSlackChannelHistoryStepOutput, FetchYoutubeCaptionsStepOutput, FetchYoutubeChannelStepOutput, FetchYoutubeCommentsStepOutput, FetchYoutubeVideoStepOutput, Generate3dModelStepOutput, GenerateImageStepOutput, GenerateLipsyncStepOutput, GenerateMusicStepOutput, GeneratePdfStepOutput, GenerateSoundStepOutput, GenerateStaticVideoFromImageStepOutput, GenerateVideoStepOutput, GetGmailAttachmentsStepOutput, GetGmailDraftStepOutput, GetGmailEmailStepOutput, GetGmailUnreadCountStepOutput, GetGoogleCalendarEventStepOutput, GetGoogleDriveFileStepOutput, GetGoogleSheetInfoStepOutput, GetMediaMetadataStepOutput, HubspotCreateCompanyStepOutput, HubspotCreateContactStepOutput, HubspotGetCompanyStepOutput, HubspotGetContactStepOutput, HunterApiCompanyEnrichmentStepOutput, HunterApiDomainSearchStepOutput, HunterApiEmailFinderStepOutput, HunterApiEmailVerificationStepOutput, HunterApiPersonEnrichmentStepOutput, ImageFaceSwapStepOutput, ImageRemoveWatermarkStepOutput, ImportFromUrlStepOutput, InsertVideoClipsStepOutput, ListDataSourcesStepOutput, ListGmailDraftsStepOutput, ListGmailLabelsStepOutput, ListGoogleCalendarEventsStepOutput, ListGoogleDriveFilesStepOutput, ListRecentGmailEmailsStepOutput, LogicStepOutput, MakeDotComRunScenarioStepOutput, MergeAudioStepOutput, MergeVideosStepOutput, MeshyAnimateStepOutput, MeshyImageTo3dStepOutput, MeshyRemeshStepOutput, MeshyRigStepOutput, MeshyTextTo3dStepOutput, MeshyTextureStepOutput, MixAudioIntoVideoStepOutput, MuteVideoStepOutput, N8nRunNodeStepOutput, NotionCreatePageStepOutput, NotionUpdatePageStepOutput, PeopleSearchStepOutput, PostToLinkedInStepOutput, PostToSlackChannelStepOutput, PostToXStepOutput, PostToZapierStepOutput, QueryDataSourceStepOutput, QueryExternalDatabaseStepOutput, QuickbooksApiRequestStepOutput, RedactPIIStepOutput, RemoveBackgroundFromImageStepOutput, RenderVideoFromHtmlCompositionStepOutput, ReplyToGmailEmailStepOutput, ResizeVideoStepOutput, RunFfmpegStepOutput, RunFromConnectorRegistryStepOutput, ScrapeLinkedInCompanyStepOutput, ScrapeLinkedInProfileStepOutput, ScrapeUrlStepOutput, ScrapeXPostStepOutput, ScrapeXProfileStepOutput, ScreenshotUrlStepOutput, SearchGmailEmailsStepOutput, SearchGoogleStepOutput, SearchGoogleCalendarEventsStepOutput, SearchGoogleDriveStepOutput, SearchGoogleImagesStepOutput, SearchGoogleNewsStepOutput, SearchGoogleTrendsStepOutput, SearchPerplexityStepOutput, SearchXPostsStepOutput, SearchYoutubeStepOutput, SearchYoutubeTrendsStepOutput, SendEmailStepOutput, SendGmailDraftStepOutput, SendGmailMessageStepOutput, SendSlackDirectMessageStepOutput, SendSMSStepOutput, SetGmailReadStatusStepOutput, SetRunTitleStepOutput, SetVariableStepOutput, TextToSpeechStepOutput, TranscribeAudioStepOutput, TrimMediaStepOutput, TypesafeEvaluateStepOutput, UpdateGmailLabelsStepOutput, UpdateGoogleCalendarEventStepOutput, UpdateGoogleDocStepOutput, UpdateGoogleSheetStepOutput, UploadDataSourceDocumentStepOutput, UpscaleImageStepOutput, UpscaleVideoStepOutput, UserMessageStepOutput, VideoFaceSwapStepOutput, VideoRemoveBackgroundStepOutput, VideoRemoveWatermarkStepOutput, WatermarkImageStepOutput, WatermarkVideoStepOutput, YouDotComFinanceResearchStepOutput, YouDotComGetPageContentStepOutput, YouDotComLiveNewsStepOutput, YouDotComWebResearchStepOutput, YouDotComWebSearchStepOutput } from "./types.js";
|
|
1
|
+
import type { ActiveCampaignAddNoteStepInput, ActiveCampaignCreateContactStepInput, AddSubtitlesToVideoStepInput, AddThumbnailToVideoStepInput, AirtableCreateUpdateRecordStepInput, AirtableDeleteRecordStepInput, AirtableGetRecordStepInput, AirtableGetTableRecordsStepInput, AnalyzeImageStepInput, AnalyzeVideoStepInput, CaptureThumbnailStepInput, CheckAppRoleStepInput, CodaCreateUpdatePageStepInput, CodaCreateUpdateRowStepInput, CodaFindRowStepInput, CodaGetPageStepInput, CodaGetTableRowsStepInput, ConvertPdfToImagesStepInput, CreateDataSourceStepInput, CreateGmailDraftStepInput, CreateGoogleCalendarEventStepInput, CreateGoogleDocStepInput, CreateGoogleSheetStepInput, DecomposeImageStepInput, DeleteDataSourceStepInput, DeleteDataSourceDocumentStepInput, DeleteGmailEmailStepInput, DeleteGoogleCalendarEventStepInput, DeleteGoogleSheetRowsStepInput, DescribeExternalModelStepInput, DetectChangesStepInput, DetectPIIStepInput, DownloadVideoStepInput, EnhanceImageGenerationPromptStepInput, EnhanceVideoGenerationPromptStepInput, EnrichPersonStepInput, EvaluateDecisionStepInput, ExtractAudioFromVideoStepInput, ExtractTextStepInput, FetchDataSourceDocumentStepInput, FetchGoogleDocStepInput, FetchGoogleSheetStepInput, FetchSlackChannelHistoryStepInput, FetchYoutubeCaptionsStepInput, FetchYoutubeChannelStepInput, FetchYoutubeCommentsStepInput, FetchYoutubeVideoStepInput, Generate3dModelStepInput, GenerateImageStepInput, GenerateLipsyncStepInput, GenerateMusicStepInput, GeneratePdfStepInput, GenerateSoundStepInput, GenerateStaticVideoFromImageStepInput, GenerateVideoStepInput, GetGmailAttachmentsStepInput, GetGmailDraftStepInput, GetGmailEmailStepInput, GetGmailUnreadCountStepInput, GetGoogleCalendarEventStepInput, GetGoogleDriveFileStepInput, GetGoogleSheetInfoStepInput, GetMediaMetadataStepInput, HubspotCreateCompanyStepInput, HubspotCreateContactStepInput, HubspotGetCompanyStepInput, HubspotGetContactStepInput, HunterApiCompanyEnrichmentStepInput, HunterApiDomainSearchStepInput, HunterApiEmailFinderStepInput, HunterApiEmailVerificationStepInput, HunterApiPersonEnrichmentStepInput, ImageFaceSwapStepInput, ImageRemoveWatermarkStepInput, ImportFromUrlStepInput, InsertVideoClipsStepInput, ListDataSourcesStepInput, ListGmailDraftsStepInput, ListGmailLabelsStepInput, ListGoogleCalendarEventsStepInput, ListGoogleDriveFilesStepInput, ListRecentGmailEmailsStepInput, LogicStepInput, MakeDotComRunScenarioStepInput, MergeAudioStepInput, MergeVideosStepInput, MeshyAnimateStepInput, MeshyImageTo3dStepInput, MeshyRemeshStepInput, MeshyRigStepInput, MeshyTextTo3dStepInput, MeshyTextureStepInput, MixAudioIntoVideoStepInput, MuteVideoStepInput, N8nRunNodeStepInput, NotionCreatePageStepInput, NotionUpdatePageStepInput, PeopleSearchStepInput, PostToLinkedInStepInput, PostToSlackChannelStepInput, PostToXStepInput, PostToZapierStepInput, QueryDataSourceStepInput, QueryExternalDatabaseStepInput, QuickbooksApiRequestStepInput, RedactPIIStepInput, RemoveBackgroundFromImageStepInput, RenderVideoFromHtmlCompositionStepInput, ReplyToGmailEmailStepInput, ResizeVideoStepInput, RunExternalModelStepInput, RunFfmpegStepInput, RunFromConnectorRegistryStepInput, ScrapeLinkedInCompanyStepInput, ScrapeLinkedInProfileStepInput, ScrapeUrlStepInput, ScrapeXPostStepInput, ScrapeXProfileStepInput, ScreenshotUrlStepInput, SearchGmailEmailsStepInput, SearchGoogleStepInput, SearchGoogleCalendarEventsStepInput, SearchGoogleDriveStepInput, SearchGoogleImagesStepInput, SearchGoogleNewsStepInput, SearchGoogleTrendsStepInput, SearchPerplexityStepInput, SearchXPostsStepInput, SearchYoutubeStepInput, SearchYoutubeTrendsStepInput, SendEmailStepInput, SendGmailDraftStepInput, SendGmailMessageStepInput, SendSlackDirectMessageStepInput, SendSMSStepInput, SetGmailReadStatusStepInput, SetRunTitleStepInput, SetVariableStepInput, TextToSpeechStepInput, TranscribeAudioStepInput, TrimMediaStepInput, TypesafeEvaluateStepInput, UpdateGmailLabelsStepInput, UpdateGoogleCalendarEventStepInput, UpdateGoogleDocStepInput, UpdateGoogleSheetStepInput, UploadDataSourceDocumentStepInput, UpscaleImageStepInput, UpscaleVideoStepInput, UserMessageStepInput, VideoFaceSwapStepInput, VideoRemoveBackgroundStepInput, VideoRemoveWatermarkStepInput, WatermarkImageStepInput, WatermarkVideoStepInput, YouDotComFinanceResearchStepInput, YouDotComGetPageContentStepInput, YouDotComLiveNewsStepInput, YouDotComWebResearchStepInput, YouDotComWebSearchStepInput, ActiveCampaignAddNoteStepOutput, ActiveCampaignCreateContactStepOutput, AddSubtitlesToVideoStepOutput, AddThumbnailToVideoStepOutput, AirtableCreateUpdateRecordStepOutput, AirtableDeleteRecordStepOutput, AirtableGetRecordStepOutput, AirtableGetTableRecordsStepOutput, AnalyzeImageStepOutput, AnalyzeVideoStepOutput, CaptureThumbnailStepOutput, CheckAppRoleStepOutput, CodaCreateUpdatePageStepOutput, CodaCreateUpdateRowStepOutput, CodaFindRowStepOutput, CodaGetPageStepOutput, CodaGetTableRowsStepOutput, ConvertPdfToImagesStepOutput, CreateDataSourceStepOutput, CreateGmailDraftStepOutput, CreateGoogleCalendarEventStepOutput, CreateGoogleDocStepOutput, CreateGoogleSheetStepOutput, DecomposeImageStepOutput, DeleteDataSourceStepOutput, DeleteDataSourceDocumentStepOutput, DeleteGmailEmailStepOutput, DeleteGoogleCalendarEventStepOutput, DeleteGoogleSheetRowsStepOutput, DescribeExternalModelStepOutput, DetectChangesStepOutput, DetectPIIStepOutput, DownloadVideoStepOutput, EnhanceImageGenerationPromptStepOutput, EnhanceVideoGenerationPromptStepOutput, EnrichPersonStepOutput, EvaluateDecisionStepOutput, ExtractAudioFromVideoStepOutput, ExtractTextStepOutput, FetchDataSourceDocumentStepOutput, FetchGoogleDocStepOutput, FetchGoogleSheetStepOutput, FetchSlackChannelHistoryStepOutput, FetchYoutubeCaptionsStepOutput, FetchYoutubeChannelStepOutput, FetchYoutubeCommentsStepOutput, FetchYoutubeVideoStepOutput, Generate3dModelStepOutput, GenerateImageStepOutput, GenerateLipsyncStepOutput, GenerateMusicStepOutput, GeneratePdfStepOutput, GenerateSoundStepOutput, GenerateStaticVideoFromImageStepOutput, GenerateVideoStepOutput, GetGmailAttachmentsStepOutput, GetGmailDraftStepOutput, GetGmailEmailStepOutput, GetGmailUnreadCountStepOutput, GetGoogleCalendarEventStepOutput, GetGoogleDriveFileStepOutput, GetGoogleSheetInfoStepOutput, GetMediaMetadataStepOutput, HubspotCreateCompanyStepOutput, HubspotCreateContactStepOutput, HubspotGetCompanyStepOutput, HubspotGetContactStepOutput, HunterApiCompanyEnrichmentStepOutput, HunterApiDomainSearchStepOutput, HunterApiEmailFinderStepOutput, HunterApiEmailVerificationStepOutput, HunterApiPersonEnrichmentStepOutput, ImageFaceSwapStepOutput, ImageRemoveWatermarkStepOutput, ImportFromUrlStepOutput, InsertVideoClipsStepOutput, ListDataSourcesStepOutput, ListGmailDraftsStepOutput, ListGmailLabelsStepOutput, ListGoogleCalendarEventsStepOutput, ListGoogleDriveFilesStepOutput, ListRecentGmailEmailsStepOutput, LogicStepOutput, MakeDotComRunScenarioStepOutput, MergeAudioStepOutput, MergeVideosStepOutput, MeshyAnimateStepOutput, MeshyImageTo3dStepOutput, MeshyRemeshStepOutput, MeshyRigStepOutput, MeshyTextTo3dStepOutput, MeshyTextureStepOutput, MixAudioIntoVideoStepOutput, MuteVideoStepOutput, N8nRunNodeStepOutput, NotionCreatePageStepOutput, NotionUpdatePageStepOutput, PeopleSearchStepOutput, PostToLinkedInStepOutput, PostToSlackChannelStepOutput, PostToXStepOutput, PostToZapierStepOutput, QueryDataSourceStepOutput, QueryExternalDatabaseStepOutput, QuickbooksApiRequestStepOutput, RedactPIIStepOutput, RemoveBackgroundFromImageStepOutput, RenderVideoFromHtmlCompositionStepOutput, ReplyToGmailEmailStepOutput, ResizeVideoStepOutput, RunExternalModelStepOutput, RunFfmpegStepOutput, RunFromConnectorRegistryStepOutput, ScrapeLinkedInCompanyStepOutput, ScrapeLinkedInProfileStepOutput, ScrapeUrlStepOutput, ScrapeXPostStepOutput, ScrapeXProfileStepOutput, ScreenshotUrlStepOutput, SearchGmailEmailsStepOutput, SearchGoogleStepOutput, SearchGoogleCalendarEventsStepOutput, SearchGoogleDriveStepOutput, SearchGoogleImagesStepOutput, SearchGoogleNewsStepOutput, SearchGoogleTrendsStepOutput, SearchPerplexityStepOutput, SearchXPostsStepOutput, SearchYoutubeStepOutput, SearchYoutubeTrendsStepOutput, SendEmailStepOutput, SendGmailDraftStepOutput, SendGmailMessageStepOutput, SendSlackDirectMessageStepOutput, SendSMSStepOutput, SetGmailReadStatusStepOutput, SetRunTitleStepOutput, SetVariableStepOutput, TextToSpeechStepOutput, TranscribeAudioStepOutput, TrimMediaStepOutput, TypesafeEvaluateStepOutput, UpdateGmailLabelsStepOutput, UpdateGoogleCalendarEventStepOutput, UpdateGoogleDocStepOutput, UpdateGoogleSheetStepOutput, UploadDataSourceDocumentStepOutput, UpscaleImageStepOutput, UpscaleVideoStepOutput, UserMessageStepOutput, VideoFaceSwapStepOutput, VideoRemoveBackgroundStepOutput, VideoRemoveWatermarkStepOutput, WatermarkImageStepOutput, WatermarkVideoStepOutput, YouDotComFinanceResearchStepOutput, YouDotComGetPageContentStepOutput, YouDotComLiveNewsStepOutput, YouDotComWebResearchStepOutput, YouDotComWebSearchStepOutput } from "./types.js";
|
|
2
2
|
import type { StepExecutionOptions, StepExecutionResult } from "../types.js";
|
|
3
3
|
export interface StepMethods {
|
|
4
4
|
/**
|
|
@@ -502,6 +502,22 @@ export interface StepMethods {
|
|
|
502
502
|
* ```
|
|
503
503
|
*/
|
|
504
504
|
deleteGoogleSheetRows(step: DeleteGoogleSheetRowsStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<DeleteGoogleSheetRowsStepOutput>>;
|
|
505
|
+
/**
|
|
506
|
+
* Read what a community model on Replicate takes, returns and costs, before running it
|
|
507
|
+
*
|
|
508
|
+
* @remarks
|
|
509
|
+
* - Returns the model pinned to a version (`model`, to pass to `runExternalModel` as it is), its input and output schemas, its licence and its price per second of run time
|
|
510
|
+
* - Free. Use it while building, to learn a model's field names, and keep the pinned `model` in the app's code: a model's latest version can change its fields
|
|
511
|
+
* - Models Replicate maintains itself ("official" models) and private models are refused
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```typescript
|
|
515
|
+
* const result = await agent.describeExternalModel({
|
|
516
|
+
* replicate: {},
|
|
517
|
+
* });
|
|
518
|
+
* ```
|
|
519
|
+
*/
|
|
520
|
+
describeExternalModel(step: DescribeExternalModelStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<DescribeExternalModelStepOutput>>;
|
|
505
521
|
/**
|
|
506
522
|
* Detect changes between runs by comparing current input against previously stored state. Routes execution based on whether a change occurred.
|
|
507
523
|
*
|
|
@@ -668,7 +684,7 @@ export interface StepMethods {
|
|
|
668
684
|
* - `mistral-document-ai-2512`: Mistral Document AI on Microsoft Foundry, up to 30 MB and 30 pages, with typed blocks.
|
|
669
685
|
* - `llamaparse`: LlamaParse's agentic mode, up to 100 MB and 1,000 pages, markdown without blocks.
|
|
670
686
|
* - `google-document-ai`: Google Document AI OCR, up to 500 pages, where the deployment has set it up.
|
|
671
|
-
* -
|
|
687
|
+
* - A URL that isn't one of the app's own files is downloaded first, and can be at most 50 MB. One of the app's own files is read where it sits: up to the model's limit when a model reads it (a PDF, an image), and up to 50 MB for a kind read without a model (text, HTML, spreadsheets and office documents).
|
|
672
688
|
*
|
|
673
689
|
* @example
|
|
674
690
|
* ```typescript
|
|
@@ -759,11 +775,11 @@ export interface StepMethods {
|
|
|
759
775
|
*/
|
|
760
776
|
fetchYoutubeCaptions(step: FetchYoutubeCaptionsStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<FetchYoutubeCaptionsStepOutput>>;
|
|
761
777
|
/**
|
|
762
|
-
* Retrieve
|
|
778
|
+
* Retrieve the recent videos of a YouTube channel.
|
|
763
779
|
*
|
|
764
780
|
* @remarks
|
|
765
781
|
* - Accepts a YouTube channel URL (e.g. https://www.youtube.com/@ChannelName or /channel/ID).
|
|
766
|
-
* - Returns channel
|
|
782
|
+
* - Returns `videos`, the channel's most recent first, each with id, title, link, views, length, published_time and thumbnail.
|
|
767
783
|
*
|
|
768
784
|
* @example
|
|
769
785
|
* ```typescript
|
|
@@ -794,7 +810,8 @@ export interface StepMethods {
|
|
|
794
810
|
* Retrieve metadata for a YouTube video (title, description, stats, channel info).
|
|
795
811
|
*
|
|
796
812
|
* @remarks
|
|
797
|
-
* - Returns video
|
|
813
|
+
* - Returns `video` (title, description, author, length_seconds, views, likes, published_time, thumbnail), `channel` (name, link, subscribers) and `comment.total`, plus chapters, key moments and recommended videos when the video has them.
|
|
814
|
+
* - A field YouTube doesn't show for the video is absent.
|
|
798
815
|
* - Video format data is excluded from the response.
|
|
799
816
|
*
|
|
800
817
|
* @example
|
|
@@ -1846,6 +1863,26 @@ export interface StepMethods {
|
|
|
1846
1863
|
* ```
|
|
1847
1864
|
*/
|
|
1848
1865
|
resizeVideo(step: ResizeVideoStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<ResizeVideoStepOutput>>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Run a public community model the model catalog doesn't carry, on Replicate
|
|
1868
|
+
*
|
|
1869
|
+
* @remarks
|
|
1870
|
+
* - For a kind of model no other action covers (separating a song's stems, aligning words to audio, depth or segmentation maps, a published fine-tune). A model the catalog has is run with its own action
|
|
1871
|
+
* - `replicate.model` is `owner/name:version`. Call `describeExternalModel` first: it returns the model pinned to its latest version, its input and output schemas, its licence and its price
|
|
1872
|
+
* - `replicate.input` is the model's own input, passed through as given. A file input is a URL; a private file of the app's own is signed for the run
|
|
1873
|
+
* - `output` is whatever the model returns. Its files are copied before Replicate deletes them, an hour after the run: into the store passed as `store`, or onto the public CDN without one, so pass a private store for anything confidential
|
|
1874
|
+
* - Billed for the seconds the model ran (`runSeconds`), at the model's own per-second price. A cold start is waited for and not billed, and can take minutes on a model that hasn't run lately: `timeoutSeconds` covers the wait and the run together
|
|
1875
|
+
* - A run that fails throws with the model's own error. One that passes `timeoutSeconds` is cancelled and throws `external_model_timed_out`
|
|
1876
|
+
* - Models Replicate maintains itself ("official" models) and private models are refused. Each model's licence is its author's: `describeExternalModel` links it
|
|
1877
|
+
*
|
|
1878
|
+
* @example
|
|
1879
|
+
* ```typescript
|
|
1880
|
+
* const result = await agent.runExternalModel({
|
|
1881
|
+
* replicate: {},
|
|
1882
|
+
* });
|
|
1883
|
+
* ```
|
|
1884
|
+
*/
|
|
1885
|
+
runExternalModel(step: RunExternalModelStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<RunExternalModelStepOutput>>;
|
|
1849
1886
|
/**
|
|
1850
1887
|
* Run an ffmpeg command on media files
|
|
1851
1888
|
*
|
|
@@ -2189,6 +2226,7 @@ export interface StepMethods {
|
|
|
2189
2226
|
* @remarks
|
|
2190
2227
|
* - Categories: "now" (trending now), "music", "gaming", "films".
|
|
2191
2228
|
* - Supports country and language filtering.
|
|
2229
|
+
* - Returns `trending`, each video with id, title, link, views, channel, length, published_time and thumbnail; some categories add `recently_trending` and `shorts`.
|
|
2192
2230
|
*
|
|
2193
2231
|
* @example
|
|
2194
2232
|
* ```typescript
|