@mindstudio-ai/agent 0.1.180 → 0.1.182
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 +21 -0
- package/dist/cli.js +73 -16
- package/dist/files/store.d.ts +18 -0
- package/dist/generated/steps.d.ts +44 -6
- package/dist/generated/types.d.ts +303 -28
- package/dist/index.js +69 -10
- package/dist/index.js.map +2 -2
- package/llms.txt +60 -38
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ 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.182
|
|
8
|
+
|
|
9
|
+
### New
|
|
10
|
+
|
|
11
|
+
- 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.
|
|
12
|
+
|
|
13
|
+
- `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.
|
|
14
|
+
|
|
15
|
+
### Changed behavior
|
|
16
|
+
|
|
17
|
+
- 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.
|
|
18
|
+
- `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.
|
|
19
|
+
|
|
20
|
+
## 0.1.181
|
|
21
|
+
|
|
22
|
+
### Changed behavior
|
|
23
|
+
|
|
24
|
+
- A database error over the socket throws with the status the platform answered with, as the HTTP path always has, where it was always 400: a parked database server's `database_lease_parked` and `database_unavailable` are 503s, a query past its time a 504, the platform's own fault a 500, and the app's own SQL stays a 400. The code is unchanged. Check code that branches on `err.status === 400` for every database error: branch on `err.code` instead.
|
|
25
|
+
- `generate3dModel`'s usage notes list `wavespeed-meshy-t2.5`, Meshy's low-poly model, which makes a triangle mesh of up to 30,000 polygons from the prompt or one `image`. App code isn't affected.
|
|
26
|
+
- `generateImage`'s usage notes name `ideogram-v4.5` among the models that take one `image`, in place of the MAI models, which retired onto it on 2026-11-05. App code isn't affected.
|
|
27
|
+
|
|
7
28
|
## 0.1.180
|
|
8
29
|
|
|
9
30
|
### 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.",
|
|
@@ -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,14 +376,14 @@ 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",
|
|
378
385
|
description: "Generate a 3D model using a 3D generation model.",
|
|
379
|
-
usageNotes: "- 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\u20134 views of the same object, in order front, left, back, right.\n- Models and what they take, set in `threeDModelOverride.config`:\n - From text or an image: wavespeed-tripo3d-h3.1, wavespeed-meshy7.1 (also `images`, 1\u20134 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\u20135).\n - From an image only: trellis-2, wavespeed-meshy7 (or `images`, 1\u20134 views), seed3d-2.0.\n - From views: wavespeed-hi3d-v3.0 (`front_image`, and optional `back_image`, `left_image`, `right_image`).\n- `$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.\n- The output is standardized as a GLB URL plus optional FBX/OBJ/USDZ, thumbnail, texture maps, and provider task ID.",
|
|
386
|
+
usageNotes: "- 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\u20134 views of the same object, in order front, left, back, right.\n- Models and what they take, set in `threeDModelOverride.config`:\n - From text or an image: wavespeed-tripo3d-h3.1, wavespeed-meshy7.1 (also `images`, 1\u20134 views), wavespeed-meshy-t2.5 (a low-poly mesh of up to 30,000 polygons), 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\u20135).\n - From an image only: trellis-2, wavespeed-meshy7 (or `images`, 1\u20134 views), seed3d-2.0.\n - From views: wavespeed-hi3d-v3.0 (`front_image`, and optional `back_image`, `left_image`, `right_image`).\n- `$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.\n- The output is standardized as a GLB URL plus optional FBX/OBJ/USDZ, thumbnail, texture maps, and provider task ID.",
|
|
380
387
|
inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Text prompt for text-to-3D models, or optional guidance for image-to-3D models" }, "intermediateAsset": { "type": "boolean", "description": "When true, the asset is created but hidden from the user's gallery (tagged as intermediate)" }, "threeDModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "3D generation model identifier" }, "config": { "type": "object", "properties": {}, "required": [], "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default 3D model if not specified" } } },
|
|
381
388
|
outputSchema: { "type": "object", "properties": { "prompt": { "type": "string" }, "glbUrl": { "type": "string" }, "fbxUrl": { "type": "string" }, "objUrl": { "type": "string" }, "usdzUrl": { "type": "string" }, "thumbnailUrl": { "type": "string" }, "textureUrls": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "providerTaskId": { "type": "string" }, "resolvedConfig": { "type": "object", "properties": {}, "required": [] } }, "required": ["glbUrl"] }
|
|
382
389
|
},
|
|
@@ -390,7 +397,7 @@ var init_metadata = __esm({
|
|
|
390
397
|
"generateImage": {
|
|
391
398
|
stepType: "generateImage",
|
|
392
399
|
description: "Generate an image from a text prompt, or edit one, using an AI model.",
|
|
393
|
-
usageNotes: "- Prompts should be descriptive but concise (roughly 3\u20136 sentences).\n- The default model is seedream-4.5. Options go in `imageModelOverride.config` under the model's own names, and differ by model, so look the model up before writing the call. Images to edit or draw from go there too, as URLs: `images` on most models, `source_images` on the Gemini and GPT Image models, one `image` on qwen-image, z-image-turbo, krea-v2-turbo, ideogram-v4 and
|
|
400
|
+
usageNotes: "- Prompts should be descriptive but concise (roughly 3\u20136 sentences).\n- The default model is seedream-4.5. Options go in `imageModelOverride.config` under the model's own names, and differ by model, so look the model up before writing the call. Images to edit or draw from go there too, as URLs: `images` on most models, `source_images` on the Gemini and GPT Image models, one `image` on qwen-image, z-image-turbo, krea-v2-turbo, ideogram-v4 and ideogram-v4.5, `source_image` on Grok Imagine, `image_url` on the Ideogram remix and FLUX Kontext models, and `reference` on krea-v2-large.\n- A model that makes and edits images by separate means takes `$mode` in its config (`text-to-image`, and `edit`, `image-edit` or `image-to-image`, as it lists). Left out, images in the config pick the edit mode, and otherwise the model makes the image from the prompt.\n- Images are hosted on the public CDN by default, or in one of the app's own file stores when the call passes `store` \u2014 a private store keeps the image private.\n- In foreground mode, the image is displayed to the user. In background mode, the URL is saved to a variable.\n- When generateVariants is true with numVariants > 1 (up to 10), the images are generated in parallel. One that fails is left out of the URLs returned, and the step fails only when every one does.\n- In direct execution, foreground mode behaves as background, and userSelect variant behavior behaves as saveAll.",
|
|
394
401
|
inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Text prompt describing the image to generate" }, "intermediateAsset": { "type": "boolean", "description": "When true, the asset is created but hidden from the user's gallery (tagged as intermediate)" }, "imageModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Image generation model identifier" }, "config": { "type": "object", "properties": {}, "required": [], "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default image model if not specified" }, "generateVariants": { "type": "boolean", "description": "Whether to generate multiple image variants in parallel" }, "numVariants": { "type": "number", "description": "Number of variants to generate (max 10)" }, "addWatermark": { "type": "boolean", "description": "Whether to add a MindStudio watermark to the generated image.\n\nThe watermark is a product mark on assets generated in the MindStudio UI. A step run directly via the SDK or API is producing the app's own asset, so it is never watermarked and this flag has no effect there." } }, "required": ["prompt"] },
|
|
395
402
|
outputSchema: { "type": "object", "properties": { "imageUrl": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["imageUrl"] }
|
|
396
403
|
},
|
|
@@ -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",
|
|
@@ -1446,11 +1460,12 @@ function deliver(self, msg) {
|
|
|
1446
1460
|
clearPendingTimer(p);
|
|
1447
1461
|
dropSettledRequest(self, msg.id);
|
|
1448
1462
|
if (msg.error) {
|
|
1463
|
+
const status = typeof msg.error.status === "number" && Number.isInteger(msg.error.status) && msg.error.status >= 400 && msg.error.status <= 599 ? msg.error.status : 400;
|
|
1449
1464
|
p.reject(
|
|
1450
1465
|
new MindStudioError(
|
|
1451
1466
|
`[db] ${msg.error.message || "Database query failed"}`,
|
|
1452
1467
|
msg.error.code || "db_query_error",
|
|
1453
|
-
|
|
1468
|
+
status,
|
|
1454
1469
|
msg.error
|
|
1455
1470
|
)
|
|
1456
1471
|
);
|
|
@@ -4906,6 +4921,42 @@ var init_store = __esm({
|
|
|
4906
4921
|
});
|
|
4907
4922
|
return this._toFile(key, meta);
|
|
4908
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
|
+
}
|
|
4909
4960
|
/** Whether an object exists. */
|
|
4910
4961
|
async exists(key) {
|
|
4911
4962
|
try {
|
|
@@ -7179,6 +7230,9 @@ function applyStepMethods(AgentClass) {
|
|
|
7179
7230
|
proto.deleteGoogleSheetRows = function(step, options) {
|
|
7180
7231
|
return this.executeStep("deleteGoogleSheetRows", step, options);
|
|
7181
7232
|
};
|
|
7233
|
+
proto.describeExternalModel = function(step, options) {
|
|
7234
|
+
return this.executeStep("describeExternalModel", step, options);
|
|
7235
|
+
};
|
|
7182
7236
|
proto.detectChanges = function(step, options) {
|
|
7183
7237
|
return this.executeStep("detectChanges", step, options);
|
|
7184
7238
|
};
|
|
@@ -7419,6 +7473,9 @@ function applyStepMethods(AgentClass) {
|
|
|
7419
7473
|
proto.resizeVideo = function(step, options) {
|
|
7420
7474
|
return this.executeStep("resizeVideo", step, options);
|
|
7421
7475
|
};
|
|
7476
|
+
proto.runExternalModel = function(step, options) {
|
|
7477
|
+
return this.executeStep("runExternalModel", step, options);
|
|
7478
|
+
};
|
|
7422
7479
|
proto.runFfmpeg = function(step, options) {
|
|
7423
7480
|
return this.executeStep("runFfmpeg", step, options);
|
|
7424
7481
|
};
|
|
@@ -10086,7 +10143,7 @@ async function startMcpServer(options) {
|
|
|
10086
10143
|
capabilities: { tools: {} },
|
|
10087
10144
|
serverInfo: {
|
|
10088
10145
|
name: "mindstudio-agent",
|
|
10089
|
-
version: "0.1.
|
|
10146
|
+
version: "0.1.182"
|
|
10090
10147
|
},
|
|
10091
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.'
|
|
10092
10149
|
});
|
|
@@ -11126,7 +11183,7 @@ function isNewerVersion(current, latest) {
|
|
|
11126
11183
|
return false;
|
|
11127
11184
|
}
|
|
11128
11185
|
async function checkForUpdate() {
|
|
11129
|
-
const currentVersion = "0.1.
|
|
11186
|
+
const currentVersion = "0.1.182";
|
|
11130
11187
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
11131
11188
|
return null;
|
|
11132
11189
|
}
|
|
@@ -11161,7 +11218,7 @@ async function checkForUpdate() {
|
|
|
11161
11218
|
}
|
|
11162
11219
|
}
|
|
11163
11220
|
function printUpdateNotice(latestVersion) {
|
|
11164
|
-
const currentVersion = "0.1.
|
|
11221
|
+
const currentVersion = "0.1.182";
|
|
11165
11222
|
process.stderr.write(
|
|
11166
11223
|
`
|
|
11167
11224
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -11174,7 +11231,7 @@ function isStandaloneBinary() {
|
|
|
11174
11231
|
return !argv1.includes("node_modules");
|
|
11175
11232
|
}
|
|
11176
11233
|
async function cmdUpdate() {
|
|
11177
|
-
const currentVersion = "0.1.
|
|
11234
|
+
const currentVersion = "0.1.182";
|
|
11178
11235
|
process.stderr.write(
|
|
11179
11236
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
11180
11237
|
`
|
|
@@ -11315,7 +11372,7 @@ async function cmdLogin(options) {
|
|
|
11315
11372
|
process.stderr.write("\n");
|
|
11316
11373
|
printLogo();
|
|
11317
11374
|
process.stderr.write("\n");
|
|
11318
|
-
const ver = "0.1.
|
|
11375
|
+
const ver = "0.1.182";
|
|
11319
11376
|
process.stderr.write(
|
|
11320
11377
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
11321
11378
|
`
|
|
@@ -11643,7 +11700,7 @@ async function main() {
|
|
|
11643
11700
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
11644
11701
|
try {
|
|
11645
11702
|
if (command === "version" || command === "-v") {
|
|
11646
|
-
process.stdout.write("0.1.
|
|
11703
|
+
process.stdout.write("0.1.182\n");
|
|
11647
11704
|
return;
|
|
11648
11705
|
}
|
|
11649
11706
|
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
|
*
|
|
@@ -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
|
|
@@ -811,7 +828,7 @@ export interface StepMethods {
|
|
|
811
828
|
* @remarks
|
|
812
829
|
* - 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.
|
|
813
830
|
* - Models and what they take, set in `threeDModelOverride.config`:
|
|
814
|
-
* - 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).
|
|
831
|
+
* - From text or an image: wavespeed-tripo3d-h3.1, wavespeed-meshy7.1 (also `images`, 1–4 views), wavespeed-meshy-t2.5 (a low-poly mesh of up to 30,000 polygons), 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).
|
|
815
832
|
* - From an image only: trellis-2, wavespeed-meshy7 (or `images`, 1–4 views), seed3d-2.0.
|
|
816
833
|
* - From views: wavespeed-hi3d-v3.0 (`front_image`, and optional `back_image`, `left_image`, `right_image`).
|
|
817
834
|
* - `$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.
|
|
@@ -828,7 +845,7 @@ export interface StepMethods {
|
|
|
828
845
|
*
|
|
829
846
|
* @remarks
|
|
830
847
|
* - Prompts should be descriptive but concise (roughly 3–6 sentences).
|
|
831
|
-
* - The default model is seedream-4.5. Options go in `imageModelOverride.config` under the model's own names, and differ by model, so look the model up before writing the call. Images to edit or draw from go there too, as URLs: `images` on most models, `source_images` on the Gemini and GPT Image models, one `image` on qwen-image, z-image-turbo, krea-v2-turbo, ideogram-v4 and
|
|
848
|
+
* - The default model is seedream-4.5. Options go in `imageModelOverride.config` under the model's own names, and differ by model, so look the model up before writing the call. Images to edit or draw from go there too, as URLs: `images` on most models, `source_images` on the Gemini and GPT Image models, one `image` on qwen-image, z-image-turbo, krea-v2-turbo, ideogram-v4 and ideogram-v4.5, `source_image` on Grok Imagine, `image_url` on the Ideogram remix and FLUX Kontext models, and `reference` on krea-v2-large.
|
|
832
849
|
* - A model that makes and edits images by separate means takes `$mode` in its config (`text-to-image`, and `edit`, `image-edit` or `image-to-image`, as it lists). Left out, images in the config pick the edit mode, and otherwise the model makes the image from the prompt.
|
|
833
850
|
* - Images are hosted on the public CDN by default, or in one of the app's own file stores when the call passes `store` — a private store keeps the image private.
|
|
834
851
|
* - In foreground mode, the image is displayed to the user. In background mode, the URL is saved to a variable.
|
|
@@ -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
|