@grok/agent-sdk 0.0.0-stage → 0.2.27

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 (1966) hide show
  1. package/AGENTS.md +336 -0
  2. package/CHANGELOG.md +3 -0
  3. package/LICENSE.md +3 -0
  4. package/README.md +106 -2
  5. package/dist/artifacts.d.ts +37 -0
  6. package/dist/artifacts.d.ts.map +1 -0
  7. package/dist/artifacts.js +52 -0
  8. package/dist/bin/agent-sdk.js +2 -0
  9. package/dist/bin/agent-serve.d.ts +20 -0
  10. package/dist/bin/agent-serve.d.ts.map +1 -0
  11. package/dist/bin/agent-serve.js +1703 -0
  12. package/dist/channels/bitbucket/api.d.ts +217 -0
  13. package/dist/channels/bitbucket/api.d.ts.map +1 -0
  14. package/dist/channels/bitbucket/api.js +648 -0
  15. package/dist/channels/bitbucket/binding.d.ts +75 -0
  16. package/dist/channels/bitbucket/binding.d.ts.map +1 -0
  17. package/dist/channels/bitbucket/binding.js +313 -0
  18. package/dist/channels/bitbucket/bitbucket-channel.d.ts +47 -0
  19. package/dist/channels/bitbucket/bitbucket-channel.d.ts.map +1 -0
  20. package/dist/channels/bitbucket/bitbucket-channel.js +173 -0
  21. package/dist/channels/bitbucket/bitbucket-webhook.d.ts +73 -0
  22. package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -0
  23. package/dist/channels/bitbucket/bitbucket-webhook.js +399 -0
  24. package/dist/channels/bitbucket/checks.d.ts +67 -0
  25. package/dist/channels/bitbucket/checks.d.ts.map +1 -0
  26. package/dist/channels/bitbucket/checks.js +90 -0
  27. package/dist/channels/bitbucket/cursor-account.d.ts +37 -0
  28. package/dist/channels/bitbucket/cursor-account.d.ts.map +1 -0
  29. package/dist/channels/bitbucket/cursor-account.js +65 -0
  30. package/dist/channels/bitbucket/defaults.d.ts +26 -0
  31. package/dist/channels/bitbucket/defaults.d.ts.map +1 -0
  32. package/dist/channels/bitbucket/defaults.js +77 -0
  33. package/dist/channels/bitbucket/events.d.ts +22 -0
  34. package/dist/channels/bitbucket/events.d.ts.map +1 -0
  35. package/dist/channels/bitbucket/events.js +59 -0
  36. package/dist/channels/bitbucket/index.d.ts +38 -0
  37. package/dist/channels/bitbucket/index.d.ts.map +1 -0
  38. package/dist/channels/bitbucket/index.js +37 -0
  39. package/dist/channels/bitbucket/replay.d.ts +63 -0
  40. package/dist/channels/bitbucket/replay.d.ts.map +1 -0
  41. package/dist/channels/bitbucket/replay.js +326 -0
  42. package/dist/channels/bitbucket/state.d.ts +35 -0
  43. package/dist/channels/bitbucket/state.d.ts.map +1 -0
  44. package/dist/channels/bitbucket/state.js +30 -0
  45. package/dist/channels/bitbucket/types.d.ts +236 -0
  46. package/dist/channels/bitbucket/types.d.ts.map +1 -0
  47. package/dist/channels/bitbucket/types.js +1 -0
  48. package/dist/channels/change-monitors/change-monitors-channel.d.ts +5 -0
  49. package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -0
  50. package/dist/channels/change-monitors/change-monitors-channel.js +45 -0
  51. package/dist/channels/change-monitors/index.d.ts +4 -0
  52. package/dist/channels/change-monitors/index.d.ts.map +1 -0
  53. package/dist/channels/change-monitors/index.js +2 -0
  54. package/dist/channels/change-monitors/types.d.ts +42 -0
  55. package/dist/channels/change-monitors/types.d.ts.map +1 -0
  56. package/dist/channels/change-monitors/types.js +1 -0
  57. package/dist/channels/checks.d.ts +121 -0
  58. package/dist/channels/checks.d.ts.map +1 -0
  59. package/dist/channels/checks.js +76 -0
  60. package/dist/channels/deployments/deployments-channel.d.ts +95 -0
  61. package/dist/channels/deployments/deployments-channel.d.ts.map +1 -0
  62. package/dist/channels/deployments/deployments-channel.js +188 -0
  63. package/dist/channels/deployments/index.d.ts +25 -0
  64. package/dist/channels/deployments/index.d.ts.map +1 -0
  65. package/dist/channels/deployments/index.js +24 -0
  66. package/dist/channels/deployments/types.d.ts +83 -0
  67. package/dist/channels/deployments/types.d.ts.map +1 -0
  68. package/dist/channels/deployments/types.js +7 -0
  69. package/dist/channels/github/api.d.ts +133 -0
  70. package/dist/channels/github/api.d.ts.map +1 -0
  71. package/dist/channels/github/api.js +373 -0
  72. package/dist/channels/github/auth.d.ts +71 -0
  73. package/dist/channels/github/auth.d.ts.map +1 -0
  74. package/dist/channels/github/auth.js +247 -0
  75. package/dist/channels/github/binding.d.ts +86 -0
  76. package/dist/channels/github/binding.d.ts.map +1 -0
  77. package/dist/channels/github/binding.js +123 -0
  78. package/dist/channels/github/checks.d.ts +64 -0
  79. package/dist/channels/github/checks.d.ts.map +1 -0
  80. package/dist/channels/github/checks.js +93 -0
  81. package/dist/channels/github/cursor-account.d.ts +109 -0
  82. package/dist/channels/github/cursor-account.d.ts.map +1 -0
  83. package/dist/channels/github/cursor-account.js +206 -0
  84. package/dist/channels/github/defaults.d.ts +23 -0
  85. package/dist/channels/github/defaults.d.ts.map +1 -0
  86. package/dist/channels/github/defaults.js +132 -0
  87. package/dist/channels/github/events.d.ts +18 -0
  88. package/dist/channels/github/events.d.ts.map +1 -0
  89. package/dist/channels/github/events.js +56 -0
  90. package/dist/channels/github/forward.d.ts +139 -0
  91. package/dist/channels/github/forward.d.ts.map +1 -0
  92. package/dist/channels/github/forward.js +263 -0
  93. package/dist/channels/github/github-channel.d.ts +187 -0
  94. package/dist/channels/github/github-channel.d.ts.map +1 -0
  95. package/dist/channels/github/github-channel.js +2089 -0
  96. package/dist/channels/github/index.d.ts +64 -0
  97. package/dist/channels/github/index.d.ts.map +1 -0
  98. package/dist/channels/github/index.js +52 -0
  99. package/dist/channels/github/progress.d.ts +84 -0
  100. package/dist/channels/github/progress.d.ts.map +1 -0
  101. package/dist/channels/github/progress.js +235 -0
  102. package/dist/channels/github/replay.d.ts +115 -0
  103. package/dist/channels/github/replay.d.ts.map +1 -0
  104. package/dist/channels/github/replay.js +269 -0
  105. package/dist/channels/github/state.d.ts +47 -0
  106. package/dist/channels/github/state.d.ts.map +1 -0
  107. package/dist/channels/github/state.js +77 -0
  108. package/dist/channels/github/types.d.ts +515 -0
  109. package/dist/channels/github/types.d.ts.map +1 -0
  110. package/dist/channels/github/types.js +1 -0
  111. package/dist/channels/gitlab/api.d.ts +118 -0
  112. package/dist/channels/gitlab/api.d.ts.map +1 -0
  113. package/dist/channels/gitlab/api.js +220 -0
  114. package/dist/channels/gitlab/binding.d.ts +63 -0
  115. package/dist/channels/gitlab/binding.d.ts.map +1 -0
  116. package/dist/channels/gitlab/binding.js +166 -0
  117. package/dist/channels/gitlab/checks.d.ts +110 -0
  118. package/dist/channels/gitlab/checks.d.ts.map +1 -0
  119. package/dist/channels/gitlab/checks.js +121 -0
  120. package/dist/channels/gitlab/cursor-account.d.ts +36 -0
  121. package/dist/channels/gitlab/cursor-account.d.ts.map +1 -0
  122. package/dist/channels/gitlab/cursor-account.js +64 -0
  123. package/dist/channels/gitlab/defaults.d.ts +25 -0
  124. package/dist/channels/gitlab/defaults.d.ts.map +1 -0
  125. package/dist/channels/gitlab/defaults.js +61 -0
  126. package/dist/channels/gitlab/events.d.ts +12 -0
  127. package/dist/channels/gitlab/events.d.ts.map +1 -0
  128. package/dist/channels/gitlab/events.js +26 -0
  129. package/dist/channels/gitlab/gitlab-channel.d.ts +48 -0
  130. package/dist/channels/gitlab/gitlab-channel.d.ts.map +1 -0
  131. package/dist/channels/gitlab/gitlab-channel.js +173 -0
  132. package/dist/channels/gitlab/gitlab-webhook.d.ts +54 -0
  133. package/dist/channels/gitlab/gitlab-webhook.d.ts.map +1 -0
  134. package/dist/channels/gitlab/gitlab-webhook.js +421 -0
  135. package/dist/channels/gitlab/index.d.ts +35 -0
  136. package/dist/channels/gitlab/index.d.ts.map +1 -0
  137. package/dist/channels/gitlab/index.js +34 -0
  138. package/dist/channels/gitlab/replay.d.ts +105 -0
  139. package/dist/channels/gitlab/replay.d.ts.map +1 -0
  140. package/dist/channels/gitlab/replay.js +222 -0
  141. package/dist/channels/gitlab/state.d.ts +33 -0
  142. package/dist/channels/gitlab/state.d.ts.map +1 -0
  143. package/dist/channels/gitlab/state.js +31 -0
  144. package/dist/channels/gitlab/types.d.ts +222 -0
  145. package/dist/channels/gitlab/types.d.ts.map +1 -0
  146. package/dist/channels/gitlab/types.js +1 -0
  147. package/dist/channels/issues/index.d.ts +4 -0
  148. package/dist/channels/issues/index.d.ts.map +1 -0
  149. package/dist/channels/issues/index.js +2 -0
  150. package/dist/channels/issues/issues-channel.d.ts +5 -0
  151. package/dist/channels/issues/issues-channel.d.ts.map +1 -0
  152. package/dist/channels/issues/issues-channel.js +35 -0
  153. package/dist/channels/issues/types.d.ts +33 -0
  154. package/dist/channels/issues/types.d.ts.map +1 -0
  155. package/dist/channels/issues/types.js +1 -0
  156. package/dist/channels/origin/api.d.ts +157 -0
  157. package/dist/channels/origin/api.d.ts.map +1 -0
  158. package/dist/channels/origin/api.js +363 -0
  159. package/dist/channels/origin/binding.d.ts +57 -0
  160. package/dist/channels/origin/binding.d.ts.map +1 -0
  161. package/dist/channels/origin/binding.js +56 -0
  162. package/dist/channels/origin/checks.d.ts +119 -0
  163. package/dist/channels/origin/checks.d.ts.map +1 -0
  164. package/dist/channels/origin/checks.js +147 -0
  165. package/dist/channels/origin/cursor-account.d.ts +24 -0
  166. package/dist/channels/origin/cursor-account.d.ts.map +1 -0
  167. package/dist/channels/origin/cursor-account.js +35 -0
  168. package/dist/channels/origin/defaults.d.ts +43 -0
  169. package/dist/channels/origin/defaults.d.ts.map +1 -0
  170. package/dist/channels/origin/defaults.js +94 -0
  171. package/dist/channels/origin/events.d.ts +10 -0
  172. package/dist/channels/origin/events.d.ts.map +1 -0
  173. package/dist/channels/origin/events.js +25 -0
  174. package/dist/channels/origin/index.d.ts +45 -0
  175. package/dist/channels/origin/index.d.ts.map +1 -0
  176. package/dist/channels/origin/index.js +33 -0
  177. package/dist/channels/origin/origin-channel.d.ts +72 -0
  178. package/dist/channels/origin/origin-channel.d.ts.map +1 -0
  179. package/dist/channels/origin/origin-channel.js +628 -0
  180. package/dist/channels/origin/origin-webhook.d.ts +69 -0
  181. package/dist/channels/origin/origin-webhook.d.ts.map +1 -0
  182. package/dist/channels/origin/origin-webhook.js +213 -0
  183. package/dist/channels/origin/reactions.d.ts +56 -0
  184. package/dist/channels/origin/reactions.d.ts.map +1 -0
  185. package/dist/channels/origin/reactions.js +46 -0
  186. package/dist/channels/origin/state.d.ts +32 -0
  187. package/dist/channels/origin/state.d.ts.map +1 -0
  188. package/dist/channels/origin/state.js +31 -0
  189. package/dist/channels/origin/types.d.ts +257 -0
  190. package/dist/channels/origin/types.d.ts.map +1 -0
  191. package/dist/channels/origin/types.js +1 -0
  192. package/dist/channels/pagerduty/api.d.ts +74 -0
  193. package/dist/channels/pagerduty/api.d.ts.map +1 -0
  194. package/dist/channels/pagerduty/api.js +101 -0
  195. package/dist/channels/pagerduty/defaults.d.ts +42 -0
  196. package/dist/channels/pagerduty/defaults.d.ts.map +1 -0
  197. package/dist/channels/pagerduty/defaults.js +132 -0
  198. package/dist/channels/pagerduty/events.d.ts +24 -0
  199. package/dist/channels/pagerduty/events.d.ts.map +1 -0
  200. package/dist/channels/pagerduty/events.js +38 -0
  201. package/dist/channels/pagerduty/index.d.ts +31 -0
  202. package/dist/channels/pagerduty/index.d.ts.map +1 -0
  203. package/dist/channels/pagerduty/index.js +30 -0
  204. package/dist/channels/pagerduty/pagerduty-channel.d.ts +64 -0
  205. package/dist/channels/pagerduty/pagerduty-channel.d.ts.map +1 -0
  206. package/dist/channels/pagerduty/pagerduty-channel.js +195 -0
  207. package/dist/channels/pagerduty/pagerduty-webhook.d.ts +70 -0
  208. package/dist/channels/pagerduty/pagerduty-webhook.d.ts.map +1 -0
  209. package/dist/channels/pagerduty/pagerduty-webhook.js +280 -0
  210. package/dist/channels/pagerduty/payload.d.ts +33 -0
  211. package/dist/channels/pagerduty/payload.d.ts.map +1 -0
  212. package/dist/channels/pagerduty/payload.js +150 -0
  213. package/dist/channels/pagerduty/replay.d.ts +35 -0
  214. package/dist/channels/pagerduty/replay.d.ts.map +1 -0
  215. package/dist/channels/pagerduty/replay.js +115 -0
  216. package/dist/channels/pagerduty/secrets.d.ts +16 -0
  217. package/dist/channels/pagerduty/secrets.d.ts.map +1 -0
  218. package/dist/channels/pagerduty/secrets.js +23 -0
  219. package/dist/channels/pagerduty/self-user.d.ts +51 -0
  220. package/dist/channels/pagerduty/self-user.d.ts.map +1 -0
  221. package/dist/channels/pagerduty/self-user.js +157 -0
  222. package/dist/channels/pagerduty/state.d.ts +31 -0
  223. package/dist/channels/pagerduty/state.d.ts.map +1 -0
  224. package/dist/channels/pagerduty/state.js +30 -0
  225. package/dist/channels/pagerduty/types.d.ts +217 -0
  226. package/dist/channels/pagerduty/types.d.ts.map +1 -0
  227. package/dist/channels/pagerduty/types.js +1 -0
  228. package/dist/channels/runs/index.d.ts +4 -0
  229. package/dist/channels/runs/index.d.ts.map +1 -0
  230. package/dist/channels/runs/index.js +2 -0
  231. package/dist/channels/runs/runs-channel.d.ts +5 -0
  232. package/dist/channels/runs/runs-channel.d.ts.map +1 -0
  233. package/dist/channels/runs/runs-channel.js +34 -0
  234. package/dist/channels/runs/types.d.ts +34 -0
  235. package/dist/channels/runs/types.d.ts.map +1 -0
  236. package/dist/channels/runs/types.js +1 -0
  237. package/dist/channels/slack/agentic-delivery.d.ts +24 -0
  238. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  239. package/dist/channels/slack/agentic-delivery.js +510 -0
  240. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  241. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  242. package/dist/channels/slack/agentic-posted.js +101 -0
  243. package/dist/channels/slack/agentic-signals.d.ts +43 -0
  244. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  245. package/dist/channels/slack/agentic-signals.js +199 -0
  246. package/dist/channels/slack/api.d.ts +172 -0
  247. package/dist/channels/slack/api.d.ts.map +1 -0
  248. package/dist/channels/slack/api.js +642 -0
  249. package/dist/channels/slack/approvals.d.ts +48 -0
  250. package/dist/channels/slack/approvals.d.ts.map +1 -0
  251. package/dist/channels/slack/approvals.js +233 -0
  252. package/dist/channels/slack/assistant.d.ts +23 -0
  253. package/dist/channels/slack/assistant.d.ts.map +1 -0
  254. package/dist/channels/slack/assistant.js +57 -0
  255. package/dist/channels/slack/attachments.d.ts +85 -0
  256. package/dist/channels/slack/attachments.d.ts.map +1 -0
  257. package/dist/channels/slack/attachments.js +507 -0
  258. package/dist/channels/slack/auth.d.ts +46 -0
  259. package/dist/channels/slack/auth.d.ts.map +1 -0
  260. package/dist/channels/slack/auth.js +97 -0
  261. package/dist/channels/slack/blocks.d.ts +61 -0
  262. package/dist/channels/slack/blocks.d.ts.map +1 -0
  263. package/dist/channels/slack/blocks.js +90 -0
  264. package/dist/channels/slack/bot-mentions.d.ts +108 -0
  265. package/dist/channels/slack/bot-mentions.d.ts.map +1 -0
  266. package/dist/channels/slack/bot-mentions.js +243 -0
  267. package/dist/channels/slack/channel-watch.d.ts +80 -0
  268. package/dist/channels/slack/channel-watch.d.ts.map +1 -0
  269. package/dist/channels/slack/channel-watch.js +264 -0
  270. package/dist/channels/slack/cli-project.d.ts +19 -0
  271. package/dist/channels/slack/cli-project.d.ts.map +1 -0
  272. package/dist/channels/slack/cli-project.js +203 -0
  273. package/dist/channels/slack/code-fences.d.ts +17 -0
  274. package/dist/channels/slack/code-fences.d.ts.map +1 -0
  275. package/dist/channels/slack/code-fences.js +164 -0
  276. package/dist/channels/slack/constants.d.ts +27 -0
  277. package/dist/channels/slack/constants.d.ts.map +1 -0
  278. package/dist/channels/slack/constants.js +37 -0
  279. package/dist/channels/slack/credentials.d.ts +35 -0
  280. package/dist/channels/slack/credentials.d.ts.map +1 -0
  281. package/dist/channels/slack/credentials.js +73 -0
  282. package/dist/channels/slack/defaults.d.ts +50 -0
  283. package/dist/channels/slack/defaults.d.ts.map +1 -0
  284. package/dist/channels/slack/defaults.js +592 -0
  285. package/dist/channels/slack/dispatch.d.ts +153 -0
  286. package/dist/channels/slack/dispatch.d.ts.map +1 -0
  287. package/dist/channels/slack/dispatch.js +820 -0
  288. package/dist/channels/slack/doctor.d.ts +40 -0
  289. package/dist/channels/slack/doctor.d.ts.map +1 -0
  290. package/dist/channels/slack/doctor.js +277 -0
  291. package/dist/channels/slack/eval-directive.d.ts +59 -0
  292. package/dist/channels/slack/eval-directive.d.ts.map +1 -0
  293. package/dist/channels/slack/eval-directive.js +252 -0
  294. package/dist/channels/slack/event-id-dedupe.d.ts +10 -0
  295. package/dist/channels/slack/event-id-dedupe.d.ts.map +1 -0
  296. package/dist/channels/slack/event-id-dedupe.js +23 -0
  297. package/dist/channels/slack/external-policy.d.ts +28 -0
  298. package/dist/channels/slack/external-policy.d.ts.map +1 -0
  299. package/dist/channels/slack/external-policy.js +51 -0
  300. package/dist/channels/slack/footer.d.ts +33 -0
  301. package/dist/channels/slack/footer.d.ts.map +1 -0
  302. package/dist/channels/slack/footer.js +72 -0
  303. package/dist/channels/slack/inbound.d.ts +104 -0
  304. package/dist/channels/slack/inbound.d.ts.map +1 -0
  305. package/dist/channels/slack/inbound.js +350 -0
  306. package/dist/channels/slack/index.d.ts +56 -0
  307. package/dist/channels/slack/index.d.ts.map +1 -0
  308. package/dist/channels/slack/index.js +55 -0
  309. package/dist/channels/slack/init.d.ts +41 -0
  310. package/dist/channels/slack/init.d.ts.map +1 -0
  311. package/dist/channels/slack/init.js +109 -0
  312. package/dist/channels/slack/interactive.d.ts +73 -0
  313. package/dist/channels/slack/interactive.d.ts.map +1 -0
  314. package/dist/channels/slack/interactive.js +309 -0
  315. package/dist/channels/slack/links.d.ts +10 -0
  316. package/dist/channels/slack/links.d.ts.map +1 -0
  317. package/dist/channels/slack/links.js +18 -0
  318. package/dist/channels/slack/live-delivery.d.ts +80 -0
  319. package/dist/channels/slack/live-delivery.d.ts.map +1 -0
  320. package/dist/channels/slack/live-delivery.js +386 -0
  321. package/dist/channels/slack/log.d.ts +25 -0
  322. package/dist/channels/slack/log.d.ts.map +1 -0
  323. package/dist/channels/slack/log.js +44 -0
  324. package/dist/channels/slack/manifest.d.ts +80 -0
  325. package/dist/channels/slack/manifest.d.ts.map +1 -0
  326. package/dist/channels/slack/manifest.js +186 -0
  327. package/dist/channels/slack/message-body.d.ts +13 -0
  328. package/dist/channels/slack/message-body.d.ts.map +1 -0
  329. package/dist/channels/slack/message-body.js +74 -0
  330. package/dist/channels/slack/nudge-carrier.d.ts +21 -0
  331. package/dist/channels/slack/nudge-carrier.d.ts.map +1 -0
  332. package/dist/channels/slack/nudge-carrier.js +201 -0
  333. package/dist/channels/slack/nudge-store.d.ts +77 -0
  334. package/dist/channels/slack/nudge-store.d.ts.map +1 -0
  335. package/dist/channels/slack/nudge-store.js +288 -0
  336. package/dist/channels/slack/paint-start.d.ts +22 -0
  337. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  338. package/dist/channels/slack/paint-start.js +76 -0
  339. package/dist/channels/slack/placeholder.d.ts +62 -0
  340. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  341. package/dist/channels/slack/placeholder.js +237 -0
  342. package/dist/channels/slack/pr-ref.d.ts +24 -0
  343. package/dist/channels/slack/pr-ref.d.ts.map +1 -0
  344. package/dist/channels/slack/pr-ref.js +55 -0
  345. package/dist/channels/slack/progress-delivery.d.ts +28 -0
  346. package/dist/channels/slack/progress-delivery.d.ts.map +1 -0
  347. package/dist/channels/slack/progress-delivery.js +109 -0
  348. package/dist/channels/slack/reasoning-card.d.ts +38 -0
  349. package/dist/channels/slack/reasoning-card.d.ts.map +1 -0
  350. package/dist/channels/slack/reasoning-card.js +90 -0
  351. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  352. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  353. package/dist/channels/slack/reasoning-chip.js +30 -0
  354. package/dist/channels/slack/recording-sink.d.ts +29 -0
  355. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  356. package/dist/channels/slack/recording-sink.js +128 -0
  357. package/dist/channels/slack/redact.d.ts +2 -0
  358. package/dist/channels/slack/redact.d.ts.map +1 -0
  359. package/dist/channels/slack/redact.js +5 -0
  360. package/dist/channels/slack/reply-options.d.ts +56 -0
  361. package/dist/channels/slack/reply-options.d.ts.map +1 -0
  362. package/dist/channels/slack/reply-options.js +218 -0
  363. package/dist/channels/slack/self-identity.d.ts +18 -0
  364. package/dist/channels/slack/self-identity.d.ts.map +1 -0
  365. package/dist/channels/slack/self-identity.js +49 -0
  366. package/dist/channels/slack/sender-name.d.ts +26 -0
  367. package/dist/channels/slack/sender-name.d.ts.map +1 -0
  368. package/dist/channels/slack/sender-name.js +79 -0
  369. package/dist/channels/slack/setup.d.ts +33 -0
  370. package/dist/channels/slack/setup.d.ts.map +1 -0
  371. package/dist/channels/slack/setup.js +99 -0
  372. package/dist/channels/slack/slack-channel.d.ts +46 -0
  373. package/dist/channels/slack/slack-channel.d.ts.map +1 -0
  374. package/dist/channels/slack/slack-channel.js +683 -0
  375. package/dist/channels/slack/socket-mode.d.ts +26 -0
  376. package/dist/channels/slack/socket-mode.d.ts.map +1 -0
  377. package/dist/channels/slack/socket-mode.js +100 -0
  378. package/dist/channels/slack/stop.d.ts +14 -0
  379. package/dist/channels/slack/stop.d.ts.map +1 -0
  380. package/dist/channels/slack/stop.js +22 -0
  381. package/dist/channels/slack/stream.d.ts +42 -0
  382. package/dist/channels/slack/stream.d.ts.map +1 -0
  383. package/dist/channels/slack/stream.js +30 -0
  384. package/dist/channels/slack/thread-context.d.ts +89 -0
  385. package/dist/channels/slack/thread-context.d.ts.map +1 -0
  386. package/dist/channels/slack/thread-context.js +459 -0
  387. package/dist/channels/slack/tool-approval-events.d.ts +38 -0
  388. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -0
  389. package/dist/channels/slack/tool-approval-events.js +207 -0
  390. package/dist/channels/slack/tool-cards.d.ts +22 -0
  391. package/dist/channels/slack/tool-cards.d.ts.map +1 -0
  392. package/dist/channels/slack/tool-cards.js +167 -0
  393. package/dist/channels/slack/tool-chip.d.ts +9 -0
  394. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  395. package/dist/channels/slack/tool-chip.js +22 -0
  396. package/dist/channels/slack/types.d.ts +811 -0
  397. package/dist/channels/slack/types.d.ts.map +1 -0
  398. package/dist/channels/slack/types.js +4 -0
  399. package/dist/channels/slack/upload.d.ts +13 -0
  400. package/dist/channels/slack/upload.d.ts.map +1 -0
  401. package/dist/channels/slack/upload.js +122 -0
  402. package/dist/channels/slack/user-info.d.ts +16 -0
  403. package/dist/channels/slack/user-info.d.ts.map +1 -0
  404. package/dist/channels/slack/user-info.js +58 -0
  405. package/dist/channels.d.ts +188 -0
  406. package/dist/channels.d.ts.map +1 -0
  407. package/dist/channels.js +421 -0
  408. package/dist/connections.d.ts +160 -0
  409. package/dist/connections.d.ts.map +1 -0
  410. package/dist/connections.js +185 -0
  411. package/dist/dashboard-session-url.d.ts +15 -0
  412. package/dist/dashboard-session-url.d.ts.map +1 -0
  413. package/dist/dashboard-session-url.js +24 -0
  414. package/dist/docs/404.html +24 -0
  415. package/dist/docs/architecture.svg +59 -0
  416. package/dist/docs/assets/app.wA5xBBcd.js +309 -0
  417. package/dist/docs/assets/building-with-agents.md.FZXrY8Nk.js +9 -0
  418. package/dist/docs/assets/building-with-agents.md.FZXrY8Nk.lean.js +1 -0
  419. package/dist/docs/assets/changelog.md.BvHRIiMH.js +1 -0
  420. package/dist/docs/assets/changelog.md.BvHRIiMH.lean.js +1 -0
  421. package/dist/docs/assets/chunks/@localSearchIndexroot.BoDEJQWv.js +1 -0
  422. package/dist/docs/assets/chunks/VPLocalSearchBox.C29HLCVL.js +9 -0
  423. package/dist/docs/assets/chunks/arc.BOaoYWmh.js +1 -0
  424. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.MfG0itQh.js +36 -0
  425. package/dist/docs/assets/chunks/baseUniq.CUeJciCF.js +1 -0
  426. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.BrXMZRtK.js +132 -0
  427. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.DfkDHeB9.js +10 -0
  428. package/dist/docs/assets/chunks/channel.D2BTz0L-.js +1 -0
  429. package/dist/docs/assets/chunks/chunk-4BX2VUAB.xKz8CiXK.js +1 -0
  430. package/dist/docs/assets/chunks/chunk-4TB4RGXK.kkfBh4zk.js +206 -0
  431. package/dist/docs/assets/chunks/chunk-55IACEB6.BClJGb94.js +1 -0
  432. package/dist/docs/assets/chunks/chunk-EDXVE4YY.P9BpQ9L3.js +1 -0
  433. package/dist/docs/assets/chunks/chunk-FMBD7UC4.R4iYi58S.js +15 -0
  434. package/dist/docs/assets/chunks/chunk-OYMX7WX6.Cpn8L1dw.js +231 -0
  435. package/dist/docs/assets/chunks/chunk-QZHKN3VN.BLftECqU.js +1 -0
  436. package/dist/docs/assets/chunks/chunk-YZCP3GAM.BWDV1AYt.js +1 -0
  437. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DqByliAC.js +1 -0
  438. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DqByliAC.js +1 -0
  439. package/dist/docs/assets/chunks/clone.CldT1lbQ.js +1 -0
  440. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.DGpAcJ55.js +1 -0
  441. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  442. package/dist/docs/assets/chunks/dagre-KV5264BT.BBXxGEaD.js +4 -0
  443. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  444. package/dist/docs/assets/chunks/diagram-5BDNPKRD.EKqOwmK2.js +10 -0
  445. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.CB8pdkoZ.js +24 -0
  446. package/dist/docs/assets/chunks/diagram-MMDJMWI5.aHh4WGg9.js +43 -0
  447. package/dist/docs/assets/chunks/diagram-TYMM5635.YIsbRH20.js +24 -0
  448. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.B3bTCW_e.js +85 -0
  449. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.M81hXIXZ.js +162 -0
  450. package/dist/docs/assets/chunks/framework.BNw1pucY.js +19 -0
  451. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.BKg7WY--.js +292 -0
  452. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.CLEMZgO3.js +106 -0
  453. package/dist/docs/assets/chunks/graph.DS38W_Q-.js +1 -0
  454. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.BTiWTi82.js +2 -0
  455. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  456. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.DcqY_KQL.js +70 -0
  457. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.0lQNZ40U.js +139 -0
  458. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.L5sKlf7X.js +89 -0
  459. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  460. package/dist/docs/assets/chunks/layout.7u4gFhQa.js +1 -0
  461. package/dist/docs/assets/chunks/linear.D5v33SOb.js +1 -0
  462. package/dist/docs/assets/chunks/min.Dc9uCxf9.js +1 -0
  463. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.B56nGoB_.js +96 -0
  464. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  465. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.Cba8e8lS.js +30 -0
  466. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.2YjBycHF.js +7 -0
  467. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.D4P5RqVI.js +84 -0
  468. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.C0Hn8NUm.js +10 -0
  469. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.BZm7EaoT.js +157 -0
  470. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.DcR4f3X2.js +1 -0
  471. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.Bb4oMe0P.js +1 -0
  472. package/dist/docs/assets/chunks/theme.DvfKzyXq.js +2 -0
  473. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.CgDh96vg.js +120 -0
  474. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.B4fagbC8.js +34 -0
  475. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  476. package/dist/docs/assets/chunks/wardley-RL74JXVD.Ck68omim.js +162 -0
  477. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.DBUg0bvz.js +20 -0
  478. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.DnKSGQE1.js +7 -0
  479. package/dist/docs/assets/deployment.md.3MMWuPeV.js +31 -0
  480. package/dist/docs/assets/deployment.md.3MMWuPeV.lean.js +1 -0
  481. package/dist/docs/assets/evals.md.CHR34K1Y.js +68 -0
  482. package/dist/docs/assets/evals.md.CHR34K1Y.lean.js +1 -0
  483. package/dist/docs/assets/guides_agent-to-agent.md.CwL5cwuE.js +42 -0
  484. package/dist/docs/assets/guides_agent-to-agent.md.CwL5cwuE.lean.js +1 -0
  485. package/dist/docs/assets/guides_bitbucket.md.CKUayYtD.js +145 -0
  486. package/dist/docs/assets/guides_bitbucket.md.CKUayYtD.lean.js +1 -0
  487. package/dist/docs/assets/guides_cloud-agents.md.BzbzcOyj.js +9 -0
  488. package/dist/docs/assets/guides_cloud-agents.md.BzbzcOyj.lean.js +1 -0
  489. package/dist/docs/assets/guides_convert-automation.md.DMEX9nF-.js +43 -0
  490. package/dist/docs/assets/guides_convert-automation.md.DMEX9nF-.lean.js +1 -0
  491. package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.js +55 -0
  492. package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.lean.js +1 -0
  493. package/dist/docs/assets/guides_github.md.TuNiZAOQ.js +162 -0
  494. package/dist/docs/assets/guides_github.md.TuNiZAOQ.lean.js +1 -0
  495. package/dist/docs/assets/guides_gitlab.md.CtNI4fSH.js +153 -0
  496. package/dist/docs/assets/guides_gitlab.md.CtNI4fSH.lean.js +1 -0
  497. package/dist/docs/assets/guides_grokbot-agents.md.BwAykJ7U.js +15 -0
  498. package/dist/docs/assets/guides_grokbot-agents.md.BwAykJ7U.lean.js +1 -0
  499. package/dist/docs/assets/guides_hooks.md.B2XfGX50.js +54 -0
  500. package/dist/docs/assets/guides_hooks.md.B2XfGX50.lean.js +1 -0
  501. package/dist/docs/assets/guides_improve.md.CZKVt1cT.js +21 -0
  502. package/dist/docs/assets/guides_improve.md.CZKVt1cT.lean.js +1 -0
  503. package/dist/docs/assets/guides_jev.md.D7XH4JH3.js +151 -0
  504. package/dist/docs/assets/guides_jev.md.D7XH4JH3.lean.js +1 -0
  505. package/dist/docs/assets/guides_mcp-oauth.md.Cxq2TxBB.js +38 -0
  506. package/dist/docs/assets/guides_mcp-oauth.md.Cxq2TxBB.lean.js +1 -0
  507. package/dist/docs/assets/guides_migrate.md.CQlGaBKX.js +7 -0
  508. package/dist/docs/assets/guides_migrate.md.CQlGaBKX.lean.js +1 -0
  509. package/dist/docs/assets/guides_opentelemetry.md.D4wO7_8v.js +37 -0
  510. package/dist/docs/assets/guides_opentelemetry.md.D4wO7_8v.lean.js +1 -0
  511. package/dist/docs/assets/guides_pagerduty.md.BHXMcMtx.js +60 -0
  512. package/dist/docs/assets/guides_pagerduty.md.BHXMcMtx.lean.js +1 -0
  513. package/dist/docs/assets/guides_slack.md.ClIyi7FI.js +75 -0
  514. package/dist/docs/assets/guides_slack.md.ClIyi7FI.lean.js +1 -0
  515. package/dist/docs/assets/guides_webhooks.md.Cpdc3BDX.js +93 -0
  516. package/dist/docs/assets/guides_webhooks.md.Cpdc3BDX.lean.js +1 -0
  517. package/dist/docs/assets/hillclimbing.md.Dxvd-0gT.js +7 -0
  518. package/dist/docs/assets/hillclimbing.md.Dxvd-0gT.lean.js +1 -0
  519. package/dist/docs/assets/index.md.CAnsLl8D.js +27 -0
  520. package/dist/docs/assets/index.md.CAnsLl8D.lean.js +1 -0
  521. package/dist/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  522. package/dist/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  523. package/dist/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  524. package/dist/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  525. package/dist/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  526. package/dist/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  527. package/dist/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  528. package/dist/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  529. package/dist/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  530. package/dist/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  531. package/dist/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  532. package/dist/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  533. package/dist/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  534. package/dist/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  535. package/dist/docs/assets/quickstart.md.D8JDfkKO.js +170 -0
  536. package/dist/docs/assets/quickstart.md.D8JDfkKO.lean.js +1 -0
  537. package/dist/docs/assets/reference_agent-config.md.CZrbHOfT.js +38 -0
  538. package/dist/docs/assets/reference_agent-config.md.CZrbHOfT.lean.js +1 -0
  539. package/dist/docs/assets/reference_artifacts.md.DLV9MZES.js +18 -0
  540. package/dist/docs/assets/reference_artifacts.md.DLV9MZES.lean.js +1 -0
  541. package/dist/docs/assets/reference_channels.md.CNNIS6K7.js +22 -0
  542. package/dist/docs/assets/reference_channels.md.CNNIS6K7.lean.js +1 -0
  543. package/dist/docs/assets/reference_cli.md.1o_TqKdt.js +103 -0
  544. package/dist/docs/assets/reference_cli.md.1o_TqKdt.lean.js +1 -0
  545. package/dist/docs/assets/reference_connections.md.BJE2Zllp.js +66 -0
  546. package/dist/docs/assets/reference_connections.md.BJE2Zllp.lean.js +1 -0
  547. package/dist/docs/assets/reference_evals.md.Ccwp4x3o.js +56 -0
  548. package/dist/docs/assets/reference_evals.md.Ccwp4x3o.lean.js +1 -0
  549. package/dist/docs/assets/reference_extensions.md.DKxTuCIw.js +62 -0
  550. package/dist/docs/assets/reference_extensions.md.DKxTuCIw.lean.js +1 -0
  551. package/dist/docs/assets/reference_hooks.md.CROr0QgC.js +51 -0
  552. package/dist/docs/assets/reference_hooks.md.CROr0QgC.lean.js +1 -0
  553. package/dist/docs/assets/reference_http-api.md.Dji-DD_Z.js +11 -0
  554. package/dist/docs/assets/reference_http-api.md.Dji-DD_Z.lean.js +1 -0
  555. package/dist/docs/assets/reference_instructions.md.BYMVxAkw.js +14 -0
  556. package/dist/docs/assets/reference_instructions.md.BYMVxAkw.lean.js +1 -0
  557. package/dist/docs/assets/reference_memory.md.BwyJXYZe.js +4 -0
  558. package/dist/docs/assets/reference_memory.md.BwyJXYZe.lean.js +1 -0
  559. package/dist/docs/assets/reference_playground.md.q4MI-0td.js +1 -0
  560. package/dist/docs/assets/reference_playground.md.q4MI-0td.lean.js +1 -0
  561. package/dist/docs/assets/reference_project-layout.md.mFcS8yDD.js +25 -0
  562. package/dist/docs/assets/reference_project-layout.md.mFcS8yDD.lean.js +1 -0
  563. package/dist/docs/assets/reference_prompt.md.DqPh71XN.js +9 -0
  564. package/dist/docs/assets/reference_prompt.md.DqPh71XN.lean.js +1 -0
  565. package/dist/docs/assets/reference_schedules.md.BqWnJES4.js +47 -0
  566. package/dist/docs/assets/reference_schedules.md.BqWnJES4.lean.js +1 -0
  567. package/dist/docs/assets/reference_sessions.md.Bi6lHttM.js +22 -0
  568. package/dist/docs/assets/reference_sessions.md.Bi6lHttM.lean.js +1 -0
  569. package/dist/docs/assets/reference_skills.md.Ckddg6KX.js +15 -0
  570. package/dist/docs/assets/reference_skills.md.Ckddg6KX.lean.js +1 -0
  571. package/dist/docs/assets/reference_subagents.md.ChNGh6HK.js +10 -0
  572. package/dist/docs/assets/reference_subagents.md.ChNGh6HK.lean.js +1 -0
  573. package/dist/docs/assets/reference_tools.md.Bo0UfT0a.js +79 -0
  574. package/dist/docs/assets/reference_tools.md.Bo0UfT0a.lean.js +1 -0
  575. package/dist/docs/assets/style.B9o0luvp.css +1 -0
  576. package/dist/docs/assets/templates_agentic-owners.md.CTEnR0jp.js +13 -0
  577. package/dist/docs/assets/templates_agentic-owners.md.CTEnR0jp.lean.js +1 -0
  578. package/dist/docs/assets/templates_grokbot-agents.md.DgpPEs7B.js +5 -0
  579. package/dist/docs/assets/templates_grokbot-agents.md.DgpPEs7B.lean.js +1 -0
  580. package/dist/docs/assets/templates_security-reviewer.md.Gh6EF9Us.js +3 -0
  581. package/dist/docs/assets/templates_security-reviewer.md.Gh6EF9Us.lean.js +1 -0
  582. package/dist/docs/assets/templates_thermo-quality-review.md.B77UyTrX.js +3 -0
  583. package/dist/docs/assets/templates_thermo-quality-review.md.B77UyTrX.lean.js +1 -0
  584. package/dist/docs/assets/templates_thermo-review.md.DRJ7mC5U.js +3 -0
  585. package/dist/docs/assets/templates_thermo-review.md.DRJ7mC5U.lean.js +1 -0
  586. package/dist/docs/assets/templates_triage.md.CNN6b0JZ.js +9 -0
  587. package/dist/docs/assets/templates_triage.md.CNN6b0JZ.lean.js +1 -0
  588. package/dist/docs/assets/troubleshooting.md.DFnoTDlQ.js +1 -0
  589. package/dist/docs/assets/troubleshooting.md.DFnoTDlQ.lean.js +1 -0
  590. package/dist/docs/building-with-agents.html +68 -0
  591. package/dist/docs/building-with-agents.md +134 -0
  592. package/dist/docs/changelog.html +60 -0
  593. package/dist/docs/changelog.md +114 -0
  594. package/dist/docs/deployment.html +90 -0
  595. package/dist/docs/deployment.md +309 -0
  596. package/dist/docs/evals.html +127 -0
  597. package/dist/docs/evals.md +239 -0
  598. package/dist/docs/guides/agent-to-agent.html +101 -0
  599. package/dist/docs/guides/agent-to-agent.md +162 -0
  600. package/dist/docs/guides/bitbucket.html +204 -0
  601. package/dist/docs/guides/bitbucket.md +293 -0
  602. package/dist/docs/guides/cloud-agents.html +68 -0
  603. package/dist/docs/guides/cloud-agents.md +81 -0
  604. package/dist/docs/guides/convert-automation.html +102 -0
  605. package/dist/docs/guides/convert-automation.md +180 -0
  606. package/dist/docs/guides/export-grokbot.html +114 -0
  607. package/dist/docs/guides/export-grokbot.md +239 -0
  608. package/dist/docs/guides/github.html +221 -0
  609. package/dist/docs/guides/github.md +373 -0
  610. package/dist/docs/guides/gitlab.html +212 -0
  611. package/dist/docs/guides/gitlab.md +299 -0
  612. package/dist/docs/guides/grokbot-agents.html +74 -0
  613. package/dist/docs/guides/grokbot-agents.md +135 -0
  614. package/dist/docs/guides/hooks.html +113 -0
  615. package/dist/docs/guides/hooks.md +116 -0
  616. package/dist/docs/guides/improve.html +80 -0
  617. package/dist/docs/guides/improve.md +129 -0
  618. package/dist/docs/guides/jev.html +210 -0
  619. package/dist/docs/guides/jev.md +298 -0
  620. package/dist/docs/guides/mcp-oauth.html +97 -0
  621. package/dist/docs/guides/mcp-oauth.md +148 -0
  622. package/dist/docs/guides/migrate.html +66 -0
  623. package/dist/docs/guides/migrate.md +164 -0
  624. package/dist/docs/guides/opentelemetry.html +96 -0
  625. package/dist/docs/guides/opentelemetry.md +205 -0
  626. package/dist/docs/guides/pagerduty.html +119 -0
  627. package/dist/docs/guides/pagerduty.md +336 -0
  628. package/dist/docs/guides/slack.html +134 -0
  629. package/dist/docs/guides/slack.md +309 -0
  630. package/dist/docs/guides/webhooks.html +152 -0
  631. package/dist/docs/guides/webhooks.md +250 -0
  632. package/dist/docs/hashmap.json +1 -0
  633. package/dist/docs/hillclimbing.html +66 -0
  634. package/dist/docs/hillclimbing.md +134 -0
  635. package/dist/docs/index.html +86 -0
  636. package/dist/docs/index.md +110 -0
  637. package/dist/docs/llms-full.txt +10077 -0
  638. package/dist/docs/llms.txt +68 -0
  639. package/dist/docs/quickstart.html +229 -0
  640. package/dist/docs/quickstart.md +307 -0
  641. package/dist/docs/reference/agent-config.html +97 -0
  642. package/dist/docs/reference/agent-config.md +238 -0
  643. package/dist/docs/reference/artifacts.html +77 -0
  644. package/dist/docs/reference/artifacts.md +113 -0
  645. package/dist/docs/reference/channels.html +81 -0
  646. package/dist/docs/reference/channels.md +214 -0
  647. package/dist/docs/reference/cli.html +162 -0
  648. package/dist/docs/reference/cli.md +1098 -0
  649. package/dist/docs/reference/connections.html +125 -0
  650. package/dist/docs/reference/connections.md +307 -0
  651. package/dist/docs/reference/evals.html +115 -0
  652. package/dist/docs/reference/evals.md +294 -0
  653. package/dist/docs/reference/extensions.html +121 -0
  654. package/dist/docs/reference/extensions.md +209 -0
  655. package/dist/docs/reference/hooks.html +110 -0
  656. package/dist/docs/reference/hooks.md +197 -0
  657. package/dist/docs/reference/http-api.html +70 -0
  658. package/dist/docs/reference/http-api.md +221 -0
  659. package/dist/docs/reference/instructions.html +73 -0
  660. package/dist/docs/reference/instructions.md +64 -0
  661. package/dist/docs/reference/memory.html +63 -0
  662. package/dist/docs/reference/memory.md +114 -0
  663. package/dist/docs/reference/playground.html +60 -0
  664. package/dist/docs/reference/playground.md +36 -0
  665. package/dist/docs/reference/project-layout.html +84 -0
  666. package/dist/docs/reference/project-layout.md +117 -0
  667. package/dist/docs/reference/prompt.html +68 -0
  668. package/dist/docs/reference/prompt.md +47 -0
  669. package/dist/docs/reference/schedules.html +106 -0
  670. package/dist/docs/reference/schedules.md +190 -0
  671. package/dist/docs/reference/sessions.html +81 -0
  672. package/dist/docs/reference/sessions.md +200 -0
  673. package/dist/docs/reference/skills.html +74 -0
  674. package/dist/docs/reference/skills.md +72 -0
  675. package/dist/docs/reference/subagents.html +69 -0
  676. package/dist/docs/reference/subagents.md +61 -0
  677. package/dist/docs/reference/tools.html +138 -0
  678. package/dist/docs/reference/tools.md +306 -0
  679. package/dist/docs/templates/agentic-owners.html +72 -0
  680. package/dist/docs/templates/agentic-owners.md +126 -0
  681. package/dist/docs/templates/grokbot-agents.html +64 -0
  682. package/dist/docs/templates/grokbot-agents.md +55 -0
  683. package/dist/docs/templates/security-reviewer.html +62 -0
  684. package/dist/docs/templates/security-reviewer.md +81 -0
  685. package/dist/docs/templates/thermo-quality-review.html +62 -0
  686. package/dist/docs/templates/thermo-quality-review.md +75 -0
  687. package/dist/docs/templates/thermo-review.html +62 -0
  688. package/dist/docs/templates/thermo-review.md +75 -0
  689. package/dist/docs/templates/triage.html +68 -0
  690. package/dist/docs/templates/triage.md +101 -0
  691. package/dist/docs/troubleshooting.html +60 -0
  692. package/dist/docs/troubleshooting.md +149 -0
  693. package/dist/docs/vp-icons.css +0 -0
  694. package/dist/evals/assertions.d.ts +199 -0
  695. package/dist/evals/assertions.d.ts.map +1 -0
  696. package/dist/evals/assertions.js +447 -0
  697. package/dist/evals/expect.d.ts +95 -0
  698. package/dist/evals/expect.d.ts.map +1 -0
  699. package/dist/evals/expect.js +184 -0
  700. package/dist/evals/judge.d.ts +134 -0
  701. package/dist/evals/judge.d.ts.map +1 -0
  702. package/dist/evals/judge.js +221 -0
  703. package/dist/evals/loaders.d.ts +51 -0
  704. package/dist/evals/loaders.d.ts.map +1 -0
  705. package/dist/evals/loaders.js +107 -0
  706. package/dist/evals/matchers.d.ts +95 -0
  707. package/dist/evals/matchers.d.ts.map +1 -0
  708. package/dist/evals/matchers.js +141 -0
  709. package/dist/evals/reporters.d.ts +70 -0
  710. package/dist/evals/reporters.d.ts.map +1 -0
  711. package/dist/evals/reporters.js +196 -0
  712. package/dist/evals/results.d.ts +103 -0
  713. package/dist/evals/results.d.ts.map +1 -0
  714. package/dist/evals/results.js +27 -0
  715. package/dist/evals/run-facts.d.ts +77 -0
  716. package/dist/evals/run-facts.d.ts.map +1 -0
  717. package/dist/evals/run-facts.js +213 -0
  718. package/dist/evals.d.ts +446 -0
  719. package/dist/evals.d.ts.map +1 -0
  720. package/dist/evals.js +304 -0
  721. package/dist/executors.d.ts +11 -0
  722. package/dist/executors.d.ts.map +1 -0
  723. package/dist/executors.js +21 -0
  724. package/dist/extensions/cursor-cloud-agents/extension.d.ts +94 -0
  725. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -0
  726. package/dist/extensions/cursor-cloud-agents/extension.js +104 -0
  727. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +118 -0
  728. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -0
  729. package/dist/extensions/cursor-cloud-agents/lib/backend.js +290 -0
  730. package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts +3 -0
  731. package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts.map +1 -0
  732. package/dist/extensions/cursor-cloud-agents/lib/channels.js +11 -0
  733. package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +25 -0
  734. package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -0
  735. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +65 -0
  736. package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts +5 -0
  737. package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts.map +1 -0
  738. package/dist/extensions/cursor-cloud-agents/lib/inputs.js +4 -0
  739. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +47 -0
  740. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -0
  741. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +62 -0
  742. package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts +17 -0
  743. package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts.map +1 -0
  744. package/dist/extensions/cursor-cloud-agents/lib/repos.js +60 -0
  745. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts +8 -0
  746. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -0
  747. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +14 -0
  748. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +17 -0
  749. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -0
  750. package/dist/extensions/cursor-cloud-agents/lib/watch.js +85 -0
  751. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +19 -0
  752. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -0
  753. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +60 -0
  754. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +41 -0
  755. package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts +4 -0
  756. package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -0
  757. package/dist/extensions/cursor-cloud-agents/tools/cancel.js +19 -0
  758. package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts +4 -0
  759. package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts.map +1 -0
  760. package/dist/extensions/cursor-cloud-agents/tools/dump.js +43 -0
  761. package/dist/extensions/cursor-cloud-agents/tools/get.d.ts +4 -0
  762. package/dist/extensions/cursor-cloud-agents/tools/get.d.ts.map +1 -0
  763. package/dist/extensions/cursor-cloud-agents/tools/get.js +14 -0
  764. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts +4 -0
  765. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -0
  766. package/dist/extensions/cursor-cloud-agents/tools/launch.js +49 -0
  767. package/dist/extensions/cursor-cloud-agents/tools/list.d.ts +4 -0
  768. package/dist/extensions/cursor-cloud-agents/tools/list.d.ts.map +1 -0
  769. package/dist/extensions/cursor-cloud-agents/tools/list.js +25 -0
  770. package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts +4 -0
  771. package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts.map +1 -0
  772. package/dist/extensions/cursor-cloud-agents/tools/reply.js +26 -0
  773. package/dist/extensions/cursor-grokbot-agents/extension.d.ts +77 -0
  774. package/dist/extensions/cursor-grokbot-agents/extension.d.ts.map +1 -0
  775. package/dist/extensions/cursor-grokbot-agents/extension.js +70 -0
  776. package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts +11 -0
  777. package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts.map +1 -0
  778. package/dist/extensions/cursor-grokbot-agents/lib/agents.js +31 -0
  779. package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts +56 -0
  780. package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts.map +1 -0
  781. package/dist/extensions/cursor-grokbot-agents/lib/backend.js +138 -0
  782. package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts +28 -0
  783. package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts.map +1 -0
  784. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +46 -0
  785. package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts +53 -0
  786. package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts.map +1 -0
  787. package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +186 -0
  788. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts +4 -0
  789. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts.map +1 -0
  790. package/dist/extensions/cursor-grokbot-agents/lib/inputs.js +15 -0
  791. package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts +12 -0
  792. package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts.map +1 -0
  793. package/dist/extensions/cursor-grokbot-agents/lib/lock.js +24 -0
  794. package/dist/extensions/cursor-grokbot-agents/skills/consult.md +40 -0
  795. package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts +4 -0
  796. package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts.map +1 -0
  797. package/dist/extensions/cursor-grokbot-agents/tools/ask.js +26 -0
  798. package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts +4 -0
  799. package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts.map +1 -0
  800. package/dist/extensions/cursor-grokbot-agents/tools/check.js +21 -0
  801. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts +4 -0
  802. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts.map +1 -0
  803. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.js +13 -0
  804. package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts +4 -0
  805. package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts.map +1 -0
  806. package/dist/extensions/cursor-grokbot-agents/tools/list.js +22 -0
  807. package/dist/extensions/improve/extension.d.ts +48 -0
  808. package/dist/extensions/improve/extension.d.ts.map +1 -0
  809. package/dist/extensions/improve/extension.js +43 -0
  810. package/dist/extensions/improve/skills/yourself.d.ts +4 -0
  811. package/dist/extensions/improve/skills/yourself.d.ts.map +1 -0
  812. package/dist/extensions/improve/skills/yourself.js +43 -0
  813. package/dist/extensions/jev/extension.d.ts +46 -0
  814. package/dist/extensions/jev/extension.d.ts.map +1 -0
  815. package/dist/extensions/jev/extension.js +56 -0
  816. package/dist/extensions/jev/lib/evaluate.d.ts +105 -0
  817. package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
  818. package/dist/extensions/jev/lib/evaluate.js +154 -0
  819. package/dist/extensions/jev/skills/gated-write.md +25 -0
  820. package/dist/extensions/jev/skills/questions.md +33 -0
  821. package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
  822. package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
  823. package/dist/extensions/jev/tools/evaluate.js +72 -0
  824. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  825. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  826. package/dist/extensions/slack-communication/extension.js +32 -0
  827. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  828. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  829. package/dist/extensions/slack-communication/skills/slack-voice.js +52 -0
  830. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  831. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  832. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  833. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  834. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  835. package/dist/extensions/slack-communication/tools/edit-message.js +34 -0
  836. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  837. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  838. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  839. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  840. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  841. package/dist/extensions/slack-communication/tools/post-file.js +75 -0
  842. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  843. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  844. package/dist/extensions/slack-communication/tools/post-update.js +33 -0
  845. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  846. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  847. package/dist/extensions/slack-communication/tools/react.js +27 -0
  848. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  849. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  850. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  851. package/dist/extensions.d.ts +87 -0
  852. package/dist/extensions.d.ts.map +1 -0
  853. package/dist/extensions.js +141 -0
  854. package/dist/files-backends/agent-store-presigned-url.d.ts +3 -0
  855. package/dist/files-backends/agent-store-presigned-url.d.ts.map +1 -0
  856. package/dist/files-backends/agent-store-presigned-url.js +223 -0
  857. package/dist/files-backends/cursor-hosted.d.ts +65 -0
  858. package/dist/files-backends/cursor-hosted.d.ts.map +1 -0
  859. package/dist/files-backends/cursor-hosted.js +848 -0
  860. package/dist/files-backends/local-fs.d.ts +33 -0
  861. package/dist/files-backends/local-fs.d.ts.map +1 -0
  862. package/dist/files-backends/local-fs.js +133 -0
  863. package/dist/files.d.ts +203 -0
  864. package/dist/files.d.ts.map +1 -0
  865. package/dist/files.js +129 -0
  866. package/dist/filesystem.d.ts +515 -0
  867. package/dist/filesystem.d.ts.map +1 -0
  868. package/dist/filesystem.js +1596 -0
  869. package/dist/hooks.d.ts +25 -0
  870. package/dist/hooks.d.ts.map +1 -0
  871. package/dist/hooks.js +25 -0
  872. package/dist/index.d.ts +87 -0
  873. package/dist/index.d.ts.map +1 -0
  874. package/dist/index.js +94 -0
  875. package/dist/internal/advertise-tools.d.ts +96 -0
  876. package/dist/internal/advertise-tools.d.ts.map +1 -0
  877. package/dist/internal/advertise-tools.js +255 -0
  878. package/dist/internal/approval-gate.d.ts +35 -0
  879. package/dist/internal/approval-gate.d.ts.map +1 -0
  880. package/dist/internal/approval-gate.js +81 -0
  881. package/dist/internal/artifacts-store.d.ts +123 -0
  882. package/dist/internal/artifacts-store.d.ts.map +1 -0
  883. package/dist/internal/artifacts-store.js +657 -0
  884. package/dist/internal/as-of.d.ts +39 -0
  885. package/dist/internal/as-of.d.ts.map +1 -0
  886. package/dist/internal/as-of.js +207 -0
  887. package/dist/internal/auth.d.ts +12 -0
  888. package/dist/internal/auth.d.ts.map +1 -0
  889. package/dist/internal/auth.js +34 -0
  890. package/dist/internal/authored-alias-hooks.d.ts +43 -0
  891. package/dist/internal/authored-alias-hooks.d.ts.map +1 -0
  892. package/dist/internal/authored-alias-hooks.js +104 -0
  893. package/dist/internal/authored-loaders.d.ts +50 -0
  894. package/dist/internal/authored-loaders.d.ts.map +1 -0
  895. package/dist/internal/authored-loaders.js +183 -0
  896. package/dist/internal/bounded-int.d.ts +11 -0
  897. package/dist/internal/bounded-int.d.ts.map +1 -0
  898. package/dist/internal/bounded-int.js +12 -0
  899. package/dist/internal/bounded.d.ts +7 -0
  900. package/dist/internal/bounded.d.ts.map +1 -0
  901. package/dist/internal/bounded.js +21 -0
  902. package/dist/internal/brand.d.ts +6 -0
  903. package/dist/internal/brand.d.ts.map +1 -0
  904. package/dist/internal/brand.js +17 -0
  905. package/dist/internal/browser-origin-guard.d.ts +19 -0
  906. package/dist/internal/browser-origin-guard.d.ts.map +1 -0
  907. package/dist/internal/browser-origin-guard.js +51 -0
  908. package/dist/internal/builtin-tools/artifacts.d.ts +10 -0
  909. package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -0
  910. package/dist/internal/builtin-tools/artifacts.js +87 -0
  911. package/dist/internal/builtin-tools/index.d.ts +17 -0
  912. package/dist/internal/builtin-tools/index.d.ts.map +1 -0
  913. package/dist/internal/builtin-tools/index.js +39 -0
  914. package/dist/internal/builtin-tools/reminders.d.ts +9 -0
  915. package/dist/internal/builtin-tools/reminders.d.ts.map +1 -0
  916. package/dist/internal/builtin-tools/reminders.js +115 -0
  917. package/dist/internal/channel-architecture.d.ts +21 -0
  918. package/dist/internal/channel-architecture.d.ts.map +1 -0
  919. package/dist/internal/channel-architecture.js +43 -0
  920. package/dist/internal/channel-dispatch.d.ts +43 -0
  921. package/dist/internal/channel-dispatch.d.ts.map +1 -0
  922. package/dist/internal/channel-dispatch.js +74 -0
  923. package/dist/internal/channel-route-dispatch.d.ts +13 -0
  924. package/dist/internal/channel-route-dispatch.d.ts.map +1 -0
  925. package/dist/internal/channel-route-dispatch.js +51 -0
  926. package/dist/internal/channel-state.d.ts +17 -0
  927. package/dist/internal/channel-state.d.ts.map +1 -0
  928. package/dist/internal/channel-state.js +69 -0
  929. package/dist/internal/chat-client.d.ts +45 -0
  930. package/dist/internal/chat-client.d.ts.map +1 -0
  931. package/dist/internal/chat-client.js +457 -0
  932. package/dist/internal/cli-ax.d.ts +227 -0
  933. package/dist/internal/cli-ax.d.ts.map +1 -0
  934. package/dist/internal/cli-ax.js +1825 -0
  935. package/dist/internal/cli-bitbucket.d.ts +33 -0
  936. package/dist/internal/cli-bitbucket.d.ts.map +1 -0
  937. package/dist/internal/cli-bitbucket.js +332 -0
  938. package/dist/internal/cli-convert-automation.d.ts +39 -0
  939. package/dist/internal/cli-convert-automation.d.ts.map +1 -0
  940. package/dist/internal/cli-convert-automation.js +257 -0
  941. package/dist/internal/cli-cursor.d.ts +38 -0
  942. package/dist/internal/cli-cursor.d.ts.map +1 -0
  943. package/dist/internal/cli-cursor.js +205 -0
  944. package/dist/internal/cli-deploy.d.ts +171 -0
  945. package/dist/internal/cli-deploy.d.ts.map +1 -0
  946. package/dist/internal/cli-deploy.js +2072 -0
  947. package/dist/internal/cli-docs.d.ts +34 -0
  948. package/dist/internal/cli-docs.d.ts.map +1 -0
  949. package/dist/internal/cli-docs.js +156 -0
  950. package/dist/internal/cli-github.d.ts +47 -0
  951. package/dist/internal/cli-github.d.ts.map +1 -0
  952. package/dist/internal/cli-github.js +600 -0
  953. package/dist/internal/cli-gitlab.d.ts +37 -0
  954. package/dist/internal/cli-gitlab.d.ts.map +1 -0
  955. package/dist/internal/cli-gitlab.js +350 -0
  956. package/dist/internal/cli-images.d.ts +68 -0
  957. package/dist/internal/cli-images.d.ts.map +1 -0
  958. package/dist/internal/cli-images.js +536 -0
  959. package/dist/internal/cli-init-grokbot.d.ts +29 -0
  960. package/dist/internal/cli-init-grokbot.d.ts.map +1 -0
  961. package/dist/internal/cli-init-grokbot.js +181 -0
  962. package/dist/internal/cli-manifest.d.ts +19 -0
  963. package/dist/internal/cli-manifest.d.ts.map +1 -0
  964. package/dist/internal/cli-manifest.js +37 -0
  965. package/dist/internal/cli-mcp-oauth.d.ts +51 -0
  966. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -0
  967. package/dist/internal/cli-mcp-oauth.js +300 -0
  968. package/dist/internal/cli-mcp.d.ts +75 -0
  969. package/dist/internal/cli-mcp.d.ts.map +1 -0
  970. package/dist/internal/cli-mcp.js +659 -0
  971. package/dist/internal/cli-migrate.d.ts +18 -0
  972. package/dist/internal/cli-migrate.d.ts.map +1 -0
  973. package/dist/internal/cli-migrate.js +351 -0
  974. package/dist/internal/cli-pagerduty.d.ts +32 -0
  975. package/dist/internal/cli-pagerduty.d.ts.map +1 -0
  976. package/dist/internal/cli-pagerduty.js +242 -0
  977. package/dist/internal/cli-skills.d.ts +21 -0
  978. package/dist/internal/cli-skills.d.ts.map +1 -0
  979. package/dist/internal/cli-skills.js +65 -0
  980. package/dist/internal/cli-slack-manual.d.ts +41 -0
  981. package/dist/internal/cli-slack-manual.d.ts.map +1 -0
  982. package/dist/internal/cli-slack-manual.js +296 -0
  983. package/dist/internal/cli-slack.d.ts +59 -0
  984. package/dist/internal/cli-slack.d.ts.map +1 -0
  985. package/dist/internal/cli-slack.js +708 -0
  986. package/dist/internal/cloud-merge.d.ts +25 -0
  987. package/dist/internal/cloud-merge.d.ts.map +1 -0
  988. package/dist/internal/cloud-merge.js +40 -0
  989. package/dist/internal/cloud-turn-usage.d.ts +34 -0
  990. package/dist/internal/cloud-turn-usage.d.ts.map +1 -0
  991. package/dist/internal/cloud-turn-usage.js +94 -0
  992. package/dist/internal/comment-safe.d.ts +8 -0
  993. package/dist/internal/comment-safe.d.ts.map +1 -0
  994. package/dist/internal/comment-safe.js +12 -0
  995. package/dist/internal/connection-env.d.ts +31 -0
  996. package/dist/internal/connection-env.d.ts.map +1 -0
  997. package/dist/internal/connection-env.js +83 -0
  998. package/dist/internal/continuation-channel.d.ts +48 -0
  999. package/dist/internal/continuation-channel.d.ts.map +1 -0
  1000. package/dist/internal/continuation-channel.js +170 -0
  1001. package/dist/internal/continuation-identity.d.ts +126 -0
  1002. package/dist/internal/continuation-identity.d.ts.map +1 -0
  1003. package/dist/internal/continuation-identity.js +897 -0
  1004. package/dist/internal/continuation.d.ts +3 -0
  1005. package/dist/internal/continuation.d.ts.map +1 -0
  1006. package/dist/internal/continuation.js +1 -0
  1007. package/dist/internal/conversation-mirror.d.ts +72 -0
  1008. package/dist/internal/conversation-mirror.d.ts.map +1 -0
  1009. package/dist/internal/conversation-mirror.js +401 -0
  1010. package/dist/internal/conversation-pack.d.ts +29 -0
  1011. package/dist/internal/conversation-pack.d.ts.map +1 -0
  1012. package/dist/internal/conversation-pack.js +96 -0
  1013. package/dist/internal/convert-automation/convert-workflow.d.ts +10 -0
  1014. package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -0
  1015. package/dist/internal/convert-automation/convert-workflow.js +976 -0
  1016. package/dist/internal/convert-automation/types.d.ts +202 -0
  1017. package/dist/internal/convert-automation/types.d.ts.map +1 -0
  1018. package/dist/internal/convert-automation/types.js +13 -0
  1019. package/dist/internal/convert-grokbot/answers.d.ts +127 -0
  1020. package/dist/internal/convert-grokbot/answers.d.ts.map +1 -0
  1021. package/dist/internal/convert-grokbot/answers.js +445 -0
  1022. package/dist/internal/convert-grokbot/bot.d.ts +50 -0
  1023. package/dist/internal/convert-grokbot/bot.d.ts.map +1 -0
  1024. package/dist/internal/convert-grokbot/bot.js +72 -0
  1025. package/dist/internal/convert-grokbot/checks.d.ts +26 -0
  1026. package/dist/internal/convert-grokbot/checks.d.ts.map +1 -0
  1027. package/dist/internal/convert-grokbot/checks.js +170 -0
  1028. package/dist/internal/convert-grokbot/convert.d.ts +60 -0
  1029. package/dist/internal/convert-grokbot/convert.d.ts.map +1 -0
  1030. package/dist/internal/convert-grokbot/convert.js +470 -0
  1031. package/dist/internal/convert-grokbot/handoff.d.ts +44 -0
  1032. package/dist/internal/convert-grokbot/handoff.d.ts.map +1 -0
  1033. package/dist/internal/convert-grokbot/handoff.js +160 -0
  1034. package/dist/internal/convert-grokbot/recipe.d.ts +61 -0
  1035. package/dist/internal/convert-grokbot/recipe.d.ts.map +1 -0
  1036. package/dist/internal/convert-grokbot/recipe.js +94 -0
  1037. package/dist/internal/convert-grokbot/routine.d.ts +51 -0
  1038. package/dist/internal/convert-grokbot/routine.d.ts.map +1 -0
  1039. package/dist/internal/convert-grokbot/routine.js +128 -0
  1040. package/dist/internal/convert-grokbot/slack.d.ts +28 -0
  1041. package/dist/internal/convert-grokbot/slack.d.ts.map +1 -0
  1042. package/dist/internal/convert-grokbot/slack.js +50 -0
  1043. package/dist/internal/cron.d.ts +17 -0
  1044. package/dist/internal/cron.d.ts.map +1 -0
  1045. package/dist/internal/cron.js +60 -0
  1046. package/dist/internal/cursor/account-mcp.d.ts +135 -0
  1047. package/dist/internal/cursor/account-mcp.d.ts.map +1 -0
  1048. package/dist/internal/cursor/account-mcp.js +513 -0
  1049. package/dist/internal/cursor/backend-client.d.ts +229 -0
  1050. package/dist/internal/cursor/backend-client.d.ts.map +1 -0
  1051. package/dist/internal/cursor/backend-client.js +700 -0
  1052. package/dist/internal/cursor/bound-secret-file.d.ts +56 -0
  1053. package/dist/internal/cursor/bound-secret-file.d.ts.map +1 -0
  1054. package/dist/internal/cursor/bound-secret-file.js +88 -0
  1055. package/dist/internal/cursor/credentials.d.ts +196 -0
  1056. package/dist/internal/cursor/credentials.d.ts.map +1 -0
  1057. package/dist/internal/cursor/credentials.js +463 -0
  1058. package/dist/internal/cursor/cursor-api-transport.d.ts +37 -0
  1059. package/dist/internal/cursor/cursor-api-transport.d.ts.map +1 -0
  1060. package/dist/internal/cursor/cursor-api-transport.js +40 -0
  1061. package/dist/internal/cursor/github-credentials.d.ts +44 -0
  1062. package/dist/internal/cursor/github-credentials.d.ts.map +1 -0
  1063. package/dist/internal/cursor/github-credentials.js +174 -0
  1064. package/dist/internal/cursor/hosted-bound-secrets.d.ts +45 -0
  1065. package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -0
  1066. package/dist/internal/cursor/hosted-bound-secrets.js +64 -0
  1067. package/dist/internal/cursor/hosted-deployment-secrets.d.ts +30 -0
  1068. package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -0
  1069. package/dist/internal/cursor/hosted-deployment-secrets.js +97 -0
  1070. package/dist/internal/cursor/hosted-store-secrets.d.ts +39 -0
  1071. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -0
  1072. package/dist/internal/cursor/hosted-store-secrets.js +84 -0
  1073. package/dist/internal/cursor/session-token.d.ts +45 -0
  1074. package/dist/internal/cursor/session-token.d.ts.map +1 -0
  1075. package/dist/internal/cursor/session-token.js +85 -0
  1076. package/dist/internal/cursor/store-api-client.d.ts +60 -0
  1077. package/dist/internal/cursor/store-api-client.d.ts.map +1 -0
  1078. package/dist/internal/cursor/store-api-client.js +189 -0
  1079. package/dist/internal/cursor-account-mcp-auth.d.ts +70 -0
  1080. package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -0
  1081. package/dist/internal/cursor-account-mcp-auth.js +233 -0
  1082. package/dist/internal/cursor-agent-template.d.ts +9 -0
  1083. package/dist/internal/cursor-agent-template.d.ts.map +1 -0
  1084. package/dist/internal/cursor-agent-template.js +43 -0
  1085. package/dist/internal/cursor-deployment-relay.d.ts +95 -0
  1086. package/dist/internal/cursor-deployment-relay.d.ts.map +1 -0
  1087. package/dist/internal/cursor-deployment-relay.js +212 -0
  1088. package/dist/internal/cursor-event-relay.d.ts +243 -0
  1089. package/dist/internal/cursor-event-relay.d.ts.map +1 -0
  1090. package/dist/internal/cursor-event-relay.js +430 -0
  1091. package/dist/internal/cursor-relay-core.d.ts +160 -0
  1092. package/dist/internal/cursor-relay-core.d.ts.map +1 -0
  1093. package/dist/internal/cursor-relay-core.js +442 -0
  1094. package/dist/internal/deferred-channel-session.d.ts +21 -0
  1095. package/dist/internal/deferred-channel-session.d.ts.map +1 -0
  1096. package/dist/internal/deferred-channel-session.js +55 -0
  1097. package/dist/internal/deploy-client.d.ts +604 -0
  1098. package/dist/internal/deploy-client.d.ts.map +1 -0
  1099. package/dist/internal/deploy-client.js +1009 -0
  1100. package/dist/internal/deploy-manifest.d.ts +179 -0
  1101. package/dist/internal/deploy-manifest.d.ts.map +1 -0
  1102. package/dist/internal/deploy-manifest.js +320 -0
  1103. package/dist/internal/deploy-source.d.ts +38 -0
  1104. package/dist/internal/deploy-source.d.ts.map +1 -0
  1105. package/dist/internal/deploy-source.js +124 -0
  1106. package/dist/internal/describe-error.d.ts +6 -0
  1107. package/dist/internal/describe-error.d.ts.map +1 -0
  1108. package/dist/internal/describe-error.js +31 -0
  1109. package/dist/internal/dev-mode.d.ts +13 -0
  1110. package/dist/internal/dev-mode.d.ts.map +1 -0
  1111. package/dist/internal/dev-mode.js +17 -0
  1112. package/dist/internal/discovery/agent-config.d.ts +55 -0
  1113. package/dist/internal/discovery/agent-config.d.ts.map +1 -0
  1114. package/dist/internal/discovery/agent-config.js +230 -0
  1115. package/dist/internal/discovery/agent.d.ts +16 -0
  1116. package/dist/internal/discovery/agent.d.ts.map +1 -0
  1117. package/dist/internal/discovery/agent.js +347 -0
  1118. package/dist/internal/discovery/channels.d.ts +10 -0
  1119. package/dist/internal/discovery/channels.d.ts.map +1 -0
  1120. package/dist/internal/discovery/channels.js +88 -0
  1121. package/dist/internal/discovery/connections.d.ts +13 -0
  1122. package/dist/internal/discovery/connections.d.ts.map +1 -0
  1123. package/dist/internal/discovery/connections.js +430 -0
  1124. package/dist/internal/discovery/context.d.ts +36 -0
  1125. package/dist/internal/discovery/context.d.ts.map +1 -0
  1126. package/dist/internal/discovery/context.js +84 -0
  1127. package/dist/internal/discovery/cursor-plugin.d.ts +25 -0
  1128. package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -0
  1129. package/dist/internal/discovery/cursor-plugin.js +513 -0
  1130. package/dist/internal/discovery/extension-overlay.d.ts +31 -0
  1131. package/dist/internal/discovery/extension-overlay.d.ts.map +1 -0
  1132. package/dist/internal/discovery/extension-overlay.js +142 -0
  1133. package/dist/internal/discovery/extensions.d.ts +28 -0
  1134. package/dist/internal/discovery/extensions.d.ts.map +1 -0
  1135. package/dist/internal/discovery/extensions.js +376 -0
  1136. package/dist/internal/discovery/fs.d.ts +15 -0
  1137. package/dist/internal/discovery/fs.d.ts.map +1 -0
  1138. package/dist/internal/discovery/fs.js +92 -0
  1139. package/dist/internal/discovery/hooks.d.ts +7 -0
  1140. package/dist/internal/discovery/hooks.d.ts.map +1 -0
  1141. package/dist/internal/discovery/hooks.js +50 -0
  1142. package/dist/internal/discovery/info.d.ts +6 -0
  1143. package/dist/internal/discovery/info.d.ts.map +1 -0
  1144. package/dist/internal/discovery/info.js +166 -0
  1145. package/dist/internal/discovery/instructions.d.ts +7 -0
  1146. package/dist/internal/discovery/instructions.d.ts.map +1 -0
  1147. package/dist/internal/discovery/instructions.js +79 -0
  1148. package/dist/internal/discovery/instrumentation.d.ts +10 -0
  1149. package/dist/internal/discovery/instrumentation.d.ts.map +1 -0
  1150. package/dist/internal/discovery/instrumentation.js +29 -0
  1151. package/dist/internal/discovery/modules.d.ts +20 -0
  1152. package/dist/internal/discovery/modules.d.ts.map +1 -0
  1153. package/dist/internal/discovery/modules.js +88 -0
  1154. package/dist/internal/discovery/names.d.ts +14 -0
  1155. package/dist/internal/discovery/names.d.ts.map +1 -0
  1156. package/dist/internal/discovery/names.js +39 -0
  1157. package/dist/internal/discovery/project-public.d.ts +16 -0
  1158. package/dist/internal/discovery/project-public.d.ts.map +1 -0
  1159. package/dist/internal/discovery/project-public.js +54 -0
  1160. package/dist/internal/discovery/project.d.ts +57 -0
  1161. package/dist/internal/discovery/project.d.ts.map +1 -0
  1162. package/dist/internal/discovery/project.js +298 -0
  1163. package/dist/internal/discovery/reminders.d.ts +7 -0
  1164. package/dist/internal/discovery/reminders.d.ts.map +1 -0
  1165. package/dist/internal/discovery/reminders.js +54 -0
  1166. package/dist/internal/discovery/runtime.d.ts +34 -0
  1167. package/dist/internal/discovery/runtime.d.ts.map +1 -0
  1168. package/dist/internal/discovery/runtime.js +97 -0
  1169. package/dist/internal/discovery/schedules.d.ts +7 -0
  1170. package/dist/internal/discovery/schedules.d.ts.map +1 -0
  1171. package/dist/internal/discovery/schedules.js +107 -0
  1172. package/dist/internal/discovery/seed-files.d.ts +7 -0
  1173. package/dist/internal/discovery/seed-files.d.ts.map +1 -0
  1174. package/dist/internal/discovery/seed-files.js +30 -0
  1175. package/dist/internal/discovery/services.d.ts +27 -0
  1176. package/dist/internal/discovery/services.d.ts.map +1 -0
  1177. package/dist/internal/discovery/services.js +122 -0
  1178. package/dist/internal/discovery/skills.d.ts +11 -0
  1179. package/dist/internal/discovery/skills.d.ts.map +1 -0
  1180. package/dist/internal/discovery/skills.js +139 -0
  1181. package/dist/internal/discovery/subagent.d.ts +16 -0
  1182. package/dist/internal/discovery/subagent.d.ts.map +1 -0
  1183. package/dist/internal/discovery/subagent.js +113 -0
  1184. package/dist/internal/discovery/tools.d.ts +18 -0
  1185. package/dist/internal/discovery/tools.d.ts.map +1 -0
  1186. package/dist/internal/discovery/tools.js +144 -0
  1187. package/dist/internal/discovery.d.ts +15 -0
  1188. package/dist/internal/discovery.d.ts.map +1 -0
  1189. package/dist/internal/discovery.js +13 -0
  1190. package/dist/internal/distribution.d.ts +65 -0
  1191. package/dist/internal/distribution.d.ts.map +1 -0
  1192. package/dist/internal/distribution.js +102 -0
  1193. package/dist/internal/docs-site.d.ts +38 -0
  1194. package/dist/internal/docs-site.d.ts.map +1 -0
  1195. package/dist/internal/docs-site.js +216 -0
  1196. package/dist/internal/duration.d.ts +8 -0
  1197. package/dist/internal/duration.d.ts.map +1 -0
  1198. package/dist/internal/duration.js +35 -0
  1199. package/dist/internal/env-file.d.ts +19 -0
  1200. package/dist/internal/env-file.d.ts.map +1 -0
  1201. package/dist/internal/env-file.js +74 -0
  1202. package/dist/internal/estimate-cost.d.ts +55 -0
  1203. package/dist/internal/estimate-cost.d.ts.map +1 -0
  1204. package/dist/internal/estimate-cost.js +118 -0
  1205. package/dist/internal/eval-judge-model.d.ts +64 -0
  1206. package/dist/internal/eval-judge-model.d.ts.map +1 -0
  1207. package/dist/internal/eval-judge-model.js +129 -0
  1208. package/dist/internal/eval-run-store.d.ts +119 -0
  1209. package/dist/internal/eval-run-store.d.ts.map +1 -0
  1210. package/dist/internal/eval-run-store.js +479 -0
  1211. package/dist/internal/eval-runner.d.ts +106 -0
  1212. package/dist/internal/eval-runner.d.ts.map +1 -0
  1213. package/dist/internal/eval-runner.js +616 -0
  1214. package/dist/internal/eval-transport.d.ts +24 -0
  1215. package/dist/internal/eval-transport.d.ts.map +1 -0
  1216. package/dist/internal/eval-transport.js +22 -0
  1217. package/dist/internal/evals-client.d.ts +104 -0
  1218. package/dist/internal/evals-client.d.ts.map +1 -0
  1219. package/dist/internal/evals-client.js +299 -0
  1220. package/dist/internal/event-log.d.ts +94 -0
  1221. package/dist/internal/event-log.d.ts.map +1 -0
  1222. package/dist/internal/event-log.js +302 -0
  1223. package/dist/internal/event-mapper.d.ts +165 -0
  1224. package/dist/internal/event-mapper.d.ts.map +1 -0
  1225. package/dist/internal/event-mapper.js +665 -0
  1226. package/dist/internal/expected-delivery-failure.d.ts +3 -0
  1227. package/dist/internal/expected-delivery-failure.d.ts.map +1 -0
  1228. package/dist/internal/expected-delivery-failure.js +34 -0
  1229. package/dist/internal/factory-resource-channel.d.ts +33 -0
  1230. package/dist/internal/factory-resource-channel.d.ts.map +1 -0
  1231. package/dist/internal/factory-resource-channel.js +63 -0
  1232. package/dist/internal/filesystem/errors.d.ts +64 -0
  1233. package/dist/internal/filesystem/errors.d.ts.map +1 -0
  1234. package/dist/internal/filesystem/errors.js +172 -0
  1235. package/dist/internal/filesystem/format.d.ts +28 -0
  1236. package/dist/internal/filesystem/format.d.ts.map +1 -0
  1237. package/dist/internal/filesystem/format.js +209 -0
  1238. package/dist/internal/filesystem/merge.d.ts +34 -0
  1239. package/dist/internal/filesystem/merge.d.ts.map +1 -0
  1240. package/dist/internal/filesystem/merge.js +154 -0
  1241. package/dist/internal/filesystem/nearest.d.ts +15 -0
  1242. package/dist/internal/filesystem/nearest.d.ts.map +1 -0
  1243. package/dist/internal/filesystem/nearest.js +90 -0
  1244. package/dist/internal/filesystem/scratch.d.ts +60 -0
  1245. package/dist/internal/filesystem/scratch.d.ts.map +1 -0
  1246. package/dist/internal/filesystem/scratch.js +190 -0
  1247. package/dist/internal/filesystem/sdk-schemas.d.ts +29 -0
  1248. package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -0
  1249. package/dist/internal/filesystem/sdk-schemas.js +154 -0
  1250. package/dist/internal/filesystem/subagent-inherit.d.ts +39 -0
  1251. package/dist/internal/filesystem/subagent-inherit.d.ts.map +1 -0
  1252. package/dist/internal/filesystem/subagent-inherit.js +96 -0
  1253. package/dist/internal/filesystem/tools.d.ts +48 -0
  1254. package/dist/internal/filesystem/tools.d.ts.map +1 -0
  1255. package/dist/internal/filesystem/tools.js +648 -0
  1256. package/dist/internal/filesystem/walk.d.ts +77 -0
  1257. package/dist/internal/filesystem/walk.d.ts.map +1 -0
  1258. package/dist/internal/filesystem/walk.js +283 -0
  1259. package/dist/internal/framework-file-storage.d.ts +51 -0
  1260. package/dist/internal/framework-file-storage.d.ts.map +1 -0
  1261. package/dist/internal/framework-file-storage.js +291 -0
  1262. package/dist/internal/framework-storage-selection.d.ts +30 -0
  1263. package/dist/internal/framework-storage-selection.d.ts.map +1 -0
  1264. package/dist/internal/framework-storage-selection.js +84 -0
  1265. package/dist/internal/frontmatter.d.ts +20 -0
  1266. package/dist/internal/frontmatter.d.ts.map +1 -0
  1267. package/dist/internal/frontmatter.js +85 -0
  1268. package/dist/internal/github-fanout.d.ts +32 -0
  1269. package/dist/internal/github-fanout.d.ts.map +1 -0
  1270. package/dist/internal/github-fanout.js +106 -0
  1271. package/dist/internal/guest-network.d.ts +98 -0
  1272. package/dist/internal/guest-network.d.ts.map +1 -0
  1273. package/dist/internal/guest-network.js +313 -0
  1274. package/dist/internal/handleAgentServeTrigger.d.ts +98 -0
  1275. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -0
  1276. package/dist/internal/handleAgentServeTrigger.js +194 -0
  1277. package/dist/internal/hmac-secret-values.d.ts +48 -0
  1278. package/dist/internal/hmac-secret-values.d.ts.map +1 -0
  1279. package/dist/internal/hmac-secret-values.js +68 -0
  1280. package/dist/internal/host-files.d.ts +29 -0
  1281. package/dist/internal/host-files.d.ts.map +1 -0
  1282. package/dist/internal/host-files.js +256 -0
  1283. package/dist/internal/host-kv.d.ts +21 -0
  1284. package/dist/internal/host-kv.d.ts.map +1 -0
  1285. package/dist/internal/host-kv.js +62 -0
  1286. package/dist/internal/host-otel.d.ts +26 -0
  1287. package/dist/internal/host-otel.d.ts.map +1 -0
  1288. package/dist/internal/host-otel.js +184 -0
  1289. package/dist/internal/host-platforms.d.ts +58 -0
  1290. package/dist/internal/host-platforms.d.ts.map +1 -0
  1291. package/dist/internal/host-platforms.js +118 -0
  1292. package/dist/internal/hosted-admission-adapter.d.ts +36 -0
  1293. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -0
  1294. package/dist/internal/hosted-admission-adapter.js +7 -0
  1295. package/dist/internal/hosted-admission-context.d.ts +20 -0
  1296. package/dist/internal/hosted-admission-context.d.ts.map +1 -0
  1297. package/dist/internal/hosted-admission-context.js +31 -0
  1298. package/dist/internal/hosted-catch-protocol.d.ts +54 -0
  1299. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -0
  1300. package/dist/internal/hosted-catch-protocol.js +90 -0
  1301. package/dist/internal/hosted-catch.d.ts +42 -0
  1302. package/dist/internal/hosted-catch.d.ts.map +1 -0
  1303. package/dist/internal/hosted-catch.js +154 -0
  1304. package/dist/internal/hosted-delivery-protocol.d.ts +275 -0
  1305. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
  1306. package/dist/internal/hosted-delivery-protocol.js +708 -0
  1307. package/dist/internal/hosted-delivery.d.ts +135 -0
  1308. package/dist/internal/hosted-delivery.d.ts.map +1 -0
  1309. package/dist/internal/hosted-delivery.js +1098 -0
  1310. package/dist/internal/hosted-eval-cases.d.ts +21 -0
  1311. package/dist/internal/hosted-eval-cases.d.ts.map +1 -0
  1312. package/dist/internal/hosted-eval-cases.js +162 -0
  1313. package/dist/internal/hosted-execution-diag.d.ts +64 -0
  1314. package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
  1315. package/dist/internal/hosted-execution-diag.js +219 -0
  1316. package/dist/internal/hosted-execution-flush.d.ts +65 -0
  1317. package/dist/internal/hosted-execution-flush.d.ts.map +1 -0
  1318. package/dist/internal/hosted-execution-flush.js +113 -0
  1319. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  1320. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  1321. package/dist/internal/hosted-execution-latency.js +226 -0
  1322. package/dist/internal/hosted-managed-automation.d.ts +30 -0
  1323. package/dist/internal/hosted-managed-automation.d.ts.map +1 -0
  1324. package/dist/internal/hosted-managed-automation.js +83 -0
  1325. package/dist/internal/hosting.d.ts +62 -0
  1326. package/dist/internal/hosting.d.ts.map +1 -0
  1327. package/dist/internal/hosting.js +130 -0
  1328. package/dist/internal/http-channel-define.d.ts +11 -0
  1329. package/dist/internal/http-channel-define.d.ts.map +1 -0
  1330. package/dist/internal/http-channel-define.js +21 -0
  1331. package/dist/internal/http-channel.d.ts +54 -0
  1332. package/dist/internal/http-channel.d.ts.map +1 -0
  1333. package/dist/internal/http-channel.js +543 -0
  1334. package/dist/internal/http-control-plane-session.d.ts +54 -0
  1335. package/dist/internal/http-control-plane-session.d.ts.map +1 -0
  1336. package/dist/internal/http-control-plane-session.js +163 -0
  1337. package/dist/internal/ids.d.ts +27 -0
  1338. package/dist/internal/ids.d.ts.map +1 -0
  1339. package/dist/internal/ids.js +54 -0
  1340. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  1341. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  1342. package/dist/internal/incoming-headers-to-fetch.js +40 -0
  1343. package/dist/internal/init-interview.d.ts +64 -0
  1344. package/dist/internal/init-interview.d.ts.map +1 -0
  1345. package/dist/internal/init-interview.js +193 -0
  1346. package/dist/internal/init-project.d.ts +188 -0
  1347. package/dist/internal/init-project.d.ts.map +1 -0
  1348. package/dist/internal/init-project.js +492 -0
  1349. package/dist/internal/init-scaffold.d.ts +20 -0
  1350. package/dist/internal/init-scaffold.d.ts.map +1 -0
  1351. package/dist/internal/init-scaffold.js +194 -0
  1352. package/dist/internal/inline-stdio-define-stub.d.ts +3 -0
  1353. package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -0
  1354. package/dist/internal/inline-stdio-define-stub.js +4 -0
  1355. package/dist/internal/inline-stdio-mcp.d.ts +34 -0
  1356. package/dist/internal/inline-stdio-mcp.d.ts.map +1 -0
  1357. package/dist/internal/inline-stdio-mcp.js +170 -0
  1358. package/dist/internal/install-cursor-skills.d.ts +160 -0
  1359. package/dist/internal/install-cursor-skills.d.ts.map +1 -0
  1360. package/dist/internal/install-cursor-skills.js +464 -0
  1361. package/dist/internal/interview/agent-questions.d.ts +19 -0
  1362. package/dist/internal/interview/agent-questions.d.ts.map +1 -0
  1363. package/dist/internal/interview/agent-questions.js +120 -0
  1364. package/dist/internal/interview/question.d.ts +82 -0
  1365. package/dist/internal/interview/question.d.ts.map +1 -0
  1366. package/dist/internal/interview/question.js +198 -0
  1367. package/dist/internal/is-record.d.ts +2 -0
  1368. package/dist/internal/is-record.d.ts.map +1 -0
  1369. package/dist/internal/is-record.js +3 -0
  1370. package/dist/internal/json-schema.d.ts +25 -0
  1371. package/dist/internal/json-schema.d.ts.map +1 -0
  1372. package/dist/internal/json-schema.js +69 -0
  1373. package/dist/internal/legacy-command-guard.d.ts +24 -0
  1374. package/dist/internal/legacy-command-guard.d.ts.map +1 -0
  1375. package/dist/internal/legacy-command-guard.js +47 -0
  1376. package/dist/internal/listen-port.d.ts +22 -0
  1377. package/dist/internal/listen-port.d.ts.map +1 -0
  1378. package/dist/internal/listen-port.js +66 -0
  1379. package/dist/internal/local-control-plane.d.ts +59 -0
  1380. package/dist/internal/local-control-plane.d.ts.map +1 -0
  1381. package/dist/internal/local-control-plane.js +341 -0
  1382. package/dist/internal/local-env.d.ts +10 -0
  1383. package/dist/internal/local-env.d.ts.map +1 -0
  1384. package/dist/internal/local-env.js +55 -0
  1385. package/dist/internal/local-ingress.d.ts +35 -0
  1386. package/dist/internal/local-ingress.d.ts.map +1 -0
  1387. package/dist/internal/local-ingress.js +50 -0
  1388. package/dist/internal/log-ring.d.ts +23 -0
  1389. package/dist/internal/log-ring.d.ts.map +1 -0
  1390. package/dist/internal/log-ring.js +41 -0
  1391. package/dist/internal/logs-client.d.ts +98 -0
  1392. package/dist/internal/logs-client.d.ts.map +1 -0
  1393. package/dist/internal/logs-client.js +418 -0
  1394. package/dist/internal/map-pool.d.ts +11 -0
  1395. package/dist/internal/map-pool.d.ts.map +1 -0
  1396. package/dist/internal/map-pool.js +34 -0
  1397. package/dist/internal/mcp-endpoint.d.ts +84 -0
  1398. package/dist/internal/mcp-endpoint.d.ts.map +1 -0
  1399. package/dist/internal/mcp-endpoint.js +566 -0
  1400. package/dist/internal/mcp-host.d.ts +99 -0
  1401. package/dist/internal/mcp-host.d.ts.map +1 -0
  1402. package/dist/internal/mcp-host.js +422 -0
  1403. package/dist/internal/mcp-oauth-on-demand.d.ts +68 -0
  1404. package/dist/internal/mcp-oauth-on-demand.d.ts.map +1 -0
  1405. package/dist/internal/mcp-oauth-on-demand.js +250 -0
  1406. package/dist/internal/mcp-oauth-persist.d.ts +42 -0
  1407. package/dist/internal/mcp-oauth-persist.d.ts.map +1 -0
  1408. package/dist/internal/mcp-oauth-persist.js +76 -0
  1409. package/dist/internal/mcp-oauth.d.ts +118 -0
  1410. package/dist/internal/mcp-oauth.d.ts.map +1 -0
  1411. package/dist/internal/mcp-oauth.js +393 -0
  1412. package/dist/internal/memory-dir.d.ts +8 -0
  1413. package/dist/internal/memory-dir.d.ts.map +1 -0
  1414. package/dist/internal/memory-dir.js +7 -0
  1415. package/dist/internal/model-config.d.ts +7 -0
  1416. package/dist/internal/model-config.d.ts.map +1 -0
  1417. package/dist/internal/model-config.js +67 -0
  1418. package/dist/internal/named-webhook-secret.d.ts +39 -0
  1419. package/dist/internal/named-webhook-secret.d.ts.map +1 -0
  1420. package/dist/internal/named-webhook-secret.js +47 -0
  1421. package/dist/internal/net.d.ts +5 -0
  1422. package/dist/internal/net.d.ts.map +1 -0
  1423. package/dist/internal/net.js +28 -0
  1424. package/dist/internal/open-browser.d.ts +5 -0
  1425. package/dist/internal/open-browser.d.ts.map +1 -0
  1426. package/dist/internal/open-browser.js +33 -0
  1427. package/dist/internal/otel/attrs.d.ts +7 -0
  1428. package/dist/internal/otel/attrs.d.ts.map +1 -0
  1429. package/dist/internal/otel/attrs.js +13 -0
  1430. package/dist/internal/otel/collector.d.ts +50 -0
  1431. package/dist/internal/otel/collector.d.ts.map +1 -0
  1432. package/dist/internal/otel/collector.js +765 -0
  1433. package/dist/internal/otel/computer-use-attrs.d.ts +18 -0
  1434. package/dist/internal/otel/computer-use-attrs.d.ts.map +1 -0
  1435. package/dist/internal/otel/computer-use-attrs.js +30 -0
  1436. package/dist/internal/otel/config.d.ts +59 -0
  1437. package/dist/internal/otel/config.d.ts.map +1 -0
  1438. package/dist/internal/otel/config.js +236 -0
  1439. package/dist/internal/otel/conversation-span-processor.d.ts +9 -0
  1440. package/dist/internal/otel/conversation-span-processor.d.ts.map +1 -0
  1441. package/dist/internal/otel/conversation-span-processor.js +34 -0
  1442. package/dist/internal/otel/customer.d.ts +52 -0
  1443. package/dist/internal/otel/customer.d.ts.map +1 -0
  1444. package/dist/internal/otel/customer.js +727 -0
  1445. package/dist/internal/otel/http.d.ts +13 -0
  1446. package/dist/internal/otel/http.d.ts.map +1 -0
  1447. package/dist/internal/otel/http.js +93 -0
  1448. package/dist/internal/otel/mcp.d.ts +16 -0
  1449. package/dist/internal/otel/mcp.d.ts.map +1 -0
  1450. package/dist/internal/otel/mcp.js +46 -0
  1451. package/dist/internal/otel/propagation.d.ts +6 -0
  1452. package/dist/internal/otel/propagation.d.ts.map +1 -0
  1453. package/dist/internal/otel/propagation.js +14 -0
  1454. package/dist/internal/otel/runtime.d.ts +41 -0
  1455. package/dist/internal/otel/runtime.d.ts.map +1 -0
  1456. package/dist/internal/otel/runtime.js +92 -0
  1457. package/dist/internal/otel/tool-error-class.d.ts +4 -0
  1458. package/dist/internal/otel/tool-error-class.d.ts.map +1 -0
  1459. package/dist/internal/otel/tool-error-class.js +36 -0
  1460. package/dist/internal/otel-env.d.ts +6 -0
  1461. package/dist/internal/otel-env.d.ts.map +1 -0
  1462. package/dist/internal/otel-env.js +5 -0
  1463. package/dist/internal/package-inline-stdio.d.ts +12 -0
  1464. package/dist/internal/package-inline-stdio.d.ts.map +1 -0
  1465. package/dist/internal/package-inline-stdio.js +107 -0
  1466. package/dist/internal/peer-connections.d.ts +63 -0
  1467. package/dist/internal/peer-connections.d.ts.map +1 -0
  1468. package/dist/internal/peer-connections.js +115 -0
  1469. package/dist/internal/persistent-stage-log-mirror.d.ts +57 -0
  1470. package/dist/internal/persistent-stage-log-mirror.d.ts.map +1 -0
  1471. package/dist/internal/persistent-stage-log-mirror.js +231 -0
  1472. package/dist/internal/platform-schedule-sync.d.ts +17 -0
  1473. package/dist/internal/platform-schedule-sync.d.ts.map +1 -0
  1474. package/dist/internal/platform-schedule-sync.js +55 -0
  1475. package/dist/internal/platform-timers.d.ts +42 -0
  1476. package/dist/internal/platform-timers.d.ts.map +1 -0
  1477. package/dist/internal/platform-timers.js +251 -0
  1478. package/dist/internal/playground/static.d.ts +52 -0
  1479. package/dist/internal/playground/static.d.ts.map +1 -0
  1480. package/dist/internal/playground/static.js +230 -0
  1481. package/dist/internal/playground/toolchain.d.ts +57 -0
  1482. package/dist/internal/playground/toolchain.d.ts.map +1 -0
  1483. package/dist/internal/playground/toolchain.js +213 -0
  1484. package/dist/internal/playground-proxy.d.ts +69 -0
  1485. package/dist/internal/playground-proxy.d.ts.map +1 -0
  1486. package/dist/internal/playground-proxy.js +434 -0
  1487. package/dist/internal/process-memory-telemetry.d.ts +89 -0
  1488. package/dist/internal/process-memory-telemetry.d.ts.map +1 -0
  1489. package/dist/internal/process-memory-telemetry.js +226 -0
  1490. package/dist/internal/project-layout.d.ts +7 -0
  1491. package/dist/internal/project-layout.d.ts.map +1 -0
  1492. package/dist/internal/project-layout.js +24 -0
  1493. package/dist/internal/prompt-context.d.ts +38 -0
  1494. package/dist/internal/prompt-context.d.ts.map +1 -0
  1495. package/dist/internal/prompt-context.js +86 -0
  1496. package/dist/internal/reminder-control-plane-protocol.d.ts +196 -0
  1497. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
  1498. package/dist/internal/reminder-control-plane-protocol.js +279 -0
  1499. package/dist/internal/reminder-runner.d.ts +223 -0
  1500. package/dist/internal/reminder-runner.d.ts.map +1 -0
  1501. package/dist/internal/reminder-runner.js +1241 -0
  1502. package/dist/internal/reminder-schedule.d.ts +26 -0
  1503. package/dist/internal/reminder-schedule.d.ts.map +1 -0
  1504. package/dist/internal/reminder-schedule.js +83 -0
  1505. package/dist/internal/reminder-store.d.ts +78 -0
  1506. package/dist/internal/reminder-store.d.ts.map +1 -0
  1507. package/dist/internal/reminder-store.js +105 -0
  1508. package/dist/internal/request-error-status.d.ts +14 -0
  1509. package/dist/internal/request-error-status.d.ts.map +1 -0
  1510. package/dist/internal/request-error-status.js +77 -0
  1511. package/dist/internal/request-headers.d.ts +11 -0
  1512. package/dist/internal/request-headers.d.ts.map +1 -0
  1513. package/dist/internal/request-headers.js +14 -0
  1514. package/dist/internal/resolve-prod-target.d.ts +76 -0
  1515. package/dist/internal/resolve-prod-target.d.ts.map +1 -0
  1516. package/dist/internal/resolve-prod-target.js +215 -0
  1517. package/dist/internal/resolved-connections.d.ts +65 -0
  1518. package/dist/internal/resolved-connections.d.ts.map +1 -0
  1519. package/dist/internal/resolved-connections.js +108 -0
  1520. package/dist/internal/router.d.ts +33 -0
  1521. package/dist/internal/router.d.ts.map +1 -0
  1522. package/dist/internal/router.js +93 -0
  1523. package/dist/internal/run-client.d.ts +78 -0
  1524. package/dist/internal/run-client.d.ts.map +1 -0
  1525. package/dist/internal/run-client.js +369 -0
  1526. package/dist/internal/runtime-dispatch-runner.d.ts +25 -0
  1527. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -0
  1528. package/dist/internal/runtime-dispatch-runner.js +35 -0
  1529. package/dist/internal/sanitize-mcp-tool-name.d.ts +20 -0
  1530. package/dist/internal/sanitize-mcp-tool-name.d.ts.map +1 -0
  1531. package/dist/internal/sanitize-mcp-tool-name.js +28 -0
  1532. package/dist/internal/schedule-runner.d.ts +42 -0
  1533. package/dist/internal/schedule-runner.d.ts.map +1 -0
  1534. package/dist/internal/schedule-runner.js +157 -0
  1535. package/dist/internal/scm/pr-url.d.ts +56 -0
  1536. package/dist/internal/scm/pr-url.d.ts.map +1 -0
  1537. package/dist/internal/scm/pr-url.js +153 -0
  1538. package/dist/internal/sdk-runner.d.ts +204 -0
  1539. package/dist/internal/sdk-runner.d.ts.map +1 -0
  1540. package/dist/internal/sdk-runner.js +1006 -0
  1541. package/dist/internal/sdk-subagent-inherit-support.d.ts +9 -0
  1542. package/dist/internal/sdk-subagent-inherit-support.d.ts.map +1 -0
  1543. package/dist/internal/sdk-subagent-inherit-support.js +89 -0
  1544. package/dist/internal/secret-alternatives.d.ts +11 -0
  1545. package/dist/internal/secret-alternatives.d.ts.map +1 -0
  1546. package/dist/internal/secret-alternatives.js +13 -0
  1547. package/dist/internal/serve-restart.d.ts +42 -0
  1548. package/dist/internal/serve-restart.d.ts.map +1 -0
  1549. package/dist/internal/serve-restart.js +72 -0
  1550. package/dist/internal/server.d.ts +45 -0
  1551. package/dist/internal/server.d.ts.map +1 -0
  1552. package/dist/internal/server.js +2566 -0
  1553. package/dist/internal/session-cost.d.ts +49 -0
  1554. package/dist/internal/session-cost.d.ts.map +1 -0
  1555. package/dist/internal/session-cost.js +147 -0
  1556. package/dist/internal/session-engine.d.ts +955 -0
  1557. package/dist/internal/session-engine.d.ts.map +1 -0
  1558. package/dist/internal/session-engine.js +4880 -0
  1559. package/dist/internal/session-links.d.ts +14 -0
  1560. package/dist/internal/session-links.d.ts.map +1 -0
  1561. package/dist/internal/session-links.js +64 -0
  1562. package/dist/internal/session-live-publisher.d.ts +48 -0
  1563. package/dist/internal/session-live-publisher.d.ts.map +1 -0
  1564. package/dist/internal/session-live-publisher.js +415 -0
  1565. package/dist/internal/session-run-log.d.ts +108 -0
  1566. package/dist/internal/session-run-log.d.ts.map +1 -0
  1567. package/dist/internal/session-run-log.js +398 -0
  1568. package/dist/internal/session-store.d.ts +73 -0
  1569. package/dist/internal/session-store.d.ts.map +1 -0
  1570. package/dist/internal/session-store.js +279 -0
  1571. package/dist/internal/session-urls.d.ts +10 -0
  1572. package/dist/internal/session-urls.d.ts.map +1 -0
  1573. package/dist/internal/session-urls.js +25 -0
  1574. package/dist/internal/sessions-client.d.ts +63 -0
  1575. package/dist/internal/sessions-client.d.ts.map +1 -0
  1576. package/dist/internal/sessions-client.js +215 -0
  1577. package/dist/internal/skill-catalog.d.ts +28 -0
  1578. package/dist/internal/skill-catalog.d.ts.map +1 -0
  1579. package/dist/internal/skill-catalog.js +36 -0
  1580. package/dist/internal/skills-sync.d.ts +22 -0
  1581. package/dist/internal/skills-sync.d.ts.map +1 -0
  1582. package/dist/internal/skills-sync.js +40 -0
  1583. package/dist/internal/slack-provision-client.d.ts +199 -0
  1584. package/dist/internal/slack-provision-client.d.ts.map +1 -0
  1585. package/dist/internal/slack-provision-client.js +320 -0
  1586. package/dist/internal/slack-thread-key.d.ts +7 -0
  1587. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  1588. package/dist/internal/slack-thread-key.js +10 -0
  1589. package/dist/internal/sleep.d.ts +2 -0
  1590. package/dist/internal/sleep.d.ts.map +1 -0
  1591. package/dist/internal/sleep.js +3 -0
  1592. package/dist/internal/slug.d.ts +12 -0
  1593. package/dist/internal/slug.d.ts.map +1 -0
  1594. package/dist/internal/slug.js +38 -0
  1595. package/dist/internal/sqlite-experimental-warning.d.ts +2 -0
  1596. package/dist/internal/sqlite-experimental-warning.d.ts.map +1 -0
  1597. package/dist/internal/sqlite-experimental-warning.js +22 -0
  1598. package/dist/internal/start-log-store.d.ts +53 -0
  1599. package/dist/internal/start-log-store.d.ts.map +1 -0
  1600. package/dist/internal/start-log-store.js +155 -0
  1601. package/dist/internal/steering.d.ts +15 -0
  1602. package/dist/internal/steering.d.ts.map +1 -0
  1603. package/dist/internal/steering.js +17 -0
  1604. package/dist/internal/storage-coordinator.d.ts +200 -0
  1605. package/dist/internal/storage-coordinator.d.ts.map +1 -0
  1606. package/dist/internal/storage-coordinator.js +747 -0
  1607. package/dist/internal/storage-roles.d.ts +83 -0
  1608. package/dist/internal/storage-roles.d.ts.map +1 -0
  1609. package/dist/internal/storage-roles.js +24 -0
  1610. package/dist/internal/storage.d.ts +2 -0
  1611. package/dist/internal/storage.d.ts.map +1 -0
  1612. package/dist/internal/storage.js +1 -0
  1613. package/dist/internal/store-api-protocol.d.ts +164 -0
  1614. package/dist/internal/store-api-protocol.d.ts.map +1 -0
  1615. package/dist/internal/store-api-protocol.js +145 -0
  1616. package/dist/internal/store-mirror.d.ts +28 -0
  1617. package/dist/internal/store-mirror.d.ts.map +1 -0
  1618. package/dist/internal/store-mirror.js +54 -0
  1619. package/dist/internal/stream-progress.d.ts +14 -0
  1620. package/dist/internal/stream-progress.d.ts.map +1 -0
  1621. package/dist/internal/stream-progress.js +231 -0
  1622. package/dist/internal/terminal-style.d.ts +40 -0
  1623. package/dist/internal/terminal-style.d.ts.map +1 -0
  1624. package/dist/internal/terminal-style.js +93 -0
  1625. package/dist/internal/testing/conversation-identity-vectors.d.ts +53 -0
  1626. package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -0
  1627. package/dist/internal/testing/conversation-identity-vectors.js +170 -0
  1628. package/dist/internal/testing/factory-resource-fixtures.d.ts +64 -0
  1629. package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -0
  1630. package/dist/internal/testing/factory-resource-fixtures.js +55 -0
  1631. package/dist/internal/testing/hmac-secret-vectors.d.ts +38 -0
  1632. package/dist/internal/testing/hmac-secret-vectors.d.ts.map +1 -0
  1633. package/dist/internal/testing/hmac-secret-vectors.js +89 -0
  1634. package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts +42 -0
  1635. package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts.map +1 -0
  1636. package/dist/internal/testing/pagerduty-continuation-fixtures.js +175 -0
  1637. package/dist/internal/testing/scm-continuation-fixtures.d.ts +33 -0
  1638. package/dist/internal/testing/scm-continuation-fixtures.d.ts.map +1 -0
  1639. package/dist/internal/testing/scm-continuation-fixtures.js +257 -0
  1640. package/dist/internal/testing/slack-continuation-fixtures.d.ts +26 -0
  1641. package/dist/internal/testing/slack-continuation-fixtures.d.ts.map +1 -0
  1642. package/dist/internal/testing/slack-continuation-fixtures.js +136 -0
  1643. package/dist/internal/tool-call-retry.d.ts +87 -0
  1644. package/dist/internal/tool-call-retry.d.ts.map +1 -0
  1645. package/dist/internal/tool-call-retry.js +387 -0
  1646. package/dist/internal/tool-catalog.d.ts +31 -0
  1647. package/dist/internal/tool-catalog.d.ts.map +1 -0
  1648. package/dist/internal/tool-catalog.js +76 -0
  1649. package/dist/internal/tool-policy.d.ts +110 -0
  1650. package/dist/internal/tool-policy.d.ts.map +1 -0
  1651. package/dist/internal/tool-policy.js +138 -0
  1652. package/dist/internal/tool-result.d.ts +20 -0
  1653. package/dist/internal/tool-result.d.ts.map +1 -0
  1654. package/dist/internal/tool-result.js +50 -0
  1655. package/dist/internal/trajectory.d.ts +68 -0
  1656. package/dist/internal/trajectory.d.ts.map +1 -0
  1657. package/dist/internal/trajectory.js +336 -0
  1658. package/dist/internal/turn-governor.d.ts +54 -0
  1659. package/dist/internal/turn-governor.d.ts.map +1 -0
  1660. package/dist/internal/turn-governor.js +108 -0
  1661. package/dist/internal/turn-lease-store.d.ts +51 -0
  1662. package/dist/internal/turn-lease-store.d.ts.map +1 -0
  1663. package/dist/internal/turn-lease-store.js +172 -0
  1664. package/dist/internal/turn-outbox.d.ts +24 -0
  1665. package/dist/internal/turn-outbox.d.ts.map +1 -0
  1666. package/dist/internal/turn-outbox.js +65 -0
  1667. package/dist/internal/update-check.d.ts +93 -0
  1668. package/dist/internal/update-check.d.ts.map +1 -0
  1669. package/dist/internal/update-check.js +401 -0
  1670. package/dist/internal/v2-hosting.d.ts +34 -0
  1671. package/dist/internal/v2-hosting.d.ts.map +1 -0
  1672. package/dist/internal/v2-hosting.js +35 -0
  1673. package/dist/internal/workspace-sync.d.ts +44 -0
  1674. package/dist/internal/workspace-sync.d.ts.map +1 -0
  1675. package/dist/internal/workspace-sync.js +85 -0
  1676. package/dist/internal/workspace.d.ts +155 -0
  1677. package/dist/internal/workspace.d.ts.map +1 -0
  1678. package/dist/internal/workspace.js +468 -0
  1679. package/dist/internal/zod-schema.d.ts +14 -0
  1680. package/dist/internal/zod-schema.d.ts.map +1 -0
  1681. package/dist/internal/zod-schema.js +22 -0
  1682. package/dist/internal/zod3-datetime.d.ts +12 -0
  1683. package/dist/internal/zod3-datetime.d.ts.map +1 -0
  1684. package/dist/internal/zod3-datetime.js +17 -0
  1685. package/dist/kv/memory-kv.d.ts +24 -0
  1686. package/dist/kv/memory-kv.d.ts.map +1 -0
  1687. package/dist/kv/memory-kv.js +80 -0
  1688. package/dist/kv.d.ts +18 -0
  1689. package/dist/kv.d.ts.map +1 -0
  1690. package/dist/kv.js +16 -0
  1691. package/dist/memory.d.ts +113 -0
  1692. package/dist/memory.d.ts.map +1 -0
  1693. package/dist/memory.js +312 -0
  1694. package/dist/otel-public.d.ts +6 -0
  1695. package/dist/otel-public.d.ts.map +1 -0
  1696. package/dist/otel-public.js +5 -0
  1697. package/dist/otel.d.ts +31 -0
  1698. package/dist/otel.d.ts.map +1 -0
  1699. package/dist/otel.js +146 -0
  1700. package/dist/playground/assets/cursor-icons-16-DfKNljMZ.woff2 +0 -0
  1701. package/dist/playground/assets/index-B3_YohwW.js +62 -0
  1702. package/dist/playground/assets/index-Cn3-adsJ.css +1 -0
  1703. package/dist/playground/index.html +17 -0
  1704. package/dist/prompt.d.ts +39 -0
  1705. package/dist/prompt.d.ts.map +1 -0
  1706. package/dist/prompt.js +68 -0
  1707. package/dist/public-deprecated.d.ts +36 -0
  1708. package/dist/public-deprecated.d.ts.map +1 -0
  1709. package/dist/public-deprecated.js +39 -0
  1710. package/dist/reminders.d.ts +42 -0
  1711. package/dist/reminders.d.ts.map +1 -0
  1712. package/dist/reminders.js +45 -0
  1713. package/dist/schedules.d.ts +23 -0
  1714. package/dist/schedules.d.ts.map +1 -0
  1715. package/dist/schedules.js +26 -0
  1716. package/dist/skills.d.ts +22 -0
  1717. package/dist/skills.d.ts.map +1 -0
  1718. package/dist/skills.js +22 -0
  1719. package/dist/storage-backends/cursor-hosted-v2.d.ts +54 -0
  1720. package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -0
  1721. package/dist/storage-backends/cursor-hosted-v2.js +113 -0
  1722. package/dist/storage-backends/cursor-hosted.d.ts +94 -0
  1723. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -0
  1724. package/dist/storage-backends/cursor-hosted.js +225 -0
  1725. package/dist/storage-backends/file-kv.d.ts +42 -0
  1726. package/dist/storage-backends/file-kv.d.ts.map +1 -0
  1727. package/dist/storage-backends/file-kv.js +226 -0
  1728. package/dist/storage-protocol.d.ts +124 -0
  1729. package/dist/storage-protocol.d.ts.map +1 -0
  1730. package/dist/storage-protocol.js +181 -0
  1731. package/dist/storage.d.ts +254 -0
  1732. package/dist/storage.d.ts.map +1 -0
  1733. package/dist/storage.js +145 -0
  1734. package/dist/tools.d.ts +135 -0
  1735. package/dist/tools.d.ts.map +1 -0
  1736. package/dist/tools.js +78 -0
  1737. package/dist/types.d.ts +3804 -0
  1738. package/dist/types.d.ts.map +1 -0
  1739. package/dist/types.js +191 -0
  1740. package/docs/README.md +115 -0
  1741. package/docs/building-with-agents.md +139 -0
  1742. package/docs/changelog.md +119 -0
  1743. package/docs/deployment.md +314 -0
  1744. package/docs/evals.md +244 -0
  1745. package/docs/guides/agent-to-agent.md +167 -0
  1746. package/docs/guides/bitbucket.md +298 -0
  1747. package/docs/guides/cloud-agents.md +86 -0
  1748. package/docs/guides/convert-automation.md +185 -0
  1749. package/docs/guides/export-grokbot.md +244 -0
  1750. package/docs/guides/github.md +378 -0
  1751. package/docs/guides/gitlab.md +304 -0
  1752. package/docs/guides/grokbot-agents.md +140 -0
  1753. package/docs/guides/hooks.md +121 -0
  1754. package/docs/guides/improve.md +134 -0
  1755. package/docs/guides/jev.md +303 -0
  1756. package/docs/guides/mcp-oauth.md +153 -0
  1757. package/docs/guides/migrate.md +169 -0
  1758. package/docs/guides/opentelemetry.md +205 -0
  1759. package/docs/guides/pagerduty.md +341 -0
  1760. package/docs/guides/slack.md +314 -0
  1761. package/docs/guides/webhooks.md +255 -0
  1762. package/docs/hillclimbing.md +139 -0
  1763. package/docs/quickstart.md +312 -0
  1764. package/docs/reference/agent-config.md +243 -0
  1765. package/docs/reference/artifacts.md +118 -0
  1766. package/docs/reference/channels.md +219 -0
  1767. package/docs/reference/cli.md +1103 -0
  1768. package/docs/reference/connections.md +312 -0
  1769. package/docs/reference/evals.md +299 -0
  1770. package/docs/reference/extensions.md +214 -0
  1771. package/docs/reference/hooks.md +202 -0
  1772. package/docs/reference/http-api.md +226 -0
  1773. package/docs/reference/instructions.md +69 -0
  1774. package/docs/reference/memory.md +119 -0
  1775. package/docs/reference/playground.md +41 -0
  1776. package/docs/reference/project-layout.md +122 -0
  1777. package/docs/reference/prompt.md +52 -0
  1778. package/docs/reference/schedules.md +195 -0
  1779. package/docs/reference/sessions.md +205 -0
  1780. package/docs/reference/skills.md +77 -0
  1781. package/docs/reference/subagents.md +66 -0
  1782. package/docs/reference/tools.md +311 -0
  1783. package/docs/templates/agentic-owners.md +131 -0
  1784. package/docs/templates/grokbot-agents.md +60 -0
  1785. package/docs/templates/security-reviewer.md +86 -0
  1786. package/docs/templates/thermo-quality-review.md +80 -0
  1787. package/docs/templates/thermo-review.md +80 -0
  1788. package/docs/templates/triage.md +106 -0
  1789. package/docs/troubleshooting.md +154 -0
  1790. package/package.json +429 -4
  1791. package/schemas/grokbot-answers.schema.json +354 -0
  1792. package/scripts/install-cursor-skills.mjs +29 -0
  1793. package/skills/create-agent/SKILL.md +175 -0
  1794. package/skills/debug/SKILL.md +43 -0
  1795. package/skills/deploy/SKILL.md +169 -0
  1796. package/skills/evals/SKILL.md +145 -0
  1797. package/skills/framework-map/SKILL.md +128 -0
  1798. package/skills/github/SKILL.md +133 -0
  1799. package/skills/hillclimb/SKILL.md +63 -0
  1800. package/skills/mcp-auth/SKILL.md +60 -0
  1801. package/skills/migrate-v2/SKILL.md +397 -0
  1802. package/skills/otel/SKILL.md +48 -0
  1803. package/skills/setup-slack/SKILL.md +136 -0
  1804. package/templates/agentic-owners/README.md +78 -0
  1805. package/templates/agentic-owners/bot/agent.ts +8 -0
  1806. package/templates/agentic-owners/bot/channels/github.ts +63 -0
  1807. package/templates/agentic-owners/bot/instructions.md +34 -0
  1808. package/templates/agentic-owners/bot/lib/config.ts +5 -0
  1809. package/templates/agentic-owners/bot/lib/github.ts +219 -0
  1810. package/templates/agentic-owners/bot/lib/owners/README.md +50 -0
  1811. package/templates/agentic-owners/bot/lib/owners/constants.ts +22 -0
  1812. package/templates/agentic-owners/bot/lib/owners/decision.ts +480 -0
  1813. package/templates/agentic-owners/bot/lib/owners/globalOverride.ts +60 -0
  1814. package/templates/agentic-owners/bot/lib/owners/handles.ts +54 -0
  1815. package/templates/agentic-owners/bot/lib/owners/match.ts +287 -0
  1816. package/templates/agentic-owners/bot/lib/owners/matching.ts +147 -0
  1817. package/templates/agentic-owners/bot/lib/owners/parse.ts +696 -0
  1818. package/templates/agentic-owners/bot/lib/owners/policyMode.ts +57 -0
  1819. package/templates/agentic-owners/bot/lib/owners/prompt.ts +64 -0
  1820. package/templates/agentic-owners/bot/lib/owners/prompts/base-review.md +105 -0
  1821. package/templates/agentic-owners/bot/lib/owners/types.ts +73 -0
  1822. package/templates/agentic-owners/bot/lib/review.ts +723 -0
  1823. package/templates/agentic-owners/bot/tools/record_review.ts +62 -0
  1824. package/templates/agentic-owners/evals/evals.config.ts +5 -0
  1825. package/templates/agentic-owners/evals/owners.eval.ts +111 -0
  1826. package/templates/agentic-owners/package.json +20 -0
  1827. package/templates/agentic-owners/tsconfig.json +12 -0
  1828. package/templates/agents-md/README.md +43 -0
  1829. package/templates/agents-md/bot/agent.ts +8 -0
  1830. package/templates/agents-md/bot/channels/github.ts +10 -0
  1831. package/templates/agents-md/bot/channels/queue.ts +23 -0
  1832. package/templates/agents-md/bot/channels/slack.ts +9 -0
  1833. package/templates/agents-md/bot/instructions.md +38 -0
  1834. package/templates/agents-md/bot/lib/collect.ts +412 -0
  1835. package/templates/agents-md/bot/lib/config.ts +8 -0
  1836. package/templates/agents-md/bot/lib/paths.ts +49 -0
  1837. package/templates/agents-md/bot/schedules/weekly.ts +17 -0
  1838. package/templates/agents-md/bot/tools/apply_agents.ts +217 -0
  1839. package/templates/agents-md/evals/agents.eval.ts +136 -0
  1840. package/templates/agents-md/evals/evals.config.ts +5 -0
  1841. package/templates/agents-md/init.json +38 -0
  1842. package/templates/agents-md/package.json +18 -0
  1843. package/templates/agents-md/tsconfig.json +12 -0
  1844. package/templates/code-wiki/README.md +34 -0
  1845. package/templates/code-wiki/bot/agent.ts +8 -0
  1846. package/templates/code-wiki/bot/channels/github.ts +125 -0
  1847. package/templates/code-wiki/bot/instructions.md +39 -0
  1848. package/templates/code-wiki/bot/lib/repos.ts +5 -0
  1849. package/templates/code-wiki/bot/lib/wiki.ts +22 -0
  1850. package/templates/code-wiki/bot/tools/apply_wiki.ts +210 -0
  1851. package/templates/code-wiki/evals/evals.config.ts +5 -0
  1852. package/templates/code-wiki/evals/wiki.eval.ts +124 -0
  1853. package/templates/code-wiki/init.json +25 -0
  1854. package/templates/code-wiki/package.json +18 -0
  1855. package/templates/code-wiki/tsconfig.json +12 -0
  1856. package/templates/demo/README.md +37 -0
  1857. package/templates/demo/bot/agent.ts +8 -0
  1858. package/templates/demo/bot/channels/github.ts +52 -0
  1859. package/templates/demo/bot/channels/queue.ts +24 -0
  1860. package/templates/demo/bot/instructions.md +8 -0
  1861. package/templates/demo/bot/lib/collect.ts +66 -0
  1862. package/templates/demo/bot/lib/repos.ts +5 -0
  1863. package/templates/demo/bot/tools/record_demo.ts +37 -0
  1864. package/templates/demo/evals/demo.eval.ts +29 -0
  1865. package/templates/demo/evals/evals.config.ts +5 -0
  1866. package/templates/demo/init.json +25 -0
  1867. package/templates/demo/package.json +18 -0
  1868. package/templates/demo/tsconfig.json +12 -0
  1869. package/templates/grokbot-agents/README.md +27 -0
  1870. package/templates/grokbot-agents/bot/agent.ts +6 -0
  1871. package/templates/grokbot-agents/bot/extensions/grokbot.ts +5 -0
  1872. package/templates/grokbot-agents/bot/instructions.md +7 -0
  1873. package/templates/grokbot-agents/evals/evals.config.ts +5 -0
  1874. package/templates/grokbot-agents/evals/grokbot-agents.eval.ts +18 -0
  1875. package/templates/grokbot-agents/init.json +18 -0
  1876. package/templates/grokbot-agents/package.json +17 -0
  1877. package/templates/grokbot-agents/tsconfig.json +12 -0
  1878. package/templates/pr-autofixer/bot/agent.ts +11 -0
  1879. package/templates/pr-autofixer/bot/channels/drive.ts +24 -0
  1880. package/templates/pr-autofixer/bot/channels/github.ts +155 -0
  1881. package/templates/pr-autofixer/bot/channels/slack.ts +16 -0
  1882. package/templates/pr-autofixer/bot/hooks/bind-agent.ts +19 -0
  1883. package/templates/pr-autofixer/bot/instructions.md +83 -0
  1884. package/templates/pr-autofixer/bot/lib/affinity.ts +24 -0
  1885. package/templates/pr-autofixer/bot/lib/drive-schemas.ts +18 -0
  1886. package/templates/pr-autofixer/bot/lib/drive.ts +73 -0
  1887. package/templates/pr-autofixer/bot/lib/merge-watch.ts +116 -0
  1888. package/templates/pr-autofixer/bot/lib/pr-state.ts +40 -0
  1889. package/templates/pr-autofixer/bot/lib/repos.ts +18 -0
  1890. package/templates/pr-autofixer/bot/lib/start-drive.ts +113 -0
  1891. package/templates/pr-autofixer/bot/lib/webhook-buffer.ts +215 -0
  1892. package/templates/pr-autofixer/bot/lib/webhook-routing.ts +231 -0
  1893. package/templates/pr-autofixer/bot/tools/drive_pr.ts +21 -0
  1894. package/templates/pr-autofixer/evals/coordinator.eval.ts +16 -0
  1895. package/templates/pr-autofixer/evals/evals.config.ts +5 -0
  1896. package/templates/pr-autofixer/init.json +25 -0
  1897. package/templates/pr-autofixer/package.json +18 -0
  1898. package/templates/pr-autofixer/tsconfig.json +12 -0
  1899. package/templates/security-help/README.md +46 -0
  1900. package/templates/security-help/bot/agent.ts +17 -0
  1901. package/templates/security-help/bot/channels/github.ts +13 -0
  1902. package/templates/security-help/bot/channels/slack.ts +84 -0
  1903. package/templates/security-help/bot/instructions.md +19 -0
  1904. package/templates/security-help/bot/lib/pr-first-pass.ts +40 -0
  1905. package/templates/security-help/bot/lib/repos.ts +5 -0
  1906. package/templates/security-help/bot/skills/access-request.md +10 -0
  1907. package/templates/security-help/bot/skills/faq.md +31 -0
  1908. package/templates/security-help/bot/skills/security-playbooks.md +12 -0
  1909. package/templates/security-help/bot/skills/security-pr-first-pass.md +12 -0
  1910. package/templates/security-help/evals/evals.config.ts +5 -0
  1911. package/templates/security-help/evals/security-help.eval.ts +51 -0
  1912. package/templates/security-help/init.json +31 -0
  1913. package/templates/security-help/package.json +17 -0
  1914. package/templates/security-help/tsconfig.json +12 -0
  1915. package/templates/security-reviewer/README.md +33 -0
  1916. package/templates/security-reviewer/bot/agent.ts +8 -0
  1917. package/templates/security-reviewer/bot/channels/github.ts +43 -0
  1918. package/templates/security-reviewer/bot/instructions.md +22 -0
  1919. package/templates/security-reviewer/bot/lib/repos.ts +5 -0
  1920. package/templates/security-reviewer/bot/tools/post_findings.ts +68 -0
  1921. package/templates/security-reviewer/evals/evals.config.ts +5 -0
  1922. package/templates/security-reviewer/evals/review.eval.ts +50 -0
  1923. package/templates/security-reviewer/init.json +25 -0
  1924. package/templates/security-reviewer/package.json +18 -0
  1925. package/templates/security-reviewer/tsconfig.json +12 -0
  1926. package/templates/thermo-quality-review/README.md +35 -0
  1927. package/templates/thermo-quality-review/bot/agent.ts +8 -0
  1928. package/templates/thermo-quality-review/bot/channels/github.ts +39 -0
  1929. package/templates/thermo-quality-review/bot/instructions.md +43 -0
  1930. package/templates/thermo-quality-review/bot/tools/post_findings.ts +67 -0
  1931. package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
  1932. package/templates/thermo-quality-review/evals/review.eval.ts +59 -0
  1933. package/templates/thermo-quality-review/package.json +18 -0
  1934. package/templates/thermo-quality-review/tsconfig.json +12 -0
  1935. package/templates/thermo-review/README.md +35 -0
  1936. package/templates/thermo-review/bot/agent.ts +8 -0
  1937. package/templates/thermo-review/bot/channels/github.ts +39 -0
  1938. package/templates/thermo-review/bot/instructions.md +40 -0
  1939. package/templates/thermo-review/bot/tools/post_findings.ts +67 -0
  1940. package/templates/thermo-review/evals/evals.config.ts +5 -0
  1941. package/templates/thermo-review/evals/review.eval.ts +50 -0
  1942. package/templates/thermo-review/package.json +18 -0
  1943. package/templates/thermo-review/tsconfig.json +12 -0
  1944. package/templates/triage/README.md +47 -0
  1945. package/templates/triage/bot/agent.ts +8 -0
  1946. package/templates/triage/bot/channels/queue.ts +29 -0
  1947. package/templates/triage/bot/channels/webhook.ts +41 -0
  1948. package/templates/triage/bot/hooks/memory.ts +3 -0
  1949. package/templates/triage/bot/instructions.md +38 -0
  1950. package/templates/triage/bot/lib/actuate.ts +703 -0
  1951. package/templates/triage/bot/lib/parse-queue-event.ts +160 -0
  1952. package/templates/triage/bot/lib/tracker.ts +5 -0
  1953. package/templates/triage/bot/lib/types.ts +48 -0
  1954. package/templates/triage/bot/lib/verify-webhook.ts +79 -0
  1955. package/templates/triage/bot/skills/triage-rubric.md +44 -0
  1956. package/templates/triage/bot/tools/record_triage.ts +29 -0
  1957. package/templates/triage/evals/evals.config.ts +5 -0
  1958. package/templates/triage/evals/triage.eval.ts +64 -0
  1959. package/templates/triage/overlays/jira/README.md +21 -0
  1960. package/templates/triage/overlays/jira/bot/lib/tracker.ts +8 -0
  1961. package/templates/triage/overlays/jira/bot/mcp-connections/tracker.ts +6 -0
  1962. package/templates/triage/overlays/linear/README.md +21 -0
  1963. package/templates/triage/overlays/linear/bot/lib/tracker.ts +8 -0
  1964. package/templates/triage/overlays/linear/bot/mcp-connections/tracker.ts +6 -0
  1965. package/templates/triage/package.json +18 -0
  1966. package/templates/triage/tsconfig.json +12 -0
@@ -0,0 +1,3804 @@
1
+ /**
2
+ * Public types for @cursor/bdk.
3
+ *
4
+ * The framework is filesystem-first: customers author an agent as files under
5
+ * an `agent/` directory (markdown for prose, TypeScript for typed behavior),
6
+ * and the framework discovers those files, compiles them into an
7
+ * {@link AgentProject}, and serves the agent over channels using the Cursor
8
+ * SDK as the execution harness.
9
+ */
10
+ import type { InteractionUpdate, LocalSubagentInherit, SDKCustomTool, ToolName } from "@cursor/sdk";
11
+ import type * as z3 from "zod/v3";
12
+ import type * as z4 from "zod/v4";
13
+ import type * as z4core from "zod/v4/core";
14
+ import type * as z4mini from "zod/v4/mini";
15
+ import type { FileSystem } from "./filesystem.js";
16
+ import type { ContinuationClaim, ContinuationIdentity, MailboxContinuation } from "./internal/continuation-identity.js";
17
+ import type { StorageDefinition } from "./storage.js";
18
+ import type { Octokit } from "@octokit/rest";
19
+ import type { WebClient } from "@slack/web-api";
20
+ import type { HostEvalsApi } from "./evals.js";
21
+ export type { HostEvalsApi };
22
+ export type { StorageDefinition };
23
+ export type JsonPrimitive = string | number | boolean | null;
24
+ export type JsonValue = JsonPrimitive | JsonValue[] | JsonObject;
25
+ export type JsonObject = {
26
+ [key: string]: JsonValue;
27
+ };
28
+ /** A plain JSON Schema object (already-serialized tool input schema). */
29
+ export type JsonSchemaObject = Record<string, unknown>;
30
+ /**
31
+ * A `zod/v4` schema, classic (`zod/v4`) or mini (`zod/v4/mini`), with
32
+ * output `TOutput` and input `TInput`. Both kinds have `parse`/`safeParse`.
33
+ */
34
+ export type ZodV4Schema<TOutput = unknown, TInput = unknown> = z4.ZodType<TOutput, TInput> | z4mini.ZodMiniType<TOutput, TInput>;
35
+ /**
36
+ * A zod schema that the public API accepts: a `zod/v3` schema or a
37
+ * {@link ZodV4Schema}. zod 3.25 and later ship both entry points.
38
+ */
39
+ export type ZodSchema = z3.ZodTypeAny | ZodV4Schema;
40
+ /** The parsed (output) type of a {@link ZodSchema}. */
41
+ export type ZodSchemaOutput<TSchema> = TSchema extends z3.ZodTypeAny ? z3.output<TSchema> : TSchema extends z4core.$ZodType ? z4core.output<TSchema> : never;
42
+ /** The accepted (input) type of a {@link ZodSchema}, before defaults and transforms. */
43
+ export type ZodSchemaInput<TSchema> = TSchema extends z3.ZodTypeAny ? z3.input<TSchema> : TSchema extends z4core.$ZodType ? z4core.input<TSchema> : never;
44
+ /**
45
+ * Discriminates the `define*` helper that produced a module's default export
46
+ * so discovery can validate that a file landed in the right authored slot.
47
+ */
48
+ export type DefinitionKind = "agent" | "instructions" | "tool" | "skill" | "extension" | "disabled-tool" | "disabled-connection" | "disabled" | "connection" | "channel" | "http-channel" | "schedule" | "reminder" | "hook" | "eval" | "storage" | "artifacts";
49
+ export interface BrandedDefinition<K extends DefinitionKind> {
50
+ readonly __agentServe: K;
51
+ }
52
+ /**
53
+ * A Cursor model selection. Either a bare model id (`"gpt-5.2"`) or an id
54
+ * with model parameters, mirroring the Cursor SDK's `ModelSelection`.
55
+ */
56
+ export type ModelSetting = string | {
57
+ id: string;
58
+ params?: Array<{
59
+ id: string;
60
+ value: string;
61
+ }>;
62
+ };
63
+ export type SessionModelConfig = {
64
+ model: {
65
+ id: string;
66
+ params: Array<{
67
+ id: string;
68
+ value: string;
69
+ }>;
70
+ };
71
+ fallbacks?: Array<{
72
+ id: string;
73
+ params: Array<{
74
+ id: string;
75
+ value: string;
76
+ }>;
77
+ }>;
78
+ };
79
+ /**
80
+ * Model used when the root agent omits `model` (local Cursor agents have no
81
+ * harness-level default of their own).
82
+ */
83
+ export declare const DEFAULT_MODEL: ModelSetting;
84
+ /** Runtime selector. New public agents use the default local runtime. */
85
+ export type AgentRuntime = "local" | "cloud" | "grokbot";
86
+ /** Options used when launching Cursor cloud agents. */
87
+ export interface AgentCloudOptions {
88
+ env?: {
89
+ type: "cloud";
90
+ name?: string;
91
+ } | {
92
+ type: "pool";
93
+ name?: string;
94
+ } | {
95
+ type: "machine";
96
+ name?: string;
97
+ };
98
+ repos?: Array<{
99
+ url: string;
100
+ startingRef?: string;
101
+ prUrl?: string;
102
+ }>;
103
+ workOnCurrentBranch?: boolean;
104
+ autoCreatePR?: boolean;
105
+ skipReviewerRequest?: boolean;
106
+ /**
107
+ * Per-session env vars injected into the cloud agent's shell.
108
+ * When set, the cloud API mints the SDK agent id (persisted as
109
+ * {@link SessionRecord.sdkAgentId}).
110
+ */
111
+ envVars?: Record<string, string>;
112
+ }
113
+ /** Safe `/v1/info` projection of {@link AgentCloudOptions}; secret values are omitted. */
114
+ export type AgentCloudPublicInfo = Omit<AgentCloudOptions, "envVars"> & {
115
+ envVarsConfigured?: boolean;
116
+ };
117
+ export declare function toPublicCloudInfo(cloud: AgentCloudOptions): AgentCloudPublicInfo;
118
+ /**
119
+ * Session-scoped facts an `fs` factory needs and does not otherwise
120
+ * have at `defineAgent` time. The factory returns a handle: each
121
+ * method must observe the current binding. Do not snapshot the tree.
122
+ */
123
+ export interface FsContext {
124
+ sessionId: string;
125
+ agentName?: string;
126
+ continuationKey?: string;
127
+ host?: {
128
+ files: HostFilesApi;
129
+ reminders?: ReminderHostApi;
130
+ kv?: HostKvApi;
131
+ };
132
+ }
133
+ /** @deprecated Use FsContext. */
134
+ export type RootContext = FsContext;
135
+ /** Input to an {@link AgentConfig.skills} callback. */
136
+ export interface SkillsMountContext {
137
+ /** Read-only. Layout is `/<name>/SKILL.md` plus sibling files. Mounted at `/agent/skills`. */
138
+ readonly skills: FileSystem;
139
+ readonly sessionId: string;
140
+ readonly continuationKey?: string;
141
+ }
142
+ /** Input to `defineAgent` (authored at `agent/agent.ts`). */
143
+ export interface AgentConfig {
144
+ /**
145
+ * Cursor model to run the agent on. Defaults to {@link DEFAULT_MODEL} on
146
+ * the root agent when omitted. Subagents omit it to inherit the parent's
147
+ * model.
148
+ */
149
+ model?: ModelSetting;
150
+ /**
151
+ * Models to try, in order, when {@link model} is rejected before the
152
+ * turn produces any output: catalog refusal ("Cannot use this model"),
153
+ * a team admin block ("Model Blocked"), or a capacity error
154
+ * (`resource_exhausted` / `[unavailable]`). The
155
+ * rejection is usually inside agent creation, before authored tools
156
+ * run, so a fallback list on the agent is the only retry that can save
157
+ * the turn. Each entry is the same shape as {@link model}.
158
+ */
159
+ fallbacks?: readonly ModelSetting[];
160
+ /**
161
+ * Keep walking {@link fallbacks} when the rejection arrives after the turn
162
+ * has already streamed output. The next model restarts the turn, so
163
+ * anything the rejected model emitted is streamed a second time: only set
164
+ * this on an agent whose result is delivered when the turn ends, never on
165
+ * one a person is reading live.
166
+ */
167
+ fallbackAfterStream?: boolean;
168
+ /**
169
+ * What this agent is for. Required on subagents: the parent model reads it
170
+ * to decide when to delegate. Optional (documentation only) on the root.
171
+ */
172
+ description?: string;
173
+ /** Display name override. Defaults to the package name / directory name. */
174
+ name?: string;
175
+ /**
176
+ * Inline instructions. Prefer `instructions.md` next to `agent.ts`; this
177
+ * exists for subagents and generated configs.
178
+ */
179
+ instructions?: string;
180
+ /**
181
+ * Execution runtime. Defaults to `"local"`. Compatibility strings
182
+ * `"cloud"` and `"grokbot"` remain for agents that already ship; they
183
+ * are not a product surface. New agents omit this field.
184
+ */
185
+ runtime?: AgentRuntime;
186
+ /**
187
+ * The FileSystem the model can see. Omit it and the root is the host
188
+ * disk. `fs` is mounted at `/`. BDK mounts `/tmp` and `/agent/skills`
189
+ * over it, so the authored tree must not have anything at
190
+ * `/agent/skills` unless {@link skills} is `false`.
191
+ *
192
+ * A static handle (`tempFs`, `unionFs`, ...) is that object on
193
+ * every session — writes are shared. Pass `(ctx) => …` and return a
194
+ * new handle per session when you want isolation. A factory that
195
+ * returns the same object still shares. Incompatible with
196
+ * {@link local} `cwd` / `workspaceDir` / `sandbox` and with
197
+ * {@link runtime} `"cloud"`.
198
+ */
199
+ fs?: FileSystem | ((ctx: FsContext) => FileSystem | Promise<FileSystem>);
200
+ /** @deprecated Alias of fs. Setting both is a discovery error. */
201
+ root?: FileSystem | ((ctx: FsContext) => FileSystem | Promise<FileSystem>);
202
+ /**
203
+ * What an {@link fs} agent sees at `/agent/skills`. Omit it to mount
204
+ * the discovered `agent/skills/` read-only and index them in the
205
+ * instructions. Pass a callback to mount the tree it returns instead,
206
+ * for example the discovered skills plus tenant skills. The index
207
+ * still lists only discovered skills. `false` mounts nothing and
208
+ * drops the index. Host-disk agents get `.cursor/skills/` and ignore
209
+ * this field.
210
+ */
211
+ skills?: false | ((ctx: SkillsMountContext) => FileSystem | Promise<FileSystem>);
212
+ /**
213
+ * Cloud attach defaults merged under per-session
214
+ * {@link SendMessageOptions.cloud}. Used by existing agents that still
215
+ * set {@link runtime} `"cloud"` and by hybrid channel/tool handoffs.
216
+ * In-process `agent/tools` run on local turns only.
217
+ */
218
+ cloud?: AgentCloudOptions;
219
+ /** Local harness defaults. */
220
+ local?: AgentLocalOptions;
221
+ /**
222
+ * Managed-hosting declarations (`agent-sdk deploy` onto Cursor's
223
+ * agent-serve hosting). The manifest is the source of truth: deploy reads
224
+ * it and sends it with the deployment request. Ignored by local serving.
225
+ * Mounted extensions add their own {@link ExtensionOptions.hosting}.
226
+ */
227
+ hosting?: AgentHostingOptions;
228
+ /**
229
+ * Engine-wide turn admission limits. See {@link AgentConcurrencyOptions}.
230
+ */
231
+ concurrency?: AgentConcurrencyOptions;
232
+ /**
233
+ * Framework-provided model-facing tools, opted in per capability. See
234
+ * {@link BuiltinToolsConfig}.
235
+ */
236
+ builtinTools?: BuiltinToolsConfig;
237
+ /**
238
+ * Allowlist of built-in harness tools offered to the model
239
+ * (`AgentOptions.tools` on the SDK). Opt-in by design: unset keeps the
240
+ * model's full standard toolset, and once set the agent gets exactly
241
+ * what it names — nothing more, `[]` meaning no native built-in tools.
242
+ * There is deliberately no exclusion form: an agent that restricts
243
+ * tools states what it keeps, so tools the platform adds later stay
244
+ * off until someone opts in.
245
+ *
246
+ * `"mcp"` is always granted alongside a configured allowlist. It is
247
+ * transport, not capability: this kit's own server tools reach the
248
+ * model over the SDK custom-tool MCP path, so omitting it would
249
+ * silently strand `agent/tools/`. What MCP actually exposes stays
250
+ * governed by the second layer — the tools you author, the connections
251
+ * you declare, and the harness cwd's ambient `.cursor` config (point
252
+ * `local.cwd` outside checkouts whose MCP servers the agent must not
253
+ * see, and `local.sandbox` makes MCP calls fail closed).
254
+ *
255
+ * Names use the SDK's public tool vocabulary (`"shell"`, `"read"`,
256
+ * `"edit"`, `"grep"`, `"glob"`, `"ls"`, `"task"`, ...). `"shell"` is a
257
+ * capability group that also grants shell stdin writes — and is what
258
+ * `execution: "agent"` tool scripts run through, so an allowlist
259
+ * without it strands them (discovery warns). `"task"` gates subagents.
260
+ * Unknown names fail the turn (`ConfigurationError` at `Agent.create`).
261
+ *
262
+ * This is not a security boundary against the serve host: like
263
+ * `local.sandbox`, it only shapes what the model can call.
264
+ */
265
+ tools?: ToolName[];
266
+ /**
267
+ * Hosted architecture. Defaults to `"v2"`. Set `"v1"` to stay on the
268
+ * resident-engine architecture.
269
+ */
270
+ architecture?: AgentArchitecture;
271
+ /**
272
+ * Persistent hosting for `architecture: "v2"`.
273
+ *
274
+ * Default (`false`): each session boots a pod from the release snapshot;
275
+ * framework and author state are mirrored to Cursor stores because pod
276
+ * disks are disposable.
277
+ *
278
+ * `true`: one long-lived pod per deployment runs each deployed version as
279
+ * a container over one state directory on the pod's disk. Nothing is
280
+ * mirrored: that directory is the durable copy. A redeploy starts the new
281
+ * version beside the old one on the same state, then drains the old one.
282
+ */
283
+ persistent?: boolean;
284
+ }
285
+ /** Hosted architecture on {@link AgentConfig.architecture}. */
286
+ export type AgentArchitecture = "v1" | "v2";
287
+ /**
288
+ * Built-in tools on {@link AgentConfig.builtinTools}. Each enabled
289
+ * capability materializes as ordinary server tools at discovery time, so
290
+ * turns, direct calls, `info`, and the playground treat them like authored
291
+ * tools. Authored tools with the same name win with a warning.
292
+ */
293
+ export interface BuiltinToolsConfig {
294
+ /**
295
+ * Reminder tools bound to the current conversation, over
296
+ * {@link HostContext.reminders}: `reminders_create`, `reminders_list`,
297
+ * and `reminders_cancel` (the name the framework's reminder fire prompt
298
+ * tells the model to call when a stop condition is met). Sessions
299
+ * without a continuation key cannot arm reminders.
300
+ */
301
+ reminders?: boolean;
302
+ }
303
+ /**
304
+ * Turn admission limits on {@link AgentConfig.concurrency}.
305
+ *
306
+ * ```ts
307
+ * export default defineAgent({
308
+ * // At most 3 sessions run a model turn at once; the rest queue FIFO.
309
+ * concurrency: { maxRunningTurns: 3 },
310
+ * });
311
+ * ```
312
+ */
313
+ export interface AgentConcurrencyOptions {
314
+ /**
315
+ * Max model turns running at once across **all** of this agent's
316
+ * sessions. When every slot is busy, newly admitted turns queue FIFO
317
+ * (surfaced as a durable `turn.queued` event and `queued: true` on
318
+ * `GET /v1/sessions`) instead of failing; each queued turn starts as
319
+ * soon as a slot frees. Positive integer, hard-capped at
320
+ * {@link MAX_RUNNING_TURNS_LIMIT}. Omit for unlimited.
321
+ *
322
+ * A queued turn still counts as `running` for busy semantics
323
+ * (follow-ups preempt it; direct write-effect tool calls get
324
+ * `SessionBusyError`),
325
+ * and a follow-up that preempts a queued turn re-queues at the back.
326
+ */
327
+ maxRunningTurns?: number;
328
+ }
329
+ /**
330
+ * Hard ceiling for {@link AgentConcurrencyOptions.maxRunningTurns}.
331
+ * Matches the eval harness ceiling: each running turn issues model
332
+ * provider requests, so unbounded parallelism is never meaningful.
333
+ */
334
+ export declare const MAX_RUNNING_TURNS_LIMIT = 200;
335
+ /**
336
+ * Managed-hosting block on {@link AgentConfig.hosting}.
337
+ */
338
+ export interface AgentHostingOptions {
339
+ /**
340
+ * Domains the deployed engine pod may reach (egress allowlist), e.g.
341
+ * `"api.example.com"` or `"*.example.com"` (single leading wildcard).
342
+ * Lowercase hostnames with at least two labels and an alphabetic TLD;
343
+ * max 64. A `"host:port"` entry (e.g. `"clickhouse.example.com:9440"`)
344
+ * opens raw TCP to that host's addresses, for wire protocols the proxy
345
+ * cannot read a TLS hostname from.
346
+ * `agent-sdk deploy` sends these as `egressAllowedDomains`
347
+ * (unioned with any `--allow-domain` flags). Only valid on repo-backed
348
+ * deployments. Deployment-scoped like {@link secretNames}: not capped by
349
+ * the team's Cloud Agent egress allowlist. The platform still merges a
350
+ * bootstrap set (npm, Slack, Cursor API) at provision time.
351
+ */
352
+ egressDomains?: string[];
353
+ /**
354
+ * Secret names this agent expects at runtime (declarative documentation;
355
+ * values are never authored in files). `agent-sdk deploy` warns when a
356
+ * declared name is not set on the deployment — set values with
357
+ * `agent-sdk secrets set <slug> NAME`.
358
+ */
359
+ secretNames?: string[];
360
+ /**
361
+ * Name of a container image the team pushed with
362
+ * `agent-sdk images push <local-image> --name <name>`; the deployed agent
363
+ * runs inside it instead of the platform's default `node:22` image. The
364
+ * image must be `linux/amd64` and provide `bash`, `node` (>= 22.13) and
365
+ * `npm` on `PATH`. Requires `architecture: "v2"`; today only
366
+ * `persistent: true` agents honor it. Deploy pins the image bytes it saw
367
+ * (sha256); pushing the same name again takes effect on the next deploy.
368
+ */
369
+ image?: string;
370
+ }
371
+ /**
372
+ * Local runtime options on {@link AgentConfig.local}.
373
+ */
374
+ export interface AgentLocalOptions {
375
+ /**
376
+ * Default local harness cwd parent. Absolute, or relative to the agent
377
+ * project root. Each session uses `<cwd>/<sessionId>` unless a per-send
378
+ * {@link SendMessageOptions.workspaceDir} overrides it.
379
+ *
380
+ * When omitted, a project nested in another git repo (a monorepo package)
381
+ * defaults to `~/.cache/agent-serve/<dir>` so Cursor does not load the
382
+ * enclosing checkout's AGENTS.md, rules, skills, or MCP servers. A
383
+ * standalone git root keeps the in-project session workspace. Point this
384
+ * at a checkout when the agent must inherit that tree.
385
+ */
386
+ cwd?: string;
387
+ /**
388
+ * One harness cwd shared by every session, for agents that work inside an
389
+ * existing checkout. Absolute, or relative to the agent project root.
390
+ * Takes precedence over {@link cwd}; a per-send
391
+ * {@link SendMessageOptions.workspaceDir} still wins over both.
392
+ *
393
+ * The SDK keys its local executor — Cursor rules, skills, MCP, the ignore
394
+ * mappings — on the harness cwd, so a shared directory resolves the
395
+ * workspace once per serve process instead of once per session. With
396
+ * `cwd`'s `<cwd>/<sessionId>` layout that cache never hits, and on a large
397
+ * repo each session pays the full scan again.
398
+ *
399
+ * Sessions are no longer isolated from each other on disk: they share a
400
+ * working tree, and a file one turn writes is visible to the next. Agent
401
+ * scaffold (`AGENTS.md`, skills, tool scripts) is kept out of the shared
402
+ * directory and delivered inline instead, so pointing this at a repo does
403
+ * not write Agent SDK files into it — but `workspaceFiles` still lands in
404
+ * the harness cwd, as it does for a per-send override.
405
+ */
406
+ workspaceDir?: string;
407
+ /**
408
+ * Run the harness inside Cursor's local sandbox (`sandboxOptions.enabled`
409
+ * on the SDK). Off by default, matching the SDK: shell then auto-approves
410
+ * and inherits the serve process environment — including any credentials
411
+ * the host holds.
412
+ *
413
+ * Turn this on for agents whose turns read untrusted input (webhook
414
+ * payloads, PR diffs, inbound chat). It is a real tool boundary rather
415
+ * than a prompt-level one, so it still holds when the model is steered
416
+ * into ignoring its instructions.
417
+ */
418
+ sandbox?: boolean;
419
+ }
420
+ export type AgentConfigDefinition = AgentConfig & BrandedDefinition<"agent">;
421
+ /** Input to `defineInstructions` (authored at `agent/instructions.ts`). */
422
+ export interface InstructionsConfig {
423
+ markdown: string;
424
+ }
425
+ export type InstructionsDefinition = InstructionsConfig & BrandedDefinition<"instructions">;
426
+ export type ToolResultContent = {
427
+ type: "text";
428
+ text: string;
429
+ } | {
430
+ type: "image";
431
+ data: string;
432
+ mimeType?: string;
433
+ };
434
+ /**
435
+ * JSON-ish value a tool may return. Unlike {@link JsonValue} this permits
436
+ * `undefined` leaves (and thus optional object properties), because the
437
+ * result is JSON-serialized before it reaches the model and `undefined`
438
+ * fields are simply dropped — so authored tools can return objects shaped by
439
+ * optional fields without fighting the type system.
440
+ */
441
+ export type ToolResultValue = string | number | boolean | null | undefined | ToolResultValue[] | readonly ToolResultValue[] | {
442
+ [key: string]: ToolResultValue;
443
+ };
444
+ /**
445
+ * What a tool's `execute` may return. Strings are passed to the model
446
+ * verbatim, JSON values are serialized, and the envelope form carries rich
447
+ * content and an error flag.
448
+ */
449
+ export type ToolExecuteResult = ToolResultValue | {
450
+ content: ToolResultContent[];
451
+ isError?: boolean;
452
+ /**
453
+ * Structured result for tools that declare an `outputSchema`: MCP
454
+ * clients require `structuredContent` on calls to schema-declaring
455
+ * tools. Plain-object returns get it filled in automatically; the
456
+ * envelope form (needed for images or `isError`) sets it here.
457
+ */
458
+ structuredContent?: JsonObject;
459
+ };
460
+ /** Repo-agnostic GitHub client on the agent-serve host. */
461
+ export interface HostGitHubClient {
462
+ getOctokit(): Promise<Octokit>;
463
+ }
464
+ /** Bot-token Slack Web API client on the agent-serve host. */
465
+ export interface HostSlackClient {
466
+ getClient(): Promise<WebClient>;
467
+ }
468
+ /** Host-side handle for calling an MCP connection from a server tool or channel handler. */
469
+ export interface HostMcpRegistry {
470
+ /** MCP connection names (filenames under `agent/mcp-connections/`). */
471
+ names(): string[];
472
+ listTools(connectionName: string): Promise<HostMcpToolInfo[]>;
473
+ callTool(connectionName: string, toolName: string, args?: Record<string, unknown>): Promise<HostMcpCallResult>;
474
+ }
475
+ /**
476
+ * MCP spec tool annotations (`Tool.annotations`, 2025-03-26 revision).
477
+ *
478
+ * A closed type on purpose: these are exactly the fields listing-time
479
+ * bounding keeps, so the type matches what a reader can ever see — and the
480
+ * hints are behavioral, so a misspelled or wrong-typed key must not
481
+ * masquerade as a declaration.
482
+ */
483
+ export interface McpToolAnnotations {
484
+ /** Human-readable display name for the tool, length-capped at listing. */
485
+ title?: string;
486
+ /** The tool does not modify its environment. */
487
+ readOnlyHint?: boolean;
488
+ /** The tool may perform destructive updates (meaningful when not read-only). */
489
+ destructiveHint?: boolean;
490
+ /** Repeated calls with the same arguments have no additional effect. */
491
+ idempotentHint?: boolean;
492
+ /** The tool may interact with an open world of external entities. */
493
+ openWorldHint?: boolean;
494
+ }
495
+ export interface HostMcpToolInfo {
496
+ name: string;
497
+ description?: string;
498
+ inputSchema?: JsonObject;
499
+ outputSchema?: JsonObject;
500
+ /**
501
+ * MCP spec tool annotations, bounded at listing time to the
502
+ * {@link McpToolAnnotations} fields. Untrusted server hints — consumers
503
+ * that classify on them must fail closed when absent, and absent is
504
+ * exactly what a server that declares nothing produces.
505
+ */
506
+ annotations?: McpToolAnnotations;
507
+ }
508
+ export interface HostMcpCallResult {
509
+ content: Array<{
510
+ type: "text";
511
+ text: string;
512
+ } | {
513
+ type: "image";
514
+ data: string;
515
+ mimeType?: string;
516
+ } | {
517
+ type: string;
518
+ [key: string]: unknown;
519
+ }>;
520
+ isError?: boolean;
521
+ structuredContent?: JsonObject;
522
+ }
523
+ /**
524
+ * Durable Slack follow-up nudge + ask-claim API attached to {@link HostContext}.
525
+ * Used for mid-turn inject, boundary resume skip, and delayed-parent dedupe.
526
+ */
527
+ export interface SlackNudgeHostApi {
528
+ append(input: {
529
+ continuationKey: string;
530
+ sourceTs: string;
531
+ text: string;
532
+ author?: string;
533
+ }): Promise<boolean>;
534
+ /** Drain pending nudges and return a `<slack_followup>` block, if any. */
535
+ drainFormatted(continuationKey: string): Promise<string | undefined>;
536
+ clear(continuationKey: string): Promise<void>;
537
+ hasUndelivered(continuationKey: string): Promise<boolean>;
538
+ isDelivered(continuationKey: string, sourceTs: string): Promise<boolean>;
539
+ /** Claim `channelId:message.ts` exactly once (false = already seen). */
540
+ tryClaimAsk(channelId: string, messageTs: string): Promise<boolean>;
541
+ /** Release a claim after a failed send so Slack redelivery can retry. */
542
+ releaseAsk(channelId: string, messageTs: string): Promise<void>;
543
+ }
544
+ /**
545
+ * Shared host services available on every tool / hook / channel / schedule
546
+ * surface. Channel packs attach this as `ctx.host` so handlers can tap
547
+ * GitHub, Slack, or MCP without the pack depending on another platform.
548
+ */
549
+ export interface HostContext {
550
+ /**
551
+ * Authored MCP connections (`agent/mcp-connections/*` and
552
+ * `agent/host-connections/*`). Call a specific MCP tool deterministically
553
+ * without going through the agent loop.
554
+ */
555
+ mcp: HostMcpRegistry;
556
+ /**
557
+ * Host GitHub client (PAT / env / `gh auth` / App). Prefer webhook
558
+ * `ctx.github` (installation-scoped) when handling a GitHub delivery.
559
+ */
560
+ github: HostGitHubClient;
561
+ /** Host Slack Web API client (`SLACK_BOT_TOKEN` / channel envPrefix). */
562
+ slack: HostSlackClient;
563
+ /**
564
+ * Per-session reminders (create / list / cancel / dispatch). Present once
565
+ * the serve host has attached a {@link ReminderRunner}.
566
+ */
567
+ reminders?: ReminderHostApi;
568
+ /**
569
+ * Slack ask-dedupe / nudge helpers. Always present on a live
570
+ * {@link SessionEngine} host. A busy Slack thread's follow-ups queue here
571
+ * and reach the running agent at its next tool boundary, via the workspace
572
+ * carrier hook; whatever the carrier does not reach in time still drains
573
+ * into the boundary turn, deduped by source ts.
574
+ */
575
+ slackNudges?: SlackNudgeHostApi;
576
+ /**
577
+ * Playground eval batches (`/v1/dev/evals*`). Present once the serve host
578
+ * has attached an {@link import("./evals.js").HostEvalsApi}. Used by the
579
+ * built-in Slack `eval` directive and available to tools/handlers.
580
+ */
581
+ evals?: HostEvalsApi;
582
+ /**
583
+ * Author-facing durable JSON KV (`agentkit/v1/{agent}/kv/…`). Backed by
584
+ * `agent/storage.ts` (`defineStorage`) when authored; otherwise files
585
+ * under `--state-root/kv`. Prefer this over ad-hoc files under the
586
+ * project tree so state survives host replacement.
587
+ */
588
+ kv: HostKvApi;
589
+ /**
590
+ * Author-facing durable files (`agentkit/v1/{agent}/files/…`). On
591
+ * Cursor-managed hosting they live in the deployment's durable store;
592
+ * otherwise under `--state-root/files`. Use this for file-shaped state —
593
+ * evidence, reports, hand-offs to a delegated run — that must outlive the
594
+ * process.
595
+ */
596
+ files: HostFilesApi;
597
+ /**
598
+ * Author-facing OpenTelemetry metrics and session tags. Always present.
599
+ * Counters and histograms no-op when no meter is running. `setAttributes`
600
+ * still tags the open session when a collector is attached.
601
+ *
602
+ * @deprecated Set `OTEL_*` variables and use `metrics.getMeter` or
603
+ * `trace.getTracer` from `@opentelemetry/api`.
604
+ */
605
+ otel: HostOtelApi;
606
+ }
607
+ /** Host-facing JSON key-value API attached to {@link HostContext.kv}. */
608
+ export interface HostKvApi {
609
+ /** Read one value. Miss → `undefined`. */
610
+ get(key: string): Promise<JsonValue | undefined>;
611
+ /** Write or replace one value. */
612
+ put(key: string, value: JsonValue): Promise<void>;
613
+ /** Remove one key. No-op when missing. */
614
+ delete(key: string): Promise<void>;
615
+ }
616
+ /** A value plus its opaque version token, as returned by CAS-capable reads. */
617
+ export interface KvVersionedEntry {
618
+ value: JsonValue;
619
+ /**
620
+ * Opaque per-key token that changes on every successful write. Callers
621
+ * must not parse it — backends mint whatever is cheap for them (a
622
+ * counter, a UUID, an `updated_at`/`xmin` pair, …).
623
+ */
624
+ version: string;
625
+ }
626
+ /**
627
+ * Outcome of a conditional write. On conflict the backend returns the
628
+ * entry it observed (`undefined` when the key is absent), so a CAS retry
629
+ * loop gets its re-read for free instead of paying a second round trip.
630
+ */
631
+ export type KvCasResult = {
632
+ ok: true;
633
+ version: string;
634
+ } | {
635
+ ok: false;
636
+ current: KvVersionedEntry | undefined;
637
+ };
638
+ /**
639
+ * Conditional-write superset of {@link HostKvApi}. Version-token CAS was
640
+ * chosen over compare-value: every candidate backend can mint a cheap
641
+ * opaque token (counter, UUID, row version), while compare-value would
642
+ * force deep JSON equality with key-order pitfalls on each of them. The
643
+ * agent-facing `host.kv` stays plain {@link HostKvApi}; storage backends
644
+ * supply CAS via the optional `cas` group on `defineStorage`.
645
+ */
646
+ export interface HostKvCasApi extends HostKvApi {
647
+ /** Read one value with its version token. Miss → `undefined`. */
648
+ getWithVersion(key: string): Promise<KvVersionedEntry | undefined>;
649
+ /** Create the key only when absent. Conflict returns the existing entry. */
650
+ putIfAbsent(key: string, value: JsonValue): Promise<KvCasResult>;
651
+ /**
652
+ * Replace the value only when the key still carries `expectedVersion`.
653
+ * Conflict (version moved, or key deleted) returns the current entry.
654
+ */
655
+ putIfVersion(key: string, value: JsonValue, expectedVersion: string): Promise<KvCasResult>;
656
+ /** All keys under a prefix, in ascending key order. */
657
+ listKeys(prefix: string): Promise<string[]>;
658
+ }
659
+ /**
660
+ * Runtime probe: does this KV implement the CAS superset? Only for
661
+ * stores of unknown provenance — e.g. a caller-supplied {@link HostKvApi}
662
+ * object whose static type does not carry the CAS methods. A
663
+ * `defineStorage` backend declares CAS through its `cas` group instead
664
+ * and never needs probing.
665
+ */
666
+ export declare function supportsKvCas(kv: HostKvApi): kv is HostKvCasApi;
667
+ /**
668
+ * Which set of files a call addresses.
669
+ *
670
+ * `"session"` (the default) is private to one session. `"deployment"` is shared
671
+ * by every session of the agent and survives redeploys; `partition` subdivides
672
+ * it for author-chosen groupings such as a pull request or a customer.
673
+ */
674
+ export type HostFilesScope = "session" | "deployment" | {
675
+ kind: "session";
676
+ sessionId?: string;
677
+ } | {
678
+ kind: "deployment";
679
+ partition?: string;
680
+ };
681
+ /** Scope selector shared by every {@link HostFilesApi} call. */
682
+ export interface HostFilesCallOptions {
683
+ scope?: HostFilesScope;
684
+ }
685
+ /** One entry from {@link HostFilesApi.list}. */
686
+ export interface HostFileEntry {
687
+ /** Path within the scope, as authors address it. */
688
+ path: string;
689
+ size: number;
690
+ /** Last-modified epoch ms, when the sink tracks one. */
691
+ mtimeMs?: number;
692
+ }
693
+ /** Result of {@link HostFilesApi.stat}. */
694
+ export interface HostFileStat {
695
+ size: number;
696
+ mtimeMs?: number;
697
+ /** Opaque version tag; pass back as `ifMatch` to make a write conditional. */
698
+ etag?: string;
699
+ }
700
+ /**
701
+ * What the configured sink actually supports. Read these instead of assuming:
702
+ * local, managed, and custom sinks differ in ways that change correctness.
703
+ */
704
+ export interface HostFilesCapabilities {
705
+ /**
706
+ * Conditional writes are enforced, so a lost race raises
707
+ * `FileConflictError` instead of silently clobbering. False means
708
+ * last-writer-wins.
709
+ */
710
+ conflictDetection: boolean;
711
+ /**
712
+ * Files have a real local path ({@link HostFilesApi.materializedPath}) the
713
+ * harness can open with ordinary file tools. False means the model cannot
714
+ * reach them directly — only authored handler code (tools, hooks) can,
715
+ * through this API.
716
+ */
717
+ materialized: boolean;
718
+ /** Largest value the sink accepts, when it declares a limit. */
719
+ maxBytes?: number;
720
+ }
721
+ /**
722
+ * Durable files attached to {@link HostContext.files}.
723
+ *
724
+ * Deliberately not a filesystem: no handles, no seeking, no rename, no
725
+ * directories, no errno. Paths are addresses within a {@link HostFilesScope},
726
+ * never filesystem paths — {@link materializedPath} is the one place a real
727
+ * path appears, and it is `undefined` whenever the sink keeps no local copy.
728
+ */
729
+ /**
730
+ * Text encodings {@link HostFilesApi.read} accepts. The same set Node calls
731
+ * `BufferEncoding`, written out so the public signature does not name a
732
+ * Node global.
733
+ */
734
+ export type HostFileTextEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "utf-16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
735
+ export interface HostFilesApi {
736
+ /** What the configured sink supports. */
737
+ readonly capabilities: HostFilesCapabilities;
738
+ /** Bind `"session"`-scoped calls to `sessionId`. */
739
+ forSession(sessionId: string): HostFilesApi;
740
+ /** Read as text. Miss → `undefined`. */
741
+ read(path: string, options?: HostFilesCallOptions & {
742
+ encoding?: HostFileTextEncoding;
743
+ }): Promise<string | undefined>;
744
+ /** Read as bytes. Miss → `undefined`. */
745
+ readBytes(path: string, options?: HostFilesCallOptions): Promise<Uint8Array | undefined>;
746
+ /**
747
+ * Write or replace. Pass `ifMatch` with a {@link HostFileStat.etag} to make
748
+ * the write conditional, or `null` to require that it does not exist —
749
+ * enforced only when {@link HostFilesCapabilities.conflictDetection} is set.
750
+ */
751
+ write(path: string, data: string | Uint8Array, options?: HostFilesCallOptions & {
752
+ ifMatch?: string | null;
753
+ }): Promise<void>;
754
+ /** Remove one path. No-op when missing. */
755
+ remove(path: string, options?: HostFilesCallOptions): Promise<void>;
756
+ /** Entries whose path starts with `prefix` (all when omitted), in path order. */
757
+ list(prefix?: string, options?: HostFilesCallOptions): Promise<HostFileEntry[]>;
758
+ exists(path: string, options?: HostFilesCallOptions): Promise<boolean>;
759
+ stat(path: string, options?: HostFilesCallOptions): Promise<HostFileStat | undefined>;
760
+ /**
761
+ * Absolute local path the harness can read, or `undefined` when the sink
762
+ * keeps no local copy. Never use it as an identity — pass paths and scopes
763
+ * to the other calls so the same code works against a sink that has none.
764
+ */
765
+ materializedPath(path: string, options?: HostFilesCallOptions): string | undefined;
766
+ }
767
+ /** Attribute bag accepted by {@link HostOtelApi}. `undefined` values are dropped. */
768
+ export type HostOtelAttributes = Record<string, string | number | boolean | undefined>;
769
+ /**
770
+ * Author-facing OpenTelemetry surface on {@link HostContext.otel}.
771
+ *
772
+ * @deprecated Set `OTEL_*` variables and use `metrics.getMeter` or
773
+ * `trace.getTracer` from `@opentelemetry/api`. This helper still runs
774
+ * for this release and emits one deprecation warning per process.
775
+ *
776
+ * Metrics and tags only — no custom spans, and no raw OTel `Meter` /
777
+ * `Tracer`. First-party names (`cursor.token.usage`, …) and join keys
778
+ * (`cursor.conversation.id`, `agent_sdk.session_id`, `agent_sdk.agent`,
779
+ * …) are reserved.
780
+ */
781
+ export interface HostOtelApi {
782
+ /** True when a meter is running and `increment` / `record` export. */
783
+ readonly enabled: boolean;
784
+ /**
785
+ * Merge tags onto this host binding. On a session-bound host they join
786
+ * open turn/tool spans and later first-party metrics. Unbound tags
787
+ * stay on this host instance only.
788
+ */
789
+ setAttributes(attributes: HostOtelAttributes): void;
790
+ /** Add 1 to a counter. */
791
+ increment(name: string, attributes?: HostOtelAttributes): void;
792
+ /** Add `value` to a counter. */
793
+ increment(name: string, value: number, attributes?: HostOtelAttributes): void;
794
+ /** Record one histogram observation. */
795
+ record(name: string, value: number, attributes?: HostOtelAttributes): void;
796
+ }
797
+ /** Runtime context handed to a tool's `execute`. */
798
+ export interface ToolContext {
799
+ /** Correlates with `actions.requested` / `actions.completed` stream events. */
800
+ toolCallId?: string;
801
+ /** The session this tool call runs inside. */
802
+ session: SessionInfo;
803
+ /**
804
+ * Who approved this call when its tool sets `needsApproval`, as the same
805
+ * kind of auth context as `session.auth`. On Slack, `attributes.user_id` is
806
+ * the person who clicked Approve, who can differ from the person who
807
+ * started the session. Absent when the call needed no approval or the
808
+ * approver is unknown.
809
+ */
810
+ approvedBy?: AuthContext;
811
+ /** Absolute path of the session's materialized workspace directory. */
812
+ workspaceDir: string;
813
+ /**
814
+ * Absolute path of the agent's durable state root (shared across every
815
+ * session of this agent).
816
+ */
817
+ stateRoot: string;
818
+ /** Shared host services (MCP / GitHub / Slack). */
819
+ host: HostContext;
820
+ /**
821
+ * Start or resume a session on any channel (cross-channel handoff).
822
+ * Same semantics as a channel route's `send`, with an explicit channel id.
823
+ * `auth` defaults to this tool call's session principal (like HTTP
824
+ * channel `send`); pass explicitly to override.
825
+ */
826
+ send(channelId: string, message: string, options?: SendMessageOptions): Promise<ChannelSession>;
827
+ /** Look up a session on a channel (e.g. refresh `sdkAgentId` after a turn). */
828
+ getSession(channelId: string, sessionId: string): Promise<ChannelSession | null>;
829
+ /**
830
+ * Durable artifacts, bound to this tool call's session: `tag` auto-fills
831
+ * `sessionId` (and `turnId` when known).
832
+ */
833
+ artifacts: ArtifactsApi;
834
+ /**
835
+ * Append a session event onto this call's in-flight turn. Same shape as a
836
+ * Task subagent stream (`parentCallId`, `subagent.called` /
837
+ * `subagent.completed`). Omitted for scratch `callTool` with no session.
838
+ */
839
+ emit?: (payload: SessionEventPayload) => void;
840
+ /** The session's frozen `asOf`, or the wall clock. Use instead of `Date.now()`. */
841
+ now(): Date;
842
+ /**
843
+ * The session's frozen instant (ISO-8601), when it has one. Present exactly
844
+ * when this is an `asOf` session. A tool that reaches other tools itself —
845
+ * the script sandbox — reads it to apply the same forward-time guard to the
846
+ * calls it makes, which do not pass back through the host's gate.
847
+ */
848
+ asOf?: string;
849
+ }
850
+ /**
851
+ * Where a tool's body runs.
852
+ *
853
+ * - `"server"` (default): in-process on the agent-serve host via Cursor SDK
854
+ * custom tools. Only available when the agent {@link AgentConfig.runtime}
855
+ * is `"local"`.
856
+ * - `"agent"` — materialized into the session workspace as a shell
857
+ * script the Cursor agent invokes. Requires
858
+ * {@link ToolConfig.script}; `execute` is not used.
859
+ */
860
+ export type ToolExecution = "server" | "agent";
861
+ /**
862
+ * Whether a server tool call must pause for human approval before
863
+ * `execute` runs. Boolean always gates; a predicate decides per call from
864
+ * validated input only (no {@link ToolContext} — runs before the gate).
865
+ */
866
+ export type ToolNeedsApproval<TInput> = boolean | ((input: TInput) => boolean | Promise<boolean>);
867
+ /**
868
+ * Whether invoking a tool can change anything outside this session.
869
+ *
870
+ * `"read"` cannot, by construction — a query, a file read, a listing.
871
+ * `"write"` changes something a person or another agent will later see: an
872
+ * external system (a comment, a message, a ticket) or shared storage another
873
+ * session reads back.
874
+ *
875
+ * This is what {@link SendMessageOptions.dryRun} enforces. In a dry-run
876
+ * session a write is answered by the host and never executed, while reads run
877
+ * for real — so an agent can be run against real data to see what it *would*
878
+ * have done.
879
+ *
880
+ * A tool that declares nothing is treated as a write: a dry run promises
881
+ * "nothing outside this session changed", which it cannot promise about a tool
882
+ * it knows nothing about. An unannotated tool is therefore useless in a dry
883
+ * run.
884
+ */
885
+ export type ToolEffect = "read" | "write";
886
+ /** Authored `defineConnection({ effects })` — one effect or a set. */
887
+ export type ConnectionEffects = ToolEffect | readonly ToolEffect[];
888
+ export declare function isToolEffect(value: unknown): value is ToolEffect;
889
+ /**
890
+ * Normalize authored {@link ConnectionConfig.effects} to a unique list.
891
+ * Invalid values are left for discovery to reject — this only collapses
892
+ * `"read"` / `["read"]` / duplicates.
893
+ */
894
+ export declare function normalizeConnectionEffects(effects: ConnectionEffects): ToolEffect[];
895
+ /**
896
+ * Trim, drop blanks, and unique-preserve authored
897
+ * {@link ConnectionConfig.tools} name lists. Invalid shapes are left
898
+ * for discovery.
899
+ */
900
+ export declare function normalizeConnectionTools(tools: readonly string[]): string[];
901
+ /** True when `toolName` passes the connection's `tools` / `disallowedTools` filter. */
902
+ export declare function connectionAllowsTool(filter: {
903
+ tools?: readonly string[];
904
+ disallowedTools?: readonly string[];
905
+ }, toolName: string): boolean;
906
+ /**
907
+ * A tool's declared {@link ToolEffect} — fixed, or decided per call from
908
+ * validated input for tools that read or write depending on their arguments
909
+ * (an HTTP request keyed on method, a SQL tool keyed on statement).
910
+ */
911
+ export type ToolEffectDeclaration<TInput> = ToolEffect | ((input: TInput) => ToolEffect);
912
+ export interface ToolConfig<TInput> {
913
+ description: string;
914
+ /**
915
+ * Where the tool body runs. Defaults to `"server"` (in-process on the
916
+ * agent-serve process). Use `"agent"` to materialize a workspace script
917
+ * the Cursor agent invokes instead.
918
+ */
919
+ execution?: ToolExecution;
920
+ /**
921
+ * Zod schema (validated before `execute` runs) or a plain JSON Schema
922
+ * object (forwarded to the model as-is, unvalidated). Omit to accept any
923
+ * JSON object.
924
+ */
925
+ inputSchema?: z3.ZodType<TInput> | ZodV4Schema<TInput> | JsonSchemaObject;
926
+ /**
927
+ * JSON Schema for the tool's structured output (`Tool.outputSchema` from
928
+ * the MCP spec), as a zod schema (converted, never validated against) or a
929
+ * plain JSON Schema object. Advertised when declared and omitted
930
+ * otherwise — results are not validated against it.
931
+ */
932
+ outputSchema?: ZodSchema | JsonSchemaObject;
933
+ /**
934
+ * When true (or when the predicate returns true), the host parks the
935
+ * in-flight tool call until a human approves or denies via
936
+ * `POST /v1/session/:sessionId/approvals/:callId`. Only supported for
937
+ * `execution: "server"` tools on the local runtime.
938
+ */
939
+ needsApproval?: ToolNeedsApproval<TInput>;
940
+ /**
941
+ * Whether this tool changes anything outside the session. Undeclared means
942
+ * write, so a dry run stubs it — see {@link ToolEffect}.
943
+ */
944
+ effect?: ToolEffectDeclaration<TInput>;
945
+ /**
946
+ * Input properties that carry time bounds. In a session created with
947
+ * {@link SendMessageOptions.asOf}, every named argument must be an
948
+ * absolute ISO-8601 instant with a timezone, no later than the session's
949
+ * frozen instant — a call that omits one, or supplies a relative or later
950
+ * value, is refused so the model retries with absolute bounds. Names must
951
+ * exist in {@link inputSchema}; a session with `asOf` refuses to start
952
+ * otherwise, because a misspelled name would silently check nothing.
953
+ * Ignored in sessions without `asOf`.
954
+ */
955
+ timeArgs?: readonly string[];
956
+ /**
957
+ * What a write tool returns in a dry-run session instead of executing.
958
+ *
959
+ * Omit for a tool whose result the caller only acknowledges. Supply one when
960
+ * the result is read structurally — a caller that uses `result.revision`
961
+ * breaks on a bare string — so a dry run stays on the same path production
962
+ * takes. Ignored unless {@link effect} resolves to `"write"`.
963
+ */
964
+ dryRunResult?: ToolExecuteResult | ((input: TInput) => ToolExecuteResult);
965
+ /**
966
+ * In-process implementation. Required when {@link execution} is
967
+ * `"server"` (the default); ignored for `"agent"` tools.
968
+ */
969
+ execute?: (input: TInput, ctx: ToolContext) => ToolExecuteResult | Promise<ToolExecuteResult>;
970
+ /**
971
+ * Agent tools: shell script body written into the session workspace.
972
+ * Receives a JSON object on stdin and should print the result on
973
+ * stdout. Required when {@link execution} is `"agent"`.
974
+ */
975
+ script?: string;
976
+ }
977
+ /** Discovered tool definition with erased input generics. */
978
+ export interface ToolDefinition extends BrandedDefinition<"tool"> {
979
+ readonly description: string;
980
+ readonly execution?: ToolExecution;
981
+ readonly inputSchema?: ZodSchema | JsonSchemaObject;
982
+ readonly outputSchema?: ZodSchema | JsonSchemaObject;
983
+ readonly needsApproval?: ToolNeedsApproval<never>;
984
+ readonly effect?: ToolEffectDeclaration<never>;
985
+ readonly timeArgs?: readonly string[];
986
+ readonly dryRunResult?: ToolExecuteResult | ((input: never) => ToolExecuteResult);
987
+ readonly execute?: (input: never, ctx: ToolContext) => ToolExecuteResult | Promise<ToolExecuteResult>;
988
+ readonly script?: string;
989
+ }
990
+ /** Input to `defineSkill` (authored at `agent/skills/<name>.ts`). */
991
+ export interface SkillConfig {
992
+ /** Routing hint advertised to the model in the skills catalog. */
993
+ description?: string;
994
+ /** The skill body (becomes `SKILL.md`). */
995
+ markdown: string;
996
+ /** Package-relative sibling files, e.g. `references/checklist.md`. */
997
+ files?: Record<string, string>;
998
+ }
999
+ export type SkillDefinition = SkillConfig & BrandedDefinition<"skill">;
1000
+ /**
1001
+ * Input to `defineExtension`, the `extension.ts` at the root of an
1002
+ * agent-shaped tree (`tools/`, `skills/`, `lib/`).
1003
+ */
1004
+ export interface ExtensionOptions<TConfig, TInput = TConfig> {
1005
+ /** The tree's directory; pass `import.meta.dirname`. */
1006
+ root: string;
1007
+ /** What the extension adds; shown by `info`. */
1008
+ description?: string;
1009
+ /**
1010
+ * Mount configuration schema (`zod/v3` or classic `zod/v4`). A consumer's
1011
+ * settings are validated at mount. A `zod/v4/mini` member here would break
1012
+ * the inference of `TConfig`.
1013
+ */
1014
+ config?: z3.ZodType<TConfig, z3.ZodTypeDef, TInput> | z4.ZodType<TConfig, TInput>;
1015
+ /** Choose which contribution groups this mount includes. */
1016
+ contributions?: (config: TConfig) => ExtensionContributionSelection;
1017
+ /**
1018
+ * Hosts this mount's code calls and secrets it reads. Discovery adds them
1019
+ * to the consuming agent's resolved {@link ResolvedAgent.hosting}, so
1020
+ * hosted deploys allowlist the egress and warn about unset secrets without
1021
+ * the agent repeating them in `agent.ts`.
1022
+ */
1023
+ hosting?: (config: TConfig) => ExtensionHostingOptions;
1024
+ }
1025
+ /** Contribution groups a configured extension mount may include or omit. */
1026
+ export interface ExtensionContributionSelection {
1027
+ /** Include tools from the extension tree. Defaults to true. */
1028
+ tools?: boolean;
1029
+ /** Include skills from the extension tree. Defaults to true. */
1030
+ skills?: boolean;
1031
+ }
1032
+ /** What an extension mount adds to the consuming agent's {@link AgentHostingOptions}. */
1033
+ export type ExtensionHostingOptions = Pick<AgentHostingOptions, "egressDomains" | "secretNames">;
1034
+ /**
1035
+ * What `extension.ts` default-exports. A consumer calls it from
1036
+ * `agent/extensions/<ns>.ts` to mount the extension with a configuration;
1037
+ * the extension's own modules import it to read that configuration.
1038
+ */
1039
+ export interface Extension<TConfig = undefined, TInput = TConfig> extends ExtensionDeclaration {
1040
+ (...args: undefined extends TInput ? [config?: TInput] : [config: TInput]): ExtensionMount;
1041
+ /** The mounted configuration (schema defaults applied); throws before the mount. */
1042
+ readonly config: TConfig;
1043
+ }
1044
+ /** The mount-independent part of an {@link Extension}: an agent-shaped tree. */
1045
+ export interface ExtensionDeclaration {
1046
+ readonly root: string;
1047
+ readonly description: string | undefined;
1048
+ }
1049
+ /** A Cursor plugin directory declared by `cursorPlugin`. */
1050
+ export interface CursorPluginDeclaration extends ExtensionDeclaration {
1051
+ readonly layout: "cursor-plugin";
1052
+ readonly variables: Record<string, string>;
1053
+ }
1054
+ /** What `agent/extensions/<ns>.ts` default-exports. */
1055
+ export interface ExtensionMount extends BrandedDefinition<"extension"> {
1056
+ readonly extension: ExtensionDeclaration | CursorPluginDeclaration;
1057
+ readonly config: unknown;
1058
+ readonly contributions?: ExtensionContributionSelection;
1059
+ readonly hosting?: ExtensionHostingOptions;
1060
+ }
1061
+ /** `cursorPlugin({ ... })`: mount a Cursor plugin directory as an extension. */
1062
+ export interface CursorPluginOptions {
1063
+ /**
1064
+ * The plugin directory: the one holding `.cursor-plugin/plugin.json`
1065
+ * (or `.claude-plugin/plugin.json` / `plugin.json`). A relative path
1066
+ * resolves against the project root.
1067
+ */
1068
+ path: string;
1069
+ /**
1070
+ * Values for the `${NAME}` placeholders in the plugin's MCP config, the
1071
+ * variables a Cursor install prompts for. Names the mount omits fall back
1072
+ * to `process.env`; a placeholder nothing resolves fails discovery.
1073
+ */
1074
+ variables?: Record<string, string>;
1075
+ }
1076
+ /**
1077
+ * `export default disableTool()` in a directory mount's `tools/<name>.ts`
1078
+ * removes the extension's `<ns>__<name>`.
1079
+ */
1080
+ export type DisabledToolDefinition = BrandedDefinition<"disabled-tool">;
1081
+ /**
1082
+ * `export default disableConnection()` in a directory mount's
1083
+ * `mcp-connections/<server>.ts` removes the extension's `<ns>__<server>`.
1084
+ */
1085
+ export type DisabledConnectionDefinition = BrandedDefinition<"disabled-connection">;
1086
+ /**
1087
+ * `export default disable()` / `disableSkill()` / `disableHook()` /
1088
+ * `disableChannel()` / `disableSchedule()` / `disableSubagent()` /
1089
+ * `disableInstructions()` / `disableArtifacts()` in a directory mount
1090
+ * removes that contribution from the matching overlay slot.
1091
+ */
1092
+ export type DisabledDefinition = BrandedDefinition<"disabled">;
1093
+ /** One mounted extension and the names it contributed. */
1094
+ export interface DiscoveredExtension {
1095
+ /** Mount namespace: the filename stem or directory name under `agent/extensions/`. */
1096
+ name: string;
1097
+ description?: string;
1098
+ /** Composed tool names (`<ns>__<name>`), overrides applied. */
1099
+ tools: string[];
1100
+ /** Composed skill names (`<ns>__<name>`), overrides applied. */
1101
+ skills: string[];
1102
+ /** Composed MCP connection names (`<ns>__<server>`). */
1103
+ connections: string[];
1104
+ /** Composed host MCP connection names (`<ns>__<server>`). */
1105
+ hostConnections: string[];
1106
+ /** Composed subagent names (`<ns>__<id>`). */
1107
+ subagents: string[];
1108
+ /** Composed hook names (`<ns>__<name>`). */
1109
+ hooks: string[];
1110
+ /** Composed channel ids (`<ns>__<id>`). */
1111
+ channels: string[];
1112
+ /** Composed schedule names (`<ns>__<name>`). */
1113
+ schedules: string[];
1114
+ /** Composed reminder handler names (`<ns>__<name>`). */
1115
+ reminders: string[];
1116
+ /** Whether the mount contributed an instructions fragment. */
1117
+ instructions: boolean;
1118
+ /** Workspace seed paths the mount contributed. */
1119
+ seedFiles: string[];
1120
+ /** Composed artifact kind names (`<ns>__<kind>`). */
1121
+ artifactKinds: string[];
1122
+ /** Egress domains and secret names the mount adds to the agent's hosting. */
1123
+ hosting?: ExtensionHostingOptions;
1124
+ }
1125
+ /**
1126
+ * Transport for an MCP connection, mirroring the Cursor SDK's
1127
+ * `McpServerConfig` shapes — plus two agent-serve variants that stay
1128
+ * symbolic until the server starts:
1129
+ *
1130
+ * - `agent` addresses a **peer agent** mounted on the same serve host by
1131
+ * slug; it resolves to that agent's MCP endpoint (`/<slug>/v1/mcp`).
1132
+ * - `cursorAccount` exposes the **Cursor account's MCP connectors** (the
1133
+ * HTTP/SSE servers the operator already authorized in Cursor). It
1134
+ * resolves to a bridge on this host that executes every tool **on the
1135
+ * Cursor backend** with the account's stored OAuth credentials — tokens
1136
+ * never reach this host.
1137
+ *
1138
+ * Credentials belong in `headers` (http/sse) and `env` (stdio) as `${NAME}`
1139
+ * templates, which the transport keeps verbatim and expands from the
1140
+ * environment each time a client opens. Reading `process.env` in the
1141
+ * connection module instead pins whatever the variable held when discovery
1142
+ * imported it, which on Cursor hosting is nothing: the platform binds a
1143
+ * deployment's secrets per request, long after that import.
1144
+ */
1145
+ export type ConnectionTransport = {
1146
+ type?: "stdio";
1147
+ command: string;
1148
+ args?: string[];
1149
+ env?: Record<string, string>;
1150
+ cwd?: string;
1151
+ } | {
1152
+ type?: "http" | "sse";
1153
+ url: string;
1154
+ headers?: Record<string, string>;
1155
+ /** Host PKCE OAuth; `agent-sdk mcp oauth <name>`. No Authorization header. */
1156
+ oauth?: true;
1157
+ } | {
1158
+ /** Slug of a peer agent mounted on the same serve host. */
1159
+ agent: string;
1160
+ } | {
1161
+ /** Expose the Cursor account's MCP connectors (backend-executed). */
1162
+ cursorAccount: true;
1163
+ /**
1164
+ * Restrict to these connector names after discovery normalization.
1165
+ * Authored configs may also pass `"*"` / `["*"]` (see
1166
+ * {@link ConnectionConfig}); those normalize to `undefined` (= all).
1167
+ */
1168
+ servers?: string[];
1169
+ };
1170
+ /** True for the peer-agent transport variant (`{ agent: "<slug>" }`). */
1171
+ export declare function isPeerConnectionTransport(transport: ConnectionTransport): transport is {
1172
+ agent: string;
1173
+ };
1174
+ /** True for the Cursor account transport variant (`{ cursorAccount: true }`). */
1175
+ export declare function isCursorAccountTransport(transport: ConnectionTransport): transport is {
1176
+ cursorAccount: true;
1177
+ servers?: string[];
1178
+ };
1179
+ /**
1180
+ * Normalize an authored Cursor account `servers` filter.
1181
+ *
1182
+ * `undefined`, `"*"`, and `["*"]` (after trim) all mean every connected
1183
+ * HTTP/SSE server on the account. Returns a concrete allowlist, or
1184
+ * `undefined` for all. Does not validate emptiness, blank entries, or a
1185
+ * mixed `"*"` + names list — discovery owns those diagnostics.
1186
+ */
1187
+ export declare function normalizeCursorAccountServers(servers: string[] | "*" | undefined): string[] | undefined;
1188
+ /** True when an authored allowlist mixes `"*"` with other connector names. */
1189
+ export declare function cursorAccountServersHasMixedWildcard(servers: string[] | "*" | undefined): boolean;
1190
+ /**
1191
+ * True for an HTTP/SSE transport authorized with host PKCE OAuth
1192
+ * (`defineConnection({ url, oauth: true })`). The tokens live on the serve
1193
+ * host (`mcp-auth.json` / `MCP_OAUTH_*`), so only host-side MCP clients can
1194
+ * use them.
1195
+ */
1196
+ export declare function isHostOauthConnectionTransport(transport: ConnectionTransport): transport is Extract<ConnectionTransport, {
1197
+ url: string;
1198
+ }> & {
1199
+ oauth: true;
1200
+ };
1201
+ /**
1202
+ * True for transports that stay symbolic at discovery time and are resolved
1203
+ * by the serve host once it is listening (peers and the Cursor account
1204
+ * bridge). Symbolic transports never reach the SDK or the host MCP registry
1205
+ * unresolved.
1206
+ */
1207
+ export declare function isSymbolicConnectionTransport(transport: ConnectionTransport): boolean;
1208
+ /** One TypeScript tool on `defineConnection({ tools })`. */
1209
+ export type InlineStdioToolConfig = {
1210
+ description: string;
1211
+ inputSchema?: ZodSchema | JsonSchemaObject;
1212
+ /** Output JSON Schema (zod converted, never validated); advertised when declared. */
1213
+ outputSchema?: ZodSchema | JsonSchemaObject;
1214
+ execute: (input: JsonObject) => unknown | Promise<unknown>;
1215
+ };
1216
+ /** `defineConnection({ tools })`. TypeScript in; stdio MCP out. */
1217
+ export type InlineStdioConnectionConfig = {
1218
+ tools: Record<string, InlineStdioToolConfig>;
1219
+ };
1220
+ /**
1221
+ * Authored MCP connection config (`defineConnection(...)`).
1222
+ *
1223
+ * For Cursor account connections, `servers` may be omitted, `"*"`, or
1224
+ * `["*"]` to forward every connected HTTP/SSE connector; a concrete
1225
+ * `string[]` allowlists by connector name. Discovery normalizes the
1226
+ * wildcard forms to an unfiltered {@link ConnectionTransport}.
1227
+ *
1228
+ * `{ tools }` authors TypeScript handlers. Discovery packages them into a
1229
+ * stdio MCP server the agent environment can spawn.
1230
+ */
1231
+ export type ConnectionConfig = (((Exclude<ConnectionTransport, {
1232
+ cursorAccount: true;
1233
+ }> | {
1234
+ cursorAccount: true;
1235
+ /**
1236
+ * Which account connectors to expose.
1237
+ *
1238
+ * - Omit, pass `"*"`, or pass `["*"]` to forward **every** connected
1239
+ * HTTP/SSE server on the account (no per-connector allowlist).
1240
+ * - Pass connector names as they appear in the Cursor account's MCP
1241
+ * config (e.g. `["Linear", "Notion"]`) to restrict the set.
1242
+ */
1243
+ servers?: string[] | "*";
1244
+ }) & {
1245
+ /**
1246
+ * Tool-name allowlist. Same shape as {@link AgentConfig.tools}:
1247
+ * when set, only these MCP tool names (the server's `tools/list`
1248
+ * names) are advertised and callable through `host.mcp`. Names
1249
+ * the server does not list are omitted, not guessed.
1250
+ *
1251
+ * A list of names is an allowlist. An object of handlers authors
1252
+ * TypeScript tools ({@link InlineStdioConnectionConfig}).
1253
+ *
1254
+ * On a model-visible connection this requires {@link advertiseTools}:
1255
+ * an attached server would still expose every tool. On
1256
+ * `host-connections/` it restricts `host.mcp` alone.
1257
+ *
1258
+ * Combines with {@link disallowedTools} as deny-wins.
1259
+ */
1260
+ tools?: readonly string[];
1261
+ }) | InlineStdioConnectionConfig) & {
1262
+ /** Documentation only; shown in `info` output. */
1263
+ description?: string;
1264
+ /**
1265
+ * Per-session auth: called at turn-build time with the session's
1266
+ * {@link SessionInfo}, returning headers merged over the transport's
1267
+ * static `headers` for that session's use of this connection. This is
1268
+ * how a multi-tenant agent injects the caller's identity — it derives
1269
+ * who the session is for host-side and mints a tenant-scoped
1270
+ * credential; the model never sees a tenant parameter and can never
1271
+ * choose the tenant.
1272
+ *
1273
+ * Derive the identity from durable session facts — `session.auth`,
1274
+ * `session.id`, or your channel's own session state. Do **not** key it
1275
+ * off `session.continuationKey`: it is a channel routing key, and channels
1276
+ * may re-key it independently of the authenticated principal.
1277
+ *
1278
+ * Works attached or advertised. Advertised connections
1279
+ * ({@link advertiseTools}) open per-operation clients with the
1280
+ * evaluated headers. Attached connections ride the turn's SDK
1281
+ * `mcpServers`, passed on every send rather than pinned on the cached
1282
+ * per-session agent handle, so every turn — follow-ups, reminder
1283
+ * wakes — runs on headers evaluated for that turn. The cost: when any
1284
+ * attached connection has `auth`, *all* of the agent's attached
1285
+ * connections are configured per send, so the harness opens fresh MCP
1286
+ * clients for them each turn (stdio servers respawn per turn — avoid
1287
+ * pairing an auth'd connection with a stateful stdio server), and
1288
+ * workspace prewarm omits auth'd connections rather than attaching
1289
+ * them without an identity.
1290
+ *
1291
+ * HTTP/SSE transports only, not combinable with `oauth: true`
1292
+ * (discovery rejects both). A callback that throws fails the turn: a
1293
+ * turn never silently runs without the connection's identity.
1294
+ * `host.mcp` calls from server tools keep the static headers only.
1295
+ */
1296
+ auth?: ConnectionAuthProvider;
1297
+ /**
1298
+ * Advertise this connection's tools by name instead of leaving them
1299
+ * behind the MCP meta-tools: at turn-build time the engine lists the
1300
+ * connection's tools and synthesizes a named 1:1 passthrough server
1301
+ * tool per entry — the server's own names, descriptions, and live
1302
+ * schemas — merged into the authored `agent/tools/` catalog. The raw
1303
+ * connection is then not attached to the model (it stays available on
1304
+ * `host.mcp`), so each tool appears exactly once.
1305
+ *
1306
+ * Fail-closed: a `listTools` failure, an invalid tool name, or a name
1307
+ * collision (with an authored tool or another advertised connection)
1308
+ * fails the turn — a turn never silently runs with a shrunken toolset.
1309
+ * The listing runs once per turn; point this at endpoints that can
1310
+ * answer `tools/list` cheaply. Tools whose MCP `annotations.title` is
1311
+ * `do-not-call` are omitted (vendor host-UI / MCP Apps helpers).
1312
+ */
1313
+ advertiseTools?: boolean;
1314
+ /**
1315
+ * With {@link advertiseTools}, a `listTools` or `auth` failure skips this
1316
+ * connection (zero tools from it) instead of failing the turn. Other
1317
+ * advertised connections still fail closed. Requires `advertiseTools`.
1318
+ *
1319
+ * A turn never waits to authorize an optional connection, also in the
1320
+ * playground. Authorize it ahead of time with `bdk mcp oauth <name>`.
1321
+ */
1322
+ optional?: boolean;
1323
+ /**
1324
+ * Intended effects of tools this connection serves. When set, only
1325
+ * tools whose classified effect is in this set are advertised — a
1326
+ * connection that wants reads never puts a write, or a tool nothing
1327
+ * classified, in the model's toolset.
1328
+ *
1329
+ * Classification is the same fail-closed read of MCP annotations the
1330
+ * dry-run gate uses (`readOnlyHint` / `destructiveHint`). A tool the
1331
+ * server does not classify is omitted, not guessed. Servers that leave
1332
+ * tools unannotated stay empty here until they annotate or a trusted
1333
+ * listing injects a known-read hint.
1334
+ *
1335
+ * Requires {@link advertiseTools}: this filters the named passthroughs
1336
+ * the model sees. A single value (`"read"`) and an array (`["read"]`)
1337
+ * are the same.
1338
+ */
1339
+ effects?: ConnectionEffects;
1340
+ /**
1341
+ * Tool-name denylist. Same shape as the Cursor SDK's
1342
+ * `disallowedTools`: when set, these MCP tool names are omitted from
1343
+ * the advertised set and rejected on `host.mcp`. Combines with
1344
+ * {@link ConnectionConfig.tools} as deny-wins.
1345
+ *
1346
+ * On a model-visible connection this requires {@link advertiseTools}.
1347
+ * On `host-connections/` it restricts `host.mcp` alone.
1348
+ */
1349
+ disallowedTools?: readonly string[];
1350
+ };
1351
+ /**
1352
+ * Per-session connection auth on {@link ConnectionConfig.auth}: session →
1353
+ * headers merged over the transport's static headers for that session's
1354
+ * turns. See the field docs for the fail-closed semantics.
1355
+ */
1356
+ export type ConnectionAuthProvider = (session: SessionInfo) => ConnectionAuthResult | Promise<ConnectionAuthResult>;
1357
+ /** What a {@link ConnectionAuthProvider} returns. */
1358
+ export type ConnectionAuthResult = {
1359
+ headers: Record<string, string>;
1360
+ };
1361
+ /** True when the connection authors tools instead of a spawn/URL/peer. */
1362
+ export declare function isInlineStdioConnection(connection: ConnectionConfig): connection is InlineStdioConnectionConfig & {
1363
+ description?: string;
1364
+ };
1365
+ /**
1366
+ * An MCP connection is available to the agent (SDK `mcpServers`), host
1367
+ * (`ctx.host.mcp`), and channel/schedule handlers.
1368
+ */
1369
+ export type ConnectionDefinition = ConnectionConfig & BrandedDefinition<"connection">;
1370
+ /** Who initiated a session (or an authenticated channel request). */
1371
+ export interface AuthContext {
1372
+ /** Which policy authenticated the caller, e.g. `"local-dev"`. */
1373
+ authenticator: string;
1374
+ principalId: string;
1375
+ principalType: "user" | "service" | "runtime";
1376
+ attributes?: Record<string, string>;
1377
+ }
1378
+ export interface AuthRequestInfo {
1379
+ /** Client IP, or null when the host cannot provide it. */
1380
+ requestIp: string | null;
1381
+ }
1382
+ /**
1383
+ * A route auth policy. Return an {@link AuthContext} to admit the request,
1384
+ * or null to pass to the next policy in the chain. A request is rejected
1385
+ * with 401 when every policy in the chain returns null.
1386
+ */
1387
+ export type AuthPolicy = (request: Request, info: AuthRequestInfo) => AuthContext | null | Promise<AuthContext | null>;
1388
+ /**
1389
+ * A secret named rather than read. Locally the value is
1390
+ * `process.env[secretName]`; on Cursor hosting it is the deployment secret
1391
+ * of that name (`secrets set <slug> <NAME>`).
1392
+ *
1393
+ * Prefer this over a `() => process.env.X` getter for webhook secrets: the
1394
+ * name is what `deploy` writes into the manifest, so the control plane can
1395
+ * verify a provider signature at ingestion — before any compute starts —
1396
+ * and answer the sender with a 401 instead of a 202.
1397
+ */
1398
+ export interface SecretRef {
1399
+ secretName: string;
1400
+ }
1401
+ export declare function isSecretRef(value: unknown): value is SecretRef;
1402
+ export interface SessionEventEnvelope {
1403
+ /** Monotonic per-session event index; reconnect with `?startIndex=`. */
1404
+ index: number;
1405
+ sessionId: string;
1406
+ /** Present on turn-scoped events. */
1407
+ turnId?: string;
1408
+ /** ISO-8601 timestamp. */
1409
+ at: string;
1410
+ }
1411
+ export interface ActionCall {
1412
+ callId: string;
1413
+ toolName: string;
1414
+ args?: unknown;
1415
+ /**
1416
+ * When set, this tool call belongs to a nested subagent turn whose
1417
+ * parent `task` tool call id is `parentCallId`.
1418
+ */
1419
+ parentCallId?: string;
1420
+ /**
1421
+ * Model generation that requested this call. Every tool from one
1422
+ * `runStep` shares the same id (the step's invocation id).
1423
+ */
1424
+ modelCallId?: string;
1425
+ }
1426
+ /** One tool result inside an {@link SessionEventPayload} `actions.completed` batch. */
1427
+ export interface ActionResult {
1428
+ callId: string;
1429
+ toolName: string;
1430
+ output?: unknown;
1431
+ isError: boolean;
1432
+ stubbed?: true;
1433
+ parentCallId?: string;
1434
+ modelCallId?: string;
1435
+ completedAt?: string;
1436
+ }
1437
+ /** Human decision for a parked {@link ToolConfig.needsApproval} tool call. */
1438
+ export type ApprovalDecision = "approve" | "deny";
1439
+ /** Durable record of a tool call waiting on human approval. */
1440
+ export interface PendingApproval {
1441
+ callId: string;
1442
+ turnId: string;
1443
+ toolName: string;
1444
+ args: unknown;
1445
+ requestedAt: string;
1446
+ }
1447
+ /** Durable record of a tool call waiting on MCP authorization. */
1448
+ export interface PendingAuth {
1449
+ callId: string;
1450
+ turnId: string;
1451
+ toolName: string;
1452
+ connection: string;
1453
+ authUrl: string;
1454
+ requestedAt: string;
1455
+ }
1456
+ export type SessionEventPayload = {
1457
+ type: "session.started";
1458
+ data: {
1459
+ channelId: string;
1460
+ dryRun?: boolean;
1461
+ };
1462
+ } | {
1463
+ /** Cursor SDK agent id is known (cloud: `bc-…`; local: session id). */
1464
+ type: "agent.bound";
1465
+ data: {
1466
+ sdkAgentId: string;
1467
+ url?: string;
1468
+ };
1469
+ } | {
1470
+ type: "message.received";
1471
+ data: {
1472
+ text: string;
1473
+ /**
1474
+ * {@link ChannelSession.deliveryId} of each `send()` this prompt
1475
+ * carries, in arrival order. One for a direct send or a steer;
1476
+ * several when coalesced follow-ups drain into one turn. Omitted on
1477
+ * prompts no `send()` produced and on legacy stored events.
1478
+ */
1479
+ deliveryIds?: string[];
1480
+ };
1481
+ } | {
1482
+ /**
1483
+ * The turn was admitted while every {@link AgentConcurrencyOptions.maxRunningTurns}
1484
+ * slot was busy; it waits FIFO and `turn.started` follows once a slot
1485
+ * frees. `position` is 1-based among waiting turns at enqueue time.
1486
+ */
1487
+ type: "turn.queued";
1488
+ data: {
1489
+ position: number;
1490
+ maxRunningTurns: number;
1491
+ };
1492
+ } | {
1493
+ type: "turn.started";
1494
+ data: Record<string, never>;
1495
+ } | {
1496
+ type: "step.started";
1497
+ data: {
1498
+ stepId: number;
1499
+ };
1500
+ } | {
1501
+ type: "step.completed";
1502
+ data: {
1503
+ stepId: number;
1504
+ durationMs: number;
1505
+ };
1506
+ } | {
1507
+ type: "reasoning.appended";
1508
+ data: {
1509
+ delta: string;
1510
+ text: string;
1511
+ parentCallId?: string;
1512
+ };
1513
+ } | {
1514
+ type: "reasoning.completed";
1515
+ data: {
1516
+ durationMs?: number;
1517
+ parentCallId?: string;
1518
+ };
1519
+ } | {
1520
+ type: "message.appended";
1521
+ data: {
1522
+ delta: string;
1523
+ text: string;
1524
+ parentCallId?: string;
1525
+ };
1526
+ } | {
1527
+ type: "message.completed";
1528
+ data: {
1529
+ text: string;
1530
+ finishReason: "stop" | "tool_call";
1531
+ parentCallId?: string;
1532
+ };
1533
+ } | {
1534
+ type: "actions.requested";
1535
+ data: {
1536
+ calls: ActionCall[];
1537
+ parentCallId?: string;
1538
+ /**
1539
+ * Same id as {@link ActionCall.modelCallId} on every call.
1540
+ * One envelope per model step (a single tool is a batch of one)
1541
+ * once that step has finished listing tools.
1542
+ */
1543
+ modelCallId?: string;
1544
+ };
1545
+ } | {
1546
+ /**
1547
+ * A server tool with {@link ToolConfig.needsApproval} is parked until
1548
+ * a human resolves it. The turn stays running; send follow-ups
1549
+ * after `session.waiting` as usual.
1550
+ */
1551
+ type: "action.approval_requested";
1552
+ data: {
1553
+ callId: string;
1554
+ toolName: string;
1555
+ args?: unknown;
1556
+ parentCallId?: string;
1557
+ };
1558
+ } | {
1559
+ type: "action.approval_resolved";
1560
+ data: {
1561
+ callId: string;
1562
+ toolName: string;
1563
+ decision: ApprovalDecision;
1564
+ by?: string;
1565
+ parentCallId?: string;
1566
+ };
1567
+ } | {
1568
+ /**
1569
+ * A host MCP call/list needs OAuth, and a person can authorize it: a
1570
+ * playground or HTTP chat turn, or a Slack message on a channel that
1571
+ * handles this event (`slackChannel({ toolApprovals: true })` or
1572
+ * `buildToolApprovalEvents` in `events`). The turn waits until
1573
+ * the person completes the `authUrl`, the turn is interrupted, or 10
1574
+ * minutes pass. Other turns (schedules, reminders, webhooks, evals) do
1575
+ * not emit this event. They fail the call with a "Reconnect" message.
1576
+ */
1577
+ type: "action.auth_requested";
1578
+ data: {
1579
+ callId: string;
1580
+ toolName: string;
1581
+ connection: string;
1582
+ authUrl: string;
1583
+ parentCallId?: string;
1584
+ };
1585
+ } | {
1586
+ type: "action.auth_resolved";
1587
+ data: {
1588
+ callId: string;
1589
+ toolName: string;
1590
+ connection: string;
1591
+ decision: ApprovalDecision;
1592
+ by?: string;
1593
+ parentCallId?: string;
1594
+ };
1595
+ } | {
1596
+ type: "action.result";
1597
+ data: {
1598
+ callId: string;
1599
+ toolName: string;
1600
+ output?: unknown;
1601
+ isError: boolean;
1602
+ /**
1603
+ * The tool never ran: a write answered by the host in a `dryRun`
1604
+ * session. `actions.requested` still carries the arguments the model
1605
+ * chose, so this is the marker that separates "what it would have
1606
+ * done" from a real effect when reading a trajectory.
1607
+ */
1608
+ stubbed?: true;
1609
+ parentCallId?: string;
1610
+ /** Same id as the matching {@link ActionCall.modelCallId}. */
1611
+ modelCallId?: string;
1612
+ completedAt?: string;
1613
+ };
1614
+ } | {
1615
+ /**
1616
+ * Every result for one {@link SessionEventPayload} `actions.requested`
1617
+ * batch. Pair these two events; `action.result` stays the live
1618
+ * per-call envelope for chips and spans.
1619
+ */
1620
+ type: "actions.completed";
1621
+ data: {
1622
+ results: ActionResult[];
1623
+ parentCallId?: string;
1624
+ modelCallId?: string;
1625
+ };
1626
+ } | {
1627
+ /**
1628
+ * A dry-run call was refused because nothing classifies the tool's
1629
+ * effect: the MCP server sent no readOnlyHint/destructiveHint and no
1630
+ * server-side classification exists for it. The per-run count of these
1631
+ * is the coverage signal — how much of a backtest was actually
1632
+ * runnable, reported rather than assumed.
1633
+ */
1634
+ type: "action.effect_unclassified";
1635
+ data: {
1636
+ callId: string;
1637
+ toolName: string;
1638
+ connection?: string;
1639
+ };
1640
+ } | {
1641
+ /**
1642
+ * A read-effect call is running again after a transient failure.
1643
+ * `attempt` is the try about to run (2 = the first retry). `reason`
1644
+ * is a low-cardinality class (`transport`, `http_503`, `mcp_transient`),
1645
+ * never the vendor text.
1646
+ */
1647
+ type: "action.tool_retry";
1648
+ data: {
1649
+ callId: string;
1650
+ toolName: string;
1651
+ attempt: number;
1652
+ reason: string;
1653
+ connection?: string;
1654
+ };
1655
+ } | {
1656
+ type: "subagent.called";
1657
+ data: {
1658
+ callId: string;
1659
+ name?: string;
1660
+ description?: string;
1661
+ };
1662
+ } | {
1663
+ type: "subagent.completed";
1664
+ /** `isError` is true when the subagent failed or was cancelled. */
1665
+ data: {
1666
+ callId: string;
1667
+ name?: string;
1668
+ isError?: boolean;
1669
+ };
1670
+ } | {
1671
+ /** An artifact was tagged for this session (see {@link ArtifactsApi.tag}). */
1672
+ type: "artifact.tagged";
1673
+ data: {
1674
+ id: string;
1675
+ kind: string;
1676
+ key?: string;
1677
+ title?: string;
1678
+ data: JsonValue;
1679
+ source: ArtifactSource;
1680
+ };
1681
+ } | {
1682
+ type: "turn.completed";
1683
+ data: {
1684
+ result?: string;
1685
+ usage?: TurnUsage;
1686
+ };
1687
+ } | {
1688
+ /**
1689
+ * The harness accepted the turn and named the run. Emitted once the
1690
+ * send lands, so a channel can show the request id while the turn is
1691
+ * still going rather than after it. Quote it verbatim when correlating
1692
+ * with backend logs — never abbreviated.
1693
+ */
1694
+ type: "turn.bound";
1695
+ data: {
1696
+ requestId: string;
1697
+ };
1698
+ } | {
1699
+ type: "turn.failed";
1700
+ data: {
1701
+ message: string;
1702
+ /** Machine-readable terminal status. Omitted on legacy stored events. */
1703
+ status?: "error" | "cancelled";
1704
+ };
1705
+ } | {
1706
+ /**
1707
+ * A follow-up sent mid-turn reached the running agent. Channels use
1708
+ * this to reposition a live progress message below the follow-up,
1709
+ * which Slack cannot do any other way.
1710
+ *
1711
+ * `deliveryId` is set when a coalesced `send()` was steered into the
1712
+ * turn and names that send's {@link ChannelSession.deliveryId}. It is
1713
+ * absent when the Slack nudge carrier delivered the follow-up from its
1714
+ * file store at a tool boundary, which does not know which send it
1715
+ * carried.
1716
+ */
1717
+ type: "nudge.delivered";
1718
+ data: {
1719
+ deliveryId?: string;
1720
+ };
1721
+ } | {
1722
+ type: "session.waiting";
1723
+ data: Record<string, never>;
1724
+ } | {
1725
+ type: "session.completed";
1726
+ data: Record<string, never>;
1727
+ } | {
1728
+ type: "session.failed";
1729
+ data: {
1730
+ message: string;
1731
+ };
1732
+ } | {
1733
+ /** A hosted eval case finished on this session, after its last turn. */
1734
+ type: "eval.case.result";
1735
+ data: EvalCaseResultEventData;
1736
+ };
1737
+ /** Verdict of one hosted eval case, as recorded on its session. */
1738
+ export interface EvalCaseResultEventData {
1739
+ runId: string;
1740
+ caseId: string;
1741
+ ok: boolean;
1742
+ verdict: "passed" | "failed" | "scored" | "skipped";
1743
+ skipReason?: string;
1744
+ assertions: Array<{
1745
+ name: string;
1746
+ passed: boolean;
1747
+ detail?: string;
1748
+ severity?: "gate" | "soft";
1749
+ score?: number;
1750
+ threshold?: number;
1751
+ scope?: string;
1752
+ }>;
1753
+ durationMs: number;
1754
+ error?: string;
1755
+ logs: string[];
1756
+ metrics: Record<string, string | number>;
1757
+ metadata?: Record<string, unknown>;
1758
+ inputs: string[];
1759
+ finalText?: string;
1760
+ tools?: string[];
1761
+ toolCalls?: Array<{
1762
+ toolName: string;
1763
+ args?: unknown;
1764
+ output?: unknown;
1765
+ isError: boolean;
1766
+ }>;
1767
+ }
1768
+ export type SessionEvent = SessionEventEnvelope & SessionEventPayload;
1769
+ export type SessionEventType = SessionEventPayload["type"];
1770
+ export interface TurnUsage {
1771
+ inputTokens: number;
1772
+ outputTokens: number;
1773
+ cacheReadTokens: number;
1774
+ cacheWriteTokens: number;
1775
+ reasoningTokens?: number;
1776
+ }
1777
+ /**
1778
+ * Dollar cost of a whole session, returned by `GET /v1/session/:id/cost`.
1779
+ * Priced on request by `POST /v1/models/estimate-cost`: billed usage events
1780
+ * when available (credits, discounts, CTF), otherwise live catalog pricing of
1781
+ * the session's summed token usage. Turns are never priced individually.
1782
+ */
1783
+ export interface SessionCost {
1784
+ sessionId: string;
1785
+ /** `"usage"` is billed events, `"catalog"` is list pricing of the session's tokens. */
1786
+ source: "usage" | "catalog" | "unavailable";
1787
+ cost: {
1788
+ rawCostCents: number;
1789
+ chargedCents: number;
1790
+ };
1791
+ /** Charged total for the session, in USD. */
1792
+ costUsd: number;
1793
+ /** Total before credits and discounts, in USD. */
1794
+ rawCostUsd: number;
1795
+ /** Model id the cost was priced against. */
1796
+ model?: string;
1797
+ }
1798
+ export type SessionMode = "chat" | "task";
1799
+ /**
1800
+ * Why the session exists. `"eval"` is regression traffic (`defineEval` /
1801
+ * `agent-sdk eval` / playground Evals). Default `"live"`.
1802
+ */
1803
+ export type SessionPurpose = "live" | "eval";
1804
+ /** Read-only view of a session, handed to tools, hooks, and channel events. */
1805
+ export interface SessionInfo {
1806
+ id: string;
1807
+ channelId: string;
1808
+ mode: SessionMode;
1809
+ /** Omit / `"live"` for production traffic; `"eval"` for eval harness sessions. */
1810
+ purpose?: SessionPurpose;
1811
+ /** True when write-classified tool calls are answered by the host. */
1812
+ dryRun?: boolean;
1813
+ /** Frozen instant this session reads at; absent means the wall clock. */
1814
+ asOf?: string;
1815
+ auth: AuthContext | null;
1816
+ title?: string;
1817
+ /**
1818
+ * Channel-local continuation key when the session is addressable for
1819
+ * follow-ups / reminders. Null when the session is not re-keyable.
1820
+ */
1821
+ continuationKey?: string | null;
1822
+ /**
1823
+ * Cursor SDK agent id once bound (hosted ids start with `bc-`; local
1824
+ * turns use the session id). Hosted ids are minted during the first
1825
+ * send, so read this from a fresh `getSession()` handle after a turn
1826
+ * completes — unless the session was created with a seeded
1827
+ * {@link SendMessageOptions.sdkAgentId}.
1828
+ */
1829
+ sdkAgentId?: string;
1830
+ }
1831
+ /** Persisted session record (stored at `sessions/<id>/session.json`). */
1832
+ export interface SessionRecord {
1833
+ sessionId: string;
1834
+ channelId: string;
1835
+ mode: SessionMode;
1836
+ /**
1837
+ * `"eval"` for harness sessions. Older records omit this (treated as
1838
+ * `"live"`).
1839
+ */
1840
+ purpose?: SessionPurpose;
1841
+ /** Frozen at create from {@link SendMessageOptions.dryRun}. */
1842
+ dryRun?: boolean;
1843
+ /** Frozen at create from {@link SendMessageOptions.asOf}. */
1844
+ asOf?: string;
1845
+ modelConfig?: SessionModelConfig;
1846
+ /**
1847
+ * Dry-run replacement for this session's authored instructions.md.
1848
+ * Frozen at create from {@link SendMessageOptions.instructions}.
1849
+ * Absent means the deploy's instructions.md.
1850
+ */
1851
+ instructions?: string;
1852
+ /** Channel-local continuation key; null when the session is not addressable. */
1853
+ continuationKey: string | null;
1854
+ /**
1855
+ * Rotating HTTP follow-up credential for a channel-owned session.
1856
+ * Omitted until HTTP accepts the first follow-up.
1857
+ */
1858
+ httpContinuationKey?: string;
1859
+ auth: AuthContext | null;
1860
+ title?: string;
1861
+ channelState?: JsonValue;
1862
+ /** Cursor SDK agent id for this session. */
1863
+ sdkAgentId?: string;
1864
+ /**
1865
+ * When set, local harness turns use this directory as `cwd` (e.g. a PR
1866
+ * worktree). Session scaffold files still land under the session workspace.
1867
+ */
1868
+ workspaceOverride?: string;
1869
+ /**
1870
+ * One-shot files for the next turn (see
1871
+ * {@link SendMessageOptions.workspaceFiles}). Cleared after apply.
1872
+ */
1873
+ pendingWorkspaceFiles?: Record<string, string | {
1874
+ encoding: "base64";
1875
+ data: string;
1876
+ mimeType?: string;
1877
+ }>;
1878
+ /**
1879
+ * One-shot vision images for the next turn (see
1880
+ * {@link SendMessageOptions.images}). Cleared after apply.
1881
+ */
1882
+ pendingImages?: Array<{
1883
+ data: string;
1884
+ mimeType: string;
1885
+ }>;
1886
+ /**
1887
+ * Per-session cloud attach options captured at session creation, merged
1888
+ * over the agent's static `cloud` config on every turn of this session.
1889
+ */
1890
+ cloudOverride?: AgentCloudOptions;
1891
+ /**
1892
+ * Server-tool calls parked for human approval. Cleared when resolved
1893
+ * or when the host process restarts without a live waiter (the in-flight
1894
+ * SDK tool callback cannot be resumed after process restart).
1895
+ */
1896
+ pendingApprovals?: PendingApproval[];
1897
+ /**
1898
+ * Server-tool MCP calls parked for host or Cursor-account OAuth.
1899
+ * Cleared when resolved or when the host restarts without a live waiter.
1900
+ */
1901
+ pendingAuths?: PendingAuth[];
1902
+ turnCount: number;
1903
+ createdAt: string;
1904
+ updatedAt: string;
1905
+ }
1906
+ export interface TurnOutcome {
1907
+ status: "finished" | "error" | "cancelled";
1908
+ result?: string;
1909
+ errorMessage?: string;
1910
+ /** Stable machine-readable runner code when the failure supplied one. */
1911
+ errorCode?: string;
1912
+ /** Why a cancelled turn stopped, when the engine observed the boundary. */
1913
+ cancellationReason?: "signal" | "runner";
1914
+ usage?: TurnUsage;
1915
+ }
1916
+ /**
1917
+ * Session metadata returned by `GET /v1/sessions` (and consumed by the
1918
+ * bundled playground). Includes the current wire-format continuation token:
1919
+ * the listing is a testing/observability surface for callers already
1920
+ * admitted by the route auth chain.
1921
+ */
1922
+ export interface SessionSummary {
1923
+ sessionId: string;
1924
+ channelId: string;
1925
+ mode: SessionMode;
1926
+ title?: string;
1927
+ turnCount: number;
1928
+ /** True while a turn is executing right now (including queued turns). */
1929
+ running: boolean;
1930
+ /**
1931
+ * True while the session's admitted turn is waiting for a
1932
+ * {@link AgentConcurrencyOptions.maxRunningTurns} slot (subset of
1933
+ * {@link running}). Omitted when the agent has no turn limit.
1934
+ */
1935
+ queued?: boolean;
1936
+ createdAt: string;
1937
+ updatedAt: string;
1938
+ /** True when write-classified tool calls are answered by the host. */
1939
+ dryRun?: boolean;
1940
+ /** Active wire token for HTTP follow-ups, or null when not addressable. */
1941
+ continuationToken: string | null;
1942
+ /**
1943
+ * Conversation permalink (Slack thread, else GitHub PR).
1944
+ */
1945
+ externalUrl?: string;
1946
+ /** GitHub PR when the session is about one. */
1947
+ prUrl?: string;
1948
+ }
1949
+ /**
1950
+ * Where `GET /v1/sessions` loaded rows from.
1951
+ * - `cursor-hosted`: Cursor-managed durable storage
1952
+ * - `local`: the serve process `--state-root` session store
1953
+ */
1954
+ export type SessionListSource = "cursor-hosted" | "local";
1955
+ /**
1956
+ * A session handle scoped to the channel that owns it. This is what channel
1957
+ * route handlers get back from `send()` / `getSession()`.
1958
+ */
1959
+ export interface ChannelSession {
1960
+ readonly id: string;
1961
+ /** Channel-local continuation key currently addressing this session. */
1962
+ readonly continuationToken: string | null;
1963
+ /** True when this `send()` created the session. */
1964
+ readonly isNew: boolean;
1965
+ /**
1966
+ * True when `admission: "coalesce"` enqueued this message behind an
1967
+ * in-flight turn instead of starting immediately (Slack busy path).
1968
+ */
1969
+ readonly coalesced?: boolean;
1970
+ /**
1971
+ * Identifies this `send()` on the session's events: {@link SendMessageOptions.deliveryId}
1972
+ * when the caller passed one, otherwise a fresh `dlv_…` id. The message
1973
+ * reaches the agent exactly one of two ways, and the id is on that event:
1974
+ *
1975
+ * - `nudge.delivered` `{ deliveryId }` — a coalesced send steered into
1976
+ * the running turn.
1977
+ * - `message.received` `{ deliveryIds }` — the prompt of a turn: a send
1978
+ * that started one, or coalesced sends that fell back to the next turn
1979
+ * instead of steering.
1980
+ *
1981
+ * Set on every handle `send()` returns, including the one a hosted-admission
1982
+ * `send()` returns before the session exists. Absent on handles looked up
1983
+ * by session id, which no send produced.
1984
+ */
1985
+ readonly deliveryId?: string;
1986
+ readonly info: SessionInfo;
1987
+ /**
1988
+ * Replay recorded events from `startIndex`, then follow live (NDJSON).
1989
+ * A handle from `send()` defaults `startIndex` to this admission so a
1990
+ * resumed continuation does not replay earlier turns.
1991
+ */
1992
+ getEventStream(options?: {
1993
+ startIndex?: number;
1994
+ }): Promise<ReadableStream<Uint8Array>>;
1995
+ /**
1996
+ * Resolves after the currently running turn reaches a terminal event and
1997
+ * handlers already queued for that session have settled.
1998
+ */
1999
+ waitForCompletion(): Promise<TurnOutcome>;
2000
+ /** Re-key the session's channel-local continuation token. */
2001
+ setContinuationToken(token: string | null): Promise<void>;
2002
+ }
2003
+ export interface SendMessageOptions {
2004
+ /**
2005
+ * Who is sending; flows to `session.auth` on newly created sessions.
2006
+ * On HTTP channel routes, defaults to the request principal from
2007
+ * {@link ChannelHandlerArgs.auth}. Pass explicitly to override (e.g.
2008
+ * `null` or a Slack-derived principal).
2009
+ */
2010
+ auth?: AuthContext | null;
2011
+ /**
2012
+ * Channel-local continuation token. When it addresses an existing session
2013
+ * the message is a follow-up; otherwise a new session is created keyed by
2014
+ * this token. Omit to always create a fresh session.
2015
+ *
2016
+ * `/v2` selectors refuse this field — pass {@link mailboxContinuation} or
2017
+ * a structured {@link claim} instead.
2018
+ */
2019
+ continuationToken?: string;
2020
+ /**
2021
+ * Platform-provided v2 mailbox stamp from verified ingress or the local
2022
+ * host. Channel adapters do not extract it. Ignored on v1.
2023
+ */
2024
+ mailboxContinuation?: MailboxContinuation;
2025
+ /**
2026
+ * v2 host join. Never a concatenated `pr:owner/repo#N` string — the
2027
+ * registry mints `cont:` bytes from this claim.
2028
+ */
2029
+ claim?: ContinuationClaim;
2030
+ /** Initial channel state for newly created sessions. */
2031
+ state?: JsonValue;
2032
+ /**
2033
+ * On resume (continuation hit), shallow-merge into the existing session
2034
+ * channel state before the turn starts. Null / undefined values in the
2035
+ * patch do not overwrite existing keys, so sticky fields (stream ts,
2036
+ * progress banner comment id, …) survive while wake-derived fields
2037
+ * (`headSha`, refs) refresh. Ignored on create; pass {@link state} there.
2038
+ */
2039
+ refreshState?: JsonValue;
2040
+ /** Session display title (applied when creating a new session). */
2041
+ title?: string;
2042
+ /**
2043
+ * Session purpose at create time. `"eval"` marks regression traffic so
2044
+ * hooks and telemetry can tell it from live sessions.
2045
+ */
2046
+ purpose?: SessionPurpose;
2047
+ /**
2048
+ * Answer every write-classified tool call from the host instead of running
2049
+ * it, for this session's whole life (create only — a follow-up cannot clear
2050
+ * it, so a session that starts as a rehearsal stays one).
2051
+ *
2052
+ * Reads execute, writes are answered and recorded, and the arguments the
2053
+ * model chose stay on the session log as the record of the intended action.
2054
+ */
2055
+ dryRun?: boolean;
2056
+ /**
2057
+ * ISO-8601 instant with a timezone, frozen at create: the prompt states
2058
+ * it, {@link ToolContext.now} returns it, and every tool call is checked
2059
+ * against it — a relative time argument (`now-1h`), an absolute one after
2060
+ * the instant, or an omitted window a vendor schema declares is refused so
2061
+ * the model retries with explicit absolute bounds. Tools may also declare
2062
+ * {@link ToolConfig.timeArgs} for precise per-field checking. The check
2063
+ * reads arguments, not behavior: a tool that reads present state without a
2064
+ * time argument still answers from the present.
2065
+ */
2066
+ asOf?: string;
2067
+ modelConfig?: SessionModelConfig;
2068
+ /**
2069
+ * Dry-run only. Replaces this session's authored `instructions.md` for
2070
+ * every turn. Identity and the tool catalog stay. A follow-up cannot set
2071
+ * or clear it, and a session that is not a dry run rejects it.
2072
+ */
2073
+ instructions?: string;
2074
+ /**
2075
+ * Absolute directory used as the local harness `cwd` for this session.
2076
+ * On create, sets the session workspace. On resume (continuation hit),
2077
+ * refreshes `workspaceOverride` when the path differs — e.g. a newer PR
2078
+ * worktree after synchronize.
2079
+ */
2080
+ workspaceDir?: string;
2081
+ /**
2082
+ * Relative path to contents for the next turn. On create, queued for the
2083
+ * first turn; on resume, merged into pending files. Prefer this over
2084
+ * {@link workspaceDir} when you only need to inject a few host-prepared
2085
+ * files. Values may be utf8 strings or
2086
+ * `{ encoding: "base64", data }` blobs (Slack attachments, binary docs).
2087
+ */
2088
+ workspaceFiles?: Record<string, string | {
2089
+ encoding: "base64";
2090
+ data: string;
2091
+ mimeType?: string;
2092
+ }>;
2093
+ /**
2094
+ * Base64 images for this turn's Cursor SDK `send({ images })` (vision).
2095
+ * Cleared after the turn starts. Slack inbound fills this from uploads.
2096
+ */
2097
+ images?: Array<{
2098
+ data: string;
2099
+ mimeType: string;
2100
+ }>;
2101
+ /**
2102
+ * Per-session cloud attach options, merged over the agent's static
2103
+ * `cloud` config (new sessions only). When set, this session attaches
2104
+ * even if {@link AgentConfig.runtime} is `"local"`. Cannot be combined
2105
+ * with {@link clearCloudOverride}.
2106
+ */
2107
+ cloud?: AgentCloudOptions;
2108
+ /**
2109
+ * Clear cloud attach options retained by an existing continuation
2110
+ * session before starting this turn. Cannot be combined with
2111
+ * {@link cloud}. No-op on a new session.
2112
+ */
2113
+ clearCloudOverride?: boolean;
2114
+ /**
2115
+ * Seed the Cursor SDK agent id for a new session (ignored when the
2116
+ * continuation token matches an existing session). A `bc-…` value
2117
+ * reattaches the first turn to that hosted conversation.
2118
+ */
2119
+ sdkAgentId?: string;
2120
+ /**
2121
+ * Turn admission when a session is already busy.
2122
+ * - `"preempt"` (default) — interrupt the in-flight turn (HTTP / MCP).
2123
+ * - `"coalesce"` — enqueue and return without interrupting (Slack).
2124
+ */
2125
+ admission?: "preempt" | "coalesce";
2126
+ /**
2127
+ * Optional source message timestamp for coalesce queue items. When a
2128
+ * mid-turn nudge already delivered this `sourceTs`, boundary resume skips it.
2129
+ */
2130
+ coalesceSourceTs?: string;
2131
+ /**
2132
+ * Caller-chosen id for this send, returned as {@link ChannelSession.deliveryId}
2133
+ * and stamped on the event where the message reaches the agent. Use one
2134
+ * you already hold (a webhook delivery or message id) to correlate without
2135
+ * keeping the returned handle. Opaque, compared verbatim; at most 256
2136
+ * characters. Omit for a fresh `dlv_…` id. Keep it unique per session:
2137
+ * two sends with the same id cannot be told apart.
2138
+ */
2139
+ deliveryId?: string;
2140
+ }
2141
+ export type SendMessageFn = (message: string, options?: SendMessageOptions) => Promise<ChannelSession>;
2142
+ /**
2143
+ * Channel id recorded on the synthetic session info handed to tools invoked
2144
+ * directly (outside any existing session).
2145
+ */
2146
+ export declare const DIRECT_TOOL_CALL_CHANNEL_ID = "direct";
2147
+ /** Options for {@link CallToolFn} — calling an authored tool directly. */
2148
+ export interface CallToolOptions {
2149
+ /** Who is calling; becomes the tool context's session auth. */
2150
+ auth?: AuthContext | null;
2151
+ /**
2152
+ * Address the session by its wire continuation token
2153
+ * (`<channelId>:<key>`, as `/v1/sessions` lists it). A token that maps
2154
+ * to a live (or restorable) session behaves exactly like passing that
2155
+ * session's {@link sessionId} — ownership check, turn serialization, and
2156
+ * event recording included. A token with no session behind it runs the
2157
+ * call scratch-bound with the token's channel id and continuation key as
2158
+ * the call's session identity, so deployments whose tools resolve state
2159
+ * from the continuation key (e.g. VFS mounts rebuilt by a binding
2160
+ * resolver) can serve it with no live session. Mutually exclusive with
2161
+ * {@link sessionId}.
2162
+ */
2163
+ continuationToken?: string;
2164
+ /**
2165
+ * Run the tool inside an existing session: the tool sees that session's
2166
+ * info and materialized workspace, and the call is recorded on the
2167
+ * session's event stream (`actions.requested` / `action.result` under a
2168
+ * per-call `turnId`). Rejected while a model turn is running on the
2169
+ * session. Omit to run against an ephemeral scratch workspace under
2170
+ * `<stateRoot>/tool-calls/<callId>` (materialized with seed files and
2171
+ * removed after the call) with a synthetic
2172
+ * {@link DIRECT_TOOL_CALL_CHANNEL_ID} session info.
2173
+ */
2174
+ sessionId?: string;
2175
+ }
2176
+ /** Result of a direct (deterministic) tool call. */
2177
+ export interface ToolCallOutcome {
2178
+ toolName: string;
2179
+ /** Correlates with the recorded events for session-bound calls. */
2180
+ callId: string;
2181
+ /** True when the tool threw or returned an error envelope. */
2182
+ isError: boolean;
2183
+ /** Normalized result, exactly as the model would receive it. */
2184
+ result: unknown;
2185
+ /**
2186
+ * Human-readable failure text when {@link isError} is true (joined text
2187
+ * parts from the error envelope, or a string result). Prefer this over
2188
+ * re-parsing {@link result} in channel handlers.
2189
+ */
2190
+ errorMessage?: string;
2191
+ durationMs: number;
2192
+ /** Present when the call ran inside an existing session. */
2193
+ sessionId?: string;
2194
+ /**
2195
+ * Present (true) when a session-bound call could not materialize a
2196
+ * session-owned harness cwd and ran in a scratch workspace instead.
2197
+ * The session identity still applied (read-effect calls only get here),
2198
+ * but `ctx.workspaceDir` was not the session workspace — callers
2199
+ * rendering results as session state should surface this.
2200
+ *
2201
+ * A shared `local.workspaceDir` the host cannot create (a phantom path
2202
+ * like `/repo`) is kept as-is and does not set this flag.
2203
+ */
2204
+ scratchWorkspace?: true;
2205
+ }
2206
+ /**
2207
+ * Call an authored server tool (`agent/tools/<name>.ts`) deterministically:
2208
+ * the input is validated against the tool's schema (zod schemas validate;
2209
+ * plain JSON Schema inputs pass through unvalidated, matching the model
2210
+ * path) and `execute` runs in-process, without a model turn deciding to
2211
+ * call it. Rejects unknown tools, `execution: "agent"` tools, and invalid
2212
+ * input by throwing.
2213
+ */
2214
+ export type CallToolFn = (toolName: string, input?: unknown, options?: CallToolOptions) => Promise<ToolCallOutcome>;
2215
+ export type RouteMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
2216
+ export interface ChannelHandlerArgs {
2217
+ /** Route parameters extracted from the path pattern. */
2218
+ params: Record<string, string>;
2219
+ requestIp: string | null;
2220
+ /** Auth context resolved by the channel's auth chain. */
2221
+ auth: AuthContext | null;
2222
+ /**
2223
+ * Validated JSON body when the route declares `bodySchema` (Zod).
2224
+ * Prefer this over `request.json()` so the body is not read twice.
2225
+ */
2226
+ body?: unknown;
2227
+ /**
2228
+ * Validated query object when the route declares `querySchema` (Zod).
2229
+ * Built from `URLSearchParams` (string values) before validation.
2230
+ */
2231
+ query?: unknown;
2232
+ /** Shared host services (MCP / GitHub / Slack). Same as tool `ctx.host`. */
2233
+ host: HostContext;
2234
+ /** Start or resume a session on this channel. */
2235
+ send: SendMessageFn;
2236
+ /** Look up an existing session on this channel. */
2237
+ getSession(sessionId: string): Promise<ChannelSession | null>;
2238
+ /** Hand inbound work to a different channel (cross-channel hand-off). */
2239
+ receive(channel: ChannelDefinition | HttpChannelDefinition | string, input: ReceiveInput): Promise<ChannelSession>;
2240
+ /** Call an authored server tool directly (no model turn). */
2241
+ callTool: CallToolFn;
2242
+ /** Extend server lifetime tracking for background work. */
2243
+ waitUntil(promise: Promise<unknown>): void;
2244
+ /**
2245
+ * Absolute playground + NDJSON trace URLs for a session on this agent
2246
+ * mount (single-agent `""` or multi-agent `"/<slug>"`). Prefer this over
2247
+ * rebuilding paths from the request URL.
2248
+ */
2249
+ sessionUrls(request: Request, sessionId: string): {
2250
+ playgroundUrl: string;
2251
+ traceUrl: string;
2252
+ };
2253
+ /**
2254
+ * Durable artifacts (unbound — channel handlers have no ambient session;
2255
+ * pass `sessionId` in `tag` input to attribute one).
2256
+ */
2257
+ artifacts: ArtifactsApi;
2258
+ /** Hosted Slack admission uses this to paint a warm follow-up. */
2259
+ hasContinuationSession?(continuationToken: string): Promise<boolean>;
2260
+ isContinuationBusy?(continuationToken: string): Promise<boolean>;
2261
+ getContinuationLastBotMessageTs?(continuationToken: string): Promise<string | undefined>;
2262
+ interruptContinuation?(continuationToken: string): Promise<boolean>;
2263
+ }
2264
+ export type ChannelRouteHandler = (request: Request, args: ChannelHandlerArgs) => Response | Promise<Response>;
2265
+ /**
2266
+ * Channel HTTP routes must declare a Zod schema (plain JSON Schema objects
2267
+ * are not accepted — TypeScript will reject them).
2268
+ */
2269
+ export type ChannelRouteSchema = ZodSchema;
2270
+ /** Handler args with a required, schema-inferred `query`. */
2271
+ export type ChannelHandlerArgsWithQuery<TQuery> = ChannelHandlerArgs & {
2272
+ query: TQuery;
2273
+ };
2274
+ /** Handler args with a required, schema-inferred `body`. */
2275
+ export type ChannelHandlerArgsWithBody<TBody> = ChannelHandlerArgs & {
2276
+ body: TBody;
2277
+ };
2278
+ /** Handler args with inferred `body` and optional inferred `query`. */
2279
+ export type ChannelHandlerArgsWithBodyAndQuery<TBody, TQuery> = ChannelHandlerArgs & {
2280
+ body: TBody;
2281
+ query: TQuery;
2282
+ };
2283
+ /**
2284
+ * GET routes must declare a Zod `querySchema` (use `z.object({})` when there
2285
+ * are no query params — path params still live on `args.params`).
2286
+ */
2287
+ export interface ChannelGetRouteSpec<TQuery extends ChannelRouteSchema = ChannelRouteSchema> {
2288
+ description?: string;
2289
+ querySchema: TQuery;
2290
+ handler: (request: Request, args: ChannelHandlerArgsWithQuery<ZodSchemaOutput<TQuery>>) => Response | Promise<Response>;
2291
+ }
2292
+ /**
2293
+ * POST / PUT / PATCH routes must declare a Zod `bodySchema`. Optional
2294
+ * `querySchema` when the route also reads search params.
2295
+ */
2296
+ export interface ChannelBodyRouteSpec<TBody extends ChannelRouteSchema = ChannelRouteSchema, TQuery extends ChannelRouteSchema | undefined = undefined> {
2297
+ description?: string;
2298
+ bodySchema: TBody;
2299
+ querySchema?: TQuery;
2300
+ handler: (request: Request, args: TQuery extends ChannelRouteSchema ? ChannelHandlerArgsWithBodyAndQuery<ZodSchemaOutput<TBody>, ZodSchemaOutput<TQuery>> : ChannelHandlerArgsWithBody<ZodSchemaOutput<TBody>>) => Response | Promise<Response>;
2301
+ }
2302
+ /**
2303
+ * DELETE routes may declare Zod schemas when useful; neither is required.
2304
+ */
2305
+ export interface ChannelDeleteRouteSpec<TBody extends ChannelRouteSchema | undefined = undefined, TQuery extends ChannelRouteSchema | undefined = undefined> {
2306
+ description?: string;
2307
+ bodySchema?: TBody;
2308
+ querySchema?: TQuery;
2309
+ handler: ChannelRouteHandler;
2310
+ }
2311
+ export interface ChannelRoute {
2312
+ method: RouteMethod;
2313
+ path: string;
2314
+ handler: ChannelRouteHandler;
2315
+ description?: string;
2316
+ bodySchema?: ChannelRouteSchema;
2317
+ querySchema?: ChannelRouteSchema;
2318
+ }
2319
+ /** Input to a channel's `receive` hook (and to `args.receive(...)`). */
2320
+ export interface ReceiveInput {
2321
+ message: string;
2322
+ auth: AuthContext | null;
2323
+ /** Channel-specific delivery target (e.g. a chat channel id). */
2324
+ target?: JsonObject;
2325
+ }
2326
+ /**
2327
+ * Per-event channel context. `state` is mutable. Turn events receive the
2328
+ * state snapshot captured for that turn; handler mutations are recursively
2329
+ * merged into the latest persisted state so fields refreshed by overlapping
2330
+ * deliveries survive. At paths changed by the handler, objects merge
2331
+ * recursively, arrays and scalars replace the latest value, and deletion
2332
+ * removes the latest value. Events outside a turn receive current live state.
2333
+ */
2334
+ export interface ChannelEventContext<TState = JsonValue> {
2335
+ channelId: string;
2336
+ state: TState;
2337
+ continuationToken: string | null;
2338
+ setContinuationToken(token: string | null): Promise<void>;
2339
+ }
2340
+ /** Per-event session context shared by channel `events` handlers and hooks. */
2341
+ export interface SessionContext {
2342
+ session: SessionInfo;
2343
+ /**
2344
+ * Shared host services (MCP / GitHub / Slack / kv / files). Same as
2345
+ * tool `ctx.host`. `files` and `otel` are bound to this session, so a
2346
+ * relative path cannot read another session's files.
2347
+ */
2348
+ host: HostContext;
2349
+ /**
2350
+ * Durable artifacts bound to this event's session and turn. `tag`
2351
+ * auto-fills both ids and rejects a conflicting explicit `sessionId`.
2352
+ */
2353
+ artifacts: ArtifactsApi;
2354
+ }
2355
+ export type ChannelEventHandler<TState = JsonValue, TEvent extends SessionEvent = SessionEvent> = (event: TEvent, channel: ChannelEventContext<TState>, ctx: SessionContext) => void | Promise<void>;
2356
+ /** Handlers are keyed by event type and receive the narrowed event. */
2357
+ export type ChannelEventHandlers<TState = JsonValue> = {
2358
+ [K in SessionEventType]?: ChannelEventHandler<TState, Extract<SessionEvent, {
2359
+ type: K;
2360
+ }>>;
2361
+ } & {
2362
+ "*"?: ChannelEventHandler<TState, SessionEvent>;
2363
+ };
2364
+ /** Bound helpers passed to {@link ChannelConfig.onStart}. */
2365
+ export interface ChannelStartArgs {
2366
+ send: SendMessageFn;
2367
+ /**
2368
+ * Hosted architecture from {@link AgentConfig.architecture}. Discovery
2369
+ * fills `"v2"` when the author omits it. Host pipelines that call
2370
+ * `send()` themselves (instead of letting the channel adapter stamp
2371
+ * continuation) branch on this so v1 `continuationToken` and v2 `claim`
2372
+ * stay mutually exclusive.
2373
+ */
2374
+ architecture?: AgentArchitecture;
2375
+ getSession(sessionId: string): Promise<ChannelSession | null>;
2376
+ receive(channel: ChannelDefinition | HttpChannelDefinition | string, input: ReceiveInput): Promise<ChannelSession>;
2377
+ /** Call an authored server tool directly (no model turn). */
2378
+ callTool: CallToolFn;
2379
+ /**
2380
+ * Append an assistant message to a session without a model turn and without
2381
+ * a user `message.received` bubble. Prefer this over `send()` when a host
2382
+ * task already produced the final text (e.g. after staged `callTool`s).
2383
+ */
2384
+ emitAssistantMessage(sessionId: string, text: string): Promise<void>;
2385
+ /** Shared host services (MCP / GitHub / Slack). Same as {@link ChannelHandlerArgs.host}. */
2386
+ host: HostContext;
2387
+ waitUntil(promise: Promise<unknown>): void;
2388
+ /**
2389
+ * Whether a live session already exists for a continuation token on this
2390
+ * channel (includes lazy restore from storage).
2391
+ */
2392
+ hasContinuationSession(continuationToken: string): Promise<boolean>;
2393
+ /**
2394
+ * Whether a model turn is in flight (or being admitted) for the session
2395
+ * addressed by this continuation token.
2396
+ */
2397
+ isContinuationBusy(continuationToken: string): Promise<boolean>;
2398
+ /**
2399
+ * Slack warm-delta watermark: last agent reply ts recorded on the session's
2400
+ * channel state (`lastBotMessageTs`), when present.
2401
+ */
2402
+ getContinuationLastBotMessageTs(continuationToken: string): Promise<string | undefined>;
2403
+ /**
2404
+ * Interrupt the in-flight turn for a continuation token and clear any
2405
+ * coalesced follow-ups queued behind it. Returns whether work was active.
2406
+ */
2407
+ interruptContinuation(continuationToken: string): Promise<boolean>;
2408
+ /**
2409
+ * Approve or deny a parked {@link ToolConfig.needsApproval} tool call
2410
+ * for a session on this channel. Channel packs (e.g. Slack Block Kit
2411
+ * buttons) use this to unblock the turn without going through the HTTP
2412
+ * approvals route.
2413
+ */
2414
+ resolveApproval(sessionId: string, callId: string, decision: ApprovalDecision, auth: AuthContext | null, options?: {
2415
+ asSessionOwner?: boolean;
2416
+ }): Promise<PendingApproval>;
2417
+ /**
2418
+ * Mark a parked MCP auth as connected or cancelled. Channel packs
2419
+ * (Slack "Connected") use this; the public OAuth callback also
2420
+ * resolves after `finishAuth`.
2421
+ */
2422
+ resolveAuth(sessionId: string, callId: string, decision: ApprovalDecision, auth: AuthContext | null, options?: {
2423
+ asSessionOwner?: boolean;
2424
+ }): Promise<PendingAuth>;
2425
+ /**
2426
+ * Server log sink (same as {@link ServeOptions.logger}). Channel packs
2427
+ * should prefer this over `console.*` so CLI/eval hosts can redirect.
2428
+ */
2429
+ logger: (line: string) => void;
2430
+ /**
2431
+ * Durable artifacts (unbound, same facade as
2432
+ * {@link ChannelHandlerArgs.artifacts}) — for host pipelines the channel
2433
+ * drives outside any route handler.
2434
+ */
2435
+ artifacts: ArtifactsApi;
2436
+ }
2437
+ /**
2438
+ * Metadata a channel pack attaches for discovery, `projectInfo`, and CLI
2439
+ * helpers (e.g. `agent-sdk github forward`). Most fields are descriptive;
2440
+ * explicitly documented protocol fields may also be consumed by the host.
2441
+ */
2442
+ export interface ChannelMeta {
2443
+ /** Well-known pack kind, e.g. `"github"` or `"slack"`. */
2444
+ kind?: string;
2445
+ /**
2446
+ * For GitHub webhook packs: the webhook event names this channel is wired
2447
+ * to dispatch on. Used to derive `gh webhook forward --events`.
2448
+ */
2449
+ githubWebhookEvents?: readonly string[];
2450
+ /**
2451
+ * For Origin webhook packs: the Origin event types this channel is wired
2452
+ * to dispatch on. Used by `--cursor-events` to subscribe `provider: "origin"`.
2453
+ */
2454
+ originWebhookEvents?: readonly string[];
2455
+ /**
2456
+ * For GitLab webhook packs: the `object_kind`s this channel is wired to
2457
+ * dispatch on (`merge_request`, `note`, `push`, `pipeline`, `tag_push`).
2458
+ */
2459
+ gitlabWebhookEvents?: readonly string[];
2460
+ /**
2461
+ * For Bitbucket webhook packs: the event keys this channel is wired to
2462
+ * dispatch on, in the Cloud vocabulary (`pullrequest:created`, …).
2463
+ */
2464
+ bitbucketWebhookEvents?: readonly string[];
2465
+ /**
2466
+ * For PagerDuty webhook packs: the v3 `event_type`s this channel is wired
2467
+ * to dispatch on (`incident.triggered`, `incident.annotated`, …).
2468
+ */
2469
+ pagerdutyWebhookEvents?: readonly string[];
2470
+ /**
2471
+ * For deployments packs: the factory event types this channel is wired
2472
+ * to dispatch on. Extracted into the deploy manifest as `eventTypes`.
2473
+ */
2474
+ deploymentEventTypes?: readonly string[];
2475
+ /**
2476
+ * For Change Monitor checkpoint and Factory issue packs: the factory
2477
+ * event types this channel is wired to dispatch on. Extracted into the
2478
+ * deploy manifest as `eventTypes`. Kept separate from
2479
+ * `deploymentEventTypes`.
2480
+ */
2481
+ factoryEventTypes?: readonly string[];
2482
+ /**
2483
+ * For Slack packs: the Events API event types this channel dispatches on
2484
+ * (`app_mention`, `message`), derived from `engagement`. Extracted into
2485
+ * the deploy manifest as `eventTypes` so hosted v2 fanout subscribes to
2486
+ * exactly these. Local Socket Mode ignores it (the socket delivers
2487
+ * whatever the app manifest subscribed to).
2488
+ */
2489
+ slackEventTypes?: readonly string[];
2490
+ /**
2491
+ * Static agentic-reply protocol for hosted Slack ingress. Only literals
2492
+ * belong here: the platform persists this declaration at deploy time and
2493
+ * may act before author code starts.
2494
+ */
2495
+ slackReply?: {
2496
+ mode: "agentic";
2497
+ ack: string;
2498
+ placeholder?: string;
2499
+ };
2500
+ /**
2501
+ * For Slack packs with the opt-in channel watch: the allowlisted channels
2502
+ * (ids or `#names`) this channel dispatches on without a mention. Surfaced
2503
+ * by `info` so watched channels are auditable.
2504
+ */
2505
+ slackChannelPosts?: readonly string[];
2506
+ /**
2507
+ * Author-facing notices about deprecated options the pack still honored.
2508
+ * Discovery surfaces each one as a `validate` warning on the channel file.
2509
+ */
2510
+ deprecations?: readonly string[];
2511
+ }
2512
+ export interface ChannelConfig<TState = JsonValue> {
2513
+ /**
2514
+ * Route auth chain. Defaults to `[localDevStrict()]`. Include
2515
+ * `publicEndpoint()` to serve this channel WITHOUT the platform alias
2516
+ * token on Cursor hosting (for webhook senders that cannot attach custom
2517
+ * headers — the handler must verify deliveries itself).
2518
+ */
2519
+ auth?: AuthPolicy[];
2520
+ routes?: ChannelRoute[];
2521
+ /**
2522
+ * Descriptive metadata for tooling (kind, webhook events). Attached by
2523
+ * channel packs; ignored by the router and session engine.
2524
+ */
2525
+ meta?: ChannelMeta;
2526
+ /** Initial per-session channel state (JSON-serializable). */
2527
+ state?: TState;
2528
+ /**
2529
+ * Owns inbound cross-channel hand-offs. When omitted, `receive` starts a
2530
+ * fresh session with the input message.
2531
+ */
2532
+ receive?: (input: ReceiveInput, args: {
2533
+ send: SendMessageFn;
2534
+ artifacts: ArtifactsApi;
2535
+ }) => Promise<ChannelSession | undefined | void> | ChannelSession | void;
2536
+ /** Stream-event handlers for sessions owned by this channel. */
2537
+ events?: ChannelEventHandlers<TState>;
2538
+ /** Called once when the server mounts this channel. Optional stop via onStop. */
2539
+ onStart?: (args: ChannelStartArgs) => void | Promise<void>;
2540
+ /** Called when the server shuts down. */
2541
+ onStop?: () => void | Promise<void>;
2542
+ }
2543
+ export type ChannelDefinition<TState = JsonValue> = ChannelConfig<TState> & BrandedDefinition<"channel">;
2544
+ /** Configuration for the built-in HTTP session channel. */
2545
+ export interface HttpChannelConfig {
2546
+ /** Route auth chain. Defaults to `[localDevStrict()]`. */
2547
+ auth?: AuthPolicy[];
2548
+ /**
2549
+ * Continuation selector. Omit this to inherit the agent architecture's
2550
+ * default. Set it explicitly only when migrating persisted identities.
2551
+ */
2552
+ continuation?: ContinuationIdentity;
2553
+ /**
2554
+ * Transform the inbound message before the agent sees it (e.g. prepend
2555
+ * request-specific context).
2556
+ */
2557
+ onMessage?: (message: string, info: {
2558
+ auth: AuthContext | null;
2559
+ }) => string | Promise<string>;
2560
+ /**
2561
+ * Bind host state after the platform assigns this session's mailbox key
2562
+ * and before `send()`.
2563
+ */
2564
+ onAdmit?: (info: HttpSessionAdmitInfo) => void | Promise<void>;
2565
+ /** Stream-event handlers for sessions created over HTTP. */
2566
+ events?: ChannelEventHandlers;
2567
+ }
2568
+ /** Subject of a hosted HTTP startSession, seen by {@link HttpChannelConfig.onAdmit}. */
2569
+ export type HttpSessionAdmitInfo = {
2570
+ message: string;
2571
+ sessionKey: string;
2572
+ dryRun?: boolean;
2573
+ asOf?: string;
2574
+ modelConfig?: SessionModelConfig;
2575
+ /** Dry-run replacement for the agent's instructions.md. */
2576
+ instructions?: string;
2577
+ host: HostContext;
2578
+ };
2579
+ /** Reject a hosted startSession subject from {@link HttpChannelConfig.onAdmit}. */
2580
+ export declare class HttpSessionAdmitError extends Error {
2581
+ readonly status: 400;
2582
+ constructor(message: string);
2583
+ }
2584
+ export type HttpChannelDefinition = HttpChannelConfig & BrandedDefinition<"http-channel">;
2585
+ export interface HookContext extends SessionContext {
2586
+ agent: {
2587
+ name: string;
2588
+ };
2589
+ channel: {
2590
+ id: string;
2591
+ continuationToken: string | null;
2592
+ };
2593
+ /**
2594
+ * Durable channel state for this session (the turn snapshot when
2595
+ * dispatching inside a turn). Same blob `send({ state })` stamped;
2596
+ * survives process restart. Null when the session has none.
2597
+ */
2598
+ channelState: JsonValue | null;
2599
+ /**
2600
+ * Absolute path of the agent's durable state root (shared across every
2601
+ * session of this agent). Hooks that maintain derived state (e.g. the
2602
+ * memory journal) write here.
2603
+ */
2604
+ stateRoot: string;
2605
+ /**
2606
+ * Durable artifacts, bound to this hook's session: `tag` auto-fills
2607
+ * `sessionId` (and `turnId` when known).
2608
+ */
2609
+ artifacts: ArtifactsApi;
2610
+ }
2611
+ export type HookHandler<TEvent extends SessionEvent = SessionEvent> = (event: TEvent, ctx: HookContext) => void | Promise<void>;
2612
+ /** Handlers are keyed by event type and receive the narrowed event. */
2613
+ export type HookEventHandlers = {
2614
+ [K in SessionEventType]?: HookHandler<Extract<SessionEvent, {
2615
+ type: K;
2616
+ }>>;
2617
+ } & {
2618
+ "*"?: HookHandler;
2619
+ };
2620
+ export interface HookConfig {
2621
+ events: HookEventHandlers;
2622
+ }
2623
+ export type HookDefinition = HookConfig & BrandedDefinition<"hook">;
2624
+ /** One declared artifact kind (see {@link ArtifactsConfig.kinds}). */
2625
+ export interface ArtifactKindConfig {
2626
+ /**
2627
+ * What this kind holds. Also the model-facing prompt for the
2628
+ * `tag_artifact` built-in tool when {@link ArtifactsConfig.agentTool}
2629
+ * is enabled.
2630
+ */
2631
+ description: string;
2632
+ /**
2633
+ * Optional Zod schema; `tag` validates the payload against it and
2634
+ * persists the parsed output (defaults and coercions applied), so
2635
+ * the schema's output must stay JSON-serializable.
2636
+ */
2637
+ schema?: ZodSchema;
2638
+ }
2639
+ /** Input to `defineArtifacts` (authored at `agent/artifacts.ts`). */
2640
+ export interface ArtifactsConfig {
2641
+ /**
2642
+ * Declared artifact kinds. With kinds declared, `tag` only accepts
2643
+ * these; with none, any kind string is accepted freeform.
2644
+ */
2645
+ kinds?: Record<string, ArtifactKindConfig>;
2646
+ /**
2647
+ * Expose the model-facing `tag_artifact` built-in tool generated from
2648
+ * {@link kinds}. Requires at least one declared kind.
2649
+ */
2650
+ agentTool?: boolean;
2651
+ /**
2652
+ * Retention cap (default 1000). Architecture v1 and self-hosted v2
2653
+ * evict the oldest-updated artifact on insert past the cap. Managed
2654
+ * architecture v2 leaves retention to the platform.
2655
+ */
2656
+ max?: number;
2657
+ }
2658
+ export type ArtifactsDefinition = ArtifactsConfig & BrandedDefinition<"artifacts">;
2659
+ /** Who tagged an artifact: host code, or the model via `tag_artifact`. */
2660
+ export type ArtifactSource = "host" | "model";
2661
+ /** One durable tagged artifact. */
2662
+ export interface ArtifactRecord {
2663
+ /** Stable id: derived from {@link key} when present, else random. */
2664
+ id: string;
2665
+ kind: string;
2666
+ /** Author-chosen upsert key (same key ⇒ same id ⇒ replaces the row). */
2667
+ key?: string;
2668
+ title?: string;
2669
+ data: JsonValue;
2670
+ /** Present when the artifact carries a file/blob payload (served at `GET /v1/artifacts/:id/content`). */
2671
+ content?: {
2672
+ size: number;
2673
+ contentType?: string;
2674
+ };
2675
+ sessionId?: string;
2676
+ turnId?: string;
2677
+ source: ArtifactSource;
2678
+ createdAt: string;
2679
+ updatedAt: string;
2680
+ }
2681
+ /** Input to {@link ArtifactsApi.tag}. */
2682
+ export interface ArtifactTagInput {
2683
+ /** Defaults to `"artifact"` when no kinds are declared. */
2684
+ kind?: string;
2685
+ data: JsonValue;
2686
+ title?: string;
2687
+ /** Upsert key: tagging the same key again replaces the row. */
2688
+ key?: string;
2689
+ /**
2690
+ * File/blob payload, served via `GET /v1/artifacts/:id/content`.
2691
+ * Re-tagging a keyed artifact without `contents` keeps the existing payload.
2692
+ */
2693
+ contents?: string | Uint8Array;
2694
+ /** MIME type reported when serving {@link contents}. */
2695
+ contentType?: string;
2696
+ /**
2697
+ * Session to attribute (and stream an `artifact.tagged` event to). On
2698
+ * session-bound facades ({@link ToolContext.artifacts},
2699
+ * {@link HookContext.artifacts}) this is auto-filled and a different
2700
+ * value is rejected; unbound facades
2701
+ * ({@link ChannelHandlerArgs.artifacts}) accept it explicitly.
2702
+ */
2703
+ sessionId?: string;
2704
+ turnId?: string;
2705
+ /** Defaults to `"host"`. */
2706
+ source?: ArtifactSource;
2707
+ }
2708
+ /** Filter for {@link ArtifactsApi.list} and {@link ArtifactsApi.page}. */
2709
+ export interface ArtifactListFilter {
2710
+ kind?: string;
2711
+ sessionId?: string;
2712
+ }
2713
+ /** Options for {@link ArtifactsApi.page}. */
2714
+ export interface ArtifactPageOptions extends ArtifactListFilter {
2715
+ /** Page size, clamped to 1–1000. Default 200. */
2716
+ limit?: number;
2717
+ /**
2718
+ * Opaque resume position from the previous page's
2719
+ * {@link ArtifactPage.nextCursor}. Pass the same filter on every page of
2720
+ * one walk; the cursor marks a position, not a query.
2721
+ */
2722
+ cursor?: string;
2723
+ }
2724
+ /** One page of {@link ArtifactsApi.page} results, newest-updated first. */
2725
+ export interface ArtifactPage {
2726
+ records: ArtifactRecord[];
2727
+ /**
2728
+ * Present while rows remain to examine; pass back as
2729
+ * {@link ArtifactPageOptions.cursor}. Each call reads a bounded number of
2730
+ * rows, so with a sparse filter a page can carry fewer records than
2731
+ * `limit` — even none — while `nextCursor` says the walk is not done.
2732
+ */
2733
+ nextCursor?: string;
2734
+ }
2735
+ /**
2736
+ * The artifacts API, attached as `ctx.artifacts` on tools
2737
+ * ({@link ToolContext}), hooks ({@link HookContext}), and channel handlers
2738
+ * ({@link ChannelHandlerArgs}). Tool and hook facades are session-bound:
2739
+ * `tag` auto-fills the session; the channel facade is unbound.
2740
+ */
2741
+ export interface ArtifactsApi {
2742
+ /** Tag (upsert) one artifact. See {@link ArtifactTagInput}. */
2743
+ tag(input: ArtifactTagInput): Promise<ArtifactRecord>;
2744
+ /**
2745
+ * Tagged artifacts, newest-updated first — the newest page only (at most
2746
+ * 200 records). Walk the full set with {@link ArtifactsApi.page}.
2747
+ */
2748
+ list(filter?: ArtifactListFilter): Promise<ArtifactRecord[]>;
2749
+ /** Bounded, cursor-paginated artifacts, newest-updated first. */
2750
+ page(options?: ArtifactPageOptions): Promise<ArtifactPage>;
2751
+ }
2752
+ export interface ScheduleHandlerArgs {
2753
+ /** Hand the scheduled work to a channel. */
2754
+ receive: (channel: ChannelDefinition | HttpChannelDefinition | string, input: ReceiveInput) => Promise<ChannelSession>;
2755
+ /** Call an authored server tool directly (no model turn). */
2756
+ callTool: CallToolFn;
2757
+ /** Keep the dispatch alive past handler return. */
2758
+ waitUntil(promise: Promise<unknown>): void;
2759
+ /** Pre-built app principal for work the agent does on its own behalf. */
2760
+ appAuth: AuthContext;
2761
+ /** Shared host services (MCP / GitHub / Slack). Same as tool `ctx.host`. */
2762
+ host: HostContext;
2763
+ /**
2764
+ * Durable artifacts (unbound — schedule handlers have no ambient session;
2765
+ * pass `sessionId` explicitly to attribute).
2766
+ */
2767
+ artifacts: ArtifactsApi;
2768
+ }
2769
+ export interface ScheduleConfig {
2770
+ /** Standard 5-field cron expression, evaluated in UTC. */
2771
+ cron: string;
2772
+ /** Fire-and-forget prompt (task mode). Mutually exclusive with `run`. */
2773
+ markdown?: string;
2774
+ /** Handler form: full control over dispatch. */
2775
+ run?: (args: ScheduleHandlerArgs) => void | Promise<void>;
2776
+ }
2777
+ export type ScheduleDefinition = ScheduleConfig & BrandedDefinition<"schedule">;
2778
+ /**
2779
+ * Authored at `agent/reminders/<name>.ts`. The registry name is the module
2780
+ * stem. Pass the discovered definition to {@link ReminderCreateInput.handler}
2781
+ * with serializable {@link ReminderCreateInput.args}; the engine persists the
2782
+ * stem, not the function.
2783
+ */
2784
+ export interface ReminderHandlerConfig {
2785
+ /**
2786
+ * Invoked on every fire with {@link ReminderFireContext} (including the
2787
+ * create-time {@link ReminderFireContext.args} blob).
2788
+ */
2789
+ run: (ctx: ReminderFireContext) => Promise<ReminderFireResult>;
2790
+ }
2791
+ export type ReminderDefinition = ReminderHandlerConfig & BrandedDefinition<"reminder">;
2792
+ export interface DiscoveredReminder {
2793
+ name: string;
2794
+ definition: ReminderDefinition;
2795
+ }
2796
+ export type ReminderBusyPolicy = "skipIfBusy" | "queueBehindTurn";
2797
+ /** Public reminder status. Internal claim state (`firing`) is not exposed. */
2798
+ export type ReminderStatus = "armed" | "completed" | "cancelled" | "disarmed";
2799
+ export type ReminderScheduleKind = "every" | "cron" | "delay" | "at";
2800
+ export type ReminderFireResult = {
2801
+ action: "skip";
2802
+ reschedule?: ReminderReschedule;
2803
+ } | {
2804
+ action: "delivered";
2805
+ reschedule?: ReminderReschedule;
2806
+ } | {
2807
+ action: "stop";
2808
+ };
2809
+ export interface ReminderReschedule {
2810
+ delay?: string | number;
2811
+ at?: Date | string;
2812
+ }
2813
+ export interface ReminderTarget {
2814
+ channelId: string;
2815
+ continuationToken: string;
2816
+ [key: string]: unknown;
2817
+ }
2818
+ export interface ReminderUntilContext {
2819
+ id: string;
2820
+ purpose: string;
2821
+ fireCount: number;
2822
+ target: ReminderTarget;
2823
+ host: HostContext;
2824
+ mcp: HostMcpRegistry;
2825
+ }
2826
+ /**
2827
+ * Send fields a reminder followup may carry onto the turn it starts, the
2828
+ * subset of {@link SendMessageOptions} a host pipeline needs when the fire
2829
+ * itself prepares the turn (channel state for a later host hook,
2830
+ * a session title, a cloud-attach reset). Continuation addressing stays the
2831
+ * reminder's stored binding and is not overridable here.
2832
+ */
2833
+ export interface ReminderFollowupOptions {
2834
+ /** Initial channel state when the followup creates the session. */
2835
+ state?: JsonValue;
2836
+ /** Shallow-merged into an existing session's channel state (see {@link SendMessageOptions.refreshState}). */
2837
+ refreshState?: JsonValue;
2838
+ /** Session display title (applied when creating a new session). */
2839
+ title?: string;
2840
+ /** See {@link SendMessageOptions.clearCloudOverride}. */
2841
+ clearCloudOverride?: boolean;
2842
+ /**
2843
+ * Open a new session under this principal when the stored continuation
2844
+ * has none anywhere (pod or durable storage) — the session an inbound
2845
+ * delivery on that key would create, so later deliveries under the same
2846
+ * principal keep joining it. A durable session that exists but cannot be
2847
+ * materialized still throws, matching prompt fires: opening over it would
2848
+ * shadow the record. Omitted, a missing session also keeps the existing
2849
+ * behavior: the followup throws.
2850
+ */
2851
+ openAuth?: AuthContext;
2852
+ }
2853
+ export interface ReminderFireContext extends ReminderUntilContext {
2854
+ appAuth: AuthContext;
2855
+ /**
2856
+ * Serializable args from {@link ReminderCreateInput.args} when the fire
2857
+ * uses a named {@link ReminderCreateInput.handler}. Empty object otherwise.
2858
+ */
2859
+ args: JsonObject;
2860
+ /**
2861
+ * Wake the reminder's already-bound session (target is implicit). On a
2862
+ * hosted architecture v2 deployment this resolves after the woken turn
2863
+ * completes, because the pod may stop once the fire's outcome is applied;
2864
+ * locally and on v1 it resolves as soon as the turn is admitted.
2865
+ */
2866
+ followup(args: {
2867
+ message: string;
2868
+ } & ReminderFollowupOptions): Promise<ChannelSession>;
2869
+ cancel(reason?: string): Promise<void>;
2870
+ /**
2871
+ * Durable artifacts (unbound — the reminder is bound to a continuation
2872
+ * token, not a resolved session; pass `sessionId` in `tag` input to
2873
+ * attribute one).
2874
+ */
2875
+ artifacts: ArtifactsApi;
2876
+ }
2877
+ /**
2878
+ * Create a durable wake bound to a channel continuation.
2879
+ *
2880
+ * Exactly one of `prompt` | `handler` | `run`, and exactly one of
2881
+ * `every` | `cron` | `delay` | `at`. Prompt fires always follow up into the
2882
+ * bound session. Named `handler` resolves `agent/reminders/<name>.ts` on
2883
+ * every fire (survives restart). Anonymous `run` stays supported on local
2884
+ * and hosted v1; hosted architecture v2 rejects it at create.
2885
+ *
2886
+ * @example Recurring (host policy)
2887
+ * ```ts
2888
+ * await host.reminders.create({
2889
+ * purpose: "merge_conflict_watch",
2890
+ * channelId: "drive",
2891
+ * continuationToken,
2892
+ * every: "30m",
2893
+ * async run({ followup, host }) {
2894
+ * if (await isPrClosed(host)) return { action: "stop" };
2895
+ * if (!(await isConflicted(host))) return { action: "skip" };
2896
+ * await followup({ message: "Merge conflict detected." });
2897
+ * return { action: "delivered" };
2898
+ * },
2899
+ * });
2900
+ * ```
2901
+ *
2902
+ * @example Named handler (durable across restart / hosted v2)
2903
+ * ```ts
2904
+ * // agent/reminders/verdict_recheck.ts
2905
+ * export default defineReminder({
2906
+ * async run({ args, followup }) {
2907
+ * // ...
2908
+ * return { action: "delivered" };
2909
+ * },
2910
+ * });
2911
+ *
2912
+ * import verdictRecheck from "./reminders/verdict_recheck.js";
2913
+ *
2914
+ * await host.reminders.create({
2915
+ * purpose: "verdict_recheck",
2916
+ * channelId: "origin",
2917
+ * continuationToken,
2918
+ * delay: "15m",
2919
+ * handler: verdictRecheck,
2920
+ * args: { headSha: "abc" },
2921
+ * });
2922
+ * ```
2923
+ *
2924
+ * @example One-shot (agent tool / prompt form)
2925
+ * ```ts
2926
+ * await host.reminders.create({
2927
+ * purpose: "ci_recheck",
2928
+ * channelId: "drive",
2929
+ * continuationToken,
2930
+ * delay: "2h",
2931
+ * prompt: "Re-check CI. Only act if still failing.",
2932
+ * until: "Cancel once CI is green or the PR is merged.",
2933
+ * });
2934
+ * ```
2935
+ */
2936
+ export interface ReminderCreateInput {
2937
+ purpose: string;
2938
+ /** Channel that owns the session (e.g. `drive`). */
2939
+ channelId: string;
2940
+ /** Channel-local continuation key for the bound session. */
2941
+ continuationToken: string;
2942
+ /** Optional opaque metadata (e.g. `{ prUrl }`). */
2943
+ target?: Record<string, unknown>;
2944
+ /** Exactly one of prompt, handler, or run. */
2945
+ prompt?: string;
2946
+ /**
2947
+ * A definition discovered from `bot/reminders/<name>.ts`, or its stem
2948
+ * for compatibility. Mutually exclusive with `prompt` and `run`. The
2949
+ * definition form avoids coupling callers to a filename string; discovery
2950
+ * resolves it to the stable persisted stem. A mounted
2951
+ * extension's `reminders/<name>.ts` registers as `<ns>__<name>`, so its
2952
+ * own tools pass the definition without knowing the mount namespace. Do
2953
+ * not combine with {@link until}; encode stop conditions in {@link args}
2954
+ * and the handler body.
2955
+ */
2956
+ handler?: ReminderDefinition | string;
2957
+ /**
2958
+ * Serializable args for {@link handler} (UTF-8 JSON capped at 32 KiB).
2959
+ * Only valid with `handler`.
2960
+ */
2961
+ args?: JsonObject;
2962
+ run?: (ctx: ReminderFireContext) => Promise<ReminderFireResult>;
2963
+ /** Exactly one schedule shape. */
2964
+ every?: string;
2965
+ cron?: string;
2966
+ delay?: string | number;
2967
+ at?: Date | string | number;
2968
+ /**
2969
+ * Auto-cancel: function (host evaluates, true → cancel) XOR prompt string
2970
+ * (agent-facing stop condition; platform does not interpret it).
2971
+ * Valid with `prompt` (string until) and legacy `run` (function until on
2972
+ * local / hosted v1). Not valid with named `handler`. Function until is
2973
+ * rejected on hosted architecture v2.
2974
+ */
2975
+ until?: string | ((ctx: ReminderUntilContext) => Promise<boolean>);
2976
+ /**
2977
+ * Defaults: recurring → `skipIfBusy`; one-shot → `queueBehindTurn`.
2978
+ */
2979
+ busyPolicy?: ReminderBusyPolicy;
2980
+ }
2981
+ export interface ReminderInfo {
2982
+ id: string;
2983
+ purpose: string;
2984
+ channelId: string;
2985
+ continuationToken: string;
2986
+ target?: Record<string, unknown>;
2987
+ scheduleKind: ReminderScheduleKind;
2988
+ scheduleValue: string;
2989
+ prompt?: string;
2990
+ /** Named handler stem when create used `handler`. */
2991
+ handler?: string;
2992
+ /** Serializable args when create used `handler`. */
2993
+ args?: JsonObject;
2994
+ untilPrompt?: string;
2995
+ busyPolicy: ReminderBusyPolicy;
2996
+ status: ReminderStatus;
2997
+ disarmReason?: string;
2998
+ fireCount: number;
2999
+ nextFireAt: string;
3000
+ createdAt: string;
3001
+ updatedAt: string;
3002
+ hasRunHandler: boolean;
3003
+ hasUntilFn: boolean;
3004
+ }
3005
+ /** Host-facing reminder API attached to {@link HostContext.reminders}. */
3006
+ export interface ReminderHostApi {
3007
+ /** Arm a reminder. See {@link ReminderCreateInput}. */
3008
+ create(input: ReminderCreateInput): Promise<ReminderInfo>;
3009
+ /** List reminders, optionally filtered. */
3010
+ list(filter?: {
3011
+ status?: ReminderStatus;
3012
+ purpose?: string;
3013
+ continuationToken?: string;
3014
+ }): Promise<ReminderInfo[]>;
3015
+ /** Cancel one reminder by id. No-op (returns undefined) if unknown. */
3016
+ cancel(id: string, reason?: string): Promise<ReminderInfo | undefined>;
3017
+ /** Cancel all armed reminders for a continuation token. Returns count. */
3018
+ cancelForContinuation(continuationToken: string, reason: string): Promise<number>;
3019
+ /**
3020
+ * Re-key armed reminders after a channel rotates a session's continuation
3021
+ * token, so earlier reminders keep waking the conversation. The engine
3022
+ * calls this from `setContinuationToken`; channels rarely need to.
3023
+ */
3024
+ rekeyContinuation(channelId: string, oldToken: string, newToken: string): Promise<number>;
3025
+ /**
3026
+ * Fire immediately (dev / hillclimb).
3027
+ * `outcome` is `"noop"` when already firing or not armed.
3028
+ */
3029
+ dispatch(id: string): Promise<{
3030
+ reminderId: string;
3031
+ outcome: "fired" | "noop";
3032
+ reason?: string;
3033
+ }>;
3034
+ }
3035
+ export type DiagnosticCode = "module_not_found" | "module_load_failed" | "invalid_definition" | "config_error" | "other";
3036
+ export interface Diagnostic {
3037
+ severity: "error" | "warning";
3038
+ /**
3039
+ * Closed classification. Absent means `other`, so a diagnostic written
3040
+ * before codes existed still has a code.
3041
+ */
3042
+ code?: DiagnosticCode;
3043
+ /** Path of the offending file, relative to the project root directory. */
3044
+ path?: string;
3045
+ /**
3046
+ * Bare npm package name when `code` is `module_not_found` and the missing
3047
+ * specifier is a package name. Absent for relative and absolute paths.
3048
+ * Consumers must work from `code` alone.
3049
+ */
3050
+ package?: string;
3051
+ /**
3052
+ * Customer text. Consumers must not forward this string.
3053
+ */
3054
+ message: string;
3055
+ }
3056
+ export interface DiscoveredTool {
3057
+ name: string;
3058
+ description: string;
3059
+ /** JSON Schema advertised to the model. */
3060
+ inputSchema: JsonSchemaObject;
3061
+ /** Output JSON Schema, advertised only when the tool declares one. */
3062
+ outputSchema?: JsonSchemaObject;
3063
+ /** Where the tool body runs. Defaults to `"server"`. */
3064
+ execution: ToolExecution;
3065
+ /**
3066
+ * True when the tool may park for human approval (boolean true or a
3067
+ * predicate). Runtime evaluation still runs the predicate per call.
3068
+ */
3069
+ needsApproval: boolean;
3070
+ /**
3071
+ * The tool's declared {@link ToolEffect} when it declares one statically, or
3072
+ * `"dynamic"` when it declares a predicate resolved per call. Absent when it
3073
+ * declares nothing, which a dry run treats as a write.
3074
+ */
3075
+ effect?: ToolEffect | "dynamic";
3076
+ /**
3077
+ * MCP spec tool annotations, present only on advertised MCP passthroughs
3078
+ * whose server declared them (see {@link HostMcpToolInfo.annotations}).
3079
+ * Authored tools declare {@link effect} instead. Untrusted hints,
3080
+ * propagated so the harness listing carries them and so effect
3081
+ * classification can read them; absent is the fail-closed state.
3082
+ */
3083
+ annotations?: McpToolAnnotations;
3084
+ /**
3085
+ * True for a 1:1 MCP passthrough synthesized from an advertised
3086
+ * connection's listing. The policy treats these differently from authored
3087
+ * tools when nothing declares an effect: an undeclared authored tool is
3088
+ * stubbed as a write in a dry run, an unclassifiable advertised tool is
3089
+ * refused — see `decideToolCall`.
3090
+ */
3091
+ advertised?: true;
3092
+ /** Name of the advertising connection an advertised tool came from. */
3093
+ connection?: string;
3094
+ /** Mounted extension this tool came from; absent for `agent/tools/`. */
3095
+ extension?: string;
3096
+ /**
3097
+ * Agent tools: script body materialized under
3098
+ * `.agent-serve/tools/<name>.sh`.
3099
+ */
3100
+ script?: string;
3101
+ definition: ToolDefinition;
3102
+ }
3103
+ /** A packaged-skill sibling file: inline contents or a file to copy. */
3104
+ export type SkillFileSource = {
3105
+ contents: string;
3106
+ } | {
3107
+ sourcePath: string;
3108
+ };
3109
+ export interface DiscoveredSkill {
3110
+ name: string;
3111
+ description: string;
3112
+ /** SKILL.md body (without generated frontmatter). */
3113
+ markdown: string;
3114
+ /** Package-relative sibling files. */
3115
+ files: Record<string, SkillFileSource>;
3116
+ /** Mounted extension this skill came from; absent for `agent/skills/`. */
3117
+ extension?: string;
3118
+ }
3119
+ export interface DiscoveredConnection {
3120
+ name: string;
3121
+ transport: ConnectionTransport;
3122
+ description?: string;
3123
+ /** Per-session auth from {@link ConnectionConfig.auth} (http/sse only). */
3124
+ auth?: ConnectionAuthProvider;
3125
+ /** Advertise-by-name from {@link ConnectionConfig.advertiseTools}. */
3126
+ advertiseTools?: boolean;
3127
+ /** Skip a listing failure instead of failing the turn. */
3128
+ optional?: boolean;
3129
+ /**
3130
+ * Normalized intended effects from {@link ConnectionConfig.effects}.
3131
+ * Absent means every listed tool is advertised.
3132
+ */
3133
+ effects?: readonly ToolEffect[];
3134
+ /**
3135
+ * Normalized tool-name allowlist from {@link ConnectionConfig.tools}.
3136
+ * Absent means every listed tool is kept.
3137
+ */
3138
+ tools?: readonly string[];
3139
+ /**
3140
+ * Normalized tool-name denylist from
3141
+ * {@link ConnectionConfig.disallowedTools}.
3142
+ */
3143
+ disallowedTools?: readonly string[];
3144
+ }
3145
+ export interface DiscoveredChannel {
3146
+ id: string;
3147
+ definition: ChannelDefinition;
3148
+ }
3149
+ export interface DiscoveredSchedule {
3150
+ name: string;
3151
+ cron: string;
3152
+ kind: "markdown" | "run";
3153
+ definition: ScheduleDefinition;
3154
+ }
3155
+ export interface DiscoveredHook {
3156
+ name: string;
3157
+ definition: HookDefinition;
3158
+ }
3159
+ export interface SeedFile {
3160
+ /** Path inside the session workspace. */
3161
+ relativePath: string;
3162
+ /** Absolute path of the authored source file. */
3163
+ sourcePath: string;
3164
+ }
3165
+ /** A fully resolved agent (the root agent or a subagent). */
3166
+ export interface ResolvedAgent {
3167
+ name: string;
3168
+ description?: string;
3169
+ model?: ModelSetting;
3170
+ /**
3171
+ * Remaining models from {@link AgentConfig.fallbacks}, in order. The
3172
+ * runner steps down this list when the primary model is rejected before
3173
+ * the turn produces output (catalog refusal, team admin block, or capacity).
3174
+ */
3175
+ modelFallbacks?: readonly ModelSetting[];
3176
+ /** Authored {@link AgentConfig.fallbackAfterStream}. */
3177
+ fallbackAfterStream?: boolean;
3178
+ /**
3179
+ * Composed system prompt: identity preamble from {@link name}, then
3180
+ * authored `instructions.md` / `.ts` / dir (or inline `agent.ts`).
3181
+ */
3182
+ instructions?: string;
3183
+ /** Execution runtime. Root agents default to `"local"`. */
3184
+ runtime: AgentRuntime;
3185
+ /**
3186
+ * Authored {@link AgentConfig.fs}, or a lone {@link AgentConfig.root}.
3187
+ * The factory is persisted, not a serialized tree. A resumed session
3188
+ * calls it again (or reuses the handle).
3189
+ */
3190
+ fs?: FileSystem | ((ctx: FsContext) => FileSystem | Promise<FileSystem>);
3191
+ /** @deprecated Set to the same handle as {@link fs} when the author used `root`. */
3192
+ root?: FileSystem | ((ctx: FsContext) => FileSystem | Promise<FileSystem>);
3193
+ /**
3194
+ * Authored {@link AgentConfig.skills}, copied here for the session engine.
3195
+ *
3196
+ * @internal
3197
+ */
3198
+ skillsMount?: false | ((ctx: SkillsMountContext) => FileSystem | Promise<FileSystem>);
3199
+ /** Resolved {@link AgentConfig.cloud} for this agent. */
3200
+ cloud?: AgentCloudOptions;
3201
+ /**
3202
+ * Resolved local harness options from {@link AgentConfig.local}
3203
+ * (`cwd` is absolute — relative paths resolved against the project root).
3204
+ */
3205
+ local?: AgentLocalOptions;
3206
+ /**
3207
+ * Built-in harness tool allowlist from {@link AgentConfig.tools}, with
3208
+ * the "mcp" transport grant injected. Named apart from {@link tools}
3209
+ * (the authored `agent/tools/` list).
3210
+ */
3211
+ allowedTools?: ToolName[];
3212
+ /**
3213
+ * Managed-hosting declarations: {@link AgentConfig.hosting} unioned with
3214
+ * every mounted extension's {@link ExtensionOptions.hosting}.
3215
+ */
3216
+ hosting?: AgentHostingOptions;
3217
+ /** Validated turn admission limits from {@link AgentConfig.concurrency}. */
3218
+ concurrency?: AgentConcurrencyOptions;
3219
+ /**
3220
+ * Validated architecture from {@link AgentConfig.architecture}.
3221
+ * Omitted authors resolve to `"v2"`. Managed `"v2"` hosting applies kind
3222
+ * `/v2` continuation defaults to channels that omitted a selector.
3223
+ */
3224
+ architecture?: AgentArchitecture;
3225
+ persistent?: boolean;
3226
+ tools: DiscoveredTool[];
3227
+ skills: DiscoveredSkill[];
3228
+ /**
3229
+ * Mounted `agent/extensions/`. Their contributions are already merged
3230
+ * into the agent and project lists; this records provenance.
3231
+ */
3232
+ extensions?: DiscoveredExtension[];
3233
+ connections: DiscoveredConnection[];
3234
+ /**
3235
+ * MCP connections from `agent/host-connections/`. Host tools and
3236
+ * `mcp oauth` see them; the model does not.
3237
+ */
3238
+ hostConnections?: DiscoveredConnection[];
3239
+ subagents: ResolvedAgent[];
3240
+ seedFiles: SeedFile[];
3241
+ }
3242
+ /** The compiled project manifest produced by `loadAgentProject`. */
3243
+ export interface AgentProject {
3244
+ /** App root (the directory containing package.json / agent/). */
3245
+ rootDir: string;
3246
+ /** The authored agent directory. */
3247
+ agentDir: string;
3248
+ name: string;
3249
+ agent: ResolvedAgent;
3250
+ /** Built-in HTTP session channel. */
3251
+ httpChannel: HttpChannelDefinition;
3252
+ channels: DiscoveredChannel[];
3253
+ schedules: DiscoveredSchedule[];
3254
+ /** Named reminder handlers from `agent/reminders/*` (optional / additive). */
3255
+ reminders?: DiscoveredReminder[];
3256
+ hooks: DiscoveredHook[];
3257
+ /** Optional `agent/storage.ts` (`defineStorage`). */
3258
+ storage?: StorageDefinition;
3259
+ /** Optional `agent/artifacts.ts` (`defineArtifacts`). */
3260
+ artifacts?: ArtifactsDefinition;
3261
+ diagnostics: Diagnostic[];
3262
+ }
3263
+ /** JSON-safe projection of one channel HTTP route on `GET /v1/info`. */
3264
+ export interface AgentChannelRouteInfo {
3265
+ method: RouteMethod;
3266
+ /** Authored path (e.g. `"/findings"`), or the absolute path for built-in http. */
3267
+ path: string;
3268
+ /** Mount path including `/v1/channels/<id>` (or absolute for built-in http). */
3269
+ url: string;
3270
+ description?: string;
3271
+ bodySchema?: JsonSchemaObject;
3272
+ querySchema?: JsonSchemaObject;
3273
+ }
3274
+ export interface ProjectToolInfo {
3275
+ name: string;
3276
+ description: string;
3277
+ /** @experimental */
3278
+ execution: ToolExecution;
3279
+ /**
3280
+ * `true` or `false` when the author set a boolean. `"dynamic"` when
3281
+ * the author set a function.
3282
+ */
3283
+ needsApproval: boolean | "dynamic";
3284
+ /**
3285
+ * The tool's declared {@link ToolEffect} when static, `"dynamic"` when
3286
+ * declared as a predicate. Absent when the author declared nothing —
3287
+ * "unknown", not "mutates".
3288
+ */
3289
+ effect?: ToolEffect | "dynamic";
3290
+ inputSchema: JsonSchemaObject;
3291
+ }
3292
+ export interface ProjectConnectionInfo {
3293
+ name: string;
3294
+ transport: string;
3295
+ /** @experimental */
3296
+ advertiseTools?: boolean;
3297
+ /** @experimental */
3298
+ optional?: boolean;
3299
+ /** @experimental */
3300
+ effects?: readonly ToolEffect[];
3301
+ /** @experimental */
3302
+ tools?: readonly string[];
3303
+ /** @experimental */
3304
+ disallowedTools?: readonly string[];
3305
+ /**
3306
+ * Present only for `cursorAccount` connections. A connector-name
3307
+ * allowlist, or `"*"` for every connected server.
3308
+ * @experimental
3309
+ */
3310
+ cursorAccountServers?: string[] | "*";
3311
+ }
3312
+ export interface ProjectChannelInfo {
3313
+ id: string;
3314
+ routes: AgentChannelRouteInfo[];
3315
+ /** Pack kind when the channel declares one (e.g. `"github"`). */
3316
+ kind?: string;
3317
+ /**
3318
+ * GitHub webhook events the channel dispatches on, when declared.
3319
+ * @experimental
3320
+ */
3321
+ githubWebhookEvents?: readonly string[];
3322
+ /**
3323
+ * Origin webhook event types the channel dispatches on, when declared.
3324
+ * @experimental
3325
+ */
3326
+ originWebhookEvents?: readonly string[];
3327
+ /**
3328
+ * GitLab `object_kind`s the channel dispatches on, when declared.
3329
+ * @experimental
3330
+ */
3331
+ gitlabWebhookEvents?: readonly string[];
3332
+ /**
3333
+ * Bitbucket event keys (Cloud vocabulary) the channel dispatches on.
3334
+ * @experimental
3335
+ */
3336
+ bitbucketWebhookEvents?: readonly string[];
3337
+ /**
3338
+ * PagerDuty v3 event types the channel dispatches on, when declared.
3339
+ * @experimental
3340
+ */
3341
+ pagerdutyWebhookEvents?: readonly string[];
3342
+ /**
3343
+ * Factory deployment event types the channel dispatches on, when declared.
3344
+ * @experimental
3345
+ */
3346
+ deploymentEventTypes?: readonly string[];
3347
+ /**
3348
+ * Change Monitor checkpoint or Factory issue event types the channel dispatches on, when declared.
3349
+ * @experimental
3350
+ */
3351
+ factoryEventTypes?: readonly string[];
3352
+ /**
3353
+ * Slack Events API event types the channel dispatches on, when declared.
3354
+ * @experimental
3355
+ */
3356
+ slackEventTypes?: readonly string[];
3357
+ /**
3358
+ * Slack channels watched for posts (opt-in channel watch), when declared.
3359
+ * @experimental
3360
+ */
3361
+ slackChannelPosts?: readonly string[];
3362
+ }
3363
+ /** JSON-safe projection of the manifest returned by `GET /v1/info`. */
3364
+ export interface ProjectInfo {
3365
+ /** Projection shape. Bump only when a stable field changes meaning. */
3366
+ schemaVersion: 1;
3367
+ name: string;
3368
+ /** Short agent description when authored on `defineAgent`. */
3369
+ description?: string;
3370
+ model?: ModelSetting;
3371
+ /**
3372
+ * Resolved runtime architecture. Omitted authors are `"v2"`.
3373
+ */
3374
+ architecture: AgentArchitecture;
3375
+ /** @experimental */
3376
+ runtime: AgentRuntime;
3377
+ /** @experimental */
3378
+ cloud?: AgentCloudPublicInfo;
3379
+ /**
3380
+ * Local harness options when authored (`cwd` absolute).
3381
+ * @experimental
3382
+ */
3383
+ local?: {
3384
+ cwd?: string;
3385
+ };
3386
+ /**
3387
+ * Managed-hosting declarations when authored or declared by a mounted extension (egress allowlist, expected secrets, container image).
3388
+ * @experimental
3389
+ */
3390
+ hosting?: {
3391
+ egressDomains?: string[];
3392
+ secretNames?: string[];
3393
+ image?: string;
3394
+ };
3395
+ /**
3396
+ * Turn admission limits when authored (`concurrency` on `agent.ts`).
3397
+ * @experimental
3398
+ */
3399
+ concurrency?: {
3400
+ maxRunningTurns?: number;
3401
+ };
3402
+ /**
3403
+ * The agent's own MCP surface (mounted at `<base>/v1/mcp`). Other agents
3404
+ * and MCP clients delegate to this agent through these tools.
3405
+ * @experimental
3406
+ */
3407
+ mcp: {
3408
+ path: string;
3409
+ tools: string[];
3410
+ };
3411
+ /**
3412
+ * @experimental
3413
+ */
3414
+ instructions?: {
3415
+ chars: number;
3416
+ preview: string;
3417
+ };
3418
+ tools: ProjectToolInfo[];
3419
+ skills: Array<{
3420
+ name: string;
3421
+ description: string;
3422
+ }>;
3423
+ /**
3424
+ * Mounted extensions and the tool / skill names each contributed.
3425
+ * @experimental
3426
+ */
3427
+ extensions: DiscoveredExtension[];
3428
+ connections: ProjectConnectionInfo[];
3429
+ subagents: Array<{
3430
+ name: string;
3431
+ description?: string;
3432
+ model?: ModelSetting;
3433
+ }>;
3434
+ channels: ProjectChannelInfo[];
3435
+ schedules: Array<{
3436
+ name: string;
3437
+ cron: string;
3438
+ kind: "markdown" | "run";
3439
+ }>;
3440
+ /**
3441
+ * Named reminder handlers (`agent/reminders/<name>.ts`) when present.
3442
+ * @experimental
3443
+ */
3444
+ reminders?: Array<{
3445
+ name: string;
3446
+ }>;
3447
+ hooks: string[];
3448
+ /**
3449
+ * Project storage sink from `agent/storage.ts`, when authored.
3450
+ * @experimental
3451
+ */
3452
+ storage?: {
3453
+ name?: string;
3454
+ };
3455
+ /**
3456
+ * Declared artifact kinds from `agent/artifacts.ts`, when authored.
3457
+ * @experimental
3458
+ */
3459
+ artifacts?: {
3460
+ kinds: string[];
3461
+ agentTool: boolean;
3462
+ max: number;
3463
+ };
3464
+ /**
3465
+ * Eval cases a hosted architecture v2 release runs as its own sessions.
3466
+ * Set only in that release's deploy manifest.
3467
+ * @experimental
3468
+ */
3469
+ evals?: AgentProjectEvalsInfo;
3470
+ diagnostics: Diagnostic[];
3471
+ }
3472
+ /** @deprecated Use {@link ProjectInfo}. */
3473
+ export type AgentProjectInfo = ProjectInfo;
3474
+ export interface Project {
3475
+ readonly info: ProjectInfo;
3476
+ }
3477
+ export interface AgentProjectEvalsInfo {
3478
+ /** Hosted eval-case protocol this release speaks. */
3479
+ protocol: 1;
3480
+ cases: Array<{
3481
+ id: string;
3482
+ fileId: string;
3483
+ description?: string;
3484
+ tags?: string[];
3485
+ }>;
3486
+ config: {
3487
+ maxConcurrency?: number;
3488
+ timeoutMs?: number;
3489
+ };
3490
+ }
3491
+ /**
3492
+ * A streaming update from the harness, re-exported from the Cursor SDK's
3493
+ * delta vocabulary.
3494
+ */
3495
+ export type RunnerUpdate = InteractionUpdate;
3496
+ export interface RunnerSubagent {
3497
+ name: string;
3498
+ description: string;
3499
+ prompt: string;
3500
+ model?: ModelSetting;
3501
+ }
3502
+ export interface RunnerTurnRequest {
3503
+ sessionId: string;
3504
+ /**
3505
+ * Cursor SDK agent id to create/resume. Defaults to {@link sessionId}
3506
+ * for local agents; cloud agents use the persisted `bc-…` id after
3507
+ * the first turn.
3508
+ */
3509
+ sdkAgentId?: string;
3510
+ /** Absolute path of the session's materialized workspace. */
3511
+ workspaceDir: string;
3512
+ /** Resolved FileSystem handle when {@link AgentConfig.root} is set. */
3513
+ root?: FileSystem;
3514
+ /**
3515
+ * Child-session inherit for an authored {@link AgentConfig.root}.
3516
+ * The SDK forwards the parent allowlist and calls
3517
+ * {@link LocalSubagentInherit.resourceProviderOptions} once per child
3518
+ * session, including nested `Task`s. The FileSystem handle itself is
3519
+ * not sent. Executor slots use the public SDK shapes
3520
+ * (`LocalToolExecutor` on `LocalSubagentResourceProviderFields`).
3521
+ */
3522
+ subagentInherit?: LocalSubagentInherit;
3523
+ /** Run the local harness sandboxed ({@link AgentLocalOptions.sandbox}). */
3524
+ sandbox?: boolean;
3525
+ /** Built-in tool allowlist ({@link AgentConfig.tools}, resolved). */
3526
+ tools?: ToolName[];
3527
+ /**
3528
+ * Native tools hidden on the Cursor SDK agent because synthesized
3529
+ * FileSystem tools own those names. Host-default omitted `tools` only.
3530
+ */
3531
+ disallowedTools?: ToolName[];
3532
+ /** Absolute path for runner-owned durable state (conversation store). */
3533
+ runnerStateDir: string;
3534
+ prompt: string;
3535
+ isFirstTurn: boolean;
3536
+ /**
3537
+ * Base64 images for this turn (Cursor SDK `SDKUserMessage.images`).
3538
+ * Set from {@link SendMessageOptions.images} / Slack attachments.
3539
+ */
3540
+ images?: Array<{
3541
+ data: string;
3542
+ mimeType: string;
3543
+ }>;
3544
+ model?: ModelSetting;
3545
+ /**
3546
+ * Models to open the turn on, in order, after {@link model} is rejected
3547
+ * (catalog refusal, team admin block, or `resource_exhausted` /
3548
+ * `[unavailable]`) and before
3549
+ * any output was streamed.
3550
+ */
3551
+ modelFallbacks?: readonly ModelSetting[];
3552
+ /**
3553
+ * Walk {@link modelFallbacks} for a rejection that lands after the turn
3554
+ * streamed output, restarting the turn on the next model
3555
+ * ({@link AgentConfig.fallbackAfterStream}).
3556
+ */
3557
+ fallbackAfterStream?: boolean;
3558
+ runtime: AgentRuntime;
3559
+ /**
3560
+ * The agent's display name. Grokbot turns address the caller's hosted
3561
+ * Grok Bot agent of this name: every SDK session of one agent forwards
3562
+ * into the same hosted agent and conversation.
3563
+ */
3564
+ agentName?: string;
3565
+ /** Cloud attach options for this turn, when the engine attached. */
3566
+ cloud?: AgentCloudOptions;
3567
+ /**
3568
+ * Composed instructions ({@link ResolvedAgent.instructions} plus identity
3569
+ * and tool catalog) delivered as the harness system prompt.
3570
+ */
3571
+ instructions?: string;
3572
+ /**
3573
+ * defineAgent directory slug for personal-key cloud creates. Injected
3574
+ * by the engine — not part of authored {@link AgentCloudOptions}.
3575
+ */
3576
+ agentServeAgent?: string;
3577
+ /** In-process tools, already bound to the session's tool context. */
3578
+ customTools: Record<string, SDKCustomTool>;
3579
+ /** MCP servers from `agent/mcp-connections/`. */
3580
+ mcpServers: Record<string, ConnectionTransport>;
3581
+ /**
3582
+ * Configure {@link mcpServers} on every send instead of once on the
3583
+ * cached SDK agent handle. Set when an attached connection has
3584
+ * per-session `auth`: its headers are re-evaluated at turn-build time,
3585
+ * and a handle-pinned copy would keep the first turn's credentials until
3586
+ * the handle recycles. The SDK builds the send's MCP session from exactly
3587
+ * this set (fresh clients each turn — stdio servers respawn per turn),
3588
+ * and the create/resume/prewarm options carry no `mcpServers` at all, so
3589
+ * the local executor cache key stays stable while credentials rotate.
3590
+ */
3591
+ perSendMcpServers?: boolean;
3592
+ subagents: RunnerSubagent[];
3593
+ onUpdate: (update: RunnerUpdate) => void | Promise<void>;
3594
+ /** Called once the SDK agent is open so the engine can persist its id. */
3595
+ onSdkAgentId?: (sdkAgentId: string) => void | Promise<void>;
3596
+ /**
3597
+ * Called once the harness names the run, before it produces anything.
3598
+ * Surfaces the request id while the turn is still running rather than at
3599
+ * its end.
3600
+ */
3601
+ onRequestId?: (requestId: string) => void | Promise<void>;
3602
+ /**
3603
+ * Abort the in-flight run when signalled. The engine aborts this when a
3604
+ * follow-up message preempts the current turn; the runner maps it to
3605
+ * `run.cancel()`, which tears down execution and marks the SDK run terminal.
3606
+ */
3607
+ signal?: AbortSignal;
3608
+ /**
3609
+ * Expire any run still marked active on the SDK agent before starting this
3610
+ * one (local runtime `force`). Set on follow-up turns so a preempted or
3611
+ * crash-wedged run can never block the next send with "already has active
3612
+ * run".
3613
+ */
3614
+ forceExpireActiveRun?: boolean;
3615
+ }
3616
+ export interface ServeOptions {
3617
+ /** Port to listen on. Defaults to 3000 (0 picks an ephemeral port). */
3618
+ port?: number;
3619
+ /** Host to bind. Defaults to 127.0.0.1. */
3620
+ host?: string;
3621
+ /**
3622
+ * Dev mode: mounts `POST /v1/dev/schedules/:scheduleId` and
3623
+ * `POST /v1/dev/reminders/:reminderId`, and disables the cron / reminder
3624
+ * auto-fire runners (dispatch by hand while iterating).
3625
+ */
3626
+ dev?: boolean;
3627
+ /** Durable state directory. Defaults to `<rootDir>/.agent-serve`. */
3628
+ stateRoot?: string;
3629
+ /**
3630
+ * Cursor API key for the SDK runner and Cursor account MCP connections.
3631
+ * When omitted, resolves from supported Cursor credential environment
3632
+ * variables and then the credential stored by `bdk login`. A file-backed
3633
+ * credential takes precedence over `CURSOR_SERVICE_ACCOUNT_KEY`.
3634
+ */
3635
+ apiKey?: string;
3636
+ /** Run schedules on their cron cadence. Defaults to `!dev`. */
3637
+ schedules?: boolean;
3638
+ /**
3639
+ * Arm reminder deadline timers automatically. Defaults to `!dev`
3640
+ * (same as schedules). Prompt-form reminders still persist in `--dev`;
3641
+ * fire them via `POST /v1/dev/reminders/:id`
3642
+ * or `handle.dispatchReminder`.
3643
+ */
3644
+ reminders?: boolean;
3645
+ /**
3646
+ * Serve the bundled web playground at `/playground` (chat, streaming,
3647
+ * tool calls, sessions, schedule dispatch). Defaults to true; the API
3648
+ * routes it drives keep their normal auth chain either way.
3649
+ */
3650
+ playground?: boolean;
3651
+ /**
3652
+ * Serve the built documentation site at `/docs` ("docs" is a reserved
3653
+ * slug). Defaults to true. The site is auto-built when missing and the
3654
+ * vitepress toolchain is present; published installs ship it prebuilt.
3655
+ */
3656
+ docs?: boolean;
3657
+ /**
3658
+ * Replace the default `[localDevStrict()]` route auth with
3659
+ * `[bearerAuth(authToken)]` on every channel that doesn't author its own
3660
+ * auth chain. Use when exposing the server beyond loopback (e.g. through
3661
+ * a tunnel, where every request arrives from 127.0.0.1 and loopback-only
3662
+ * policies would admit everyone). Authored `auth` arrays still win.
3663
+ */
3664
+ authToken?: string;
3665
+ /**
3666
+ * Replace the default loopback-only route auth with `[allowAll()]` on every
3667
+ * channel that doesn't author its own auth chain. For temporary demos behind
3668
+ * a trusted network boundary (e.g. Tailscale) — do not combine with
3669
+ * {@link authToken}. Authored `auth` arrays still win.
3670
+ */
3671
+ allowAnonymous?: boolean;
3672
+ /**
3673
+ * Allow {@link allowAnonymous} together with
3674
+ * `githubChannel({ cursorAccount })`. Without this opt-in, `serve` refuses
3675
+ * to start because every admitted anonymous caller could drive sessions
3676
+ * that hold the signed-in account's repo-scoped GitHub credential. Set it
3677
+ * only when the network boundary already authenticates callers (e.g. an
3678
+ * SSO/Okta proxy in front of the host).
3679
+ */
3680
+ allowAnonymousCursorGithub?: boolean;
3681
+ /**
3682
+ * Allow `--allow-anonymous` together with a `runtime: "grokbot"` mount.
3683
+ * Off by default: grokbot turns execute on the signed-in account's hosted
3684
+ * Grok Bot computer, so an anonymous caller could drive Shell and other
3685
+ * box tools there. Set it only when the network boundary already
3686
+ * authenticates callers (e.g. an SSO/Okta proxy in front of the host).
3687
+ */
3688
+ allowAnonymousGrokbot?: boolean;
3689
+ /**
3690
+ * Allow {@link allowAnonymous} together with
3691
+ * `defineConnection({ cursorAccount: true })`. Without this opt-in, `serve`
3692
+ * refuses to start because every admitted anonymous caller could drive the
3693
+ * signed-in account's MCP connectors. Set it only when the network boundary
3694
+ * already authenticates callers (e.g. an SSO/Okta proxy, or the hosted
3695
+ * deployment alias token).
3696
+ */
3697
+ allowAnonymousCursorAccountMcp?: boolean;
3698
+ /**
3699
+ * Public base URL where this server is reachable from outside the host
3700
+ * (e.g. `https://agents.example.com`).
3701
+ */
3702
+ publicUrl?: string;
3703
+ /**
3704
+ * Hosting-injected HTTP MCP URL that proxies this deployment's
3705
+ * `/v1/mcp/tools`. The resolved Cursor API key authenticates requests.
3706
+ */
3707
+ cloudToolsUrl?: string;
3708
+ /**
3709
+ * Hosting-injected base URL where this agent's peers
3710
+ * (`defineConnection({ agent })`) answer at `<peersUrl>/<slug>/v1/mcp`.
3711
+ * A single-agent serve resolves its peers there instead of omitting them,
3712
+ * and the bound `CURSOR_API_KEY` authenticates each call.
3713
+ */
3714
+ peersUrl?: string;
3715
+ /**
3716
+ * Pull SCM webhook events from `/v0/scm-events` (Cursor account auth).
3717
+ * GitHub and Origin subscriptions are registered independently.
3718
+ * The stream is read as the host's Cursor user, so this requires a signed-in
3719
+ * host: `serve` throws when no key resolves from `apiKey` here,
3720
+ * {@link ServeOptions.apiKey}, supported Cursor credential environment
3721
+ * variables, or `bdk login`.
3722
+ */
3723
+ cursorEvents?: {
3724
+ repos: string[];
3725
+ baseUrl?: string;
3726
+ apiKey?: string;
3727
+ };
3728
+ logger?: (line: string) => void;
3729
+ }
3730
+ /** One agent mounted on a server (its URL slug and public project info). */
3731
+ export interface MountedAgentInfo {
3732
+ /**
3733
+ * URL slug the agent is mounted under. Empty string in single-agent mode
3734
+ * (routes at `/v1/...`); the directory name in multi-agent mode (routes at
3735
+ * `/<slug>/v1/...`).
3736
+ */
3737
+ slug: string;
3738
+ /** Absolute base URL for this agent (server URL + `/<slug>` when slugged). */
3739
+ url: string;
3740
+ /** Same projection as `GET /v1/info` for this agent. */
3741
+ info: ProjectInfo;
3742
+ }
3743
+ export interface AgentServeHandle {
3744
+ url: string;
3745
+ port: number;
3746
+ /**
3747
+ * The first mounted agent's {@link Project}. In multi-agent mode use
3748
+ * {@link agents} for the full set.
3749
+ * @deprecated Use `agents[0].info`.
3750
+ */
3751
+ project: Project;
3752
+ /** Every agent mounted on this server. One entry in single-agent mode. */
3753
+ agents: MountedAgentInfo[];
3754
+ /**
3755
+ * Dispatch a schedule by name. In multi-agent mode pass the agent slug as
3756
+ * the second argument to target a specific agent.
3757
+ */
3758
+ dispatchSchedule(name: string, slug?: string): Promise<{
3759
+ sessionIds: string[];
3760
+ }>;
3761
+ /**
3762
+ * Create a per-session reminder. In multi-agent mode pass `slug` in options.
3763
+ */
3764
+ createReminder(input: ReminderCreateInput, slug?: string): Promise<ReminderInfo>;
3765
+ /** List reminders for an agent. */
3766
+ listReminders(filter?: {
3767
+ status?: ReminderStatus;
3768
+ purpose?: string;
3769
+ continuationToken?: string;
3770
+ }, slug?: string): Promise<ReminderInfo[]>;
3771
+ /** Cancel a reminder by id. */
3772
+ cancelReminder(id: string, options?: {
3773
+ reason?: string;
3774
+ slug?: string;
3775
+ }): Promise<ReminderInfo | undefined>;
3776
+ /**
3777
+ * Fire a reminder immediately (same path as the deadline timer / dev route).
3778
+ * `outcome` is `"noop"` when the reminder was already firing or not armed.
3779
+ */
3780
+ dispatchReminder(id: string, slug?: string): Promise<{
3781
+ reminderId: string;
3782
+ outcome: "fired" | "noop";
3783
+ reason?: string;
3784
+ }>;
3785
+ /**
3786
+ * Call an authored server tool deterministically (no model turn). In
3787
+ * multi-agent mode pass the agent slug in the options to target a
3788
+ * specific agent.
3789
+ */
3790
+ callTool(toolName: string, input?: unknown, options?: CallToolOptions & {
3791
+ slug?: string;
3792
+ }): Promise<ToolCallOutcome>;
3793
+ /**
3794
+ * Vite HMR playground URL when `serve --dev` auto-started it (local
3795
+ * checkout with the vite toolchain). Prefer this over the static
3796
+ * `/playground` mount while iterating on the SPA. Multi-agent HMR serves
3797
+ * the agents index at this URL and each SPA at `/<slug>/playground`.
3798
+ */
3799
+ playgroundDevUrl?: string;
3800
+ /** Where the built documentation site is mounted (`<url>/docs`), when served. */
3801
+ docsUrl?: string;
3802
+ close(): Promise<void>;
3803
+ }
3804
+ //# sourceMappingURL=types.d.ts.map