@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/postinstall.js
CHANGED
|
@@ -271,9 +271,9 @@ var init_metadata = __esm({
|
|
|
271
271
|
"downloadVideo": {
|
|
272
272
|
stepType: "downloadVideo",
|
|
273
273
|
description: "Download a video file",
|
|
274
|
-
usageNotes: "- Works with YouTube, TikTok, etc., by using ytdlp behind the scenes\n- Can save as mp4 or mp3",
|
|
275
|
-
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"] },
|
|
276
|
-
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the downloaded and re-hosted video file" } }, "required": ["videoUrl"] }
|
|
274
|
+
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",
|
|
275
|
+
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"] },
|
|
276
|
+
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"] }
|
|
277
277
|
},
|
|
278
278
|
"enhanceImageGenerationPrompt": {
|
|
279
279
|
stepType: "enhanceImageGenerationPrompt",
|
|
@@ -5591,6 +5591,7 @@ function createVoice(call) {
|
|
|
5591
5591
|
async call(params) {
|
|
5592
5592
|
return await call("call", {
|
|
5593
5593
|
to: params.to,
|
|
5594
|
+
...params.from !== void 0 ? { from: params.from } : {},
|
|
5594
5595
|
assumeIdentity: params.assumeIdentity === true
|
|
5595
5596
|
});
|
|
5596
5597
|
}
|
|
@@ -5612,6 +5613,12 @@ function createAnalytics(call) {
|
|
|
5612
5613
|
const res = await call("query-batch", { queries: specs });
|
|
5613
5614
|
return res.results;
|
|
5614
5615
|
},
|
|
5616
|
+
funnel(options) {
|
|
5617
|
+
return call("funnel", options);
|
|
5618
|
+
},
|
|
5619
|
+
paths(options) {
|
|
5620
|
+
return call("paths", options ?? {});
|
|
5621
|
+
},
|
|
5615
5622
|
live() {
|
|
5616
5623
|
return call("live", {});
|
|
5617
5624
|
},
|
|
@@ -5906,36 +5913,35 @@ Then describe the page briefly: its layout, its content, and what state it is in
|
|
|
5906
5913
|
});
|
|
5907
5914
|
}
|
|
5908
5915
|
async screenshot(options = {}) {
|
|
5909
|
-
const { store, key, fullPage, cursor } = options;
|
|
5916
|
+
const { store, key, fullPage, cursor, boxes } = options;
|
|
5917
|
+
const asked = {
|
|
5918
|
+
op: "screenshot",
|
|
5919
|
+
fullPage: !!fullPage,
|
|
5920
|
+
cursor: !!cursor,
|
|
5921
|
+
...boxes?.length ? { boxes: boxes.map(toWireTarget) } : {}
|
|
5922
|
+
};
|
|
5923
|
+
const measured = (shot2) => ({
|
|
5924
|
+
width: shot2.width,
|
|
5925
|
+
height: shot2.height,
|
|
5926
|
+
deviceScaleFactor: shot2.deviceScaleFactor,
|
|
5927
|
+
...shot2.boxes ? { boxes: shot2.boxes } : {}
|
|
5928
|
+
});
|
|
5910
5929
|
if (store) {
|
|
5911
5930
|
const token = await store.createUploadToken({
|
|
5912
5931
|
...key ? { key } : { filename: "screenshot.png" },
|
|
5913
5932
|
contentType: "image/png"
|
|
5914
5933
|
});
|
|
5915
5934
|
const shot2 = await this.run({
|
|
5916
|
-
|
|
5917
|
-
fullPage: !!fullPage,
|
|
5918
|
-
cursor: !!cursor,
|
|
5935
|
+
...asked,
|
|
5919
5936
|
upload: { url: token.upload.url, fields: token.upload.fields }
|
|
5920
5937
|
});
|
|
5921
|
-
return {
|
|
5922
|
-
...await store.head(token.key),
|
|
5923
|
-
width: shot2.width,
|
|
5924
|
-
height: shot2.height,
|
|
5925
|
-
deviceScaleFactor: shot2.deviceScaleFactor
|
|
5926
|
-
};
|
|
5938
|
+
return { ...await store.head(token.key), ...measured(shot2) };
|
|
5927
5939
|
}
|
|
5928
|
-
const shot = await this.run(
|
|
5929
|
-
op: "screenshot",
|
|
5930
|
-
fullPage: !!fullPage,
|
|
5931
|
-
cursor: !!cursor
|
|
5932
|
-
});
|
|
5940
|
+
const shot = await this.run(asked);
|
|
5933
5941
|
return {
|
|
5934
5942
|
data: Buffer.from(shot.data ?? "", "base64"),
|
|
5935
5943
|
contentType: "image/png",
|
|
5936
|
-
|
|
5937
|
-
height: shot.height,
|
|
5938
|
-
deviceScaleFactor: shot.deviceScaleFactor
|
|
5944
|
+
...measured(shot)
|
|
5939
5945
|
};
|
|
5940
5946
|
}
|
|
5941
5947
|
/**
|
|
@@ -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
|
|
8694
|
-
* `query()` (metrics × dimensions × filters × time) plus
|
|
8695
|
-
* `
|
|
8696
|
-
* for the lifetime-rollup vs
|
|
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`),
|
|
9345
|
-
*
|
|
9346
|
-
*
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
11469
|
+
process.stdout.write("0.1.174\n");
|
|
11462
11470
|
return;
|
|
11463
11471
|
}
|
|
11464
11472
|
if (command === "login") {
|
package/llms.txt
CHANGED
|
@@ -378,8 +378,11 @@ Scan text for personally identifiable information using Microsoft Presidio.
|
|
|
378
378
|
Download a video file
|
|
379
379
|
- Works with YouTube, TikTok, etc., by using ytdlp behind the scenes
|
|
380
380
|
- Can save as mp4 or mp3
|
|
381
|
-
-
|
|
382
|
-
-
|
|
381
|
+
- `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
|
|
382
|
+
- `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
|
|
383
|
+
- 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
|
|
384
|
+
- Input: `{ videoUrl: string, format: "mp4" | "mp3", item?: number, start?: number, duration?: number }`
|
|
385
|
+
- Output: `{ videoUrl: string, title?: string, durationSec?: number, itemCount?: number }`
|
|
383
386
|
|
|
384
387
|
#### enhanceImageGenerationPrompt
|
|
385
388
|
Generate or enhance an image generation prompt using a language model. Optionally generates a negative prompt.
|
|
@@ -1958,7 +1961,7 @@ Everything in `SearchOptions` — `mode`, `filter`, `rerank`, `hybrid`, `maxPerD
|
|
|
1958
1961
|
|
|
1959
1962
|
#### `analytics` — read the app's own traffic + event analytics
|
|
1960
1963
|
|
|
1961
|
-
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.
|
|
1962
1965
|
|
|
1963
1966
|
One general read, `query()`, shaped like the Plausible/GA4 query APIs:
|
|
1964
1967
|
|
|
@@ -1984,11 +1987,11 @@ const series = await analytics.query({
|
|
|
1984
1987
|
});
|
|
1985
1988
|
```
|
|
1986
1989
|
|
|
1987
|
-
Grammar: `metrics` from `pageviews | visitors | visits | events
|
|
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.
|
|
1988
1991
|
|
|
1989
|
-
**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 `
|
|
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.
|
|
1990
1993
|
|
|
1991
|
-
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.
|
|
1992
1995
|
|
|
1993
1996
|
#### `events` — realtime over named channels (publish/subscribe)
|
|
1994
1997
|
|
|
@@ -2033,12 +2036,12 @@ await session.type({ label: 'Email' }, process.env.DEMO_EMAIL!);
|
|
|
2033
2036
|
await session.type({ label: 'Password' }, process.env.DEMO_PASSWORD!, { submit: true });
|
|
2034
2037
|
await session.waitFor('Dashboard');
|
|
2035
2038
|
const clicked = await session.click({ role: 'link', text: 'Settings' }); // { url, title, snapshot, matched, box }
|
|
2036
|
-
const shot = await session.screenshot({ store: Shots }); // StoredFile & { width, height, deviceScaleFactor }; no store → { data: Buffer, ... }
|
|
2039
|
+
const shot = await session.screenshot({ store: Shots, boxes: ['e12'] }); // StoredFile & { width, height, deviceScaleFactor, boxes }; no store → { data: Buffer, ... }
|
|
2037
2040
|
const later = await browser.session(session.id); // pick it up from another call (a cron resuming a run)
|
|
2038
2041
|
await session.close();
|
|
2039
2042
|
```
|
|
2040
2043
|
|
|
2041
|
-
Every action returns the page afterward, `{ url, title, snapshot }`: `snapshot` is an outline with a ref on everything actionable (`button "Save" [ref=e12]`). Targets: a ref from the latest snapshot (`'e12'`), or `{ text }`, `{ role, text }`, `{ label }`, `{ selector }`. Element actions add `matched` and `box` (viewport
|
|
2044
|
+
Every action returns the page afterward, `{ url, title, snapshot }`: `snapshot` is an outline with a ref on everything actionable (`button "Save" [ref=e12]`). Targets: a ref from the latest snapshot (`'e12'`), or `{ text }`, `{ role, text }`, `{ label }`, `{ selector }`. Element actions add `matched` and `box` (where it was in the viewport as the action landed, CSS pixels). Pages render at 2x, so a screenshot is twice the viewport's size (its `deviceScaleFactor`). The rest: `goto(url)`, `snapshot()`, `select(target, option)`, `press(key)`, `scroll({ to?, by? })`, `screenshot({ fullPage?, cursor?, boxes? })` (`cursor` keeps the session's cursor in the shot, where it last acted; `boxes` takes targets, and the shot's `boxes` say where each is in it, measured as it's taken, `null` where the page hasn't one: draw highlights from these, since a page can move after an action), `evaluate(fn, arg?)` (sent as source: no closures, pass what it needs as `arg`). Input is the browser's own; password values never appear in a snapshot. Pages go out through the deployment's exit proxy, on Remy's cloud a US residential address held for the session (the platform's own hosts, the app's included, direct), and the user agent is Chrome's with `RemyBrowser/1.0`, where to report a session and an opaque reference after it; each session's open and close, with its sites, are in the workspace's audit log. Billed for browser time per hour, from ready to its end, and that traffic per MB, so close a session when its work is done; a workspace has 10 open at once unless its limit is raised. Actions on one session run one at a time, in call order.
|
|
2042
2045
|
|
|
2043
2046
|
**A model drives it** through `runTask({ tools: [...session.tools({ secrets: { password: process.env.X! } })] })`: one tool, `browser`, taking a list of steps (`snapshot`, `navigate`, `click`, `type`, `select`, `press`, `scroll`, `wait`) run in order, stopping at the first that fails, answering with each step's outcome and the page after the last. A `type` step can name a secret in place of its text, which the model never sees, and only the latest page stays in full in the task's transcript (`supersedes`). With `session.tools({ screenshots: Store })` the model also gets `browser_screenshot({ question?, fullPage?, cursor? })`, which saves a screenshot to that store and answers with its `key` and a written description (an `analyzeImage` call), for what the outline can't say; those answers all stay in the transcript. **A person watches it** when a method returns `session.grantView()` (after its own access checks) and the frontend calls `browser.view(element, { getToken, onEnd? })` from `@mindstudio-ai/interface`, which draws the page into a `<canvas>`; its `state` is `connecting`, `live`, then `ended` (with `onEnd(reason)`).
|
|
2044
2047
|
|