@mindstudio-ai/agent 0.1.111 → 0.1.113
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 +68 -9
- package/dist/index.d.ts +110 -1
- package/dist/index.js +64 -4
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +68 -9
- package/llms.txt +30 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3276,6 +3276,58 @@ interface Email {
|
|
|
3276
3276
|
unsuppress(email: string): Promise<UnsuppressResult>;
|
|
3277
3277
|
}
|
|
3278
3278
|
|
|
3279
|
+
interface EventGrantOptions {
|
|
3280
|
+
/**
|
|
3281
|
+
* Grant lifetime in seconds — also the stream lifetime and the
|
|
3282
|
+
* authorization staleness budget. The platform clamps to [60, 3600]
|
|
3283
|
+
* (default 900): at expiry the stream closes and the client re-mints
|
|
3284
|
+
* through your method, which re-runs your checks. A user whose access you
|
|
3285
|
+
* revoke keeps receiving for at most this long.
|
|
3286
|
+
*/
|
|
3287
|
+
ttlSeconds?: number;
|
|
3288
|
+
}
|
|
3289
|
+
interface EventGrantResult {
|
|
3290
|
+
/** Bearer token for `GET /_/events` (`Accept: text/event-stream`). */
|
|
3291
|
+
token: string;
|
|
3292
|
+
/** Milliseconds since epoch; the stream closes at this instant. */
|
|
3293
|
+
expiresAt: number;
|
|
3294
|
+
/** The clamped lifetime actually applied. */
|
|
3295
|
+
ttlSeconds: number;
|
|
3296
|
+
}
|
|
3297
|
+
interface Events {
|
|
3298
|
+
/**
|
|
3299
|
+
* Publish a payload to one or many channels — one call, up to 500 channels,
|
|
3300
|
+
* so fanning out to every member of a room is a single request.
|
|
3301
|
+
*
|
|
3302
|
+
* Returns how many live subscriber connections were counted across the
|
|
3303
|
+
* published channels (a connection matching several of them counts once per
|
|
3304
|
+
* channel). `delivered: 0` is not an error — it means nobody is listening
|
|
3305
|
+
* right now, which is normal for a nudge.
|
|
3306
|
+
*
|
|
3307
|
+
* Payloads are capped at 32k serialized characters: publish ids and let the
|
|
3308
|
+
* client fetch, not documents.
|
|
3309
|
+
*
|
|
3310
|
+
* @throws MindStudioError on invalid channels, an oversize payload, or a
|
|
3311
|
+
* platform failure. Unlike `stream()`, publishing is an explicit act and
|
|
3312
|
+
* failures are not swallowed.
|
|
3313
|
+
*/
|
|
3314
|
+
publish(channels: string | string[], data: unknown): Promise<{
|
|
3315
|
+
delivered: number;
|
|
3316
|
+
}>;
|
|
3317
|
+
/**
|
|
3318
|
+
* Mint a subscribe token for an explicit list of channels (up to 100, exact
|
|
3319
|
+
* names — letters, digits, `: _ - .`, no wildcards). Do your authorization
|
|
3320
|
+
* first; whoever holds the returned token WILL receive those channels'
|
|
3321
|
+
* events for its lifetime.
|
|
3322
|
+
*
|
|
3323
|
+
* Return the result from your method (`return await events.grant(...)`);
|
|
3324
|
+
* the client passes `result.token` to the events stream (the frontend SDK's
|
|
3325
|
+
* `getToken`, or `Authorization: Bearer` on `GET /_/events` for an external
|
|
3326
|
+
* client).
|
|
3327
|
+
*/
|
|
3328
|
+
grant(channels: string | string[], options?: EventGrantOptions): Promise<EventGrantResult>;
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3279
3331
|
/**
|
|
3280
3332
|
* JSON Schema support for task-agent structured output.
|
|
3281
3333
|
*
|
|
@@ -3591,6 +3643,7 @@ declare class MindStudioAgent$1 {
|
|
|
3591
3643
|
private _voice;
|
|
3592
3644
|
private _analytics;
|
|
3593
3645
|
private _email;
|
|
3646
|
+
private _events;
|
|
3594
3647
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
3595
3648
|
private _authType;
|
|
3596
3649
|
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
@@ -3941,6 +3994,23 @@ declare class MindStudioAgent$1 {
|
|
|
3941
3994
|
* ```
|
|
3942
3995
|
*/
|
|
3943
3996
|
get analytics(): Analytics;
|
|
3997
|
+
/**
|
|
3998
|
+
* The `events` namespace — server→client realtime. `publish()` pushes to
|
|
3999
|
+
* named channels; `grant()` mints the subscribe token a client presents to
|
|
4000
|
+
* the platform-held events stream. See {@link Events} for the channel-shape
|
|
4001
|
+
* and at-most-once semantics.
|
|
4002
|
+
*
|
|
4003
|
+
* @example
|
|
4004
|
+
* ```ts
|
|
4005
|
+
* import { auth, events } from '@mindstudio-ai/agent';
|
|
4006
|
+
*
|
|
4007
|
+
* export async function watchJobs() {
|
|
4008
|
+
* auth.requireRole('operator');
|
|
4009
|
+
* return await events.grant(`jobs:${auth.userId}`); // { token, expiresAt, ttlSeconds }
|
|
4010
|
+
* }
|
|
4011
|
+
* ```
|
|
4012
|
+
*/
|
|
4013
|
+
get events(): Events;
|
|
3944
4014
|
/**
|
|
3945
4015
|
* Outbound email: sending, the per-recipient delivery log, blast stats, and
|
|
3946
4016
|
* this app's unsubscribe list.
|
|
@@ -4031,6 +4101,16 @@ declare class MindStudioAgent$1 {
|
|
|
4031
4101
|
* retry a read itself.
|
|
4032
4102
|
*/
|
|
4033
4103
|
private _emailRequest;
|
|
4104
|
+
/**
|
|
4105
|
+
* @internal Transport for the `events` namespace —
|
|
4106
|
+
* POST /_internal/v2/app-events/<op> with the raw hook token.
|
|
4107
|
+
*
|
|
4108
|
+
* No 429 retry: a retried publish is a duplicate nudge, and grants are
|
|
4109
|
+
* cheap for the caller to re-request. Errors throw (unlike `stream()`) —
|
|
4110
|
+
* publishing is an explicit act, and "nobody was listening" is expressed as
|
|
4111
|
+
* `delivered: 0`, never as an HTTP failure.
|
|
4112
|
+
*/
|
|
4113
|
+
private _eventsRequest;
|
|
4034
4114
|
private _analyticsRequest;
|
|
4035
4115
|
/**
|
|
4036
4116
|
* @internal Shared shape for the brokered `/_internal/v2/<ns>/<op>` data
|
|
@@ -4157,6 +4237,11 @@ declare class MindStudioAgent$1 {
|
|
|
4157
4237
|
* page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
|
|
4158
4238
|
* array) to purge every snapshot for the app.
|
|
4159
4239
|
*
|
|
4240
|
+
* `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
|
|
4241
|
+
* served on. If another app mounts this one under a path prefix, the copies
|
|
4242
|
+
* cached at that prefix are purged too — no need to know or pass the mount
|
|
4243
|
+
* path.
|
|
4244
|
+
*
|
|
4160
4245
|
* Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
|
|
4161
4246
|
* token. Backend / managed-context only.
|
|
4162
4247
|
*
|
|
@@ -11452,6 +11537,27 @@ declare const analytics: Analytics;
|
|
|
11452
11537
|
* ```
|
|
11453
11538
|
*/
|
|
11454
11539
|
declare const email: Email;
|
|
11540
|
+
/**
|
|
11541
|
+
* Server→client realtime — publish to named channels and mint subscribe
|
|
11542
|
+
* grants. A channel is an audience, and a method decides who is in it; events
|
|
11543
|
+
* are at-most-once nudges (subscribe for speed, reconcile for truth). See
|
|
11544
|
+
* {@link Events}.
|
|
11545
|
+
*
|
|
11546
|
+
* @example
|
|
11547
|
+
* ```ts
|
|
11548
|
+
* import { auth, events } from '@mindstudio-ai/agent';
|
|
11549
|
+
*
|
|
11550
|
+
* // The subscribe door is one of your own methods:
|
|
11551
|
+
* export async function watchJobs() {
|
|
11552
|
+
* auth.requireRole('operator');
|
|
11553
|
+
* return await events.grant(`jobs:${auth.userId}`); // { token, expiresAt, ttlSeconds }
|
|
11554
|
+
* }
|
|
11555
|
+
*
|
|
11556
|
+
* // Anything can publish — a method, a cron, a webhook handler:
|
|
11557
|
+
* await events.publish(`jobs:${job.operator}`, { type: 'job', id: job.id });
|
|
11558
|
+
* ```
|
|
11559
|
+
*/
|
|
11560
|
+
declare const events: Events;
|
|
11455
11561
|
/**
|
|
11456
11562
|
* Originating-session identity for this invocation — set when the method was
|
|
11457
11563
|
* triggered by a conversational surface (a voice call's tool use, an
|
|
@@ -11544,6 +11650,9 @@ declare const reportIssue: (input: ReportIssueInput) => Promise<ReportedIssue>;
|
|
|
11544
11650
|
* on their next visit. Bound to the default singleton. Backend / managed-context
|
|
11545
11651
|
* only. Omit `paths` (or pass an empty array) to purge every snapshot.
|
|
11546
11652
|
*
|
|
11653
|
+
* Pass this app's own route paths; snapshots of those routes cached under
|
|
11654
|
+
* another app's mount prefix are purged along with them.
|
|
11655
|
+
*
|
|
11547
11656
|
* @example
|
|
11548
11657
|
* ```ts
|
|
11549
11658
|
* import { prerender } from '@mindstudio-ai/agent';
|
|
@@ -11559,4 +11668,4 @@ declare const prerender: {
|
|
|
11559
11668
|
}>;
|
|
11560
11669
|
};
|
|
11561
11670
|
|
|
11562
|
-
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 };
|
|
11671
|
+
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, 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
|
@@ -478,7 +478,7 @@ var AuthContext = class {
|
|
|
478
478
|
constructor(ctx) {
|
|
479
479
|
this.userId = ctx.userId;
|
|
480
480
|
this._roleAssignments = ctx.roleAssignments;
|
|
481
|
-
this.roles = ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
|
|
481
|
+
this.roles = ctx.userId == null ? [] : ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
|
|
482
482
|
}
|
|
483
483
|
/**
|
|
484
484
|
* Check if the current user has **any** of the given roles.
|
|
@@ -3072,6 +3072,18 @@ function createEmail(call) {
|
|
|
3072
3072
|
};
|
|
3073
3073
|
}
|
|
3074
3074
|
|
|
3075
|
+
// src/events/index.ts
|
|
3076
|
+
function createEvents(call) {
|
|
3077
|
+
return {
|
|
3078
|
+
publish(channels, data) {
|
|
3079
|
+
return call("publish", { channels, data });
|
|
3080
|
+
},
|
|
3081
|
+
grant(channels, options) {
|
|
3082
|
+
return call("grant", { channels, ttlSeconds: options?.ttlSeconds });
|
|
3083
|
+
}
|
|
3084
|
+
};
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3075
3087
|
// src/task/index.ts
|
|
3076
3088
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
3077
3089
|
|
|
@@ -4819,7 +4831,7 @@ async function attemptTurn(httpConfig, body) {
|
|
|
4819
4831
|
const reader = res.body.getReader();
|
|
4820
4832
|
const decoder = new TextDecoder();
|
|
4821
4833
|
let buffer = "";
|
|
4822
|
-
const
|
|
4834
|
+
const events2 = [];
|
|
4823
4835
|
let text = "";
|
|
4824
4836
|
const toolCalls = [];
|
|
4825
4837
|
let turn = null;
|
|
@@ -4841,7 +4853,7 @@ async function attemptTurn(httpConfig, body) {
|
|
|
4841
4853
|
}
|
|
4842
4854
|
if (event.type === "turn") {
|
|
4843
4855
|
turn = {
|
|
4844
|
-
events,
|
|
4856
|
+
events: events2,
|
|
4845
4857
|
text,
|
|
4846
4858
|
toolCalls,
|
|
4847
4859
|
stopReason: typeof event.stopReason === "string" ? event.stopReason : "end_turn",
|
|
@@ -4859,7 +4871,7 @@ async function attemptTurn(httpConfig, body) {
|
|
|
4859
4871
|
input: event.input ?? {}
|
|
4860
4872
|
});
|
|
4861
4873
|
}
|
|
4862
|
-
|
|
4874
|
+
events2.push(event);
|
|
4863
4875
|
};
|
|
4864
4876
|
while (true) {
|
|
4865
4877
|
let stallTimer;
|
|
@@ -5786,6 +5798,7 @@ var MindStudioAgent = class {
|
|
|
5786
5798
|
_voice;
|
|
5787
5799
|
_analytics;
|
|
5788
5800
|
_email;
|
|
5801
|
+
_events;
|
|
5789
5802
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
5790
5803
|
_authType;
|
|
5791
5804
|
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
@@ -6830,6 +6843,25 @@ var MindStudioAgent = class {
|
|
|
6830
6843
|
this._analyticsRequest.bind(this)
|
|
6831
6844
|
);
|
|
6832
6845
|
}
|
|
6846
|
+
/**
|
|
6847
|
+
* The `events` namespace — server→client realtime. `publish()` pushes to
|
|
6848
|
+
* named channels; `grant()` mints the subscribe token a client presents to
|
|
6849
|
+
* the platform-held events stream. See {@link Events} for the channel-shape
|
|
6850
|
+
* and at-most-once semantics.
|
|
6851
|
+
*
|
|
6852
|
+
* @example
|
|
6853
|
+
* ```ts
|
|
6854
|
+
* import { auth, events } from '@mindstudio-ai/agent';
|
|
6855
|
+
*
|
|
6856
|
+
* export async function watchJobs() {
|
|
6857
|
+
* auth.requireRole('operator');
|
|
6858
|
+
* return await events.grant(`jobs:${auth.userId}`); // { token, expiresAt, ttlSeconds }
|
|
6859
|
+
* }
|
|
6860
|
+
* ```
|
|
6861
|
+
*/
|
|
6862
|
+
get events() {
|
|
6863
|
+
return this._events ??= createEvents(this._eventsRequest.bind(this));
|
|
6864
|
+
}
|
|
6833
6865
|
/**
|
|
6834
6866
|
* Outbound email: sending, the per-recipient delivery log, blast stats, and
|
|
6835
6867
|
* this app's unsubscribe list.
|
|
@@ -7010,6 +7042,21 @@ var MindStudioAgent = class {
|
|
|
7010
7042
|
fallbackCode: "email_error"
|
|
7011
7043
|
});
|
|
7012
7044
|
}
|
|
7045
|
+
/**
|
|
7046
|
+
* @internal Transport for the `events` namespace —
|
|
7047
|
+
* POST /_internal/v2/app-events/<op> with the raw hook token.
|
|
7048
|
+
*
|
|
7049
|
+
* No 429 retry: a retried publish is a duplicate nudge, and grants are
|
|
7050
|
+
* cheap for the caller to re-request. Errors throw (unlike `stream()`) —
|
|
7051
|
+
* publishing is an explicit act, and "nobody was listening" is expressed as
|
|
7052
|
+
* `delivered: 0`, never as an HTTP failure.
|
|
7053
|
+
*/
|
|
7054
|
+
async _eventsRequest(op, body) {
|
|
7055
|
+
return this._brokeredRequest("app-events", op, body, {
|
|
7056
|
+
fallbackMessage: "Events call failed",
|
|
7057
|
+
fallbackCode: "events_error"
|
|
7058
|
+
});
|
|
7059
|
+
}
|
|
7013
7060
|
async _analyticsRequest(op, body) {
|
|
7014
7061
|
const call = () => this._brokeredRequest("analytics", op, body, {
|
|
7015
7062
|
fallbackMessage: "Analytics read failed",
|
|
@@ -7398,6 +7445,11 @@ var MindStudioAgent = class {
|
|
|
7398
7445
|
* page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
|
|
7399
7446
|
* array) to purge every snapshot for the app.
|
|
7400
7447
|
*
|
|
7448
|
+
* `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
|
|
7449
|
+
* served on. If another app mounts this one under a path prefix, the copies
|
|
7450
|
+
* cached at that prefix are purged too — no need to know or pass the mount
|
|
7451
|
+
* path.
|
|
7452
|
+
*
|
|
7401
7453
|
* Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
|
|
7402
7454
|
* token. Backend / managed-context only.
|
|
7403
7455
|
*
|
|
@@ -7921,6 +7973,13 @@ var email = new Proxy({}, {
|
|
|
7921
7973
|
return typeof value === "function" ? value.bind(target) : value;
|
|
7922
7974
|
}
|
|
7923
7975
|
});
|
|
7976
|
+
var events = new Proxy({}, {
|
|
7977
|
+
get(_, prop) {
|
|
7978
|
+
const target = mindstudio.events;
|
|
7979
|
+
const value = Reflect.get(target, prop, target);
|
|
7980
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
7981
|
+
}
|
|
7982
|
+
});
|
|
7924
7983
|
var session = new Proxy(
|
|
7925
7984
|
{},
|
|
7926
7985
|
{
|
|
@@ -7950,6 +8009,7 @@ export {
|
|
|
7950
8009
|
index_default as default,
|
|
7951
8010
|
defineJewel,
|
|
7952
8011
|
email,
|
|
8012
|
+
events,
|
|
7953
8013
|
files,
|
|
7954
8014
|
getRequestContext,
|
|
7955
8015
|
mindstudio,
|