@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,175 +0,0 @@
1
- ---
2
- title: "Build a feature wiki from merged pull requests"
3
- description: "Ingest every merged PR into per-feature wiki pages, consolidate with a daily digest schedule, and answer codebase questions with page citations."
4
- ---
5
-
6
- # Build a feature wiki from merged pull requests
7
-
8
- Codebase wiki keeps a living, feature-organized wiki of a repository.
9
- The GitHub channel acknowledges every closed pull request instantly,
10
- fetches a compact digest on the host, and spends a model turn only on
11
- merged PRs. The turn maps the change onto feature pages; a daily
12
- schedule writes a digest of what changed and rebuilds the index. Chat
13
- sessions answer codebase questions from the wiki with page citations.
14
-
15
- Use this project when documentation should accumulate from merges
16
- instead of being regenerated from scratch. Use
17
- [Knowledge base](./knowledge-base.md) when people should curate
18
- organizational context through conversation.
19
-
20
- [Browse the codebase wiki source.](../../examples/codebase-wiki/)
21
-
22
- ## Treat PRs as evidence and features as pages
23
-
24
- The wiki refuses to become a merge log:
25
-
26
- - The page tree is rigid: `index`, `features/<slug>`, and
27
- `digests/<yyyy-mm-dd>`. The store rejects anything else, so the wiki
28
- can't sprawl.
29
- - The `feature-mapping` skill requires a `wiki_search` before every
30
- write. A PR updates the page that owns its feature; a new page needs
31
- a genuinely new feature; chores change nothing.
32
- - Every touched page gets a dated changelog entry citing the PR
33
- number, so each fact traces back to a merge.
34
-
35
- The wiki itself is markdown on the serve host, in `.agent-serve/wiki/`
36
- by default with a `CODEBASE_WIKI_DIR` override. Sessions are
37
- disposable; the wiki is the durable state.
38
-
39
- ## Follow a merged PR
40
-
41
- 1. GitHub delivers `pull_request` with action `closed`. The channel
42
- returns a task acknowledgement immediately.
43
- 2. The task fetches the digest with the host `gh` CLI: title, body,
44
- labels, changed files, and a bounded diff excerpt. No checkout.
45
- 3. The webhook payload can't say whether the PR merged, so the host
46
- checks `mergedAt` and skips abandoned PRs without a model turn.
47
- 4. For merged PRs, the task starts the turn with `pr/DIGEST.md` seeded
48
- through `workspaceFiles` and a `pr:<owner/repo#N>` continuation
49
- token, so redeliveries resume instead of double-ingesting.
50
- 5. The model follows `feature-mapping`: search, update or create
51
- feature pages, add changelog entries, and refresh `index` when pages
52
- were added.
53
-
54
- In chat, "ingest PR #123" runs the same flow through the `ingest_pr`
55
- tool, which writes the digest into the active session workspace.
56
-
57
- ## Map the wiki files
58
-
59
- | File | Purpose |
60
- | --- | --- |
61
- | [`agent/agent.ts`](../../examples/codebase-wiki/agent/agent.ts) | Selects the local runtime and model. |
62
- | [`agent/instructions.md`](../../examples/codebase-wiki/agent/instructions.md) | Splits the job into merge ingestion and wiki-cited Q&A. |
63
- | [`agent/lib/wiki-store.ts`](../../examples/codebase-wiki/agent/lib/wiki-store.ts) | Enforces the rigid page tree and owns reads, writes, and search. |
64
- | [`agent/lib/pr-digest.ts`](../../examples/codebase-wiki/agent/lib/pr-digest.ts) | Fetches PR metadata and diff, and formats `pr/DIGEST.md`. |
65
- | [`agent/tools/ingest_pr.ts`](../../examples/codebase-wiki/agent/tools/ingest_pr.ts) | Exposes host digest preparation for chat-driven backfills. |
66
- | [`agent/tools/wiki_read.ts`](../../examples/codebase-wiki/agent/tools/wiki_read.ts), [`wiki_search.ts`](../../examples/codebase-wiki/agent/tools/wiki_search.ts), [`wiki_write.ts`](../../examples/codebase-wiki/agent/tools/wiki_write.ts) | Read, search, and rewrite wiki pages. |
67
- | [`agent/skills/feature-mapping.md`](../../examples/codebase-wiki/agent/skills/feature-mapping.md) | Maps changes onto features and fixes the page and changelog shape. |
68
- | [`agent/schedules/daily-digest.md`](../../examples/codebase-wiki/agent/schedules/daily-digest.md) | Writes `digests/<date>`, rebuilds the index, and flags stale pages. |
69
- | [`agent/channels/github.ts`](../../examples/codebase-wiki/agent/channels/github.ts) | Acknowledges closed PRs and starts merged-only ingest turns. |
70
- | [`agent/storage.ts`](../../examples/codebase-wiki/agent/storage.ts) | Persists sessions and events with `cursorHostedStorage`. |
71
- | [`evals/evals.config.ts`](../../examples/codebase-wiki/evals/evals.config.ts) | Caps eval run concurrency. |
72
- | [`evals/ingest.eval.ts`](../../examples/codebase-wiki/evals/ingest.eval.ts) | Gates ingest decisions against the wiki filesystem. |
73
-
74
- There is no MCP connection, subagent, hook, or A/B experiment.
75
-
76
- ## Prepare credentials and services
77
-
78
- You need:
79
-
80
- - Node 22.13 or newer.
81
- - An agent-runtime credential for model turns.
82
- - `gh` on `PATH` with read access to the PRs you ingest.
83
-
84
- The channel verifies webhook signatures when `GITHUB_WEBHOOK_SECRET` is
85
- set and narrows repositories with
86
- `CODEBASE_WIKI_REPOS=owner/repo,owner/other`. The agent never writes to
87
- GitHub. Its only side effects are wiki files on the serve host.
88
-
89
- ## Validate the surface
90
-
91
- ```bash
92
- agent-sdk validate --dir examples/codebase-wiki
93
- agent-sdk info --dir examples/codebase-wiki --json
94
- ```
95
-
96
- The manifest should report four server tools, one skill, one schedule,
97
- and the authored GitHub channel.
98
-
99
- ## Ingest without webhook plumbing
100
-
101
- Replay a real merged PR as a closed delivery:
102
-
103
- ```bash
104
- agent-sdk dev examples/codebase-wiki
105
-
106
- agent-sdk github replay https://github.com/owner/repo/pull/123 \
107
- --dir examples/codebase-wiki --action closed
108
- ```
109
-
110
- The reply is a 202 acknowledgement; the ingest continues in the task.
111
- Watch the session in the playground, then read the result on disk:
112
-
113
- ```bash
114
- ls examples/codebase-wiki/.agent-serve/wiki/features/
115
- ```
116
-
117
- Each ingested feature page carries an overview, a "How it works"
118
- section, and a changelog line citing the PR. Deterministic digest
119
- preparation works without a model turn:
120
-
121
- ```bash
122
- agent-sdk call ingest_pr \
123
- --dir examples/codebase-wiki \
124
- --input '{"pr":"https://github.com/owner/repo/pull/123"}'
125
- ```
126
-
127
- A PR closed without merging returns `merged: false` and a note telling
128
- the model to change nothing.
129
-
130
- ## Run the daily digest
131
-
132
- The schedule fires at 07:00 UTC. Under `agent-sdk dev`, trigger it by
133
- hand:
134
-
135
- ```bash
136
- curl -s -X POST http://127.0.0.1:3000/codebase-wiki/v1/dev/schedules/daily-digest
137
- ```
138
-
139
- The turn reads every feature changelog, writes
140
- `digests/<today>` grouped by feature with PR citations, rebuilds
141
- `index`, and reports one line per page it wrote. Entries dated today
142
- always count; a digest only claims a quiet day when no entry qualifies.
143
-
144
- ## Run the evals
145
-
146
- ```bash
147
- agent-sdk eval --dir examples/codebase-wiki --list
148
- agent-sdk eval --dir examples/codebase-wiki ingest/update-existing
149
- ```
150
-
151
- The cases seed a temp wiki through `CODEBASE_WIKI_DIR` and build
152
- digests with the same formatter the channel uses, so they run without
153
- GitHub or network access. The gates check the filesystem, not prose:
154
- a new feature page lands on a new slug, a related PR updates the
155
- existing page instead of duplicating it, an unmerged PR changes
156
- nothing, and the daily pass writes a digest naming both seeded
157
- features.
158
-
159
- ## Reuse the merge-ingestion pattern
160
-
161
- Copy this shape when events should accumulate into curated state:
162
-
163
- - Acknowledge webhooks with a task and decide host-side whether a
164
- model turn is worth spending.
165
- - Seed evidence through `workspaceFiles` so the model never fetches.
166
- - Constrain the durable store's shape in code and its content in a
167
- skill.
168
- - Add a consolidation schedule so incremental writes stay coherent.
169
-
170
- ## Where to go next
171
-
172
- - [GitHub webhooks](../guides/github.md)
173
- - [Schedules](../reference/schedules.md)
174
- - [Tools](../reference/tools.md)
175
- - [Evals](../evals.md)
@@ -1,197 +0,0 @@
1
- ---
2
- title: "Route PR reviews by code ownership"
3
- description: "Map changed paths to per-area review playbooks, fan one reviewer subagent out per area, and aggregate verdicts into a single approval decision."
4
- ---
5
-
6
- # Route PR reviews by code ownership
7
-
8
- Codeowners review gives each part of a codebase its own review. A
9
- CODEOWNERS-style table maps changed paths to review areas; each area
10
- has a markdown playbook with the team's rules for that domain; and one
11
- `area-reviewer` subagent runs per routed area, in parallel. A billing
12
- change gets the billing review, a migration gets the migration review,
13
- and an author's personal style rides along as advisory notes. The lead
14
- aggregates: approve only when every area approves.
15
-
16
- Use this project when review quality depends on domain-specific values
17
- instead of one generic checklist.
18
-
19
- [Browse the codeowners review source.](../../examples/codeowners-review/)
20
-
21
- ## Keep routing in code and judgment in playbooks
22
-
23
- The pipeline separates three concerns:
24
-
25
- - `reviews/REVIEWERS` routes. Host code matches every changed path
26
- against the table; every matching rule applies, and unmatched paths
27
- fall back to the `general` playbook. Routing is glob code with unit
28
- tests, not model judgment.
29
- - `reviews/<area>.md` judges. Each playbook is a severity-ordered rule
30
- list the team owns: billing mandates integer cents and idempotent
31
- webhooks, migrations forbid destructive DDL beside code changes,
32
- background jobs demand idempotency and dead-letter paths.
33
- - Subagents review. The lead reads nothing but the manifest and
34
- routes; each `area-reviewer` reads one playbook plus its files' diff
35
- hunks and returns a mechanical verdict: request changes on any High
36
- finding or two Mediums.
37
-
38
- Personal styles extend the same mechanism. `reviews/people/<login>.md`
39
- attaches automatically, as advisory notes, whenever that person authors
40
- the PR. Adding an area or a style is a markdown file plus at most one
41
- routing line.
42
-
43
- ## Follow a review
44
-
45
- 1. A PR arrives: a GitHub `pull_request` event, a chat message, or a
46
- bundled fixture reference.
47
- 2. `prepare_review` fetches metadata and the diff with the host `gh`
48
- CLI, routes every changed file, and writes the `pr/` evidence tree:
49
- `MANIFEST.md`, `ROUTES.md`, `diff.patch`, and a copy of each matched
50
- playbook.
51
- 3. The lead follows the `review-process` skill and issues one
52
- `area-reviewer` delegation per routed area, plus one per personal
53
- style, all in one step so they run in parallel.
54
- 4. Each reviewer reads its playbook, reviews only its files, and
55
- returns a verdict line with at most three findings.
56
- 5. The lead aggregates per-area sections and the overall verdict:
57
- APPROVE only when every non-advisory area approved.
58
-
59
- Nothing posts to GitHub. Verdicts live in the session; the
60
- [Approval Buddy guide](./approval-buddy.md) shows how to wire a real
61
- APPROVE and commit statuses on top of the same shape.
62
-
63
- ## Map the review files
64
-
65
- | File | Purpose |
66
- | --- | --- |
67
- | [`reviews/REVIEWERS`](../../examples/codeowners-review/reviews/REVIEWERS) | Routes path patterns to review areas. |
68
- | [`reviews/`](../../examples/codeowners-review/reviews/) | Holds the area playbooks and `people/<login>.md` styles. |
69
- | [`agent/lib/routing.ts`](../../examples/codeowners-review/agent/lib/routing.ts) | Parses the table, matches globs, and unions areas per file. |
70
- | [`agent/lib/prepare-review.ts`](../../examples/codeowners-review/agent/lib/prepare-review.ts) | Fetches PRs or fixtures and builds the evidence tree. |
71
- | [`agent/tools/prepare_review.ts`](../../examples/codeowners-review/agent/tools/prepare_review.ts) | Exposes host preparation as a typed server tool. |
72
- | [`agent/tools/list_review_areas.ts`](../../examples/codeowners-review/agent/tools/list_review_areas.ts) | Answers routing questions deterministically. |
73
- | [`agent/skills/review-process.md`](../../examples/codeowners-review/agent/skills/review-process.md) | Fixes the fan-out procedure and the verdict rule. |
74
- | [`agent/subagents/area-reviewer/`](../../examples/codeowners-review/agent/subagents/area-reviewer/) | Defines the one-area, one-playbook reviewer contract. |
75
- | [`agent/channels/github.ts`](../../examples/codeowners-review/agent/channels/github.ts) | Reviews opened, reopened, synchronized, and undrafted PRs. |
76
- | [`fixtures/`](../../examples/codeowners-review/fixtures/) | Ships two reviewable PRs with known planted findings. |
77
- | [`agent/storage.ts`](../../examples/codeowners-review/agent/storage.ts) | Persists sessions and events with `cursorHostedStorage`. |
78
- | [`evals/evals.config.ts`](../../examples/codeowners-review/evals/evals.config.ts) | Caps eval run concurrency. |
79
- | [`evals/review.eval.ts`](../../examples/codeowners-review/evals/review.eval.ts) | Gates routing, fan-out, planted bugs, and verdicts. |
80
-
81
- There is no MCP connection, schedule, hook, A/B experiment, or custom
82
- storage.
83
-
84
- ## Prepare credentials and services
85
-
86
- You need:
87
-
88
- - Node 22.13 or newer.
89
- - An agent-runtime credential for model turns.
90
- - `gh` on `PATH` with read access to real PRs you review. The bundled
91
- fixtures need no network at all.
92
-
93
- The channel verifies webhook signatures when `GITHUB_WEBHOOK_SECRET` is
94
- set and narrows repositories with
95
- `CODEOWNERS_REVIEW_REPOS=owner/repo,owner/other`. Pushes re-review in
96
- the same session through the `pr:<label>` continuation token.
97
-
98
- ## Validate the surface
99
-
100
- ```bash
101
- agent-sdk validate --dir examples/codeowners-review
102
- agent-sdk info --dir examples/codeowners-review --json
103
- ```
104
-
105
- The manifest should report two server tools, one skill, one subagent,
106
- and the authored GitHub channel.
107
-
108
- ## Inspect routing without a model turn
109
-
110
- ```bash
111
- agent-sdk call list_review_areas --dir examples/codeowners-review --input '{}'
112
-
113
- agent-sdk call prepare_review \
114
- --dir examples/codeowners-review \
115
- --input '{"pr":"fixture:multi-area"}'
116
- ```
117
-
118
- The fixture routes to `billing`, `database-migrations`, and `frontend`,
119
- attaches `people/alice` because alice authored it, and returns the full
120
- evidence map. Point the same tool at a real PR URL and the routing runs
121
- against the live file list. The example table maps a hypothetical
122
- `src/` layout, so most real repositories route to `general` until you
123
- adapt `reviews/REVIEWERS`.
124
-
125
- ## Review the planted fixture
126
-
127
- ```bash
128
- agent-sdk dev examples/codeowners-review
129
- ```
130
-
131
- In the playground:
132
-
133
- > Review fixture:multi-area
134
-
135
- The fixture plants one violation per area: float dollar math in
136
- `src/billing/invoice.ts`, a `DROP COLUMN` plus a non-concurrent index
137
- in the migration, and a clickable `div` without loading states in the
138
- UI. The trace shows `prepare_review`, the evidence reads, four parallel
139
- `area-reviewer` cards, and an aggregated CHANGES REQUESTED verdict with
140
- each planted bug filed under its own area. The second fixture,
141
- `fixture:jobs-clean`, routes to `background-jobs` alone and ends in
142
- APPROVE.
143
-
144
- Review a real PR the same way:
145
-
146
- > Review https://github.com/owner/repo/pull/123
147
-
148
- Or replay one as a webhook delivery:
149
-
150
- ```bash
151
- agent-sdk github replay https://github.com/owner/repo/pull/123 \
152
- --dir examples/codeowners-review --action opened
153
- ```
154
-
155
- ## See how the verdict stays mechanical
156
-
157
- The reviewer contract computes verdicts from findings instead of
158
- letting the model pick a mood: findings first, then
159
- `request-changes` if any High exists or two Mediums do, otherwise
160
- `approve`. Pre-existing issues visible in context are scoped out, at
161
- most one advisory Low. The lead applies one rule on top: the PR is
162
- APPROVE only when every non-advisory area approved.
163
-
164
- ## Run the evals
165
-
166
- ```bash
167
- agent-sdk eval --dir examples/codeowners-review --list
168
- agent-sdk eval --dir examples/codeowners-review review/multi-area
169
- ```
170
-
171
- `review/multi-area` gates the whole pipeline: `prepare_review` runs, at
172
- least three subagent delegations happen, the reply carries every area
173
- section plus alice's advisory notes, the planted billing and migration
174
- bugs surface, and the verdict requests changes. `review/clean-approve`
175
- proves the approval path on the clean fixture, and
176
- `review/routing-question` gates that routing answers come from
177
- `list_review_areas`.
178
-
179
- ## Reuse the ownership-routing pattern
180
-
181
- Copy this shape when different code deserves different judgment:
182
-
183
- - Route with data and code, not prompt instructions. Tables and globs
184
- are testable.
185
- - Write one playbook per domain and keep each reviewer blind to the
186
- others.
187
- - Make verdicts mechanical so aggregation is arithmetic, not
188
- negotiation.
189
- - Ship fixtures with planted findings so the review quality itself is
190
- testable offline.
191
-
192
- ## Where to go next
193
-
194
- - [Approval Buddy](./approval-buddy.md) for posting real approvals
195
- - [Subagents](../reference/subagents.md)
196
- - [GitHub webhooks](../guides/github.md)
197
- - [Evals](../evals.md)
@@ -1,206 +0,0 @@
1
- ---
2
- title: "Compose agents with a concierge"
3
- description: "Delegate weather requests through a peer MCP connection while each agent keeps its own instructions, tools, context, and sessions."
4
- ---
5
-
6
- # Compose agents with a concierge
7
-
8
- Concierge answers general questions itself and sends every weather question
9
- to the weather agent. The connection is one file. The Agent SDK turns the target
10
- agent's MCP endpoint into tools the concierge can call.
11
-
12
- Use this example when two agents are useful on their own and one should
13
- delegate a narrow class of work to the other.
14
-
15
- [Browse the Concierge source.](../../examples/concierge/)
16
-
17
- ## Delegate through a peer MCP connection
18
-
19
- Concierge has no domain tool of its own. Its capability comes from a peer MCP
20
- connection:
21
-
22
- ```ts
23
- export default defineConnection({
24
- agent: "weather-agent",
25
- description:
26
- "The weather-agent peer: delegate weather questions with ask; it runs its own tools (live Open-Meteo data) in its own context.",
27
- });
28
- ```
29
-
30
- The filename
31
- [`weather.ts`](../../examples/concierge/agent/mcp-connections/weather.ts)
32
- makes the MCP server name `weather`. The `agent` field points to the sibling
33
- project's mount slug.
34
-
35
- This differs from a subagent. A peer keeps its own:
36
-
37
- - root instructions,
38
- - tools and MCP connections,
39
- - durable sessions,
40
- - playground, and
41
- - public MCP endpoint.
42
-
43
- An SDK subagent inherits the parent's execution surface and only its parent
44
- can invoke it. See [Agent-to-agent](../guides/agent-to-agent.md) for the full
45
- comparison.
46
-
47
- ## Follow a delegated request
48
-
49
- 1. A user asks Concierge what to pack for Paris.
50
- 2. [`instructions.md`](../../examples/concierge/agent/instructions.md)
51
- classifies packing advice as weather-related.
52
- 3. The model calls `weather.ask` with the city, timeframe, units, and the
53
- complete question.
54
- 4. The Agent SDK creates an MCP-channel session inside `weather-agent`.
55
- 5. Weather agent calls its own Open-Meteo tools and returns a reply.
56
- 6. If the turn exceeds the bounded MCP wait, `ask` returns
57
- `status: "running"`. Concierge calls `weather.check` with the returned
58
- `sessionId`.
59
- 7. Concierge relays the result and may add one sentence of travel advice.
60
-
61
- The weather session appears in the weather agent's playground. It doesn't
62
- share Concierge's conversation history.
63
-
64
- ## Map the delegation files
65
-
66
- | File | Purpose |
67
- | --- | --- |
68
- | [`agent/agent.ts`](../../examples/concierge/agent/agent.ts) | Describes the root agent and selects the local runtime. |
69
- | [`agent/instructions.md`](../../examples/concierge/agent/instructions.md) | Draws a strict weather-only delegation boundary. |
70
- | [`agent/mcp-connections/weather.ts`](../../examples/concierge/agent/mcp-connections/weather.ts) | Resolves the peer by its `weather-agent` slug. |
71
- | [`agent/storage.ts`](../../examples/concierge/agent/storage.ts) | Persists sessions and events with `cursorHostedStorage`. |
72
-
73
- Concierge doesn't author channels, tools, skills, subagents, schedules,
74
- hooks, A/B experiments, or evals. The built-in HTTP and MCP surfaces still
75
- exist.
76
-
77
- Its own MCP endpoint exposes `ask` and `check`. It doesn't expose
78
- `call_tool` because Concierge has no server tools. The target weather agent
79
- does expose `call_tool`, so that tool also appears under Concierge's
80
- `weather` connection.
81
-
82
- ## Mount both agents
83
-
84
- A peer can only resolve within a multi-agent serve host. Validating Concierge
85
- alone checks its files, but serving it alone fails because `weather-agent`
86
- isn't mounted.
87
-
88
- From `packages/agent-serve`, validate both projects:
89
-
90
- ```bash
91
- agent-sdk validate --dir examples/concierge
92
- agent-sdk validate --dir examples/weather-agent
93
- ```
94
-
95
- Don't serve the repository's whole `examples/` directory for this proof.
96
- Several advanced examples subscribe to live GitHub events. Create an ignored
97
- two-project mount instead. Copy only the authored files needed for this proof,
98
- leaving Weather's Slack channels out:
99
-
100
- ```bash
101
- mkdir -p "$PWD/.agent-serve"
102
- PAIR_DIR=$(mktemp -d "$PWD/.agent-serve/concierge-weather.XXXXXX")
103
- mkdir -p "$PAIR_DIR/concierge" "$PAIR_DIR/weather-agent/agent"
104
- cp -R examples/concierge/agent "$PAIR_DIR/concierge/"
105
- cp examples/concierge/package.json "$PAIR_DIR/concierge/"
106
- cp examples/weather-agent/agent/{agent.ts,instructions.md,ab.ts,ab.config.ts} \
107
- "$PAIR_DIR/weather-agent/agent/"
108
- cp -R examples/weather-agent/agent/{tools,skills,mcp-connections,subagents,schedules,hooks,lib} \
109
- "$PAIR_DIR/weather-agent/agent/"
110
- cp -R examples/weather-agent/mcp "$PAIR_DIR/weather-agent/"
111
- cp examples/weather-agent/package.json "$PAIR_DIR/weather-agent/"
112
- agent-sdk dev "$PAIR_DIR"
113
- ```
114
-
115
- The host resolves the peer after it knows every mount. The local peer URL is
116
- `http://127.0.0.1:3000/weather-agent/v1/mcp`. You still need an agent-runtime
117
- credential for both model turns.
118
-
119
- ## Exercise delegation
120
-
121
- Send a weather request to the running Concierge:
122
-
123
- ```bash
124
- agent-sdk chat \
125
- --url http://127.0.0.1:3000/concierge \
126
- --message "What should I pack for Paris tomorrow?"
127
- ```
128
-
129
- Open both playgrounds:
130
-
131
- - `http://127.0.0.1:3000/concierge/playground`
132
- - `http://127.0.0.1:3000/weather-agent/playground`
133
-
134
- The Concierge transcript shows the MCP call. The weather playground shows a
135
- separate session on the `mcp` channel with live weather tool calls.
136
-
137
- Now send a general request:
138
-
139
- ```bash
140
- agent-sdk chat \
141
- --url http://127.0.0.1:3000/concierge \
142
- --message "Give me three ideas for a quiet weekend."
143
- ```
144
-
145
- The instructions tell Concierge to answer without delegating. This contrast is
146
- the proof loop: weather goes to the peer, unrelated work stays local.
147
-
148
- ## Preserve peer context
149
-
150
- `weather.ask` returns a peer `sessionId`. Passing it back to a later `ask`
151
- continues the same weather conversation. Concierge's instructions require
152
- this for follow-ups dependent on an earlier answer.
153
-
154
- Use a fresh call when the tasks are independent. Reuse the peer session when
155
- the second question needs facts or choices from the first.
156
-
157
- ## Keep delegation bounded
158
-
159
- The Agent SDK rejects unknown peer slugs and self-references during startup. It
160
- doesn't stop a cycle across several valid peers. If agent A delegates all work
161
- to B and B delegates all work to A, they can recurse.
162
-
163
- The prompt provides the guardrail here:
164
-
165
- - delegate every weather request,
166
- - include complete context, and
167
- - never delegate unrelated work.
168
-
169
- Write similarly narrow routing rules for each peer. A tool description helps
170
- the model choose the connection, but the always-on instructions own the
171
- policy.
172
-
173
- ## Use peers from cloud turns
174
-
175
- Local turns reach peers over loopback. A cloud VM can't reach the serve
176
- host's loopback address. Set a public URL when a cloud agent needs the peer:
177
-
178
- ```bash
179
- agent-sdk serve --dir "$PAIR_DIR" \
180
- --public-url https://agents.example.com \
181
- --bearer-token "$AGENT_TOKEN"
182
- ```
183
-
184
- The Agent SDK attaches the bearer token to peer calls. Without `--public-url`,
185
- cloud turns omit peer connections and the server logs a warning.
186
-
187
- ## Compose your own pair
188
-
189
- To compose your own agents:
190
-
191
- 1. Give each project a stable directory slug.
192
- 2. Add `agent/mcp-connections/<name>.ts` to the caller.
193
- 3. Set `agent` to the target slug.
194
- 4. Describe the exact work the peer owns.
195
- 5. Mount both projects from their parent directory.
196
- 6. Add evals for delegated and non-delegated requests.
197
-
198
- Keep the peer independently useful. If the specialist only makes sense inside
199
- one parent and needs no independent sessions, use a subagent instead.
200
-
201
- ## Where to go next
202
-
203
- - [Agent-to-agent](../guides/agent-to-agent.md)
204
- - [MCP connections](../reference/connections.md)
205
- - [Subagents](../reference/subagents.md)
206
- - [Sessions and streaming](../reference/sessions.md)