eve 0.75.1 → 0.76.2

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 (720) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/src/_virtual/_rolldown/runtime.js +1 -1
  3. package/dist/src/acp/adapter.js +1 -1
  4. package/dist/src/channel/channel-address.d.ts +3 -1
  5. package/dist/src/channel/channel-address.js +1 -1
  6. package/dist/src/channel/session-stranded-error.d.ts +25 -0
  7. package/dist/src/channel/session-stranded-error.js +1 -0
  8. package/dist/src/channel/session.d.ts +13 -6
  9. package/dist/src/channel/task-card.js +1 -1
  10. package/dist/src/channel/tool-eligibility.d.ts +1 -2
  11. package/dist/src/channel/types.d.ts +29 -1
  12. package/dist/src/chunks/{use-eve-agent-DK_T88EP.js → use-eve-agent-BtKWTEpm.js} +99 -24
  13. package/dist/src/chunks/{use-eve-agent-B2Kne9z6.js → use-eve-agent-jI6EsYAu.js} +99 -24
  14. package/dist/src/cli/commands/registry-project.d.ts +10 -3
  15. package/dist/src/cli/commands/registry-project.js +2 -2
  16. package/dist/src/cli/commands/registry.js +1 -1
  17. package/dist/src/cli/dev/environment.d.ts +0 -6
  18. package/dist/src/cli/dev/environment.js +1 -1
  19. package/dist/src/cli/dev/tui/conversation-view.js +1 -1
  20. package/dist/src/cli/dev/tui/runner.js +3 -3
  21. package/dist/src/cli/dev/tui/stranded-session.d.ts +9 -0
  22. package/dist/src/cli/dev/tui/stranded-session.js +1 -0
  23. package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
  24. package/dist/src/cli/dev/tui/transcript.js +1 -1
  25. package/dist/src/client/client-error.d.ts +16 -0
  26. package/dist/src/client/client-error.js +1 -1
  27. package/dist/src/client/client.js +1 -1
  28. package/dist/src/client/index.d.ts +3 -2
  29. package/dist/src/client/index.js +1 -1
  30. package/dist/src/client/message-action-parts.d.ts +3 -0
  31. package/dist/src/client/message-action-parts.js +1 -1
  32. package/dist/src/client/message-reducer-types.d.ts +6 -1
  33. package/dist/src/client/message-reducer.js +1 -1
  34. package/dist/src/client/open-stream.d.ts +5 -3
  35. package/dist/src/client/open-stream.js +1 -1
  36. package/dist/src/client/session-controls.js +1 -1
  37. package/dist/src/client/session.js +1 -1
  38. package/dist/src/client/transcript-reducer.d.ts +46 -0
  39. package/dist/src/client/transcript-reducer.js +2 -0
  40. package/dist/src/compiled/.vendor-stamp.json +3 -2
  41. package/dist/src/compiled/@eve/catalog/index.js +1 -1
  42. package/dist/src/compiled/@vercel/queue/index.d.ts +1066 -0
  43. package/dist/src/compiled/@vercel/queue/index.js +47 -0
  44. package/dist/src/compiler/connection-ownership.d.ts +6 -0
  45. package/dist/src/compiler/connection-ownership.js +1 -0
  46. package/dist/src/compiler/default-tool-policy.d.ts +0 -3
  47. package/dist/src/compiler/default-tool-policy.js +1 -1
  48. package/dist/src/compiler/extension-compatibility.d.ts +23 -22
  49. package/dist/src/compiler/extension-compatibility.js +1 -1
  50. package/dist/src/compiler/manifest.d.ts +9 -6
  51. package/dist/src/compiler/manifest.js +1 -1
  52. package/dist/src/compiler/normalize-agent-config.js +1 -1
  53. package/dist/src/compiler/normalize-connection.js +1 -1
  54. package/dist/src/compiler/normalize-manifest.js +1 -1
  55. package/dist/src/compiler/normalize-skill.d.ts +5 -0
  56. package/dist/src/compiler/normalize-skill.js +1 -1
  57. package/dist/src/compiler/normalize-subagent.d.ts +2 -1
  58. package/dist/src/compiler/normalize-subagent.js +1 -1
  59. package/dist/src/compiler/normalize-tool.js +1 -1
  60. package/dist/src/compiler/remote-agent-node.d.ts +2 -1
  61. package/dist/src/compiler/remote-agent-node.js +1 -1
  62. package/dist/src/connections/ownership.d.ts +18 -0
  63. package/dist/src/connections/ownership.js +1 -0
  64. package/dist/src/context/accessors.d.ts +1 -1
  65. package/dist/src/context/build-callback-context.js +1 -1
  66. package/dist/src/context/build-dynamic-tools.d.ts +3 -9
  67. package/dist/src/context/build-dynamic-tools.js +1 -1
  68. package/dist/src/context/dynamic-connection-lifecycle.js +1 -1
  69. package/dist/src/context/dynamic-resolve-context.js +1 -1
  70. package/dist/src/context/dynamic-skill-lifecycle.d.ts +2 -11
  71. package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
  72. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  73. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  74. package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
  75. package/dist/src/context/keys.d.ts +10 -4
  76. package/dist/src/context/keys.js +1 -1
  77. package/dist/src/context/memory-tools.js +1 -1
  78. package/dist/src/context/providers/session.d.ts +1 -0
  79. package/dist/src/context/providers/session.js +1 -1
  80. package/dist/src/context/schedule-collection-tools.js +1 -1
  81. package/dist/src/context/session-context.d.ts +8 -2
  82. package/dist/src/discover/grammar.d.ts +11 -0
  83. package/dist/src/discover/grammar.js +1 -1
  84. package/dist/src/discover/manifest.d.ts +1 -0
  85. package/dist/src/discover/manifest.js +1 -1
  86. package/dist/src/discover/skills.d.ts +1 -0
  87. package/dist/src/discover/skills.js +1 -1
  88. package/dist/src/dynamic/definition.d.ts +14 -6
  89. package/dist/src/evals/assertions/collector.d.ts +4 -0
  90. package/dist/src/evals/assertions/collector.js +1 -1
  91. package/dist/src/evals/assertions/run.d.ts +2 -3
  92. package/dist/src/evals/assertions/run.js +2 -2
  93. package/dist/src/evals/assertions/scoped.js +1 -1
  94. package/dist/src/evals/index.d.ts +1 -1
  95. package/dist/src/evals/match.d.ts +9 -6
  96. package/dist/src/evals/reported-tool-name.d.ts +9 -0
  97. package/dist/src/evals/reported-tool-name.js +1 -0
  98. package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
  99. package/dist/src/evals/runner/derive-run-facts.js +1 -1
  100. package/dist/src/evals/runner/execute-task.js +1 -1
  101. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  102. package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.d.ts +11 -0
  103. package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.js +1 -0
  104. package/dist/src/evals/runner/reporters/datadog.js +2 -2
  105. package/dist/src/evals/session.js +2 -2
  106. package/dist/src/evals/target.d.ts +7 -0
  107. package/dist/src/evals/target.js +1 -1
  108. package/dist/src/evals/types.d.ts +19 -2
  109. package/dist/src/eve-channel/index.js +1 -1
  110. package/dist/src/eve-channel/request.js +2 -2
  111. package/dist/src/eve-channel/support.d.ts +2 -0
  112. package/dist/src/eve-channel/support.js +1 -1
  113. package/dist/src/execution/agent-sessions/remote.js +1 -1
  114. package/dist/src/execution/agent-sessions/steps.js +1 -1
  115. package/dist/src/execution/catalog/connection-auth.d.ts +41 -0
  116. package/dist/src/execution/catalog/connection-auth.js +1 -0
  117. package/dist/src/execution/catalog/connection-entry.d.ts +16 -0
  118. package/dist/src/execution/catalog/connection-entry.js +1 -0
  119. package/dist/src/execution/catalog/listing.d.ts +9 -0
  120. package/dist/src/execution/catalog/listing.js +3 -0
  121. package/dist/src/execution/catalog/rank.d.ts +44 -0
  122. package/dist/src/execution/catalog/rank.js +1 -0
  123. package/dist/src/execution/catalog/search.d.ts +28 -0
  124. package/dist/src/execution/catalog/search.js +1 -0
  125. package/dist/src/execution/catalog/signatures.d.ts +11 -0
  126. package/dist/src/execution/catalog/signatures.js +1 -0
  127. package/dist/src/execution/catalog/skills.d.ts +24 -0
  128. package/dist/src/execution/catalog/skills.js +1 -0
  129. package/dist/src/execution/catalog/step-catalog.d.ts +51 -0
  130. package/dist/src/execution/catalog/step-catalog.js +1 -0
  131. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  132. package/dist/src/execution/dynamic-connections.js +1 -1
  133. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  134. package/dist/src/execution/eve-workflow-attributes.d.ts +15 -0
  135. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  136. package/dist/src/execution/install-workflow-world.d.ts +7 -0
  137. package/dist/src/execution/install-workflow-world.js +1 -0
  138. package/dist/src/execution/invoke-tool.js +1 -1
  139. package/dist/src/execution/legacy-session/authorization.js +1 -1
  140. package/dist/src/execution/legacy-session/inbox.js +1 -1
  141. package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
  142. package/dist/src/execution/node-step.js +1 -1
  143. package/dist/src/execution/session/active-turn.d.ts +1 -1
  144. package/dist/src/execution/session/entry.js +1 -1
  145. package/dist/src/execution/session/handoff-steps.d.ts +11 -0
  146. package/dist/src/execution/session/handoff-steps.js +1 -1
  147. package/dist/src/execution/session/pending-turn-state.js +1 -1
  148. package/dist/src/execution/session/program.js +1 -1
  149. package/dist/src/execution/session/timeout-steps.js +1 -1
  150. package/dist/src/execution/session/turn-step.js +1 -1
  151. package/dist/src/execution/session/turn.d.ts +5 -5
  152. package/dist/src/execution/session/turn.js +1 -1
  153. package/dist/src/execution/session-event-stream.d.ts +6 -0
  154. package/dist/src/execution/session-event-stream.js +1 -1
  155. package/dist/src/execution/session-inbox/address.d.ts +4 -0
  156. package/dist/src/execution/session-inbox/address.js +1 -1
  157. package/dist/src/execution/session-inbox/end-stranded-session.d.ts +22 -0
  158. package/dist/src/execution/session-inbox/end-stranded-session.js +1 -0
  159. package/dist/src/execution/session-inbox/hook-release.d.ts +4 -0
  160. package/dist/src/execution/session-inbox/hook-release.js +1 -0
  161. package/dist/src/execution/session-inbox/owner.d.ts +48 -0
  162. package/dist/src/execution/session-inbox/owner.js +1 -0
  163. package/dist/src/execution/session-inbox/resume.d.ts +12 -0
  164. package/dist/src/execution/session-inbox/resume.js +1 -1
  165. package/dist/src/execution/session-inbox/runnable-owner.d.ts +13 -0
  166. package/dist/src/execution/session-inbox/runnable-owner.js +1 -0
  167. package/dist/src/execution/session-inbox/stranded-replay-guard.d.ts +16 -0
  168. package/dist/src/execution/session-inbox/stranded-replay-guard.js +1 -0
  169. package/dist/src/execution/session.js +1 -1
  170. package/dist/src/execution/skills/instructions.d.ts +20 -10
  171. package/dist/src/execution/skills/instructions.js +2 -2
  172. package/dist/src/execution/tasks/calls.d.ts +6 -5
  173. package/dist/src/execution/tasks/calls.js +1 -1
  174. package/dist/src/execution/tasks/model-step.d.ts +10 -10
  175. package/dist/src/execution/tasks/model-step.js +1 -1
  176. package/dist/src/execution/tasks/render.d.ts +3 -3
  177. package/dist/src/execution/tasks/render.js +3 -3
  178. package/dist/src/execution/tasks/session.d.ts +2 -1
  179. package/dist/src/execution/tasks/table.d.ts +1 -1
  180. package/dist/src/execution/tasks/tool-entry-point.d.ts +1 -1
  181. package/dist/src/execution/tool-auth.js +1 -1
  182. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  183. package/dist/src/execution/tools/workflow/harness-definition.js +1 -1
  184. package/dist/src/execution/workflow-runtime.d.ts +5 -1
  185. package/dist/src/execution/workflow-runtime.js +1 -1
  186. package/dist/src/extensions/code/extension/extension.d.ts +4 -18
  187. package/dist/src/extensions/code/extension/instructions/github.d.ts +3 -0
  188. package/dist/src/extensions/code/extension/instructions/github.js +1 -0
  189. package/dist/src/extensions/code/extension/instructions.md +1 -13
  190. package/dist/src/extensions/code/extension/lib/diagnostics.d.ts +4 -2
  191. package/dist/src/extensions/code/extension/lib/diagnostics.js +3 -3
  192. package/dist/src/extensions/code/extension/lib/github-compat.d.ts +28 -0
  193. package/dist/src/extensions/code/extension/lib/github-compat.js +1 -0
  194. package/dist/src/extensions/code/extension/lib/grep-search.d.ts +3 -13
  195. package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
  196. package/dist/src/extensions/code/extension/lib/patch.d.ts +8 -2
  197. package/dist/src/extensions/code/extension/lib/patch.js +4 -4
  198. package/dist/src/extensions/code/extension/lib/repository-root.d.ts +3 -4
  199. package/dist/src/extensions/code/extension/lib/repository-root.js +1 -1
  200. package/dist/src/extensions/code/extension/lib/sandbox.d.ts +2 -1
  201. package/dist/src/extensions/code/extension/lib/sandbox.js +1 -1
  202. package/dist/src/extensions/code/extension/lib/tooling.d.ts +4 -4
  203. package/dist/src/extensions/code/extension/lib/tooling.js +7 -7
  204. package/dist/src/extensions/code/extension/lib/workspace-root.d.ts +31 -0
  205. package/dist/src/extensions/code/extension/lib/workspace-root.js +1 -0
  206. package/dist/src/extensions/code/extension/skills/pr.d.ts +6 -0
  207. package/dist/src/extensions/code/extension/skills/pr.js +1 -0
  208. package/dist/src/extensions/code/extension/tools/apply_patch.d.ts +2 -2
  209. package/dist/src/extensions/code/extension/tools/apply_patch.js +2 -2
  210. package/dist/src/extensions/code/extension/tools/gh.d.ts +4 -3
  211. package/dist/src/extensions/code/extension/tools/gh.js +1 -1
  212. package/dist/src/extensions/code/extension/tools/grep.js +1 -1
  213. package/dist/src/extensions/code/tools.d.ts +2 -1
  214. package/dist/src/extensions/code/tools.js +1 -1
  215. package/dist/src/extensions/git/extension/extension.d.ts +12 -0
  216. package/dist/src/extensions/git/extension/extension.js +1 -0
  217. package/dist/src/extensions/git/extension/instructions/github.d.ts +2 -0
  218. package/dist/src/extensions/git/extension/instructions/github.js +1 -0
  219. package/dist/src/extensions/git/extension/lib/gh-tool.d.ts +29 -0
  220. package/dist/src/extensions/git/extension/lib/gh-tool.js +1 -0
  221. package/dist/src/extensions/git/extension/lib/github-guidance.d.ts +3 -0
  222. package/dist/src/extensions/git/extension/lib/github-guidance.js +49 -0
  223. package/dist/src/extensions/{code → git}/extension/lib/github-shell.d.ts +1 -1
  224. package/dist/src/extensions/git/extension/lib/github-shell.js +1 -0
  225. package/dist/src/extensions/git/extension/lib/repository-root.d.ts +5 -0
  226. package/dist/src/extensions/git/extension/lib/repository-root.js +1 -0
  227. package/dist/src/extensions/git/extension/lib/sandbox.d.ts +6 -0
  228. package/dist/src/extensions/git/extension/lib/sandbox.js +1 -0
  229. package/dist/src/extensions/git/extension/lib/shell.d.ts +1 -0
  230. package/dist/src/extensions/git/extension/lib/shell.js +1 -0
  231. package/dist/src/extensions/git/extension/lib/tooling.d.ts +4 -0
  232. package/dist/src/extensions/git/extension/lib/tooling.js +1 -0
  233. package/dist/src/extensions/git/extension/skills/pr.d.ts +5 -0
  234. package/dist/src/extensions/git/extension/skills/pr.js +1 -0
  235. package/dist/src/extensions/git/extension/tools/gh.d.ts +28 -0
  236. package/dist/src/extensions/git/extension/tools/gh.js +1 -0
  237. package/dist/src/extensions/git/tools.d.ts +27 -0
  238. package/dist/src/extensions/git/tools.js +1 -0
  239. package/dist/src/framework/sources/registry.js +1 -1
  240. package/dist/src/harness/action-presentation.d.ts +2 -2
  241. package/dist/src/harness/action-result-helpers.d.ts +10 -2
  242. package/dist/src/harness/action-result-helpers.js +1 -1
  243. package/dist/src/harness/announcements.d.ts +2 -8
  244. package/dist/src/harness/announcements.js +1 -1
  245. package/dist/src/harness/compaction/step.js +1 -1
  246. package/dist/src/harness/coordination.d.ts +11 -11
  247. package/dist/src/harness/coordination.js +1 -1
  248. package/dist/src/harness/current-messages.d.ts +1 -5
  249. package/dist/src/harness/current-messages.js +1 -1
  250. package/dist/src/harness/emission.d.ts +2 -2
  251. package/dist/src/harness/emission.js +1 -1
  252. package/dist/src/harness/execute-call.d.ts +48 -0
  253. package/dist/src/harness/execute-call.js +1 -0
  254. package/dist/src/harness/execute-tool.d.ts +3 -1
  255. package/dist/src/harness/final-output.d.ts +2 -6
  256. package/dist/src/harness/final-output.js +1 -1
  257. package/dist/src/harness/hitl/approvals.d.ts +5 -0
  258. package/dist/src/harness/hitl/approvals.js +1 -1
  259. package/dist/src/harness/hitl/approved-calls.d.ts +3 -2
  260. package/dist/src/harness/hitl/approved-calls.js +1 -1
  261. package/dist/src/harness/hitl/candidates.d.ts +13 -2
  262. package/dist/src/harness/hitl/candidates.js +1 -1
  263. package/dist/src/harness/hitl/coordinator.d.ts +3 -3
  264. package/dist/src/harness/hitl/coordinator.js +1 -1
  265. package/dist/src/harness/hitl/index.d.ts +6 -4
  266. package/dist/src/harness/hitl/index.js +1 -1
  267. package/dist/src/harness/hitl/intake.d.ts +3 -3
  268. package/dist/src/harness/hitl/intake.js +1 -1
  269. package/dist/src/harness/input-extraction.d.ts +4 -1
  270. package/dist/src/harness/input-extraction.js +1 -1
  271. package/dist/src/harness/input-request-resolution.d.ts +15 -0
  272. package/dist/src/harness/input-request-resolution.js +1 -1
  273. package/dist/src/harness/model-call/call.d.ts +4 -6
  274. package/dist/src/harness/model-call/call.js +1 -1
  275. package/dist/src/harness/model-call/errors.d.ts +5 -6
  276. package/dist/src/harness/model-call/errors.js +1 -1
  277. package/dist/src/harness/model-call/recovery.d.ts +4 -3
  278. package/dist/src/harness/model-call/request.d.ts +5 -3
  279. package/dist/src/harness/model-call/request.js +1 -1
  280. package/dist/src/harness/model-call/response.d.ts +2 -1
  281. package/dist/src/harness/model-call/response.js +1 -1
  282. package/dist/src/harness/model-call/run.d.ts +5 -3
  283. package/dist/src/harness/model-call/run.js +1 -1
  284. package/dist/src/harness/model-call/tools.d.ts +12 -21
  285. package/dist/src/harness/model-call/tools.js +1 -1
  286. package/dist/src/harness/model-profile.d.ts +15 -3
  287. package/dist/src/harness/model-profile.js +1 -1
  288. package/dist/src/harness/prompt-cache.d.ts +6 -3
  289. package/dist/src/harness/prompt-cache.js +1 -1
  290. package/dist/src/harness/provider-safety.d.ts +2 -1
  291. package/dist/src/harness/provider-safety.js +1 -1
  292. package/dist/src/harness/provider-tools.d.ts +7 -6
  293. package/dist/src/harness/provider-tools.js +1 -1
  294. package/dist/src/harness/session-machine/commit.js +1 -1
  295. package/dist/src/harness/session-machine/transitions.d.ts +8 -3
  296. package/dist/src/harness/session-machine/transitions.js +1 -1
  297. package/dist/src/harness/step/after-model.js +1 -1
  298. package/dist/src/harness/step/context.js +1 -1
  299. package/dist/src/harness/step-hooks.d.ts +4 -6
  300. package/dist/src/harness/step-hooks.js +1 -1
  301. package/dist/src/harness/tool-call-input-errors.d.ts +2 -2
  302. package/dist/src/harness/tool-call-io.d.ts +3 -0
  303. package/dist/src/harness/tool-call-io.js +1 -1
  304. package/dist/src/harness/tools.d.ts +22 -19
  305. package/dist/src/harness/tools.js +1 -1
  306. package/dist/src/harness/types.d.ts +14 -0
  307. package/dist/src/instrumentation/lifecycle.d.ts +0 -1
  308. package/dist/src/instrumentation/native-events.js +1 -1
  309. package/dist/src/instrumentation/runtime.d.ts +2 -1
  310. package/dist/src/internal/application/compiled-artifacts.js +4 -4
  311. package/dist/src/internal/application/package.d.ts +1 -1
  312. package/dist/src/internal/application/package.js +1 -1
  313. package/dist/src/internal/application/stamped-package-version.d.ts +5 -0
  314. package/dist/src/internal/application/stamped-package-version.js +1 -0
  315. package/dist/src/internal/authored-definition/core.d.ts +3 -0
  316. package/dist/src/internal/authored-definition/core.js +1 -1
  317. package/dist/src/internal/authored-definition/schedule-collection.js +1 -1
  318. package/dist/src/internal/authored-definition/schema-backed.d.ts +2 -2
  319. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  320. package/dist/src/internal/authored-module.d.ts +2 -1
  321. package/dist/src/internal/authored-module.js +1 -1
  322. package/dist/src/internal/helpers/markdown.js +1 -1
  323. package/dist/src/internal/mcp/skills.js +1 -1
  324. package/dist/src/internal/model-auth/available-models.js +1 -1
  325. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  326. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  327. package/dist/src/internal/nitro/host/local-schedules-runtime-plugin.d.ts +5 -0
  328. package/dist/src/internal/nitro/host/local-schedules-runtime-plugin.js +1 -0
  329. package/dist/src/internal/nitro/routes/schedule-collection-consumer.d.ts +6 -0
  330. package/dist/src/internal/nitro/routes/schedule-collection-consumer.js +1 -1
  331. package/dist/src/internal/schedules/consumer-route.d.ts +2 -0
  332. package/dist/src/internal/schedules/consumer-route.js +1 -1
  333. package/dist/src/internal/schedules/dev-environment.d.ts +2 -0
  334. package/dist/src/internal/schedules/dev-environment.js +1 -0
  335. package/dist/src/internal/vercel-agent-summary.d.ts +2 -2
  336. package/dist/src/internal/workflow/development-run-unavailable-error.d.ts +15 -0
  337. package/dist/src/internal/workflow/development-run-unavailable-error.js +1 -0
  338. package/dist/src/internal/workflow/development-world-server.js +1 -1
  339. package/dist/src/internal/workflow/vercel-world-defaults.d.ts +1 -1
  340. package/dist/src/internal/workflow/vercel-world-defaults.js +1 -1
  341. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  342. package/dist/src/protocol/catalog-tools.d.ts +12 -0
  343. package/dist/src/protocol/catalog-tools.js +1 -0
  344. package/dist/src/protocol/message-version.js +1 -1
  345. package/dist/src/protocol/message.d.ts +15 -1
  346. package/dist/src/protocol/message.js +1 -1
  347. package/dist/src/protocol/remote-agent-protocol.d.ts +2 -0
  348. package/dist/src/protocol/remote-agent-protocol.js +1 -1
  349. package/dist/src/protocol/reply-tool.d.ts +2 -0
  350. package/dist/src/protocol/reply-tool.js +1 -0
  351. package/dist/src/protocol/runtime-tools.d.ts +6 -0
  352. package/dist/src/protocol/runtime-tools.js +1 -0
  353. package/dist/src/protocol/session-projection.js +1 -1
  354. package/dist/src/protocol/task-tools.d.ts +4 -4
  355. package/dist/src/protocol/task-tools.js +1 -1
  356. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
  357. package/dist/src/public/channels/index.d.ts +1 -1
  358. package/dist/src/public/channels/index.js +1 -1
  359. package/dist/src/public/channels/linear/defaults.js +2 -2
  360. package/dist/src/public/channels/slack/action-status.d.ts +0 -9
  361. package/dist/src/public/channels/slack/action-status.js +1 -1
  362. package/dist/src/public/channels/slack/defaults.js +2 -2
  363. package/dist/src/public/channels/slack/task-card.d.ts +1 -1
  364. package/dist/src/public/context/index.d.ts +1 -1
  365. package/dist/src/public/definitions/callback-context.d.ts +1 -1
  366. package/dist/src/public/definitions/channel.d.ts +1 -0
  367. package/dist/src/public/definitions/channel.js +1 -1
  368. package/dist/src/public/definitions/connections/mcp.d.ts +4 -4
  369. package/dist/src/public/definitions/connections/openapi.d.ts +6 -7
  370. package/dist/src/public/definitions/remote-agent.d.ts +6 -3
  371. package/dist/src/public/definitions/workspace-agent.d.ts +6 -3
  372. package/dist/src/public/experimental/schedules/index.d.ts +1 -1
  373. package/dist/src/public/models/openai/chatgpt/model.js +1 -1
  374. package/dist/src/public/models/openai/chatgpt/transport.js +1 -1
  375. package/dist/src/public/schedules/providers/in-memory.js +1 -1
  376. package/dist/src/public/schedules/providers/vercel.js +1 -1
  377. package/dist/src/public/schedules/subscription.d.ts +36 -16
  378. package/dist/src/public/tanstack/index.d.ts +40 -0
  379. package/dist/src/public/tanstack/index.js +1 -0
  380. package/dist/src/public/tools/web-search.d.ts +1 -1
  381. package/dist/src/runtime/agent/bootstrap.d.ts +2 -1
  382. package/dist/src/runtime/agent/bootstrap.js +1 -1
  383. package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
  384. package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
  385. package/dist/src/runtime/agent/mock-model-skill-selection.d.ts +2 -0
  386. package/dist/src/runtime/agent/mock-model-skill-selection.js +2 -2
  387. package/dist/src/runtime/agent/mock-structured-output.d.ts +1 -1
  388. package/dist/src/runtime/agent/resolve-model.js +1 -1
  389. package/dist/src/runtime/connections/mcp-client.js +1 -1
  390. package/dist/src/runtime/connections/registry.js +1 -1
  391. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  392. package/dist/src/runtime/connections/tool-result.d.ts +2 -2
  393. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  394. package/dist/src/runtime/resolve-agent.js +1 -1
  395. package/dist/src/runtime/resolve-tool.js +1 -1
  396. package/dist/src/runtime/schedules/collection-client.d.ts +12 -3
  397. package/dist/src/runtime/schedules/collection-client.js +1 -1
  398. package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +2 -2
  399. package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +2 -1
  400. package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
  401. package/dist/src/runtime/subagents/registry.d.ts +2 -1
  402. package/dist/src/runtime/subagents/registry.js +1 -1
  403. package/dist/src/runtime/tools/registry.d.ts +2 -0
  404. package/dist/src/runtime/tools/registry.js +1 -1
  405. package/dist/src/runtime/types.d.ts +3 -3
  406. package/dist/src/setup/connection-connector.js +1 -2
  407. package/dist/src/setup/flows/model-login.js +1 -1
  408. package/dist/src/setup/index.d.ts +1 -1
  409. package/dist/src/setup/index.js +1 -1
  410. package/dist/src/setup/integrations/slack/setup.d.ts +23 -3
  411. package/dist/src/setup/integrations/slack/setup.js +1 -1
  412. package/dist/src/setup/integrations/web/framework.d.ts +8 -0
  413. package/dist/src/setup/integrations/web/framework.js +1 -0
  414. package/dist/src/setup/integrations/web/hosting.d.ts +43 -0
  415. package/dist/src/setup/integrations/web/hosting.js +15 -0
  416. package/dist/src/setup/integrations/web/setup.d.ts +6 -10
  417. package/dist/src/setup/integrations/web/setup.js +23 -17
  418. package/dist/src/setup/primitives/process-output.d.ts +5 -0
  419. package/dist/src/setup/primitives/process-output.js +2 -1
  420. package/dist/src/setup/scaffold/create/project.js +1 -1
  421. package/dist/src/setup/scaffold/create/web-template.d.ts +7 -3
  422. package/dist/src/setup/scaffold/create/web-template.js +40 -3
  423. package/dist/src/setup/scaffold/update/channels.js +1 -1
  424. package/dist/src/setup/scaffold/update/update-slack-channel.d.ts +17 -0
  425. package/dist/src/setup/scaffold/update/update-slack-channel.js +1 -1
  426. package/dist/src/setup/slack-connect-create.d.ts +10 -2
  427. package/dist/src/setup/slack-connect-create.js +1 -1
  428. package/dist/src/setup/slack-connect-lifecycle.d.ts +92 -44
  429. package/dist/src/setup/slack-connect-lifecycle.js +1 -1
  430. package/dist/src/setup/slack-connect.d.ts +30 -11
  431. package/dist/src/setup/slack-connect.js +1 -1
  432. package/dist/src/setup/slack-setup-plan.d.ts +72 -0
  433. package/dist/src/setup/slack-setup-plan.js +1 -0
  434. package/dist/src/setup/slackbot.d.ts +75 -35
  435. package/dist/src/setup/slackbot.js +2 -1
  436. package/dist/src/setup/vercel-project-framework.js +1 -1
  437. package/dist/src/shared/action-label.d.ts +10 -0
  438. package/dist/src/shared/action-label.js +1 -0
  439. package/dist/src/shared/action-request-name.d.ts +3 -1
  440. package/dist/src/shared/action-request-name.js +1 -1
  441. package/dist/src/shared/action-types.d.ts +7 -8
  442. package/dist/src/shared/action-types.js +1 -1
  443. package/dist/src/shared/agent-definition.d.ts +36 -3
  444. package/dist/src/shared/agent-definition.js +1 -1
  445. package/dist/src/shared/chatgpt-model.d.ts +8 -0
  446. package/dist/src/shared/chatgpt-model.js +1 -1
  447. package/dist/src/shared/development-env-files.d.ts +4 -0
  448. package/dist/src/shared/development-env-files.js +1 -0
  449. package/dist/src/shared/input.d.ts +0 -1
  450. package/dist/src/shared/map-with-concurrency.d.ts +2 -0
  451. package/dist/src/shared/map-with-concurrency.js +1 -0
  452. package/dist/src/shared/skill-definition.d.ts +6 -0
  453. package/dist/src/shared/skill-package.d.ts +1 -0
  454. package/dist/src/shared/skill-package.js +1 -1
  455. package/dist/src/shared/web-search.d.ts +15 -2
  456. package/dist/src/shared/web-search.js +1 -1
  457. package/dist/src/subagents/callback-route.js +1 -1
  458. package/dist/src/svelte/index.js +1 -1
  459. package/dist/src/svelte/use-eve-agent.js +1 -1
  460. package/dist/src/tool-stubs/execute.d.ts +0 -3
  461. package/dist/src/tool-stubs/execute.js +1 -1
  462. package/dist/src/tool-stubs/rules.js +1 -1
  463. package/dist/src/tool-stubs/validate-targets.js +1 -1
  464. package/dist/src/tools/behavior.d.ts +3 -6
  465. package/dist/src/tools/definition.d.ts +5 -0
  466. package/dist/src/tools/dynamic.d.ts +5 -2
  467. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  468. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  469. package/dist/src/tools/provided/task-cancel.d.ts +1 -1
  470. package/dist/src/tools/provided/task-wait.d.ts +1 -1
  471. package/dist/src/tools/provided/web-search.d.ts +20 -7
  472. package/dist/src/tools/provided/web-search.js +1 -1
  473. package/dist/src/tools/schema.d.ts +5 -0
  474. package/dist/src/tools/schema.js +1 -1
  475. package/dist/src/{runtime/connections/tool-signature.d.ts → tools/signature.d.ts} +2 -2
  476. package/dist/src/tools/workflow-definition.d.ts +1 -1
  477. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  478. package/dist/src/tracing/agent-otel-provider.js +2 -2
  479. package/dist/src/tracing/agent-otel-runtime-context.d.ts +1 -0
  480. package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
  481. package/dist/src/tracing/agent-otel-turn-state.d.ts +6 -0
  482. package/dist/src/tracing/agent-otel-turn-state.js +1 -0
  483. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  484. package/dist/src/tracing/agent-trace-context-codec.js +1 -1
  485. package/dist/src/tracing/agent-trace-state.d.ts +4 -1
  486. package/dist/src/vue/index.js +1 -1
  487. package/dist/src/vue/use-eve-agent.js +1 -1
  488. package/docs/agent-config.md +39 -8
  489. package/docs/channels/chat-sdk.mdx +1 -1
  490. package/docs/channels/custom.mdx +26 -0
  491. package/docs/channels/eve.mdx +8 -5
  492. package/docs/channels/slack.mdx +32 -82
  493. package/docs/code-extension.mdx +28 -7
  494. package/docs/concepts/built-in-tools.md +60 -43
  495. package/docs/concepts/context-control.md +1 -1
  496. package/docs/concepts/execution-model-and-durability.mdx +101 -1
  497. package/docs/concepts/project-structure.mdx +2 -2
  498. package/docs/concepts/sessions-runs-and-streaming.md +40 -38
  499. package/docs/connections/mcp.mdx +5 -5
  500. package/docs/connections/openapi.mdx +1 -1
  501. package/docs/connections/overview.mdx +4 -2
  502. package/docs/evals/assertions.mdx +5 -3
  503. package/docs/evals/reporters.mdx +3 -1
  504. package/docs/evals/tool-stubs.mdx +3 -1
  505. package/docs/extensions.md +2 -0
  506. package/docs/guides/client/messages.mdx +10 -1
  507. package/docs/guides/deployment/overview.md +2 -2
  508. package/docs/guides/dev-tui.md +4 -2
  509. package/docs/guides/dynamic-capabilities.md +14 -4
  510. package/docs/guides/frontend/meta.json +9 -1
  511. package/docs/guides/frontend/nextjs.mdx +1 -1
  512. package/docs/guides/frontend/overview.mdx +10 -9
  513. package/docs/guides/frontend/tanstack.mdx +201 -0
  514. package/docs/guides/remote-agents.md +10 -3
  515. package/docs/guides/session-context.md +1 -0
  516. package/docs/install-integrations.mdx +1 -1
  517. package/docs/instructions.mdx +6 -6
  518. package/docs/reference/cli.md +2 -2
  519. package/docs/reference/typescript-api.md +4 -4
  520. package/docs/skills.mdx +19 -4
  521. package/docs/subagents/index.mdx +5 -3
  522. package/docs/tools/human-in-the-loop.md +2 -0
  523. package/docs/tools/overview.mdx +22 -1
  524. package/docs/tools/tasks-upgrade.md +1 -1
  525. package/docs/tools/tasks.md +32 -32
  526. package/docs/tools/workflows.mdx +6 -6
  527. package/docs/tutorial/ship-it.mdx +1 -1
  528. package/docs/tutorial/team-playbooks.mdx +2 -2
  529. package/package.json +28 -6
  530. package/dist/src/execution/connection-announcement.d.ts +0 -7
  531. package/dist/src/execution/connection-announcement.js +0 -4
  532. package/dist/src/execution/tools/connection-approval.d.ts +0 -25
  533. package/dist/src/execution/tools/connection-approval.js +0 -1
  534. package/dist/src/execution/tools/connection-search-rank.d.ts +0 -21
  535. package/dist/src/execution/tools/connection-search-rank.js +0 -1
  536. package/dist/src/execution/tools/connection-target.d.ts +0 -18
  537. package/dist/src/execution/tools/connection-target.js +0 -1
  538. package/dist/src/execution/tools/connection-tools.d.ts +0 -4
  539. package/dist/src/execution/tools/connection-tools.js +0 -2
  540. package/dist/src/execution/tools/load-skill.d.ts +0 -10
  541. package/dist/src/execution/tools/load-skill.js +0 -1
  542. package/dist/src/extensions/code/extension/lib/github-shell.js +0 -1
  543. package/dist/src/extensions/code/extension/skills/pr/SKILL.md +0 -53
  544. package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.d.ts +0 -2
  545. package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.js +0 -1
  546. package/dist/src/harness/advertised-tools.d.ts +0 -26
  547. package/dist/src/harness/advertised-tools.js +0 -1
  548. package/dist/src/harness/nested-actions.d.ts +0 -23
  549. package/dist/src/harness/nested-actions.js +0 -1
  550. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/cli-config.js +0 -1
  551. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/cred-storage.js +0 -1
  552. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/index.js +0 -1
  553. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/schema.js +0 -1
  554. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/schema.zod.js +0 -1
  555. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/types.js +0 -1
  556. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
  557. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
  558. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
  559. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
  560. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
  561. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/index.js +0 -1
  562. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
  563. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
  564. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
  565. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
  566. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-context.js +0 -1
  567. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
  568. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
  569. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/index.js +0 -1
  570. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/oauth.js +0 -1
  571. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-error.js +0 -1
  572. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-io.js +0 -1
  573. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-util.js +0 -2
  574. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token.js +0 -1
  575. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
  576. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/version.js +0 -1
  577. package/dist/src/node_modules/.pnpm/@vercel_queue@0.5.1_@opentelemetry_api@1.9.1/node_modules/@vercel/queue/dist/index.js +0 -36
  578. package/dist/src/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js +0 -1
  579. package/dist/src/node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/esm/index.js +0 -1
  580. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
  581. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
  582. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
  583. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
  584. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
  585. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
  586. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
  587. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
  588. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
  589. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
  590. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
  591. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
  592. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
  593. package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
  594. package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
  595. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
  596. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
  597. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
  598. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
  599. package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
  600. package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
  601. package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
  602. package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
  603. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
  604. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
  605. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
  606. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
  607. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
  608. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
  609. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
  610. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
  611. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
  612. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
  613. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
  614. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
  615. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
  616. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
  617. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
  618. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
  619. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
  620. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
  621. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
  622. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
  623. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
  624. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
  625. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
  626. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
  627. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
  628. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
  629. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
  630. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
  631. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
  632. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
  633. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
  634. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
  635. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
  636. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
  637. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
  638. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
  639. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
  640. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
  641. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
  642. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
  643. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
  644. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
  645. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
  646. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
  647. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
  648. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
  649. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
  650. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
  651. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
  652. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
  653. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
  654. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
  655. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
  656. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
  657. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
  658. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
  659. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
  660. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
  661. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
  662. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
  663. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
  664. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
  665. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
  666. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
  667. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
  668. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
  669. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
  670. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
  671. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
  672. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
  673. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
  674. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
  675. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
  676. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
  677. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
  678. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
  679. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
  680. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
  681. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
  682. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
  683. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
  684. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
  685. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
  686. package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
  687. package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
  688. package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -1
  689. package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/ast.js +0 -1
  690. package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js +0 -1
  691. package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/escape.js +0 -1
  692. package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js +0 -1
  693. package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/unescape.js +0 -1
  694. package/dist/src/node_modules/.pnpm/mixpart@0.0.6/node_modules/mixpart/dist/index.js +0 -7
  695. package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
  696. package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
  697. package/dist/src/node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js +0 -1
  698. package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
  699. package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
  700. package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
  701. package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
  702. package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
  703. package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
  704. package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
  705. package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
  706. package/dist/src/node_modules/.pnpm/xdg-app-paths@5.5.1/node_modules/xdg-app-paths/src/lib/index.js +0 -1
  707. package/dist/src/node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js +0 -1
  708. package/dist/src/public/tools/load-skill.d.ts +0 -3
  709. package/dist/src/public/tools/load-skill.js +0 -1
  710. package/dist/src/runtime/skills/fragment-context.d.ts +0 -4
  711. package/dist/src/runtime/skills/fragment-context.js +0 -1
  712. package/dist/src/tools/framework/connection-tools.d.ts +0 -3
  713. package/dist/src/tools/framework/connection-tools.js +0 -1
  714. package/dist/src/tools/provided/load-skill.d.ts +0 -2
  715. package/dist/src/tools/provided/load-skill.js +0 -1
  716. /package/dist/src/extensions/{code → git}/extension/lib/github-shell-schema.d.ts +0 -0
  717. /package/dist/src/extensions/{code → git}/extension/lib/github-shell-schema.js +0 -0
  718. /package/dist/src/extensions/{code → git}/extension/lib/signed-commit.d.ts +0 -0
  719. /package/dist/src/extensions/{code → git}/extension/lib/signed-commit.js +0 -0
  720. /package/dist/src/{runtime/connections/tool-signature.js → tools/signature.js} +0 -0
@@ -0,0 +1,1066 @@
1
+ /**
2
+ * Serializer/Deserializer interface for message payloads.
3
+ *
4
+ * Built-in implementations:
5
+ * - `JsonTransport` - JSON serialization (default, buffers entire payload)
6
+ * - `BufferTransport` - Binary data (buffers entire payload)
7
+ * - `StreamTransport` - Pass-through streaming (no buffering, ideal for large payloads)
8
+ */
9
+ interface Transport<T = unknown> {
10
+ /**
11
+ * Serialize a value to a buffer or stream for transmission.
12
+ * The result is sent as the request body with the `contentType` header.
13
+ */
14
+ serialize(value: T): Buffer | ReadableStream<Uint8Array>;
15
+ /**
16
+ * Deserialize a readable stream back to the original value.
17
+ * Called when receiving messages from the queue.
18
+ */
19
+ deserialize(stream: ReadableStream<Uint8Array>): Promise<T>;
20
+ /**
21
+ * Optional cleanup method for deserialized payloads that may contain resources.
22
+ * Called automatically by ConsumerGroup on error; manual cleanup required for direct client usage.
23
+ * @param payload The deserialized payload to clean up
24
+ */
25
+ finalize?(payload: T): Promise<void>;
26
+ /**
27
+ * MIME type for this serialization format.
28
+ * Sent as the Content-Type header when publishing messages.
29
+ */
30
+ contentType: string;
31
+ }
32
+ /**
33
+ * JSON serializer/deserializer (default transport).
34
+ *
35
+ * Ideal for structured data. Buffers the entire payload in memory for parsing.
36
+ *
37
+ * @example
38
+ * ```typescript
39
+ * // Default (JsonTransport is used automatically)
40
+ * const queue = new QueueClient();
41
+ * await queue.send("topic", { data: "example" });
42
+ *
43
+ * // With custom serialization
44
+ * const queue = new QueueClient({
45
+ * transport: new JsonTransport({
46
+ * replacer: (key, value) => key === "password" ? undefined : value,
47
+ * reviver: (key, value) => key === "date" ? new Date(value) : value,
48
+ * }),
49
+ * });
50
+ * await queue.send("topic", { data: "example" });
51
+ * ```
52
+ */
53
+ declare class JsonTransport<T = unknown> implements Transport<T> {
54
+ readonly contentType = "application/json";
55
+ readonly replacer?: Parameters<typeof JSON.stringify>[1];
56
+ readonly reviver?: Parameters<typeof JSON.parse>[1];
57
+ /**
58
+ * Create a new JsonTransport.
59
+ * @param options - Optional JSON serialization options
60
+ * @param options.replacer - Custom replacer for JSON.stringify
61
+ * @param options.reviver - Custom reviver for JSON.parse
62
+ */
63
+ constructor(options?: {
64
+ replacer?: Parameters<typeof JSON.stringify>[1];
65
+ reviver?: Parameters<typeof JSON.parse>[1];
66
+ });
67
+ serialize(value: T): Buffer;
68
+ deserialize(stream: ReadableStream<Uint8Array>): Promise<T>;
69
+ }
70
+ /**
71
+ * Binary data serializer/deserializer.
72
+ *
73
+ * Ideal for binary data that fits in memory. Buffers the entire payload.
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * const queue = new QueueClient({ transport: new BufferTransport() });
78
+ * await queue.send("binary-topic", myBuffer);
79
+ * ```
80
+ */
81
+ declare class BufferTransport implements Transport<Buffer> {
82
+ readonly contentType = "application/octet-stream";
83
+ serialize(value: Buffer): Buffer;
84
+ deserialize(stream: ReadableStream<Uint8Array>): Promise<Buffer>;
85
+ }
86
+ /**
87
+ * Pass-through stream serializer/deserializer.
88
+ *
89
+ * Ideal for large files and real-time streams. Does not buffer data in memory.
90
+ *
91
+ * **Important:** When using StreamTransport, you must call `finalize(payload)` when done
92
+ * processing to prevent resource leaks. ConsumerGroup handles this automatically;
93
+ * direct client usage requires manual cleanup.
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * // Sending a stream
98
+ * const queue = new QueueClient({ transport: new StreamTransport() });
99
+ * await queue.send("large-file", myReadableStream);
100
+ *
101
+ * // Receiving - cleanup handled automatically
102
+ * const poller = new PollingQueueClient({ region: "iad1", transport: new StreamTransport() });
103
+ * await poller.receive("large-file", "processor", async (stream, meta) => {
104
+ * const reader = stream.getReader();
105
+ * // Process chunks...
106
+ * });
107
+ * ```
108
+ */
109
+ declare class StreamTransport implements Transport<ReadableStream<Uint8Array>> {
110
+ readonly contentType = "application/octet-stream";
111
+ serialize(value: ReadableStream<Uint8Array>): ReadableStream<Uint8Array>;
112
+ deserialize(stream: ReadableStream<Uint8Array>): Promise<ReadableStream<Uint8Array>>;
113
+ /**
114
+ * Consume any remaining stream data to prevent resource leaks.
115
+ * Called automatically by ConsumerGroup; manual call required for direct client usage.
116
+ */
117
+ finalize(payload: ReadableStream<Uint8Array>): Promise<void>;
118
+ }
119
+
120
+ /**
121
+ * Vercel Queue Service client types
122
+ */
123
+
124
+ /**
125
+ * Minimal structural stand-ins for the `@opentelemetry/api` types referenced by
126
+ * this SDK's public surface. They are defined locally rather than imported so
127
+ * the optional `@opentelemetry/api` peer never appears in the published
128
+ * `.d.ts` — otherwise consumers who don't install it fail to compile under the
129
+ * TypeScript default `skipLibCheck: false`. A real `@opentelemetry/api`
130
+ * `Tracer` / `AttributeValue` is structurally assignable to these.
131
+ */
132
+ /** Subset of `@opentelemetry/api`'s `AttributeValue`. */
133
+ type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
134
+ /** Subset of `@opentelemetry/api`'s `Span` produced when starting a span. */
135
+ interface OtelSpan {
136
+ setAttribute(key: string, value: AttributeValue): unknown;
137
+ setStatus(status: {
138
+ code: number;
139
+ message?: string;
140
+ }): unknown;
141
+ end(): void;
142
+ }
143
+ /** Subset of `@opentelemetry/api`'s `Tracer` used by this SDK. */
144
+ interface Tracer {
145
+ startSpan(name: string, options?: {
146
+ kind?: number;
147
+ attributes?: Record<string, AttributeValue>;
148
+ links?: unknown[];
149
+ }, context?: unknown): OtelSpan;
150
+ }
151
+
152
+ /**
153
+ * Vercel region code. The 20 known codes match
154
+ * {@link https://dcs.vercel-infra.com/ | dcs.vercel-infra.com}.
155
+ * Arbitrary strings are also accepted for forward compatibility
156
+ * with regions added after this SDK version.
157
+ */
158
+ type VercelRegion = "arn1" | "bom1" | "cdg1" | "cle1" | "cpt1" | "dub1" | "dxb1" | "fra1" | "gru1" | "hkg1" | "hnd1" | "iad1" | "icn1" | "kix1" | "lhr1" | "pdx1" | "sfo1" | "sin1" | "syd1" | "yul1" | (string & {});
159
+ /**
160
+ * Resolves a region code to a base {@link URL} for the Vercel Queue Service API.
161
+ *
162
+ * The SDK appends its own API path (`/api/v3/…`) to the returned URL.
163
+ * To add a prefix (e.g. when routing through a reverse proxy), include it
164
+ * in the pathname of the returned URL:
165
+ *
166
+ * ```ts
167
+ * // Default — domain only, no prefix:
168
+ * (region) => new URL(`https://${region}.vercel-queue.com`)
169
+ *
170
+ * // Custom domain with a base path:
171
+ * (region) => new URL(`https://my-proxy.example/custom-prefix`)
172
+ * // → requests go to https://my-proxy.example/custom-prefix/api/v3/…
173
+ * ```
174
+ *
175
+ * Default: `` (region) => new URL(`https://${region}.vercel-queue.com`) ``
176
+ */
177
+ type BaseUrlResolver = (region: string) => URL;
178
+ /**
179
+ * Client-level OpenTelemetry configuration.
180
+ *
181
+ * Controls the optional trace correlation built into the client: the
182
+ * PRODUCER `vqs.send` span and W3C trace-context injection on `send()`,
183
+ * and trace-context extraction around callback handlers.
184
+ *
185
+ * The `VERCEL_QUEUE_TRACE_PROPAGATION=off` environment variable always takes
186
+ * precedence and disables tracing regardless of these options.
187
+ */
188
+ interface TelemetryOptions {
189
+ /**
190
+ * Whether tracing (send spans, trace-context injection, and callback
191
+ * context extraction) is enabled for this client.
192
+ * Can be overridden per send via {@link SendTelemetryOptions.isEnabled}.
193
+ * @default true
194
+ */
195
+ isEnabled?: boolean;
196
+ /**
197
+ * Custom OpenTelemetry `Tracer` used to start `vqs.send` spans.
198
+ * @default trace.getTracer("@vercel/queue") from the global tracer provider
199
+ */
200
+ tracer?: Tracer;
201
+ /**
202
+ * Static attributes stamped on every `vqs.send` span. Keys are prefixed
203
+ * with `vqs.metadata.` to avoid colliding with semantic-convention
204
+ * attributes. Merged with per-send metadata; per-send values win on
205
+ * key conflicts.
206
+ */
207
+ metadata?: Record<string, AttributeValue>;
208
+ }
209
+ /**
210
+ * Per-send OpenTelemetry configuration overrides.
211
+ * See {@link TelemetryOptions} for the client-level configuration.
212
+ */
213
+ interface SendTelemetryOptions {
214
+ /**
215
+ * Overrides the client-level `isEnabled` for this send only.
216
+ * The `VERCEL_QUEUE_TRACE_PROPAGATION=off` environment variable still
217
+ * takes precedence.
218
+ * @default the client-level setting (which defaults to true)
219
+ */
220
+ isEnabled?: boolean;
221
+ /**
222
+ * Attributes stamped on this send's `vqs.send` span, prefixed with
223
+ * `vqs.metadata.`. Merged over client-level metadata; values here win
224
+ * on key conflicts.
225
+ */
226
+ metadata?: Record<string, AttributeValue>;
227
+ }
228
+ interface QueueClientOptions {
229
+ /**
230
+ * Vercel region code for API routing.
231
+ *
232
+ * Requests are sent to the regional endpoint resolved by
233
+ * {@link BaseUrlResolver} (default: `https://${region}.vercel-queue.com`).
234
+ *
235
+ * When omitted, the region is auto-detected from the `VERCEL_REGION`
236
+ * environment variable (set automatically on Vercel). If not available,
237
+ * defaults to `"iad1"` with a console warning.
238
+ *
239
+ * @example
240
+ * ```ts
241
+ * new QueueClient() // auto-detect, falls back to "iad1"
242
+ * new QueueClient({ region: "iad1" }) // explicit
243
+ * ```
244
+ */
245
+ region?: VercelRegion;
246
+ /**
247
+ * Custom resolver that maps a region code to a base {@link URL}.
248
+ *
249
+ * The SDK always appends its own API path (`/api/v3/…`) to the returned URL.
250
+ * Include a pathname to add a prefix (e.g. for reverse-proxy routing):
251
+ *
252
+ * ```ts
253
+ * resolveBaseUrl: (region) => new URL(`https://my-proxy.example/prefix`)
254
+ * ```
255
+ *
256
+ * @default (region) => new URL(`https://${region}.vercel-queue.com`)
257
+ */
258
+ resolveBaseUrl?: BaseUrlResolver;
259
+ /**
260
+ * Authentication token for the Vercel Queue Service API.
261
+ * If not provided, the client will attempt to get a token via OIDC
262
+ * when running in a Vercel Function environment.
263
+ */
264
+ token?: string;
265
+ /**
266
+ * Custom headers to include in all requests.
267
+ */
268
+ headers?: Record<string, string>;
269
+ /**
270
+ * Deployment ID for message routing and lease validation.
271
+ *
272
+ * - `undefined` (default): auto-detect from `VERCEL_DEPLOYMENT_ID` env var;
273
+ * sent messages are pinned to this deployment.
274
+ * - `null`: explicitly unpinned — no deployment ID is sent on any request.
275
+ * - `"dpl_xxx"`: explicit value used for both send pinning and consume identification.
276
+ *
277
+ * Ignored in development mode (deployment ID is never sent locally).
278
+ */
279
+ deploymentId?: string | null;
280
+ /**
281
+ * Serializer/deserializer for message payloads.
282
+ * Used for all send and receive operations.
283
+ * @default JsonTransport
284
+ */
285
+ transport?: Transport;
286
+ /**
287
+ * Custom HTTP dispatcher passed to every `fetch()` call.
288
+ *
289
+ * Use an undici `Agent` for connection pooling. A `RetryAgent` does not retry
290
+ * `POST` by default and cannot replay streaming request bodies. Queue sends
291
+ * use `POST`, and batch sends stream, so handle send failures in application
292
+ * code and use idempotency keys before retrying.
293
+ *
294
+ * @example
295
+ * ```ts
296
+ * import { Agent } from 'undici';
297
+ *
298
+ * new QueueClient({ dispatcher: new Agent({ connections: 8 }) });
299
+ * ```
300
+ */
301
+ dispatcher?: unknown;
302
+ /**
303
+ * OpenTelemetry configuration for this client.
304
+ *
305
+ * Applies to sends (the `vqs.send` span and trace-context injection) and
306
+ * to callback handlers created from this client (trace-context extraction).
307
+ * Tracing is enabled by default; requires `@opentelemetry/api` and a
308
+ * registered OTEL SDK to have any effect.
309
+ *
310
+ * @example
311
+ * ```ts
312
+ * new QueueClient({
313
+ * telemetry: {
314
+ * isEnabled: true,
315
+ * tracer: myTracer,
316
+ * metadata: { service: "billing" },
317
+ * },
318
+ * });
319
+ * ```
320
+ */
321
+ telemetry?: TelemetryOptions;
322
+ }
323
+ /**
324
+ * Options for creating a {@link PollingQueueClient}.
325
+ *
326
+ * Identical to {@link QueueClientOptions} except `region` is **required**
327
+ * because messages can only be received from the region they were sent to.
328
+ * Using a fixed region (e.g. `"iad1"`) ensures that `send` and `receive`
329
+ * target the same endpoint.
330
+ */
331
+ interface PollingQueueClientOptions extends QueueClientOptions {
332
+ /**
333
+ * Vercel region code for API routing — **required** for polling.
334
+ *
335
+ * Messages can only be received from the region they were sent to.
336
+ * Use a fixed region (e.g. `"iad1"`) for both sending and receiving.
337
+ *
338
+ * @example
339
+ * ```ts
340
+ * new PollingQueueClient({ region: "iad1" })
341
+ * ```
342
+ */
343
+ region: VercelRegion;
344
+ }
345
+ /**
346
+ * Options for sending messages.
347
+ */
348
+ interface SendOptions {
349
+ /**
350
+ * Key used to deduplicate message delivery. Repeated sends are accepted,
351
+ * but only one message is delivered.
352
+ * Deduplication window: `min(message retention, 24 hours)`.
353
+ *
354
+ * Must be at most 256 characters. Longer keys are rejected with a 400.
355
+ *
356
+ * @maxLength 256
357
+ */
358
+ idempotencyKey?: string;
359
+ /**
360
+ * Message retention time in seconds. After this period, the message expires.
361
+ * @default 86400 (24 hours)
362
+ * @minimum 60 (1 minute)
363
+ * @maximum 604800 (7 days)
364
+ */
365
+ retentionSeconds?: number;
366
+ /**
367
+ * Delay delivery of the message by this many seconds.
368
+ * The message will not be visible to consumers until the delay has passed.
369
+ * @default 0
370
+ * @minimum 0
371
+ * @maximum 604800 (7 days, cannot exceed retentionSeconds)
372
+ */
373
+ delaySeconds?: number;
374
+ /**
375
+ * Custom headers to include with this message.
376
+ * These headers are passed through to the VQS server.
377
+ */
378
+ headers?: Record<string, string>;
379
+ /**
380
+ * OpenTelemetry overrides for this send only.
381
+ * `isEnabled` overrides the client-level setting; `metadata` is merged
382
+ * over client-level metadata (this send wins on key conflicts).
383
+ */
384
+ telemetry?: SendTelemetryOptions;
385
+ }
386
+ interface SendMessageOptions<T = unknown> extends SendOptions {
387
+ /**
388
+ * The topic/queue name to send the message to.
389
+ * Must match pattern: `[A-Za-z0-9_-]+`
390
+ */
391
+ queueName: string;
392
+ /**
393
+ * The message payload. Will be serialized using the provided transport.
394
+ */
395
+ payload: T;
396
+ }
397
+ /**
398
+ * Result returned by `send()`.
399
+ *
400
+ * `messageId` is `null` when the server accepted the message for deferred
401
+ * processing (e.g. during a server-side outage) and no ID is available yet.
402
+ */
403
+ interface SendResult {
404
+ messageId: string | null;
405
+ }
406
+ /** One message in a batch send. */
407
+ type BatchSendMessage<T = unknown> = Omit<SendMessageOptions<T>, "queueName" | "telemetry">;
408
+ /** Options shared by the entire batch request. */
409
+ type BatchSendOptions = Pick<SendOptions, "telemetry">;
410
+ /**
411
+ * Result for one message in a successful batch request. Results are returned
412
+ * in the same order as the input messages.
413
+ *
414
+ * A request-level error does not return per-message results and can happen
415
+ * after the server accepted messages. Use idempotency keys when retrying the
416
+ * request so accepted messages are not delivered twice.
417
+ */
418
+ type BatchSendResult = {
419
+ /** The message was accepted and has an assigned ID. */
420
+ status: "sent";
421
+ messageId: string;
422
+ } | {
423
+ /** The message was accepted for deferred processing without an ID. */
424
+ status: "deferred";
425
+ messageId: null;
426
+ } | {
427
+ /** The message was not accepted. */
428
+ status: "failed";
429
+ /** HTTP status describing why this message failed. */
430
+ statusCode: number;
431
+ /** Human-readable failure description. */
432
+ error: string;
433
+ /** Whether retrying this message may succeed. */
434
+ retryable: boolean;
435
+ };
436
+ interface Message<T = unknown> {
437
+ /**
438
+ * Unique message identifier. Used for receive-by-ID operations.
439
+ */
440
+ messageId: string;
441
+ /**
442
+ * The deserialized message payload.
443
+ * Note: If using StreamTransport, ensure proper cleanup by calling
444
+ * `transport.finalize(payload)` when done processing, especially in error cases.
445
+ */
446
+ payload: T;
447
+ /**
448
+ * Number of times this message has been delivered.
449
+ * Starts at 1 for the first delivery, increments on each retry.
450
+ */
451
+ deliveryCount: number;
452
+ /**
453
+ * Timestamp when the message was created/published.
454
+ */
455
+ createdAt: Date;
456
+ /**
457
+ * Timestamp when the message expires.
458
+ * Present in v2beta binary callback (`ce-vqsexpiresat` header) and
459
+ * V3 multipart/NDJSON responses (`Vqs-Expires-At` header / `expiresAt` field).
460
+ */
461
+ expiresAt?: Date;
462
+ /**
463
+ * MIME type of the message content.
464
+ * Set by the transport's `contentType` property during publish.
465
+ */
466
+ contentType: string;
467
+ /**
468
+ * Receipt handle (lease token) for this message delivery.
469
+ * Required for acknowledge and visibility extension operations.
470
+ * Valid only until the visibility timeout expires.
471
+ */
472
+ receiptHandle: string;
473
+ }
474
+ /**
475
+ * Message metadata provided to handlers
476
+ */
477
+ interface MessageMetadata {
478
+ messageId: string;
479
+ deliveryCount: number;
480
+ createdAt: Date;
481
+ expiresAt: Date;
482
+ topicName: string;
483
+ consumerGroup: string;
484
+ /** Vercel region the client is targeting. */
485
+ region: string;
486
+ }
487
+ /**
488
+ * Instruction returned by a {@link RetryHandler} to control what happens
489
+ * to a message when the handler throws.
490
+ *
491
+ * - `{ afterSeconds: N }` — reschedule the message for redelivery after N seconds
492
+ * - `{ acknowledge: true }` — acknowledge the message so it is never retried
493
+ */
494
+ type RetryDirective = {
495
+ afterSeconds: number;
496
+ } | {
497
+ acknowledge: true;
498
+ };
499
+ /**
500
+ * Called when the message handler throws an error.
501
+ * Return a {@link RetryDirective} to reschedule or acknowledge the message,
502
+ * or return `undefined` to let the error propagate normally.
503
+ */
504
+ type RetryHandler = (error: unknown, metadata: MessageMetadata) => RetryDirective | void | undefined;
505
+ /**
506
+ * Message handler function type.
507
+ *
508
+ * Called once per message with the deserialized payload and metadata.
509
+ * Not called when the queue is empty — check the return value of `receive()` instead.
510
+ */
511
+ type MessageHandler<T = unknown> = (message: T, metadata: MessageMetadata) => Promise<void> | void;
512
+ /**
513
+ * Result returned by `receive()`. Use `ok` to check if messages were processed.
514
+ *
515
+ * @example
516
+ * ```typescript
517
+ * const result = await receive("topic", "group", handler);
518
+ * if (result.ok) {
519
+ * // Messages were processed successfully
520
+ * } else if (result.reason === "empty") {
521
+ * // Queue had no messages available
522
+ * }
523
+ * ```
524
+ */
525
+ type ReceiveResult = {
526
+ ok: true;
527
+ } | {
528
+ ok: false;
529
+ reason: "empty";
530
+ } | {
531
+ ok: false;
532
+ reason: "not_found";
533
+ messageId: string;
534
+ } | {
535
+ ok: false;
536
+ reason: "not_available";
537
+ messageId: string;
538
+ } | {
539
+ ok: false;
540
+ reason: "already_processed";
541
+ messageId: string;
542
+ };
543
+ /**
544
+ * Options for receiving a specific message by ID.
545
+ */
546
+ interface ReceiveByIdOptions {
547
+ /** The specific message ID to consume */
548
+ messageId: string;
549
+ /**
550
+ * Message lock duration in seconds.
551
+ * @default 300 (5 minutes)
552
+ * @minimum 30
553
+ * @maximum 3600 (1 hour)
554
+ */
555
+ visibilityTimeoutSeconds?: number;
556
+ /**
557
+ * Called when the handler throws. Return `{ afterSeconds: N }` to reschedule
558
+ * the message for redelivery after N seconds, or return `undefined`
559
+ * to let the error propagate normally.
560
+ */
561
+ retry?: RetryHandler;
562
+ }
563
+ /**
564
+ * Options for receiving messages from the queue with an optional batch limit.
565
+ */
566
+ interface ReceiveBatchOptions {
567
+ /**
568
+ * Maximum number of messages to retrieve in a single request.
569
+ * @default 1
570
+ * @minimum 1
571
+ * @maximum 10
572
+ */
573
+ limit?: number;
574
+ /**
575
+ * Message lock duration in seconds.
576
+ * @default 300 (5 minutes)
577
+ * @minimum 30
578
+ * @maximum 3600 (1 hour)
579
+ */
580
+ visibilityTimeoutSeconds?: number;
581
+ /**
582
+ * Called when the handler throws. Return `{ afterSeconds: N }` to reschedule
583
+ * the message for redelivery after N seconds, or return `undefined`
584
+ * to let the error propagate normally.
585
+ */
586
+ retry?: RetryHandler;
587
+ }
588
+ /**
589
+ * Options for the receive method. Either receive by message ID or receive
590
+ * from the queue with an optional limit. These options are mutually exclusive.
591
+ */
592
+ type ReceiveOptions = ReceiveByIdOptions | ReceiveBatchOptions;
593
+ /**
594
+ * Error thrown when a message does not exist or has expired.
595
+ */
596
+ declare class MessageNotFoundError extends Error {
597
+ constructor(messageId: string);
598
+ }
599
+ /**
600
+ * Error thrown when a message exists but cannot be processed.
601
+ * This can happen when the message is in the wrong state or already claimed by another consumer.
602
+ */
603
+ declare class MessageNotAvailableError extends Error {
604
+ constructor(messageId: string, reason?: string);
605
+ }
606
+ /**
607
+ * Error thrown when message data is corrupted or can't be parsed
608
+ */
609
+ declare class MessageCorruptedError extends Error {
610
+ constructor(messageId: string, reason: string);
611
+ }
612
+ /**
613
+ * Error thrown when there are no messages available in the queue.
614
+ */
615
+ declare class QueueEmptyError extends Error {
616
+ constructor(queueName: string, consumerGroup: string);
617
+ }
618
+ /**
619
+ * Error thrown when a message is temporarily locked by another consumer.
620
+ * The message is currently being processed and cannot be claimed.
621
+ */
622
+ declare class MessageLockedError extends Error {
623
+ /** Suggested retry delay in seconds, if provided by the server. */
624
+ readonly retryAfter?: number;
625
+ constructor(messageId: string, retryAfter?: number);
626
+ }
627
+ /**
628
+ * Error thrown when the server rate-limits a request (HTTP 429).
629
+ */
630
+ declare class TooManyRequestsError extends Error {
631
+ /** Suggested retry delay in seconds, from the Retry-After header, if sent. */
632
+ readonly retryAfter?: number;
633
+ constructor(message?: string, retryAfter?: number);
634
+ }
635
+ /**
636
+ * Error thrown when authentication fails.
637
+ * This typically means the token is missing, invalid, or expired.
638
+ */
639
+ declare class UnauthorizedError extends Error {
640
+ constructor(message?: string);
641
+ }
642
+ /**
643
+ * Error thrown when access is forbidden.
644
+ * This typically means the queue belongs to a different environment or project.
645
+ */
646
+ declare class ForbiddenError extends Error {
647
+ constructor(message?: string);
648
+ }
649
+ /**
650
+ * Error thrown when request parameters are invalid.
651
+ */
652
+ declare class BadRequestError extends Error {
653
+ constructor(message: string);
654
+ }
655
+ /**
656
+ * Error thrown when the server encounters an unexpected error.
657
+ */
658
+ declare class InternalServerError extends Error {
659
+ constructor(message?: string);
660
+ }
661
+ /**
662
+ * Error thrown when the batch limit parameter is outside the valid range.
663
+ * The limit must be between 1 and 10 (inclusive).
664
+ */
665
+ declare class InvalidLimitError extends Error {
666
+ constructor(limit: number, min?: number, max?: number);
667
+ }
668
+ /**
669
+ * Error thrown when attempting to process a message that has already been successfully processed.
670
+ */
671
+ declare class MessageAlreadyProcessedError extends Error {
672
+ constructor(messageId: string);
673
+ }
674
+ /**
675
+ * Error thrown when consumer discovery fails.
676
+ * This typically means the deployment could not be reached or is not configured correctly.
677
+ */
678
+ declare class ConsumerDiscoveryError extends Error {
679
+ readonly deploymentId?: string;
680
+ constructor(message: string, deploymentId?: string);
681
+ }
682
+ /**
683
+ * Error thrown when the consumer registry is not configured for the project.
684
+ */
685
+ declare class ConsumerRegistryNotConfiguredError extends Error {
686
+ constructor(message?: string);
687
+ }
688
+
689
+ type CallbackRequestInput$1 = Request | {
690
+ request: Request;
691
+ };
692
+ /**
693
+ * Queue client for push-based (callback) workflows.
694
+ *
695
+ * Use this client when Vercel delivers messages to your route handlers.
696
+ * Provides {@link send}, {@link handleCallback}, and {@link handleNodeCallback}.
697
+ *
698
+ * Region is resolved automatically:
699
+ * 1. Explicit `region` option (highest priority)
700
+ * 2. `VERCEL_REGION` environment variable (set automatically on Vercel)
701
+ * 3. Falls back to `"iad1"` with a console warning
702
+ *
703
+ * The constructor never throws — `new QueueClient()` always works.
704
+ *
705
+ * For manual polling workflows, use {@link PollingQueueClient} instead.
706
+ *
707
+ * @example
708
+ * ```typescript
709
+ * import { QueueClient } from "@vercel/queue";
710
+ *
711
+ * const queue = new QueueClient();
712
+ * export const { send, handleCallback, handleNodeCallback } = queue;
713
+ * ```
714
+ */
715
+ declare class QueueClient {
716
+ constructor(options?: QueueClientOptions);
717
+ /**
718
+ * Send a message to a topic.
719
+ *
720
+ * This is an arrow function property so it can be destructured:
721
+ * ```typescript
722
+ * const { send } = new QueueClient();
723
+ * await send("my-topic", payload);
724
+ * ```
725
+ *
726
+ * @param topicName - Name of the topic (pattern: `[A-Za-z0-9_-]+`)
727
+ * @param payload - The data to send (serialized via the configured transport)
728
+ * @param options - Optional send options (idempotencyKey, retentionSeconds, delaySeconds, headers)
729
+ * @returns `{ messageId }` — `messageId` is `null` when the server accepted
730
+ * the message for deferred processing (no ID available yet)
731
+ */
732
+ send: <T = unknown>(topicName: string, payload: T, options?: SendOptions) => Promise<SendResult>;
733
+ /**
734
+ * Send up to 100 messages to a topic in one HTTP request.
735
+ *
736
+ * Results are returned in input order. A valid batch may contain a mix of
737
+ * sent, deferred, and failed entries; inspect every result.
738
+ */
739
+ experimental_sendBatch: <T = unknown>(topicName: string, messages: readonly BatchSendMessage<T>[], options?: BatchSendOptions) => Promise<BatchSendResult[]>;
740
+ /**
741
+ * Create a Web API route handler for processing queue callback messages.
742
+ *
743
+ * Parses incoming `Request` as a CloudEvent and invokes the handler.
744
+ * For use on Vercel — Vercel invokes this route when messages are available.
745
+ *
746
+ * This is an arrow function property so it can be destructured:
747
+ * ```typescript
748
+ * const { handleCallback } = new QueueClient();
749
+ * export const POST = handleCallback(handler);
750
+ * ```
751
+ *
752
+ * @param handler - Function to process the message payload and metadata
753
+ * @param options - Optional configuration
754
+ * @param options.visibilityTimeoutSeconds - Message lock duration (default: 300, max: 3600)
755
+ * @param options.retry - Called when the handler throws. Return `{ afterSeconds: N }` to
756
+ * reschedule the message for redelivery after N seconds.
757
+ * @returns A route handler that accepts either `Request` or `{ request: Request }`
758
+ */
759
+ handleCallback: <T = unknown>(handler: MessageHandler<T>, options?: {
760
+ visibilityTimeoutSeconds?: number;
761
+ retry?: RetryHandler;
762
+ }) => ((requestOrEvent: CallbackRequestInput$1) => Promise<Response>);
763
+ /**
764
+ * Create a Connect-style route handler for processing queue callback messages.
765
+ * For use on Vercel — Vercel invokes this route when messages are available.
766
+ *
767
+ * For frameworks using the `(req, res)` middleware pattern where `req.body`
768
+ * is pre-parsed (Next.js Pages Router, etc.).
769
+ *
770
+ * This is an arrow function property so it can be destructured:
771
+ * ```typescript
772
+ * const { handleNodeCallback } = new QueueClient();
773
+ * app.post("/api/queue", handleNodeCallback(handler));
774
+ * ```
775
+ *
776
+ * @param handler - Function to process the message payload and metadata
777
+ * @param options - Optional configuration
778
+ * @param options.visibilityTimeoutSeconds - Message lock duration (default: 300, max: 3600)
779
+ * @param options.retry - Called when the handler throws. Return `{ afterSeconds: N }` to
780
+ * reschedule the message for redelivery after N seconds.
781
+ * @returns A `(req, res) => Promise<void>` route handler
782
+ */
783
+ handleNodeCallback: <T = unknown>(handler: MessageHandler<T>, options?: {
784
+ visibilityTimeoutSeconds?: number;
785
+ retry?: RetryHandler;
786
+ }) => ((req: {
787
+ method?: string;
788
+ headers: Record<string, string | string[] | undefined>;
789
+ body?: unknown;
790
+ }, res: {
791
+ status(code: number): {
792
+ json(data: unknown): void;
793
+ end(): void;
794
+ };
795
+ end(): void;
796
+ }) => Promise<void>);
797
+ }
798
+ /**
799
+ * Queue client for poll-based (manual receive) workflows.
800
+ *
801
+ * Use this client when you manually poll for messages with {@link receive}.
802
+ * Also provides {@link send} for publishing messages.
803
+ *
804
+ * Region is **required** because messages can only be received from the
805
+ * region they were sent to. Use a fixed region (e.g. `"iad1"`) for both
806
+ * sending and receiving.
807
+ *
808
+ * For push-based (callback) workflows on Vercel, use {@link QueueClient} instead.
809
+ *
810
+ * @example
811
+ * ```typescript
812
+ * import { PollingQueueClient } from "@vercel/queue";
813
+ *
814
+ * const queue = new PollingQueueClient({ region: "iad1" });
815
+ * export const { send, receive } = queue;
816
+ * ```
817
+ */
818
+ declare class PollingQueueClient {
819
+ constructor(options: PollingQueueClientOptions);
820
+ /**
821
+ * Send a message to a topic.
822
+ *
823
+ * This is an arrow function property so it can be destructured:
824
+ * ```typescript
825
+ * const { send } = new PollingQueueClient({ region: "iad1" });
826
+ * await send("my-topic", payload);
827
+ * ```
828
+ *
829
+ * @param topicName - Name of the topic (pattern: `[A-Za-z0-9_-]+`)
830
+ * @param payload - The data to send (serialized via the configured transport)
831
+ * @param options - Optional send options (idempotencyKey, retentionSeconds, delaySeconds, headers)
832
+ * @returns `{ messageId }` — `messageId` is `null` when the server accepted
833
+ * the message for deferred processing (no ID available yet)
834
+ */
835
+ send: <T = unknown>(topicName: string, payload: T, options?: SendOptions) => Promise<SendResult>;
836
+ /**
837
+ * Send up to 100 messages to a topic in one HTTP request.
838
+ *
839
+ * Results are returned in input order. A valid batch may contain a mix of
840
+ * sent, deferred, and failed entries; inspect every result.
841
+ */
842
+ experimental_sendBatch: <T = unknown>(topicName: string, messages: readonly BatchSendMessage<T>[], options?: BatchSendOptions) => Promise<BatchSendResult[]>;
843
+ /**
844
+ * Receive and process messages from a topic.
845
+ *
846
+ * Each message is automatically locked, kept alive via periodic visibility
847
+ * extensions during processing, and acknowledged upon successful handler completion.
848
+ * The handler is not called when the queue is empty — check `result.ok` instead.
849
+ *
850
+ * This is an arrow function property so it can be destructured:
851
+ * ```typescript
852
+ * const { receive } = new PollingQueueClient({ region: "iad1" });
853
+ * const result = await receive("my-topic", "my-group", handler);
854
+ * if (!result.ok) console.log(result.reason);
855
+ * ```
856
+ *
857
+ * @param topicName - Name of the topic (pattern: `[A-Za-z0-9_-]+`)
858
+ * @param consumerGroup - Name of the consumer group (pattern: `[A-Za-z0-9_-]+`)
859
+ * @param handler - Function to process each message payload and metadata.
860
+ * Not called when the queue is empty.
861
+ * @param options - Optional receive options (visibilityTimeoutSeconds, limit, or messageId)
862
+ * @returns Discriminated result: `{ ok: true }` on success, `{ ok: false, reason }` otherwise
863
+ */
864
+ receive: <T = unknown>(topicName: string, consumerGroup: string, handler: MessageHandler<T>, options?: ReceiveOptions) => Promise<ReceiveResult>;
865
+ }
866
+
867
+ type CallbackRequestInput = Request | {
868
+ request: Request;
869
+ };
870
+ /**
871
+ * Send a message to a topic using the default auto-configured client.
872
+ *
873
+ * The default client auto-detects the region from `VERCEL_REGION`,
874
+ * falling back to `"iad1"` with a console warning on first use.
875
+ *
876
+ * This is an arrow function–free alternative to destructuring from a
877
+ * {@link QueueClient} instance — import and use directly:
878
+ * ```typescript
879
+ * import { send } from "@vercel/queue";
880
+ * await send("my-topic", { hello: "world" });
881
+ * ```
882
+ *
883
+ * @param topicName - Name of the topic (pattern: `[A-Za-z0-9_-]+`)
884
+ * @param payload - The data to send (serialized via JsonTransport)
885
+ * @param options - Optional send options. Pass `region` to route to a specific region.
886
+ * @returns `{ messageId }` — `messageId` is `null` when the server accepted
887
+ * the message for deferred processing
888
+ */
889
+ declare function send<T = unknown>(topicName: string, payload: T, options?: SendOptions & {
890
+ region?: VercelRegion;
891
+ }): Promise<SendResult>;
892
+ /**
893
+ * Send up to 100 messages in one HTTP request using the default
894
+ * auto-configured client.
895
+ */
896
+ declare function experimental_sendBatch<T = unknown>(topicName: string, messages: readonly BatchSendMessage<T>[], options?: BatchSendOptions & {
897
+ region?: VercelRegion;
898
+ }): Promise<BatchSendResult[]>;
899
+ /**
900
+ * Create a Web API route handler for processing queue callback messages
901
+ * using the default auto-configured client.
902
+ *
903
+ * The default client auto-detects the region from `VERCEL_REGION`,
904
+ * falling back to `"iad1"` with a console warning on first use.
905
+ * The callback region is determined automatically from the incoming
906
+ * `ce-vqsregion` header in the v2beta event — no manual configuration needed.
907
+ *
908
+ * This is an arrow function–free alternative to destructuring from a
909
+ * {@link QueueClient} instance — import and use directly:
910
+ * ```typescript
911
+ * import { handleCallback } from "@vercel/queue";
912
+ * export const POST = handleCallback(async (message, metadata) => {
913
+ * console.log("Processing:", message);
914
+ * });
915
+ * ```
916
+ *
917
+ * @param handler - Function to process the message payload and metadata
918
+ * @param options - Optional configuration (visibilityTimeoutSeconds, retry)
919
+ * @returns A route handler that accepts either `Request` or `{ request: Request }`
920
+ */
921
+ declare function handleCallback<T = unknown>(handler: MessageHandler<T>, options?: {
922
+ visibilityTimeoutSeconds?: number;
923
+ retry?: RetryHandler;
924
+ }): (requestOrEvent: CallbackRequestInput) => Promise<Response>;
925
+
926
+ /**
927
+ * Options for {@link registerDevConsumer}.
928
+ */
929
+ interface RegisterDevConsumerOptions {
930
+ /**
931
+ * Topic name to subscribe to. Supports wildcard patterns (e.g. `"user-*"`).
932
+ */
933
+ topic: string;
934
+ /**
935
+ * The QueueClient instance used for callback processing (visibility
936
+ * extensions, acks, etc.). Messages delivered to the handler are fetched
937
+ * via this client.
938
+ */
939
+ client: QueueClient;
940
+ /**
941
+ * Function invoked with each message delivered to the topic.
942
+ */
943
+ handler: MessageHandler;
944
+ /**
945
+ * Logical identifier for this consumer. Multiple consumers for the same
946
+ * topic must use distinct groups; re-registering with the same group
947
+ * replaces the previous handler (useful for HMR).
948
+ *
949
+ * @default "dev-consumer"
950
+ */
951
+ consumerGroup?: string;
952
+ /**
953
+ * Lock duration for in-flight messages. Forwarded to `coreHandleCallback`.
954
+ */
955
+ visibilityTimeoutSeconds?: number;
956
+ /**
957
+ * Called when the handler throws. Return `{ afterSeconds: N }` to schedule
958
+ * local re-delivery, or `{ acknowledge: true }` to drop the message.
959
+ */
960
+ retry?: RetryHandler;
961
+ }
962
+ /**
963
+ * Register a consumer for a topic without relying on `vercel.json` route
964
+ * discovery or stack-trace-based caller detection.
965
+ *
966
+ * Intended for framework integrations (e.g. Nitro) where queue handlers are
967
+ * wired through a central dispatcher rather than per-file `handleCallback()`
968
+ * calls. The caller supplies the topic and a handler; `send()` in dev mode
969
+ * will route messages through it via the same retry/re-delivery machinery
970
+ * used for file-discovered handlers.
971
+ *
972
+ * Call only when `isDevMode()` is true. In production this has no effect on
973
+ * routing — messages are delivered by the Vercel Queue Service directly.
974
+ *
975
+ * @returns An unregister function. Calling it removes the handler that this
976
+ * call registered; if the entry was replaced (via re-registration with the
977
+ * same `consumerGroup`), the unregister is a no-op.
978
+ *
979
+ * @example
980
+ * ```ts
981
+ * const unregister = registerDevConsumer({
982
+ * topic: "orders",
983
+ * client,
984
+ * handler: async (message, metadata) => {
985
+ * await dispatch(message, metadata);
986
+ * },
987
+ * consumerGroup: "nitro-vercel-queue",
988
+ * });
989
+ * ```
990
+ */
991
+ declare function registerDevConsumer(options: RegisterDevConsumerOptions): () => void;
992
+
993
+ /**
994
+ * Core queue callback utilities for handling incoming webhook payloads
995
+ * from Vercel triggers using the CloudEvent specification.
996
+ *
997
+ * This module provides the framework-agnostic core. For framework-specific
998
+ * wrappers, see `@vercel/queue/web` and `@vercel/queue/nextjs/pages`.
999
+ */
1000
+
1001
+ declare const CLOUD_EVENT_TYPE_V1BETA = "com.vercel.queue.v1beta";
1002
+ declare const CLOUD_EVENT_TYPE_V2BETA = "com.vercel.queue.v2beta";
1003
+ /**
1004
+ * Routing-only callback: the SDK must fetch the message by ID.
1005
+ * Produced by v1beta structured mode and v2beta large-body mode.
1006
+ */
1007
+ type ParsedCallbackV1 = {
1008
+ queueName: string;
1009
+ consumerGroup: string;
1010
+ messageId: string;
1011
+ region?: string;
1012
+ };
1013
+ /**
1014
+ * Full-message callback: payload and receipt handle are inlined,
1015
+ * so the SDK can process directly without an extra fetch.
1016
+ * Produced by v2beta small-body mode.
1017
+ */
1018
+ type ParsedCallbackV2 = {
1019
+ queueName: string;
1020
+ consumerGroup: string;
1021
+ messageId: string;
1022
+ region?: string;
1023
+ receiptHandle: string;
1024
+ deliveryCount?: number;
1025
+ createdAt?: string;
1026
+ expiresAt?: string;
1027
+ contentType?: string;
1028
+ visibilityDeadline?: string;
1029
+ rawBody?: ReadableStream<Uint8Array>;
1030
+ parsedPayload?: unknown;
1031
+ };
1032
+ type ParsedCallbackRequest = ParsedCallbackV1 | ParsedCallbackV2;
1033
+ /**
1034
+ * Parse a callback from a pre-parsed body and headers.
1035
+ *
1036
+ * For frameworks like Next.js Pages Router where the body has already been
1037
+ * parsed, use this instead of {@link parseCallback}.
1038
+ *
1039
+ * Detects the CloudEvent version from the `ce-type` header:
1040
+ * - `com.vercel.queue.v2beta`: binary content mode (metadata in headers,
1041
+ * payload in body). For small messages, the body is attached as `parsedPayload`.
1042
+ * - Otherwise: structured content mode (v1beta, entire CloudEvent in JSON body)
1043
+ *
1044
+ * @param body - The framework-parsed request body. Type depends on Content-Type
1045
+ * and framework configuration:
1046
+ * - v1beta: parsed CloudEvent JSON object
1047
+ * - v2beta: the message payload as parsed by the framework (object, Buffer, or string)
1048
+ * @param headers - HTTP headers
1049
+ * @returns Parsed callback request with routing metadata and optional payload
1050
+ */
1051
+ declare function parseRawCallback(body: unknown, headers: Record<string, string | string[] | undefined>): ParsedCallbackRequest;
1052
+ /**
1053
+ * Parse and validate a CloudEvent callback from a Web API `Request` object.
1054
+ *
1055
+ * Detects the CloudEvent version from the `ce-type` header:
1056
+ * - `com.vercel.queue.v2beta`: binary content mode (metadata in headers,
1057
+ * payload in body). For v2beta, the body is attached as `rawBody` (a
1058
+ * ReadableStream) rather than being parsed.
1059
+ * - Otherwise: structured content mode (v1beta, entire CloudEvent in JSON body)
1060
+ *
1061
+ * For frameworks that pre-parse the body (e.g. Next.js Pages Router),
1062
+ * use {@link parseRawCallback} instead.
1063
+ */
1064
+ declare function parseCallback(request: Request): Promise<ParsedCallbackRequest>;
1065
+
1066
+ export { BadRequestError, type BaseUrlResolver, type BatchSendMessage, type BatchSendOptions, type BatchSendResult, BufferTransport, CLOUD_EVENT_TYPE_V1BETA, CLOUD_EVENT_TYPE_V2BETA, ConsumerDiscoveryError, ConsumerRegistryNotConfiguredError, ForbiddenError, InternalServerError, InvalidLimitError, JsonTransport, type Message, MessageAlreadyProcessedError, MessageCorruptedError, type MessageHandler, MessageLockedError, type MessageMetadata, MessageNotAvailableError, MessageNotFoundError, type ParsedCallbackRequest, type ParsedCallbackV1, type ParsedCallbackV2, PollingQueueClient, type PollingQueueClientOptions, QueueClient, type QueueClientOptions, QueueEmptyError, type ReceiveBatchOptions, type ReceiveByIdOptions, type ReceiveOptions, type ReceiveResult, type RegisterDevConsumerOptions, type RetryDirective, type RetryHandler, type SendOptions, type SendResult, type SendTelemetryOptions, StreamTransport, type TelemetryOptions, TooManyRequestsError, type Transport, UnauthorizedError, type VercelRegion, experimental_sendBatch, handleCallback, parseCallback, parseRawCallback, registerDevConsumer, send };