@mindstudio-ai/agent 0.1.59 → 0.1.61

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 CHANGED
@@ -80,7 +80,10 @@ mindstudio generate-image '{prompt: "A mountain landscape at sunset"}'
80
80
  mindstudio generate-image --prompt "A sunset" --output-key imageUrl
81
81
 
82
82
  # List all available methods
83
- mindstudio list
83
+ mindstudio list-actions
84
+
85
+ # List packaged workflows
86
+ mindstudio list-packaged-workflows
84
87
 
85
88
  # Show details about a method
86
89
  mindstudio info generate-image
@@ -261,6 +264,9 @@ const { action } = await agent.getConnectorAction(
261
264
  // Check which services are connected in your org
262
265
  const { connections } = await agent.listConnections();
263
266
 
267
+ // Browse packaged workflows available to your org
268
+ const { workflows } = await agent.listPackagedWorkflows();
269
+
264
270
  // Execute a connector action
265
271
  const result = await agent.runFromConnectorRegistry({
266
272
  serviceId: 'slack',
@@ -272,6 +278,8 @@ const result = await agent.runFromConnectorRegistry({
272
278
 
273
279
  Connectors require the user to connect to the third-party service in MindStudio before use. Use `listConnections()` to check what's available.
274
280
 
281
+ Packaged workflows are reusable MindStudio workflows exposed to your organization. Use `listPackagedWorkflows()` to discover which workflows are available, inspect their required inputs and output variables, then call them from another workflow with `runPackagedWorkflow()`. Some examples of packaged workflows are deepResearch, generateSpritesheet, generatePodcast etc.
282
+
275
283
  ## Built-in actions
276
284
 
277
285
  Every action has a dedicated typed method. A few highlights:
@@ -557,7 +565,8 @@ Commands:
557
565
  <method> [json | --flags] Execute a step method
558
566
  exec <method> [json | --flags] Execute a step method (same as above)
559
567
  batch [json] Execute multiple steps in parallel
560
- list [--json] List available methods
568
+ list-actions [--json] [--summary] List available methods
569
+ list-packaged-workflows List packaged workflows
561
570
  info <method> Show method details (params, types, output)
562
571
  agents [--json] List pre-built agents in your organization
563
572
  run <appId> [json | --flags] Run a pre-built agent and wait for result
package/dist/cli.js CHANGED
@@ -3822,8 +3822,7 @@ function resolveToken(provided, config) {
3822
3822
  if (provided) return { token: provided, authType: "apiKey" };
3823
3823
  if (process.env.MINDSTUDIO_API_KEY)
3824
3824
  return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
3825
- if (config?.apiKey)
3826
- return { token: config.apiKey, authType: "apiKey" };
3825
+ if (config?.apiKey) return { token: config.apiKey, authType: "apiKey" };
3827
3826
  throw new MindStudioError(
3828
3827
  "No API key provided. Run `mindstudio login`, pass `apiKey` to the constructor, or set the MINDSTUDIO_API_KEY environment variable.",
3829
3828
  "missing_api_key",
@@ -3898,7 +3897,11 @@ var init_client = __esm({
3898
3897
  get _currentHttpConfig() {
3899
3898
  const rctx = getRequestContext();
3900
3899
  if (rctx?.remoteHostname) {
3901
- return { ...this._httpConfig, baseUrl: rctx.remoteHostname, token: this._token };
3900
+ return {
3901
+ ...this._httpConfig,
3902
+ baseUrl: rctx.remoteHostname,
3903
+ token: this._token
3904
+ };
3902
3905
  }
3903
3906
  return this._httpConfig;
3904
3907
  }
@@ -3914,7 +3917,11 @@ var init_client = __esm({
3914
3917
  _getContext() {
3915
3918
  const rctx = getRequestContext();
3916
3919
  if (rctx?.auth && rctx?.databases) {
3917
- return { auth: rctx.auth, databases: rctx.databases, authConfig: rctx.authConfig };
3920
+ return {
3921
+ auth: rctx.auth,
3922
+ databases: rctx.databases,
3923
+ authConfig: rctx.authConfig
3924
+ };
3918
3925
  }
3919
3926
  return this._context;
3920
3927
  }
@@ -3977,7 +3984,8 @@ var init_client = __esm({
3977
3984
  const res = await fetch(pollUrl, {
3978
3985
  headers: { "User-Agent": "@mindstudio-ai/agent" }
3979
3986
  });
3980
- if (res.status === 502 || res.status === 503 || res.status === 504) continue;
3987
+ if (res.status === 502 || res.status === 503 || res.status === 504)
3988
+ continue;
3981
3989
  if (res.status === 404) {
3982
3990
  throw new MindStudioError(
3983
3991
  `[${stepType}] Execution token expired.`,
@@ -4074,7 +4082,9 @@ var init_client = __esm({
4074
4082
  const errMsg = (typeof body2.error === "string" ? body2.error : void 0) ?? (typeof body2.message === "string" ? body2.message : void 0) ?? (typeof body2.details === "string" ? body2.details : void 0);
4075
4083
  if (errMsg) message = errMsg;
4076
4084
  else if (body2.error || body2.message || body2.details) {
4077
- message = JSON.stringify(body2.error ?? body2.message ?? body2.details);
4085
+ message = JSON.stringify(
4086
+ body2.error ?? body2.message ?? body2.details
4087
+ );
4078
4088
  }
4079
4089
  if (body2.code) code = body2.code;
4080
4090
  } catch {
@@ -4083,7 +4093,12 @@ var init_client = __esm({
4083
4093
  }
4084
4094
  } catch {
4085
4095
  }
4086
- throw new MindStudioError(`[${stepType}] ${message}`, code, res.status, details);
4096
+ throw new MindStudioError(
4097
+ `[${stepType}] ${message}`,
4098
+ code,
4099
+ res.status,
4100
+ details
4101
+ );
4087
4102
  }
4088
4103
  const headers = res.headers;
4089
4104
  try {
@@ -4215,7 +4230,10 @@ var init_client = __esm({
4215
4230
  async executeStepBatch(steps, options) {
4216
4231
  const threadId = options?.threadId ?? (this._reuseThreadId && !getRequestContext() ? this._threadId : void 0);
4217
4232
  const { data: asyncData } = await request(this._currentHttpConfig, "POST", "/steps/execute-batch-async", {
4218
- steps: steps.map((s) => ({ ...s, stepType: resolveStepType2(s.stepType) })),
4233
+ steps: steps.map((s) => ({
4234
+ ...s,
4235
+ stepType: resolveStepType2(s.stepType)
4236
+ })),
4219
4237
  ...options?.appId != null && { appId: options.appId },
4220
4238
  ...threadId != null && { threadId }
4221
4239
  });
@@ -4227,7 +4245,8 @@ var init_client = __esm({
4227
4245
  const res = await fetch(pollUrl, {
4228
4246
  headers: { "User-Agent": "@mindstudio-ai/agent" }
4229
4247
  });
4230
- if (res.status === 502 || res.status === 503 || res.status === 504) continue;
4248
+ if (res.status === 502 || res.status === 503 || res.status === 504)
4249
+ continue;
4231
4250
  if (res.status === 404) {
4232
4251
  throw new MindStudioError(
4233
4252
  "Batch poll token not found or expired.",
@@ -4391,7 +4410,8 @@ var init_client = __esm({
4391
4410
  const res = await fetch(pollUrl, {
4392
4411
  headers: { "User-Agent": "@mindstudio-ai/agent" }
4393
4412
  });
4394
- if (res.status === 502 || res.status === 503 || res.status === 504) continue;
4413
+ if (res.status === 502 || res.status === 503 || res.status === 504)
4414
+ continue;
4395
4415
  if (res.status === 404) {
4396
4416
  throw new MindStudioError(
4397
4417
  "Poll token not found or expired.",
@@ -4507,6 +4527,15 @@ var init_client = __esm({
4507
4527
  );
4508
4528
  return data;
4509
4529
  }
4530
+ /** List packaged workflows available to the organization. */
4531
+ async listPackagedWorkflows() {
4532
+ const { data } = await request(
4533
+ this._currentHttpConfig,
4534
+ "GET",
4535
+ "/helpers/packaged-workflows"
4536
+ );
4537
+ return data;
4538
+ }
4510
4539
  // -------------------------------------------------------------------------
4511
4540
  // Helper methods — cost estimation
4512
4541
  // -------------------------------------------------------------------------
@@ -4737,7 +4766,9 @@ var init_client = __esm({
4737
4766
  const errMsg = (typeof body.error === "string" ? body.error : void 0) ?? (typeof body.message === "string" ? body.message : void 0) ?? (typeof body.details === "string" ? body.details : void 0);
4738
4767
  if (errMsg) message = errMsg;
4739
4768
  else if (body.error || body.message || body.details) {
4740
- message = JSON.stringify(body.error ?? body.message ?? body.details);
4769
+ message = JSON.stringify(
4770
+ body.error ?? body.message ?? body.details
4771
+ );
4741
4772
  }
4742
4773
  if (body.code) code = body.code;
4743
4774
  } catch {
@@ -4745,11 +4776,7 @@ var init_client = __esm({
4745
4776
  }
4746
4777
  } catch {
4747
4778
  }
4748
- throw new MindStudioError(
4749
- `[db] ${message}`,
4750
- code,
4751
- res.status
4752
- );
4779
+ throw new MindStudioError(`[db] ${message}`, code, res.status);
4753
4780
  }
4754
4781
  const data = await res.json();
4755
4782
  return data.results;
@@ -4959,9 +4986,14 @@ var init_client = __esm({
4959
4986
  }
4960
4987
  /** Update the profile picture of the authenticated user/agent. */
4961
4988
  async changeProfilePicture(url) {
4962
- await request(this._currentHttpConfig, "POST", "/account/change-profile-picture", {
4963
- url
4964
- });
4989
+ await request(
4990
+ this._currentHttpConfig,
4991
+ "POST",
4992
+ "/account/change-profile-picture",
4993
+ {
4994
+ url
4995
+ }
4996
+ );
4965
4997
  }
4966
4998
  /**
4967
4999
  * Upload a file to the MindStudio CDN.
@@ -5847,7 +5879,7 @@ async function startMcpServer(options) {
5847
5879
  capabilities: { tools: {} },
5848
5880
  serverInfo: {
5849
5881
  name: "mindstudio-agent",
5850
- version: "0.1.59"
5882
+ version: "0.1.61"
5851
5883
  },
5852
5884
  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 or icon, call `uploadFile` to upload it, then `changeProfilePicture` with the returned URL.\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.'
5853
5885
  });
@@ -5905,6 +5937,8 @@ async function startMcpServer(options) {
5905
5937
  );
5906
5938
  } else if (toolName === "listConnections") {
5907
5939
  result = await getAgent().listConnections();
5940
+ } else if (toolName === "listPackagedWorkflows") {
5941
+ result = await getAgent().listPackagedWorkflows();
5908
5942
  } else if (toolName === "estimateActionCost") {
5909
5943
  const meta = await getMetadata();
5910
5944
  const rawType = args.stepType;
@@ -6041,6 +6075,7 @@ var init_mcp = __esm({
6041
6075
  getConnector: "Get details for an OAuth connector service.",
6042
6076
  getConnectorAction: "Get full configuration for an OAuth connector action.",
6043
6077
  listConnections: "List OAuth connections for the organization (authenticated third-party service links).",
6078
+ listPackagedWorkflows: "List packaged workflows available to the organization.",
6044
6079
  estimateStepCost: "Estimate the cost of executing an action before running it.",
6045
6080
  changeName: "Update the display name of the authenticated agent.",
6046
6081
  changeProfilePicture: "Update the profile picture of the authenticated agent.",
@@ -6146,6 +6181,11 @@ var init_mcp = __esm({
6146
6181
  description: "List OAuth connections for the organization (authenticated third-party service links). Use the returned connection IDs when calling OAuth connector actions.",
6147
6182
  inputSchema: { type: "object", properties: {} }
6148
6183
  },
6184
+ {
6185
+ name: "listPackagedWorkflows",
6186
+ description: "List packaged workflows available to the organization, including their app/workflow IDs and input/output signatures.",
6187
+ inputSchema: { type: "object", properties: {} }
6188
+ },
6149
6189
  {
6150
6190
  name: "estimateActionCost",
6151
6191
  description: "Estimate the cost of executing an action before running it. Pass the same config you would use for execution.",
@@ -6302,6 +6342,7 @@ Discover:
6302
6342
  list-actions [--json] [--summary] List all available actions
6303
6343
  info <action> Show action details and parameters
6304
6344
  list-models [--type <t>] [--summary] List available AI models
6345
+ list-packaged-workflows List packaged workflows
6305
6346
 
6306
6347
  Batch:
6307
6348
  batch [json] Execute multiple actions in parallel
@@ -6656,6 +6697,11 @@ async function cmdListConnections(options) {
6656
6697
  const result = await agent.listConnections();
6657
6698
  jsonOut(result);
6658
6699
  }
6700
+ async function cmdListPackagedWorkflows(options) {
6701
+ const agent = await createAgent(options);
6702
+ const result = await agent.listPackagedWorkflows();
6703
+ jsonOut(result);
6704
+ }
6659
6705
  async function cmdEstimateStepCost(method, input, options) {
6660
6706
  const agent = await createAgent(options);
6661
6707
  const result = await agent.estimateStepCost(method, input);
@@ -6804,7 +6850,7 @@ function isNewerVersion(current, latest) {
6804
6850
  return false;
6805
6851
  }
6806
6852
  async function checkForUpdate() {
6807
- const currentVersion = "0.1.59";
6853
+ const currentVersion = "0.1.61";
6808
6854
  if (!currentVersion) return null;
6809
6855
  try {
6810
6856
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -6833,7 +6879,7 @@ async function checkForUpdate() {
6833
6879
  }
6834
6880
  }
6835
6881
  function printUpdateNotice(latestVersion) {
6836
- const currentVersion = "0.1.59";
6882
+ const currentVersion = "0.1.61";
6837
6883
  process.stderr.write(
6838
6884
  `
6839
6885
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -6846,7 +6892,7 @@ function isStandaloneBinary() {
6846
6892
  return !argv1.includes("node_modules");
6847
6893
  }
6848
6894
  async function cmdUpdate() {
6849
- const currentVersion = "0.1.59";
6895
+ const currentVersion = "0.1.61";
6850
6896
  process.stderr.write(
6851
6897
  ` ${ansi2.gray("Current version:")} ${currentVersion}
6852
6898
  `
@@ -6981,7 +7027,7 @@ async function cmdLogin(options) {
6981
7027
  process.stderr.write("\n");
6982
7028
  printLogo();
6983
7029
  process.stderr.write("\n");
6984
- const ver = "0.1.59";
7030
+ const ver = "0.1.61";
6985
7031
  process.stderr.write(
6986
7032
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
6987
7033
  `
@@ -7308,7 +7354,7 @@ async function main() {
7308
7354
  try {
7309
7355
  if (command === "version" || command === "-v") {
7310
7356
  process.stdout.write(
7311
- "0.1.59\n"
7357
+ "0.1.61\n"
7312
7358
  );
7313
7359
  return;
7314
7360
  }
@@ -7569,6 +7615,13 @@ async function main() {
7569
7615
  });
7570
7616
  return;
7571
7617
  }
7618
+ if (command === "list-packaged-workflows") {
7619
+ await cmdListPackagedWorkflows({
7620
+ apiKey: values["api-key"],
7621
+ baseUrl: values["base-url"]
7622
+ });
7623
+ return;
7624
+ }
7572
7625
  if (command === "estimate-cost") {
7573
7626
  const stepMethod = positionals[1];
7574
7627
  if (!stepMethod)
package/dist/index.d.ts CHANGED
@@ -312,6 +312,72 @@ interface Connection {
312
312
  /** Display name or account identifier for the connection. */
313
313
  name?: string;
314
314
  }
315
+ interface PackagedWorkflowInput {
316
+ /** Variable key for this input */
317
+ key: string;
318
+ /** Display name of the input */
319
+ name: string;
320
+ /** Description of what this input is for */
321
+ description: string;
322
+ /** Placeholder text shown in the input field */
323
+ placeholder: string;
324
+ /** Whether this input must be provided */
325
+ required: boolean;
326
+ /** Default value if the input is not provided */
327
+ defaultValue?: string;
328
+ /** Input field type */
329
+ type: 'text' | 'select' | 'transition';
330
+ /** Settings for text-type inputs */
331
+ textSettings?: {
332
+ /** Text input format */
333
+ type: 'default' | 'markdown';
334
+ };
335
+ /** Settings for select-type inputs */
336
+ selectSettings?: {
337
+ /** Available options for the select input */
338
+ options: {
339
+ /** Option value */
340
+ value: string;
341
+ /** Option display label */
342
+ label: string;
343
+ }[];
344
+ };
345
+ }
346
+ interface PackagedWorkflowSignature {
347
+ /** Metadata about the packaged workflow */
348
+ metadata: {
349
+ /** Display name of the packaged workflow */
350
+ name: string;
351
+ /** Description of what the packaged workflow does */
352
+ description: string;
353
+ /** Icon URL for the packaged workflow */
354
+ iconUrl: string;
355
+ /** Quick help text for users */
356
+ quickHelp: string;
357
+ /** Transition type for the packaged workflow */
358
+ transitionType?: 'controlled' | 'dynamic';
359
+ };
360
+ /** Input parameters the packaged workflow accepts */
361
+ inputs: PackagedWorkflowInput[];
362
+ /** Output variables the packaged workflow returns */
363
+ outputs: {
364
+ /** Output variable key */
365
+ key: string;
366
+ /** Display name of the output */
367
+ name: string;
368
+ /** Description of the output */
369
+ description: string;
370
+ /** Data type of the output */
371
+ type: string;
372
+ }[];
373
+ }
374
+ interface PackagedWorkflow {
375
+ appId: string;
376
+ workflowId: string;
377
+ appShortId: string;
378
+ workflowName: string;
379
+ signature: PackagedWorkflowSignature;
380
+ }
315
381
  /** A single cost estimate entry for an action. */
316
382
  interface StepCostEstimateEntry {
317
383
  /** Billing event type identifier. */
@@ -1471,6 +1537,10 @@ declare class MindStudioAgent$1 {
1471
1537
  listConnections(): Promise<{
1472
1538
  connections: Connection[];
1473
1539
  }>;
1540
+ /** List packaged workflows available to the organization. */
1541
+ listPackagedWorkflows(): Promise<{
1542
+ packagedWorkflows: PackagedWorkflow[];
1543
+ }>;
1474
1544
  /** Estimate the cost of executing an action before running it. */
1475
1545
  estimateStepCost(stepType: string, step?: Record<string, unknown>, options?: {
1476
1546
  appId?: string;
@@ -8225,4 +8295,4 @@ declare const stream: (data: string | Record<string, unknown>) => Promise<void>;
8225
8295
  */
8226
8296
  declare const resolveUser: (userId: string) => Promise<ResolvedUser | null>;
8227
8297
 
8228
- export { type Accessor, 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 AppAuthContext, type AppContextResult, type AppDatabase, type AppDatabaseColumnSchema, type AppDatabaseTable, type AppRoleAssignment, AuthContext, type AuthTableConfig, type BatchStepInput, type BatchStepResult, type CaptureThumbnailStepInput, type CaptureThumbnailStepOutput, type CheckAppRoleStepInput, type CheckAppRoleStepOutput, type CodaCreateUpdatePageStepInput, type CodaCreateUpdatePageStepOutput, type CodaCreateUpdateRowStepInput, type CodaCreateUpdateRowStepOutput, type CodaFindRowStepInput, type CodaFindRowStepOutput, type CodaGetPageStepInput, type CodaGetPageStepOutput, type CodaGetTableRowsStepInput, type CodaGetTableRowsStepOutput, type Connection, type ConnectorActionDetail, type ConnectorService, type ConvertPdfToImagesStepInput, type ConvertPdfToImagesStepOutput, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGmailDraftStepInput, type CreateGmailDraftStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type Db, type DefineTableOptions, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectChangesStepInput, type DetectChangesStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DiscordEditMessageStepInput, type DiscordEditMessageStepOutput, type DiscordSendFollowUpStepInput, type DiscordSendFollowUpStepOutput, type DiscordSendMessageStepInput, type DiscordSendMessageStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExecuteStepBatchOptions, type ExecuteStepBatchResult, 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 GetGmailAttachmentsStepInput, type GetGmailAttachmentsStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGmailUnreadCountStepInput, type GetGmailUnreadCountStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, 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 ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MindStudioModelSummary, 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 Predicate, type PushInput, Query, type QueryAppDatabaseStepInput, type QueryAppDatabaseStepOutput, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskResult, 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 ScreenshotUrlStepInput, type ScreenshotUrlStepOutput, type SearchGmailEmailsStepInput, type SearchGmailEmailsStepOutput, 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 SendGmailDraftStepInput, type SendGmailDraftStepOutput, type SendGmailMessageStepInput, type SendGmailMessageStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SendSlackDirectMessageStepInput, type SendSlackDirectMessageStepOutput, type SetGmailReadStatusStepInput, type SetGmailReadStatusStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepCostEstimateEntry, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepLogEvent, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, type SystemFields, Table, type TaskEvent, type TaskToolCall, type TaskToolConfig, type TaskUsage, 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 UpdateGmailLabelsStepInput, type UpdateGmailLabelsStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UpdateInput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UploadFileResult, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type User, type UserInfoResult, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, auth, blockTypeAliases, db, mindstudio as default, getRequestContext, mindstudio, monacoSnippets, resolveUser, runWithContext, stepMetadata, stream };
8298
+ export { type Accessor, 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 AppAuthContext, type AppContextResult, type AppDatabase, type AppDatabaseColumnSchema, type AppDatabaseTable, type AppRoleAssignment, AuthContext, type AuthTableConfig, type BatchStepInput, type BatchStepResult, type CaptureThumbnailStepInput, type CaptureThumbnailStepOutput, type CheckAppRoleStepInput, type CheckAppRoleStepOutput, type CodaCreateUpdatePageStepInput, type CodaCreateUpdatePageStepOutput, type CodaCreateUpdateRowStepInput, type CodaCreateUpdateRowStepOutput, type CodaFindRowStepInput, type CodaFindRowStepOutput, type CodaGetPageStepInput, type CodaGetPageStepOutput, type CodaGetTableRowsStepInput, type CodaGetTableRowsStepOutput, type Connection, type ConnectorActionDetail, type ConnectorService, type ConvertPdfToImagesStepInput, type ConvertPdfToImagesStepOutput, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGmailDraftStepInput, type CreateGmailDraftStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type Db, type DefineTableOptions, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectChangesStepInput, type DetectChangesStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DiscordEditMessageStepInput, type DiscordEditMessageStepOutput, type DiscordSendFollowUpStepInput, type DiscordSendFollowUpStepOutput, type DiscordSendMessageStepInput, type DiscordSendMessageStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExecuteStepBatchOptions, type ExecuteStepBatchResult, 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 GetGmailAttachmentsStepInput, type GetGmailAttachmentsStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGmailUnreadCountStepInput, type GetGmailUnreadCountStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, 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 ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MindStudioModelSummary, 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 PackagedWorkflow, type PackagedWorkflowInput, type PackagedWorkflowSignature, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, Query, type QueryAppDatabaseStepInput, type QueryAppDatabaseStepOutput, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskResult, 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 ScreenshotUrlStepInput, type ScreenshotUrlStepOutput, type SearchGmailEmailsStepInput, type SearchGmailEmailsStepOutput, 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 SendGmailDraftStepInput, type SendGmailDraftStepOutput, type SendGmailMessageStepInput, type SendGmailMessageStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SendSlackDirectMessageStepInput, type SendSlackDirectMessageStepOutput, type SetGmailReadStatusStepInput, type SetGmailReadStatusStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepCostEstimateEntry, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepLogEvent, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, type SystemFields, Table, type TaskEvent, type TaskToolCall, type TaskToolConfig, type TaskUsage, 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 UpdateGmailLabelsStepInput, type UpdateGmailLabelsStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UpdateInput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UploadFileResult, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type User, type UserInfoResult, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, auth, blockTypeAliases, db, mindstudio as default, getRequestContext, mindstudio, monacoSnippets, resolveUser, runWithContext, stepMetadata, stream };
package/dist/index.js CHANGED
@@ -3715,7 +3715,11 @@ var MindStudioAgent = class {
3715
3715
  get _currentHttpConfig() {
3716
3716
  const rctx = getRequestContext();
3717
3717
  if (rctx?.remoteHostname) {
3718
- return { ...this._httpConfig, baseUrl: rctx.remoteHostname, token: this._token };
3718
+ return {
3719
+ ...this._httpConfig,
3720
+ baseUrl: rctx.remoteHostname,
3721
+ token: this._token
3722
+ };
3719
3723
  }
3720
3724
  return this._httpConfig;
3721
3725
  }
@@ -3731,7 +3735,11 @@ var MindStudioAgent = class {
3731
3735
  _getContext() {
3732
3736
  const rctx = getRequestContext();
3733
3737
  if (rctx?.auth && rctx?.databases) {
3734
- return { auth: rctx.auth, databases: rctx.databases, authConfig: rctx.authConfig };
3738
+ return {
3739
+ auth: rctx.auth,
3740
+ databases: rctx.databases,
3741
+ authConfig: rctx.authConfig
3742
+ };
3735
3743
  }
3736
3744
  return this._context;
3737
3745
  }
@@ -3794,7 +3802,8 @@ var MindStudioAgent = class {
3794
3802
  const res = await fetch(pollUrl, {
3795
3803
  headers: { "User-Agent": "@mindstudio-ai/agent" }
3796
3804
  });
3797
- if (res.status === 502 || res.status === 503 || res.status === 504) continue;
3805
+ if (res.status === 502 || res.status === 503 || res.status === 504)
3806
+ continue;
3798
3807
  if (res.status === 404) {
3799
3808
  throw new MindStudioError(
3800
3809
  `[${stepType}] Execution token expired.`,
@@ -3891,7 +3900,9 @@ var MindStudioAgent = class {
3891
3900
  const errMsg = (typeof body2.error === "string" ? body2.error : void 0) ?? (typeof body2.message === "string" ? body2.message : void 0) ?? (typeof body2.details === "string" ? body2.details : void 0);
3892
3901
  if (errMsg) message = errMsg;
3893
3902
  else if (body2.error || body2.message || body2.details) {
3894
- message = JSON.stringify(body2.error ?? body2.message ?? body2.details);
3903
+ message = JSON.stringify(
3904
+ body2.error ?? body2.message ?? body2.details
3905
+ );
3895
3906
  }
3896
3907
  if (body2.code) code = body2.code;
3897
3908
  } catch {
@@ -3900,7 +3911,12 @@ var MindStudioAgent = class {
3900
3911
  }
3901
3912
  } catch {
3902
3913
  }
3903
- throw new MindStudioError(`[${stepType}] ${message}`, code, res.status, details);
3914
+ throw new MindStudioError(
3915
+ `[${stepType}] ${message}`,
3916
+ code,
3917
+ res.status,
3918
+ details
3919
+ );
3904
3920
  }
3905
3921
  const headers = res.headers;
3906
3922
  try {
@@ -4032,7 +4048,10 @@ var MindStudioAgent = class {
4032
4048
  async executeStepBatch(steps, options) {
4033
4049
  const threadId = options?.threadId ?? (this._reuseThreadId && !getRequestContext() ? this._threadId : void 0);
4034
4050
  const { data: asyncData } = await request(this._currentHttpConfig, "POST", "/steps/execute-batch-async", {
4035
- steps: steps.map((s) => ({ ...s, stepType: resolveStepType2(s.stepType) })),
4051
+ steps: steps.map((s) => ({
4052
+ ...s,
4053
+ stepType: resolveStepType2(s.stepType)
4054
+ })),
4036
4055
  ...options?.appId != null && { appId: options.appId },
4037
4056
  ...threadId != null && { threadId }
4038
4057
  });
@@ -4044,7 +4063,8 @@ var MindStudioAgent = class {
4044
4063
  const res = await fetch(pollUrl, {
4045
4064
  headers: { "User-Agent": "@mindstudio-ai/agent" }
4046
4065
  });
4047
- if (res.status === 502 || res.status === 503 || res.status === 504) continue;
4066
+ if (res.status === 502 || res.status === 503 || res.status === 504)
4067
+ continue;
4048
4068
  if (res.status === 404) {
4049
4069
  throw new MindStudioError(
4050
4070
  "Batch poll token not found or expired.",
@@ -4208,7 +4228,8 @@ var MindStudioAgent = class {
4208
4228
  const res = await fetch(pollUrl, {
4209
4229
  headers: { "User-Agent": "@mindstudio-ai/agent" }
4210
4230
  });
4211
- if (res.status === 502 || res.status === 503 || res.status === 504) continue;
4231
+ if (res.status === 502 || res.status === 503 || res.status === 504)
4232
+ continue;
4212
4233
  if (res.status === 404) {
4213
4234
  throw new MindStudioError(
4214
4235
  "Poll token not found or expired.",
@@ -4324,6 +4345,15 @@ var MindStudioAgent = class {
4324
4345
  );
4325
4346
  return data;
4326
4347
  }
4348
+ /** List packaged workflows available to the organization. */
4349
+ async listPackagedWorkflows() {
4350
+ const { data } = await request(
4351
+ this._currentHttpConfig,
4352
+ "GET",
4353
+ "/helpers/packaged-workflows"
4354
+ );
4355
+ return data;
4356
+ }
4327
4357
  // -------------------------------------------------------------------------
4328
4358
  // Helper methods — cost estimation
4329
4359
  // -------------------------------------------------------------------------
@@ -4554,7 +4584,9 @@ var MindStudioAgent = class {
4554
4584
  const errMsg = (typeof body.error === "string" ? body.error : void 0) ?? (typeof body.message === "string" ? body.message : void 0) ?? (typeof body.details === "string" ? body.details : void 0);
4555
4585
  if (errMsg) message = errMsg;
4556
4586
  else if (body.error || body.message || body.details) {
4557
- message = JSON.stringify(body.error ?? body.message ?? body.details);
4587
+ message = JSON.stringify(
4588
+ body.error ?? body.message ?? body.details
4589
+ );
4558
4590
  }
4559
4591
  if (body.code) code = body.code;
4560
4592
  } catch {
@@ -4562,11 +4594,7 @@ var MindStudioAgent = class {
4562
4594
  }
4563
4595
  } catch {
4564
4596
  }
4565
- throw new MindStudioError(
4566
- `[db] ${message}`,
4567
- code,
4568
- res.status
4569
- );
4597
+ throw new MindStudioError(`[db] ${message}`, code, res.status);
4570
4598
  }
4571
4599
  const data = await res.json();
4572
4600
  return data.results;
@@ -4776,9 +4804,14 @@ var MindStudioAgent = class {
4776
4804
  }
4777
4805
  /** Update the profile picture of the authenticated user/agent. */
4778
4806
  async changeProfilePicture(url) {
4779
- await request(this._currentHttpConfig, "POST", "/account/change-profile-picture", {
4780
- url
4781
- });
4807
+ await request(
4808
+ this._currentHttpConfig,
4809
+ "POST",
4810
+ "/account/change-profile-picture",
4811
+ {
4812
+ url
4813
+ }
4814
+ );
4782
4815
  }
4783
4816
  /**
4784
4817
  * Upload a file to the MindStudio CDN.
@@ -4834,8 +4867,7 @@ function resolveToken(provided, config) {
4834
4867
  if (provided) return { token: provided, authType: "apiKey" };
4835
4868
  if (process.env.MINDSTUDIO_API_KEY)
4836
4869
  return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
4837
- if (config?.apiKey)
4838
- return { token: config.apiKey, authType: "apiKey" };
4870
+ if (config?.apiKey) return { token: config.apiKey, authType: "apiKey" };
4839
4871
  throw new MindStudioError(
4840
4872
  "No API key provided. Run `mindstudio login`, pass `apiKey` to the constructor, or set the MINDSTUDIO_API_KEY environment variable.",
4841
4873
  "missing_api_key",