@mindstudio-ai/agent 0.0.16 → 0.0.17
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/README.md +24 -11
- package/dist/cli.js +396 -10
- package/dist/index.d.ts +88 -9
- package/dist/index.js +50 -10
- package/dist/index.js.map +1 -1
- package/llms.txt +63 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,9 +32,10 @@ interface AgentOptions {
|
|
|
32
32
|
/**
|
|
33
33
|
* MindStudio API key. Used as a Bearer token for authentication.
|
|
34
34
|
*
|
|
35
|
-
* If omitted, the SDK
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* If omitted, the SDK checks (in order):
|
|
36
|
+
* 1. `MINDSTUDIO_API_KEY` environment variable
|
|
37
|
+
* 2. `~/.mindstudio/config.json` (set via `mindstudio login`)
|
|
38
|
+
* 3. `CALLBACK_TOKEN` environment variable (auto-set inside MindStudio custom functions)
|
|
38
39
|
*/
|
|
39
40
|
apiKey?: string;
|
|
40
41
|
/**
|
|
@@ -183,13 +184,15 @@ interface RunAgentResult {
|
|
|
183
184
|
* Authentication is resolved in order:
|
|
184
185
|
* 1. `apiKey` passed to the constructor
|
|
185
186
|
* 2. `MINDSTUDIO_API_KEY` environment variable
|
|
186
|
-
* 3. `
|
|
187
|
+
* 3. `~/.mindstudio/config.json` (set via `mindstudio login`)
|
|
188
|
+
* 4. `CALLBACK_TOKEN` environment variable (auto-set inside MindStudio custom functions)
|
|
187
189
|
*
|
|
188
190
|
* Base URL is resolved in order:
|
|
189
191
|
* 1. `baseUrl` passed to the constructor
|
|
190
192
|
* 2. `MINDSTUDIO_BASE_URL` environment variable
|
|
191
193
|
* 3. `REMOTE_HOSTNAME` environment variable (auto-set inside MindStudio custom functions)
|
|
192
|
-
* 4.
|
|
194
|
+
* 4. `~/.mindstudio/config.json`
|
|
195
|
+
* 5. `https://v1.mindstudio-api.com` (production default)
|
|
193
196
|
*
|
|
194
197
|
* Rate limiting is handled automatically:
|
|
195
198
|
* - Concurrent requests are queued to stay within server limits
|
|
@@ -2956,6 +2959,8 @@ interface SendSMSStepInput {
|
|
|
2956
2959
|
body: string;
|
|
2957
2960
|
/** OAuth connection ID for the recipient phone number */
|
|
2958
2961
|
connectionId?: string;
|
|
2962
|
+
/** Optional array of media URLs to send as MMS (up to 10, 5MB each) */
|
|
2963
|
+
mediaUrls?: string[];
|
|
2959
2964
|
}
|
|
2960
2965
|
type SendSMSStepOutput = unknown;
|
|
2961
2966
|
interface SetRunTitleStepInput {
|
|
@@ -2968,6 +2973,31 @@ interface SetVariableStepInput {
|
|
|
2968
2973
|
value: string | string[];
|
|
2969
2974
|
}
|
|
2970
2975
|
type SetVariableStepOutput = Record<string, unknown>;
|
|
2976
|
+
interface TelegramEditMessageStepInput {
|
|
2977
|
+
/** Telegram bot token in "botId:token" format */
|
|
2978
|
+
botToken: string;
|
|
2979
|
+
/** Telegram chat ID containing the message */
|
|
2980
|
+
chatId: string;
|
|
2981
|
+
/** ID of the message to edit */
|
|
2982
|
+
messageId: string;
|
|
2983
|
+
/** New message text (MarkdownV2 formatting supported) */
|
|
2984
|
+
text: string;
|
|
2985
|
+
}
|
|
2986
|
+
type TelegramEditMessageStepOutput = unknown;
|
|
2987
|
+
interface TelegramReplyToMessageStepInput {
|
|
2988
|
+
/** Telegram bot token in "botId:token" format */
|
|
2989
|
+
botToken: string;
|
|
2990
|
+
/** Telegram chat ID to send the reply to */
|
|
2991
|
+
chatId: string;
|
|
2992
|
+
/** ID of the message to reply to */
|
|
2993
|
+
replyToMessageId: string;
|
|
2994
|
+
/** Reply text (MarkdownV2 formatting supported) */
|
|
2995
|
+
text: string;
|
|
2996
|
+
}
|
|
2997
|
+
interface TelegramReplyToMessageStepOutput {
|
|
2998
|
+
/** ID of the sent reply message */
|
|
2999
|
+
messageId: number;
|
|
3000
|
+
}
|
|
2971
3001
|
interface TelegramSendAudioStepInput {
|
|
2972
3002
|
/** Telegram bot token in "botId:token" format */
|
|
2973
3003
|
botToken: string;
|
|
@@ -3011,7 +3041,10 @@ interface TelegramSendMessageStepInput {
|
|
|
3011
3041
|
/** Message text to send (MarkdownV2 formatting supported) */
|
|
3012
3042
|
text: string;
|
|
3013
3043
|
}
|
|
3014
|
-
|
|
3044
|
+
interface TelegramSendMessageStepOutput {
|
|
3045
|
+
/** ID of the sent Telegram message */
|
|
3046
|
+
messageId: number;
|
|
3047
|
+
}
|
|
3015
3048
|
interface TelegramSendVideoStepInput {
|
|
3016
3049
|
/** Telegram bot token in "botId:token" format */
|
|
3017
3050
|
botToken: string;
|
|
@@ -3303,7 +3336,7 @@ type GenerateAssetStepOutput = GeneratePdfStepOutput;
|
|
|
3303
3336
|
type GenerateTextStepInput = UserMessageStepInput;
|
|
3304
3337
|
type GenerateTextStepOutput = UserMessageStepOutput;
|
|
3305
3338
|
/** Union of all available step type names. */
|
|
3306
|
-
type StepName = "activeCampaignAddNote" | "activeCampaignCreateContact" | "addSubtitlesToVideo" | "airtableCreateUpdateRecord" | "airtableDeleteRecord" | "airtableGetRecord" | "airtableGetTableRecords" | "analyzeImage" | "analyzeVideo" | "captureThumbnail" | "codaCreateUpdatePage" | "codaCreateUpdateRow" | "codaFindRow" | "codaGetPage" | "codaGetTableRows" | "convertPdfToImages" | "createDataSource" | "createGoogleCalendarEvent" | "createGoogleDoc" | "createGoogleSheet" | "deleteDataSource" | "deleteDataSourceDocument" | "deleteGmailEmail" | "deleteGoogleCalendarEvent" | "deleteGoogleSheetRows" | "detectPII" | "downloadVideo" | "enhanceImageGenerationPrompt" | "enhanceVideoGenerationPrompt" | "enrichPerson" | "extractAudioFromVideo" | "extractText" | "fetchDataSourceDocument" | "fetchGoogleDoc" | "fetchGoogleSheet" | "fetchSlackChannelHistory" | "fetchYoutubeCaptions" | "fetchYoutubeChannel" | "fetchYoutubeComments" | "fetchYoutubeVideo" | "generateChart" | "generateImage" | "generateLipsync" | "generateMusic" | "generatePdf" | "generateStaticVideoFromImage" | "generateVideo" | "getGmailDraft" | "getGmailEmail" | "getGoogleCalendarEvent" | "getGoogleDriveFile" | "getGoogleSheetInfo" | "getMediaMetadata" | "httpRequest" | "hubspotCreateCompany" | "hubspotCreateContact" | "hubspotGetCompany" | "hubspotGetContact" | "hunterApiCompanyEnrichment" | "hunterApiDomainSearch" | "hunterApiEmailFinder" | "hunterApiEmailVerification" | "hunterApiPersonEnrichment" | "imageFaceSwap" | "imageRemoveWatermark" | "insertVideoClips" | "listDataSources" | "listGmailDrafts" | "listGoogleCalendarEvents" | "listGoogleDriveFiles" | "logic" | "makeDotComRunScenario" | "mergeAudio" | "mergeVideos" | "mixAudioIntoVideo" | "muteVideo" | "n8nRunNode" | "notionCreatePage" | "notionUpdatePage" | "peopleSearch" | "postToLinkedIn" | "postToSlackChannel" | "postToX" | "postToZapier" | "queryDataSource" | "queryExternalDatabase" | "redactPII" | "removeBackgroundFromImage" | "replyToGmailEmail" | "resizeVideo" | "runPackagedWorkflow" | "scrapeFacebookPage" | "scrapeFacebookPosts" | "scrapeInstagramComments" | "scrapeInstagramMentions" | "scrapeInstagramPosts" | "scrapeInstagramProfile" | "scrapeInstagramReels" | "scrapeLinkedInCompany" | "scrapeLinkedInProfile" | "scrapeMetaThreadsProfile" | "scrapeUrl" | "scrapeXPost" | "scrapeXProfile" | "searchGoogle" | "searchGoogleCalendarEvents" | "searchGoogleDrive" | "searchGoogleImages" | "searchGoogleNews" | "searchGoogleTrends" | "searchPerplexity" | "searchXPosts" | "searchYoutube" | "searchYoutubeTrends" | "sendEmail" | "sendSMS" | "setRunTitle" | "setVariable" | "telegramSendAudio" | "telegramSendFile" | "telegramSendImage" | "telegramSendMessage" | "telegramSendVideo" | "telegramSetTyping" | "textToSpeech" | "transcribeAudio" | "trimMedia" | "updateGoogleCalendarEvent" | "updateGoogleDoc" | "updateGoogleSheet" | "uploadDataSourceDocument" | "upscaleImage" | "upscaleVideo" | "userMessage" | "videoFaceSwap" | "videoRemoveBackground" | "videoRemoveWatermark" | "watermarkImage" | "watermarkVideo";
|
|
3339
|
+
type StepName = "activeCampaignAddNote" | "activeCampaignCreateContact" | "addSubtitlesToVideo" | "airtableCreateUpdateRecord" | "airtableDeleteRecord" | "airtableGetRecord" | "airtableGetTableRecords" | "analyzeImage" | "analyzeVideo" | "captureThumbnail" | "codaCreateUpdatePage" | "codaCreateUpdateRow" | "codaFindRow" | "codaGetPage" | "codaGetTableRows" | "convertPdfToImages" | "createDataSource" | "createGoogleCalendarEvent" | "createGoogleDoc" | "createGoogleSheet" | "deleteDataSource" | "deleteDataSourceDocument" | "deleteGmailEmail" | "deleteGoogleCalendarEvent" | "deleteGoogleSheetRows" | "detectPII" | "downloadVideo" | "enhanceImageGenerationPrompt" | "enhanceVideoGenerationPrompt" | "enrichPerson" | "extractAudioFromVideo" | "extractText" | "fetchDataSourceDocument" | "fetchGoogleDoc" | "fetchGoogleSheet" | "fetchSlackChannelHistory" | "fetchYoutubeCaptions" | "fetchYoutubeChannel" | "fetchYoutubeComments" | "fetchYoutubeVideo" | "generateChart" | "generateImage" | "generateLipsync" | "generateMusic" | "generatePdf" | "generateStaticVideoFromImage" | "generateVideo" | "getGmailDraft" | "getGmailEmail" | "getGoogleCalendarEvent" | "getGoogleDriveFile" | "getGoogleSheetInfo" | "getMediaMetadata" | "httpRequest" | "hubspotCreateCompany" | "hubspotCreateContact" | "hubspotGetCompany" | "hubspotGetContact" | "hunterApiCompanyEnrichment" | "hunterApiDomainSearch" | "hunterApiEmailFinder" | "hunterApiEmailVerification" | "hunterApiPersonEnrichment" | "imageFaceSwap" | "imageRemoveWatermark" | "insertVideoClips" | "listDataSources" | "listGmailDrafts" | "listGoogleCalendarEvents" | "listGoogleDriveFiles" | "logic" | "makeDotComRunScenario" | "mergeAudio" | "mergeVideos" | "mixAudioIntoVideo" | "muteVideo" | "n8nRunNode" | "notionCreatePage" | "notionUpdatePage" | "peopleSearch" | "postToLinkedIn" | "postToSlackChannel" | "postToX" | "postToZapier" | "queryDataSource" | "queryExternalDatabase" | "redactPII" | "removeBackgroundFromImage" | "replyToGmailEmail" | "resizeVideo" | "runPackagedWorkflow" | "scrapeFacebookPage" | "scrapeFacebookPosts" | "scrapeInstagramComments" | "scrapeInstagramMentions" | "scrapeInstagramPosts" | "scrapeInstagramProfile" | "scrapeInstagramReels" | "scrapeLinkedInCompany" | "scrapeLinkedInProfile" | "scrapeMetaThreadsProfile" | "scrapeUrl" | "scrapeXPost" | "scrapeXProfile" | "searchGoogle" | "searchGoogleCalendarEvents" | "searchGoogleDrive" | "searchGoogleImages" | "searchGoogleNews" | "searchGoogleTrends" | "searchPerplexity" | "searchXPosts" | "searchYoutube" | "searchYoutubeTrends" | "sendEmail" | "sendSMS" | "setRunTitle" | "setVariable" | "telegramEditMessage" | "telegramReplyToMessage" | "telegramSendAudio" | "telegramSendFile" | "telegramSendImage" | "telegramSendMessage" | "telegramSendVideo" | "telegramSetTyping" | "textToSpeech" | "transcribeAudio" | "trimMedia" | "updateGoogleCalendarEvent" | "updateGoogleDoc" | "updateGoogleSheet" | "uploadDataSourceDocument" | "upscaleImage" | "upscaleVideo" | "userMessage" | "videoFaceSwap" | "videoRemoveBackground" | "videoRemoveWatermark" | "watermarkImage" | "watermarkVideo";
|
|
3307
3340
|
/** Maps step names to their input types. */
|
|
3308
3341
|
interface StepInputMap {
|
|
3309
3342
|
activeCampaignAddNote: ActiveCampaignAddNoteStepInput;
|
|
@@ -3424,6 +3457,8 @@ interface StepInputMap {
|
|
|
3424
3457
|
sendSMS: SendSMSStepInput;
|
|
3425
3458
|
setRunTitle: SetRunTitleStepInput;
|
|
3426
3459
|
setVariable: SetVariableStepInput;
|
|
3460
|
+
telegramEditMessage: TelegramEditMessageStepInput;
|
|
3461
|
+
telegramReplyToMessage: TelegramReplyToMessageStepInput;
|
|
3427
3462
|
telegramSendAudio: TelegramSendAudioStepInput;
|
|
3428
3463
|
telegramSendFile: TelegramSendFileStepInput;
|
|
3429
3464
|
telegramSendImage: TelegramSendImageStepInput;
|
|
@@ -3566,6 +3601,8 @@ interface StepOutputMap {
|
|
|
3566
3601
|
sendSMS: SendSMSStepOutput;
|
|
3567
3602
|
setRunTitle: SetRunTitleStepOutput;
|
|
3568
3603
|
setVariable: SetVariableStepOutput;
|
|
3604
|
+
telegramEditMessage: TelegramEditMessageStepOutput;
|
|
3605
|
+
telegramReplyToMessage: TelegramReplyToMessageStepOutput;
|
|
3569
3606
|
telegramSendAudio: TelegramSendAudioStepOutput;
|
|
3570
3607
|
telegramSendFile: TelegramSendFileStepOutput;
|
|
3571
3608
|
telegramSendImage: TelegramSendImageStepOutput;
|
|
@@ -5467,10 +5504,13 @@ interface StepMethods {
|
|
|
5467
5504
|
*/
|
|
5468
5505
|
sendEmail(step: SendEmailStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<SendEmailStepOutput>>;
|
|
5469
5506
|
/**
|
|
5470
|
-
* Send an SMS
|
|
5507
|
+
* Send an SMS or MMS message to a phone number configured via OAuth connection.
|
|
5471
5508
|
*
|
|
5472
5509
|
* @remarks
|
|
5473
5510
|
* - User is responsible for configuring the connection to the number (MindStudio requires double opt-in to prevent spam)
|
|
5511
|
+
* - If mediaUrls are provided, the message is sent as MMS instead of SMS
|
|
5512
|
+
* - MMS supports up to 10 media URLs (images, video, audio, PDF) with a 5MB limit per file
|
|
5513
|
+
* - MMS is only supported on US and Canadian carriers; international numbers will receive SMS only (media silently dropped)
|
|
5474
5514
|
*
|
|
5475
5515
|
* @example
|
|
5476
5516
|
* ```typescript
|
|
@@ -5507,6 +5547,44 @@ interface StepMethods {
|
|
|
5507
5547
|
* ```
|
|
5508
5548
|
*/
|
|
5509
5549
|
setVariable(step: SetVariableStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<SetVariableStepOutput>>;
|
|
5550
|
+
/**
|
|
5551
|
+
* Edit a previously sent Telegram message. Use with the message ID returned by Send Telegram Message.
|
|
5552
|
+
*
|
|
5553
|
+
* @remarks
|
|
5554
|
+
* - Only text messages sent by the bot can be edited.
|
|
5555
|
+
* - The messageId is returned by the Send Telegram Message step.
|
|
5556
|
+
* - Common pattern: send a "Processing..." message, do work, then edit it with the result.
|
|
5557
|
+
*
|
|
5558
|
+
* @example
|
|
5559
|
+
* ```typescript
|
|
5560
|
+
* const result = await agent.telegramEditMessage({
|
|
5561
|
+
* botToken: ``,
|
|
5562
|
+
* chatId: ``,
|
|
5563
|
+
* messageId: ``,
|
|
5564
|
+
* text: ``,
|
|
5565
|
+
* });
|
|
5566
|
+
* ```
|
|
5567
|
+
*/
|
|
5568
|
+
telegramEditMessage(step: TelegramEditMessageStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<TelegramEditMessageStepOutput>>;
|
|
5569
|
+
/**
|
|
5570
|
+
* Send a reply to a specific Telegram message. The reply will be visually threaded in the chat.
|
|
5571
|
+
*
|
|
5572
|
+
* @remarks
|
|
5573
|
+
* - Use the rawMessage.message_id from the incoming trigger variables to reply to the user's message.
|
|
5574
|
+
* - Especially useful in group chats where replies provide context.
|
|
5575
|
+
* - Returns the sent message ID, which can be used with Edit Telegram Message.
|
|
5576
|
+
*
|
|
5577
|
+
* @example
|
|
5578
|
+
* ```typescript
|
|
5579
|
+
* const result = await agent.telegramReplyToMessage({
|
|
5580
|
+
* botToken: ``,
|
|
5581
|
+
* chatId: ``,
|
|
5582
|
+
* replyToMessageId: ``,
|
|
5583
|
+
* text: ``,
|
|
5584
|
+
* });
|
|
5585
|
+
* ```
|
|
5586
|
+
*/
|
|
5587
|
+
telegramReplyToMessage(step: TelegramReplyToMessageStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<TelegramReplyToMessageStepOutput>>;
|
|
5510
5588
|
/**
|
|
5511
5589
|
* Send an audio file to a Telegram chat as music or a voice note via a bot.
|
|
5512
5590
|
*
|
|
@@ -5556,6 +5634,7 @@ interface StepMethods {
|
|
|
5556
5634
|
* @remarks
|
|
5557
5635
|
* - Messages are sent using MarkdownV2 formatting. Special characters are auto-escaped.
|
|
5558
5636
|
* - botToken format is "botId:token" — both parts are required.
|
|
5637
|
+
* - Returns the sent message ID, which can be used with Edit Telegram Message to update the message later.
|
|
5559
5638
|
*
|
|
5560
5639
|
* @example
|
|
5561
5640
|
* ```typescript
|
|
@@ -5932,4 +6011,4 @@ declare const MindStudioAgent: {
|
|
|
5932
6011
|
new (options?: AgentOptions): MindStudioAgent;
|
|
5933
6012
|
};
|
|
5934
6013
|
|
|
5935
|
-
export { type ActiveCampaignAddNoteStepInput, type ActiveCampaignAddNoteStepOutput, type ActiveCampaignCreateContactStepInput, type ActiveCampaignCreateContactStepOutput, type AddSubtitlesToVideoStepInput, type AddSubtitlesToVideoStepOutput, type AgentInfo, type AgentOptions, type AirtableCreateUpdateRecordStepInput, type AirtableCreateUpdateRecordStepOutput, type AirtableDeleteRecordStepInput, type AirtableDeleteRecordStepOutput, type AirtableGetRecordStepInput, type AirtableGetRecordStepOutput, type AirtableGetTableRecordsStepInput, type AirtableGetTableRecordsStepOutput, type AnalyzeImageStepInput, type AnalyzeImageStepOutput, type AnalyzeVideoStepInput, type AnalyzeVideoStepOutput, type CaptureThumbnailStepInput, type CaptureThumbnailStepOutput, type CodaCreateUpdatePageStepInput, type CodaCreateUpdatePageStepOutput, type CodaCreateUpdateRowStepInput, type CodaCreateUpdateRowStepOutput, type CodaFindRowStepInput, type CodaFindRowStepOutput, type CodaGetPageStepInput, type CodaGetPageStepOutput, type CodaGetTableRowsStepInput, type CodaGetTableRowsStepOutput, type ConvertPdfToImagesStepInput, type ConvertPdfToImagesStepOutput, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExtractAudioFromVideoStepInput, type ExtractAudioFromVideoStepOutput, type ExtractTextStepInput, type ExtractTextStepOutput, type FetchDataSourceDocumentStepInput, type FetchDataSourceDocumentStepOutput, type FetchGoogleDocStepInput, type FetchGoogleDocStepOutput, type FetchGoogleSheetStepInput, type FetchGoogleSheetStepOutput, type FetchSlackChannelHistoryStepInput, type FetchSlackChannelHistoryStepOutput, type FetchYoutubeCaptionsStepInput, type FetchYoutubeCaptionsStepOutput, type FetchYoutubeChannelStepInput, type FetchYoutubeChannelStepOutput, type FetchYoutubeCommentsStepInput, type FetchYoutubeCommentsStepOutput, type FetchYoutubeVideoStepInput, type FetchYoutubeVideoStepOutput, type GenerateAssetStepInput, type GenerateAssetStepOutput, type GenerateChartStepInput, type GenerateChartStepOutput, type GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateStaticVideoFromImageStepInput, type GenerateStaticVideoFromImageStepOutput, type GenerateTextStepInput, type GenerateTextStepOutput, type GenerateVideoStepInput, type GenerateVideoStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, type HelperMethods, type HttpRequestStepInput, type HttpRequestStepOutput, type HubspotCreateCompanyStepInput, type HubspotCreateCompanyStepOutput, type HubspotCreateContactStepInput, type HubspotCreateContactStepOutput, type HubspotGetCompanyStepInput, type HubspotGetCompanyStepOutput, type HubspotGetContactStepInput, type HubspotGetContactStepOutput, type HunterApiCompanyEnrichmentStepInput, type HunterApiCompanyEnrichmentStepOutput, type HunterApiDomainSearchStepInput, type HunterApiDomainSearchStepOutput, type HunterApiEmailFinderStepInput, type HunterApiEmailFinderStepOutput, type HunterApiEmailVerificationStepInput, type HunterApiEmailVerificationStepOutput, type HunterApiPersonEnrichmentStepInput, type HunterApiPersonEnrichmentStepOutput, type ImageFaceSwapStepInput, type ImageFaceSwapStepOutput, type ImageRemoveWatermarkStepInput, type ImageRemoveWatermarkStepOutput, type InsertVideoClipsStepInput, type InsertVideoClipsStepOutput, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MixAudioIntoVideoStepInput, type MixAudioIntoVideoStepOutput, type ModelType, type MonacoSnippet, type MonacoSnippetField, type MonacoSnippetFieldType, type MuteVideoStepInput, type MuteVideoStepOutput, type N8nRunNodeStepInput, type N8nRunNodeStepOutput, type NotionCreatePageStepInput, type NotionCreatePageStepOutput, type NotionUpdatePageStepInput, type NotionUpdatePageStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ResizeVideoStepInput, type ResizeVideoStepOutput, type RunAgentOptions, type RunAgentResult, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type ScrapeFacebookPageStepInput, type ScrapeFacebookPageStepOutput, type ScrapeFacebookPostsStepInput, type ScrapeFacebookPostsStepOutput, type ScrapeInstagramCommentsStepInput, type ScrapeInstagramCommentsStepOutput, type ScrapeInstagramMentionsStepInput, type ScrapeInstagramMentionsStepOutput, type ScrapeInstagramPostsStepInput, type ScrapeInstagramPostsStepOutput, type ScrapeInstagramProfileStepInput, type ScrapeInstagramProfileStepOutput, type ScrapeInstagramReelsStepInput, type ScrapeInstagramReelsStepOutput, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, type ScrapeMetaThreadsProfileStepInput, type ScrapeMetaThreadsProfileStepOutput, type ScrapeUrlStepInput, type ScrapeUrlStepOutput, type ScrapeXPostStepInput, type ScrapeXPostStepOutput, type ScrapeXProfileStepInput, type ScrapeXProfileStepOutput, type SearchGoogleCalendarEventsStepInput, type SearchGoogleCalendarEventsStepOutput, type SearchGoogleDriveStepInput, type SearchGoogleDriveStepOutput, type SearchGoogleImagesStepInput, type SearchGoogleImagesStepOutput, type SearchGoogleNewsStepInput, type SearchGoogleNewsStepOutput, type SearchGoogleStepInput, type SearchGoogleStepOutput, type SearchGoogleTrendsStepInput, type SearchGoogleTrendsStepOutput, type SearchPerplexityStepInput, type SearchPerplexityStepOutput, type SearchXPostsStepInput, type SearchXPostsStepOutput, type SearchYoutubeStepInput, type SearchYoutubeStepOutput, type SearchYoutubeTrendsStepInput, type SearchYoutubeTrendsStepOutput, type SendEmailStepInput, type SendEmailStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, type TelegramSendAudioStepInput, type TelegramSendAudioStepOutput, type TelegramSendFileStepInput, type TelegramSendFileStepOutput, type TelegramSendImageStepInput, type TelegramSendImageStepOutput, type TelegramSendMessageStepInput, type TelegramSendMessageStepOutput, type TelegramSendVideoStepInput, type TelegramSendVideoStepOutput, type TelegramSetTypingStepInput, type TelegramSetTypingStepOutput, type TextToSpeechStepInput, type TextToSpeechStepOutput, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, blockTypeAliases, monacoSnippets, stepMetadata };
|
|
6014
|
+
export { type ActiveCampaignAddNoteStepInput, type ActiveCampaignAddNoteStepOutput, type ActiveCampaignCreateContactStepInput, type ActiveCampaignCreateContactStepOutput, type AddSubtitlesToVideoStepInput, type AddSubtitlesToVideoStepOutput, type AgentInfo, type AgentOptions, type AirtableCreateUpdateRecordStepInput, type AirtableCreateUpdateRecordStepOutput, type AirtableDeleteRecordStepInput, type AirtableDeleteRecordStepOutput, type AirtableGetRecordStepInput, type AirtableGetRecordStepOutput, type AirtableGetTableRecordsStepInput, type AirtableGetTableRecordsStepOutput, type AnalyzeImageStepInput, type AnalyzeImageStepOutput, type AnalyzeVideoStepInput, type AnalyzeVideoStepOutput, type CaptureThumbnailStepInput, type CaptureThumbnailStepOutput, type CodaCreateUpdatePageStepInput, type CodaCreateUpdatePageStepOutput, type CodaCreateUpdateRowStepInput, type CodaCreateUpdateRowStepOutput, type CodaFindRowStepInput, type CodaFindRowStepOutput, type CodaGetPageStepInput, type CodaGetPageStepOutput, type CodaGetTableRowsStepInput, type CodaGetTableRowsStepOutput, type ConvertPdfToImagesStepInput, type ConvertPdfToImagesStepOutput, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExtractAudioFromVideoStepInput, type ExtractAudioFromVideoStepOutput, type ExtractTextStepInput, type ExtractTextStepOutput, type FetchDataSourceDocumentStepInput, type FetchDataSourceDocumentStepOutput, type FetchGoogleDocStepInput, type FetchGoogleDocStepOutput, type FetchGoogleSheetStepInput, type FetchGoogleSheetStepOutput, type FetchSlackChannelHistoryStepInput, type FetchSlackChannelHistoryStepOutput, type FetchYoutubeCaptionsStepInput, type FetchYoutubeCaptionsStepOutput, type FetchYoutubeChannelStepInput, type FetchYoutubeChannelStepOutput, type FetchYoutubeCommentsStepInput, type FetchYoutubeCommentsStepOutput, type FetchYoutubeVideoStepInput, type FetchYoutubeVideoStepOutput, type GenerateAssetStepInput, type GenerateAssetStepOutput, type GenerateChartStepInput, type GenerateChartStepOutput, type GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateStaticVideoFromImageStepInput, type GenerateStaticVideoFromImageStepOutput, type GenerateTextStepInput, type GenerateTextStepOutput, type GenerateVideoStepInput, type GenerateVideoStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, type HelperMethods, type HttpRequestStepInput, type HttpRequestStepOutput, type HubspotCreateCompanyStepInput, type HubspotCreateCompanyStepOutput, type HubspotCreateContactStepInput, type HubspotCreateContactStepOutput, type HubspotGetCompanyStepInput, type HubspotGetCompanyStepOutput, type HubspotGetContactStepInput, type HubspotGetContactStepOutput, type HunterApiCompanyEnrichmentStepInput, type HunterApiCompanyEnrichmentStepOutput, type HunterApiDomainSearchStepInput, type HunterApiDomainSearchStepOutput, type HunterApiEmailFinderStepInput, type HunterApiEmailFinderStepOutput, type HunterApiEmailVerificationStepInput, type HunterApiEmailVerificationStepOutput, type HunterApiPersonEnrichmentStepInput, type HunterApiPersonEnrichmentStepOutput, type ImageFaceSwapStepInput, type ImageFaceSwapStepOutput, type ImageRemoveWatermarkStepInput, type ImageRemoveWatermarkStepOutput, type InsertVideoClipsStepInput, type InsertVideoClipsStepOutput, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MixAudioIntoVideoStepInput, type MixAudioIntoVideoStepOutput, type ModelType, type MonacoSnippet, type MonacoSnippetField, type MonacoSnippetFieldType, type MuteVideoStepInput, type MuteVideoStepOutput, type N8nRunNodeStepInput, type N8nRunNodeStepOutput, type NotionCreatePageStepInput, type NotionCreatePageStepOutput, type NotionUpdatePageStepInput, type NotionUpdatePageStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ResizeVideoStepInput, type ResizeVideoStepOutput, type RunAgentOptions, type RunAgentResult, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type ScrapeFacebookPageStepInput, type ScrapeFacebookPageStepOutput, type ScrapeFacebookPostsStepInput, type ScrapeFacebookPostsStepOutput, type ScrapeInstagramCommentsStepInput, type ScrapeInstagramCommentsStepOutput, type ScrapeInstagramMentionsStepInput, type ScrapeInstagramMentionsStepOutput, type ScrapeInstagramPostsStepInput, type ScrapeInstagramPostsStepOutput, type ScrapeInstagramProfileStepInput, type ScrapeInstagramProfileStepOutput, type ScrapeInstagramReelsStepInput, type ScrapeInstagramReelsStepOutput, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, type ScrapeMetaThreadsProfileStepInput, type ScrapeMetaThreadsProfileStepOutput, type ScrapeUrlStepInput, type ScrapeUrlStepOutput, type ScrapeXPostStepInput, type ScrapeXPostStepOutput, type ScrapeXProfileStepInput, type ScrapeXProfileStepOutput, type SearchGoogleCalendarEventsStepInput, type SearchGoogleCalendarEventsStepOutput, type SearchGoogleDriveStepInput, type SearchGoogleDriveStepOutput, type SearchGoogleImagesStepInput, type SearchGoogleImagesStepOutput, type SearchGoogleNewsStepInput, type SearchGoogleNewsStepOutput, type SearchGoogleStepInput, type SearchGoogleStepOutput, type SearchGoogleTrendsStepInput, type SearchGoogleTrendsStepOutput, type SearchPerplexityStepInput, type SearchPerplexityStepOutput, type SearchXPostsStepInput, type SearchXPostsStepOutput, type SearchYoutubeStepInput, type SearchYoutubeStepOutput, type SearchYoutubeTrendsStepInput, type SearchYoutubeTrendsStepOutput, type SendEmailStepInput, type SendEmailStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, type TelegramEditMessageStepInput, type TelegramEditMessageStepOutput, type TelegramReplyToMessageStepInput, type TelegramReplyToMessageStepOutput, type TelegramSendAudioStepInput, type TelegramSendAudioStepOutput, type TelegramSendFileStepInput, type TelegramSendFileStepOutput, type TelegramSendImageStepInput, type TelegramSendImageStepOutput, type TelegramSendMessageStepInput, type TelegramSendMessageStepOutput, type TelegramSendVideoStepInput, type TelegramSendVideoStepOutput, type TelegramSetTypingStepInput, type TelegramSetTypingStepOutput, type TextToSpeechStepInput, type TextToSpeechStepOutput, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, blockTypeAliases, monacoSnippets, stepMetadata };
|
package/dist/index.js
CHANGED
|
@@ -120,6 +120,21 @@ var RateLimiter = class {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
+
// src/config.ts
|
|
124
|
+
import { readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
125
|
+
import { join } from "path";
|
|
126
|
+
import { homedir } from "os";
|
|
127
|
+
var CONFIG_DIR = join(homedir(), ".mindstudio");
|
|
128
|
+
var CONFIG_PATH = join(CONFIG_DIR, "config.json");
|
|
129
|
+
function loadConfig() {
|
|
130
|
+
try {
|
|
131
|
+
const raw = readFileSync(CONFIG_PATH, "utf-8");
|
|
132
|
+
return JSON.parse(raw);
|
|
133
|
+
} catch {
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
123
138
|
// src/generated/steps.ts
|
|
124
139
|
function applyStepMethods(AgentClass) {
|
|
125
140
|
const proto = AgentClass.prototype;
|
|
@@ -477,6 +492,12 @@ function applyStepMethods(AgentClass) {
|
|
|
477
492
|
proto.setVariable = function(step, options) {
|
|
478
493
|
return this.executeStep("setVariable", step, options);
|
|
479
494
|
};
|
|
495
|
+
proto.telegramEditMessage = function(step, options) {
|
|
496
|
+
return this.executeStep("telegramEditMessage", step, options);
|
|
497
|
+
};
|
|
498
|
+
proto.telegramReplyToMessage = function(step, options) {
|
|
499
|
+
return this.executeStep("telegramReplyToMessage", step, options);
|
|
500
|
+
};
|
|
480
501
|
proto.telegramSendAudio = function(step, options) {
|
|
481
502
|
return this.executeStep("telegramSendAudio", step, options);
|
|
482
503
|
};
|
|
@@ -570,8 +591,9 @@ var MindStudioAgent = class {
|
|
|
570
591
|
/** @internal */
|
|
571
592
|
_threadId;
|
|
572
593
|
constructor(options = {}) {
|
|
573
|
-
const
|
|
574
|
-
const
|
|
594
|
+
const config = loadConfig();
|
|
595
|
+
const { token, authType } = resolveToken(options.apiKey, config);
|
|
596
|
+
const baseUrl = options.baseUrl ?? process.env.MINDSTUDIO_BASE_URL ?? process.env.REMOTE_HOSTNAME ?? config.baseUrl ?? DEFAULT_BASE_URL;
|
|
575
597
|
this._reuseThreadId = options.reuseThreadId ?? /^(true|1)$/i.test(process.env.MINDSTUDIO_REUSE_THREAD_ID ?? "");
|
|
576
598
|
this._httpConfig = {
|
|
577
599
|
baseUrl,
|
|
@@ -715,14 +737,16 @@ function sleep2(ms) {
|
|
|
715
737
|
}
|
|
716
738
|
applyStepMethods(MindStudioAgent);
|
|
717
739
|
applyHelperMethods(MindStudioAgent);
|
|
718
|
-
function resolveToken(provided) {
|
|
740
|
+
function resolveToken(provided, config) {
|
|
719
741
|
if (provided) return { token: provided, authType: "apiKey" };
|
|
720
742
|
if (process.env.MINDSTUDIO_API_KEY)
|
|
721
743
|
return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
|
|
744
|
+
if (config?.apiKey)
|
|
745
|
+
return { token: config.apiKey, authType: "apiKey" };
|
|
722
746
|
if (process.env.CALLBACK_TOKEN)
|
|
723
747
|
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
724
748
|
throw new MindStudioError(
|
|
725
|
-
"No API key provided.
|
|
749
|
+
"No API key provided. Run `mindstudio login`, pass `apiKey` to the constructor, or set the MINDSTUDIO_API_KEY environment variable.",
|
|
726
750
|
"missing_api_key",
|
|
727
751
|
401
|
|
728
752
|
);
|
|
@@ -850,10 +874,12 @@ var monacoSnippets = {
|
|
|
850
874
|
"sendSMS": { fields: [["body", "string"]], outputKeys: [] },
|
|
851
875
|
"setRunTitle": { fields: [["title", "string"]], outputKeys: [] },
|
|
852
876
|
"setVariable": { fields: [["value", "string"]], outputKeys: [] },
|
|
877
|
+
"telegramEditMessage": { fields: [["botToken", "string"], ["chatId", "string"], ["messageId", "string"], ["text", "string"]], outputKeys: [] },
|
|
878
|
+
"telegramReplyToMessage": { fields: [["botToken", "string"], ["chatId", "string"], ["replyToMessageId", "string"], ["text", "string"]], outputKeys: ["messageId"] },
|
|
853
879
|
"telegramSendAudio": { fields: [["botToken", "string"], ["chatId", "string"], ["audioUrl", "string"], ["mode", ["audio", "voice"]]], outputKeys: [] },
|
|
854
880
|
"telegramSendFile": { fields: [["botToken", "string"], ["chatId", "string"], ["fileUrl", "string"]], outputKeys: [] },
|
|
855
881
|
"telegramSendImage": { fields: [["botToken", "string"], ["chatId", "string"], ["imageUrl", "string"]], outputKeys: [] },
|
|
856
|
-
"telegramSendMessage": { fields: [["botToken", "string"], ["chatId", "string"], ["text", "string"]], outputKeys: [] },
|
|
882
|
+
"telegramSendMessage": { fields: [["botToken", "string"], ["chatId", "string"], ["text", "string"]], outputKeys: ["messageId"] },
|
|
857
883
|
"telegramSendVideo": { fields: [["botToken", "string"], ["chatId", "string"], ["videoUrl", "string"]], outputKeys: [] },
|
|
858
884
|
"telegramSetTyping": { fields: [["botToken", "string"], ["chatId", "string"]], outputKeys: [] },
|
|
859
885
|
"textToSpeech": { fields: [["text", "string"]], outputKeys: ["audioUrl"] },
|
|
@@ -1705,9 +1731,9 @@ var stepMetadata = {
|
|
|
1705
1731
|
},
|
|
1706
1732
|
"sendSMS": {
|
|
1707
1733
|
stepType: "sendSMS",
|
|
1708
|
-
description: "Send an SMS
|
|
1709
|
-
usageNotes: "- User is responsible for configuring the connection to the number (MindStudio requires double opt-in to prevent spam)",
|
|
1710
|
-
inputSchema: { "type": "object", "properties": { "body": { "type": "string", "description": "SMS message body text" }, "connectionId": { "type": "string", "description": "OAuth connection ID for the recipient phone number" } }, "required": ["body"] },
|
|
1734
|
+
description: "Send an SMS or MMS message to a phone number configured via OAuth connection.",
|
|
1735
|
+
usageNotes: "- User is responsible for configuring the connection to the number (MindStudio requires double opt-in to prevent spam)\n- If mediaUrls are provided, the message is sent as MMS instead of SMS\n- MMS supports up to 10 media URLs (images, video, audio, PDF) with a 5MB limit per file\n- MMS is only supported on US and Canadian carriers; international numbers will receive SMS only (media silently dropped)",
|
|
1736
|
+
inputSchema: { "type": "object", "properties": { "body": { "type": "string", "description": "SMS message body text" }, "connectionId": { "type": "string", "description": "OAuth connection ID for the recipient phone number" }, "mediaUrls": { "type": "array", "items": { "type": "string" }, "description": "Optional array of media URLs to send as MMS (up to 10, 5MB each)" } }, "required": ["body"] },
|
|
1711
1737
|
outputSchema: { "description": "This step does not produce output data." }
|
|
1712
1738
|
},
|
|
1713
1739
|
"setRunTitle": {
|
|
@@ -1724,6 +1750,20 @@ var stepMetadata = {
|
|
|
1724
1750
|
inputSchema: { "type": "object", "properties": { "value": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["value"], "description": "Configuration for the set variable step" },
|
|
1725
1751
|
outputSchema: { "type": "object" }
|
|
1726
1752
|
},
|
|
1753
|
+
"telegramEditMessage": {
|
|
1754
|
+
stepType: "telegramEditMessage",
|
|
1755
|
+
description: "Edit a previously sent Telegram message. Use with the message ID returned by Send Telegram Message.",
|
|
1756
|
+
usageNotes: '- Only text messages sent by the bot can be edited.\n- The messageId is returned by the Send Telegram Message step.\n- Common pattern: send a "Processing..." message, do work, then edit it with the result.',
|
|
1757
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID containing the message" }, "messageId": { "type": "string", "description": "ID of the message to edit" }, "text": { "type": "string", "description": "New message text (MarkdownV2 formatting supported)" } }, "required": ["botToken", "chatId", "messageId", "text"] },
|
|
1758
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
1759
|
+
},
|
|
1760
|
+
"telegramReplyToMessage": {
|
|
1761
|
+
stepType: "telegramReplyToMessage",
|
|
1762
|
+
description: "Send a reply to a specific Telegram message. The reply will be visually threaded in the chat.",
|
|
1763
|
+
usageNotes: "- Use the rawMessage.message_id from the incoming trigger variables to reply to the user's message.\n- Especially useful in group chats where replies provide context.\n- Returns the sent message ID, which can be used with Edit Telegram Message.",
|
|
1764
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the reply to" }, "replyToMessageId": { "type": "string", "description": "ID of the message to reply to" }, "text": { "type": "string", "description": "Reply text (MarkdownV2 formatting supported)" } }, "required": ["botToken", "chatId", "replyToMessageId", "text"] },
|
|
1765
|
+
outputSchema: { "type": "object", "properties": { "messageId": { "type": "number", "description": "ID of the sent reply message" } }, "required": ["messageId"] }
|
|
1766
|
+
},
|
|
1727
1767
|
"telegramSendAudio": {
|
|
1728
1768
|
stepType: "telegramSendAudio",
|
|
1729
1769
|
description: "Send an audio file to a Telegram chat as music or a voice note via a bot.",
|
|
@@ -1748,9 +1788,9 @@ var stepMetadata = {
|
|
|
1748
1788
|
"telegramSendMessage": {
|
|
1749
1789
|
stepType: "telegramSendMessage",
|
|
1750
1790
|
description: "Send a text message to a Telegram chat via a bot.",
|
|
1751
|
-
usageNotes: '- Messages are sent using MarkdownV2 formatting. Special characters are auto-escaped.\n- botToken format is "botId:token" \u2014 both parts are required.',
|
|
1791
|
+
usageNotes: '- Messages are sent using MarkdownV2 formatting. Special characters are auto-escaped.\n- botToken format is "botId:token" \u2014 both parts are required.\n- Returns the sent message ID, which can be used with Edit Telegram Message to update the message later.',
|
|
1752
1792
|
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the message to" }, "text": { "type": "string", "description": "Message text to send (MarkdownV2 formatting supported)" } }, "required": ["botToken", "chatId", "text"] },
|
|
1753
|
-
outputSchema: { "description": "
|
|
1793
|
+
outputSchema: { "type": "object", "properties": { "messageId": { "type": "number", "description": "ID of the sent Telegram message" } }, "required": ["messageId"] }
|
|
1754
1794
|
},
|
|
1755
1795
|
"telegramSendVideo": {
|
|
1756
1796
|
stepType: "telegramSendVideo",
|