@mindstudio-ai/agent 0.1.102 → 0.1.104

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/index.d.ts CHANGED
@@ -1048,6 +1048,111 @@ interface PredicateEntry<T> {
1048
1048
  bindings?: PredicateBindings;
1049
1049
  }
1050
1050
 
1051
+ /**
1052
+ * SQL builders for the `db` namespace.
1053
+ *
1054
+ * Pure functions that generate SQL strings with `?` placeholder bind params
1055
+ * for SQLite. These are used by Table and Query to translate collection
1056
+ * operations into queries executed via `POST /_internal/v2/db/query`.
1057
+ *
1058
+ * ## Parameterized queries
1059
+ *
1060
+ * All builders return `{ sql, params }` tuples. Values are passed as
1061
+ * positional bind params (`?` placeholders) rather than inlined into the
1062
+ * SQL string. This is safer and works naturally with the batch endpoint
1063
+ * which accepts `{ sql, params }` per query.
1064
+ *
1065
+ * ## RETURNING support
1066
+ *
1067
+ * INSERT and UPDATE builders append `RETURNING *` so the platform returns
1068
+ * the created/updated row in a single round trip — no separate SELECT needed.
1069
+ *
1070
+ * ## User type columns
1071
+ *
1072
+ * Columns with schema type `'user'` store values with a `@@user@@` prefix
1073
+ * in SQLite (e.g. `@@user@@550e8400-...`). The `serializeParam()` and
1074
+ * `deserializeRow()` functions handle this transparently — application
1075
+ * code always works with clean UUID strings.
1076
+ */
1077
+
1078
+ type AggregateFn = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'countDistinct';
1079
+
1080
+ /**
1081
+ * Aggregation spec types + shared logic for `Query.aggregate()` and the
1082
+ * scalar aggregate terminals (sum/avg/countDistinct).
1083
+ *
1084
+ * The spec uses STRING column names (not accessors): `by: ['questionId']`,
1085
+ * `{ sum: 'score' }`. Plain-object terms give reliable contextual typing of
1086
+ * the result (`Pick<T, By[number]> & AggregateRow<T, S>`), follow the
1087
+ * `upsert(conflictKey, ...)` string-key precedent, and can't hit the
1088
+ * accessor-extraction failure mode — an invalid identifier is a hard error
1089
+ * here, not a silent fetch-everything fallback.
1090
+ *
1091
+ * Empty-set semantics (the SQL path and the JS fallback in
1092
+ * `computeAggregateInJs` MUST stay in lockstep — see the README's
1093
+ * Aggregation section):
1094
+ * count → 0; sum → 0 (SQL TOTAL(), never NULL); avg → null;
1095
+ * countDistinct → 0; min/max → null. All aggregates skip NULL values.
1096
+ */
1097
+
1098
+ /** Column keys whose value type is number (nullable allowed). */
1099
+ type NumericKey<T> = {
1100
+ [K in keyof T & string]: NonNullable<T[K]> extends number ? K : never;
1101
+ }[keyof T & string];
1102
+ /** Column keys orderable by MIN/MAX — numbers and strings. */
1103
+ type ComparableKey<T> = {
1104
+ [K in keyof T & string]: NonNullable<T[K]> extends number | string ? K : never;
1105
+ }[keyof T & string];
1106
+ /**
1107
+ * One aggregate in an `aggregate()` select spec. Exactly one function key
1108
+ * per term:
1109
+ * { count: true } · { sum: 'col' } · { avg: 'col' } ·
1110
+ * { min: 'col' } · { max: 'col' } · { countDistinct: 'col' }
1111
+ */
1112
+ type AggregateTerm<T> = {
1113
+ count: true;
1114
+ } | {
1115
+ sum: NumericKey<T>;
1116
+ } | {
1117
+ avg: NumericKey<T>;
1118
+ } | {
1119
+ min: ComparableKey<T>;
1120
+ } | {
1121
+ max: ComparableKey<T>;
1122
+ } | {
1123
+ countDistinct: keyof T & string;
1124
+ };
1125
+ /** The `select` map: result property name → aggregate term. */
1126
+ type AggregateSelect<T> = Record<string, AggregateTerm<T>>;
1127
+ /** Result value types per term (matching the empty-set semantics above). */
1128
+ type AggregateRow<T, S extends AggregateSelect<T>> = {
1129
+ [K in keyof S]: S[K] extends {
1130
+ count: true;
1131
+ } ? number : S[K] extends {
1132
+ sum: string;
1133
+ } ? number : S[K] extends {
1134
+ avg: string;
1135
+ } ? number | null : S[K] extends {
1136
+ countDistinct: string;
1137
+ } ? number : S[K] extends {
1138
+ min: infer C;
1139
+ } ? C extends keyof T ? T[C] | null : never : S[K] extends {
1140
+ max: infer C;
1141
+ } ? C extends keyof T ? T[C] | null : never : never;
1142
+ };
1143
+ interface NormalizedAggregateTerm {
1144
+ alias: string;
1145
+ fn: AggregateFn;
1146
+ column?: string;
1147
+ }
1148
+ interface NormalizedAggregateSpec {
1149
+ by: string[];
1150
+ select: NormalizedAggregateTerm[];
1151
+ orderBy?: string;
1152
+ desc?: boolean;
1153
+ limit?: number;
1154
+ }
1155
+
1051
1156
  /**
1052
1157
  * Query chain builder — lazy, immutable query construction for database reads.
1053
1158
  *
@@ -1083,6 +1188,14 @@ interface PredicateEntry<T> {
1083
1188
  * performance optimization.
1084
1189
  */
1085
1190
 
1191
+ type AggregateState<T> = {
1192
+ kind: 'scalar';
1193
+ fn: 'count' | 'sum' | 'avg' | 'countDistinct';
1194
+ accessor?: Accessor<T>;
1195
+ } | {
1196
+ kind: 'grouped';
1197
+ spec: NormalizedAggregateSpec;
1198
+ };
1086
1199
  declare class Query<T, TResult = T[]> implements PromiseLike<TResult> {
1087
1200
  private readonly _predicates;
1088
1201
  private readonly _sortAccessor;
@@ -1093,6 +1206,8 @@ declare class Query<T, TResult = T[]> implements PromiseLike<TResult> {
1093
1206
  /** @internal Pre-compiled WHERE clause (bypasses predicate compiler). Used by Table.get(). */
1094
1207
  private readonly _rawWhere;
1095
1208
  private readonly _rawWhereParams;
1209
+ /** @internal See AggregateState — set by aggregate terminals. */
1210
+ private readonly _aggregate;
1096
1211
  /** @internal Post-process transform applied after row deserialization. */
1097
1212
  readonly _postProcess: ((rows: T[]) => TResult) | undefined;
1098
1213
  constructor(config: TableConfig, options?: {
@@ -1104,6 +1219,7 @@ declare class Query<T, TResult = T[]> implements PromiseLike<TResult> {
1104
1219
  postProcess?: (rows: T[]) => TResult;
1105
1220
  rawWhere?: string;
1106
1221
  rawWhereParams?: unknown[];
1222
+ aggregate?: AggregateState<T>;
1107
1223
  });
1108
1224
  private _clone;
1109
1225
  filter(predicate: Predicate<T>): Query<T>;
@@ -1115,6 +1231,68 @@ declare class Query<T, TResult = T[]> implements PromiseLike<TResult> {
1115
1231
  first(): Query<T, T | null>;
1116
1232
  last(): Query<T, T | null>;
1117
1233
  count(): Query<T, number>;
1234
+ /**
1235
+ * Sum of a numeric field across matching rows. Compiles to a SQL
1236
+ * aggregate (TOTAL) when possible — no rows are fetched. Returns 0 for
1237
+ * an empty set; NULL values are skipped (SQL semantics).
1238
+ */
1239
+ sum(accessor: Accessor<T, number | null | undefined>): Query<T, number>;
1240
+ /**
1241
+ * Average of a numeric field across matching rows. Compiles to SQL AVG
1242
+ * when possible. Returns null for an empty set (or when every value is
1243
+ * null) — SQL AVG semantics.
1244
+ */
1245
+ avg(accessor: Accessor<T, number | null | undefined>): Query<T, number | null>;
1246
+ /**
1247
+ * Number of distinct non-null values of a field across matching rows.
1248
+ * Compiles to SQL COUNT(DISTINCT col) when possible.
1249
+ */
1250
+ countDistinct(accessor: Accessor<T>): Query<T, number>;
1251
+ /**
1252
+ * Multiple aggregates over all matching rows — a single result object.
1253
+ * Compiles to one SQL aggregate statement; no rows are fetched.
1254
+ *
1255
+ * ```ts
1256
+ * const stats = await Orders
1257
+ * .filter(o => o.status === 'paid')
1258
+ * .aggregate({ select: { n: { count: true }, revenue: { sum: 'amount' } } });
1259
+ * // { n: number; revenue: number }
1260
+ * ```
1261
+ */
1262
+ aggregate<S extends AggregateSelect<T>>(spec: {
1263
+ select: S;
1264
+ }): Query<T, AggregateRow<T, S>>;
1265
+ /**
1266
+ * Grouped aggregation — compiles to SELECT ... GROUP BY; never fetches
1267
+ * rows (when the filter compiles to SQL). Returns one plain object per
1268
+ * group: the group-key columns plus one property per select alias.
1269
+ * `orderBy` names a select alias or group key; with `desc` + `limit`
1270
+ * this expresses top-N groups in a single statement.
1271
+ *
1272
+ * ```ts
1273
+ * const top = await Answers
1274
+ * .filter((a, $) => a.surveyId === $.surveyId, { surveyId })
1275
+ * .aggregate({
1276
+ * by: ['questionId'],
1277
+ * select: {
1278
+ * n: { count: true },
1279
+ * avgScore: { avg: 'score' },
1280
+ * respondents: { countDistinct: 'responseId' },
1281
+ * },
1282
+ * orderBy: 'n',
1283
+ * desc: true,
1284
+ * limit: 20,
1285
+ * });
1286
+ * // Array<{ questionId: string; n: number; avgScore: number | null; respondents: number }>
1287
+ * ```
1288
+ */
1289
+ aggregate<const By extends readonly (keyof T & string)[], S extends AggregateSelect<T>>(spec: {
1290
+ by: By;
1291
+ select: S;
1292
+ orderBy?: (keyof S & string) | By[number];
1293
+ desc?: boolean;
1294
+ limit?: number;
1295
+ }): Query<T, Array<Pick<T, By[number]> & AggregateRow<T, S>>>;
1118
1296
  some(): Query<T, boolean>;
1119
1297
  every(): Promise<boolean>;
1120
1298
  min(accessor: Accessor<T, number>): Query<T, T | null>;
@@ -1138,6 +1316,17 @@ declare class Query<T, TResult = T[]> implements PromiseLike<TResult> {
1138
1316
  */
1139
1317
  static _processResults<T, R = T[]>(result: SqlResult, compiled: CompiledQuery<T, R>): R;
1140
1318
  then<TResult1 = TResult, TResult2 = never>(onfulfilled?: ((value: TResult) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
1319
+ private _run;
1320
+ /**
1321
+ * @internal Compile the pending aggregate into a single SQL statement +
1322
+ * result processor. Returns null (→ fetch path, postProcess computes the
1323
+ * aggregate) when there is no aggregate, when a pre-compiled WHERE is in
1324
+ * play (Table.get()), when limit/offset are set (aggregate-the-page
1325
+ * semantics — COUNT(*)/TOTAL can't express "over the limited page"), or
1326
+ * when a scalar accessor doesn't extract to a column (computed accessors
1327
+ * stay correct via JS, with a warning to prompt optimization).
1328
+ */
1329
+ private _compileAggregateSql;
1141
1330
  catch<TResult2 = never>(onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult | TResult2>;
1142
1331
  private _execute;
1143
1332
  private _compilePredicates;
@@ -1168,6 +1357,9 @@ interface CompiledQuery<T, TResult = T[]> {
1168
1357
  offset?: number;
1169
1358
  /** Post-process transform (e.g. first() extracts [0] ?? null). */
1170
1359
  postProcess?: (rows: T[]) => TResult;
1360
+ /** When set, the SQL result rows ARE the answer (aggregate values, not
1361
+ * table rows): called instead of deserialize + postProcess. */
1362
+ processRaw?: (result: SqlResult) => TResult;
1171
1363
  }
1172
1364
 
1173
1365
  /**
@@ -1275,7 +1467,39 @@ declare class Table<T> {
1275
1467
  min(accessor: Accessor<T, number>): Query<T, T | null>;
1276
1468
  /** Row with the maximum value for a field, or null if table is empty. */
1277
1469
  max(accessor: Accessor<T, number>): Query<T, T | null>;
1278
- /** Group rows by a field. Returns a Map. */
1470
+ /**
1471
+ * Sum of a numeric field across all rows (0 for an empty table).
1472
+ * Runs as a SQL aggregate — no rows are fetched. Chain from filter()
1473
+ * to sum a subset: `Orders.filter(...).sum(o => o.amount)`.
1474
+ */
1475
+ sum(accessor: Accessor<T, number | null | undefined>): Query<T, number>;
1476
+ /**
1477
+ * Average of a numeric field across all rows (null for an empty table).
1478
+ * Runs as a SQL aggregate — no rows are fetched.
1479
+ */
1480
+ avg(accessor: Accessor<T, number | null | undefined>): Query<T, number | null>;
1481
+ /**
1482
+ * Number of distinct non-null values of a field across all rows.
1483
+ * Runs as a SQL aggregate — no rows are fetched.
1484
+ */
1485
+ countDistinct(accessor: Accessor<T>): Query<T, number>;
1486
+ /**
1487
+ * Grouped (or whole-table) aggregation compiling to a single SQL
1488
+ * statement — see Query.aggregate() for the spec shape and examples.
1489
+ */
1490
+ aggregate<S extends AggregateSelect<T>>(spec: {
1491
+ select: S;
1492
+ }): Query<T, AggregateRow<T, S>>;
1493
+ aggregate<const By extends readonly (keyof T & string)[], S extends AggregateSelect<T>>(spec: {
1494
+ by: By;
1495
+ select: S;
1496
+ orderBy?: (keyof S & string) | By[number];
1497
+ desc?: boolean;
1498
+ limit?: number;
1499
+ }): Query<T, Array<Pick<T, By[number]> & AggregateRow<T, S>>>;
1500
+ /** Group rows by a field. Returns a Map of FULL rows per group — it
1501
+ * fetches everything. For grouped counts/sums/averages over tables that
1502
+ * can grow large, use `aggregate()` instead (SQL GROUP BY, no row fetch). */
1279
1503
  groupBy<K extends string | number>(accessor: Accessor<T, K>): Query<T, Map<K, T[]>>;
1280
1504
  /** Get all rows as an array. */
1281
1505
  toArray(): Query<T>;
@@ -1331,6 +1555,42 @@ declare class Table<T> {
1331
1555
  private _validateUniqueConstraint;
1332
1556
  }
1333
1557
 
1558
+ /**
1559
+ * RawQuery — the lazy result of `db.sql()`, the read-only raw-SQL escape
1560
+ * hatch. Like Mutation, it's a fixed statement with a result processor:
1561
+ * awaiting executes it; passing it to `db.batch()` bundles it with typed
1562
+ * Query/Mutation operations in one round trip.
1563
+ *
1564
+ * The read-only gate (SELECT/WITH only) lives in `db.sql()` itself — by the
1565
+ * time a RawQuery exists, the statement has passed it.
1566
+ */
1567
+
1568
+ interface CompiledRawQuery<TResult> {
1569
+ type: 'raw';
1570
+ query: SqlQuery;
1571
+ /** Only databaseId — that's all batch grouping reads from config. */
1572
+ config: {
1573
+ databaseId: string;
1574
+ };
1575
+ processResult: (result: SqlResult) => TResult;
1576
+ }
1577
+ declare class RawQuery<TResult = Record<string, unknown>[]> implements PromiseLike<TResult> {
1578
+ private readonly _databaseId;
1579
+ private readonly _executeBatch;
1580
+ private readonly _query;
1581
+ constructor(databaseId: string, executeBatch: (queries: SqlQuery[]) => Promise<SqlResult[]>, query: SqlQuery);
1582
+ then<T1 = TResult, T2 = never>(onfulfilled?: ((value: TResult) => T1 | PromiseLike<T1>) | null, onrejected?: ((reason: unknown) => T2 | PromiseLike<T2>) | null): Promise<T1 | T2>;
1583
+ catch<T2 = never>(onrejected?: ((reason: unknown) => T2 | PromiseLike<T2>) | null): Promise<TResult | T2>;
1584
+ /** @internal Compile for db.batch(). */
1585
+ _compile(): CompiledRawQuery<TResult>;
1586
+ /** @internal Process a raw SQL result. Used by db.batch(). */
1587
+ static _processResults<T>(result: SqlResult, compiled: CompiledRawQuery<T>): T;
1588
+ /** Schema-less deserialization: strips @@user@@ prefixes and best-effort
1589
+ * parses JSON-looking strings; makes no other representation promises. */
1590
+ private static _process;
1591
+ private _execute;
1592
+ }
1593
+
1334
1594
  /**
1335
1595
  * The `db` namespace — factory and time helpers for MindStudio managed databases.
1336
1596
  *
@@ -1488,6 +1748,32 @@ interface Db {
1488
1748
  * ```
1489
1749
  */
1490
1750
  userRef(id: string): User;
1751
+ /**
1752
+ * Run a raw read-only SQL statement against the app's managed database —
1753
+ * the escape hatch for joins, subqueries, and anything the typed Table
1754
+ * API can't express. SELECT/WITH only; writes are rejected — use Table
1755
+ * methods (push/update/upsert/remove) for writes.
1756
+ *
1757
+ * Positional `?` bind params. Lazy and batchable: await it directly, or
1758
+ * pass it to `db.batch()` alongside Query/Mutation objects.
1759
+ *
1760
+ * Multi-database apps: pass `{ database }` (name or ID); single-database
1761
+ * apps resolve automatically.
1762
+ *
1763
+ * Note: raw rows come back close to how SQLite stores them and may not
1764
+ * exactly match the typed table API's representations.
1765
+ *
1766
+ * @example
1767
+ * ```ts
1768
+ * const rows = await db.sql<{ questionId: string; n: number }>(
1769
+ * 'SELECT questionId, COUNT(*) AS n FROM answers WHERE surveyId = ? GROUP BY questionId',
1770
+ * [surveyId],
1771
+ * );
1772
+ * ```
1773
+ */
1774
+ sql<T = Record<string, unknown>>(query: string, params?: unknown[], options?: {
1775
+ database?: string;
1776
+ }): RawQuery<T[]>;
1491
1777
  /**
1492
1778
  * Execute multiple reads and writes in a single round trip. All
1493
1779
  * operations run on the same database connection, eliminating
@@ -1520,12 +1806,12 @@ interface Db {
1520
1806
  batch(...queries: Batchable<unknown>[]): Promise<unknown[]>;
1521
1807
  }
1522
1808
  /**
1523
- * An operation `db.batch()` can bundle: an un-awaited Query (read) or
1524
- * Mutation (write). The batch executor compiles these to SQL — a plain
1525
- * Promise carries no SQL and cannot be batched, which is why this is not
1526
- * `PromiseLike`.
1809
+ * An operation `db.batch()` can bundle: an un-awaited Query (read),
1810
+ * Mutation (write), or RawQuery (db.sql). The batch executor compiles
1811
+ * these to SQL — a plain Promise carries no SQL and cannot be batched,
1812
+ * which is why this is not `PromiseLike`.
1527
1813
  */
1528
- type Batchable<A> = Query<any, A> | Mutation<A>;
1814
+ type Batchable<A> = Query<any, A> | Mutation<A> | RawQuery<A>;
1529
1815
 
1530
1816
  /**
1531
1817
  * The `files` namespace — typed, private-by-default file storage for MindStudio
@@ -2524,7 +2810,13 @@ interface RunTaskOptionsBase {
2524
2810
  input: Record<string, unknown>;
2525
2811
  /** SDK actions and/or app methods to make available as tools. */
2526
2812
  tools: TaskToolConfig[];
2527
- /** Model ID for the task agent. Must support tool use. */
2813
+ /**
2814
+ * Model ID for the task agent. Must support tool use. Tuned model lines
2815
+ * (`tuned/{appId}/{methodId}`) are supported — that's how a jewel is
2816
+ * promoted onto its own fine-tuned model; tool support depends on the
2817
+ * tuned model's base (qwen bases: yes) and is enforced server-side with a
2818
+ * deterministic error.
2819
+ */
2528
2820
  model: string;
2529
2821
  /** Max loop iterations before forcing final output. Default 20, max 100. */
2530
2822
  maxTurns?: number;
@@ -5720,33 +6012,6 @@ interface PostToZapierStepOutput {
5720
6012
  /** Parsed webhook response from Zapier (JSON object, array, or string) */
5721
6013
  data: unknown;
5722
6014
  }
5723
- interface QueryAppDatabaseStepInput {
5724
- /** Name or ID of the app data database to query */
5725
- databaseId: string;
5726
- /**
5727
- * SQL query to execute. Use {{variables}} directly in the SQL — they are handled according to the `parameterize` setting.
5728
- *
5729
- * When parameterize is true (default): {{variables}} are extracted from the SQL, replaced with ? placeholders, resolved via the full MindStudio handlebars pipeline, and passed as safe parameterized values to SQLite. This prevents SQL injection. Example: INSERT INTO contacts (name, email) VALUES ({{name}}, {{email}})
5730
- *
5731
- * When parameterize is false: The entire SQL string is resolved via compileString (standard handlebars interpolation) and executed as-is. Use this for dynamic/generated SQL where another step builds the query. The user is responsible for safety. Example: {{generatedInsertQuery}}
5732
- *
5733
- * Ask the user for the database schema if they have not already provided it.
5734
- */
5735
- sql: string;
5736
- /**
5737
- * Whether to treat {{variables}} as parameterized query values (default: true).
5738
- *
5739
- * - true: {{vars}} are extracted, replaced with ?, and passed as bind params. Safe from SQL injection. Use for standard CRUD operations.
5740
- * - false: {{vars}} are interpolated directly into the SQL string via handlebars. Use when another step generates full or partial SQL (e.g. bulk inserts with precomputed VALUES). The user is responsible for sanitization.
5741
- */
5742
- parameterize?: boolean;
5743
- }
5744
- interface QueryAppDatabaseStepOutput {
5745
- /** Result rows for SELECT queries (empty array for write queries) */
5746
- rows: unknown[];
5747
- /** Number of rows affected by INSERT, UPDATE, or DELETE queries (0 for SELECT) */
5748
- changes: number;
5749
- }
5750
6015
  interface QueryDataSourceStepInput {
5751
6016
  /** ID of the vector data source to query */
5752
6017
  dataSourceId: string;
@@ -6121,6 +6386,8 @@ interface SearchGoogleStepInput {
6121
6386
  dateRange?: "hour" | "day" | "week" | "month" | "year" | "any";
6122
6387
  /** Number of results to return (1-100, default: 30) */
6123
6388
  numResults?: number;
6389
+ /** Read the page content of the first N results in this same step (0-10, default 0 = off), rather than following up with a Scrape URL step per result. Each page is a full scrape, so this costs substantially more than the search alone. */
6390
+ fetchTopN?: number;
6124
6391
  }
6125
6392
  interface SearchGoogleStepOutput {
6126
6393
  /** List of search result entries */
@@ -6131,7 +6398,17 @@ interface SearchGoogleStepOutput {
6131
6398
  description: string;
6132
6399
  /** URL of the search result page */
6133
6400
  url: string;
6401
+ /** Page content, only present when fetchTopN covered this result */
6402
+ content?: string;
6403
+ }[];
6404
+ /** Google's "People also ask" entries, when Google returned any */
6405
+ peopleAlsoAsk?: {
6406
+ question?: string;
6407
+ snippet?: string;
6408
+ link?: string;
6134
6409
  }[];
6410
+ /** Google's related-search suggestions, when Google returned any */
6411
+ relatedSearches?: string[];
6135
6412
  }
6136
6413
  interface SearchGoogleCalendarEventsStepInput {
6137
6414
  /** Text search term */
@@ -7006,7 +7283,7 @@ type GenerateAssetStepOutput = GeneratePdfStepOutput;
7006
7283
  type GenerateTextStepInput = UserMessageStepInput;
7007
7284
  type GenerateTextStepOutput = UserMessageStepOutput;
7008
7285
  /** Union of all available step type names. */
7009
- type StepName = "activeCampaignAddNote" | "activeCampaignCreateContact" | "addSubtitlesToVideo" | "airtableCreateUpdateRecord" | "airtableDeleteRecord" | "airtableGetRecord" | "airtableGetTableRecords" | "analyzeImage" | "analyzeVideo" | "captureThumbnail" | "checkAppRole" | "codaCreateUpdatePage" | "codaCreateUpdateRow" | "codaFindRow" | "codaGetPage" | "codaGetTableRows" | "convertPdfToImages" | "createDataSource" | "createGmailDraft" | "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" | "generate3dModel" | "generateChart" | "generateImage" | "generateLipsync" | "generateMusic" | "generatePdf" | "generateStaticVideoFromImage" | "generateVideo" | "getGmailAttachments" | "getGmailDraft" | "getGmailEmail" | "getGmailUnreadCount" | "getGoogleCalendarEvent" | "getGoogleDriveFile" | "getGoogleSheetInfo" | "getMediaMetadata" | "hubspotCreateCompany" | "hubspotCreateContact" | "hubspotGetCompany" | "hubspotGetContact" | "hunterApiCompanyEnrichment" | "hunterApiDomainSearch" | "hunterApiEmailFinder" | "hunterApiEmailVerification" | "hunterApiPersonEnrichment" | "imageFaceSwap" | "imageRemoveWatermark" | "insertVideoClips" | "listDataSources" | "listGmailDrafts" | "listGmailLabels" | "listGoogleCalendarEvents" | "listGoogleDriveFiles" | "listRecentGmailEmails" | "logic" | "makeDotComRunScenario" | "mergeAudio" | "mergeVideos" | "meshyAnimate" | "meshyImageTo3d" | "meshyRemesh" | "meshyRig" | "meshyTextTo3d" | "meshyTexture" | "mixAudioIntoVideo" | "muteVideo" | "n8nRunNode" | "notionCreatePage" | "notionUpdatePage" | "particlePodcastsFindMentions" | "particlePodcastsGetEpisode" | "particlePodcastsGetEpisodeTranscript" | "particlePodcastsSearchCompanies" | "particlePodcastsSearchDialogue" | "particlePodcastsSearchPodcasts" | "peopleSearch" | "postToLinkedIn" | "postToSlackChannel" | "postToX" | "postToZapier" | "queryAppDatabase" | "queryDataSource" | "queryExternalDatabase" | "redactPII" | "removeBackgroundFromImage" | "replyToGmailEmail" | "resizeVideo" | "runFromConnectorRegistry" | "runPackagedWorkflow" | "scrapeLinkedInCompany" | "scrapeLinkedInProfile" | "scrapeUrl" | "scrapeXPost" | "scrapeXProfile" | "screenshotUrl" | "searchGmailEmails" | "searchGoogle" | "searchGoogleCalendarEvents" | "searchGoogleDrive" | "searchGoogleImages" | "searchGoogleNews" | "searchGoogleTrends" | "searchPerplexity" | "searchXPosts" | "searchYoutube" | "searchYoutubeTrends" | "sendEmail" | "sendGmailDraft" | "sendGmailMessage" | "sendSlackDirectMessage" | "sendSMS" | "setGmailReadStatus" | "setRunTitle" | "setVariable" | "telegramEditMessage" | "telegramReplyToMessage" | "telegramSendAudio" | "telegramSendFile" | "telegramSendImage" | "telegramSendMessage" | "telegramSendVideo" | "telegramSetTyping" | "textToSpeech" | "transcribeAudio" | "trimMedia" | "updateGmailLabels" | "updateGoogleCalendarEvent" | "updateGoogleDoc" | "updateGoogleSheet" | "uploadDataSourceDocument" | "upscaleImage" | "upscaleVideo" | "userMessage" | "videoFaceSwap" | "videoRemoveBackground" | "videoRemoveWatermark" | "watermarkImage" | "watermarkVideo" | "youDotComFinanceResearch" | "youDotComGetPageContent" | "youDotComLiveNews" | "youDotComWebResearch" | "youDotComWebSearch";
7286
+ type StepName = "activeCampaignAddNote" | "activeCampaignCreateContact" | "addSubtitlesToVideo" | "airtableCreateUpdateRecord" | "airtableDeleteRecord" | "airtableGetRecord" | "airtableGetTableRecords" | "analyzeImage" | "analyzeVideo" | "captureThumbnail" | "checkAppRole" | "codaCreateUpdatePage" | "codaCreateUpdateRow" | "codaFindRow" | "codaGetPage" | "codaGetTableRows" | "convertPdfToImages" | "createDataSource" | "createGmailDraft" | "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" | "generate3dModel" | "generateChart" | "generateImage" | "generateLipsync" | "generateMusic" | "generatePdf" | "generateStaticVideoFromImage" | "generateVideo" | "getGmailAttachments" | "getGmailDraft" | "getGmailEmail" | "getGmailUnreadCount" | "getGoogleCalendarEvent" | "getGoogleDriveFile" | "getGoogleSheetInfo" | "getMediaMetadata" | "hubspotCreateCompany" | "hubspotCreateContact" | "hubspotGetCompany" | "hubspotGetContact" | "hunterApiCompanyEnrichment" | "hunterApiDomainSearch" | "hunterApiEmailFinder" | "hunterApiEmailVerification" | "hunterApiPersonEnrichment" | "imageFaceSwap" | "imageRemoveWatermark" | "insertVideoClips" | "listDataSources" | "listGmailDrafts" | "listGmailLabels" | "listGoogleCalendarEvents" | "listGoogleDriveFiles" | "listRecentGmailEmails" | "logic" | "makeDotComRunScenario" | "mergeAudio" | "mergeVideos" | "meshyAnimate" | "meshyImageTo3d" | "meshyRemesh" | "meshyRig" | "meshyTextTo3d" | "meshyTexture" | "mixAudioIntoVideo" | "muteVideo" | "n8nRunNode" | "notionCreatePage" | "notionUpdatePage" | "particlePodcastsFindMentions" | "particlePodcastsGetEpisode" | "particlePodcastsGetEpisodeTranscript" | "particlePodcastsSearchCompanies" | "particlePodcastsSearchDialogue" | "particlePodcastsSearchPodcasts" | "peopleSearch" | "postToLinkedIn" | "postToSlackChannel" | "postToX" | "postToZapier" | "queryDataSource" | "queryExternalDatabase" | "redactPII" | "removeBackgroundFromImage" | "replyToGmailEmail" | "resizeVideo" | "runFromConnectorRegistry" | "runPackagedWorkflow" | "scrapeLinkedInCompany" | "scrapeLinkedInProfile" | "scrapeUrl" | "scrapeXPost" | "scrapeXProfile" | "screenshotUrl" | "searchGmailEmails" | "searchGoogle" | "searchGoogleCalendarEvents" | "searchGoogleDrive" | "searchGoogleImages" | "searchGoogleNews" | "searchGoogleTrends" | "searchPerplexity" | "searchXPosts" | "searchYoutube" | "searchYoutubeTrends" | "sendEmail" | "sendGmailDraft" | "sendGmailMessage" | "sendSlackDirectMessage" | "sendSMS" | "setGmailReadStatus" | "setRunTitle" | "setVariable" | "telegramEditMessage" | "telegramReplyToMessage" | "telegramSendAudio" | "telegramSendFile" | "telegramSendImage" | "telegramSendMessage" | "telegramSendVideo" | "telegramSetTyping" | "textToSpeech" | "transcribeAudio" | "trimMedia" | "updateGmailLabels" | "updateGoogleCalendarEvent" | "updateGoogleDoc" | "updateGoogleSheet" | "uploadDataSourceDocument" | "upscaleImage" | "upscaleVideo" | "userMessage" | "videoFaceSwap" | "videoRemoveBackground" | "videoRemoveWatermark" | "watermarkImage" | "watermarkVideo" | "youDotComFinanceResearch" | "youDotComGetPageContent" | "youDotComLiveNews" | "youDotComWebResearch" | "youDotComWebSearch";
7010
7287
  /** Maps step names to their input types. */
7011
7288
  interface StepInputMap {
7012
7289
  activeCampaignAddNote: ActiveCampaignAddNoteStepInput;
@@ -7115,7 +7392,6 @@ interface StepInputMap {
7115
7392
  postToSlackChannel: PostToSlackChannelStepInput;
7116
7393
  postToX: PostToXStepInput;
7117
7394
  postToZapier: PostToZapierStepInput;
7118
- queryAppDatabase: QueryAppDatabaseStepInput;
7119
7395
  queryDataSource: QueryDataSourceStepInput;
7120
7396
  queryExternalDatabase: QueryExternalDatabaseStepInput;
7121
7397
  redactPII: RedactPIIStepInput;
@@ -7287,7 +7563,6 @@ interface StepOutputMap {
7287
7563
  postToSlackChannel: PostToSlackChannelStepOutput;
7288
7564
  postToX: PostToXStepOutput;
7289
7565
  postToZapier: PostToZapierStepOutput;
7290
- queryAppDatabase: QueryAppDatabaseStepOutput;
7291
7566
  queryDataSource: QueryDataSourceStepOutput;
7292
7567
  queryExternalDatabase: QueryExternalDatabaseStepOutput;
7293
7568
  redactPII: RedactPIIStepOutput;
@@ -9102,32 +9377,6 @@ interface StepMethods {
9102
9377
  * ```
9103
9378
  */
9104
9379
  postToZapier(step: PostToZapierStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<PostToZapierStepOutput>>;
9105
- /**
9106
- * Execute a SQL query against the app managed database.
9107
- *
9108
- * @remarks
9109
- * - Executes raw SQL against a SQLite database managed by the app.
9110
- * - For SELECT queries, returns rows as JSON.
9111
- * - For INSERT/UPDATE/DELETE, returns the number of affected rows.
9112
- * - Use {{variables}} directly in your SQL. By default they are automatically extracted
9113
- * and passed as safe parameterized values (preventing SQL injection).
9114
- * Example: INSERT INTO contacts (name, comment) VALUES ({{name}}, {{comment}})
9115
- * - Full MindStudio handlebars syntax is supported, including helpers like {{json myVar}},
9116
- * {{get myVar "$.path"}}, {{global.orgName}}, etc.
9117
- * - Set parameterize to false for raw/dynamic SQL where variables are interpolated directly
9118
- * into the query string. Use this when another step generates full or partial SQL, e.g.
9119
- * a bulk INSERT with a precomputed VALUES list. The user is responsible for sanitization
9120
- * when parameterize is false.
9121
- *
9122
- * @example
9123
- * ```typescript
9124
- * const result = await agent.queryAppDatabase({
9125
- * databaseId: ``,
9126
- * sql: ``,
9127
- * });
9128
- * ```
9129
- */
9130
- queryAppDatabase(step: QueryAppDatabaseStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<QueryAppDatabaseStepOutput>>;
9131
9380
  /**
9132
9381
  * @deprecated Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from @mindstudio-ai/agent instead, which owns parsing, chunking, embedding and citations. Search a vector data source (RAG) and return relevant document chunks.
9133
9382
  *
@@ -9390,6 +9639,8 @@ interface StepMethods {
9390
9639
  * - Defaults to us/english, but can optionally specify country and/or language.
9391
9640
  * - Defaults to any time, but can optionally specify last hour, last day, week, month, or year.
9392
9641
  * - Defaults to top 30 results, but can specify 1 to 100 results to return.
9642
+ * - Set fetchTopN to also read the page content of the first N results in the same step, instead of following up with a separate Scrape URL step per result. Costs meaningfully more (each page is a full scrape), so ask for the fewest you need.
9643
+ * - Also returns Google's "people also ask" and related searches when available, which are useful for choosing a follow-up query.
9393
9644
  *
9394
9645
  * @example
9395
9646
  * ```typescript
@@ -10550,4 +10801,4 @@ declare const prerender: {
10550
10801
  }>;
10551
10802
  };
10552
10803
 
10553
- 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 Batchable, 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 DefineStoreOptions, 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 FileAccess, type Files, type FromSchema, type Generate3dModelStepInput, type Generate3dModelStepOutput, 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 Jewel, type JewelConfig, type JewelGradeContext, type JewelMethod, type JewelMethodInput, type JewelPairRecord, type JewelProposal, type JewelProposeOutcome, type JewelProposeResult, type JewelQueueItem, type JewelQueueResolution, type JewelQueueResolveResult, type JewelRunParams, type JewelVerdict, type JewelsApi, type JsonObjectSchema, type JsonSchema, type JsonSchemaTypeName, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListOptions, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, type MeshyAnimateStepInput, type MeshyAnimateStepOutput, type MeshyImageTo3dStepInput, type MeshyImageTo3dStepOutput, type MeshyRemeshStepInput, type MeshyRemeshStepOutput, type MeshyRigStepInput, type MeshyRigStepOutput, type MeshyTextTo3dStepInput, type MeshyTextTo3dStepOutput, type MeshyTextureStepInput, type MeshyTextureStepOutput, 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 ParticlePodcastsFindMentionsStepInput, type ParticlePodcastsFindMentionsStepOutput, type ParticlePodcastsGetEpisodeStepInput, type ParticlePodcastsGetEpisodeStepOutput, type ParticlePodcastsGetEpisodeTranscriptStepInput, type ParticlePodcastsGetEpisodeTranscriptStepOutput, type ParticlePodcastsSearchCompaniesStepInput, type ParticlePodcastsSearchCompaniesStepOutput, type ParticlePodcastsSearchDialogueStepInput, type ParticlePodcastsSearchDialogueStepOutput, type ParticlePodcastsSearchPodcastsStepInput, type ParticlePodcastsSearchPodcastsStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, type PutOptions, 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 ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskOptionsWithExample, type RunTaskOptionsWithSchema, type RunTaskResult, type SchemaValidationError, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, 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 SessionContext, 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, Store, type StoredFile, 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 UploadToken, 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 Voice, type VoiceCallResult, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, type YouDotComFinanceResearchStepInput, type YouDotComFinanceResearchStepOutput, type YouDotComGetPageContentStepInput, type YouDotComGetPageContentStepOutput, type YouDotComLiveNewsStepInput, type YouDotComLiveNewsStepOutput, type YouDotComWebResearchStepInput, type YouDotComWebResearchStepOutput, type YouDotComWebSearchStepInput, type YouDotComWebSearchStepOutput, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, files, getRequestContext, mindstudio, monacoSnippets, prerender, reportIssue, resolveUser, runWithContext, session, stepMetadata, stream, voice, waitUntil };
10804
+ export { type Accessor, type ActiveCampaignAddNoteStepInput, type ActiveCampaignAddNoteStepOutput, type ActiveCampaignCreateContactStepInput, type ActiveCampaignCreateContactStepOutput, type AddSubtitlesToVideoStepInput, type AddSubtitlesToVideoStepOutput, type AgentInfo, type AgentOptions, type AggregateRow, type AggregateSelect, type AggregateTerm, 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 Batchable, 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 DefineStoreOptions, 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 FileAccess, type Files, type FromSchema, type Generate3dModelStepInput, type Generate3dModelStepOutput, 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 Jewel, type JewelConfig, type JewelGradeContext, type JewelMethod, type JewelMethodInput, type JewelPairRecord, type JewelProposal, type JewelProposeOutcome, type JewelProposeResult, type JewelQueueItem, type JewelQueueResolution, type JewelQueueResolveResult, type JewelRunParams, type JewelVerdict, type JewelsApi, type JsonObjectSchema, type JsonSchema, type JsonSchemaTypeName, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListOptions, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, type MeshyAnimateStepInput, type MeshyAnimateStepOutput, type MeshyImageTo3dStepInput, type MeshyImageTo3dStepOutput, type MeshyRemeshStepInput, type MeshyRemeshStepOutput, type MeshyRigStepInput, type MeshyRigStepOutput, type MeshyTextTo3dStepInput, type MeshyTextTo3dStepOutput, type MeshyTextureStepInput, type MeshyTextureStepOutput, 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 ParticlePodcastsFindMentionsStepInput, type ParticlePodcastsFindMentionsStepOutput, type ParticlePodcastsGetEpisodeStepInput, type ParticlePodcastsGetEpisodeStepOutput, type ParticlePodcastsGetEpisodeTranscriptStepInput, type ParticlePodcastsGetEpisodeTranscriptStepOutput, type ParticlePodcastsSearchCompaniesStepInput, type ParticlePodcastsSearchCompaniesStepOutput, type ParticlePodcastsSearchDialogueStepInput, type ParticlePodcastsSearchDialogueStepOutput, type ParticlePodcastsSearchPodcastsStepInput, type ParticlePodcastsSearchPodcastsStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, type PutOptions, Query, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, RawQuery, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskOptionsWithExample, type RunTaskOptionsWithSchema, type RunTaskResult, type SchemaValidationError, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, 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 SessionContext, 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, Store, type StoredFile, 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 UploadToken, 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 Voice, type VoiceCallResult, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, type YouDotComFinanceResearchStepInput, type YouDotComFinanceResearchStepOutput, type YouDotComGetPageContentStepInput, type YouDotComGetPageContentStepOutput, type YouDotComLiveNewsStepInput, type YouDotComLiveNewsStepOutput, type YouDotComWebResearchStepInput, type YouDotComWebResearchStepOutput, type YouDotComWebSearchStepInput, type YouDotComWebSearchStepOutput, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, files, getRequestContext, mindstudio, monacoSnippets, prerender, reportIssue, resolveUser, runWithContext, session, stepMetadata, stream, voice, waitUntil };