@cursor/july 0.1.94 → 0.1.96

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 (332) hide show
  1. package/AGENTS.md +3 -4
  2. package/dist/channels/deployments/types.d.ts +1 -1
  3. package/dist/channels/deployments/types.d.ts.map +1 -1
  4. package/dist/channels/deployments/types.js +1 -0
  5. package/dist/channels/github/github-channel.d.ts.map +1 -1
  6. package/dist/channels/github/github-channel.js +14 -2
  7. package/dist/channels/github/types.d.ts +18 -3
  8. package/dist/channels/github/types.d.ts.map +1 -1
  9. package/dist/channels/origin/api.d.ts +59 -13
  10. package/dist/channels/origin/api.d.ts.map +1 -1
  11. package/dist/channels/origin/api.js +168 -27
  12. package/dist/channels/origin/binding.d.ts +2 -2
  13. package/dist/channels/origin/checks.d.ts +6 -6
  14. package/dist/channels/origin/checks.js +6 -6
  15. package/dist/channels/origin/cursor-account.d.ts +5 -3
  16. package/dist/channels/origin/cursor-account.d.ts.map +1 -1
  17. package/dist/channels/origin/cursor-account.js +5 -3
  18. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  19. package/dist/channels/origin/origin-channel.js +11 -3
  20. package/dist/channels/origin/origin-webhook.d.ts +11 -1
  21. package/dist/channels/origin/origin-webhook.d.ts.map +1 -1
  22. package/dist/channels/origin/origin-webhook.js +23 -3
  23. package/dist/channels/origin/types.d.ts +8 -0
  24. package/dist/channels/origin/types.d.ts.map +1 -1
  25. package/dist/channels/slack/api.d.ts +9 -0
  26. package/dist/channels/slack/api.d.ts.map +1 -1
  27. package/dist/channels/slack/api.js +36 -5
  28. package/dist/channels/slack/defaults.d.ts.map +1 -1
  29. package/dist/channels/slack/defaults.js +17 -46
  30. package/dist/channels/slack/dispatch.d.ts +7 -1
  31. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  32. package/dist/channels/slack/dispatch.js +47 -23
  33. package/dist/channels/slack/inbound.d.ts +8 -0
  34. package/dist/channels/slack/inbound.d.ts.map +1 -1
  35. package/dist/channels/slack/inbound.js +32 -0
  36. package/dist/channels/slack/live-delivery.d.ts +26 -29
  37. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  38. package/dist/channels/slack/live-delivery.js +172 -73
  39. package/dist/channels/slack/manifest.d.ts.map +1 -1
  40. package/dist/channels/slack/manifest.js +5 -1
  41. package/dist/channels/slack/nudge-carrier.d.ts +2 -0
  42. package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
  43. package/dist/channels/slack/nudge-carrier.js +48 -1
  44. package/dist/channels/slack/pr-ref.d.ts +7 -1
  45. package/dist/channels/slack/pr-ref.d.ts.map +1 -1
  46. package/dist/channels/slack/pr-ref.js +42 -23
  47. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  48. package/dist/channels/slack/slack-channel.js +2 -2
  49. package/dist/docs/404.html +2 -2
  50. package/dist/docs/ab.html +4 -4
  51. package/dist/docs/assets/{app.CFDEas4I.js → app.jXleCmOc.js} +1 -1
  52. package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +1 -0
  53. package/dist/docs/assets/chunks/{VPLocalSearchBox.B1IIYpYS.js → VPLocalSearchBox.8LhyglIT.js} +1 -1
  54. package/dist/docs/assets/chunks/{theme.Ct4NSiLm.js → theme.9ged-pr2.js} +2 -2
  55. package/dist/docs/assets/index.md.CI93Ltlb.js +5 -0
  56. package/dist/docs/assets/{index.md.DRakGHFe.lean.js → index.md.CI93Ltlb.lean.js} +1 -1
  57. package/dist/docs/assets/{reference_cli.md.Cw6_ICYG.js → reference_cli.md.CCnG-nJx.js} +4 -2
  58. package/dist/docs/assets/{reference_cli.md.Cw6_ICYG.lean.js → reference_cli.md.CCnG-nJx.lean.js} +1 -1
  59. package/dist/docs/assets/{reference_skills.md.8son6Hjm.js → reference_skills.md.BFW9retM.js} +3 -3
  60. package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.js → templates_agentic-owners.md.BZSH4N9z.js} +1 -1
  61. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +2 -0
  62. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +1 -0
  63. package/dist/docs/assets/{templates_demo.md.DhFcWN6j.js → templates_demo.md.BeQX9V3H.js} +1 -1
  64. package/dist/docs/assets/{templates_pr-autofixer.md.DU7dQpor.js → templates_pr-autofixer.md.x5zl6-GT.js} +2 -2
  65. package/dist/docs/assets/{templates_pr-autofixer.md.DU7dQpor.lean.js → templates_pr-autofixer.md.x5zl6-GT.lean.js} +1 -1
  66. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +4 -0
  67. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +1 -0
  68. package/dist/docs/assets/{templates_security-reviewer.md.CTa7u_l1.js → templates_security-reviewer.md.lshxbCLK.js} +2 -2
  69. package/dist/docs/assets/{templates_security-reviewer.md.CTa7u_l1.lean.js → templates_security-reviewer.md.lshxbCLK.lean.js} +1 -1
  70. package/dist/docs/assets/{templates_triage.md.CVlpctKS.js → templates_triage.md.Co4UNzkZ.js} +3 -3
  71. package/dist/docs/assets/{templates_triage.md.CVlpctKS.lean.js → templates_triage.md.Co4UNzkZ.lean.js} +1 -1
  72. package/dist/docs/building-with-agents.html +4 -4
  73. package/dist/docs/concepts.html +4 -4
  74. package/dist/docs/deployment.html +4 -4
  75. package/dist/docs/evals.html +4 -4
  76. package/dist/docs/guides/agent-to-agent.html +4 -4
  77. package/dist/docs/guides/cloud-runtime.html +4 -4
  78. package/dist/docs/guides/convert-automation.html +4 -4
  79. package/dist/docs/guides/github.html +4 -4
  80. package/dist/docs/guides/human-in-the-loop.html +4 -4
  81. package/dist/docs/guides/mcp-oauth.html +4 -4
  82. package/dist/docs/guides/opentelemetry.html +4 -4
  83. package/dist/docs/guides/slack.html +4 -4
  84. package/dist/docs/guides/webhooks.html +4 -4
  85. package/dist/docs/hashmap.json +1 -1
  86. package/dist/docs/hillclimbing.html +4 -4
  87. package/dist/docs/index.html +6 -6
  88. package/dist/docs/index.md +5 -1
  89. package/dist/docs/llms-full.txt +189 -26
  90. package/dist/docs/llms.txt +2 -0
  91. package/dist/docs/quickstart.html +4 -4
  92. package/dist/docs/reference/agent-config.html +4 -4
  93. package/dist/docs/reference/artifacts.html +4 -4
  94. package/dist/docs/reference/channels.html +4 -4
  95. package/dist/docs/reference/cli.html +8 -6
  96. package/dist/docs/reference/cli.md +4 -1
  97. package/dist/docs/reference/connections.html +4 -4
  98. package/dist/docs/reference/hooks.html +4 -4
  99. package/dist/docs/reference/http-api.html +4 -4
  100. package/dist/docs/reference/instructions.html +4 -4
  101. package/dist/docs/reference/playground.html +4 -4
  102. package/dist/docs/reference/project-layout.html +4 -4
  103. package/dist/docs/reference/prompt.html +4 -4
  104. package/dist/docs/reference/schedules.html +4 -4
  105. package/dist/docs/reference/sessions.html +4 -4
  106. package/dist/docs/reference/skills.html +7 -7
  107. package/dist/docs/reference/subagents.html +4 -4
  108. package/dist/docs/reference/tools.html +4 -4
  109. package/dist/docs/scaffolding-agents.html +4 -4
  110. package/dist/docs/storage.html +4 -4
  111. package/dist/docs/templates/agentic-owners.html +7 -7
  112. package/dist/docs/templates/agentic-owners.md +1 -1
  113. package/dist/docs/templates/code-wiki.html +28 -0
  114. package/dist/docs/templates/code-wiki.md +91 -0
  115. package/dist/docs/templates/demo.html +6 -6
  116. package/dist/docs/templates/demo.md +3 -2
  117. package/dist/docs/templates/pr-autofixer.html +6 -6
  118. package/dist/docs/templates/pr-autofixer.md +7 -13
  119. package/dist/docs/templates/security-help.html +30 -0
  120. package/dist/docs/templates/security-help.md +65 -0
  121. package/dist/docs/templates/security-reviewer.html +6 -6
  122. package/dist/docs/templates/security-reviewer.md +1 -2
  123. package/dist/docs/templates/triage.html +7 -7
  124. package/dist/docs/templates/triage.md +2 -6
  125. package/dist/docs/troubleshooting.html +4 -4
  126. package/dist/files-backends/cursor-hosted.d.ts +26 -0
  127. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  128. package/dist/files-backends/cursor-hosted.js +32 -4
  129. package/dist/files.d.ts +2 -0
  130. package/dist/files.d.ts.map +1 -1
  131. package/dist/files.js +5 -0
  132. package/dist/internal/advertise-tools.d.ts +2 -0
  133. package/dist/internal/advertise-tools.d.ts.map +1 -1
  134. package/dist/internal/advertise-tools.js +15 -1
  135. package/dist/internal/bounded.d.ts +7 -0
  136. package/dist/internal/bounded.d.ts.map +1 -0
  137. package/dist/internal/bounded.js +32 -0
  138. package/dist/internal/cli-deploy.d.ts.map +1 -1
  139. package/dist/internal/cli-deploy.js +142 -7
  140. package/dist/internal/conversation-mirror.d.ts +85 -0
  141. package/dist/internal/conversation-mirror.d.ts.map +1 -0
  142. package/dist/internal/conversation-mirror.js +312 -0
  143. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  144. package/dist/internal/cursor/backend-client.js +22 -48
  145. package/dist/internal/cursor/session-token.d.ts +45 -0
  146. package/dist/internal/cursor/session-token.d.ts.map +1 -0
  147. package/dist/internal/cursor/session-token.js +99 -0
  148. package/dist/internal/cursor-agent-template.d.ts +1 -1
  149. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  150. package/dist/internal/cursor-agent-template.js +1 -0
  151. package/dist/internal/deferred-channel-session.d.ts +20 -0
  152. package/dist/internal/deferred-channel-session.d.ts.map +1 -0
  153. package/dist/internal/deferred-channel-session.js +62 -0
  154. package/dist/internal/deploy-client.d.ts +13 -1
  155. package/dist/internal/deploy-client.d.ts.map +1 -1
  156. package/dist/internal/deploy-client.js +11 -1
  157. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  158. package/dist/internal/deploy-manifest.js +11 -5
  159. package/dist/internal/discovery.d.ts.map +1 -1
  160. package/dist/internal/discovery.js +22 -2
  161. package/dist/internal/framework-file-storage.d.ts +61 -0
  162. package/dist/internal/framework-file-storage.d.ts.map +1 -0
  163. package/dist/internal/framework-file-storage.js +204 -0
  164. package/dist/internal/framework-storage-selection.d.ts +38 -16
  165. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  166. package/dist/internal/framework-storage-selection.js +78 -17
  167. package/dist/internal/hosted-admission-context.d.ts +20 -0
  168. package/dist/internal/hosted-admission-context.d.ts.map +1 -0
  169. package/dist/internal/hosted-admission-context.js +31 -0
  170. package/dist/internal/hosted-delivery-protocol.d.ts +5 -0
  171. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  172. package/dist/internal/hosted-delivery-protocol.js +33 -1
  173. package/dist/internal/hosted-delivery.d.ts +11 -2
  174. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  175. package/dist/internal/hosted-delivery.js +79 -35
  176. package/dist/internal/hosted-managed-automation.d.ts +30 -0
  177. package/dist/internal/hosted-managed-automation.d.ts.map +1 -0
  178. package/dist/internal/hosted-managed-automation.js +58 -0
  179. package/dist/internal/init-project.d.ts.map +1 -1
  180. package/dist/internal/init-project.js +2 -0
  181. package/dist/internal/install-cursor-skills.d.ts.map +1 -1
  182. package/dist/internal/install-cursor-skills.js +1 -3
  183. package/dist/internal/managed-delivery.d.ts +80 -0
  184. package/dist/internal/managed-delivery.d.ts.map +1 -0
  185. package/dist/internal/managed-delivery.js +86 -0
  186. package/dist/internal/review-comments.d.ts.map +1 -1
  187. package/dist/internal/review-comments.js +10 -98
  188. package/dist/internal/runtime-dispatch-runner.d.ts +5 -1
  189. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
  190. package/dist/internal/runtime-dispatch-runner.js +7 -0
  191. package/dist/internal/scm/pr-url.d.ts +14 -0
  192. package/dist/internal/scm/pr-url.d.ts.map +1 -0
  193. package/dist/internal/scm/pr-url.js +65 -0
  194. package/dist/internal/sdk-runner.d.ts +25 -0
  195. package/dist/internal/sdk-runner.d.ts.map +1 -1
  196. package/dist/internal/sdk-runner.js +70 -0
  197. package/dist/internal/server.d.ts.map +1 -1
  198. package/dist/internal/server.js +11 -2
  199. package/dist/internal/session-engine.d.ts +13 -0
  200. package/dist/internal/session-engine.d.ts.map +1 -1
  201. package/dist/internal/session-engine.js +71 -3
  202. package/dist/internal/steering.d.ts +15 -0
  203. package/dist/internal/steering.d.ts.map +1 -0
  204. package/dist/internal/steering.js +18 -0
  205. package/dist/playground/assets/index-B1DDvBeC.css +1 -0
  206. package/dist/playground/assets/{index-B3JCyigB.js → index-Cx9CclK_.js} +47 -47
  207. package/dist/playground/index.html +2 -2
  208. package/dist/storage-backends/cursor-hosted.d.ts +8 -0
  209. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  210. package/dist/storage-backends/cursor-hosted.js +4 -3
  211. package/dist/types.d.ts +2 -1
  212. package/dist/types.d.ts.map +1 -1
  213. package/docs/README.md +5 -1
  214. package/docs/reference/cli.md +4 -1
  215. package/docs/templates/agentic-owners.md +1 -1
  216. package/docs/templates/code-wiki.md +96 -0
  217. package/docs/templates/demo.md +3 -2
  218. package/docs/templates/pr-autofixer.md +7 -13
  219. package/docs/templates/security-help.md +70 -0
  220. package/docs/templates/security-reviewer.md +1 -2
  221. package/docs/templates/triage.md +2 -6
  222. package/package.json +2 -2
  223. package/skills/ab/SKILL.md +13 -97
  224. package/skills/create-agent/SKILL.md +123 -223
  225. package/skills/debug/SKILL.md +34 -68
  226. package/skills/evals/SKILL.md +55 -180
  227. package/skills/framework-map/SKILL.md +83 -145
  228. package/skills/github/SKILL.md +53 -111
  229. package/skills/hillclimb/SKILL.md +40 -163
  230. package/skills/mcp-auth/SKILL.md +48 -107
  231. package/skills/otel/SKILL.md +22 -68
  232. package/skills/setup-slack/SKILL.md +77 -208
  233. package/src/channels/deployments/types.ts +1 -0
  234. package/src/channels/github/github-channel.ts +23 -8
  235. package/src/channels/github/types.ts +19 -2
  236. package/src/channels/origin/api.ts +242 -30
  237. package/src/channels/origin/binding.ts +2 -2
  238. package/src/channels/origin/checks.ts +6 -6
  239. package/src/channels/origin/cursor-account.ts +5 -3
  240. package/src/channels/origin/origin-channel.ts +13 -1
  241. package/src/channels/origin/origin-webhook.ts +27 -3
  242. package/src/channels/origin/types.ts +8 -0
  243. package/src/channels/slack/api.ts +41 -5
  244. package/src/channels/slack/defaults.ts +15 -49
  245. package/src/channels/slack/dispatch.ts +56 -22
  246. package/src/channels/slack/inbound.ts +43 -0
  247. package/src/channels/slack/live-delivery.ts +235 -114
  248. package/src/channels/slack/manifest.ts +5 -1
  249. package/src/channels/slack/nudge-carrier.ts +48 -1
  250. package/src/channels/slack/pr-ref.ts +56 -25
  251. package/src/channels/slack/slack-channel.ts +2 -0
  252. package/src/files-backends/cursor-hosted.ts +41 -2
  253. package/src/files.ts +11 -0
  254. package/src/internal/advertise-tools.ts +18 -2
  255. package/src/internal/bounded.ts +28 -0
  256. package/src/internal/cli-deploy.ts +183 -7
  257. package/src/internal/conversation-mirror.ts +406 -0
  258. package/src/internal/cursor/backend-client.ts +34 -58
  259. package/src/internal/cursor/session-token.ts +115 -0
  260. package/src/internal/cursor-agent-template.ts +1 -0
  261. package/src/internal/deferred-channel-session.ts +61 -0
  262. package/src/internal/deploy-client.ts +24 -1
  263. package/src/internal/deploy-manifest.ts +10 -5
  264. package/src/internal/discovery.ts +25 -2
  265. package/src/internal/framework-file-storage.ts +222 -0
  266. package/src/internal/framework-storage-selection.ts +101 -19
  267. package/src/internal/hosted-admission-context.ts +37 -0
  268. package/src/internal/hosted-delivery-protocol.ts +44 -1
  269. package/src/internal/hosted-delivery.ts +105 -40
  270. package/src/internal/hosted-managed-automation.ts +72 -0
  271. package/src/internal/init-project.ts +2 -0
  272. package/src/internal/install-cursor-skills.ts +1 -4
  273. package/src/internal/managed-delivery.ts +125 -0
  274. package/src/internal/review-comments.ts +10 -113
  275. package/src/internal/runtime-dispatch-runner.ts +10 -0
  276. package/src/internal/scm/pr-url.ts +95 -0
  277. package/src/internal/sdk-runner.ts +103 -0
  278. package/src/internal/server.ts +12 -0
  279. package/src/internal/session-engine.ts +76 -4
  280. package/src/internal/steering.ts +17 -0
  281. package/src/storage-backends/cursor-hosted.ts +10 -1
  282. package/src/types.ts +2 -1
  283. package/templates/agentic-owners/README.md +1 -1
  284. package/templates/agentic-owners/agent/agent.ts +0 -10
  285. package/templates/agentic-owners/agent/channels/github.ts +5 -14
  286. package/templates/agentic-owners/agent/lib/config.ts +0 -8
  287. package/templates/agentic-owners/agent/lib/review.ts +2 -15
  288. package/templates/agentic-owners/agent/tools/record_review.ts +2 -4
  289. package/templates/code-wiki/README.md +34 -0
  290. package/templates/code-wiki/agent/agent.ts +8 -0
  291. package/templates/code-wiki/agent/channels/github.ts +144 -0
  292. package/templates/code-wiki/agent/instructions.md +39 -0
  293. package/templates/code-wiki/agent/lib/repos.ts +5 -0
  294. package/templates/code-wiki/agent/lib/wiki.ts +22 -0
  295. package/templates/code-wiki/agent/tools/apply_wiki.ts +219 -0
  296. package/templates/code-wiki/evals/evals.config.ts +5 -0
  297. package/templates/code-wiki/evals/wiki.eval.ts +132 -0
  298. package/templates/code-wiki/init.json +25 -0
  299. package/templates/code-wiki/package.json +18 -0
  300. package/templates/code-wiki/tsconfig.json +12 -0
  301. package/templates/demo/agent/agent.ts +0 -10
  302. package/templates/pr-autofixer/README.md +0 -2
  303. package/templates/pr-autofixer/agent/agent.ts +0 -11
  304. package/templates/pr-autofixer/agent/channels/slack.ts +0 -7
  305. package/templates/pr-autofixer/agent/lib/pr-state.ts +5 -17
  306. package/templates/pr-autofixer/agent/lib/repos.ts +0 -1
  307. package/templates/security-help/README.md +2 -2
  308. package/templates/security-help/agent/agent.ts +1 -2
  309. package/templates/security-help/agent/channels/slack.ts +0 -3
  310. package/templates/security-help/agent/instructions.md +9 -10
  311. package/templates/security-help/agent/skills/access-request.md +1 -1
  312. package/templates/security-help/agent/skills/faq.md +31 -0
  313. package/templates/security-help/agent/skills/security-playbooks.md +1 -1
  314. package/templates/security-help/package.json +1 -2
  315. package/templates/security-reviewer/agent/agent.ts +0 -10
  316. package/templates/triage/agent/agent.ts +0 -10
  317. package/templates/triage/agent/channels/queue.ts +1 -1
  318. package/templates/triage/agent/channels/webhook.ts +1 -3
  319. package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +0 -1
  320. package/dist/docs/assets/index.md.DRakGHFe.js +0 -5
  321. package/dist/internal/deployment-scm-event-stream.d.ts +0 -116
  322. package/dist/internal/deployment-scm-event-stream.d.ts.map +0 -1
  323. package/dist/internal/deployment-scm-event-stream.js +0 -474
  324. package/dist/playground/assets/index-D9N7-q97.css +0 -1
  325. package/src/internal/deployment-scm-event-stream.ts +0 -593
  326. package/templates/security-help/agent/knowledge/faq/approvals.md +0 -5
  327. package/templates/security-help/agent/knowledge/faq/channels.md +0 -6
  328. package/templates/security-help/agent/knowledge/faq/phishing.md +0 -10
  329. package/templates/security-help/agent/skills/security-first-pass.md +0 -15
  330. /package/dist/docs/assets/{reference_skills.md.8son6Hjm.lean.js → reference_skills.md.BFW9retM.lean.js} +0 -0
  331. /package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.lean.js → templates_agentic-owners.md.BZSH4N9z.lean.js} +0 -0
  332. /package/dist/docs/assets/{templates_demo.md.DhFcWN6j.lean.js → templates_demo.md.BeQX9V3H.lean.js} +0 -0
@@ -1,78 +1,44 @@
1
1
  ---
2
2
  name: agentsdk-debug
3
3
  description: >-
4
- Diagnose a misbehaving Agent SDK agent, server, or playground — blank
5
- playground, sessions missing, HMR not reloading, failing reads/retry
6
- loops, webhook 401s, 403/409 responses, approvals or reminders lost,
7
- orphaned processes. Use when an Agent SDK project runs but behaves
8
- wrong locally.
4
+ Diagnose a misbehaving local Agent SDK agent: blank playground,
5
+ missing sessions, failed reads, webhook 401s, 403/409, lost
6
+ approvals. Use when a project runs but behaves wrong locally.
9
7
  ---
10
8
 
11
9
  # Debugging the Agent SDK locally
12
10
 
13
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
14
- host serves the same index at `/docs/llms.txt`.
11
+ Local `agent-sdk serve`. Hosted start or health failures:
12
+ `docs/troubleshooting.md` and `docs/deployment.md`.
15
13
 
16
- This skill is **local** `agent-sdk serve` / playground. A **hosted**
17
- deployment that is stopped, slow to start, or failing `/v1/health` is
18
- `.cursor/skills/debugging/debug-agent-serve-deployment/SKILL.md`.
14
+ 1. **Validate.** `agent-sdk validate --dir <project>`
15
+ 2. **Info.** `curl -s http://127.0.0.1:3000/<slug>/v1/info | jq .`
16
+ 3. **Trace.** Session events under the project state directory.
17
+ Then match the table.
19
18
 
20
- Read `framework-map/SKILL.md` (sibling skill) first if you don't know the
21
- project structure or session model. Everything below assumes Node/tsx (`pnpm exec tsx
22
- src/bin/agent-serve.ts ...` in the everysphere monorepo).
23
-
24
- ## Triage in order
25
-
26
- ```bash
27
- # 1. Is discovery clean? serve refuses to start on error diagnostics.
28
- agent-sdk validate --dir <project>
29
-
30
- # 2. What is actually running, and where?
31
- lsof -iTCP:3000 -sTCP:LISTEN; lsof -iTCP:5273 -sTCP:LISTEN
32
- ps aux | rg -i 'agent-serve|vite' | rg -v rg
33
-
34
- # 3. What does the server think it serves?
35
- curl -s localhost:3000/v1/agents | jq . # multi-agent index
36
- curl -s localhost:3000/<slug>/v1/info | jq . # per-agent surface
37
-
38
- # 4. What did the session actually do? The stream never lies.
39
- curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
40
- # or read <stateRoot>/<slug>/sessions/<id>/events.ndjson directly
41
- ```
42
-
43
- ## Symptom → cause
44
-
45
- | Symptom | Cause / fix |
19
+ | Symptom | Fix |
46
20
  | --- | --- |
47
- | Playground blank or "no agents" even though Vite assets are built | The SPA is static; it needs the Agent SDK backend on `:3000`. Start `serve` — building `dist/playground/` alone serves nothing. |
48
- | Edits under `playground/src` don't show up in the browser | You're on the **static** `dist/playground` bundle, not HMR. Only `serve --dev` / `dev` starts Vite HMR (`:5273`) and prints that as `playground` — open that URL, not `:3000`. In the monorepo, `mise //packages/agent-serve:start` = all examples + multi-agent HMR; pin one slug with `AGENT_SERVE_BASE=/<slug>`. |
49
- | Webhook / schedule sessions exist on disk but the playground session list is empty | The list shows the calling principal's sessions. `--dev` (loopback) or `--allow-anonymous` (trusted shared host) switches it to `includeAll`. Otherwise deep-link `/<slug>/playground?sessionId=ses_...` or read `sessions/` on disk. |
50
- | Every built-in read/grep the model makes fails; turns crawl through retry loops | You ran the CLI under **Bun**. Kill it, rerun under Node/tsx. (`NGHTTP2_FRAME_SIZE_ERROR` in SDK logs is the tell.) |
51
- | `gh webhook forward` / `agent-sdk github forward` deliveries all 401 — but hook creation succeeded | `GITHUB_TOKEN`/`GH_TOKEN` in the env. The relay authenticates with the gh CLI login and rejects env tokens. `GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward ...` |
52
- | `Hook already exists` starting a forwarder | GitHub allows one forwarder per repo. Use one `github forward --dir <parent>` (it fans out to every matching channel) instead of N processes; kill stale forwarders. |
53
- | Agent's answers reference monorepo rules / AGENTS.md it shouldn't know | Session workspace sits inside another git checkout, so the harness loaded ancestor config. Nested projects default `local.cwd` to `~/.cache/agent-serve/<dir>`. Point cwd at a checkout only when the agent should inherit that tree. |
54
- | Yellow box lists Datadog/Linear tools; model recites `GetDynamicTools` / IDE `cursor` tools and never calls MCP | Attached MCP is behind meta-tools, or cwd still leaked IDE MCP. Set `advertiseTools: true` for named tools on local turns. Confirm `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
55
- | Port 3000/5273 in use; stray processes after crashes | `lsof -iTCP:3000 -sTCP:LISTEN`, kill the pids; also check companion processes (e.g. vite). |
56
- | Pending tool approval vanished after server restart | By design: parked SDK calls don't survive host restart; they resolve as interrupted. Re-run the turn. |
57
- | Schedule / reminder never fires under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>` or `POST /<slug>/v1/dev/reminders/<id>` (list at `GET /v1/dev/reminders`). |
58
- | Reminder disarmed after restart with `handler_lost_on_restart` | `run`-handler reminders are in-memory; re-arm them from the code path that created them (enroll hook / policy), or use prompt-based reminders. |
59
- | `409` on a follow-up | Stale `continuationToken` (each accepted follow-up rotates it), busy session, or a task/schedule session (not followable). |
60
- | `409 session_busy` on `agent-sdk call --session` | Session-bound deterministic calls serialize with model turns; wait or use an ephemeral call (drop `--session`). |
61
- | `403` on stream/follow-up | Caller principal ≠ session owner. In dev, create and inspect with the same auth; beyond loopback pass `--bearer-token` and send it. |
62
- | Works on localhost, 401/blocked through a tunnel or LAN | Default `localDevStrict()` auth only admits direct loopback, **rejects proxy-forwarding headers** (`X-Forwarded-For`, ...), and requires a loopback `Host`. Use `--bearer-token <secret>` (or authored `bearerAuth`) — `--allow-anonymous` only for trusted-network demos (and never with Cursor account MCP connections). |
63
- | Channel route won't compile: body/query schema type error | `GET` requires a Zod `querySchema`, `POST`/`PUT`/`PATCH` a Zod `bodySchema` — plain JSON Schema objects don't type-check. Use `z.object({})` / `z.unknown()` for open surfaces. Empty POST bodies are coerced to `{}` before validation. |
64
- | Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent. Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agent-sdk slack doctor --prefix <PREFIX>`. |
65
- | Turn fails immediately with an API-key error | Model turns need `CURSOR_API_KEY`; everything structural (validate/info/call/serve bring-up) doesn't. |
66
- | Server tools / skills / sandbox silently absent | Runtime is `cloud` — those are local-only. `validate` prints exactly this warning; read it. |
67
- | `validate` clean, `run` works, CI typecheck fails | tsx never typechecked it. See invariant 3 in `framework-map/SKILL.md` (JSON-shaped tool returns; `type` not `interface`). |
68
-
69
- ## Reading a turn like an expert
70
-
71
- - `actions.requested` / `action.result` pairs are the tool trajectory;
72
- count them by `toolName` before blaming latency, and split **host** work
73
- (channel `callTool`, prep) from **model** tools.
74
- - `turn.failed` with `"turn interrupted"` means a follow-up or `/stop`
75
- preempted it — that's the designed behavior, not a crash.
76
- - Escapes outside the session workspace in read/grep paths mean the
77
- harness is fighting your evidence layout, not that the model is broken.
78
- - `agent-sdk trajectory --events <file>` renders any saved NDJSON.
21
+ | Playground blank / "no agents" | Start `serve`. A built SPA with no backend serves nothing. |
22
+ | Playground UI edits do not show | Open the URL `serve --dev` prints as `playground`, not `:3000`. |
23
+ | Sessions on disk, empty playground list | List is the calling principal. `--dev` or `--allow-anonymous` shows all. Or `?sessionId=ses_...`. |
24
+ | Built-in read/grep fail; retry loops | Bun. Rerun under Node. The tell is `NGHTTP2_FRAME_SIZE_ERROR`. |
25
+ | `github forward` 401s; hook created | Blank `GITHUB_TOKEN`/`GH_TOKEN`. Relay uses `gh` login. |
26
+ | `Hook already exists` | One forwarder per repo. `forward --dir <parent>`. |
27
+ | Answers cite ancestor `AGENTS.md` | Nested checkout. Default `local.cwd` is a cache directory under `~/.cache`. |
28
+ | Model lists IDE `cursor` tools, never MCP | `advertiseTools: true`. Check `GET /v1/info`. |
29
+ | Port 3000 in use | `lsof -iTCP:3000 -sTCP:LISTEN` and kill that pid. |
30
+ | Approval vanished after restart | Parked calls do not survive restart. Re-run. |
31
+ | Schedule / reminder silent under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>`. |
32
+ | `409` on follow-up | Stale `continuationToken`, busy session, or a task session. |
33
+ | `409 session_busy` on `call --session` | Wait, or drop `--session`. |
34
+ | `403` on stream | Wrong principal. Same auth as create; beyond loopback send `--bearer-token`. |
35
+ | Works on loopback, blocked via tunnel | `localDevStrict()` rejects forwarded headers. Use `--bearer-token`. Never `--allow-anonymous` with account MCP. |
36
+ | Slack `channel idle missing credentials` | Expected. `slack doctor --prefix <PREFIX>`. |
37
+ | Immediate API-key error | Model turns need `CURSOR_API_KEY`. |
38
+ | Approvals or sandbox seeds missing | `runtime: "cloud"`. Those are local only. `validate` warns. |
39
+ | `validate` clean, CI typecheck fails | tsx skipped types. JSON-shaped returns; `type` not `interface`. |
40
+
41
+ Count `action.result` by `toolName` before blaming latency.
42
+ `turn.failed` + `"turn interrupted"` is a follow-up or stop, not a
43
+ crash. `agent-sdk trajectory --events <file>` renders a saved
44
+ trace.
@@ -1,129 +1,58 @@
1
1
  ---
2
2
  name: agentsdk-evals
3
3
  description: >-
4
- Author and run Agent SDK defineEval cases (single- or multi-datapoint).
5
- Use when writing, fixing, seeding, or hillclimbing evals; AskQuestion
6
- whether to generate samples or upload data. Materialize API-backed
7
- fixtures first. Live A/B metrics: defineAB (skills/ab), not defineEval.
4
+ Author and run defineEval cases. Use when writing, fixing, seeding,
5
+ or hillclimbing evals. Ask whether to generate samples or take
6
+ uploaded data. Materialize API-backed fixtures first. Live A/B is
7
+ defineAB (skills/ab), not defineEval.
8
8
  ---
9
9
 
10
10
  # Agent SDK evals
11
11
 
12
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
13
- host serves the same index at `/docs/llms.txt`.
12
+ Fixed input, model turn, gates on the trajectory. Files live at
13
+ project-root `evals/**/*.eval.ts`. `agent/evals/` is ignored.
14
14
 
15
- Evals are the ratchet that makes iteration trustworthy: a fixed input, a
16
- model turn, and gates over the recorded trajectory. They live at the
17
- **project root** `evals/**/*.eval.ts` (never `agent/evals/` — that slot is
18
- ignored).
19
-
20
- For **live A/B metrics** while the agent serves traffic, use `defineAB`
21
- under `agent/ab` (`packages/agent-serve/skills/ab/SKILL.md`). That plug-in
22
- enrolls via sticky `split` and calls `onSample`; it is not a test runner
23
- and does not replace `defineEval` gates.
24
-
25
- **Identity**
26
-
27
- - File id = path under `evals/` without `.eval.ts`
28
- (`evals/weather.eval.ts` → `weather`).
29
- - Single datapoint (`test`): case id = file id
30
- (`evals/weather/nyc.eval.ts` → `weather/nyc`).
31
- - Multiple datapoints (`cases`): case id = `<fileId>/<case.id>`
32
- (`evals/weather.eval.ts` + `{ id: "nyc" }` → `weather/nyc`).
15
+ Live traffic variants: `skills/ab/SKILL.md`. That is not a test
16
+ runner.
33
17
 
34
18
  ```bash
35
- agent-sdk eval --dir . --list # all datapoints
36
- agent-sdk eval --dir . --json # run all
37
- agent-sdk eval --dir . weather/nyc # one datapoint
38
- agent-sdk eval --dir . weather # every datapoint in that file
39
- agent-sdk eval --dir . weather forecast # several files
19
+ agent-sdk eval --dir . --list
20
+ agent-sdk eval --dir . --json
21
+ agent-sdk eval --dir . weather/nyc
40
22
  agent-sdk eval --dir . --tag smoke
41
- agent-sdk eval --dir . --verbose
42
23
  ```
43
24
 
44
- `eval` (like `run`) boots an ephemeral server on port 0 with a temp state
45
- root outside the project, so cases don't inherit ambient monorepo rules and
46
- don't pollute `.agent-serve/`. Point `--url` at a running server instead to
47
- eval a live agent. Model turns require `CURSOR_API_KEY`.
48
-
49
- ## Seeding / adding samples (required fork)
25
+ | Form | Case id |
26
+ | --- | --- |
27
+ | `evals/weather.eval.ts` + `test` | `weather` |
28
+ | `evals/weather/nyc.eval.ts` + `test` | `weather/nyc` |
29
+ | `evals/weather.eval.ts` + `{ id: "nyc" }` | `weather/nyc` |
50
30
 
51
- Whenever the task is to **create, seed, or expand** eval cases (not merely
52
- run or tweak an existing gate), start with the `AskQuestion` tool. Do not
53
- assume a source of fixtures.
31
+ `eval` boots an ephemeral server and a temp state root. `--url`
32
+ points at a running agent. Model turns need `CURSOR_API_KEY`.
54
33
 
55
- ### Step 1 — who supplies the samples?
34
+ ## Seeding
56
35
 
57
- Use `AskQuestion` (single-select). Put the recommended option first and
58
- label it `(recommended)`. Do **not** put code blocks inside the question
59
- prompt (they render poorly); keep the prompt short plain text.
36
+ Creating or expanding cases: `AskQuestion` first.
60
37
 
61
38
  | Question | Options |
62
39
  | --- | --- |
63
40
  | **How should we get eval samples?** | Generate test eval samples for me `(recommended)` · I will add / upload the data manually |
64
41
 
65
- If `AskQuestion` is unavailable, ask the same fork in plain chat and wait.
66
-
67
- ### Step 2a user chose manual
68
-
69
- Tell the user the **shape** of the data (see “The API” below) and **how to
70
- upload it**. Do not invent cases until they provide files (or paste content
71
- to write). After they add data, run `agent-sdk eval --dir <project>
72
- --list` to confirm discovery, then wire any missing gates.
73
-
74
- If the uploaded data is **API-backed** (PR URLs, pinned SHAs, gold labels,
75
- snapshot ids) rather than self-contained prompts/diffs, **materialize
76
- fixtures first** — see “When eval data needs API calls to render” below.
77
-
78
- **How to upload:**
79
-
80
- 1. Add or edit `.eval.ts` files under the project’s `evals/` directory.
81
- 2. Ensure `evals/evals.config.ts` exists with `maxConcurrency`.
82
- 3. Optional fixtures beside the case or under `fixtures/`.
83
- 4. Tell the agent once the files are in place — or paste case bodies in chat
84
- and ask the agent to write the file.
85
- 5. Verify: `agent-sdk eval --dir <project> --list` shows the new ids.
86
-
87
- ### Step 2b — user chose agent-generated samples
88
-
89
- 1. Use `AskQuestion` again for count (single-select), recommended first:
90
-
91
- | Question | Options |
92
- | --- | --- |
93
- | **How many test samples should I create?** | `3` `(recommended)` · `5` · `10` · Other (enter a number) |
94
-
95
- 2. Inspect the agent (tools, instructions, existing `evals/`) and invent
96
- that many **distinct** datapoints: frozen prompts + decision/shape gates,
97
- not exact prose. Follow “What good cases assert” below.
98
- 3. **Append** — prefer adding entries to an existing file’s `cases` array
99
- when the suite fits; otherwise create a new `evals/<suite>.eval.ts` with
100
- `cases`. Never overwrite or weaken an existing datapoint. Case ids must
101
- not collide with `agent-sdk eval --dir <project> --list`.
102
- 4. Create `evals/evals.config.ts` if missing (`maxConcurrency: 20` is fine
103
- for now; hard limit 200 for model provider request limits).
104
- 5. Re-list to confirm, then optionally run `--tag smoke` if you tagged any.
42
+ 1. **Manual.** They provide files or paste. Show the shape below.
43
+ Do not invent cases. Then `eval --list` and wire gates.
44
+ API-backed pointers (PR URLs, SHAs, gold labels): materialize
45
+ under `fixtures/` first.
46
+ 2. **Generated.** Ask count (`3` recommended). Append to an
47
+ existing `cases` array when it fits. Never overwrite or weaken
48
+ a datapoint. Create `evals/evals.config.ts` if missing
49
+ (`maxConcurrency: 20`; cap 200).
105
50
 
106
- ## The API
51
+ ## API
107
52
 
108
53
  ```ts
109
- import { defineEval, includes, equals, satisfies } from "@cursor/july/evals";
54
+ import { defineEval, includes, satisfies } from "@cursor/july/evals";
110
55
 
111
- // Single datapoint (case id = file path under evals/)
112
- export default defineEval({
113
- description: "Uses get_weather for temperature questions.",
114
- tags: ["smoke"],
115
- timeoutMs: 120_000,
116
- async test(t) {
117
- await t.send("What's the temperature in NYC?");
118
- t.succeeded();
119
- t.calledTool("get_weather");
120
- t.notCalledTool("save_weather_note");
121
- t.messageIncludes(/°|[FC]/);
122
- t.check(t.reply, includes("NYC"));
123
- },
124
- });
125
-
126
- // Multiple datapoints in one file (ids = <fileId>/<case.id>)
127
56
  export default defineEval({
128
57
  tags: ["smoke", "weather"],
129
58
  cases: [
@@ -134,100 +63,46 @@ export default defineEval({
134
63
  await t.send("What's the temperature in NYC?");
135
64
  t.succeeded();
136
65
  t.calledTool("get_weather");
66
+ t.notCalledTool("save_weather_note");
137
67
  t.check(t.reply, includes(/°|[FC]/));
138
68
  },
139
69
  },
140
- {
141
- id: "paris",
142
- async test(t) {
143
- await t.send("What's the weather in Paris?");
144
- t.succeeded();
145
- t.calledTool("get_weather");
146
- },
147
- },
148
70
  ],
149
71
  });
150
72
  ```
151
73
 
152
- Project-wide defaults in `evals/evals.config.ts` (required once):
153
-
154
74
  ```ts
155
- import {
156
- defineEvalConfig,
157
- persistEvalRunsToDir,
158
- } from "@cursor/july/evals";
75
+ import { defineEvalConfig } from "@cursor/july/evals";
159
76
 
160
77
  export default defineEvalConfig({
161
- maxConcurrency: 20, // required; hard-capped at 200 (model provider limits)
162
- // Playground batches are memory-only unless you set persistRuns:
163
- // maxPlaygroundRuns: 50, // optional; default 20; playground history only
164
- // persistRuns: persistEvalRunsToDir(".agent-serve/eval-runs"),
78
+ maxConcurrency: 20,
165
79
  });
166
80
  ```
167
81
 
168
- - Either a single `test(t)` **or** a `cases: [{ id, test }, …]` array not
169
- both. Prefer `cases` for multiple related datapoints.
170
- - `t.send(message, options?)` runs one turn and waits for park/fail.
171
- Options: `workspaceDir`, `workspaceFiles` (`{ path: contents }` seeded
172
- before the first turn). Multiple `t.send` calls share the session.
173
- - `t.reply` / `t.events` / `t.sessionId` for assertions and correlation.
174
- - `t.metric(name, value)` — structured scores on the case snapshot (playground
175
- badges + CLI). Prefer this over encoding scores only in `t.log`.
176
- - Builders: `includes(string | RegExp)`, `equals(value)`,
177
- `satisfies(predicate, label)`.
178
-
179
- ### Playground customization (optional)
180
-
181
- Drop `agent/playground/evals.tsx` exporting `agentName` (must match
182
- `defineAgent({ name })`) and
183
- `default: { RunSummary?, CaseMetrics?, CaseExtras? }`. The playground
184
- loads these via Vite glob (`factory/*`). Without a
185
- module, cases still show default `t.metric` badges.
186
-
187
- ## What good cases assert
188
-
189
- Gate **decisions and shape, not prose**. Model wording varies run to run;
190
- tool choice, tool avoidance, and output structure shouldn't.
191
-
192
- 1. `t.succeeded()` — always, first.
193
- 2. The tool decision: `calledTool` for the intended path, `notCalledTool`
194
- for the tempting wrong one (the pair is stronger than either alone).
195
- 3. Output shape: a regex for the contract (`/°|[FC]/`, a JSON marker, a
196
- findings-block fence) — not exact sentences.
197
- 4. For structured output, parse `t.reply` and `t.check` fields with
198
- `satisfies` rather than substring-matching JSON.
199
- 5. When a shape gate keeps failing on model formatting, tighten the output
200
- contract in instructions and re-run — do not move rendering into a host
201
- tool to make the gate pass. That trades a prompt fix for permanent code.
202
-
203
- Anti-patterns: asserting exact phrasing; more than ~5 gates in one case
204
- (split it); cases that depend on live external state that drifts (pin the
205
- input instead — see fixtures).
206
-
207
- ## Fixture strategy by agent type
208
-
209
- | Agent surface | Fixture source |
210
- | --- | --- |
211
- | Chat / domain assistant | A canonical prompt string, chosen once and frozen |
212
- | Tool-heavy | `agent-sdk call <tool> --dir . --input '{...}'` first, then the prompt that should trigger it |
213
- | GitHub webhook | `github replay … --dry-run --out fixtures/github` (see `packages/agent-serve/skills/github/SKILL.md`) |
214
- | PR reviewer with host prep | A small fixed PR the team controls; assert on findings shape, not counts |
215
- | Workspace-dependent | `workspaceFiles` in `t.send` — never machine-local paths |
82
+ Either `test(t)` or `cases`, not both. `t.send` waits for park/fail.
83
+ `workspaceFiles` seeds the first turn. Assert with `t.succeeded()`,
84
+ `calledTool` / `notCalledTool`, `t.check(t.reply, )`, `t.metric`.
216
85
 
217
- ### When eval data needs API calls to render (rate limits)
86
+ ## What to gate
218
87
 
219
- If samples are **pointers** (PR URL, SHAs, `gold_labels`) rather than
220
- self-contained evidence, do **not** wire live `t.send(prUrl)` matrices.
221
- Materialize once under `fixtures/` at pinned SHAs, point cases at those
222
- files, gate on decision/shape against gold, and keep a tiny `--tag smoke`
223
- subset for any full-pipeline runs.
88
+ Decisions and shape, not prose.
224
89
 
225
- ## The ratchet rule (hillclimbing)
90
+ 1. `t.succeeded()` first
91
+ 2. Intended tool + the tempting wrong one
92
+ 3. A shape regex or `satisfies` on parsed fields
93
+ 4. If formatting keeps failing, tighten instructions. Do not move
94
+ rendering into a host tool.
226
95
 
227
- Every hillclimb round that **keeps** a change must land an eval that would
228
- have failed before the change. Never weaken a gate to make a round pass.
96
+ Anti-patterns: exact phrasing; more than ~5 gates (split); live
97
+ drifting inputs (pin them).
229
98
 
230
- ```ts
231
- const toolResults = t.events.filter((e) => e.type === "action.result");
232
- t.check(toolResults.length, satisfies((n) => (n as number) <= 4, "≤4 tool calls"));
233
- ```
99
+ | Surface | Fixture |
100
+ | --- | --- |
101
+ | Chat | One frozen prompt |
102
+ | Tool-heavy | `agent-sdk call` first, then the prompt |
103
+ | GitHub | `github replay … --dry-run --out fixtures/github` |
104
+ | Host-prep PR review | A team-owned PR; gate findings shape, not counts |
105
+ | Workspace | `workspaceFiles` in `t.send` |
106
+
107
+ Every kept hillclimb change lands an eval that would have failed
108
+ before it. Never weaken a gate to pass a round.