pi-cursor-sdk 0.1.28 → 0.1.29

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +38 -35
  3. package/docs/crabbox-platform-testing-lessons.md +508 -0
  4. package/docs/cursor-dogfood-checklist.md +4 -3
  5. package/docs/cursor-live-smoke-checklist.md +22 -20
  6. package/docs/cursor-model-ux-spec.md +12 -12
  7. package/docs/cursor-native-tool-replay.md +10 -10
  8. package/docs/cursor-native-tool-visual-audit.md +9 -7
  9. package/docs/cursor-testing-lessons.md +20 -15
  10. package/docs/cursor-tool-surfaces.md +3 -3
  11. package/docs/platform-smoke.md +994 -0
  12. package/package.json +32 -3
  13. package/platform-smoke.config.mjs +21 -0
  14. package/scripts/debug-provider-events.mjs +10 -3
  15. package/scripts/debug-sdk-events.mjs +10 -2
  16. package/scripts/isolated-cursor-smoke.sh +4 -4
  17. package/scripts/lib/cursor-visual-render.mjs +1 -0
  18. package/scripts/platform-smoke/artifacts.mjs +124 -0
  19. package/scripts/platform-smoke/assertions.mjs +101 -0
  20. package/scripts/platform-smoke/card-detect.mjs +96 -0
  21. package/scripts/platform-smoke/crabbox-runner.mjs +215 -0
  22. package/scripts/platform-smoke/doctor.mjs +446 -0
  23. package/scripts/platform-smoke/jsonl-text.mjs +31 -0
  24. package/scripts/platform-smoke/live-suite-runner.mjs +677 -0
  25. package/scripts/platform-smoke/platform-build-windows.ps1 +187 -0
  26. package/scripts/platform-smoke/pty-capture.mjs +131 -0
  27. package/scripts/platform-smoke/render-ansi.mjs +65 -0
  28. package/scripts/platform-smoke/scenarios.mjs +186 -0
  29. package/scripts/platform-smoke/targets.mjs +900 -0
  30. package/scripts/platform-smoke/visual-evidence.mjs +139 -0
  31. package/scripts/platform-smoke.mjs +193 -0
  32. package/scripts/probe-mcp-coldstart.mjs +8 -1
  33. package/scripts/steering-rpc-smoke.mjs +1 -1
  34. package/scripts/tmux-live-smoke.sh +3 -3
  35. package/scripts/visual-tui-smoke.mjs +1 -1
  36. package/src/cursor-pi-tool-bridge-abort.ts +1 -0
  37. package/src/cursor-pi-tool-bridge-diagnostics.ts +12 -1
  38. package/src/cursor-pi-tool-bridge.ts +46 -1
  39. package/src/cursor-provider-turn-lifecycle-emitter.ts +65 -8
  40. package/src/cursor-provider-turn-tool-ledger.ts +2 -3
  41. package/src/cursor-run-final-text.ts +11 -1
  42. package/src/cursor-state.ts +38 -19
  43. package/src/cursor-tool-lifecycle.ts +1 -1
  44. package/src/cursor-tool-manifest.ts +1 -1
  45. package/src/cursor-transcript-utils.ts +7 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.29 - 2026-06-01
6
+
7
+ ### Added
8
+
9
+ - Add the maintainer-local `smoke:platform:*` release gate for macOS, Ubuntu, and Windows native through Crabbox, including packed-install proof, PTY/ConPTY ANSI capture, host-side xterm/PNG visual evidence, JSONL tool/final-marker checks, bridge diagnostics, usage/cache assertions, abort cleanup, artifact manifests, and redaction scans.
10
+
11
+ ### Changed
12
+
13
+ - Upgrade the pinned Cursor SDK runtime dependency to `@cursor/sdk@1.0.17` for package version `0.1.29`.
14
+ - Clarify Composer multi-part final text semantics: final-answer consumers use the last non-empty assistant `text` part, and platform smoke markers must appear in that final text part (#111).
15
+ - Prefer the selected Cursor SDK model alias, such as `composer-2-5`, for Cursor fast-state keys while retaining legacy fallback reads for older `composer-2.5` / base-model keys.
16
+ - Speed up the platform smoke release gate without dropping coverage by running targets concurrently, reusing one live packed-install prep per target session, and replacing fixed sleeps with readiness polling where safe.
17
+
18
+ ### Fixed
19
+
20
+ - Suppress unhelpful generic `Cursor shell: shell` lifecycle noise for shell commands whose details are unsafe to display, while keeping completed shell cards/traces visible.
21
+ - Dedupe duplicate active Cursor SDK tool lifecycle starts by stable tool-call fingerprints, preserving completed tool results.
22
+ - Harden Windows bridge abort cleanup with marker-scoped bash process cancellation and required abort diagnostics.
23
+
5
24
  ## 0.1.28 - 2026-05-29
6
25
 
7
26
  ### Changed
package/README.md CHANGED
@@ -21,7 +21,7 @@ pi install https://github.com/fitchmultz/pi-cursor-sdk
21
21
  2. Start pi with a Cursor model:
22
22
 
23
23
  ```bash
24
- pi --model cursor/composer-2.5
24
+ pi --model cursor/composer-2-5
25
25
  ```
26
26
 
27
27
  3. In pi, run `/login`, choose `Use an API key`, choose `Cursor`, and paste your Cursor SDK API key.
@@ -34,7 +34,7 @@ If pi started without a key, run `/cursor-refresh-models` after `/login` to refr
34
34
  - pi 0.76.0 or newer
35
35
  - a Cursor SDK API key saved through `/login`, available as `CURSOR_API_KEY`, or passed with pi's `--api-key`
36
36
 
37
- No global `@cursor/sdk` install is required. This package depends on exact `@cursor/sdk@1.0.16`, so normal package installation brings in the SDK version this extension was built and tested against. This package declares a pi **minimum** of 0.76.0 with no maximum peer version, so users who update pi before this extension is republished are not blocked from trying the existing extension. The current validation baseline is pi 0.78.0 plus Cursor SDK 1.0.16; older pi or Cursor SDK compatibility paths are not maintained.
37
+ No global `@cursor/sdk` install is required. This package depends on exact `@cursor/sdk@1.0.17`, so normal package installation brings in the SDK version this extension was built and tested against. This package declares a pi **minimum** of 0.76.0 with no maximum peer version, so users who update pi before this extension is republished are not blocked from trying the existing extension. The current validation baseline is pi 0.78.0 plus Cursor SDK 1.0.17; older pi or Cursor SDK compatibility paths are not maintained.
38
38
 
39
39
  ## Install
40
40
 
@@ -64,7 +64,7 @@ For development from this repository:
64
64
 
65
65
  ```bash
66
66
  npm install
67
- pi -e . --model cursor/composer-2.5
67
+ pi -e . --model cursor/composer-2-5
68
68
  ```
69
69
 
70
70
  ## Configure your Cursor SDK API key
@@ -76,7 +76,7 @@ Use either a user API key from Cursor Dashboard → Integrations or a service ac
76
76
  Preferred setup:
77
77
 
78
78
  ```bash
79
- pi --model cursor/composer-2.5
79
+ pi --model cursor/composer-2-5
80
80
  ```
81
81
 
82
82
  Then, inside pi:
@@ -95,13 +95,13 @@ Environment setup:
95
95
 
96
96
  ```bash
97
97
  export CURSOR_API_KEY="your-key"
98
- pi --model cursor/composer-2.5
98
+ pi --model cursor/composer-2-5
99
99
  ```
100
100
 
101
101
  One-shot setup:
102
102
 
103
103
  ```bash
104
- pi --api-key "your-key" --model cursor/composer-2.5 --cursor-no-fast -p "Say ok only."
104
+ pi --api-key "your-key" --model cursor/composer-2-5 --cursor-no-fast -p "Say ok only."
105
105
  ```
106
106
 
107
107
  Discovery uses pi's native resolution order for this extension: `--api-key`, the stored `cursor` key in `~/.pi/agent/auth.json`, then `CURSOR_API_KEY`.
@@ -112,10 +112,10 @@ To avoid a live `Cursor.models.list` network round-trip on every pi startup, the
112
112
 
113
113
  ```bash
114
114
  # Cache lifetime in milliseconds (default 86400000 = 24h).
115
- PI_CURSOR_SDK_MODEL_CACHE_TTL_MS=3600000 pi --model cursor/composer-2.5
115
+ PI_CURSOR_SDK_MODEL_CACHE_TTL_MS=3600000 pi --model cursor/composer-2-5
116
116
 
117
117
  # Disable the cache and always discover live.
118
- PI_CURSOR_SDK_DISABLE_MODEL_CACHE=1 pi --model cursor/composer-2.5
118
+ PI_CURSOR_SDK_DISABLE_MODEL_CACHE=1 pi --model cursor/composer-2-5
119
119
  ```
120
120
 
121
121
  Do not store the API key in `~/.pi/agent/cursor-sdk.json`. That file is only for non-secret extension state such as Cursor fast defaults. `PATH` is only for executable lookup and should not contain the API key.
@@ -136,7 +136,7 @@ Expected behavior:
136
136
  Smoke test:
137
137
 
138
138
  ```bash
139
- pi --model cursor/composer-2.5 --cursor-no-fast --no-session --mode json \
139
+ pi --model cursor/composer-2-5 --cursor-no-fast --no-session --mode json \
140
140
  -p "Reply exactly PI_CURSOR_MODEL_OK and nothing else."
141
141
  ```
142
142
 
@@ -147,7 +147,7 @@ Expected: the final assistant text is `PI_CURSOR_MODEL_OK`. If auth is missing o
147
147
  Choose Cursor models interactively with `/model`, or pass a model on the command line:
148
148
 
149
149
  ```bash
150
- pi --model cursor/composer-2.5
150
+ pi --model cursor/composer-2-5
151
151
  pi --model cursor/gpt-5.5@1m
152
152
  pi --model cursor/gpt-5.5@272k
153
153
  pi --model cursor/claude-opus-4-8@300k
@@ -168,7 +168,7 @@ pi --model cursor/gpt-5.5@272k:xhigh
168
168
  pi --model cursor/gpt-5.5@1m --thinking medium
169
169
  ```
170
170
 
171
- Cursor-only parameters are not encoded into pi model IDs. Cursor `context` becomes a pi-visible model variant because it changes pi's native `contextWindow`; Cursor `fast` and Cursor SDK conversation mode are extension state, not model identity. Alias model IDs still share Cursor-only state, such as fast defaults, with their underlying Cursor base model.
171
+ Cursor-only parameters are not encoded into pi model IDs. Cursor `context` becomes a pi-visible model variant because it changes pi's native `contextWindow`; Cursor `fast` and Cursor SDK conversation mode are extension state, not model identity. Alias model IDs use their selected SDK ID for Cursor-only state such as fast defaults, with read fallback for older defaults keyed by the underlying Cursor base model.
172
172
 
173
173
  ## Thinking support
174
174
 
@@ -192,7 +192,7 @@ Some Cursor SDK models do not expose a `reasoning`, `effort`, or `thinking` para
192
192
 
193
193
  Use `/cursor-fast` to persistently toggle fast mode for the selected Cursor model when the model supports Cursor's `fast` parameter.
194
194
 
195
- Fast preferences are remembered per Cursor base model and stored:
195
+ Fast preferences are remembered per selected Cursor SDK model ID or alias and stored:
196
196
 
197
197
  - in the current session with `pi.appendEntry()`
198
198
  - globally in `~/.pi/agent/cursor-sdk.json`
@@ -201,7 +201,7 @@ For one run, force fast on or off without changing saved defaults:
201
201
 
202
202
  ```bash
203
203
  pi --model cursor/gpt-5.5@1m --cursor-fast -p "Say ok only"
204
- pi --model cursor/composer-2.5 --cursor-no-fast -p "Say ok only"
204
+ pi --model cursor/composer-2-5 --cursor-no-fast -p "Say ok only"
205
205
  ```
206
206
 
207
207
  Composer 2 and Composer 2.5 can default to fast. Use `--cursor-no-fast` for a one-shot no-fast Composer run. In print mode (`-p`), `--cursor-no-fast` is silent and does not write `~/.pi/agent/cursor-sdk.json`.
@@ -223,8 +223,8 @@ Cursor SDK conversation mode is Cursor-only extension state. It is not a pi mode
223
223
  Default mode is `agent`. Start a one-shot run in a specific mode:
224
224
 
225
225
  ```bash
226
- pi --model cursor/composer-2.5 --cursor-mode agent
227
- pi --model cursor/composer-2.5 --cursor-mode plan
226
+ pi --model cursor/composer-2-5 --cursor-mode agent
227
+ pi --model cursor/composer-2-5 --cursor-mode plan
228
228
  ```
229
229
 
230
230
  Change the session mode interactively:
@@ -267,33 +267,35 @@ Bridge controls:
267
267
 
268
268
  ```bash
269
269
  # Roll back to Cursor SDK tools/settings/MCP only; do not expose active pi tools through the bridge.
270
- PI_CURSOR_PI_TOOL_BRIDGE=0 pi --model cursor/composer-2.5
270
+ PI_CURSOR_PI_TOOL_BRIDGE=0 pi --model cursor/composer-2-5
271
271
 
272
272
  # Opt in to also expose overlapping pi tool names through the bridge.
273
- PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1 pi --model cursor/composer-2.5
273
+ PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1 pi --model cursor/composer-2-5
274
274
 
275
275
  # Override Cursor SDK MCP tool-call timeout, including bridged pi tools and configured Cursor MCP servers.
276
- PI_CURSOR_MCP_TOOL_TIMEOUT_SECONDS=7200 pi --model cursor/composer-2.5
277
- PI_CURSOR_MCP_TOOL_TIMEOUT_MS=7200000 pi --model cursor/composer-2.5
276
+ PI_CURSOR_MCP_TOOL_TIMEOUT_SECONDS=7200 pi --model cursor/composer-2-5
277
+ PI_CURSOR_MCP_TOOL_TIMEOUT_MS=7200000 pi --model cursor/composer-2-5
278
278
 
279
279
  # Override known MCP initialize/listTools timeouts on first send (default 10s).
280
- PI_CURSOR_MCP_CONNECT_TIMEOUT_SECONDS=5 pi --model cursor/composer-2.5
281
- PI_CURSOR_MCP_CONNECT_TIMEOUT_MS=5000 pi --model cursor/composer-2.5
280
+ PI_CURSOR_MCP_CONNECT_TIMEOUT_SECONDS=5 pi --model cursor/composer-2-5
281
+ PI_CURSOR_MCP_CONNECT_TIMEOUT_MS=5000 pi --model cursor/composer-2-5
282
282
 
283
283
  # Disable bootstrap callable-surface manifest (on by default).
284
- PI_CURSOR_TOOL_MANIFEST=0 pi --model cursor/composer-2.5
284
+ PI_CURSOR_TOOL_MANIFEST=0 pi --model cursor/composer-2-5
285
285
 
286
286
  # Emit scrubbed bridge diagnostics as JSONL to stderr with prefix [pi-cursor-sdk:bridge].
287
- PI_CURSOR_PI_TOOL_BRIDGE_DEBUG=1 pi --model cursor/composer-2.5
287
+ PI_CURSOR_PI_TOOL_BRIDGE_DEBUG=1 pi --model cursor/composer-2-5
288
288
  ```
289
289
 
290
290
  On bootstrap sends, a compact **callable tool surfaces** block is injected into the Cursor prompt by default so models see host-tool categories, exposed `pi__*` bridge names for the current run, and a reminder that configured Cursor MCP servers are discovered at runtime (not via pi's tool catalog). Disable with `PI_CURSOR_TOOL_MANIFEST=0`.
291
291
 
292
292
  `PI_CURSOR_PI_TOOL_BRIDGE=0` is the supported rollback flag and disables the bridge entirely. The bridge also treats `false`, `off`, `none`, `no`, and `disabled` as off; `1`, `true`, `on`, `yes`, and `enabled` as on. `PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1` opts in to exposing overlapping pi tool names that Cursor already has native equivalents for. The installed Cursor SDK uses a 60-second MCP protocol default with no public per-server timeout option. pi-cursor-sdk overrides that seam in two directions by default: MCP `callTool` requests are extended to 3600 seconds for long-running local MCP tools (including the pi bridge and configured Cursor MCP servers), and known MCP initialize/listTools requests on first send are shortened to 10 seconds so unavailable configured MCP servers fail fast instead of blocking for a full minute. Unknown Cursor SDK MCP protocol timeout stacks keep the SDK default instead of being shortened. Override tool-call timeouts with `PI_CURSOR_MCP_TOOL_TIMEOUT_MS` or `PI_CURSOR_MCP_TOOL_TIMEOUT_SECONDS`, and first-send initialize/listTools timeouts with `PI_CURSOR_MCP_CONNECT_TIMEOUT_MS` or `PI_CURSOR_MCP_CONNECT_TIMEOUT_SECONDS`. `PI_CURSOR_PI_TOOL_BRIDGE_DEBUG=1` is off by default and emits typed, allowlisted, scrubbed single-line JSONL records to `process.stderr`. These records are operational diagnostics, not anonymous telemetry: they intentionally include tool names, safe correlation IDs, bridge run state, exposed pi↔MCP name pairs, queued requests, result resolution, rejection, cancellation, and pending counts. They must not include endpoint URLs, endpoint path components, endpoint tokens, raw args/results, stdout/stderr payloads, file contents, Cursor settings output, API keys, bearer tokens, cookies, session credentials, or secrets. Do not enable or share bridge debug logs where tool names themselves are sensitive.
293
293
 
294
- ### Maintainer live smoke release gate
294
+ ### Maintainer platform smoke release gate
295
295
 
296
- For Cursor provider/runtime changes, follow the manual [Cursor live smoke checklist](docs/cursor-live-smoke-checklist.md) before release. For a faster minimal-surface pass first, see [Cursor dogfood checklist](docs/cursor-dogfood-checklist.md). See [Cursor testing lessons](docs/cursor-testing-lessons.md) for auth.json seeding, isolated `/tmp` harness layout, JSONL replay-error scans, and other regression traps. Assume every runtime surface is in scope. The checklist uses real `pi -e . --cursor-no-fast --model cursor/composer-2.5` runs with temporary session dirs, pi 0.78.0 `--session-id`, sealed smoke-runner PATH/env wrappers, Cursor SDK `plan` mode, and mandatory visual TUI card/color inspection. The canonical visual path is `npm run smoke:visual`: offscreen PTY capture rendered through a browser/xterm view and saved as PNG screenshots with Playwright, or with `agent_browser` from the generated HTML when available. Its default matrix is native replay only: native replay registration is forced on, Cursor setting sources are disabled, the pi bridge is off, overlapping built-in pi tools are not exposed, and inherited Cursor SDK event-debug artifact env is cleared; `--event-debug` writes to a deterministic debug directory under the visual output directory. The visible TUI/output, rendered screenshots, scrubbed diagnostics, and persisted JSONL must agree. Do not mark a release ready with optional, deferred, mostly-passing, or unobserved smoke checks outstanding.
296
+ For Cursor provider/runtime changes, the canonical release and pre-commit gate is the local platform smoke gate in [Platform smoke](docs/platform-smoke.md): run `npm run smoke:platform:all`, which runs doctor before the target matrix. The gate validates macOS, Ubuntu, and Windows native through Crabbox using packed installs, PTY/ConPTY ANSI capture, host-rendered xterm/PNG evidence, JSONL assertions, bridge diagnostics, usage/cache checks, abort cleanup, artifact manifests, and redaction scans. Do not mark a release ready with optional, deferred, mostly-passing, or unobserved platform smoke checks outstanding.
297
+
298
+ The older live smoke helpers remain useful for inner-loop debugging and focused visual audits, not as the release gate. Use [Cursor live smoke checklist](docs/cursor-live-smoke-checklist.md), `npm run smoke:visual`, `npm run smoke:live`, or direct `pi -e . --cursor-no-fast --model cursor/composer-2-5` runs when iterating on a specific TUI/card/runtime issue before the full platform gate. `npm run smoke:visual` captures an offscreen PTY rendered through browser/xterm and saved as PNG screenshots with Playwright, or with `agent_browser` from the generated HTML when available. Its default matrix is native replay only: native replay registration is forced on, Cursor setting sources are disabled, the pi bridge is off, overlapping built-in pi tools are not exposed, and inherited Cursor SDK event-debug artifact env is cleared; `--event-debug` writes to a deterministic debug directory under the visual output directory. The visible TUI/output, rendered screenshots, scrubbed diagnostics, and persisted JSONL must agree. See [Cursor testing lessons](docs/cursor-testing-lessons.md) for auth.json seeding, isolated `/tmp` harness layout, JSONL replay-error scans, and other regression traps.
297
299
 
298
300
  ### Maintainer Cursor SDK event capture
299
301
 
@@ -317,6 +319,7 @@ Actual Cursor runs still need a key from `/login`, `CURSOR_API_KEY`, or `--api-k
317
319
  - **The pi tool bridge is local and MCP-backed.** Bridgeable active pi tools are exposed to local Cursor agents through a tokenized `127.0.0.1` MCP endpoint; internal Cursor replay activity names are excluded, and overlapping built-in pi tools are hidden by default. Set `PI_CURSOR_PI_TOOL_BRIDGE=0` to disable it or `PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1` to expose overlapping built-ins too.
318
320
  - **Cursor native tool replay is display-only.** Replay renders recorded Cursor SDK activity and never re-runs Cursor-side commands, reapplies Cursor edits, calls MCP servers, or mutates pi state. Workflow tools such as Cursor mode/task/todo/plan activity are not pi workflow controls. See [Cursor native tool replay](docs/cursor-native-tool-replay.md) for supported replay cards, ordering, conflict handling, and opt-out flags.
319
321
  - **Cursor run state can span tool-use turns.** Within a pi session, the extension reuses one Cursor SDK agent across compatible follow-up turns and sends incremental prompts when context still matches. It recreates the agent when context diverges, after compaction or `/tree` navigation, on API key changes, after send errors, or on session shutdown. For bridged pi tools, the matching pi `toolResult` resolves into the same live Cursor SDK run without creating a new `Agent`, unless the run was disposed, aborted, or cancelled. Replay can also split one live Cursor SDK run across pi `toolUse` turns for display.
322
+ - **Final assistant text is the last non-empty text part.** Composer responses can produce one assistant message with early progress `text`, thinking/tool metadata, and a later final `text` report. Consumers that need a final answer should scan assistant message content from the end and use the last non-empty `text` part, not the first.
320
323
  - **Cursor setting sources default to all.** The extension passes `local.settingSources: ["all"]` by default so configured Cursor MCP servers, plugin tools, project/user settings, and related Cursor-native capabilities are available like they are in Cursor. To narrow loading, set a comma-separated list such as `PI_CURSOR_SETTING_SOURCES=project,user,plugins`. To disable ambient setting sources, set `PI_CURSOR_SETTING_SOURCES=none`. Direct Cursor SDK bootstrap logs (settings, skills, hook-load compatibility warnings, and similar) are suppressed so they do not pollute the TUI.
321
324
  - **AGENTS.md / CLAUDE.md are not duplicated on Cursor models when Cursor loads the same rules.** Pi discovers global and project context files (`AGENTS.md`, `CLAUDE.md`, and case variants) unless you start with `-nc`. On `cursor/*` models the extension removes only `<project_instructions>` blocks that overlap Cursor `settingSources` via the `before_agent_start` hook: `user` for `~/.pi/agent/AGENTS.md`, `project` for repo/parent `AGENTS.md` and `CLAUDE.md` (verified Cursor behavior: local agents load project `AGENTS.md` and `CLAUDE.md` alongside Cursor rules). `~/.pi/agent/CLAUDE.md` is not stripped (Cursor user rules use `~/.claude/CLAUDE.md`, not pi's agent dir). With `PI_CURSOR_SETTING_SOURCES=none` or `plugins`-only, pi context is left intact. Set `PI_CURSOR_PRESERVE_PI_AGENTS_MD=1` to keep duplicate injection.
322
325
  - **Max Mode is not a manual pi variant.** Cursor's SDK may enable Max Mode automatically for models that require it. This extension only advertises exact context-window variants that the SDK catalog exposes and otherwise uses conservative SDK-derived default/non-Max context windows.
@@ -339,13 +342,13 @@ You can also restart pi with a key in the same shell or launcher that starts pi:
339
342
 
340
343
  ```bash
341
344
  export CURSOR_API_KEY="your-key"
342
- pi --model cursor/composer-2.5
345
+ pi --model cursor/composer-2-5
343
346
  ```
344
347
 
345
348
  Or run a one-shot command:
346
349
 
347
350
  ```bash
348
- pi --api-key "your-key" --model cursor/composer-2.5 -p "Say ok only"
351
+ pi --api-key "your-key" --model cursor/composer-2-5 -p "Say ok only"
349
352
  ```
350
353
 
351
354
  ### `pi --list-models cursor` shows no Cursor models
@@ -397,13 +400,13 @@ pi extension toggles and pi's MCP catalog do not control Cursor ambient MCP. Loc
397
400
  The local pi bridge only exposes tools that are active in the current pi session and present in pi's tool registry at Cursor run start. By default, it does not expose overlapping pi tool names that Cursor already has native equivalents for (`read`, `bash`, `write`, `edit`, `grep`, `find`, and `ls`). Opt in if you intentionally want Cursor to see both the Cursor-native tool and an overlapping built-in pi tool:
398
401
 
399
402
  ```bash
400
- PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1 pi --model cursor/composer-2.5
403
+ PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1 pi --model cursor/composer-2-5
401
404
  ```
402
405
 
403
406
  To disable the bridge for rollback or isolation, start pi with:
404
407
 
405
408
  ```bash
406
- PI_CURSOR_PI_TOOL_BRIDGE=0 pi --model cursor/composer-2.5
409
+ PI_CURSOR_PI_TOOL_BRIDGE=0 pi --model cursor/composer-2-5
407
410
  ```
408
411
 
409
412
  ### First Cursor message is slow (10+ seconds)
@@ -411,14 +414,14 @@ PI_CURSOR_PI_TOOL_BRIDGE=0 pi --model cursor/composer-2.5
411
414
  The extension loads Cursor setting sources with `PI_CURSOR_SETTING_SOURCES=all` by default, which includes user MCP servers from `~/.cursor/mcp.json`. On the first send of a session, the Cursor SDK connects to each configured MCP server before streaming a reply. pi-cursor-sdk shortens the known MCP initialize/listTools timeout path to **10 seconds by default** (the raw Cursor SDK default is 60 seconds), so a dead server should fail fast instead of blocking for a full minute. Unknown MCP protocol timeout stacks keep the SDK default instead of being shortened. A slow or unavailable server can still add roughly that connect timeout before the first reply. Tighten further with:
412
415
 
413
416
  ```bash
414
- PI_CURSOR_MCP_CONNECT_TIMEOUT_SECONDS=5 pi --model cursor/composer-2.5
415
- PI_CURSOR_MCP_CONNECT_TIMEOUT_MS=5000 pi --model cursor/composer-2.5
417
+ PI_CURSOR_MCP_CONNECT_TIMEOUT_SECONDS=5 pi --model cursor/composer-2-5
418
+ PI_CURSOR_MCP_CONNECT_TIMEOUT_MS=5000 pi --model cursor/composer-2-5
416
419
  ```
417
420
 
418
421
  Workarounds if you do not need user-level MCP in pi:
419
422
 
420
423
  ```bash
421
- PI_CURSOR_SETTING_SOURCES=project,plugins,team pi --model cursor/composer-2.5
424
+ PI_CURSOR_SETTING_SOURCES=project,plugins,team pi --model cursor/composer-2-5
422
425
  ```
423
426
 
424
427
  Or fix/disable the slow MCP server in Cursor settings. Maintainer timing probe: `npm run debug:mcp-coldstart`.
@@ -428,8 +431,8 @@ Or fix/disable the slow MCP server in Cursor settings. Maintainer timing probe:
428
431
  The extension raises Cursor SDK's MCP tool-call timeout from 60 seconds to 3600 seconds by default for Cursor SDK MCP `callTool` requests, including the local pi bridge and configured Cursor MCP servers. For longer local MCP tools, set one override:
429
432
 
430
433
  ```bash
431
- PI_CURSOR_MCP_TOOL_TIMEOUT_SECONDS=7200 pi --model cursor/composer-2.5
432
- PI_CURSOR_MCP_TOOL_TIMEOUT_MS=7200000 pi --model cursor/composer-2.5
434
+ PI_CURSOR_MCP_TOOL_TIMEOUT_SECONDS=7200 pi --model cursor/composer-2-5
435
+ PI_CURSOR_MCP_TOOL_TIMEOUT_MS=7200000 pi --model cursor/composer-2-5
433
436
  ```
434
437
 
435
438
  ### Tool calls appear as a plain text list instead of pi tool cards
@@ -476,7 +479,7 @@ Local development run:
476
479
 
477
480
  ```bash
478
481
  npm install
479
- CURSOR_API_KEY="your-key" pi -e . --model cursor/composer-2.5
482
+ CURSOR_API_KEY="your-key" pi -e . --model cursor/composer-2-5
480
483
  ```
481
484
 
482
485
  Maintainer design notes live in [`docs/cursor-model-ux-spec.md`](docs/cursor-model-ux-spec.md).