turno-browser 0.5.0 → 0.7.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/dist/settings.js CHANGED
@@ -54,6 +54,9 @@ import { parseDuration, parseSize } from "./units.js";
54
54
  * - `userAgent`, `proxy` (format 11), and the `"camoufox"` value of `engine`: opt-in network and
55
55
  * user agent settings (`network.ts`) and Camoufox as an alternate engine
56
56
  * (`engine-camoufox.ts`), all off by default.
57
+ * - `cursor` (format 12): the agent cursor (`agent-cursor.ts`): `"auto"` (the default) draws it
58
+ * when someone can see the browser (a Chrome window, or the live view), `"on"` always, `"off"`
59
+ * never.
57
60
  *
58
61
  * A missing file means Chrome's own defaults, as before identity.json existed.
59
62
  */
@@ -64,7 +67,7 @@ import { parseDuration, parseSize } from "./units.js";
64
67
  * only when it uses one of them, so an older turno-browser keeps reading every other file and
65
68
  * refuses one it would misread with "update turno-browser".
66
69
  */
67
- export const IDENTITY_FORMAT_VERSION = 11;
70
+ export const IDENTITY_FORMAT_VERSION = 12;
68
71
  /** The keys format 2 added. */
69
72
  const FORMAT_2_KEYS = ["tabs", "backgroundThrottling", "settle", "block", "cache"];
70
73
  /** The keys format 3 added. */
@@ -92,6 +95,10 @@ export const MIN_LIVE_WAIT_MS = 5_000;
92
95
  export const MAX_LIVE_WAIT_MS = 30 * 60_000;
93
96
  /** The keys format 11 added (the `"camoufox"` engine also writes format 11). */
94
97
  const FORMAT_11_KEYS = ["userAgent", "proxy"];
98
+ /** The keys format 12 added. */
99
+ const FORMAT_12_KEYS = ["cursor"];
100
+ /** The values of `cursor` (the agent cursor, `agent-cursor.ts`). */
101
+ export const CURSOR_MODES = ["auto", "on", "off"];
95
102
  /** The values of `engine`: `"chrome"` (the default), read mode, and Camoufox (format 11). */
96
103
  const ENGINE_VALUES = ["chrome", "lightpanda", "camoufox"];
97
104
  /** Recordings size cap bounds. */
@@ -122,6 +129,7 @@ const KEYS = new Set([
122
129
  ...FORMAT_9_KEYS,
123
130
  ...FORMAT_10_KEYS,
124
131
  ...FORMAT_11_KEYS,
132
+ ...FORMAT_12_KEYS,
125
133
  "created",
126
134
  "updated",
127
135
  ]);
@@ -199,6 +207,8 @@ function browserProblems(v, out) {
199
207
  humanizeProblems(v.humanize, out);
200
208
  if (v.sharing !== undefined && v.sharing !== "session" && v.sharing !== "tabs")
201
209
  out.push('sharing must be "session" (the default, one agent session at a time) or "tabs"');
210
+ if (v.cursor !== undefined && !CURSOR_MODES.includes(v.cursor))
211
+ out.push('cursor must be "auto" (the default, when the browser can be seen), "on" or "off"');
202
212
  engineProblems(v, out);
203
213
  recordProblems(v, out);
204
214
  actProblems(v.act, out);
@@ -469,6 +479,7 @@ export function writeIdentitySettings(id, patch, env = process.env, now = new Da
469
479
  next[key] = value;
470
480
  }
471
481
  const formats = [
482
+ FORMAT_12_KEYS,
472
483
  FORMAT_11_KEYS,
473
484
  FORMAT_10_KEYS,
474
485
  FORMAT_9_KEYS,
@@ -481,7 +492,8 @@ export function writeIdentitySettings(id, patch, env = process.env, now = new Da
481
492
  FORMAT_2_KEYS,
482
493
  ];
483
494
  // Camoufox is an engine value, not a key: it writes format 11, so an older turno-browser refuses it.
484
- const newest = next.engine === "camoufox" ? 0 : formats.findIndex((keys) => keys.some((k) => next[k] !== undefined));
495
+ const found = formats.findIndex((keys) => keys.some((k) => next[k] !== undefined));
496
+ const newest = next.engine === "camoufox" && (found < 0 || found > 1) ? 1 : found;
485
497
  next.version = newest < 0 ? 1 : IDENTITY_FORMAT_VERSION - newest;
486
498
  if (typeof next.locale === "string")
487
499
  next.locale = canonicalLocale(next.locale) ?? next.locale;
package/dist/tuning.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { HumanizeLevel, HumanizeSettings } from "./humanize.js";
2
2
  import { type ResourcePolicy } from "./resources.js";
3
- import type { IdentitySettings } from "./settings.js";
3
+ import type { CursorMode, IdentitySettings } from "./settings.js";
4
4
  import type { SharingMode } from "./sharing.js";
5
5
  import type { TabLockPolicy } from "./tab-locks.js";
6
6
  /**
@@ -43,6 +43,8 @@ export interface Tuning {
43
43
  sharing: SharingMode;
44
44
  /** With `"sharing": "tabs"`: the lock wait and idle release of identity.json `tabLocks`. */
45
45
  tabLocks: Partial<TabLockPolicy>;
46
+ /** The agent cursor (`agent-cursor.ts`), from `--cursor` or identity.json `cursor`; `"auto"` by default. */
47
+ cursor: CursorMode;
46
48
  }
47
49
  /** The defaults, documented on the browser identities page. */
48
50
  export declare const DEFAULT_TABS: Readonly<TabPolicy>;
@@ -55,6 +57,7 @@ export interface TuningFlags {
55
57
  backgroundThrottling?: boolean;
56
58
  humanize?: HumanizeLevel;
57
59
  sharing?: SharingMode;
60
+ cursor?: CursorMode;
58
61
  }
59
62
  /** The tuning of a session: flags, then identity.json, then the defaults. */
60
63
  export declare function resolveTuning(settings: IdentitySettings | undefined, flags?: TuningFlags): Tuning;
package/dist/tuning.js CHANGED
@@ -28,6 +28,7 @@ export function resolveTuning(settings, flags = {}) {
28
28
  level: flags.humanize ?? settings?.humanize?.level ?? "off",
29
29
  },
30
30
  sharing: flags.sharing ?? settings?.sharing ?? "session",
31
+ cursor: flags.cursor ?? settings?.cursor ?? "auto",
31
32
  tabLocks: {
32
33
  ...(settings?.tabLocks?.wait === undefined ? {} : { waitMs: ms(settings.tabLocks.wait) }),
33
34
  ...(settings?.tabLocks?.release === undefined ? {} : { releaseMs: ms(settings.tabLocks.release) }),
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "turno-browser",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "turno-browser",
9
- "version": "0.5.0",
9
+ "version": "0.7.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.2.0"
14
+ "turno-core": "0.3.0"
15
15
  },
16
16
  "bin": {
17
17
  "turno-browser": "dist/cli/main.js",
@@ -1018,8 +1018,8 @@
1018
1018
  }
1019
1019
  },
1020
1020
  "node_modules/turno-core": {
1021
- "version": "0.2.0",
1022
- "resolved": "https://registry.npmjs.org/turno-core/-/turno-core-0.2.0.tgz",
1021
+ "version": "0.3.0",
1022
+ "resolved": "https://registry.npmjs.org/turno-core/-/turno-core-0.3.0.tgz",
1023
1023
  "license": "Apache-2.0",
1024
1024
  "engines": {
1025
1025
  "node": ">=22.11"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turno-browser",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
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)",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@modelcontextprotocol/sdk": "1.32.2",
44
44
  "patchright-core": "1.64.3",
45
- "turno-core": "0.2.0"
45
+ "turno-core": "0.3.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^26.6.6",