@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,186 +1,63 @@
1
1
  ---
2
2
  name: agentsdk-hillclimb
3
3
  description: >-
4
- Iterate on a specific Agent SDK agent by running the local server,
5
- sending real requests, measuring correctness/efficiency, and proposing
6
- the next harness or prompt change. Read this skill when improving an
7
- existing agent.
8
- paths:
9
- - packages/agent-serve/**/*
4
+ Improve one existing Agent SDK agent: pin fixtures, measure, change
5
+ one lever, remeasure, lock the win with an eval. Use when an agent
6
+ already runs and needs better results.
10
7
  ---
11
8
 
12
9
  # Agent SDK hillclimb
13
10
 
14
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
15
- host serves the same index at `/docs/llms.txt`.
11
+ Measure change one lever → remeasure. One failure mode per round.
16
12
 
17
- Optimize one Agent SDK agent project
18
- with a tight measure → change → remeasure loop. Do not redesign the
19
- whole framework; climb one concrete failure mode at a time. Sibling skills:
20
- `framework-map` (orientation), `evals` (the ratchet), `ab` (live variant
21
- metrics under serve), `github` (deterministic webhook replay), `debug`
22
- (when a run misbehaves rather than underperforms).
13
+ Siblings: `skills/evals/SKILL.md`, `skills/github/SKILL.md`,
14
+ `skills/debug/SKILL.md`.
23
15
 
24
16
  ## Preconditions
25
17
 
26
- Confirm with the user (or take from the invoking message):
18
+ From the user or the invoking message:
27
19
 
28
- 1. **Target agent** — path or slug, e.g. `./my-agent`
29
- 2. **Fixture(s)** fixed inputs to compare across runs (PR URL, webhook
30
- payload, playground prompt, etc.)
31
- 3. **Success criteria** what “better” means this round (fewer tools, faster
32
- wall time, higher finding quality, fewer wrong side-effects, …)
33
- 4. **Freeze line** — what must not change (API contracts, public output shape)
20
+ 1. **Target.** Path or slug
21
+ 2. **Fixtures.** Fixed inputs
22
+ 3. **Success.** What better means this round
23
+ 4. **Freeze line.** What must not change
34
24
 
35
- If those are missing, ask before editing.
25
+ Ask before editing if any are missing. A moving fixture is noise.
36
26
 
37
- ## Make the fixture deterministic first
38
-
39
- A climb over a moving input is noise. Before round 1:
40
-
41
- - **GitHub agents** — replay, don't wait for live events:
42
- `agent-sdk github replay <pr> --dir <project>` synthesizes signed,
43
- GitHub-shaped payloads from read access only, identically every run;
44
- `--dry-run --out fixtures/github` snapshots them for offline replay.
45
- - **Tool behavior** — isolate host tools from the model with
46
- `agent-sdk call <tool> --dir <project> --input '{...}'` (schema-validated,
47
- in-process, no turn). If the tool output is wrong, no prompt change fixes it.
48
- - **Chat agents** — `agent-sdk run --dir <project> --message "<fixture>"`
49
- gives a JSON trajectory plus an NDJSON trace under
50
- `<project>/.agent-serve/traces/`; `agent-sdk trajectory --events <file>`
51
- re-summarizes any saved trace.
52
- - **Manual probes** — the playground Try modal on any channel route
53
- remembers your last body per endpoint and has Copy curl; a successful Try
54
- opens the created session.
55
-
56
- ## Loop
57
-
58
- Repeat until the user stops or fixtures meet the criteria.
59
-
60
- ### 1. Baseline
61
-
62
- - Serve with Node (never Bun):
63
-
64
- ```bash
65
- agent-sdk serve --dir <project> --dev
66
- ```
67
-
68
- - Hit the agent the way a user would (channel HTTP, playground, Slack in
69
- `--dev` if that is the surface under test).
70
-
71
- Custom channels live at `http://127.0.0.1:3000/<slug>/v1/channels/<id>`.
72
- Playground: `http://127.0.0.1:3000/<slug>/playground`.
73
-
74
- - Record for each fixture:
75
- - HTTP/status and wall time
76
- - `sessionId` + playground URL
77
- - final result text / structured output
78
- - tool trajectory from session `events.ndjson` (`actions.requested` /
79
- `action.result`)
80
- - workspace footprint (what the host seeded vs what the model opened)
81
-
82
- Sessions typically live under:
83
-
84
- `<project>/.agent-serve/<slug>/sessions/<sessionId>/`
85
-
86
- ### 2. Reflect
87
-
88
- Score the run on three axes; cite evidence from the trajectory, not vibes.
89
-
90
- | Axis | Ask |
27
+ | Surface | Pin it |
91
28
  | --- | --- |
92
- | **Correctness** | Right answer / findings? Misses? Hallucinated context? |
93
- | **Efficiency** | Tool-call count, redundant reads/greps, fat evidence, latency |
94
- | **Harness fit** | Did the model invent work the host should have done? Escape the intended workspace? Fight the instructions? |
95
-
96
- Name the **single dominant failure mode** for this round (e.g. “full-file dumps
97
- trigger grep loops”, “skill not on disk so model searches the monorepo”).
98
-
99
- ### 3. Propose one change
100
-
101
- Prefer the smallest lever that addresses that failure mode — and check the
102
- subtractive lever first:
103
-
104
- 0. **Deletion** — remove the code, cache, flag, or prompt that caused the
105
- failure. A round that shrinks the agent while holding the metrics is a
106
- win, not a wash.
107
- 1. **Instructions / skills** — tighten procedure, state the output contract
108
- (shape, sections, caps), forbid escape hatches that invite thrash. First
109
- lever for quality, formatting, and wording failures.
110
- 2. **Evidence shape** — trim, split, or order artifacts so the intended file
111
- is primary
112
- 3. **Host prep** — deterministic tools / channel handlers seed only what the
113
- model needs (`workspaceFiles`, channel `callTool`, …). First lever for
114
- tool-wandering and latency failures. Prep evidence and gate side effects;
115
- do **not** move formatting, summarizing, or classification here — that is
116
- the model's job specified badly, and host code is a permanent tax (types,
117
- tests, restarts, drift).
118
- 4. **Tool surface** — remove or gate tools that enable wandering
119
- 5. **Framework changes** only if the agent cannot express the fix otherwise —
120
- but when the gap is plumbing the framework should own (posting, chunking,
121
- auth, retries), extend it or file the gap. A hand-rolled transport
122
- workaround in `agent/lib/` outlives the gap and never flows back.
123
-
124
- State the hypothesis in one sentence: *“If we X, metric Y should move because Z.”*
125
-
126
- ### 4. Apply and remeasure
29
+ | GitHub | `agent-sdk github replay <pr> --dir <project>` (`--dry-run --out fixtures/github`) |
30
+ | One tool | `agent-sdk call <tool> --dir <project> --input '{...}'` |
31
+ | Chat | `agent-sdk run --dir <project> --message "<fixture>"` |
127
32
 
128
- - Implement the change.
129
- - Restart serve if needed (agent project code or package `src/`).
130
- - Re-run the **same** fixtures.
131
- - Diff metrics side-by-side (tools, bytes, time, quality notes).
132
- - Keep the change only if the target metric improves without regressing the
133
- freeze line; otherwise revert or narrow.
134
- - **Ratchet every kept change**: land an eval that would have failed before
135
- it (tool-choice gate, `action.result` count bound, output-shape regex —
136
- see `evals/SKILL.md`), and never weaken an existing gate to make a round
137
- pass. `agent-sdk eval --dir <project> --json` is the regression check
138
- between rounds.
139
-
140
- Present a short round report to the user before starting the next climb.
141
-
142
- ## Measurement tips
143
-
144
- - Prefer `action.result` counts by `toolName` over raw event volume.
145
- - Log paths the model actually read; escape outside the session workspace is a
146
- harness smell.
147
- - Separate **host** work (channel `callTool`, prepare steps) from **model**
148
- tools when blaming latency. The biggest wins this framework has seen came
149
- from moving deterministic work to the host (one PR reviewer's host-prepared
150
- reviews cut ~8-minute tool-wandering turns to ~1 minute), not from prompt
151
- tuning.
152
- - The reverse also holds: every optimization on the deterministic path —
153
- prefetch, fingerprint dedupe, write coalescing, TTL caches — is code, tests,
154
- and flags forever. Add one only against measured pressure (wake volume,
155
- rate-limit hits, model spend) recorded in the round report; when the data
156
- says the cache would rarely hit, don't build it.
157
- - For quality, spot-check against a known-good review or oracle on at least
158
- one fixture; efficiency-only climbs will silently drop findings.
159
- - `turn.failed` with `"turn interrupted"` in a trace means a follow-up or
160
- stop preempted the turn — measurement artifact, not a regression.
161
-
162
- ## Working agreements
163
-
164
- - One failure mode per round — no mixed “also rewrite instructions while
165
- trimming evidence” bundles unless the user asks.
166
- - Climbs accrete; schedule the counter-move. Every few rounds propose a
167
- **shrink round**: dead flags, caches that never hit (the disposition
168
- metrics tell you), host renderers the model could own under an output
169
- contract. The eval suite is exactly what makes deletion safe.
170
- - Keep fixtures fixed until a climb explicitly needs a harder case.
171
- - Use mise/Node workflows already documented for this package; do not introduce
172
- Bun.
173
- - Do not deploy, post real GitHub reviews, or push unless the user asks.
174
- - Commit only when asked.
33
+ ## Loop
175
34
 
176
- ## Round report template
35
+ 1. **Serve.** `agent-sdk serve --dir <project> --mode single --dev`
36
+ Playground: `http://127.0.0.1:3000/playground`.
37
+ 2. **Hit it.** Same path a user would. Record status, wall time,
38
+ `sessionId`, output, and `action.result` counts by `toolName`.
39
+ 3. **Name the failure.** Score correctness, efficiency, harness
40
+ fit. One dominant failure this round.
41
+ 4. **Change one lever.** Smallest first. Delete the code or prompt
42
+ that caused it. Then instructions / skills, evidence shape,
43
+ host prep (`workspaceFiles`, channel `callTool`) for wandering
44
+ and latency (not formatting or judgment), remove or gate
45
+ wandering tools, framework only if the agent cannot express
46
+ the fix. Hypothesis: *If we X, metric Y should move because Z.*
47
+ 5. **Remeasure.** Same fixtures. Keep only if the target metric
48
+ improves and the freeze line holds.
49
+ 6. **Lock.** A kept change gets an eval that would have failed
50
+ before it (`skills/evals/SKILL.md`). Never weaken a gate to
51
+ pass a round.
177
52
 
178
53
  ```markdown
179
- ### Hillclimb round N — <slug>
54
+ ### Hillclimb round N. `<slug>`
180
55
  - Fixture(s): …
181
56
  - Hypothesis: …
182
- - Change: <files / one-liner>
183
- - Before → after: tools …; wall …; evidence …; quality …
57
+ - Change:
58
+ - Before → after: tools …; wall …; quality …
184
59
  - Verdict: keep | revert | narrow
185
- - Next failure mode (if any):
60
+ - Next failure mode:
186
61
  ```
62
+
63
+ Do not deploy or post real GitHub reviews unless asked.
@@ -2,139 +2,80 @@
2
2
  name: agentsdk-mcp-auth
3
3
  description: >-
4
4
  Authorize host MCP OAuth for defineConnection({ url, oauth: true }):
5
- agent-sdk mcp oauth, local mcp-auth.json, --store deployment secrets,
6
- advertiseTools, and egress. Read when wiring or debugging MCP auth.
5
+ agent-sdk mcp oauth, local tokens, --store, advertiseTools, egress.
6
+ Use when wiring or debugging MCP auth.
7
7
  ---
8
8
 
9
- # Host MCP OAuth (mcp auth)
9
+ # Host MCP OAuth
10
10
 
11
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
12
- host serves the same index at `/docs/llms.txt`.
13
-
14
- Use this skill when a human asks to authorize a remote MCP server on an
15
- Agent SDK host, store credentials for Cursor-managed hosting, or debug
16
- `host.mcp` auth failures for `oauth: true` connections.
17
-
18
- Sibling skills: `framework-map` for layout, `create-agent` when scaffolding,
19
- `debug` for unrelated local failures, `operate` for deploy/secrets ops.
20
-
21
- Docs: `docs/guides/mcp-oauth.md`, `docs/reference/connections.md`,
22
- `docs/reference/cli.md#mcp-oauth`.
23
-
24
- ## When to use host OAuth vs account MCP
11
+ Guide: `docs/guides/mcp-oauth.md`.
25
12
 
26
13
  | Need | Use |
27
14
  | --- | --- |
28
- | Connector already in Cursor dashboard (Linear, Notion, …) | `defineConnection({ cursorAccount: true })` or `servers: "*"` for every connected server; `servers: […]` to allowlist |
29
- | Remote URL that speaks OAuth; host must hold tokens | `defineConnection({ url, oauth: true })` + this skill |
30
- | Static bearer / API key | `headers` / env on a plain `{ url }` connection |
31
-
32
- For connectors the model should call by name on local turns (Linear,
33
- Datadog, account MCP), set `advertiseTools: true`. Host tools can still
34
- call the same connection through `ctx.host.mcp`.
35
-
36
- ## Goal checklist
37
-
38
- - [ ] `agent/mcp-connections/<name>.ts` with `url` + `oauth: true` (`advertiseTools` if the model should call it by name). Use `agent/host-connections/<name>.ts` when host tools should call it and the model should not.
39
- - [ ] `hosting.secretNames` lists `MCP_OAUTH_<NAME>_{ACCESS_TOKEN,REFRESH_TOKEN,CLIENT_ID}` when you will `--store`
40
- - [ ] Hosted engines that reach non-bootstrap hosts declare `hosting.egressDomains`
41
- - [ ] Local: `agent-sdk mcp oauth <name>` succeeds
42
- - [ ] Hosted: `agent-sdk mcp oauth <name> --store` then redeploy; `secrets list` shows the names
43
-
44
- ## Phase 0 — Author the connection (agent)
15
+ | Connector already in the Cursor dashboard | `defineConnection({ cursorAccount: true })` or `servers: "*"` / `servers: […]` |
16
+ | Remote URL that speaks OAuth; host holds tokens | `defineConnection({ url, oauth: true })` + this skill |
17
+ | Static bearer / API key | `headers` / env on `{ url }` |
18
+
19
+ `advertiseTools: true` puts named tools on local turns. Host tools
20
+ can still call `ctx.host.mcp`.
21
+
22
+ ## Checklist
23
+
24
+ 1. **Declare the connection.** `agent/mcp-connections/<name>.ts`
25
+ with `url` + `oauth: true`. Use `agent/host-connections/` when
26
+ the model must not see it.
27
+ 2. **Name the secrets** if you will `--store`:
28
+ `hosting.secretNames` lists
29
+ `MCP_OAUTH_<NAME>_{ACCESS_TOKEN,REFRESH_TOKEN,CLIENT_ID}`.
30
+ 3. **Allow egress** on hosted non-bootstrap hosts:
31
+ `hosting.egressDomains`.
32
+ 4. **Authorize.** Local: `agent-sdk mcp oauth <name>`. Hosted:
33
+ `agent-sdk mcp oauth <name> --store` then `agent-sdk deploy`.
34
+ `secrets list` shows the names.
45
35
 
46
36
  ```ts
47
37
  // agent/mcp-connections/inventory.ts
48
- import { defineConnection } from "@cursor/july/connections";
49
-
50
38
  export default defineConnection({
51
39
  url: "https://mcp.example.com/inventory",
52
40
  oauth: true,
53
- description: "Inventory MCP.",
54
41
  });
55
42
  ```
56
43
 
57
- In `agent/agent.ts`:
58
-
59
- ```ts
60
- hosting: {
61
- egressDomains: ["mcp.example.com"], // if hosted + non-bootstrap host
62
- secretNames: [
63
- "MCP_OAUTH_INVENTORY_ACCESS_TOKEN",
64
- "MCP_OAUTH_INVENTORY_REFRESH_TOKEN",
65
- "MCP_OAUTH_INVENTORY_CLIENT_ID",
66
- ],
67
- },
68
- ```
69
-
70
- Naming: connection file `inventory.ts` → env prefix `MCP_OAUTH_INVENTORY`.
71
- Do **not** put `CURSOR_*` or hosted-storage names in `secretNames`.
72
-
73
- Wire privileged calls through host tools:
74
-
75
44
  ```ts
76
- await ctx.host.mcp.callTool("inventory", "list_warehouses", {
77
- region: input.region,
45
+ // agent/agent.ts
46
+ export default defineAgent({
47
+ hosting: {
48
+ secretNames: [
49
+ "MCP_OAUTH_INVENTORY_ACCESS_TOKEN",
50
+ "MCP_OAUTH_INVENTORY_REFRESH_TOKEN",
51
+ "MCP_OAUTH_INVENTORY_CLIENT_ID",
52
+ ],
53
+ egressDomains: ["mcp.example.com"],
54
+ },
78
55
  });
79
56
  ```
80
57
 
81
- Set `advertiseTools: true` when the model should call the server by name
82
- instead of through MCP meta-tools.
83
-
84
- ## Phase 1 — Local authorize (agent + human)
58
+ File `inventory.ts` prefix `MCP_OAUTH_INVENTORY`. Do not put
59
+ `CURSOR_*` names in `secretNames`.
85
60
 
86
61
  ```bash
87
- cd <agent-project>
88
62
  agent-sdk mcp oauth <connection>
89
- ```
90
-
91
- Human completes the browser login. Callback:
92
- `http://localhost:8787/callback`. Tokens:
93
- `~/.config/agent-serve/mcp-auth.json` (or `$AGENT_SERVE_CONFIG_DIR`).
94
-
95
- Already authorized → command prints that and exits 0. URL change →
96
- re-run; resource URL binding drops the old entry.
97
-
98
- ## Phase 2 — Store on the deployment (agent + human)
99
-
100
- Requires `agent-sdk login` (or `CURSOR_API_KEY`) and deploy rights.
101
-
102
- ```bash
103
- agent-sdk mcp oauth <connection> --store [--slug <slug>] [--team <id>]
63
+ agent-sdk mcp oauth <connection> --store [--slug <slug>]
104
64
  agent-sdk secrets list <slug>
105
- agent-sdk deploy # or your usual deploy; secrets apply next deploy
65
+ agent-sdk deploy
106
66
  ```
107
67
 
108
- `--store` upserts access (required), refresh (if present), and client id
109
- (if present). It does not remove unrelated secrets.
110
-
111
- ## Phase 3 Verify (agent)
112
-
113
- Local:
114
-
115
- ```bash
116
- agent-sdk validate --dir .
117
- agent-sdk call <tool-that-uses-host.mcp> --dir .
118
- # or exercise the same path from the playground
119
- ```
120
-
121
- Hosted: confirm egress allowlist includes the MCP host, secrets exist,
122
- redeploy completed, then exercise the same host tool once.
123
-
124
- ## Failure table
68
+ Browser callback: `http://127.0.0.1:8787/callback`. Tokens live in
69
+ the CLI config directory (`mcp-auth.json` or
70
+ `$AGENT_SERVE_CONFIG_DIR`). URL change drops the old entry; re-run.
71
+ `--store` does not restart a running engine.
125
72
 
126
73
  | Symptom | Fix |
127
74
  | --- | --- |
128
- | `must be defineConnection({ url, oauth: true })` | Wrong connection name, or missing `oauth: true` |
129
- | `Unknown MCP connection` | Filename under `agent/mcp-connections/` or `agent/host-connections/` must match CLI arg |
130
- | Callback hang | Free port 8787; finish browser flow on this machine |
131
- | Hosted 401 / unauthorized | `secrets list`; re-run `--store`; redeploy |
132
- | Model invents `mcp_auth` / IDE MCP | Attached MCP is behind meta-tools. Set `advertiseTools: true` for named tools on local turns. |
133
- | Tokens ignored after URL edit | Expected; run `mcp oauth` again for the new resource URL |
134
-
135
- ## Don't
75
+ | `must be defineConnection({ url, oauth: true })` | Wrong name or missing `oauth: true` |
76
+ | `Unknown MCP connection` | Filename must match the CLI arg |
77
+ | Callback hang | Free port 8787; finish the browser flow here |
78
+ | Hosted 401 | `secrets list`; `--store`; redeploy |
79
+ | Model invents `mcp_auth` / IDE MCP | `advertiseTools: true` on local turns |
136
80
 
137
- - Don't put raw OAuth tokens in git or in connection source files
138
- - Don't add `BUGBOTDB_URL` / `AGENT_SERVE_DEPLOYMENT_ID` to `secretNames`
139
- - Don't use Bun for the CLI (use Node / `tsx`)
140
- - Don't expect `--store` alone to restart a running engine; redeploy
81
+ No raw tokens in git.
@@ -1,80 +1,48 @@
1
1
  ---
2
2
  name: agentsdk-otel
3
3
  description: >-
4
- Wire OpenTelemetry export for an Agent SDK agent (defineOtel, OTLP env,
5
- traces/metrics/logs, ctx.host.otel). Use when adding observability,
6
- Datadog/Grafana/OTLP export, session/turn/tool tracing, or custom metrics.
4
+ Wire OpenTelemetry export (defineOtel, OTLP env, traces/metrics/logs,
5
+ ctx.host.otel). Use when adding collector export or custom metrics.
7
6
  ---
8
7
 
9
8
  # Agent SDK OpenTelemetry (`defineOtel`)
10
9
 
11
- Public docs index: `node_modules/@cursor/july/dist/docs/llms.txt`. A running
12
- host serves the same index at `/docs/llms.txt`.
10
+ Push traces and metrics from the serve process to an OTLP
11
+ collector. Logs are off until you opt in.
13
12
 
14
- Push session, turn, tool, and subagent traces, plus token and cost
15
- metrics, from the serve process to an OTLP collector. Logs are off
16
- until you opt in.
17
-
18
- Read [OpenTelemetry](../../docs/guides/opentelemetry.md) for the full
19
- guide, including how this joins Cursor enterprise export.
13
+ Guide: `docs/guides/opentelemetry.md`.
20
14
 
21
15
  ## Enable
22
16
 
23
17
  Any one of:
24
18
 
25
- 1. **Env.** Set `OTEL_EXPORTER_OTLP_ENDPOINT` (and optional
19
+ 1. `OTEL_EXPORTER_OTLP_ENDPOINT` (optional
26
20
  `OTEL_SERVICE_NAME`, `OTEL_EXPORTER_OTLP_HEADERS`,
27
- `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf|http/json`).
28
- Per-signal URLs work when the base URL is unset:
29
- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` / `_METRICS_ENDPOINT` /
30
- `_LOGS_ENDPOINT`.
31
- 2. **Authored.** `agent/otel.ts`:
21
+ `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf|http/json`)
22
+ 2. `agent/otel.ts`:
32
23
 
33
24
  ```ts
34
25
  import { defineOtel } from "@cursor/july/otel";
35
26
 
36
27
  export default defineOtel({
37
28
  serviceName: "cursor",
38
- exporters: [
39
- {
40
- url: "https://otel.example.com",
41
- protocol: "http/protobuf",
42
- headers: { Authorization: "Bearer …" },
43
- },
44
- ],
29
+ exporters: [{ url: "https://otel.example.com", protocol: "http/protobuf" }],
45
30
  });
46
31
  ```
47
32
 
48
- 3. **Programmatic.** `serve(dir, { otel: { … } })`. Pass `otel: false`
49
- to disable even when env or `agent/otel.ts` are set.
50
-
51
- Multiple `exporters` fan out. Default protocol is `http/protobuf`.
52
- Use `http/json` only when the collector requires it. `grpc` is ignored.
53
-
54
- Precedence: `serve({ otel })` over `agent/otel.ts` over env.
55
-
56
- ## Signals
57
-
58
- | Signal | Default | What |
59
- | --- | --- | --- |
60
- | Traces | on | `agent_sdk.http` → `agent_sdk.session` → `agent_sdk.turn` → `agent_sdk.tool` / `agent_sdk.subagent` |
61
- | Metrics | on | `cursor.token.usage`, `cursor.tool.calls`, `cursor.cost.usage`, plus `agent_sdk.*` counts and HTTP duration |
62
- | Logs | off | Opt in with `logs: true`, `OTEL_LOGS_EXPORTER=otlp`, or `OTEL_LOG_USER_PROMPTS=1` / `OTEL_LOG_TOOL_CONTENT=1` |
33
+ 3. `serve(dir, { otel: { … } })`. `otel: false` disables env and
34
+ authored config.
63
35
 
64
- Prompt text, tool payloads, and failure text stay off the wire unless
65
- those flags are set.
36
+ | Signal | Default |
37
+ | --- | --- |
38
+ | Traces | on (`agent_sdk.http` → session → turn → tool / subagent) |
39
+ | Metrics | on (`cursor.token.usage`, `cursor.tool.calls`, `cursor.cost.usage`) |
40
+ | Logs | off (`logs: true` or `OTEL_LOGS_EXPORTER=otlp`) |
66
41
 
67
- ## Custom metrics (`ctx.host.otel`)
42
+ Prompt text and tool payloads stay off the wire unless you set
43
+ `OTEL_LOG_USER_PROMPTS` / `OTEL_LOG_TOOL_CONTENT`.
68
44
 
69
- Always present. `increment` / `record` no-op without a meter.
70
- `setAttributes` still tags the open session when a collector is
71
- attached. Prefix names with team or agent. No custom spans. Reserved
72
- metric names: `cursor.token.usage`, `cursor.tool.calls`,
73
- `cursor.cost.usage`, `agent_sdk.session.count`,
74
- `agent_sdk.turn.count`, `agent_sdk.subagent.count`,
75
- `agent_sdk.http.duration`. Reserved attributes:
76
- `cursor.conversation.id`, `agent_sdk.agent`, `agent_sdk.turn_id`,
77
- `agent_sdk.framework`.
45
+ ## Custom metrics
78
46
 
79
47
  ```ts
80
48
  ctx.host.otel.setAttributes({ "abc.ticket_id": "INC-123" });
@@ -82,20 +50,6 @@ ctx.host.otel.increment("abc.ticket.resolved");
82
50
  ctx.host.otel.record("abc.approval.duration_ms", 1420);
83
51
  ```
84
52
 
85
- ## Attributes worth joining on
86
-
87
- - `cursor.conversation.id` (session id)
88
- - `cursor.tool.name` / `cursor.tool.kind` / `cursor.tool.status`
89
- - `cursor.token.type`, `cursor.model.name`
90
- - `agent_sdk.agent`, `agent_sdk.turn_id`, `agent_sdk.call_id`, `agent_sdk.channel`
91
-
92
- Resource defaults: `service.name=cursor`, `cursor.entrypoint=sdk_ts`,
93
- `cursor.surface=unspecified`.
94
-
95
- Inbound HTTP extracts W3C `traceparent`, so a channel request parents
96
- the session span when the turn starts in that request.
97
-
98
- If another TracerProvider already owns the process (CLI / IDE), Agent
99
- SDK reuses it. Run `serve` as its own process when Agent SDK should
100
- own the destination. Conflicting `agent/otel.ts` files across mounts
101
- fail at serve start.
53
+ Prefix names with team or agent. No custom spans. Join on
54
+ `cursor.conversation.id` and `agent_sdk.agent`. Run `serve` as its
55
+ own process when Agent SDK should own the destination.