@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
@@ -13,14 +13,13 @@ import type {
13
13
 
14
14
  /**
15
15
  * Pluggable Slack Web API caller. Instead of holding a raw `xoxb-…` token,
16
- * calls are executed by `call` e.g. proxied through the Cursor backend
17
- * with the signed-in account's Slack connection (`cursorAccount: true`).
18
- * Implementations return the Slack response body (including `ok: false`
19
- * platform errors) and only throw on programmer error.
16
+ * calls are executed by `call`. Implementations return the Slack response
17
+ * body (including `ok: false` platform errors) and only throw on
18
+ * programmer error.
20
19
  */
21
20
  export interface SlackApiTransport {
22
21
  kind: "api-transport";
23
- /** Human-readable transport label for logs (e.g. `cursor-account`). */
22
+ /** Human-readable transport label for logs. */
24
23
  label: string;
25
24
  call(
26
25
  method: string,
@@ -122,8 +121,8 @@ export interface SlackMessageFile {
122
121
  mode?: string;
123
122
  size?: number;
124
123
  /**
125
- * When set (cursorAccount relay), bytes were already downloaded by the
126
- * Cursor backend — skip a second `files.info` / private URL fetch.
124
+ * When set, bytes were already downloaded by the caller. Skip a second
125
+ * `files.info` / private URL fetch.
127
126
  */
128
127
  dataBase64?: string;
129
128
  }
@@ -333,8 +332,7 @@ export interface SlackChannelPostsOptions {
333
332
  * channel the bot is in. Must be non-empty (empty is a definition error).
334
333
  * `#names` are resolved to ids via `conversations.list` when the channel
335
334
  * starts; the bot must be a member of each watched channel to receive its
336
- * messages. Socket Mode only — `cursorAccount: true` rejects
337
- * `engagement.channelPosts`.
335
+ * messages.
338
336
  *
339
337
  * `"*"` suits agents whose handler decides per message (a thread the agent
340
338
  * is already in, say) rather than per channel. Every delivered message then
@@ -384,11 +382,8 @@ export interface SlackBotMentionsOptions {
384
382
  * - `"U…"` — a bot *user* id.
385
383
  * - `"<botId>:<username>"` — compound: the posting app's `bot_id` AND its
386
384
  * message `username` must both match (case-insensitive username). Use
387
- * this for shared multi-tenant apps like the Cursor Slack connection,
388
- * where every agent posts under one `bot_id` but the backend pins each
389
- * agent's `username` server-side — `"B0CURSOR…:Lasso"` trusts only the
390
- * Cursor app posting as Lasso, not every Cursor-connected agent.
391
- * Fails closed when the event carries no username.
385
+ * this when several agents post through one app under different
386
+ * usernames. Fails closed when the event carries no username.
392
387
  *
393
388
  * Must be non-empty (empty is a definition error).
394
389
  */
@@ -432,51 +427,10 @@ export interface SlackEngagementOptions {
432
427
  channelPosts?: SlackChannelPostsOptions;
433
428
  /**
434
429
  * Opt-in bot-to-bot mention wake (see {@link SlackBotMentionsOptions}).
435
- * Socket Mode only — rejected on `cursorAccount: true`.
436
430
  */
437
431
  botMentions?: SlackBotMentionsOptions;
438
432
  }
439
433
 
440
- /**
441
- * Whitespace forbidden in {@link SlackChannelOptions.agentName}. The Cursor
442
- * Slack router matches on leading words; multi-word names collide with Named
443
- * Agent shortened-prefix matching (`Approval …` stealing `ApprovalBuddy`).
444
- */
445
- type SlackAgentNameWhitespace = " " | "\t" | "\n" | "\r" | "\f" | "\v";
446
-
447
- /**
448
- * Single-token Cursor Slack handle for `cursorAccount` routing
449
- * (`@Cursor <name> …`). String literals that contain whitespace become
450
- * `never` (type error at the call site); plain `string` stays `string` and
451
- * is still rejected at runtime by {@link assertSlackCursorAgentName}.
452
- */
453
- export type SlackCursorAgentName<S extends string = string> = string extends S
454
- ? string
455
- : S extends `${string}${SlackAgentNameWhitespace}${string}`
456
- ? never
457
- : S;
458
-
459
- const SLACK_CURSOR_AGENT_NAME_WHITESPACE = /\s/;
460
-
461
- /**
462
- * Runtime guard for {@link SlackChannelOptions.agentName}. Call from
463
- * `slackChannel({ cursorAccount: true })` construction and serve-time
464
- * name resolution so derived defaults cannot sneak spaces in.
465
- */
466
- export function assertSlackCursorAgentName(name: string): void {
467
- const trimmed = name.trim();
468
- if (trimmed.length === 0) {
469
- throw new Error(
470
- 'slackChannel({ cursorAccount: true }) agentName must be a non-empty single token (no whitespace), e.g. "ApprovalBuddy".'
471
- );
472
- }
473
- if (SLACK_CURSOR_AGENT_NAME_WHITESPACE.test(trimmed)) {
474
- throw new Error(
475
- `slackChannel({ cursorAccount: true }) agentName must be a single token with no whitespace (got ${JSON.stringify(name)}). Use PascalCase like "ApprovalBuddy" — multi-word names break @Cursor routing.`
476
- );
477
- }
478
- }
479
-
480
434
  /** `"thread"` = anyone in the thread (default); `"author"` = session starter only. */
481
435
  export type SlackRespondTo = "thread" | "author";
482
436
 
@@ -504,38 +458,6 @@ export interface SlackChannelOptions {
504
458
  * Ignored when `credentials` is set explicitly.
505
459
  */
506
460
  envPrefix?: string;
507
- /**
508
- * Use the signed-in Cursor account's Slack connection instead of a
509
- * dedicated Slack app: no bot/app tokens, no extra install. Inbound
510
- * traffic (`@Cursor <agent name> …` mentions, replies in threads the
511
- * agent owns, and DMs) is relayed from the Cursor backend
512
- * (`/v0/slack-events`), and outbound Web API calls are proxied through it
513
- * — the agent posts as the Cursor Slack app with this agent's name and
514
- * icon.
515
- *
516
- * Both paths stay first-class: omit this (default) for the classic
517
- * Socket-Mode channel with your own Slack app and tokens. Requires a
518
- * signed-in host (`agent-serve login` / `CURSOR_API_KEY`) and a Slack
519
- * account linked to the Cursor account. Mutually exclusive with
520
- * `credentials` / `envPrefix`. `engagement.mentions: false` and
521
- * `engagement.directMessages: false` are rejected (the relay always
522
- * carries that traffic). Channel watching (`engagement.channelPosts`) and
523
- * tool approvals / interactivity (`toolApprovals` / `interactivity`) are
524
- * Socket Mode only — not supported on cursorAccount; agents must be
525
- * explicitly addressed, and Approve/Deny buttons need a dedicated Slack
526
- * app.
527
- */
528
- cursorAccount?: boolean;
529
- /**
530
- * Single-token display name registered with the Cursor backend when
531
- * {@link cursorAccount} is on: `@Cursor <agentName> …` routes here, and
532
- * replies post under this username. **No whitespace** — prefer PascalCase
533
- * (`ApprovalBuddy`). Defaults to a PascalCase name derived from the
534
- * agent's mount slug (or project name).
535
- */
536
- agentName?: SlackCursorAgentName;
537
- /** Avatar for posts when {@link cursorAccount} is on. */
538
- agentIcon?: { url?: string; emoji?: string };
539
461
  /**
540
462
  * Optional log sink. When omitted, uses `console.log` until the server
541
463
  * mounts the channel and rebinds to {@link ServeOptions.logger}.
@@ -573,9 +495,7 @@ export interface SlackChannelOptions {
573
495
  deliverDefaults?: boolean;
574
496
  /**
575
497
  * Stream assistant text while the turn runs via `chat.startStream` /
576
- * `appendStream` / `stopStream` (defaults to `true` for Socket Mode).
577
- * Ignored when {@link cursorAccount} is on — that path never edits posts
578
- * (`setStatus` + one final `chat.postMessage` only).
498
+ * `appendStream` / `stopStream` (defaults to `true`).
579
499
  */
580
500
  streaming?: boolean;
581
501
  /**
@@ -598,9 +518,7 @@ export interface SlackChannelOptions {
598
518
  *
599
519
  * Framework park/resume is enabled by `needsApproval` on server tools.
600
520
  * Set this to `true` to also post Block Kit Approve/Deny cards and route
601
- * the Socket Mode `interactive` clicks to `resolveApproval`. Socket Mode
602
- * only — rejected on `cursorAccount: true` (the Cursor Slack connection
603
- * does not relay Block Kit clicks).
521
+ * the Socket Mode `interactive` clicks to `resolveApproval`.
604
522
  *
605
523
  * Defaults to `false`. For custom composition, spread
606
524
  * `buildToolApprovalEvents({ credentials })` into `events`.
@@ -609,8 +527,7 @@ export interface SlackChannelOptions {
609
527
  /**
610
528
  * Route interactive payloads to approval resolution without opting into
611
529
  * the full {@link buildToolApprovalEvents} handler pack. Use when
612
- * composing `buildToolApprovalEvents` into `events` manually. Socket Mode
613
- * only — rejected on `cursorAccount: true`.
530
+ * composing `buildToolApprovalEvents` into `events` manually.
614
531
  */
615
532
  interactivity?: boolean;
616
533
  /**
@@ -622,7 +539,6 @@ export interface SlackChannelOptions {
622
539
  * thread, or `null` to ignore the click. Setting this implies
623
540
  * interactive routing; the Slack app manifest still needs
624
541
  * `interactivity` enabled (`buildSlackManifest({ interactivity: true })`).
625
- * Socket Mode only — rejected on `cursorAccount: true`.
626
542
  */
627
543
  onBlockAction?: SlackBlockActionHandler;
628
544
  /**
package/src/client.ts ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Client-side plumbing for talking to a running agent-serve deployment:
3
+ * production target resolution (stored Cursor login → engineAccess URL and
4
+ * headers), request-header assembly, and the sessions listing used for
5
+ * latest-session binding.
6
+ *
7
+ * This entry point exists for first-party CLI clients (`agsh`); agent code
8
+ * should not need it.
9
+ */
10
+
11
+ export {
12
+ mergeRequestHeaders,
13
+ type RequestAuth,
14
+ } from "./internal/request-headers.js";
15
+ export {
16
+ PROD_ENGINE_WAKE_HEADERS,
17
+ ProdTargetError,
18
+ type ResolvedProdTarget,
19
+ type ResolveProdTargetOptions,
20
+ resolveProdTarget,
21
+ } from "./internal/resolve-prod-target.js";
22
+ export { listSessions } from "./internal/sessions-client.js";
23
+ export type { SessionSummary } from "./types.js";
@@ -1,11 +1,15 @@
1
1
  /**
2
- * `defineConnection` — authored at `agent/mcp-connections/<name>.ts`.
2
+ * `defineConnection` — authored at `agent/mcp-connections/<name>.ts`
3
+ * (model + host) or `agent/host-connections/<name>.ts` (host + `mcp oauth`
4
+ * only).
3
5
  *
4
6
  * A connection gives tools from an external MCP server. The filename
5
- * becomes the connection (server) name. Available to the agent (SDK
6
- * `mcpServers`), host (`ctx.host.mcp`), and channel/schedule handlers.
7
- * Pass `advertiseTools: true` for named tools on local turns. Pass
8
- * `hostOnly: true` to keep it off the model (still on `host.mcp`).
7
+ * becomes the connection (server) name. Files under `mcp-connections/`
8
+ * are available to the agent (SDK `mcpServers`), host (`ctx.host.mcp`),
9
+ * and channel/schedule handlers. Pass `advertiseTools: true` for named
10
+ * tools on local turns. Pass `effects: "read"` with `advertiseTools` to
11
+ * advertise only tools the server classifies as reads. Files under
12
+ * `host-connections/` stay off the model.
9
13
  *
10
14
  * ```ts
11
15
  * import { defineConnection } from "@cursor/july/connections";
@@ -27,11 +31,16 @@
27
31
  * },
28
32
  * });
29
33
  *
30
- * // privileged connector, model cannot call directly:
31
34
  * export default defineConnection({
32
35
  * cursorAccount: true,
33
36
  * servers: ["anytool"],
34
- * hostOnly: true,
37
+ * });
38
+ *
39
+ * // query-only: advertise only tools classified as reads
40
+ * export default defineConnection({
41
+ * url: "https://api.cursor.com/v1/agent/mcp",
42
+ * advertiseTools: true,
43
+ * effects: "read",
35
44
  * });
36
45
  * ```
37
46
  *
@@ -107,15 +116,19 @@ import type { ConnectionConfig, ConnectionDefinition } from "./types.js";
107
116
  export type {
108
117
  ConnectionConfig,
109
118
  ConnectionDefinition,
119
+ ConnectionEffects,
110
120
  ConnectionTransport,
111
121
  HostMcpCallResult,
112
122
  HostMcpRegistry,
113
123
  HostMcpToolInfo,
114
124
  InlineStdioConnectionConfig,
115
125
  InlineStdioToolConfig,
126
+ ToolEffect,
116
127
  } from "./types.js";
117
128
  export {
118
129
  isInlineStdioConnection,
130
+ isToolEffect,
131
+ normalizeConnectionEffects,
119
132
  normalizeCursorAccountServers,
120
133
  } from "./types.js";
121
134
 
package/src/index.ts CHANGED
@@ -182,7 +182,9 @@ export {
182
182
  isCursorAccountTransport,
183
183
  isPeerConnectionTransport,
184
184
  isSymbolicConnectionTransport,
185
+ isToolEffect,
185
186
  MAX_RUNNING_TURNS_LIMIT,
187
+ normalizeConnectionEffects,
186
188
  normalizeCursorAccountServers,
187
189
  supportsKvCas,
188
190
  } from "./types.js";
@@ -23,6 +23,10 @@
23
23
  * `normalizeMcpToolName` uses for IDE/Sand MCP tools. A listing failure
24
24
  * still fails the turn rather than running it with a silently shrunken
25
25
  * toolset.
26
+ *
27
+ * `defineConnection({ effects })` filters the listing before names are
28
+ * assigned: only tools whose MCP annotations classify as an intended
29
+ * effect are advertised. Unclassified tools are omitted, not guessed.
26
30
  */
27
31
 
28
32
  import type {
@@ -31,9 +35,11 @@ import type {
31
35
  HostMcpCallResult,
32
36
  HostMcpToolInfo,
33
37
  JsonSchemaObject,
38
+ McpToolAnnotations,
34
39
  ResolvedAgent,
35
40
  SessionInfo,
36
41
  ToolDefinition,
42
+ ToolEffect,
37
43
  } from "../types.js";
38
44
  import { brandDefinition } from "./brand.js";
39
45
  import type { HostMcpOneOff } from "./mcp-host.js";
@@ -41,6 +47,7 @@ import {
41
47
  sanitizeMcpToolName,
42
48
  suffixMcpToolName,
43
49
  } from "./sanitize-mcp-tool-name.js";
50
+ import { classifyAnnotationsEffect } from "./tool-policy.js";
44
51
 
45
52
  /**
46
53
  * What the resolver needs from the host MCP registry: the shared cached
@@ -88,6 +95,13 @@ export async function resolveAdvertisedTools(args: {
88
95
  agent: ResolvedAgent;
89
96
  session: SessionInfo;
90
97
  hostMcp: AdvertiseHostMcp;
98
+ /**
99
+ * When set, a connection whose source or listing fails is reported here
100
+ * and skipped instead of throwing. Turns keep the throwing default (a
101
+ * turn must fail closed); the inspection catalog passes this so one
102
+ * broken connector does not hide every other tool.
103
+ */
104
+ onConnectionError?: (connection: string, error: unknown) => void;
91
105
  /** Test seam; defaults to {@link sourceForConnection}. */
92
106
  sourceFor?: (
93
107
  connection: DiscoveredConnection,
@@ -105,17 +119,25 @@ export async function resolveAdvertisedTools(args: {
105
119
  const claimed = new Set(args.agent.tools.map((tool) => tool.name));
106
120
  const resolved: DiscoveredTool[] = [];
107
121
  for (const connection of advertising) {
108
- const source = await sourceFor(connection, args.session, args.hostMcp);
109
122
  let listed: HostMcpToolInfo[];
123
+ let source: AdvertisedToolSource;
110
124
  try {
125
+ source = await sourceFor(connection, args.session, args.hostMcp);
111
126
  listed = await source.listTools();
112
127
  } catch (error) {
128
+ if (args.onConnectionError !== undefined) {
129
+ args.onConnectionError(connection.name, error);
130
+ continue;
131
+ }
113
132
  throw new Error(
114
133
  `Failed to list tools on advertised connection "${connection.name}": ${describeError(error)}`,
115
134
  { cause: error }
116
135
  );
117
136
  }
118
- const exposed = exposeListedTools(listed, claimed);
137
+ const intended = listed.filter((info) =>
138
+ matchesIntendedEffects(info.annotations, connection.effects)
139
+ );
140
+ const exposed = exposeListedTools(intended, claimed);
119
141
  for (const { info, exposedName } of exposed) {
120
142
  resolved.push(toDiscoveredTool(connection, info, exposedName, source));
121
143
  claimed.add(exposedName);
@@ -210,6 +232,17 @@ function exposeListedTools(
210
232
  }));
211
233
  }
212
234
 
235
+ function matchesIntendedEffects(
236
+ annotations: McpToolAnnotations | undefined,
237
+ effects: readonly ToolEffect[] | undefined
238
+ ): boolean {
239
+ if (effects === undefined) {
240
+ return true;
241
+ }
242
+ const effect = classifyAnnotationsEffect(annotations);
243
+ return effect !== undefined && effects.includes(effect);
244
+ }
245
+
213
246
  function toDiscoveredTool(
214
247
  connection: DiscoveredConnection,
215
248
  info: HostMcpToolInfo,
@@ -222,10 +255,15 @@ function toDiscoveredTool(
222
255
  : info.description;
223
256
  const inputSchema = info.inputSchema ?? ANY_OBJECT_SCHEMA;
224
257
  const outputSchema = info.outputSchema;
258
+ const effect =
259
+ connection.effects === undefined
260
+ ? undefined
261
+ : classifyAnnotationsEffect(info.annotations);
225
262
  const definition: ToolDefinition = brandDefinition("tool", {
226
263
  description,
227
264
  inputSchema,
228
- ...(outputSchema === undefined ? {} : { outputSchema }),
265
+ outputSchema,
266
+ effect,
229
267
  execute: async (input: Record<string, unknown>) =>
230
268
  formatMcpToolResult(
231
269
  connection.name,
@@ -237,16 +275,16 @@ function toDiscoveredTool(
237
275
  name: exposedName,
238
276
  description,
239
277
  inputSchema,
240
- ...(outputSchema === undefined ? {} : { outputSchema }),
278
+ outputSchema,
241
279
  execution: "server",
242
280
  needsApproval: false,
281
+ effect,
243
282
  // The server's own annotations ride along (bounded at listing time), so
244
283
  // the harness listing carries them and effect classification can read
245
284
  // them. Absent stays absent — the fail-closed state.
246
- ...(info.annotations === undefined
247
- ? {}
248
- : { annotations: info.annotations }),
285
+ annotations: info.annotations,
249
286
  advertised: true,
287
+ connection: connection.name,
250
288
  definition,
251
289
  };
252
290
  }
@@ -68,13 +68,15 @@ export async function cmdMcpOauth(
68
68
  const err = options.err ?? ((text) => process.stderr.write(text));
69
69
  const out = options.out ?? ((text) => process.stdout.write(text));
70
70
  const project = await loadAgentProject(options.dir);
71
- const connection = project.agent.connections.find(
71
+ const authored = [
72
+ ...project.agent.connections,
73
+ ...(project.agent.hostConnections ?? []),
74
+ ];
75
+ const connection = authored.find(
72
76
  (entry) => entry.name === options.connection
73
77
  );
74
78
  if (connection === undefined) {
75
- const known =
76
- project.agent.connections.map((entry) => entry.name).join(", ") ||
77
- "(none)";
79
+ const known = authored.map((entry) => entry.name).join(", ") || "(none)";
78
80
  err(
79
81
  `${LOG_PREFIX} Unknown MCP connection "${options.connection}". Authored: ${known}.\n`
80
82
  );
@@ -6,9 +6,10 @@
6
6
  * clock — `exportedAt` comes from the caller.
7
7
  */
8
8
 
9
+ import { envPrefixFromName } from "../../channels/slack/credentials.js";
9
10
  import { CLI_COMMAND_NAME, PACKAGE_NAME } from "../distribution.js";
10
11
  import { MEMORY_TS } from "../init-scaffold.js";
11
- import { pascalCase, SlugRegistry, slugify } from "./slug.js";
12
+ import { SlugRegistry, slugify } from "./slug.js";
12
13
  import type {
13
14
  ActionJson,
14
15
  ConvertedFile,
@@ -998,11 +999,11 @@ function emitSlackChannel(
998
999
  "The Slack trigger marked triggering messages with a completion reaction; agentsdk has no completion-reaction option, so that signal is lost unless agent/instructions.md tells the agent to add the reaction itself via Slack tools."
999
1000
  );
1000
1001
  }
1001
- if (socketMode) {
1002
- out.setupSteps.push(
1003
- `Slack channel-watch / reaction / channel-created triggers need a dedicated Socket Mode Slack app (not the Cursor connection): run \`${CLI_COMMAND_NAME} slack create --channel-posts\`, then finish in the dashboard wizard.`
1004
- );
1005
- }
1002
+ out.setupSteps.push(
1003
+ socketMode
1004
+ ? `Slack channel-watch / reaction / channel-created triggers need a dedicated Socket Mode Slack app: run \`${CLI_COMMAND_NAME} slack create --channel-posts\`, then finish in the dashboard wizard.`
1005
+ : `Slack mentions need a dedicated Socket Mode Slack app: run \`${CLI_COMMAND_NAME} slack create\`, then finish in the dashboard wizard.`
1006
+ );
1006
1007
 
1007
1008
  const header = [
1008
1009
  `import { slackChannel } from "${PACKAGE_NAME}/channels/slack";`,
@@ -1069,26 +1070,37 @@ function emitSlackChannel(
1069
1070
  }
1070
1071
  body = [
1071
1072
  "//",
1072
- "// This channel needs a dedicated Socket Mode Slack app (not the Cursor",
1073
- `// connection): run \`${CLI_COMMAND_NAME} slack create --channel-posts\`.`,
1074
- "export default slackChannel({",
1075
- ...engagement,
1076
- "});",
1073
+ `// Run \`${CLI_COMMAND_NAME} slack create --channel-posts\` for a dedicated Slack app.`,
1074
+ ...slackChannelExport(automation.name, engagement),
1077
1075
  ];
1078
1076
  } else {
1079
- const agentName = pascalCase(automation.name, "ExportedAgent");
1080
1077
  body = [
1081
1078
  "//",
1082
- `// Mention this agent in Slack with \`@Cursor ${agentName} ...\`.`,
1083
- "export default slackChannel({",
1084
- " cursorAccount: true,",
1085
- ` agentName: ${JSON.stringify(agentName)},`,
1086
- "});",
1079
+ `// Run \`${CLI_COMMAND_NAME} slack create\` for a dedicated Slack app.`,
1080
+ ...slackChannelExport(automation.name, []),
1087
1081
  ];
1088
1082
  }
1089
1083
  out.files.push({ path, contents: `${[...header, ...body].join("\n")}\n` });
1090
1084
  }
1091
1085
 
1086
+ /**
1087
+ * `slack create` writes `<DIR>_SLACK_*` from the project directory. Convert
1088
+ * names that directory from the automation (`Nightly Triage` →
1089
+ * `nightly-triage` → `NIGHTLY_TRIAGE`). Emit the same prefix so minted
1090
+ * tokens bind.
1091
+ */
1092
+ function slackChannelExport(name: string, optionLines: string[]): string[] {
1093
+ const prefix = envPrefixFromName(slugify(name, "automation"));
1094
+ const options = [
1095
+ ...(prefix === "" ? [] : [` envPrefix: ${JSON.stringify(prefix)},`]),
1096
+ ...optionLines,
1097
+ ];
1098
+ if (options.length === 0) {
1099
+ return ["export default slackChannel();"];
1100
+ }
1101
+ return ["export default slackChannel({", ...options, "});"];
1102
+ }
1103
+
1092
1104
  function slackChannelList(
1093
1105
  trigger: SlackChannelsTriggerJson | undefined
1094
1106
  ): string[] {
@@ -9,15 +9,6 @@ export function slugify(name: string, fallback: string): string {
9
9
  return slug === "" ? fallback : slug;
10
10
  }
11
11
 
12
- /** Single-token PascalCase (Slack cursorAccount agentName). */
13
- export function pascalCase(name: string, fallback: string): string {
14
- const words = name.split(/[^a-zA-Z0-9]+/).filter((word) => word !== "");
15
- if (words.length === 0) {
16
- return fallback;
17
- }
18
- return words.map((word) => word[0]?.toUpperCase() + word.slice(1)).join("");
19
- }
20
-
21
12
  /** Dedupes slugs with numeric suffixes: `linear`, `linear-2`, `linear-3`, … */
22
13
  export class SlugRegistry {
23
14
  private readonly used = new Set<string>();
@@ -85,7 +85,10 @@ export function collectCursorAccountConnections(
85
85
  const bySlug = new Map<string, CursorAccountConnectionRef[]>();
86
86
  for (const { slug, project } of mounts) {
87
87
  const refs: CursorAccountConnectionRef[] = [];
88
- for (const connection of project.agent.connections) {
88
+ for (const connection of [
89
+ ...project.agent.connections,
90
+ ...(project.agent.hostConnections ?? []),
91
+ ]) {
89
92
  if (!isCursorAccountTransport(connection.transport)) {
90
93
  continue;
91
94
  }