@mindstudio-ai/agent 0.1.172 → 0.1.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/cli.js +43 -35
- package/dist/index.d.ts +240 -40
- package/dist/index.js +37 -29
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +43 -35
- package/llms.txt +11 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3512,14 +3512,41 @@ interface Voice {
|
|
|
3512
3512
|
* the callee to this app's voice agent. Returns as soon as dialing starts;
|
|
3513
3513
|
* the outcome (answered, busy, no answer) lands on the call record.
|
|
3514
3514
|
*/
|
|
3515
|
-
call(params:
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3515
|
+
call(params: VoiceCallParams): Promise<VoiceCallResult>;
|
|
3516
|
+
}
|
|
3517
|
+
/** What `voice.call()` takes. */
|
|
3518
|
+
interface VoiceCallParams {
|
|
3519
|
+
/** The number to dial, E.164. */
|
|
3520
|
+
to: string;
|
|
3521
|
+
/**
|
|
3522
|
+
* Which of the app's own numbers to call from, E.164. Required once the
|
|
3523
|
+
* app has more than one; with one it's that one.
|
|
3524
|
+
*/
|
|
3525
|
+
from?: string;
|
|
3526
|
+
/** Run the call as the user who invoked this method. */
|
|
3527
|
+
assumeIdentity?: boolean;
|
|
3519
3528
|
}
|
|
3520
3529
|
|
|
3521
|
-
|
|
3522
|
-
|
|
3530
|
+
/**
|
|
3531
|
+
* Counts: `pageviews`, `visitors`, `visits`, `events`. Averages, `null` when
|
|
3532
|
+
* there's nothing to average: `timeOnPage` (seconds a page was actively read,
|
|
3533
|
+
* over the pages that reported), `scrollDepth` (% of the page, the deepest
|
|
3534
|
+
* each page reached), `visitDuration` (seconds of active reading per visit)
|
|
3535
|
+
* and `bounceRate` (% of visits with one pageview, no custom event and under
|
|
3536
|
+
* ten seconds active).
|
|
3537
|
+
*/
|
|
3538
|
+
type AnalyticsMetric = AnalyticsCountMetric | AnalyticsAverageMetric;
|
|
3539
|
+
type AnalyticsCountMetric = 'pageviews' | 'visitors' | 'visits' | 'events';
|
|
3540
|
+
type AnalyticsAverageMetric = 'timeOnPage' | 'scrollDepth' | 'visitDuration' | 'bounceRate';
|
|
3541
|
+
/**
|
|
3542
|
+
* What a row is grouped or filtered by. The `visit…`, `entryPath` and
|
|
3543
|
+
* `exitPath` dimensions describe the whole visit a row belongs to: where it
|
|
3544
|
+
* entered and left, and its first source and campaign. `prop:<key>` is a
|
|
3545
|
+
* custom event's property (a key of letters, digits, `_`, `-` and `.`).
|
|
3546
|
+
*/
|
|
3547
|
+
type AnalyticsDimension = 'path' | 'referrerHost' | 'sourceCategory' | 'country' | 'city' | 'deviceType' | 'browser' | 'os' | 'language' | 'visitorType' | 'utmSource' | 'utmMedium' | 'utmCampaign' | 'utmTerm' | 'utmContent' | 'eventName' | 'entryPath' | 'exitPath' | 'visitReferrerHost' | 'visitSourceCategory' | 'visitUtmSource' | 'visitUtmMedium' | 'visitUtmCampaign' | 'visitUtmTerm' | 'visitUtmContent' | `prop:${string}`;
|
|
3548
|
+
/** A filter only, never a group: the visit includes this custom event. */
|
|
3549
|
+
type AnalyticsFilterOnlyDimension = 'visitEvent';
|
|
3523
3550
|
type AnalyticsFilterOp = 'is' | 'is_not' | 'contains';
|
|
3524
3551
|
/**
|
|
3525
3552
|
* `[op, dimension, values]`. `is` matches any of the values; `is_not`
|
|
@@ -3527,14 +3554,20 @@ type AnalyticsFilterOp = 'is' | 'is_not' | 'contains';
|
|
|
3527
3554
|
* is case-insensitive substring. Only `is` filters can be served from the
|
|
3528
3555
|
* lifetime rollup — the others read the 90-day event table. `city` filters
|
|
3529
3556
|
* take plain city names (matching any country) and always read the 90-day
|
|
3530
|
-
* event table.
|
|
3557
|
+
* event table. A filter on a visit dimension keeps the rows of visits that
|
|
3558
|
+
* match; `['is', 'visitEvent', ['signup']]` keeps those of visits that fired
|
|
3559
|
+
* `signup`, so grouping them by `path` gives the pages that led to it.
|
|
3531
3560
|
*/
|
|
3532
|
-
type AnalyticsFilter = [
|
|
3561
|
+
type AnalyticsFilter = [
|
|
3562
|
+
AnalyticsFilterOp,
|
|
3563
|
+
AnalyticsDimension | AnalyticsFilterOnlyDimension,
|
|
3564
|
+
string[]
|
|
3565
|
+
];
|
|
3533
3566
|
type AnalyticsGranularity = '5m' | 'hour' | 'day' | 'week' | 'month';
|
|
3534
3567
|
/** Shorthand ("30d", "all") or explicit `[startISO, endISO]`. Default "24h". */
|
|
3535
3568
|
type AnalyticsDateRange = '1h' | '24h' | '7d' | '30d' | '90d' | 'all' | [string, string];
|
|
3536
3569
|
interface AnalyticsQuerySpec {
|
|
3537
|
-
/** At least one
|
|
3570
|
+
/** At least one metric. */
|
|
3538
3571
|
metrics: AnalyticsMetric[];
|
|
3539
3572
|
/** At most one entity dimension OR `'time'` (not both, yet). */
|
|
3540
3573
|
dimensions?: (AnalyticsDimension | 'time')[];
|
|
@@ -3548,8 +3581,11 @@ interface AnalyticsQuerySpec {
|
|
|
3548
3581
|
timezone?: string;
|
|
3549
3582
|
filters?: AnalyticsFilter[];
|
|
3550
3583
|
dateRange?: AnalyticsDateRange;
|
|
3551
|
-
/**
|
|
3552
|
-
|
|
3584
|
+
/**
|
|
3585
|
+
* Grouped queries only: one `['pageviews' | 'events' | 'visits', 'asc' |
|
|
3586
|
+
* 'desc']`, by a metric the query's shape carries.
|
|
3587
|
+
*/
|
|
3588
|
+
orderBy?: ['pageviews' | 'events' | 'visits', 'asc' | 'desc'][];
|
|
3553
3589
|
/** Grouped queries only. Default 25, max 1000. */
|
|
3554
3590
|
limit?: number;
|
|
3555
3591
|
offset?: number;
|
|
@@ -3559,8 +3595,11 @@ interface AnalyticsQuerySpec {
|
|
|
3559
3595
|
interface AnalyticsQueryResultRow {
|
|
3560
3596
|
/** Group keys: the entity dimension and/or `time` (bucket-start ISO). */
|
|
3561
3597
|
dimensions: Record<string, string>;
|
|
3562
|
-
/**
|
|
3563
|
-
|
|
3598
|
+
/**
|
|
3599
|
+
* Only the requested-and-available metrics appear. An average with nothing
|
|
3600
|
+
* to average is `null`.
|
|
3601
|
+
*/
|
|
3602
|
+
metrics: Partial<Record<AnalyticsCountMetric, number>> & Partial<Record<AnalyticsAverageMetric, number | null>>;
|
|
3564
3603
|
}
|
|
3565
3604
|
interface AnalyticsQueryResponse {
|
|
3566
3605
|
results: AnalyticsQueryResultRow[];
|
|
@@ -3571,7 +3610,10 @@ interface AnalyticsQueryResponse {
|
|
|
3571
3610
|
requested: [string, string];
|
|
3572
3611
|
served: [string, string];
|
|
3573
3612
|
};
|
|
3574
|
-
/**
|
|
3613
|
+
/**
|
|
3614
|
+
* True when an events-path window was cut: to the retention horizon, or
|
|
3615
|
+
* for a query about visits, to when the app's visits were first recorded.
|
|
3616
|
+
*/
|
|
3575
3617
|
clamped: boolean;
|
|
3576
3618
|
/** Requested metrics this query shape can't carry. */
|
|
3577
3619
|
metricsOmitted?: AnalyticsMetric[];
|
|
@@ -3587,6 +3629,84 @@ interface AnalyticsReadOptions {
|
|
|
3587
3629
|
limit?: number;
|
|
3588
3630
|
offset?: number;
|
|
3589
3631
|
}
|
|
3632
|
+
/**
|
|
3633
|
+
* A funnel step: a page opened (`match: 'contains'` for any page whose path
|
|
3634
|
+
* contains the text), or a custom event fired, optionally with property
|
|
3635
|
+
* values it must carry.
|
|
3636
|
+
*/
|
|
3637
|
+
type FunnelStep = {
|
|
3638
|
+
page: string;
|
|
3639
|
+
match?: 'is' | 'contains';
|
|
3640
|
+
} | {
|
|
3641
|
+
event: string;
|
|
3642
|
+
props?: Record<string, string | number | boolean>;
|
|
3643
|
+
};
|
|
3644
|
+
/** What `funnel` and `paths` report about the window and the apps they read. */
|
|
3645
|
+
interface VisitReadMeta {
|
|
3646
|
+
window: {
|
|
3647
|
+
requested: [string, string];
|
|
3648
|
+
served: [string, string];
|
|
3649
|
+
};
|
|
3650
|
+
/** True when the window was cut: to retention, or to when visits were first recorded. */
|
|
3651
|
+
clamped: boolean;
|
|
3652
|
+
/** The apps whose visits answered: this one, and those sharing its host (its mounts). */
|
|
3653
|
+
apps: string[];
|
|
3654
|
+
}
|
|
3655
|
+
interface FunnelOptions {
|
|
3656
|
+
/** 2 to 8 steps, each reached after the one before it within one visit. */
|
|
3657
|
+
steps: FunnelStep[];
|
|
3658
|
+
/** Split by something a visit has once: a visit dimension, `visitorType`, `deviceType`, `country`, `browser` or `os`. */
|
|
3659
|
+
breakdown?: AnalyticsDimension;
|
|
3660
|
+
dateRange?: AnalyticsDateRange;
|
|
3661
|
+
/** Pick visits: a visit is in when any of its rows matches every filter. */
|
|
3662
|
+
filters?: AnalyticsFilter[];
|
|
3663
|
+
releaseId?: string;
|
|
3664
|
+
}
|
|
3665
|
+
interface FunnelResult {
|
|
3666
|
+
steps: {
|
|
3667
|
+
step: FunnelStep;
|
|
3668
|
+
/** Visits that reached this step, having reached every one before it in order. */
|
|
3669
|
+
visits: number;
|
|
3670
|
+
/** Of those, the visits that didn't go on to the next step (0 on the last). */
|
|
3671
|
+
dropOff: number;
|
|
3672
|
+
}[];
|
|
3673
|
+
/** With `breakdown`: each value's visits at every step, its 25 largest. */
|
|
3674
|
+
breakdown?: {
|
|
3675
|
+
dimension: string;
|
|
3676
|
+
groups: {
|
|
3677
|
+
value: string | null;
|
|
3678
|
+
visits: number[];
|
|
3679
|
+
}[];
|
|
3680
|
+
};
|
|
3681
|
+
meta: VisitReadMeta;
|
|
3682
|
+
}
|
|
3683
|
+
interface PathsOptions {
|
|
3684
|
+
/** A page path: where visits went after it. Without it, only `routes`. */
|
|
3685
|
+
from?: string;
|
|
3686
|
+
/** How many opening pages a route has, 1 to 5. Default 3. */
|
|
3687
|
+
depth?: number;
|
|
3688
|
+
/** Rows in each list, 1 to 100. Default 10. */
|
|
3689
|
+
limit?: number;
|
|
3690
|
+
dateRange?: AnalyticsDateRange;
|
|
3691
|
+
/** Pick visits: a visit is in when any of its rows matches every filter. */
|
|
3692
|
+
filters?: AnalyticsFilter[];
|
|
3693
|
+
releaseId?: string;
|
|
3694
|
+
}
|
|
3695
|
+
interface PathsResult {
|
|
3696
|
+
/** Visits counted. */
|
|
3697
|
+
visits: number;
|
|
3698
|
+
/** With `from`: the page opened next, or `null` where the visit ended. */
|
|
3699
|
+
next?: {
|
|
3700
|
+
path: string | null;
|
|
3701
|
+
visits: number;
|
|
3702
|
+
}[];
|
|
3703
|
+
/** The commonest routes: each visit's first `depth` pages, a page repeated in a row counted once. */
|
|
3704
|
+
routes: {
|
|
3705
|
+
paths: string[];
|
|
3706
|
+
visits: number;
|
|
3707
|
+
}[];
|
|
3708
|
+
meta: VisitReadMeta;
|
|
3709
|
+
}
|
|
3590
3710
|
interface LiveNow {
|
|
3591
3711
|
/** Visitors on the app right now. */
|
|
3592
3712
|
count: number;
|
|
@@ -3663,6 +3783,17 @@ interface Analytics {
|
|
|
3663
3783
|
* batch (the error names its index).
|
|
3664
3784
|
*/
|
|
3665
3785
|
batch(specs: AnalyticsQuerySpec[]): Promise<AnalyticsQueryResponse[]>;
|
|
3786
|
+
/**
|
|
3787
|
+
* How many visits went through the steps in order, and where they dropped
|
|
3788
|
+
* off. Follows a visitor across the apps sharing this one's host. Raw
|
|
3789
|
+
* events (90 days); counts as 5 reads against the limit.
|
|
3790
|
+
*/
|
|
3791
|
+
funnel(options: FunnelOptions): Promise<FunnelResult>;
|
|
3792
|
+
/**
|
|
3793
|
+
* The routes visits took: where they went after a page, and the pages they
|
|
3794
|
+
* commonly opened with. Raw events (90 days); counts as 5 reads.
|
|
3795
|
+
*/
|
|
3796
|
+
paths(options?: PathsOptions): Promise<PathsResult>;
|
|
3666
3797
|
/** Who's on the app right now (Redis presence, no time window). */
|
|
3667
3798
|
live(): Promise<LiveNow>;
|
|
3668
3799
|
/**
|
|
@@ -4557,7 +4688,7 @@ interface BrowserPage {
|
|
|
4557
4688
|
message: string;
|
|
4558
4689
|
}[];
|
|
4559
4690
|
}
|
|
4560
|
-
/** Where an element
|
|
4691
|
+
/** Where an element is, in CSS pixels: of the viewport for an action, of the shot for a screenshot's `boxes`. */
|
|
4561
4692
|
interface BrowserBox {
|
|
4562
4693
|
x: number;
|
|
4563
4694
|
y: number;
|
|
@@ -4568,7 +4699,11 @@ interface BrowserBox {
|
|
|
4568
4699
|
interface BrowserElementResult extends BrowserPage {
|
|
4569
4700
|
/** The element as the snapshot names it (`button "Sign in" [ref=e4]`). */
|
|
4570
4701
|
matched: string;
|
|
4571
|
-
/**
|
|
4702
|
+
/**
|
|
4703
|
+
* Where it was in the viewport when the action landed. A page can move after
|
|
4704
|
+
* (a banner arriving pushes everything down), so to highlight an element on
|
|
4705
|
+
* a screenshot, ask the screenshot where it is (`boxes`).
|
|
4706
|
+
*/
|
|
4572
4707
|
box: BrowserBox;
|
|
4573
4708
|
}
|
|
4574
4709
|
interface BrowserScreenshot {
|
|
@@ -4578,6 +4713,12 @@ interface BrowserScreenshot {
|
|
|
4578
4713
|
width: number;
|
|
4579
4714
|
height: number;
|
|
4580
4715
|
deviceScaleFactor: number;
|
|
4716
|
+
/**
|
|
4717
|
+
* With `boxes`, where each element named is in the shot, in its CSS pixels,
|
|
4718
|
+
* in the order named: `null` for one the page didn't have. Absent on older
|
|
4719
|
+
* platform versions.
|
|
4720
|
+
*/
|
|
4721
|
+
boxes?: (BrowserBox | null)[];
|
|
4581
4722
|
}
|
|
4582
4723
|
/** A screenshot saved straight into a store: the stored file, and the page's size it was taken at. */
|
|
4583
4724
|
type BrowserStoredScreenshot = StoredFile & {
|
|
@@ -4585,6 +4726,12 @@ type BrowserStoredScreenshot = StoredFile & {
|
|
|
4585
4726
|
width: number;
|
|
4586
4727
|
height: number;
|
|
4587
4728
|
deviceScaleFactor: number;
|
|
4729
|
+
/**
|
|
4730
|
+
* With `boxes`, where each element named is in the shot, in its CSS pixels,
|
|
4731
|
+
* in the order named: `null` for one the page didn't have. Absent on older
|
|
4732
|
+
* platform versions.
|
|
4733
|
+
*/
|
|
4734
|
+
boxes?: (BrowserBox | null)[];
|
|
4588
4735
|
};
|
|
4589
4736
|
interface BrowserToolsOptions {
|
|
4590
4737
|
/**
|
|
@@ -4672,19 +4819,24 @@ declare class BrowserSession {
|
|
|
4672
4819
|
* you get the stored file back; without, you get the bytes, which a full
|
|
4673
4820
|
* page past a few megabytes is too large for. The cursor is left out unless
|
|
4674
4821
|
* `cursor` keeps it in, for a shot that shows where the last action landed.
|
|
4822
|
+
* `boxes` names elements, as an action does, and the shot says where each
|
|
4823
|
+
* one is in it, measured as it's taken, for drawing highlights on it.
|
|
4675
4824
|
*
|
|
4676
4825
|
* ```ts
|
|
4677
|
-
* const shot = await session.screenshot({ store: Shots,
|
|
4678
|
-
* await Steps.push({ screenshot: shot.key, highlight:
|
|
4826
|
+
* const shot = await session.screenshot({ store: Shots, boxes: ['e12'] });
|
|
4827
|
+
* await Steps.push({ screenshot: shot.key, highlight: shot.boxes?.[0] });
|
|
4828
|
+
* await session.click('e12');
|
|
4679
4829
|
* ```
|
|
4680
4830
|
*/
|
|
4681
4831
|
screenshot(options?: {
|
|
4682
4832
|
fullPage?: boolean;
|
|
4683
4833
|
cursor?: boolean;
|
|
4834
|
+
boxes?: BrowserTarget[];
|
|
4684
4835
|
}): Promise<BrowserScreenshot>;
|
|
4685
4836
|
screenshot(options: {
|
|
4686
4837
|
fullPage?: boolean;
|
|
4687
4838
|
cursor?: boolean;
|
|
4839
|
+
boxes?: BrowserTarget[];
|
|
4688
4840
|
store: Store;
|
|
4689
4841
|
key?: string;
|
|
4690
4842
|
}): Promise<BrowserStoredScreenshot>;
|
|
@@ -5183,10 +5335,11 @@ declare class MindStudioAgent$1 {
|
|
|
5183
5335
|
get files(): Files;
|
|
5184
5336
|
/**
|
|
5185
5337
|
* The `analytics` namespace — read the app's own traffic + event analytics
|
|
5186
|
-
* (auto-tracked pageviews, `analytics.track()` events). One
|
|
5187
|
-
* `query()` (metrics × dimensions × filters × time) plus
|
|
5188
|
-
* `
|
|
5189
|
-
* for the lifetime-rollup vs
|
|
5338
|
+
* (auto-tracked pageviews and engagement, `analytics.track()` events). One
|
|
5339
|
+
* general `query()` (metrics × dimensions × filters × time) plus
|
|
5340
|
+
* `funnel()`, `paths()`, `live()`, `sources()`, `map()`, `aiSources()`,
|
|
5341
|
+
* `crawlers.*`. See {@link Analytics} for the lifetime-rollup vs
|
|
5342
|
+
* 90-day-events split.
|
|
5190
5343
|
*
|
|
5191
5344
|
* @example
|
|
5192
5345
|
* ```ts
|
|
@@ -5459,10 +5612,11 @@ declare class MindStudioAgent$1 {
|
|
|
5459
5612
|
* page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
|
|
5460
5613
|
* array) to purge every snapshot for the app.
|
|
5461
5614
|
*
|
|
5462
|
-
* `paths` are this app's OWN route paths (`/u/abc`),
|
|
5463
|
-
*
|
|
5464
|
-
*
|
|
5465
|
-
* path
|
|
5615
|
+
* `paths` are this app's OWN route paths (`/u/abc`), which purge the page
|
|
5616
|
+
* whatever host it is served on, or full URLs (`https://site-a.com/u/abc`),
|
|
5617
|
+
* which purge it on that host only. If another app mounts this one under a
|
|
5618
|
+
* path prefix, the copies cached at that prefix are purged too — no need to
|
|
5619
|
+
* know or pass the mount path.
|
|
5466
5620
|
*
|
|
5467
5621
|
* Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
|
|
5468
5622
|
* token. Backend / managed-context only.
|
|
@@ -6147,10 +6301,22 @@ interface DownloadVideoStepInput {
|
|
|
6147
6301
|
videoUrl: string;
|
|
6148
6302
|
/** Output format for the downloaded file */
|
|
6149
6303
|
format: "mp4" | "mp3";
|
|
6304
|
+
/** Which item to download from a URL that holds several (a carousel, a playlist, a post with several videos), counting from 1. Omit for the one the URL names, else the first */
|
|
6305
|
+
item?: number;
|
|
6306
|
+
/** Start of a clip, in seconds. Omit to start at the beginning */
|
|
6307
|
+
start?: number;
|
|
6308
|
+
/** Length of a clip, in seconds. Omit to run to the end */
|
|
6309
|
+
duration?: number;
|
|
6150
6310
|
}
|
|
6151
6311
|
interface DownloadVideoStepOutput {
|
|
6152
6312
|
/** URL of the downloaded and re-hosted video file */
|
|
6153
6313
|
videoUrl: string;
|
|
6314
|
+
/** The video's title, as the site gives it */
|
|
6315
|
+
title?: string;
|
|
6316
|
+
/** How long the downloaded file runs, in seconds: a clip's own length */
|
|
6317
|
+
durationSec?: number;
|
|
6318
|
+
/** How many items the URL holds: 1 for a single video. Absent for a playlist the site doesn't count up front (a channel, a long playlist) */
|
|
6319
|
+
itemCount?: number;
|
|
6154
6320
|
}
|
|
6155
6321
|
interface EnhanceImageGenerationPromptStepInput {
|
|
6156
6322
|
/** The raw prompt to enhance */
|
|
@@ -10281,6 +10447,9 @@ interface StepMethods {
|
|
|
10281
10447
|
* @remarks
|
|
10282
10448
|
* - Works with YouTube, TikTok, etc., by using ytdlp behind the scenes
|
|
10283
10449
|
* - Can save as mp4 or mp3
|
|
10450
|
+
* - `item` picks one item of a URL that holds several: a carousel, a playlist, a post with several videos. A link to one slide of a carousel downloads that slide. `itemCount` in the output says how many there are, so download item 1 and loop for the rest
|
|
10451
|
+
* - `start` and `duration` (seconds) download a clip. An mp4 clip is cut without re-encoding, so it can start a moment before `start` (for an exact cut, trim the result with `trimMedia`); an mp3 clip is exact
|
|
10452
|
+
* - Videos and audio only: a photo (a photo post, a photo in a carousel) fails as `video_unavailable`, and so does an item the URL doesn't have
|
|
10284
10453
|
*
|
|
10285
10454
|
* @example
|
|
10286
10455
|
* ```typescript
|
|
@@ -12593,10 +12762,27 @@ interface SessionContext {
|
|
|
12593
12762
|
* Which surface invoked this method: `voice`/`agent` for conversational
|
|
12594
12763
|
* tool calls (which carry their session/thread ids below), `web` for a
|
|
12595
12764
|
* browser interface-session method call, `api` for an app-key or
|
|
12596
|
-
* platform-key call. `web`/`api` carry only `visitorId`. Absent
|
|
12597
|
-
* on older platform
|
|
12765
|
+
* platform-key call. `web`/`api` carry only `visitorId`. Absent on a run
|
|
12766
|
+
* no caller started (cron, inbound email, a webhook) and on older platform
|
|
12767
|
+
* versions.
|
|
12768
|
+
*/
|
|
12769
|
+
channel?: 'voice' | 'agent' | 'web' | 'api';
|
|
12770
|
+
/**
|
|
12771
|
+
* The host the request was served on: `example.com`, the app's
|
|
12772
|
+
* `<slug>.madewithremy.com`, a branch preview's host. Under another app's
|
|
12773
|
+
* mount it is that app's host, the site the visitor is on. Platform-resolved
|
|
12774
|
+
* from the host the request arrived at, so one app serving several sites can
|
|
12775
|
+
* key on it. Absent when the run came through no app host: cron, inbound
|
|
12776
|
+
* email, voice and task-agent tool calls, background runs, and dev.
|
|
12598
12777
|
*/
|
|
12599
|
-
|
|
12778
|
+
host?: string;
|
|
12779
|
+
/**
|
|
12780
|
+
* Which world the run is in: `live` (the deployed app), `preview` (a branch
|
|
12781
|
+
* preview, on its own copy of the data) or `dev` (the editor's dev box,
|
|
12782
|
+
* whose file stores are live's). Present on every run on current platform
|
|
12783
|
+
* versions; use it to keep a dev run's fixed-key writes off what live reads.
|
|
12784
|
+
*/
|
|
12785
|
+
environment?: 'live' | 'preview' | 'dev';
|
|
12600
12786
|
/** Voice-session id — matches the browser voice client's `session.sessionId`. */
|
|
12601
12787
|
voiceSessionId?: string;
|
|
12602
12788
|
/** Agent-chat thread id. */
|
|
@@ -12612,14 +12798,18 @@ interface SessionContext {
|
|
|
12612
12798
|
medium?: 'web' | 'phone-in' | 'phone-out';
|
|
12613
12799
|
/**
|
|
12614
12800
|
* Phone sessions only: the call's numbers (`fromNumber` = who initiated,
|
|
12615
|
-
* `to` = who was dialed, in both directions
|
|
12616
|
-
*
|
|
12617
|
-
*
|
|
12618
|
-
*
|
|
12801
|
+
* `to` = who was dialed, in both directions; `appNumber` = the app's own
|
|
12802
|
+
* number on the call, the dialed one inbound and the caller ID outbound,
|
|
12803
|
+
* which is the key for an app that gives each of its tenants a number).
|
|
12804
|
+
* Context and routing only — caller ID is trivially spoofable, so never
|
|
12805
|
+
* treat it as identity: don't gate roles on it or speak account specifics
|
|
12806
|
+
* to an unverified caller. In-call verification is the auth rail.
|
|
12807
|
+
* `appNumber` is absent on older platform versions.
|
|
12619
12808
|
*/
|
|
12620
12809
|
sip?: {
|
|
12621
12810
|
to: string;
|
|
12622
12811
|
fromNumber: string;
|
|
12812
|
+
appNumber?: string;
|
|
12623
12813
|
};
|
|
12624
12814
|
}
|
|
12625
12815
|
/**
|
|
@@ -13264,16 +13454,18 @@ declare const events: Events;
|
|
|
13264
13454
|
*/
|
|
13265
13455
|
declare const browser: Browser;
|
|
13266
13456
|
/**
|
|
13267
|
-
*
|
|
13268
|
-
*
|
|
13269
|
-
*
|
|
13457
|
+
* What the platform knows about this invocation: which world it runs in
|
|
13458
|
+
* (`session.environment`, on every run), the host it was served on
|
|
13459
|
+
* (`session.host`), and who started it: `session.channel` with the voice
|
|
13460
|
+
* session, agent-chat thread or visitor behind it. A run no caller started
|
|
13461
|
+
* (cron, inbound email) has only `environment`.
|
|
13270
13462
|
*
|
|
13271
13463
|
* Values are platform-resolved and guaranteed (never model- or
|
|
13272
13464
|
* client-supplied), so they're safe to key on: `session.voiceSessionId`
|
|
13273
13465
|
* matches the browser voice client's `session.sessionId`, and
|
|
13274
13466
|
* `session.visitorId` correlates anonymous sessions. Properties read from the
|
|
13275
13467
|
* per-request context, so they're always this request's values — check
|
|
13276
|
-
* `session.channel` to detect whether
|
|
13468
|
+
* `session.channel` to detect whether a caller's session is present.
|
|
13277
13469
|
*
|
|
13278
13470
|
* @example
|
|
13279
13471
|
* ```ts
|
|
@@ -13287,6 +13479,11 @@ declare const browser: Browser;
|
|
|
13287
13479
|
* }
|
|
13288
13480
|
* return results;
|
|
13289
13481
|
* }
|
|
13482
|
+
*
|
|
13483
|
+
* // One app serving several sites:
|
|
13484
|
+
* const site = await Sites.findOne((s, $) => s.host === $.host, {
|
|
13485
|
+
* host: session.host,
|
|
13486
|
+
* });
|
|
13290
13487
|
* ```
|
|
13291
13488
|
*/
|
|
13292
13489
|
declare const session: Readonly<Partial<SessionContext>>;
|
|
@@ -13355,14 +13552,17 @@ declare const reportIssue: (input: ReportIssueInput) => Promise<ReportedIssue>;
|
|
|
13355
13552
|
* on their next visit. Bound to the default singleton. Backend / managed-context
|
|
13356
13553
|
* only. Omit `paths` (or pass an empty array) to purge every snapshot.
|
|
13357
13554
|
*
|
|
13358
|
-
* Pass this app's own route paths
|
|
13359
|
-
*
|
|
13555
|
+
* Pass this app's own route paths, which purge the page on every host the app
|
|
13556
|
+
* is served on, or full URLs, which purge it on that host only (for an app
|
|
13557
|
+
* serving several sites). Snapshots of those routes cached under another app's
|
|
13558
|
+
* mount prefix are purged along with them.
|
|
13360
13559
|
*
|
|
13361
13560
|
* @example
|
|
13362
13561
|
* ```ts
|
|
13363
13562
|
* import { prerender } from '@mindstudio-ai/agent';
|
|
13364
13563
|
*
|
|
13365
13564
|
* await prerender.invalidate(['/u/abc']);
|
|
13565
|
+
* await prerender.invalidate(['https://site-a.com/blog/launch']);
|
|
13366
13566
|
* ```
|
|
13367
13567
|
*
|
|
13368
13568
|
* @see {@link MindStudioAgent.invalidatePrerender}
|
|
@@ -13374,4 +13574,4 @@ declare const prerender: {
|
|
|
13374
13574
|
};
|
|
13375
13575
|
|
|
13376
13576
|
export { AuthContext, BrowserSession, HttpResponse, MAX_EVENT_PAYLOAD_CHARS, MindStudioAgent, MindStudioError, Query, RESPONSE_BODY_MAX_BYTES, RawQuery, Roles, Store, Table, analytics, auth, blockTypeAliases, browser, dataSources, db, mindstudio as default, defineJewel, defineMapper, defineReader, deletes, documents, email, events, files, getRequestContext, mindstudio, monacoSnippets, passthrough, prerender, reportIssue, resolveUser, respond, runWithContext, session, skip, stepMetadata, stream, voice, waitUntil };
|
|
13377
|
-
export type { Accessor, ActiveCampaignAddNoteStepInput, ActiveCampaignAddNoteStepOutput, ActiveCampaignCreateContactStepInput, ActiveCampaignCreateContactStepOutput, AddSubtitlesToVideoStepInput, AddSubtitlesToVideoStepOutput, AddThumbnailToVideoStepInput, AddThumbnailToVideoStepOutput, AgentInfo, AgentOptions, AggregateRow, AggregateSelect, AggregateTerm, AiSourceVendor, AirtableCreateUpdateRecordStepInput, AirtableCreateUpdateRecordStepOutput, AirtableDeleteRecordStepInput, AirtableDeleteRecordStepOutput, AirtableGetRecordStepInput, AirtableGetRecordStepOutput, AirtableGetTableRecordsStepInput, AirtableGetTableRecordsStepOutput, Analytics, AnalyticsDateRange, AnalyticsDimension, AnalyticsFilter, AnalyticsFilterOp, AnalyticsGranularity, AnalyticsMetric, AnalyticsQueryResponse, AnalyticsQueryResultRow, AnalyticsQuerySpec, AnalyticsReadOptions, AnalyzeImageStepInput, AnalyzeImageStepOutput, AnalyzeVideoStepInput, AnalyzeVideoStepOutput, AppAuthContext, AppContextResult, AppDatabase, AppDatabaseColumnSchema, AppDatabaseTable, AppRoleAssignment, AuthTableConfig, BatchStepInput, BatchStepResult, Batchable, Browser, BrowserBox, BrowserElementResult, BrowserOpenOptions, BrowserPage, BrowserScreenshot, BrowserStoredScreenshot, BrowserTarget, BrowserToolsOptions, BrowserViewport, CaptureThumbnailStepInput, CaptureThumbnailStepOutput, CheckAppRoleStepInput, CheckAppRoleStepOutput, CodaCreateUpdatePageStepInput, CodaCreateUpdatePageStepOutput, CodaCreateUpdateRowStepInput, CodaCreateUpdateRowStepOutput, CodaFindRowStepInput, CodaFindRowStepOutput, CodaGetPageStepInput, CodaGetPageStepOutput, CodaGetTableRowsStepInput, CodaGetTableRowsStepOutput, Connection, ConnectorActionDetail, ConnectorService, ConvertPdfToImagesStepInput, ConvertPdfToImagesStepOutput, CrawlerBucket, CrawlerHit, CrawlerOverview, CreateDataSourceStepInput, CreateDataSourceStepOutput, CreateGmailDraftStepInput, CreateGmailDraftStepOutput, CreateGoogleCalendarEventStepInput, CreateGoogleCalendarEventStepOutput, CreateGoogleDocStepInput, CreateGoogleDocStepOutput, CreateGoogleSheetStepInput, CreateGoogleSheetStepOutput, Db, DecomposeImageStepInput, DecomposeImageStepOutput, DefineStoreOptions, DefineTableOptions, DeleteDataSourceDocumentStepInput, DeleteDataSourceDocumentStepOutput, DeleteDataSourceStepInput, DeleteDataSourceStepOutput, DeleteGmailEmailStepInput, DeleteGmailEmailStepOutput, DeleteGoogleCalendarEventStepInput, DeleteGoogleCalendarEventStepOutput, DeleteGoogleSheetRowsStepInput, DeleteGoogleSheetRowsStepOutput, DetectChangesStepInput, DetectChangesStepOutput, DetectPIIStepInput, DetectPIIStepOutput, DownloadVideoStepInput, DownloadVideoStepOutput, EnhanceImageGenerationPromptStepInput, EnhanceImageGenerationPromptStepOutput, EnhanceVideoGenerationPromptStepInput, EnhanceVideoGenerationPromptStepOutput, EnrichPersonStepInput, EnrichPersonStepOutput, EvaluateDecisionStepInput, EvaluateDecisionStepOutput, EventGrantOptions, EventGrantResult, Events, ExecuteStepBatchOptions, ExecuteStepBatchResult, ExtractAudioFromVideoStepInput, ExtractAudioFromVideoStepOutput, ExtractTextStepInput, ExtractTextStepOutput, FetchDataSourceDocumentStepInput, FetchDataSourceDocumentStepOutput, FetchGoogleDocStepInput, FetchGoogleDocStepOutput, FetchGoogleSheetStepInput, FetchGoogleSheetStepOutput, FetchSlackChannelHistoryStepInput, FetchSlackChannelHistoryStepOutput, FetchYoutubeCaptionsStepInput, FetchYoutubeCaptionsStepOutput, FetchYoutubeChannelStepInput, FetchYoutubeChannelStepOutput, FetchYoutubeCommentsStepInput, FetchYoutubeCommentsStepOutput, FetchYoutubeVideoStepInput, FetchYoutubeVideoStepOutput, FileAccess, Files, FromSchema, Generate3dModelStepInput, Generate3dModelStepOutput, GenerateAssetStepInput, GenerateAssetStepOutput, GenerateImageStepInput, GenerateImageStepOutput, GenerateLipsyncStepInput, GenerateLipsyncStepOutput, GenerateMusicStepInput, GenerateMusicStepOutput, GeneratePdfStepInput, GeneratePdfStepOutput, GenerateSoundStepInput, GenerateSoundStepOutput, GenerateStaticVideoFromImageStepInput, GenerateStaticVideoFromImageStepOutput, GenerateTextStepInput, GenerateTextStepOutput, GenerateVideoStepInput, GenerateVideoStepOutput, GetGmailAttachmentsStepInput, GetGmailAttachmentsStepOutput, GetGmailDraftStepInput, GetGmailDraftStepOutput, GetGmailEmailStepInput, GetGmailEmailStepOutput, GetGmailUnreadCountStepInput, GetGmailUnreadCountStepOutput, GetGoogleCalendarEventStepInput, GetGoogleCalendarEventStepOutput, GetGoogleDriveFileStepInput, GetGoogleDriveFileStepOutput, GetGoogleSheetInfoStepInput, GetGoogleSheetInfoStepOutput, GetMediaMetadataStepInput, GetMediaMetadataStepOutput, GetStreamOptions, HttpResponseFile, HttpResponseHeaders, HttpResponseInit, HttpResponseOptions, HubspotCreateCompanyStepInput, HubspotCreateCompanyStepOutput, HubspotCreateContactStepInput, HubspotCreateContactStepOutput, HubspotGetCompanyStepInput, HubspotGetCompanyStepOutput, HubspotGetContactStepInput, HubspotGetContactStepOutput, HunterApiCompanyEnrichmentStepInput, HunterApiCompanyEnrichmentStepOutput, HunterApiDomainSearchStepInput, HunterApiDomainSearchStepOutput, HunterApiEmailFinderStepInput, HunterApiEmailFinderStepOutput, HunterApiEmailVerificationStepInput, HunterApiEmailVerificationStepOutput, HunterApiPersonEnrichmentStepInput, HunterApiPersonEnrichmentStepOutput, ImageFaceSwapStepInput, ImageFaceSwapStepOutput, ImageRemoveWatermarkStepInput, ImageRemoveWatermarkStepOutput, ImportFromUrlStepInput, ImportFromUrlStepOutput, InsertVideoClipsStepInput, InsertVideoClipsStepOutput, Jewel, JewelConfig, JewelGradeContext, JewelMethod, JewelMethodInput, JewelPairRecord, JewelProposal, JewelProposeOutcome, JewelProposeResult, JewelQueueItem, JewelQueueResolution, JewelQueueResolveResult, JewelRunParams, JewelVerdict, JewelsApi, JsonObjectSchema, JsonSchema, JsonSchemaTypeName, ListAgentsResult, ListDataSourcesStepInput, ListDataSourcesStepOutput, ListGmailDraftsStepInput, ListGmailDraftsStepOutput, ListGmailLabelsStepInput, ListGmailLabelsStepOutput, ListGoogleCalendarEventsStepInput, ListGoogleCalendarEventsStepOutput, ListGoogleDriveFilesStepInput, ListGoogleDriveFilesStepOutput, ListOptions, ListRecentGmailEmailsStepInput, ListRecentGmailEmailsStepOutput, LiveNow, LogicStepInput, LogicStepOutput, MakeDotComRunScenarioStepInput, MakeDotComRunScenarioStepOutput, MapObject, MapOutcome, MapPoint, MapRunObject, MapRunOutcome, MapRunParams, MapRunRecord, MapRunResult, MappedDocument, Mapper, MapperConfig, MergeAudioStepInput, MergeAudioStepOutput, MergeVideosStepInput, MergeVideosStepOutput, MeshyAnimateStepInput, MeshyAnimateStepOutput, MeshyImageTo3dStepInput, MeshyImageTo3dStepOutput, MeshyRemeshStepInput, MeshyRemeshStepOutput, MeshyRigStepInput, MeshyRigStepOutput, MeshyTextTo3dStepInput, MeshyTextTo3dStepOutput, MeshyTextureStepInput, MeshyTextureStepOutput, MindStudioModel, MindStudioModelSummary, MixAudioIntoVideoStepInput, MixAudioIntoVideoStepOutput, ModelType, MonacoSnippet, MonacoSnippetField, MonacoSnippetFieldType, MuteVideoStepInput, MuteVideoStepOutput, N8nRunNodeStepInput, N8nRunNodeStepOutput, NotionCreatePageStepInput, NotionCreatePageStepOutput, NotionUpdatePageStepInput, NotionUpdatePageStepOutput, PackagedWorkflow, PackagedWorkflowInput, PackagedWorkflowSignature, PeopleSearchStepInput, PeopleSearchStepOutput, PostToLinkedInStepInput, PostToLinkedInStepOutput, PostToSlackChannelStepInput, PostToSlackChannelStepOutput, PostToXStepInput, PostToXStepOutput, PostToZapierStepInput, PostToZapierStepOutput, Predicate, PushInput, PutOptions, PutStream, QueryDataSourceStepInput, QueryDataSourceStepOutput, QueryExternalDatabaseStepInput, QueryExternalDatabaseStepOutput, QuickbooksApiRequestStepInput, QuickbooksApiRequestStepOutput, ReadDelivery, ReadRunParams, ReadRunRecord, ReadRunResult, Reader, ReaderConfig, ReaderDocument, RedactPIIStepInput, RedactPIIStepOutput, RemoveBackgroundFromImageStepInput, RemoveBackgroundFromImageStepOutput, RenderVideoFromHtmlCompositionStepInput, RenderVideoFromHtmlCompositionStepOutput, ReplyToGmailEmailStepInput, ReplyToGmailEmailStepOutput, ReportIssueInput, ReportedIssue, RequestContext, ResizeVideoStepInput, ResizeVideoStepOutput, ResolvedUser, RunAgentOptions, RunAgentResult, RunFfmpegStepInput, RunFfmpegStepOutput, RunFromConnectorRegistryStepInput, RunFromConnectorRegistryStepOutput, RunTaskOptions, RunTaskOptionsWithExample, RunTaskOptionsWithSchema, RunTaskResult, SchemaValidationError, ScrapeLinkedInCompanyStepInput, ScrapeLinkedInCompanyStepOutput, ScrapeLinkedInProfileStepInput, ScrapeLinkedInProfileStepOutput, ScrapeUrlStepInput, ScrapeUrlStepOutput, ScrapeXPostStepInput, ScrapeXPostStepOutput, ScrapeXProfileStepInput, ScrapeXProfileStepOutput, ScreenshotUrlStepInput, ScreenshotUrlStepOutput, SearchGmailEmailsStepInput, SearchGmailEmailsStepOutput, SearchGoogleCalendarEventsStepInput, SearchGoogleCalendarEventsStepOutput, SearchGoogleDriveStepInput, SearchGoogleDriveStepOutput, SearchGoogleImagesStepInput, SearchGoogleImagesStepOutput, SearchGoogleNewsStepInput, SearchGoogleNewsStepOutput, SearchGoogleStepInput, SearchGoogleStepOutput, SearchGoogleTrendsStepInput, SearchGoogleTrendsStepOutput, SearchPerplexityStepInput, SearchPerplexityStepOutput, SearchXPostsStepInput, SearchXPostsStepOutput, SearchYoutubeStepInput, SearchYoutubeStepOutput, SearchYoutubeTrendsStepInput, SearchYoutubeTrendsStepOutput, SendEmailStepInput, SendEmailStepOutput, SendGmailDraftStepInput, SendGmailDraftStepOutput, SendGmailMessageStepInput, SendGmailMessageStepOutput, SendSMSStepInput, SendSMSStepOutput, SendSlackDirectMessageStepInput, SendSlackDirectMessageStepOutput, SessionContext, SetGmailReadStatusStepInput, SetGmailReadStatusStepOutput, SetRunTitleStepInput, SetRunTitleStepOutput, SetVariableStepInput, SetVariableStepOutput, SettableSystemColumns, StepCostEstimateEntry, StepExecutionMeta, StepExecutionOptions, StepExecutionResult, StepInputMap, StepLogEvent, StepMetadata, StepMethods, StepName, StepOutputMap, StoredFile, SystemFields, TaskEvent, TaskToolCall, TaskToolConfig, TaskUsage, TextToSpeechStepInput, TextToSpeechStepOutput, TopSource, TranscribeAudioStepInput, TranscribeAudioStepOutput, TrimMediaStepInput, TrimMediaStepOutput, TypesafeEvaluateStepInput, TypesafeEvaluateStepOutput, UpdateGmailLabelsStepInput, UpdateGmailLabelsStepOutput, UpdateGoogleCalendarEventStepInput, UpdateGoogleCalendarEventStepOutput, UpdateGoogleDocStepInput, UpdateGoogleDocStepOutput, UpdateGoogleSheetStepInput, UpdateGoogleSheetStepOutput, UpdateInput, UploadDataSourceDocumentStepInput, UploadDataSourceDocumentStepOutput, UploadFileResult, UploadToken, UpscaleImageStepInput, UpscaleImageStepOutput, UpscaleVideoStepInput, UpscaleVideoStepOutput, User, UserInfoResult, UserMessageStepInput, UserMessageStepOutput, VideoFaceSwapStepInput, VideoFaceSwapStepOutput, VideoRemoveBackgroundStepInput, VideoRemoveBackgroundStepOutput, VideoRemoveWatermarkStepInput, VideoRemoveWatermarkStepOutput, Voice, VoiceCallResult, WatermarkImageStepInput, WatermarkImageStepOutput, WatermarkVideoStepInput, WatermarkVideoStepOutput, YouDotComFinanceResearchStepInput, YouDotComFinanceResearchStepOutput, YouDotComGetPageContentStepInput, YouDotComGetPageContentStepOutput, YouDotComLiveNewsStepInput, YouDotComLiveNewsStepOutput, YouDotComWebResearchStepInput, YouDotComWebResearchStepOutput, YouDotComWebSearchStepInput, YouDotComWebSearchStepOutput };
|
|
13577
|
+
export type { Accessor, ActiveCampaignAddNoteStepInput, ActiveCampaignAddNoteStepOutput, ActiveCampaignCreateContactStepInput, ActiveCampaignCreateContactStepOutput, AddSubtitlesToVideoStepInput, AddSubtitlesToVideoStepOutput, AddThumbnailToVideoStepInput, AddThumbnailToVideoStepOutput, AgentInfo, AgentOptions, AggregateRow, AggregateSelect, AggregateTerm, AiSourceVendor, AirtableCreateUpdateRecordStepInput, AirtableCreateUpdateRecordStepOutput, AirtableDeleteRecordStepInput, AirtableDeleteRecordStepOutput, AirtableGetRecordStepInput, AirtableGetRecordStepOutput, AirtableGetTableRecordsStepInput, AirtableGetTableRecordsStepOutput, Analytics, AnalyticsAverageMetric, AnalyticsCountMetric, AnalyticsDateRange, AnalyticsDimension, AnalyticsFilter, AnalyticsFilterOnlyDimension, AnalyticsFilterOp, AnalyticsGranularity, AnalyticsMetric, AnalyticsQueryResponse, AnalyticsQueryResultRow, AnalyticsQuerySpec, AnalyticsReadOptions, AnalyzeImageStepInput, AnalyzeImageStepOutput, AnalyzeVideoStepInput, AnalyzeVideoStepOutput, AppAuthContext, AppContextResult, AppDatabase, AppDatabaseColumnSchema, AppDatabaseTable, AppRoleAssignment, AuthTableConfig, BatchStepInput, BatchStepResult, Batchable, Browser, BrowserBox, BrowserElementResult, BrowserOpenOptions, BrowserPage, BrowserScreenshot, BrowserStoredScreenshot, BrowserTarget, BrowserToolsOptions, BrowserViewport, CaptureThumbnailStepInput, CaptureThumbnailStepOutput, CheckAppRoleStepInput, CheckAppRoleStepOutput, CodaCreateUpdatePageStepInput, CodaCreateUpdatePageStepOutput, CodaCreateUpdateRowStepInput, CodaCreateUpdateRowStepOutput, CodaFindRowStepInput, CodaFindRowStepOutput, CodaGetPageStepInput, CodaGetPageStepOutput, CodaGetTableRowsStepInput, CodaGetTableRowsStepOutput, Connection, ConnectorActionDetail, ConnectorService, ConvertPdfToImagesStepInput, ConvertPdfToImagesStepOutput, CrawlerBucket, CrawlerHit, CrawlerOverview, CreateDataSourceStepInput, CreateDataSourceStepOutput, CreateGmailDraftStepInput, CreateGmailDraftStepOutput, CreateGoogleCalendarEventStepInput, CreateGoogleCalendarEventStepOutput, CreateGoogleDocStepInput, CreateGoogleDocStepOutput, CreateGoogleSheetStepInput, CreateGoogleSheetStepOutput, Db, DecomposeImageStepInput, DecomposeImageStepOutput, DefineStoreOptions, DefineTableOptions, DeleteDataSourceDocumentStepInput, DeleteDataSourceDocumentStepOutput, DeleteDataSourceStepInput, DeleteDataSourceStepOutput, DeleteGmailEmailStepInput, DeleteGmailEmailStepOutput, DeleteGoogleCalendarEventStepInput, DeleteGoogleCalendarEventStepOutput, DeleteGoogleSheetRowsStepInput, DeleteGoogleSheetRowsStepOutput, DetectChangesStepInput, DetectChangesStepOutput, DetectPIIStepInput, DetectPIIStepOutput, DownloadVideoStepInput, DownloadVideoStepOutput, EnhanceImageGenerationPromptStepInput, EnhanceImageGenerationPromptStepOutput, EnhanceVideoGenerationPromptStepInput, EnhanceVideoGenerationPromptStepOutput, EnrichPersonStepInput, EnrichPersonStepOutput, EvaluateDecisionStepInput, EvaluateDecisionStepOutput, EventGrantOptions, EventGrantResult, Events, ExecuteStepBatchOptions, ExecuteStepBatchResult, ExtractAudioFromVideoStepInput, ExtractAudioFromVideoStepOutput, ExtractTextStepInput, ExtractTextStepOutput, FetchDataSourceDocumentStepInput, FetchDataSourceDocumentStepOutput, FetchGoogleDocStepInput, FetchGoogleDocStepOutput, FetchGoogleSheetStepInput, FetchGoogleSheetStepOutput, FetchSlackChannelHistoryStepInput, FetchSlackChannelHistoryStepOutput, FetchYoutubeCaptionsStepInput, FetchYoutubeCaptionsStepOutput, FetchYoutubeChannelStepInput, FetchYoutubeChannelStepOutput, FetchYoutubeCommentsStepInput, FetchYoutubeCommentsStepOutput, FetchYoutubeVideoStepInput, FetchYoutubeVideoStepOutput, FileAccess, Files, FromSchema, FunnelOptions, FunnelResult, FunnelStep, Generate3dModelStepInput, Generate3dModelStepOutput, GenerateAssetStepInput, GenerateAssetStepOutput, GenerateImageStepInput, GenerateImageStepOutput, GenerateLipsyncStepInput, GenerateLipsyncStepOutput, GenerateMusicStepInput, GenerateMusicStepOutput, GeneratePdfStepInput, GeneratePdfStepOutput, GenerateSoundStepInput, GenerateSoundStepOutput, GenerateStaticVideoFromImageStepInput, GenerateStaticVideoFromImageStepOutput, GenerateTextStepInput, GenerateTextStepOutput, GenerateVideoStepInput, GenerateVideoStepOutput, GetGmailAttachmentsStepInput, GetGmailAttachmentsStepOutput, GetGmailDraftStepInput, GetGmailDraftStepOutput, GetGmailEmailStepInput, GetGmailEmailStepOutput, GetGmailUnreadCountStepInput, GetGmailUnreadCountStepOutput, GetGoogleCalendarEventStepInput, GetGoogleCalendarEventStepOutput, GetGoogleDriveFileStepInput, GetGoogleDriveFileStepOutput, GetGoogleSheetInfoStepInput, GetGoogleSheetInfoStepOutput, GetMediaMetadataStepInput, GetMediaMetadataStepOutput, GetStreamOptions, HttpResponseFile, HttpResponseHeaders, HttpResponseInit, HttpResponseOptions, HubspotCreateCompanyStepInput, HubspotCreateCompanyStepOutput, HubspotCreateContactStepInput, HubspotCreateContactStepOutput, HubspotGetCompanyStepInput, HubspotGetCompanyStepOutput, HubspotGetContactStepInput, HubspotGetContactStepOutput, HunterApiCompanyEnrichmentStepInput, HunterApiCompanyEnrichmentStepOutput, HunterApiDomainSearchStepInput, HunterApiDomainSearchStepOutput, HunterApiEmailFinderStepInput, HunterApiEmailFinderStepOutput, HunterApiEmailVerificationStepInput, HunterApiEmailVerificationStepOutput, HunterApiPersonEnrichmentStepInput, HunterApiPersonEnrichmentStepOutput, ImageFaceSwapStepInput, ImageFaceSwapStepOutput, ImageRemoveWatermarkStepInput, ImageRemoveWatermarkStepOutput, ImportFromUrlStepInput, ImportFromUrlStepOutput, InsertVideoClipsStepInput, InsertVideoClipsStepOutput, Jewel, JewelConfig, JewelGradeContext, JewelMethod, JewelMethodInput, JewelPairRecord, JewelProposal, JewelProposeOutcome, JewelProposeResult, JewelQueueItem, JewelQueueResolution, JewelQueueResolveResult, JewelRunParams, JewelVerdict, JewelsApi, JsonObjectSchema, JsonSchema, JsonSchemaTypeName, ListAgentsResult, ListDataSourcesStepInput, ListDataSourcesStepOutput, ListGmailDraftsStepInput, ListGmailDraftsStepOutput, ListGmailLabelsStepInput, ListGmailLabelsStepOutput, ListGoogleCalendarEventsStepInput, ListGoogleCalendarEventsStepOutput, ListGoogleDriveFilesStepInput, ListGoogleDriveFilesStepOutput, ListOptions, ListRecentGmailEmailsStepInput, ListRecentGmailEmailsStepOutput, LiveNow, LogicStepInput, LogicStepOutput, MakeDotComRunScenarioStepInput, MakeDotComRunScenarioStepOutput, MapObject, MapOutcome, MapPoint, MapRunObject, MapRunOutcome, MapRunParams, MapRunRecord, MapRunResult, MappedDocument, Mapper, MapperConfig, MergeAudioStepInput, MergeAudioStepOutput, MergeVideosStepInput, MergeVideosStepOutput, MeshyAnimateStepInput, MeshyAnimateStepOutput, MeshyImageTo3dStepInput, MeshyImageTo3dStepOutput, MeshyRemeshStepInput, MeshyRemeshStepOutput, MeshyRigStepInput, MeshyRigStepOutput, MeshyTextTo3dStepInput, MeshyTextTo3dStepOutput, MeshyTextureStepInput, MeshyTextureStepOutput, MindStudioModel, MindStudioModelSummary, MixAudioIntoVideoStepInput, MixAudioIntoVideoStepOutput, ModelType, MonacoSnippet, MonacoSnippetField, MonacoSnippetFieldType, MuteVideoStepInput, MuteVideoStepOutput, N8nRunNodeStepInput, N8nRunNodeStepOutput, NotionCreatePageStepInput, NotionCreatePageStepOutput, NotionUpdatePageStepInput, NotionUpdatePageStepOutput, PackagedWorkflow, PackagedWorkflowInput, PackagedWorkflowSignature, PathsOptions, PathsResult, PeopleSearchStepInput, PeopleSearchStepOutput, PostToLinkedInStepInput, PostToLinkedInStepOutput, PostToSlackChannelStepInput, PostToSlackChannelStepOutput, PostToXStepInput, PostToXStepOutput, PostToZapierStepInput, PostToZapierStepOutput, Predicate, PushInput, PutOptions, PutStream, QueryDataSourceStepInput, QueryDataSourceStepOutput, QueryExternalDatabaseStepInput, QueryExternalDatabaseStepOutput, QuickbooksApiRequestStepInput, QuickbooksApiRequestStepOutput, ReadDelivery, ReadRunParams, ReadRunRecord, ReadRunResult, Reader, ReaderConfig, ReaderDocument, RedactPIIStepInput, RedactPIIStepOutput, RemoveBackgroundFromImageStepInput, RemoveBackgroundFromImageStepOutput, RenderVideoFromHtmlCompositionStepInput, RenderVideoFromHtmlCompositionStepOutput, ReplyToGmailEmailStepInput, ReplyToGmailEmailStepOutput, ReportIssueInput, ReportedIssue, RequestContext, ResizeVideoStepInput, ResizeVideoStepOutput, ResolvedUser, RunAgentOptions, RunAgentResult, RunFfmpegStepInput, RunFfmpegStepOutput, RunFromConnectorRegistryStepInput, RunFromConnectorRegistryStepOutput, RunTaskOptions, RunTaskOptionsWithExample, RunTaskOptionsWithSchema, RunTaskResult, SchemaValidationError, ScrapeLinkedInCompanyStepInput, ScrapeLinkedInCompanyStepOutput, ScrapeLinkedInProfileStepInput, ScrapeLinkedInProfileStepOutput, ScrapeUrlStepInput, ScrapeUrlStepOutput, ScrapeXPostStepInput, ScrapeXPostStepOutput, ScrapeXProfileStepInput, ScrapeXProfileStepOutput, ScreenshotUrlStepInput, ScreenshotUrlStepOutput, SearchGmailEmailsStepInput, SearchGmailEmailsStepOutput, SearchGoogleCalendarEventsStepInput, SearchGoogleCalendarEventsStepOutput, SearchGoogleDriveStepInput, SearchGoogleDriveStepOutput, SearchGoogleImagesStepInput, SearchGoogleImagesStepOutput, SearchGoogleNewsStepInput, SearchGoogleNewsStepOutput, SearchGoogleStepInput, SearchGoogleStepOutput, SearchGoogleTrendsStepInput, SearchGoogleTrendsStepOutput, SearchPerplexityStepInput, SearchPerplexityStepOutput, SearchXPostsStepInput, SearchXPostsStepOutput, SearchYoutubeStepInput, SearchYoutubeStepOutput, SearchYoutubeTrendsStepInput, SearchYoutubeTrendsStepOutput, SendEmailStepInput, SendEmailStepOutput, SendGmailDraftStepInput, SendGmailDraftStepOutput, SendGmailMessageStepInput, SendGmailMessageStepOutput, SendSMSStepInput, SendSMSStepOutput, SendSlackDirectMessageStepInput, SendSlackDirectMessageStepOutput, SessionContext, SetGmailReadStatusStepInput, SetGmailReadStatusStepOutput, SetRunTitleStepInput, SetRunTitleStepOutput, SetVariableStepInput, SetVariableStepOutput, SettableSystemColumns, StepCostEstimateEntry, StepExecutionMeta, StepExecutionOptions, StepExecutionResult, StepInputMap, StepLogEvent, StepMetadata, StepMethods, StepName, StepOutputMap, StoredFile, SystemFields, TaskEvent, TaskToolCall, TaskToolConfig, TaskUsage, TextToSpeechStepInput, TextToSpeechStepOutput, TopSource, TranscribeAudioStepInput, TranscribeAudioStepOutput, TrimMediaStepInput, TrimMediaStepOutput, TypesafeEvaluateStepInput, TypesafeEvaluateStepOutput, UpdateGmailLabelsStepInput, UpdateGmailLabelsStepOutput, UpdateGoogleCalendarEventStepInput, UpdateGoogleCalendarEventStepOutput, UpdateGoogleDocStepInput, UpdateGoogleDocStepOutput, UpdateGoogleSheetStepInput, UpdateGoogleSheetStepOutput, UpdateInput, UploadDataSourceDocumentStepInput, UploadDataSourceDocumentStepOutput, UploadFileResult, UploadToken, UpscaleImageStepInput, UpscaleImageStepOutput, UpscaleVideoStepInput, UpscaleVideoStepOutput, User, UserInfoResult, UserMessageStepInput, UserMessageStepOutput, VideoFaceSwapStepInput, VideoFaceSwapStepOutput, VideoRemoveBackgroundStepInput, VideoRemoveBackgroundStepOutput, VideoRemoveWatermarkStepInput, VideoRemoveWatermarkStepOutput, VisitReadMeta, Voice, VoiceCallParams, VoiceCallResult, WatermarkImageStepInput, WatermarkImageStepOutput, WatermarkVideoStepInput, WatermarkVideoStepOutput, YouDotComFinanceResearchStepInput, YouDotComFinanceResearchStepOutput, YouDotComGetPageContentStepInput, YouDotComGetPageContentStepOutput, YouDotComLiveNewsStepInput, YouDotComLiveNewsStepOutput, YouDotComWebResearchStepInput, YouDotComWebResearchStepOutput, YouDotComWebSearchStepInput, YouDotComWebSearchStepOutput };
|
package/dist/index.js
CHANGED
|
@@ -4195,6 +4195,7 @@ function createVoice(call) {
|
|
|
4195
4195
|
async call(params) {
|
|
4196
4196
|
return await call("call", {
|
|
4197
4197
|
to: params.to,
|
|
4198
|
+
...params.from !== void 0 ? { from: params.from } : {},
|
|
4198
4199
|
assumeIdentity: params.assumeIdentity === true
|
|
4199
4200
|
});
|
|
4200
4201
|
}
|
|
@@ -4211,6 +4212,12 @@ function createAnalytics(call) {
|
|
|
4211
4212
|
const res = await call("query-batch", { queries: specs });
|
|
4212
4213
|
return res.results;
|
|
4213
4214
|
},
|
|
4215
|
+
funnel(options) {
|
|
4216
|
+
return call("funnel", options);
|
|
4217
|
+
},
|
|
4218
|
+
paths(options) {
|
|
4219
|
+
return call("paths", options ?? {});
|
|
4220
|
+
},
|
|
4214
4221
|
live() {
|
|
4215
4222
|
return call("live", {});
|
|
4216
4223
|
},
|
|
@@ -4443,36 +4450,35 @@ var BrowserSession = class {
|
|
|
4443
4450
|
});
|
|
4444
4451
|
}
|
|
4445
4452
|
async screenshot(options = {}) {
|
|
4446
|
-
const { store, key, fullPage, cursor } = options;
|
|
4453
|
+
const { store, key, fullPage, cursor, boxes } = options;
|
|
4454
|
+
const asked = {
|
|
4455
|
+
op: "screenshot",
|
|
4456
|
+
fullPage: !!fullPage,
|
|
4457
|
+
cursor: !!cursor,
|
|
4458
|
+
...boxes?.length ? { boxes: boxes.map(toWireTarget) } : {}
|
|
4459
|
+
};
|
|
4460
|
+
const measured = (shot2) => ({
|
|
4461
|
+
width: shot2.width,
|
|
4462
|
+
height: shot2.height,
|
|
4463
|
+
deviceScaleFactor: shot2.deviceScaleFactor,
|
|
4464
|
+
...shot2.boxes ? { boxes: shot2.boxes } : {}
|
|
4465
|
+
});
|
|
4447
4466
|
if (store) {
|
|
4448
4467
|
const token = await store.createUploadToken({
|
|
4449
4468
|
...key ? { key } : { filename: "screenshot.png" },
|
|
4450
4469
|
contentType: "image/png"
|
|
4451
4470
|
});
|
|
4452
4471
|
const shot2 = await this.run({
|
|
4453
|
-
|
|
4454
|
-
fullPage: !!fullPage,
|
|
4455
|
-
cursor: !!cursor,
|
|
4472
|
+
...asked,
|
|
4456
4473
|
upload: { url: token.upload.url, fields: token.upload.fields }
|
|
4457
4474
|
});
|
|
4458
|
-
return {
|
|
4459
|
-
...await store.head(token.key),
|
|
4460
|
-
width: shot2.width,
|
|
4461
|
-
height: shot2.height,
|
|
4462
|
-
deviceScaleFactor: shot2.deviceScaleFactor
|
|
4463
|
-
};
|
|
4475
|
+
return { ...await store.head(token.key), ...measured(shot2) };
|
|
4464
4476
|
}
|
|
4465
|
-
const shot = await this.run(
|
|
4466
|
-
op: "screenshot",
|
|
4467
|
-
fullPage: !!fullPage,
|
|
4468
|
-
cursor: !!cursor
|
|
4469
|
-
});
|
|
4477
|
+
const shot = await this.run(asked);
|
|
4470
4478
|
return {
|
|
4471
4479
|
data: Buffer.from(shot.data ?? "", "base64"),
|
|
4472
4480
|
contentType: "image/png",
|
|
4473
|
-
|
|
4474
|
-
height: shot.height,
|
|
4475
|
-
deviceScaleFactor: shot.deviceScaleFactor
|
|
4481
|
+
...measured(shot)
|
|
4476
4482
|
};
|
|
4477
4483
|
}
|
|
4478
4484
|
/**
|
|
@@ -5061,9 +5067,9 @@ var stepMetadata = {
|
|
|
5061
5067
|
"downloadVideo": {
|
|
5062
5068
|
stepType: "downloadVideo",
|
|
5063
5069
|
description: "Download a video file",
|
|
5064
|
-
usageNotes: "- Works with YouTube, TikTok, etc., by using ytdlp behind the scenes\n- Can save as mp4 or mp3",
|
|
5065
|
-
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video to download (supports YouTube, TikTok, etc. via yt-dlp)" }, "format": { "enum": ["mp4", "mp3"], "type": "string", "description": "Output format for the downloaded file" } }, "required": ["videoUrl", "format"] },
|
|
5066
|
-
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the downloaded and re-hosted video file" } }, "required": ["videoUrl"] }
|
|
5070
|
+
usageNotes: "- Works with YouTube, TikTok, etc., by using ytdlp behind the scenes\n- Can save as mp4 or mp3\n- `item` picks one item of a URL that holds several: a carousel, a playlist, a post with several videos. A link to one slide of a carousel downloads that slide. `itemCount` in the output says how many there are, so download item 1 and loop for the rest\n- `start` and `duration` (seconds) download a clip. An mp4 clip is cut without re-encoding, so it can start a moment before `start` (for an exact cut, trim the result with `trimMedia`); an mp3 clip is exact\n- Videos and audio only: a photo (a photo post, a photo in a carousel) fails as `video_unavailable`, and so does an item the URL doesn't have",
|
|
5071
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video to download (supports YouTube, TikTok, etc. via yt-dlp)" }, "format": { "enum": ["mp4", "mp3"], "type": "string", "description": "Output format for the downloaded file" }, "item": { "type": "number", "description": "Which item to download from a URL that holds several (a carousel, a playlist, a post with several videos), counting from 1. Omit for the one the URL names, else the first" }, "start": { "type": "number", "description": "Start of a clip, in seconds. Omit to start at the beginning" }, "duration": { "type": "number", "description": "Length of a clip, in seconds. Omit to run to the end" } }, "required": ["videoUrl", "format"] },
|
|
5072
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the downloaded and re-hosted video file" }, "title": { "type": "string", "description": "The video's title, as the site gives it" }, "durationSec": { "type": "number", "description": "How long the downloaded file runs, in seconds: a clip's own length" }, "itemCount": { "type": "number", "description": "How many items the URL holds: 1 for a single video. Absent for a playlist the site doesn't count up front (a channel, a long playlist)" } }, "required": ["videoUrl"] }
|
|
5067
5073
|
},
|
|
5068
5074
|
"enhanceImageGenerationPrompt": {
|
|
5069
5075
|
stepType: "enhanceImageGenerationPrompt",
|
|
@@ -8349,10 +8355,11 @@ var MindStudioAgent = class {
|
|
|
8349
8355
|
}
|
|
8350
8356
|
/**
|
|
8351
8357
|
* The `analytics` namespace — read the app's own traffic + event analytics
|
|
8352
|
-
* (auto-tracked pageviews, `analytics.track()` events). One
|
|
8353
|
-
* `query()` (metrics × dimensions × filters × time) plus
|
|
8354
|
-
* `
|
|
8355
|
-
* for the lifetime-rollup vs
|
|
8358
|
+
* (auto-tracked pageviews and engagement, `analytics.track()` events). One
|
|
8359
|
+
* general `query()` (metrics × dimensions × filters × time) plus
|
|
8360
|
+
* `funnel()`, `paths()`, `live()`, `sources()`, `map()`, `aiSources()`,
|
|
8361
|
+
* `crawlers.*`. See {@link Analytics} for the lifetime-rollup vs
|
|
8362
|
+
* 90-day-events split.
|
|
8356
8363
|
*
|
|
8357
8364
|
* @example
|
|
8358
8365
|
* ```ts
|
|
@@ -9000,10 +9007,11 @@ var MindStudioAgent = class {
|
|
|
9000
9007
|
* page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
|
|
9001
9008
|
* array) to purge every snapshot for the app.
|
|
9002
9009
|
*
|
|
9003
|
-
* `paths` are this app's OWN route paths (`/u/abc`),
|
|
9004
|
-
*
|
|
9005
|
-
*
|
|
9006
|
-
* path
|
|
9010
|
+
* `paths` are this app's OWN route paths (`/u/abc`), which purge the page
|
|
9011
|
+
* whatever host it is served on, or full URLs (`https://site-a.com/u/abc`),
|
|
9012
|
+
* which purge it on that host only. If another app mounts this one under a
|
|
9013
|
+
* path prefix, the copies cached at that prefix are purged too — no need to
|
|
9014
|
+
* know or pass the mount path.
|
|
9007
9015
|
*
|
|
9008
9016
|
* Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
|
|
9009
9017
|
* token. Backend / managed-context only.
|