@mindstudio-ai/agent 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms.txt ADDED
@@ -0,0 +1,225 @@
1
+ # @mindstudio-ai/agent
2
+
3
+ TypeScript SDK for executing MindStudio workflow steps. Each method calls a specific AI/automation action and returns typed results.
4
+
5
+ ## Setup
6
+
7
+ ```typescript
8
+ import { MindStudioAgent } from '@mindstudio-ai/agent';
9
+
10
+ // With API key
11
+ const agent = new MindStudioAgent({ apiKey: 'your-key' });
12
+
13
+ // Or via environment variables (MINDSTUDIO_API_KEY or CALLBACK_TOKEN)
14
+ const agent = new MindStudioAgent();
15
+ ```
16
+
17
+ ## Usage pattern
18
+
19
+ Every method returns the output fields directly, plus `$appId`, `$threadId`, and `$rateLimitRemaining` metadata:
20
+
21
+ ```typescript
22
+ const { content } = await agent.generateText({ message: 'Hello' });
23
+
24
+ // Thread persistence — pass $appId/$threadId to maintain state across calls:
25
+ const r1 = await agent.generateText({ message: 'My name is Alice' });
26
+ const r2 = await agent.generateText(
27
+ { message: 'What is my name?' },
28
+ { threadId: r1.$threadId, appId: r1.$appId },
29
+ );
30
+ ```
31
+
32
+ ## Error handling
33
+
34
+ ```typescript
35
+ import { MindStudioError } from '@mindstudio-ai/agent';
36
+ // Throws MindStudioError with .code, .status, .details
37
+ // 429 errors are retried automatically (3 retries by default)
38
+ ```
39
+
40
+ ## Available methods
41
+
42
+ Each entry: `method(requiredParams) -> outputKeys` — description
43
+
44
+ ### General
45
+
46
+ - `addSubtitlesToVideo(videoUrl, language, fontName, fontSize, fontWeight, fontColor, highlightColor, strokeWidth, strokeColor, backgroundColor, backgroundOpacity, position, yOffset, wordsPerSubtitle, enableAnimation)` -> { videoUrl } — Add Subtitles To Video
47
+ - `analyzeImage(prompt, imageUrl)` -> { analysis } — Analyze Image
48
+ - `analyzeVideo(prompt, videoUrl)` -> { analysis } — Analyze Video
49
+ - `captureThumbnail(videoUrl, at)` -> { thumbnailUrl } — Get Image from Video Frame
50
+ - `convertPdfToImages(pdfUrl)` -> { imageUrls } — Convert PDF to Images
51
+ - `createDataSource(name)` — Create Data Source
52
+ - `deleteDataSource(dataSourceId)` — Delete Data Source
53
+ - `deleteDataSourceDocument(dataSourceId, documentId)` — Delete Data Source Document
54
+ - `detectPII(input, language, entities)` -> { detected, detections } — Detect PII
55
+ - `downloadVideo(videoUrl, format)` -> { videoUrl } — Download Video
56
+ - `enhanceImageGenerationPrompt(initialPrompt, includeNegativePrompt, systemPrompt)` -> { prompt } — Enhance Image Prompt
57
+ - `enhanceVideoGenerationPrompt(initialPrompt, includeNegativePrompt, systemPrompt)` -> { prompt } — Enhance Video Prompt
58
+ - `extractAudioFromVideo(videoUrl)` -> { audioUrl } — Extract Audio from Video
59
+ - `extractText(url)` -> { text } — Extract Text from URL
60
+ - `fetchDataSourceDocument(dataSourceId, documentId)` — Fetch Data Source Document
61
+ - `fetchSlackChannelHistory(connectionId, channelId)` -> { messages } — Fetch Slack Channel History
62
+ - `generateAsset(source, sourceType, outputFormat, pageSize, testData)` -> { url } — Generate HTML Asset
63
+ - `generateChart(chart)` -> { chartUrl } — Generate Chart
64
+ - `generateImage(prompt)` -> { imageUrl } — Generate Image
65
+ - `generateLipsync()` — Generate Lipsync
66
+ - `generateMusic(text)` — Generate Music
67
+ - `generateStaticVideoFromImage(imageUrl, duration)` -> { videoUrl } — Generate Static Video from Image
68
+ - `generateText(message)` -> { content } — User Message
69
+ - `generateVideo(prompt)` -> { videoUrl } — Generate Video
70
+ - `getMediaMetadata(mediaUrl)` -> { metadata } — Get Media Metadata
71
+ - `httpRequest(url, method, headers, queryParams, body, bodyItems, contentType, customContentType)` -> { ok, status, statusText, response } — HTTP Request
72
+ - `imageFaceSwap(imageUrl, faceImageUrl, engine)` -> { imageUrl } — Image Face Swap
73
+ - `imageRemoveWatermark(imageUrl, engine)` -> { imageUrl } — Remove Image Watermark
74
+ - `insertVideoClips(baseVideoUrl, overlayVideos)` -> { videoUrl } — Insert Video Clips
75
+ - `listDataSources()` — List Data Sources
76
+ - `logic(context, cases)` -> { selectedCase } — Evaluate Logic
77
+ - `makeDotComRunScenario(webhookUrl, input)` -> { data } — Make.com Run Scenario
78
+ - `mergeAudio(mp3Urls)` -> { audioUrl } — Merge Audio
79
+ - `mergeVideos(videoUrls)` -> { videoUrl } — Merge Videos
80
+ - `mixAudioIntoVideo(videoUrl, audioUrl, options)` -> { videoUrl } — Mix Audio into Video
81
+ - `muteVideo(videoUrl)` -> { videoUrl } — Mute Video
82
+ - `n8nRunNode(method, authentication, user, password, webhookUrl, input)` -> { data } — N8N Run Node
83
+ - `postToSlackChannel(channelId, messageType, message, connectionId)` — Post to Slack Channel
84
+ - `postToZapier(webhookUrl, input)` -> { data } — Post to Zapier
85
+ - `queryDataSource(dataSourceId, query, maxResults)` -> { text, chunks, query, citations, latencyMs } — Query Data Source
86
+ - `queryExternalDatabase(connectionId, query, outputFormat)` -> { data } — Query External SQL Database
87
+ - `redactPII(input, language, entities)` -> { text } — Redact PII
88
+ - `removeBackgroundFromImage(imageUrl)` -> { imageUrl } — Remove Background From Image
89
+ - `resizeVideo(videoUrl, mode)` -> { videoUrl } — Resize Video
90
+ - `runPackagedWorkflow(appId, workflowId, inputVariables, outputVariables, name)` -> { data } — Run Packaged Workflow
91
+ - `scrapeLinkedInCompany(url)` -> { company } — Scrape LinkedIn Company
92
+ - `scrapeLinkedInProfile(url)` -> { profile } — Scrape LinkedIn Profile
93
+ - `scrapeUrl(url)` -> { content } — Scrape URL
94
+ - `scrapeXPost(url)` -> { post } — Scrape X Post
95
+ - `scrapeXProfile(url)` -> { profile } — Scrape X Profile
96
+ - `searchGoogle(query, exportType)` -> { results } — Search Google
97
+ - `searchGoogleImages(query, exportType)` -> { images } — Search Google Images
98
+ - `searchGoogleNews(text, exportType)` -> { articles } — Search Google News
99
+ - `searchGoogleTrends(text, hl, geo, data_type, cat, date, ts)` -> { trends } — Search Google Trends
100
+ - `searchPerplexity(query, exportType)` -> { results } — Search Perplexity
101
+ - `sendEmail(subject, body, connectionId)` -> { recipients } — Send Email
102
+ - `sendSMS(body, connectionId)` — Send SMS
103
+ - `setRunTitle(title)` — Set Run Title
104
+ - `setVariable(value, type)` -> { variableName, value } — Set Variable
105
+ - `telegramSendAudio(botToken, chatId, audioUrl, mode)` — Send Telegram Audio
106
+ - `telegramSendFile(botToken, chatId, fileUrl)` — Send Telegram File
107
+ - `telegramSendImage(botToken, chatId, imageUrl)` — Send Telegram Image
108
+ - `telegramSendMessage(botToken, chatId, text)` — Send Telegram Message
109
+ - `telegramSendVideo(botToken, chatId, videoUrl)` — Send Telegram Video
110
+ - `telegramSetTyping(botToken, chatId)` — Telegram Set Typing
111
+ - `textToSpeech(text)` -> { audioUrl } — Text to Speech
112
+ - `transcribeAudio(audioUrl, prompt)` -> { text } — Transcribe Audio
113
+ - `trimMedia(inputUrl)` -> { mediaUrl } — Trim Media
114
+ - `uploadDataSourceDocument(dataSourceId, file, fileName)` — Upload Data Source Document
115
+ - `upscaleImage(imageUrl, targetResolution, engine)` -> { imageUrl } — Upscale Image
116
+ - `upscaleVideo(videoUrl, targetResolution, engine)` -> { videoUrl } — Upscale Video
117
+ - `videoFaceSwap(videoUrl, faceImageUrl, targetIndex, engine)` -> { videoUrl } — Video Face Swap
118
+ - `videoRemoveBackground(videoUrl, newBackground, engine)` -> { videoUrl } — Remove Video Background
119
+ - `videoRemoveWatermark(videoUrl, engine)` -> { videoUrl } — Remove Video Watermark
120
+ - `watermarkImage(imageUrl, watermarkImageUrl, corner, paddingPx, widthPx)` -> { imageUrl } — Watermark Image
121
+ - `watermarkVideo(videoUrl, imageUrl, corner, paddingPx, widthPx)` -> { videoUrl } — Watermark Video
122
+
123
+ ### ActiveCampaign
124
+
125
+ - `activeCampaignAddNote(contactId, note, connectionId)` — Add Note
126
+ - `activeCampaignCreateContact(email, firstName, lastName, phone, accountId, customFields, connectionId)` -> { contactId } — Create Contact
127
+
128
+ ### Airtable
129
+
130
+ - `airtableCreateUpdateRecord(connectionId, baseId, tableId, fields, recordData)` -> { recordId } — Create/Update record
131
+ - `airtableDeleteRecord(connectionId, baseId, tableId, recordId)` -> { deleted } — Delete record
132
+ - `airtableGetRecord(connectionId, baseId, tableId, recordId)` -> { record } — Get record
133
+ - `airtableGetTableRecords(connectionId, baseId, tableId)` -> { records } — Get table records
134
+
135
+ ### Apollo
136
+
137
+ - `enrichPerson(params)` -> { data } — Enrich Person
138
+ - `peopleSearch(smartQuery, enrichPeople, enrichOrganizations, limit, page, params)` -> { results } — People Search
139
+
140
+ ### Coda
141
+
142
+ - `codaCreateUpdatePage(connectionId, pageData)` -> { pageId } — Create/Update page
143
+ - `codaCreateUpdateRow(connectionId, docId, tableId, rowData)` -> { rowId } — Create/Update row
144
+ - `codaFindRow(connectionId, docId, tableId, rowData)` -> { row } — Find row
145
+ - `codaGetPage(connectionId, docId, pageId)` -> { content } — Get page
146
+ - `codaGetTableRows(connectionId, docId, tableId)` -> { rows } — Get table rows
147
+
148
+ ### Facebook
149
+
150
+ - `scrapeFacebookPage(pageUrl)` -> { data } — Scrape Page
151
+ - `scrapeFacebookPosts(pageUrl)` -> { data } — Scrape Posts for Page
152
+
153
+ ### Google
154
+
155
+ - `createGoogleDoc(title, text, connectionId, textType)` -> { documentUrl } — Create Google Doc
156
+ - `createGoogleSheet(title, text, connectionId)` -> { spreadsheetUrl } — Create Google Sheet
157
+ - `fetchGoogleDoc(documentId, connectionId, exportType)` -> { content } — Fetch Google Doc
158
+ - `fetchGoogleSheet(spreadsheetId, range, connectionId, exportType)` -> { content } — Fetch Google Sheet
159
+ - `updateGoogleDoc(documentId, connectionId, text, textType, operationType)` -> { documentUrl } — Update Google Doc
160
+ - `updateGoogleSheet(text, connectionId, spreadsheetId, range, operationType)` -> { spreadsheetUrl } — Update Google Sheet
161
+
162
+ ### Google Calendar
163
+
164
+ - `createGoogleCalendarEvent(connectionId, summary, startDateTime, endDateTime)` -> { eventId, htmlLink } — Create Event
165
+ - `deleteGoogleCalendarEvent(connectionId, eventId)` — Get Event
166
+ - `getGoogleCalendarEvent(connectionId, eventId, exportType)` -> { event } — Get Event
167
+ - `listGoogleCalendarEvents(connectionId, limit, exportType)` -> { events } — List Events
168
+ - `updateGoogleCalendarEvent(connectionId, eventId)` -> { eventId, htmlLink } — Update Event
169
+
170
+ ### HubSpot
171
+
172
+ - `hubspotCreateCompany(connectionId, company, enabledProperties)` -> { companyId } — Create/Update Company
173
+ - `hubspotCreateContact(connectionId, contact, enabledProperties, companyDomain)` -> { contactId } — Create/Update Contact
174
+ - `hubspotGetCompany(connectionId, searchBy, companyDomain, companyId, additionalProperties)` -> { company } — Get Company
175
+ - `hubspotGetContact(connectionId, searchBy, contactEmail, contactId, additionalProperties)` -> { contact } — Get Contact
176
+
177
+ ### Hunter.io
178
+
179
+ - `hunterApiCompanyEnrichment(domain)` -> { data } — Enrich Company
180
+ - `hunterApiDomainSearch(domain)` -> { data } — Domain Search
181
+ - `hunterApiEmailFinder(domain, firstName, lastName)` -> { data } — Find Email
182
+ - `hunterApiEmailVerification(email)` -> { data } — Verify Email
183
+ - `hunterApiPersonEnrichment(email)` -> { data } — Enrich Person
184
+
185
+ ### Instagram
186
+
187
+ - `scrapeInstagramComments(postUrl, resultsLimit)` -> { data } — Scrape Comments
188
+ - `scrapeInstagramMentions(profileUrl, resultsLimit)` -> { data } — Scrape Mentions
189
+ - `scrapeInstagramPosts(profileUrl, resultsLimit, onlyPostsNewerThan)` -> { data } — Scrape Posts
190
+ - `scrapeInstagramProfile(profileUrl)` -> { data } — Scrape Profile
191
+ - `scrapeInstagramReels(profileUrl, resultsLimit)` -> { data } — Scrape Reels
192
+
193
+ ### LinkedIn
194
+
195
+ - `postToLinkedIn(message, visibility, connectionId)` — Create post
196
+
197
+ ### Meta Threads
198
+
199
+ - `scrapeMetaThreadsProfile(profileUrl)` -> { data } — Scrape Profile
200
+
201
+ ### Notion
202
+
203
+ - `notionCreatePage(pageId, content, title, connectionId)` -> { pageId, pageUrl } — Create Page
204
+ - `notionUpdatePage(pageId, content, mode, connectionId)` -> { pageId, pageUrl } — Update Page
205
+
206
+ ### X
207
+
208
+ - `postToX(text, connectionId)` — Create post
209
+ - `searchXPosts(query, scope, options)` -> { posts } — Search Posts
210
+
211
+ ### YouTube
212
+
213
+ - `fetchYoutubeCaptions(videoUrl, exportType, language)` -> { transcripts } — Fetch Captions
214
+ - `fetchYoutubeChannel(channelUrl)` -> { channel } — Fetch Channel
215
+ - `fetchYoutubeComments(videoUrl, exportType, limitPages)` -> { comments } — Fetch Comments
216
+ - `fetchYoutubeVideo(videoUrl)` -> { video } — Fetch Video
217
+ - `searchYoutube(query, limitPages, filter, filterType)` -> { results } — Search Videos
218
+ - `searchYoutubeTrends(bp, hl, gl)` -> { trends } — Search Trends
219
+
220
+ ### Helpers
221
+
222
+ - `listModels()` -> { models } — List all available AI models
223
+ - `listModelsByType(modelType)` -> { models } — Filter by type: "llm_chat", "image_generation", "video_generation", "video_analysis", "text_to_speech", "vision", "transcription"
224
+ - `listConnectors()` -> { services } — List available connector services
225
+ - `getConnector(serviceId)` -> { service } — Get connector details
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,7 +13,8 @@
13
13
  }
14
14
  },
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "llms.txt"
17
18
  ],
18
19
  "scripts": {
19
20
  "build": "npm run codegen && tsup",