@mindstudio-ai/agent 0.0.18 → 0.0.20

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/dist/cli.js CHANGED
@@ -194,6 +194,13 @@ var init_metadata = __esm({
194
194
  inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Spreadsheet ID or URL" }, "sheetName": { "type": "string", "description": "Sheet/tab name (defaults to first sheet)" }, "startRow": { "type": "string", "description": "First row to delete (1-based, inclusive)" }, "endRow": { "type": "string", "description": "Last row to delete (1-based, inclusive)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["documentId", "startRow", "endRow"] },
195
195
  outputSchema: { "description": "This step does not produce output data." }
196
196
  },
197
+ "detectChanges": {
198
+ stepType: "detectChanges",
199
+ description: "Detect changes between runs by comparing current input against previously stored state. Routes execution based on whether a change occurred.",
200
+ usageNotes: '- Persists state across runs using a global variable keyed to the step ID.\n- Two modes: "comparison" (default) uses strict string inequality; "ai" uses an LLM to determine if a meaningful change occurred.\n- First run always treats the value as "changed" since there is no previous state.\n- Each mode supports transitions to different steps/workflows for the "changed" and "unchanged" paths.\n- AI mode bills normally for the LLM call.',
201
+ inputSchema: { "type": "object", "properties": { "mode": { "enum": ["ai", "comparison"], "type": "string", "description": "Detection mode: 'comparison' for strict string inequality, 'ai' for LLM-based. Default: 'comparison'" }, "input": { "type": "string", "description": "Current value to check (variable template)" }, "prompt": { "type": "string", "description": "AI mode: what constitutes a meaningful change" }, "modelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "AI mode: model settings override" }, "previousValueVariable": { "type": "string", "description": "Optional variable name to store the previous value into for downstream access" }, "changedStepId": { "type": "string", "description": "Step to transition to if changed (same workflow)" }, "changedWorkflowId": { "type": "string", "description": "Workflow to jump to if changed (cross workflow)" }, "unchangedStepId": { "type": "string", "description": "Step to transition to if unchanged (same workflow)" }, "unchangedWorkflowId": { "type": "string", "description": "Workflow to jump to if unchanged (cross workflow)" } }, "required": ["mode", "input"], "description": "Configuration for the detect changes step" },
202
+ outputSchema: { "type": "object", "properties": { "hasChanged": { "type": "boolean", "description": "Whether a change was detected" }, "currentValue": { "type": "string", "description": "The resolved input value" }, "previousValue": { "type": "string", "description": "The stored value from last run (empty string on first run)" }, "isFirstRun": { "type": "boolean", "description": "True when no previous state exists" } }, "required": ["hasChanged", "currentValue", "previousValue", "isFirstRun"] }
203
+ },
197
204
  "detectPII": {
198
205
  stepType: "detectPII",
199
206
  description: "Scan text for personally identifiable information using Microsoft Presidio.",
@@ -1209,34 +1216,32 @@ __export(config_exports, {
1209
1216
  import { readFileSync, writeFileSync, mkdirSync } from "fs";
1210
1217
  import { join } from "path";
1211
1218
  import { homedir } from "os";
1219
+ function configPaths() {
1220
+ const dir = join(homedir(), ".mindstudio");
1221
+ return { dir, file: join(dir, "config.json") };
1222
+ }
1212
1223
  function getConfigPath() {
1213
- return CONFIG_PATH;
1224
+ return configPaths().file;
1214
1225
  }
1215
1226
  function loadConfig() {
1216
1227
  try {
1217
- const raw = readFileSync(CONFIG_PATH, "utf-8");
1228
+ const raw = readFileSync(configPaths().file, "utf-8");
1218
1229
  return JSON.parse(raw);
1219
1230
  } catch {
1220
1231
  return {};
1221
1232
  }
1222
1233
  }
1223
1234
  function saveConfig(config) {
1224
- mkdirSync(CONFIG_DIR, { recursive: true });
1225
- writeFileSync(
1226
- CONFIG_PATH,
1227
- JSON.stringify(config, null, 2) + "\n",
1228
- "utf-8"
1229
- );
1235
+ const { dir, file } = configPaths();
1236
+ mkdirSync(dir, { recursive: true });
1237
+ writeFileSync(file, JSON.stringify(config, null, 2) + "\n", "utf-8");
1230
1238
  }
1231
1239
  function clearConfig() {
1232
1240
  saveConfig({});
1233
1241
  }
1234
- var CONFIG_DIR, CONFIG_PATH;
1235
1242
  var init_config = __esm({
1236
1243
  "src/config.ts"() {
1237
1244
  "use strict";
1238
- CONFIG_DIR = join(homedir(), ".mindstudio");
1239
- CONFIG_PATH = join(CONFIG_DIR, "config.json");
1240
1245
  }
1241
1246
  });
1242
1247
 
@@ -1322,6 +1327,9 @@ function applyStepMethods(AgentClass) {
1322
1327
  proto.deleteGoogleSheetRows = function(step, options) {
1323
1328
  return this.executeStep("deleteGoogleSheetRows", step, options);
1324
1329
  };
1330
+ proto.detectChanges = function(step, options) {
1331
+ return this.executeStep("detectChanges", step, options);
1332
+ };
1325
1333
  proto.detectPII = function(step, options) {
1326
1334
  return this.executeStep("detectPII", step, options);
1327
1335
  };
@@ -1958,7 +1966,7 @@ async function startMcpServer(options) {
1958
1966
  capabilities: { tools: {} },
1959
1967
  serverInfo: {
1960
1968
  name: "mindstudio-agent",
1961
- version: "0.0.18"
1969
+ version: "0.0.20"
1962
1970
  }
1963
1971
  });
1964
1972
  break;
@@ -2486,7 +2494,7 @@ function isNewerVersion(current, latest) {
2486
2494
  return false;
2487
2495
  }
2488
2496
  async function checkForUpdate() {
2489
- const currentVersion = "0.0.18";
2497
+ const currentVersion = "0.0.20";
2490
2498
  if (!currentVersion) return null;
2491
2499
  try {
2492
2500
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -2515,7 +2523,7 @@ async function checkForUpdate() {
2515
2523
  }
2516
2524
  }
2517
2525
  function printUpdateNotice(latestVersion) {
2518
- const currentVersion = "0.0.18";
2526
+ const currentVersion = "0.0.20";
2519
2527
  process.stderr.write(
2520
2528
  `
2521
2529
  ${ansi.cyanBright("Update available")} ${ansi.gray(currentVersion + " \u2192")} ${ansi.cyanBold(latestVersion)}
@@ -2589,7 +2597,7 @@ async function cmdLogin(options) {
2589
2597
  process.stderr.write("\n");
2590
2598
  printLogo();
2591
2599
  process.stderr.write("\n");
2592
- const ver = "0.0.18";
2600
+ const ver = "0.0.20";
2593
2601
  process.stderr.write(
2594
2602
  ` ${ansi.bold("MindStudio")} ${ansi.gray("CLI")}${ver ? " " + ansi.gray("v" + ver) : ""}
2595
2603
  `
package/dist/index.d.ts CHANGED
@@ -700,6 +700,66 @@ interface DeleteGoogleSheetRowsStepInput {
700
700
  connectionId?: string;
701
701
  }
702
702
  type DeleteGoogleSheetRowsStepOutput = unknown;
703
+ interface DetectChangesStepInput {
704
+ /** Detection mode: 'comparison' for strict string inequality, 'ai' for LLM-based. Default: 'comparison' */
705
+ mode: "ai" | "comparison";
706
+ /** Current value to check (variable template) */
707
+ input: string;
708
+ /** AI mode: what constitutes a meaningful change */
709
+ prompt?: string;
710
+ /** AI mode: model settings override */
711
+ modelOverride?: {
712
+ /** Model identifier (e.g. "gpt-4", "claude-3-opus") */
713
+ model: string;
714
+ /** Sampling temperature for the model (0-2) */
715
+ temperature: number;
716
+ /** Maximum number of tokens in the model's response */
717
+ maxResponseTokens: number;
718
+ /** Whether to skip the system preamble/instructions */
719
+ ignorePreamble?: boolean;
720
+ /** Preprocessor applied to user messages before sending to the model */
721
+ userMessagePreprocessor?: {
722
+ /** Data source identifier for the preprocessor */
723
+ dataSource?: string;
724
+ /** Template string applied to user messages before sending to the model */
725
+ messageTemplate?: string;
726
+ /** Maximum number of results to include from the data source */
727
+ maxResults?: number;
728
+ /** Whether the preprocessor is active */
729
+ enabled?: boolean;
730
+ /** Whether child steps should inherit this preprocessor configuration */
731
+ shouldInherit?: boolean;
732
+ };
733
+ /** System preamble/instructions for the model */
734
+ preamble?: string;
735
+ /** Whether multi-model candidate generation is enabled */
736
+ multiModelEnabled?: boolean;
737
+ /** Whether the user can edit the model's response */
738
+ editResponseEnabled?: boolean;
739
+ /** Additional model-specific configuration */
740
+ config?: Record<string, unknown>;
741
+ };
742
+ /** Optional variable name to store the previous value into for downstream access */
743
+ previousValueVariable?: string;
744
+ /** Step to transition to if changed (same workflow) */
745
+ changedStepId?: string;
746
+ /** Workflow to jump to if changed (cross workflow) */
747
+ changedWorkflowId?: string;
748
+ /** Step to transition to if unchanged (same workflow) */
749
+ unchangedStepId?: string;
750
+ /** Workflow to jump to if unchanged (cross workflow) */
751
+ unchangedWorkflowId?: string;
752
+ }
753
+ interface DetectChangesStepOutput {
754
+ /** Whether a change was detected */
755
+ hasChanged: boolean;
756
+ /** The resolved input value */
757
+ currentValue: string;
758
+ /** The stored value from last run (empty string on first run) */
759
+ previousValue: string;
760
+ /** True when no previous state exists */
761
+ isFirstRun: boolean;
762
+ }
703
763
  interface DetectPIIStepInput {
704
764
  /** Text to scan for personally identifiable information */
705
765
  input: string;
@@ -3421,7 +3481,7 @@ type GenerateAssetStepOutput = GeneratePdfStepOutput;
3421
3481
  type GenerateTextStepInput = UserMessageStepInput;
3422
3482
  type GenerateTextStepOutput = UserMessageStepOutput;
3423
3483
  /** Union of all available step type names. */
3424
- 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" | "discordEditMessage" | "discordSendFollowUp" | "discordSendMessage" | "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";
3484
+ 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" | "detectChanges" | "detectPII" | "discordEditMessage" | "discordSendFollowUp" | "discordSendMessage" | "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";
3425
3485
  /** Maps step names to their input types. */
3426
3486
  interface StepInputMap {
3427
3487
  activeCampaignAddNote: ActiveCampaignAddNoteStepInput;
@@ -3449,6 +3509,7 @@ interface StepInputMap {
3449
3509
  deleteGmailEmail: DeleteGmailEmailStepInput;
3450
3510
  deleteGoogleCalendarEvent: DeleteGoogleCalendarEventStepInput;
3451
3511
  deleteGoogleSheetRows: DeleteGoogleSheetRowsStepInput;
3512
+ detectChanges: DetectChangesStepInput;
3452
3513
  detectPII: DetectPIIStepInput;
3453
3514
  discordEditMessage: DiscordEditMessageStepInput;
3454
3515
  discordSendFollowUp: DiscordSendFollowUpStepInput;
@@ -3596,6 +3657,7 @@ interface StepOutputMap {
3596
3657
  deleteGmailEmail: DeleteGmailEmailStepOutput;
3597
3658
  deleteGoogleCalendarEvent: DeleteGoogleCalendarEventStepOutput;
3598
3659
  deleteGoogleSheetRows: DeleteGoogleSheetRowsStepOutput;
3660
+ detectChanges: DetectChangesStepOutput;
3599
3661
  detectPII: DetectPIIStepOutput;
3600
3662
  discordEditMessage: DiscordEditMessageStepOutput;
3601
3663
  discordSendFollowUp: DiscordSendFollowUpStepOutput;
@@ -4143,6 +4205,25 @@ interface StepMethods {
4143
4205
  * ```
4144
4206
  */
4145
4207
  deleteGoogleSheetRows(step: DeleteGoogleSheetRowsStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<DeleteGoogleSheetRowsStepOutput>>;
4208
+ /**
4209
+ * Detect changes between runs by comparing current input against previously stored state. Routes execution based on whether a change occurred.
4210
+ *
4211
+ * @remarks
4212
+ * - Persists state across runs using a global variable keyed to the step ID.
4213
+ * - Two modes: "comparison" (default) uses strict string inequality; "ai" uses an LLM to determine if a meaningful change occurred.
4214
+ * - First run always treats the value as "changed" since there is no previous state.
4215
+ * - Each mode supports transitions to different steps/workflows for the "changed" and "unchanged" paths.
4216
+ * - AI mode bills normally for the LLM call.
4217
+ *
4218
+ * @example
4219
+ * ```typescript
4220
+ * const result = await agent.detectChanges({
4221
+ * mode: "ai",
4222
+ * input: ``,
4223
+ * });
4224
+ * ```
4225
+ */
4226
+ detectChanges(step: DetectChangesStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<DetectChangesStepOutput>>;
4146
4227
  /**
4147
4228
  * Scan text for personally identifiable information using Microsoft Presidio.
4148
4229
  *
@@ -6164,4 +6245,4 @@ declare const MindStudioAgent: {
6164
6245
  new (options?: AgentOptions): MindStudioAgent;
6165
6246
  };
6166
6247
 
6167
- 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 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 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 };
6248
+ 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 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 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
@@ -124,11 +124,13 @@ var RateLimiter = class {
124
124
  import { readFileSync, writeFileSync, mkdirSync } from "fs";
125
125
  import { join } from "path";
126
126
  import { homedir } from "os";
127
- var CONFIG_DIR = join(homedir(), ".mindstudio");
128
- var CONFIG_PATH = join(CONFIG_DIR, "config.json");
127
+ function configPaths() {
128
+ const dir = join(homedir(), ".mindstudio");
129
+ return { dir, file: join(dir, "config.json") };
130
+ }
129
131
  function loadConfig() {
130
132
  try {
131
- const raw = readFileSync(CONFIG_PATH, "utf-8");
133
+ const raw = readFileSync(configPaths().file, "utf-8");
132
134
  return JSON.parse(raw);
133
135
  } catch {
134
136
  return {};
@@ -213,6 +215,9 @@ function applyStepMethods(AgentClass) {
213
215
  proto.deleteGoogleSheetRows = function(step, options) {
214
216
  return this.executeStep("deleteGoogleSheetRows", step, options);
215
217
  };
218
+ proto.detectChanges = function(step, options) {
219
+ return this.executeStep("detectChanges", step, options);
220
+ };
216
221
  proto.detectPII = function(step, options) {
217
222
  return this.executeStep("detectPII", step, options);
218
223
  };
@@ -788,6 +793,7 @@ var monacoSnippets = {
788
793
  "deleteGmailEmail": { fields: [["messageId", "string"]], outputKeys: [] },
789
794
  "deleteGoogleCalendarEvent": { fields: [["eventId", "string"]], outputKeys: [] },
790
795
  "deleteGoogleSheetRows": { fields: [["documentId", "string"], ["startRow", "string"], ["endRow", "string"]], outputKeys: [] },
796
+ "detectChanges": { fields: [["mode", ["ai", "comparison"]], ["input", "string"]], outputKeys: ["hasChanged", "currentValue", "previousValue", "isFirstRun"] },
791
797
  "detectPII": { fields: [["input", "string"], ["language", "string"], ["entities", "array"]], outputKeys: ["detected", "detections"] },
792
798
  "discordEditMessage": { fields: [["botToken", "string"], ["channelId", "string"], ["messageId", "string"], ["text", "string"]], outputKeys: [] },
793
799
  "discordSendFollowUp": { fields: [["applicationId", "string"], ["interactionToken", "string"], ["text", "string"]], outputKeys: ["messageId"] },
@@ -1092,6 +1098,13 @@ var stepMetadata = {
1092
1098
  inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Spreadsheet ID or URL" }, "sheetName": { "type": "string", "description": "Sheet/tab name (defaults to first sheet)" }, "startRow": { "type": "string", "description": "First row to delete (1-based, inclusive)" }, "endRow": { "type": "string", "description": "Last row to delete (1-based, inclusive)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["documentId", "startRow", "endRow"] },
1093
1099
  outputSchema: { "description": "This step does not produce output data." }
1094
1100
  },
1101
+ "detectChanges": {
1102
+ stepType: "detectChanges",
1103
+ description: "Detect changes between runs by comparing current input against previously stored state. Routes execution based on whether a change occurred.",
1104
+ usageNotes: '- Persists state across runs using a global variable keyed to the step ID.\n- Two modes: "comparison" (default) uses strict string inequality; "ai" uses an LLM to determine if a meaningful change occurred.\n- First run always treats the value as "changed" since there is no previous state.\n- Each mode supports transitions to different steps/workflows for the "changed" and "unchanged" paths.\n- AI mode bills normally for the LLM call.',
1105
+ inputSchema: { "type": "object", "properties": { "mode": { "enum": ["ai", "comparison"], "type": "string", "description": "Detection mode: 'comparison' for strict string inequality, 'ai' for LLM-based. Default: 'comparison'" }, "input": { "type": "string", "description": "Current value to check (variable template)" }, "prompt": { "type": "string", "description": "AI mode: what constitutes a meaningful change" }, "modelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "AI mode: model settings override" }, "previousValueVariable": { "type": "string", "description": "Optional variable name to store the previous value into for downstream access" }, "changedStepId": { "type": "string", "description": "Step to transition to if changed (same workflow)" }, "changedWorkflowId": { "type": "string", "description": "Workflow to jump to if changed (cross workflow)" }, "unchangedStepId": { "type": "string", "description": "Step to transition to if unchanged (same workflow)" }, "unchangedWorkflowId": { "type": "string", "description": "Workflow to jump to if unchanged (cross workflow)" } }, "required": ["mode", "input"], "description": "Configuration for the detect changes step" },
1106
+ outputSchema: { "type": "object", "properties": { "hasChanged": { "type": "boolean", "description": "Whether a change was detected" }, "currentValue": { "type": "string", "description": "The resolved input value" }, "previousValue": { "type": "string", "description": "The stored value from last run (empty string on first run)" }, "isFirstRun": { "type": "boolean", "description": "True when no previous state exists" } }, "required": ["hasChanged", "currentValue", "previousValue", "isFirstRun"] }
1107
+ },
1095
1108
  "detectPII": {
1096
1109
  stepType: "detectPII",
1097
1110
  description: "Scan text for personally identifiable information using Microsoft Presidio.",