pi-cursor-sdk 0.5.4 → 0.5.6

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 (61) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/README.md +4 -4
  3. package/dist/cursor-fallback-models.generated.js +161 -1
  4. package/dist/cursor-local-run-terminal-error.js +57 -0
  5. package/dist/cursor-provider-turn-finalize.js +2 -0
  6. package/dist/cursor-provider-turn-send.js +3 -0
  7. package/dist/cursor-session-store.js +2 -1
  8. package/docs/cursor-live-smoke-checklist.md +2 -2
  9. package/docs/cursor-model-ux-spec.md +4 -2
  10. package/docs/cursor-native-tool-visual-audit.md +1 -1
  11. package/docs/cursor-testing-lessons.md +7 -1
  12. package/docs/cursor-tool-surfaces.md +3 -3
  13. package/docs/development.md +41 -6
  14. package/docs/reference.md +9 -5
  15. package/node_modules/@modelcontextprotocol/core/node_modules/zod/package.json +1 -1
  16. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  17. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  18. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  19. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/core/compile.ts +9 -0
  20. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/core/schemas.ts +35 -1
  21. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/core/util.ts +13 -0
  22. package/node_modules/@modelcontextprotocol/core/node_modules/zod/src/v4/core/versions.ts +1 -1
  23. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/compile.cjs +8 -0
  24. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/compile.js +8 -0
  25. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/schemas.cjs +30 -0
  26. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/schemas.d.cts +3 -1
  27. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/schemas.d.ts +3 -1
  28. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/schemas.js +30 -0
  29. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/util.cjs +15 -0
  30. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/util.d.cts +2 -0
  31. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/util.d.ts +2 -0
  32. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/util.js +14 -0
  33. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/versions.cjs +1 -1
  34. package/node_modules/@modelcontextprotocol/core/node_modules/zod/v4/core/versions.js +1 -1
  35. package/node_modules/@modelcontextprotocol/server/node_modules/zod/package.json +1 -1
  36. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  37. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  38. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  39. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/core/compile.ts +9 -0
  40. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/core/schemas.ts +35 -1
  41. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/core/util.ts +13 -0
  42. package/node_modules/@modelcontextprotocol/server/node_modules/zod/src/v4/core/versions.ts +1 -1
  43. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/compile.cjs +8 -0
  44. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/compile.js +8 -0
  45. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/schemas.cjs +30 -0
  46. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/schemas.d.cts +3 -1
  47. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/schemas.d.ts +3 -1
  48. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/schemas.js +30 -0
  49. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/util.cjs +15 -0
  50. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/util.d.cts +2 -0
  51. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/util.d.ts +2 -0
  52. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/util.js +14 -0
  53. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/versions.cjs +1 -1
  54. package/node_modules/@modelcontextprotocol/server/node_modules/zod/v4/core/versions.js +1 -1
  55. package/package.json +10 -3
  56. package/scripts/steering-rpc-smoke.mjs +1 -1
  57. package/src/cursor-fallback-models.generated.ts +161 -1
  58. package/src/cursor-local-run-terminal-error.ts +58 -0
  59. package/src/cursor-provider-turn-finalize.ts +2 -0
  60. package/src/cursor-provider-turn-send.ts +2 -0
  61. package/src/cursor-session-store.ts +2 -1
package/CHANGELOG.md CHANGED
@@ -2,7 +2,54 @@
2
2
 
3
3
  **Release preparation is not a publication receipt:** confirm the exact version, source and artifact integrity in npm/GitHub publication records before relying on availability. No issue is closed by preparation alone.
4
4
 
5
- ## Unreleased
5
+ ## 0.5.6 - 2026-11-01
6
+
7
+ <!-- npm-release:unreleased:start -->
8
+ <!-- npm-release:unreleased:end -->
9
+
10
+ - Merge pull request #395 from fitchmultz/task/npm-zod-release-gate ([49e7f8d](https://github.com/fitchmultz/pi-cursor-sdk/commit/49e7f8dbcfb6bf76b3f550f49ffd7d3f547cc9ab))
11
+
12
+ ### Changed
13
+
14
+ - Gate automatic patch releases on exact-scope commit, PR, prospective-release, and retained-candidate reviews. Bind catalog and installer qualification to the candidate and retain npm and GitHub publication evidence (#393, #394, #395).
15
+ - Approve Bun and pnpm's required setup scripts with npm 12's targeted `--allow-scripts=bun,pnpm` before the five-mode Node/Bun installer qualification (#397).
16
+
17
+ ### Fixed
18
+
19
+ - Credit a complete source-file read for a byte-identical package copy after the reviewer opens the package path. The review receipt records SHA-256 provenance. Different package content still requires a complete read.
20
+
21
+ Cursor runtime behavior and runtime dependency versions are unchanged.
22
+
23
+ ### What's Changed
24
+ * Qualify exact review scopes before release (1/3) by @fitchmultz in https://github.com/fitchmultz/pi-cursor-sdk/pull/393
25
+ * Bind prospective release reviews to the open PR (2/3) by @fitchmultz in https://github.com/fitchmultz/pi-cursor-sdk/pull/394
26
+ * Gate automatic Cursor releases on exact-candidate review (3/3) by @fitchmultz in https://github.com/fitchmultz/pi-cursor-sdk/pull/395
27
+
28
+
29
+ **Full Changelog**: https://github.com/fitchmultz/pi-cursor-sdk/compare/v0.5.5...v0.5.6
30
+
31
+ ## 0.5.5
32
+
33
+ ### Fixed
34
+
35
+ - Stop a failed LOCAL Cursor run's shell commands and other native tool processes. SDK 1.0.40 leaves them running after a run fails, for example when it gives up resuming a reset connection, and `Run.cancel()` stops them only while the run is still running. The provider now cancels the run while the SDK records the failure, which the SDK does before it marks the run failed, and still reports the SDK's failure message as a Pi error. A separate SDK error code, when present, is not shown after this cancellation. Explicit Pi aborts and Cloud runs are unchanged (#384).
36
+
37
+ - Upgrade the exact unbundled Cursor SDK and its optional platform packages from 1.0.37 to 1.0.40 for LOCAL Claude-format hook compatibility: the SDK now enables translation of nested `hookSpecificOutput` denial/rewrite output into the fields its tool adapters consume. It also improves Windows command-hook UTF-8 input and native exit-code propagation. This is not a Pi pre-execution hook, universal policy guarantee, or resolution of the original rtk report (#173).
38
+
39
+ - Supply SDK 1.0.40's required Zod peer as a direct exact `zod@4.6.6` runtime dependency, with the bundled MCP bridge's newer nested `4.6.7` copies retained by npm's lockfile. This keeps the peer outside the tarball's bundle and reachable by the unbundled SDK under Pi's `--legacy-peer-deps` installation, without peer auto-installation, overrides or SDK patches (#380). A deduplicated root `4.6.7` copy instead gets bundled and breaks that installation.
40
+
41
+ - Both the SDK's v4/v4-mini parsers and the bridge's v4 parsers now include the bounded-collection fix for [GHSA-mrhx-c7xc-m3w5](https://github.com/advisories/GHSA-mrhx-c7xc-m3w5): array, set and map size bounds are checked before parsing elements. Zod 4.6.7 differs from 4.6.6 only in version metadata. The legacy `zod/v3` implementation is unchanged, and unconstrained collections still validate every element; this is not a universal resource cap or a claim of a demonstrated SDK exploit.
42
+
43
+ - Stop `smoke:steering --self-test` from rebuilding `dist/` before its offline probe. The rebuild briefly removed `dist/` while the concurrent package test packed the checkout, producing an intermittent missing `dist/index.js` failure. Live steering runs still rebuild first (fitchmultz/.github#98).
44
+
45
+ ### Changed
46
+
47
+ - Refresh the fallback catalog from the authenticated SDK 1.0.40 catalog-only observation on 2026-10-31: 49 models, adding DeepSeek V4.1 Flash 1017 (`deepseek-v41-flash-1017`) and recording `cyber=false` on Claude Opus 5.5 variants. All 48 prior model IDs and the 33 bundled checkpoint-derived entries remain; no Agent/model turn or Cloud run was performed.
48
+
49
+ ### Verification and limits
50
+
51
+ - **User-visible rollout:** admitted user/project Claude hooks returning only nested denial/rewrite output can now affect tool execution where SDK 1.0.37 ignored that output; this is an intended behavior change, not just a test-harness repair.
52
+ - Add installed-package contracts for actual Claude settings loading, UTF-8 hook input, nested denial/rewrite, conflicting/mismatched output guards and native exit-2 denial. These use test-only lexical observation, not a production SDK patch, public Agent/backend run or startup canary. Preserve the dated SDK 1.0.37 catalog and older captures at their actual identities; the other original backlog causes remain unqualified and both commit/PR attribution controls remain unavailable.
6
53
 
7
54
  ## 0.5.4
8
55
 
package/README.md CHANGED
@@ -8,7 +8,7 @@ Use Cursor models in [Pi](https://pi.dev)'s terminal UI. `pi-cursor-sdk` runs Cu
8
8
 
9
9
  ## Quick start
10
10
 
11
- Requirements: Node.js 24+, Pi 0.87.1+, and an API key for Cursor SDK. The package installs `@cursor/sdk` for you.
11
+ Requirements: Node.js, Pi, and an API key for Cursor SDK. Check the [supported Node.js and Pi versions](docs/reference.md#requirements). The package installs `@cursor/sdk` for you.
12
12
 
13
13
  Use a user key from Cursor Dashboard → API Keys or a service-account key from Team settings. Team Admin keys do not work. Cursor Desktop and Agent CLI login do not supply the SDK key.
14
14
 
@@ -56,7 +56,7 @@ The footer shows status such as `cursor:local · fast:off`, with `plan` or `http
56
56
 
57
57
  Cursor controls file tools, shell commands, edits, and configured MCP servers. The local MCP bridge exposes active Pi extension tools as `pi__*` names. The bridge is on by default. Pi hides matching built-ins from the bridge by default.
58
58
 
59
- **Availability:** `PI_CURSOR_NATIVE_TOOLS` and `/cursor-abort` require **0.5.4 or later**, beginning with the implementation from [#372](https://github.com/fitchmultz/pi-cursor-sdk/pull/372). Source checkouts preparing 0.5.4 remain candidates until exact publication records exist; the version change alone is not a publication record. Verify the exact npm version and GitHub release before relying on its availability. Published **0.5.3 ignores this flag and does not provide the command**; do not rely on them for native-tool restriction or pending-run recovery there. Development version labels alone do not establish which controls are installed.
59
+ **Availability:** Some older releases **ignore `PI_CURSOR_NATIVE_TOOLS` and do not provide `/cursor-abort`**. Check your installed version against the [version boundary](docs/cursor-tool-surfaces.md#the-three-surfaces) before relying on either control; a development version label alone does not prove availability.
60
60
 
61
61
  **Pi's `--no-tools`, `--tools`, and `--exclude-tools` do not disable Cursor tools or Cursor MCP servers.** For local ordinary turns on a supporting revision, opt in to `PI_CURSOR_NATIVE_TOOLS=0` to allow only MCP through the public SDK tool surface (including disabling native task/subagents). It leaves configured Cursor MCP available unless you also disable ambient setting sources. Cloud rejects this opt-out for both ordinary and selected-Cloud summary requests; only existing isolated LOCAL summary agents remain unaffected with `tools: []`.
62
62
 
@@ -67,7 +67,7 @@ A policy mismatch preserves the pending local run: restore its prior policy to f
67
67
  Local runs leave Cursor auto-review and sandboxing off by default. Read the [safety controls and hook limits](docs/reference.md#cursor-local-agent-config-and-safety-controls) before you depend on those controls or Cursor hooks.
68
68
 
69
69
  ```bash
70
- # Requires 0.5.4+ containing #372; verify publication/installation (0.5.3 ignores the flag).
70
+ # Verify the installed version supports the native-tool opt-out and /cursor-abort.
71
71
  # MCP-only local agent; explicitly expose Pi builtins through the Pi execution path.
72
72
  PI_CURSOR_NATIVE_TOOLS=0 PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1 PI_CURSOR_SETTING_SOURCES=none pi --model cursor/grok-4.6
73
73
 
@@ -117,7 +117,7 @@ Run `/cursor-cloud list` to see agents recorded for your session branch. Read th
117
117
  | Models appear, but a run fails | Run `/login` with an API key for Cursor SDK. Run `/cursor-refresh-models`. |
118
118
  | First reply is slow | Check configured Cursor MCP servers. Read [settings and connection limits](docs/reference.md#first-cursor-message-is-slow-10-seconds). |
119
119
  | Streams fail behind a VPN or proxy | Run `/cursor-http on`. This changes the local SDK transport only. |
120
- | Fallback catalog remains with a saved key | Read the [startup refresh limit](docs/reference.md#model-catalog-cache) for official Pi 1.0.4 and 1.1.0. |
120
+ | Fallback catalog remains with a saved key | Read the [startup refresh limit](docs/reference.md#model-catalog-cache) for affected Pi versions. |
121
121
 
122
122
  See [Troubleshooting](docs/reference.md#troubleshooting) for other problems. [Report a bug](https://github.com/fitchmultz/pi-cursor-sdk/issues) with Pi/extension versions, model, flags, exact prompt, and a redacted session.
123
123
 
@@ -1,4 +1,4 @@
1
- // Generated with @cursor/sdk@1.0.37 from 48 Cursor models.
1
+ // Generated with @cursor/sdk@1.0.40 from 49 Cursor models.
2
2
  // Refresh with: npm run refresh:cursor-snapshots -- --write
3
3
  // Do not add secrets; this file stores public model metadata only.
4
4
  export const FALLBACK_MODEL_ITEMS = [
@@ -4794,6 +4794,10 @@ export const FALLBACK_MODEL_ITEMS = [
4794
4794
  variants: [
4795
4795
  {
4796
4796
  params: [
4797
+ {
4798
+ id: "cyber",
4799
+ value: "false"
4800
+ },
4797
4801
  {
4798
4802
  id: "context",
4799
4803
  value: "300k"
@@ -4811,6 +4815,10 @@ export const FALLBACK_MODEL_ITEMS = [
4811
4815
  },
4812
4816
  {
4813
4817
  params: [
4818
+ {
4819
+ id: "cyber",
4820
+ value: "false"
4821
+ },
4814
4822
  {
4815
4823
  id: "context",
4816
4824
  value: "300k"
@@ -4828,6 +4836,10 @@ export const FALLBACK_MODEL_ITEMS = [
4828
4836
  },
4829
4837
  {
4830
4838
  params: [
4839
+ {
4840
+ id: "cyber",
4841
+ value: "false"
4842
+ },
4831
4843
  {
4832
4844
  id: "context",
4833
4845
  value: "300k"
@@ -4845,6 +4857,10 @@ export const FALLBACK_MODEL_ITEMS = [
4845
4857
  },
4846
4858
  {
4847
4859
  params: [
4860
+ {
4861
+ id: "cyber",
4862
+ value: "false"
4863
+ },
4848
4864
  {
4849
4865
  id: "context",
4850
4866
  value: "300k"
@@ -4862,6 +4878,10 @@ export const FALLBACK_MODEL_ITEMS = [
4862
4878
  },
4863
4879
  {
4864
4880
  params: [
4881
+ {
4882
+ id: "cyber",
4883
+ value: "false"
4884
+ },
4865
4885
  {
4866
4886
  id: "context",
4867
4887
  value: "300k"
@@ -4879,6 +4899,10 @@ export const FALLBACK_MODEL_ITEMS = [
4879
4899
  },
4880
4900
  {
4881
4901
  params: [
4902
+ {
4903
+ id: "cyber",
4904
+ value: "false"
4905
+ },
4882
4906
  {
4883
4907
  id: "context",
4884
4908
  value: "300k"
@@ -4896,6 +4920,10 @@ export const FALLBACK_MODEL_ITEMS = [
4896
4920
  },
4897
4921
  {
4898
4922
  params: [
4923
+ {
4924
+ id: "cyber",
4925
+ value: "false"
4926
+ },
4899
4927
  {
4900
4928
  id: "context",
4901
4929
  value: "300k"
@@ -4913,6 +4941,10 @@ export const FALLBACK_MODEL_ITEMS = [
4913
4941
  },
4914
4942
  {
4915
4943
  params: [
4944
+ {
4945
+ id: "cyber",
4946
+ value: "false"
4947
+ },
4916
4948
  {
4917
4949
  id: "context",
4918
4950
  value: "300k"
@@ -4930,6 +4962,10 @@ export const FALLBACK_MODEL_ITEMS = [
4930
4962
  },
4931
4963
  {
4932
4964
  params: [
4965
+ {
4966
+ id: "cyber",
4967
+ value: "false"
4968
+ },
4933
4969
  {
4934
4970
  id: "context",
4935
4971
  value: "300k"
@@ -4947,6 +4983,10 @@ export const FALLBACK_MODEL_ITEMS = [
4947
4983
  },
4948
4984
  {
4949
4985
  params: [
4986
+ {
4987
+ id: "cyber",
4988
+ value: "false"
4989
+ },
4950
4990
  {
4951
4991
  id: "context",
4952
4992
  value: "300k"
@@ -4964,6 +5004,10 @@ export const FALLBACK_MODEL_ITEMS = [
4964
5004
  },
4965
5005
  {
4966
5006
  params: [
5007
+ {
5008
+ id: "cyber",
5009
+ value: "false"
5010
+ },
4967
5011
  {
4968
5012
  id: "context",
4969
5013
  value: "1m"
@@ -4981,6 +5025,10 @@ export const FALLBACK_MODEL_ITEMS = [
4981
5025
  },
4982
5026
  {
4983
5027
  params: [
5028
+ {
5029
+ id: "cyber",
5030
+ value: "false"
5031
+ },
4984
5032
  {
4985
5033
  id: "context",
4986
5034
  value: "1m"
@@ -4998,6 +5046,10 @@ export const FALLBACK_MODEL_ITEMS = [
4998
5046
  },
4999
5047
  {
5000
5048
  params: [
5049
+ {
5050
+ id: "cyber",
5051
+ value: "false"
5052
+ },
5001
5053
  {
5002
5054
  id: "context",
5003
5055
  value: "1m"
@@ -5016,6 +5068,10 @@ export const FALLBACK_MODEL_ITEMS = [
5016
5068
  },
5017
5069
  {
5018
5070
  params: [
5071
+ {
5072
+ id: "cyber",
5073
+ value: "false"
5074
+ },
5019
5075
  {
5020
5076
  id: "context",
5021
5077
  value: "1m"
@@ -5033,6 +5089,10 @@ export const FALLBACK_MODEL_ITEMS = [
5033
5089
  },
5034
5090
  {
5035
5091
  params: [
5092
+ {
5093
+ id: "cyber",
5094
+ value: "false"
5095
+ },
5036
5096
  {
5037
5097
  id: "context",
5038
5098
  value: "1m"
@@ -5050,6 +5110,10 @@ export const FALLBACK_MODEL_ITEMS = [
5050
5110
  },
5051
5111
  {
5052
5112
  params: [
5113
+ {
5114
+ id: "cyber",
5115
+ value: "false"
5116
+ },
5053
5117
  {
5054
5118
  id: "context",
5055
5119
  value: "1m"
@@ -5067,6 +5131,10 @@ export const FALLBACK_MODEL_ITEMS = [
5067
5131
  },
5068
5132
  {
5069
5133
  params: [
5134
+ {
5135
+ id: "cyber",
5136
+ value: "false"
5137
+ },
5070
5138
  {
5071
5139
  id: "context",
5072
5140
  value: "1m"
@@ -5084,6 +5152,10 @@ export const FALLBACK_MODEL_ITEMS = [
5084
5152
  },
5085
5153
  {
5086
5154
  params: [
5155
+ {
5156
+ id: "cyber",
5157
+ value: "false"
5158
+ },
5087
5159
  {
5088
5160
  id: "context",
5089
5161
  value: "1m"
@@ -5101,6 +5173,10 @@ export const FALLBACK_MODEL_ITEMS = [
5101
5173
  },
5102
5174
  {
5103
5175
  params: [
5176
+ {
5177
+ id: "cyber",
5178
+ value: "false"
5179
+ },
5104
5180
  {
5105
5181
  id: "context",
5106
5182
  value: "1m"
@@ -5118,6 +5194,10 @@ export const FALLBACK_MODEL_ITEMS = [
5118
5194
  },
5119
5195
  {
5120
5196
  params: [
5197
+ {
5198
+ id: "cyber",
5199
+ value: "false"
5200
+ },
5121
5201
  {
5122
5202
  id: "context",
5123
5203
  value: "1m"
@@ -6262,6 +6342,86 @@ export const FALLBACK_MODEL_ITEMS = [
6262
6342
  }
6263
6343
  ]
6264
6344
  },
6345
+ {
6346
+ id: "deepseek-v41-flash-1017",
6347
+ displayName: "DeepSeek V4.1 Flash 1017",
6348
+ parameters: [
6349
+ {
6350
+ id: "reasoning_effort",
6351
+ displayName: "Reasoning",
6352
+ values: [
6353
+ {
6354
+ value: "none",
6355
+ displayName: "None"
6356
+ },
6357
+ {
6358
+ value: "low",
6359
+ displayName: "Low"
6360
+ },
6361
+ {
6362
+ value: "medium",
6363
+ displayName: "Medium"
6364
+ },
6365
+ {
6366
+ value: "high",
6367
+ displayName: "High"
6368
+ },
6369
+ {
6370
+ value: "max",
6371
+ displayName: "Max"
6372
+ }
6373
+ ]
6374
+ }
6375
+ ],
6376
+ variants: [
6377
+ {
6378
+ params: [
6379
+ {
6380
+ id: "reasoning_effort",
6381
+ value: "none"
6382
+ }
6383
+ ],
6384
+ displayName: "DeepSeek V4.1 Flash 1017 None"
6385
+ },
6386
+ {
6387
+ params: [
6388
+ {
6389
+ id: "reasoning_effort",
6390
+ value: "low"
6391
+ }
6392
+ ],
6393
+ displayName: "DeepSeek V4.1 Flash 1017 Low"
6394
+ },
6395
+ {
6396
+ params: [
6397
+ {
6398
+ id: "reasoning_effort",
6399
+ value: "medium"
6400
+ }
6401
+ ],
6402
+ displayName: "DeepSeek V4.1 Flash 1017 Medium"
6403
+ },
6404
+ {
6405
+ params: [
6406
+ {
6407
+ id: "reasoning_effort",
6408
+ value: "high"
6409
+ }
6410
+ ],
6411
+ displayName: "DeepSeek V4.1 Flash 1017 High"
6412
+ },
6413
+ {
6414
+ params: [
6415
+ {
6416
+ id: "reasoning_effort",
6417
+ value: "max"
6418
+ }
6419
+ ],
6420
+ displayName: "DeepSeek V4.1 Flash 1017 Max",
6421
+ isDefault: true
6422
+ }
6423
+ ]
6424
+ },
6265
6425
  {
6266
6426
  id: "default",
6267
6427
  displayName: "Auto",
@@ -0,0 +1,57 @@
1
+ const watchedRunsByStore = new WeakMap();
2
+ const terminalErrors = new WeakMap();
3
+ const TERMINAL_RUN_STATUSES = new Set(["finished", "error", "cancelled", "expired"]);
4
+ // A failed local SDK run leaves its native tool processes running, and Run.cancel() stops them only
5
+ // while run.status is "running". The SDK awaits the terminal run-row write before it changes
6
+ // run.status, so cancelling from that write is ordered before the change, not racing it.
7
+ function onRunRowWrite(watched, row) {
8
+ const run = watched.get(row.runId);
9
+ if (!run || !TERMINAL_RUN_STATUSES.has(row.status))
10
+ return;
11
+ watched.delete(row.runId);
12
+ if (row.status !== "error" || run.status !== "running")
13
+ return;
14
+ terminalErrors.set(run, { message: row.error?.trim() || "Cursor SDK run failed." });
15
+ run.cancel().catch(() => { });
16
+ }
17
+ /** Wraps a local store so watched runs are cancelled while still running when the SDK records a terminal error. */
18
+ export function observeCursorLocalRunTerminalErrors(store) {
19
+ const watched = new Map();
20
+ const { runs } = store;
21
+ const observed = {
22
+ agents: store.agents,
23
+ checkpoints: store.checkpoints,
24
+ runEvents: store.runEvents,
25
+ runs: {
26
+ get: (input) => runs.get(input),
27
+ create: (input) => runs.create(input),
28
+ delete: (input) => runs.delete(input),
29
+ list: (input) => runs.list(input),
30
+ update: async (input) => {
31
+ try {
32
+ return await runs.update(input);
33
+ }
34
+ finally {
35
+ onRunRowWrite(watched, input.run);
36
+ }
37
+ },
38
+ },
39
+ };
40
+ watchedRunsByStore.set(observed, watched);
41
+ return observed;
42
+ }
43
+ /**
44
+ * Call as soon as send() resolves. A run can only fail with native tools running after network
45
+ * input, which cannot be processed before this continuation.
46
+ */
47
+ export function watchCursorLocalRunTerminalError(store, run) {
48
+ if (run.status === "running")
49
+ watchedRunsByStore.get(store)?.set(run.id, run);
50
+ }
51
+ /** Restores the SDK failure that terminal-error cancellation turned into a "cancelled" wait result. */
52
+ export function resolveCursorLocalRunTerminalError(run, waitResult, callerAborted) {
53
+ const terminalError = terminalErrors.get(run);
54
+ if (!terminalError || callerAborted || waitResult.status !== "cancelled")
55
+ return waitResult;
56
+ return { ...waitResult, status: "error", error: terminalError };
57
+ }
@@ -4,6 +4,7 @@ import { getCheckpointContextWindow, saveCachedContextWindow } from "./context-w
4
4
  import { scrubSensitiveText } from "./cursor-sensitive-text.js";
5
5
  import { isCursorRunFinishedSuccessfully, resolveCursorRunOutcome, } from "./cursor-provider-run-outcome.js";
6
6
  import { loadCursorSdk } from "./cursor-sdk-runtime.js";
7
+ import { resolveCursorLocalRunTerminalError } from "./cursor-local-run-terminal-error.js";
7
8
  export async function cacheSdkContextWindow(agentId, modelId, cwd, store) {
8
9
  try {
9
10
  const { createAgentPlatform } = await loadCursorSdk();
@@ -91,6 +92,7 @@ export async function awaitFinalizeCursorRunOutcome(params) {
91
92
  let waitResult;
92
93
  try {
93
94
  waitResult = params.waitResult ?? (await params.run.wait());
95
+ waitResult = resolveCursorLocalRunTerminalError(params.run, waitResult, params.signal?.aborted === true);
94
96
  }
95
97
  catch (error) {
96
98
  await recordCursorProviderTerminalUsage(params.prepared, params.signal?.aborted ? "abort" : "error");
@@ -3,6 +3,7 @@ import { createCursorCloudLifecyclePersistenceError } from "./cursor-cloud-lifec
3
3
  import { cursorLiveRuns } from "./cursor-provider-live-run-drain.js";
4
4
  import { consumeCursorLocalForceOverride } from "./cursor-runtime-state.js";
5
5
  import { recordCursorSessionAgentLineage } from "./cursor-session-agent-lineage.js";
6
+ import { watchCursorLocalRunTerminalError } from "./cursor-local-run-terminal-error.js";
6
7
  const CLOUD_LEDGER_CANCEL_TIMEOUT_MS = 5000;
7
8
  async function requestBoundedCloudRunCancellation(run) {
8
9
  let timer;
@@ -105,6 +106,8 @@ export async function sendCursorProviderTurn(sendParams) {
105
106
  recordCursorSessionAgentLineage(agent.agentId, params.scope.scopeKey);
106
107
  }
107
108
  const run = await runPromise;
109
+ if (prepared.runtimeTarget === "local")
110
+ watchCursorLocalRunTerminalError(prepared.store, run);
108
111
  sdkRun = run;
109
112
  runtime.sdkRun = run;
110
113
  try {
@@ -5,6 +5,7 @@ import { homedir, tmpdir } from "node:os";
5
5
  import { dirname, isAbsolute, join, relative, resolve, sep, toNamespacedPath } from "node:path";
6
6
  import { loadCursorSdk } from "./cursor-sdk-runtime.js";
7
7
  import { guardCursorCustomStorePath, normalizeCursorCustomStoreRoot, prepareCursorCustomStoreRoot } from "./cursor-custom-store-path.js";
8
+ import { observeCursorLocalRunTerminalErrors } from "./cursor-local-run-terminal-error.js";
8
9
  let sdkOperationsForTests;
9
10
  const activeWorkspaceRoots = new Map();
10
11
  // ponytail: leases protect only extension-owned stores in this process. Other SDK
@@ -244,7 +245,7 @@ async function openOwnedCursorSessionStore(cwd, identity, options) {
244
245
  const openedStore = store;
245
246
  return {
246
247
  identity: openedIdentity,
247
- store: openedStore,
248
+ store: observeCursorLocalRunTerminalErrors(openedStore),
248
249
  dispose: async () => {
249
250
  try {
250
251
  await openedStore.dispose();
@@ -71,7 +71,7 @@ Pass criteria:
71
71
 
72
72
  - `node --version` reports Node 24+.
73
73
  - `pi --version` reports official Pi 0.87.1 or the selected official-latest/current-`fitchmultz/pi` compatibility target.
74
- - `npm ls` shows exact `@cursor/sdk@1.0.37`; development `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` 1.1.0 with matching lockfile-resolved Pi cohort, nested host TypeBox 1.3.27 and root validation TypeBox 1.3.36; and the bundled bridge runtime closure `@modelcontextprotocol/server@2.3.1`, `@modelcontextprotocol/hono@2.0.2`, `hono@4.13.13`, and `@hono/node-server@2.1.3`. These locked development snapshots are not qualification targets; resolve latest stable official Pi and current `fitchmultz/pi` main once per workflow run.
74
+ - `npm ls` shows exact `@cursor/sdk@1.0.40`; development `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` 1.1.0 with matching lockfile-resolved Pi cohort, nested host TypeBox 1.3.27 and root validation TypeBox 1.3.36; and the bundled bridge runtime closure `@modelcontextprotocol/server@2.3.1`, `@modelcontextprotocol/hono@2.0.2`, `hono@4.13.13`, and `@hono/node-server@2.1.3`. These locked development snapshots are not qualification targets; resolve latest stable official Pi and current `fitchmultz/pi` main once per workflow run.
75
75
  - `cursor/grok-4.6` appears in the model list.
76
76
  - No Cursor key or auth token is printed.
77
77
  - If neither `~/.pi/agent/auth.json` cursor auth nor `CURSOR_API_KEY` is available, stop and report the live smoke as blocked.
@@ -136,7 +136,7 @@ Pass criteria:
136
136
 
137
137
  ## 4. Focused visual card/color rendering check
138
138
 
139
- This is a visual debug menu for changed card/color behavior requiring new live evidence. Select only the relevant category below, or reuse a batched existing platform suite; do not execute the entire list by default. It requires offscreen TUI visual inspection, not only JSONL or code review. Use Node 24+, official Pi 0.87.1 or another current compatibility target, exact `@cursor/sdk@1.0.37`, a fresh temporary session dir, Cursor SDK `plan` mode, native replay enabled, and the checked-in visual runner. The runner resolves `pi` by directly walking the parent `PATH`, uses `process.execPath` for Node, and prepends that Node directory for both prereq checks and tmux launches so `#!/usr/bin/env node` shims use the validated Node. The default matrix is native replay only: native replay registration is forced on, settings sources are `none`, the pi bridge is off, overlapping built-in pi tools are not exposed, and inherited Cursor SDK event-debug artifact env is cleared. With `--event-debug`, debug capture writes to a deterministic directory under `VISUAL_DIR`.
139
+ This is a visual debug menu for changed card/color behavior requiring new live evidence. Select only the relevant category below, or reuse a batched existing platform suite; do not execute the entire list by default. It requires offscreen TUI visual inspection, not only JSONL or code review. Use Node 24+, official Pi 0.87.1 or another current compatibility target, exact `@cursor/sdk@1.0.40`, a fresh temporary session dir, Cursor SDK `plan` mode, native replay enabled, and the checked-in visual runner. The runner resolves `pi` by directly walking the parent `PATH`, uses `process.execPath` for Node, and prepends that Node directory for both prereq checks and tmux launches so `#!/usr/bin/env node` shims use the validated Node. The default matrix is native replay only: native replay registration is forced on, settings sources are `none`, the pi bridge is off, overlapping built-in pi tools are not exposed, and inherited Cursor SDK event-debug artifact env is cleared. With `--event-debug`, debug capture writes to a deterministic directory under `VISUAL_DIR`.
140
140
 
141
141
  ```bash
142
142
  VISUAL_DIR="$(mktemp -d /tmp/pi-cursor-sdk-1016-visual.XXXXXX)"
@@ -24,7 +24,7 @@ Current implementation notes:
24
24
  - Shared SDK initialization resolves the native platform package relative to `@cursor/sdk` before import and sets `CURSOR_TREE_SITTER_VENDOR_DIR` only when unset and both vendored parser entrypoints exist. Explicit overrides remain SDK-owned. This repairs sibling-install native lookup. Static SDK and bridge imports additionally repair the compiled-Bun extension graph; the packed extension was qualified in official compiled Pi 1.0.3 on macOS arm64 with isolated empty credentials and a fake key. Embedded Windows missing-export behavior remains unqualified.
25
25
  - The selected vendor path is process-wide and inherited by shell commands and child Pi processes. A child using another install/worktree preserves the inherited value as an explicit override, even when stale. Unset it in the child's environment to rediscover that install's parser, or provide its absolute vendor path; see [native parser troubleshooting](reference.md#native-shell-parsing-or-module-loading-fails).
26
26
  - Provider and discovery errors retain bounded, scrubbed name/code/message/cause fields without serializing arbitrary error objects. Module-loading and ambiguous session-authentication failures do not imply a rejected API key. Explicit key rejection retains actionable setup guidance; no automatic reload or authentication recovery is performed.
27
- - Exact `@cursor/sdk@1.0.37` is an unbundled package dependency; users do not need a global SDK install. This package requires Node 24+ and official Pi 0.87.1+, while optional published Pi and TypeBox peer dependencies use `"*"` ranges per Pi guidance. Direct development Pi dependencies and their lockfile-resolved Pi cohort are 1.1.0 reproducible snapshots, not qualification targets or user runtime upgrades; nested host TypeBox remains 1.3.27; the extension's root TypeBox validation baseline is 1.3.36.
27
+ - Exact `@cursor/sdk@1.0.40` is an unbundled package dependency; users do not need a global SDK install. This package requires Node 24+ and official Pi 0.87.1+, while optional published Pi and TypeBox peer dependencies use `"*"` ranges per Pi guidance. Direct development Pi dependencies and their lockfile-resolved Pi cohort are 1.1.0 reproducible snapshots, not qualification targets or user runtime upgrades; nested host TypeBox remains 1.3.27; the extension's root TypeBox validation baseline is 1.3.36.
28
28
  - Native usage contains coherent current-context components only. The origin-owned ledger records every raw turn, original wait/handle snapshots, terminal success/error/abort/abandon, and bounded public whole-agent `getUsage()` observations separately. Cumulative bills never enter native usage. Request floors use actual native source chronology and projection equivalence, not text or clocks; see [Context and accounting boundaries](#context-and-accounting-boundaries).
29
29
  - Cursor owns one public native Provider with native API-key login and a small resolver for stored/provider-env, runtime, composed config, and ambient credentials. Startup and auth mutations are cache-only, retaining known cached/fallback identities. `PI_CURSOR_HIDE_MODELS_WHEN_LOGGED_OUT=1` hides only unauthenticated picker/list availability, not CLI selection or login. Discovery receives explicit effective native auth and never guesses a default auth store. `/cursor-refresh-models` uses native registry refresh/publication. Provider turns keep Pi's resolved `options.apiKey`; non-secret Cursor-only settings remain separate.
30
30
  - Cursor Cloud repository overrides accept only HTTPS repository URLs without userinfo, query parameters, or fragments. Invalid values fail during preflight before `Agent.create()`, messages never echo the supplied URL, and shared provider/maintainer scrubbing removes URL/SCP-style userinfo defensively.
@@ -161,7 +161,9 @@ Both modes call `Cursor.models.list({ apiKey })` and use the same sanitizer and
161
161
 
162
162
  The authenticated SDK 1.0.37 catalog-only refresh on 2026-10-07 returned 46 models, adding Claude Haiku 5.5 (`claude-haiku-5-5`) while preserving all 45 model records from the SDK 1.0.36 capture on 2026-10-06. That refresh's generated header recorded SDK 1.0.37 and the 46-model count. Haiku 5.5 exposes 20 variants across `thinking=false|true`, `context=300k|1m`, and `reasoning_effort=low|medium|high|xhigh|max`; its default is `thinking=true`, `context=1m`, `reasoning_effort=high`. The 33 bundled checkpoint-derived entries were unchanged; this refresh started no Agent/model turn or Cloud run and does not qualify effective checkpoint limits.
163
163
 
164
- The current snapshot is the authenticated SDK 1.0.37 catalog-only refresh on 2026-10-22: 48 models, adding Gemini 4 Argon (`gemini-4-argon`, low/medium/high reasoning with medium default) and Muse Wonder (`muse-wonder-1.0`, 300k/1m contexts and minimal through max reasoning, default 1m/xhigh) while preserving the prior 46 records. Existing generic context/thinking selection handles both; neither adds fast controls or aliases. Preserve SDK variant labels verbatim. The 33 checkpoint-derived entries remain unchanged; this refresh started no Agent/model turn or Cloud run and establishes no new checkpoint limit.
164
+ The authenticated SDK 1.0.37 catalog-only refresh on 2026-10-22 returned 48 models, adding Gemini 4 Argon (`gemini-4-argon`, low/medium/high reasoning with medium default) and Muse Wonder (`muse-wonder-1.0`, 300k/1m contexts and minimal through max reasoning, default 1m/xhigh) while preserving the prior 46 records. Existing generic context/thinking selection handles both; neither adds fast controls or aliases.
165
+
166
+ The current snapshot is the authenticated SDK 1.0.40 catalog-only refresh on 2026-10-31: 49 models, adding DeepSeek V4.1 Flash 1017 (`deepseek-v41-flash-1017`, reasoning effort none/low/medium/high/max with max default) while retaining the prior 48 model IDs. All 20 Claude Opus 5.5 variants now include `cyber=false`. Preserve SDK variant labels verbatim. The 33 checkpoint-derived entries remain unchanged; this refresh started no Agent/model turn or Cloud run and establishes no new checkpoint limit.
165
167
 
166
168
  Dated evidence for Cursor's assistant-visible, model-specific system text and reconstructed tool guidance lives in [Cursor System Prompts and Tool Guidance — 2026-08-02](https://github.com/fitchmultz/pi-cursor-sdk/blob/main/docs/evidence/cursor-system-prompts-2026-08-02/README.md). Keep that evidence separate from pi-cursor-sdk's own bootstrap prompt: Cursor persists its base system message in the local SDK checkpoint, while this extension sends Pi context and bridge instructions as user content.
167
169
 
@@ -6,7 +6,7 @@ This workflow is the canonical repo path for verifying Cursor SDK tool replay th
6
6
 
7
7
  Use it when changed replay-card behavior needs new visual proof not covered by offline rendering contracts or valid retained evidence. Text logs and JSONL are not enough for visual-parity claims: keep PNGs for the exact prompt, and before/after PNGs for a rendering comparison. Reuse a valid retained baseline instead of paying to recreate it.
8
8
 
9
- Current validation baseline: Node 24+, exact `@cursor/sdk@1.0.37`, official Pi 0.87.1/latest and current `fitchmultz/pi` main. Development Pi packages `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` are exact locked 1.1.0 snapshots, with host TypeBox 1.3.27. These locked development snapshots are not qualification targets; resolve latest stable official Pi and current `fitchmultz/pi` main once per workflow run. Optional published Pi and TypeBox peer dependencies use `"*"` ranges per Pi guidance.
9
+ Current validation baseline: Node 24+, exact `@cursor/sdk@1.0.40`, official Pi 0.87.1/latest and current `fitchmultz/pi` main. Development Pi packages `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` are exact locked 1.1.0 snapshots, with host TypeBox 1.3.27. These locked development snapshots are not qualification targets; resolve latest stable official Pi and current `fitchmultz/pi` main once per workflow run. Optional published Pi and TypeBox peer dependencies use `"*"` ranges per Pi guidance.
10
10
 
11
11
  ## Cursor SDK 1.0.17 / pi 0.79.0 cutover visual record
12
12
 
@@ -84,6 +84,12 @@ SDK 1.0.37 does materially change its vendored transport/retry source: HTTP/2 pi
84
84
 
85
85
  The 60-second MCP protocol default and lack of a public timeout option remain. SDK 1.0.37's internal `setToolCallRequestOptions`, `setToolCallOutputSchemaPassthrough` and `setListingDeadline` each occur only as definitions in the inspected ESM JavaScript, with no invocation found. They are not supported public setters or proof of readiness; preserve the extension's verified timeout compatibility path rather than adding private patches. The new public `computerUse` output variant uses the existing bounded generic replay fallback, not dedicated action/screenshot rendering or a new local execution option; see the [canonical replay matrix](./cursor-native-tool-replay.md#sdk-tooltype-replay-matrix).
86
86
 
87
+ ### SDK 1.0.40 hook maintenance boundary
88
+
89
+ The 1.0.40 pin has a concrete compatibility/security reason beyond its version number. Both 1.0.37 and 1.0.40 load enabled Claude user/project hook settings, but only 1.0.40 enables nested `hookSpecificOutput` compatibility in the LOCAL hook runtime factory. A successful command hook returning only nested `permissionDecision: "deny"` or `updatedInput` otherwise leaves the top-level fields consumed by the adapters absent. SDK 1.0.40 also adds Windows native exit-code propagation and UTF-8 payload handling; exit 2 denotes denial, while other nonzero exits normally require `failClosed` to block.
90
+
91
+ `test/cursor-sdk-hook-compatibility-contract.test.ts` reuses the installed-module harness to discover that factory structurally, observe its lexical binding in a test-only evaluation, load fresh project Claude settings, and execute a harmless Node hook child. It checks nested denial/rewrite, output precedence/event guards, UTF-8 stdin and native exit-2 handling. Original fixtures are retained when `PI_CURSOR_TEST_EVIDENCE_DIR` is set. Linux results do not qualify Windows PowerShell; the unchanged native Windows CI runs this contract too. The rewritten command is not executed, and neither a public Agent/model request nor Pi/rtk policy enforcement is tested. These checks do not close #173 or qualify #206/#233/#247/#257/#282/#339; SDK 1.0.40 still exposes neither commit nor PR attribution control (#302). Preserve all earlier package/canary/catalog observations at their actual versions and dates.
92
+
87
93
  ## Maintainer-only offline proof retention
88
94
 
89
95
  Native SQLite fixtures should open the public `SqliteLocalAgentStore` from `@cursor/sdk/sqlite` with an explicit `stateRoot` under their temporary directory, pass it as `localStore` to `createAgentPlatform`, and await `dispose()` in `finally` before removing that directory. `scopedWorkspaceRef` filters agents; it does not relocate storage. Assert the owned `index.db` exists to guard isolation. A fresh missing-agent `checkpointStore.loadLatest()` returning `null` checks the lookup boundary, not per-agent checkpoint database I/O; see `test/cursor-sdk-lazy-import.test.ts`.
@@ -355,7 +361,7 @@ The script writes timestamped artifacts under `--out` (default `/tmp/pi-cursor-s
355
361
 
356
362
  Stdout prints artifact paths and summary counts only. Raw payloads stay on disk and may contain local paths, project text, tool args/results, or secrets — do not commit or share them.
357
363
 
358
- Hard repo rule: Cursor SDK behavior claims must come from the installed `@cursor/sdk` package and/or https://cursor.com/docs/sdk/typescript, not from memory or ad-hoc probes alone. Current validation targets Node 24+, exact `@cursor/sdk@1.0.37`, official Pi 0.87.1/latest, and current `fitchmultz/pi` main.
364
+ Hard repo rule: Cursor SDK behavior claims must come from the installed `@cursor/sdk` package and/or https://cursor.com/docs/sdk/typescript, not from memory or ad-hoc probes alone. Current validation targets Node 24+, exact `@cursor/sdk@1.0.40`, official Pi 0.87.1/latest, and current `fitchmultz/pi` main.
359
365
 
360
366
  ## Pi provider SDK event capture
361
367
 
@@ -4,7 +4,7 @@ pi-cursor-sdk runs Cursor models through the local `@cursor/sdk` agent runtime b
4
4
 
5
5
  ## The three surfaces
6
6
 
7
- **Version boundary:** the MCP-only opt-out (`PI_CURSOR_NATIVE_TOOLS`) and `/cursor-abort` require **0.5.4 or later**, including [#372](https://github.com/fitchmultz/pi-cursor-sdk/pull/372). Source checkouts preparing 0.5.4 remain candidates until exact npm/GitHub publication records exist; verify the installed artifact separately. Published **0.5.3 ignores the flag and has no such command**. Do not treat these examples as enforcement on an older installed package, or infer feature availability from a development version label alone.
7
+ **Version boundary:** the MCP-only opt-out (`PI_CURSOR_NATIVE_TOOLS`) and `/cursor-abort` require **0.5.4 or later**, including [#372](https://github.com/fitchmultz/pi-cursor-sdk/pull/372). Published **0.5.3 ignores the flag and has no such command**. Verify the installed version before relying on these controls; a development version label alone does not prove availability.
8
8
 
9
9
  | Surface | Who owns it | Callable by Cursor? | What pi shows |
10
10
  | --- | --- | --- | --- |
@@ -18,14 +18,14 @@ Pi CLI tool toggles apply at the pi tool-registry boundary. `--no-tools`, `--too
18
18
 
19
19
  ## Opt-in MCP-only local turns
20
20
 
21
- This section requires the 0.5.4+ implementation and publication/installation check described above; it is not available in published npm 0.5.3.
21
+ This section requires the supporting installed version described above; the controls are not available in published npm 0.5.3.
22
22
 
23
23
  `PI_CURSOR_NATIVE_TOOLS=0` restricts **ordinary LOCAL** agents through the public SDK `AgentOptions.tools: ["mcp"]`. All other main-agent tools are omitted, including native `task`/subagents (whose own curated toolsets do not inherit a main-loop restriction). Unset, blank, unrecognized, or enabled values preserve the SDK's default toolset. The canonical boolean parser accepts `0`, `false`, `off`, `none`, `no`, and `disabled` as off, and `1`, `true`, `on`, `yes`, and `enabled` as on, case-insensitively with surrounding whitespace ignored.
24
24
 
25
25
  To send file/shell work through Pi's normal execution and `tool_call` hook boundary instead of native Cursor tools:
26
26
 
27
27
  ```bash
28
- # Requires 0.5.4+ containing #372; verify publication/installation (0.5.3 ignores the flag).
28
+ # Verify the installed version supports these controls (0.5.3 ignores the flag).
29
29
  PI_CURSOR_NATIVE_TOOLS=0 PI_CURSOR_EXPOSE_BUILTIN_TOOLS=1 PI_CURSOR_SETTING_SOURCES=none pi --model cursor/grok-4.6
30
30
  ```
31
31