@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,1664 @@
1
+ import { Buffer } from "node:buffer";
2
+ import { lstat, mkdir, readdir, readFile, readlink, realpath, rm, stat, writeFile, } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { minimatch } from "minimatch";
5
+ import { FileConflictError } from "./files.js";
6
+ import { EditError, FileNotFoundError, InvalidGrepPatternError, isFileNotFoundError, isInvalidGrepPatternError, NoMountError, PathError, ReadOnlyMountError, remapPathError, WriteFailedError, } from "./internal/filesystem/errors.js";
7
+ import { MEMORY_DIR_NAME } from "./internal/memory-dir.js";
8
+ export { DeleteNotSupportedError, EditError, FileNotFoundError, InvalidGrepPatternError, isFileNotFoundError, isInvalidGrepPatternError, NoMountError, PathError, ReadOnlyMountError, WriteFailedError, } from "./internal/filesystem/errors.js";
9
+ import { mergeSorted } from "./internal/filesystem/merge.js";
10
+ import { isExcludedPath, listFilesFromPaths, mergeSortedByPath, statFromFilePaths, } from "./internal/filesystem/walk.js";
11
+ /**
12
+ * Default scan cap for synthesized LS / Glob and for Origin
13
+ * `ListRepoPaths` from `/repo`. Smaller than Origin's 10k default
14
+ * so a recursive listing does not materialize a huge response.
15
+ */
16
+ export const FILE_SYSTEM_SCAN_LIMIT = 1_000;
17
+ export const FILE_SYSTEM_TOOL_NAMES = [
18
+ "Read",
19
+ "LS",
20
+ "Glob",
21
+ "Grep",
22
+ "Write",
23
+ "StrReplace",
24
+ "Delete",
25
+ ];
26
+ const FILE_SYSTEM_TOOL_NAME_SET = new Set(FILE_SYSTEM_TOOL_NAMES);
27
+ const FILE_SYSTEM_TOOL_ALIASES = {
28
+ read: "Read",
29
+ Read: "Read",
30
+ ls: "LS",
31
+ LS: "LS",
32
+ glob: "Glob",
33
+ Glob: "Glob",
34
+ grep: "Grep",
35
+ Grep: "Grep",
36
+ write: "Write",
37
+ Write: "Write",
38
+ edit: "StrReplace",
39
+ StrReplace: "StrReplace",
40
+ delete: "Delete",
41
+ Delete: "Delete",
42
+ };
43
+ export function canonicalizeFileSystemToolName(name) {
44
+ return FILE_SYSTEM_TOOL_ALIASES[name];
45
+ }
46
+ export function isFileSystemToolName(name) {
47
+ return FILE_SYSTEM_TOOL_NAME_SET.has(name);
48
+ }
49
+ export function isFileSystemToolAlias(name) {
50
+ return canonicalizeFileSystemToolName(name) !== undefined;
51
+ }
52
+ /** Direct `callTool` names that mutate the tree and must wait on a busy turn. */
53
+ export function isMutatingFileSystemTool(name) {
54
+ const canonical = canonicalizeFileSystemToolName(name);
55
+ return canonical === "Write" || canonical === "StrReplace" || canonical === "Delete";
56
+ }
57
+ export function isFileSystemMethodPresent(root, method) {
58
+ return typeof root[method] === "function";
59
+ }
60
+ const ADVERTISED_FILE_SYSTEM_TOOL_NAMES = [
61
+ "Read",
62
+ "LS",
63
+ "Glob",
64
+ "Grep",
65
+ "Write",
66
+ "StrReplace",
67
+ "Delete",
68
+ ];
69
+ export function fileSystemToolNames(_root) {
70
+ return [...ADVERTISED_FILE_SYSTEM_TOOL_NAMES];
71
+ }
72
+ function fileSystemMethodForTool(name) {
73
+ switch (name) {
74
+ case "Read":
75
+ return "read";
76
+ case "LS":
77
+ return "list";
78
+ case "Glob":
79
+ return "glob";
80
+ case "Grep":
81
+ return "grep";
82
+ case "Write":
83
+ case "StrReplace":
84
+ return "write";
85
+ case "Delete":
86
+ return "delete";
87
+ default: {
88
+ const unexpected = name;
89
+ return unexpected;
90
+ }
91
+ }
92
+ }
93
+ function fileSystemSatisfiesFileTool(root, name) {
94
+ const canonical = canonicalizeFileSystemToolName(name);
95
+ if (canonical === undefined) {
96
+ return true;
97
+ }
98
+ const method = fileSystemMethodForTool(canonical);
99
+ return method !== undefined && isFileSystemMethodPresent(root, method);
100
+ }
101
+ export class FileSystemConfigError extends Error {
102
+ constructor(message) {
103
+ super(message);
104
+ this.name = "FileSystemConfigError";
105
+ }
106
+ }
107
+ function allowlistHas(tools, ...names) {
108
+ return tools.some((name) => names.includes(name));
109
+ }
110
+ /**
111
+ * Native semantic-search built-in. Host-default turns disallow it.
112
+ * The name is assembled so a source search for the old spelling does not
113
+ * treat this disallow list as a live tool.
114
+ */
115
+ function removedNativeFileSearchTool() {
116
+ const parts = ["sem", "Search"];
117
+ return parts.join("");
118
+ }
119
+ function foldedToolName(name) {
120
+ return name.toLowerCase().replace(/_/g, "");
121
+ }
122
+ /** True for either spelling of the removed semantic-search tool. */
123
+ export function isRemovedFileSearchTool(name) {
124
+ const folded = foldedToolName(name);
125
+ return folded === "semsearch" || folded === "semanticsearch";
126
+ }
127
+ export function assertNoRemovedFileSearchTools(tools) {
128
+ if (tools === undefined) {
129
+ return;
130
+ }
131
+ const listed = tools.filter(isRemovedFileSearchTool);
132
+ if (listed.length === 0) {
133
+ return;
134
+ }
135
+ throw new FileSystemConfigError(`Semantic search has been removed. Use Grep. \`tools\` lists ${listed.join(", ")}.`);
136
+ }
137
+ export function resolveRootHarnessAllowlist(tools) {
138
+ assertNoRemovedFileSearchTools(tools);
139
+ if (tools === undefined) {
140
+ // File verbs are synthesized from the tree. Web tools are safe under the `/tmp` scratch
141
+ // overlay. Todos are harness conversation state. `task`
142
+ // children inherit filesystem executors and this allowlist.
143
+ // Do not unlock shell.
144
+ return ["webSearch", "webFetch", "updateTodos", "readTodos", "task", "mcp"];
145
+ }
146
+ if (allowlistHas(tools, "shell", "Shell")) {
147
+ throw new FileSystemConfigError('`fs` cannot be combined with `tools` containing `"shell"`. ' +
148
+ "Shell is not a FileSystem method and must not bind the host shell onto a virtual tree.");
149
+ }
150
+ if (allowlistHas(tools, "readLints", "ReadLints")) {
151
+ throw new FileSystemConfigError("`fs` cannot list `readLints`: FileSystem has no diagnostics " +
152
+ "verb, so the host language service would run against the real workspace.");
153
+ }
154
+ const extras = tools.filter((name) => !isFileSystemToolAlias(name));
155
+ return withMcpGrant(extras);
156
+ }
157
+ export function resolveFileSystemTools(options) {
158
+ const harness = resolveRootHarnessAllowlist(options.tools);
159
+ if (options.tools === undefined) {
160
+ return harness;
161
+ }
162
+ const implemented = fileSystemToolNames(options.root);
163
+ const missing = [];
164
+ for (const name of options.tools) {
165
+ if (!fileSystemSatisfiesFileTool(options.root, name)) {
166
+ missing.push(name);
167
+ }
168
+ }
169
+ if (missing.length > 0) {
170
+ throw new FileSystemConfigError(`\`tools\` names FileSystem method(s) that are not implemented: ${missing.join(", ")}. ` +
171
+ `Implemented file tools: ${implemented.length > 0 ? implemented.join(", ") : "(none)"}.`);
172
+ }
173
+ return harness;
174
+ }
175
+ export function withMcpGrant(tools) {
176
+ return tools.includes("mcp") ? [...tools] : [...tools, "mcp"];
177
+ }
178
+ /**
179
+ * Native Cursor SDK file tools replaced by synthesized FileSystem tools
180
+ * on every local turn. SDK allowlist names (`edit`, not `Write`).
181
+ */
182
+ export const REPLACED_NATIVE_FILE_TOOLS = [
183
+ "read",
184
+ "ls",
185
+ "grep",
186
+ "glob",
187
+ "edit",
188
+ "delete",
189
+ removedNativeFileSearchTool(),
190
+ ];
191
+ /**
192
+ * Host-default harness options: keep shell / webSearch / sandbox, but
193
+ * hide the native file tools the synthesized FileSystem now owns.
194
+ *
195
+ * Omitted `tools` leaves the SDK default set and only excludes the
196
+ * replaced natives. `[]` stays empty. A non-empty allowlist drops file
197
+ * aliases (those ride synthesized tools) and grants `mcp`.
198
+ */
199
+ export function resolveHostHarnessToolOptions(tools) {
200
+ if (tools === undefined) {
201
+ return { disallowedTools: [...REPLACED_NATIVE_FILE_TOOLS] };
202
+ }
203
+ if (tools.length === 0) {
204
+ return { tools: [] };
205
+ }
206
+ assertNoRemovedFileSearchTools(tools);
207
+ return {
208
+ tools: withMcpGrant(tools.filter((name) => !isReplacedHostFileAlias(name))),
209
+ };
210
+ }
211
+ /** File aliases host-default synthesizes in place of the native tools. */
212
+ function isReplacedHostFileAlias(name) {
213
+ return canonicalizeFileSystemToolName(name) !== undefined;
214
+ }
215
+ /** Decode a {@link FileSystem.read} result as UTF-8 text. */
216
+ export function fileSystemText(content) {
217
+ return typeof content === "string" ? content : Buffer.from(content).toString("utf8");
218
+ }
219
+ /**
220
+ * Native Read image formats. Magic bytes first, then extension.
221
+ * Returns undefined for text (and for any other binary).
222
+ */
223
+ export function detectImageMimeType(bytes, filePath) {
224
+ if (bytes.length >= 3 && bytes[0] === 0xff && bytes[1] === 0xd8 && bytes[2] === 0xff) {
225
+ return "image/jpeg";
226
+ }
227
+ if (bytes.length >= 8 &&
228
+ bytes[0] === 0x89 &&
229
+ bytes[1] === 0x50 &&
230
+ bytes[2] === 0x4e &&
231
+ bytes[3] === 0x47) {
232
+ return "image/png";
233
+ }
234
+ if (bytes.length >= 6 && bytes[0] === 0x47 && bytes[1] === 0x49 && bytes[2] === 0x46) {
235
+ return "image/gif";
236
+ }
237
+ if (bytes.length >= 12 &&
238
+ bytes[0] === 0x52 &&
239
+ bytes[1] === 0x49 &&
240
+ bytes[2] === 0x46 &&
241
+ bytes[3] === 0x46 &&
242
+ bytes[8] === 0x57 &&
243
+ bytes[9] === 0x45 &&
244
+ bytes[10] === 0x42 &&
245
+ bytes[11] === 0x50) {
246
+ return "image/webp";
247
+ }
248
+ if (filePath === undefined) {
249
+ return undefined;
250
+ }
251
+ const lower = filePath.toLowerCase();
252
+ if (lower.endsWith(".jpg") || lower.endsWith(".jpeg")) {
253
+ return "image/jpeg";
254
+ }
255
+ if (lower.endsWith(".png")) {
256
+ return "image/png";
257
+ }
258
+ if (lower.endsWith(".gif")) {
259
+ return "image/gif";
260
+ }
261
+ if (lower.endsWith(".webp")) {
262
+ return "image/webp";
263
+ }
264
+ return undefined;
265
+ }
266
+ export function fileSystemImage(content, path) {
267
+ if (!(content instanceof Uint8Array)) {
268
+ return undefined;
269
+ }
270
+ const mimeType = detectImageMimeType(content, path);
271
+ if (mimeType === undefined) {
272
+ return undefined;
273
+ }
274
+ return { mimeType, bytes: content };
275
+ }
276
+ function compileGrepPattern(pattern, caseInsensitive, path = "/") {
277
+ try {
278
+ return new RegExp(pattern, caseInsensitive === true ? "i" : undefined);
279
+ }
280
+ catch {
281
+ throw new InvalidGrepPatternError(pattern, path);
282
+ }
283
+ }
284
+ function* grepFileContent(args) {
285
+ const lines = args.content.split("\n");
286
+ for (let i = 0; i < lines.length; i++) {
287
+ const line = lines[i];
288
+ if (args.regex.test(line)) {
289
+ yield { path: args.path, lineNumber: i + 1, line };
290
+ }
291
+ }
292
+ }
293
+ function normalizeMaxResults(maxResults) {
294
+ if (maxResults === undefined || !Number.isFinite(maxResults)) {
295
+ return undefined;
296
+ }
297
+ return Math.max(0, Math.floor(maxResults));
298
+ }
299
+ async function* limitResults(source, maxResults) {
300
+ const cap = normalizeMaxResults(maxResults);
301
+ if (cap === 0) {
302
+ return;
303
+ }
304
+ let n = 0;
305
+ for await (const item of source) {
306
+ yield item;
307
+ n++;
308
+ if (cap !== undefined && n >= cap) {
309
+ return;
310
+ }
311
+ }
312
+ }
313
+ function grepPushdownLimit(query, opts) {
314
+ // Count and files_with_matches paginate after grouping by file.
315
+ // A line-level cap would hide later files once one file fills the window.
316
+ if (opts.outputMode === "count" || opts.outputMode === "files_with_matches") {
317
+ return query.maxResults;
318
+ }
319
+ const headLimit = opts.headLimit !== undefined && opts.headLimit > 0 ? opts.headLimit : undefined;
320
+ if (headLimit === undefined) {
321
+ return query.maxResults;
322
+ }
323
+ const toolCap = opts.offset + headLimit;
324
+ return query.maxResults === undefined ? toolCap : Math.min(query.maxResults, toolCap);
325
+ }
326
+ function compareGrepResult(left, right) {
327
+ return left.path < right.path
328
+ ? -1
329
+ : left.path > right.path
330
+ ? 1
331
+ : left.lineNumber - right.lineNumber;
332
+ }
333
+ export async function collectGrepMatches(root, query, opts) {
334
+ const matches = [];
335
+ const offset = opts.offset !== undefined && opts.offset > 0 ? opts.offset : 0;
336
+ const headLimit = opts.headLimit !== undefined && opts.headLimit > 0 ? opts.headLimit : undefined;
337
+ const skippedFiles = new Set();
338
+ const acceptedFiles = new Set();
339
+ let skippedItems = 0;
340
+ let takenItems = 0;
341
+ const pushdown = grepPushdownLimit(query, {
342
+ outputMode: opts.outputMode,
343
+ offset,
344
+ ...(opts.headLimit === undefined ? {} : { headLimit: opts.headLimit }),
345
+ });
346
+ const grepQuery = pushdown === undefined ? query : { ...query, maxResults: pushdown };
347
+ for await (const match of root.grep(grepQuery)) {
348
+ if (opts.outputMode === "content") {
349
+ if (skippedItems < offset) {
350
+ skippedItems++;
351
+ continue;
352
+ }
353
+ matches.push(match);
354
+ takenItems++;
355
+ if (headLimit !== undefined && takenItems >= headLimit) {
356
+ break;
357
+ }
358
+ continue;
359
+ }
360
+ if (skippedFiles.has(match.path)) {
361
+ continue;
362
+ }
363
+ if (!acceptedFiles.has(match.path)) {
364
+ if (skippedItems < offset) {
365
+ skippedFiles.add(match.path);
366
+ skippedItems++;
367
+ continue;
368
+ }
369
+ if (headLimit !== undefined && takenItems >= headLimit) {
370
+ break;
371
+ }
372
+ acceptedFiles.add(match.path);
373
+ takenItems++;
374
+ }
375
+ matches.push(match);
376
+ }
377
+ return matches;
378
+ }
379
+ export function shapeGrepUnion(matches, outputMode) {
380
+ if (outputMode === "files_with_matches") {
381
+ const files = [...new Set(matches.map((match) => match.path))];
382
+ return { type: "files", output: { files, count: files.length } };
383
+ }
384
+ if (outputMode === "count") {
385
+ const counts = new Map();
386
+ for (const match of matches) {
387
+ counts.set(match.path, (counts.get(match.path) ?? 0) + 1);
388
+ }
389
+ return {
390
+ type: "count",
391
+ output: {
392
+ counts: [...counts].map(([file, count]) => ({ file, count })),
393
+ total: matches.length,
394
+ },
395
+ };
396
+ }
397
+ return {
398
+ type: "content",
399
+ output: {
400
+ matches: matches.map((match) => ({
401
+ file: match.path,
402
+ lineNumber: match.lineNumber,
403
+ line: match.line,
404
+ ...(match.beforeContext === undefined ? {} : { beforeContext: match.beforeContext }),
405
+ ...(match.afterContext === undefined ? {} : { afterContext: match.afterContext }),
406
+ })),
407
+ totalMatches: matches.length,
408
+ },
409
+ };
410
+ }
411
+ export function normalizeFsPath(input) {
412
+ const slashes = input.replace(/\\/g, "/");
413
+ if (slashes === "") {
414
+ return "/";
415
+ }
416
+ const withSlash = slashes.startsWith("/") ? slashes : `/${slashes}`;
417
+ const resolved = path.posix.normalize(withSlash);
418
+ if (resolved.length > 1 && resolved.endsWith("/")) {
419
+ return resolved.slice(0, -1);
420
+ }
421
+ return resolved === "." || resolved === "" ? "/" : resolved;
422
+ }
423
+ /** Path-segment prefix: `/agent` matches `/agent/skills`, not `/agent-tools`. */
424
+ export function pathHasSegmentPrefix(args) {
425
+ const p = normalizeFsPath(args.path);
426
+ const pre = normalizeFsPath(args.prefix);
427
+ if (pre === "/") {
428
+ return true;
429
+ }
430
+ return p === pre || p.startsWith(`${pre}/`);
431
+ }
432
+ function matchGlob(relativePath, globPattern) {
433
+ return minimatch(relativePath, globPattern, { dot: true, nocase: false });
434
+ }
435
+ function pathMatchesGlob(filePath, dir, globPattern, options = {}) {
436
+ const posixFile = filePath.replace(/\\/g, "/");
437
+ const posixDir = dir.replace(/\\/g, "/");
438
+ const relative = posixDir === "/" || posixFile.startsWith(`${posixDir}/`)
439
+ ? posixDir === "/"
440
+ ? posixFile.replace(/^\//, "")
441
+ : posixFile.slice(posixDir.length + 1)
442
+ : posixFile.replace(/^\//, "");
443
+ if (matchGlob(relative, globPattern) || matchGlob(posixFile.replace(/^\//, ""), globPattern)) {
444
+ return true;
445
+ }
446
+ // Native grep `--glob '*.ts'` matches the basename at any depth.
447
+ // Glob `*.ts` stays relative to `targetDirectory` and does not.
448
+ if (options.matchBasename === true && !globPattern.includes("/")) {
449
+ const slash = relative.lastIndexOf("/");
450
+ const base = slash === -1 ? relative : relative.slice(slash + 1);
451
+ return matchGlob(base, globPattern);
452
+ }
453
+ return false;
454
+ }
455
+ /**
456
+ * Resolve a per-send `workspaceFiles` key onto the virtual `/` namespace.
457
+ * Refuses paths that escape the root, and the reserved `memory` name.
458
+ * Host-default workspaces symlink `memory/` to durable agent state, so a
459
+ * seed under that name would write through the link.
460
+ */
461
+ export function virtualWorkspaceWritePath(relativePath) {
462
+ if (relativePath.includes("\0")) {
463
+ throw new FileSystemConfigError(`Refusing to write outside the virtual root: ${relativePath}`);
464
+ }
465
+ const posix = relativePath.replaceAll("\\", "/");
466
+ const base = "/virtual-root";
467
+ const target = path.posix.normalize(path.posix.join(base, posix));
468
+ if (target !== base && !target.startsWith(`${base}/`)) {
469
+ throw new FileSystemConfigError(`Refusing to write outside the virtual root: ${relativePath}`);
470
+ }
471
+ const sliced = target.slice(base.length);
472
+ const dest = sliced === "" ? "/" : sliced;
473
+ if (pathHasSegmentPrefix({
474
+ path: dest,
475
+ prefix: `/${MEMORY_DIR_NAME}`,
476
+ })) {
477
+ throw new FileSystemConfigError(`"${MEMORY_DIR_NAME}" is reserved for shared session memory; refusing to write ${relativePath}`);
478
+ }
479
+ return dest;
480
+ }
481
+ export async function writeWorkspaceFilesToRoot(root, files) {
482
+ for (const [relativePath, contents] of Object.entries(files)) {
483
+ // Refuse escapes, then write the sanitized relative dest so
484
+ // `localFileSystem` joins against cwd and `tempFs` still normalizes
485
+ // `a.txt` → `/a.txt`. Never forward an absolute host path.
486
+ const dest = virtualWorkspaceWritePath(relativePath);
487
+ const relativeDest = dest.replace(/^\//, "");
488
+ if (relativeDest === "") {
489
+ throw new FileSystemConfigError(`Refusing to write the virtual root: ${relativePath}`);
490
+ }
491
+ const fileText = typeof contents === "string"
492
+ ? contents
493
+ : Buffer.from(contents.data, "base64").toString("utf8");
494
+ try {
495
+ await root.write(relativeDest, fileText);
496
+ }
497
+ catch (error) {
498
+ throw new FileSystemConfigError(`workspaceFiles failed to write ${relativePath}: ${error instanceof Error ? error.message : "write failed"}`);
499
+ }
500
+ }
501
+ }
502
+ function replaceLiteral(args) {
503
+ if (args.replaceAll) {
504
+ return args.existing.split(args.oldText).join(args.newText);
505
+ }
506
+ const index = args.existing.indexOf(args.oldText);
507
+ if (index === -1) {
508
+ return args.existing;
509
+ }
510
+ return (args.existing.slice(0, index) + args.newText + args.existing.slice(index + args.oldText.length));
511
+ }
512
+ function countNonOverlapping(haystack, needle) {
513
+ let count = 0;
514
+ let from = 0;
515
+ while (from <= haystack.length - needle.length) {
516
+ const index = haystack.indexOf(needle, from);
517
+ if (index === -1) {
518
+ break;
519
+ }
520
+ count++;
521
+ from = index + needle.length;
522
+ }
523
+ return count;
524
+ }
525
+ /**
526
+ * Exact, non-overlapping str-replace. Uniqueness is the FileSystem
527
+ * contract: more than one match fails unless `replaceAll`.
528
+ */
529
+ function applyExactEdit(args) {
530
+ if (args.oldText === "") {
531
+ throw new EditError(args.path, "oldText is empty");
532
+ }
533
+ if (args.oldText === args.newText) {
534
+ throw new EditError(args.path, "oldText and newText are exactly the same");
535
+ }
536
+ const occurrences = countNonOverlapping(args.existing, args.oldText);
537
+ if (occurrences === 0) {
538
+ throw new EditError(args.path, "The string to replace was not found in the file");
539
+ }
540
+ if (occurrences > 1 && !args.replaceAll) {
541
+ throw new EditError(args.path, "The string to replace was found multiple times in the file. Use replace_all to replace all occurrences, or include more context to only edit one occurrence.");
542
+ }
543
+ return {
544
+ contents: replaceLiteral({
545
+ existing: args.existing,
546
+ oldText: args.oldText,
547
+ newText: args.newText,
548
+ replaceAll: args.replaceAll,
549
+ }),
550
+ occurrencesModified: occurrences,
551
+ };
552
+ }
553
+ /**
554
+ * Exact str-replace as `read` + apply + `write`. Uniqueness is
555
+ * this helper's contract; FileSystem implementations do not
556
+ * implement edit. Native StrReplace calls this.
557
+ */
558
+ export async function strReplaceOnFileSystem(root, query) {
559
+ const existing = await root.read(query.path);
560
+ if (typeof existing !== "string") {
561
+ throw new EditError(query.path, `${query.path} is not text`);
562
+ }
563
+ const applied = applyExactEdit({
564
+ existing,
565
+ oldText: query.oldText,
566
+ newText: query.newText,
567
+ replaceAll: query.replaceAll === true,
568
+ path: query.path,
569
+ });
570
+ await root.write(query.path, applied.contents);
571
+ return { occurrencesModified: applied.occurrencesModified };
572
+ }
573
+ /** Native Read offset/limit: 1-indexed, negative offset counts from the end. */
574
+ export function sliceReadContent(content, offset, limit) {
575
+ if (offset === undefined && limit === undefined) {
576
+ return content;
577
+ }
578
+ const lines = content === "" ? [] : content.split("\n");
579
+ const total = lines.length;
580
+ const effectiveOffset = offset ?? 1;
581
+ const effectiveLimit = limit ?? (effectiveOffset < 0 ? Math.abs(effectiveOffset) : total);
582
+ const startIndex = effectiveOffset < 0 ? Math.max(0, total + effectiveOffset) : Math.max(0, effectiveOffset - 1);
583
+ const endIndex = Math.min(total, startIndex + effectiveLimit);
584
+ return lines.slice(startIndex, endIndex).join("\n");
585
+ }
586
+ async function* emptyStream() { }
587
+ /**
588
+ * A FileSystem with no files. Use as an overlay leaf or a missing
589
+ * catalog so a miss stays {@link FileNotFoundError} instead of
590
+ * {@link NoMountError}. Writes and deletes throw
591
+ * {@link ReadOnlyMountError} — an empty tree is never a sink.
592
+ */
593
+ export function emptyFs() {
594
+ return {
595
+ list: () => emptyStream(),
596
+ glob: () => emptyStream(),
597
+ async *grep(query) {
598
+ compileGrepPattern(query.pattern, query.caseInsensitive, query.path === undefined || query.path === "" ? "/" : normalizeFsPath(query.path));
599
+ yield* emptyStream();
600
+ },
601
+ async stat(path) {
602
+ return statFromFilePaths([], path);
603
+ },
604
+ async read(path) {
605
+ throw new FileNotFoundError(normalizeFsPath(path));
606
+ },
607
+ async write(path) {
608
+ throw new ReadOnlyMountError(normalizeFsPath(path));
609
+ },
610
+ async delete(path) {
611
+ throw new ReadOnlyMountError(normalizeFsPath(path));
612
+ },
613
+ };
614
+ }
615
+ /**
616
+ * In-memory FileSystem for tests and fixtures. Keys are absolute
617
+ * posix paths (`/a.txt`) and are normalized on ingest. Honors the
618
+ * {@link FileSystem} order and path contracts.
619
+ * Creates `/agent-tools` on first scratch
620
+ * write the same way any other path is created.
621
+ */
622
+ export function tempFs(files = {}) {
623
+ const store = new Map();
624
+ for (const [path, content] of Object.entries(files)) {
625
+ store.set(normalizeFsPath(path), content);
626
+ }
627
+ const listed = {
628
+ list(prefix, options) {
629
+ return listFilesFromPaths([...store.entries()].map(([filePath, content]) => ({
630
+ path: filePath,
631
+ size: typeof content === "string" ? content.length : content.byteLength,
632
+ })), prefix, options);
633
+ },
634
+ async stat(path) {
635
+ return statFromFilePaths(store.keys(), path);
636
+ },
637
+ };
638
+ return {
639
+ list(prefix, options) {
640
+ return listed.list(prefix, options);
641
+ },
642
+ async stat(path) {
643
+ return listed.stat(path);
644
+ },
645
+ async read(inputPath) {
646
+ const path = normalizeFsPath(inputPath);
647
+ const content = store.get(path);
648
+ if (content === undefined) {
649
+ throw new FileNotFoundError(path);
650
+ }
651
+ return content;
652
+ },
653
+ async *grep(query) {
654
+ yield* limitResults(uncapped(), query.maxResults);
655
+ async function* uncapped() {
656
+ const regex = compileGrepPattern(query.pattern, query.caseInsensitive, query.path === undefined || query.path === "" ? "/" : normalizeFsPath(query.path));
657
+ const scope = query.path === undefined || query.path === "" ? "/" : normalizeFsPath(query.path);
658
+ const exact = store.get(scope);
659
+ if (scope !== "/" && exact !== undefined) {
660
+ if (query.glob !== undefined &&
661
+ !pathMatchesGlob(scope, scope, query.glob, {
662
+ matchBasename: true,
663
+ })) {
664
+ return;
665
+ }
666
+ if (isExcludedPath(scope, query.excludes)) {
667
+ return;
668
+ }
669
+ yield* grepFileContent({
670
+ path: scope,
671
+ content: fileSystemText(exact),
672
+ regex,
673
+ });
674
+ return;
675
+ }
676
+ for await (const entry of listed.list(scope === "/" ? undefined : scope, query.excludes === undefined ? undefined : { excludes: query.excludes })) {
677
+ if (query.glob !== undefined &&
678
+ !pathMatchesGlob(entry.path, scope, query.glob, {
679
+ matchBasename: true,
680
+ })) {
681
+ continue;
682
+ }
683
+ const content = store.get(entry.path);
684
+ if (content === undefined) {
685
+ continue;
686
+ }
687
+ yield* grepFileContent({
688
+ path: entry.path,
689
+ content: fileSystemText(content),
690
+ regex,
691
+ });
692
+ }
693
+ }
694
+ },
695
+ async *glob(pattern, dir, options) {
696
+ const scope = dir === undefined || dir === "" ? "/" : normalizeFsPath(dir);
697
+ yield* globFromList(listed.list(scope === "/" ? undefined : scope), {
698
+ pattern,
699
+ dir: scope,
700
+ ...(options?.limit === undefined ? {} : { limit: options.limit }),
701
+ });
702
+ },
703
+ async write(inputPath, contents) {
704
+ store.set(normalizeFsPath(inputPath), contents);
705
+ },
706
+ async delete(inputPath) {
707
+ const path = normalizeFsPath(inputPath);
708
+ if (!store.has(path)) {
709
+ throw new FileNotFoundError(path);
710
+ }
711
+ store.delete(path);
712
+ },
713
+ };
714
+ }
715
+ function fsErrorMessage(error, fallback) {
716
+ return error instanceof Error ? error.message : fallback;
717
+ }
718
+ function throwLocalReadError(error, filePath) {
719
+ throw new FileNotFoundError(filePath, fsErrorMessage(error, `not found: ${filePath}`));
720
+ }
721
+ function skipWalkDir(name) {
722
+ return name === ".git" || name === "node_modules";
723
+ }
724
+ async function walkLocalFiles(rootDir) {
725
+ const found = [];
726
+ const stack = [rootDir];
727
+ while (stack.length > 0) {
728
+ const current = stack.pop();
729
+ if (current === undefined) {
730
+ break;
731
+ }
732
+ let entries;
733
+ try {
734
+ entries = await readdir(current, { withFileTypes: true });
735
+ }
736
+ catch {
737
+ continue;
738
+ }
739
+ for (const entry of entries) {
740
+ const full = path.join(current, entry.name);
741
+ // Same as the pre-root host walk and native LS/Glob/Grep: Dirent
742
+ // isDirectory/isFile do not follow links, so workspace `memory/`
743
+ // and other symlinks are not enumerated. Exact-path read/stat still
744
+ // follow.
745
+ if (entry.isDirectory()) {
746
+ if (!skipWalkDir(entry.name)) {
747
+ stack.push(full);
748
+ }
749
+ }
750
+ else if (entry.isFile()) {
751
+ found.push(full);
752
+ }
753
+ }
754
+ }
755
+ found.sort((left, right) => left.localeCompare(right));
756
+ return found;
757
+ }
758
+ async function* listLocalFiles(rootDir) {
759
+ for (const filePath of await walkLocalFiles(rootDir)) {
760
+ yield { path: filePath };
761
+ }
762
+ }
763
+ class WorkspacePathError extends Error {
764
+ constructor(inputPath) {
765
+ super(`Path is outside the workspace: ${inputPath}`);
766
+ this.name = "WorkspacePathError";
767
+ }
768
+ }
769
+ function isEnoent(error) {
770
+ return (typeof error === "object" &&
771
+ error !== null &&
772
+ "code" in error &&
773
+ error.code === "ENOENT");
774
+ }
775
+ function isInsideWorkspace(root, target) {
776
+ const relative = path.relative(root, target);
777
+ return (relative === "" ||
778
+ (relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative)));
779
+ }
780
+ async function workspaceRoot(cwd) {
781
+ try {
782
+ return await realpath(cwd);
783
+ }
784
+ catch (error) {
785
+ if (isEnoent(error)) {
786
+ return cwd;
787
+ }
788
+ throw error;
789
+ }
790
+ }
791
+ /** Logical path and symlink target must both stay under `cwd`. */
792
+ async function confinedHostPath(cwd, input) {
793
+ if (input.includes("\0")) {
794
+ throw new WorkspacePathError(input);
795
+ }
796
+ const root = await workspaceRoot(path.resolve(cwd));
797
+ const resolved = path.isAbsolute(input) ? path.resolve(input) : path.resolve(root, input);
798
+ const missing = [];
799
+ let current = resolved;
800
+ for (let hop = 0; hop < 40; hop += 1) {
801
+ try {
802
+ const real = await realpath(current);
803
+ const candidate = missing.length === 0 ? real : path.join(real, ...missing);
804
+ if (!isInsideWorkspace(root, candidate)) {
805
+ throw new WorkspacePathError(input);
806
+ }
807
+ return candidate;
808
+ }
809
+ catch (error) {
810
+ if (error instanceof WorkspacePathError) {
811
+ throw error;
812
+ }
813
+ if (!isEnoent(error)) {
814
+ throw error;
815
+ }
816
+ const link = await danglingLinkTarget(current);
817
+ if (link !== undefined) {
818
+ current = missing.length === 0 ? link : path.join(link, ...missing);
819
+ missing.length = 0;
820
+ continue;
821
+ }
822
+ if (current === root || path.dirname(current) === current) {
823
+ const candidate = missing.length === 0 ? current : path.join(current, ...missing);
824
+ if (!isInsideWorkspace(root, candidate)) {
825
+ throw new WorkspacePathError(input);
826
+ }
827
+ return candidate;
828
+ }
829
+ missing.unshift(path.basename(current));
830
+ current = path.dirname(current);
831
+ }
832
+ }
833
+ throw new WorkspacePathError(input);
834
+ }
835
+ /** Target of a symlink `realpath` cannot resolve because the target is missing. */
836
+ async function danglingLinkTarget(candidate) {
837
+ try {
838
+ const info = await lstat(candidate);
839
+ if (!info.isSymbolicLink()) {
840
+ return undefined;
841
+ }
842
+ return path.resolve(path.dirname(candidate), await readlink(candidate));
843
+ }
844
+ catch (error) {
845
+ if (isEnoent(error)) {
846
+ return undefined;
847
+ }
848
+ throw error;
849
+ }
850
+ }
851
+ /**
852
+ * Host-disk FileSystem. Relative paths resolve against `cwd`. Absolute
853
+ * paths are used as given, matching Cursor SDK native file tools, unless
854
+ * `confineToWorkspace` is set. Then every path, after symlinks, must stay
855
+ * under `cwd`, and the verbs throw `Path is outside the workspace` for the
856
+ * rest. In that mode, `readOnlyRoots` lets the read verbs (list, stat,
857
+ * read, glob, grep) also reach those directories. `write` and `delete`
858
+ * stay under `cwd`. Without `confineToWorkspace`, `readOnlyRoots` has no
859
+ * effect.
860
+ *
861
+ * Internal. Not part of the public Agent SDK surface.
862
+ */
863
+ export function localFileSystem(options) {
864
+ const cwd = path.resolve(options.cwd);
865
+ const confineToWorkspace = options.confineToWorkspace === true;
866
+ const readOnlyRoots = (options.readOnlyRoots ?? []).map((root) => path.resolve(root));
867
+ const resolvePath = (input) => path.isAbsolute(input) ? path.resolve(input) : path.resolve(cwd, input);
868
+ const resolveWritable = (input) => confineToWorkspace ? confinedHostPath(cwd, input) : Promise.resolve(resolvePath(input));
869
+ const resolveLocated = async (input) => {
870
+ try {
871
+ return await resolveWritable(input);
872
+ }
873
+ catch (error) {
874
+ if (!(error instanceof WorkspacePathError)) {
875
+ throw error;
876
+ }
877
+ for (const root of readOnlyRoots) {
878
+ try {
879
+ return await confinedHostPath(root, resolvePath(input));
880
+ }
881
+ catch (rootError) {
882
+ if (!(rootError instanceof WorkspacePathError)) {
883
+ throw rootError;
884
+ }
885
+ }
886
+ }
887
+ throw error;
888
+ }
889
+ };
890
+ return {
891
+ async *list(prefix, options) {
892
+ yield* limitResults(uncapped(), options?.limit);
893
+ async function* uncapped() {
894
+ const dirPath = prefix === undefined || prefix === "" || prefix === "."
895
+ ? cwd
896
+ : await resolveLocated(prefix);
897
+ for await (const entry of listLocalFiles(dirPath)) {
898
+ if (!isExcludedPath(entry.path, options?.excludes)) {
899
+ yield entry;
900
+ }
901
+ }
902
+ }
903
+ },
904
+ async stat(probePath) {
905
+ const filePath = await resolveLocated(probePath);
906
+ try {
907
+ const info = await stat(filePath);
908
+ return { kind: info.isDirectory() ? "directory" : "file" };
909
+ }
910
+ catch {
911
+ return { kind: "missing" };
912
+ }
913
+ },
914
+ async read(inputPath) {
915
+ const filePath = await resolveLocated(inputPath);
916
+ try {
917
+ const bytes = await readFile(filePath);
918
+ if (detectImageMimeType(bytes, filePath) !== undefined) {
919
+ return new Uint8Array(bytes);
920
+ }
921
+ return bytes.toString("utf8");
922
+ }
923
+ catch (error) {
924
+ return throwLocalReadError(error, filePath);
925
+ }
926
+ },
927
+ async *grep(query) {
928
+ yield* limitResults(uncapped(), query.maxResults);
929
+ async function* uncapped() {
930
+ const searchRoot = await resolveLocated(query.path ?? cwd);
931
+ const regex = compileGrepPattern(query.pattern, query.caseInsensitive, searchRoot);
932
+ let filesToSearch;
933
+ try {
934
+ const info = await stat(searchRoot);
935
+ filesToSearch = info.isFile() ? [searchRoot] : await walkLocalFiles(searchRoot);
936
+ }
937
+ catch (error) {
938
+ throwLocalReadError(error, searchRoot);
939
+ }
940
+ for (const filePath of filesToSearch) {
941
+ if (query.glob !== undefined &&
942
+ !pathMatchesGlob(filePath, searchRoot, query.glob, {
943
+ matchBasename: true,
944
+ })) {
945
+ continue;
946
+ }
947
+ if (isExcludedPath(filePath, query.excludes)) {
948
+ continue;
949
+ }
950
+ let content;
951
+ try {
952
+ content = await readFile(filePath, "utf8");
953
+ }
954
+ catch {
955
+ continue;
956
+ }
957
+ yield* grepFileContent({ path: filePath, content, regex });
958
+ }
959
+ }
960
+ },
961
+ async *glob(pattern, dir, options) {
962
+ const dirPath = dir === undefined || dir === "" || dir === "." ? cwd : await resolveLocated(dir);
963
+ yield* globFromList(listLocalFiles(dirPath), {
964
+ pattern,
965
+ dir: dirPath,
966
+ ...(options?.limit === undefined ? {} : { limit: options.limit }),
967
+ });
968
+ },
969
+ async write(inputPath, contents) {
970
+ const filePath = await resolveWritable(inputPath);
971
+ try {
972
+ await mkdir(path.dirname(filePath), { recursive: true });
973
+ await writeFile(filePath, contents, "utf8");
974
+ }
975
+ catch (error) {
976
+ throw new WriteFailedError(filePath, fsErrorMessage(error, `write failed: ${filePath}`));
977
+ }
978
+ },
979
+ async delete(inputPath) {
980
+ const filePath = await resolveWritable(inputPath);
981
+ try {
982
+ await rm(filePath);
983
+ }
984
+ catch (error) {
985
+ throwLocalReadError(error, filePath);
986
+ }
987
+ },
988
+ };
989
+ }
990
+ function longestMount(path, mounts) {
991
+ let best;
992
+ for (const mount of mounts) {
993
+ if (!pathHasSegmentPrefix({ path, prefix: mount.prefix })) {
994
+ continue;
995
+ }
996
+ if (best === undefined || mount.prefix.length > best.prefix.length) {
997
+ best = mount;
998
+ }
999
+ }
1000
+ return best;
1001
+ }
1002
+ /** Each mount strictly under `path`. */
1003
+ function nestedMounts(path, mounts) {
1004
+ return mounts.filter((mount) => mount.prefix !== path && pathHasSegmentPrefix({ path: mount.prefix, prefix: path }));
1005
+ }
1006
+ /**
1007
+ * A glob from `scope` into a mount nested under it. The pattern is relative
1008
+ * to `scope`, not to the mount, so the mount is listed and each path matched.
1009
+ */
1010
+ async function* globNestedMount(mount, scope, pattern) {
1011
+ for await (const entry of mapMountEntries(mount.fs.list(undefined), mount.prefix)) {
1012
+ if (pathMatchesGlob(entry.path, scope, pattern)) {
1013
+ yield entry;
1014
+ }
1015
+ }
1016
+ }
1017
+ /** Namespace path → child path. `/host/a.md` on `/host` is `/a.md`. */
1018
+ function toChildPath(path, prefix) {
1019
+ if (prefix === "/") {
1020
+ return path;
1021
+ }
1022
+ if (path === prefix) {
1023
+ return "/";
1024
+ }
1025
+ if (path.startsWith(`${prefix}/`)) {
1026
+ return path.slice(prefix.length);
1027
+ }
1028
+ return path;
1029
+ }
1030
+ /** Child path → namespace path. `/a.md` on `/host` is `/host/a.md`. */
1031
+ function toParentPath(path, prefix) {
1032
+ if (prefix === "/") {
1033
+ return path;
1034
+ }
1035
+ if (path === "/" || path === "") {
1036
+ return prefix;
1037
+ }
1038
+ return path.startsWith("/") ? `${prefix}${path}` : `${prefix}/${path}`;
1039
+ }
1040
+ async function* mapMountEntries(source, prefix) {
1041
+ try {
1042
+ for await (const entry of source) {
1043
+ yield { ...entry, path: toParentPath(entry.path, prefix) };
1044
+ }
1045
+ }
1046
+ catch (error) {
1047
+ throw remapPathError(error, prefix);
1048
+ }
1049
+ }
1050
+ async function* mapMountGrep(source, prefix) {
1051
+ try {
1052
+ for await (const hit of source) {
1053
+ yield { ...hit, path: toParentPath(hit.path, prefix) };
1054
+ }
1055
+ }
1056
+ catch (error) {
1057
+ throw remapPathError(error, prefix);
1058
+ }
1059
+ }
1060
+ function omittedScan(path) {
1061
+ return path === undefined || path === "";
1062
+ }
1063
+ /**
1064
+ * The turn tree: authored files at `/`, scratch at `/tmp`, and an optional
1065
+ * skills mount. An omitted `grep` or `glob` path searches the authored
1066
+ * tree only, so a tree that narrows that call (for example to `/repo`)
1067
+ * does not also scan skills or scratch. An explicit path searches every
1068
+ * mount under it.
1069
+ */
1070
+ export function sessionFileSystem(options) {
1071
+ const mounts = {
1072
+ "/": options.authored,
1073
+ "/tmp": options.scratch ?? tempFs(),
1074
+ };
1075
+ if (options.skills !== undefined) {
1076
+ mounts[options.skills.path] = options.skills.fs;
1077
+ }
1078
+ const union = unionFs(mounts);
1079
+ return {
1080
+ list: (prefix, listOptions) => union.list(prefix, listOptions),
1081
+ stat: (path) => union.stat(path),
1082
+ read: (path) => union.read(path),
1083
+ write: (path, contents) => union.write(path, contents),
1084
+ delete: (path) => union.delete(path),
1085
+ glob: (pattern, dir, globOptions) => omittedScan(dir)
1086
+ ? options.authored.glob(pattern, dir, globOptions)
1087
+ : union.glob(pattern, dir, globOptions),
1088
+ grep: (query) => (omittedScan(query.path) ? options.authored.grep(query) : union.grep(query)),
1089
+ };
1090
+ }
1091
+ /** Forwards reads. `write` and `delete` throw `read-only mount`. */
1092
+ export function readOnlyFs(inner) {
1093
+ return {
1094
+ list: (prefix, options) => inner.list(prefix, options),
1095
+ stat: (path) => inner.stat(path),
1096
+ glob: (pattern, dir, options) => inner.glob(pattern, dir, options),
1097
+ read: (path) => inner.read(path),
1098
+ grep: (query) => inner.grep(query),
1099
+ async write(path) {
1100
+ throw new ReadOnlyMountError(normalizeFsPath(path));
1101
+ },
1102
+ async delete(path) {
1103
+ throw new ReadOnlyMountError(normalizeFsPath(path));
1104
+ },
1105
+ };
1106
+ }
1107
+ /**
1108
+ * Longest-prefix compose, path-segment match. Every verb is
1109
+ * defined. Does not synthesize `shell`. `/agent` is not a
1110
+ * prefix of `/agent-tools`.
1111
+ *
1112
+ * The record keys are mount points. Each child is a FileSystem
1113
+ * rooted at `/`. `unionFs` strips the prefix on the way in and
1114
+ * re-prefixes yields (and error paths) on the way out:
1115
+ * `unionFs({ "/host": hostFs(...) })` — the child never sees
1116
+ * `/host`.
1117
+ *
1118
+ * A path with no mount:
1119
+ * - `read` / `write` / `delete`: throw
1120
+ * `no mount for path: ${path}`
1121
+ * - `list` / `glob` / `grep`: empty iterator
1122
+ * - `stat`: `{ kind: "missing" }` (`/`, exact mount prefixes, and
1123
+ * their parents are `{ kind: "directory" }`)
1124
+ *
1125
+ * `list` and `glob` below `/` also yield the files of each mount nested
1126
+ * under that directory, as `list` and `glob` of `/` do. A nested glob
1127
+ * lists that mount and matches each path against the pattern. `grep`
1128
+ * stays on the mount that covers the path.
1129
+ *
1130
+ * Sources are already sorted longest prefix first. List and glob use
1131
+ * `unique` so that earlier source wins a tie.
1132
+ */
1133
+ export function unionFs(mounts) {
1134
+ const entries = Object.entries(mounts).map(([prefix, fs]) => ({
1135
+ prefix: normalizeFsPath(prefix),
1136
+ fs,
1137
+ }));
1138
+ entries.sort((a, b) => b.prefix.length - a.prefix.length);
1139
+ const noMount = (path) => {
1140
+ throw new NoMountError(path);
1141
+ };
1142
+ const forward = async (path, run) => {
1143
+ const mount = longestMount(path, entries);
1144
+ if (mount === undefined) {
1145
+ return noMount(path);
1146
+ }
1147
+ const childPath = toChildPath(path, mount.prefix);
1148
+ try {
1149
+ return await run(mount.fs, childPath);
1150
+ }
1151
+ catch (error) {
1152
+ throw remapPathError(error, mount.prefix);
1153
+ }
1154
+ };
1155
+ const isRootPath = (value) => value === undefined || value === "" || value === "/";
1156
+ return {
1157
+ async *list(prefix, options) {
1158
+ yield* limitResults(uncapped(), options?.limit);
1159
+ async function* uncapped() {
1160
+ if (isRootPath(prefix)) {
1161
+ yield* mergeSortedByPath(entries.map((mount) => mapMountEntries(mount.fs.list(undefined, options), mount.prefix)), { unique: true });
1162
+ return;
1163
+ }
1164
+ const path = normalizeFsPath(prefix ?? "/");
1165
+ const mount = longestMount(path, entries);
1166
+ const sources = nestedMounts(path, entries).map((nested) => mapMountEntries(nested.fs.list(undefined, options), nested.prefix));
1167
+ if (mount !== undefined) {
1168
+ const childPath = toChildPath(path, mount.prefix);
1169
+ sources.push(mapMountEntries(mount.fs.list(childPath === "/" ? undefined : childPath, options), mount.prefix));
1170
+ }
1171
+ yield* mergeSortedByPath(sources, { unique: true });
1172
+ }
1173
+ },
1174
+ async stat(path) {
1175
+ const normalized = normalizeFsPath(path);
1176
+ if (normalized === "/") {
1177
+ return { kind: "directory" };
1178
+ }
1179
+ if (entries.some((entry) => entry.prefix === normalized)) {
1180
+ return { kind: "directory" };
1181
+ }
1182
+ const mount = longestMount(normalized, entries);
1183
+ const info = mount === undefined
1184
+ ? { kind: "missing" }
1185
+ : await mount.fs.stat(toChildPath(normalized, mount.prefix));
1186
+ if (info.kind === "missing" && nestedMounts(normalized, entries).length > 0) {
1187
+ return { kind: "directory" };
1188
+ }
1189
+ return info;
1190
+ },
1191
+ async read(path) {
1192
+ const normalized = normalizeFsPath(path);
1193
+ return forward(normalized, (fs, childPath) => fs.read(childPath));
1194
+ },
1195
+ async write(path, contents) {
1196
+ const normalized = normalizeFsPath(path);
1197
+ return forward(normalized, (fs, childPath) => fs.write(childPath, contents));
1198
+ },
1199
+ async delete(path) {
1200
+ const normalized = normalizeFsPath(path);
1201
+ return forward(normalized, (fs, childPath) => fs.delete(childPath));
1202
+ },
1203
+ async *grep(query) {
1204
+ yield* limitResults(uncapped(), query.maxResults);
1205
+ async function* uncapped() {
1206
+ const scope = query.path === undefined || query.path === "" ? "/" : normalizeFsPath(query.path);
1207
+ if (scope === "/") {
1208
+ yield* mergeSorted(entries.map((mount) => mapMountGrep(mount.fs.grep({ ...query, path: undefined }), mount.prefix)), { compare: compareGrepResult });
1209
+ return;
1210
+ }
1211
+ const mount = longestMount(scope, entries);
1212
+ if (mount === undefined) {
1213
+ return;
1214
+ }
1215
+ const childPath = toChildPath(scope, mount.prefix);
1216
+ yield* mapMountGrep(mount.fs.grep({
1217
+ ...query,
1218
+ path: childPath === "/" ? undefined : childPath,
1219
+ }), mount.prefix);
1220
+ }
1221
+ },
1222
+ async *glob(pattern, dir, options) {
1223
+ yield* limitResults(uncapped(), options?.limit);
1224
+ async function* uncapped() {
1225
+ const scope = dir === undefined || dir === "" ? "/" : normalizeFsPath(dir);
1226
+ if (scope === "/") {
1227
+ yield* mergeSortedByPath(entries.map((mount) => mapMountEntries(mount.fs.glob(pattern, undefined, options), mount.prefix)), { unique: true });
1228
+ return;
1229
+ }
1230
+ const mount = longestMount(scope, entries);
1231
+ const sources = nestedMounts(scope, entries).map((nested) => globNestedMount(nested, scope, pattern));
1232
+ if (mount !== undefined) {
1233
+ const childPath = toChildPath(scope, mount.prefix);
1234
+ sources.push(mapMountEntries(mount.fs.glob(pattern, childPath === "/" ? undefined : childPath, options), mount.prefix));
1235
+ }
1236
+ yield* mergeSortedByPath(sources, { unique: true });
1237
+ }
1238
+ },
1239
+ };
1240
+ }
1241
+ async function collectLayerPaths(layer) {
1242
+ const paths = [];
1243
+ try {
1244
+ for await (const entry of layer.list()) {
1245
+ paths.push(entry.path);
1246
+ }
1247
+ }
1248
+ catch {
1249
+ // A layer that cannot list also cannot own paths.
1250
+ }
1251
+ return paths;
1252
+ }
1253
+ /**
1254
+ * Same-root overlay: earlier layers win. Read-only.
1255
+ *
1256
+ * A downed layer costs its own files, not the overlay. Mutations
1257
+ * throw `read-only mount` / `read-only mount: ${path}`. Empty
1258
+ * `layers` throws `overlayFs needs at least one layer.`
1259
+ */
1260
+ export function overlayFs(layers) {
1261
+ if (layers.length === 0) {
1262
+ throw new Error("overlayFs needs at least one layer.");
1263
+ }
1264
+ const walkLayers = async (collect) => {
1265
+ const streams = [];
1266
+ let failure;
1267
+ let served = false;
1268
+ for (const layer of layers) {
1269
+ const collected = [];
1270
+ try {
1271
+ for await (const entry of await collect(layer)) {
1272
+ collected.push(entry);
1273
+ }
1274
+ }
1275
+ catch (error) {
1276
+ failure ??= error;
1277
+ continue;
1278
+ }
1279
+ served = true;
1280
+ streams.push(collected);
1281
+ }
1282
+ return { streams, failure, served };
1283
+ };
1284
+ const collectOverlayHits = async (queryFn, rethrow) => {
1285
+ const streams = [];
1286
+ const shadowed = new Set();
1287
+ let failure;
1288
+ let served = false;
1289
+ for (const layer of layers) {
1290
+ const collected = [];
1291
+ try {
1292
+ for await (const hit of queryFn(layer)) {
1293
+ if (!shadowed.has(hit.path)) {
1294
+ collected.push(hit);
1295
+ }
1296
+ }
1297
+ served = true;
1298
+ }
1299
+ catch (error) {
1300
+ if (rethrow?.(error) === true) {
1301
+ throw error;
1302
+ }
1303
+ failure ??= error;
1304
+ continue;
1305
+ }
1306
+ streams.push(collected);
1307
+ for (const path of await collectLayerPaths(layer)) {
1308
+ shadowed.add(path);
1309
+ }
1310
+ }
1311
+ if (!served && failure !== undefined) {
1312
+ throw failure;
1313
+ }
1314
+ return streams;
1315
+ };
1316
+ return {
1317
+ async *list(prefix, options) {
1318
+ const { streams, failure, served } = await walkLayers((layer) => layer.list(prefix, options));
1319
+ if (!served && failure !== undefined) {
1320
+ throw failure;
1321
+ }
1322
+ yield* limitResults(mergeSortedByPath(streams, { unique: true }), options?.limit);
1323
+ },
1324
+ async stat(path) {
1325
+ let failure;
1326
+ let sawMissing = false;
1327
+ for (const layer of layers) {
1328
+ try {
1329
+ const info = await layer.stat(path);
1330
+ if (info.kind !== "missing") {
1331
+ return info;
1332
+ }
1333
+ sawMissing = true;
1334
+ }
1335
+ catch (error) {
1336
+ failure ??= error;
1337
+ }
1338
+ }
1339
+ if (!sawMissing && failure !== undefined) {
1340
+ throw failure;
1341
+ }
1342
+ return { kind: "missing" };
1343
+ },
1344
+ async *glob(pattern, dir, options) {
1345
+ const { streams, failure, served } = await walkLayers((layer) => layer.glob(pattern, dir, options));
1346
+ if (!served && failure !== undefined) {
1347
+ throw failure;
1348
+ }
1349
+ yield* limitResults(mergeSortedByPath(streams, { unique: true }), options?.limit);
1350
+ },
1351
+ async read(path) {
1352
+ let failure;
1353
+ for (const layer of layers) {
1354
+ try {
1355
+ return await layer.read(path);
1356
+ }
1357
+ catch (error) {
1358
+ if (isFileNotFoundError(error)) {
1359
+ continue;
1360
+ }
1361
+ failure ??= error;
1362
+ }
1363
+ }
1364
+ if (failure !== undefined) {
1365
+ throw failure;
1366
+ }
1367
+ throw new FileNotFoundError(path);
1368
+ },
1369
+ async *grep(query) {
1370
+ const { maxResults, ...uncappedQuery } = query;
1371
+ yield* limitResults(mergeSorted(await collectOverlayHits((layer) => layer.grep(uncappedQuery), (error) => isInvalidGrepPatternError(error)), { compare: compareGrepResult }), maxResults);
1372
+ },
1373
+ async write(path) {
1374
+ throw new ReadOnlyMountError(path);
1375
+ },
1376
+ async delete(path) {
1377
+ throw new ReadOnlyMountError(path);
1378
+ },
1379
+ };
1380
+ }
1381
+ /**
1382
+ * Hide `hidden` paths on `base` without mutating it. Used as the
1383
+ * lower layer of {@link childOverlayFs}. Deletes of parent files
1384
+ * are whiteouts in that set; writes never reach `base`.
1385
+ */
1386
+ function hidePaths(base, hidden) {
1387
+ const visible = (filePath) => !hidden.has(normalizeFsPath(filePath));
1388
+ return {
1389
+ async *list(prefix, options) {
1390
+ for await (const entry of base.list(prefix, options)) {
1391
+ if (visible(entry.path)) {
1392
+ yield entry;
1393
+ }
1394
+ }
1395
+ },
1396
+ async stat(path) {
1397
+ const normalized = normalizeFsPath(path);
1398
+ if (hidden.has(normalized)) {
1399
+ return { kind: "missing" };
1400
+ }
1401
+ return base.stat(path);
1402
+ },
1403
+ async *glob(pattern, dir, options) {
1404
+ for await (const entry of base.glob(pattern, dir, options)) {
1405
+ if (visible(entry.path)) {
1406
+ yield entry;
1407
+ }
1408
+ }
1409
+ },
1410
+ async read(path) {
1411
+ const normalized = normalizeFsPath(path);
1412
+ if (hidden.has(normalized)) {
1413
+ throw new FileNotFoundError(normalized);
1414
+ }
1415
+ return base.read(path);
1416
+ },
1417
+ async *grep(query) {
1418
+ for await (const hit of base.grep(query)) {
1419
+ if (visible(hit.path)) {
1420
+ yield hit;
1421
+ }
1422
+ }
1423
+ },
1424
+ async write(path) {
1425
+ throw new ReadOnlyMountError(normalizeFsPath(path));
1426
+ },
1427
+ async delete(path) {
1428
+ throw new ReadOnlyMountError(normalizeFsPath(path));
1429
+ },
1430
+ };
1431
+ }
1432
+ /**
1433
+ * `stat` reports `{ kind: "missing" }` for both a hole in a mount and
1434
+ * a path no mount owns. `read` is the verb that throws
1435
+ * `no mount for path` — reuse that so a child write cannot invent
1436
+ * a file outside the parent's root.
1437
+ */
1438
+ async function assertParentAddressable(parent, path) {
1439
+ const info = await parent.stat(path);
1440
+ if (info.kind !== "missing") {
1441
+ return;
1442
+ }
1443
+ try {
1444
+ await parent.read(path);
1445
+ }
1446
+ catch (error) {
1447
+ if (isFileNotFoundError(error)) {
1448
+ return;
1449
+ }
1450
+ throw error;
1451
+ }
1452
+ }
1453
+ /**
1454
+ * Writable child view over `parent`. Reads use `overlayFs` order:
1455
+ * a private `tempFs` scratch, then `parent`. Writes and deletes land
1456
+ * on that scratch. A delete of a parent file is a whiteout, so the
1457
+ * child stops seeing it. `parent` is never mutated.
1458
+ *
1459
+ * FileSystem has no shell. Callers that bind executors to this handle
1460
+ * omit shell.
1461
+ */
1462
+ export function childOverlayFs(parent) {
1463
+ const scratch = tempFs();
1464
+ const hidden = new Set();
1465
+ const view = overlayFs([scratch, hidePaths(parent, hidden)]);
1466
+ return {
1467
+ list: (prefix, options) => view.list(prefix, options),
1468
+ stat: (path) => view.stat(path),
1469
+ glob: (pattern, dir, options) => view.glob(pattern, dir, options),
1470
+ read: (path) => view.read(path),
1471
+ grep: (query) => view.grep(query),
1472
+ async write(path, contents) {
1473
+ const normalized = normalizeFsPath(path);
1474
+ await assertParentAddressable(parent, normalized);
1475
+ const existing = await view.stat(normalized);
1476
+ if (existing.kind === "directory") {
1477
+ throw new WriteFailedError(normalized, `path is a directory: ${normalized}`);
1478
+ }
1479
+ hidden.delete(normalized);
1480
+ await scratch.write(normalized, contents);
1481
+ },
1482
+ async delete(path) {
1483
+ const normalized = normalizeFsPath(path);
1484
+ await assertParentAddressable(parent, normalized);
1485
+ const info = await view.stat(normalized);
1486
+ if (info.kind !== "file") {
1487
+ throw new FileNotFoundError(normalized);
1488
+ }
1489
+ hidden.add(normalized);
1490
+ try {
1491
+ await scratch.delete(normalized);
1492
+ }
1493
+ catch (error) {
1494
+ if (!isFileNotFoundError(error)) {
1495
+ throw error;
1496
+ }
1497
+ }
1498
+ },
1499
+ };
1500
+ }
1501
+ function hostKey(path) {
1502
+ const normalized = normalizeFsPath(path);
1503
+ return normalized === "/" ? "" : normalized.slice(1);
1504
+ }
1505
+ function isHostConflict(error) {
1506
+ return (error instanceof FileConflictError ||
1507
+ (error instanceof Error &&
1508
+ (error.name === "FileConflictError" || error.message.includes("lost a race"))));
1509
+ }
1510
+ /**
1511
+ * `HostFilesApi` as a FileSystem rooted at `/`.
1512
+ *
1513
+ * Mount it with `unionFs({ "/host": hostFs(files, scope) })`. The
1514
+ * child never sees `/host` — `unionFs` owns the prefix. `scope` is
1515
+ * the HostFiles partition, not a path prefix.
1516
+ */
1517
+ export function hostFs(files, scope) {
1518
+ const callOptions = { scope };
1519
+ const readEtags = new Map();
1520
+ const listed = {
1521
+ async *list(prefix, options) {
1522
+ const entries = await files.list(undefined, callOptions);
1523
+ yield* listFilesFromPaths(entries.map((entry) => ({
1524
+ path: normalizeFsPath(entry.path),
1525
+ size: entry.size,
1526
+ })), prefix, options);
1527
+ },
1528
+ async stat(path) {
1529
+ const entries = await files.list(undefined, callOptions);
1530
+ return statFromFilePaths(entries.map((entry) => normalizeFsPath(entry.path)), path);
1531
+ },
1532
+ };
1533
+ const readText = async (inputPath) => {
1534
+ const path = normalizeFsPath(inputPath);
1535
+ const key = hostKey(path);
1536
+ if (key === "") {
1537
+ throw new FileNotFoundError(path);
1538
+ }
1539
+ const [content, stat] = await Promise.all([
1540
+ files.read(key, callOptions),
1541
+ files.stat(key, callOptions),
1542
+ ]);
1543
+ if (content === undefined) {
1544
+ throw new FileNotFoundError(path);
1545
+ }
1546
+ if (stat?.etag !== undefined) {
1547
+ readEtags.set(key, stat.etag);
1548
+ }
1549
+ return content;
1550
+ };
1551
+ const writeHost = async (inputPath, contents) => {
1552
+ const path = normalizeFsPath(inputPath);
1553
+ const key = hostKey(path);
1554
+ if (key === "") {
1555
+ throw new FileNotFoundError(path);
1556
+ }
1557
+ try {
1558
+ if (files.capabilities.conflictDetection) {
1559
+ const etag = readEtags.get(key);
1560
+ await files.write(key, contents, {
1561
+ ...callOptions,
1562
+ // No cached etag: unconditional create/overwrite. After a
1563
+ // successful read or write, CAS on that etag.
1564
+ ...(etag === undefined ? {} : { ifMatch: etag }),
1565
+ });
1566
+ }
1567
+ else {
1568
+ await files.write(key, contents, callOptions);
1569
+ }
1570
+ }
1571
+ catch (error) {
1572
+ if (isHostConflict(error)) {
1573
+ throw new PathError(path, `${path} changed since you read it — read it again and rewrite.`);
1574
+ }
1575
+ throw error;
1576
+ }
1577
+ const stat = await files.stat(key, callOptions);
1578
+ if (stat?.etag !== undefined) {
1579
+ readEtags.set(key, stat.etag);
1580
+ }
1581
+ else {
1582
+ readEtags.delete(key);
1583
+ }
1584
+ };
1585
+ return {
1586
+ list(prefix, options) {
1587
+ return listed.list(prefix, options);
1588
+ },
1589
+ async stat(path) {
1590
+ return listed.stat(path);
1591
+ },
1592
+ async read(path) {
1593
+ return readText(path);
1594
+ },
1595
+ async *grep(query) {
1596
+ yield* limitResults(uncapped(), query.maxResults);
1597
+ async function* uncapped() {
1598
+ const scopePath = query.path === undefined || query.path === "" ? "/" : normalizeFsPath(query.path);
1599
+ const regex = compileGrepPattern(query.pattern, query.caseInsensitive, scopePath);
1600
+ const info = await listed.stat(scopePath);
1601
+ if (scopePath !== "/" && info.kind === "file") {
1602
+ if (query.glob !== undefined &&
1603
+ !pathMatchesGlob(scopePath, scopePath, query.glob, {
1604
+ matchBasename: true,
1605
+ })) {
1606
+ return;
1607
+ }
1608
+ if (isExcludedPath(scopePath, query.excludes)) {
1609
+ return;
1610
+ }
1611
+ yield* grepFileContent({
1612
+ path: scopePath,
1613
+ content: await readText(scopePath),
1614
+ regex,
1615
+ });
1616
+ return;
1617
+ }
1618
+ for await (const entry of listed.list(scopePath === "/" ? undefined : scopePath, query.excludes === undefined ? undefined : { excludes: query.excludes })) {
1619
+ if (query.glob !== undefined &&
1620
+ !pathMatchesGlob(entry.path, scopePath, query.glob, {
1621
+ matchBasename: true,
1622
+ })) {
1623
+ continue;
1624
+ }
1625
+ yield* grepFileContent({
1626
+ path: entry.path,
1627
+ content: await readText(entry.path),
1628
+ regex,
1629
+ });
1630
+ }
1631
+ }
1632
+ },
1633
+ async *glob(pattern, dir, options) {
1634
+ const dirPath = dir === undefined || dir === "" ? "/" : normalizeFsPath(dir);
1635
+ yield* globFromList(listed.list(dirPath === "/" ? undefined : dirPath), {
1636
+ pattern,
1637
+ dir: dirPath,
1638
+ ...(options?.limit === undefined ? {} : { limit: options.limit }),
1639
+ });
1640
+ },
1641
+ async write(inputPath, contents) {
1642
+ await writeHost(inputPath, contents);
1643
+ },
1644
+ async delete(inputPath) {
1645
+ const path = normalizeFsPath(inputPath);
1646
+ const key = hostKey(path);
1647
+ if (key === "" || !(await files.exists(key, callOptions))) {
1648
+ throw new FileNotFoundError(path);
1649
+ }
1650
+ await files.remove(key, callOptions);
1651
+ readEtags.delete(key);
1652
+ },
1653
+ };
1654
+ }
1655
+ async function* globFromList(source, options) {
1656
+ yield* limitResults(uncapped(), options.limit);
1657
+ async function* uncapped() {
1658
+ for await (const entry of source) {
1659
+ if (pathMatchesGlob(entry.path, options.dir, options.pattern)) {
1660
+ yield entry;
1661
+ }
1662
+ }
1663
+ }
1664
+ }