turno-cli 0.5.1 → 0.5.3

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
@@ -1,5 +1,36 @@
1
1
  # turno-cli
2
2
 
3
+ ## 0.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 298c744: The agent cursor follows the pointer path with humanize on, counts the other busy sessions on the badge with shared tabs, keeps the typing bubble up long enough to see, and keeps its label inside the page. Each session's cursor is named after its own agent ("Claude Code", "Codex", "Cursor", "Copilot", "Gemini CLI") instead of the raw client name or the name of the first one: mcpd sends the client's name with each call (`io.turno/client` in `_meta`), and a shared host uses each connection's own.
8
+ - ce785fd: A password or one-time code never reaches the agent, whoever typed it: every page snapshot (also the snapshot files an action writes to the workspace) shows its value as `[sensitive field]`, and the value is hidden from every later result. `browser_type`, `browser_fill_form` and key presses into a password or one-time code field are refused with an error that says to ask the person (`browser_request_human`) or to use `browser_login`; a flow replay types one only from the secret store (`keychain:<item>`) or from the hidden prompt of `turno browser replay`, which names those parameters for the server it starts in `TURNO_BROWSER_PROMPTED_PARAMS` (listed in `turno help environment`). `browser_network_requests` and `browser_network_request` keep the names of credentials and show `[redacted]` for their values (Authorization, Cookie and Set-Cookie headers, token, code, session, key, secret and password fields), also in a file saved with `filename`. A tool result that ends on a captcha, "verify it's you" or block page says so and suggests that the person handles it.
9
+
10
+ ## 0.5.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 0c723fc: `turno-browser init` sets turno-browser up step by step: it names and creates an identity (or
15
+ uses one that is there), opens Chrome to sign in by hand on a first site, finds the agents
16
+ installed here and runs the agent's `mcp add` command only on a yes. Without a terminal it needs
17
+ `--identity` and `--agent`, skips the sign-in and prints the command instead. `turno-browser`
18
+ with no command now points to it.
19
+
20
+ The first steps say more of what happened:
21
+
22
+ - `login` opens a page that says what to do instead of a blank tab, and on close names the sites
23
+ that were opened, or says that nothing new was signed in.
24
+ - `show` has a "last sign-in" line, local times and a hint to turn on the health check;
25
+ `doctor` says when an identity was never signed in by hand.
26
+ - `list`, `show` and `doctor` say "not in use" instead of "free".
27
+ - `do <id> end` says that Chrome stays open in the background server and how to close it now.
28
+ - `do` errors no longer start with "Error: Error:", and a stale ref or text where a ref goes gets
29
+ a hint (`snapshot`, `find`).
30
+ - `setup claude` suggests `claude-code`.
31
+ - `add` prints its next steps with each explanation on its own line, so the commands paste into
32
+ zsh as they are.
33
+
3
34
  ## 0.5.1
4
35
 
5
36
  ### Patch Changes
package/README.md CHANGED
@@ -49,7 +49,8 @@ whole story, with a small working picture of each part.
49
49
  ## Install
50
50
 
51
51
  ```sh
52
- npx turno-cli demo # try it first, in a throwaway HOME; your own setup is not touched
52
+ # try it first, in a throwaway HOME; your own setup is not touched
53
+ npx turno-cli demo
53
54
  ```
54
55
 
55
56
  Then install it with the package manager you already use (macOS or Linux, Node 22.11+):
@@ -58,7 +59,8 @@ Then install it with the package manager you already use (macOS or Linux, Node 2
58
59
  npm install --global turno-cli
59
60
  pnpm add --global turno-cli
60
61
  bun add --global turno-cli
61
- yarn global add turno-cli # yarn 1 (classic); yarn 2 and later have no global installs
62
+ # yarn 1 (classic); yarn 2 and later have no global installs
63
+ yarn global add turno-cli
62
64
  brew tap wimo-dev/turno && brew trust wimo-dev/turno && brew install turno
63
65
  ```
64
66
 
@@ -122,11 +124,15 @@ Linux. Nothing leaves your machine: no account, no telemetry, no proxy for model
122
124
  ## Quick start
123
125
 
124
126
  ```sh
125
- turno init # finds your agents, profiles, folders and MCP servers, shows the diff,
126
- # then starts the gateway and points every profile at it
127
- claude-work # sign in once per profile (/login)
128
- cd ~/code/acme && turno auto # Claude Code, with this folder's account
129
- turno # where you stand: this folder, accounts, gateway, what to do next
127
+ # finds your agents, profiles, folders and MCP servers, shows the diff,
128
+ # then starts the gateway and points every profile at it
129
+ turno init
130
+ # sign in once per profile (/login)
131
+ claude-work
132
+ # Claude Code, with this folder's account
133
+ cd ~/code/acme && turno auto
134
+ # where you stand: this folder, accounts, gateway, what to do next
135
+ turno
130
136
  ```
131
137
 
132
138
  `turno init` asks before it adopts anything and writes everything as one change, so one
@@ -135,14 +141,21 @@ systemd --user on Linux); `turno init --no-start` leaves it for later (`turno mc
135
141
  then `turno mcp sync`). Step by step instead:
136
142
 
137
143
  ```sh
138
- turno profile add work --color violet # ~/.claude-work and the claude-work command
144
+ # ~/.claude-work and the claude-work command
145
+ turno profile add work --color violet
139
146
  turno profile add personal
140
- claude-work # sign in once per profile (/login)
141
- turno profile assign ~/code/acme work # this folder and everything under it
142
- turno config set default personal # folders without a rule
143
- turno mcp import --move-secrets --write # mcp.toml from the servers you already have
144
- turno mcp daemon start && turno mcp sync # the gateway, and every profile pointed at it
145
- cd ~/code/acme && turno auto # Claude Code, signed in as work
147
+ # sign in once per profile (/login)
148
+ claude-work
149
+ # this folder and everything under it
150
+ turno profile assign ~/code/acme work
151
+ # folders without a rule
152
+ turno config set default personal
153
+ # mcp.toml from the servers you already have
154
+ turno mcp import --move-secrets --write
155
+ # the gateway, and every profile pointed at it
156
+ turno mcp daemon start && turno mcp sync
157
+ # Claude Code, signed in as work
158
+ cd ~/code/acme && turno auto
146
159
  ```
147
160
 
148
161
  Codex, Copilot and Cursor profiles are the same with `--agent codex|copilot|cursor`. Point your
@@ -344,9 +357,12 @@ then npx runs it, with a warning in the server's log. Details: [docs/mcp.md](htt
344
357
  ### Browser with real profiles
345
358
 
346
359
  ```sh
347
- npm install --global turno-browser # separate package, not installed with turno
348
- turno identity add browser:school # an identity and its mcp.toml entry
349
- turno identity login browser:school # sign in by hand once; cookies persist
360
+ # separate package, not installed with turno
361
+ npm install --global turno-browser
362
+ # an identity and its mcp.toml entry
363
+ turno identity add browser:school
364
+ # sign in by hand once; cookies persist
365
+ turno identity login browser:school
350
366
  ```
351
367
 
352
368
  `turno-browser` is its own MCP server. It drives the installed Google Chrome, headed, with a
@@ -363,6 +379,7 @@ languages and locale fixed (`turno browser show|set <id>`).
363
379
  - **Sign-ins the agent never sees.** `turno browser vault add` keeps a username, a password and
364
380
  an optional TOTP secret per site in the OS secret store, and the `browser_login` tool fills
365
381
  them into that site's sign-in page; results are redacted and values are bound to the site.
382
+ A password or a one-time code never comes back to the agent, whoever typed it.
366
383
  - **Sessions you can move.** `turno browser export <id> --out <file>` writes an identity's
367
384
  cookies and storage as one file encrypted with a passphrase, with an expiry, and
368
385
  `turno browser import <file>` reads it on another machine. The vault never leaves.
@@ -394,8 +411,10 @@ go to a hash-chained audit log (`turno identity log`, `--verify` checks the chai
394
411
  ![The turno status line with Nerd Font icons and with Unicode icons](https://raw.githubusercontent.com/wimo-dev/turno/main/docs/assets/statusline.png)
395
412
 
396
413
  ```sh
397
- turno ui install # font + statusLine in the shared settings.json
398
- turno ui install --terminal current # also set the font in this terminal
414
+ # font + statusLine in the shared settings.json
415
+ turno ui install
416
+ # also set the font in this terminal
417
+ turno ui install --terminal current
399
418
  ```
400
419
 
401
420
  Row 1: profile and plan, 5 h and weekly usage of that account with time to reset, context, and
@@ -477,8 +496,10 @@ category). Security issues: [SECURITY.md](https://github.com/wimo-dev/turno/blob
477
496
 
478
497
  ```sh
479
498
  pnpm install && pnpm build
480
- pnpm check # typecheck, lint (Biome, knip), tests (sandboxed HOME), text rules, licenses
481
- pnpm test:e2e # also the end-to-end test that needs the network (Cursor)
499
+ # typecheck, lint (Biome, knip), tests (sandboxed HOME), text rules, licenses
500
+ pnpm check
501
+ # also the end-to-end test that needs the network (Cursor)
502
+ pnpm test:e2e
482
503
  ```
483
504
 
484
505
  ## License
@@ -8,7 +8,7 @@ import { defaultDoDeps, mcpdTransport } from "./browser-do.js";
8
8
  * The API version this turno was built against. Typed by the package's own constant, so a
9
9
  * change of its API_VERSION in the workspace fails the typecheck until this line follows.
10
10
  */
11
- export const BROWSER_API = { major: 1, minor: 12 };
11
+ export const BROWSER_API = { major: 1, minor: 13 };
12
12
  export const INSTALL_HINT = OPTIONAL.browser.install;
13
13
  export const NOT_INSTALLED = notInstalled(OPTIONAL.browser);
14
14
  /** The summary in `turno help` (registry.ts HELP_SUMMARY). */
@@ -72,6 +72,10 @@ const ENVIRONMENT = [
72
72
  ["TURNO_SESSION_CWD_B64", "the agent's folder (base64url), sent to the gateway"],
73
73
  ["TURNO_MCPD_TOKEN", "the profile's gateway token, for agents that read headers from the environment"],
74
74
  ["TURNO_MCPD_SERVICE", "set by the mcpd service file (LaunchAgent or systemd unit)"],
75
+ [
76
+ "TURNO_BROWSER_PROMPTED_PARAMS",
77
+ "set by turno browser replay for the server it starts: the parameters typed at its hidden prompt",
78
+ ],
75
79
  ],
76
80
  },
77
81
  {
@@ -14,7 +14,8 @@ import { ErrorCode, rpcError } from "./jsonrpc.js";
14
14
  * meter) are off by default: each is a `CallStage` that something turns on explicitly. They
15
15
  * see the call as the client sent it, and the outcome the client gets.
16
16
  * - `calllog` times the call and hands one event to the call log when it is on.
17
- * - `session` puts the client session id in the forwarded `_meta` (`io.turno/session`).
17
+ * - `session` puts the client session id in the forwarded `_meta` (`io.turno/session`), and the
18
+ * client's name (`io.turno/client`) when it gave one in initialize.
18
19
  *
19
20
  * Stage names are unique, lowercase, and never a built-in name.
20
21
  */
@@ -23,6 +24,11 @@ import { ErrorCode, rpcError } from "./jsonrpc.js";
23
24
  * import, erased at build): if the two ever differ, the typecheck fails.
24
25
  */
25
26
  export const SESSION_META = "io.turno/session";
27
+ /**
28
+ * The `_meta` key of the client's own name (`clientInfo.name` from its initialize), sent next to
29
+ * the session id when mcpd knows it, so turno-browser's agent cursor names the agent, not mcpd.
30
+ */
31
+ export const CLIENT_META = "io.turno/client";
26
32
  /**
27
33
  * A server that declares this experimental capability in `initialize` hears, with
28
34
  * `SESSION_ENDED`, when a client session that made a call to it ends (`InstanceManager.detach`).
@@ -94,7 +100,8 @@ function callLogStage(sink) {
94
100
  * `session`: the client session id in `_meta[SESSION_META]`. A random UUID per client handle
95
101
  * (one 2025-11-25 session, or one stateless client: profile, server, PID and folder), kept for
96
102
  * the life of the handle. It is not the Mcp-Session-Id, so a server learns nothing it could use
97
- * against mcpd. A value the client sent under the same key is replaced.
103
+ * against mcpd. With it goes the client's name (`_meta[CLIENT_META]`) when initialize gave one. Values
104
+ * the client sent under either key are replaced.
98
105
  */
99
106
  function sessionStage() {
100
107
  return {
@@ -108,7 +115,12 @@ function sessionStage() {
108
115
  const meta = typeof call.params._meta === "object" && call.params._meta !== null
109
116
  ? call.params._meta
110
117
  : {};
111
- call.params = { ...call.params, _meta: { ...meta, [SESSION_META]: id } };
118
+ const { [CLIENT_META]: _sent, ...rest } = meta;
119
+ const name = call.client.ctx.clientName;
120
+ call.params = {
121
+ ...call.params,
122
+ _meta: { ...rest, [SESSION_META]: id, ...(name ? { [CLIENT_META]: name } : {}) },
123
+ };
112
124
  return next(call);
113
125
  },
114
126
  };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "turno-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "turno-cli",
9
- "version": "0.5.1",
9
+ "version": "0.5.3",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "1.32.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turno-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Switch accounts in your coding agents and keep the conversation, the MCP sign-ins and the browser session.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^26.6.6",
54
- "turno-browser": "0.6.0",
54
+ "turno-browser": "0.8.0",
55
55
  "turno-fonts": "0.1.2",
56
56
  "typescript": "^7.0.2",
57
57
  "vitest": "^5.1.0"