@mindstudio-ai/agent 0.1.112 → 0.1.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +89 -11
- package/dist/index.d.ts +151 -1
- package/dist/index.js +82 -4
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +89 -11
- package/llms.txt +33 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3276,6 +3276,86 @@ interface Email {
|
|
|
3276
3276
|
unsuppress(email: string): Promise<UnsuppressResult>;
|
|
3277
3277
|
}
|
|
3278
3278
|
|
|
3279
|
+
/**
|
|
3280
|
+
* Serialized payload cap per publish, mirroring the platform's (which stays
|
|
3281
|
+
* authoritative). Exported so code whose publish carries data can check the
|
|
3282
|
+
* size BEFORE committing the write the publish announces — an oversize
|
|
3283
|
+
* payload discovered after the commit means the write landed and the
|
|
3284
|
+
* broadcast didn't. A publish that carries only ids can never hit this.
|
|
3285
|
+
*/
|
|
3286
|
+
declare const MAX_EVENT_PAYLOAD_CHARS = 256000;
|
|
3287
|
+
interface EventGrantOptions {
|
|
3288
|
+
/**
|
|
3289
|
+
* Grant lifetime in seconds — also the stream lifetime and the
|
|
3290
|
+
* authorization staleness budget. The platform clamps to [60, 3600]
|
|
3291
|
+
* (default 900): at expiry the stream closes and the client re-mints
|
|
3292
|
+
* through your method, which re-runs your checks. A user whose access you
|
|
3293
|
+
* revoke keeps receiving for at most this long.
|
|
3294
|
+
*/
|
|
3295
|
+
ttlSeconds?: number;
|
|
3296
|
+
/**
|
|
3297
|
+
* Channels the holder may PUBLISH on (up to 20) — the client-direct
|
|
3298
|
+
* ephemeral path for cursors, typing, live strokes: the frontend calls
|
|
3299
|
+
* `sub.publish(...)` (or an external client `POST`s `/_/events`) and events
|
|
3300
|
+
* fan out with no method invoke per signal. Treat it like the browser-held
|
|
3301
|
+
* credential it is: whoever holds the token can inject events into these
|
|
3302
|
+
* channels until the TTL, so grant only channels this client should speak
|
|
3303
|
+
* on. Client events are capped small (8k serialized) and rate-boxed per
|
|
3304
|
+
* grant — they are signals, not documents.
|
|
3305
|
+
*/
|
|
3306
|
+
publish?: string | string[];
|
|
3307
|
+
}
|
|
3308
|
+
interface EventGrantResult {
|
|
3309
|
+
/** Bearer token for `GET /_/events` (`Accept: text/event-stream`). */
|
|
3310
|
+
token: string;
|
|
3311
|
+
/** Milliseconds since epoch; the stream closes at this instant. */
|
|
3312
|
+
expiresAt: number;
|
|
3313
|
+
/** The clamped lifetime actually applied. */
|
|
3314
|
+
ttlSeconds: number;
|
|
3315
|
+
}
|
|
3316
|
+
interface Events {
|
|
3317
|
+
/**
|
|
3318
|
+
* Publish a payload to one or many channels — one call, up to 500 channels,
|
|
3319
|
+
* so fanning out to every member of a room is a single request.
|
|
3320
|
+
*
|
|
3321
|
+
* Returns how many live subscriber connections were counted across the
|
|
3322
|
+
* published channels (a connection matching several of them counts once per
|
|
3323
|
+
* channel). `delivered: 0` is not an error — it means nobody is listening
|
|
3324
|
+
* right now, which is normal for a nudge. Also returns the platform-stamped
|
|
3325
|
+
* publish `id` — the same id arrives on every delivered frame (dedupe key
|
|
3326
|
+
* for consumers is id+channel), so it correlates your logs with
|
|
3327
|
+
* `remy-admin events tail`.
|
|
3328
|
+
*
|
|
3329
|
+
* Payloads are capped at `MAX_EVENT_PAYLOAD_CHARS` serialized characters,
|
|
3330
|
+
* checked here before anything touches the network — so an oversize payload
|
|
3331
|
+
* throws synchronously and shows up in local testing. If a publish carries
|
|
3332
|
+
* data (not just ids), publish before you commit the write it announces, or
|
|
3333
|
+
* check the size against the exported cap first: an oversize failure after
|
|
3334
|
+
* the commit means the write landed and no other client heard about it.
|
|
3335
|
+
* High-rate paths should publish ids and let the client fetch regardless.
|
|
3336
|
+
*
|
|
3337
|
+
* @throws MindStudioError on invalid channels, an oversize payload, or a
|
|
3338
|
+
* platform failure. Unlike `stream()`, publishing is an explicit act and
|
|
3339
|
+
* failures are not swallowed.
|
|
3340
|
+
*/
|
|
3341
|
+
publish(channels: string | string[], data: unknown): Promise<{
|
|
3342
|
+
delivered: number;
|
|
3343
|
+
id: string;
|
|
3344
|
+
}>;
|
|
3345
|
+
/**
|
|
3346
|
+
* Mint a subscribe token for an explicit list of channels (up to 100, exact
|
|
3347
|
+
* names — letters, digits, `: _ - .`, no wildcards). Do your authorization
|
|
3348
|
+
* first; whoever holds the returned token WILL receive those channels'
|
|
3349
|
+
* events for its lifetime.
|
|
3350
|
+
*
|
|
3351
|
+
* Return the result from your method (`return await events.grant(...)`);
|
|
3352
|
+
* the client passes `result.token` to the events stream (the frontend SDK's
|
|
3353
|
+
* `getToken`, or `Authorization: Bearer` on `GET /_/events` for an external
|
|
3354
|
+
* client).
|
|
3355
|
+
*/
|
|
3356
|
+
grant(channels: string | string[], options?: EventGrantOptions): Promise<EventGrantResult>;
|
|
3357
|
+
}
|
|
3358
|
+
|
|
3279
3359
|
/**
|
|
3280
3360
|
* JSON Schema support for task-agent structured output.
|
|
3281
3361
|
*
|
|
@@ -3591,6 +3671,7 @@ declare class MindStudioAgent$1 {
|
|
|
3591
3671
|
private _voice;
|
|
3592
3672
|
private _analytics;
|
|
3593
3673
|
private _email;
|
|
3674
|
+
private _events;
|
|
3594
3675
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
3595
3676
|
private _authType;
|
|
3596
3677
|
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
@@ -3941,6 +4022,23 @@ declare class MindStudioAgent$1 {
|
|
|
3941
4022
|
* ```
|
|
3942
4023
|
*/
|
|
3943
4024
|
get analytics(): Analytics;
|
|
4025
|
+
/**
|
|
4026
|
+
* The `events` namespace — server→client realtime. `publish()` pushes to
|
|
4027
|
+
* named channels; `grant()` mints the subscribe token a client presents to
|
|
4028
|
+
* the platform-held events stream. See {@link Events} for the channel-shape
|
|
4029
|
+
* and at-most-once semantics.
|
|
4030
|
+
*
|
|
4031
|
+
* @example
|
|
4032
|
+
* ```ts
|
|
4033
|
+
* import { auth, events } from '@mindstudio-ai/agent';
|
|
4034
|
+
*
|
|
4035
|
+
* export async function watchJobs() {
|
|
4036
|
+
* auth.requireRole('operator');
|
|
4037
|
+
* return await events.grant(`jobs:${auth.userId}`); // { token, expiresAt, ttlSeconds }
|
|
4038
|
+
* }
|
|
4039
|
+
* ```
|
|
4040
|
+
*/
|
|
4041
|
+
get events(): Events;
|
|
3944
4042
|
/**
|
|
3945
4043
|
* Outbound email: sending, the per-recipient delivery log, blast stats, and
|
|
3946
4044
|
* this app's unsubscribe list.
|
|
@@ -4031,6 +4129,16 @@ declare class MindStudioAgent$1 {
|
|
|
4031
4129
|
* retry a read itself.
|
|
4032
4130
|
*/
|
|
4033
4131
|
private _emailRequest;
|
|
4132
|
+
/**
|
|
4133
|
+
* @internal Transport for the `events` namespace —
|
|
4134
|
+
* POST /_internal/v2/app-events/<op> with the raw hook token.
|
|
4135
|
+
*
|
|
4136
|
+
* No 429 retry: a retried publish is a duplicate nudge, and grants are
|
|
4137
|
+
* cheap for the caller to re-request. Errors throw (unlike `stream()`) —
|
|
4138
|
+
* publishing is an explicit act, and "nobody was listening" is expressed as
|
|
4139
|
+
* `delivered: 0`, never as an HTTP failure.
|
|
4140
|
+
*/
|
|
4141
|
+
private _eventsRequest;
|
|
4034
4142
|
private _analyticsRequest;
|
|
4035
4143
|
/**
|
|
4036
4144
|
* @internal Shared shape for the brokered `/_internal/v2/<ns>/<op>` data
|
|
@@ -4975,6 +5083,13 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
4975
5083
|
timestamp?: string;
|
|
4976
5084
|
images?: string[];
|
|
4977
5085
|
rawMessage?: {
|
|
5086
|
+
agent_session?: {
|
|
5087
|
+
agent_bot_user_ids?: string[];
|
|
5088
|
+
agent_statuses?: unknown[];
|
|
5089
|
+
date_status_processing_expire?: number;
|
|
5090
|
+
status?: string;
|
|
5091
|
+
title?: string;
|
|
5092
|
+
};
|
|
4978
5093
|
app_id?: string;
|
|
4979
5094
|
assistant_app_thread?: {
|
|
4980
5095
|
first_user_thread_reply?: string;
|
|
@@ -5038,6 +5153,7 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5038
5153
|
service_name?: string;
|
|
5039
5154
|
service_url?: string;
|
|
5040
5155
|
size?: number;
|
|
5156
|
+
slack_file_id?: string;
|
|
5041
5157
|
text?: string;
|
|
5042
5158
|
thumb_height?: number;
|
|
5043
5159
|
thumb_url?: string;
|
|
@@ -5111,6 +5227,7 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5111
5227
|
name?: string;
|
|
5112
5228
|
team_id?: string;
|
|
5113
5229
|
updated?: number;
|
|
5230
|
+
user_id?: string;
|
|
5114
5231
|
};
|
|
5115
5232
|
client_msg_id?: string;
|
|
5116
5233
|
display_as_bot?: boolean;
|
|
@@ -5123,11 +5240,14 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5123
5240
|
alt_txt?: string;
|
|
5124
5241
|
app_id?: string;
|
|
5125
5242
|
app_name?: string;
|
|
5243
|
+
app_provides_file_work_objects?: boolean;
|
|
5126
5244
|
attachments?: unknown[];
|
|
5127
5245
|
blocks?: unknown[];
|
|
5128
5246
|
bot_id?: string;
|
|
5129
5247
|
can_toggle_canvas_lock?: boolean;
|
|
5248
|
+
canvas_creator_id?: string;
|
|
5130
5249
|
canvas_printing_enabled?: boolean;
|
|
5250
|
+
canvas_readtime?: number;
|
|
5131
5251
|
canvas_template_mode?: string;
|
|
5132
5252
|
cc?: unknown[];
|
|
5133
5253
|
channel_actions_count?: number;
|
|
@@ -5164,8 +5284,11 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5164
5284
|
image_exif_rotation?: number;
|
|
5165
5285
|
ims?: string[];
|
|
5166
5286
|
initial_comment?: unknown;
|
|
5287
|
+
inline_attachment_count?: number;
|
|
5288
|
+
is_ai_suggested?: boolean;
|
|
5167
5289
|
is_channel_space?: boolean;
|
|
5168
5290
|
is_external?: boolean;
|
|
5291
|
+
is_modified_by_ai?: boolean;
|
|
5169
5292
|
is_public?: boolean;
|
|
5170
5293
|
is_restricted_sharing_enabled?: boolean;
|
|
5171
5294
|
is_starred?: boolean;
|
|
@@ -5211,6 +5334,7 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5211
5334
|
show_badge?: boolean;
|
|
5212
5335
|
simplified_html?: string;
|
|
5213
5336
|
size?: number;
|
|
5337
|
+
skipped_shares?: boolean;
|
|
5214
5338
|
source_team?: string;
|
|
5215
5339
|
subject?: string;
|
|
5216
5340
|
subtype?: string;
|
|
@@ -5280,6 +5404,7 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5280
5404
|
username?: string;
|
|
5281
5405
|
vtt?: string;
|
|
5282
5406
|
}[];
|
|
5407
|
+
hidden?: boolean;
|
|
5283
5408
|
icons?: {
|
|
5284
5409
|
emoji?: string;
|
|
5285
5410
|
image_36?: string;
|
|
@@ -5289,6 +5414,10 @@ interface FetchSlackChannelHistoryStepOutput {
|
|
|
5289
5414
|
};
|
|
5290
5415
|
inviter?: string;
|
|
5291
5416
|
is_locked?: boolean;
|
|
5417
|
+
language?: {
|
|
5418
|
+
is_reliable?: boolean;
|
|
5419
|
+
locale?: string;
|
|
5420
|
+
};
|
|
5292
5421
|
latest_reply?: string;
|
|
5293
5422
|
metadata?: {
|
|
5294
5423
|
event_payload?: unknown;
|
|
@@ -11457,6 +11586,27 @@ declare const analytics: Analytics;
|
|
|
11457
11586
|
* ```
|
|
11458
11587
|
*/
|
|
11459
11588
|
declare const email: Email;
|
|
11589
|
+
/**
|
|
11590
|
+
* Server→client realtime — publish to named channels and mint subscribe
|
|
11591
|
+
* grants. A channel is an audience, and a method decides who is in it; events
|
|
11592
|
+
* are at-most-once nudges (subscribe for speed, reconcile for truth). See
|
|
11593
|
+
* {@link Events}.
|
|
11594
|
+
*
|
|
11595
|
+
* @example
|
|
11596
|
+
* ```ts
|
|
11597
|
+
* import { auth, events } from '@mindstudio-ai/agent';
|
|
11598
|
+
*
|
|
11599
|
+
* // The subscribe door is one of your own methods:
|
|
11600
|
+
* export async function watchJobs() {
|
|
11601
|
+
* auth.requireRole('operator');
|
|
11602
|
+
* return await events.grant(`jobs:${auth.userId}`); // { token, expiresAt, ttlSeconds }
|
|
11603
|
+
* }
|
|
11604
|
+
*
|
|
11605
|
+
* // Anything can publish — a method, a cron, a webhook handler:
|
|
11606
|
+
* await events.publish(`jobs:${job.operator}`, { type: 'job', id: job.id });
|
|
11607
|
+
* ```
|
|
11608
|
+
*/
|
|
11609
|
+
declare const events: Events;
|
|
11460
11610
|
/**
|
|
11461
11611
|
* Originating-session identity for this invocation — set when the method was
|
|
11462
11612
|
* triggered by a conversational surface (a voice call's tool use, an
|
|
@@ -11567,4 +11717,4 @@ declare const prerender: {
|
|
|
11567
11717
|
}>;
|
|
11568
11718
|
};
|
|
11569
11719
|
|
|
11570
|
-
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 DefineStoreOptions, type DefineTableOptions, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectChangesStepInput, type DetectChangesStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DiscordEditMessageStepInput, type DiscordEditMessageStepOutput, type DiscordSendFollowUpStepInput, type DiscordSendFollowUpStepOutput, type DiscordSendMessageStepInput, type DiscordSendMessageStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExecuteStepBatchOptions, type ExecuteStepBatchResult, type ExtractAudioFromVideoStepInput, type ExtractAudioFromVideoStepOutput, type ExtractTextStepInput, type ExtractTextStepOutput, type FetchDataSourceDocumentStepInput, type FetchDataSourceDocumentStepOutput, type FetchGoogleDocStepInput, type FetchGoogleDocStepOutput, type FetchGoogleSheetStepInput, type FetchGoogleSheetStepOutput, type FetchSlackChannelHistoryStepInput, type FetchSlackChannelHistoryStepOutput, type FetchYoutubeCaptionsStepInput, type FetchYoutubeCaptionsStepOutput, type FetchYoutubeChannelStepInput, type FetchYoutubeChannelStepOutput, type FetchYoutubeCommentsStepInput, type FetchYoutubeCommentsStepOutput, type FetchYoutubeVideoStepInput, type FetchYoutubeVideoStepOutput, type FileAccess, type Files, type FromSchema, type Generate3dModelStepInput, type Generate3dModelStepOutput, type GenerateAssetStepInput, type GenerateAssetStepOutput, type GenerateChartStepInput, type GenerateChartStepOutput, type GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateStaticVideoFromImageStepInput, type GenerateStaticVideoFromImageStepOutput, type GenerateTextStepInput, type GenerateTextStepOutput, type GenerateVideoStepInput, type GenerateVideoStepOutput, type GetGmailAttachmentsStepInput, type GetGmailAttachmentsStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGmailUnreadCountStepInput, type GetGmailUnreadCountStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, type HubspotCreateCompanyStepInput, type HubspotCreateCompanyStepOutput, type HubspotCreateContactStepInput, type HubspotCreateContactStepOutput, type HubspotGetCompanyStepInput, type HubspotGetCompanyStepOutput, type HubspotGetContactStepInput, type HubspotGetContactStepOutput, type HunterApiCompanyEnrichmentStepInput, type HunterApiCompanyEnrichmentStepOutput, type HunterApiDomainSearchStepInput, type HunterApiDomainSearchStepOutput, type HunterApiEmailFinderStepInput, type HunterApiEmailFinderStepOutput, type HunterApiEmailVerificationStepInput, type HunterApiEmailVerificationStepOutput, type HunterApiPersonEnrichmentStepInput, type HunterApiPersonEnrichmentStepOutput, type ImageFaceSwapStepInput, type ImageFaceSwapStepOutput, type ImageRemoveWatermarkStepInput, type ImageRemoveWatermarkStepOutput, type InsertVideoClipsStepInput, type InsertVideoClipsStepOutput, type Jewel, type JewelConfig, type JewelGradeContext, type JewelMethod, type JewelMethodInput, type JewelPairRecord, type JewelProposal, type JewelProposeOutcome, type JewelProposeResult, type JewelQueueItem, type JewelQueueResolution, type JewelQueueResolveResult, type JewelRunParams, type JewelVerdict, type JewelsApi, type JsonObjectSchema, type JsonSchema, type JsonSchemaTypeName, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListOptions, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LiveNow, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MapPoint, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, type MeshyAnimateStepInput, type MeshyAnimateStepOutput, type MeshyImageTo3dStepInput, type MeshyImageTo3dStepOutput, type MeshyRemeshStepInput, type MeshyRemeshStepOutput, type MeshyRigStepInput, type MeshyRigStepOutput, type MeshyTextTo3dStepInput, type MeshyTextTo3dStepOutput, type MeshyTextureStepInput, type MeshyTextureStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MindStudioModelSummary, type MixAudioIntoVideoStepInput, type MixAudioIntoVideoStepOutput, type ModelType, type MonacoSnippet, type MonacoSnippetField, type MonacoSnippetFieldType, type MuteVideoStepInput, type MuteVideoStepOutput, type N8nRunNodeStepInput, type N8nRunNodeStepOutput, type NotionCreatePageStepInput, type NotionCreatePageStepOutput, type NotionUpdatePageStepInput, type NotionUpdatePageStepOutput, type PackagedWorkflow, type PackagedWorkflowInput, type PackagedWorkflowSignature, type ParticlePodcastsFindMentionsStepInput, type ParticlePodcastsFindMentionsStepOutput, type ParticlePodcastsGetEpisodeStepInput, type ParticlePodcastsGetEpisodeStepOutput, type ParticlePodcastsGetEpisodeTranscriptStepInput, type ParticlePodcastsGetEpisodeTranscriptStepOutput, type ParticlePodcastsSearchCompaniesStepInput, type ParticlePodcastsSearchCompaniesStepOutput, type ParticlePodcastsSearchDialogueStepInput, type ParticlePodcastsSearchDialogueStepOutput, type ParticlePodcastsSearchPodcastsStepInput, type ParticlePodcastsSearchPodcastsStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, type PutOptions, Query, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, RawQuery, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskOptionsWithExample, type RunTaskOptionsWithSchema, type RunTaskResult, type SchemaValidationError, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, type ScrapeUrlStepInput, type ScrapeUrlStepOutput, type ScrapeXPostStepInput, type ScrapeXPostStepOutput, type ScrapeXProfileStepInput, type ScrapeXProfileStepOutput, type ScreenshotUrlStepInput, type ScreenshotUrlStepOutput, type SearchGmailEmailsStepInput, type SearchGmailEmailsStepOutput, type SearchGoogleCalendarEventsStepInput, type SearchGoogleCalendarEventsStepOutput, type SearchGoogleDriveStepInput, type SearchGoogleDriveStepOutput, type SearchGoogleImagesStepInput, type SearchGoogleImagesStepOutput, type SearchGoogleNewsStepInput, type SearchGoogleNewsStepOutput, type SearchGoogleStepInput, type SearchGoogleStepOutput, type SearchGoogleTrendsStepInput, type SearchGoogleTrendsStepOutput, type SearchPerplexityStepInput, type SearchPerplexityStepOutput, type SearchXPostsStepInput, type SearchXPostsStepOutput, type SearchYoutubeStepInput, type SearchYoutubeStepOutput, type SearchYoutubeTrendsStepInput, type SearchYoutubeTrendsStepOutput, type SendEmailStepInput, type SendEmailStepOutput, type SendGmailDraftStepInput, type SendGmailDraftStepOutput, type SendGmailMessageStepInput, type SendGmailMessageStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SendSlackDirectMessageStepInput, type SendSlackDirectMessageStepOutput, type SessionContext, type SetGmailReadStatusStepInput, type SetGmailReadStatusStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepCostEstimateEntry, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepLogEvent, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, Store, type StoredFile, type SystemFields, Table, type TaskEvent, type TaskToolCall, type TaskToolConfig, type TaskUsage, type TelegramEditMessageStepInput, type TelegramEditMessageStepOutput, type TelegramReplyToMessageStepInput, type TelegramReplyToMessageStepOutput, type TelegramSendAudioStepInput, type TelegramSendAudioStepOutput, type TelegramSendFileStepInput, type TelegramSendFileStepOutput, type TelegramSendImageStepInput, type TelegramSendImageStepOutput, type TelegramSendMessageStepInput, type TelegramSendMessageStepOutput, type TelegramSendVideoStepInput, type TelegramSendVideoStepOutput, type TelegramSetTypingStepInput, type TelegramSetTypingStepOutput, type TextToSpeechStepInput, type TextToSpeechStepOutput, type TopSource, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type UpdateGmailLabelsStepInput, type UpdateGmailLabelsStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UpdateInput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UploadFileResult, type UploadToken, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type User, type UserInfoResult, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type Voice, type VoiceCallResult, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, type YouDotComFinanceResearchStepInput, type YouDotComFinanceResearchStepOutput, type YouDotComGetPageContentStepInput, type YouDotComGetPageContentStepOutput, type YouDotComLiveNewsStepInput, type YouDotComLiveNewsStepOutput, type YouDotComWebResearchStepInput, type YouDotComWebResearchStepOutput, type YouDotComWebSearchStepInput, type YouDotComWebSearchStepOutput, analytics, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, email, files, getRequestContext, mindstudio, monacoSnippets, prerender, reportIssue, resolveUser, runWithContext, session, stepMetadata, stream, voice, waitUntil };
|
|
11720
|
+
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 DefineStoreOptions, type DefineTableOptions, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectChangesStepInput, type DetectChangesStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DiscordEditMessageStepInput, type DiscordEditMessageStepOutput, type DiscordSendFollowUpStepInput, type DiscordSendFollowUpStepOutput, type DiscordSendMessageStepInput, type DiscordSendMessageStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type 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 GenerateChartStepInput, type GenerateChartStepOutput, type GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateStaticVideoFromImageStepInput, type GenerateStaticVideoFromImageStepOutput, type GenerateTextStepInput, type GenerateTextStepOutput, type GenerateVideoStepInput, type GenerateVideoStepOutput, type GetGmailAttachmentsStepInput, type GetGmailAttachmentsStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGmailUnreadCountStepInput, type GetGmailUnreadCountStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, type HubspotCreateCompanyStepInput, type HubspotCreateCompanyStepOutput, type HubspotCreateContactStepInput, type HubspotCreateContactStepOutput, type HubspotGetCompanyStepInput, type HubspotGetCompanyStepOutput, type HubspotGetContactStepInput, type HubspotGetContactStepOutput, type HunterApiCompanyEnrichmentStepInput, type HunterApiCompanyEnrichmentStepOutput, type HunterApiDomainSearchStepInput, type HunterApiDomainSearchStepOutput, type HunterApiEmailFinderStepInput, type HunterApiEmailFinderStepOutput, type HunterApiEmailVerificationStepInput, type HunterApiEmailVerificationStepOutput, type HunterApiPersonEnrichmentStepInput, type HunterApiPersonEnrichmentStepOutput, type ImageFaceSwapStepInput, type ImageFaceSwapStepOutput, type ImageRemoveWatermarkStepInput, type ImageRemoveWatermarkStepOutput, type InsertVideoClipsStepInput, type InsertVideoClipsStepOutput, type Jewel, type JewelConfig, type JewelGradeContext, type JewelMethod, type JewelMethodInput, type JewelPairRecord, type JewelProposal, type JewelProposeOutcome, type JewelProposeResult, type JewelQueueItem, type JewelQueueResolution, type JewelQueueResolveResult, type JewelRunParams, type JewelVerdict, type JewelsApi, type JsonObjectSchema, type JsonSchema, type JsonSchemaTypeName, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListOptions, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LiveNow, type LogicStepInput, type LogicStepOutput, MAX_EVENT_PAYLOAD_CHARS, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MapPoint, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, type MeshyAnimateStepInput, type MeshyAnimateStepOutput, type MeshyImageTo3dStepInput, type MeshyImageTo3dStepOutput, type MeshyRemeshStepInput, type MeshyRemeshStepOutput, type MeshyRigStepInput, type MeshyRigStepOutput, type MeshyTextTo3dStepInput, type MeshyTextTo3dStepOutput, type MeshyTextureStepInput, type MeshyTextureStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MindStudioModelSummary, type MixAudioIntoVideoStepInput, type MixAudioIntoVideoStepOutput, type ModelType, type MonacoSnippet, type MonacoSnippetField, type MonacoSnippetFieldType, type MuteVideoStepInput, type MuteVideoStepOutput, type N8nRunNodeStepInput, type N8nRunNodeStepOutput, type NotionCreatePageStepInput, type NotionCreatePageStepOutput, type NotionUpdatePageStepInput, type NotionUpdatePageStepOutput, type PackagedWorkflow, type PackagedWorkflowInput, type PackagedWorkflowSignature, type ParticlePodcastsFindMentionsStepInput, type ParticlePodcastsFindMentionsStepOutput, type ParticlePodcastsGetEpisodeStepInput, type ParticlePodcastsGetEpisodeStepOutput, type ParticlePodcastsGetEpisodeTranscriptStepInput, type ParticlePodcastsGetEpisodeTranscriptStepOutput, type ParticlePodcastsSearchCompaniesStepInput, type ParticlePodcastsSearchCompaniesStepOutput, type ParticlePodcastsSearchDialogueStepInput, type ParticlePodcastsSearchDialogueStepOutput, type ParticlePodcastsSearchPodcastsStepInput, type ParticlePodcastsSearchPodcastsStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, type PutOptions, Query, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, RawQuery, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskOptionsWithExample, type RunTaskOptionsWithSchema, type RunTaskResult, type SchemaValidationError, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, type ScrapeUrlStepInput, type ScrapeUrlStepOutput, type ScrapeXPostStepInput, type ScrapeXPostStepOutput, type ScrapeXProfileStepInput, type ScrapeXProfileStepOutput, type ScreenshotUrlStepInput, type ScreenshotUrlStepOutput, type SearchGmailEmailsStepInput, type SearchGmailEmailsStepOutput, type SearchGoogleCalendarEventsStepInput, type SearchGoogleCalendarEventsStepOutput, type SearchGoogleDriveStepInput, type SearchGoogleDriveStepOutput, type SearchGoogleImagesStepInput, type SearchGoogleImagesStepOutput, type SearchGoogleNewsStepInput, type SearchGoogleNewsStepOutput, type SearchGoogleStepInput, type SearchGoogleStepOutput, type SearchGoogleTrendsStepInput, type SearchGoogleTrendsStepOutput, type SearchPerplexityStepInput, type SearchPerplexityStepOutput, type SearchXPostsStepInput, type SearchXPostsStepOutput, type SearchYoutubeStepInput, type SearchYoutubeStepOutput, type SearchYoutubeTrendsStepInput, type SearchYoutubeTrendsStepOutput, type SendEmailStepInput, type SendEmailStepOutput, type SendGmailDraftStepInput, type SendGmailDraftStepOutput, type SendGmailMessageStepInput, type SendGmailMessageStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SendSlackDirectMessageStepInput, type SendSlackDirectMessageStepOutput, type SessionContext, type SetGmailReadStatusStepInput, type SetGmailReadStatusStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepCostEstimateEntry, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepLogEvent, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, Store, type StoredFile, type SystemFields, Table, type TaskEvent, type TaskToolCall, type TaskToolConfig, type TaskUsage, type TelegramEditMessageStepInput, type TelegramEditMessageStepOutput, type TelegramReplyToMessageStepInput, type TelegramReplyToMessageStepOutput, type TelegramSendAudioStepInput, type TelegramSendAudioStepOutput, type TelegramSendFileStepInput, type TelegramSendFileStepOutput, type TelegramSendImageStepInput, type TelegramSendImageStepOutput, type TelegramSendMessageStepInput, type TelegramSendMessageStepOutput, type TelegramSendVideoStepInput, type TelegramSendVideoStepOutput, type TelegramSetTypingStepInput, type TelegramSetTypingStepOutput, type TextToSpeechStepInput, type TextToSpeechStepOutput, type TopSource, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type UpdateGmailLabelsStepInput, type UpdateGmailLabelsStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UpdateInput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UploadFileResult, type UploadToken, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type User, type UserInfoResult, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type Voice, type VoiceCallResult, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, type YouDotComFinanceResearchStepInput, type YouDotComFinanceResearchStepOutput, type YouDotComGetPageContentStepInput, type YouDotComGetPageContentStepOutput, type YouDotComLiveNewsStepInput, type YouDotComLiveNewsStepOutput, type YouDotComWebResearchStepInput, type YouDotComWebResearchStepOutput, type YouDotComWebSearchStepInput, type YouDotComWebSearchStepOutput, analytics, auth, blockTypeAliases, dataSources, db, mindstudio as default, defineJewel, email, events, files, getRequestContext, mindstudio, monacoSnippets, prerender, reportIssue, resolveUser, runWithContext, session, stepMetadata, stream, voice, waitUntil };
|
package/dist/index.js
CHANGED
|
@@ -3072,6 +3072,40 @@ function createEmail(call) {
|
|
|
3072
3072
|
};
|
|
3073
3073
|
}
|
|
3074
3074
|
|
|
3075
|
+
// src/events/index.ts
|
|
3076
|
+
var MAX_EVENT_PAYLOAD_CHARS = 256e3;
|
|
3077
|
+
function createEvents(call) {
|
|
3078
|
+
return {
|
|
3079
|
+
publish(channels, data) {
|
|
3080
|
+
let serialized;
|
|
3081
|
+
try {
|
|
3082
|
+
serialized = JSON.stringify(data);
|
|
3083
|
+
} catch {
|
|
3084
|
+
throw new MindStudioError(
|
|
3085
|
+
"data must be JSON-serializable.",
|
|
3086
|
+
"invalid_payload",
|
|
3087
|
+
400
|
|
3088
|
+
);
|
|
3089
|
+
}
|
|
3090
|
+
if (serialized !== void 0 && serialized.length > MAX_EVENT_PAYLOAD_CHARS) {
|
|
3091
|
+
throw new MindStudioError(
|
|
3092
|
+
`data exceeds ${MAX_EVENT_PAYLOAD_CHARS} serialized characters. Publish an id and let the client fetch.`,
|
|
3093
|
+
"payload_too_large",
|
|
3094
|
+
400
|
|
3095
|
+
);
|
|
3096
|
+
}
|
|
3097
|
+
return call("publish", { channels, data });
|
|
3098
|
+
},
|
|
3099
|
+
grant(channels, options) {
|
|
3100
|
+
return call("grant", {
|
|
3101
|
+
channels,
|
|
3102
|
+
ttlSeconds: options?.ttlSeconds,
|
|
3103
|
+
publish: options?.publish
|
|
3104
|
+
});
|
|
3105
|
+
}
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3075
3109
|
// src/task/index.ts
|
|
3076
3110
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
3077
3111
|
|
|
@@ -3371,7 +3405,7 @@ var stepMetadata = {
|
|
|
3371
3405
|
description: "Fetch recent message history from a Slack channel.",
|
|
3372
3406
|
usageNotes: "- The user is responsible for connecting their Slack workspace and selecting the channel",
|
|
3373
3407
|
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Slack OAuth connection ID (leave empty to allow user to select)" }, "channelId": { "type": "string", "description": "Slack channel ID (leave empty to allow user to select a channel)" }, "limit": { "type": "number", "description": "Maximum number of messages to return (1-15)" }, "startDate": { "type": "string", "description": "Earliest date to include messages from" }, "endDate": { "type": "string", "description": "Latest date to include messages up to" }, "includeImages": { "type": "boolean", "description": "Whether to include images in the output" }, "includeRawMessage": { "type": "boolean", "description": "Whether to include the raw Slack message object (useful for bot messages with complex attachments)" } }, "required": ["channelId"] },
|
|
3374
|
-
outputSchema: { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "content": { "type": "string" }, "timestamp": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "rawMessage": { "type": "object", "properties": { "app_id": { "type": "string" }, "assistant_app_thread": { "type": "object", "properties": { "first_user_thread_reply": { "type": "string" }, "title": { "type": "string" }, "title_blocks": { "type": "array", "items": { "type": "string" } } } }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "actions": { "type": "array", "items": { "type": "string" } }, "app_id": { "type": "string" }, "app_unfurl_url": { "type": "string" }, "author_icon": { "type": "string" }, "author_id": { "type": "string" }, "author_link": { "type": "string" }, "author_name": { "type": "string" }, "author_subname": { "type": "string" }, "blocks": { "type": "array", "items": { "type": "string" } }, "bot_id": { "type": "string" }, "bot_team_id": { "type": "string" }, "callback_id": { "type": "string" }, "channel_id": { "type": "string" }, "channel_name": { "type": "string" }, "channel_team": { "type": "string" }, "color": { "type": "string" }, "fallback": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "file_id": { "type": "string" }, "filename": { "type": "string" }, "files": { "type": "array", "items": { "type": "string" } }, "footer": { "type": "string" }, "footer_icon": { "type": "string" }, "from_url": { "type": "string" }, "hide_border": { "type": "boolean" }, "hide_color": { "type": "boolean" }, "id": { "type": "number" }, "image_bytes": { "type": "number" }, "image_height": { "type": "number" }, "image_url": { "type": "string" }, "image_width": { "type": "number" }, "indent": { "type": "boolean" }, "is_app_unfurl": { "type": "boolean" }, "is_file_attachment": { "type": "boolean" }, "is_msg_unfurl": { "type": "boolean" }, "is_reply_unfurl": { "type": "boolean" }, "is_thread_root_unfurl": { "type": "boolean" }, "list": { "type": "string" }, "list_record": { "type": "string" }, "list_record_id": { "type": "string" }, "list_records": { "type": "array", "items": { "type": "string" } }, "list_schema": { "type": "array", "items": { "type": "string" } }, "list_view": { "type": "string" }, "list_view_id": { "type": "string" }, "message_blocks": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "string" }, "mimetype": { "type": "string" }, "mrkdwn_in": { "type": "array", "items": { "type": "string" } }, "msg_subtype": { "type": "string" }, "original_url": { "type": "string" }, "pretext": { "type": "string" }, "preview": { "type": "string" }, "service_icon": { "type": "string" }, "service_name": { "type": "string" }, "service_url": { "type": "string" }, "size": { "type": "number" }, "text": { "type": "string" }, "thumb_height": { "type": "number" }, "thumb_url": { "type": "string" }, "thumb_width": { "type": "number" }, "title": { "type": "string" }, "title_link": { "type": "string" }, "ts": { "type": "string" }, "url": { "type": "string" }, "video_html": { "type": "string" }, "video_html_height": { "type": "number" }, "video_html_width": { "type": "number" }, "video_url": { "type": "string" } } } }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "accessory": { "type": "string" }, "alt_text": { "type": "string" }, "api_decoration_available": { "type": "boolean" }, "app_collaborators": { "type": "array", "items": { "type": "string" } }, "app_id": { "type": "string" }, "author_name": { "type": "string" }, "block_id": { "type": "string" }, "bot_user_id": { "type": "string" }, "button_label": { "type": "string" }, "call": { "type": "string" }, "call_id": { "type": "string" }, "description": { "type": "string" }, "developer_trace_id": { "type": "string" }, "dispatch_action": { "type": "boolean" }, "element": { "type": "string" }, "elements": { "type": "array", "items": { "type": "string" } }, "expand": { "type": "boolean" }, "external_id": { "type": "string" }, "fallback": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "file": { "type": "string" }, "file_id": { "type": "string" }, "function_trigger_id": { "type": "string" }, "hint": { "type": "string" }, "image_bytes": { "type": "number" }, "image_height": { "type": "number" }, "image_url": { "type": "string" }, "image_width": { "type": "number" }, "is_animated": { "type": "boolean" }, "is_workflow_app": { "type": "boolean" }, "label": { "type": "string" }, "optional": { "type": "boolean" }, "owning_team_id": { "type": "string" }, "provider_icon_url": { "type": "string" }, "provider_name": { "type": "string" }, "sales_home_workflow_app_type": { "type": "number" }, "share_url": { "type": "string" }, "slack_file": { "type": "string" }, "source": { "type": "string" }, "text": { "type": "string" }, "thumbnail_url": { "type": "string" }, "title": { "type": "string" }, "title_url": { "type": "string" }, "trigger_subtype": { "type": "string" }, "trigger_type": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" }, "video_url": { "type": "string" }, "workflow_id": { "type": "string" } } } }, "bot_id": { "type": "string" }, "bot_profile": { "type": "object", "properties": { "app_id": { "type": "string" }, "deleted": { "type": "boolean" }, "icons": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "team_id": { "type": "string" }, "updated": { "type": "number" } } }, "client_msg_id": { "type": "string" }, "display_as_bot": { "type": "boolean" }, "edited": { "type": "object", "properties": { "ts": { "type": "string" }, "user": { "type": "string" } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "access": { "type": "string" }, "alt_txt": { "type": "string" }, "app_id": { "type": "string" }, "app_name": { "type": "string" }, "attachments": { "type": "array", "items": {} }, "blocks": { "type": "array", "items": { "type": "string" } }, "bot_id": { "type": "string" }, "can_toggle_canvas_lock": { "type": "boolean" }, "canvas_printing_enabled": { "type": "boolean" }, "canvas_template_mode": { "type": "string" }, "cc": { "type": "array", "items": { "type": "string" } }, "channel_actions_count": { "type": "number" }, "channel_actions_ts": { "type": "string" }, "channels": { "type": "array", "items": { "type": "string" } }, "comments_count": { "type": "number" }, "converted_pdf": { "type": "string" }, "created": { "type": "number" }, "deanimate": { "type": "string" }, "deanimate_gif": { "type": "string" }, "display_as_bot": { "type": "boolean" }, "dm_mpdm_users_with_file_access": { "type": "array", "items": { "type": "string" } }, "duration_ms": { "type": "number" }, "edit_link": { "type": "string" }, "edit_timestamp": { "type": "number" }, "editable": { "type": "boolean" }, "editor": { "type": "string" }, "editors": { "type": "array", "items": { "type": "string" } }, "external_id": { "type": "string" }, "external_type": { "type": "string" }, "external_url": { "type": "string" }, "favorites": { "type": "array", "items": { "type": "string" } }, "file_access": { "type": "string" }, "filetype": { "type": "string" }, "from": { "type": "array", "items": { "type": "string" } }, "groups": { "type": "array", "items": { "type": "string" } }, "has_more": { "type": "boolean" }, "has_more_shares": { "type": "boolean" }, "has_rich_preview": { "type": "boolean" }, "headers": { "type": "string" }, "hls": { "type": "string" }, "hls_embed": { "type": "string" }, "id": { "type": "string" }, "image_exif_rotation": { "type": "number" }, "ims": { "type": "array", "items": { "type": "string" } }, "initial_comment": { "type": "string" }, "is_channel_space": { "type": "boolean" }, "is_external": { "type": "boolean" }, "is_public": { "type": "boolean" }, "is_restricted_sharing_enabled": { "type": "boolean" }, "is_starred": { "type": "boolean" }, "last_editor": { "type": "string" }, "last_read": { "type": "number" }, "lines": { "type": "number" }, "lines_more": { "type": "number" }, "linked_channel_id": { "type": "string" }, "list_csv_download_url": { "type": "string" }, "list_limits": { "type": "string" }, "list_metadata": { "type": "string" }, "media_display_type": { "type": "string" }, "media_progress": { "type": "string" }, "mimetype": { "type": "string" }, "mode": { "type": "string" }, "mp4": { "type": "string" }, "mp4_low": { "type": "string" }, "name": { "type": "string" }, "non_owner_editable": { "type": "boolean" }, "num_stars": { "type": "number" }, "org_or_workspace_access": { "type": "string" }, "original_attachment_count": { "type": "number" }, "original_h": { "type": "string" }, "original_w": { "type": "string" }, "permalink": { "type": "string" }, "permalink_public": { "type": "string" }, "pinned_to": { "type": "array", "items": { "type": "string" } }, "pjpeg": { "type": "string" }, "plain_text": { "type": "string" }, "pretty_type": { "type": "string" }, "preview": { "type": "string" }, "preview_highlight": { "type": "string" }, "preview_is_truncated": { "type": "boolean" }, "preview_plain_text": { "type": "string" }, "private_channels_with_file_access_count": { "type": "number" }, "private_file_with_access_count": { "type": "number" }, "public_url_shared": { "type": "boolean" }, "quip_thread_id": { "type": "string" }, "reactions": { "type": "array", "items": { "type": "string" } }, "saved": { "type": "string" }, "sent_to_self": { "type": "boolean" }, "shares": { "type": "string" }, "show_badge": { "type": "boolean" }, "simplified_html": { "type": "string" }, "size": { "type": "number" }, "source_team": { "type": "string" }, "subject": { "type": "string" }, "subtype": { "type": "string" }, "team_pref_version_history_enabled": { "type": "boolean" }, "teams_shared_with": { "type": "array", "items": {} }, "template_conversion_ts": { "type": "number" }, "template_description": { "type": "string" }, "template_icon": { "type": "string" }, "template_name": { "type": "string" }, "template_title": { "type": "string" }, "thumb_1024": { "type": "string" }, "thumb_1024_gif": { "type": "string" }, "thumb_1024_h": { "type": "string" }, "thumb_1024_w": { "type": "string" }, "thumb_160": { "type": "string" }, "thumb_160_gif": { "type": "string" }, "thumb_160_h": { "type": "string" }, "thumb_160_w": { "type": "string" }, "thumb_360": { "type": "string" }, "thumb_360_gif": { "type": "string" }, "thumb_360_h": { "type": "string" }, "thumb_360_w": { "type": "string" }, "thumb_480": { "type": "string" }, "thumb_480_gif": { "type": "string" }, "thumb_480_h": { "type": "string" }, "thumb_480_w": { "type": "string" }, "thumb_64": { "type": "string" }, "thumb_64_gif": { "type": "string" }, "thumb_64_h": { "type": "string" }, "thumb_64_w": { "type": "string" }, "thumb_720": { "type": "string" }, "thumb_720_gif": { "type": "string" }, "thumb_720_h": { "type": "string" }, "thumb_720_w": { "type": "string" }, "thumb_80": { "type": "string" }, "thumb_800": { "type": "string" }, "thumb_800_gif": { "type": "string" }, "thumb_800_h": { "type": "string" }, "thumb_800_w": { "type": "string" }, "thumb_80_gif": { "type": "string" }, "thumb_80_h": { "type": "string" }, "thumb_80_w": { "type": "string" }, "thumb_960": { "type": "string" }, "thumb_960_gif": { "type": "string" }, "thumb_960_h": { "type": "string" }, "thumb_960_w": { "type": "string" }, "thumb_gif": { "type": "string" }, "thumb_pdf": { "type": "string" }, "thumb_pdf_h": { "type": "string" }, "thumb_pdf_w": { "type": "string" }, "thumb_tiny": { "type": "string" }, "thumb_video": { "type": "string" }, "thumb_video_h": { "type": "number" }, "thumb_video_w": { "type": "number" }, "timestamp": { "type": "number" }, "title": { "type": "string" }, "title_blocks": { "type": "array", "items": { "type": "string" } }, "to": { "type": "array", "items": { "type": "string" } }, "transcription": { "type": "string" }, "update_notification": { "type": "number" }, "updated": { "type": "number" }, "url_private": { "type": "string" }, "url_private_download": { "type": "string" }, "url_static_preview": { "type": "string" }, "user": { "type": "string" }, "user_team": { "type": "string" }, "username": { "type": "string" }, "vtt": { "type": "string" } } } }, "icons": { "type": "object", "properties": { "emoji": { "type": "string" }, "image_36": { "type": "string" }, "image_48": { "type": "string" }, "image_64": { "type": "string" }, "image_72": { "type": "string" } } }, "inviter": { "type": "string" }, "is_locked": { "type": "boolean" }, "latest_reply": { "type": "string" }, "metadata": { "type": "object", "properties": { "event_payload": { "type": "string" }, "event_type": { "type": "string" } } }, "parent_user_id": { "type": "string" }, "purpose": { "type": "string" }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "number" }, "name": { "type": "string" }, "url": { "type": "string" }, "users": { "type": "array", "items": { "type": "string" } } } } }, "reply_count": { "type": "number" }, "reply_users": { "type": "array", "items": { "type": "string" } }, "reply_users_count": { "type": "number" }, "root": { "type": "object", "properties": { "bot_id": { "type": "string" }, "icons": { "type": "string" }, "latest_reply": { "type": "string" }, "parent_user_id": { "type": "string" }, "reply_count": { "type": "number" }, "reply_users": { "type": "array", "items": { "type": "string" } }, "reply_users_count": { "type": "number" }, "subscribed": { "type": "boolean" }, "subtype": { "type": "string" }, "text": { "type": "string" }, "thread_ts": { "type": "string" }, "ts": { "type": "string" }, "type": { "type": "string" }, "username": { "type": "string" } } }, "subscribed": { "type": "boolean" }, "subtype": { "type": "string" }, "team": { "type": "string" }, "text": { "type": "string" }, "thread_ts": { "type": "string" }, "topic": { "type": "string" }, "ts": { "type": "string" }, "type": { "type": "string" }, "upload": { "type": "boolean" }, "user": { "type": "string" }, "username": { "type": "string" }, "x_files": { "type": "array", "items": { "type": "string" } } } } }, "required": ["from", "content"] }, "description": "List of messages from the channel history" } }, "required": ["messages"] }
|
|
3408
|
+
outputSchema: { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "content": { "type": "string" }, "timestamp": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "rawMessage": { "type": "object", "properties": { "agent_session": { "type": "object", "properties": { "agent_bot_user_ids": { "type": "array", "items": { "type": "string" } }, "agent_statuses": { "type": "array", "items": { "type": "string" } }, "date_status_processing_expire": { "type": "number" }, "status": { "type": "string" }, "title": { "type": "string" } } }, "app_id": { "type": "string" }, "assistant_app_thread": { "type": "object", "properties": { "first_user_thread_reply": { "type": "string" }, "title": { "type": "string" }, "title_blocks": { "type": "array", "items": { "type": "string" } } } }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "actions": { "type": "array", "items": { "type": "string" } }, "app_id": { "type": "string" }, "app_unfurl_url": { "type": "string" }, "author_icon": { "type": "string" }, "author_id": { "type": "string" }, "author_link": { "type": "string" }, "author_name": { "type": "string" }, "author_subname": { "type": "string" }, "blocks": { "type": "array", "items": { "type": "string" } }, "bot_id": { "type": "string" }, "bot_team_id": { "type": "string" }, "callback_id": { "type": "string" }, "channel_id": { "type": "string" }, "channel_name": { "type": "string" }, "channel_team": { "type": "string" }, "color": { "type": "string" }, "fallback": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "file_id": { "type": "string" }, "filename": { "type": "string" }, "files": { "type": "array", "items": { "type": "string" } }, "footer": { "type": "string" }, "footer_icon": { "type": "string" }, "from_url": { "type": "string" }, "hide_border": { "type": "boolean" }, "hide_color": { "type": "boolean" }, "id": { "type": "number" }, "image_bytes": { "type": "number" }, "image_height": { "type": "number" }, "image_url": { "type": "string" }, "image_width": { "type": "number" }, "indent": { "type": "boolean" }, "is_app_unfurl": { "type": "boolean" }, "is_file_attachment": { "type": "boolean" }, "is_msg_unfurl": { "type": "boolean" }, "is_reply_unfurl": { "type": "boolean" }, "is_thread_root_unfurl": { "type": "boolean" }, "list": { "type": "string" }, "list_record": { "type": "string" }, "list_record_id": { "type": "string" }, "list_records": { "type": "array", "items": { "type": "string" } }, "list_schema": { "type": "array", "items": { "type": "string" } }, "list_view": { "type": "string" }, "list_view_id": { "type": "string" }, "message_blocks": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "string" }, "mimetype": { "type": "string" }, "mrkdwn_in": { "type": "array", "items": { "type": "string" } }, "msg_subtype": { "type": "string" }, "original_url": { "type": "string" }, "pretext": { "type": "string" }, "preview": { "type": "string" }, "service_icon": { "type": "string" }, "service_name": { "type": "string" }, "service_url": { "type": "string" }, "size": { "type": "number" }, "slack_file_id": { "type": "string" }, "text": { "type": "string" }, "thumb_height": { "type": "number" }, "thumb_url": { "type": "string" }, "thumb_width": { "type": "number" }, "title": { "type": "string" }, "title_link": { "type": "string" }, "ts": { "type": "string" }, "url": { "type": "string" }, "video_html": { "type": "string" }, "video_html_height": { "type": "number" }, "video_html_width": { "type": "number" }, "video_url": { "type": "string" } } } }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "accessory": { "type": "string" }, "alt_text": { "type": "string" }, "api_decoration_available": { "type": "boolean" }, "app_collaborators": { "type": "array", "items": { "type": "string" } }, "app_id": { "type": "string" }, "author_name": { "type": "string" }, "block_id": { "type": "string" }, "bot_user_id": { "type": "string" }, "button_label": { "type": "string" }, "call": { "type": "string" }, "call_id": { "type": "string" }, "description": { "type": "string" }, "developer_trace_id": { "type": "string" }, "dispatch_action": { "type": "boolean" }, "element": { "type": "string" }, "elements": { "type": "array", "items": { "type": "string" } }, "expand": { "type": "boolean" }, "external_id": { "type": "string" }, "fallback": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "file": { "type": "string" }, "file_id": { "type": "string" }, "function_trigger_id": { "type": "string" }, "hint": { "type": "string" }, "image_bytes": { "type": "number" }, "image_height": { "type": "number" }, "image_url": { "type": "string" }, "image_width": { "type": "number" }, "is_animated": { "type": "boolean" }, "is_workflow_app": { "type": "boolean" }, "label": { "type": "string" }, "optional": { "type": "boolean" }, "owning_team_id": { "type": "string" }, "provider_icon_url": { "type": "string" }, "provider_name": { "type": "string" }, "sales_home_workflow_app_type": { "type": "number" }, "share_url": { "type": "string" }, "slack_file": { "type": "string" }, "source": { "type": "string" }, "text": { "type": "string" }, "thumbnail_url": { "type": "string" }, "title": { "type": "string" }, "title_url": { "type": "string" }, "trigger_subtype": { "type": "string" }, "trigger_type": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" }, "video_url": { "type": "string" }, "workflow_id": { "type": "string" } } } }, "bot_id": { "type": "string" }, "bot_profile": { "type": "object", "properties": { "app_id": { "type": "string" }, "deleted": { "type": "boolean" }, "icons": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "team_id": { "type": "string" }, "updated": { "type": "number" }, "user_id": { "type": "string" } } }, "client_msg_id": { "type": "string" }, "display_as_bot": { "type": "boolean" }, "edited": { "type": "object", "properties": { "ts": { "type": "string" }, "user": { "type": "string" } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "access": { "type": "string" }, "alt_txt": { "type": "string" }, "app_id": { "type": "string" }, "app_name": { "type": "string" }, "app_provides_file_work_objects": { "type": "boolean" }, "attachments": { "type": "array", "items": {} }, "blocks": { "type": "array", "items": { "type": "string" } }, "bot_id": { "type": "string" }, "can_toggle_canvas_lock": { "type": "boolean" }, "canvas_creator_id": { "type": "string" }, "canvas_printing_enabled": { "type": "boolean" }, "canvas_readtime": { "type": "number" }, "canvas_template_mode": { "type": "string" }, "cc": { "type": "array", "items": { "type": "string" } }, "channel_actions_count": { "type": "number" }, "channel_actions_ts": { "type": "string" }, "channels": { "type": "array", "items": { "type": "string" } }, "comments_count": { "type": "number" }, "converted_pdf": { "type": "string" }, "created": { "type": "number" }, "deanimate": { "type": "string" }, "deanimate_gif": { "type": "string" }, "display_as_bot": { "type": "boolean" }, "dm_mpdm_users_with_file_access": { "type": "array", "items": { "type": "string" } }, "duration_ms": { "type": "number" }, "edit_link": { "type": "string" }, "edit_timestamp": { "type": "number" }, "editable": { "type": "boolean" }, "editor": { "type": "string" }, "editors": { "type": "array", "items": { "type": "string" } }, "external_id": { "type": "string" }, "external_type": { "type": "string" }, "external_url": { "type": "string" }, "favorites": { "type": "array", "items": { "type": "string" } }, "file_access": { "type": "string" }, "filetype": { "type": "string" }, "from": { "type": "array", "items": { "type": "string" } }, "groups": { "type": "array", "items": { "type": "string" } }, "has_more": { "type": "boolean" }, "has_more_shares": { "type": "boolean" }, "has_rich_preview": { "type": "boolean" }, "headers": { "type": "string" }, "hls": { "type": "string" }, "hls_embed": { "type": "string" }, "id": { "type": "string" }, "image_exif_rotation": { "type": "number" }, "ims": { "type": "array", "items": { "type": "string" } }, "initial_comment": { "type": "string" }, "inline_attachment_count": { "type": "number" }, "is_ai_suggested": { "type": "boolean" }, "is_channel_space": { "type": "boolean" }, "is_external": { "type": "boolean" }, "is_modified_by_ai": { "type": "boolean" }, "is_public": { "type": "boolean" }, "is_restricted_sharing_enabled": { "type": "boolean" }, "is_starred": { "type": "boolean" }, "last_editor": { "type": "string" }, "last_read": { "type": "number" }, "lines": { "type": "number" }, "lines_more": { "type": "number" }, "linked_channel_id": { "type": "string" }, "list_csv_download_url": { "type": "string" }, "list_limits": { "type": "string" }, "list_metadata": { "type": "string" }, "media_display_type": { "type": "string" }, "media_progress": { "type": "string" }, "mimetype": { "type": "string" }, "mode": { "type": "string" }, "mp4": { "type": "string" }, "mp4_low": { "type": "string" }, "name": { "type": "string" }, "non_owner_editable": { "type": "boolean" }, "num_stars": { "type": "number" }, "org_or_workspace_access": { "type": "string" }, "original_attachment_count": { "type": "number" }, "original_h": { "type": "string" }, "original_w": { "type": "string" }, "permalink": { "type": "string" }, "permalink_public": { "type": "string" }, "pinned_to": { "type": "array", "items": { "type": "string" } }, "pjpeg": { "type": "string" }, "plain_text": { "type": "string" }, "pretty_type": { "type": "string" }, "preview": { "type": "string" }, "preview_highlight": { "type": "string" }, "preview_is_truncated": { "type": "boolean" }, "preview_plain_text": { "type": "string" }, "private_channels_with_file_access_count": { "type": "number" }, "private_file_with_access_count": { "type": "number" }, "public_url_shared": { "type": "boolean" }, "quip_thread_id": { "type": "string" }, "reactions": { "type": "array", "items": { "type": "string" } }, "saved": { "type": "string" }, "sent_to_self": { "type": "boolean" }, "shares": { "type": "string" }, "show_badge": { "type": "boolean" }, "simplified_html": { "type": "string" }, "size": { "type": "number" }, "skipped_shares": { "type": "boolean" }, "source_team": { "type": "string" }, "subject": { "type": "string" }, "subtype": { "type": "string" }, "team_pref_version_history_enabled": { "type": "boolean" }, "teams_shared_with": { "type": "array", "items": {} }, "template_conversion_ts": { "type": "number" }, "template_description": { "type": "string" }, "template_icon": { "type": "string" }, "template_name": { "type": "string" }, "template_title": { "type": "string" }, "thumb_1024": { "type": "string" }, "thumb_1024_gif": { "type": "string" }, "thumb_1024_h": { "type": "string" }, "thumb_1024_w": { "type": "string" }, "thumb_160": { "type": "string" }, "thumb_160_gif": { "type": "string" }, "thumb_160_h": { "type": "string" }, "thumb_160_w": { "type": "string" }, "thumb_360": { "type": "string" }, "thumb_360_gif": { "type": "string" }, "thumb_360_h": { "type": "string" }, "thumb_360_w": { "type": "string" }, "thumb_480": { "type": "string" }, "thumb_480_gif": { "type": "string" }, "thumb_480_h": { "type": "string" }, "thumb_480_w": { "type": "string" }, "thumb_64": { "type": "string" }, "thumb_64_gif": { "type": "string" }, "thumb_64_h": { "type": "string" }, "thumb_64_w": { "type": "string" }, "thumb_720": { "type": "string" }, "thumb_720_gif": { "type": "string" }, "thumb_720_h": { "type": "string" }, "thumb_720_w": { "type": "string" }, "thumb_80": { "type": "string" }, "thumb_800": { "type": "string" }, "thumb_800_gif": { "type": "string" }, "thumb_800_h": { "type": "string" }, "thumb_800_w": { "type": "string" }, "thumb_80_gif": { "type": "string" }, "thumb_80_h": { "type": "string" }, "thumb_80_w": { "type": "string" }, "thumb_960": { "type": "string" }, "thumb_960_gif": { "type": "string" }, "thumb_960_h": { "type": "string" }, "thumb_960_w": { "type": "string" }, "thumb_gif": { "type": "string" }, "thumb_pdf": { "type": "string" }, "thumb_pdf_h": { "type": "string" }, "thumb_pdf_w": { "type": "string" }, "thumb_tiny": { "type": "string" }, "thumb_video": { "type": "string" }, "thumb_video_h": { "type": "number" }, "thumb_video_w": { "type": "number" }, "timestamp": { "type": "number" }, "title": { "type": "string" }, "title_blocks": { "type": "array", "items": { "type": "string" } }, "to": { "type": "array", "items": { "type": "string" } }, "transcription": { "type": "string" }, "update_notification": { "type": "number" }, "updated": { "type": "number" }, "url_private": { "type": "string" }, "url_private_download": { "type": "string" }, "url_static_preview": { "type": "string" }, "user": { "type": "string" }, "user_team": { "type": "string" }, "username": { "type": "string" }, "vtt": { "type": "string" } } } }, "hidden": { "type": "boolean" }, "icons": { "type": "object", "properties": { "emoji": { "type": "string" }, "image_36": { "type": "string" }, "image_48": { "type": "string" }, "image_64": { "type": "string" }, "image_72": { "type": "string" } } }, "inviter": { "type": "string" }, "is_locked": { "type": "boolean" }, "language": { "type": "object", "properties": { "is_reliable": { "type": "boolean" }, "locale": { "type": "string" } } }, "latest_reply": { "type": "string" }, "metadata": { "type": "object", "properties": { "event_payload": { "type": "string" }, "event_type": { "type": "string" } } }, "parent_user_id": { "type": "string" }, "purpose": { "type": "string" }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "number" }, "name": { "type": "string" }, "url": { "type": "string" }, "users": { "type": "array", "items": { "type": "string" } } } } }, "reply_count": { "type": "number" }, "reply_users": { "type": "array", "items": { "type": "string" } }, "reply_users_count": { "type": "number" }, "root": { "type": "object", "properties": { "bot_id": { "type": "string" }, "icons": { "type": "string" }, "latest_reply": { "type": "string" }, "parent_user_id": { "type": "string" }, "reply_count": { "type": "number" }, "reply_users": { "type": "array", "items": { "type": "string" } }, "reply_users_count": { "type": "number" }, "subscribed": { "type": "boolean" }, "subtype": { "type": "string" }, "text": { "type": "string" }, "thread_ts": { "type": "string" }, "ts": { "type": "string" }, "type": { "type": "string" }, "username": { "type": "string" } } }, "subscribed": { "type": "boolean" }, "subtype": { "type": "string" }, "team": { "type": "string" }, "text": { "type": "string" }, "thread_ts": { "type": "string" }, "topic": { "type": "string" }, "ts": { "type": "string" }, "type": { "type": "string" }, "upload": { "type": "boolean" }, "user": { "type": "string" }, "username": { "type": "string" }, "x_files": { "type": "array", "items": { "type": "string" } } } } }, "required": ["from", "content"] }, "description": "List of messages from the channel history" } }, "required": ["messages"] }
|
|
3375
3409
|
},
|
|
3376
3410
|
"fetchYoutubeCaptions": {
|
|
3377
3411
|
stepType: "fetchYoutubeCaptions",
|
|
@@ -4819,7 +4853,7 @@ async function attemptTurn(httpConfig, body) {
|
|
|
4819
4853
|
const reader = res.body.getReader();
|
|
4820
4854
|
const decoder = new TextDecoder();
|
|
4821
4855
|
let buffer = "";
|
|
4822
|
-
const
|
|
4856
|
+
const events2 = [];
|
|
4823
4857
|
let text = "";
|
|
4824
4858
|
const toolCalls = [];
|
|
4825
4859
|
let turn = null;
|
|
@@ -4841,7 +4875,7 @@ async function attemptTurn(httpConfig, body) {
|
|
|
4841
4875
|
}
|
|
4842
4876
|
if (event.type === "turn") {
|
|
4843
4877
|
turn = {
|
|
4844
|
-
events,
|
|
4878
|
+
events: events2,
|
|
4845
4879
|
text,
|
|
4846
4880
|
toolCalls,
|
|
4847
4881
|
stopReason: typeof event.stopReason === "string" ? event.stopReason : "end_turn",
|
|
@@ -4859,7 +4893,7 @@ async function attemptTurn(httpConfig, body) {
|
|
|
4859
4893
|
input: event.input ?? {}
|
|
4860
4894
|
});
|
|
4861
4895
|
}
|
|
4862
|
-
|
|
4896
|
+
events2.push(event);
|
|
4863
4897
|
};
|
|
4864
4898
|
while (true) {
|
|
4865
4899
|
let stallTimer;
|
|
@@ -5786,6 +5820,7 @@ var MindStudioAgent = class {
|
|
|
5786
5820
|
_voice;
|
|
5787
5821
|
_analytics;
|
|
5788
5822
|
_email;
|
|
5823
|
+
_events;
|
|
5789
5824
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
5790
5825
|
_authType;
|
|
5791
5826
|
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
@@ -6830,6 +6865,25 @@ var MindStudioAgent = class {
|
|
|
6830
6865
|
this._analyticsRequest.bind(this)
|
|
6831
6866
|
);
|
|
6832
6867
|
}
|
|
6868
|
+
/**
|
|
6869
|
+
* The `events` namespace — server→client realtime. `publish()` pushes to
|
|
6870
|
+
* named channels; `grant()` mints the subscribe token a client presents to
|
|
6871
|
+
* the platform-held events stream. See {@link Events} for the channel-shape
|
|
6872
|
+
* and at-most-once semantics.
|
|
6873
|
+
*
|
|
6874
|
+
* @example
|
|
6875
|
+
* ```ts
|
|
6876
|
+
* import { auth, events } from '@mindstudio-ai/agent';
|
|
6877
|
+
*
|
|
6878
|
+
* export async function watchJobs() {
|
|
6879
|
+
* auth.requireRole('operator');
|
|
6880
|
+
* return await events.grant(`jobs:${auth.userId}`); // { token, expiresAt, ttlSeconds }
|
|
6881
|
+
* }
|
|
6882
|
+
* ```
|
|
6883
|
+
*/
|
|
6884
|
+
get events() {
|
|
6885
|
+
return this._events ??= createEvents(this._eventsRequest.bind(this));
|
|
6886
|
+
}
|
|
6833
6887
|
/**
|
|
6834
6888
|
* Outbound email: sending, the per-recipient delivery log, blast stats, and
|
|
6835
6889
|
* this app's unsubscribe list.
|
|
@@ -7010,6 +7064,21 @@ var MindStudioAgent = class {
|
|
|
7010
7064
|
fallbackCode: "email_error"
|
|
7011
7065
|
});
|
|
7012
7066
|
}
|
|
7067
|
+
/**
|
|
7068
|
+
* @internal Transport for the `events` namespace —
|
|
7069
|
+
* POST /_internal/v2/app-events/<op> with the raw hook token.
|
|
7070
|
+
*
|
|
7071
|
+
* No 429 retry: a retried publish is a duplicate nudge, and grants are
|
|
7072
|
+
* cheap for the caller to re-request. Errors throw (unlike `stream()`) —
|
|
7073
|
+
* publishing is an explicit act, and "nobody was listening" is expressed as
|
|
7074
|
+
* `delivered: 0`, never as an HTTP failure.
|
|
7075
|
+
*/
|
|
7076
|
+
async _eventsRequest(op, body) {
|
|
7077
|
+
return this._brokeredRequest("app-events", op, body, {
|
|
7078
|
+
fallbackMessage: "Events call failed",
|
|
7079
|
+
fallbackCode: "events_error"
|
|
7080
|
+
});
|
|
7081
|
+
}
|
|
7013
7082
|
async _analyticsRequest(op, body) {
|
|
7014
7083
|
const call = () => this._brokeredRequest("analytics", op, body, {
|
|
7015
7084
|
fallbackMessage: "Analytics read failed",
|
|
@@ -7926,6 +7995,13 @@ var email = new Proxy({}, {
|
|
|
7926
7995
|
return typeof value === "function" ? value.bind(target) : value;
|
|
7927
7996
|
}
|
|
7928
7997
|
});
|
|
7998
|
+
var events = new Proxy({}, {
|
|
7999
|
+
get(_, prop) {
|
|
8000
|
+
const target = mindstudio.events;
|
|
8001
|
+
const value = Reflect.get(target, prop, target);
|
|
8002
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
8003
|
+
}
|
|
8004
|
+
});
|
|
7929
8005
|
var session = new Proxy(
|
|
7930
8006
|
{},
|
|
7931
8007
|
{
|
|
@@ -7944,6 +8020,7 @@ var prerender = {
|
|
|
7944
8020
|
};
|
|
7945
8021
|
export {
|
|
7946
8022
|
AuthContext,
|
|
8023
|
+
MAX_EVENT_PAYLOAD_CHARS,
|
|
7947
8024
|
MindStudioAgent2 as MindStudioAgent,
|
|
7948
8025
|
MindStudioError,
|
|
7949
8026
|
Roles,
|
|
@@ -7955,6 +8032,7 @@ export {
|
|
|
7955
8032
|
index_default as default,
|
|
7956
8033
|
defineJewel,
|
|
7957
8034
|
email,
|
|
8035
|
+
events,
|
|
7958
8036
|
files,
|
|
7959
8037
|
getRequestContext,
|
|
7960
8038
|
mindstudio,
|