@mindstudio-ai/agent 0.1.81 → 0.1.82

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 CHANGED
@@ -19,7 +19,7 @@ For specific use cases:
19
19
  - **Pre-built agents**: Call `listAgents()` to see what's available → `runAgent({ appId })` to execute one. **Important:** Not all agents are configured for API use. Do not try to run an agent just because it appears in the list — only run agents the user specifically asks you to run.
20
20
  - **Model selection**: Call `listModelsSummary()` or `listModelsSummaryByType("llm_chat")` to browse models, then pass the model ID as `modelOverride.model` to actions like `generateText`. Use the summary endpoints (not `listModels`) to keep token usage low.
21
21
  - **Cost estimation**: AI-powered actions (text generation, image generation, video, audio, etc.) cost money. Call `estimateStepCost(stepType, stepInput)` before running these and confirm with the user before proceeding — unless they've explicitly given permission to go ahead. Non-AI actions (data lookups, OAuth connectors, etc.) are generally free.
22
- - **Task agents**: For multi-step tasks that need autonomous tool use (research, content creation, data enrichment), use `runTask()`. Provide a prompt, input, SDK action names as tools, a structured output example, and a tool-use model id. The platform runs a tool-use loop — calling the model, executing actions, feeding results back — until structured output is produced. Example: `runTask({ prompt: "Find info about this restaurant", input: { name: "Tartine" }, tools: ["searchGoogle", "fetchUrl"], structuredOutputExample: '{"name":"...","url":"..."}', model: yourModelId })`. Pass a current tool-use model id (call `listModels` or ask). Don't hardcode one.
22
+ - **Task agents**: For multi-step tasks that need autonomous tool use (research, content creation, data enrichment), use `runTask()`. Provide a prompt, input, tools, a structured output example, and a tool-use model id. The platform runs a tool-use loop — calling the model, executing tools, feeding results back — until structured output is produced. Tools are SDK action names and/or your own app methods, written as `{ appMethod: "saveVendor", description: "when to use it" }`. App methods run as the user who invoked the method that started the task, with their roles, so the agent can read and write app state on their behalf. Example: `runTask({ prompt: "Research this restaurant and save it", input: { name: "Tartine" }, tools: ["searchGoogle", "fetchUrl", { appMethod: "saveRestaurant", description: "Persist the researched restaurant." }], structuredOutputExample: '{"name":"...","url":"..."}', model: yourModelId })`. Pass a current tool-use model id (call `listModels` or ask). Don't hardcode one.
23
23
 
24
24
  ## Install
25
25
 
@@ -731,21 +731,21 @@ Extract text, HTML, or structured content from one or more web pages.
731
731
  - Output format controls the result shape: "text" returns markdown, "html" returns raw HTML, "json" returns structured scraper data.
732
732
  - Can optionally capture a screenshot of each page.
733
733
  - Input: `{ url: string, service?: "default" | "firecrawl", autoEnhance?: boolean, outputFormat?: "text" | "json" | "html", pageOptions?: { onlyMainContent: boolean, screenshot: boolean, waitFor: number, replaceAllPathsWithAbsolutePaths: boolean, headers: object, removeTags: string[], mobile: boolean } }`
734
- - Output: `{ content: string | string[] | { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string } } | { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string } }[], screenshot?: string }`
734
+ - Output: `{ content: string | string[] | { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string }, error?: { code: string, message: string } } | { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string }, error?: { code: string, message: string } }[], screenshot?: string | string[] }`
735
735
 
736
736
  #### scrapeXPost
737
737
  Scrape data from a single X (Twitter) post by URL.
738
738
  - Returns structured post data (text, html, optional json/screenshot/metadata).
739
739
  - Optionally saves the text content to a variable.
740
740
  - Input: `{ url: string }`
741
- - Output: `{ post: { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string } } }`
741
+ - Output: `{ post: { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string }, error?: { code: string, message: string } } }`
742
742
 
743
743
  #### scrapeXProfile
744
744
  Scrape public profile data from an X (Twitter) account by URL.
745
745
  - Returns structured profile data.
746
746
  - Optionally saves the result to a variable.
747
747
  - Input: `{ url: string }`
748
- - Output: `{ profile: { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string } } }`
748
+ - Output: `{ profile: { text: string, html: string, json?: object, screenshotUrl?: string, metadata?: { title: string, description: string, url: string, image: string }, error?: { code: string, message: string } } }`
749
749
 
750
750
  #### screenshotUrl
751
751
  Capture a screenshot of a web page as a PNG image.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",