@mindstudio-ai/agent 0.1.168 → 0.1.170

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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ What changed in `@mindstudio-ai/agent`, newest first, each version under its own
4
4
 
5
5
  Versions before 0.1.163 aren't recorded here.
6
6
 
7
+ ## 0.1.170
8
+
9
+ ### Changed behavior
10
+
11
+ - The auth table's `email` and `phone` columns are writable from code: `push()`, `update()` and `upsert()` no longer throw `managed_column_write` for them, so a seed, an import or a test fixture can create users with addresses, and whoever proves an address signs into its row (a "Sign in with Remy" user's row excepted, which only they sign into). From 0.1.149 to 0.1.169 every such write threw; before that, a write made before the table's first round trip in a process slipped past the check. The `apiKey` column still throws. A signed-in user changing their own address still goes through `auth.requestEmailChange()` / `auth.requestPhoneChange()` in `@mindstudio-ai/interface`. Code that caught `managed_column_write` for an email or phone write no longer gets it.
12
+
13
+ ## 0.1.169
14
+
15
+ ### Changed behavior
16
+
17
+ - Built with tsup 9. The SDK behaves as before. App code isn't affected.
18
+
7
19
  ## 0.1.168
8
20
 
9
21
  ### New
package/dist/cli.js CHANGED
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __esm = (fn, res) => function __init() {
5
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
+ var __esm = (fn, res, err) => function __init() {
5
+ if (err) throw err[0];
6
+ try {
7
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
+ } catch (e) {
9
+ throw err = [e], e;
10
+ }
6
11
  };
7
12
  var __export = (target, all) => {
8
13
  for (var name in all)
@@ -3882,7 +3887,7 @@ var init_table = __esm({
3882
3887
  (item) => this._config.defaults ? { ...this._config.defaults, ...item } : item
3883
3888
  );
3884
3889
  const build = () => items.map((item) => {
3885
- this._checkManagedColumns(item);
3890
+ this._checkApiKeyWrite(item);
3886
3891
  return buildInsert(
3887
3892
  this._config.tableName,
3888
3893
  item,
@@ -3914,7 +3919,7 @@ var init_table = __esm({
3914
3919
  */
3915
3920
  update(id, data) {
3916
3921
  const build = () => {
3917
- this._checkManagedColumns(data);
3922
+ this._checkApiKeyWrite(data);
3918
3923
  return [
3919
3924
  buildUpdate(this._config.tableName, id, data, this._config.columns)
3920
3925
  ];
@@ -4021,7 +4026,7 @@ var init_table = __esm({
4021
4026
  }
4022
4027
  }
4023
4028
  const build = () => {
4024
- this._checkManagedColumns(withDefaults);
4029
+ this._checkApiKeyWrite(withDefaults);
4025
4030
  return [
4026
4031
  buildUpsert(
4027
4032
  this._config.tableName,
@@ -4050,22 +4055,19 @@ var init_table = __esm({
4050
4055
  // -------------------------------------------------------------------------
4051
4056
  // Internal helpers
4052
4057
  // -------------------------------------------------------------------------
4053
- /** @internal Throw if data includes a platform-managed read-only column. */
4054
- _checkManagedColumns(data) {
4055
- const mc = this._config.managedColumns;
4056
- if (!mc) {
4057
- return;
4058
- }
4059
- const keys = Object.keys(data);
4060
- for (const key of keys) {
4061
- if (mc.email && key === mc.email || mc.phone && key === mc.phone || mc.apiKey && key === mc.apiKey) {
4062
- const friendly = key === mc.email ? "email" : key === mc.phone ? "phone" : "API key";
4063
- throw new MindStudioError(
4064
- `Cannot write to "${key}" \u2014 this column is managed by auth. Use the auth API to change a user's ${friendly}.`,
4065
- "managed_column_write",
4066
- 400
4067
- );
4068
- }
4058
+ /**
4059
+ * @internal Throw if data writes the auth table's API key column, which holds
4060
+ * the masked key the platform issued. The other mapped columns are the app's
4061
+ * to write.
4062
+ */
4063
+ _checkApiKeyWrite(data) {
4064
+ const column = this._config.managedColumns?.apiKey;
4065
+ if (column && Object.keys(data).includes(column)) {
4066
+ throw new MindStudioError(
4067
+ `Cannot write to "${column}" \u2014 this column is managed by auth. Use the auth API to issue or revoke a user's API key.`,
4068
+ "managed_column_write",
4069
+ 400
4070
+ );
4069
4071
  }
4070
4072
  }
4071
4073
  /**
@@ -9467,7 +9469,7 @@ async function startMcpServer(options) {
9467
9469
  capabilities: { tools: {} },
9468
9470
  serverInfo: {
9469
9471
  name: "mindstudio-agent",
9470
- version: "0.1.168"
9472
+ version: "0.1.170"
9471
9473
  },
9472
9474
  instructions: 'Welcome to MindStudio \u2014 a platform with 200+ AI models, 850+ third-party integrations, and pre-built agents.\n\nGetting started:\n1. Call `ask` with any question about the SDK \u2014 it knows every action, model, and connector and returns working code with real model IDs and config options. Examples: ask("generate an image with FLUX"), ask("what models support vision?"), ask("how do I send a Slack message?").\n2. Call `changeName` to set your display name \u2014 use your name or whatever your user calls you. This is how you\'ll appear in MindStudio request logs.\n3. If you have a profile picture, pass its public image URL to `changeProfilePicture`.\n4. For manual browsing, call `listActions` to discover all available actions.\n\nThen use the tools to generate text, images, video, audio, search the web, work with data sources, run agents, and more.\n\nImportant:\n- AI-powered actions (text generation, image generation, video, audio, etc.) cost money. Before running these, call `estimateActionCost` and confirm with the user before proceeding \u2014 unless they\'ve explicitly told you to go ahead.\n- Not all agents from `listAgents` are configured for API use. Do not try to run an agent just because it appears in the list \u2014 it will likely fail. Only run agents the user specifically asks you to run.'
9473
9475
  });
@@ -10507,7 +10509,7 @@ function isNewerVersion(current, latest) {
10507
10509
  return false;
10508
10510
  }
10509
10511
  async function checkForUpdate() {
10510
- const currentVersion = "0.1.168";
10512
+ const currentVersion = "0.1.170";
10511
10513
  if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
10512
10514
  return null;
10513
10515
  }
@@ -10542,7 +10544,7 @@ async function checkForUpdate() {
10542
10544
  }
10543
10545
  }
10544
10546
  function printUpdateNotice(latestVersion) {
10545
- const currentVersion = "0.1.168";
10547
+ const currentVersion = "0.1.170";
10546
10548
  process.stderr.write(
10547
10549
  `
10548
10550
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -10555,7 +10557,7 @@ function isStandaloneBinary() {
10555
10557
  return !argv1.includes("node_modules");
10556
10558
  }
10557
10559
  async function cmdUpdate() {
10558
- const currentVersion = "0.1.168";
10560
+ const currentVersion = "0.1.170";
10559
10561
  process.stderr.write(
10560
10562
  ` ${ansi2.gray("Current version:")} ${currentVersion}
10561
10563
  `
@@ -10696,7 +10698,7 @@ async function cmdLogin(options) {
10696
10698
  process.stderr.write("\n");
10697
10699
  printLogo();
10698
10700
  process.stderr.write("\n");
10699
- const ver = "0.1.168";
10701
+ const ver = "0.1.170";
10700
10702
  process.stderr.write(
10701
10703
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
10702
10704
  `
@@ -11024,7 +11026,7 @@ async function main() {
11024
11026
  const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
11025
11027
  try {
11026
11028
  if (command === "version" || command === "-v") {
11027
- process.stdout.write("0.1.168\n");
11029
+ process.stdout.write("0.1.170\n");
11028
11030
  return;
11029
11031
  }
11030
11032
  if (command === "login") {
package/dist/index.d.ts CHANGED
@@ -1117,7 +1117,8 @@ interface TableConfig {
1117
1117
  defaults?: Record<string, unknown>;
1118
1118
  /**
1119
1119
  * Platform-managed auth columns. Set when this table is the app's auth
1120
- * table. Writes to email/phone/apiKey columns throw; roles writes are allowed.
1120
+ * table. Writes to the apiKey column throw; email, phone and roles are the
1121
+ * app's to write, and a roles write syncs to the platform.
1121
1122
  */
1122
1123
  managedColumns?: {
1123
1124
  email?: string;
@@ -1692,8 +1693,12 @@ declare class Table<T> {
1692
1693
  * @param data - Row data to insert (or update on conflict). Defaults apply.
1693
1694
  */
1694
1695
  upsert(conflictKey: (keyof Omit<T, SystemFields> & string) | (keyof Omit<T, SystemFields> & string)[], data: PushInput<T>): Mutation<T>;
1695
- /** @internal Throw if data includes a platform-managed read-only column. */
1696
- private _checkManagedColumns;
1696
+ /**
1697
+ * @internal Throw if data writes the auth table's API key column, which holds
1698
+ * the masked key the platform issued. The other mapped columns are the app's
1699
+ * to write.
1700
+ */
1701
+ private _checkApiKeyWrite;
1697
1702
  /**
1698
1703
  * @internal Fire role sync for rows that wrote to the roles column.
1699
1704
  * Called inside processResult (runs after SQL execution in both
@@ -12984,4 +12989,5 @@ declare const prerender: {
12984
12989
  }>;
12985
12990
  };
12986
12991
 
12987
- export { type Accessor, type ActiveCampaignAddNoteStepInput, type ActiveCampaignAddNoteStepOutput, type ActiveCampaignCreateContactStepInput, type ActiveCampaignCreateContactStepOutput, type AddSubtitlesToVideoStepInput, type AddSubtitlesToVideoStepOutput, type AddThumbnailToVideoStepInput, type AddThumbnailToVideoStepOutput, 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 EvaluateDecisionStepInput, type EvaluateDecisionStepOutput, 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 GetStreamOptions, HttpResponse, type HttpResponseFile, type HttpResponseHeaders, type HttpResponseInit, type HttpResponseOptions, 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 ImportFromUrlStepInput, type ImportFromUrlStepOutput, 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, type PutStream, Query, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type QuickbooksApiRequestStepInput, type QuickbooksApiRequestStepOutput, RESPONSE_BODY_MAX_BYTES, RawQuery, type ReadDelivery, type ReadRunParams, type ReadRunRecord, type ReadRunResult, type Reader, type ReaderConfig, type ReaderDocument, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type RenderVideoFromHtmlCompositionStepInput, type RenderVideoFromHtmlCompositionStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFfmpegStepInput, type RunFfmpegStepOutput, 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, respond, runWithContext, session, skip, stepMetadata, stream, voice, waitUntil };
12992
+ export { AuthContext, HttpResponse, MAX_EVENT_PAYLOAD_CHARS, MindStudioAgent, MindStudioError, Query, RESPONSE_BODY_MAX_BYTES, RawQuery, Roles, Store, Table, analytics, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, defineMapper, defineReader, deletes, documents, email, events, files, getRequestContext, mindstudio, monacoSnippets, passthrough, prerender, reportIssue, resolveUser, respond, runWithContext, session, skip, stepMetadata, stream, voice, waitUntil };
12993
+ export type { Accessor, ActiveCampaignAddNoteStepInput, ActiveCampaignAddNoteStepOutput, ActiveCampaignCreateContactStepInput, ActiveCampaignCreateContactStepOutput, AddSubtitlesToVideoStepInput, AddSubtitlesToVideoStepOutput, AddThumbnailToVideoStepInput, AddThumbnailToVideoStepOutput, AgentInfo, AgentOptions, AggregateRow, AggregateSelect, AggregateTerm, AiSourceVendor, AirtableCreateUpdateRecordStepInput, AirtableCreateUpdateRecordStepOutput, AirtableDeleteRecordStepInput, AirtableDeleteRecordStepOutput, AirtableGetRecordStepInput, AirtableGetRecordStepOutput, AirtableGetTableRecordsStepInput, AirtableGetTableRecordsStepOutput, Analytics, AnalyticsDateRange, AnalyticsDimension, AnalyticsFilter, AnalyticsFilterOp, AnalyticsGranularity, AnalyticsMetric, AnalyticsQueryResponse, AnalyticsQueryResultRow, AnalyticsQuerySpec, AnalyticsReadOptions, AnalyzeImageStepInput, AnalyzeImageStepOutput, AnalyzeVideoStepInput, AnalyzeVideoStepOutput, AppAuthContext, AppContextResult, AppDatabase, AppDatabaseColumnSchema, AppDatabaseTable, AppRoleAssignment, AuthTableConfig, BatchStepInput, BatchStepResult, Batchable, CaptureThumbnailStepInput, CaptureThumbnailStepOutput, CheckAppRoleStepInput, CheckAppRoleStepOutput, CodaCreateUpdatePageStepInput, CodaCreateUpdatePageStepOutput, CodaCreateUpdateRowStepInput, CodaCreateUpdateRowStepOutput, CodaFindRowStepInput, CodaFindRowStepOutput, CodaGetPageStepInput, CodaGetPageStepOutput, CodaGetTableRowsStepInput, CodaGetTableRowsStepOutput, Connection, ConnectorActionDetail, ConnectorService, ConvertPdfToImagesStepInput, ConvertPdfToImagesStepOutput, CrawlerBucket, CrawlerHit, CrawlerOverview, CreateDataSourceStepInput, CreateDataSourceStepOutput, CreateGmailDraftStepInput, CreateGmailDraftStepOutput, CreateGoogleCalendarEventStepInput, CreateGoogleCalendarEventStepOutput, CreateGoogleDocStepInput, CreateGoogleDocStepOutput, CreateGoogleSheetStepInput, CreateGoogleSheetStepOutput, Db, DecomposeImageStepInput, DecomposeImageStepOutput, DefineStoreOptions, DefineTableOptions, DeleteDataSourceDocumentStepInput, DeleteDataSourceDocumentStepOutput, DeleteDataSourceStepInput, DeleteDataSourceStepOutput, DeleteGmailEmailStepInput, DeleteGmailEmailStepOutput, DeleteGoogleCalendarEventStepInput, DeleteGoogleCalendarEventStepOutput, DeleteGoogleSheetRowsStepInput, DeleteGoogleSheetRowsStepOutput, DetectChangesStepInput, DetectChangesStepOutput, DetectPIIStepInput, DetectPIIStepOutput, DownloadVideoStepInput, DownloadVideoStepOutput, EnhanceImageGenerationPromptStepInput, EnhanceImageGenerationPromptStepOutput, EnhanceVideoGenerationPromptStepInput, EnhanceVideoGenerationPromptStepOutput, EnrichPersonStepInput, EnrichPersonStepOutput, EvaluateDecisionStepInput, EvaluateDecisionStepOutput, EventGrantOptions, EventGrantResult, Events, ExecuteStepBatchOptions, ExecuteStepBatchResult, ExtractAudioFromVideoStepInput, ExtractAudioFromVideoStepOutput, ExtractTextStepInput, ExtractTextStepOutput, FetchDataSourceDocumentStepInput, FetchDataSourceDocumentStepOutput, FetchGoogleDocStepInput, FetchGoogleDocStepOutput, FetchGoogleSheetStepInput, FetchGoogleSheetStepOutput, FetchSlackChannelHistoryStepInput, FetchSlackChannelHistoryStepOutput, FetchYoutubeCaptionsStepInput, FetchYoutubeCaptionsStepOutput, FetchYoutubeChannelStepInput, FetchYoutubeChannelStepOutput, FetchYoutubeCommentsStepInput, FetchYoutubeCommentsStepOutput, FetchYoutubeVideoStepInput, FetchYoutubeVideoStepOutput, FileAccess, Files, FromSchema, Generate3dModelStepInput, Generate3dModelStepOutput, GenerateAssetStepInput, GenerateAssetStepOutput, GenerateImageStepInput, GenerateImageStepOutput, GenerateLipsyncStepInput, GenerateLipsyncStepOutput, GenerateMusicStepInput, GenerateMusicStepOutput, GeneratePdfStepInput, GeneratePdfStepOutput, GenerateSoundStepInput, GenerateSoundStepOutput, GenerateStaticVideoFromImageStepInput, GenerateStaticVideoFromImageStepOutput, GenerateTextStepInput, GenerateTextStepOutput, GenerateVideoStepInput, GenerateVideoStepOutput, GetGmailAttachmentsStepInput, GetGmailAttachmentsStepOutput, GetGmailDraftStepInput, GetGmailDraftStepOutput, GetGmailEmailStepInput, GetGmailEmailStepOutput, GetGmailUnreadCountStepInput, GetGmailUnreadCountStepOutput, GetGoogleCalendarEventStepInput, GetGoogleCalendarEventStepOutput, GetGoogleDriveFileStepInput, GetGoogleDriveFileStepOutput, GetGoogleSheetInfoStepInput, GetGoogleSheetInfoStepOutput, GetMediaMetadataStepInput, GetMediaMetadataStepOutput, GetStreamOptions, HttpResponseFile, HttpResponseHeaders, HttpResponseInit, HttpResponseOptions, HubspotCreateCompanyStepInput, HubspotCreateCompanyStepOutput, HubspotCreateContactStepInput, HubspotCreateContactStepOutput, HubspotGetCompanyStepInput, HubspotGetCompanyStepOutput, HubspotGetContactStepInput, HubspotGetContactStepOutput, HunterApiCompanyEnrichmentStepInput, HunterApiCompanyEnrichmentStepOutput, HunterApiDomainSearchStepInput, HunterApiDomainSearchStepOutput, HunterApiEmailFinderStepInput, HunterApiEmailFinderStepOutput, HunterApiEmailVerificationStepInput, HunterApiEmailVerificationStepOutput, HunterApiPersonEnrichmentStepInput, HunterApiPersonEnrichmentStepOutput, ImageFaceSwapStepInput, ImageFaceSwapStepOutput, ImageRemoveWatermarkStepInput, ImageRemoveWatermarkStepOutput, ImportFromUrlStepInput, ImportFromUrlStepOutput, InsertVideoClipsStepInput, InsertVideoClipsStepOutput, Jewel, JewelConfig, JewelGradeContext, JewelMethod, JewelMethodInput, JewelPairRecord, JewelProposal, JewelProposeOutcome, JewelProposeResult, JewelQueueItem, JewelQueueResolution, JewelQueueResolveResult, JewelRunParams, JewelVerdict, JewelsApi, JsonObjectSchema, JsonSchema, JsonSchemaTypeName, ListAgentsResult, ListDataSourcesStepInput, ListDataSourcesStepOutput, ListGmailDraftsStepInput, ListGmailDraftsStepOutput, ListGmailLabelsStepInput, ListGmailLabelsStepOutput, ListGoogleCalendarEventsStepInput, ListGoogleCalendarEventsStepOutput, ListGoogleDriveFilesStepInput, ListGoogleDriveFilesStepOutput, ListOptions, ListRecentGmailEmailsStepInput, ListRecentGmailEmailsStepOutput, LiveNow, LogicStepInput, LogicStepOutput, MakeDotComRunScenarioStepInput, MakeDotComRunScenarioStepOutput, MapObject, MapOutcome, MapPoint, MapRunObject, MapRunOutcome, MapRunParams, MapRunRecord, MapRunResult, MappedDocument, Mapper, MapperConfig, MergeAudioStepInput, MergeAudioStepOutput, MergeVideosStepInput, MergeVideosStepOutput, MeshyAnimateStepInput, MeshyAnimateStepOutput, MeshyImageTo3dStepInput, MeshyImageTo3dStepOutput, MeshyRemeshStepInput, MeshyRemeshStepOutput, MeshyRigStepInput, MeshyRigStepOutput, MeshyTextTo3dStepInput, MeshyTextTo3dStepOutput, MeshyTextureStepInput, MeshyTextureStepOutput, MindStudioModel, MindStudioModelSummary, MixAudioIntoVideoStepInput, MixAudioIntoVideoStepOutput, ModelType, MonacoSnippet, MonacoSnippetField, MonacoSnippetFieldType, MuteVideoStepInput, MuteVideoStepOutput, N8nRunNodeStepInput, N8nRunNodeStepOutput, NotionCreatePageStepInput, NotionCreatePageStepOutput, NotionUpdatePageStepInput, NotionUpdatePageStepOutput, PackagedWorkflow, PackagedWorkflowInput, PackagedWorkflowSignature, PeopleSearchStepInput, PeopleSearchStepOutput, PostToLinkedInStepInput, PostToLinkedInStepOutput, PostToSlackChannelStepInput, PostToSlackChannelStepOutput, PostToXStepInput, PostToXStepOutput, PostToZapierStepInput, PostToZapierStepOutput, Predicate, PushInput, PutOptions, PutStream, QueryDataSourceStepInput, QueryDataSourceStepOutput, QueryExternalDatabaseStepInput, QueryExternalDatabaseStepOutput, QuickbooksApiRequestStepInput, QuickbooksApiRequestStepOutput, ReadDelivery, ReadRunParams, ReadRunRecord, ReadRunResult, Reader, ReaderConfig, ReaderDocument, RedactPIIStepInput, RedactPIIStepOutput, RemoveBackgroundFromImageStepInput, RemoveBackgroundFromImageStepOutput, RenderVideoFromHtmlCompositionStepInput, RenderVideoFromHtmlCompositionStepOutput, ReplyToGmailEmailStepInput, ReplyToGmailEmailStepOutput, ReportIssueInput, ReportedIssue, RequestContext, ResizeVideoStepInput, ResizeVideoStepOutput, ResolvedUser, RunAgentOptions, RunAgentResult, RunFfmpegStepInput, RunFfmpegStepOutput, RunFromConnectorRegistryStepInput, RunFromConnectorRegistryStepOutput, RunTaskOptions, RunTaskOptionsWithExample, RunTaskOptionsWithSchema, RunTaskResult, SchemaValidationError, ScrapeLinkedInCompanyStepInput, ScrapeLinkedInCompanyStepOutput, ScrapeLinkedInProfileStepInput, ScrapeLinkedInProfileStepOutput, ScrapeUrlStepInput, ScrapeUrlStepOutput, ScrapeXPostStepInput, ScrapeXPostStepOutput, ScrapeXProfileStepInput, ScrapeXProfileStepOutput, ScreenshotUrlStepInput, ScreenshotUrlStepOutput, SearchGmailEmailsStepInput, SearchGmailEmailsStepOutput, SearchGoogleCalendarEventsStepInput, SearchGoogleCalendarEventsStepOutput, SearchGoogleDriveStepInput, SearchGoogleDriveStepOutput, SearchGoogleImagesStepInput, SearchGoogleImagesStepOutput, SearchGoogleNewsStepInput, SearchGoogleNewsStepOutput, SearchGoogleStepInput, SearchGoogleStepOutput, SearchGoogleTrendsStepInput, SearchGoogleTrendsStepOutput, SearchPerplexityStepInput, SearchPerplexityStepOutput, SearchXPostsStepInput, SearchXPostsStepOutput, SearchYoutubeStepInput, SearchYoutubeStepOutput, SearchYoutubeTrendsStepInput, SearchYoutubeTrendsStepOutput, SendEmailStepInput, SendEmailStepOutput, SendGmailDraftStepInput, SendGmailDraftStepOutput, SendGmailMessageStepInput, SendGmailMessageStepOutput, SendSMSStepInput, SendSMSStepOutput, SendSlackDirectMessageStepInput, SendSlackDirectMessageStepOutput, SessionContext, SetGmailReadStatusStepInput, SetGmailReadStatusStepOutput, SetRunTitleStepInput, SetRunTitleStepOutput, SetVariableStepInput, SetVariableStepOutput, StepCostEstimateEntry, StepExecutionMeta, StepExecutionOptions, StepExecutionResult, StepInputMap, StepLogEvent, StepMetadata, StepMethods, StepName, StepOutputMap, StoredFile, SystemFields, TaskEvent, TaskToolCall, TaskToolConfig, TaskUsage, TextToSpeechStepInput, TextToSpeechStepOutput, TopSource, TranscribeAudioStepInput, TranscribeAudioStepOutput, TrimMediaStepInput, TrimMediaStepOutput, TypesafeEvaluateStepInput, TypesafeEvaluateStepOutput, UpdateGmailLabelsStepInput, UpdateGmailLabelsStepOutput, UpdateGoogleCalendarEventStepInput, UpdateGoogleCalendarEventStepOutput, UpdateGoogleDocStepInput, UpdateGoogleDocStepOutput, UpdateGoogleSheetStepInput, UpdateGoogleSheetStepOutput, UpdateInput, UploadDataSourceDocumentStepInput, UploadDataSourceDocumentStepOutput, UploadFileResult, UploadToken, UpscaleImageStepInput, UpscaleImageStepOutput, UpscaleVideoStepInput, UpscaleVideoStepOutput, User, UserInfoResult, UserMessageStepInput, UserMessageStepOutput, VideoFaceSwapStepInput, VideoFaceSwapStepOutput, VideoRemoveBackgroundStepInput, VideoRemoveBackgroundStepOutput, VideoRemoveWatermarkStepInput, VideoRemoveWatermarkStepOutput, Voice, VoiceCallResult, WatermarkImageStepInput, WatermarkImageStepOutput, WatermarkVideoStepInput, WatermarkVideoStepOutput, YouDotComFinanceResearchStepInput, YouDotComFinanceResearchStepOutput, YouDotComGetPageContentStepInput, YouDotComGetPageContentStepOutput, YouDotComLiveNewsStepInput, YouDotComLiveNewsStepOutput, YouDotComWebResearchStepInput, YouDotComWebResearchStepOutput, YouDotComWebSearchStepInput, YouDotComWebSearchStepOutput };
package/dist/index.js CHANGED
@@ -2546,7 +2546,7 @@ var Table = class {
2546
2546
  (item) => this._config.defaults ? { ...this._config.defaults, ...item } : item
2547
2547
  );
2548
2548
  const build = () => items.map((item) => {
2549
- this._checkManagedColumns(item);
2549
+ this._checkApiKeyWrite(item);
2550
2550
  return buildInsert(
2551
2551
  this._config.tableName,
2552
2552
  item,
@@ -2578,7 +2578,7 @@ var Table = class {
2578
2578
  */
2579
2579
  update(id, data) {
2580
2580
  const build = () => {
2581
- this._checkManagedColumns(data);
2581
+ this._checkApiKeyWrite(data);
2582
2582
  return [
2583
2583
  buildUpdate(this._config.tableName, id, data, this._config.columns)
2584
2584
  ];
@@ -2685,7 +2685,7 @@ var Table = class {
2685
2685
  }
2686
2686
  }
2687
2687
  const build = () => {
2688
- this._checkManagedColumns(withDefaults);
2688
+ this._checkApiKeyWrite(withDefaults);
2689
2689
  return [
2690
2690
  buildUpsert(
2691
2691
  this._config.tableName,
@@ -2714,22 +2714,19 @@ var Table = class {
2714
2714
  // -------------------------------------------------------------------------
2715
2715
  // Internal helpers
2716
2716
  // -------------------------------------------------------------------------
2717
- /** @internal Throw if data includes a platform-managed read-only column. */
2718
- _checkManagedColumns(data) {
2719
- const mc = this._config.managedColumns;
2720
- if (!mc) {
2721
- return;
2722
- }
2723
- const keys = Object.keys(data);
2724
- for (const key of keys) {
2725
- if (mc.email && key === mc.email || mc.phone && key === mc.phone || mc.apiKey && key === mc.apiKey) {
2726
- const friendly = key === mc.email ? "email" : key === mc.phone ? "phone" : "API key";
2727
- throw new MindStudioError(
2728
- `Cannot write to "${key}" \u2014 this column is managed by auth. Use the auth API to change a user's ${friendly}.`,
2729
- "managed_column_write",
2730
- 400
2731
- );
2732
- }
2717
+ /**
2718
+ * @internal Throw if data writes the auth table's API key column, which holds
2719
+ * the masked key the platform issued. The other mapped columns are the app's
2720
+ * to write.
2721
+ */
2722
+ _checkApiKeyWrite(data) {
2723
+ const column = this._config.managedColumns?.apiKey;
2724
+ if (column && Object.keys(data).includes(column)) {
2725
+ throw new MindStudioError(
2726
+ `Cannot write to "${column}" \u2014 this column is managed by auth. Use the auth API to issue or revoke a user's API key.`,
2727
+ "managed_column_write",
2728
+ 400
2729
+ );
2733
2730
  }
2734
2731
  }
2735
2732
  /**