@mindstudio-ai/agent 0.1.137 → 0.1.139

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
@@ -1966,7 +1966,7 @@ interface JewelGradeContext<I> {
1966
1966
  proposed: I | null;
1967
1967
  actual: I;
1968
1968
  }
1969
- type MaybePromise$1<T> = T | Promise<T>;
1969
+ type MaybePromise$2<T> = T | Promise<T>;
1970
1970
  /**
1971
1971
  * Authoring config. Declare `subject` before `propose` — the subject type
1972
1972
  * is inferred from the projection's return and flows into `propose`'s
@@ -1983,7 +1983,7 @@ interface JewelConfig<M extends JewelMethod, S> {
1983
1983
  * for context, model calls via runTask). Throwing never propagates — it
1984
1984
  * becomes an `error` on the pair record.
1985
1985
  */
1986
- propose: (subject: NoInfer<S>) => MaybePromise$1<JewelProposal<JewelMethodInput<M>>>;
1986
+ propose: (subject: NoInfer<S>) => MaybePromise$2<JewelProposal<JewelMethodInput<M>>>;
1987
1987
  /**
1988
1988
  * The custom assertion. Omit for deep-equal on the method input. May be
1989
1989
  * async and call models. Throwing softens to verdict `'skip'`.
@@ -2000,7 +2000,7 @@ interface JewelConfig<M extends JewelMethod, S> {
2000
2000
  * }
2001
2001
  * ```
2002
2002
  */
2003
- grade?: (ctx: JewelGradeContext<JewelMethodInput<M>>) => MaybePromise$1<JewelVerdict>;
2003
+ grade?: (ctx: JewelGradeContext<JewelMethodInput<M>>) => MaybePromise$2<JewelVerdict>;
2004
2004
  }
2005
2005
  /**
2006
2006
  * Executor params — constructed by the platform (or dev tooling), exactly
@@ -2077,8 +2077,8 @@ interface Jewel<M extends JewelMethod, S> {
2077
2077
  readonly kind: 'jewel';
2078
2078
  readonly method: M;
2079
2079
  readonly subject: (input: JewelMethodInput<M>) => S;
2080
- readonly propose: (subject: S) => MaybePromise$1<JewelProposal<JewelMethodInput<M>>>;
2081
- readonly grade: ((ctx: JewelGradeContext<JewelMethodInput<M>>) => MaybePromise$1<JewelVerdict>) | undefined;
2080
+ readonly propose: (subject: S) => MaybePromise$2<JewelProposal<JewelMethodInput<M>>>;
2081
+ readonly grade: ((ctx: JewelGradeContext<JewelMethodInput<M>>) => MaybePromise$2<JewelVerdict>) | undefined;
2082
2082
  }
2083
2083
  /**
2084
2084
  * What the platform did with a proposal, routed by the method's autonomy:
@@ -2297,6 +2297,14 @@ interface SearchFilter {
2297
2297
  filename?: string | string[];
2298
2298
  /** Restrict to specific documents (ids from {@link DataSource.documents}). */
2299
2299
  documentIds?: string[];
2300
+ /**
2301
+ * Passages about any of these entities: the ids their documents assert
2302
+ * ({@link AddOptions.entities}) or their text mentions by a name in the
2303
+ * source's dictionary ({@link DataSource.pushDictionary}). Up to 256; the
2304
+ * usual shape is a neighbourhood your own tables walked out to, then
2305
+ * searched.
2306
+ */
2307
+ entities?: string[];
2300
2308
  /** Page range, inclusive — for paged formats like PDF. */
2301
2309
  pages?: {
2302
2310
  min?: number;
@@ -2338,6 +2346,13 @@ interface SearchHit {
2338
2346
  score: number;
2339
2347
  /** The matched chunk, prefixed with its heading path for context. */
2340
2348
  text: string;
2349
+ /**
2350
+ * The entities this passage carries (its document's asserted ids, and the
2351
+ * ids its text names from the source's dictionary), so you can widen from
2352
+ * what you found: walk your own tables out from them, then search again
2353
+ * with {@link SearchFilter.entities}. Empty when none.
2354
+ */
2355
+ entities: string[];
2341
2356
  citation: Citation;
2342
2357
  /**
2343
2358
  * Where retrieval put this hit BEFORE reranking, and what it scored.
@@ -2502,6 +2517,17 @@ interface AddOptions {
2502
2517
  * re-processing; supplying metadata replaces the whole object.
2503
2518
  */
2504
2519
  metadata?: DocumentMetadata;
2520
+ /**
2521
+ * The things this document is about, as your own ids (a tag number, a row
2522
+ * id): up to 256, each 1–128 printable ASCII characters without whitespace
2523
+ * or commas. Every passage of the document carries them, so
2524
+ * {@link SearchFilter.entities} finds passages about an entity and
2525
+ * {@link DataSource.entities} counts them. Metadata is facts about the
2526
+ * document to filter by; entities are what its passages are about.
2527
+ * Re-adding the same bytes with different entities updates them in place;
2528
+ * supplying them replaces the whole set, and `[]` clears it.
2529
+ */
2530
+ entities?: string[];
2505
2531
  }
2506
2532
  /** What {@link DataSource.add} returns. */
2507
2533
  interface AddResult {
@@ -2531,6 +2557,8 @@ interface DataSourceDocument {
2531
2557
  pageCount: number | null;
2532
2558
  /** Tags set at add time. See {@link AddOptions.metadata}. */
2533
2559
  metadata: DocumentMetadata | null;
2560
+ /** Entities the document asserts, sorted. See {@link AddOptions.entities}. */
2561
+ entities: string[];
2534
2562
  createdAt: string;
2535
2563
  ingestedAt: string | null;
2536
2564
  }
@@ -2558,6 +2586,8 @@ interface DataSourceChunk {
2558
2586
  bottomRightX: number;
2559
2587
  bottomRightY: number;
2560
2588
  };
2589
+ /** The entities this chunk carries, as search hits report them. */
2590
+ entities: string[];
2561
2591
  /** base64 of a Float32Array. Only when `vectors: true` was passed. */
2562
2592
  vector?: string;
2563
2593
  }
@@ -2646,6 +2676,8 @@ interface DataSourceJobPlan {
2646
2676
  errorShare: number;
2647
2677
  deleteShare: number;
2648
2678
  secondsPerObject: number;
2679
+ /** What the mapper's own model and step calls billed per sampled object. */
2680
+ creditsPerObject?: number;
2649
2681
  } | null;
2650
2682
  projected: {
2651
2683
  documents: number;
@@ -2655,6 +2687,8 @@ interface DataSourceJobPlan {
2655
2687
  embedding: number;
2656
2688
  extraction: number;
2657
2689
  contextual: number;
2690
+ /** Mapped sources: the mapper's own calls over every object, the sample's included. */
2691
+ mapping?: number;
2658
2692
  total: number;
2659
2693
  };
2660
2694
  };
@@ -2671,7 +2705,8 @@ interface DataSourceJobPlan {
2671
2705
  }
2672
2706
  /**
2673
2707
  * A bulk ingestion job — a sync, a corpus load started from the CLI, a remap
2674
- * of a mapped source's raw copies, or a replay of an earlier job's quarantine.
2708
+ * of a mapped source's raw copies, a replay of an earlier job's quarantine, or
2709
+ * a reread of the source's documents by its reader.
2675
2710
  */
2676
2711
  interface DataSourceJob {
2677
2712
  id: string;
@@ -2697,17 +2732,41 @@ interface DataSourceJob {
2697
2732
  type: 'replay';
2698
2733
  fromJobId: string;
2699
2734
  kind: 'skip' | 'error' | null;
2735
+ } | {
2736
+ type: 'reread';
2737
+ unread: boolean;
2700
2738
  };
2701
- /** Objects the mapper skipped or failed on (mapped sources; zero otherwise). */
2739
+ /**
2740
+ * Objects the mapper skipped or failed on, and documents the reader failed
2741
+ * on; null where the job was read from a list.
2742
+ */
2702
2743
  quarantine: {
2703
2744
  skipped: number;
2704
2745
  errors: number;
2705
- };
2746
+ readErrors: number;
2747
+ } | null;
2706
2748
  plan: DataSourceJobPlan | null;
2707
2749
  /** The ceiling this job pauses at, in dollars; null when none was set. */
2708
2750
  budgetDollars: number | null;
2709
- /** Model spend so far at catalog rates — an estimate, not the ledger. */
2751
+ /**
2752
+ * Spend so far: embedding, extraction and contextual at catalog rates, plus
2753
+ * what the mapper's own calls billed. An estimate, not the ledger; the
2754
+ * budget pauses the job on it.
2755
+ */
2710
2756
  estimatedDollars: number;
2757
+ /**
2758
+ * The mapper's and reader's own calls' part of `estimatedDollars`, the
2759
+ * plan's sample included.
2760
+ */
2761
+ mapperDollars?: number;
2762
+ /**
2763
+ * A running job's read stage on a source with a reader: documents read of
2764
+ * those its builds handed the reader. A reread counts its reads in `counts`.
2765
+ */
2766
+ reading?: {
2767
+ documentsRead: number;
2768
+ documentsTotal: number;
2769
+ } | null;
2711
2770
  counts: {
2712
2771
  objectsSeen: number;
2713
2772
  documentsDone: number;
@@ -2724,14 +2783,76 @@ interface DataSourceJob {
2724
2783
  error: string | null;
2725
2784
  /**
2726
2785
  * Why a running job stopped: the owner, the budget, repeated batch
2727
- * failures, or (mapped sources) a skip share far above the plan's.
2786
+ * failures, (mapped sources) a skip share far above the plan's, or
2787
+ * (sources with a reader) a reader failing on far more documents than it
2788
+ * did at first.
2728
2789
  */
2729
- pauseReason: 'user' | 'budget' | 'errors' | 'skips' | null;
2790
+ pauseReason: 'user' | 'budget' | 'errors' | 'skips' | 'reader' | null;
2730
2791
  stalled: boolean;
2731
2792
  createdAt: string;
2732
2793
  startedAt: string | null;
2733
2794
  finishedAt: string | null;
2734
2795
  }
2796
+ /**
2797
+ * One entry of a source's dictionary: your own id for a thing and the names
2798
+ * it goes by, as your tables have them. A projection of your data, pushed
2799
+ * whole after each load; the platform never reads your database.
2800
+ */
2801
+ interface DictionaryEntry {
2802
+ /** An entity id: 1–128 printable ASCII, no whitespace or commas. */
2803
+ id: string;
2804
+ /**
2805
+ * 1–16 names, each up to 256 characters: a tag number, a model name, an
2806
+ * alias. Matched however a tag's separators and case are written, as whole
2807
+ * words; a name needs three letters or digits (two in Chinese, Japanese or
2808
+ * Korean).
2809
+ */
2810
+ names: string[];
2811
+ }
2812
+ /** A committed dictionary version: what a push reports, and what a source reads back. */
2813
+ interface DictionaryReport {
2814
+ version: number;
2815
+ /** The matching rule its names were keyed under, carried from push to push. */
2816
+ linkerVersion: number;
2817
+ entries: number;
2818
+ names: number;
2819
+ /** Names more than one id claims: a passage naming one is tagged with every claimant. */
2820
+ ambiguousNames: number;
2821
+ /** The names (as matched: folded, separators dropped) the most ids claim. */
2822
+ mostClaimed: {
2823
+ key: string;
2824
+ ids: number;
2825
+ }[];
2826
+ /**
2827
+ * Names that can't match their own text as written, since a gap in them
2828
+ * doesn't join (`Line 3, Unit 2`): fix these in your source data.
2829
+ */
2830
+ unmatchable: {
2831
+ count: number;
2832
+ examples: string[];
2833
+ };
2834
+ committedAt: string;
2835
+ }
2836
+ /** What `pushDictionary` returns. */
2837
+ interface DictionaryPushResult extends DictionaryReport {
2838
+ /** The dictionary was the one already committed: no new version, no relink. */
2839
+ unchanged: boolean;
2840
+ }
2841
+ /**
2842
+ * A relink in flight: the source's passages re-tagged against a newer
2843
+ * dictionary version, in place, as a background walk. Searches keep working
2844
+ * throughout; passages not yet reached carry the previous version's ids.
2845
+ */
2846
+ interface DictionaryRelink {
2847
+ version: number;
2848
+ lap: number;
2849
+ /** Documents walked this lap, of `total`. */
2850
+ walked: number;
2851
+ total: number;
2852
+ /** Why it's holding, when it is (the source's dedicated capacity is off). */
2853
+ waiting: string | null;
2854
+ error: string | null;
2855
+ }
2735
2856
  /**
2736
2857
  * A typed handle to one data source. Lazy — nothing executes until a method is
2737
2858
  * awaited, so it's safe to `defineDataSource()` at module scope and import the
@@ -2830,6 +2951,67 @@ declare class DataSource {
2830
2951
  chunks: number;
2831
2952
  latencyMs: number;
2832
2953
  }>;
2954
+ /**
2955
+ * Which entities the passages matching a filter are about, most first.
2956
+ *
2957
+ * Filter on one entity (`{ entities: ['P-101A'] }`) and the answer is what
2958
+ * appears beside it: a co-mention graph for free. Filter on a date range and
2959
+ * it is who or what was written about then. No filter covers the corpus.
2960
+ * `chunks` is how many matching passages carry each id, not documents: a
2961
+ * long document's passages each count. Approximate counts, ordered most
2962
+ * first; `limit` defaults to 20, at most 100.
2963
+ *
2964
+ * Shares the search rate limit (300/minute per app), and shows the same
2965
+ * `index_warming` / `index_building` as search while a corpus loads.
2966
+ */
2967
+ entities(options?: {
2968
+ filter?: SearchFilter;
2969
+ limit?: number;
2970
+ }): Promise<{
2971
+ entities: {
2972
+ id: string;
2973
+ chunks: number;
2974
+ }[];
2975
+ latencyMs: number;
2976
+ }>;
2977
+ /**
2978
+ * Push this source's dictionary: every entity id you have and the names it
2979
+ * goes by, replacing the dictionary it had. From then on every passage is
2980
+ * tagged with the ids whose names its text mentions, beside the ones its
2981
+ * document asserts, so `filter.entities` and {@link entities} find a tag
2982
+ * wherever it's written. Passages indexed before are re-tagged in the
2983
+ * background (a relink; see {@link dictionary}), and nothing is
2984
+ * re-embedded.
2985
+ *
2986
+ * Push it whole after each load of the tables it comes from: an unchanged
2987
+ * dictionary commits nothing (`unchanged: true`). Takes an array or any
2988
+ * (async) iterable, and sends it in pages, so a register of a quarter of a
2989
+ * million entries is fine. A repeated id merges its names.
2990
+ */
2991
+ pushDictionary(entries: Iterable<DictionaryEntry> | AsyncIterable<DictionaryEntry>, options?: {
2992
+ linkerVersion?: number;
2993
+ }): Promise<DictionaryPushResult>;
2994
+ /**
2995
+ * The source's current dictionary, or null when none was pushed, and the
2996
+ * relink re-tagging its passages while one runs.
2997
+ */
2998
+ dictionary(): Promise<{
2999
+ dictionary: DictionaryReport | null;
3000
+ relink: DictionaryRelink | null;
3001
+ }>;
3002
+ /**
3003
+ * What the current dictionary finds in a piece of text: each mention, in
3004
+ * order, with the ids it tags. How to check a dictionary before relying on
3005
+ * it. `version` is null when the source has none. Shares the search rate
3006
+ * limit.
3007
+ */
3008
+ link(text: string): Promise<{
3009
+ version: number | null;
3010
+ mentions: {
3011
+ ids: string[];
3012
+ text: string;
3013
+ }[];
3014
+ }>;
2833
3015
  /**
2834
3016
  * Every chunk of one document, exactly as it was indexed.
2835
3017
  *
@@ -3880,9 +4062,10 @@ interface RunTaskOptionsBase {
3880
4062
  /** Thread ID for state persistence. */
3881
4063
  threadId?: string;
3882
4064
  /**
3883
- * SSE event callback. When provided, uses streaming mode instead of polling.
3884
- * Events include text chunks, tool call starts/results, thinking blocks,
3885
- * errors, and the final done event with the structured output.
4065
+ * Event callback: text chunks, thinking, tool call starts and results,
4066
+ * errors, and the final `done` event with the structured output. A turn's
4067
+ * events arrive together once the turn succeeds, so a retried attempt never
4068
+ * reaches it. It doesn't change how the task runs.
3886
4069
  */
3887
4070
  onEvent?: (event: TaskEvent) => void;
3888
4071
  }
@@ -3927,6 +4110,9 @@ interface TaskToolCall {
3927
4110
  interface TaskUsage {
3928
4111
  inputTokens: number;
3929
4112
  outputTokens: number;
4113
+ /** Prompt tokens written to and read from the model's prompt cache. */
4114
+ cacheCreationTokens?: number;
4115
+ cacheReadTokens?: number;
3930
4116
  /** Total cost in nanodollars (1/1,000,000,000th of a US dollar). */
3931
4117
  totalBillingCost: number;
3932
4118
  }
@@ -3945,11 +4131,12 @@ interface RunTaskResult<T = unknown> {
3945
4131
  /** Summary of every tool call made during execution. */
3946
4132
  toolCalls: TaskToolCall[];
3947
4133
  /**
3948
- * Stable id for this task's model transcript. Inside a jewel, attach it to
3949
- * the propose/grade return (`trace: task.traceId`) to preserve the full
3950
- * transcript with the pair — the training row and the audit trail. The
3951
- * platform records transcripts server-side per turn; only the id rides the
3952
- * result.
4134
+ * Stable id for this task's model transcript. The platform records every
4135
+ * task's transcript server-side per turn under it, for 90 days, and only
4136
+ * the id rides the result: `remy-admin tasks get <traceId>` reads it back.
4137
+ * Inside a jewel, also attach it to the propose/grade return
4138
+ * (`trace: task.traceId`) to preserve the full transcript with the pair —
4139
+ * the training row and the audit trail.
3953
4140
  */
3954
4141
  traceId: string;
3955
4142
  }
@@ -11418,8 +11605,9 @@ declare function runWithContext<T>(ctx: RequestContext, fn: () => T | Promise<T>
11418
11605
  * One object in, one of four outcomes out:
11419
11606
  * - `documents([...])` — the object becomes these documents (an array is
11420
11607
  * one object → many). Each is `{ externalId, title, markdown, metadata?,
11421
- * replaces? }`; `externalId` is the identity the platform replaces by.
11422
- * - `passthrough({ metadata? })` — ingest the raw object itself through
11608
+ * entities?, replaces? }`; `externalId` is the identity the platform
11609
+ * replaces by.
11610
+ * - `passthrough({ metadata?, entities? })` — ingest the raw object itself through
11423
11611
  * built-in extraction, as an unmapped source would. What lets a mapped
11424
11612
  * source still accept a PDF.
11425
11613
  * - `skip(reason)` — not a document. Quarantined on the job with the reason;
@@ -11461,6 +11649,8 @@ interface MapObject {
11461
11649
  lastModified: string | null;
11462
11650
  /** Metadata the origin supplied (a manifest line's `metadata`), or null. */
11463
11651
  metadata: DocumentMetadata | null;
11652
+ /** Entities the origin supplied (a manifest line's, an `add()`'s), or null. */
11653
+ entities: string[] | null;
11464
11654
  bytes(): Promise<Uint8Array>;
11465
11655
  text(): Promise<string>;
11466
11656
  json<T = unknown>(): Promise<T>;
@@ -11478,6 +11668,12 @@ interface MappedDocument {
11478
11668
  markdown: string;
11479
11669
  /** Scalars only, up to 16 keys — see `AddOptions.metadata`. */
11480
11670
  metadata?: DocumentMetadata;
11671
+ /**
11672
+ * What the document is about, as your own ids — see `AddOptions.entities`.
11673
+ * A record that names its subject (a work order's asset, a story's people)
11674
+ * says so here, whether or not its text does.
11675
+ */
11676
+ entities?: string[];
11481
11677
  /** External ids this document replaces (a writethru's original id). */
11482
11678
  replaces?: string | string[];
11483
11679
  }
@@ -11487,6 +11683,7 @@ type MapOutcome = {
11487
11683
  } | {
11488
11684
  kind: 'passthrough';
11489
11685
  metadata?: DocumentMetadata;
11686
+ entities?: string[];
11490
11687
  } | {
11491
11688
  kind: 'skip';
11492
11689
  reason: string;
@@ -11494,10 +11691,10 @@ type MapOutcome = {
11494
11691
  kind: 'deletes';
11495
11692
  externalIds: string[];
11496
11693
  };
11497
- type MaybePromise<T> = T | Promise<T>;
11694
+ type MaybePromise$1<T> = T | Promise<T>;
11498
11695
  interface MapperConfig {
11499
11696
  /** One raw object in; an outcome out. Throwing is the object's `error` outcome. */
11500
- map: (object: MapObject) => MaybePromise<MapOutcome>;
11697
+ map: (object: MapObject) => MaybePromise$1<MapOutcome>;
11501
11698
  }
11502
11699
  /** One object as the platform hands it to the executor: metadata plus a read URL. */
11503
11700
  interface MapRunObject {
@@ -11507,6 +11704,8 @@ interface MapRunObject {
11507
11704
  etag: string | null;
11508
11705
  lastModified: string | null;
11509
11706
  metadata: DocumentMetadata | null;
11707
+ /** Absent from a platform that predates entities. */
11708
+ entities?: string[] | null;
11510
11709
  /** Short-lived read URL for the object's bytes. */
11511
11710
  url: string;
11512
11711
  /**
@@ -11555,9 +11754,13 @@ interface Mapper {
11555
11754
  }
11556
11755
  /** The object becomes these documents. One document may be passed bare. */
11557
11756
  declare function documents(list: MappedDocument | MappedDocument[]): MapOutcome;
11558
- /** Ingest the raw object itself through built-in extraction. */
11757
+ /**
11758
+ * Ingest the raw object itself through built-in extraction. `metadata` and
11759
+ * `entities`, when given, replace what the origin supplied.
11760
+ */
11559
11761
  declare function passthrough(options?: {
11560
11762
  metadata?: DocumentMetadata;
11763
+ entities?: string[];
11561
11764
  }): MapOutcome;
11562
11765
  /** Not a document. Quarantined with the reason. */
11563
11766
  declare function skip(reason: string): MapOutcome;
@@ -11571,6 +11774,146 @@ declare function defineMapper(source: {
11571
11774
  readonly name: string;
11572
11775
  }, config: MapperConfig): Mapper;
11573
11776
 
11777
+ /**
11778
+ * Readers — customer code run over every document a data source builds.
11779
+ *
11780
+ * A mapper is app code on the way in (a raw object becomes documents) and
11781
+ * must be pure. A READER is app code on the way out: once a document is
11782
+ * built, its reader reads it and writes what it found into the app's own
11783
+ * tables. Writing is its purpose. It is how an app discovers what its
11784
+ * documents say: which equipment a passage names, what relations it states,
11785
+ * which people it quotes, as the app's own domain defines them.
11786
+ *
11787
+ * ```ts
11788
+ * // datasources/manuals.reader.ts
11789
+ * export default defineReader(Manuals, {
11790
+ * read: async (document) => {
11791
+ * const found = await extractRelations(await document.chunks());
11792
+ * await Evidence.removeAll((r, $) => r.documentId === $.id, { id: document.id });
11793
+ * await Evidence.push(found.map((f) => ({ ...f, documentId: document.id, sourceId: document.sourceId })));
11794
+ * },
11795
+ * removed: async (documentId) => {
11796
+ * await Evidence.removeAll((r, $) => r.documentId === $.id, { id: documentId });
11797
+ * },
11798
+ * cleared: async (sourceId) => {
11799
+ * await Evidence.removeAll((r, $) => r.sourceId === $.id, { id: sourceId });
11800
+ * },
11801
+ * });
11802
+ * ```
11803
+ *
11804
+ * The one rule: **a reader may be called more than once for the same
11805
+ * document, so it replaces that document's rows as a set, and deletes them on
11806
+ * `removed`.** Deliveries are level-triggered: the platform says only that a
11807
+ * document changed and reads its state when it delivers, so a document built
11808
+ * and removed before its delivery is one `removed`, and the app's rows always
11809
+ * end on what the corpus holds.
11810
+ *
11811
+ * - `read(document)` — a document arrived: its first build on the source's
11812
+ * active version. Never for index maintenance (a rebuild, a relink, a
11813
+ * re-vectorize) or an in-place metadata change: the reader is about what the
11814
+ * text says, and the app already knows what it asserted.
11815
+ * - `removed(documentId)` — the document is gone. Only the id: removal clears
11816
+ * what named the document.
11817
+ * - `cleared(sourceId)` — the whole source was deleted, once, so the app can
11818
+ * drop that source's rows in one statement. Optional.
11819
+ * A throw fails that delivery; the platform retries it.
11820
+ *
11821
+ * A reader runs against the app's LIVE release (or the dev session under
11822
+ * `reader test --dev`), never a pinned one: app databases are per release, so
11823
+ * a reader bound to a superseded release would write where nobody reads. It
11824
+ * is whatever live declares, and activates by publishing.
11825
+ *
11826
+ * Declared in `mindstudio.json`, beside or instead of a mapper:
11827
+ * ```json
11828
+ * "dataSources": [{ "slug": "manuals", "reader": { "path": "dist/datasources/manuals.reader.ts" } }]
11829
+ * ```
11830
+ */
11831
+
11832
+ /** A built document, as `read` receives it. */
11833
+ interface ReaderDocument {
11834
+ id: string;
11835
+ /** The data source it belongs to: key your rows by it for `cleared`. */
11836
+ sourceId: string;
11837
+ filename: string | null;
11838
+ contentType: string | null;
11839
+ /** The identity a mapped source replaces by; null on unmapped sources. */
11840
+ externalId: string | null;
11841
+ metadata: DocumentMetadata | null;
11842
+ /** The entities the document asserts, sorted. */
11843
+ entities: string[];
11844
+ pageCount: number | null;
11845
+ chunkCount: number | null;
11846
+ createdAt: string;
11847
+ /**
11848
+ * The document's passages as indexed: text, page, heading path, and each
11849
+ * passage's entities (its document's asserted ones and those its text
11850
+ * names from the source's dictionary). Read once, then held.
11851
+ */
11852
+ chunks(): Promise<DataSourceChunk[]>;
11853
+ }
11854
+ type MaybePromise<T> = T | Promise<T>;
11855
+ interface ReaderConfig {
11856
+ read: (document: ReaderDocument) => MaybePromise<void>;
11857
+ removed: (documentId: string) => MaybePromise<void>;
11858
+ cleared?: (sourceId: string) => MaybePromise<void>;
11859
+ }
11860
+ /** One delivery as the platform hands it to the executor. */
11861
+ type ReadDelivery = {
11862
+ kind: 'read';
11863
+ document: Omit<ReaderDocument, 'chunks'>;
11864
+ /** The passages, when the platform carried them inline. */
11865
+ chunks?: DataSourceChunk[];
11866
+ } | {
11867
+ kind: 'removed';
11868
+ documentId: string;
11869
+ } | {
11870
+ kind: 'cleared';
11871
+ sourceId: string;
11872
+ };
11873
+ interface ReadRunParams {
11874
+ v: 1;
11875
+ deliveries: ReadDelivery[];
11876
+ /** Per-delivery budget, in milliseconds. */
11877
+ timeoutMs?: number;
11878
+ /** Deliveries run at once inside the frame. */
11879
+ concurrency?: number;
11880
+ }
11881
+ interface ReadRunResult {
11882
+ /** The document id, or the source id for `cleared`. */
11883
+ ref: string;
11884
+ kind: ReadDelivery['kind'];
11885
+ ok: boolean;
11886
+ error?: {
11887
+ message: string;
11888
+ stack?: string;
11889
+ };
11890
+ durationMs: number;
11891
+ }
11892
+ /** What one executor call returns: one result per delivery, in order. */
11893
+ interface ReadRunRecord {
11894
+ v: 1;
11895
+ source: string;
11896
+ outcomes: ReadRunResult[];
11897
+ startedAt: number;
11898
+ durationMs: number;
11899
+ }
11900
+ /** The callable executor with its config attached. */
11901
+ interface Reader {
11902
+ (params: ReadRunParams): Promise<ReadRunRecord>;
11903
+ readonly kind: 'reader';
11904
+ /** The data source's slug. */
11905
+ readonly source: string;
11906
+ readonly config: ReaderConfig;
11907
+ }
11908
+ /**
11909
+ * Define a reader — the code that reads every document a data source builds
11910
+ * into the app's own tables. See the module doc for the contract.
11911
+ */
11912
+ declare function defineReader(source: {
11913
+ readonly name: string;
11914
+ chunks(documentId: string): Promise<DataSourceChunk[]>;
11915
+ }, config: ReaderConfig): Reader;
11916
+
11574
11917
  type MonacoSnippetFieldType = 'string' | 'number' | 'boolean' | 'array' | 'object' | string[];
11575
11918
  type MonacoSnippetField = [name: string, type: MonacoSnippetFieldType];
11576
11919
  interface MonacoSnippet {
@@ -11855,4 +12198,4 @@ declare const prerender: {
11855
12198
  }>;
11856
12199
  };
11857
12200
 
11858
- 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 AiSourceVendor, type AirtableCreateUpdateRecordStepInput, type AirtableCreateUpdateRecordStepOutput, type AirtableDeleteRecordStepInput, type AirtableDeleteRecordStepOutput, type AirtableGetRecordStepInput, type AirtableGetRecordStepOutput, type AirtableGetTableRecordsStepInput, type AirtableGetTableRecordsStepOutput, type Analytics, type AnalyticsDateRange, type AnalyticsDimension, type AnalyticsFilter, type AnalyticsFilterOp, type AnalyticsGranularity, type AnalyticsMetric, type AnalyticsQueryResponse, type AnalyticsQueryResultRow, type AnalyticsQuerySpec, type AnalyticsReadOptions, 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 CrawlerBucket, type CrawlerHit, type CrawlerOverview, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGmailDraftStepInput, type CreateGmailDraftStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type Db, type DecomposeImageStepInput, type DecomposeImageStepOutput, 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 DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type EventGrantOptions, type EventGrantResult, type Events, 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 GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateSoundStepInput, type GenerateSoundStepOutput, 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 LiveNow, type LogicStepInput, type LogicStepOutput, MAX_EVENT_PAYLOAD_CHARS, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MapObject, type MapOutcome, type MapPoint, type MapRunObject, type MapRunOutcome, type MapRunParams, type MapRunRecord, type MapRunResult, type MappedDocument, type Mapper, type MapperConfig, 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 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, type QuickbooksApiRequestStepInput, type QuickbooksApiRequestStepOutput, 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 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 TextToSpeechStepInput, type TextToSpeechStepOutput, type TopSource, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type TypesafeEvaluateStepInput, type TypesafeEvaluateStepOutput, 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, analytics, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, defineMapper, deletes, documents, email, events, files, getRequestContext, mindstudio, monacoSnippets, passthrough, prerender, reportIssue, resolveUser, runWithContext, session, skip, stepMetadata, stream, voice, waitUntil };
12201
+ 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 AiSourceVendor, type AirtableCreateUpdateRecordStepInput, type AirtableCreateUpdateRecordStepOutput, type AirtableDeleteRecordStepInput, type AirtableDeleteRecordStepOutput, type AirtableGetRecordStepInput, type AirtableGetRecordStepOutput, type AirtableGetTableRecordsStepInput, type AirtableGetTableRecordsStepOutput, type Analytics, type AnalyticsDateRange, type AnalyticsDimension, type AnalyticsFilter, type AnalyticsFilterOp, type AnalyticsGranularity, type AnalyticsMetric, type AnalyticsQueryResponse, type AnalyticsQueryResultRow, type AnalyticsQuerySpec, type AnalyticsReadOptions, 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 CrawlerBucket, type CrawlerHit, type CrawlerOverview, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGmailDraftStepInput, type CreateGmailDraftStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type Db, type DecomposeImageStepInput, type DecomposeImageStepOutput, 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 DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type EventGrantOptions, type EventGrantResult, type Events, 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 GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateSoundStepInput, type GenerateSoundStepOutput, 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 LiveNow, type LogicStepInput, type LogicStepOutput, MAX_EVENT_PAYLOAD_CHARS, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MapObject, type MapOutcome, type MapPoint, type MapRunObject, type MapRunOutcome, type MapRunParams, type MapRunRecord, type MapRunResult, type MappedDocument, type Mapper, type MapperConfig, 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 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, type QuickbooksApiRequestStepInput, type QuickbooksApiRequestStepOutput, RawQuery, type ReadDelivery, type ReadRunParams, type ReadRunRecord, type ReadRunResult, type Reader, type ReaderConfig, type ReaderDocument, 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 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 TextToSpeechStepInput, type TextToSpeechStepOutput, type TopSource, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type TypesafeEvaluateStepInput, type TypesafeEvaluateStepOutput, 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, analytics, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, defineMapper, defineReader, deletes, documents, email, events, files, getRequestContext, mindstudio, monacoSnippets, passthrough, prerender, reportIssue, resolveUser, runWithContext, session, skip, stepMetadata, stream, voice, waitUntil };