@mindstudio-ai/agent 0.1.173 → 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 CHANGED
@@ -4,6 +4,25 @@ What changed in `@mindstudio-ai/agent`, newest first, each version under its own
4
4
 
5
5
  Versions before 0.1.163 aren't recorded here.
6
6
 
7
+ ## 0.1.174
8
+
9
+ ### New
10
+
11
+ - `session.environment`: `'live'`, `'preview'` or `'dev'`, on every run, so a method can keep a dev run's fixed-key file-store writes (a generated sitemap, a `config/latest.json`) off what live reads, since file stores are shared across environments. Absent on older platform versions.
12
+ - `session.host`: the host the request was served on (a custom domain, the app's own subdomain, a preview host, or the parent's host under a mount), set by the platform, so one app serving several sites can tell which one a call came from. On web, API, webhook, MCP and agent-chat calls; absent on cron, inbound email, voice and task-agent tool calls, and dev runs.
13
+ - `prerender.invalidate` takes full URLs as well as paths: `https://site-a.com/blog/x` purges that page on that host only, for an app whose sites have different content at one path. A path still purges the page on every host. App code isn't affected.
14
+ - `analytics` reads how pages were read and how visits went, recorded by `@mindstudio-ai/interface` 0.1.38:
15
+ - Metrics `timeOnPage` (seconds), `scrollDepth` (%), `visitDuration` (seconds) and `bounceRate` (%), each `null` rather than 0 when there's nothing to average. Time on page and scroll depth are lifetime, app-wide or per page; visit duration and bounce rate come from the last 90 days.
16
+ - Visit dimensions `entryPath`, `exitPath`, `visitReferrerHost`, `visitSourceCategory` and `visitUtmSource`…`visitUtmContent`, describing the whole visit a row belongs to. Grouping a custom event by `visitReferrerHost` gives its conversions by source.
17
+ - `prop:<key>` groups or filters custom events by a property, and the filter `visitEvent` keeps the visits that fired an event (`[['is', 'visitEvent', ['signup']]]` by `path` is the pages that led to signups).
18
+ - `orderBy` takes `visits` where the query carries it.
19
+ - `analytics.funnel({ steps, breakdown? })` counts visits through ordered steps (pages or events) and where they dropped off. `analytics.paths({ from?, depth? })` shows where visits went after a page and their commonest routes. Both follow a visitor across the apps sharing the host (an app's mounts) and count as 5 reads.
20
+ - An app that keeps its own visit records for any of these (a visit tracker, a webhook that records reads, its own funnel or journey tables) can read them from the platform instead and drop its own. Visit-level reads start when the platform began recording visits, and say so in `meta.clamped` and `meta.window.served`.
21
+
22
+ ### Changed behavior
23
+
24
+ - `session` is no longer set only for a caller's session: a run no caller started (cron, inbound email, a webhook) has one too, with `environment` and no `channel`. Check: code that took any `session` field being set to mean a voice or agent-chat call should check `session.channel` instead.
25
+
7
26
  ## 0.1.173
8
27
 
9
28
  ### New
package/dist/cli.js CHANGED
@@ -5613,6 +5613,12 @@ function createAnalytics(call) {
5613
5613
  const res = await call("query-batch", { queries: specs });
5614
5614
  return res.results;
5615
5615
  },
5616
+ funnel(options) {
5617
+ return call("funnel", options);
5618
+ },
5619
+ paths(options) {
5620
+ return call("paths", options ?? {});
5621
+ },
5616
5622
  live() {
5617
5623
  return call("live", {});
5618
5624
  },
@@ -8690,10 +8696,11 @@ var init_client = __esm({
8690
8696
  }
8691
8697
  /**
8692
8698
  * The `analytics` namespace — read the app's own traffic + event analytics
8693
- * (auto-tracked pageviews, `analytics.track()` events). One general
8694
- * `query()` (metrics × dimensions × filters × time) plus `live()`,
8695
- * `sources()`, `map()`, `aiSources()`, `crawlers.*`. See {@link Analytics}
8696
- * for the lifetime-rollup vs 90-day-events split.
8699
+ * (auto-tracked pageviews and engagement, `analytics.track()` events). One
8700
+ * general `query()` (metrics × dimensions × filters × time) plus
8701
+ * `funnel()`, `paths()`, `live()`, `sources()`, `map()`, `aiSources()`,
8702
+ * `crawlers.*`. See {@link Analytics} for the lifetime-rollup vs
8703
+ * 90-day-events split.
8697
8704
  *
8698
8705
  * @example
8699
8706
  * ```ts
@@ -9341,10 +9348,11 @@ var init_client = __esm({
9341
9348
  * page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
9342
9349
  * array) to purge every snapshot for the app.
9343
9350
  *
9344
- * `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
9345
- * served on. If another app mounts this one under a path prefix, the copies
9346
- * cached at that prefix are purged too — no need to know or pass the mount
9347
- * path.
9351
+ * `paths` are this app's OWN route paths (`/u/abc`), which purge the page
9352
+ * whatever host it is served on, or full URLs (`https://site-a.com/u/abc`),
9353
+ * which purge it on that host only. If another app mounts this one under a
9354
+ * path prefix, the copies cached at that prefix are purged too — no need to
9355
+ * know or pass the mount path.
9348
9356
  *
9349
9357
  * Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
9350
9358
  * token. Backend / managed-context only.
@@ -10035,7 +10043,7 @@ async function startMcpServer(options) {
10035
10043
  capabilities: { tools: {} },
10036
10044
  serverInfo: {
10037
10045
  name: "mindstudio-agent",
10038
- version: "0.1.173"
10046
+ version: "0.1.174"
10039
10047
  },
10040
10048
  instructions: 'Welcome to MindStudio \u2014 a platform with 200+ AI models, 850+ third-party integrations, and pre-built agents.\n\nGetting started:\n1. Call `ask` with any question about the SDK \u2014 it knows every action, model, and connector and returns working code with real model IDs and config options. Examples: ask("generate an image with FLUX"), ask("what models support vision?"), ask("how do I send a Slack message?").\n2. Call `changeName` to set your display name \u2014 use your name or whatever your user calls you. This is how you\'ll appear in MindStudio request logs.\n3. If you have a profile picture, pass its public image URL to `changeProfilePicture`.\n4. For manual browsing, call `listActions` to discover all available actions.\n\nThen use the tools to generate text, images, video, audio, search the web, work with data sources, run agents, and more.\n\nImportant:\n- AI-powered actions (text generation, image generation, video, audio, etc.) cost money. Before running these, call `estimateActionCost` and confirm with the user before proceeding \u2014 unless they\'ve explicitly told you to go ahead.\n- Not all agents from `listAgents` are configured for API use. Do not try to run an agent just because it appears in the list \u2014 it will likely fail. Only run agents the user specifically asks you to run.'
10041
10049
  });
@@ -11075,7 +11083,7 @@ function isNewerVersion(current, latest) {
11075
11083
  return false;
11076
11084
  }
11077
11085
  async function checkForUpdate() {
11078
- const currentVersion = "0.1.173";
11086
+ const currentVersion = "0.1.174";
11079
11087
  if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
11080
11088
  return null;
11081
11089
  }
@@ -11110,7 +11118,7 @@ async function checkForUpdate() {
11110
11118
  }
11111
11119
  }
11112
11120
  function printUpdateNotice(latestVersion) {
11113
- const currentVersion = "0.1.173";
11121
+ const currentVersion = "0.1.174";
11114
11122
  process.stderr.write(
11115
11123
  `
11116
11124
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -11123,7 +11131,7 @@ function isStandaloneBinary() {
11123
11131
  return !argv1.includes("node_modules");
11124
11132
  }
11125
11133
  async function cmdUpdate() {
11126
- const currentVersion = "0.1.173";
11134
+ const currentVersion = "0.1.174";
11127
11135
  process.stderr.write(
11128
11136
  ` ${ansi2.gray("Current version:")} ${currentVersion}
11129
11137
  `
@@ -11264,7 +11272,7 @@ async function cmdLogin(options) {
11264
11272
  process.stderr.write("\n");
11265
11273
  printLogo();
11266
11274
  process.stderr.write("\n");
11267
- const ver = "0.1.173";
11275
+ const ver = "0.1.174";
11268
11276
  process.stderr.write(
11269
11277
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
11270
11278
  `
@@ -11592,7 +11600,7 @@ async function main() {
11592
11600
  const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
11593
11601
  try {
11594
11602
  if (command === "version" || command === "-v") {
11595
- process.stdout.write("0.1.173\n");
11603
+ process.stdout.write("0.1.174\n");
11596
11604
  return;
11597
11605
  }
11598
11606
  if (command === "login") {
package/dist/index.d.ts CHANGED
@@ -3527,8 +3527,26 @@ interface VoiceCallParams {
3527
3527
  assumeIdentity?: boolean;
3528
3528
  }
3529
3529
 
3530
- type AnalyticsMetric = 'pageviews' | 'visitors' | 'visits' | 'events';
3531
- type AnalyticsDimension = 'path' | 'referrerHost' | 'sourceCategory' | 'country' | 'city' | 'deviceType' | 'browser' | 'os' | 'language' | 'visitorType' | 'utmSource' | 'utmMedium' | 'utmCampaign' | 'utmTerm' | 'utmContent' | 'eventName';
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';
3532
3550
  type AnalyticsFilterOp = 'is' | 'is_not' | 'contains';
3533
3551
  /**
3534
3552
  * `[op, dimension, values]`. `is` matches any of the values; `is_not`
@@ -3536,14 +3554,20 @@ type AnalyticsFilterOp = 'is' | 'is_not' | 'contains';
3536
3554
  * is case-insensitive substring. Only `is` filters can be served from the
3537
3555
  * lifetime rollup — the others read the 90-day event table. `city` filters
3538
3556
  * take plain city names (matching any country) and always read the 90-day
3539
- * 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.
3540
3560
  */
3541
- type AnalyticsFilter = [AnalyticsFilterOp, AnalyticsDimension, string[]];
3561
+ type AnalyticsFilter = [
3562
+ AnalyticsFilterOp,
3563
+ AnalyticsDimension | AnalyticsFilterOnlyDimension,
3564
+ string[]
3565
+ ];
3542
3566
  type AnalyticsGranularity = '5m' | 'hour' | 'day' | 'week' | 'month';
3543
3567
  /** Shorthand ("30d", "all") or explicit `[startISO, endISO]`. Default "24h". */
3544
3568
  type AnalyticsDateRange = '1h' | '24h' | '7d' | '30d' | '90d' | 'all' | [string, string];
3545
3569
  interface AnalyticsQuerySpec {
3546
- /** At least one of: pageviews, visitors, visits, events. */
3570
+ /** At least one metric. */
3547
3571
  metrics: AnalyticsMetric[];
3548
3572
  /** At most one entity dimension OR `'time'` (not both, yet). */
3549
3573
  dimensions?: (AnalyticsDimension | 'time')[];
@@ -3557,8 +3581,11 @@ interface AnalyticsQuerySpec {
3557
3581
  timezone?: string;
3558
3582
  filters?: AnalyticsFilter[];
3559
3583
  dateRange?: AnalyticsDateRange;
3560
- /** Grouped queries only: one `['pageviews' | 'events', 'asc' | 'desc']`. */
3561
- orderBy?: ['pageviews' | 'events', 'asc' | 'desc'][];
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'][];
3562
3589
  /** Grouped queries only. Default 25, max 1000. */
3563
3590
  limit?: number;
3564
3591
  offset?: number;
@@ -3568,8 +3595,11 @@ interface AnalyticsQuerySpec {
3568
3595
  interface AnalyticsQueryResultRow {
3569
3596
  /** Group keys: the entity dimension and/or `time` (bucket-start ISO). */
3570
3597
  dimensions: Record<string, string>;
3571
- /** Only the requested-and-available metrics appear. */
3572
- metrics: Partial<Record<AnalyticsMetric, number>>;
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>>;
3573
3603
  }
3574
3604
  interface AnalyticsQueryResponse {
3575
3605
  results: AnalyticsQueryResultRow[];
@@ -3580,7 +3610,10 @@ interface AnalyticsQueryResponse {
3580
3610
  requested: [string, string];
3581
3611
  served: [string, string];
3582
3612
  };
3583
- /** True when an events-path window was cut to the retention horizon. */
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
+ */
3584
3617
  clamped: boolean;
3585
3618
  /** Requested metrics this query shape can't carry. */
3586
3619
  metricsOmitted?: AnalyticsMetric[];
@@ -3596,6 +3629,84 @@ interface AnalyticsReadOptions {
3596
3629
  limit?: number;
3597
3630
  offset?: number;
3598
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
+ }
3599
3710
  interface LiveNow {
3600
3711
  /** Visitors on the app right now. */
3601
3712
  count: number;
@@ -3672,6 +3783,17 @@ interface Analytics {
3672
3783
  * batch (the error names its index).
3673
3784
  */
3674
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>;
3675
3797
  /** Who's on the app right now (Redis presence, no time window). */
3676
3798
  live(): Promise<LiveNow>;
3677
3799
  /**
@@ -5213,10 +5335,11 @@ declare class MindStudioAgent$1 {
5213
5335
  get files(): Files;
5214
5336
  /**
5215
5337
  * The `analytics` namespace — read the app's own traffic + event analytics
5216
- * (auto-tracked pageviews, `analytics.track()` events). One general
5217
- * `query()` (metrics × dimensions × filters × time) plus `live()`,
5218
- * `sources()`, `map()`, `aiSources()`, `crawlers.*`. See {@link Analytics}
5219
- * for the lifetime-rollup vs 90-day-events split.
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.
5220
5343
  *
5221
5344
  * @example
5222
5345
  * ```ts
@@ -5489,10 +5612,11 @@ declare class MindStudioAgent$1 {
5489
5612
  * page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
5490
5613
  * array) to purge every snapshot for the app.
5491
5614
  *
5492
- * `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
5493
- * served on. If another app mounts this one under a path prefix, the copies
5494
- * cached at that prefix are purged too — no need to know or pass the mount
5495
- * 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.
5496
5620
  *
5497
5621
  * Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
5498
5622
  * token. Backend / managed-context only.
@@ -12638,10 +12762,27 @@ interface SessionContext {
12638
12762
  * Which surface invoked this method: `voice`/`agent` for conversational
12639
12763
  * tool calls (which carry their session/thread ids below), `web` for a
12640
12764
  * browser interface-session method call, `api` for an app-key or
12641
- * platform-key call. `web`/`api` carry only `visitorId`. Absent entirely
12642
- * on older platform versions.
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.
12643
12768
  */
12644
- channel: 'voice' | 'agent' | 'web' | 'api';
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.
12777
+ */
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';
12645
12786
  /** Voice-session id — matches the browser voice client's `session.sessionId`. */
12646
12787
  voiceSessionId?: string;
12647
12788
  /** Agent-chat thread id. */
@@ -13313,16 +13454,18 @@ declare const events: Events;
13313
13454
  */
13314
13455
  declare const browser: Browser;
13315
13456
  /**
13316
- * Originating-session identity for this invocation — set when the method was
13317
- * triggered by a conversational surface (a voice call's tool use, an
13318
- * agent-chat tool use), absent on plain API/web/cron invocations.
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`.
13319
13462
  *
13320
13463
  * Values are platform-resolved and guaranteed (never model- or
13321
13464
  * client-supplied), so they're safe to key on: `session.voiceSessionId`
13322
13465
  * matches the browser voice client's `session.sessionId`, and
13323
13466
  * `session.visitorId` correlates anonymous sessions. Properties read from the
13324
13467
  * per-request context, so they're always this request's values — check
13325
- * `session.channel` to detect whether one is present.
13468
+ * `session.channel` to detect whether a caller's session is present.
13326
13469
  *
13327
13470
  * @example
13328
13471
  * ```ts
@@ -13336,6 +13479,11 @@ declare const browser: Browser;
13336
13479
  * }
13337
13480
  * return results;
13338
13481
  * }
13482
+ *
13483
+ * // One app serving several sites:
13484
+ * const site = await Sites.findOne((s, $) => s.host === $.host, {
13485
+ * host: session.host,
13486
+ * });
13339
13487
  * ```
13340
13488
  */
13341
13489
  declare const session: Readonly<Partial<SessionContext>>;
@@ -13404,14 +13552,17 @@ declare const reportIssue: (input: ReportIssueInput) => Promise<ReportedIssue>;
13404
13552
  * on their next visit. Bound to the default singleton. Backend / managed-context
13405
13553
  * only. Omit `paths` (or pass an empty array) to purge every snapshot.
13406
13554
  *
13407
- * Pass this app's own route paths; snapshots of those routes cached under
13408
- * another app's mount prefix are purged along with them.
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.
13409
13559
  *
13410
13560
  * @example
13411
13561
  * ```ts
13412
13562
  * import { prerender } from '@mindstudio-ai/agent';
13413
13563
  *
13414
13564
  * await prerender.invalidate(['/u/abc']);
13565
+ * await prerender.invalidate(['https://site-a.com/blog/launch']);
13415
13566
  * ```
13416
13567
  *
13417
13568
  * @see {@link MindStudioAgent.invalidatePrerender}
@@ -13423,4 +13574,4 @@ declare const prerender: {
13423
13574
  };
13424
13575
 
13425
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 };
13426
- 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, VoiceCallParams, 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
@@ -4212,6 +4212,12 @@ function createAnalytics(call) {
4212
4212
  const res = await call("query-batch", { queries: specs });
4213
4213
  return res.results;
4214
4214
  },
4215
+ funnel(options) {
4216
+ return call("funnel", options);
4217
+ },
4218
+ paths(options) {
4219
+ return call("paths", options ?? {});
4220
+ },
4215
4221
  live() {
4216
4222
  return call("live", {});
4217
4223
  },
@@ -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 general
8353
- * `query()` (metrics × dimensions × filters × time) plus `live()`,
8354
- * `sources()`, `map()`, `aiSources()`, `crawlers.*`. See {@link Analytics}
8355
- * for the lifetime-rollup vs 90-day-events split.
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`), whatever host the page is
9004
- * served on. If another app mounts this one under a path prefix, the copies
9005
- * cached at that prefix are purged too — no need to know or pass the mount
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.