@cursor/july 0.1.92 → 0.1.94

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 (448) hide show
  1. package/AGENTS.md +8 -20
  2. package/README.md +115 -182
  3. package/dist/channels/deployments/deployments-channel.d.ts +7 -0
  4. package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
  5. package/dist/channels/deployments/deployments-channel.js +26 -2
  6. package/dist/channels/deployments/types.d.ts +8 -0
  7. package/dist/channels/deployments/types.d.ts.map +1 -1
  8. package/dist/channels/github/github-channel.d.ts +3 -0
  9. package/dist/channels/github/github-channel.d.ts.map +1 -1
  10. package/dist/channels/github/github-channel.js +28 -56
  11. package/dist/channels/slack/attachments.js +2 -2
  12. package/dist/channels/slack/dispatch.d.ts +0 -7
  13. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  14. package/dist/channels/slack/dispatch.js +4 -7
  15. package/dist/channels/slack/eval-directive.d.ts +5 -12
  16. package/dist/channels/slack/eval-directive.d.ts.map +1 -1
  17. package/dist/channels/slack/eval-directive.js +8 -19
  18. package/dist/channels/slack/index.d.ts +0 -6
  19. package/dist/channels/slack/index.d.ts.map +1 -1
  20. package/dist/channels/slack/index.js +0 -6
  21. package/dist/channels/slack/setup.d.ts +4 -4
  22. package/dist/channels/slack/setup.d.ts.map +1 -1
  23. package/dist/channels/slack/setup.js +8 -15
  24. package/dist/channels/slack/slack-channel.d.ts +6 -13
  25. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  26. package/dist/channels/slack/slack-channel.js +15 -101
  27. package/dist/channels/slack/types.d.ts +12 -79
  28. package/dist/channels/slack/types.d.ts.map +1 -1
  29. package/dist/channels/slack/types.js +1 -15
  30. package/dist/client.d.ts +14 -0
  31. package/dist/client.d.ts.map +1 -0
  32. package/dist/client.js +12 -0
  33. package/dist/connections.d.ts +18 -9
  34. package/dist/connections.d.ts.map +1 -1
  35. package/dist/connections.js +17 -8
  36. package/dist/continuation.d.ts +1 -1
  37. package/dist/continuation.js +1 -1
  38. package/dist/docs/404.html +2 -2
  39. package/dist/docs/ab.html +8 -8
  40. package/dist/docs/ab.md +7 -13
  41. package/dist/docs/assets/{ab.md.CVzWxLoB.js → ab.md.DJo5r4R-.js} +4 -4
  42. package/dist/docs/assets/{ab.md.CVzWxLoB.lean.js → ab.md.DJo5r4R-.lean.js} +1 -1
  43. package/dist/docs/assets/{app.Bci6CM9E.js → app.CFDEas4I.js} +1 -1
  44. package/dist/docs/assets/building-with-agents.md.DI4mEzlt.js +13 -0
  45. package/dist/docs/assets/{building-with-agents.md.DH8A_cHA.lean.js → building-with-agents.md.DI4mEzlt.lean.js} +1 -1
  46. package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +1 -0
  47. package/dist/docs/assets/chunks/{VPLocalSearchBox.BCPT6xA-.js → VPLocalSearchBox.B1IIYpYS.js} +1 -1
  48. package/dist/docs/assets/chunks/{theme.BEA8BF3c.js → theme.Ct4NSiLm.js} +2 -2
  49. package/dist/docs/assets/concepts.md.lwAgBIMI.js +1 -0
  50. package/dist/docs/assets/{concepts.md.CRfU3bVg.lean.js → concepts.md.lwAgBIMI.lean.js} +1 -1
  51. package/dist/docs/assets/{deployment.md.DX_hc3ze.js → deployment.md.D9msOFOW.js} +9 -14
  52. package/dist/docs/assets/{deployment.md.DX_hc3ze.lean.js → deployment.md.D9msOFOW.lean.js} +1 -1
  53. package/dist/docs/assets/{evals.md.a0SMN6r9.js → evals.md.lfJoEVc8.js} +6 -6
  54. package/dist/docs/assets/{evals.md.a0SMN6r9.lean.js → evals.md.lfJoEVc8.lean.js} +1 -1
  55. package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.js → guides_agent-to-agent.md.BDb0t1QV.js} +2 -2
  56. package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.js +9 -0
  57. package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.lean.js +1 -0
  58. package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.js → guides_convert-automation.md.B4sjlodG.js} +2 -2
  59. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.js → guides_github.md.Cnh2mL4a.js} +5 -5
  60. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.lean.js → guides_github.md.Cnh2mL4a.lean.js} +1 -1
  61. package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.js → guides_mcp-oauth.md.DPYmBCbV.js} +7 -9
  62. package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.lean.js → guides_mcp-oauth.md.DPYmBCbV.lean.js} +1 -1
  63. package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.js → guides_slack.md.C32HsdKk.js} +7 -13
  64. package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +1 -0
  65. package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.js → guides_webhooks.md.DKdA43Qm.js} +2 -2
  66. package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.js → hillclimbing.md.DhESf3OO.js} +1 -1
  67. package/dist/docs/assets/index.md.DRakGHFe.js +5 -0
  68. package/dist/docs/assets/{index.md.BAaMXLFd.lean.js → index.md.DRakGHFe.lean.js} +1 -1
  69. package/dist/docs/assets/{quickstart.md.DsrarzEg.js → quickstart.md.Nj_LjW_a.js} +2 -2
  70. package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.js → reference_agent-config.md.Cp_x38Nl.js} +3 -3
  71. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.js → reference_channels.md.Cd2f2iyV.js} +2 -2
  72. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.lean.js → reference_channels.md.Cd2f2iyV.lean.js} +1 -1
  73. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.js → reference_cli.md.Cw6_ICYG.js} +10 -11
  74. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.lean.js → reference_cli.md.Cw6_ICYG.lean.js} +1 -1
  75. package/dist/docs/assets/{reference_connections.md.DYidrb-j.js → reference_connections.md.BH8Oc0D0.js} +7 -7
  76. package/dist/docs/assets/{reference_connections.md.DYidrb-j.lean.js → reference_connections.md.BH8Oc0D0.lean.js} +1 -1
  77. package/dist/docs/assets/reference_hooks.md.a8BJxMR5.js +14 -0
  78. package/dist/docs/assets/{reference_hooks.md.B9FSgdDe.lean.js → reference_hooks.md.a8BJxMR5.lean.js} +1 -1
  79. package/dist/docs/assets/reference_http-api.md.D89k1mdm.js +11 -0
  80. package/dist/docs/assets/reference_http-api.md.D89k1mdm.lean.js +1 -0
  81. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.js → reference_instructions.md.CR7XSsGk.js} +3 -3
  82. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.lean.js → reference_instructions.md.CR7XSsGk.lean.js} +1 -1
  83. package/dist/docs/assets/reference_playground.md.DnX5nL-B.js +1 -0
  84. package/dist/docs/assets/reference_playground.md.DnX5nL-B.lean.js +1 -0
  85. package/dist/docs/assets/reference_project-layout.md.Bv4KOtlB.js +19 -0
  86. package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.js → reference_prompt.md.DnaD5dNK.js} +1 -1
  87. package/dist/docs/assets/{reference_schedules.md.DNipebiG.js → reference_schedules.md.DI_JrHgq.js} +1 -1
  88. package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +1 -0
  89. package/dist/docs/assets/{reference_sessions.md.tUFzz98S.lean.js → reference_sessions.md.D0mIh4KK.lean.js} +1 -1
  90. package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.js → reference_skills.md.8son6Hjm.js} +4 -4
  91. package/dist/docs/assets/{reference_subagents.md.Xoav0AII.js → reference_subagents.md.CfsIloPm.js} +1 -1
  92. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.js → reference_tools.md.BHeXn2id.js} +3 -3
  93. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.lean.js → reference_tools.md.BHeXn2id.lean.js} +1 -1
  94. package/dist/docs/assets/scaffolding-agents.md.D7UUkWw0.js +1 -0
  95. package/dist/docs/assets/{scaffolding-agents.md.CRDDUtYJ.lean.js → scaffolding-agents.md.D7UUkWw0.lean.js} +1 -1
  96. package/dist/docs/assets/{storage.md.JbjlHWZ6.js → storage.md.BOHeqk2M.js} +5 -5
  97. package/dist/docs/assets/{storage.md.JbjlHWZ6.lean.js → storage.md.BOHeqk2M.lean.js} +1 -1
  98. package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.js → templates_agentic-owners.md.DqtPdm6f.js} +2 -2
  99. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.js → templates_pr-autofixer.md.DU7dQpor.js} +2 -2
  100. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.lean.js → templates_pr-autofixer.md.DU7dQpor.lean.js} +1 -1
  101. package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.js → templates_security-reviewer.md.CTa7u_l1.js} +2 -2
  102. package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.lean.js → templates_security-reviewer.md.CTa7u_l1.lean.js} +1 -1
  103. package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +1 -0
  104. package/dist/docs/assets/{troubleshooting.md.DYECCZiJ.lean.js → troubleshooting.md.Ctv3T8C2.lean.js} +1 -1
  105. package/dist/docs/building-with-agents.html +7 -7
  106. package/dist/docs/building-with-agents.md +5 -11
  107. package/dist/docs/concepts.html +5 -8
  108. package/dist/docs/concepts.md +13 -17
  109. package/dist/docs/deployment.html +13 -18
  110. package/dist/docs/deployment.md +9 -30
  111. package/dist/docs/design/agsh.md +406 -0
  112. package/dist/docs/evals.html +10 -10
  113. package/dist/docs/evals.md +16 -37
  114. package/dist/docs/guides/agent-to-agent.html +6 -6
  115. package/dist/docs/guides/agent-to-agent.md +3 -3
  116. package/dist/docs/guides/cloud-runtime.html +6 -6
  117. package/dist/docs/guides/cloud-runtime.md +9 -25
  118. package/dist/docs/guides/convert-automation.html +7 -7
  119. package/dist/docs/guides/convert-automation.md +4 -4
  120. package/dist/docs/guides/github.html +9 -9
  121. package/dist/docs/guides/github.md +16 -28
  122. package/dist/docs/guides/human-in-the-loop.html +4 -4
  123. package/dist/docs/guides/mcp-oauth.html +11 -13
  124. package/dist/docs/guides/mcp-oauth.md +14 -22
  125. package/dist/docs/guides/opentelemetry.html +5 -5
  126. package/dist/docs/guides/slack.html +11 -17
  127. package/dist/docs/guides/slack.md +13 -50
  128. package/dist/docs/guides/webhooks.html +6 -6
  129. package/dist/docs/guides/webhooks.md +3 -3
  130. package/dist/docs/hashmap.json +1 -1
  131. package/dist/docs/hillclimbing.html +6 -6
  132. package/dist/docs/hillclimbing.md +1 -1
  133. package/dist/docs/index.html +6 -6
  134. package/dist/docs/index.md +0 -36
  135. package/dist/docs/llms-full.txt +965 -3633
  136. package/dist/docs/llms.txt +3 -18
  137. package/dist/docs/quickstart.html +6 -6
  138. package/dist/docs/quickstart.md +3 -4
  139. package/dist/docs/reference/agent-config.html +8 -8
  140. package/dist/docs/reference/agent-config.md +10 -15
  141. package/dist/docs/reference/artifacts.html +4 -4
  142. package/dist/docs/reference/channels.html +6 -6
  143. package/dist/docs/reference/channels.md +20 -31
  144. package/dist/docs/reference/cli.html +14 -15
  145. package/dist/docs/reference/cli.md +29 -38
  146. package/dist/docs/reference/connections.html +11 -11
  147. package/dist/docs/reference/connections.md +24 -25
  148. package/dist/docs/reference/hooks.html +6 -6
  149. package/dist/docs/reference/hooks.md +12 -17
  150. package/dist/docs/reference/http-api.html +7 -7
  151. package/dist/docs/reference/http-api.md +25 -37
  152. package/dist/docs/reference/instructions.html +6 -6
  153. package/dist/docs/reference/instructions.md +1 -1
  154. package/dist/docs/reference/playground.html +5 -5
  155. package/dist/docs/reference/playground.md +14 -19
  156. package/dist/docs/reference/project-layout.html +9 -7
  157. package/dist/docs/reference/project-layout.md +7 -3
  158. package/dist/docs/reference/prompt.html +6 -6
  159. package/dist/docs/reference/prompt.md +1 -1
  160. package/dist/docs/reference/schedules.html +6 -6
  161. package/dist/docs/reference/schedules.md +1 -2
  162. package/dist/docs/reference/sessions.html +5 -12
  163. package/dist/docs/reference/sessions.md +8 -19
  164. package/dist/docs/reference/skills.html +8 -8
  165. package/dist/docs/reference/skills.md +3 -3
  166. package/dist/docs/reference/subagents.html +6 -6
  167. package/dist/docs/reference/subagents.md +2 -2
  168. package/dist/docs/reference/tools.html +8 -8
  169. package/dist/docs/reference/tools.md +30 -19
  170. package/dist/docs/scaffolding-agents.html +5 -5
  171. package/dist/docs/scaffolding-agents.md +4 -5
  172. package/dist/docs/storage.html +9 -9
  173. package/dist/docs/storage.md +37 -80
  174. package/dist/docs/templates/agentic-owners.html +7 -7
  175. package/dist/docs/templates/agentic-owners.md +2 -2
  176. package/dist/docs/templates/demo.html +4 -4
  177. package/dist/docs/templates/pr-autofixer.html +6 -6
  178. package/dist/docs/templates/pr-autofixer.md +7 -9
  179. package/dist/docs/templates/security-reviewer.html +5 -5
  180. package/dist/docs/templates/security-reviewer.md +2 -3
  181. package/dist/docs/templates/triage.html +4 -4
  182. package/dist/docs/troubleshooting.html +5 -5
  183. package/dist/docs/troubleshooting.md +8 -8
  184. package/dist/index.d.ts +1 -1
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +1 -1
  187. package/dist/internal/advertise-tools.d.ts +11 -0
  188. package/dist/internal/advertise-tools.d.ts.map +1 -1
  189. package/dist/internal/advertise-tools.js +47 -9
  190. package/dist/internal/authored-alias-hooks.d.ts +14 -11
  191. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  192. package/dist/internal/authored-alias-hooks.js +14 -11
  193. package/dist/internal/authored-loaders.d.ts +7 -6
  194. package/dist/internal/authored-loaders.d.ts.map +1 -1
  195. package/dist/internal/authored-loaders.js +14 -10
  196. package/dist/internal/cli-deploy.d.ts +1 -1
  197. package/dist/internal/cli-deploy.js +5 -5
  198. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  199. package/dist/internal/cli-mcp-oauth.js +7 -4
  200. package/dist/internal/continuation-channel.d.ts +6 -3
  201. package/dist/internal/continuation-channel.d.ts.map +1 -1
  202. package/dist/internal/continuation-channel.js +44 -40
  203. package/dist/internal/continuation-identity.d.ts +17 -16
  204. package/dist/internal/continuation-identity.d.ts.map +1 -1
  205. package/dist/internal/continuation-identity.js +109 -36
  206. package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
  207. package/dist/internal/convert-automation/convert-workflow.js +26 -15
  208. package/dist/internal/convert-automation/slug.d.ts +0 -2
  209. package/dist/internal/convert-automation/slug.d.ts.map +1 -1
  210. package/dist/internal/convert-automation/slug.js +0 -8
  211. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  212. package/dist/internal/cursor/account-mcp.js +5 -1
  213. package/dist/internal/deploy-manifest.d.ts +2 -2
  214. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  215. package/dist/internal/deploy-manifest.js +4 -9
  216. package/dist/internal/discovery.d.ts.map +1 -1
  217. package/dist/internal/discovery.js +91 -13
  218. package/dist/internal/distribution.d.ts +4 -3
  219. package/dist/internal/distribution.d.ts.map +1 -1
  220. package/dist/internal/distribution.js +4 -3
  221. package/dist/internal/hosted-delivery-protocol.d.ts +38 -0
  222. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
  223. package/dist/internal/hosted-delivery-protocol.js +70 -0
  224. package/dist/internal/hosted-delivery.d.ts +35 -0
  225. package/dist/internal/hosted-delivery.d.ts.map +1 -0
  226. package/dist/internal/hosted-delivery.js +239 -0
  227. package/dist/internal/http-channel.d.ts.map +1 -1
  228. package/dist/internal/http-channel.js +1 -1
  229. package/dist/internal/mcp-endpoint.js +3 -3
  230. package/dist/internal/mcp-host.d.ts +8 -7
  231. package/dist/internal/mcp-host.d.ts.map +1 -1
  232. package/dist/internal/mcp-host.js +8 -7
  233. package/dist/internal/peer-connections.d.ts.map +1 -1
  234. package/dist/internal/peer-connections.js +5 -1
  235. package/dist/internal/playground/static.d.ts +0 -3
  236. package/dist/internal/playground/static.d.ts.map +1 -1
  237. package/dist/internal/resolved-connections.d.ts.map +1 -1
  238. package/dist/internal/resolved-connections.js +5 -7
  239. package/dist/internal/review-comments.d.ts +186 -63
  240. package/dist/internal/review-comments.d.ts.map +1 -1
  241. package/dist/internal/review-comments.js +350 -168
  242. package/dist/internal/server.d.ts.map +1 -1
  243. package/dist/internal/server.js +134 -175
  244. package/dist/internal/session-engine.d.ts +50 -10
  245. package/dist/internal/session-engine.d.ts.map +1 -1
  246. package/dist/internal/session-engine.js +221 -68
  247. package/dist/internal/shallow-clone.d.ts +8 -2
  248. package/dist/internal/shallow-clone.d.ts.map +1 -1
  249. package/dist/internal/shallow-clone.js +17 -10
  250. package/dist/internal/tool-catalog.d.ts +31 -0
  251. package/dist/internal/tool-catalog.d.ts.map +1 -0
  252. package/dist/internal/tool-catalog.js +67 -0
  253. package/dist/playground/assets/{index-DDvyC2z6.js → index-B3JCyigB.js} +2 -2
  254. package/dist/playground/index.html +1 -1
  255. package/dist/types.d.ts +81 -40
  256. package/dist/types.d.ts.map +1 -1
  257. package/dist/types.js +19 -0
  258. package/docs/README.md +0 -36
  259. package/docs/ab.md +7 -13
  260. package/docs/building-with-agents.md +5 -11
  261. package/docs/concepts.md +13 -17
  262. package/docs/deployment.md +9 -30
  263. package/docs/design/agsh.md +406 -0
  264. package/docs/evals.md +16 -37
  265. package/docs/guides/agent-to-agent.md +3 -3
  266. package/docs/guides/cloud-runtime.md +9 -25
  267. package/docs/guides/convert-automation.md +4 -4
  268. package/docs/guides/github.md +16 -28
  269. package/docs/guides/mcp-oauth.md +14 -22
  270. package/docs/guides/slack.md +14 -51
  271. package/docs/guides/webhooks.md +3 -3
  272. package/docs/hillclimbing.md +1 -1
  273. package/docs/quickstart.md +3 -4
  274. package/docs/reference/agent-config.md +10 -15
  275. package/docs/reference/channels.md +20 -31
  276. package/docs/reference/cli.md +29 -38
  277. package/docs/reference/connections.md +24 -25
  278. package/docs/reference/hooks.md +12 -17
  279. package/docs/reference/http-api.md +26 -38
  280. package/docs/reference/instructions.md +1 -1
  281. package/docs/reference/playground.md +14 -19
  282. package/docs/reference/project-layout.md +7 -3
  283. package/docs/reference/prompt.md +1 -1
  284. package/docs/reference/schedules.md +1 -2
  285. package/docs/reference/sessions.md +8 -19
  286. package/docs/reference/skills.md +3 -3
  287. package/docs/reference/subagents.md +2 -2
  288. package/docs/reference/tools.md +30 -19
  289. package/docs/scaffolding-agents.md +4 -5
  290. package/docs/storage.md +37 -80
  291. package/docs/templates/agentic-owners.md +2 -2
  292. package/docs/templates/pr-autofixer.md +7 -9
  293. package/docs/templates/security-reviewer.md +2 -3
  294. package/docs/troubleshooting.md +8 -8
  295. package/package.json +16 -2
  296. package/skills/create-agent/SKILL.md +6 -13
  297. package/skills/debug/SKILL.md +2 -4
  298. package/skills/evals/SKILL.md +1 -1
  299. package/skills/framework-map/SKILL.md +3 -2
  300. package/skills/mcp-auth/SKILL.md +10 -13
  301. package/skills/setup-slack/SKILL.md +21 -137
  302. package/src/channels/deployments/deployments-channel.ts +32 -2
  303. package/src/channels/deployments/types.ts +8 -0
  304. package/src/channels/github/github-channel.ts +71 -21
  305. package/src/channels/slack/attachments.ts +2 -2
  306. package/src/channels/slack/dispatch.ts +2 -16
  307. package/src/channels/slack/eval-directive.ts +8 -27
  308. package/src/channels/slack/index.ts +0 -6
  309. package/src/channels/slack/setup.ts +8 -15
  310. package/src/channels/slack/slack-channel.ts +14 -125
  311. package/src/channels/slack/types.ts +12 -96
  312. package/src/client.ts +23 -0
  313. package/src/connections.ts +20 -7
  314. package/src/continuation.ts +1 -1
  315. package/src/index.ts +2 -0
  316. package/src/internal/advertise-tools.ts +45 -7
  317. package/src/internal/authored-alias-hooks.ts +14 -11
  318. package/src/internal/authored-loaders.ts +14 -10
  319. package/src/internal/cli-deploy.ts +5 -5
  320. package/src/internal/cli-mcp-oauth.ts +6 -4
  321. package/src/internal/continuation-channel.ts +62 -45
  322. package/src/internal/continuation-identity.ts +123 -38
  323. package/src/internal/convert-automation/convert-workflow.ts +29 -17
  324. package/src/internal/convert-automation/slug.ts +0 -9
  325. package/src/internal/cursor/account-mcp.ts +4 -1
  326. package/src/internal/deploy-manifest.ts +5 -9
  327. package/src/internal/discovery.ts +107 -13
  328. package/src/internal/distribution.ts +4 -3
  329. package/src/internal/fixtures/units-server.ts +52 -0
  330. package/src/internal/hosted-delivery-protocol.ts +114 -0
  331. package/src/internal/hosted-delivery.ts +359 -0
  332. package/src/internal/http-channel.ts +0 -2
  333. package/src/internal/mcp-endpoint.ts +3 -3
  334. package/src/internal/mcp-host.ts +8 -7
  335. package/src/internal/peer-connections.ts +4 -1
  336. package/src/internal/playground/static.ts +1 -3
  337. package/src/internal/resolved-connections.ts +8 -10
  338. package/src/internal/review-comments.ts +542 -229
  339. package/src/internal/server.ts +180 -253
  340. package/src/internal/session-engine.ts +279 -70
  341. package/src/internal/shallow-clone.ts +30 -16
  342. package/src/internal/tool-catalog.ts +106 -0
  343. package/src/types.ts +99 -40
  344. package/templates/pr-autofixer/agent/channels/slack.ts +8 -2
  345. package/templates/triage/README.md +2 -1
  346. package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +0 -1
  347. package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +0 -1
  348. package/dist/channels/slack/cursor-account.d.ts +0 -87
  349. package/dist/channels/slack/cursor-account.d.ts.map +0 -1
  350. package/dist/channels/slack/cursor-account.js +0 -100
  351. package/dist/docs/assets/building-with-agents.md.DH8A_cHA.js +0 -13
  352. package/dist/docs/assets/chunks/@localSearchIndexroot.Dv-Q0XtU.js +0 -1
  353. package/dist/docs/assets/concepts.md.CRfU3bVg.js +0 -4
  354. package/dist/docs/assets/example-agents_approval-buddy.md.DNL83puR.js +0 -10
  355. package/dist/docs/assets/example-agents_approval-buddy.md.DNL83puR.lean.js +0 -1
  356. package/dist/docs/assets/example-agents_benny.md.C40vHRLc.js +0 -7
  357. package/dist/docs/assets/example-agents_benny.md.C40vHRLc.lean.js +0 -1
  358. package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.js +0 -11
  359. package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.lean.js +0 -1
  360. package/dist/docs/assets/example-agents_codebase-wiki.md.Dftj_tPp.js +0 -8
  361. package/dist/docs/assets/example-agents_codebase-wiki.md.Dftj_tPp.lean.js +0 -1
  362. package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.js +0 -8
  363. package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.lean.js +0 -1
  364. package/dist/docs/assets/example-agents_concierge.md.MrKpQndp.js +0 -23
  365. package/dist/docs/assets/example-agents_concierge.md.MrKpQndp.lean.js +0 -1
  366. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.js +0 -15
  367. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.lean.js +0 -1
  368. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.js +0 -2
  369. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.lean.js +0 -1
  370. package/dist/docs/assets/example-agents_knowledge-base.md.DqKqHQ9u.js +0 -11
  371. package/dist/docs/assets/example-agents_knowledge-base.md.DqKqHQ9u.lean.js +0 -1
  372. package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.js +0 -10
  373. package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.lean.js +0 -1
  374. package/dist/docs/assets/example-agents_security-reviewer.md.Bai6D0Ee.js +0 -19
  375. package/dist/docs/assets/example-agents_security-reviewer.md.Bai6D0Ee.lean.js +0 -1
  376. package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.js +0 -5
  377. package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.lean.js +0 -1
  378. package/dist/docs/assets/example-agents_weather-agent.md.lVEAbWFf.js +0 -25
  379. package/dist/docs/assets/example-agents_weather-agent.md.lVEAbWFf.lean.js +0 -1
  380. package/dist/docs/assets/guides_cloud-runtime.md.BSMLIBHr.js +0 -9
  381. package/dist/docs/assets/guides_cloud-runtime.md.BSMLIBHr.lean.js +0 -1
  382. package/dist/docs/assets/guides_slack.md.DiUmk_Oi.lean.js +0 -1
  383. package/dist/docs/assets/index.md.BAaMXLFd.js +0 -5
  384. package/dist/docs/assets/reference_hooks.md.B9FSgdDe.js +0 -14
  385. package/dist/docs/assets/reference_http-api.md.CSHVobzG.js +0 -11
  386. package/dist/docs/assets/reference_http-api.md.CSHVobzG.lean.js +0 -1
  387. package/dist/docs/assets/reference_playground.md.Dfb92yQf.js +0 -1
  388. package/dist/docs/assets/reference_playground.md.Dfb92yQf.lean.js +0 -1
  389. package/dist/docs/assets/reference_project-layout.md.CwkSbEWT.js +0 -17
  390. package/dist/docs/assets/reference_sessions.md.tUFzz98S.js +0 -8
  391. package/dist/docs/assets/scaffolding-agents.md.CRDDUtYJ.js +0 -1
  392. package/dist/docs/assets/troubleshooting.md.DYECCZiJ.js +0 -1
  393. package/dist/docs/example-agents/approval-buddy.html +0 -36
  394. package/dist/docs/example-agents/approval-buddy.md +0 -266
  395. package/dist/docs/example-agents/benny.html +0 -33
  396. package/dist/docs/example-agents/benny.md +0 -182
  397. package/dist/docs/example-agents/bugbot.html +0 -37
  398. package/dist/docs/example-agents/bugbot.md +0 -229
  399. package/dist/docs/example-agents/codebase-wiki.html +0 -34
  400. package/dist/docs/example-agents/codebase-wiki.md +0 -170
  401. package/dist/docs/example-agents/codeowners-review.html +0 -34
  402. package/dist/docs/example-agents/codeowners-review.md +0 -192
  403. package/dist/docs/example-agents/concierge.html +0 -49
  404. package/dist/docs/example-agents/concierge.md +0 -201
  405. package/dist/docs/example-agents/fsd.html +0 -41
  406. package/dist/docs/example-agents/fsd.md +0 -329
  407. package/dist/docs/example-agents/index.html +0 -28
  408. package/dist/docs/example-agents/index.md +0 -102
  409. package/dist/docs/example-agents/knowledge-base.html +0 -37
  410. package/dist/docs/example-agents/knowledge-base.md +0 -168
  411. package/dist/docs/example-agents/oncall.html +0 -36
  412. package/dist/docs/example-agents/oncall.md +0 -212
  413. package/dist/docs/example-agents/security-reviewer.html +0 -45
  414. package/dist/docs/example-agents/security-reviewer.md +0 -265
  415. package/dist/docs/example-agents/slack-agent.html +0 -31
  416. package/dist/docs/example-agents/slack-agent.md +0 -142
  417. package/dist/docs/example-agents/weather-agent.html +0 -51
  418. package/dist/docs/example-agents/weather-agent.md +0 -296
  419. package/dist/internal/cursor-slack-relay.d.ts +0 -96
  420. package/dist/internal/cursor-slack-relay.d.ts.map +0 -1
  421. package/dist/internal/cursor-slack-relay.js +0 -176
  422. package/docs/example-agents/approval-buddy.md +0 -271
  423. package/docs/example-agents/benny.md +0 -187
  424. package/docs/example-agents/bugbot.md +0 -234
  425. package/docs/example-agents/codebase-wiki.md +0 -175
  426. package/docs/example-agents/codeowners-review.md +0 -197
  427. package/docs/example-agents/concierge.md +0 -206
  428. package/docs/example-agents/fsd.md +0 -334
  429. package/docs/example-agents/index.md +0 -107
  430. package/docs/example-agents/knowledge-base.md +0 -173
  431. package/docs/example-agents/oncall.md +0 -217
  432. package/docs/example-agents/security-reviewer.md +0 -270
  433. package/docs/example-agents/slack-agent.md +0 -147
  434. package/docs/example-agents/weather-agent.md +0 -301
  435. package/src/channels/slack/cursor-account.ts +0 -202
  436. package/src/internal/cursor-slack-relay.ts +0 -249
  437. /package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.lean.js → guides_agent-to-agent.md.BDb0t1QV.lean.js} +0 -0
  438. /package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.lean.js → guides_convert-automation.md.B4sjlodG.lean.js} +0 -0
  439. /package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.lean.js → guides_webhooks.md.DKdA43Qm.lean.js} +0 -0
  440. /package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.lean.js → hillclimbing.md.DhESf3OO.lean.js} +0 -0
  441. /package/dist/docs/assets/{quickstart.md.DsrarzEg.lean.js → quickstart.md.Nj_LjW_a.lean.js} +0 -0
  442. /package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.lean.js → reference_agent-config.md.Cp_x38Nl.lean.js} +0 -0
  443. /package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.lean.js → reference_project-layout.md.Bv4KOtlB.lean.js} +0 -0
  444. /package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.lean.js → reference_prompt.md.DnaD5dNK.lean.js} +0 -0
  445. /package/dist/docs/assets/{reference_schedules.md.DNipebiG.lean.js → reference_schedules.md.DI_JrHgq.lean.js} +0 -0
  446. /package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.lean.js → reference_skills.md.8son6Hjm.lean.js} +0 -0
  447. /package/dist/docs/assets/{reference_subagents.md.Xoav0AII.lean.js → reference_subagents.md.CfsIloPm.lean.js} +0 -0
  448. /package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.lean.js → templates_agentic-owners.md.DqtPdm6f.lean.js} +0 -0
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Projections for the live tool catalog (`GET /v1/tools` and
3
+ * `GET /v1/tools/:name`): the session's tool namespace exactly as a turn
4
+ * would assemble it — authored server tools plus advertised MCP
5
+ * passthroughs — under model-facing names.
6
+ *
7
+ * Titles are curated data, never derived from descriptions: advertised
8
+ * tools inherit the upstream server's MCP `annotations.title` (bounded at
9
+ * listing time), and the well-known non-MCP tool names carry a hardcoded
10
+ * title here so every deployment shows the same display names.
11
+ */
12
+
13
+ import type {
14
+ DiscoveredTool,
15
+ JsonSchemaObject,
16
+ ToolEffect,
17
+ ToolExecution,
18
+ } from "../types.js";
19
+
20
+ /**
21
+ * Display names for the well-known tool names that do not come from MCP
22
+ * (authored tools have no title field; adding one to `defineTool` for a
23
+ * presentation concern is not worth the authoring surface).
24
+ */
25
+ const WELL_KNOWN_TOOL_TITLES: Readonly<Record<string, string>> = {
26
+ diff: "Show change diffs",
27
+ glob: "Find files by pattern",
28
+ grep: "Search file contents",
29
+ ls: "List a directory",
30
+ read: "Read a file",
31
+ search: "Search with a typed query",
32
+ write: "Write a file",
33
+ };
34
+
35
+ function catalogTitle(tool: DiscoveredTool): string | undefined {
36
+ if (tool.advertised === true) {
37
+ return tool.annotations?.title;
38
+ }
39
+ return WELL_KNOWN_TOOL_TITLES[tool.name];
40
+ }
41
+
42
+ /**
43
+ * Sand connector identifiers scope the connector name by owner
44
+ * (`dashboard-team-<id>-Buildkite`, `dashboard-<Name>`, `user-<Name>`);
45
+ * the suffix is the human-meaningful name.
46
+ */
47
+ const CONNECTOR_SCOPE_PREFIX = /^(?:dashboard-team-\d+-|dashboard-|user-)/;
48
+
49
+ /**
50
+ * Where a tool comes from, for humans: the upstream connector/plugin name
51
+ * when the tool declares one (the reserved `__conn__` selector's values
52
+ * name it), the connection name otherwise. One aggregating connection
53
+ * (e.g. a tenant `plugins` endpoint) hosts tools from several connectors,
54
+ * and "plugins" tells an operator nothing — "Buildkite" does.
55
+ */
56
+ function catalogSource(tool: DiscoveredTool): string | undefined {
57
+ if (tool.advertised !== true) {
58
+ return undefined;
59
+ }
60
+ const properties = tool.inputSchema.properties as
61
+ | Record<string, { enum?: unknown[] } | undefined>
62
+ | undefined;
63
+ const first = properties?.__conn__?.enum?.[0];
64
+ if (typeof first === "string" && first !== "") {
65
+ return first.replace(CONNECTOR_SCOPE_PREFIX, "");
66
+ }
67
+ return tool.connection;
68
+ }
69
+
70
+ /** Light listing entry: identifiers and curated display data only. */
71
+ export interface CatalogListEntry {
72
+ name: string;
73
+ title?: string;
74
+ /** Connection name for advertised MCP tools; absent for authored tools. */
75
+ source?: string;
76
+ }
77
+
78
+ /** Full description behind `GET /v1/tools/:name`. */
79
+ export interface CatalogDetailEntry extends CatalogListEntry {
80
+ description: string;
81
+ execution: ToolExecution;
82
+ needsApproval: boolean;
83
+ effect?: ToolEffect | "dynamic";
84
+ inputSchema: JsonSchemaObject;
85
+ outputSchema?: JsonSchemaObject;
86
+ }
87
+
88
+ export function catalogListEntry(tool: DiscoveredTool): CatalogListEntry {
89
+ return {
90
+ name: tool.name,
91
+ title: catalogTitle(tool),
92
+ source: catalogSource(tool),
93
+ };
94
+ }
95
+
96
+ export function catalogDetailEntry(tool: DiscoveredTool): CatalogDetailEntry {
97
+ return {
98
+ ...catalogListEntry(tool),
99
+ description: tool.description,
100
+ execution: tool.execution,
101
+ needsApproval: tool.needsApproval,
102
+ effect: tool.effect,
103
+ inputSchema: tool.inputSchema,
104
+ outputSchema: tool.outputSchema,
105
+ };
106
+ }
package/src/types.ts CHANGED
@@ -263,7 +263,8 @@ export interface AgentConfig {
263
263
  * deploys onto the v2 control plane (v2 APIs and schemas). Omitted
264
264
  * channel `continuation` then inherits from declared events (`github.pr/v2`,
265
265
  * `github.issue/v2`, `github.none/v2`, `slack.thread/v2`, `origin.pr/v2`,
266
- * `none/v2`). An explicit per-channel selector still overrides.
266
+ * `deployments.deployment/v2`, `none/v2`). An explicit per-channel selector
267
+ * still overrides.
267
268
  *
268
269
  * ```ts
269
270
  * export default defineAgent({
@@ -552,8 +553,9 @@ export interface SlackNudgeHostApi {
552
553
  */
553
554
  export interface HostContext {
554
555
  /**
555
- * Authored MCP connections (`agent/mcp-connections/*`). Call a specific MCP
556
- * tool deterministically without going through the agent loop.
556
+ * Authored MCP connections (`agent/mcp-connections/*` and
557
+ * `agent/host-connections/*`). Call a specific MCP tool deterministically
558
+ * without going through the agent loop.
557
559
  */
558
560
  mcp: HostMcpRegistry;
559
561
  /**
@@ -920,6 +922,33 @@ export type ToolNeedsApproval<TInput> =
920
922
  */
921
923
  export type ToolEffect = "read" | "write";
922
924
 
925
+ /** Authored `defineConnection({ effects })` — one effect or a set. */
926
+ export type ConnectionEffects = ToolEffect | readonly ToolEffect[];
927
+
928
+ const TOOL_EFFECTS: readonly ToolEffect[] = ["read", "write"];
929
+
930
+ export function isToolEffect(value: unknown): value is ToolEffect {
931
+ return value === "read" || value === "write";
932
+ }
933
+
934
+ /**
935
+ * Normalize authored {@link ConnectionConfig.effects} to a unique list.
936
+ * Invalid values are left for discovery to reject — this only collapses
937
+ * `"read"` / `["read"]` / duplicates.
938
+ */
939
+ export function normalizeConnectionEffects(
940
+ effects: ConnectionEffects
941
+ ): ToolEffect[] {
942
+ const list = typeof effects === "string" ? [effects] : [...effects];
943
+ const unique: ToolEffect[] = [];
944
+ for (const effect of TOOL_EFFECTS) {
945
+ if (list.includes(effect)) {
946
+ unique.push(effect);
947
+ }
948
+ }
949
+ return unique;
950
+ }
951
+
923
952
  /**
924
953
  * A tool's declared {@link ToolEffect} — fixed, or decided per call from
925
954
  * validated input for tools that read or write depending on their arguments
@@ -1184,12 +1213,6 @@ export type ConnectionConfig = (
1184
1213
  ) & {
1185
1214
  /** Documentation only; shown in `info` output. */
1186
1215
  description?: string;
1187
- /**
1188
- * Omit from SDK `mcpServers` (model never sees it). Still available on
1189
- * `host.mcp` for server tools / channel handlers. Does not affect
1190
- * cloud-native account connectors provisioned by the platform.
1191
- */
1192
- hostOnly?: boolean;
1193
1216
  /**
1194
1217
  * Per-session auth: called at turn-build time with the session's
1195
1218
  * {@link SessionInfo}, returning headers merged over the transport's
@@ -1238,12 +1261,27 @@ export type ConnectionConfig = (
1238
1261
  * fails the turn — a turn never silently runs with a shrunken toolset.
1239
1262
  * Local runtime only, like all server tools: a `runtime: "cloud"` agent
1240
1263
  * fails discovery, and hybrid per-send cloud sessions refuse the turn.
1241
- * Not combinable with {@link hostOnly} (advertising puts the tools in
1242
- * the model's toolset; hostOnly means off the model — discovery rejects
1243
- * the pair). The listing runs once per turn; point this at endpoints
1244
- * that can answer `tools/list` cheaply.
1264
+ * The listing runs once per turn; point this at endpoints that can
1265
+ * answer `tools/list` cheaply.
1245
1266
  */
1246
1267
  advertiseTools?: boolean;
1268
+ /**
1269
+ * Intended effects of tools this connection serves. When set, only
1270
+ * tools whose classified effect is in this set are advertised — a
1271
+ * connection that wants reads never puts a write, or a tool nothing
1272
+ * classified, in the model's toolset.
1273
+ *
1274
+ * Classification is the same fail-closed read of MCP annotations the
1275
+ * dry-run gate uses (`readOnlyHint` / `destructiveHint`). A tool the
1276
+ * server does not classify is omitted, not guessed. Servers that leave
1277
+ * tools unannotated stay empty here until they annotate or a trusted
1278
+ * listing injects a known-read hint.
1279
+ *
1280
+ * Requires {@link advertiseTools}: this filters the named passthroughs
1281
+ * the model sees. A single value (`"read"`) and an array (`["read"]`)
1282
+ * are the same.
1283
+ */
1284
+ effects?: ConnectionEffects;
1247
1285
  };
1248
1286
 
1249
1287
  /**
@@ -1265,15 +1303,13 @@ export function isInlineStdioConnection(
1265
1303
  connection: ConnectionConfig
1266
1304
  ): connection is InlineStdioConnectionConfig & {
1267
1305
  description?: string;
1268
- hostOnly?: boolean;
1269
1306
  } {
1270
1307
  return "tools" in connection && connection.tools !== undefined;
1271
1308
  }
1272
1309
 
1273
1310
  /**
1274
1311
  * An MCP connection is available to the agent (SDK `mcpServers`), host
1275
- * (`ctx.host.mcp`), and channel/schedule handlers — unless `hostOnly`,
1276
- * which keeps it off the model surface only.
1312
+ * (`ctx.host.mcp`), and channel/schedule handlers.
1277
1313
  */
1278
1314
  export type ConnectionDefinition = ConnectionConfig &
1279
1315
  BrandedDefinition<"connection">;
@@ -1846,6 +1882,19 @@ export const DIRECT_TOOL_CALL_CHANNEL_ID = "direct";
1846
1882
  export interface CallToolOptions {
1847
1883
  /** Who is calling; becomes the tool context's session auth. */
1848
1884
  auth?: AuthContext | null;
1885
+ /**
1886
+ * Address the session by its wire continuation token
1887
+ * (`<channelId>:<key>`, as `/v1/sessions` lists it). A token that maps
1888
+ * to a live (or restorable) session behaves exactly like passing that
1889
+ * session's {@link sessionId} — ownership check, turn serialization, and
1890
+ * event recording included. A token with no session behind it runs the
1891
+ * call scratch-bound with the token's channel id and continuation key as
1892
+ * the call's session identity, so deployments whose tools resolve state
1893
+ * from the continuation key (e.g. VFS mounts rebuilt by a binding
1894
+ * resolver) can serve it with no live session. Mutually exclusive with
1895
+ * {@link sessionId}.
1896
+ */
1897
+ continuationToken?: string;
1849
1898
  /**
1850
1899
  * Run the tool inside an existing session: the tool sees that session's
1851
1900
  * info and materialized workspace, and the call is recorded on the
@@ -1877,6 +1926,14 @@ export interface ToolCallOutcome {
1877
1926
  durationMs: number;
1878
1927
  /** Present when the call ran inside an existing session. */
1879
1928
  sessionId?: string;
1929
+ /**
1930
+ * Present (true) when a session-bound call could not materialize the
1931
+ * session's harness cwd and ran in a scratch workspace instead. The
1932
+ * session identity still applied (read-effect calls only get here), but
1933
+ * `ctx.workspaceDir` was not the session workspace — callers rendering
1934
+ * results as session state should surface this.
1935
+ */
1936
+ scratchWorkspace?: true;
1880
1937
  }
1881
1938
 
1882
1939
  /**
@@ -2160,18 +2217,17 @@ export interface ChannelMeta {
2160
2217
  * to dispatch on. Used by `--cursor-events` to subscribe `provider: "origin"`.
2161
2218
  */
2162
2219
  originWebhookEvents?: readonly string[];
2220
+ /**
2221
+ * For deployments packs: the factory event types this channel is wired
2222
+ * to dispatch on. Extracted into the deploy manifest as `eventTypes`.
2223
+ */
2224
+ deploymentEventTypes?: readonly string[];
2163
2225
  /**
2164
2226
  * For Slack packs with the opt-in channel watch: the allowlisted channels
2165
2227
  * (ids or `#names`) this channel dispatches on without a mention. Surfaced
2166
2228
  * by `info` so watched channels are auditable.
2167
2229
  */
2168
2230
  slackChannelPosts?: readonly string[];
2169
- /**
2170
- * For Slack packs riding the signed-in Cursor account's Slack connection
2171
- * (`slackChannel({ cursorAccount: true })`): inbound relays from
2172
- * `/v0/slack-events` instead of Socket Mode.
2173
- */
2174
- slackCursorAccount?: boolean;
2175
2231
  }
2176
2232
 
2177
2233
  export interface ChannelConfig<TState = JsonValue> {
@@ -2642,6 +2698,8 @@ export interface DiscoveredTool {
2642
2698
  * refused — see `decideToolCall`.
2643
2699
  */
2644
2700
  advertised?: true;
2701
+ /** Name of the advertising connection an advertised tool came from. */
2702
+ connection?: string;
2645
2703
  /**
2646
2704
  * Agent tools: script body materialized under
2647
2705
  * `.agent-serve/tools/<name>.sh`.
@@ -2666,11 +2724,15 @@ export interface DiscoveredConnection {
2666
2724
  name: string;
2667
2725
  transport: ConnectionTransport;
2668
2726
  description?: string;
2669
- hostOnly?: boolean;
2670
2727
  /** Per-session auth from {@link ConnectionConfig.auth} (http/sse only). */
2671
2728
  auth?: ConnectionAuthProvider;
2672
2729
  /** Advertise-by-name from {@link ConnectionConfig.advertiseTools}. */
2673
2730
  advertiseTools?: boolean;
2731
+ /**
2732
+ * Normalized intended effects from {@link ConnectionConfig.effects}.
2733
+ * Absent means every listed tool is advertised.
2734
+ */
2735
+ effects?: readonly ToolEffect[];
2674
2736
  }
2675
2737
 
2676
2738
  export interface DiscoveredChannel {
@@ -2743,6 +2805,11 @@ export interface ResolvedAgent {
2743
2805
  tools: DiscoveredTool[];
2744
2806
  skills: DiscoveredSkill[];
2745
2807
  connections: DiscoveredConnection[];
2808
+ /**
2809
+ * MCP connections from `agent/host-connections/`. Host tools and
2810
+ * `mcp oauth` see them; the model does not.
2811
+ */
2812
+ hostConnections?: DiscoveredConnection[];
2746
2813
  subagents: ResolvedAgent[];
2747
2814
  seedFiles: SeedFile[];
2748
2815
  }
@@ -2810,14 +2877,20 @@ export interface AgentProjectInfo {
2810
2877
  description: string;
2811
2878
  execution: ToolExecution;
2812
2879
  needsApproval: boolean;
2880
+ /**
2881
+ * The tool's declared {@link ToolEffect} when static, `"dynamic"` when
2882
+ * declared as a predicate. Absent when the author declared nothing —
2883
+ * "unknown", not "mutates".
2884
+ */
2885
+ effect?: ToolEffect | "dynamic";
2813
2886
  inputSchema: JsonSchemaObject;
2814
2887
  }>;
2815
2888
  skills: Array<{ name: string; description: string }>;
2816
2889
  connections: Array<{
2817
2890
  name: string;
2818
2891
  transport: string;
2819
- hostOnly?: boolean;
2820
2892
  advertiseTools?: boolean;
2893
+ effects?: readonly ToolEffect[];
2821
2894
  /**
2822
2895
  * Present only for `cursorAccount` connections: the connector-name
2823
2896
  * allowlist, or `"*"` for every connected server. Structured twin of the
@@ -2840,6 +2913,8 @@ export interface AgentProjectInfo {
2840
2913
  githubWebhookEvents?: readonly string[];
2841
2914
  /** Origin webhook event types the channel dispatches on, when declared. */
2842
2915
  originWebhookEvents?: readonly string[];
2916
+ /** Factory deployment event types the channel dispatches on, when declared. */
2917
+ deploymentEventTypes?: readonly string[];
2843
2918
  /** Slack channels watched for posts (opt-in channel watch), when declared. */
2844
2919
  slackChannelPosts?: readonly string[];
2845
2920
  }>;
@@ -2997,12 +3072,6 @@ export interface ServeOptions {
2997
3072
  * or `handle.dispatchReminder`.
2998
3073
  */
2999
3074
  reminders?: boolean;
3000
- /**
3001
- * Do not start the bundled control plane (schedule/reminder clocks).
3002
- * Cursor hosting passes this so the kit talks to the Cursor backend
3003
- * instead. Local `serve` should leave this unset.
3004
- */
3005
- noControlPlane?: boolean;
3006
3075
  /**
3007
3076
  * Serve the bundled web playground at `/playground` (chat, streaming,
3008
3077
  * tool calls, sessions, schedule dispatch). Defaults to true; the API
@@ -3047,16 +3116,6 @@ export interface ServeOptions {
3047
3116
  * authenticates callers (e.g. an SSO/Okta proxy in front of the host).
3048
3117
  */
3049
3118
  allowAnonymousGrokbot?: boolean;
3050
- /**
3051
- * Route `githubChannel({ cursorAccount })` API calls through the Cursor
3052
- * backend's GitHub forwarder (`/v0/github-proxy`) instead of minting raw
3053
- * installation tokens into this process. The backend logs and meters every
3054
- * call with per-deployment attribution. `AGENT_SERVE_GITHUB_PROXY_URL`
3055
- * overrides the forwarder base URL (default: the resolved Cursor API base
3056
- * URL + `/v0/github-proxy`). Child `gh` processes still use a minted
3057
- * `GH_TOKEN` lease (proxying `gh` is a follow-up).
3058
- */
3059
- cursorGithubProxy?: boolean;
3060
3119
  /**
3061
3120
  * Allow {@link allowAnonymous} together with
3062
3121
  * `defineConnection({ cursorAccount: true })`. Without this opt-in, `serve`
@@ -1,8 +1,14 @@
1
1
  import { slackChannel } from "@cursor/july/channels/slack";
2
2
 
3
+ /**
4
+ * Slack channel (Socket Mode).
5
+ *
6
+ * Tokens: PR_AUTOFIXER_SLACK_BOT_TOKEN + PR_AUTOFIXER_SLACK_APP_TOKEN
7
+ *
8
+ * Full setup: agent-sdk slack create
9
+ */
3
10
  export default slackChannel({
4
- cursorAccount: true,
5
- agentName: "PrAutofixer",
11
+ envPrefix: "PR_AUTOFIXER",
6
12
  suggestedPromptsTitle: "Try asking",
7
13
  suggestedPrompts: [
8
14
  {
@@ -43,4 +43,5 @@ on both issues. `agent-sdk eval` classifies and skips tracker writes.
43
43
  - `agent/instructions.md`: procedure around the rubric
44
44
  - `evals/triage.eval.ts`: three smoke cases
45
45
 
46
- `agent/lib/actuate.ts` talks to the tracker. The connection is host-only.
46
+ `agent/lib/actuate.ts` talks to the tracker. Writes go through
47
+ `record_triage` so the host owns comments, priority, and duplicate links.
@@ -3,5 +3,4 @@ import { defineConnection } from "@cursor/july/connections";
3
3
  export default defineConnection({
4
4
  cursorAccount: true,
5
5
  servers: ["Jira"],
6
- hostOnly: true,
7
6
  });
@@ -3,5 +3,4 @@ import { defineConnection } from "@cursor/july/connections";
3
3
  export default defineConnection({
4
4
  cursorAccount: true,
5
5
  servers: ["Linear", "Linear MCP"],
6
- hostOnly: true,
7
6
  });
@@ -1,87 +0,0 @@
1
- /**
2
- * Cursor-account mode for the Slack channel pack: instead of a dedicated
3
- * Slack app (Socket Mode + `xoxb`/`xapp` tokens), the channel rides the
4
- * signed-in Cursor account's Slack connection. Inbound events are relayed
5
- * by the serve host from `/v0/slack-events` (see
6
- * `internal/cursor-slack-relay.ts`); outbound Web API calls run through a
7
- * {@link SlackApiTransport} bound to the backend proxy.
8
- *
9
- * This file is the seam between the channel definition (authored at
10
- * `defineChannel` time) and the serve-time relay: `slackChannel()` registers
11
- * a runtime ref here, and the server discovers it, binds the transport, and
12
- * dispatches relayed envelopes through the pack's normal inbound path.
13
- */
14
- import type { ArtifactsApi, HostContext, SendMessageFn } from "../../types.js";
15
- import type { EventIdDedupe } from "./event-id-dedupe.js";
16
- import type { SlackLog } from "./log.js";
17
- import type { SlackApiTransport, SlackChannelOptions, SlackCredentials, SlackMessageFile, SlackMessageHandler } from "./types.js";
18
- /**
19
- * Transport placeholder created at `slackChannel()` definition time and
20
- * bound to the real backend proxy caller when the serve host starts its
21
- * relay. Calls before binding soft-fail Slack-style.
22
- */
23
- export interface PendingSlackApiTransport extends SlackApiTransport {
24
- bind(impl: SlackApiTransport["call"]): void;
25
- }
26
- export declare function createPendingSlackApiTransport(): PendingSlackApiTransport;
27
- /**
28
- * One routed Slack event from `/v0/slack-events` (mirror of the backend's
29
- * SlackAgentEventEnvelope, minus server-only fields).
30
- */
31
- export interface CursorSlackEnvelope {
32
- eventName: string;
33
- slackTeamId: string;
34
- channelId: string;
35
- channelType?: string;
36
- threadTs: string;
37
- messageTs: string;
38
- slackUserId?: string;
39
- text: string;
40
- agentName: string;
41
- consumerId: string;
42
- /**
43
- * How the backend routed the event: leading agent name or owned thread.
44
- */
45
- matchedBy: "name" | "thread";
46
- eventId?: string;
47
- receivedAtMs: number;
48
- /**
49
- * Slack file uploads on the triggering message. When `dataBase64` is set
50
- * the Cursor backend already downloaded bytes (cursorAccount has no bot
51
- * token for files.slack.com).
52
- */
53
- files?: SlackMessageFile[];
54
- }
55
- /** Serve-time runtime handle for one cursor-account Slack channel. */
56
- export interface SlackCursorAccountRuntime {
57
- options: SlackChannelOptions;
58
- /** The channel's live credentials (botToken slot holds the transport). */
59
- credentials: SlackCredentials;
60
- transport: PendingSlackApiTransport;
61
- eventIds: EventIdDedupe;
62
- onAppMention: SlackMessageHandler;
63
- onDirectMessage: SlackMessageHandler;
64
- getLog: () => SlackLog;
65
- }
66
- export declare function registerSlackCursorAccountRuntime(definition: object, runtime: SlackCursorAccountRuntime): void;
67
- /**
68
- * Recover the cursor-account runtime for a channel definition, if it was
69
- * created via `slackChannel({ cursorAccount: true })`.
70
- */
71
- export declare function getSlackCursorAccountRuntime(definition: object): SlackCursorAccountRuntime | undefined;
72
- /**
73
- * Dispatch one relayed envelope through the pack's normal inbound path
74
- * (same handlers, session continuation, and reply delivery as Socket Mode).
75
- */
76
- export declare function dispatchCursorSlackEnvelope(args: {
77
- runtime: SlackCursorAccountRuntime;
78
- envelope: CursorSlackEnvelope;
79
- send: SendMessageFn;
80
- host: HostContext;
81
- artifacts: ArtifactsApi;
82
- hasContinuationSession?: (continuationToken: string) => Promise<boolean>;
83
- isContinuationBusy?: (continuationToken: string) => Promise<boolean>;
84
- getContinuationLastBotMessageTs?: (continuationToken: string) => Promise<string | undefined>;
85
- interruptContinuation?: (continuationToken: string) => Promise<boolean>;
86
- }): Promise<void>;
87
- //# sourceMappingURL=cursor-account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cursor-account.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/cursor-account.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAEhB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED,wBAAgB,8BAA8B,IAAI,wBAAwB,CAezE;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0EAA0E;IAC1E,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,wBAAwB,CAAC;IACpC,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,EAAE,mBAAmB,CAAC;IAClC,eAAe,EAAE,mBAAmB,CAAC;IACrC,MAAM,EAAE,MAAM,QAAQ,CAAC;CACxB;AAID,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,yBAAyB,GAAG,SAAS,CAEvC;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;IACxB,sBAAsB,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,kBAAkB,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrE,+BAA+B,CAAC,EAAE,CAChC,iBAAiB,EAAE,MAAM,KACtB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,qBAAqB,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACzE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuEhB"}
@@ -1,100 +0,0 @@
1
- /**
2
- * Cursor-account mode for the Slack channel pack: instead of a dedicated
3
- * Slack app (Socket Mode + `xoxb`/`xapp` tokens), the channel rides the
4
- * signed-in Cursor account's Slack connection. Inbound events are relayed
5
- * by the serve host from `/v0/slack-events` (see
6
- * `internal/cursor-slack-relay.ts`); outbound Web API calls run through a
7
- * {@link SlackApiTransport} bound to the backend proxy.
8
- *
9
- * This file is the seam between the channel definition (authored at
10
- * `defineChannel` time) and the serve-time relay: `slackChannel()` registers
11
- * a runtime ref here, and the server discovers it, binds the transport, and
12
- * dispatches relayed envelopes through the pack's normal inbound path.
13
- */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import { dispatchInboundMessage } from "./dispatch.js";
24
- import { slackTextToMarkdown } from "./inbound.js";
25
- export function createPendingSlackApiTransport() {
26
- let bound;
27
- return {
28
- kind: "api-transport",
29
- label: "cursor-account",
30
- bind(impl) {
31
- bound = impl;
32
- },
33
- call(method, args) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- if (bound === undefined) {
36
- return { ok: false, error: "cursor_slack_relay_not_started" };
37
- }
38
- return bound(method, args);
39
- });
40
- },
41
- };
42
- }
43
- const runtimeByDefinition = new WeakMap();
44
- export function registerSlackCursorAccountRuntime(definition, runtime) {
45
- runtimeByDefinition.set(definition, runtime);
46
- }
47
- /**
48
- * Recover the cursor-account runtime for a channel definition, if it was
49
- * created via `slackChannel({ cursorAccount: true })`.
50
- */
51
- export function getSlackCursorAccountRuntime(definition) {
52
- return runtimeByDefinition.get(definition);
53
- }
54
- /**
55
- * Dispatch one relayed envelope through the pack's normal inbound path
56
- * (same handlers, session continuation, and reply delivery as Socket Mode).
57
- */
58
- export function dispatchCursorSlackEnvelope(args) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- const { runtime, envelope } = args;
61
- const log = runtime.getLog();
62
- if (envelope.eventId !== undefined &&
63
- envelope.eventId.length > 0 &&
64
- !runtime.eventIds.tryHandle(envelope.eventId)) {
65
- log.debug("cursor-account inbound dedupe drop", {
66
- event_id: envelope.eventId,
67
- });
68
- return;
69
- }
70
- const message = Object.assign(Object.assign({ text: envelope.text, body: envelope.text, markdown: slackTextToMarkdown(envelope.text), ts: envelope.messageTs, threadTs: envelope.threadTs, channelId: envelope.channelId, teamId: envelope.slackTeamId }, (envelope.slackUserId === undefined
71
- ? {}
72
- : {
73
- author: { userId: envelope.slackUserId, isBot: false },
74
- })), { files: envelope.files });
75
- // DMs to @Cursor route as direct messages; everything else (explicit
76
- // `@Cursor <agent> …` mentions and claimed-thread replies) dispatches on
77
- // the mention handler — a claimed-thread reply is addressed to the agent
78
- // by construction. Mentions/DM disable toggles are rejected at
79
- // `slackChannel({ cursorAccount: true })` construction so the backend
80
- // never consumes events the host would drop.
81
- const isDm = envelope.channelType === "im" || envelope.channelId.startsWith("D");
82
- const kind = isDm ? "direct_message" : "app_mention";
83
- const handler = isDm ? runtime.onDirectMessage : runtime.onAppMention;
84
- yield dispatchInboundMessage(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ kind,
85
- message,
86
- handler, send: args.send, credentials: runtime.credentials, host: args.host, artifacts: args.artifacts, log, evalCommandsEnabled: runtime.options.evalCommands !== false, cursorAgentName: envelope.agentName,
87
- // Backend router already refused externals for this envelope.
88
- blockExternals: false }, (args.hasContinuationSession === undefined
89
- ? {}
90
- : { hasContinuationSession: args.hasContinuationSession })), (args.isContinuationBusy === undefined
91
- ? {}
92
- : { isContinuationBusy: args.isContinuationBusy })), (args.getContinuationLastBotMessageTs === undefined
93
- ? {}
94
- : {
95
- getContinuationLastBotMessageTs: args.getContinuationLastBotMessageTs,
96
- })), (args.interruptContinuation === undefined
97
- ? {}
98
- : { interruptContinuation: args.interruptContinuation })), { continuation: runtime.options.continuation }), (envelope.eventId === undefined ? {} : { eventId: envelope.eventId })));
99
- });
100
- }
@@ -1,13 +0,0 @@
1
- import{_ as a,c as t,o as s,ag as i}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Building agents with agents","description":"Use the built-in skills to have a coding agent create, verify, and improve your agent.","frontmatter":{"title":"Building agents with agents","description":"Use the built-in skills to have a coding agent create, verify, and improve your agent."},"headers":[],"relativePath":"building-with-agents.md","filePath":"building-with-agents.md"}'),n={name:"building-with-agents.md"};function l(h,e,r,o,d,c){return s(),t("div",null,[...e[0]||(e[0]=[i(`<h1 id="building-agents-with-agents" tabindex="-1">Building agents with agents <a class="header-anchor" href="#building-agents-with-agents" aria-label="Permalink to &quot;Building agents with agents&quot;">​</a></h1><p>Give a coding agent the goal. The built-in skills guide it through scaffolding, channels, verification, evals, and measured improvement.</p><h2 id="what-can-a-coding-agent-build-for-me" tabindex="-1">What can a coding agent build for me? <a class="header-anchor" href="#what-can-a-coding-agent-build-for-me" aria-label="Permalink to &quot;What can a coding agent build for me?&quot;">​</a></h2><p>A coding agent can take an Agent SDK project from an idea to a verified first version. It can:</p><ul><li>Create the project and choose the smallest useful surface</li><li>Add tools, skills, channels, MCP connections, and approval gates</li><li>Run a real turn and inspect its trace</li><li>Add evals for the behavior you want to keep</li><li>Improve the agent against fixed inputs</li></ul><p>This works because the project surface lives in files. The CLI also returns structured JSON and records each run as an NDJSON trace. Your coding agent can inspect what the framework discovered, run the agent, and verify the result without reading terminal prose.</p><h2 id="how-do-i-create-an-agent-with-the-built-in-skill" tabindex="-1">How do I create an agent with the built-in skill? <a class="header-anchor" href="#how-do-i-create-an-agent-with-the-built-in-skill" aria-label="Permalink to &quot;How do I create an agent with the built-in skill?&quot;">​</a></h2><p>Have the coding agent read <a href="./../skills/create-agent/SKILL.html"><code>skills/create-agent/SKILL.md</code></a> (in the monorepo: <code>packages/agent-serve/skills/create-agent/SKILL.md</code>) and follow it.</p><p>The skill asks about your agent&#39;s purpose, runtime, model, channels, MCP connections, and capabilities. It then shows you a plan, writes the project, and verifies the result.</p><p>For example:</p><blockquote><p>Use the Agent SDK create-agent skill to build a PR triage agent reachable through GitHub. It should summarize failed checks, require approval before posting a review, and include one smoke eval.</p></blockquote><p>The skill starts with a small surface: short instructions, one or two tools, the channels you chose, and a smoke eval. You can add more after the first end-to-end turn works.</p><h2 id="which-built-in-skill-should-i-use" tabindex="-1">Which built-in skill should I use? <a class="header-anchor" href="#which-built-in-skill-should-i-use" aria-label="Permalink to &quot;Which built-in skill should I use?&quot;">​</a></h2><p>The package ships task-specific guides under <a href="./../skills/"><code>skills/</code></a>:</p><table tabindex="0"><thead><tr><th>What you want to do</th><th>Skill</th></tr></thead><tbody><tr><td>Understand the project layout and runtimes</td><td><a href="./../skills/framework-map/SKILL.html"><code>framework-map</code></a></td></tr><tr><td>Create and verify a new agent</td><td><a href="./../skills/create-agent/SKILL.html"><code>create-agent</code></a></td></tr><tr><td>Write fixtures and regression checks</td><td><a href="./../skills/evals/SKILL.html"><code>evals</code></a></td></tr><tr><td>Live A/B metrics on traffic (<code>defineAB</code>)</td><td><a href="./../skills/ab/SKILL.html"><code>ab</code></a></td></tr><tr><td>Improve an agent against fixed inputs</td><td><a href="./../skills/hillclimb/SKILL.html"><code>hillclimb</code></a></td></tr><tr><td>Add GitHub webhooks and replay events</td><td><a href="./../skills/github/SKILL.html"><code>github</code></a></td></tr><tr><td>Connect an agent to Slack</td><td><a href="./../skills/setup-slack/SKILL.html"><code>setup-slack</code></a></td></tr><tr><td>Diagnose a local run</td><td><a href="./../skills/debug/SKILL.html"><code>debug</code></a></td></tr></tbody></table><p>Point your coding agent at the matching <code>SKILL.md</code>. The guide contains the workflow, commands, and common mistakes for that task.</p><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>The skill bodies use the current <code>agent-serve</code> CLI names. This guide uses the upcoming <code>agent-sdk</code> names. See <a href="/docs/#run-the-cli">Run the CLI</a> for the full rename table.</p></div><h2 id="how-does-a-coding-agent-verify-its-work" tabindex="-1">How does a coding agent verify its work? <a class="header-anchor" href="#how-does-a-coding-agent-verify-its-work" aria-label="Permalink to &quot;How does a coding agent verify its work?&quot;">​</a></h2><p>The coding agent should discover the project, test each server tool, run a real turn, and finish with evals:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> validate</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span>
2
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> info</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span></span>
3
- <span class="line"></span>
4
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> call</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> inspect_pr</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
5
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --input</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;{&quot;prUrl&quot;:&quot;https://github.com/acme/checkout/pull/42&quot;}&#39;</span></span>
6
- <span class="line"></span>
7
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
8
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Is https://github.com/acme/checkout/pull/42 ready to approve?&quot;</span></span>
9
- <span class="line"></span>
10
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> trajectory</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --events</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .agent-serve/traces/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">sessionI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.ndjson</span></span>
11
- <span class="line"></span>
12
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --list</span></span>
13
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span></span></code></pre></div><p><code>serve</code> boots without an API key, which is enough to check channel mounts and the playground shell. Model turns need a credential. When the environment lacks one, finish every key-free check, then hand the <code>run</code> and <code>eval</code> commands to the operator.</p><p>Test server tools with <code>call</code> before tuning the prompt. It runs a tool in-process with schema validation and no model turn. If the tool returns the wrong data, a prompt change won&#39;t fix it.</p><p><code>validate</code> and <code>run</code> don&#39;t type-check the project because tsx strips types. Run the project&#39;s TypeScript check before shipping. Tool results must also be JSON-shaped. Use object literals or <code>type</code> aliases for <code>execute</code> return types instead of <code>interface</code> types.</p><h2 id="how-do-i-improve-the-agent-after-its-first-run" tabindex="-1">How do I improve the agent after its first run? <a class="header-anchor" href="#how-do-i-improve-the-agent-after-its-first-run" aria-label="Permalink to &quot;How do I improve the agent after its first run?&quot;">​</a></h2><p>Scaffolding proves the agent runs. It says nothing about quality. Once a smoke turn passes, give the hillclimb skill:</p><ol><li><strong>Fixtures</strong>: one to three fixed inputs, such as a PR URL, a canonical question, or a saved webhook payload</li><li><strong>Success criteria</strong>: correct tool choice, fewer tool calls, lower wall time, or better output</li><li><strong>The freeze line</strong>: the API contract, output shape, and existing evals that must stay unchanged</li></ol><p>Have the coding agent read <a href="./../skills/hillclimb/SKILL.html"><code>skills/hillclimb/SKILL.md</code></a>. It measures the current run, proposes one change, remeasures the same fixtures, and adds an eval for each kept improvement.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./quickstart.html">Create your first agent</a></li><li><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a></li><li><a href="./evals.html">Evals</a></li><li><a href="./hillclimbing.html">Hillclimbing</a></li><li><a href="./reference/cli.html">CLI reference</a></li></ul>`,29)])])}const g=a(n,[["render",l]]);export{k as __pageData,g as default};