turno-browser 0.3.0 → 0.5.0
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 +122 -0
- package/README.md +95 -123
- package/dist/act-model.d.ts +85 -0
- package/dist/act-model.js +117 -0
- package/dist/act.d.ts +37 -0
- package/dist/act.js +600 -0
- package/dist/api.d.ts +90 -2
- package/dist/api.js +41 -4
- package/dist/argv.d.ts +16 -2
- package/dist/argv.js +100 -3
- package/dist/background-state.d.ts +54 -0
- package/dist/background-state.js +97 -0
- package/dist/background.d.ts +69 -0
- package/dist/background.js +458 -0
- package/dist/batch.d.ts +5 -0
- package/dist/batch.js +3 -3
- package/dist/bin/mcp.js +103 -6
- package/dist/captcha.d.ts +77 -0
- package/dist/captcha.js +334 -0
- package/dist/cdp-relay.d.ts +20 -0
- package/dist/cdp-relay.js +101 -0
- package/dist/chrome-features.d.ts +23 -0
- package/dist/chrome-features.js +44 -0
- package/dist/cli/background.d.ts +11 -0
- package/dist/cli/background.js +132 -0
- package/dist/cli/commands.d.ts +16 -0
- package/dist/cli/commands.js +515 -0
- package/dist/cli/context.d.ts +75 -0
- package/dist/cli/context.js +44 -0
- package/dist/cli/do-background.d.ts +27 -0
- package/dist/cli/do-background.js +212 -0
- package/dist/cli/do.d.ts +85 -0
- package/dist/cli/do.js +558 -0
- package/dist/cli/flows.d.ts +28 -0
- package/dist/cli/flows.js +303 -0
- package/dist/cli/identity.d.ts +37 -0
- package/dist/cli/identity.js +906 -0
- package/dist/cli/live.d.ts +7 -0
- package/dist/cli/live.js +99 -0
- package/dist/cli/main.d.ts +16 -0
- package/dist/cli/main.js +171 -0
- package/dist/cli/secret.d.ts +4 -0
- package/dist/cli/secret.js +151 -0
- package/dist/cli/session.d.ts +6 -0
- package/dist/cli/session.js +106 -0
- package/dist/cli/setup.d.ts +7 -0
- package/dist/cli/setup.js +180 -0
- package/dist/cli/vault.d.ts +5 -0
- package/dist/cli/vault.js +192 -0
- package/dist/client.d.ts +82 -0
- package/dist/client.js +303 -0
- package/dist/diagnose.d.ts +7 -0
- package/dist/diagnose.js +61 -6
- package/dist/doctor.d.ts +37 -3
- package/dist/doctor.js +264 -6
- package/dist/engine-attach.d.ts +27 -0
- package/dist/engine-attach.js +165 -0
- package/dist/engine-camoufox.d.ts +32 -0
- package/dist/engine-camoufox.js +271 -0
- package/dist/engine-lightpanda.d.ts +72 -0
- package/dist/engine-lightpanda.js +293 -0
- package/dist/engine.d.ts +63 -11
- package/dist/engine.js +106 -29
- package/dist/flows.d.ts +127 -0
- package/dist/flows.js +294 -0
- package/dist/governor.d.ts +42 -7
- package/dist/governor.js +82 -32
- package/dist/health.js +2 -1
- package/dist/host.d.ts +38 -2
- package/dist/host.js +689 -52
- package/dist/human-input.d.ts +84 -0
- package/dist/human-input.js +448 -0
- package/dist/humanize.d.ts +123 -0
- package/dist/humanize.js +241 -0
- package/dist/identities.js +4 -1
- package/dist/idle-timer.d.ts +12 -0
- package/dist/idle-timer.js +25 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.js +7 -1
- package/dist/lifecycle.d.ts +11 -1
- package/dist/lifecycle.js +11 -2
- package/dist/live-client.d.ts +22 -0
- package/dist/live-client.js +95 -0
- package/dist/live-page.d.ts +4 -0
- package/dist/live-page.js +144 -0
- package/dist/live-server.d.ts +173 -0
- package/dist/live-server.js +643 -0
- package/dist/live.d.ts +120 -0
- package/dist/live.js +204 -0
- package/dist/login-tool.d.ts +13 -0
- package/dist/login-tool.js +8 -3
- package/dist/login.d.ts +4 -1
- package/dist/login.js +12 -2
- package/dist/names.d.ts +28 -0
- package/dist/names.js +25 -0
- package/dist/network-chrome.d.ts +74 -0
- package/dist/network-chrome.js +178 -0
- package/dist/network.d.ts +125 -0
- package/dist/network.js +264 -0
- package/dist/opt-in-settings.d.ts +69 -0
- package/dist/opt-in-settings.js +152 -0
- package/dist/recorder.d.ts +88 -0
- package/dist/recorder.js +538 -0
- package/dist/recordings.d.ts +116 -0
- package/dist/recordings.js +474 -0
- package/dist/redact.d.ts +7 -0
- package/dist/redact.js +18 -0
- package/dist/replay.d.ts +20 -0
- package/dist/replay.js +383 -0
- package/dist/reputation.d.ts +24 -2
- package/dist/reputation.js +63 -17
- package/dist/runtime-lock.js +3 -2
- package/dist/session-export.js +1 -1
- package/dist/session.d.ts +10 -2
- package/dist/session.js +10 -2
- package/dist/settings.d.ts +104 -2
- package/dist/settings.js +204 -6
- package/dist/sharing.d.ts +96 -0
- package/dist/sharing.js +269 -0
- package/dist/snippet.d.ts +8 -2
- package/dist/snippet.js +10 -4
- package/dist/tab-locks.d.ts +63 -0
- package/dist/tab-locks.js +179 -0
- package/dist/tools.d.ts +38 -0
- package/dist/tools.js +20 -1
- package/dist/tuning.d.ts +14 -0
- package/dist/tuning.js +9 -0
- package/dist/upstream.d.ts +11 -0
- package/dist/vault.js +5 -4
- package/npm-shrinkwrap.json +6 -5
- package/package.json +13 -7
package/dist/tuning.js
CHANGED
|
@@ -23,6 +23,15 @@ export function resolveTuning(settings, flags = {}) {
|
|
|
23
23
|
backgroundThrottling: flags.backgroundThrottling ?? settings?.backgroundThrottling ?? false,
|
|
24
24
|
...(settle === undefined ? {} : { settleMs: settle }),
|
|
25
25
|
resources: resourcePolicy(settings),
|
|
26
|
+
humanize: {
|
|
27
|
+
...settings?.humanize,
|
|
28
|
+
level: flags.humanize ?? settings?.humanize?.level ?? "off",
|
|
29
|
+
},
|
|
30
|
+
sharing: flags.sharing ?? settings?.sharing ?? "session",
|
|
31
|
+
tabLocks: {
|
|
32
|
+
...(settings?.tabLocks?.wait === undefined ? {} : { waitMs: ms(settings.tabLocks.wait) }),
|
|
33
|
+
...(settings?.tabLocks?.release === undefined ? {} : { releaseMs: ms(settings.tabLocks.release) }),
|
|
34
|
+
},
|
|
26
35
|
};
|
|
27
36
|
}
|
|
28
37
|
function resourcePolicy(settings) {
|
package/dist/upstream.d.ts
CHANGED
|
@@ -111,6 +111,15 @@ export interface UpstreamContext {
|
|
|
111
111
|
tabs(): UpstreamTab[];
|
|
112
112
|
/** The tab the stock tools act on. */
|
|
113
113
|
currentTab(): UpstreamTab | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Builds the tab list (every page of the browser context, then each new one) on first use.
|
|
116
|
+
* `"sharing": "tabs"` calls it as soon as a session's view exists, so the view knows every tab.
|
|
117
|
+
*/
|
|
118
|
+
ensureBrowserContext(): Promise<unknown>;
|
|
119
|
+
/** Opens a page and makes it the current tab (`browser_tabs` action `new`). */
|
|
120
|
+
newTab(): Promise<UpstreamTab>;
|
|
121
|
+
/** Points the stock tools at a tab without bringing it to the front (`"sharing": "tabs"`). */
|
|
122
|
+
_setCurrentTab(tab: UpstreamTab | undefined): void;
|
|
114
123
|
}
|
|
115
124
|
/**
|
|
116
125
|
* The tabs of a `BrowserBackend`, for the tab governor: `initialize` builds the
|
|
@@ -185,6 +194,8 @@ interface CoreBundle {
|
|
|
185
194
|
tools: UpstreamTools;
|
|
186
195
|
utils: {
|
|
187
196
|
gracefullyProcessExitDoNotHang(code: number): void;
|
|
197
|
+
/** What upstream's exit watchdog awaits before the process exits (stdin closed, SIGTERM). */
|
|
198
|
+
gracefullyCloseSet: Set<() => Promise<void>>;
|
|
188
199
|
};
|
|
189
200
|
}
|
|
190
201
|
/** A zod schema of the bundled zod, as far as turno tools build one. */
|
package/dist/vault.js
CHANGED
|
@@ -4,6 +4,7 @@ import { browserPaths, writePrivateFile } from "turno-core/paths";
|
|
|
4
4
|
import { requireSecretStore } from "turno-core/secrets";
|
|
5
5
|
import { IdentityError, assertIdentityId, identityDir } from "./ids.js";
|
|
6
6
|
import { parseTotpSecret } from "./totp.js";
|
|
7
|
+
import { names } from "./names.js";
|
|
7
8
|
/**
|
|
8
9
|
* The credential vault of a browser identity: a username, a password and optionally
|
|
9
10
|
* a TOTP secret per site, so `browser_login` can fill a sign-in form without the model ever
|
|
@@ -144,7 +145,7 @@ export async function vaultAdd(id, site, input, options = {}) {
|
|
|
144
145
|
assertIdentityId(id);
|
|
145
146
|
assertSiteKey(site);
|
|
146
147
|
if (!existsDir(identityDir(id, env)))
|
|
147
|
-
throw new VaultError(`identity "${id}" does not exist (
|
|
148
|
+
throw new VaultError(`identity "${id}" does not exist (${names().browser} add ${id})`);
|
|
148
149
|
if (!input.urls.length)
|
|
149
150
|
throw new VaultError("give the sign-in page with --url (for example --url https://github.com/login)");
|
|
150
151
|
const origins = [...new Set(input.urls.map(vaultOrigin))];
|
|
@@ -203,7 +204,7 @@ export function vaultSetSubmit(id, submit, options = {}) {
|
|
|
203
204
|
if (submit !== "confirm" && submit !== "auto")
|
|
204
205
|
throw new VaultError(`submit must be "confirm" or "auto"`);
|
|
205
206
|
if (!existsDir(identityDir(id, env)))
|
|
206
|
-
throw new VaultError(`identity "${id}" does not exist (
|
|
207
|
+
throw new VaultError(`identity "${id}" does not exist (${names().browser} add ${id})`);
|
|
207
208
|
const index = readIndex(id, env);
|
|
208
209
|
index.submit = submit;
|
|
209
210
|
writeIndex(id, index, env);
|
|
@@ -232,7 +233,7 @@ function isCredential(v) {
|
|
|
232
233
|
export async function readCredential(id, site, options = {}) {
|
|
233
234
|
const raw = await guarded(`reading ${site}`, () => storeOf(options).get(vaultItem(id, site)));
|
|
234
235
|
if (raw === undefined)
|
|
235
|
-
throw new VaultError(`the credentials of "${site}" are missing from the secret store; add them again with
|
|
236
|
+
throw new VaultError(`the credentials of "${site}" are missing from the secret store; add them again with ${names().browser} vault add ${id} ${site}`);
|
|
236
237
|
let v;
|
|
237
238
|
try {
|
|
238
239
|
v = JSON.parse(raw);
|
|
@@ -241,7 +242,7 @@ export async function readCredential(id, site, options = {}) {
|
|
|
241
242
|
v = undefined;
|
|
242
243
|
}
|
|
243
244
|
if (!isCredential(v))
|
|
244
|
-
throw new VaultError(`the secret store item of "${site}" is not a turno-browser credential; add it again with
|
|
245
|
+
throw new VaultError(`the secret store item of "${site}" is not a turno-browser credential; add it again with ${names().browser} vault add ${id} ${site}`);
|
|
245
246
|
return { username: v.username, password: v.password, ...(v.totp ? { totp: v.totp } : {}) };
|
|
246
247
|
}
|
|
247
248
|
/** True when the identity's vault lists any site (an unreadable index counts as yes). */
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turno-browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "turno-browser",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.5.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
13
13
|
"patchright-core": "1.64.3",
|
|
14
|
-
"turno-core": "0.
|
|
14
|
+
"turno-core": "0.2.0"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
+
"turno-browser": "dist/cli/main.js",
|
|
17
18
|
"turno-browser-mcp": "dist/bin/mcp.js"
|
|
18
19
|
},
|
|
19
20
|
"engines": {
|
|
@@ -1017,8 +1018,8 @@
|
|
|
1017
1018
|
}
|
|
1018
1019
|
},
|
|
1019
1020
|
"node_modules/turno-core": {
|
|
1020
|
-
"version": "0.
|
|
1021
|
-
"resolved": "https://registry.npmjs.org/turno-core/-/turno-core-0.
|
|
1021
|
+
"version": "0.2.0",
|
|
1022
|
+
"resolved": "https://registry.npmjs.org/turno-core/-/turno-core-0.2.0.tgz",
|
|
1022
1023
|
"license": "Apache-2.0",
|
|
1023
1024
|
"engines": {
|
|
1024
1025
|
"node": ">=22.11"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turno-browser",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "A browser your agents use with your accounts. It stays light on your machine, and the model never sees your passwords.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "William Frank Monroy Mamani (https://github.com/william-monroy)",
|
|
7
7
|
"homepage": "https://turno.wimo.dev",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
|
+
"turno-browser": "dist/cli/main.js",
|
|
30
31
|
"turno-browser-mcp": "dist/bin/mcp.js"
|
|
31
32
|
},
|
|
32
33
|
"files": [
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
43
44
|
"patchright-core": "1.64.3",
|
|
44
|
-
"turno-core": "0.
|
|
45
|
+
"turno-core": "0.2.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@types/node": "^26.6.6",
|
|
@@ -55,15 +56,20 @@
|
|
|
55
56
|
"keywords": [
|
|
56
57
|
"mcp",
|
|
57
58
|
"model-context-protocol",
|
|
59
|
+
"mcp-server",
|
|
58
60
|
"browser",
|
|
59
61
|
"chrome",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
62
|
+
"browser-automation",
|
|
63
|
+
"ai-agents",
|
|
64
|
+
"coding-agents",
|
|
65
|
+
"browser-identities",
|
|
66
|
+
"signed-in-sessions",
|
|
67
|
+
"credential-vault",
|
|
68
|
+
"playwright"
|
|
63
69
|
],
|
|
64
70
|
"mcpName": "io.github.wimo-dev/turno-browser",
|
|
65
71
|
"scripts": {
|
|
66
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/bin/mcp.js",
|
|
72
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/bin/mcp.js dist/cli/main.js",
|
|
67
73
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
68
74
|
"test": "vitest run"
|
|
69
75
|
}
|