@cursor/july 0.1.96 → 0.1.99

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 (381) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +3 -2
  3. package/dist/bin/agent-serve.js +13 -3
  4. package/dist/channels/github/github-channel.d.ts.map +1 -1
  5. package/dist/channels/github/github-channel.js +16 -0
  6. package/dist/channels/origin/api.d.ts +15 -4
  7. package/dist/channels/origin/api.d.ts.map +1 -1
  8. package/dist/channels/origin/api.js +19 -3
  9. package/dist/channels/origin/binding.d.ts +11 -0
  10. package/dist/channels/origin/binding.d.ts.map +1 -1
  11. package/dist/channels/origin/binding.js +41 -25
  12. package/dist/channels/origin/index.d.ts +1 -0
  13. package/dist/channels/origin/index.d.ts.map +1 -1
  14. package/dist/channels/origin/index.js +1 -0
  15. package/dist/channels/origin/origin-channel.d.ts +2 -0
  16. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  17. package/dist/channels/origin/origin-channel.js +40 -4
  18. package/dist/channels/origin/reactions.d.ts +56 -0
  19. package/dist/channels/origin/reactions.d.ts.map +1 -0
  20. package/dist/channels/origin/reactions.js +67 -0
  21. package/dist/channels/origin/types.d.ts +11 -0
  22. package/dist/channels/origin/types.d.ts.map +1 -1
  23. package/dist/channels/slack/approvals.d.ts +16 -0
  24. package/dist/channels/slack/approvals.d.ts.map +1 -1
  25. package/dist/channels/slack/approvals.js +86 -0
  26. package/dist/channels/slack/cli-project.d.ts +19 -0
  27. package/dist/channels/slack/cli-project.d.ts.map +1 -0
  28. package/dist/channels/slack/cli-project.js +234 -0
  29. package/dist/channels/slack/defaults.d.ts.map +1 -1
  30. package/dist/channels/slack/defaults.js +142 -63
  31. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  32. package/dist/channels/slack/dispatch.js +1 -1
  33. package/dist/channels/slack/init.d.ts +3 -2
  34. package/dist/channels/slack/init.d.ts.map +1 -1
  35. package/dist/channels/slack/init.js +5 -5
  36. package/dist/channels/slack/interactive.d.ts +2 -1
  37. package/dist/channels/slack/interactive.d.ts.map +1 -1
  38. package/dist/channels/slack/interactive.js +15 -4
  39. package/dist/channels/slack/live-delivery.d.ts +1 -1
  40. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  41. package/dist/channels/slack/live-delivery.js +4 -2
  42. package/dist/channels/slack/manifest.d.ts +1 -1
  43. package/dist/channels/slack/manifest.js +1 -1
  44. package/dist/channels/slack/progress-delivery.d.ts +28 -0
  45. package/dist/channels/slack/progress-delivery.d.ts.map +1 -0
  46. package/dist/channels/slack/progress-delivery.js +115 -0
  47. package/dist/channels/slack/setup.d.ts +1 -1
  48. package/dist/channels/slack/setup.d.ts.map +1 -1
  49. package/dist/channels/slack/setup.js +10 -6
  50. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  51. package/dist/channels/slack/slack-channel.js +1 -0
  52. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  53. package/dist/channels/slack/tool-approval-events.js +91 -1
  54. package/dist/channels/slack/types.d.ts +9 -1
  55. package/dist/channels/slack/types.d.ts.map +1 -1
  56. package/dist/docs/404.html +2 -2
  57. package/dist/docs/ab.html +4 -4
  58. package/dist/docs/assets/{app.jXleCmOc.js → app.BplEAZ3S.js} +1 -1
  59. package/dist/docs/assets/chunks/@localSearchIndexroot.DpuI4i7Z.js +1 -0
  60. package/dist/docs/assets/chunks/{VPLocalSearchBox.8LhyglIT.js → VPLocalSearchBox.CHXyv4wP.js} +1 -1
  61. package/dist/docs/assets/chunks/{theme.9ged-pr2.js → theme.BTcsZmjQ.js} +2 -2
  62. package/dist/docs/assets/{deployment.md.D9msOFOW.js → deployment.md.MFPKqsqI.js} +2 -2
  63. package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.js → guides_mcp-oauth.md.CN-6YmTJ.js} +4 -4
  64. package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.lean.js → guides_mcp-oauth.md.CN-6YmTJ.lean.js} +1 -1
  65. package/dist/docs/assets/guides_slack.md.VDXQV3ja.js +22 -0
  66. package/dist/docs/assets/guides_slack.md.VDXQV3ja.lean.js +1 -0
  67. package/dist/docs/assets/index.md.CVeRUOeZ.js +5 -0
  68. package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.js → reference_agent-config.md.BHeYMgme.js} +1 -1
  69. package/dist/docs/assets/{reference_cli.md.CCnG-nJx.js → reference_cli.md.DfoeyvL0.js} +9 -6
  70. package/dist/docs/assets/{reference_cli.md.CCnG-nJx.lean.js → reference_cli.md.DfoeyvL0.lean.js} +1 -1
  71. package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.js → reference_connections.md.DxldvyIB.js} +4 -3
  72. package/dist/docs/assets/{reference_http-api.md.D89k1mdm.js → reference_http-api.md.BEJx9XVj.js} +2 -2
  73. package/dist/docs/assets/reference_sessions.md.NxFP_CAC.js +1 -0
  74. package/dist/docs/assets/{reference_tools.md.BHeXn2id.js → reference_tools.md.CvAHsdSp.js} +10 -2
  75. package/dist/docs/assets/{reference_tools.md.BHeXn2id.lean.js → reference_tools.md.CvAHsdSp.lean.js} +1 -1
  76. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +2 -0
  77. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +1 -0
  78. package/dist/docs/assets/troubleshooting.md.DCiPBhYs.js +1 -0
  79. package/dist/docs/building-with-agents.html +4 -4
  80. package/dist/docs/concepts.html +4 -4
  81. package/dist/docs/deployment.html +7 -7
  82. package/dist/docs/deployment.md +5 -4
  83. package/dist/docs/design/runtime-abstraction.md +1757 -0
  84. package/dist/docs/evals.html +4 -4
  85. package/dist/docs/guides/agent-to-agent.html +4 -4
  86. package/dist/docs/guides/cloud-runtime.html +4 -4
  87. package/dist/docs/guides/convert-automation.html +4 -4
  88. package/dist/docs/guides/github.html +4 -4
  89. package/dist/docs/guides/human-in-the-loop.html +4 -4
  90. package/dist/docs/guides/mcp-oauth.html +8 -8
  91. package/dist/docs/guides/mcp-oauth.md +26 -8
  92. package/dist/docs/guides/opentelemetry.html +4 -4
  93. package/dist/docs/guides/slack.html +17 -33
  94. package/dist/docs/guides/slack.md +92 -201
  95. package/dist/docs/guides/webhooks.html +4 -4
  96. package/dist/docs/hashmap.json +1 -1
  97. package/dist/docs/hillclimbing.html +4 -4
  98. package/dist/docs/index.html +6 -6
  99. package/dist/docs/index.md +5 -3
  100. package/dist/docs/llms-full.txt +2065 -637
  101. package/dist/docs/llms.txt +3 -2
  102. package/dist/docs/quickstart.html +4 -4
  103. package/dist/docs/reference/agent-config.html +6 -6
  104. package/dist/docs/reference/agent-config.md +2 -2
  105. package/dist/docs/reference/artifacts.html +4 -4
  106. package/dist/docs/reference/channels.html +4 -4
  107. package/dist/docs/reference/cli.html +13 -10
  108. package/dist/docs/reference/cli.md +32 -16
  109. package/dist/docs/reference/connections.html +9 -8
  110. package/dist/docs/reference/connections.md +6 -3
  111. package/dist/docs/reference/hooks.html +4 -4
  112. package/dist/docs/reference/http-api.html +7 -7
  113. package/dist/docs/reference/http-api.md +3 -1
  114. package/dist/docs/reference/instructions.html +4 -4
  115. package/dist/docs/reference/playground.html +4 -4
  116. package/dist/docs/reference/project-layout.html +4 -4
  117. package/dist/docs/reference/prompt.html +4 -4
  118. package/dist/docs/reference/schedules.html +4 -4
  119. package/dist/docs/reference/sessions.html +5 -5
  120. package/dist/docs/reference/sessions.md +4 -2
  121. package/dist/docs/reference/skills.html +4 -4
  122. package/dist/docs/reference/subagents.html +4 -4
  123. package/dist/docs/reference/tools.html +15 -7
  124. package/dist/docs/reference/tools.md +34 -2
  125. package/dist/docs/scaffolding-agents.html +4 -4
  126. package/dist/docs/storage.html +4 -4
  127. package/dist/docs/templates/agentic-owners.html +4 -4
  128. package/dist/docs/templates/agents-md.html +28 -0
  129. package/dist/docs/templates/agents-md.md +105 -0
  130. package/dist/docs/templates/code-wiki.html +5 -5
  131. package/dist/docs/templates/demo.html +4 -4
  132. package/dist/docs/templates/pr-autofixer.html +4 -4
  133. package/dist/docs/templates/security-help.html +4 -4
  134. package/dist/docs/templates/security-reviewer.html +5 -5
  135. package/dist/docs/templates/triage.html +4 -4
  136. package/dist/docs/troubleshooting.html +5 -5
  137. package/dist/docs/troubleshooting.md +2 -2
  138. package/dist/evals/run-facts.d.ts.map +1 -1
  139. package/dist/evals/run-facts.js +27 -0
  140. package/dist/files-backends/cursor-hosted.d.ts +3 -2
  141. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  142. package/dist/files-backends/cursor-hosted.js +3 -2
  143. package/dist/index.d.ts +1 -0
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +1 -0
  146. package/dist/internal/advertise-tools.d.ts.map +1 -1
  147. package/dist/internal/advertise-tools.js +15 -9
  148. package/dist/internal/approval-gate.d.ts +12 -13
  149. package/dist/internal/approval-gate.d.ts.map +1 -1
  150. package/dist/internal/approval-gate.js +16 -21
  151. package/dist/internal/as-of.d.ts +19 -0
  152. package/dist/internal/as-of.d.ts.map +1 -0
  153. package/dist/internal/as-of.js +82 -0
  154. package/dist/internal/chat-client.js +10 -0
  155. package/dist/internal/cli-deploy.d.ts +6 -0
  156. package/dist/internal/cli-deploy.d.ts.map +1 -1
  157. package/dist/internal/cli-deploy.js +149 -21
  158. package/dist/internal/cli-mcp-oauth.js +8 -18
  159. package/dist/internal/cli-slack-manual.d.ts +24 -2
  160. package/dist/internal/cli-slack-manual.d.ts.map +1 -1
  161. package/dist/internal/cli-slack-manual.js +251 -20
  162. package/dist/internal/cli-slack.d.ts +9 -2
  163. package/dist/internal/cli-slack.d.ts.map +1 -1
  164. package/dist/internal/cli-slack.js +29 -82
  165. package/dist/internal/cursor/account-mcp.d.ts +1 -0
  166. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  167. package/dist/internal/cursor/account-mcp.js +17 -0
  168. package/dist/internal/cursor-agent-template.d.ts +1 -1
  169. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  170. package/dist/internal/cursor-agent-template.js +1 -0
  171. package/dist/internal/cursor-event-relay.d.ts.map +1 -1
  172. package/dist/internal/cursor-event-relay.js +5 -6
  173. package/dist/internal/deploy-client.d.ts +17 -0
  174. package/dist/internal/deploy-client.d.ts.map +1 -1
  175. package/dist/internal/deploy-client.js +31 -10
  176. package/dist/internal/env-file.d.ts +19 -0
  177. package/dist/internal/env-file.d.ts.map +1 -0
  178. package/dist/internal/env-file.js +90 -0
  179. package/dist/internal/framework-file-storage.d.ts +11 -17
  180. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  181. package/dist/internal/framework-file-storage.js +17 -40
  182. package/dist/internal/framework-storage-selection.d.ts +13 -11
  183. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  184. package/dist/internal/framework-storage-selection.js +37 -26
  185. package/dist/internal/hosted-admission-adapter.d.ts +28 -0
  186. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -0
  187. package/dist/internal/hosted-admission-adapter.js +7 -0
  188. package/dist/internal/hosted-delivery-protocol.d.ts +13 -1
  189. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  190. package/dist/internal/hosted-delivery-protocol.js +8 -1
  191. package/dist/internal/hosted-delivery.d.ts +21 -1
  192. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  193. package/dist/internal/hosted-delivery.js +101 -34
  194. package/dist/internal/hosted-execution-diag.d.ts +59 -0
  195. package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
  196. package/dist/internal/hosted-execution-diag.js +187 -0
  197. package/dist/internal/http-channel.d.ts.map +1 -1
  198. package/dist/internal/http-channel.js +85 -2
  199. package/dist/internal/init-project.d.ts.map +1 -1
  200. package/dist/internal/init-project.js +2 -0
  201. package/dist/internal/logs-client.d.ts +5 -0
  202. package/dist/internal/logs-client.d.ts.map +1 -1
  203. package/dist/internal/logs-client.js +5 -0
  204. package/dist/internal/mcp-endpoint.js +2 -3
  205. package/dist/internal/mcp-host.d.ts +10 -0
  206. package/dist/internal/mcp-host.d.ts.map +1 -1
  207. package/dist/internal/mcp-host.js +57 -8
  208. package/dist/internal/mcp-oauth-on-demand.d.ts +68 -0
  209. package/dist/internal/mcp-oauth-on-demand.d.ts.map +1 -0
  210. package/dist/internal/mcp-oauth-on-demand.js +287 -0
  211. package/dist/internal/mcp-oauth-persist.d.ts +42 -0
  212. package/dist/internal/mcp-oauth-persist.d.ts.map +1 -0
  213. package/dist/internal/mcp-oauth-persist.js +92 -0
  214. package/dist/internal/mcp-oauth.d.ts +1 -0
  215. package/dist/internal/mcp-oauth.d.ts.map +1 -1
  216. package/dist/internal/mcp-oauth.js +10 -2
  217. package/dist/internal/null-kv-storage.d.ts +48 -0
  218. package/dist/internal/null-kv-storage.d.ts.map +1 -0
  219. package/dist/internal/null-kv-storage.js +58 -0
  220. package/dist/internal/otel/collector.d.ts.map +1 -1
  221. package/dist/internal/otel/collector.js +22 -9
  222. package/dist/internal/server.d.ts +6 -0
  223. package/dist/internal/server.d.ts.map +1 -1
  224. package/dist/internal/server.js +123 -33
  225. package/dist/internal/session-engine.d.ts +88 -3
  226. package/dist/internal/session-engine.d.ts.map +1 -1
  227. package/dist/internal/session-engine.js +538 -46
  228. package/dist/internal/session-run-log.d.ts +120 -0
  229. package/dist/internal/session-run-log.d.ts.map +1 -0
  230. package/dist/internal/session-run-log.js +359 -0
  231. package/dist/internal/sessions-client.d.ts +9 -7
  232. package/dist/internal/sessions-client.d.ts.map +1 -1
  233. package/dist/internal/sessions-client.js +3 -1
  234. package/dist/internal/storage-coordinator.d.ts +13 -0
  235. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  236. package/dist/internal/storage-coordinator.js +37 -6
  237. package/dist/internal/storage-roles.d.ts +5 -0
  238. package/dist/internal/storage-roles.d.ts.map +1 -1
  239. package/dist/internal/stream-progress.d.ts.map +1 -1
  240. package/dist/internal/stream-progress.js +10 -0
  241. package/dist/internal/tool-policy.d.ts +29 -9
  242. package/dist/internal/tool-policy.d.ts.map +1 -1
  243. package/dist/internal/tool-policy.js +24 -0
  244. package/dist/internal/trajectory.d.ts.map +1 -1
  245. package/dist/internal/trajectory.js +10 -0
  246. package/dist/internal/turn-outbox.d.ts +24 -0
  247. package/dist/internal/turn-outbox.d.ts.map +1 -0
  248. package/dist/internal/turn-outbox.js +80 -0
  249. package/dist/playground/assets/index-D7rGZNjy.css +1 -0
  250. package/dist/playground/assets/index-jzNbJENa.js +69 -0
  251. package/dist/playground/index.html +2 -2
  252. package/dist/storage-backends/cursor-hosted.d.ts +1 -1
  253. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  254. package/dist/storage-backends/cursor-hosted.js +12 -0
  255. package/dist/storage-protocol.d.ts +8 -0
  256. package/dist/storage-protocol.d.ts.map +1 -1
  257. package/dist/storage-protocol.js +8 -0
  258. package/dist/storage.d.ts +8 -0
  259. package/dist/storage.d.ts.map +1 -1
  260. package/dist/tools.d.ts +12 -2
  261. package/dist/tools.d.ts.map +1 -1
  262. package/dist/types.d.ts +88 -7
  263. package/dist/types.d.ts.map +1 -1
  264. package/docs/README.md +5 -3
  265. package/docs/deployment.md +5 -4
  266. package/docs/design/runtime-abstraction.md +1757 -0
  267. package/docs/guides/mcp-oauth.md +26 -8
  268. package/docs/guides/slack.md +93 -202
  269. package/docs/reference/agent-config.md +2 -2
  270. package/docs/reference/cli.md +32 -16
  271. package/docs/reference/connections.md +6 -3
  272. package/docs/reference/http-api.md +3 -1
  273. package/docs/reference/sessions.md +4 -2
  274. package/docs/reference/tools.md +34 -2
  275. package/docs/templates/agents-md.md +110 -0
  276. package/docs/troubleshooting.md +2 -2
  277. package/package.json +1 -1
  278. package/skills/create-agent/SKILL.md +2 -1
  279. package/skills/mcp-auth/SKILL.md +6 -3
  280. package/skills/setup-slack/SKILL.md +23 -13
  281. package/src/bin/agent-serve.ts +12 -1
  282. package/src/channels/github/github-channel.ts +17 -0
  283. package/src/channels/origin/api.ts +24 -5
  284. package/src/channels/origin/binding.ts +55 -26
  285. package/src/channels/origin/index.ts +1 -0
  286. package/src/channels/origin/origin-channel.ts +78 -10
  287. package/src/channels/origin/reactions.ts +82 -0
  288. package/src/channels/origin/types.ts +11 -0
  289. package/src/channels/slack/approvals.ts +105 -0
  290. package/src/channels/slack/cli-project.ts +267 -0
  291. package/src/channels/slack/defaults.ts +165 -74
  292. package/src/channels/slack/dispatch.ts +2 -0
  293. package/src/channels/slack/init.ts +10 -5
  294. package/src/channels/slack/interactive.ts +35 -9
  295. package/src/channels/slack/live-delivery.ts +5 -3
  296. package/src/channels/slack/manifest.ts +1 -1
  297. package/src/channels/slack/progress-delivery.ts +133 -0
  298. package/src/channels/slack/setup.ts +10 -6
  299. package/src/channels/slack/slack-channel.ts +1 -0
  300. package/src/channels/slack/tool-approval-events.ts +93 -0
  301. package/src/channels/slack/types.ts +9 -1
  302. package/src/evals/run-facts.ts +32 -0
  303. package/src/files-backends/cursor-hosted.ts +3 -2
  304. package/src/index.ts +4 -0
  305. package/src/internal/advertise-tools.ts +31 -10
  306. package/src/internal/approval-gate.ts +20 -29
  307. package/src/internal/as-of.ts +107 -0
  308. package/src/internal/chat-client.ts +19 -0
  309. package/src/internal/cli-deploy.ts +203 -13
  310. package/src/internal/cli-mcp-oauth.ts +7 -21
  311. package/src/internal/cli-slack-manual.ts +350 -18
  312. package/src/internal/cli-slack.ts +40 -84
  313. package/src/internal/cursor/account-mcp.ts +21 -0
  314. package/src/internal/cursor-agent-template.ts +1 -0
  315. package/src/internal/cursor-event-relay.ts +5 -6
  316. package/src/internal/deploy-client.ts +43 -0
  317. package/src/internal/env-file.ts +84 -0
  318. package/src/internal/framework-file-storage.ts +18 -46
  319. package/src/internal/framework-storage-selection.ts +41 -25
  320. package/src/internal/hosted-admission-adapter.ts +42 -0
  321. package/src/internal/hosted-delivery-protocol.ts +14 -2
  322. package/src/internal/hosted-delivery.ts +169 -44
  323. package/src/internal/hosted-execution-diag.ts +252 -0
  324. package/src/internal/http-channel.ts +107 -0
  325. package/src/internal/init-project.ts +2 -0
  326. package/src/internal/logs-client.ts +5 -0
  327. package/src/internal/mcp-endpoint.ts +13 -4
  328. package/src/internal/mcp-host.ts +77 -11
  329. package/src/internal/mcp-oauth-on-demand.ts +352 -0
  330. package/src/internal/mcp-oauth-persist.ts +127 -0
  331. package/src/internal/mcp-oauth.ts +17 -1
  332. package/src/internal/null-kv-storage.ts +74 -0
  333. package/src/internal/otel/collector.ts +30 -0
  334. package/src/internal/server.ts +159 -11
  335. package/src/internal/session-engine.ts +691 -57
  336. package/src/internal/session-run-log.ts +584 -0
  337. package/src/internal/sessions-client.ts +17 -8
  338. package/src/internal/storage-coordinator.ts +49 -9
  339. package/src/internal/storage-roles.ts +7 -0
  340. package/src/internal/stream-progress.ts +19 -0
  341. package/src/internal/tool-policy.ts +49 -9
  342. package/src/internal/trajectory.ts +10 -0
  343. package/src/internal/turn-outbox.ts +85 -0
  344. package/src/storage-backends/cursor-hosted.ts +13 -1
  345. package/src/storage-protocol.ts +10 -0
  346. package/src/storage.ts +12 -0
  347. package/src/tools.ts +12 -2
  348. package/src/types.ts +93 -8
  349. package/templates/agents-md/README.md +39 -0
  350. package/templates/agents-md/agent/agent.ts +8 -0
  351. package/templates/agents-md/agent/channels/github.ts +10 -0
  352. package/templates/agents-md/agent/channels/queue.ts +28 -0
  353. package/templates/agents-md/agent/channels/slack.ts +9 -0
  354. package/templates/agents-md/agent/instructions.md +39 -0
  355. package/templates/agents-md/agent/lib/collect.ts +439 -0
  356. package/templates/agents-md/agent/lib/config.ts +8 -0
  357. package/templates/agents-md/agent/lib/paths.ts +51 -0
  358. package/templates/agents-md/agent/schedules/weekly.ts +17 -0
  359. package/templates/agents-md/agent/tools/apply_agents.ts +226 -0
  360. package/templates/agents-md/evals/agents.eval.ts +135 -0
  361. package/templates/agents-md/evals/evals.config.ts +5 -0
  362. package/templates/agents-md/init.json +38 -0
  363. package/templates/agents-md/package.json +18 -0
  364. package/templates/agents-md/tsconfig.json +12 -0
  365. package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +0 -1
  366. package/dist/docs/assets/guides_slack.md.C32HsdKk.js +0 -38
  367. package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +0 -1
  368. package/dist/docs/assets/index.md.CI93Ltlb.js +0 -5
  369. package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +0 -1
  370. package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +0 -1
  371. package/dist/docs/design/agsh.md +0 -406
  372. package/dist/playground/assets/index-B1DDvBeC.css +0 -1
  373. package/dist/playground/assets/index-Cx9CclK_.js +0 -88
  374. package/docs/design/agsh.md +0 -406
  375. /package/dist/docs/assets/{deployment.md.D9msOFOW.lean.js → deployment.md.MFPKqsqI.lean.js} +0 -0
  376. /package/dist/docs/assets/{index.md.CI93Ltlb.lean.js → index.md.CVeRUOeZ.lean.js} +0 -0
  377. /package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.lean.js → reference_agent-config.md.BHeYMgme.lean.js} +0 -0
  378. /package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.lean.js → reference_connections.md.DxldvyIB.lean.js} +0 -0
  379. /package/dist/docs/assets/{reference_http-api.md.D89k1mdm.lean.js → reference_http-api.md.BEJx9XVj.lean.js} +0 -0
  380. /package/dist/docs/assets/{reference_sessions.md.D0mIh4KK.lean.js → reference_sessions.md.NxFP_CAC.lean.js} +0 -0
  381. /package/dist/docs/assets/{troubleshooting.md.Ctv3T8C2.lean.js → troubleshooting.md.DCiPBhYs.lean.js} +0 -0
@@ -8,8 +8,9 @@ description: "Authorize defineConnection({ url, oauth: true }) with agent-sdk mc
8
8
  Use host MCP OAuth when your agent talks to a remote MCP server that
9
9
  speaks OAuth, and you want credentials on the serve host (or the hosted
10
10
  engine) instead of a Cursor account connector. Local login writes tokens
11
- next to your Cursor credentials. `--store` copies them onto the
12
- deployment as secrets so prod can reconnect after a redeploy.
11
+ next to your Cursor credentials. `--store` copies those tokens onto the
12
+ deployment as secrets so prod can reconnect after a redeploy. Hosted
13
+ Connect lets the current process retry.
13
14
 
14
15
  The companion skill is
15
16
  [`skills/mcp-auth/SKILL.md`](../../skills/mcp-auth/SKILL.md).
@@ -20,8 +21,8 @@ The companion skill is
20
21
  flow (`agent-sdk mcp oauth <connection>`)
21
22
  - Keep tokens in `mcp-auth.json` under the CLI config directory, bound
22
23
  to that connection's resource URL
23
- - Upsert deployment secrets with `--store` so hosted engines seed the
24
- same tokens from env
24
+ - Upsert deployment secrets with `--store` so the next deploy seeds the
25
+ same tokens from env. Hosted Connect lets the current process retry.
25
26
  - Use `advertiseTools: true` when local turns should call the server by
26
27
  name. Host tools can still call it through `ctx.host.mcp`.
27
28
 
@@ -101,7 +102,16 @@ connection URL (tokens are bound to the resource URL).
101
102
 
102
103
  ## How do I store credentials on a hosted deployment?
103
104
 
104
- Authorize once, then push secrets to the deployment:
105
+ Authorize once. Then get the tokens onto the deployment.
106
+
107
+ On a hosted engine, finishing Connect lets the current process retry.
108
+ Self-hosted serve writes tokens locally only.
109
+
110
+ `--store` from a signed-in laptop is the reliable way to put
111
+ `MCP_OAUTH_*` on the next deploy. If `agent-sdk secrets list` is
112
+ empty, run `--store` and redeploy.
113
+
114
+ From a laptop, push secrets with the CLI:
105
115
 
106
116
  ```bash
107
117
  agent-sdk mcp oauth inventory --store
@@ -119,13 +129,21 @@ agent-sdk mcp oauth inventory --store
119
129
  | `MCP_OAUTH_<NAME>_CLIENT_ID` | dynamic client id when registration returned one |
120
130
 
121
131
  You must be signed in (`agent-sdk login`) with permission to set secrets
122
- on that slug. Secrets apply on the **next** deploy; run
123
- `agent-sdk deploy` (or wait for your usual deploy path) after `--store`.
132
+ on that slug. Secrets apply on the **next** deploy. Run
133
+ `agent-sdk deploy` after `--store`. A fresh pod sees `MCP_OAUTH_*`
134
+ only after that deploy.
124
135
 
125
136
  On the engine, when `mcp-auth.json` is empty, serve seeds the OAuth
126
137
  provider from those env vars so host MCP calls work without a browser
127
138
  on the pod.
128
139
 
140
+ These secrets are deployment-wide. Anyone who can list or set secrets
141
+ on that slug, and the hosted engine's runtime env, can use them. That
142
+ is the same blast radius as `--store`. They are not scoped to the
143
+ caller who clicked Connect. `cursorAccount: true` tokens stay on the
144
+ Cursor backend for the deployment service account and do not use
145
+ `MCP_OAUTH_*`.
146
+
129
147
  ## How do host tools call the server?
130
148
 
131
149
  ```ts
@@ -145,7 +163,7 @@ an allowlist or other deterministic gate.
145
163
  | --- | --- |
146
164
  | `must be defineConnection({ url, oauth: true })` | Add `oauth: true` on that connection, or pick the right connection name |
147
165
  | Callback never completes | Keep port `8787` free; finish the browser login on this machine |
148
- | Hosted calls unauthorized after `--store` | Confirm secrets with `agent-sdk secrets list <slug>`, then redeploy |
166
+ | Hosted calls unauthorized after Connect or `--store` | Confirm secrets with `agent-sdk secrets list <slug>`, then redeploy |
149
167
  | Tokens ignored after URL change | Expected: resource URL binding drops stale entries. Re-run `mcp oauth` |
150
168
 
151
169
  ## What's next
@@ -1,20 +1,18 @@
1
1
  ---
2
2
  title: "Slack"
3
- description: "Put the agent in Slack: a dedicated Socket Mode app via the dashboard wizard, or a manual manifest import."
3
+ description: "Run a Socket Mode Slack bot from the dashboard wizard, or import an app you own."
4
4
  ---
5
5
 
6
6
  # Slack agents
7
7
 
8
- The Slack channel puts your agent in Slack as its own Socket Mode bot.
9
- `agent-sdk slack create` opens the dashboard wizard and writes tokens
10
- to `.env.local`. To own the Slack app yourself, run
11
- `agent-sdk slack init --manual` and paste the manifests at
12
- [api.slack.com](https://api.slack.com/apps). Socket Mode has no
13
- public Request URL. Replies stream in threads, with tool "thinking" steps,
14
- suggested prompts, and opt-in approval buttons.
8
+ The Slack channel is a Socket Mode bot. The app connects out, so you
9
+ don't need a public Request URL. Mentions and DMs start a thread.
10
+ Replies stream there, with thinking steps and suggested prompts.
15
11
 
16
- The companion skill is
17
- [`skills/setup-slack/SKILL.md`](../../skills/setup-slack/SKILL.md).
12
+ Use `agent-sdk slack create` when Cursor should own the Slack app. Use
13
+ `agent-sdk slack init --manual` when you own it. Commands and flags live
14
+ in the [CLI reference](../reference/cli.md#slack). Coding agents should
15
+ follow [`skills/setup-slack/SKILL.md`](../../skills/setup-slack/SKILL.md).
18
16
 
19
17
  ## Define the channel
20
18
 
@@ -24,35 +22,23 @@ Author `agent/channels/slack.ts` with `slackChannel()` from
24
22
  ```ts
25
23
  import { slackChannel } from "@cursor/july/channels/slack";
26
24
 
27
- // Single agent: reads SLACK_BOT_TOKEN + SLACK_APP_TOKEN
28
25
  export default slackChannel();
29
-
30
- // Multi-agent serve: one Slack app (and token pair) per agent
31
- export default slackChannel({ envPrefix: "WEATHER_AGENT" });
32
- // → WEATHER_AGENT_SLACK_BOT_TOKEN + WEATHER_AGENT_SLACK_APP_TOKEN
33
26
  ```
34
27
 
35
- By default the channel connects over Socket Mode (the app connects
36
- outward, so it works from behind any firewall) and responds only to
37
- `app_mention` events and direct messages. It also refuses Slack Connect
38
- users, guests, and senders from other workspaces. Threads bind to
39
- sessions with `continuationToken = channelId:threadTs`, so a thread is
40
- one durable conversation. Replies stream (`chat.startStream` /
41
- `appendStream` / `stopStream`) with a plain-message fallback, a rotating
42
- status shows while the agent works, and the pack sets thread titles and
43
- suggested prompts. When a Slack API is unavailable (`method_not_found`,
44
- `missing_scope`), the pack degrades to `postMessage` instead of failing.
45
-
46
- Missing tokens leave the channel idle (`channel idle … missing
47
- credentials`) rather than failing `serve`. That's useful when you mount
48
- many agents and only some have Slack apps.
28
+ `slackChannel()` reads `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`. Pass
29
+ `envPrefix: "WEATHER_AGENT"` to read `WEATHER_AGENT_SLACK_BOT_TOKEN`
30
+ and `WEATHER_AGENT_SLACK_APP_TOKEN` instead. Use a prefix when one
31
+ host serves several Slack bots.
32
+
33
+ A thread is one conversation. The bot answers mentions and DMs. It
34
+ refuses Slack Connect users, guests, and people from other workspaces.
35
+ Missing tokens leave this channel idle. The rest of `serve` still
36
+ starts.
49
37
 
50
38
  ## Control who can message the agent
51
39
 
52
- External senders are blocked by default. Slack Connect users, guests, and
53
- people whose home workspace is not the install team never reach the
54
- handler. Set `blockExternals: false` only when the agent should serve
55
- people outside your org:
40
+ External senders are blocked. Set `blockExternals: false` only when
41
+ people outside your org should reach the agent:
56
42
 
57
43
  ```ts
58
44
  export default slackChannel({
@@ -60,9 +46,8 @@ export default slackChannel({
60
46
  });
61
47
  ```
62
48
 
63
- Sessions are thread-scoped by default, so anyone in the thread can
64
- continue. Restrict follow-ups to the person who started the session with
65
- `respondTo: "author"`:
49
+ Anyone in the thread can continue it. Restrict follow-ups to the person
50
+ who started the session with `respondTo: "author"`:
66
51
 
67
52
  ```ts
68
53
  export default slackChannel({
@@ -72,234 +57,140 @@ export default slackChannel({
72
57
 
73
58
  ## Set it up
74
59
 
75
- For a dedicated Socket Mode bot, run `agent-sdk slack create`. The CLI
76
- opens the signed-in Cursor dashboard wizard. Slack consent, bot name,
77
- and admin-approval wait happen there. Tokens are stored as deployment
78
- secrets and written to `.env.local`. They are never shown. Do not paste
79
- a manifest at [api.slack.com](https://api.slack.com/apps) unless you
80
- are on the [manual setup](#manual-setup) path.
81
-
82
- Bots that already have tokens in `.env.local` keep working. Skip the
83
- wizard unless you want a Cursor-managed app.
60
+ `slack create` opens the Cursor dashboard wizard. Finish Slack consent
61
+ and the bot name there. The CLI writes tokens to `.env.local` and never
62
+ prints them. Skip the wizard if those tokens are already set, unless
63
+ you want a Cursor-managed app.
84
64
 
85
65
  ### Provision with the CLI
86
66
 
87
67
  ```bash
88
- agent-sdk slack create --dir . # dev app (default)
89
- agent-sdk slack create --dir . --prod # prod app
68
+ agent-sdk slack create --dir .
69
+ agent-sdk slack create --dir . --prod
90
70
  ```
91
71
 
92
- `slack create` needs a signed-in host (`agent-sdk login` or
93
- `CURSOR_API_KEY`). It scaffolds `agent/channels/slack.ts` when the file
94
- is missing, opens the dashboard wizard, and waits. Finish **Add Slack
95
- to this agent** in the browser as the same Cursor account. The CLI
96
- writes `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` into
97
- `<dir>/.env.local`, then runs `doctor`. Serve and smoke it as described
98
- [below](#wire-the-env-and-verify).
99
-
100
- If Slack needs a workspace admin to approve the app, keep the CLI
101
- running. Managed install does not file the request. Open Slack's
102
- **Request approval** page (the CLI prints the link; the same URL is
103
- **Send a reminder** after you submit). After an admin approves, click
72
+ Sign in first (`agent-sdk login` or `CURSOR_API_KEY`). Finish **Add
73
+ Slack to this agent** as the same Cursor account. Then run
74
+ `agent-sdk slack doctor --prefix MY_AGENT` and serve:
75
+
76
+ ```bash
77
+ agent-sdk serve --dir . --dev
78
+ ```
79
+
80
+ Invite the bot and mention it, or DM it. Expect a Thinking status,
81
+ then a threaded streaming reply.
82
+
83
+ If Slack needs a workspace admin, keep the CLI running. Open the
84
+ **Request approval** link it prints. After an admin approves, click
104
85
  **Retry** in the wizard.
105
86
 
106
- Useful companions: `--name` / `--icon` / `--channel-posts` prefill the
107
- wizard. `--slack-team T0123ABCD` picks a workspace when several are
108
- connected. A second `slack create` for the same agent and env overwrites
109
- that Slack app. It keeps the Slack app id and replaces the manifest and
110
- tokens. `agent-sdk slack destroy` deletes the provisioned app.
111
- `agent-sdk slack icon <source>` updates the icon later.
87
+ `slack destroy` deletes the Cursor-managed app. `slack icon` updates
88
+ its icon. A second `slack create` for the same agent and environment
89
+ replaces that app's manifest and tokens.
112
90
 
113
91
  ### Provision from the dashboard
114
92
 
115
93
  The same wizard is on [Deployed Agents](https://cursor.com/dashboard).
116
- Open **Integrations** on an agent and click **Add Slack to this agent**,
117
- or follow the URL `slack create` printed.
94
+ Open **Integrations** and click **Add Slack to this agent**.
118
95
 
119
- A first-run agent that has no hosted engine yet shows **Not deployed
120
- yet**. Local `agent-sdk serve` works from `.env.local`. The next
121
- **Deploy** injects the stored secrets; there is no Slack-only Redeploy.
96
+ Local `agent-sdk serve` reads `.env.local`. The next deploy injects the
97
+ stored secrets.
122
98
 
123
- If Slack needs admin approval, the wizard waits. Click **Request
124
- approval** to file the request in Slack (that same page later sends a
125
- reminder). After an admin approves, click **Retry**.
99
+ If Slack needs admin approval, click **Request approval**, then
100
+ **Retry** after an admin approves.
126
101
 
127
- The app row's menu covers later care: rename, set an icon, rotate
128
- tokens, remove the app, or disconnect the workspace.
102
+ The app row's menu covers rename, icon, token rotation, removal, and
103
+ workspace disconnect.
129
104
 
130
- ### Wire the env and verify
105
+ ### Create your own Slack app
131
106
 
132
- `agent-sdk slack create` already wrote the tokens to `.env.local`, so
133
- after provisioning skip straight to `doctor`. `serve` / `dev` /
134
- `slack doctor` load that file (real environment variables always win).
107
+ `slack init --manual` is for an app you own. It writes the channel file
108
+ and Slack manifests. When Slack CLI (`~/.slack/bin/slack`) is logged
109
+ in, it installs the app. When it isn't, install the app yourself.
135
110
 
136
111
  ```bash
137
- agent-sdk slack doctor --prefix MY_AGENT
138
- ```
139
-
140
- Proceed when `app_token`, `connections_open`, `bot_token`, and
141
- `auth_test` are all green. Then serve and smoke it:
142
-
143
- ```bash
144
- agent-sdk serve --dir . --dev
145
- # expect: [agent-sdk/slack] Socket Mode connected
112
+ agent-sdk slack init --manual --dir . --name "My Agent"
146
113
  ```
147
114
 
148
- Invite the bot to a channel and @mention it (or DM it). Expect the
149
- Thinking… status, then a threaded streaming reply, with correlated
150
- server logs (`inbound kind=app_mention`, `session start`,
151
- `reply delivered via stream|postMessage`).
152
-
153
- ### Manual setup
154
-
155
- `slack init --manual` is for a Slack app you own at api.slack.com. You
156
- paste the generated manifests and mint tokens yourself. Use this when
157
- you want an unmanaged app, or when the dashboard wizard is not an
158
- option.
115
+ Install Slack CLI if you need it:
159
116
 
160
117
  ```bash
161
- agent-sdk slack init --manual --dir . --name "My Agent"
118
+ curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
162
119
  ```
163
120
 
164
- That writes `agent/channels/slack.ts`, Slack manifests under the
165
- project state directory, `env.example`, and `setup-status.json`.
166
- `--no-prefix` uses shared `SLACK_*` variables on
167
- a single-agent host. `--prefix CUSTOM` overrides the directory-derived
168
- prefix. `--channel-posts` subscribes the manifests to channel-post
169
- events.
121
+ Log in with `slack login --no-prompt`. In Slack, send
122
+ `/slackauthticket <ticket>`, then
123
+ `slack login --ticket <ticket> --challenge <code>`. Install the
124
+ workspace app with `slack app install`. Create a separate production
125
+ app the same way.
170
126
 
171
- `slack manifest --env both` regenerates the JSON files without
172
- touching the channel file.
127
+ Or paste `.slack/manifest.dev.json` at
128
+ [api.slack.com/apps](https://api.slack.com/apps) (**Create New App** →
129
+ **From a manifest**). Repeat with `.slack/manifest.prod.json`. Dev and
130
+ prod are separate Slack apps.
173
131
 
174
- #### Create the apps
132
+ Then put a bot token (`xoxb-...`) and an app-level token with
133
+ `connections:write` (`xapp-...`) in `.env.local`. Use the names
134
+ `slack init --manual` printed. Run `slack doctor` and serve as above.
175
135
 
176
- This phase needs someone with permission to create Slack apps.
177
-
178
- 1. Open [api.slack.com/apps](https://api.slack.com/apps) → **Create New
179
- App** → **From a manifest**.
180
- 2. Paste `manifest.dev.json` and create the dev app.
181
- 3. Repeat with `manifest.prod.json`. Dev and prod are separate Slack
182
- apps with separate tokens.
183
-
184
- #### Install and mint tokens
185
-
186
- For each app: **Install to Workspace** and copy the Bot User OAuth Token
187
- (`xoxb-…`). Then under **Basic Information → App-Level Tokens** create a
188
- token with scope `connections:write` and copy it (`xapp-…`).
189
-
190
- Put the pair in `.env.local` using the names from `env.example`, then
191
- run `slack doctor` and serve as [above](#wire-the-env-and-verify).
136
+ Serve this app with Agent SDK. Do not run `slack deploy`.
192
137
 
193
138
  ## Choose when the agent engages
194
139
 
195
- Mentions and DMs are on by default. Watching channels means dispatching
196
- on new posts without a mention. That's an explicit opt-in:
140
+ Mentions and DMs are on. Watching channel posts without a mention is
141
+ opt-in:
197
142
 
198
143
  ```ts
199
144
  export default slackChannel({
200
145
  envPrefix: "TRIAGE",
201
146
  engagement: {
202
- // mentions / directMessages default to true
203
147
  channelPosts: {
204
- allow: ["#triage-alerts"], // use ["*"] for every joined channel
205
- posts: "top-level", // default: thread replies never dispatch
206
- debounceMs: 15_000, // optional: let rapid edits settle
207
- includeBotPosts: false, // default: bot-authored posts never dispatch
148
+ allow: ["#triage-alerts"],
149
+ posts: "top-level",
150
+ debounceMs: 15_000,
208
151
  },
209
152
  },
210
- onChannelPost: async (ctx, message) => {
211
- // same contract as onAppMention: return null to skip
153
+ onChannelPost: async (_ctx, message) => {
212
154
  return message.markdown.length > 20 ? {} : null;
213
155
  },
214
156
  });
215
157
  ```
216
158
 
217
- Channel watching needs the `message.channels` / `message.groups` events
218
- on the Slack app. Pass `--channel-posts` on `slack create` or
219
- `slack init --manual`. The bot must also be a member of each watched
220
- channel.
221
-
222
- Set `allow: ["*"]` to watch every channel the bot has joined.
159
+ Pass `--channel-posts` on `slack create` or `slack init --manual` so
160
+ the Slack app receives those events. The bot must be in each watched
161
+ channel. `allow: ["*"]` watches every joined channel.
223
162
 
224
- Set `includeBotPosts: true` when the posts worth watching come from bots:
225
- alert feeds, webhook integrations, or other agents posting notes. The
226
- watching app's own posts stay dropped either way, matched by the `bot_id`
227
- and bot user id from `auth.test`, so an agent can never dispatch on its
228
- own replies. Use this for a bot-fed alerts channel.
163
+ Set `includeBotPosts: true` for alert feeds and other bots. This app
164
+ never wakes on its own posts.
229
165
 
230
166
  ## Prepare work on the host
231
167
 
232
168
  Mention and DM handlers may return a prepared `message`,
233
- `workspaceFiles`, or `cloud` block. It's the same host-prep pattern as
169
+ `workspaceFiles`, or `cloud` block. Use the same host-prep pattern as
234
170
  [custom channels](./webhooks.md#prepare-on-the-host-then-hand-off).
235
- PR agents use it: extract a PR URL from the mention text and run the
236
- same host path as the HTTP channel.
237
171
 
238
- Slack file uploads are attached automatically. Images become vision input.
172
+ Slack file uploads attach automatically. Images become vision input.
239
173
  Supported documents become workspace files for the turn.
240
174
 
241
175
  ## Add approval buttons
242
176
 
243
- Tools with `needsApproval` park until a person decides. Route that
244
- through Slack with one flag:
177
+ Tools with `needsApproval` park until a person decides. Post those
178
+ decisions in Slack with one flag:
245
179
 
246
180
  ```ts
247
181
  export default slackChannel({
248
- toolApprovals: true, // posts Block Kit Approve/Deny cards + routes clicks
182
+ toolApprovals: true,
249
183
  });
250
184
  ```
251
185
 
252
- Approval cards need interactivity on the Slack app. Recreate with
253
- `slack create` if clicks do nothing. Composing events by hand: spread
254
- `buildToolApprovalEvents({ credentials })` into `events` and set
255
- `interactivity: true` on the channel so Socket Mode routes the clicks.
256
-
257
- Cards show redacted, truncated arguments (Block Kit size limits);
258
- execution still uses the full validated input, so review sensitive tools
259
- in the playground when the arguments may exceed the card. Approvals
260
- exist for `execution: "server"` tools on the local runtime only, and
261
- parked calls do not survive a host restart. The full lifecycle is in
186
+ The Slack app needs interactivity. Recreate it with `slack create` if
187
+ clicks do nothing. Cards show redacted, truncated arguments. Execution
188
+ still uses the full input, so review sensitive tools in the playground
189
+ when the card may hide fields. The lifecycle is in
262
190
  [Human-in-the-loop](./human-in-the-loop.md).
263
191
 
264
192
  ## Run several agents on one host
265
193
 
266
- One Slack app and token pair per agent. Never share a pair across
267
- agents in the same process. `envPrefix` keeps them apart
268
- (`WEATHER_AGENT_SLACK_*`, `TRIAGE_SLACK_*`, …), and agents without tokens mount
269
- with their Slack channel idle while everything else serves normally.
270
-
271
- ## Keep the channel healthy
272
-
273
- Two habits matter most.
274
-
275
- - Don't `await` long work inside Slack dispatch handlers. The pack
276
- dispatches through `waitUntil` and streams as the turn progresses.
277
- - In `--dev` (loopback) or `--allow-anonymous` (trusted shared host), the
278
- playground can list and stream Slack sessions and resolve their parked
279
- approvals (the audit trail records the HTTP caller). Bearer-auth hosts
280
- stay strict: Slack approvals must come from Slack interactivity or a
281
- matching principal.
282
-
283
- ## CLI reference
284
-
285
- The `slack` subcommands cover setup end to end.
286
-
287
- ```bash
288
- agent-sdk slack setup # printed setup guide
289
- agent-sdk slack create --dir . # dashboard wizard (dev app)
290
- agent-sdk slack create --dir . --prod # prod app
291
- agent-sdk slack destroy --dir . # delete the provisioned app
292
- agent-sdk slack icon ./icon.png --dir . # set the provisioned app's icon
293
- agent-sdk slack init --manual --dir . # manifests to paste at api.slack.com
294
- agent-sdk slack manifest --env both # regenerate those JSON files
295
- agent-sdk slack doctor --prefix MY_AGENT # token / connectivity checks
296
- ```
297
-
298
- ## What's next
299
-
300
- Continue with these pages:
301
-
302
- - [Human-in-the-loop](./human-in-the-loop.md): the approval lifecycle
303
- behind `toolApprovals`
304
- - [Webhooks and custom channels](./webhooks.md): the mechanism this
305
- pack is built on
194
+ Give each agent its own Slack app and token pair. Set `envPrefix` so
195
+ the names don't collide (`WEATHER_AGENT_SLACK_*`, `TRIAGE_SLACK_*`).
196
+ Agents without tokens stay idle. The others still serve.
@@ -184,8 +184,8 @@ When every slot is busy, newly admitted turns queue FIFO instead of
184
184
  failing: the stream records a durable `turn.queued` event with the
185
185
  queue position, `GET /v1/sessions` reports `queued: true`, and each
186
186
  queued turn starts as soon as a slot frees. A queued turn still counts
187
- as running for busy semantics: follow-ups preempt it, and direct tool
188
- calls get `409 session_busy`. Omit for unlimited.
187
+ as running for busy semantics: follow-ups preempt it, and direct
188
+ write-effect tool calls get `409 session_busy`. Omit for unlimited.
189
189
 
190
190
  ```ts
191
191
  export default defineAgent({
@@ -342,8 +342,9 @@ the value before execution. A local call needs no inference credential.
342
342
  A hosted call still needs Cursor credentials to reach the deployment.
343
343
 
344
344
  `--session` runs the tool inside an existing session and records it on
345
- the event stream. If a model turn is active or pending, the server
346
- returns `session_busy`; retry after the turn finishes. The command
345
+ the event stream. If a model turn is active or pending, a read-effect
346
+ tool runs alongside it and a write-effect tool gets `session_busy`;
347
+ retry after the turn finishes. The command
347
348
  prints the server's JSON response and exits non-zero unless the HTTP
348
349
  response succeeds with `ok: true`. See
349
350
  [Tools](./tools.md#call-a-tool-without-a-model-turn).
@@ -415,6 +416,7 @@ non-zero when the reconstructed trajectory failed.
415
416
  agent-sdk init ./my-agent # scaffold package.json, tsconfig.json, agent/ + a demo tool
416
417
  agent-sdk init ./my-demo --template demo # record a PR walkthrough
417
418
  agent-sdk init ./code-wiki --template code-wiki # keep wiki pages current after merge
419
+ agent-sdk init ./agents-md --template agents-md # keep AGENTS.md current from last week's PRs and Slack
418
420
  agent-sdk init ./my-reviewer --template security-reviewer # review PRs for security bugs
419
421
  agent-sdk init ./security-help --template security-help # answer security questions in Slack
420
422
  agent-sdk init ./my-triage --template triage-linear # comment on Linear issues
@@ -432,8 +434,9 @@ agent-sdk init # no directory: print the setup guide
432
434
  `@cursor/july` resolves for `dev` and `run`.
433
435
 
434
436
  Templates may ship `init.json`. On a TTY, `init` asks those questions
435
- before writing files. `code-wiki`, `pr-autofixer`, and `security-help`
436
- ask for GitHub repos. Repeat
437
+ before writing files. `code-wiki`, `pr-autofixer`, `security-help`, and
438
+ `agents-md` ask for GitHub repos. `agents-md` also asks for Slack
439
+ channels. Repeat
437
440
  `--var id=value` to answer without a prompt.
438
441
  `--json` and non-TTY hosts skip the interview unless `--var` is set.
439
442
 
@@ -591,7 +594,8 @@ commands with an explicit `--json` flag skip this automatic check.
591
594
  agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
592
595
  [--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]
593
596
  [--cursor-events-repo owner/name]...
594
- [--allow-domain <domain>]... [--no-wait] [--json]
597
+ [--allow-domain <domain>]...
598
+ [--no-wait] [--json]
595
599
  ```
596
600
 
597
601
  Managed hosting requires team-admin permission and the team's
@@ -744,6 +748,8 @@ URL connections run a browser PKCE flow. Tokens are written to
744
748
  `mcp-auth.json` under the CLI config directory (override with
745
749
  `AGENT_SERVE_CONFIG_DIR`). Pass `--store` to upsert matching
746
750
  `MCP_OAUTH_<CONNECTION>_*` secrets on the hosted deployment.
751
+ `--store` is the path for the next deploy. Hosted Connect lets the
752
+ current process retry.
747
753
 
748
754
  Cursor-account connections authorize the hosted deployment's service
749
755
  account through the Cursor backend's connector consent flow. Those
@@ -822,6 +828,7 @@ agent-sdk slack icon <https-url-or-file> [--dir <path>] [--prod]
822
828
  [--slack-team <T…>] [--team <id>] [--json]
823
829
  agent-sdk slack init --manual [--dir <path>] [--name <name>]
824
830
  [--prefix <prefix> | --no-prefix] [--channel-posts]
831
+ [--install | --no-install] [--slack-team <T…>] [--prod]
825
832
  agent-sdk slack manifest [--dir <path>] [--name <name>]
826
833
  [--env dev|prod|both] [--channel-posts] [--print]
827
834
  agent-sdk slack doctor [--dir <path>] [--prefix <prefix> | --no-prefix] [--json]
@@ -850,17 +857,26 @@ a local png, jpg, or gif file of at most 512KB.
850
857
 
851
858
  `slack init` without `--manual` exits non-zero and writes no files. Use
852
859
  `slack create` for the dashboard wizard. `slack init --manual` writes
853
- the channel file, development and production manifests, `env.example`,
854
- and setup status under the project. You paste those manifests at
855
- api.slack.com. The command refuses to overwrite a target file. If a
856
- collision occurs, it exits non-zero; files created earlier in the run
857
- remain. The token prefix defaults to the directory basename normalized
858
- to uppercase snake case. Explicit `--prefix` values use the same
859
- normalization. For example, `pr-approver` becomes
860
- `PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix` uses shared
861
- `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`. `--channel-posts` subscribes
862
- the manifests to channel-post events. The command always prints a JSON
863
- summary.
860
+ the channel file, development and production manifests, a Slack CLI
861
+ `.slack/` project (hook + manifests, committed with the repo). When
862
+ Slack CLI is logged in, it installs the app. Otherwise `next` asks
863
+ you to install it. `--install` requires that install. `--no-install`
864
+ skips it. `--prod` selects the deployed app.
865
+ `--slack-team` picks the workspace. Slack CLI keeps install tokens in
866
+ that process; copy `xoxb` and mint `xapp` (`connections:write`) into
867
+ `.env.local`. Tokens that appear in `.env` during that install are
868
+ copied onto the prefixed names. Paste `.slack/manifest.dev.json` at
869
+ api.slack.com when the Slack CLI is missing. Do not run
870
+ `slack deploy`. The command refuses to overwrite the channel file.
871
+ It updates the Slack CLI hook and manifests when `.slack/` already
872
+ exists. If a collision occurs, it exits non-zero; files created
873
+ earlier in the run remain. The token prefix defaults to the directory
874
+ basename normalized to uppercase snake case.
875
+ Explicit `--prefix` values use the same normalization. For example,
876
+ `pr-approver` becomes `PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix`
877
+ uses shared `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`.
878
+ `--channel-posts` subscribes the manifests to channel-post events.
879
+ The command always prints a JSON summary.
864
880
 
865
881
  `slack manifest` regenerates selected manifest files. `--env` defaults
866
882
  to `both`, and `--name` defaults to the directory name. `--print` writes
@@ -35,8 +35,10 @@ Tokens come from env vars. Never hardcode them in the file.
35
35
  ## Host MCP OAuth
36
36
 
37
37
  For servers that speak OAuth, set `oauth: true` and authorize with the
38
- CLI. Tokens live in `mcp-auth.json` under the CLI config directory. `--store`
39
- copies them onto the hosted deployment as `MCP_OAUTH_<NAME>_*` secrets.
38
+ CLI or mid-run Connect. Tokens live in `mcp-auth.json` under the CLI
39
+ config directory. `--store` copies them onto the deployment as
40
+ `MCP_OAUTH_<NAME>_*` secrets. Hosted Connect lets the current
41
+ process retry.
40
42
 
41
43
  ```ts
42
44
  export default defineConnection({
@@ -48,6 +50,7 @@ export default defineConnection({
48
50
  ```bash
49
51
  agent-sdk mcp oauth inventory # browser PKCE → local mcp-auth.json
50
52
  agent-sdk mcp oauth inventory --store # also upsert deployment secrets
53
+ # Hosted Connect retries this process. Self-hosted stays file-only.
51
54
  ```
52
55
 
53
56
  Full walkthrough: [Host MCP OAuth](../guides/mcp-oauth.md). Companion
@@ -266,7 +269,7 @@ lazily on first use.
266
269
 
267
270
  Continue with these pages:
268
271
 
269
- - [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, `--store`
272
+ - [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, Connect, `--store`
270
273
  - [Agent-to-agent](../guides/agent-to-agent.md): peers in depth
271
274
  - [Tools](./tools.md): authored tools that wrap MCP connections
272
275
  - [Webhooks](../guides/webhooks.md): calling MCP connections from handlers
@@ -53,6 +53,7 @@ and `playgroundUrl` deep-links the session in the playground.
53
53
  | `message` | Required user message |
54
54
  | `title` | Session title |
55
55
  | `dryRun` | Run read tools and stub write tools |
56
+ | `asOf` | ISO-8601 instant with a timezone, frozen at create; the prompt states it, `ctx.now()` returns it, and tools declaring `timeArgs` refuse calls not bounded at or before it. `400` when unusable |
56
57
  | `workspaceFiles` | UTF-8 files written into the session workspace |
57
58
  | `cloud` | Per-session cloud options merged over the agent defaults |
58
59
 
@@ -134,7 +135,8 @@ curl -X POST http://127.0.0.1:3000/<slug>/v1/tools/inspect_pr \
134
135
  It runs an authored server tool in-process: schema-validated, no model
135
136
  turn. An optional `"sessionId"` in the body runs it inside an existing
136
137
  session and records it on that session's stream (`409 session_busy`
137
- while a turn runs). Agent-execution tools are rejected with `400`, and
138
+ for a write-effect call while a turn runs; reads run alongside the
139
+ turn). Agent-execution tools are rejected with `400`, and
138
140
  unknown tools with `404` and the list of available names. For the
139
141
  semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
140
142