@cursor/july 0.1.112 → 0.1.114

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 (305) hide show
  1. package/README.md +4 -0
  2. package/dist/bin/agent-serve.js +2 -3
  3. package/dist/channels/checks.d.ts +10 -0
  4. package/dist/channels/checks.d.ts.map +1 -1
  5. package/dist/channels/origin/checks.d.ts +1 -1
  6. package/dist/channels/origin/checks.d.ts.map +1 -1
  7. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  8. package/dist/channels/slack/dispatch.js +6 -2
  9. package/dist/docs/404.html +2 -2
  10. package/dist/docs/assets/{app.DxTdhphC.js → app.BqkJwOZ-.js} +4 -4
  11. package/dist/docs/assets/chunks/@localSearchIndexroot.BnSgidYE.js +1 -0
  12. package/dist/docs/assets/chunks/{VPLocalSearchBox.CR3KTF0X.js → VPLocalSearchBox.BJAi2KiV.js} +1 -1
  13. package/dist/docs/assets/chunks/{arc.CVVqBOdS.js → arc.BZpXTgvV.js} +1 -1
  14. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CJHGP4ki.js → architectureDiagram-Q4EWVU46.WYI-7F-Y.js} +1 -1
  15. package/dist/docs/assets/chunks/{baseUniq.r7UVVRBP.js → baseUniq.CZaUPpg0.js} +1 -1
  16. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.DKmMaTre.js → blockDiagram-DXYQGD6D.D6UES2pD.js} +1 -1
  17. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DDJsntUO.js → c4Diagram-AHTNJAMY.cwebIe4i.js} +1 -1
  18. package/dist/docs/assets/chunks/channel.DdM5EfNW.js +1 -0
  19. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.BK2rKt6W.js → chunk-4BX2VUAB.fVyFnjxg.js} +1 -1
  20. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DRLV8RnF.js → chunk-4TB4RGXK.BanufG1c.js} +1 -1
  21. package/dist/docs/assets/chunks/{chunk-55IACEB6.DaKjxtb7.js → chunk-55IACEB6.VaSMz5-2.js} +1 -1
  22. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.C5sPCIT1.js → chunk-EDXVE4YY.CN2diZOM.js} +1 -1
  23. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CSGWyNTB.js → chunk-FMBD7UC4.g4ivypu3.js} +1 -1
  24. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.D5tK9XEr.js → chunk-OYMX7WX6.GZXKn9JJ.js} +1 -1
  25. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BeZGd1UZ.js → chunk-QZHKN3VN.itXxJZCd.js} +1 -1
  26. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.U_tfWwQR.js → chunk-YZCP3GAM.-rw2GfvX.js} +1 -1
  27. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CjfGHeg2.js +1 -0
  28. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CjfGHeg2.js +1 -0
  29. package/dist/docs/assets/chunks/clone.wSOICb_f.js +1 -0
  30. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DVeRXIb6.js → cose-bilkent-S5V4N54A.CmaI5br0.js} +1 -1
  31. package/dist/docs/assets/chunks/{dagre-KV5264BT.BpKJAeRZ.js → dagre-KV5264BT.4wY9S4Kt.js} +1 -1
  32. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.BQOtrd1Z.js → diagram-5BDNPKRD.Pc3c0u9W.js} +1 -1
  33. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.CSDAhjPI.js → diagram-G4DWMVQ6.CYrWz-nj.js} +1 -1
  34. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Dpztst2S.js → diagram-MMDJMWI5.Bgj5hukb.js} +1 -1
  35. package/dist/docs/assets/chunks/{diagram-TYMM5635.qJHRizHR.js → diagram-TYMM5635.DGMEXalS.js} +1 -1
  36. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.vbDotH3l.js → erDiagram-SMLLAGMA.GepTV9Im.js} +1 -1
  37. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.CqS_ZQr4.js → flowDiagram-DWJPFMVM.DVKywg3j.js} +1 -1
  38. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DTLdR4pN.js → ganttDiagram-T4ZO3ILL.C7qt9Mlo.js} +1 -1
  39. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.D04lnbnr.js → gitGraphDiagram-UUTBAWPF.U30_r82P.js} +1 -1
  40. package/dist/docs/assets/chunks/{graph.BlfqLJsM.js → graph.CyyMyAWv.js} +1 -1
  41. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.tAooImWA.js → infoDiagram-42DDH7IO.Dn9ACW3y.js} +1 -1
  42. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js → ishikawaDiagram-UXIWVN3A.DlIdIGOA.js} +1 -1
  43. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.C3tUgyCg.js → journeyDiagram-VCZTEJTY.DZj4vy4E.js} +1 -1
  44. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CtD9-QCe.js → kanban-definition-6JOO6SKY.Dl63eMUV.js} +1 -1
  45. package/dist/docs/assets/chunks/{layout.D38U-LnT.js → layout.BLHZLWPH.js} +1 -1
  46. package/dist/docs/assets/chunks/{linear.BJmssyhN.js → linear.aXKGKaNw.js} +1 -1
  47. package/dist/docs/assets/chunks/{min.DNgXoouU.js → min.zWnFcpcc.js} +1 -1
  48. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.Dcp6cxeu.js → mindmap-definition-QFDTVHPH.Qs4MQBea.js} +1 -1
  49. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CLDw6zIs.js → pieDiagram-DEJITSTG.BmPHgsk7.js} +1 -1
  50. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CYaeeY4c.js → quadrantDiagram-34T5L4WZ.D5MQ3gwA.js} +1 -1
  51. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.gMYuRpq2.js → requirementDiagram-MS252O5E.CkdUFrO7.js} +1 -1
  52. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CZqyHFbc.js → sankeyDiagram-XADWPNL6.KZrljrAV.js} +1 -1
  53. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BTsCjUDN.js → sequenceDiagram-FGHM5R23.XMoEW-Lx.js} +1 -1
  54. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.CftT9mLJ.js → stateDiagram-FHFEXIEX.BmTzePLj.js} +1 -1
  55. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.Cu5X28zZ.js +1 -0
  56. package/dist/docs/assets/chunks/{theme.B_7J9ZsV.js → theme.BfQzpxsg.js} +2 -2
  57. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.DbU3WUNw.js → timeline-definition-GMOUNBTQ.Dug0oamp.js} +1 -1
  58. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.ixsq-q2u.js → vennDiagram-DHZGUBPP.BOTHrEFu.js} +1 -1
  59. package/dist/docs/assets/chunks/wardley-RL74JXVD.DXy2i1LS.js +162 -0
  60. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.C0ewvgbp.js → wardleyDiagram-NUSXRM2D.CoXKdfi6.js} +1 -1
  61. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.nAEhF4bO.js → xychartDiagram-5P7HB3ND.DXoSCjAW.js} +1 -1
  62. package/dist/docs/assets/{deployment.md.D2jQZuFx.js → deployment.md.D2YX7u_I.js} +1 -1
  63. package/dist/docs/assets/{evals.md.BYvfZ-PO.js → evals.md.D3Y3Aixt.js} +2 -2
  64. package/dist/docs/assets/{evals.md.BYvfZ-PO.lean.js → evals.md.D3Y3Aixt.lean.js} +1 -1
  65. package/dist/docs/assets/guides_agent-to-agent.md.C6kPY8nu.js +41 -0
  66. package/dist/docs/assets/guides_agent-to-agent.md.C6kPY8nu.lean.js +1 -0
  67. package/dist/docs/assets/{guides_cloud-agents.md.Cp1O3u-X.js → guides_cloud-agents.md.BPJqTZjT.js} +1 -1
  68. package/dist/docs/assets/{guides_grokbot-agents.md.CMhZNdEU.js → guides_grokbot-agents.md.CzV715v8.js} +1 -1
  69. package/dist/docs/assets/guides_hooks.md.BT9GLwEp.js +50 -0
  70. package/dist/docs/assets/guides_hooks.md.BT9GLwEp.lean.js +1 -0
  71. package/dist/docs/assets/guides_jev.md.DeSCqMaO.js +151 -0
  72. package/dist/docs/assets/guides_jev.md.DeSCqMaO.lean.js +1 -0
  73. package/dist/docs/assets/reference_agent-config.md.BRxAlnRy.js +36 -0
  74. package/dist/docs/assets/{reference_agent-config.md.DGPyw7ms.lean.js → reference_agent-config.md.BRxAlnRy.lean.js} +1 -1
  75. package/dist/docs/assets/reference_artifacts.md.KRX0sAdt.js +18 -0
  76. package/dist/docs/assets/reference_artifacts.md.KRX0sAdt.lean.js +1 -0
  77. package/dist/docs/assets/reference_channels.md.DZr14vm7.js +23 -0
  78. package/dist/docs/assets/reference_channels.md.DZr14vm7.lean.js +1 -0
  79. package/dist/docs/assets/{reference_connections.md.CmyrlXfY.js → reference_connections.md.DJGUCxrr.js} +18 -30
  80. package/dist/docs/assets/{reference_connections.md.CmyrlXfY.lean.js → reference_connections.md.DJGUCxrr.lean.js} +1 -1
  81. package/dist/docs/assets/{reference_evals.md.DNJzM_yf.js → reference_evals.md.C6umwNC6.js} +6 -7
  82. package/dist/docs/assets/reference_evals.md.C6umwNC6.lean.js +1 -0
  83. package/dist/docs/assets/{reference_extensions.md.Ceq-qT8d.js → reference_extensions.md.DbNYu-DP.js} +3 -3
  84. package/dist/docs/assets/{reference_extensions.md.Ceq-qT8d.lean.js → reference_extensions.md.DbNYu-DP.lean.js} +1 -1
  85. package/dist/docs/assets/reference_hooks.md.BfOkhTU0.js +45 -0
  86. package/dist/docs/assets/{reference_hooks.md.B7uzNENk.lean.js → reference_hooks.md.BfOkhTU0.lean.js} +1 -1
  87. package/dist/docs/assets/reference_http-api.md.DdwtBeCj.js +11 -0
  88. package/dist/docs/assets/{reference_http-api.md.CduHavZ2.lean.js → reference_http-api.md.DdwtBeCj.lean.js} +1 -1
  89. package/dist/docs/assets/reference_instructions.md.B2mcIzT6.js +14 -0
  90. package/dist/docs/assets/reference_instructions.md.B2mcIzT6.lean.js +1 -0
  91. package/dist/docs/assets/reference_playground.md.CyrQD_n3.js +1 -0
  92. package/dist/docs/assets/reference_playground.md.CyrQD_n3.lean.js +1 -0
  93. package/dist/docs/assets/reference_project-layout.md.BEMzxAkq.js +19 -0
  94. package/dist/docs/assets/{reference_project-layout.md.BGhgpy9V.lean.js → reference_project-layout.md.BEMzxAkq.lean.js} +1 -1
  95. package/dist/docs/assets/reference_prompt.md.BFrqjHFL.js +9 -0
  96. package/dist/docs/assets/reference_prompt.md.BFrqjHFL.lean.js +1 -0
  97. package/dist/docs/assets/reference_schedules.md.BB9N3tRR.js +47 -0
  98. package/dist/docs/assets/reference_schedules.md.BB9N3tRR.lean.js +1 -0
  99. package/dist/docs/assets/reference_sessions.md.BBp-GIt-.js +1 -0
  100. package/dist/docs/assets/{reference_sessions.md.1_6Vyv7x.lean.js → reference_sessions.md.BBp-GIt-.lean.js} +1 -1
  101. package/dist/docs/assets/reference_skills.md.BVmi3UJ_.js +15 -0
  102. package/dist/docs/assets/{reference_skills.md.DjQkRefx.lean.js → reference_skills.md.BVmi3UJ_.lean.js} +1 -1
  103. package/dist/docs/assets/reference_subagents.md.DRoRy2Uj.js +10 -0
  104. package/dist/docs/assets/{reference_subagents.md.BHsSMMyO.lean.js → reference_subagents.md.DRoRy2Uj.lean.js} +1 -1
  105. package/dist/docs/assets/{reference_tools.md.BYzUTeVA.js → reference_tools.md.CgocLDX1.js} +10 -7
  106. package/dist/docs/assets/{reference_tools.md.BYzUTeVA.lean.js → reference_tools.md.CgocLDX1.lean.js} +1 -1
  107. package/dist/docs/assets/troubleshooting.md.HY95rCCz.js +1 -0
  108. package/dist/docs/building-with-agents.html +35 -35
  109. package/dist/docs/deployment.html +37 -37
  110. package/dist/docs/deployment.md +1 -1
  111. package/dist/docs/evals.html +36 -36
  112. package/dist/docs/evals.md +3 -0
  113. package/dist/docs/guides/agent-to-agent.html +65 -54
  114. package/dist/docs/guides/agent-to-agent.md +73 -69
  115. package/dist/docs/guides/bitbucket.html +35 -35
  116. package/dist/docs/guides/cloud-agents.html +36 -36
  117. package/dist/docs/guides/cloud-agents.md +1 -1
  118. package/dist/docs/guides/convert-automation.html +35 -35
  119. package/dist/docs/guides/github.html +35 -35
  120. package/dist/docs/guides/gitlab.html +35 -35
  121. package/dist/docs/guides/grokbot-agents.html +37 -37
  122. package/dist/docs/guides/grokbot-agents.md +1 -1
  123. package/dist/docs/guides/hooks.html +109 -0
  124. package/dist/docs/guides/hooks.md +111 -0
  125. package/dist/docs/guides/improve.html +36 -36
  126. package/dist/docs/guides/jev.html +210 -0
  127. package/dist/docs/guides/jev.md +291 -0
  128. package/dist/docs/guides/mcp-oauth.html +36 -36
  129. package/dist/docs/guides/opentelemetry.html +35 -35
  130. package/dist/docs/guides/slack.html +35 -35
  131. package/dist/docs/guides/webhooks.html +35 -35
  132. package/dist/docs/hashmap.json +1 -1
  133. package/dist/docs/hillclimbing.html +35 -35
  134. package/dist/docs/index.html +35 -35
  135. package/dist/docs/llms-full.txt +1338 -1282
  136. package/dist/docs/llms.txt +9 -7
  137. package/dist/docs/quickstart.html +35 -35
  138. package/dist/docs/reference/agent-config.html +42 -46
  139. package/dist/docs/reference/agent-config.md +48 -81
  140. package/dist/docs/reference/artifacts.html +39 -40
  141. package/dist/docs/reference/artifacts.md +71 -70
  142. package/dist/docs/reference/channels.html +41 -61
  143. package/dist/docs/reference/channels.md +134 -201
  144. package/dist/docs/reference/cli.html +35 -35
  145. package/dist/docs/reference/connections.html +54 -66
  146. package/dist/docs/reference/connections.md +98 -134
  147. package/dist/docs/reference/evals.html +42 -43
  148. package/dist/docs/reference/evals.md +42 -50
  149. package/dist/docs/reference/extensions.html +39 -39
  150. package/dist/docs/reference/extensions.md +10 -13
  151. package/dist/docs/reference/hooks.html +39 -67
  152. package/dist/docs/reference/hooks.md +72 -146
  153. package/dist/docs/reference/http-api.html +39 -39
  154. package/dist/docs/reference/http-api.md +137 -161
  155. package/dist/docs/reference/instructions.html +39 -39
  156. package/dist/docs/reference/instructions.md +21 -36
  157. package/dist/docs/reference/playground.html +36 -36
  158. package/dist/docs/reference/playground.md +26 -43
  159. package/dist/docs/reference/project-layout.html +38 -38
  160. package/dist/docs/reference/project-layout.md +12 -17
  161. package/dist/docs/reference/prompt.html +42 -42
  162. package/dist/docs/reference/prompt.md +18 -13
  163. package/dist/docs/reference/schedules.html +56 -91
  164. package/dist/docs/reference/schedules.md +52 -99
  165. package/dist/docs/reference/sessions.html +36 -36
  166. package/dist/docs/reference/sessions.md +36 -40
  167. package/dist/docs/reference/skills.html +38 -38
  168. package/dist/docs/reference/skills.md +15 -26
  169. package/dist/docs/reference/subagents.html +38 -38
  170. package/dist/docs/reference/subagents.md +21 -31
  171. package/dist/docs/reference/tools.html +45 -42
  172. package/dist/docs/reference/tools.md +49 -64
  173. package/dist/docs/templates/agentic-owners.html +35 -35
  174. package/dist/docs/templates/pr-autofixer.html +35 -35
  175. package/dist/docs/templates/security-reviewer.html +35 -35
  176. package/dist/docs/templates/thermo-quality-review.html +35 -35
  177. package/dist/docs/templates/thermo-review.html +35 -35
  178. package/dist/docs/templates/triage.html +35 -35
  179. package/dist/docs/troubleshooting.html +36 -36
  180. package/dist/docs/troubleshooting.md +1 -1
  181. package/dist/extensions/jev/extension.d.ts +43 -0
  182. package/dist/extensions/jev/extension.d.ts.map +1 -0
  183. package/dist/extensions/jev/extension.js +47 -0
  184. package/dist/extensions/jev/lib/evaluate.d.ts +101 -0
  185. package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
  186. package/dist/extensions/jev/lib/evaluate.js +167 -0
  187. package/dist/extensions/jev/skills/gated-write.md +25 -0
  188. package/dist/extensions/jev/skills/questions.md +33 -0
  189. package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
  190. package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
  191. package/dist/extensions/jev/tools/evaluate.js +88 -0
  192. package/dist/extensions.d.ts +1 -1
  193. package/dist/extensions.d.ts.map +1 -1
  194. package/dist/extensions.js +2 -0
  195. package/dist/internal/advertise-tools.d.ts.map +1 -1
  196. package/dist/internal/advertise-tools.js +6 -0
  197. package/dist/internal/discovery/connections.d.ts.map +1 -1
  198. package/dist/internal/discovery/connections.js +18 -0
  199. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  200. package/dist/internal/discovery/extensions.js +8 -4
  201. package/dist/internal/discovery/info.d.ts.map +1 -1
  202. package/dist/internal/discovery/info.js +1 -0
  203. package/dist/internal/hosted-delivery-protocol.d.ts +3 -0
  204. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  205. package/dist/internal/hosted-delivery-protocol.js +1 -0
  206. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  207. package/dist/internal/hosted-delivery.js +15 -25
  208. package/dist/internal/hosted-execution-diag.d.ts +12 -4
  209. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  210. package/dist/internal/hosted-execution-diag.js +26 -4
  211. package/dist/internal/hosted-execution-flush.d.ts +1 -0
  212. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  213. package/dist/internal/hosted-execution-flush.js +4 -2
  214. package/dist/internal/server.d.ts.map +1 -1
  215. package/dist/internal/server.js +17 -9
  216. package/dist/internal/session-engine.d.ts +4 -1
  217. package/dist/internal/session-engine.d.ts.map +1 -1
  218. package/dist/internal/session-engine.js +28 -4
  219. package/dist/playground/assets/index-C61EWMBK.css +1 -0
  220. package/dist/playground/assets/{index-B1c1LeIf.js → index-CrMWlgUU.js} +43 -43
  221. package/dist/playground/index.html +2 -2
  222. package/dist/types.d.ts +23 -3
  223. package/dist/types.d.ts.map +1 -1
  224. package/docs/deployment.md +1 -1
  225. package/docs/evals.md +3 -0
  226. package/docs/guides/agent-to-agent.md +74 -70
  227. package/docs/guides/cloud-agents.md +1 -1
  228. package/docs/guides/grokbot-agents.md +1 -1
  229. package/docs/guides/hooks.md +116 -0
  230. package/docs/guides/jev.md +296 -0
  231. package/docs/reference/agent-config.md +48 -81
  232. package/docs/reference/artifacts.md +72 -71
  233. package/docs/reference/channels.md +135 -202
  234. package/docs/reference/connections.md +99 -135
  235. package/docs/reference/evals.md +43 -51
  236. package/docs/reference/extensions.md +10 -13
  237. package/docs/reference/hooks.md +72 -146
  238. package/docs/reference/http-api.md +137 -161
  239. package/docs/reference/instructions.md +22 -37
  240. package/docs/reference/playground.md +26 -43
  241. package/docs/reference/project-layout.md +12 -17
  242. package/docs/reference/prompt.md +20 -15
  243. package/docs/reference/schedules.md +52 -99
  244. package/docs/reference/sessions.md +36 -40
  245. package/docs/reference/skills.md +15 -26
  246. package/docs/reference/subagents.md +21 -31
  247. package/docs/reference/tools.md +49 -64
  248. package/docs/troubleshooting.md +1 -1
  249. package/package.json +8 -1
  250. package/src/bin/agent-serve.ts +2 -3
  251. package/src/channels/checks.ts +8 -0
  252. package/src/channels/origin/checks.ts +3 -1
  253. package/src/channels/slack/dispatch.ts +7 -2
  254. package/src/extensions/jev/extension.ts +95 -0
  255. package/src/extensions/jev/lib/evaluate.ts +289 -0
  256. package/src/extensions/jev/skills/gated-write.md +25 -0
  257. package/src/extensions/jev/skills/questions.md +33 -0
  258. package/src/extensions/jev/tools/evaluate.ts +90 -0
  259. package/src/extensions.ts +2 -0
  260. package/src/internal/advertise-tools.ts +6 -0
  261. package/src/internal/discovery/connections.ts +21 -0
  262. package/src/internal/discovery/extensions.ts +12 -4
  263. package/src/internal/discovery/info.ts +1 -0
  264. package/src/internal/hosted-delivery-protocol.ts +4 -0
  265. package/src/internal/hosted-delivery.ts +15 -0
  266. package/src/internal/hosted-execution-diag.ts +33 -4
  267. package/src/internal/hosted-execution-flush.ts +4 -0
  268. package/src/internal/server.ts +26 -12
  269. package/src/internal/session-engine.ts +30 -4
  270. package/src/types.ts +24 -3
  271. package/dist/docs/assets/chunks/@localSearchIndexroot.QmjDU6Jh.js +0 -1
  272. package/dist/docs/assets/chunks/channel.BjpoSbz_.js +0 -1
  273. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +0 -1
  274. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +0 -1
  275. package/dist/docs/assets/chunks/clone.DRuGBKZC.js +0 -1
  276. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +0 -1
  277. package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +0 -162
  278. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +0 -30
  279. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +0 -1
  280. package/dist/docs/assets/reference_agent-config.md.DGPyw7ms.js +0 -40
  281. package/dist/docs/assets/reference_artifacts.md.Bu_4HmsD.js +0 -19
  282. package/dist/docs/assets/reference_artifacts.md.Bu_4HmsD.lean.js +0 -1
  283. package/dist/docs/assets/reference_channels.md.nFWbzAic.js +0 -43
  284. package/dist/docs/assets/reference_channels.md.nFWbzAic.lean.js +0 -1
  285. package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +0 -1
  286. package/dist/docs/assets/reference_hooks.md.B7uzNENk.js +0 -73
  287. package/dist/docs/assets/reference_http-api.md.CduHavZ2.js +0 -11
  288. package/dist/docs/assets/reference_instructions.md.CU1My5My.js +0 -14
  289. package/dist/docs/assets/reference_instructions.md.CU1My5My.lean.js +0 -1
  290. package/dist/docs/assets/reference_playground.md.Ch2d0Iqi.js +0 -1
  291. package/dist/docs/assets/reference_playground.md.Ch2d0Iqi.lean.js +0 -1
  292. package/dist/docs/assets/reference_project-layout.md.BGhgpy9V.js +0 -19
  293. package/dist/docs/assets/reference_prompt.md.Ccp0R53H.js +0 -1
  294. package/dist/docs/assets/reference_prompt.md.Ccp0R53H.lean.js +0 -1
  295. package/dist/docs/assets/reference_schedules.md.B2Nm6FaD.js +0 -82
  296. package/dist/docs/assets/reference_schedules.md.B2Nm6FaD.lean.js +0 -1
  297. package/dist/docs/assets/reference_sessions.md.1_6Vyv7x.js +0 -1
  298. package/dist/docs/assets/reference_skills.md.DjQkRefx.js +0 -15
  299. package/dist/docs/assets/reference_subagents.md.BHsSMMyO.js +0 -10
  300. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +0 -1
  301. package/dist/playground/assets/index-CK2LX3iD.css +0 -1
  302. /package/dist/docs/assets/{deployment.md.D2jQZuFx.lean.js → deployment.md.D2YX7u_I.lean.js} +0 -0
  303. /package/dist/docs/assets/{guides_cloud-agents.md.Cp1O3u-X.lean.js → guides_cloud-agents.md.BPJqTZjT.lean.js} +0 -0
  304. /package/dist/docs/assets/{guides_grokbot-agents.md.CMhZNdEU.lean.js → guides_grokbot-agents.md.CzV715v8.lean.js} +0 -0
  305. /package/dist/docs/assets/{troubleshooting.md.mnfFG2Em.lean.js → troubleshooting.md.HY95rCCz.lean.js} +0 -0
@@ -0,0 +1,116 @@
1
+ ---
2
+ title: "Hooks"
3
+ description: "Observe session events for metrics, alerts, and other side effects without changing the turn."
4
+ ---
5
+
6
+ # Hooks
7
+
8
+ Hooks observe session events after they are recorded and run side effects such
9
+ as updating metrics or sending alerts. They never change the turn, prompt, or
10
+ reply. Author them under `agent/hooks/` with `defineHook` from
11
+ `@cursor/july/hooks`.
12
+
13
+ ## Meter token usage
14
+
15
+ With [OpenTelemetry](./opentelemetry.md) configured, this hook adds a live
16
+ turn's reported input and output tokens to your counters. Eval runs stay quiet,
17
+ so the dashboard reflects live traffic instead of the test suite.
18
+
19
+ ```ts
20
+ // agent/hooks/usage.ts
21
+ import { defineHook } from "@cursor/july/hooks";
22
+
23
+ export default defineHook({
24
+ events: {
25
+ async "turn.completed"(event, ctx) {
26
+ if (ctx.session.purpose === "eval") {
27
+ return;
28
+ }
29
+ if (event.data.usage === undefined) {
30
+ return;
31
+ }
32
+
33
+ const { inputTokens, outputTokens } = event.data.usage;
34
+ ctx.host.otel.increment("acme.tokens.input", inputTokens);
35
+ ctx.host.otel.increment("acme.tokens.output", outputTokens);
36
+ },
37
+ },
38
+ });
39
+ ```
40
+
41
+ ## Alert on failure
42
+
43
+ Set `PAGER_WEBHOOK_URL` to your pager's webhook. When a live turn fails, this
44
+ hook posts the agent, session, and failure message there. Eval runs and
45
+ interrupted turns stay quiet, so tests and preemptions do not page anyone.
46
+
47
+ ```ts
48
+ // agent/hooks/page-on-failure.ts
49
+ import { defineHook } from "@cursor/july/hooks";
50
+
51
+ export default defineHook({
52
+ events: {
53
+ async "turn.failed"(event, ctx) {
54
+ if (ctx.session.purpose === "eval") {
55
+ return;
56
+ }
57
+ if (event.data.message === "turn interrupted") {
58
+ return;
59
+ }
60
+
61
+ const pagerUrl = process.env.PAGER_WEBHOOK_URL;
62
+ if (pagerUrl === undefined) {
63
+ return;
64
+ }
65
+
66
+ await fetch(pagerUrl, {
67
+ method: "POST",
68
+ headers: { "content-type": "application/json" },
69
+ body: JSON.stringify({
70
+ agent: ctx.agent.name,
71
+ session: ctx.session.id,
72
+ channel: ctx.channel.id,
73
+ message: event.data.message,
74
+ }),
75
+ signal: AbortSignal.timeout(5_000),
76
+ });
77
+ },
78
+ },
79
+ });
80
+ ```
81
+
82
+ ## Events / when hooks run
83
+
84
+ Use event names from the
85
+ [session event vocabulary](../reference/sessions.md#stream-events). A hook
86
+ receives each matching event after it is recorded, and the model does not wait
87
+ for the handler.
88
+
89
+ Within one session, handlers run one at a time. A slow handler delays later
90
+ handlers for that session, but it does not delay the model or handlers for
91
+ other sessions. Hooks also fire for evals, so check
92
+ `ctx.session.purpose === "eval"` before metering or paging. A restart does not
93
+ replay recorded events into hooks.
94
+
95
+ ## When not to use a hook
96
+
97
+ | Want | Use instead |
98
+ | --- | --- |
99
+ | Add context before the model | `instructions.md`, skills, or `workspaceFiles` |
100
+ | Deliver to Slack or a PR | Channel [`events`](../reference/channels.md#events) or packs |
101
+ | Block or approve a tool | [`needsApproval`](../reference/tools.md#gate-a-tool-on-human-approval) |
102
+ | Gate final assistant text | `defineResult` |
103
+ | Gate behavior | [Evals](../evals.md) |
104
+
105
+ [Cursor Agent hooks](https://cursor.com/docs/agent/hooks) in
106
+ `.cursor/hooks.json` are a different product. They can observe, block, or
107
+ modify the local agent loop.
108
+
109
+ ## Related
110
+
111
+ - [Hooks reference](../reference/hooks.md): payloads, context, and discovery
112
+ - [Sessions: stream events](../reference/sessions.md#stream-events): event
113
+ vocabulary and payload sequence
114
+ - [OpenTelemetry](./opentelemetry.md): export traces and custom metrics
115
+ - [Channels: events](../reference/channels.md#events): deliver replies back to
116
+ Slack, source control, or another surface
@@ -0,0 +1,296 @@
1
+ ---
2
+ title: "Jev"
3
+ description: "Use typed Jev decisions to filter findings, route pull requests, and gate review actions."
4
+ ---
5
+
6
+ # Use Jev in review tools
7
+
8
+ Use Jev when a review workflow needs a typed decision instead of prose.
9
+ A review agent can filter speculative findings, classify pull request
10
+ risk, choose a reviewer, or decide whether a merge needs a documentation
11
+ follow-up. Jev returns a choice, score, or probability; your TypeScript
12
+ decides what happens next.
13
+
14
+ Set `TYPESAFE_API_KEY`. The default model is `jev-latest`.
15
+
16
+ ```ts
17
+ // agent/extensions/jev.ts
18
+ import jev from "@cursor/july/extensions/jev";
19
+
20
+ export default jev();
21
+ ```
22
+
23
+ ## Start only the review turns you need
24
+
25
+ Call Jev from a channel hook before a model turn starts. When a pull
26
+ request opens or becomes ready for review, this hook sends its title,
27
+ body, labels, and filenames to Jev to decide whether the change needs
28
+ security review. A result that clears the threshold starts the review
29
+ turn; otherwise, the hook returns `null`, so the agent doesn't run or
30
+ post to GitHub.
31
+
32
+ ```ts
33
+ // agent/channels/github.ts
34
+ import {
35
+ defaultGitHubAuth,
36
+ githubChannel,
37
+ } from "@cursor/july/channels/github";
38
+ import { above, decide } from "@cursor/july/extensions/jev";
39
+
40
+ export default githubChannel({
41
+ botName: "security-reviewer",
42
+ cursorAccount: { repos: ["acme/checkout"] },
43
+ onPullRequest: async (ctx, pr) => {
44
+ if (pr.action !== "opened" && pr.action !== "ready_for_review") {
45
+ return null;
46
+ }
47
+
48
+ const octokit = await ctx.github.getOctokit();
49
+ const [{ data }, files] = await Promise.all([
50
+ octokit.rest.pulls.get({
51
+ owner: ctx.repository.owner,
52
+ repo: ctx.repository.name,
53
+ pull_number: pr.number,
54
+ }),
55
+ octokit.paginate(octokit.rest.pulls.listFiles, {
56
+ owner: ctx.repository.owner,
57
+ repo: ctx.repository.name,
58
+ pull_number: pr.number,
59
+ }),
60
+ ]);
61
+ const answers = await decide({
62
+ state: {
63
+ title: data.title,
64
+ body: data.body,
65
+ labels: data.labels.map(label => label.name),
66
+ files: files.map(file => file.filename),
67
+ },
68
+ questions: {
69
+ review: {
70
+ type: "boolean",
71
+ instructions:
72
+ "Does this change need security review? Answer yes for auth, permissions, secrets, request parsing, or external inputs.",
73
+ },
74
+ },
75
+ });
76
+
77
+ if (!above(answers.review, 0.8)) {
78
+ return null;
79
+ }
80
+ // `auth` starts a model turn running as the pull request sender.
81
+ return { auth: defaultGitHubAuth(ctx) };
82
+ },
83
+ });
84
+ ```
85
+
86
+ Jev receives only the pull request metadata shown here, not the diff.
87
+
88
+ ## Filter findings before you post them
89
+
90
+ Let the chat model draft a finding, then ask Jev whether the finding is
91
+ a real bug in the new code. Below your threshold, the tool returns and
92
+ the author never sees the draft. Above it, the finding becomes a review
93
+ comment.
94
+
95
+ ```ts
96
+ // agent/tools/post_finding.ts
97
+ import { parseGitHubPrContinuationKey } from "@cursor/july/channels/github";
98
+ import { above, decide } from "@cursor/july/extensions/jev";
99
+ import { defineTool } from "@cursor/july/tools";
100
+ import { z } from "zod";
101
+
102
+ export default defineTool({
103
+ description:
104
+ "Post one security finding on this session's pull request. Call once. Hold when it is not a real bug.",
105
+ inputSchema: z.object({
106
+ title: z.string(),
107
+ summary: z.string().describe("What the pull request changes."),
108
+ draft: z.string().describe("The finding to post, one or two sentences."),
109
+ }),
110
+ async execute({ title, summary, draft }, ctx) {
111
+ if (ctx.session.purpose === "eval") {
112
+ return { posted: false, reason: "eval" };
113
+ }
114
+
115
+ const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
116
+ if (ref === undefined) {
117
+ throw new Error("post_finding requires a GitHub pull request session");
118
+ }
119
+
120
+ const answers = await decide({
121
+ state: { title, summary, draft },
122
+ questions: {
123
+ real: {
124
+ type: "boolean",
125
+ instructions:
126
+ "Is the draft an exploitable bug in the new code, not a style note or a hypothetical?",
127
+ },
128
+ },
129
+ });
130
+
131
+ if (!above(answers.real, 0.85)) {
132
+ return { posted: false, reason: "clean" };
133
+ }
134
+
135
+ const octokit = await ctx.host.github.getOctokit();
136
+ await octokit.rest.pulls.createReview({
137
+ owner: ref.owner,
138
+ repo: ref.repo,
139
+ pull_number: ref.number,
140
+ event: "COMMENT",
141
+ body: draft,
142
+ });
143
+ return {
144
+ posted: true,
145
+ pr: `${ref.owner}/${ref.repo}#${ref.number}`,
146
+ };
147
+ },
148
+ });
149
+ ```
150
+
151
+ ## Approve changes by risk tier
152
+
153
+ You can use the same pattern for Agentic Owners. Ask Jev to put the
154
+ pull request in a closed set of risk tiers. Approve only a confident
155
+ `very-low` or `low`; send everything else to a person.
156
+
157
+ ```ts
158
+ import { decide, needsHuman } from "@cursor/july/extensions/jev";
159
+
160
+ const answers = await decide({
161
+ state: { title, summary },
162
+ questions: {
163
+ risk: {
164
+ type: "choice",
165
+ instructions: "What risk tier is this pull request?",
166
+ criteria: {
167
+ "very-low": "docs, formatting, or a mechanical rename",
168
+ low: "a local change with tests and no new trust boundary",
169
+ medium: "auth, billing, or a behavior change callers depend on",
170
+ high: "a likely exploit, data loss, or a broken public contract",
171
+ },
172
+ },
173
+ },
174
+ });
175
+
176
+ const tier = answers.risk.choice;
177
+ if (needsHuman(answers.risk) || tier === "medium" || tier === "high") {
178
+ return { verdict: "hold", tier };
179
+ }
180
+ return { verdict: "approve", tier };
181
+ ```
182
+
183
+ Your GitHub tool resolves the pull request from `ctx.session` and posts
184
+ that verdict. The model does not choose the repository, pull request, or
185
+ approval event.
186
+
187
+ ## Open documentation follow-ups selectively
188
+
189
+ After a pull request merges, a code-wiki agent can ask whether the
190
+ change introduced a durable fact that belongs in the docs. A low
191
+ probability skips the follow-up, while a high probability opens a
192
+ documentation pull request.
193
+
194
+ ```ts
195
+ import { above, decide } from "@cursor/july/extensions/jev";
196
+ import { openDocsPullRequest } from "../lib/wiki";
197
+
198
+ const answers = await decide({
199
+ state: { title, summary },
200
+ questions: {
201
+ updateDocs: {
202
+ type: "boolean",
203
+ instructions:
204
+ "Does this merge change a durable contract that the project docs should explain?",
205
+ },
206
+ },
207
+ });
208
+
209
+ if (!above(answers.updateDocs, 0.8)) {
210
+ return { action: "skip" };
211
+ }
212
+ return openDocsPullRequest({ title, summary });
213
+ ```
214
+
215
+ ## Write tools with Jev
216
+
217
+ Call `decide` from a channel hook, server tool, or router when you want
218
+ the answer map directly. Use `evaluate` when you want `{ answers }`.
219
+
220
+ Use a boolean for a yes-or-no gate, a choice for a closed set such as
221
+ risk tiers or owners, and a score for an ordered rubric. `above` returns
222
+ `true` when a boolean probability or score meets the threshold.
223
+ `needsHuman` returns `true` when a boolean probability or the selected
224
+ choice's probability falls below the confidence threshold.
225
+
226
+ Keep the questions atomic and combine them in TypeScript. For example,
227
+ ask separately whether a finding is real, whether its impact is
228
+ user-visible, and whether the changed line is new. Your code owns the
229
+ rule that decides whether all three are enough to post.
230
+
231
+ ## Let the agent ask Jev
232
+
233
+ Mounting the extension adds a read-only harness tool named
234
+ `<namespace>__evaluate`. With the `agent/extensions/jev.ts` mount shown
235
+ earlier, the model sees `jev__evaluate`.
236
+
237
+ The tool accepts one state and a list of boolean, choice, or score
238
+ questions. It returns `{ answers }` and never posts, approves, or opens
239
+ a pull request. Use it when the agent needs the result during the turn.
240
+ Use `decide` inside a project tool when the answer and the write belong
241
+ in one operation.
242
+
243
+ ## Skills included with the extension
244
+
245
+ The extension adds two skills by default:
246
+
247
+ - `jev__questions` teaches the model how to structure atomic questions,
248
+ choose a question type, and read the answers.
249
+
250
+ - `jev__gated-write` teaches the model to put `decide` and the write in
251
+ one server tool, hold on low confidence, and skip writes during evals.
252
+
253
+ The model sees each skill's description and loads the full procedure
254
+ when it applies.
255
+
256
+ ## Choose what to mount
257
+
258
+ Both contribution groups are on by default. Turn off the harness tool
259
+ when Jev should only run inside tools you wrote. Turn off the skills
260
+ when your agent already has its own Jev instructions.
261
+
262
+ ```ts
263
+ // agent/extensions/jev.ts
264
+ import jev from "@cursor/july/extensions/jev";
265
+
266
+ export default jev({
267
+ harnessTools: false,
268
+ skills: true,
269
+ });
270
+ ```
271
+
272
+ `harnessTools: false` removes `jev__evaluate` from discovery.
273
+ `skills: false` removes both Jev skills. These switches do not remove
274
+ the exported helpers, so project tools can still import `decide`,
275
+ `above`, and `needsHuman`.
276
+
277
+ ## Practices
278
+
279
+ - Pass the pull request title, a short summary, and the draft finding.
280
+ Don't send the checkout.
281
+
282
+ - Calibrate `above` and `needsHuman` on pull requests you have already
283
+ labeled. `needsHuman` defaults to `0.7`.
284
+
285
+ ## Related
286
+
287
+ - [Agentic owners](../templates/agentic-owners.md): a risk tier, then
288
+ the host approves or asks for reviewers
289
+ - [Security reviewer](../templates/security-reviewer.md): a finding, or
290
+ no comment
291
+ - [Thermo review](../templates/thermo-review.md): bugs and breakage,
292
+ posted the same way
293
+ - [Code wiki](../reference/cli.md#init): documentation
294
+ follow-ups after a merge
295
+ - [Evals](../evals.md): checks on the full turn
296
+ - [GitHub agents](./github.md): how the review gets onto the pull request
@@ -3,11 +3,11 @@ title: "Agent config"
3
3
  description: "defineAgent at agent/agent.ts: the model, the local and cloud runtimes, and serving programmatically."
4
4
  ---
5
5
 
6
- # Agent config (`agent/agent.ts`)
6
+ # Agent config
7
7
 
8
- `agent/agent.ts` default-exports `defineAgent(config)`: which model runs
9
- the agent, where turns execute, and runtime-specific defaults.
10
- Everything is optional on the root agent.
8
+ `agent/agent.ts` default-exports `defineAgent(config)`, which sets the
9
+ model, execution runtime, and runtime-specific defaults. Every root
10
+ config field is optional.
11
11
 
12
12
  ```ts
13
13
  import { defineAgent } from "@cursor/july";
@@ -27,9 +27,7 @@ export default defineAgent({
27
27
  });
28
28
  ```
29
29
 
30
- ## Fields on `defineAgent`
31
-
32
- `defineAgent` accepts these fields.
30
+ ## Agent fields
33
31
 
34
32
  | Field | Type | Meaning |
35
33
  | --- | --- | --- |
@@ -38,14 +36,14 @@ export default defineAgent({
38
36
  | `description` | string | What the agent is for. Required on subagents; the parent model reads it to decide when to delegate. Documentation-only on the root. |
39
37
  | `instructions` | string | Inline instructions. Prefer `instructions.md`; this exists for subagents and generated configs. |
40
38
  | `runtime` | `"local"` or `"cloud"` | Where turns execute. Default `"local"`. |
41
- | `cloud` | object | Cloud agent defaults: repos, env, envVars, forwarded to the Cursor SDK. Used when `runtime` is `"cloud"`, and as the base merged under per-session `cloud` send options. |
39
+ | `cloud` | object | Cloud agent defaults: repos, env, envVars. Used when `runtime` is `"cloud"`, and as the base merged under per-session `cloud` send options. |
42
40
  | `local` | `{ cwd?, workspaceDir?, sandbox? }` | Local harness defaults; ignored for cloud turns. See [Local options](#local-options). |
43
- | `hosting` | `{ egressDomains?, secretNames? }` | Managed-hosting declarations read by `agent-sdk deploy`: the pod's egress allowlist and the secret names the agent expects. Ignored by local serving. |
44
- | `concurrency` | `{ maxRunningTurns? }` | Engine-wide turn admission limit. See [Concurrency](#concurrency). |
41
+ | `hosting` | `{ egressDomains?, secretNames? }` | `agent-sdk deploy` declarations for allowed egress domains and expected secret names. Ignored by local serving. |
42
+ | `concurrency` | `{ maxRunningTurns? }` | Agent-wide turn admission limit. See [Concurrency](#concurrency). |
45
43
  | `builtinTools` | `{ reminders? }` | Framework-provided model-facing tools, opted in per capability. See [Built-in tools](#built-in-tools). |
46
- | `tools` | `ToolName[]` | Allowlist of built-in harness tools offered to the model. Unset = the model's full standard toolset. See [Allowlist built-in harness tools](#allowlist-built-in-harness-tools). |
44
+ | `tools` | `ToolName[]` | Allowlist of built-in harness tools offered to the model. Unset = the model's full standard toolset. See [Harness tools](#harness-tools). |
47
45
 
48
- ## Choose a model
46
+ ## Model
49
47
 
50
48
  `model` is a Cursor model id string, or `{ id, params }`. Effort and
51
49
  speed are params, not id suffixes. The SDK rejects suffix-style ids
@@ -67,24 +65,17 @@ A plain string works when you don't need params:
67
65
  model: "composer-2.5",
68
66
  ```
69
67
 
70
- ## Choose a runtime
68
+ ## Runtime
71
69
 
72
- `runtime: "local"` (the default) runs turns on the Cursor SDK harness on
73
- this machine. Server tools, skills, sandbox seeds, and tool approvals
74
- all apply.
70
+ `runtime: "local"` (the default) runs turns on this machine. Server
71
+ tools, skills, sandbox seeds, and tool approvals all apply.
75
72
 
76
- `runtime: "cloud"` runs turns on Cursor cloud agents (`bc-…` ids). Pass
77
- a `cloud` block with the repos the VM carries. Server tools stay
78
- reachable over authenticated HTTP MCP back to the serve host when
79
- `--public-url` or `--cloud-tools-url` is set (omitted with a warning
80
- otherwise), and instructions and agent-tool catalogs are prepended to
81
- the first prompt, because the local session workspace is not the cloud
82
- VM.
73
+ `runtime: "cloud"` runs turns on Cursor cloud agents. Pass a `cloud`
74
+ block with the repositories the VM needs. See [Tools](./tools.md) for
75
+ server- and agent-tool behavior on cloud turns.
83
76
 
84
- `validate` warns when `runtime: "cloud"` is combined with agent tools
85
- (they are described on the first prompt instead of written to the VM),
86
- when skills or sandbox seeds are present (they sync onto an Agent Store
87
- rather than the session workspace), and when the `cloud` block is
77
+ `validate` warns when `runtime: "cloud"` is combined with agent tools,
78
+ when skills or sandbox seeds are present, and when the `cloud` block is
88
79
  missing.
89
80
 
90
81
  ## Local options
@@ -93,18 +84,15 @@ missing.
93
84
 
94
85
  `local.workspaceDir` points every session at one shared harness cwd,
95
86
  for agents that work inside an existing checkout. It takes precedence
96
- over `cwd`, and a per-send `workspaceDir` still wins over both. The SDK
97
- keys its local executor (rules, skills, MCP, ignore mappings) on the
98
- harness cwd, so a shared directory resolves the workspace once per
99
- serve process instead of once per session. The trade: sessions share a
100
- working tree, so a file one turn writes is visible to the next.
87
+ over `cwd`, and a per-send `workspaceDir` still wins over both.
88
+ Sessions share a working tree, so a file one turn writes is visible to
89
+ the next.
101
90
 
102
91
  `local.sandbox` runs the harness inside Cursor's local sandbox. It's
103
- off by default, matching the SDK: shell then auto-approves and inherits
104
- the serve process environment, including any credentials the host
105
- holds. Turn it on for agents whose turns read untrusted input (webhook
106
- payloads, PR diffs, inbound chat); it's a real tool boundary rather
107
- than a prompt-level one.
92
+ off by default: shell then auto-approves and inherits the serve process
93
+ environment, including any credentials the host holds. Turn it on for
94
+ agents whose turns read untrusted input (webhook payloads, PR diffs,
95
+ inbound chat); it's a tool boundary, not a prompt-level one.
108
96
 
109
97
  ### Local cwd
110
98
 
@@ -120,13 +108,12 @@ does not leak rules, skills, or MCP servers into the turn. A standalone git
120
108
  root keeps the in-project session workspace. Point `cwd` at a checkout only
121
109
  when the agent should inherit that tree.
122
110
 
123
- ## Allowlist built-in harness tools
111
+ ## Harness tools
124
112
 
125
113
  Use `tools` to limit which built-in Cursor harness tools the model can
126
114
  call. Omit it to keep the standard toolset. When you set it, the model
127
115
  gets only the tools you list. An empty list disables all native
128
- built-in tools. Because this field is an allowlist, new platform tools
129
- stay disabled until you add them.
116
+ built-in tools. New platform tools stay disabled until you add them.
130
117
 
131
118
  ```ts
132
119
  export default defineAgent({
@@ -137,12 +124,13 @@ export default defineAgent({
137
124
  });
138
125
  ```
139
126
 
140
- The Agent SDK always adds `"mcp"` to a configured allowlist. Authored
141
- server tools in `agent/tools/` use MCP to reach the model. MCP can also
142
- expose declared connections and servers from the harness directory's
143
- ambient `.cursor` config. To exclude a checkout's MCP servers, point
144
- `local.cwd` outside the checkout. See [Local cwd](#local-cwd).
145
- `local.sandbox` makes MCP tool calls fail closed.
127
+ The Agent SDK always adds `"mcp"` to a configured allowlist, because
128
+ authored server tools in `agent/tools/` reach the model over MCP. MCP
129
+ can also expose declared connections and servers from the harness
130
+ directory's ambient `.cursor` config. To exclude a checkout's MCP
131
+ servers, point `local.cwd` outside the checkout. See
132
+ [Local cwd](#local-cwd). `local.sandbox` makes MCP tool calls fail
133
+ closed.
146
134
 
147
135
  Use the SDK's public tool names, including `"shell"`, `"read"`,
148
136
  `"edit"`, `"grep"`, `"glob"`, `"ls"`, and `"task"`. Unknown names
@@ -159,8 +147,7 @@ Two names have broader effects:
159
147
  Tool allowlists work only with the local runtime. A
160
148
  `runtime: "cloud"` agent that sets `tools` fails at serve startup.
161
149
  The Agent SDK also refuses per-send cloud sessions from a hybrid agent
162
- with an allowlist. It won't run those sessions with unrestricted tool
163
- access.
150
+ with an allowlist.
164
151
 
165
152
  The allowlist controls which tools the model can call. It does not
166
153
  isolate the serve host. For agents that process untrusted input, also
@@ -168,10 +155,10 @@ set `local: { sandbox: true }`.
168
155
 
169
156
  ## Cloud options
170
157
 
171
- Cloud agent defaults forwarded to the Cursor SDK: `repos` (each
172
- `{ url, startingRef? }`), environment selection, `envVars`, and the
173
- rest. A local agent uses the same block as the base config when a
174
- channel opens a cloud-attached session per send (the `cloud` option on
158
+ The `cloud` block sets default repositories (each
159
+ `{ url, startingRef? }`), environment selection, and `envVars`. A local
160
+ agent uses the same block as the base config when a channel opens a
161
+ cloud-attached session per send (the `cloud` option on
175
162
  [`send`](./channels.md#handler-arguments)).
176
163
 
177
164
  ## Concurrency
@@ -194,9 +181,8 @@ export default defineAgent({
194
181
  ## Built-in tools
195
182
 
196
183
  `builtinTools` opts into framework-provided model-facing tools. Each
197
- enabled capability materializes as ordinary server tools at discovery
198
- time, so turns, direct calls, `info`, and the playground treat them
199
- like authored tools. Authored tools with the same name win, with a
184
+ enabled capability shows up as ordinary server tools, so turns, direct
185
+ calls, `info`, and the playground treat them like authored tools. Authored tools with the same name win, with a
200
186
  warning, and like all server tools they run on the local runtime.
201
187
 
202
188
  `builtinTools: { reminders: true }` adds three tools bound to the
@@ -205,22 +191,6 @@ current conversation over `host.reminders`: `reminders_create`,
205
191
  continuation key can't arm reminders. See
206
192
  [Schedules and reminders](./schedules.md#reminders).
207
193
 
208
- ## Generate instructions
209
-
210
- When the system prompt must be computed, author `agent/instructions.ts`
211
- instead of markdown:
212
-
213
- ```ts
214
- import { defineInstructions } from "@cursor/july";
215
-
216
- export default defineInstructions({
217
- markdown: `You are the on-call assistant for ${process.env.TEAM_NAME}.`,
218
- });
219
- ```
220
-
221
- The directory form and the runtime mapping are in
222
- [Instructions](./instructions.md).
223
-
224
194
  ## Serve programmatically
225
195
 
226
196
  `serve(dirOrProject, options)` embeds the server in your own process:
@@ -230,7 +200,7 @@ import { serve } from "@cursor/july";
230
200
 
231
201
  const handle = await serve("./my-agent", {
232
202
  port: 3000,
233
- apiKey: process.env.CURSOR_API_KEY, // optional; see credential order
203
+ apiKey: process.env.CURSOR_API_KEY,
234
204
  });
235
205
  console.log(`listening on ${handle.url}`);
236
206
  // handle.callTool(...), handle.dispatchSchedule("heartbeat"),
@@ -239,17 +209,14 @@ console.log(`listening on ${handle.url}`);
239
209
 
240
210
  Host settings match the documented [CLI](./cli.md) `serve` flags.
241
211
  `serve()` also accepts `discovery` (project-loading options) and
242
- `mode: "single" | "multi"`. The Cursor credential resolves in one order
243
- everywhere: explicit `apiKey`, then `CURSOR_API_KEY`, then
244
- `CURSOR_API_KEY_FILE` (hosted default `/run/cursor/secrets/CURSOR_API_KEY`
245
- when unset), then `CURSOR_SERVICE_ACCOUNT_KEY`, then the key stored by
246
- `agent-sdk login`. On a host that has both the service-account key and a
247
- bind file, the file principal wins.
248
-
249
- ## What's next
212
+ `mode: "single" | "multi"`. Pass `apiKey` or use the same Cursor
213
+ credential as the CLI: `CURSOR_API_KEY`, `CURSOR_API_KEY_FILE`,
214
+ `CURSOR_SERVICE_ACCOUNT_KEY`, or `agent-sdk login`.
250
215
 
251
- Continue with these pages:
216
+ ## Related
252
217
 
253
218
  - [Instructions](./instructions.md): the required half of a minimal
254
219
  agent
255
220
  - [CLI](./cli.md): the `serve` flags `serve()` accepts
221
+ - [Sessions](./sessions.md): workspaces, identifiers, and turn admission
222
+ - [Schedules](./schedules.md): reminder tools opted in here