@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
@@ -1,217 +0,0 @@
1
- ---
2
- title: "Investigate every alert in its own Slack thread"
3
- description: "Watch a bot-fed alerts channel, react when the agent locks in, coalesce thread chatter behind a quiet window, and let the agent schedule its own re-checks."
4
- ---
5
-
6
- # Investigate every alert in its own Slack thread
7
-
8
- This agent is an on-call teammate. Alert feeds post into an alerts channel
9
- as bots. Each new alert dispatches an investigation session pinned to that
10
- post's thread: the agent reacts 👀 the moment it locks in, investigates
11
- immediately, and posts brief findings backed by evidence it observed.
12
- Replies in the thread reach it only after the thread has been quiet for
13
- about a minute, and reminder tools let it wake itself later to re-check a
14
- baseline or confirm an alert cleared.
15
-
16
- Use this example when alerts land in Slack and you want one thread-scoped
17
- investigation per alert, with an agent that paces its own engagement
18
- instead of answering every message.
19
-
20
- [Browse the current alert-investigator source.](../../examples/oncall/)
21
-
22
- ## Follow an alert
23
-
24
- 1. An alert feed (Alertmanager, PagerDuty, Datadog) posts a new top-level
25
- message in the watched alerts channel.
26
- 2. The channel watch accepts it. `includeBotPosts` lets bot authors
27
- through; the agent's own posts always stay dropped.
28
- 3. The handler reacts 👀 on the alert post and sets "Investigating…"
29
- typing. The reaction is the lock-in signal: this alert has an owner.
30
- 4. The Agent SDK creates a session keyed to the alert's thread and dispatches
31
- immediately. New alerts get no debounce.
32
- 5. The agent reads the alert, gathers evidence, and posts findings to the
33
- thread once it has a hypothesis.
34
- 6. People discuss in the thread. Replies buffer per thread and dispatch as
35
- one coalesced follow-up after roughly a minute of quiet.
36
- 7. The agent arms reminders for anything that needs time and posts interim
37
- updates when new evidence changes the picture.
38
-
39
- Mentions and DMs skip the watch entirely and behave like ordinary chat.
40
-
41
- ## Map the files
42
-
43
- | File | Purpose |
44
- | --- | --- |
45
- | [`agent/agent.ts`](../../examples/oncall/agent/agent.ts) | Names the agent and keeps harness workspaces outside any monorepo checkout. |
46
- | [`agent/instructions.md`](../../examples/oncall/agent/instructions.md) | Engagement rules, the investigation loop, and the message discipline. |
47
- | [`agent/channels/slack-app.ts`](../../examples/oncall/agent/channels/slack-app.ts) | Dedicated Socket Mode app: watch configuration and handler wiring. |
48
- | [`agent/lib/alert-watch.ts`](../../examples/oncall/agent/lib/alert-watch.ts) | The engagement policy: lock in on new alerts, coalesce replies. |
49
- | [`agent/lib/thread-debounce.ts`](../../examples/oncall/agent/lib/thread-debounce.ts) | Per-thread quiet window. |
50
- | [`agent/lib/alerts.ts`](../../examples/oncall/agent/lib/alerts.ts) | Dispatch classification, prompt building, and thread addressing. |
51
- | [`agent/lib/slack-api.ts`](../../examples/oncall/agent/lib/slack-api.ts) | Reactions and thread posts on this agent's own token pair. |
52
- | [`agent/tools/reminders_create.ts`](../../examples/oncall/agent/tools/reminders_create.ts) | Self-scheduled wakes bound to the thread (plus `reminders_list` and `reminders_cancel`). |
53
- | [`agent/tools/post_thread_update.ts`](../../examples/oncall/agent/tools/post_thread_update.ts) | Interim updates to the thread mid-turn. |
54
- | [`agent/storage.ts`](../../examples/oncall/agent/storage.ts) | Persists sessions and events with `cursorHostedStorage`. |
55
- | [`evals/evals.config.ts`](../../examples/oncall/evals/evals.config.ts) | Caps eval run concurrency. |
56
- | [`evals/smoke.eval.ts`](../../examples/oncall/evals/smoke.eval.ts) | Checks identity and the reminder-tool route. |
57
-
58
- ## Let bot posts through the watch
59
-
60
- Channel watching drops bot-authored posts by default so two agents can
61
- never feed each other. Alert channels invert the assumption: the posts
62
- worth watching come from bots. `channelPosts.includeBotPosts` opts in per
63
- channel:
64
-
65
- ```ts
66
- engagement: {
67
- channelPosts: {
68
- allow: ["#alerts"],
69
- posts: "all",
70
- includeBotPosts: true,
71
- },
72
- },
73
- ```
74
-
75
- Loop safety survives the opt-in. The pack matches the watching app's own
76
- posts by the `bot_id` and bot user id from `auth.test` and drops them, so
77
- the agent's findings never re-dispatch it. Posts that mention the bot stay
78
- on the mention path.
79
-
80
- `posts: "all"` also delivers thread replies. The handler, not the pack,
81
- decides their pace.
82
-
83
- ## Pace the engagement
84
-
85
- The example runs two rhythms:
86
-
87
- - A new alert dispatches immediately.
88
- - Thread replies produce one engagement per lull.
89
-
90
- The pack's `debounceMs` is per message; it exists to let edits settle. This
91
- agent needs a per-thread window instead, so the handler owns it
92
- ([`lib/thread-debounce.ts`](../../examples/oncall/agent/lib/thread-debounce.ts)).
93
- Every reply restarts a 60-second timer keyed by thread. Superseded waiters
94
- resolve `null` and the handler returns `null` for them. When the thread
95
- goes quiet, the newest waiter receives the whole batch and dispatches one
96
- follow-up that lists every message with mentionable attribution.
97
-
98
- Two details make the window matter. A follow-up that arrives while a turn
99
- runs preempts that turn (latest message wins), so engaging per message
100
- would keep cancelling the investigation. And @mentions bypass the window
101
- through Slack's mention path, so a person who needs the agent now still
102
- gets it now.
103
-
104
- ## Schedule your own re-checks
105
-
106
- Investigations rarely finish in one pass. A baseline comparison needs 20
107
- minutes of data. An alert that cleared may re-fire. The example hands the
108
- model three tools over `host.reminders`:
109
-
110
- - `reminders_create` arms a one-shot (`delay: "20m"`) or recurring
111
- (`every: "30m"` with a plain-language stop condition) wake bound to the
112
- thread's conversation.
113
- - `reminders_list` shows the thread's standing watches.
114
- - `reminders_cancel` disarms one, and refuses ids that belong to another
115
- thread's conversation.
116
-
117
- When a reminder fires, its prompt returns to the same session as a
118
- follow-up turn, and the reply lands in the alert thread. The instructions
119
- keep wake prompts generic (re-read live state instead of replaying stale
120
- numbers) and wake replies to one line, for example "re-checked p99 on
121
- api-gateway: 120ms, back at baseline, cancelling the watch."
122
-
123
- Keep these tool filenames if you copy the design: the framework's reminder
124
- fire prompt tells the model to call `reminders_cancel` by name when a stop
125
- condition is set.
126
-
127
- ## Alert people mid-investigation
128
-
129
- The final reply of each turn posts to the thread on its own.
130
- `post_thread_update` covers evidence that shouldn't wait for the turn to
131
- finish: it posts a one-or-two-sentence update through the agent's token,
132
- with `<@USERID>` mentions for the people who need to act. The instructions
133
- restrict it to changes in hypothesis, severity, or blast radius. Progress
134
- narration doesn't qualify.
135
-
136
- ## Connect the Slack app
137
-
138
- Channel watching is Socket Mode only, so this example uses a dedicated
139
- app:
140
-
141
- ```bash
142
- agent-sdk slack create --dir examples/oncall --name "Oncall" --channel-posts
143
- agent-sdk slack doctor --prefix ONCALL
144
- ```
145
-
146
- `--channel-posts` prefills channel-watch events (`message.channels` /
147
- `message.groups`). Invite the bot to each watched channel after the
148
- wizard finishes.
149
-
150
- `ONCALL_ALERTS_CHANNELS` sets the watch list as comma-separated ids or
151
- `#names`. It defaults to `#alerts`.
152
-
153
- Wire observability MCP servers under `agent/mcp-connections/` so evidence
154
- gathering reaches your logs, metrics, and dashboards. The example ships
155
- none; without them the agent works from the alert text, its links, and the
156
- thread.
157
-
158
- ## Validate and start the server
159
-
160
- ```bash
161
- agent-sdk validate --dir examples/oncall
162
- agent-sdk info --dir examples/oncall --json
163
- agent-sdk dev examples/oncall
164
- ```
165
-
166
- The info output lists four server tools and the watched channel on the
167
- `slack-app` channel. Missing tokens leave that channel idle without
168
- stopping the server.
169
-
170
- In dev mode, reminder timers don't auto-fire. List and fire them by hand
171
- through the dev routes described in
172
- [Schedules and reminders](../reference/schedules.md#dispatch-and-dev-mode).
173
-
174
- ## Test the policy without Slack
175
-
176
- The engagement policy is plain code with unit tests:
177
-
178
- ```bash
179
- pnpm exec vitest run examples/oncall
180
- ```
181
-
182
- The integration test drives a synthetic Events API delivery through the
183
- real parse, watch, and dispatch plumbing. It asserts a bot alert
184
- dispatches pinned to its thread after the lock-in reaction, the agent's
185
- own posts never loop, and replies coalesce behind the quiet window.
186
-
187
- The smoke eval spends a model turn:
188
-
189
- ```bash
190
- agent-sdk eval --dir examples/oncall smoke --json
191
- ```
192
-
193
- It checks identity and the reminder-tool route lexically. It doesn't prove
194
- Slack delivery or reaction behavior; the unit tests cover the dispatch
195
- side, and a live check needs the dedicated app connected.
196
-
197
- ## Build an alert investigator
198
-
199
- Use this structure when a bot feed should drive thread-scoped work:
200
-
201
- 1. Watch the feed channel with `includeBotPosts: true` and a narrow
202
- allowlist.
203
- 2. Acknowledge on the triggering post before dispatching, so people see
204
- ownership without opening the thread.
205
- 3. Dispatch new items immediately; coalesce thread chatter behind a
206
- per-thread quiet window.
207
- 4. Give the agent reminder tools for anything that needs time, and make
208
- cancel discipline part of the instructions.
209
- 5. Keep every posted message brief and tied to evidence the agent saw.
210
-
211
- ## Where to go next
212
-
213
- - [Slack](../guides/slack.md)
214
- - [Schedules and reminders](../reference/schedules.md)
215
- - [Tools](../reference/tools.md)
216
- - [Playbook router](./benny.md) for the human-post variant of channel
217
- watching
@@ -1,270 +0,0 @@
1
- ---
2
- title: "Run staged security reviews from GitHub events"
3
- description: "Orchestrate parallel reviewer agents, streamed triage, deterministic stages, live playground progress, durable sessions, and severity A/B metrics."
4
- ---
5
-
6
- # Run staged security reviews from GitHub events
7
-
8
- Security Reviewer turns a pull request into a staged host-side review. One
9
- tool prepares the diff and selects modules. A second fans out specialized
10
- reviewers and triages candidates as they arrive. A third deduplicates the
11
- confirmed findings, writes artifacts, and may publish a GitHub review.
12
-
13
- Use this example when the workflow needs several model workers, but the host
14
- must own orchestration, progress, artifacts, and the final write.
15
-
16
- Source lives under [`factory/security-reviewer/`](../../../../factory/security-reviewer/) (factory agent, not under `examples/`).
17
-
18
- Want one model turn and one comment? Scaffold the
19
- [security-reviewer template](../templates/security-reviewer.md).
20
-
21
- [Browse the Security Reviewer source.](../../../../factory/security-reviewer/)
22
-
23
- ## Run a three-stage host pipeline
24
-
25
- Security Reviewer is a pipeline, not one long agent turn:
26
-
27
- | Stage | Tool | Result |
28
- | --- | --- | --- |
29
- | Prepare | `prepare_review` | Fetch metadata and diff, create a `runId`, and select security modules. |
30
- | Review and triage | `run_reviewers` | Run module reviewers in parallel and start triage as each candidate arrives. |
31
- | Finalize | `finalize_review` | Apply thresholds, deduplicate findings, write artifacts, and optionally post a review. |
32
-
33
- `run_triage` remains available as a compatibility stage. In the normal flow,
34
- triage has already completed inside `run_reviewers`, so it reports existing
35
- results. If candidates exist without triage output, it starts triage workers
36
- and writes their state.
37
-
38
- The configured root agent chooses and sequences tools in chat. The review
39
- workers use a model selected by the host pipeline. They are
40
- created programmatically with the agent SDK, not discovered from
41
- `agent/subagents/`.
42
-
43
- ## Follow a GitHub review
44
-
45
- 1. A pull request event starts a review and opens a playground session.
46
- 2. The playground shows reviewer and triage progress.
47
- 3. Confirmed findings appear in the PR review.
48
- 4. A GitHub Check reports completion or a processing failure.
49
-
50
- ## Map the framework features
51
-
52
- | Capability | Source | Role |
53
- | --- | --- | --- |
54
- | Root agent | [`agent/agent.ts`](../../../../factory/security-reviewer/agent/agent.ts), [`agent/instructions.md`](../../../../factory/security-reviewer/agent/instructions.md) | Configure local chat and explain the three-stage contract. |
55
- | Server tools | [`agent/tools/`](../../../../factory/security-reviewer/agent/tools/) | Expose each review stage to chat and host orchestration. |
56
- | GitHub channel | [`agent/channels/github.ts`](../../../../factory/security-reviewer/agent/channels/github.ts) | Filter wakes, run background tasks, and publish status. |
57
- | Progress channel | [`agent/channels/asr-progress.ts`](../../../../factory/security-reviewer/agent/channels/asr-progress.ts) | Serve live reviewer and triage state by `runId`. |
58
- | Playground renderer | [`agent/playground/tools/run_reviewers.tsx`](../../../../factory/security-reviewer/agent/playground/tools/run_reviewers.tsx) | Replace the generic tool chip with live module rows. |
59
- | SDK review pipeline | [`review-stages.ts`](../../../../factory/security-reviewer/agent/lib/review-stages.ts), [`@anysphere/security-review-lib`](../../../../packages/security-review-lib/src/index.ts) | Select modules, call model workers, triage, deduplicate, and write artifacts. |
60
- | Storage | [`agent/storage.ts`](../../../../factory/security-reviewer/agent/storage.ts) | Persist framework sessions with `cursorHostedStorage` (lazy restore). |
61
- | A/B | [`agent/ab.ts`](../../../../factory/security-reviewer/agent/ab.ts) | Compare all-severity versus high-only GitHub comments. |
62
- | Eval | [`evals/`](../../../../factory/security-reviewer/evals/) | Check stage-tool presence against a pinned sample. |
63
-
64
- There is no Slack channel, authored skill, discovered subagent, MCP
65
- connection, schedule, reminder, hook, tool approval, or cloud runtime.
66
-
67
- ## Prepare the host
68
-
69
- You need:
70
-
71
- - Node 22.13 or newer.
72
- - An agent-runtime credential for the root turn and review workers.
73
- - GitHub read access for preparation.
74
- - GitHub write access for webhook-driven reviews and Checks.
75
-
76
- The pipeline exposes settings for:
77
-
78
- - the worker model,
79
- - reviewer and triage parallelism,
80
- - reviewer, triage, duplicate-gate, and final-dedupe timeouts, and
81
- - prior-comment loading.
82
-
83
- The active names live beside the orchestration in
84
- [`review-stages.ts`](../../../../factory/security-reviewer/agent/lib/review-stages.ts).
85
-
86
- ## Validate the discovered agent
87
-
88
- ```bash
89
- agent-sdk validate --dir ../../factory/security-reviewer
90
- agent-sdk info --dir ../../factory/security-reviewer --json
91
- agent-sdk eval --dir ../../factory/security-reviewer --list
92
- ```
93
-
94
- `validate` should pass. `info` and `eval --list` should match the capabilities
95
- mapped above.
96
-
97
- ## Know the chat path's write boundary
98
-
99
- In chat, the root instructions ask the model to use this order:
100
-
101
- ```text
102
- prepare_review -> run_reviewers -> finalize_review
103
- ```
104
-
105
- They also ask the model to set `postComment: true` only on request. This is
106
- prompt policy, not a deterministic safety gate. The model chooses tool
107
- arguments, and `finalize_review` has no human approval. Use the direct stage
108
- calls below when a no-post proof must be enforced.
109
-
110
- ## Call stages directly without publishing
111
-
112
- Call each stage and pass `postComment: false` yourself:
113
-
114
- ```bash
115
- agent-sdk call prepare_review \
116
- --dir ../../factory/security-reviewer \
117
- --input '{"prUrl":"https://github.com/owner/repo/pull/123"}'
118
-
119
- agent-sdk call run_reviewers \
120
- --dir ../../factory/security-reviewer \
121
- --input '{"runId":"<run-id>"}'
122
-
123
- agent-sdk call finalize_review \
124
- --dir ../../factory/security-reviewer \
125
- --input '{"runId":"<run-id>","postComment":false}'
126
- ```
127
-
128
- Review state lives under the project's run-artifact directory, so later
129
- stages can open the prepared `runId`.
130
-
131
- > [!CAUTION]
132
- > `finalize_review` with `postComment: true` writes to GitHub. The webhook
133
- > path always requests that write. Chat instructions alone don't prevent it.
134
-
135
- ## Watch parallel work in the playground
136
-
137
- Run the dev server:
138
-
139
- ```bash
140
- agent-sdk dev ../../factory/security-reviewer
141
- ```
142
-
143
- Open the printed playground and start a review. The custom
144
- `run_reviewers` renderer polls the progress channel's `GET /:runId` route.
145
-
146
- It refreshes every 500 ms while the stage runs. Each row shows a reviewer
147
- module's state, candidates, reviewed areas, and failure. A second section
148
- shows triage jobs and confirmed or rejected counts.
149
-
150
- This is an authored playground extension. The Agent SDK discovers it by the tool
151
- name, so the generic `run_reviewers` chip becomes a domain-specific view
152
- without changing the framework playground.
153
-
154
- ## Fan out reviewers while triage starts
155
-
156
- Module selection uses repository and path rules. The current module set
157
- covers:
158
-
159
- - agent tooling trust boundaries,
160
- - privileged service RPCs,
161
- - product-specific security risks,
162
- - dependency and supply-chain changes,
163
- - deployment and infrastructure code,
164
- - filesystem and workspace boundaries,
165
- - privacy, and
166
- - general security review.
167
-
168
- Selected modules may run more than once. Candidates pass through a duplicate
169
- gate, then bounded triage. Reviewer or triage failures can produce partial
170
- results. A final dedupe failure stops finalization.
171
-
172
- The pipeline writes JSONL journals as work completes. Final artifacts include
173
- the review bundle, patch, reviewer outputs, candidates, triage decisions,
174
- findings, accounting, and audit events.
175
-
176
- ## Separate session storage from review artifacts
177
-
178
- `defineStorage` + `cursorHostedStorage` sends Agent SDK session and event records
179
- to Cursor-hosted Bugbot storage through the control-plane proxy. Security
180
- Reviewer sets `restore: "off"` so startup doesn't load old review sessions in
181
- bulk. A continuation lookup can still fetch a needed session.
182
-
183
- The staged review files are separate from session storage. Session-store
184
- durability doesn't preserve those files. All stages for one `runId` must see
185
- the same filesystem.
186
-
187
- This split is useful when conversation history needs shared durability but
188
- large review artifacts belong on attached storage or an object store.
189
-
190
- ## Compare live comment variants
191
-
192
- The comment-severity experiment uses sticky session assignment with a 5%
193
- holdout:
194
-
195
- - `control` posts every finding.
196
- - `treatment` posts only high and critical findings.
197
-
198
- Finalization enforces the comment filter. The treatment also adds an
199
- instruction overlay asking chat and playground summaries to lead with high
200
- and critical findings. Full artifacts, `finalResponse`, and finding counts
201
- still include every finding. Stage-tool counters appear in the
202
- playground A/B view. Local sample and snapshot files persist under
203
- `.agent-serve/`.
204
-
205
- When a treatment session has only low or medium findings, the filtered review
206
- body currently says no vulnerabilities were found even though artifacts and
207
- status retain findings. Account for that mismatch before using this
208
- experiment as a publishing policy.
209
-
210
- Eval sessions skip A/B enrollment.
211
-
212
- ## Test the GitHub channel carefully
213
-
214
- The channel uses the host's Cursor account repository scope. It wakes on
215
- `opened` and `synchronize`, skips drafts, and posts its own GitHub Check.
216
-
217
- Inspect its event surface:
218
-
219
- ```bash
220
- agent-sdk github events \
221
- --dir ../../factory/security-reviewer \
222
- --json
223
- ```
224
-
225
- Replay reaches the full publishing path:
226
-
227
- ```bash
228
- TEST_PR_URL=https://github.com/your-org/allowlisted-test-repo/pull/123
229
- agent-sdk github replay \
230
- "$TEST_PR_URL" \
231
- --dir ../../factory/security-reviewer \
232
- --action opened
233
- ```
234
-
235
- Set `TEST_PR_URL` to a PR in the channel's configured repository allowlist.
236
- Run the command only against a PR intended for test reviews. It posts a
237
- GitHub Check and may post findings.
238
-
239
- ## Inspect the eval before running it
240
-
241
- ```bash
242
- agent-sdk eval --dir ../../factory/security-reviewer --list
243
- ```
244
-
245
- The case gates the review flow and prevents comment posting. It still fetches
246
- the live PR, so it needs GitHub access.
247
-
248
- ## Build another staged pipeline
249
-
250
- Use staged host orchestration when:
251
-
252
- - each phase needs its own timeout and artifact,
253
- - model workers should run in bounded parallel,
254
- - later work can start as soon as partial results arrive,
255
- - a webhook must acknowledge before the work finishes, or
256
- - operators need live progress beyond one tool spinner.
257
-
258
- Keep external writes in finalization. Pass a `runId` between stages, journal
259
- progress before publishing, and make partial-worker failures visible in the
260
- result.
261
-
262
- ## Where to go next
263
-
264
- - [GitHub](../guides/github.md)
265
- - [Tools](../reference/tools.md)
266
- - [Channels](../reference/channels.md)
267
- - [Playground](../reference/playground.md)
268
- - [Storage](../storage.md)
269
- - [Live A/B metrics](../ab.md)
270
- - [Evals](../evals.md)
@@ -1,147 +0,0 @@
1
- ---
2
- title: "Put a minimal agent in Slack"
3
- description: "Use account-linked Slack routing, thread continuity, identity, and suggested prompts with one small channel."
4
- ---
5
-
6
- # Put a minimal agent in Slack
7
-
8
- Slack agent is the smallest channel example. It has one runtime config, one
9
- instruction file, and one authored channel. A teammate mentions the agent,
10
- the local runtime harness runs a turn, and the answer
11
- returns to the same Slack thread.
12
-
13
- Use it to learn the minimum needed for a Slack agent before adding tools,
14
- workflows, or a dedicated app.
15
-
16
- [Browse the Slack agent source.](../../examples/slack-agent/)
17
-
18
- ## Keep the Slack channel small
19
-
20
- Slack agent delegates transport details to the host connection. The authored
21
- file selects the account-linked transport, gives the agent a single-token
22
- router name and icon, and supplies suggested prompts.
23
-
24
- The complete channel lives in
25
- [`agent/channels/slack.ts`](../../examples/slack-agent/agent/channels/slack.ts).
26
- The framework supplies message intake, thread-scoped sessions, delivery,
27
- status updates, and suggested prompts.
28
-
29
- ## Follow a Slack message
30
-
31
- 1. A user mentions the agent or sends the host app a direct message naming
32
- it.
33
- 2. The Slack relay selects this channel by its single-token `agentName`.
34
- 3. The Agent SDK maps the Slack channel and thread timestamp to a continuation
35
- key.
36
- 4. The local harness runs with
37
- [`instructions.md`](../../examples/slack-agent/agent/instructions.md).
38
- 5. The response returns to the triggering thread.
39
- 6. A later message in the same thread resumes the durable session.
40
-
41
- The prompt asks for concise threaded replies. It doesn't define domain policy
42
- or tool routing.
43
-
44
- ## Map the Slack agent files
45
-
46
- | File | Purpose |
47
- | --- | --- |
48
- | [`package.json`](../../examples/slack-agent/package.json) | Declares the example package and Agent SDK dependency. |
49
- | [`agent/agent.ts`](../../examples/slack-agent/agent/agent.ts) | Names the agent and selects the model. The omitted `runtime` defaults to local. |
50
- | [`agent/instructions.md`](../../examples/slack-agent/agent/instructions.md) | Sets the always-on response style. |
51
- | [`agent/channels/slack.ts`](../../examples/slack-agent/agent/channels/slack.ts) | Connects the signed-in host account to Slack. |
52
- | [`agent/storage.ts`](../../examples/slack-agent/agent/storage.ts) | Persists sessions and events with `cursorHostedStorage`. |
53
-
54
- There are no authored tools, skills, MCP connections, subagents, schedules,
55
- hooks, A/B experiments, or evals. This small surface is the lesson.
56
-
57
- ## Connect the host
58
-
59
- You need:
60
-
61
- - Node 22.13 or newer.
62
- - An agent-runtime credential.
63
- - Slack connected through the selected channel transport.
64
-
65
- Sign in and confirm the active account:
66
-
67
- ```bash
68
- agent-sdk login
69
- agent-sdk whoami
70
- ```
71
-
72
- The selected transport owns Slack credential setup. See the
73
- [Slack guide](../guides/slack.md) for account-linked and dedicated-app
74
- options.
75
-
76
- ## Validate and start the server
77
-
78
- ```bash
79
- agent-sdk validate --dir examples/slack-agent
80
- agent-sdk info --dir examples/slack-agent --json
81
- agent-sdk dev examples/slack-agent
82
- ```
83
-
84
- The dev command prints the playground URL. It also mounts the Slack channel
85
- and waits for relayed messages.
86
-
87
- In Slack, address the configured host app and router name, then send:
88
-
89
- > `<host-app mention> <router name>` Explain the Agent SDK in three bullets.
90
-
91
- Reply in the generated thread:
92
-
93
- > Make the second bullet simpler.
94
-
95
- The second message reaches the same session. You can open that session in the
96
- playground to inspect the received message, model events, final reply, and
97
- usage.
98
-
99
- ## Test without Slack
100
-
101
- Every project gets the built-in HTTP channel even when no HTTP file exists.
102
- Run a one-shot turn through it:
103
-
104
- ```bash
105
- agent-sdk run --dir examples/slack-agent \
106
- --message "Explain the Agent SDK simply."
107
- ```
108
-
109
- The same project also exposes an MCP endpoint. Since this agent has no server
110
- tools, its MCP surface contains `ask` and `check`, but not `call_tool`.
111
-
112
- These automatic surfaces let you test the prompt from the CLI and let another
113
- agent delegate to it later. The authored Slack channel only changes how work
114
- arrives and where replies go.
115
-
116
- ## Know when to add a dedicated app
117
-
118
- An account-linked Slack transport is a fit for mentions, direct messages, thread
119
- continuity, and agent-branded replies. Move to a dedicated Socket Mode channel
120
- when you need:
121
-
122
- - top-level channel watching,
123
- - interactive approval buttons,
124
- - a separate bot identity, or
125
- - Slack app events unsupported by the account-linked relay.
126
-
127
- Compare this example with [Playbook router](./benny.md), which adds allowlisted channel
128
- watching, and [Weather agent](./weather-agent.md), which adds approval buttons
129
- through a second Slack channel.
130
-
131
- ## Turn the channel into your own Slack agent
132
-
133
- Copy the three authored files, then change:
134
-
135
- - `name` in `agent.ts` for the harness identity,
136
- - `agentName` in `slack.ts` for the single-token router name,
137
- - the instructions for your domain, and
138
- - suggested prompts for the tasks teammates should try.
139
-
140
- Keep `agentName` free of whitespace. Use PascalCase for multiword names.
141
-
142
- ## Where to go next
143
-
144
- - [Slack](../guides/slack.md)
145
- - [Channels](../reference/channels.md)
146
- - [Sessions and streaming](../reference/sessions.md)
147
- - [Playground](../reference/playground.md)