@cursor/july 0.1.34 → 0.1.36

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 (208) hide show
  1. package/AGENTS.md +5 -9
  2. package/README.md +5 -9
  3. package/dist/channels/github/github-channel.d.ts +1 -1
  4. package/dist/channels/github/github-channel.js +1 -1
  5. package/dist/channels/github/index.d.ts +1 -1
  6. package/dist/channels/github/index.js +1 -1
  7. package/dist/channels/slack/index.d.ts +1 -1
  8. package/dist/channels/slack/index.js +1 -1
  9. package/dist/channels/slack/init.d.ts.map +1 -1
  10. package/dist/channels/slack/init.js +2 -1
  11. package/dist/docs/404.html +2 -2
  12. package/dist/docs/ab.html +8 -17
  13. package/dist/docs/assets/{ab.md.DAQoJ-up.js → ab.md.6cLOW7--.js} +4 -13
  14. package/dist/docs/assets/{ab.md.DAQoJ-up.lean.js → ab.md.6cLOW7--.lean.js} +1 -1
  15. package/dist/docs/assets/{app.FPupl4SP.js → app.DEcxy4oz.js} +1 -1
  16. package/dist/docs/assets/{building-with-agents.md.CnHqvYDd.js → building-with-agents.md.txrcGU2B.js} +2 -2
  17. package/dist/docs/assets/chunks/@localSearchIndexroot.ByFYcFly.js +1 -0
  18. package/dist/docs/assets/chunks/{VPLocalSearchBox.Cd182Cu0.js → VPLocalSearchBox.n1VOZcy3.js} +1 -1
  19. package/dist/docs/assets/chunks/{theme.BEM3Okcd.js → theme.BaF1MQ9c.js} +2 -2
  20. package/dist/docs/assets/{concepts.md.DFaQEFkA.js → concepts.md.CqOsxbMU.js} +1 -1
  21. package/dist/docs/assets/{deployment.md.9MYBuKM1.js → deployment.md.CuK5SNjN.js} +1 -1
  22. package/dist/docs/assets/{evals.md.BIUoVZ6X.js → evals.md.BQXI3rXy.js} +9 -15
  23. package/dist/docs/assets/{evals.md.BIUoVZ6X.lean.js → evals.md.BQXI3rXy.lean.js} +1 -1
  24. package/dist/docs/assets/{example-agents_approval-buddy.md.BhEfleVx.js → example-agents_approval-buddy.md.CIiZ9coo.js} +1 -1
  25. package/dist/docs/assets/{example-agents_benny.md.2Et1qa8f.js → example-agents_benny.md.l7JTmm8X.js} +1 -1
  26. package/dist/docs/assets/{example-agents_bugbot.md.ByUexi5i.js → example-agents_bugbot.md.Dp5JqHSQ.js} +2 -2
  27. package/dist/docs/assets/{example-agents_bugbot.md.ByUexi5i.lean.js → example-agents_bugbot.md.Dp5JqHSQ.lean.js} +1 -1
  28. package/dist/docs/assets/{example-agents_codebase-wiki.md.B4y-7ZVW.js → example-agents_codebase-wiki.md.D-lteFf0.js} +1 -1
  29. package/dist/docs/assets/{example-agents_codebase-wiki.md.B4y-7ZVW.lean.js → example-agents_codebase-wiki.md.D-lteFf0.lean.js} +1 -1
  30. package/dist/docs/assets/{example-agents_codeowners-review.md.D6ay4nvf.js → example-agents_codeowners-review.md.BU2ZXLf-.js} +1 -1
  31. package/dist/docs/assets/{example-agents_codeowners-review.md.D6ay4nvf.lean.js → example-agents_codeowners-review.md.BU2ZXLf-.lean.js} +1 -1
  32. package/dist/docs/assets/{example-agents_concierge.md.lL8rhYlj.js → example-agents_concierge.md.DA2al_NK.js} +2 -2
  33. package/dist/docs/assets/{example-agents_concierge.md.lL8rhYlj.lean.js → example-agents_concierge.md.DA2al_NK.lean.js} +1 -1
  34. package/dist/docs/assets/{example-agents_fsd.md.DfNKQTHz.js → example-agents_fsd.md.DPz9ezO4.js} +1 -1
  35. package/dist/docs/assets/{example-agents_knowledge-base.md.CzyZ2DCr.js → example-agents_knowledge-base.md.IneynQSR.js} +1 -1
  36. package/dist/docs/assets/{example-agents_oncall.md.wFFXXEyW.js → example-agents_oncall.md.ZE0n6ZFN.js} +1 -1
  37. package/dist/docs/assets/{example-agents_slack-agent.md.DvgvT4nn.js → example-agents_slack-agent.md.06jQXTAI.js} +1 -1
  38. package/dist/docs/assets/{example-agents_weather-agent.md.BADkPqxQ.js → example-agents_weather-agent.md.CrGZ0SqR.js} +3 -3
  39. package/dist/docs/assets/{example-agents_weather-agent.md.BADkPqxQ.lean.js → example-agents_weather-agent.md.CrGZ0SqR.lean.js} +1 -1
  40. package/dist/docs/assets/guides_cloud-runtime.md.V5igN4Sq.js +9 -0
  41. package/dist/docs/assets/guides_cloud-runtime.md.V5igN4Sq.lean.js +1 -0
  42. package/dist/docs/assets/{guides_webhooks.md.DiAwSR42.js → guides_webhooks.md.BERuBSJW.js} +1 -1
  43. package/dist/docs/assets/{hillclimbing.md.D9Y1_bYh.js → hillclimbing.md.yXqdlv2R.js} +1 -1
  44. package/dist/docs/assets/index.md.CmhptOmN.js +24 -0
  45. package/dist/docs/assets/{index.md.CZqbBJPB.lean.js → index.md.CmhptOmN.lean.js} +1 -1
  46. package/dist/docs/assets/{quickstart.md.TnEXYgYW.js → quickstart.md.C_b6ESpD.js} +7 -4
  47. package/dist/docs/assets/{quickstart.md.TnEXYgYW.lean.js → quickstart.md.C_b6ESpD.lean.js} +1 -1
  48. package/dist/docs/assets/{reference_agent-config.md.kuN6-OxK.js → reference_agent-config.md.CRmkoxd6.js} +6 -4
  49. package/dist/docs/assets/{reference_agent-config.md.kuN6-OxK.lean.js → reference_agent-config.md.CRmkoxd6.lean.js} +1 -1
  50. package/dist/docs/assets/reference_artifacts.md.BGG4bZo-.js +19 -0
  51. package/dist/docs/assets/reference_artifacts.md.BGG4bZo-.lean.js +1 -0
  52. package/dist/docs/assets/{reference_channels.md.CDhTRfUz.js → reference_channels.md.BIabFUAI.js} +2 -2
  53. package/dist/docs/assets/{reference_channels.md.CDhTRfUz.lean.js → reference_channels.md.BIabFUAI.lean.js} +1 -1
  54. package/dist/docs/assets/{reference_cli.md.sD-IUWjg.js → reference_cli.md.Byvrg8eu.js} +15 -9
  55. package/dist/docs/assets/{reference_cli.md.sD-IUWjg.lean.js → reference_cli.md.Byvrg8eu.lean.js} +1 -1
  56. package/dist/docs/assets/{reference_hooks.md.DyLVfE1O.js → reference_hooks.md.BGDw4VLm.js} +2 -2
  57. package/dist/docs/assets/{reference_hooks.md.DyLVfE1O.lean.js → reference_hooks.md.BGDw4VLm.lean.js} +1 -1
  58. package/dist/docs/assets/reference_http-api.md.DGrw_wOu.js +11 -0
  59. package/dist/docs/assets/reference_http-api.md.DGrw_wOu.lean.js +1 -0
  60. package/dist/docs/assets/{reference_project-layout.md.D8E6ZmHJ.js → reference_project-layout.md._XdeMahr.js} +2 -2
  61. package/dist/docs/assets/{reference_project-layout.md.D8E6ZmHJ.lean.js → reference_project-layout.md._XdeMahr.lean.js} +1 -1
  62. package/dist/docs/assets/{reference_sessions.md.C_ouF_uf.js → reference_sessions.md.DBVFi2Sx.js} +2 -2
  63. package/dist/docs/assets/{reference_subagents.md.zWAMNfi1.js → reference_subagents.md.DSrGLIuB.js} +2 -2
  64. package/dist/docs/assets/{reference_subagents.md.zWAMNfi1.lean.js → reference_subagents.md.DSrGLIuB.lean.js} +1 -1
  65. package/dist/docs/assets/{reference_tools.md.BswAQM41.js → reference_tools.md.lSrsTxYJ.js} +4 -4
  66. package/dist/docs/assets/{reference_tools.md.BswAQM41.lean.js → reference_tools.md.lSrsTxYJ.lean.js} +1 -1
  67. package/dist/docs/assets/scaffolding-agents.md.mkc3B_ZW.js +1 -0
  68. package/dist/docs/assets/{scaffolding-agents.md.Bsr9Pwzu.lean.js → scaffolding-agents.md.mkc3B_ZW.lean.js} +1 -1
  69. package/dist/docs/assets/{storage.md.xZoiGM58.js → storage.md.mQDtIULc.js} +3 -3
  70. package/dist/docs/assets/{storage.md.xZoiGM58.lean.js → storage.md.mQDtIULc.lean.js} +1 -1
  71. package/dist/docs/building-with-agents.html +6 -6
  72. package/dist/docs/concepts.html +5 -5
  73. package/dist/docs/deployment.html +6 -6
  74. package/dist/docs/evals.html +13 -19
  75. package/dist/docs/example-agents/approval-buddy.html +5 -5
  76. package/dist/docs/example-agents/benny.html +5 -5
  77. package/dist/docs/example-agents/bugbot.html +5 -5
  78. package/dist/docs/example-agents/codebase-wiki.html +5 -5
  79. package/dist/docs/example-agents/codeowners-review.html +5 -5
  80. package/dist/docs/example-agents/concierge.html +6 -6
  81. package/dist/docs/example-agents/fsd.html +5 -5
  82. package/dist/docs/example-agents/index.html +4 -4
  83. package/dist/docs/example-agents/knowledge-base.html +5 -5
  84. package/dist/docs/example-agents/oncall.html +5 -5
  85. package/dist/docs/example-agents/security-reviewer.html +4 -4
  86. package/dist/docs/example-agents/slack-agent.html +5 -5
  87. package/dist/docs/example-agents/weather-agent.html +6 -6
  88. package/dist/docs/guides/agent-to-agent.html +5 -5
  89. package/dist/docs/guides/cloud-runtime.html +6 -6
  90. package/dist/docs/guides/github.html +4 -4
  91. package/dist/docs/guides/human-in-the-loop.html +4 -4
  92. package/dist/docs/guides/mcp-oauth.html +5 -5
  93. package/dist/docs/guides/slack.html +4 -4
  94. package/dist/docs/guides/webhooks.html +6 -6
  95. package/dist/docs/hashmap.json +1 -1
  96. package/dist/docs/hillclimbing.html +6 -6
  97. package/dist/docs/index.html +11 -7
  98. package/dist/docs/quickstart.html +10 -7
  99. package/dist/docs/reference/agent-config.html +10 -8
  100. package/dist/docs/reference/artifacts.html +43 -0
  101. package/dist/docs/reference/channels.html +6 -6
  102. package/dist/docs/reference/cli.html +18 -12
  103. package/dist/docs/reference/connections.html +4 -4
  104. package/dist/docs/reference/hooks.html +6 -6
  105. package/dist/docs/reference/http-api.html +7 -7
  106. package/dist/docs/reference/instructions.html +4 -4
  107. package/dist/docs/reference/playground.html +4 -4
  108. package/dist/docs/reference/project-layout.html +6 -6
  109. package/dist/docs/reference/prompt.html +4 -4
  110. package/dist/docs/reference/schedules.html +4 -4
  111. package/dist/docs/reference/sessions.html +7 -7
  112. package/dist/docs/reference/skills.html +4 -4
  113. package/dist/docs/reference/subagents.html +6 -6
  114. package/dist/docs/reference/tools.html +7 -7
  115. package/dist/docs/scaffolding-agents.html +5 -5
  116. package/dist/docs/storage.html +6 -6
  117. package/dist/docs/troubleshooting.html +4 -4
  118. package/dist/files-backends/agent-store-presigned-url.d.ts.map +1 -1
  119. package/dist/files-backends/agent-store-presigned-url.js +15 -22
  120. package/dist/internal/cli-github.d.ts.map +1 -1
  121. package/dist/internal/cli-github.js +8 -7
  122. package/dist/internal/cli-slack.js +9 -9
  123. package/dist/internal/event-mapper.d.ts +3 -3
  124. package/dist/internal/event-mapper.d.ts.map +1 -1
  125. package/dist/internal/event-mapper.js +7 -4
  126. package/dist/internal/host-kv.d.ts +6 -2
  127. package/dist/internal/host-kv.d.ts.map +1 -1
  128. package/dist/internal/session-engine.d.ts.map +1 -1
  129. package/dist/internal/session-engine.js +15 -6
  130. package/dist/internal/storage-coordinator.d.ts +9 -1
  131. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  132. package/dist/internal/storage-coordinator.js +7 -0
  133. package/dist/internal/storage-roles.d.ts +78 -0
  134. package/dist/internal/storage-roles.d.ts.map +1 -0
  135. package/dist/internal/storage-roles.js +24 -0
  136. package/dist/internal/workspace.d.ts +28 -0
  137. package/dist/internal/workspace.d.ts.map +1 -1
  138. package/dist/internal/workspace.js +57 -0
  139. package/dist/playground/assets/{index-CDDWw0YX.js → index-DOnKC85G.js} +40 -40
  140. package/dist/playground/assets/index-DoQjqj5w.css +1 -0
  141. package/dist/playground/index.html +2 -2
  142. package/docs/README.md +32 -13
  143. package/docs/ab.md +23 -36
  144. package/docs/building-with-agents.md +2 -2
  145. package/docs/concepts.md +3 -2
  146. package/docs/deployment.md +1 -1
  147. package/docs/evals.md +102 -33
  148. package/docs/example-agents/approval-buddy.md +2 -1
  149. package/docs/example-agents/benny.md +2 -0
  150. package/docs/example-agents/bugbot.md +3 -0
  151. package/docs/example-agents/codebase-wiki.md +2 -0
  152. package/docs/example-agents/codeowners-review.md +2 -0
  153. package/docs/example-agents/concierge.md +1 -0
  154. package/docs/example-agents/fsd.md +1 -0
  155. package/docs/example-agents/knowledge-base.md +2 -0
  156. package/docs/example-agents/oncall.md +2 -0
  157. package/docs/example-agents/slack-agent.md +1 -0
  158. package/docs/example-agents/weather-agent.md +9 -4
  159. package/docs/guides/cloud-runtime.md +11 -4
  160. package/docs/guides/webhooks.md +1 -1
  161. package/docs/hillclimbing.md +1 -1
  162. package/docs/quickstart.md +39 -7
  163. package/docs/reference/agent-config.md +74 -14
  164. package/docs/reference/artifacts.md +117 -0
  165. package/docs/reference/channels.md +45 -15
  166. package/docs/reference/cli.md +141 -20
  167. package/docs/reference/hooks.md +11 -4
  168. package/docs/reference/http-api.md +50 -4
  169. package/docs/reference/project-layout.md +6 -0
  170. package/docs/reference/sessions.md +5 -4
  171. package/docs/reference/subagents.md +5 -3
  172. package/docs/reference/tools.md +23 -7
  173. package/docs/scaffolding-agents.md +11 -2
  174. package/docs/storage.md +27 -2
  175. package/package.json +1 -1
  176. package/src/channels/github/github-channel.ts +1 -1
  177. package/src/channels/github/index.ts +1 -1
  178. package/src/channels/slack/index.ts +1 -1
  179. package/src/channels/slack/init.ts +2 -1
  180. package/src/files-backends/agent-store-presigned-url.ts +2 -1
  181. package/src/internal/cli-github.ts +8 -7
  182. package/src/internal/cli-slack.ts +9 -9
  183. package/src/internal/event-mapper.ts +9 -4
  184. package/src/internal/host-kv.ts +6 -2
  185. package/src/internal/session-engine.ts +20 -8
  186. package/src/internal/storage-coordinator.ts +15 -1
  187. package/src/internal/storage-roles.ts +86 -0
  188. package/src/internal/workspace.ts +66 -1
  189. package/dist/docs/assets/chunks/@localSearchIndexroot.WoYunhnT.js +0 -1
  190. package/dist/docs/assets/guides_cloud-runtime.md.CDJGvVC4.js +0 -9
  191. package/dist/docs/assets/guides_cloud-runtime.md.CDJGvVC4.lean.js +0 -1
  192. package/dist/docs/assets/index.md.CZqbBJPB.js +0 -20
  193. package/dist/docs/assets/reference_http-api.md.CfVM_ICa.js +0 -11
  194. package/dist/docs/assets/reference_http-api.md.CfVM_ICa.lean.js +0 -1
  195. package/dist/docs/assets/scaffolding-agents.md.Bsr9Pwzu.js +0 -1
  196. package/dist/playground/assets/index-MVuNTd8v.css +0 -1
  197. /package/dist/docs/assets/{building-with-agents.md.CnHqvYDd.lean.js → building-with-agents.md.txrcGU2B.lean.js} +0 -0
  198. /package/dist/docs/assets/{concepts.md.DFaQEFkA.lean.js → concepts.md.CqOsxbMU.lean.js} +0 -0
  199. /package/dist/docs/assets/{deployment.md.9MYBuKM1.lean.js → deployment.md.CuK5SNjN.lean.js} +0 -0
  200. /package/dist/docs/assets/{example-agents_approval-buddy.md.BhEfleVx.lean.js → example-agents_approval-buddy.md.CIiZ9coo.lean.js} +0 -0
  201. /package/dist/docs/assets/{example-agents_benny.md.2Et1qa8f.lean.js → example-agents_benny.md.l7JTmm8X.lean.js} +0 -0
  202. /package/dist/docs/assets/{example-agents_fsd.md.DfNKQTHz.lean.js → example-agents_fsd.md.DPz9ezO4.lean.js} +0 -0
  203. /package/dist/docs/assets/{example-agents_knowledge-base.md.CzyZ2DCr.lean.js → example-agents_knowledge-base.md.IneynQSR.lean.js} +0 -0
  204. /package/dist/docs/assets/{example-agents_oncall.md.wFFXXEyW.lean.js → example-agents_oncall.md.ZE0n6ZFN.lean.js} +0 -0
  205. /package/dist/docs/assets/{example-agents_slack-agent.md.DvgvT4nn.lean.js → example-agents_slack-agent.md.06jQXTAI.lean.js} +0 -0
  206. /package/dist/docs/assets/{guides_webhooks.md.DiAwSR42.lean.js → guides_webhooks.md.BERuBSJW.lean.js} +0 -0
  207. /package/dist/docs/assets/{hillclimbing.md.D9Y1_bYh.lean.js → hillclimbing.md.yXqdlv2R.lean.js} +0 -0
  208. /package/dist/docs/assets/{reference_sessions.md.C_ouF_uf.lean.js → reference_sessions.md.DBVFi2Sx.lean.js} +0 -0
@@ -26,6 +26,7 @@ also provide `agent-sdk slack help` and `agent-sdk github help`.
26
26
  | [`logs`](#logs) | Follow local or hosted logs |
27
27
  | [`sessions`](#sessions) | List sessions on a running agent |
28
28
  | [`session`](#session) | Inspect one session |
29
+ | [`cost`](#cost) | Report per-session token usage and estimated cost |
29
30
  | [`playground`](#playground) | Open the local or hosted playground |
30
31
  | [`docs`](#docs) | Serve the shipped documentation site locally |
31
32
  | [`run`](#run) | Run one or more turns locally, remotely, or on a hosted agent |
@@ -33,9 +34,12 @@ also provide `agent-sdk slack help` and `agent-sdk github help`.
33
34
  | [`eval`](#eval) | Run filesystem evals |
34
35
  | [`trajectory`](#trajectory) | Summarize a saved `events.ndjson` file |
35
36
  | [`init`](#init) | Scaffold a project, or print the setup guide |
37
+ | [`convert-automation`](#convert-automation) | Export a Cursor Automation into an agent project |
38
+ | [`install-skills`](#install-skills) | Install the coding-agent skills without running `init` |
36
39
  | [`info`](#info) | Print the discovered agent surface |
37
40
  | [`validate`](#validate) | Check a project and fail on errors |
38
- | [`login` / `logout` / `whoami`](#login--logout--whoami) | Manage the host's Cursor credential |
41
+ | [`login` / `logout` / `whoami`](#login-logout-whoami) | Manage the host's Cursor credential |
42
+ | `version` | Print the installed version and exit (also `--version` / `-V`) |
39
43
  | [`update`](#update) | Upgrade the installed CLI |
40
44
  | [`deploy`](#deploy) | Deploy one or more agents to Cursor managed hosting |
41
45
  | [`deployments`](#deployments) | List hosted deployments |
@@ -44,6 +48,7 @@ also provide `agent-sdk slack help` and `agent-sdk github help`.
44
48
  | [`rotate-token`](#rotate-token) | Replace a deployment's alias token |
45
49
  | [`rotate-pod-credential`](#rotate-pod-credential) | Replace a deployment's pod credential |
46
50
  | [`secrets`](#secrets) | Manage deployment secrets |
51
+ | [`mcp`](#mcp) | Proxy the agent's MCP endpoint over stdio; `mcp install` writes `~/.cursor/mcp.json` |
47
52
  | [`mcp oauth`](#mcp-oauth) | Authorize host MCP OAuth; optional `--store` to deployment secrets |
48
53
  | [`slack ...`](#slack) | Provision, set up, and check Slack channels |
49
54
  | [`github ...`](#github) | Forward, replay, and inspect GitHub webhook channels |
@@ -55,13 +60,14 @@ Request-sending commands support three target types.
55
60
  | Target | How to select it | Commands |
56
61
  | --- | --- | --- |
57
62
  | Ephemeral local server | Omit `--url` and `--prod` | `run`, `call`, `eval` |
58
- | Running server | Pass `--url <baseUrl>`, unless the command uses the localhost default described next | `chat`, `resume`, `logs`, `sessions`, `session`, `playground`, `run`, `call`, `eval` |
59
- | Cursor managed hosting | Pass `--prod` | `chat`, `resume`, `logs`, `sessions`, `session`, `playground`, `run`, `call`, `eval` |
63
+ | Running server | Pass `--url <baseUrl>`, unless the command uses the localhost default described next | `chat`, `resume`, `logs`, `sessions`, `session`, `cost`, `playground`, `run`, `call`, `eval`, `mcp` |
64
+ | Cursor managed hosting | Pass `--prod` | `chat`, `resume`, `logs`, `sessions`, `session`, `cost`, `playground`, `run`, `call`, `eval`, `mcp` |
60
65
 
61
- `chat`, `logs`, `sessions`, `session`, and `playground` default to
66
+ `chat`, `logs`, `sessions`, `session`, `cost`, and `playground` default to
62
67
  `http://127.0.0.1:3000`. A `--url` must include the agent slug for a
63
68
  multi-agent server, such as `http://127.0.0.1:3000/pr-approver`.
64
- `--slug` doesn't change an explicit URL.
69
+ `--slug` doesn't change an explicit URL. `mcp` has no default target;
70
+ pass `--url` or `--prod`.
65
71
 
66
72
  With `--prod`, `--slug` selects the deployment and `--team` selects the
67
73
  Cursor team. The slug defaults to the `--dir` basename. The team
@@ -89,7 +95,9 @@ agent-sdk serve [--dir <path>] [--port 3000] [--host 127.0.0.1] [--dev]
89
95
  [--state-root <path>] [--bearer-token <secret> | --allow-anonymous]
90
96
  [--allow-anonymous-cursor-github]
91
97
  [--allow-anonymous-cursor-account-mcp]
92
- [--public-url <url>] [--no-schedules] [--no-playground]
98
+ [--public-url <url>] [--cloud-tools-url <url>]
99
+ [--cursor-github-proxy] [--no-control-plane]
100
+ [--no-schedules] [--no-playground]
93
101
  [--no-docs] [--cursor-events --repo owner/name]...
94
102
  ```
95
103
 
@@ -114,6 +122,9 @@ Unless `--state-root` is set, each mount uses
114
122
  | `--allow-anonymous-cursor-github` | Allow anonymous callers to drive sessions holding a Cursor account's repo-scoped GitHub credential. Use only behind an authenticating proxy. |
115
123
  | `--allow-anonymous-cursor-account-mcp` | Allow anonymous callers to drive Cursor account MCP connectors (`defineConnection({ cursorAccount: true })`). Use only behind an authenticating proxy (hosted alias token counts). |
116
124
  | `--public-url` | Set the externally reachable host URL. Cloud-runtime peer connections need it to call back into this server. |
125
+ | `--cloud-tools-url` | Authenticated HTTP MCP URL for this deployment's direct server-tool endpoint. Hosted deployments configure it automatically. |
126
+ | `--cursor-github-proxy` | Route `githubChannel({ cursorAccount })` API calls through the Cursor backend's GitHub forwarder instead of minting raw installation tokens into this process. `AGENT_SERVE_GITHUB_PROXY_URL` overrides the base URL. |
127
+ | `--no-control-plane` | Skip the bundled schedule and reminder clocks. Cursor hosting passes this so the platform fires timed work through internal routes instead. |
117
128
  | `--no-schedules` | Disable the cron runner outside dev mode. |
118
129
  | `--no-playground` | Skip the web playground and its build or HMR process. |
119
130
  | `--no-docs` | Skip the documentation site at `/docs` and its build. |
@@ -220,15 +231,35 @@ and update time. `--json` prints full session summaries in
220
231
  ```bash
221
232
  agent-sdk session <sessionId> [--url <baseUrl> | --prod]
222
233
  [--slug <slug>] [--team <id>]
223
- [--json | --text | --events]
234
+ [--json | --text | --events] [--out <file.ndjson>]
224
235
  ```
225
236
 
226
237
  By default, `session` prints a compact trajectory. `--text` selects the
227
238
  same format. `--json` prints the trajectory object. `--events` prints
228
239
  `{ sessionId, events }` with the raw event list. You can't combine
229
- `--events` and `--json`. Use
240
+ `--events` and `--json`. `--out <file.ndjson>` writes the raw NDJSON
241
+ trace to a file instead of printing. The file uses the same format as
242
+ `run --events` and the playground download. Use
230
243
  [`resume`](#resume) to continue the conversation.
231
244
 
245
+ ## cost
246
+
247
+ `cost` reports token usage and estimated cost.
248
+
249
+ ```bash
250
+ agent-sdk cost [sessionId] [--url <baseUrl> | --prod]
251
+ [--slug <slug>] [--team <id>] [--json]
252
+ ```
253
+
254
+ With a session ID, `cost` prints per-turn token usage and estimated
255
+ cost for that session. Without one, it prints one row per session on
256
+ the target plus a total. Costs are the engine's recorded estimates from
257
+ `turn.completed` events; turns persisted before cost tracking count as
258
+ unpriced. `--json` prints the underlying report, or `{ sessions }` when
259
+ aggregating. Like `session`, the command supports `--dir`,
260
+ `--bearer-token`, and the `--url`/`--prod` targets, and defaults to the
261
+ local server.
262
+
232
263
  ## playground
233
264
 
234
265
  `playground` opens an agent's web playground.
@@ -349,13 +380,27 @@ Omit selectors to run all cases. Repeated `--tag` flags use OR matching.
349
380
 
350
381
  An eval run requires `evals/evals.config.{ts,js}` with `maxConcurrency`
351
382
  between 1 and 200. Timeout priority is the case's `timeoutMs`, the CLI's
352
- `--timeout-ms`, the config's `timeoutMs`, then 180 seconds. Use
353
- `--no-stream` to hide live progress or `--verbose` to include `t.log`
354
- lines and reply snippets.
383
+ `--timeout-ms`, the config's `timeoutMs`, then 180 seconds.
355
384
 
356
- `--list --json` prints an array of discovered cases. A run with `--json`
357
- prints `{ ok, passed, failed, results }`. Failed cases exit `1`; no
358
- matching cases exit `2`. See [Evals](../evals.md).
385
+ | Flag | Meaning |
386
+ | --- | --- |
387
+ | `--list` | Print discovered cases without running. `--list --json` prints them as an array. |
388
+ | `--tag <tag>` | Run cases with this tag. Repeated flags use OR matching. |
389
+ | `--json` | Print `{ ok, passed, failed, results }`. |
390
+ | `--verbose` | Stream `t.log` lines and reply snippets. |
391
+ | `--no-stream` | Hide live progress on stderr. |
392
+ | `--strict` | Exit `1` when a scored case misses a soft threshold. |
393
+ | `--max-concurrency <n>` | Override `maxConcurrency` from `evals.config.ts`. |
394
+ | `--junit <path>` | Write JUnit XML for CI annotations. |
395
+ | `--artifacts <dir>` | Write run artifacts here. The default is a timestamped directory under `<dir>/.agent-serve/evals/`. |
396
+ | `--no-artifacts` | Skip run artifacts. |
397
+ | `--skip-report` | Ignore reporters from `evals.config.ts` and eval files. |
398
+ | `--out <path>` | Also write the full results JSON to this path (also for `eval status <evalId>`). |
399
+ | `--no-wait` | Return with the Eval ID as soon as a `--prod` or `--url` batch is accepted. |
400
+ | `--timeout-ms <n>` | Per-case timeout override. |
401
+
402
+ Failed cases exit `1`; no matching cases exit `2`. See
403
+ [Evals](../evals.md).
359
404
 
360
405
  ## trajectory
361
406
 
@@ -397,6 +442,44 @@ login or skill installation. It prints
397
442
  `{ ok, directory, created, skipped, installed, installError, next }`
398
443
  (with `login` in `next` when unsigned).
399
444
 
445
+ ## convert-automation
446
+
447
+ `convert-automation` exports a Cursor Automation into an agent project.
448
+
449
+ ```bash
450
+ agent-sdk convert-automation <url> [--dir <path>] [--json]
451
+ ```
452
+
453
+ `<url>` is the dashboard URL (`…/automations/<uuid>` or
454
+ `…/custom-agents/<uuid>`) or a bare UUID. The command fetches the
455
+ automation's definition with your Cursor credentials, writes the
456
+ converted files into `--dir` (default `./<automation-name>`), fills in
457
+ the `init` scaffold around them, and installs npm dependencies.
458
+ Existing files are kept.
459
+
460
+ MCP servers convert to Cursor-account connections resolved at runtime.
461
+ No URLs or credentials land in the project; manage authorization in the
462
+ Cursor dashboard under MCP. Review the generated project, then run
463
+ `validate` and `dev`. Warnings never fail the command; it exits
464
+ non-zero only for bad arguments, auth or fetch failures, and filesystem
465
+ write failures.
466
+
467
+ ## install-skills
468
+
469
+ `install-skills` installs the package's coding-agent skills into
470
+ `~/.cursor/skills/agentkit/`.
471
+
472
+ ```bash
473
+ agent-sdk install-skills [--print] [--json]
474
+ ```
475
+
476
+ Running the command is the confirmation: it never prompts, and it
477
+ overwrites the installed skills with the version bundled in the
478
+ package. `init` offers the same install once, interactively. `--print`
479
+ previews the skills, the removals, and the install path without writing
480
+ anything. `--json` prints
481
+ `{ ok, dryRun, directory, firstInstall, skills, removed }`.
482
+
400
483
  ## info
401
484
 
402
485
  `info` prints the discovered agent surface.
@@ -576,18 +659,56 @@ engine pod.
576
659
  agent-sdk rotate-pod-credential <slug> [--team <id>] [--json]
577
660
  ```
578
661
 
579
- The command returns only the masked key and revokes the old credential
580
- immediately. Redeploy at once to inject the replacement; the current
581
- pod can't authenticate to Cursor in between.
662
+ The command prints only the masked key (`--json` prints
663
+ `{ podCredentialMaskedKey }`). The running pod keeps the old credential
664
+ until the next deploy, so nothing breaks in between. Run
665
+ `agent-sdk deploy --slug <slug>` to inject the replacement and retire
666
+ the old credential.
667
+
668
+ ## mcp
669
+
670
+ `mcp` proxies an agent's MCP endpoint over stdio for MCP clients that
671
+ spawn local servers, such as Cursor.
672
+
673
+ ```bash
674
+ agent-sdk mcp --prod [--slug <slug>] [--team <id>]
675
+ agent-sdk mcp --url <baseUrl> [--bearer-token <token>]
676
+ agent-sdk mcp install [--prod | --url <baseUrl>] [--name <serverName>]
677
+ [--print] [--json] [--remote]
678
+ ```
679
+
680
+ The bare command reads newline-delimited JSON-RPC on stdin and forwards
681
+ one POST per message to `<target>/v1/mcp`. It requires `--prod` or
682
+ `--url`. With `--prod`, it resolves the hosted deployment through the
683
+ signed-in Cursor account and re-mints short-lived engine credentials as
684
+ they expire, so no durable secret lands in a config file. stdout is
685
+ reserved for the MCP wire; logging goes to stderr.
686
+
687
+ `mcp install` writes the matching entry into `~/.cursor/mcp.json` so
688
+ the agent shows up as an MCP server in Cursor. `--name` overrides the
689
+ server name (the default is the slug, or a name derived from `--url`).
690
+ `--print` prints the entry instead of writing the file, and `--json`
691
+ prints a machine-readable result. `--remote` (with `--prod`) writes a
692
+ remote HTTP entry pointing at the stable Cursor MCP gateway instead of
693
+ the local stdio proxy, for MCP hosts that can't spawn stdio servers.
694
+ The remote entry carries your API key in plain text, so treat the file
695
+ as a credential.
582
696
 
583
697
  ## mcp oauth
584
698
 
585
- `mcp oauth` authorizes a `defineConnection({ url, oauth: true })`
586
- connection with a browser PKCE flow. Tokens are written to
699
+ `mcp oauth` authorizes a `defineConnection({ url, oauth: true })` or
700
+ `defineConnection({ cursorAccount: true })` connection.
701
+
702
+ URL connections run a browser PKCE flow. Tokens are written to
587
703
  `mcp-auth.json` under the agent-serve config dir (default
588
704
  `~/.config/agent-serve`). Pass `--store` to upsert matching
589
705
  `MCP_OAUTH_<CONNECTION>_*` secrets on the hosted deployment.
590
706
 
707
+ Cursor-account connections authorize the hosted deployment's service
708
+ account through the Cursor backend's connector consent flow. Those
709
+ tokens live on the Cursor backend, so `--store` isn't needed; the
710
+ command prints a note when you pass it anyway.
711
+
591
712
  ```bash
592
713
  agent-sdk mcp oauth <connection> [--dir .] [--store] [--slug <slug>] [--team <id>]
593
714
  ```
@@ -651,7 +772,7 @@ agent-sdk slack init [--dir <path>] [--name <name>]
651
772
  [--prefix <prefix> | --no-prefix] [--channel-posts]
652
773
  agent-sdk slack manifest [--dir <path>] [--name <name>]
653
774
  [--env dev|prod|both] [--channel-posts] [--print]
654
- agent-sdk slack doctor [--prefix <prefix>] [--json]
775
+ agent-sdk slack doctor [--dir <path>] [--prefix <prefix> | --no-prefix] [--json]
655
776
  ```
656
777
 
657
778
  `slack setup` prints a guided checklist and doesn't change files.
@@ -31,10 +31,17 @@ export default defineHook({
31
31
  ```
32
32
 
33
33
  Keys are event types (the full list is in the
34
- [event vocabulary](./sessions.md#the-event-vocabulary)), or `"*"` for
35
- everything. Handlers receive the event with its envelope (`index`,
36
- `sessionId`, `turnId?`, `at`) and a context carrying read-only
37
- `ctx.session` info.
34
+ [event vocabulary](./sessions.md#which-events-can-i-stream)), or `"*"`
35
+ for everything. Handlers receive the event with its envelope (`index`,
36
+ `sessionId`, `turnId?`, `at`) and a `HookContext`:
37
+
38
+ | Member | What it is |
39
+ | --- | --- |
40
+ | `ctx.session` | Read-only session info: id, channel, mode, auth |
41
+ | `ctx.agent` | `{ name }` of the agent the event belongs to |
42
+ | `ctx.channel` | `{ id, continuationToken }` for the owning channel |
43
+ | `ctx.stateRoot` | The agent's durable state root; hooks maintaining derived state write here |
44
+ | `ctx.artifacts` | Session-bound [artifacts](./artifacts.md) facade: `tag` auto-fills the session |
38
45
 
39
46
  ## Hooks, channel events, evals, or A/B?
40
47
 
@@ -83,7 +83,7 @@ default is `0`: omitting the parameter replays the entire recorded
83
83
  stream before following. Pass the last index you've seen plus one to
84
84
  resume without duplicates. The stream is durable and reconnectable. For
85
85
  the vocabulary, see
86
- [Sessions](./sessions.md#the-event-vocabulary).
86
+ [Sessions](./sessions.md#which-events-can-i-stream).
87
87
 
88
88
  `GET /v1/session/:sessionId/events` returns the same content as a
89
89
  one-shot dump with no live follow.
@@ -96,6 +96,14 @@ calling principal. Under `serve --dev` on loopback it includes all
96
96
  sessions, which is how webhook and schedule sessions show up in the
97
97
  playground.
98
98
 
99
+ ## Session cost
100
+
101
+ `GET /v1/session/:sessionId/cost` returns the session's cost report:
102
+ per-turn token usage and the engine's estimated cost, folded from
103
+ `turn.completed` events. It runs the same owner check as the other
104
+ session routes and returns `404` for an unknown session. The
105
+ [`agent-sdk cost`](./cli.md#cost) command reports the same data.
106
+
99
107
  ## Approvals
100
108
 
101
109
  Two routes list and resolve parked tool calls.
@@ -132,12 +140,27 @@ Five read-only routes describe the running agent.
132
140
 
133
141
  | Route | What it does |
134
142
  | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
135
- | `GET /v1/info` | The manifest snapshot: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics; the same shape as `agent-sdk info --json` |
143
+ | `GET /v1/info` | The manifest snapshot: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics. Always the bare project-info object; `agent-sdk info --json` wraps the same data per slug in `{ agents: [...] }` |
136
144
  | `GET /v1/health` | Per-agent liveness, no auth |
137
145
  | `GET /v1/meta` | SPA bootstrap: agent name, dev flag, base path (no auth) |
138
146
  | `GET /v1/logs?after=N` | Recent server log lines from the ring buffer, with a polling cursor |
139
147
  | `GET /v1/abs` | [Live A/B metrics](../ab.md): per-session assignments and aggregate arm totals folded from durable event streams (`config` reports `maxPlaygroundSessions` / `durableSamples` / `durableSnapshots` from `agent/ab.config.ts`) |
140
148
 
149
+ ## Artifacts
150
+
151
+ Two routes read durable artifacts tagged by `ctx.artifacts` or
152
+ `tag_artifact`. See [Artifacts](./artifacts.md).
153
+
154
+ | Route | What it does |
155
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------ |
156
+ | `GET /v1/artifacts` | List artifacts as `{ artifacts }`, newest-updated first. Filter with `?kind=`, `?sessionId=`, and `?limit=` (a positive integer) |
157
+ | `GET /v1/artifacts/:id/content` | Download one artifact's file or blob payload. Served as an attachment, never rendered inline; `404` when the artifact is unknown or carries no content |
158
+
159
+ Session ownership applies the same way as `GET /v1/sessions`: under
160
+ `serve --dev` on loopback (or `--allow-anonymous`) the list spans all
161
+ principals, while bearer or custom channel auth keeps strict
162
+ per-principal isolation.
163
+
141
164
  ## Custom channel routes
142
165
 
143
166
  Authored routes mount under `/v1/channels/<id>` with the methods, paths,
@@ -157,6 +180,17 @@ server-tool passthrough, present when the agent has server tools). The
157
180
  route runs the same auth chain as the session API. See
158
181
  [Agent-to-agent](../guides/agent-to-agent.md).
159
182
 
183
+ `/v1/mcp/tools` is a second stateless MCP endpoint exposing only the
184
+ agent's deterministic server tools. Hosted cloud turns call back into
185
+ it through the URL configured by `serve --cloud-tools-url`. Unlike
186
+ `/v1/mcp`, it runs the CLI-level auth chain (loopback, bearer, or
187
+ anonymous), not any authored channel auth.
188
+
189
+ `POST /v1/cursor-account/:connection/mcp` is the bridge for
190
+ `defineConnection({ cursorAccount: true })` connections. The runtime
191
+ calls it with a per-boot bearer secret; it never joins the public auth
192
+ chain, and an unknown connection name returns `404`.
193
+
160
194
  ## Playground eval routes
161
195
 
162
196
  Always registered (including production / non-`--dev` serves). The playground
@@ -174,8 +208,9 @@ Eval runs are asynchronous. Poll the run route for case progress and
174
208
  the final `completed` or `failed` status. Batch errors appear on the
175
209
  snapshot returned by the poll. Entries within `filterIds` and `tags`
176
210
  use OR semantics. When both fields are present, a case must match one
177
- entry from each field. Without `persistRuns` in `evals.config.ts`,
178
- listed runs are process-memory only (capped by `maxPlaygroundRuns`).
211
+ entry from each field. Without a storage `evals` table in
212
+ `agent/storage.ts` (see [Storage](../storage.md)), listed runs are
213
+ process-memory only (capped by `maxPlaygroundRuns`).
179
214
 
180
215
  ## Dev-mode routes
181
216
 
@@ -190,6 +225,17 @@ These routes exist only under `serve --dev`.
190
225
  Schedules and reminders never fire automatically in dev mode. These
191
226
  routes are the only way they run, which keeps iteration deterministic.
192
227
 
228
+ ## Platform timer routes
229
+
230
+ `POST /v1/internal/schedules/:scheduleId/fire` and
231
+ `POST /v1/internal/reminders/:reminderId/fire` exist only under
232
+ `serve --no-control-plane`, where the host runs no schedule or reminder
233
+ clocks of its own. Cursor hosting starts engines this way and fires
234
+ timed work through them. They admit only requests carrying the
235
+ platform's `x-agent-serve-timed-work` marker, which the alias proxy
236
+ strips from external traffic, so webhook and playground callers can
237
+ never reach them.
238
+
193
239
  ## Playground assets
194
240
 
195
241
  `GET /playground` and `GET /playground/assets/:file` serve the static
@@ -84,8 +84,14 @@ Each path maps to a capability and a reference page.
84
84
  | `agent/channels/*.ts` | HTTP surfaces beyond the built-in session API; `slack.ts` and `github.ts` use the platform packs | [Channels](./channels.md) |
85
85
  | `agent/hooks/*.ts` | Observe-only event subscribers, never fatal | [Hooks](./hooks.md) |
86
86
  | `agent/ab.ts`, `agent/ab/*.ts` | `defineAB` experiments with sticky variants and live metrics | [Live A/B metrics](../ab.md) |
87
+ | `agent/ab.config.ts` | `defineABConfig` shared A/B settings | [Live A/B metrics](../ab.md) |
88
+ | `agent/storage.ts` | `defineStorage` backend for the durable `host.kv` / `host.files` APIs | [Storage](../storage.md) |
89
+ | `agent/artifacts.ts` | `defineArtifacts` kinds, the `tag_artifact` opt-in, and retention | [Artifacts](./artifacts.md) |
87
90
  | `agent/schedules/*` | Cron-driven runs (UTC, 5-field; never auto-fire under `--dev`) | [Schedules](./schedules.md) |
91
+ | `agent/sandbox/workspace/**` | Seed files copied into each local session workspace | [Sessions](./sessions.md#what-goes-into-a-local-session-workspace) |
92
+ | `agent/playground/` | Custom playground tool chips for the Vite dev playground | [Playground](./playground.md) |
88
93
  | `agent/lib/` | Import-only shared code, never discovered | None |
94
+ | `evals/evals.config.ts` | Shared eval settings (e.g. `maxConcurrency`); required when evals exist | [Evals](../evals.md) |
89
95
  | `evals/**/*.eval.ts` | Filesystem evals; case id = path under `evals/` | [Evals](../evals.md) |
90
96
 
91
97
  `agent/lib/` is the only place for shared code. Everything else under
@@ -81,13 +81,14 @@ within one session. The `at` field is an ISO-8601 timestamp.
81
81
  | Session | `session.started`, [`ab.assigned`](../ab.md#assign-sticky-variants), `session.waiting`, `session.completed`, `session.failed` | Session creation, A/B enrollment, readiness, and task completion |
82
82
  | Agent | `agent.bound` | Cursor SDK agent ID and cloud conversation URL |
83
83
  | Input | `message.received` | A user message was accepted |
84
- | Turn | `turn.started`, `turn.completed`, `turn.failed` | Turn status, final result, and token usage |
84
+ | Turn | `turn.queued`, `turn.started`, `turn.completed`, `turn.failed` | Queue position under a [`maxRunningTurns` cap](./agent-config.md#concurrency), then turn status, final result, and token usage |
85
85
  | Steps | `step.started`, `step.completed` | Model step boundaries and duration |
86
86
  | Reasoning | `reasoning.appended`, `reasoning.completed` | Streamed reasoning blocks |
87
87
  | Reply | `message.appended`, `message.completed` | Text deltas and finalized assistant messages |
88
88
  | Tools | `actions.requested`, `action.result` | Tool names, validated arguments, outputs, and errors |
89
89
  | Approvals | `action.approval_requested`, `action.approval_resolved` | A parked tool call and the human decision |
90
90
  | Subagents | `subagent.called`, `subagent.completed` | Delegated work |
91
+ | Artifacts | `artifact.tagged` | A durable [artifact](./artifacts.md) was tagged for this session, by host code or `tag_artifact` |
91
92
 
92
93
  Pair `actions.requested` with `action.result` to reconstruct the tool
93
94
  trajectory. Read `turn.completed.data.usage` for input, output, and
@@ -117,7 +118,7 @@ The Agent SDK creates a workspace before the first local turn:
117
118
  | ---------------------------------- | ----------------------------------------------------------------------- |
118
119
  | `instructions.*` | `AGENTS.md` |
119
120
  | `skills/*` | `.cursor/skills/<name>/SKILL.md` |
120
- | agent tools (`execution: "agent"`) | scripts under `.agent-sdk/tools/`, with a catalog in `AGENTS.md` |
121
+ | agent tools (`execution: "agent"`) | scripts under `.agent-serve/tools/`, with a catalog in `AGENTS.md` |
121
122
  | `sandbox/workspace/**` | copied in as seed files |
122
123
  | per-send `workspaceFiles` | written before the turn |
123
124
 
@@ -135,7 +136,7 @@ inheritance rules.
135
136
  Local state uses one directory tree:
136
137
 
137
138
  ```text
138
- <project>/.agent-sdk/ # or <stateRoot>/<slug>/ under serve
139
+ <project>/.agent-serve/ # or <stateRoot>/<slug>/ under serve
139
140
  sessions/<id>/session.json # metadata: channel, mode, principal, tokens
140
141
  sessions/<id>/events.ndjson # the durable stream
141
142
  sessions/<id>/workspace/ # the harness cwd
@@ -158,7 +159,7 @@ repositories whose parent rules shouldn't reach the agent. See
158
159
  Use `trajectory` with a trace or session event file:
159
160
 
160
161
  ```bash
161
- agent-sdk trajectory --events .agent-sdk/traces/<sessionId>.ndjson
162
+ agent-sdk trajectory --events .agent-serve/traces/<sessionId>.ndjson
162
163
  agent-sdk trajectory --events <stateRoot>/<slug>/sessions/<id>/events.ndjson
163
164
  ```
164
165
 
@@ -38,9 +38,11 @@ when deciding whether to delegate, so write it as a routing rule
38
38
  inherit the parent's model, or set it to run the specialist on a
39
39
  different one.
40
40
 
41
- Subagents inherit the parent's execution surface. Per-subagent `tools/`,
42
- `skills/`, and `mcp-connections/` directories are reported as warnings and
43
- ignored. Nested subagents aren't supported.
41
+ Subagents inherit the parent's execution surface. Every per-subagent
42
+ capability directory is reported as a warning and ignored: `tools/`,
43
+ `skills/`, `mcp-connections/` (and the legacy `connections/` alias),
44
+ `channels/`, `schedules/`, `hooks/`, `sandbox/`, and nested
45
+ `subagents/`.
44
46
 
45
47
  Delegation needs both halves: the description makes it possible, and the
46
48
  parent's [instructions](./instructions.md) make it happen. "When a
@@ -15,8 +15,12 @@ also be called directly, with no model turn.
15
15
  ## Define a server tool
16
16
 
17
17
  By default, `execute` runs in-process on the serving host with full
18
- access to `process.env` and your `agent/lib/` code. Server tools require
19
- the `local` runtime.
18
+ access to `process.env` and your `agent/lib/` code. Local turns call
19
+ server tools as SDK custom tools. Cloud turns reach them over
20
+ authenticated HTTP MCP back to the serve host when `--public-url` or
21
+ `--cloud-tools-url` is set; without either, the server warns at startup
22
+ and cloud turns omit them (see
23
+ [Cloud runtime](../guides/cloud-runtime.md#what-changes-on-cloud)).
20
24
 
21
25
  ```ts
22
26
  // agent/tools/inspect_pr.ts
@@ -69,8 +73,19 @@ export default defineTool({
69
73
  | `ctx.toolCallId` | The call id, matching the `actions.requested` / `action.result` stream events |
70
74
  | `ctx.session` | Read-only session info: id, channel, mode, auth |
71
75
  | `ctx.workspaceDir` | The session's workspace directory |
72
- | `ctx.host.mcp` | Authored MCP connections: `names()`, `listTools(name)`, `callTool(name, tool, args)` |
73
- | `ctx.host.github` / `ctx.host.slack` | Shared host clients when those packs are configured |
76
+ | `ctx.stateRoot` | The agent's durable state root, shared across every session |
77
+ | `ctx.host` | Shared host services (see below) |
78
+ | `ctx.send(channelId, message, options?)` | Start or resume a session on any channel: the cross-channel handoff primitive, e.g. a chat tool opening a `drive` cloud session for a PR. `auth` defaults to this call's session principal |
79
+ | `ctx.getSession(channelId, sessionId)` | Look up a session on a channel, e.g. refresh `sdkAgentId` after a turn |
80
+ | `ctx.artifacts` | Session-bound [artifacts](./artifacts.md) facade: `tag` auto-fills the session |
81
+
82
+ `ctx.host` carries the shared host services: `host.mcp` (authored MCP
83
+ connections: `names()`, `listTools(name)`, `callTool(name, tool, args)`),
84
+ `host.github` and `host.slack` (shared platform clients), `host.kv` and
85
+ `host.files` (durable [storage](../storage.md)), `host.reminders`
86
+ (per-session wakes, when attached), `host.evals` (playground eval
87
+ batches, when attached), and `host.slackNudges` (Slack ask-dedupe
88
+ helpers).
74
89
 
75
90
  ### Return values
76
91
 
@@ -89,8 +104,9 @@ Throwing inside `execute` reports an error result to the model
89
104
  Set `execution: "agent"` and the tool materializes as a shell script
90
105
  that runs where the Cursor agent runs: the local harness workspace or
91
106
  the cloud VM. The script receives JSON arguments on stdin and prints its
92
- result on stdout. This is the only tool flavor available to
93
- `runtime: "cloud"` agents.
107
+ result on stdout. Use this flavor when the tool must run next to the
108
+ checkout the agent works in; on cloud, server tools stay available too
109
+ through the host's HTTP MCP endpoint.
94
110
 
95
111
  ```ts
96
112
  import { defineTool } from "@cursor/july/tools";
@@ -108,7 +124,7 @@ printf '%s\\n' "$message"
108
124
  });
109
125
  ```
110
126
 
111
- On the local runtime, scripts land under `.agent-sdk/tools/` in the
127
+ On the local runtime, scripts land under `.agent-serve/tools/` in the
112
128
  session workspace with a catalog in `AGENTS.md`. On cloud, the catalog
113
129
  and script bodies travel on the first prompt.
114
130
 
@@ -12,8 +12,17 @@ decision.
12
12
 
13
13
  The bundled
14
14
  [`create-agent` skill](../skills/create-agent/SKILL.md) turns your goal
15
- into a small working project. Have Cursor read that file and follow it
16
- (monorepo path: `packages/agent-serve/skills/create-agent/SKILL.md`).
15
+ into a small working project. Have Cursor read that file and follow it.
16
+
17
+ Where to find the file depends on how you got the package:
18
+
19
+ - Reading these docs on a hosted site? Run `agent-sdk install-skills`
20
+ to copy every package skill into `~/.cursor/skills/agentkit/`, where
21
+ Cursor discovers them by name.
22
+ - Installed `@cursor/july` as a dependency? The skill ships inside the
23
+ package at `node_modules/@cursor/july/skills/create-agent/SKILL.md`.
24
+ - Working in the monorepo? It's at
25
+ `packages/agent-serve/skills/create-agent/SKILL.md`.
17
26
 
18
27
  Cursor will:
19
28
 
package/docs/storage.md CHANGED
@@ -41,20 +41,45 @@ export default defineStorage({
41
41
  > using `@anysphere/agent-serve`, swap the import. See
42
42
  > [Run the CLI](./README.md#run-the-cli) for the full rename table.
43
43
 
44
- ## Which methods to provide
44
+ ## Which fields to provide
45
45
 
46
- | Method | Required | Role |
46
+ | Field | Required | Role |
47
47
  | --- | --- | --- |
48
48
  | `put` | Yes | Write or update a value |
49
49
  | `get` | For restore | Look up one key |
50
50
  | `list` | For restore | Return entries under a prefix, in key order |
51
51
  | `delete` | For cleanup | Remove a key |
52
+ | `name` | No | Label surfaced on `GET /v1/info` diagnostics |
53
+ | `policy` | No | Timing knobs; see [Policy](#policy) |
54
+ | `evals` | No | Dedicated eval-runs table; see [Eval and A/B tables](#eval-and-ab-tables) |
55
+ | `abs` | No | Dedicated A/B metrics table; see [Eval and A/B tables](#eval-and-ab-tables) |
52
56
 
53
57
  A throwing `put` is logged and dropped. It never fails a turn. When
54
58
  resolving a missing continuation token, a throwing `get` fails the
55
59
  follow-up so a store outage does not open a new session. Return
56
60
  `undefined` only for a real miss.
57
61
 
62
+ ## Eval and A/B tables
63
+
64
+ Two dedicated tables carry structured rows instead of opaque KV values.
65
+ Both are optional and independent of `put` / `get` / `list`.
66
+
67
+ `evals` keeps playground eval batches across restarts. Provide `put`,
68
+ `delete`, and `list` over run snapshots keyed by `runId`. The Agent SDK
69
+ upserts a snapshot as a batch starts, progresses, and finishes, prunes
70
+ runs past the playground history window, and lists everything back at
71
+ serve start. Without this table, eval history lives in process memory
72
+ and a restart clears it. See [Evals](./evals.md#configure-eval-runs).
73
+
74
+ `abs` exports live A/B metrics. Provide `putSample` to append one
75
+ cumulative metric sample per enrolled experiment on each completed or
76
+ failed turn. Optional `putSnapshot` and `getSnapshot` store and serve
77
+ back the latest aggregate snapshot, so a replacement host with no local
78
+ sessions can still serve the A/Bs surface. Without this table, samples
79
+ only go where each experiment's `onSample` sends them; session event
80
+ logs remain the assignment source of truth. See
81
+ [Live A/B metrics](./ab.md).
82
+
58
83
  ## Policy
59
84
 
60
85
  Two knobs change behavior:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -388,7 +388,7 @@ function verifyWebhookSha256Signature(args: {
388
388
  * hooks:
389
389
  *
390
390
  * ```ts
391
- * import { defaultGitHubAuth, githubChannel } from "@anysphere/agent-serve/channels/github";
391
+ * import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
392
392
  *
393
393
  * export default githubChannel({
394
394
  * botName: "my-agent",
@@ -2,7 +2,7 @@
2
2
  * GitHub webhook channel pack for agent-serve (Eve-compatible dispatch).
3
3
  *
4
4
  * ```ts
5
- * import { defaultGitHubAuth, githubChannel } from "@anysphere/agent-serve/channels/github";
5
+ * import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
6
6
  *
7
7
  * export default githubChannel({
8
8
  * botName: "my-agent",
@@ -2,7 +2,7 @@
2
2
  * Slack platform channel pack for agent-serve.
3
3
  *
4
4
  * ```ts
5
- * import { slackChannel } from "@anysphere/agent-serve/channels/slack";
5
+ * import { slackChannel } from "@cursor/july/channels/slack";
6
6
  *
7
7
  * // Single agent: SLACK_BOT_TOKEN + SLACK_APP_TOKEN
8
8
  * export default slackChannel();
@@ -4,6 +4,7 @@
4
4
 
5
5
  import { mkdir, writeFile } from "node:fs/promises";
6
6
  import { basename, join, resolve } from "node:path";
7
+ import { PACKAGE_NAME } from "../../internal/distribution.js";
7
8
  import { envPrefixFromName, slackEnvKeys } from "./credentials.js";
8
9
  import { buildSlackManifestPair } from "./manifest.js";
9
10
 
@@ -59,7 +60,7 @@ export async function initSlackChannel(
59
60
 
60
61
  await write(
61
62
  "agent/channels/slack.ts",
62
- `import { slackChannel } from "@anysphere/agent-serve/channels/slack";
63
+ `import { slackChannel } from "${PACKAGE_NAME}/channels/slack";
63
64
 
64
65
  /**
65
66
  * Slack channel (Socket Mode).