@grok/agent-sdk 0.0.0-stage → 0.2.28

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