@cursor/july 0.1.93 → 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 (318) hide show
  1. package/AGENTS.md +8 -20
  2. package/README.md +4 -26
  3. package/dist/channels/slack/attachments.js +2 -2
  4. package/dist/channels/slack/dispatch.d.ts +0 -7
  5. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  6. package/dist/channels/slack/dispatch.js +4 -7
  7. package/dist/channels/slack/eval-directive.d.ts +5 -12
  8. package/dist/channels/slack/eval-directive.d.ts.map +1 -1
  9. package/dist/channels/slack/eval-directive.js +8 -19
  10. package/dist/channels/slack/index.d.ts +0 -6
  11. package/dist/channels/slack/index.d.ts.map +1 -1
  12. package/dist/channels/slack/index.js +0 -6
  13. package/dist/channels/slack/setup.d.ts +4 -4
  14. package/dist/channels/slack/setup.d.ts.map +1 -1
  15. package/dist/channels/slack/setup.js +8 -15
  16. package/dist/channels/slack/slack-channel.d.ts +6 -13
  17. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  18. package/dist/channels/slack/slack-channel.js +15 -101
  19. package/dist/channels/slack/types.d.ts +12 -79
  20. package/dist/channels/slack/types.d.ts.map +1 -1
  21. package/dist/channels/slack/types.js +1 -15
  22. package/dist/client.d.ts +14 -0
  23. package/dist/client.d.ts.map +1 -0
  24. package/dist/client.js +12 -0
  25. package/dist/connections.d.ts +18 -9
  26. package/dist/connections.d.ts.map +1 -1
  27. package/dist/connections.js +17 -8
  28. package/dist/docs/404.html +2 -2
  29. package/dist/docs/ab.html +4 -4
  30. package/dist/docs/assets/{app.CjWU-x0z.js → app.CFDEas4I.js} +1 -1
  31. package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +1 -0
  32. package/dist/docs/assets/chunks/{VPLocalSearchBox.Cxy8ySFQ.js → VPLocalSearchBox.B1IIYpYS.js} +1 -1
  33. package/dist/docs/assets/chunks/{theme.Dvq1Bktu.js → theme.Ct4NSiLm.js} +2 -2
  34. package/dist/docs/assets/concepts.md.lwAgBIMI.js +1 -0
  35. package/dist/docs/assets/{deployment.md.DoLFAzfm.js → deployment.md.D9msOFOW.js} +3 -8
  36. package/dist/docs/assets/{deployment.md.DoLFAzfm.lean.js → deployment.md.D9msOFOW.lean.js} +1 -1
  37. package/dist/docs/assets/{guides_agent-to-agent.md.B3JIaAqz.js → guides_agent-to-agent.md.BDb0t1QV.js} +1 -1
  38. package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.js +9 -0
  39. package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.lean.js +1 -0
  40. package/dist/docs/assets/{guides_convert-automation.md.Bboisykk.js → guides_convert-automation.md.B4sjlodG.js} +1 -1
  41. package/dist/docs/assets/{guides_github.md.DqJhuaN1.js → guides_github.md.Cnh2mL4a.js} +1 -1
  42. package/dist/docs/assets/{guides_mcp-oauth.md.CJvrXtkN.js → guides_mcp-oauth.md.DPYmBCbV.js} +7 -9
  43. package/dist/docs/assets/{guides_mcp-oauth.md.CJvrXtkN.lean.js → guides_mcp-oauth.md.DPYmBCbV.lean.js} +1 -1
  44. package/dist/docs/assets/{guides_slack.md.mqeNKs84.js → guides_slack.md.C32HsdKk.js} +5 -11
  45. package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +1 -0
  46. package/dist/docs/assets/index.md.DRakGHFe.js +5 -0
  47. package/dist/docs/assets/{index.md.B-lVR4wT.lean.js → index.md.DRakGHFe.lean.js} +1 -1
  48. package/dist/docs/assets/{quickstart.md.BrmfrrIr.js → quickstart.md.Nj_LjW_a.js} +1 -1
  49. package/dist/docs/assets/{reference_cli.md.D9KESDsD.js → reference_cli.md.Cw6_ICYG.js} +1 -1
  50. package/dist/docs/assets/{reference_connections.md.DB6SsN6U.js → reference_connections.md.BH8Oc0D0.js} +5 -5
  51. package/dist/docs/assets/{reference_connections.md.DB6SsN6U.lean.js → reference_connections.md.BH8Oc0D0.lean.js} +1 -1
  52. package/dist/docs/assets/{reference_hooks.md.BxN87gCw.js → reference_hooks.md.a8BJxMR5.js} +1 -1
  53. package/dist/docs/assets/reference_http-api.md.D89k1mdm.js +11 -0
  54. package/dist/docs/assets/reference_http-api.md.D89k1mdm.lean.js +1 -0
  55. package/dist/docs/assets/reference_project-layout.md.Bv4KOtlB.js +19 -0
  56. package/dist/docs/assets/{reference_skills.md.BFW9retM.js → reference_skills.md.8son6Hjm.js} +3 -3
  57. package/dist/docs/assets/{reference_subagents.md.Xoav0AII.js → reference_subagents.md.CfsIloPm.js} +1 -1
  58. package/dist/docs/assets/{reference_tools.md.DuKvkYWG.js → reference_tools.md.BHeXn2id.js} +3 -3
  59. package/dist/docs/assets/{reference_tools.md.DuKvkYWG.lean.js → reference_tools.md.BHeXn2id.lean.js} +1 -1
  60. package/dist/docs/assets/{templates_pr-autofixer.md.R4K_qytS.js → templates_pr-autofixer.md.DU7dQpor.js} +2 -2
  61. package/dist/docs/assets/{templates_pr-autofixer.md.R4K_qytS.lean.js → templates_pr-autofixer.md.DU7dQpor.lean.js} +1 -1
  62. package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.js → templates_security-reviewer.md.CTa7u_l1.js} +2 -2
  63. package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.lean.js → templates_security-reviewer.md.CTa7u_l1.lean.js} +1 -1
  64. package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +1 -0
  65. package/dist/docs/building-with-agents.html +4 -4
  66. package/dist/docs/concepts.html +5 -5
  67. package/dist/docs/concepts.md +1 -0
  68. package/dist/docs/deployment.html +7 -12
  69. package/dist/docs/deployment.md +1 -20
  70. package/dist/docs/design/agsh.md +406 -0
  71. package/dist/docs/evals.html +4 -4
  72. package/dist/docs/guides/agent-to-agent.html +6 -6
  73. package/dist/docs/guides/agent-to-agent.md +2 -2
  74. package/dist/docs/guides/cloud-runtime.html +6 -6
  75. package/dist/docs/guides/cloud-runtime.md +1 -0
  76. package/dist/docs/guides/convert-automation.html +6 -6
  77. package/dist/docs/guides/convert-automation.md +1 -1
  78. package/dist/docs/guides/github.html +6 -6
  79. package/dist/docs/guides/github.md +4 -4
  80. package/dist/docs/guides/human-in-the-loop.html +4 -4
  81. package/dist/docs/guides/mcp-oauth.html +11 -13
  82. package/dist/docs/guides/mcp-oauth.md +10 -18
  83. package/dist/docs/guides/opentelemetry.html +5 -5
  84. package/dist/docs/guides/slack.html +9 -15
  85. package/dist/docs/guides/slack.md +9 -46
  86. package/dist/docs/guides/webhooks.html +4 -4
  87. package/dist/docs/hashmap.json +1 -1
  88. package/dist/docs/hillclimbing.html +4 -4
  89. package/dist/docs/index.html +6 -6
  90. package/dist/docs/index.md +0 -28
  91. package/dist/docs/llms-full.txt +712 -2830
  92. package/dist/docs/llms.txt +2 -16
  93. package/dist/docs/quickstart.html +6 -6
  94. package/dist/docs/quickstart.md +2 -3
  95. package/dist/docs/reference/agent-config.html +4 -4
  96. package/dist/docs/reference/artifacts.html +4 -4
  97. package/dist/docs/reference/channels.html +4 -4
  98. package/dist/docs/reference/cli.html +6 -6
  99. package/dist/docs/reference/cli.md +2 -1
  100. package/dist/docs/reference/connections.html +9 -9
  101. package/dist/docs/reference/connections.md +15 -11
  102. package/dist/docs/reference/hooks.html +6 -6
  103. package/dist/docs/reference/hooks.md +2 -3
  104. package/dist/docs/reference/http-api.html +6 -6
  105. package/dist/docs/reference/http-api.md +8 -0
  106. package/dist/docs/reference/instructions.html +4 -4
  107. package/dist/docs/reference/playground.html +4 -4
  108. package/dist/docs/reference/project-layout.html +8 -6
  109. package/dist/docs/reference/project-layout.md +5 -1
  110. package/dist/docs/reference/prompt.html +4 -4
  111. package/dist/docs/reference/schedules.html +4 -4
  112. package/dist/docs/reference/sessions.html +4 -4
  113. package/dist/docs/reference/skills.html +7 -7
  114. package/dist/docs/reference/subagents.html +6 -6
  115. package/dist/docs/reference/subagents.md +2 -2
  116. package/dist/docs/reference/tools.html +7 -7
  117. package/dist/docs/reference/tools.md +19 -3
  118. package/dist/docs/scaffolding-agents.html +4 -4
  119. package/dist/docs/storage.html +4 -4
  120. package/dist/docs/templates/agentic-owners.html +4 -4
  121. package/dist/docs/templates/demo.html +4 -4
  122. package/dist/docs/templates/pr-autofixer.html +6 -6
  123. package/dist/docs/templates/pr-autofixer.md +4 -3
  124. package/dist/docs/templates/security-reviewer.html +5 -5
  125. package/dist/docs/templates/security-reviewer.md +2 -3
  126. package/dist/docs/templates/triage.html +4 -4
  127. package/dist/docs/troubleshooting.html +5 -5
  128. package/dist/docs/troubleshooting.md +2 -2
  129. package/dist/index.d.ts +1 -1
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +1 -1
  132. package/dist/internal/advertise-tools.d.ts +11 -0
  133. package/dist/internal/advertise-tools.d.ts.map +1 -1
  134. package/dist/internal/advertise-tools.js +47 -9
  135. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  136. package/dist/internal/cli-mcp-oauth.js +7 -4
  137. package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
  138. package/dist/internal/convert-automation/convert-workflow.js +26 -15
  139. package/dist/internal/convert-automation/slug.d.ts +0 -2
  140. package/dist/internal/convert-automation/slug.d.ts.map +1 -1
  141. package/dist/internal/convert-automation/slug.js +0 -8
  142. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  143. package/dist/internal/cursor/account-mcp.js +5 -1
  144. package/dist/internal/discovery.d.ts.map +1 -1
  145. package/dist/internal/discovery.js +88 -13
  146. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  147. package/dist/internal/hosted-delivery.js +22 -9
  148. package/dist/internal/mcp-endpoint.js +3 -3
  149. package/dist/internal/mcp-host.d.ts +8 -7
  150. package/dist/internal/mcp-host.d.ts.map +1 -1
  151. package/dist/internal/mcp-host.js +8 -7
  152. package/dist/internal/peer-connections.d.ts.map +1 -1
  153. package/dist/internal/peer-connections.js +5 -1
  154. package/dist/internal/playground/static.d.ts +0 -3
  155. package/dist/internal/playground/static.d.ts.map +1 -1
  156. package/dist/internal/resolved-connections.d.ts.map +1 -1
  157. package/dist/internal/resolved-connections.js +5 -7
  158. package/dist/internal/server.d.ts.map +1 -1
  159. package/dist/internal/server.js +113 -172
  160. package/dist/internal/session-engine.d.ts +45 -10
  161. package/dist/internal/session-engine.d.ts.map +1 -1
  162. package/dist/internal/session-engine.js +208 -65
  163. package/dist/internal/tool-catalog.d.ts +31 -0
  164. package/dist/internal/tool-catalog.d.ts.map +1 -0
  165. package/dist/internal/tool-catalog.js +67 -0
  166. package/dist/playground/assets/{index-D9MFzhNE.js → index-B3JCyigB.js} +1 -1
  167. package/dist/playground/index.html +1 -1
  168. package/dist/types.d.ts +72 -23
  169. package/dist/types.d.ts.map +1 -1
  170. package/dist/types.js +19 -0
  171. package/docs/README.md +0 -28
  172. package/docs/concepts.md +1 -0
  173. package/docs/deployment.md +1 -20
  174. package/docs/design/agsh.md +406 -0
  175. package/docs/guides/agent-to-agent.md +2 -2
  176. package/docs/guides/cloud-runtime.md +1 -0
  177. package/docs/guides/convert-automation.md +1 -1
  178. package/docs/guides/github.md +4 -4
  179. package/docs/guides/mcp-oauth.md +10 -18
  180. package/docs/guides/slack.md +10 -47
  181. package/docs/quickstart.md +2 -3
  182. package/docs/reference/cli.md +2 -1
  183. package/docs/reference/connections.md +15 -11
  184. package/docs/reference/hooks.md +2 -3
  185. package/docs/reference/http-api.md +8 -0
  186. package/docs/reference/project-layout.md +5 -1
  187. package/docs/reference/subagents.md +2 -2
  188. package/docs/reference/tools.md +19 -3
  189. package/docs/templates/pr-autofixer.md +4 -3
  190. package/docs/templates/security-reviewer.md +2 -3
  191. package/docs/troubleshooting.md +2 -2
  192. package/package.json +9 -2
  193. package/skills/create-agent/SKILL.md +6 -13
  194. package/skills/debug/SKILL.md +2 -4
  195. package/skills/evals/SKILL.md +1 -1
  196. package/skills/framework-map/SKILL.md +3 -2
  197. package/skills/mcp-auth/SKILL.md +10 -13
  198. package/skills/setup-slack/SKILL.md +21 -137
  199. package/src/channels/slack/attachments.ts +2 -2
  200. package/src/channels/slack/dispatch.ts +2 -16
  201. package/src/channels/slack/eval-directive.ts +8 -27
  202. package/src/channels/slack/index.ts +0 -6
  203. package/src/channels/slack/setup.ts +8 -15
  204. package/src/channels/slack/slack-channel.ts +14 -125
  205. package/src/channels/slack/types.ts +12 -96
  206. package/src/client.ts +23 -0
  207. package/src/connections.ts +20 -7
  208. package/src/index.ts +2 -0
  209. package/src/internal/advertise-tools.ts +45 -7
  210. package/src/internal/cli-mcp-oauth.ts +6 -4
  211. package/src/internal/convert-automation/convert-workflow.ts +29 -17
  212. package/src/internal/convert-automation/slug.ts +0 -9
  213. package/src/internal/cursor/account-mcp.ts +4 -1
  214. package/src/internal/discovery.ts +104 -13
  215. package/src/internal/fixtures/units-server.ts +52 -0
  216. package/src/internal/hosted-delivery.ts +60 -28
  217. package/src/internal/mcp-endpoint.ts +3 -3
  218. package/src/internal/mcp-host.ts +8 -7
  219. package/src/internal/peer-connections.ts +4 -1
  220. package/src/internal/playground/static.ts +1 -3
  221. package/src/internal/resolved-connections.ts +8 -10
  222. package/src/internal/server.ts +151 -251
  223. package/src/internal/session-engine.ts +254 -69
  224. package/src/internal/tool-catalog.ts +106 -0
  225. package/src/types.ts +90 -23
  226. package/templates/pr-autofixer/agent/channels/slack.ts +8 -2
  227. package/templates/triage/README.md +2 -1
  228. package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +0 -1
  229. package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +0 -1
  230. package/dist/channels/slack/cursor-account.d.ts +0 -87
  231. package/dist/channels/slack/cursor-account.d.ts.map +0 -1
  232. package/dist/channels/slack/cursor-account.js +0 -100
  233. package/dist/docs/assets/chunks/@localSearchIndexroot.ChpIC3Zy.js +0 -1
  234. package/dist/docs/assets/concepts.md.F6AiPorA.js +0 -1
  235. package/dist/docs/assets/example-agents_approval-buddy.md.DmezILPg.js +0 -10
  236. package/dist/docs/assets/example-agents_approval-buddy.md.DmezILPg.lean.js +0 -1
  237. package/dist/docs/assets/example-agents_benny.md.B0kwY7D_.js +0 -5
  238. package/dist/docs/assets/example-agents_benny.md.B0kwY7D_.lean.js +0 -1
  239. package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.js +0 -11
  240. package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.lean.js +0 -1
  241. package/dist/docs/assets/example-agents_codebase-wiki.md.BBNw9Ekr.js +0 -8
  242. package/dist/docs/assets/example-agents_codebase-wiki.md.BBNw9Ekr.lean.js +0 -1
  243. package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.js +0 -8
  244. package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.lean.js +0 -1
  245. package/dist/docs/assets/example-agents_concierge.md.BzB2b20R.js +0 -22
  246. package/dist/docs/assets/example-agents_concierge.md.BzB2b20R.lean.js +0 -1
  247. package/dist/docs/assets/example-agents_index.md.ChBp0AX6.js +0 -2
  248. package/dist/docs/assets/example-agents_index.md.ChBp0AX6.lean.js +0 -1
  249. package/dist/docs/assets/example-agents_knowledge-base.md.CrA85ig-.js +0 -11
  250. package/dist/docs/assets/example-agents_knowledge-base.md.CrA85ig-.lean.js +0 -1
  251. package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.js +0 -10
  252. package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.lean.js +0 -1
  253. package/dist/docs/assets/example-agents_security-reviewer.md.74pPpWYj.js +0 -19
  254. package/dist/docs/assets/example-agents_security-reviewer.md.74pPpWYj.lean.js +0 -1
  255. package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.js +0 -5
  256. package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.lean.js +0 -1
  257. package/dist/docs/assets/example-agents_weather-agent.md.CaGpmw3Y.js +0 -25
  258. package/dist/docs/assets/example-agents_weather-agent.md.CaGpmw3Y.lean.js +0 -1
  259. package/dist/docs/assets/guides_cloud-runtime.md.BnvjPiia.js +0 -9
  260. package/dist/docs/assets/guides_cloud-runtime.md.BnvjPiia.lean.js +0 -1
  261. package/dist/docs/assets/guides_slack.md.mqeNKs84.lean.js +0 -1
  262. package/dist/docs/assets/index.md.B-lVR4wT.js +0 -5
  263. package/dist/docs/assets/reference_http-api.md.C68BERYr.js +0 -11
  264. package/dist/docs/assets/reference_http-api.md.C68BERYr.lean.js +0 -1
  265. package/dist/docs/assets/reference_project-layout.md.WN9nwJht.js +0 -17
  266. package/dist/docs/assets/troubleshooting.md.vCWwvqcJ.js +0 -1
  267. package/dist/docs/example-agents/approval-buddy.html +0 -36
  268. package/dist/docs/example-agents/approval-buddy.md +0 -266
  269. package/dist/docs/example-agents/benny.html +0 -31
  270. package/dist/docs/example-agents/benny.md +0 -173
  271. package/dist/docs/example-agents/bugbot.html +0 -37
  272. package/dist/docs/example-agents/bugbot.md +0 -229
  273. package/dist/docs/example-agents/codebase-wiki.html +0 -34
  274. package/dist/docs/example-agents/codebase-wiki.md +0 -167
  275. package/dist/docs/example-agents/codeowners-review.html +0 -34
  276. package/dist/docs/example-agents/codeowners-review.md +0 -192
  277. package/dist/docs/example-agents/concierge.html +0 -48
  278. package/dist/docs/example-agents/concierge.md +0 -200
  279. package/dist/docs/example-agents/index.html +0 -28
  280. package/dist/docs/example-agents/index.md +0 -99
  281. package/dist/docs/example-agents/knowledge-base.html +0 -37
  282. package/dist/docs/example-agents/knowledge-base.md +0 -168
  283. package/dist/docs/example-agents/oncall.html +0 -36
  284. package/dist/docs/example-agents/oncall.md +0 -212
  285. package/dist/docs/example-agents/security-reviewer.html +0 -45
  286. package/dist/docs/example-agents/security-reviewer.md +0 -265
  287. package/dist/docs/example-agents/slack-agent.html +0 -31
  288. package/dist/docs/example-agents/slack-agent.md +0 -142
  289. package/dist/docs/example-agents/weather-agent.html +0 -51
  290. package/dist/docs/example-agents/weather-agent.md +0 -297
  291. package/dist/internal/cursor-slack-relay.d.ts +0 -96
  292. package/dist/internal/cursor-slack-relay.d.ts.map +0 -1
  293. package/dist/internal/cursor-slack-relay.js +0 -176
  294. package/docs/example-agents/approval-buddy.md +0 -271
  295. package/docs/example-agents/benny.md +0 -178
  296. package/docs/example-agents/bugbot.md +0 -234
  297. package/docs/example-agents/codebase-wiki.md +0 -172
  298. package/docs/example-agents/codeowners-review.md +0 -197
  299. package/docs/example-agents/concierge.md +0 -205
  300. package/docs/example-agents/index.md +0 -104
  301. package/docs/example-agents/knowledge-base.md +0 -173
  302. package/docs/example-agents/oncall.md +0 -217
  303. package/docs/example-agents/security-reviewer.md +0 -270
  304. package/docs/example-agents/slack-agent.md +0 -147
  305. package/docs/example-agents/weather-agent.md +0 -302
  306. package/src/channels/slack/cursor-account.ts +0 -202
  307. package/src/internal/cursor-slack-relay.ts +0 -249
  308. /package/dist/docs/assets/{concepts.md.F6AiPorA.lean.js → concepts.md.lwAgBIMI.lean.js} +0 -0
  309. /package/dist/docs/assets/{guides_agent-to-agent.md.B3JIaAqz.lean.js → guides_agent-to-agent.md.BDb0t1QV.lean.js} +0 -0
  310. /package/dist/docs/assets/{guides_convert-automation.md.Bboisykk.lean.js → guides_convert-automation.md.B4sjlodG.lean.js} +0 -0
  311. /package/dist/docs/assets/{guides_github.md.DqJhuaN1.lean.js → guides_github.md.Cnh2mL4a.lean.js} +0 -0
  312. /package/dist/docs/assets/{quickstart.md.BrmfrrIr.lean.js → quickstart.md.Nj_LjW_a.lean.js} +0 -0
  313. /package/dist/docs/assets/{reference_cli.md.D9KESDsD.lean.js → reference_cli.md.Cw6_ICYG.lean.js} +0 -0
  314. /package/dist/docs/assets/{reference_hooks.md.BxN87gCw.lean.js → reference_hooks.md.a8BJxMR5.lean.js} +0 -0
  315. /package/dist/docs/assets/{reference_project-layout.md.WN9nwJht.lean.js → reference_project-layout.md.Bv4KOtlB.lean.js} +0 -0
  316. /package/dist/docs/assets/{reference_skills.md.BFW9retM.lean.js → reference_skills.md.8son6Hjm.lean.js} +0 -0
  317. /package/dist/docs/assets/{reference_subagents.md.Xoav0AII.lean.js → reference_subagents.md.CfsIloPm.lean.js} +0 -0
  318. /package/dist/docs/assets/{troubleshooting.md.vCWwvqcJ.lean.js → troubleshooting.md.Ctv3T8C2.lean.js} +0 -0
@@ -12,6 +12,11 @@ from `@cursor/july/connections`, and the transport comes in
12
12
  four shapes: remote HTTP, local stdio, the signed-in Cursor account's
13
13
  connectors, and peer agents on the same host.
14
14
 
15
+ Put a server in `agent/host-connections/` when host tools should call it
16
+ and the model should not. Same `defineConnection` shape. `agent-sdk mcp
17
+ oauth` still works. The playground and the turn's MCP servers never see
18
+ those files.
19
+
15
20
  ## Remote MCP server
16
21
 
17
22
  Point an MCP connection at a remote server with a URL.
@@ -48,12 +53,10 @@ agent-sdk mcp oauth inventory --store # also upsert deployment secrets
48
53
  Full walkthrough: [Host MCP OAuth](../guides/mcp-oauth.md). Companion
49
54
  skill: [`skills/mcp-auth/SKILL.md`](../../skills/mcp-auth/SKILL.md).
50
55
 
51
- Set `hostOnly: true` only when host tools should call the server and the
52
- model should not. Playground chat will not see those tools. Account MCP
53
- (`cursorAccount: true`) is the right choice for connectors already linked
54
- in the Cursor dashboard. Omit `servers` (or pass `"*"`) to forward every
55
- connected connector. If the model should call those tools by name on
56
- local turns, set `advertiseTools: true`.
56
+ Account MCP (`cursorAccount: true`) is the right choice for connectors
57
+ already linked in the Cursor dashboard. Omit `servers` (or pass `"*"`)
58
+ to forward every connected connector. If the model should call those
59
+ tools by name on local turns, set `advertiseTools: true`.
57
60
 
58
61
  ## Per-session auth (`auth`)
59
62
 
@@ -113,7 +116,7 @@ export default defineConnection({
113
116
 
114
117
  A listing failure, invalid tool name, or name collision fails the turn.
115
118
  Advertised tools follow the same runtime support as server tools. They cannot
116
- be combined with `hostOnly` or called through the direct tool API.
119
+ be called through the direct tool API.
117
120
 
118
121
  In a dry-run session, MCP tools marked read-only run normally. Tools marked
119
122
  as writes are stubbed. Tools without effect annotations are unavailable.
@@ -221,13 +224,14 @@ Unknown slugs and self-references fail `serve` at startup. Resolution
221
224
  (loopback versus `--public-url`), loop caveats, and the delegation model
222
225
  are in the [Agent-to-agent guide](../guides/agent-to-agent.md).
223
226
 
224
- ## Every MCP connection is available in three places
227
+ ## Every model-visible MCP connection is available in three places
225
228
 
226
- One authored MCP connection serves three consumers.
229
+ A file under `agent/mcp-connections/` serves three consumers. Host
230
+ connections skip the first one.
227
231
 
228
232
  1. **Cursor agent:** Attached connections ride SDK `mcpServers` behind
229
233
  harness MCP meta-tools. Set `advertiseTools: true` so local turns see
230
- named tools. `hostOnly` keeps the connection off the model.
234
+ named tools.
231
235
  2. **Server tools:** Deterministic host code composes MCP calls
232
236
  through `ctx.host.mcp`:
233
237
 
@@ -262,7 +266,7 @@ lazily on first use.
262
266
 
263
267
  Continue with these pages:
264
268
 
265
- - [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, `--store`, `hostOnly`
269
+ - [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, `--store`
266
270
  - [Agent-to-agent](../guides/agent-to-agent.md): peers in depth
267
271
  - [Tools](./tools.md): authored tools that wrap MCP connections
268
272
  - [Webhooks](../guides/webhooks.md): calling MCP connections from handlers
@@ -71,9 +71,8 @@ For GitHub merge-box checks and sticky PR banners, use
71
71
  `githubChannel({ progress: { commitStatus, banner } })` from
72
72
  `@cursor/july/channels/github`. That is the supported Autofix-style
73
73
  path. See [GitHub: Show PR progress](../guides/github.md#show-pr-progress).
74
- Override channel `events` only when the lifecycle is custom (for
75
- example [Approval Buddy](../example-agents/approval-buddy.md)'s
76
- never-red status from tool output). Do not use `defineHook` for those
74
+ Override channel `events` only when the lifecycle is custom, such as
75
+ never-red status from tool output. Do not use `defineHook` for those
77
76
  writes.
78
77
 
79
78
  ## Patterns
@@ -138,6 +138,12 @@ while a turn runs). Agent-execution tools are rejected with `400`, and
138
138
  unknown tools with `404` and the list of available names. For the
139
139
  semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
140
140
 
141
+ An optional `"continuationToken"` (`<channelId>:<key>`, as
142
+ `/v1/sessions` lists it; mutually exclusive with `sessionId`) addresses
143
+ the session by continuation token instead; malformed tokens are
144
+ rejected with `400 invalid_continuation_token`. For the semantics, see
145
+ [Tools](./tools.md#call-a-tool-without-a-model-turn).
146
+
141
147
  ## Discovery
142
148
 
143
149
  These read-only routes describe the running agent.
@@ -145,6 +151,8 @@ These read-only routes describe the running agent.
145
151
  | Route | What it does |
146
152
  | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147
153
  | `GET /v1/info` | The discovered surface: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics |
154
+ | `GET /v1/tools` | The live tool catalog: authored server tools plus advertised MCP passthroughs under model-facing names, as light `{ name, title?, source? }` entries. `session` / `continuationToken` query parameters bind the listing to a session identity (advertised inventories can be tenant-scoped); a connection whose listing fails is skipped and reported in `connectionErrors` |
155
+ | `GET /v1/tools/:name` | One catalog tool's full description: description, execution, `needsApproval`, `effect`, input and output schemas, source connection. Same session binding as the listing; unknown names get `404` with the available names |
148
156
  | `GET /v1/health` | Per-agent liveness, no auth |
149
157
  | `GET /v1/logs?after=N` | Recent server log lines, with a polling cursor |
150
158
  | `GET /v1/abs` | [Live A/B metrics](../ab.md): per-session assignments and aggregate arm totals |
@@ -17,7 +17,8 @@ experiments can override their file-derived name.
17
17
  | Path | Resolves to |
18
18
  | --- | --- |
19
19
  | `agent/tools/approve_pr.ts` | tool `approve_pr` |
20
- | `agent/mcp-connections/linear.ts` | MCP connection `linear` |
20
+ | `agent/mcp-connections/linear.ts` | MCP connection `linear` (model + host) |
21
+ | `agent/host-connections/anytool.ts` | Host MCP connection `anytool` (host + `mcp oauth` only) |
21
22
  | `agent/skills/pr-review.md` | skill `pr-review` |
22
23
  | `agent/subagents/reviewer/` | subagent `reviewer` |
23
24
  | `agent/channels/drive.ts` | channel `drive`, routes under `/v1/channels/drive` |
@@ -45,6 +46,8 @@ my-agent/
45
46
  │ │ └── pr-review.md # on-demand procedures (SKILL.md convention)
46
47
  │ ├── mcp-connections/
47
48
  │ │ └── linear.ts # tools from external MCP servers
49
+ │ ├── host-connections/
50
+ │ │ └── anytool.ts # privileged MCP, host tools only
48
51
  │ └── channels/
49
52
  │ └── github.ts # messages and external events
50
53
  └── evals/
@@ -66,6 +69,7 @@ Each path maps to a capability and a reference page.
66
69
  | `agent/tools/<name>.ts` | One typed tool; filename = tool name. `execution: "server"` (in-process, default) or `"agent"` (a script that runs where the agent runs) | [Tools](./tools.md) |
67
70
  | `agent/skills/*` | SKILL.md-convention procedures, loaded on demand | [Skills](./skills.md) |
68
71
  | `agent/mcp-connections/<name>.ts` | MCP servers, available to the model, to server tools (`ctx.host.mcp`), and to channel/schedule handlers (`args.host.mcp`) | [MCP connections](./connections.md) |
72
+ | `agent/host-connections/<name>.ts` | Privileged MCP servers for `ctx.host.mcp` and `mcp oauth`. The model never sees them. | [MCP connections](./connections.md) |
69
73
  | `agent/subagents/<id>/` | Child agent directory; `description` required | [Subagents](./subagents.md) |
70
74
  | `agent/channels/*.ts` | HTTP surfaces beyond the built-in session API; `slack.ts` and `github.ts` use the platform packs | [Channels](./channels.md) |
71
75
  | `agent/hooks/*.ts` | Observe-only event subscribers, never fatal | [Hooks](./hooks.md) |
@@ -41,8 +41,8 @@ different one.
41
41
  Subagents inherit the parent's execution surface. Every per-subagent
42
42
  capability directory is reported as a warning and ignored: `tools/`,
43
43
  `skills/`, `mcp-connections/` (and the legacy `connections/` alias),
44
- `channels/`, `schedules/`, `hooks/`, `sandbox/`, and nested
45
- `subagents/`.
44
+ `host-connections/`, `channels/`, `schedules/`, `hooks/`, `sandbox/`,
45
+ and nested `subagents/`.
46
46
 
47
47
  Delegation needs both halves: the description makes it possible, and the
48
48
  parent's [instructions](./instructions.md) make it happen. "When a
@@ -187,8 +187,9 @@ passthrough server tools from the connection's live `listTools` on every
187
187
  local turn. See
188
188
  [MCP Connections](connections.md#advertise-tools).
189
189
  Advertised tools ride the same execution path as authored server tools,
190
- but cannot be invoked via
191
- [direct tool calls](#call-a-tool-without-a-model-turn).
190
+ and [direct tool calls](#call-a-tool-without-a-model-turn) address them
191
+ by the same model-facing names: the call's session identity resolves the
192
+ advertised listing when the authored lookup misses.
192
193
 
193
194
  ## Gate a tool on human approval
194
195
 
@@ -262,7 +263,22 @@ when the call returns. Pass a `sessionId` (a body field over
262
263
  HTTP, `--session` on the CLI, `options.sessionId` programmatically) to
263
264
  run inside an existing session instead: the tool sees that session's
264
265
  workspace, and the call is recorded on the session's event stream.
265
- Session-bound calls return `409 session_busy` while a turn runs.
266
+ Session-bound calls return `409 session_busy` while a turn runs. When the
267
+ session's harness cwd cannot be materialized, a read-effect call runs
268
+ in a scratch workspace instead and the outcome carries
269
+ `scratchWorkspace: true`; a write-effect call fails with
270
+ `workspace_unavailable`.
271
+
272
+ A session can also be addressed by its continuation token: an optional
273
+ `continuationToken` (`<channelId>:<key>`, as `/v1/sessions` lists it;
274
+ mutually exclusive with `sessionId`). A token that maps to a live
275
+ session behaves exactly like passing that session's id — same ownership
276
+ check, same `409 session_busy`, same event recording. A token with no
277
+ session behind it runs the call scratch-bound with the token's channel
278
+ id and continuation key as the call's session identity, so a deployment
279
+ whose tools resolve state from the continuation key can serve it with
280
+ no live session. Malformed tokens are rejected with
281
+ `400 invalid_continuation_token`.
266
282
 
267
283
  The error semantics match the model path. Unknown tools are rejected
268
284
  with the available names, agent-execution tools cannot be called on the
@@ -103,9 +103,10 @@ fixture replay.
103
103
 
104
104
  ## Slack
105
105
 
106
- `agent/channels/slack.ts` uses your signed-in Cursor account. Mention
107
- the agent or DM it with a PR URL. Same `drive_pr` path as the
108
- playground. See [Slack](../guides/slack.md).
106
+ `agent/channels/slack.ts` is a dedicated Socket Mode bot
107
+ (`PR_AUTOFIXER_SLACK_*`). Mint it with `agent-sdk slack create`, then
108
+ mention the bot or DM it with a PR URL.
109
+ Same `drive_pr` path as the playground. See [Slack](../guides/slack.md).
109
110
 
110
111
  ## Evals
111
112
 
@@ -9,9 +9,8 @@ This agent reads a pull request diff and posts one review comment. It
9
9
  reports exploitable bugs: injection, authz bypass, secret leaks, SSRF,
10
10
  RCE. Style nits stay out.
11
11
 
12
- The factory [Security Reviewer](../example-agents/security-reviewer.md)
13
- runs a staged pipeline with parallel workers. This template is one
14
- model turn.
12
+ The in-repo factory Security Reviewer runs a staged pipeline with
13
+ parallel workers. This template is one model turn.
15
14
 
16
15
  ## Scaffold
17
16
 
@@ -32,7 +32,7 @@ not on `PATH`, use `npx @cursor/july`.
32
32
  | Built-in file reads and greps fail; the turn retries for a long time | Run under Node 22.13+ (or `tsx`), never Bun. Look for `NGHTTP2_FRAME_SIZE_ERROR` in logs. |
33
33
  | The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
34
34
  | Replies quote rules or `AGENTS.md` from outside your agent project | The session workspace inherited parent-folder config. Nested git checkouts default `local.cwd` to a per-project cache directory under `~/.cache`. Point `defineAgent({ local: { cwd } })` at a checkout only when the agent should inherit that tree, or set `--state-root` to a clean directory (for example under `/tmp`). |
35
- | Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or `hostOnly` hid the connection, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
35
+ | Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
36
36
  | Server tools, skills, or workspace seed files never appear | Server tools and sandbox seeds apply on the local runtime (cloud server tools need `--public-url` / `--cloud-tools-url`). Skills reach cloud through the Agent Store when hosting or a personal `CURSOR_API_KEY` is available; otherwise only skills already in the cloud repo. `validate` warns when this combination is present. |
37
37
  | `validate` and `run` succeed, but typecheck fails in CI | The CLI runs TypeScript with type-stripping only. Keep tool `execute` return types as object literals or `type` aliases, not `interface` types. |
38
38
  | Login works, but turns are rejected when using custom API hosts | Point login and model traffic at the same host (`CURSOR_API_BASE_URL` and `CURSOR_BACKEND_URL`). A key from one host is rejected by the other. |
@@ -71,7 +71,7 @@ not on `PATH`, use `npx @cursor/july`.
71
71
  | --- | --- |
72
72
  | `must be defineConnection({ url, oauth: true })` | The connection file needs `oauth: true`, or you passed the wrong connection name to `agent-sdk mcp oauth`. |
73
73
  | Local auth works; hosted calls unauthorized | Run `agent-sdk mcp oauth <name> --store`, confirm names with `agent-sdk secrets list <slug>`, then redeploy. |
74
- | Model asks for `mcp_auth` or IDE MCP for a privileged server | That connection is `hostOnly`. Call it from a host tool via `ctx.host.mcp`, and update instructions. |
74
+ | Model asks for `mcp_auth` or IDE MCP for a connector it already has | Attached MCP is behind meta-tools. Set `advertiseTools: true` for named tools on local turns, or call it from a host tool via `ctx.host.mcp`. |
75
75
 
76
76
  See [Host MCP OAuth](./guides/mcp-oauth.md) and
77
77
  [`skills/mcp-auth/SKILL.md`](../skills/mcp-auth/SKILL.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.93",
3
+ "version": "0.1.94",
4
4
  "description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -120,6 +120,13 @@
120
120
  "import": "./dist/hooks.js",
121
121
  "default": "./dist/hooks.js"
122
122
  },
123
+ "./client": {
124
+ "anysphere-source": "./src/client.ts",
125
+ "bun": "./dist/client.js",
126
+ "types": "./dist/client.d.ts",
127
+ "import": "./dist/client.js",
128
+ "default": "./dist/client.js"
129
+ },
123
130
  "./memory": {
124
131
  "anysphere-source": "./src/memory.ts",
125
132
  "types": "./dist/memory.d.ts",
@@ -255,13 +262,13 @@
255
262
  "@slack/socket-mode": "^2.0.7",
256
263
  "@slack/web-api": "^7.18.0",
257
264
  "croner": "^8.0.1",
265
+ "esbuild": "^0.25.0",
258
266
  "javascript-time-ago": "^2.6.4",
259
267
  "js-yaml": "4.1.0",
260
268
  "ms": "^2.1.3",
261
269
  "proper-lockfile": "^4.1.2",
262
270
  "slackify-markdown": "^5.0.0",
263
271
  "tsx": "^4.0.0",
264
- "esbuild": "^0.25.0",
265
272
  "zod": "^3.25.0",
266
273
  "zod-to-json-schema": "^3.24.5"
267
274
  },
@@ -64,8 +64,8 @@ questions, concrete options, the recommended option listed first and labeled
64
64
  | --- | --- | --- |
65
65
  | **Runtime** | `local` (default) · `cloud` | Local runs on this machine. Cloud runs on a Cursor cloud agent and needs `cloud.repos`. Server tools and skills work on both. Tool approvals and sandbox seeds are local only. Recommend local unless the purpose needs a cloud checkout. |
66
66
  | **Model** | `grok-4.5` with `effort=high`, `fast=true` (default) · Other model id | Effort and fast are params, not id suffixes: `{ id: "grok-4.5", params: [{ id: "effort", value: "high" }, { id: "fast", value: "true" }] }` — the SDK rejects suffix-style ids. |
67
- | **Channels** (multi) | playground + HTTP API only (always mounted) · Slack · GitHub webhooks · custom webhook · schedule (cron) | Slack has two connections: the Cursor-hosted connection (`cursorAccount: true` — zero Slack admin, recommended default) and a dedicated Socket Mode app (own bot user + one app/token pair per agent; needed for channel watching or approval buttons). When Slack is picked, resolve the connection with the Step 0 gate in `setup-slack/SKILL.md` — either fold its AskQuestion into this round or ask it before channel setup; default to Cursor-hosted when you cannot ask. GitHub verifies `X-Hub-Signature-256` when a secret is set. Discord/Teams packs do not exist yet — offer custom webhook instead. |
68
- | **MCP connections** (multi) | none · remote server (URL + header auth) · local stdio server · Cursor account connectors · Other | One file per server under `agent/mcp-connections/`; filename = server name. Do not name an account connection `cursor.ts` (collides with the IDE `cursor` namespace); use `account.ts`. Tokens via env vars, never hardcoded. Connections serve the model and host code (`ctx.host.mcp`). If the model should call them by name on local turns, set `advertiseTools: true`. Set `hostOnly: true` only when host tools call the server and the playground must not. |
67
+ | **Channels** (multi) | playground + HTTP API only (always mounted) · Slack · GitHub webhooks · custom webhook · schedule (cron) | Slack is a dedicated Socket Mode app (`agent-sdk slack create` — own bot user + one app/token pair per agent). When Slack is picked, follow `setup-slack/SKILL.md`. GitHub verifies `X-Hub-Signature-256` when a secret is set. Discord/Teams packs do not exist yet — offer custom webhook instead. |
68
+ | **MCP connections** (multi) | none · remote server (URL + header auth) · local stdio server · Cursor account connectors · Other | One file per server under `agent/mcp-connections/`; filename = server name. Do not name an account connection `cursor.ts` (collides with the IDE `cursor` namespace); use `account.ts`. Tokens via env vars, never hardcoded. Connections serve the model and host code (`ctx.host.mcp`). If the model should call them by name on local turns, set `advertiseTools: true`. Privileged servers the model must not see go in `agent/host-connections/` instead. |
69
69
  | **Capabilities** (multi) | server tools · agent tools (scripts) · skills · subagents · hooks · sandbox seed files · tool approvals (HITL) · evals (recommend) | Always recommend at least one smoke eval. |
70
70
 
71
71
  Close the round with a one-screen plan — chosen options plus the file tree you
@@ -80,7 +80,7 @@ inventing:
80
80
 
81
81
  | Purpose looks like | Proven shape |
82
82
  | --- | --- |
83
- | Slack chat assistant | minimal `slackChannel({ cursorAccount: true, agentName: "…" })` with suggested prompts; dedicated Socket Mode app only when the Step 0 gate picked it |
83
+ | Slack chat assistant | `slackChannel()` with suggested prompts; run `agent-sdk slack create` for the bot and tokens |
84
84
  | PR review with host-prepared evidence | channel `callTool` prep into a trimmed workspace `pr/` tree |
85
85
  | GitHub-webhook automation | `githubChannel()` hooks, per-PR debounce, replay fixtures |
86
86
  | Domain assistant over live APIs / MCP | server + agent tools, a stdio MCP connection, a skill, a schedule |
@@ -105,7 +105,6 @@ Defaults that make first cuts good:
105
105
  multi-line strings).
106
106
  - **Env prefix** for Slack tokens = upper-snake slug (`my-agent` →
107
107
  `MY_AGENT_SLACK_*`); `agent-sdk slack create` derives it for you.
108
- Dedicated-app path only — the Cursor-hosted connection has no tokens.
109
108
  - **Host prep beats model wandering — for evidence, not judgment.** When the
110
109
  purpose has a deterministic setup step (fetch a PR, seed files), do it in
111
110
  the channel handler via `callTool` / `workspaceFiles` rather than
@@ -160,11 +159,7 @@ plan:
160
159
  with the real tools.
161
160
  4. Add the chosen `channels/`, `mcp-connections/`, `skills/`, `subagents/<id>/`
162
161
  (needs `description`), `schedules/`, `hooks/`, `sandbox/workspace/`. For
163
- Slack, follow the connection decided in the interview: Cursor-hosted is a
164
- short hand-written `agent/channels/slack.ts`
165
- (`slackChannel({ cursorAccount: true, agentName: "<Name>" })` — no
166
- tokens, no manifests); for a dedicated Socket Mode app do not hand-write
167
- the channel — `agent-sdk slack create --dir ./<slug> --name "<Name>"`
162
+ Slack, do not hand-write the channel `agent-sdk slack create --dir ./<slug> --name "<Name>"`
168
163
  opens the dashboard wizard (env prefix from the directory name);
169
164
  for a Slack app they own at api.slack.com, `agent-sdk slack init --manual --dir ./<slug> --name "<Name>"`;
170
165
  customize `agent/channels/slack.ts` afterwards (e.g. `suggestedPrompts`).
@@ -225,10 +220,8 @@ Each surface beyond the playground has a human gate — drive the user through
225
220
  it, verify with doctor commands, and smoke-test before declaring victory.
226
221
 
227
222
  - **Slack** — follow `packages/agent-serve/skills/setup-slack/SKILL.md` end
228
- to end, starting from its Step 0 connection gate. Cursor-hosted: sign in
229
- (`agent-sdk login` / `CURSOR_API_KEY`) serve `@Cursor <AgentName>`
230
- smoke. Dedicated app: init → human creates apps → doctor → `@mention`
231
- smoke.
223
+ to end: `slack create` doctor `@mention` smoke. Manual path only
224
+ when they own the Slack app at api.slack.com.
232
225
  - **GitHub** — follow `packages/agent-serve/skills/github/SKILL.md`
233
226
  (fixtures / replay / forward / `--cursor-events`).
234
227
  - **Custom webhook** — `POST /<slug>/v1/channels/<id>/<route>`. Default
@@ -51,7 +51,7 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
51
51
  | `gh webhook forward` / `agent-sdk github forward` deliveries all 401 — but hook creation succeeded | `GITHUB_TOKEN`/`GH_TOKEN` in the env. The relay authenticates with the gh CLI login and rejects env tokens. `GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward ...` |
52
52
  | `Hook already exists` starting a forwarder | GitHub allows one forwarder per repo. Use one `github forward --dir <parent>` (it fans out to every matching channel) instead of N processes; kill stale forwarders. |
53
53
  | Agent's answers reference monorepo rules / AGENTS.md it shouldn't know | Session workspace sits inside another git checkout, so the harness loaded ancestor config. Nested projects default `local.cwd` to `~/.cache/agent-serve/<dir>`. Point cwd at a checkout only when the agent should inherit that tree. |
54
- | Yellow box lists Datadog/Linear tools; model recites `GetDynamicTools` / IDE `cursor` tools and never calls MCP | Attached MCP is behind meta-tools, or `hostOnly` hid it, or cwd still leaked IDE MCP. Set `advertiseTools: true` for named tools on local turns. Confirm `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
54
+ | Yellow box lists Datadog/Linear tools; model recites `GetDynamicTools` / IDE `cursor` tools and never calls MCP | Attached MCP is behind meta-tools, or cwd still leaked IDE MCP. Set `advertiseTools: true` for named tools on local turns. Confirm `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
55
55
  | Port 3000/5273 in use; stray processes after crashes | `lsof -iTCP:3000 -sTCP:LISTEN`, kill the pids; also check companion processes (e.g. vite). |
56
56
  | Pending tool approval vanished after server restart | By design: parked SDK calls don't survive host restart; they resolve as interrupted. Re-run the turn. |
57
57
  | Schedule / reminder never fires under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>` or `POST /<slug>/v1/dev/reminders/<id>` (list at `GET /v1/dev/reminders`). |
@@ -61,9 +61,7 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
61
61
  | `403` on stream/follow-up | Caller principal ≠ session owner. In dev, create and inspect with the same auth; beyond loopback pass `--bearer-token` and send it. |
62
62
  | Works on localhost, 401/blocked through a tunnel or LAN | Default `localDevStrict()` auth only admits direct loopback, **rejects proxy-forwarding headers** (`X-Forwarded-For`, ...), and requires a loopback `Host`. Use `--bearer-token <secret>` (or authored `bearerAuth`) — `--allow-anonymous` only for trusted-network demos (and never with Cursor account MCP connections). |
63
63
  | Channel route won't compile: body/query schema type error | `GET` requires a Zod `querySchema`, `POST`/`PUT`/`PATCH` a Zod `bodySchema` — plain JSON Schema objects don't type-check. Use `z.object({})` / `z.unknown()` for open surfaces. Empty POST bodies are coerced to `{}` before validation. |
64
- | Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent (dedicated-app path). Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agent-sdk slack doctor --prefix <PREFIX>`. |
65
- | `serve` fails: `Slack channels using the Cursor account connection ... not signed in to Cursor` | Cursor-hosted Slack (`cursorAccount: true`) needs a signed-in host: `agent-sdk login` or `CURSOR_API_KEY`. No Slack tokens exist on this path — `slack doctor` doesn't apply. |
66
- | `@Cursor <name>` in Slack gets Cursor's normal agent, not yours | Agent name mismatch or host not relaying. Names are single-token and matched case-insensitively; confirm the serve log `cursor-slack: relaying Slack for <AgentName>` and that the workspace's Cursor Slack integration is linked to the signed-in account. |
64
+ | Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent. Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agent-sdk slack doctor --prefix <PREFIX>`. |
67
65
  | Turn fails immediately with an API-key error | Model turns need `CURSOR_API_KEY`; everything structural (validate/info/call/serve bring-up) doesn't. |
68
66
  | Server tools / skills / sandbox silently absent | Runtime is `cloud` — those are local-only. `validate` prints exactly this warning; read it. |
69
67
  | `validate` clean, `run` works, CI typecheck fails | tsx never typechecked it. See invariant 3 in `framework-map/SKILL.md` (JSON-shaped tool returns; `type` not `interface`). |
@@ -181,7 +181,7 @@ export default defineEvalConfig({
181
181
  Drop `agent/playground/evals.tsx` exporting `agentName` (must match
182
182
  `defineAgent({ name })`) and
183
183
  `default: { RunSummary?, CaseMetrics?, CaseExtras? }`. The playground
184
- loads these via Vite glob (`examples/*` and `factory/*`). Without a
184
+ loads these via Vite glob (`factory/*`). Without a
185
185
  module, cases still show default `t.metric` badges.
186
186
 
187
187
  ## What good cases assert
@@ -45,7 +45,7 @@ pnpm exec tsx src/bin/agent-serve.ts <cmd> ...
45
45
  `~/.cache/agent-serve/<dir>` so ancestor `AGENTS.md` / `.cursor` / IDE
46
46
  MCP do not leak into playground turns. Set cwd at a checkout only when
47
47
  the agent must inherit that tree. Attached MCP is invisible by name
48
- until `advertiseTools: true`. `hostOnly` hides it from the model.
48
+ until `advertiseTools: true`.
49
49
  5. **A model turn needs `CURSOR_API_KEY`.** Everything structural
50
50
  (`validate`, `info`, `call`, `serve` bring-up) works without one.
51
51
 
@@ -60,7 +60,8 @@ path live under README "Folder structure".
60
60
  | `agent/instructions.md` | Always-on system prompt (required; `.ts`/dir forms exist) |
61
61
  | `agent/tools/<name>.ts` | One typed tool; filename = tool name. `execution: "server"` (in-process, default) or `"agent"` (script that runs where the agent runs) |
62
62
  | `agent/skills/*` | SKILL.md-convention procedures, loaded on demand |
63
- | `agent/mcp-connections/<name>.ts` | MCP servers. Do not name an account connection `cursor.ts`. `advertiseTools: true` for named tools on local turns; `hostOnly` keeps them off the model. `{ tools }` authors TypeScript the Agent SDK packages as stdio MCP. |
63
+ | `agent/mcp-connections/<name>.ts` | MCP servers. Do not name an account connection `cursor.ts`. `advertiseTools: true` for named tools on local turns. `{ tools }` authors TypeScript the Agent SDK packages as stdio MCP. |
64
+ | `agent/host-connections/<name>.ts` | Privileged MCP for `ctx.host.mcp` and `mcp oauth`. The model never sees them. |
64
65
  | `agent/subagents/<id>/` | Child agent dir (`description` required; per-subagent tools/skills/MCP connections ignored for now) |
65
66
  | `agent/channels/*.ts` | HTTP surfaces beyond the built-in session API; `slack.ts` / `github.ts` use the platform packs |
66
67
  | `agent/hooks/*.ts` | Observe-only event subscribers (never fatal) |
@@ -3,7 +3,7 @@ name: agentsdk-mcp-auth
3
3
  description: >-
4
4
  Authorize host MCP OAuth for defineConnection({ url, oauth: true }):
5
5
  agent-sdk mcp oauth, local mcp-auth.json, --store deployment secrets,
6
- hostOnly, advertiseTools, and egress. Read when wiring or debugging MCP auth.
6
+ advertiseTools, and egress. Read when wiring or debugging MCP auth.
7
7
  ---
8
8
 
9
9
  # Host MCP OAuth (mcp auth)
@@ -29,15 +29,13 @@ Docs: `docs/guides/mcp-oauth.md`, `docs/reference/connections.md`,
29
29
  | Remote URL that speaks OAuth; host must hold tokens | `defineConnection({ url, oauth: true })` + this skill |
30
30
  | Static bearer / API key | `headers` / env on a plain `{ url }` connection |
31
31
 
32
- Set `hostOnly: true` only when host tools / channel handlers should call
33
- the server and the model should not (admin APIs, privileged writes).
34
- Playground chat will not see those tools. For connectors the model should
35
- call on local turns (Linear, Datadog, account MCP), omit `hostOnly` and
36
- set `advertiseTools: true`.
32
+ For connectors the model should call by name on local turns (Linear,
33
+ Datadog, account MCP), set `advertiseTools: true`. Host tools can still
34
+ call the same connection through `ctx.host.mcp`.
37
35
 
38
36
  ## Goal checklist
39
37
 
40
- - [ ] `agent/mcp-connections/<name>.ts` with `url` + `oauth: true` (`hostOnly` if privileged; `advertiseTools` if the model should call it)
38
+ - [ ] `agent/mcp-connections/<name>.ts` with `url` + `oauth: true` (`advertiseTools` if the model should call it by name). Use `agent/host-connections/<name>.ts` when host tools should call it and the model should not.
41
39
  - [ ] `hosting.secretNames` lists `MCP_OAUTH_<NAME>_{ACCESS_TOKEN,REFRESH_TOKEN,CLIENT_ID}` when you will `--store`
42
40
  - [ ] Hosted engines that reach non-bootstrap hosts declare `hosting.egressDomains`
43
41
  - [ ] Local: `agent-sdk mcp oauth <name>` succeeds
@@ -52,8 +50,7 @@ import { defineConnection } from "@cursor/july/connections";
52
50
  export default defineConnection({
53
51
  url: "https://mcp.example.com/inventory",
54
52
  oauth: true,
55
- hostOnly: true,
56
- description: "Privileged inventory MCP; call via ctx.host.mcp only.",
53
+ description: "Inventory MCP.",
57
54
  });
58
55
  ```
59
56
 
@@ -81,8 +78,8 @@ await ctx.host.mcp.callTool("inventory", "list_warehouses", {
81
78
  });
82
79
  ```
83
80
 
84
- Update instructions so the model does not hunt IDE MCP namespaces or
85
- `mcp_auth` for `hostOnly` servers.
81
+ Set `advertiseTools: true` when the model should call the server by name
82
+ instead of through MCP meta-tools.
86
83
 
87
84
  ## Phase 1 — Local authorize (agent + human)
88
85
 
@@ -129,10 +126,10 @@ redeploy completed, then exercise the same host tool once.
129
126
  | Symptom | Fix |
130
127
  | --- | --- |
131
128
  | `must be defineConnection({ url, oauth: true })` | Wrong connection name, or missing `oauth: true` |
132
- | `Unknown MCP connection` | Filename under `agent/mcp-connections/` must match CLI arg |
129
+ | `Unknown MCP connection` | Filename under `agent/mcp-connections/` or `agent/host-connections/` must match CLI arg |
133
130
  | Callback hang | Free port 8787; finish browser flow on this machine |
134
131
  | Hosted 401 / unauthorized | `secrets list`; re-run `--store`; redeploy |
135
- | Model invents `mcp_auth` / IDE MCP | `hostOnly` hid it, or attached MCP is behind meta-tools. Use host tools for privileged servers. Set `advertiseTools: true` for named tools on local turns. |
132
+ | Model invents `mcp_auth` / IDE MCP | Attached MCP is behind meta-tools. Set `advertiseTools: true` for named tools on local turns. |
136
133
  | Tokens ignored after URL edit | Expected; run `mcp oauth` again for the new resource URL |
137
134
 
138
135
  ## Don't