@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.
@@ -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
  });
@@ -10977,7 +10985,7 @@ function isNewerVersion(current, latest) {
10977
10985
  return false;
10978
10986
  }
10979
10987
  async function checkForUpdate() {
10980
- const currentVersion = "0.1.173";
10988
+ const currentVersion = "0.1.174";
10981
10989
  if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
10982
10990
  return null;
10983
10991
  }
@@ -11012,7 +11020,7 @@ async function checkForUpdate() {
11012
11020
  }
11013
11021
  }
11014
11022
  function printUpdateNotice(latestVersion) {
11015
- const currentVersion = "0.1.173";
11023
+ const currentVersion = "0.1.174";
11016
11024
  process.stderr.write(
11017
11025
  `
11018
11026
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -11025,7 +11033,7 @@ function isStandaloneBinary() {
11025
11033
  return !argv1.includes("node_modules");
11026
11034
  }
11027
11035
  async function cmdUpdate() {
11028
- const currentVersion = "0.1.173";
11036
+ const currentVersion = "0.1.174";
11029
11037
  process.stderr.write(
11030
11038
  ` ${ansi2.gray("Current version:")} ${currentVersion}
11031
11039
  `
@@ -11146,7 +11154,7 @@ async function cmdLogin(options) {
11146
11154
  process.stderr.write("\n");
11147
11155
  printLogo();
11148
11156
  process.stderr.write("\n");
11149
- const ver = "0.1.173";
11157
+ const ver = "0.1.174";
11150
11158
  process.stderr.write(
11151
11159
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
11152
11160
  `
@@ -11458,7 +11466,7 @@ async function main() {
11458
11466
  const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
11459
11467
  try {
11460
11468
  if (command === "version" || command === "-v") {
11461
- process.stdout.write("0.1.173\n");
11469
+ process.stdout.write("0.1.174\n");
11462
11470
  return;
11463
11471
  }
11464
11472
  if (command === "login") {
package/llms.txt CHANGED
@@ -1961,7 +1961,7 @@ Everything in `SearchOptions` — `mode`, `filter`, `rerank`, `hybrid`, `maxPerD
1961
1961
 
1962
1962
  #### `analytics` — read the app's own traffic + event analytics
1963
1963
 
1964
- The platform auto-tracks pageviews (and custom events via the frontend's `analytics.track()`); the backend `analytics` namespace is the read side, so app code can correlate real traffic with its own data — lifetime views next to each blog post, "N people reading now", conversions beside the records that produced them. Backend only (hook token); reads the LIVE app's real traffic even from a dev sandbox. Rate limited per app (600 reads/min; the SDK auto-retries one 429). For pages composed of several reads, use `analytics.batch([spec, ...])` — up to 10 queries in one round trip, one rate token each, results in request order — instead of a parallel burst of `query()` calls competing with each other. NEVER swallow `rate_limited` errors into empty data: a page silently rendering zeros is worse than surfacing a retry state.
1964
+ The platform auto-tracks pageviews, each page's engagement (active reading time and scroll depth) and visits (and custom events via the frontend's `analytics.track()`); the backend `analytics` namespace is the read side, so app code can correlate real traffic with its own data — lifetime views next to each blog post, "N people reading now", conversions beside the records that produced them. Backend only (hook token); reads the LIVE app's real traffic even from a dev sandbox. Rate limited per app (600 reads/min; the SDK auto-retries one 429). For pages composed of several reads, use `analytics.batch([spec, ...])` — up to 10 queries in one round trip, one rate token each, results in request order — instead of a parallel burst of `query()` calls competing with each other. NEVER swallow `rate_limited` errors into empty data: a page silently rendering zeros is worse than surfacing a retry state.
1965
1965
 
1966
1966
  One general read, `query()`, shaped like the Plausible/GA4 query APIs:
1967
1967
 
@@ -1987,11 +1987,11 @@ const series = await analytics.query({
1987
1987
  });
1988
1988
  ```
1989
1989
 
1990
- Grammar: `metrics` from `pageviews | visitors | visits | events`; `dimensions` is at most ONE entity dimension (`path`, `referrerHost`, `sourceCategory`, `country`, `city`, `deviceType`, `browser`, `os`, `language`, `visitorType`, `utmSource`…`utmContent`, `eventName`) OR `'time'` (with `granularity: '5m'|'hour'|'day'|'week'|'month'` and optional IANA `timezone`); `filters` are `[op, dimension, values]` triples with ops `is | is_not | contains`; `dateRange` is a shorthand (`'1h'|'24h'|'7d'|'30d'|'90d'|'all'`) or `[startISO, endISO]`; `orderBy` (grouped only) accepts `pageviews` or `events`. With `dateRange: 'all'`, granularity is a minimum — the server coarsens as history grows. `city` filter values are plain city names (any country) and always read the 90-day event detail.
1990
+ Grammar: `metrics` from `pageviews | visitors | visits | events` (counts) and `timeOnPage | scrollDepth | visitDuration | bounceRate` (averages: seconds actively read per page, % of the page scrolled, seconds actively read per visit, % of visits with one pageview, no custom event and under 10s active; `null` when there's nothing to average); `dimensions` is at most ONE entity dimension (`path`, `referrerHost`, `sourceCategory`, `country`, `city`, `deviceType`, `browser`, `os`, `language`, `visitorType`, `utmSource`…`utmContent`, `eventName`; the visit's own `entryPath`, `exitPath`, `visitReferrerHost`, `visitSourceCategory`, `visitUtmSource`…`visitUtmContent`; or a custom event's property `prop:<key>`) OR `'time'` (with `granularity: '5m'|'hour'|'day'|'week'|'month'` and optional IANA `timezone`); `filters` are `[op, dimension, values]` triples with ops `is | is_not | contains`, plus the filter-only `visitEvent` (the visit fired that event: `[['is', 'visitEvent', ['signup']]]` grouped by `path` is the pages that led to signups); `dateRange` is a shorthand (`'1h'|'24h'|'7d'|'30d'|'90d'|'all'`) or `[startISO, endISO]`; `orderBy` (grouped only) accepts `pageviews`, `events` or `visits` where the shape carries it. With `dateRange: 'all'`, granularity is a minimum — the server coarsens as history grows. `city` filter values are plain city names (any country) and always read the 90-day event detail.
1991
1991
 
1992
- **Retention split — the one thing to get right:** queries whose filters are all `is` and touch at most one dimension read a rollup kept forever (full lifetime history, exact unique visitors). Cross-dimension intersections, `is_not`, and `contains` scan raw events retained for 90 days; the server clamps the window and reports it. Check `meta`: `source` (`rollup` vs `events`), `clamped`, `window.served`, and `metricsOmitted` — metrics a shape can't carry (e.g. `visits` on grouped reads) are omitted there, never returned as silent zeros. `meta.total` carries the unpaginated group count for paging.
1992
+ **Retention split — the one thing to get right:** queries whose filters are all `is` and touch at most one dimension read a rollup kept forever (full lifetime history, exact unique visitors, and time on page and scroll depth app-wide or per page). Cross-dimension intersections, `is_not`, `contains`, properties and anything about whole visits (visit dimensions, `visitDuration`, `bounceRate`) scan raw events retained for 90 days; the server clamps the window and reports it. Check `meta`: `source` (`rollup` vs `events`), `clamped`, `window.served`, and `metricsOmitted` — metrics a shape can't carry (e.g. `visits` on grouped reads that aren't about visits, `bounceRate` by `path`) are omitted there, never returned as silent zeros. `meta.total` carries the unpaginated group count for paging.
1993
1993
 
1994
- Specials (same `dateRange`/filter-triple grammar): `analytics.live()` → `{count, countries, sparkline}` right now; `analytics.sources(opts?)` → per-session first-source ranking (UTM > referrer > direct) classified by category/vendor incl. AI assistants; `analytics.map(opts?)` → city lat/lon points; `analytics.aiSources(opts?)` → AI-assistant referrals per vendor; `analytics.crawlers.overview()/timeseries()/recent()` → bot/AI-crawler ingestion of the app's pages.
1994
+ Specials (same `dateRange`/filter-triple grammar): `analytics.funnel({ steps, breakdown? })` → visits reaching each step in order and the drop-off, steps being `{ page, match?: 'is'|'contains' }` or `{ event, props? }` (2-8), with filters picking visits; `analytics.paths({ from?, depth?, limit? })` → where visits went after `from` (null = left) and their commonest opening routes; both follow a visitor across the apps sharing the host (mounts) and count as 5 reads; `analytics.live()` → `{count, countries, sparkline}` right now; `analytics.sources(opts?)` → per-session first-source ranking (UTM > referrer > direct) classified by category/vendor incl. AI assistants; `analytics.map(opts?)` → city lat/lon points; `analytics.aiSources(opts?)` → AI-assistant referrals per vendor; `analytics.crawlers.overview()/timeseries()/recent()` → bot/AI-crawler ingestion of the app's pages.
1995
1995
 
1996
1996
  #### `events` — realtime over named channels (publish/subscribe)
1997
1997
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.173",
3
+ "version": "0.1.174",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",