eve 0.67.2 → 0.69.0

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 (1116) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/bin/eve.js +15 -0
  3. package/dist/src/_virtual/_rolldown/runtime.js +1 -1
  4. package/dist/src/approval/definition.d.ts +19 -5
  5. package/dist/src/channel/adapter.d.ts +2 -0
  6. package/dist/src/channel/auth/oidc.js +1 -1
  7. package/dist/src/channel/channel-address.d.ts +1 -4
  8. package/dist/src/channel/channel-address.js +1 -1
  9. package/dist/src/channel/channel-operations.d.ts +4 -11
  10. package/dist/src/channel/channel-operations.js +1 -1
  11. package/dist/src/channel/compiled-channel.d.ts +0 -2
  12. package/dist/src/channel/compiled-channel.js +2 -2
  13. package/dist/src/channel/cross-channel-receive.d.ts +1 -3
  14. package/dist/src/channel/cross-channel-receive.js +1 -1
  15. package/dist/src/channel/forwarded-principal.js +1 -1
  16. package/dist/src/channel/schedule-auth.d.ts +16 -0
  17. package/dist/src/channel/schedule-auth.js +1 -1
  18. package/dist/src/channel/session-callback.js +1 -1
  19. package/dist/src/channel/session.d.ts +3 -8
  20. package/dist/src/channel/session.js +1 -1
  21. package/dist/src/channel/task-card.d.ts +121 -0
  22. package/dist/src/channel/task-card.js +1 -0
  23. package/dist/src/channel/types.d.ts +12 -54
  24. package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-D_5129A9.js} +295 -205
  25. package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-Dab2MnT2.js} +295 -205
  26. package/dist/src/cli/commands/info.d.ts +11 -0
  27. package/dist/src/cli/commands/info.js +1 -1
  28. package/dist/src/cli/commands/init-agent-workspace.js +1 -1
  29. package/dist/src/cli/commands/init.js +1 -1
  30. package/dist/src/cli/dev/command-options.d.ts +3 -2
  31. package/dist/src/cli/dev/command.js +1 -1
  32. package/dist/src/cli/dev/local-server-process.js +1 -1
  33. package/dist/src/cli/dev/tui/blocks.d.ts +19 -18
  34. package/dist/src/cli/dev/tui/blocks.js +3 -3
  35. package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
  36. package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
  37. package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
  38. package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
  39. package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
  40. package/dist/src/cli/dev/tui/rail.d.ts +1 -1
  41. package/dist/src/cli/dev/tui/runner.d.ts +25 -2
  42. package/dist/src/cli/dev/tui/runner.js +3 -3
  43. package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
  44. package/dist/src/cli/dev/tui/status-line.js +1 -1
  45. package/dist/src/cli/dev/tui/subagent-pump.d.ts +44 -52
  46. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  47. package/dist/src/cli/dev/tui/task-activity.d.ts +55 -0
  48. package/dist/src/cli/dev/tui/task-activity.js +1 -0
  49. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +13 -30
  50. package/dist/src/cli/dev/tui/terminal-renderer.js +11 -11
  51. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  52. package/dist/src/cli/dev/tui/theme.js +1 -1
  53. package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
  54. package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
  55. package/dist/src/cli/dev/tui/tool-presentation.d.ts +16 -3
  56. package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
  57. package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
  58. package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
  59. package/dist/src/cli/dev/tui/tui.js +1 -1
  60. package/dist/src/cli/dev/tui/types.d.ts +11 -5
  61. package/dist/src/cli/dev/ui-options.d.ts +2 -2
  62. package/dist/src/cli/option-parsers.d.ts +3 -1
  63. package/dist/src/cli/option-parsers.js +1 -1
  64. package/dist/src/cli/ui/terminal-text.js +1 -1
  65. package/dist/src/client/agent-info-schema.d.ts +150 -9
  66. package/dist/src/client/agent-info-schema.js +1 -1
  67. package/dist/src/client/agent-session.d.ts +28 -0
  68. package/dist/src/client/agent-session.js +1 -0
  69. package/dist/src/client/eve-agent-store-helpers.d.ts +1 -1
  70. package/dist/src/client/eve-agent-store-helpers.js +2 -2
  71. package/dist/src/client/eve-agent-store.js +1 -1
  72. package/dist/src/client/index.d.ts +2 -1
  73. package/dist/src/client/index.js +1 -1
  74. package/dist/src/client/message-action-parts.js +1 -1
  75. package/dist/src/client/message-reducer.js +1 -1
  76. package/dist/src/client/message-task-parts.d.ts +8 -0
  77. package/dist/src/client/message-task-parts.js +1 -0
  78. package/dist/src/client/optimistic-message-submissions.js +1 -1
  79. package/dist/src/client/session-controls.d.ts +0 -1
  80. package/dist/src/client/session-utils.d.ts +10 -0
  81. package/dist/src/client/session-utils.js +1 -1
  82. package/dist/src/client/session.d.ts +8 -16
  83. package/dist/src/client/session.js +1 -1
  84. package/dist/src/client/stream-version.js +1 -1
  85. package/dist/src/client/types.d.ts +2 -4
  86. package/dist/src/compiled/.vendor-stamp.json +3 -2
  87. package/dist/src/compiled/@eve/catalog/index.js +1 -1
  88. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +55 -55
  89. package/dist/src/compiled/@vercel/blob/index.js +1 -1
  90. package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
  91. package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
  92. package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
  93. package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
  94. package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
  95. package/dist/src/compiled/@vercel/connect/index.js +26 -0
  96. package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
  97. package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
  98. package/dist/src/compiled/@vercel/oidc/index.js +1 -1
  99. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  100. package/dist/src/compiled/@workflow/world-vercel/index.js +1 -1
  101. package/dist/src/compiler/bundled-extension.d.ts +7 -1
  102. package/dist/src/compiler/bundled-extension.js +1 -1
  103. package/dist/src/compiler/default-tool-policy.d.ts +2 -2
  104. package/dist/src/compiler/default-tool-policy.js +1 -1
  105. package/dist/src/compiler/development-extensions.js +1 -1
  106. package/dist/src/compiler/extension-compatibility.d.ts +54 -18
  107. package/dist/src/compiler/extension-compatibility.js +1 -1
  108. package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
  109. package/dist/src/compiler/extension-mount-bindings.js +1 -0
  110. package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
  111. package/dist/src/compiler/load-binding-namespace.js +1 -1
  112. package/dist/src/compiler/manifest.d.ts +19 -17
  113. package/dist/src/compiler/manifest.js +1 -1
  114. package/dist/src/compiler/module-lifecycle.d.ts +2 -2
  115. package/dist/src/compiler/module-lifecycle.js +1 -1
  116. package/dist/src/compiler/module-map.d.ts +1 -1
  117. package/dist/src/compiler/module-map.js +3 -3
  118. package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
  119. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  120. package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
  121. package/dist/src/compiler/normalize-manifest.js +1 -1
  122. package/dist/src/compiler/normalize-subagent.js +1 -1
  123. package/dist/src/compiler/normalize-tool.js +1 -1
  124. package/dist/src/compiler/project-sources.d.ts +4 -0
  125. package/dist/src/compiler/project-sources.js +1 -1
  126. package/dist/src/compiler/remote-agent-node.js +1 -1
  127. package/dist/src/compiler/source-graph.d.ts +5 -0
  128. package/dist/src/compiler/source-graph.js +1 -1
  129. package/dist/src/computer-use/extension/extension.d.ts +2 -0
  130. package/dist/src/computer-use/extension/extension.js +1 -0
  131. package/dist/src/computer-use/extension/lib/command-failure.d.ts +7 -0
  132. package/dist/src/computer-use/extension/lib/command-failure.js +2 -0
  133. package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-sandbox.d.ts +8 -0
  134. package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-sandbox.js +3 -3
  135. package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use.d.ts +2 -0
  136. package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use.js +2 -1
  137. package/dist/src/computer-use/extension/lib/sandbox.d.ts +1 -0
  138. package/dist/src/computer-use/extension/lib/sandbox.js +1 -0
  139. package/dist/src/computer-use/extension/lib/shell.d.ts +1 -0
  140. package/dist/src/computer-use/extension/lib/shell.js +1 -0
  141. package/dist/src/computer-use/extension/tools/computer_use.js +1 -0
  142. package/dist/src/computer-use/tools.d.ts +1 -0
  143. package/dist/src/computer-use/tools.js +1 -0
  144. package/dist/src/context/build-dynamic-tools.js +1 -1
  145. package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
  146. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  147. package/dist/src/context/dynamic-tool-lifecycle.d.ts +1 -1
  148. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  149. package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
  150. package/dist/src/context/hook-lifecycle.d.ts +4 -3
  151. package/dist/src/context/hook-lifecycle.js +1 -1
  152. package/dist/src/context/key-names.d.ts +0 -1
  153. package/dist/src/context/key-names.js +1 -1
  154. package/dist/src/context/keys.d.ts +8 -14
  155. package/dist/src/context/keys.js +1 -1
  156. package/dist/src/context/memory-lifecycle.js +1 -1
  157. package/dist/src/context/memory-tools.d.ts +0 -1
  158. package/dist/src/context/provider.d.ts +1 -3
  159. package/dist/src/context/run-step.d.ts +2 -3
  160. package/dist/src/context/run-step.js +1 -1
  161. package/dist/src/context/serialize.js +1 -1
  162. package/dist/src/discover/bundled-extension.js +1 -1
  163. package/dist/src/discover/discover-agent.js +1 -1
  164. package/dist/src/discover/extensions.d.ts +0 -7
  165. package/dist/src/discover/extensions.js +1 -1
  166. package/dist/src/discover/manifest.d.ts +4 -0
  167. package/dist/src/evals/assertions/run.d.ts +4 -3
  168. package/dist/src/evals/assertions/run.js +1 -1
  169. package/dist/src/evals/index.d.ts +1 -1
  170. package/dist/src/evals/match.d.ts +4 -4
  171. package/dist/src/evals/mock-model.js +1 -1
  172. package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
  173. package/dist/src/evals/runner/derive-run-facts.js +1 -1
  174. package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
  175. package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
  176. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  177. package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
  178. package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
  179. package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
  180. package/dist/src/evals/runner/reporters/datadog.js +2 -3
  181. package/dist/src/evals/session-content.js +1 -1
  182. package/dist/src/evals/session.d.ts +4 -4
  183. package/dist/src/evals/session.js +2 -2
  184. package/dist/src/evals/types.d.ts +18 -15
  185. package/dist/src/eve-channel/create-request.d.ts +5 -4
  186. package/dist/src/eve-channel/create-request.js +1 -1
  187. package/dist/src/eve-channel/index.d.ts +0 -9
  188. package/dist/src/eve-channel/index.js +1 -1
  189. package/dist/src/eve-channel/request.d.ts +3 -7
  190. package/dist/src/eve-channel/request.js +1 -1
  191. package/dist/src/eve-channel/support.d.ts +15 -5
  192. package/dist/src/eve-channel/support.js +1 -1
  193. package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
  194. package/dist/src/eve-channel/turn-policy-request.js +1 -0
  195. package/dist/src/eve-channel/types.d.ts +4 -0
  196. package/dist/src/execution/agent-sessions/context.d.ts +60 -0
  197. package/dist/src/execution/agent-sessions/context.js +1 -0
  198. package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
  199. package/dist/src/execution/agent-sessions/remote.js +1 -0
  200. package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
  201. package/dist/src/execution/agent-sessions/requests.js +1 -0
  202. package/dist/src/execution/agent-sessions/session.d.ts +12 -0
  203. package/dist/src/execution/agent-sessions/session.js +1 -0
  204. package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
  205. package/dist/src/execution/agent-sessions/steps.js +1 -0
  206. package/dist/src/execution/agent-sessions/target.d.ts +45 -0
  207. package/dist/src/execution/agent-sessions/target.js +1 -0
  208. package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
  209. package/dist/src/execution/agent-sessions/usage.js +1 -0
  210. package/dist/src/execution/authorization-callback-match.d.ts +2 -4
  211. package/dist/src/execution/authorization-callback-match.js +1 -1
  212. package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
  213. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  214. package/dist/src/execution/cancelled-model-call-batch.js +1 -1
  215. package/dist/src/execution/connection-announcement.d.ts +7 -0
  216. package/dist/src/execution/connection-announcement.js +4 -0
  217. package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
  218. package/dist/src/execution/continuation-conflict-step.js +1 -1
  219. package/dist/src/execution/coordination-dispatch-shared.d.ts +9 -27
  220. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  221. package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
  222. package/dist/src/execution/coordination-dispatch-step.js +1 -1
  223. package/dist/src/execution/create-session-step.d.ts +0 -1
  224. package/dist/src/execution/create-session-step.js +1 -1
  225. package/dist/src/execution/deliver-payloads.js +1 -1
  226. package/dist/src/execution/durable-session-store.d.ts +0 -1
  227. package/dist/src/execution/dynamic-connections.js +1 -1
  228. package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
  229. package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
  230. package/dist/src/execution/dynamic-workflow/schema.js +1 -1
  231. package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
  232. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  233. package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
  234. package/dist/src/execution/forward-session-input.d.ts +4 -0
  235. package/dist/src/execution/forward-session-input.js +1 -0
  236. package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
  237. package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
  238. package/dist/src/execution/legacy-session/authorization.js +1 -1
  239. package/dist/src/execution/legacy-session/completion-step.js +1 -1
  240. package/dist/src/execution/legacy-session/inbox.js +1 -1
  241. package/dist/src/execution/legacy-session/input.js +1 -1
  242. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  243. package/dist/src/execution/model-call-batching.js +1 -1
  244. package/dist/src/execution/node-step.d.ts +1 -1
  245. package/dist/src/execution/node-step.js +1 -1
  246. package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
  247. package/dist/src/execution/proxied-deliver-step.js +1 -1
  248. package/dist/src/execution/publish-session-events.d.ts +130 -0
  249. package/dist/src/execution/publish-session-events.js +1 -0
  250. package/dist/src/execution/route-child-delivery.d.ts +5 -4
  251. package/dist/src/execution/route-child-delivery.js +1 -3
  252. package/dist/src/execution/runtime-context.js +1 -1
  253. package/dist/src/execution/sandbox/prewarm.js +1 -1
  254. package/dist/src/execution/session/admission.d.ts +1 -12
  255. package/dist/src/execution/session/admission.js +1 -1
  256. package/dist/src/execution/session/entry-input.d.ts +0 -2
  257. package/dist/src/execution/session/entry.js +1 -1
  258. package/dist/src/execution/session/finalization.js +1 -1
  259. package/dist/src/execution/session/handoff-steps.d.ts +13 -2
  260. package/dist/src/execution/session/handoff-steps.js +1 -1
  261. package/dist/src/execution/session/handoff.d.ts +17 -3
  262. package/dist/src/execution/session/handoff.js +1 -1
  263. package/dist/src/execution/session/input-queue.d.ts +27 -28
  264. package/dist/src/execution/session/input-queue.js +1 -1
  265. package/dist/src/execution/session/next-input.d.ts +5 -0
  266. package/dist/src/execution/session/next-input.js +1 -1
  267. package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
  268. package/dist/src/execution/session/pending-turn-state.js +1 -1
  269. package/dist/src/execution/session/principal.d.ts +14 -0
  270. package/dist/src/execution/session/principal.js +1 -0
  271. package/dist/src/execution/session/program.js +1 -1
  272. package/dist/src/execution/session/route-selected-delivery.js +1 -1
  273. package/dist/src/execution/session/state-cursor.d.ts +17 -15
  274. package/dist/src/execution/session/state-cursor.js +1 -1
  275. package/dist/src/execution/session/state-delta.d.ts +33 -0
  276. package/dist/src/execution/session/state-delta.js +1 -0
  277. package/dist/src/execution/session/timeout-steps.js +1 -1
  278. package/dist/src/execution/session/turn-event-handler.d.ts +27 -0
  279. package/dist/src/execution/session/turn-event-handler.js +1 -0
  280. package/dist/src/execution/session/turn-step-result.d.ts +1 -3
  281. package/dist/src/execution/session/turn-step-result.js +1 -1
  282. package/dist/src/execution/session/turn-step-types.d.ts +24 -15
  283. package/dist/src/execution/session/turn-step.d.ts +2 -2
  284. package/dist/src/execution/session/turn-step.js +1 -1
  285. package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
  286. package/dist/src/execution/session/turn-waiting-step.js +1 -0
  287. package/dist/src/execution/session/turn.d.ts +33 -2
  288. package/dist/src/execution/session/turn.js +1 -1
  289. package/dist/src/execution/session-callback-request.js +1 -1
  290. package/dist/src/execution/session-event-stream.d.ts +33 -0
  291. package/dist/src/execution/session-event-stream.js +1 -0
  292. package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
  293. package/dist/src/execution/session-inbox/inbox.js +1 -1
  294. package/dist/src/execution/session-inbox/protocol.js +1 -1
  295. package/dist/src/execution/session-inbox/release-step.js +1 -1
  296. package/dist/src/execution/session-inbox/resume.js +1 -1
  297. package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
  298. package/dist/src/execution/session-workflow-tool-run.js +1 -1
  299. package/dist/src/execution/session.d.ts +0 -1
  300. package/dist/src/execution/session.js +2 -2
  301. package/dist/src/execution/settle-cancelled-turn-step.d.ts +21 -9
  302. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  303. package/dist/src/execution/stable-workflow-names.d.ts +0 -1
  304. package/dist/src/execution/stable-workflow-names.js +1 -1
  305. package/dist/src/execution/tasks/calls.d.ts +42 -0
  306. package/dist/src/execution/tasks/calls.js +1 -0
  307. package/dist/src/execution/tasks/model-step.d.ts +58 -0
  308. package/dist/src/execution/tasks/model-step.js +1 -0
  309. package/dist/src/execution/tasks/render.d.ts +66 -0
  310. package/dist/src/execution/tasks/render.js +8 -0
  311. package/dist/src/execution/tasks/session.d.ts +19 -0
  312. package/dist/src/execution/tasks/session.js +1 -0
  313. package/dist/src/execution/tasks/start.d.ts +34 -0
  314. package/dist/src/execution/tasks/start.js +1 -0
  315. package/dist/src/execution/tasks/steps.d.ts +31 -0
  316. package/dist/src/execution/tasks/steps.js +1 -0
  317. package/dist/src/execution/tasks/table.d.ts +192 -0
  318. package/dist/src/execution/tasks/table.js +1 -0
  319. package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
  320. package/dist/src/execution/tasks/task-id-input.js +1 -0
  321. package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
  322. package/dist/src/execution/tasks/tool-entry-point.js +1 -0
  323. package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
  324. package/dist/src/execution/tasks/workflow-target.js +1 -1
  325. package/dist/src/execution/terminal-session-completion-step.js +1 -1
  326. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  327. package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
  328. package/dist/src/execution/terminate-child-sessions-step.js +1 -1
  329. package/dist/src/execution/tool-auth.js +1 -1
  330. package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
  331. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  332. package/dist/src/execution/tools/agent-router.d.ts +1 -1
  333. package/dist/src/execution/tools/agent-router.js +1 -1
  334. package/dist/src/execution/tools/connection-approval.d.ts +25 -0
  335. package/dist/src/execution/tools/connection-approval.js +1 -0
  336. package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
  337. package/dist/src/execution/tools/connection-search-rank.js +1 -0
  338. package/dist/src/execution/tools/connection-target.d.ts +13 -0
  339. package/dist/src/execution/tools/connection-target.js +1 -0
  340. package/dist/src/execution/tools/connection-tools.d.ts +10 -0
  341. package/dist/src/execution/tools/connection-tools.js +2 -0
  342. package/dist/src/execution/tools/load-skill.js +1 -1
  343. package/dist/src/execution/tools/workflow/answer.d.ts +10 -4
  344. package/dist/src/execution/tools/workflow/answer.js +1 -1
  345. package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
  346. package/dist/src/execution/tools/workflow/ask.js +1 -1
  347. package/dist/src/execution/tools/workflow/body.d.ts +60 -19
  348. package/dist/src/execution/tools/workflow/body.js +1 -1
  349. package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
  350. package/dist/src/execution/tools/workflow/cancel.js +1 -1
  351. package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
  352. package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
  353. package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
  354. package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
  355. package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
  356. package/dist/src/execution/tools/workflow/interrupt.js +1 -0
  357. package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
  358. package/dist/src/execution/tools/workflow/messages.js +1 -1
  359. package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
  360. package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
  361. package/dist/src/execution/tools/workflow/owner.js +1 -1
  362. package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
  363. package/dist/src/execution/tools/workflow/serve.js +1 -0
  364. package/dist/src/execution/tools/workflow/start.d.ts +18 -11
  365. package/dist/src/execution/tools/workflow/start.js +1 -1
  366. package/dist/src/execution/tools/workflow/step-execution.js +1 -1
  367. package/dist/src/execution/tools/workflow/step.js +1 -1
  368. package/dist/src/execution/tools/workflow/types.d.ts +0 -10
  369. package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
  370. package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
  371. package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
  372. package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
  373. package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
  374. package/dist/src/execution/tools/workflow/workflow.js +1 -1
  375. package/dist/src/execution/web-fetch/request.js +1 -1
  376. package/dist/src/execution/workflow-callback-url.d.ts +0 -5
  377. package/dist/src/execution/workflow-callback-url.js +1 -1
  378. package/dist/src/execution/workflow-runtime.d.ts +3 -5
  379. package/dist/src/execution/workflow-runtime.js +1 -1
  380. package/dist/src/execution/workflow-webhook-route.js +1 -1
  381. package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
  382. package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
  383. package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
  384. package/dist/src/extensions/code/extension/lib/sandbox.d.ts +3 -2
  385. package/dist/src/extensions/code/extension/lib/sandbox.js +1 -1
  386. package/dist/src/extensions/code/extension/lib/signed-commit.d.ts +1 -1
  387. package/dist/src/extensions/code/extension/lib/signed-commit.js +2 -2
  388. package/dist/src/extensions/code/tools.d.ts +2 -1
  389. package/dist/src/extensions/code/tools.js +1 -1
  390. package/dist/src/framework/sources/modules/agent.d.ts +1 -0
  391. package/dist/src/framework/sources/modules/agent.js +1 -1
  392. package/dist/src/framework/sources/registry.js +1 -1
  393. package/dist/src/harness/action-presentation.js +1 -1
  394. package/dist/src/harness/action-result-helpers.d.ts +1 -0
  395. package/dist/src/harness/action-result-helpers.js +1 -1
  396. package/dist/src/harness/advertised-tools.d.ts +1 -1
  397. package/dist/src/harness/advertised-tools.js +1 -1
  398. package/dist/src/harness/announcements.d.ts +22 -0
  399. package/dist/src/harness/announcements.js +1 -0
  400. package/dist/src/harness/approval-candidates.d.ts +10 -2
  401. package/dist/src/harness/approval-candidates.js +1 -1
  402. package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
  403. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  404. package/dist/src/harness/approval-recheck.d.ts +7 -0
  405. package/dist/src/harness/approval-recheck.js +1 -0
  406. package/dist/src/harness/authorization-event-fields.d.ts +13 -0
  407. package/dist/src/harness/authorization-event-fields.js +1 -0
  408. package/dist/src/harness/authorization.d.ts +2 -1
  409. package/dist/src/harness/authorization.js +1 -1
  410. package/dist/src/harness/coordination.d.ts +31 -27
  411. package/dist/src/harness/coordination.js +1 -1
  412. package/dist/src/harness/current-messages.d.ts +6 -1
  413. package/dist/src/harness/current-messages.js +1 -1
  414. package/dist/src/harness/emission.d.ts +7 -1
  415. package/dist/src/harness/emission.js +1 -1
  416. package/dist/src/harness/execute-tool.d.ts +4 -15
  417. package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
  418. package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
  419. package/dist/src/harness/input-request-resolution.d.ts +5 -2
  420. package/dist/src/harness/input-request-resolution.js +1 -1
  421. package/dist/src/harness/input-requests.js +1 -1
  422. package/dist/src/harness/messages.d.ts +11 -3
  423. package/dist/src/harness/messages.js +1 -1
  424. package/dist/src/harness/nested-actions.d.ts +23 -0
  425. package/dist/src/harness/nested-actions.js +1 -0
  426. package/dist/src/harness/pending-input-batches.d.ts +8 -6
  427. package/dist/src/harness/pending-input-batches.js +1 -1
  428. package/dist/src/harness/provider-tool-history.d.ts +7 -2
  429. package/dist/src/harness/provider-tool-history.js +1 -1
  430. package/dist/src/harness/proxy-input-requests.d.ts +41 -36
  431. package/dist/src/harness/proxy-input-requests.js +1 -1
  432. package/dist/src/harness/session-limit-enforcement.js +1 -1
  433. package/dist/src/harness/stale-input-responses.js +1 -1
  434. package/dist/src/harness/step-hooks.js +1 -1
  435. package/dist/src/harness/tool-loop.js +2 -2
  436. package/dist/src/harness/tool-model-output.js +1 -1
  437. package/dist/src/harness/tool-presentation.js +1 -1
  438. package/dist/src/harness/tools.d.ts +1 -5
  439. package/dist/src/harness/tools.js +1 -1
  440. package/dist/src/harness/turn-tag-state.d.ts +6 -5
  441. package/dist/src/harness/types.d.ts +7 -15
  442. package/dist/src/harness/workflow-dispatch.d.ts +30 -0
  443. package/dist/src/harness/workflow-dispatch.js +1 -0
  444. package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
  445. package/dist/src/harness/workflow-tool-runs.js +1 -1
  446. package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
  447. package/dist/src/instrumentation/lifecycle.d.ts +5 -2
  448. package/dist/src/instrumentation/lifecycle.js +1 -1
  449. package/dist/src/instrumentation/native-events.d.ts +0 -7
  450. package/dist/src/instrumentation/native-events.js +1 -1
  451. package/dist/src/instrumentation/runtime.d.ts +1 -4
  452. package/dist/src/instrumentation/runtime.js +1 -1
  453. package/dist/src/instrumentation/state.d.ts +0 -6
  454. package/dist/src/instrumentation/state.js +1 -1
  455. package/dist/src/internal/application/package.js +1 -1
  456. package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
  457. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  458. package/dist/src/internal/authored-module-loader.d.ts +12 -6
  459. package/dist/src/internal/authored-module-loader.js +2 -2
  460. package/dist/src/internal/authored-module-map-loader.js +1 -1
  461. package/dist/src/internal/authored-package-boundary.d.ts +3 -0
  462. package/dist/src/internal/authored-package-boundary.js +1 -1
  463. package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
  464. package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
  465. package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
  466. package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
  467. package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
  468. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  469. package/dist/src/internal/mount-state.d.ts +1 -0
  470. package/dist/src/internal/mount-state.js +1 -0
  471. package/dist/src/internal/nitro/dev-runtime-artifacts-retention.d.ts +2 -2
  472. package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -1
  473. package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +2 -4
  474. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  475. package/dist/src/internal/nitro/dev-runtime-generation-metadata.d.ts +13 -0
  476. package/dist/src/internal/nitro/dev-runtime-generation-metadata.js +1 -0
  477. package/dist/src/internal/nitro/development-generation.d.ts +2 -0
  478. package/dist/src/internal/nitro/development-generation.js +1 -1
  479. package/dist/src/internal/nitro/host/build-application.js +1 -1
  480. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  481. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +1 -0
  482. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
  483. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  484. package/dist/src/internal/nitro/host/dev-workflow-world-setup.d.ts +1 -0
  485. package/dist/src/internal/nitro/host/dev-workflow-world-setup.js +1 -1
  486. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
  487. package/dist/src/internal/nitro/host/start-development-server.js +1 -1
  488. package/dist/src/internal/nitro/host/types.d.ts +2 -0
  489. package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
  490. package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
  491. package/dist/src/internal/node-esm-compat-banner.js +1 -1
  492. package/dist/src/internal/workflow/cancel-expired-development-run.d.ts +2 -0
  493. package/dist/src/internal/workflow/cancel-expired-development-run.js +1 -0
  494. package/dist/src/internal/workflow/development-runtime-compatibility.d.ts +12 -0
  495. package/dist/src/internal/workflow/development-runtime-compatibility.js +1 -0
  496. package/dist/src/internal/workflow/development-world-client.js +1 -1
  497. package/dist/src/internal/workflow/development-world-protocol.d.ts +9 -0
  498. package/dist/src/internal/workflow/development-world-server.d.ts +2 -0
  499. package/dist/src/internal/workflow/development-world-server.js +1 -1
  500. package/dist/src/internal/workflow/is-inactive-workflow-run-error.d.ts +2 -0
  501. package/dist/src/internal/workflow/is-inactive-workflow-run-error.js +1 -0
  502. package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
  503. package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
  504. package/dist/src/internal/workflow-bundle/builder.js +1 -1
  505. package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
  506. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  507. package/dist/src/models/auto.d.ts +6 -0
  508. package/dist/src/models/auto.js +2 -2
  509. package/dist/src/protocol/message-version.d.ts +1 -0
  510. package/dist/src/protocol/message-version.js +1 -1
  511. package/dist/src/protocol/message.d.ts +126 -67
  512. package/dist/src/protocol/message.js +2 -2
  513. package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
  514. package/dist/src/protocol/remote-agent-protocol.js +1 -0
  515. package/dist/src/protocol/routes.d.ts +0 -6
  516. package/dist/src/protocol/routes.js +1 -1
  517. package/dist/src/protocol/task-tools.d.ts +21 -0
  518. package/dist/src/protocol/task-tools.js +1 -0
  519. package/dist/src/public/channels/auth.js +1 -1
  520. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
  521. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  522. package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
  523. package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
  524. package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
  525. package/dist/src/public/channels/index.d.ts +1 -1
  526. package/dist/src/public/channels/linq/linqChannel.js +1 -1
  527. package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
  528. package/dist/src/public/channels/slack/action-status.d.ts +11 -12
  529. package/dist/src/public/channels/slack/action-status.js +1 -1
  530. package/dist/src/public/channels/slack/api.js +1 -1
  531. package/dist/src/public/channels/slack/attachments.js +1 -1
  532. package/dist/src/public/channels/slack/auth.d.ts +3 -0
  533. package/dist/src/public/channels/slack/auth.js +1 -1
  534. package/dist/src/public/channels/slack/connections.d.ts +6 -6
  535. package/dist/src/public/channels/slack/connections.js +1 -1
  536. package/dist/src/public/channels/slack/defaults.d.ts +13 -19
  537. package/dist/src/public/channels/slack/defaults.js +4 -4
  538. package/dist/src/public/channels/slack/hitl.d.ts +22 -13
  539. package/dist/src/public/channels/slack/hitl.js +2 -2
  540. package/dist/src/public/channels/slack/index.d.ts +4 -3
  541. package/dist/src/public/channels/slack/index.js +1 -1
  542. package/dist/src/public/channels/slack/input-response.d.ts +1 -5
  543. package/dist/src/public/channels/slack/input-response.js +1 -1
  544. package/dist/src/public/channels/slack/interaction-cards.js +1 -1
  545. package/dist/src/public/channels/slack/interactions.js +1 -1
  546. package/dist/src/public/channels/slack/renderers.d.ts +76 -0
  547. package/dist/src/public/channels/slack/renderers.js +1 -0
  548. package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
  549. package/dist/src/public/channels/slack/session-operations.js +1 -1
  550. package/dist/src/public/channels/slack/slackChannel.d.ts +47 -103
  551. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  552. package/dist/src/public/channels/slack/task-card.d.ts +24 -0
  553. package/dist/src/public/channels/slack/task-card.js +1 -0
  554. package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
  555. package/dist/src/public/channels/telegram/hitl.js +2 -1
  556. package/dist/src/public/channels/telegram/state.js +1 -1
  557. package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
  558. package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
  559. package/dist/src/public/definitions/channel.d.ts +6 -1
  560. package/dist/src/public/definitions/channel.js +1 -1
  561. package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
  562. package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
  563. package/dist/src/public/definitions/extension.d.ts +2 -2
  564. package/dist/src/public/definitions/extension.js +1 -1
  565. package/dist/src/public/definitions/hook.d.ts +16 -4
  566. package/dist/src/public/definitions/state.d.ts +4 -2
  567. package/dist/src/public/definitions/state.js +1 -1
  568. package/dist/src/public/memory/index.d.ts +0 -1
  569. package/dist/src/public/models/openai/index.d.ts +1 -1
  570. package/dist/src/public/models/openai/index.js +1 -1
  571. package/dist/src/public/schedules/index.d.ts +1 -0
  572. package/dist/src/public/schedules/index.js +1 -1
  573. package/dist/src/public/server/index.d.ts +28 -0
  574. package/dist/src/public/server/index.js +1 -0
  575. package/dist/src/public/tools/index.d.ts +3 -2
  576. package/dist/src/public/tools/index.js +1 -1
  577. package/dist/src/public/tools/no-reply.d.ts +1 -0
  578. package/dist/src/public/tools/no-reply.js +1 -0
  579. package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
  580. package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
  581. package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
  582. package/dist/src/runtime/agent/bootstrap.js +1 -1
  583. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  584. package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
  585. package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
  586. package/dist/src/runtime/channels/registry.js +1 -1
  587. package/dist/src/runtime/connections/mcp-client.d.ts +1 -2
  588. package/dist/src/runtime/connections/openapi-client.js +1 -1
  589. package/dist/src/runtime/connections/scoped-authorization.d.ts +1 -1
  590. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  591. package/dist/src/runtime/connections/tool-result.d.ts +27 -0
  592. package/dist/src/runtime/connections/tool-result.js +2 -0
  593. package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
  594. package/dist/src/runtime/connections/tool-signature.js +1 -0
  595. package/dist/src/runtime/local-dev-capability.js +1 -1
  596. package/dist/src/runtime/prompt/compose.d.ts +1 -3
  597. package/dist/src/runtime/prompt/compose.js +3 -3
  598. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  599. package/dist/src/runtime/resolve-tool.js +1 -1
  600. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  601. package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
  602. package/dist/src/runtime/sessions/turn.d.ts +1 -16
  603. package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
  604. package/dist/src/runtime/subagents/registry.js +1 -1
  605. package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
  606. package/dist/src/runtime/subagents/workflow-reference.js +1 -1
  607. package/dist/src/runtime/subagents/workflow.d.ts +12 -6
  608. package/dist/src/runtime/subagents/workflow.js +1 -1
  609. package/dist/src/runtime/tools/registry.js +1 -1
  610. package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
  611. package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
  612. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
  613. package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
  614. package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
  615. package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
  616. package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
  617. package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
  618. package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -1
  619. package/dist/src/self-modification/scaffold.d.ts +2 -0
  620. package/dist/src/self-modification/scaffold.js +7 -0
  621. package/dist/src/self-modification/setup.js +1 -7
  622. package/dist/src/setup/boxes/model-capabilities.d.ts +2 -2
  623. package/dist/src/setup/boxes/model-capabilities.js +1 -1
  624. package/dist/src/setup/boxes/select-model.js +1 -1
  625. package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
  626. package/dist/src/setup/integrations/shopify/templates.js +31 -19
  627. package/dist/src/setup/integrations/web/setup.d.ts +0 -2
  628. package/dist/src/setup/integrations/web/setup.js +3 -3
  629. package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
  630. package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
  631. package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
  632. package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
  633. package/dist/src/setup/scaffold/create/project.js +3 -10
  634. package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
  635. package/dist/src/setup/scaffold/create/web-template.js +1 -1
  636. package/dist/src/shared/action-request-name.d.ts +3 -0
  637. package/dist/src/shared/action-request-name.js +1 -0
  638. package/dist/src/shared/action-types.d.ts +49 -21
  639. package/dist/src/shared/action-types.js +1 -1
  640. package/dist/src/shared/agent-definition.d.ts +0 -7
  641. package/dist/src/shared/chatgpt-model.d.ts +1 -1
  642. package/dist/src/shared/chatgpt-model.js +1 -1
  643. package/dist/src/shared/connection-types.d.ts +2 -3
  644. package/dist/src/shared/default-agent-model.d.ts +10 -1
  645. package/dist/src/shared/default-agent-model.js +1 -1
  646. package/dist/src/shared/extension-mount.d.ts +2 -0
  647. package/dist/src/shared/extension-mount.js +1 -0
  648. package/dist/src/shared/format-duration.d.ts +2 -0
  649. package/dist/src/shared/format-duration.js +1 -0
  650. package/dist/src/shared/gateway-model-catalog.d.ts +25 -2
  651. package/dist/src/shared/gateway-model-catalog.js +1 -1
  652. package/dist/src/shared/input.d.ts +1 -0
  653. package/dist/src/shared/memory-state.d.ts +1 -0
  654. package/dist/src/shared/memory-state.js +1 -1
  655. package/dist/src/shared/model-helper.d.ts +2 -2
  656. package/dist/src/shared/model-helper.js +1 -1
  657. package/dist/src/shared/model-summary.d.ts +2 -6
  658. package/dist/src/shared/model-summary.js +1 -1
  659. package/dist/src/shared/presentation-text.d.ts +5 -0
  660. package/dist/src/shared/presentation-text.js +1 -1
  661. package/dist/src/shared/serialized-observability-state.d.ts +0 -4
  662. package/dist/src/shared/serialized-observability-state.js +1 -1
  663. package/dist/src/shared/value-delta.d.ts +39 -0
  664. package/dist/src/shared/value-delta.js +1 -0
  665. package/dist/src/subagents/adapter-state.d.ts +0 -2
  666. package/dist/src/subagents/adapter-state.js +1 -1
  667. package/dist/src/subagents/adapter.js +1 -1
  668. package/dist/src/subagents/callback-route.js +1 -1
  669. package/dist/src/subagents/event-proxy-step.d.ts +16 -29
  670. package/dist/src/subagents/event-proxy-step.js +1 -1
  671. package/dist/src/subagents/hitl-proxy.d.ts +35 -17
  672. package/dist/src/subagents/hitl-proxy.js +1 -1
  673. package/dist/src/subagents/invocation.d.ts +1 -2
  674. package/dist/src/subagents/parent-notification.d.ts +2 -1
  675. package/dist/src/subagents/parent-notification.js +1 -1
  676. package/dist/src/subagents/token-budget.d.ts +8 -9
  677. package/dist/src/subagents/token-budget.js +1 -1
  678. package/dist/src/subagents/tool.d.ts +6 -12
  679. package/dist/src/subagents/tool.js +1 -1
  680. package/dist/src/svelte/index.js +1 -1
  681. package/dist/src/svelte/use-eve-agent.js +1 -1
  682. package/dist/src/tools/behavior.d.ts +5 -5
  683. package/dist/src/tools/definition.d.ts +58 -14
  684. package/dist/src/tools/definition.js +1 -1
  685. package/dist/src/tools/durable-callbacks.d.ts +1 -1
  686. package/dist/src/tools/dynamic.d.ts +6 -0
  687. package/dist/src/tools/framework/agent-contract.d.ts +2 -5
  688. package/dist/src/tools/framework/agent-contract.js +1 -1
  689. package/dist/src/tools/framework/agent.d.ts +2 -5
  690. package/dist/src/tools/framework/agent.js +1 -1
  691. package/dist/src/tools/framework/connection-tools.d.ts +3 -0
  692. package/dist/src/tools/framework/connection-tools.js +1 -0
  693. package/dist/src/tools/provided/agent-router.d.ts +6 -3
  694. package/dist/src/tools/provided/agent-router.js +1 -1
  695. package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
  696. package/dist/src/tools/provided/ask-question-workflow.js +1 -0
  697. package/dist/src/tools/provided/ask-question.d.ts +20 -5
  698. package/dist/src/tools/provided/ask-question.js +2 -1
  699. package/dist/src/tools/provided/interrupted.d.ts +18 -0
  700. package/dist/src/tools/provided/interrupted.js +1 -0
  701. package/dist/src/tools/provided/no-reply.d.ts +19 -0
  702. package/dist/src/tools/provided/no-reply.js +1 -0
  703. package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
  704. package/dist/src/tools/provided/sleep-workflow.js +1 -0
  705. package/dist/src/tools/provided/sleep.d.ts +11 -5
  706. package/dist/src/tools/provided/sleep.js +1 -1
  707. package/dist/src/tools/provided/task-cancel.d.ts +6 -0
  708. package/dist/src/tools/provided/task-cancel.js +1 -0
  709. package/dist/src/tools/provided/task-wait.d.ts +9 -0
  710. package/dist/src/tools/provided/task-wait.js +1 -0
  711. package/dist/src/tools/provided/workflow.d.ts +2 -2
  712. package/dist/src/tools/provided/workflow.js +1 -1
  713. package/dist/src/tools/schema-emission.d.ts +23 -0
  714. package/dist/src/tools/schema-emission.js +1 -0
  715. package/dist/src/tools/schema.d.ts +22 -8
  716. package/dist/src/tools/schema.js +1 -1
  717. package/dist/src/tools/workflow-definition.d.ts +187 -85
  718. package/dist/src/tools/workflow-definition.js +1 -1
  719. package/dist/src/tools/workflow-entry-point.d.ts +3 -0
  720. package/dist/src/tools/workflow-entry-point.js +1 -0
  721. package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
  722. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  723. package/dist/src/tracing/agent-invocation-coordinator.d.ts +9 -18
  724. package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
  725. package/dist/src/tracing/agent-otel-content.d.ts +0 -2
  726. package/dist/src/tracing/agent-otel-content.js +3 -3
  727. package/dist/src/tracing/agent-otel-provider.js +2 -2
  728. package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
  729. package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
  730. package/dist/src/tracing/agent-otel-usage.js +1 -1
  731. package/dist/src/tracing/agent-span-contract.d.ts +1 -1
  732. package/dist/src/tracing/agent-span-contract.js +1 -1
  733. package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
  734. package/dist/src/tracing/agent-span-id-generator.js +1 -1
  735. package/dist/src/tracing/agent-trace-context-codec.d.ts +1 -2
  736. package/dist/src/tracing/agent-trace-context-codec.js +1 -1
  737. package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
  738. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  739. package/dist/src/tracing/agent-trace-state.d.ts +1 -19
  740. package/dist/src/tracing/content-attributes.js +1 -1
  741. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  742. package/dist/src/vue/index.js +1 -1
  743. package/dist/src/vue/use-eve-agent.js +1 -1
  744. package/docs/agent-config.md +36 -13
  745. package/docs/channels/chat-sdk.mdx +15 -4
  746. package/docs/channels/custom.mdx +89 -17
  747. package/docs/channels/eve.mdx +1 -1
  748. package/docs/channels/mcp.mdx +1 -1
  749. package/docs/channels/overview.mdx +14 -56
  750. package/docs/channels/slack.mdx +230 -35
  751. package/docs/channels/telegram.mdx +2 -0
  752. package/docs/concepts/built-in-tools.md +36 -28
  753. package/docs/concepts/context-control.md +2 -2
  754. package/docs/concepts/execution-model-and-durability.mdx +10 -11
  755. package/docs/concepts/project-structure.mdx +1 -1
  756. package/docs/concepts/sessions-runs-and-streaming.md +67 -47
  757. package/docs/connections/mcp.mdx +4 -4
  758. package/docs/connections/openapi.mdx +2 -2
  759. package/docs/connections/overview.mdx +2 -2
  760. package/docs/evals/assertions.mdx +5 -5
  761. package/docs/evals/cases.mdx +1 -1
  762. package/docs/evals/reporters.mdx +6 -4
  763. package/docs/extensions.md +11 -2
  764. package/docs/guides/auth-and-route-protection.md +1 -1
  765. package/docs/guides/client/streaming.mdx +31 -11
  766. package/docs/guides/deployment/vercel.mdx +1 -1
  767. package/docs/guides/dev-tui.md +13 -3
  768. package/docs/guides/dynamic-capabilities.md +15 -10
  769. package/docs/guides/evaluate.md +29 -2
  770. package/docs/guides/frontend/overview.mdx +5 -7
  771. package/docs/guides/hooks.md +48 -12
  772. package/docs/guides/instrumentation/instrumentation.mdx +2 -0
  773. package/docs/guides/remote-agents.md +12 -14
  774. package/docs/guides/self-modification.md +10 -0
  775. package/docs/install-integrations.mdx +1 -1
  776. package/docs/instructions.mdx +1 -1
  777. package/docs/patterns/multi-tenant-approvals.md +1 -1
  778. package/docs/protocols/ucp.mdx +20 -16
  779. package/docs/reference/cli.md +96 -22
  780. package/docs/reference/typescript-api.md +43 -41
  781. package/docs/schedules.mdx +14 -34
  782. package/docs/subagents/index.mdx +24 -56
  783. package/docs/tools/human-in-the-loop.md +50 -13
  784. package/docs/tools/meta.json +1 -1
  785. package/docs/tools/overview.mdx +79 -59
  786. package/docs/tools/tasks-upgrade.md +201 -0
  787. package/docs/tools/tasks.md +315 -0
  788. package/docs/tools/workflows.mdx +368 -154
  789. package/package.json +41 -14
  790. package/dist/src/channel/activity-renderer.d.ts +0 -21
  791. package/dist/src/channel/activity-renderer.js +0 -1
  792. package/dist/src/channel/activity-sink.d.ts +0 -2
  793. package/dist/src/channel/activity-sink.js +0 -1
  794. package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
  795. package/dist/src/eve-channel/activity-observer-request.js +0 -1
  796. package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
  797. package/dist/src/eve-channel/delivery-policy-request.js +0 -1
  798. package/dist/src/execution/activity-cohort.d.ts +0 -20
  799. package/dist/src/execution/activity-cohort.js +0 -1
  800. package/dist/src/execution/activity-collector.d.ts +0 -12
  801. package/dist/src/execution/activity-collector.js +0 -1
  802. package/dist/src/execution/activity-events.d.ts +0 -8
  803. package/dist/src/execution/activity-events.js +0 -1
  804. package/dist/src/execution/activity-route.d.ts +0 -2
  805. package/dist/src/execution/activity-route.js +0 -1
  806. package/dist/src/execution/activity-work-id.d.ts +0 -9
  807. package/dist/src/execution/activity-work-id.js +0 -1
  808. package/dist/src/execution/activity-work.d.ts +0 -30
  809. package/dist/src/execution/activity-work.js +0 -1
  810. package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
  811. package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
  812. package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
  813. package/dist/src/execution/dispatch-action-failures.js +0 -1
  814. package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
  815. package/dist/src/execution/dispatch-start-operation.js +0 -1
  816. package/dist/src/execution/publish-channel-event.d.ts +0 -23
  817. package/dist/src/execution/publish-channel-event.js +0 -1
  818. package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
  819. package/dist/src/execution/scheduled-launch-delivery.js +0 -1
  820. package/dist/src/execution/session/event-sink.d.ts +0 -26
  821. package/dist/src/execution/session/event-sink.js +0 -1
  822. package/dist/src/execution/session-activity-projection.d.ts +0 -16
  823. package/dist/src/execution/session-activity-projection.js +0 -1
  824. package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
  825. package/dist/src/execution/session-activity-renderer-step.js +0 -1
  826. package/dist/src/execution/session-activity.d.ts +0 -3
  827. package/dist/src/execution/session-activity.js +0 -1
  828. package/dist/src/execution/submit-activity.d.ts +0 -7
  829. package/dist/src/execution/submit-activity.js +0 -1
  830. package/dist/src/execution/task-event-callback.d.ts +0 -12
  831. package/dist/src/execution/task-event-callback.js +0 -1
  832. package/dist/src/execution/task-input-capability.d.ts +0 -4
  833. package/dist/src/execution/task-input-capability.js +0 -1
  834. package/dist/src/execution/task-input-response-route.d.ts +0 -2
  835. package/dist/src/execution/task-input-response-route.js +0 -1
  836. package/dist/src/execution/tasks/child/notify.d.ts +0 -44
  837. package/dist/src/execution/tasks/child/notify.js +0 -1
  838. package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
  839. package/dist/src/execution/tasks/parent/control-shared.js +0 -1
  840. package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
  841. package/dist/src/execution/tasks/parent/delegate.js +0 -1
  842. package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
  843. package/dist/src/execution/tasks/parent/dispatch.js +0 -1
  844. package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
  845. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
  846. package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
  847. package/dist/src/execution/tasks/parent/run-parent.js +0 -1
  848. package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
  849. package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
  850. package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
  851. package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
  852. package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
  853. package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
  854. package/dist/src/execution/terminal-session-event.d.ts +0 -13
  855. package/dist/src/execution/terminal-session-event.js +0 -1
  856. package/dist/src/execution/tools/ask-question-workflow.js +0 -1
  857. package/dist/src/execution/tools/ask-question.d.ts +0 -19
  858. package/dist/src/execution/tools/ask-question.js +0 -2
  859. package/dist/src/execution/tools/connection-search.d.ts +0 -2
  860. package/dist/src/execution/tools/connection-search.js +0 -2
  861. package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
  862. package/dist/src/execution/tools/sleep-workflow.js +0 -1
  863. package/dist/src/execution/tools/sleep.d.ts +0 -10
  864. package/dist/src/execution/tools/sleep.js +0 -1
  865. package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
  866. package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
  867. package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
  868. package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
  869. package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
  870. package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
  871. package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
  872. package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
  873. package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
  874. package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
  875. package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
  876. package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
  877. package/dist/src/execution/tools/subagent/start.d.ts +0 -51
  878. package/dist/src/execution/tools/subagent/start.js +0 -1
  879. package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
  880. package/dist/src/execution/tools/subagent/steer.js +0 -1
  881. package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
  882. package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
  883. package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
  884. package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
  885. package/dist/src/execution/tools/tasks.d.ts +0 -3
  886. package/dist/src/execution/tools/tasks.js +0 -1
  887. package/dist/src/execution/tools/workflow/background.js +0 -1
  888. package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
  889. package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
  890. package/dist/src/extensions/code/extension/tools/computer_use.js +0 -1
  891. package/dist/src/harness/background-tools.d.ts +0 -45
  892. package/dist/src/harness/background-tools.js +0 -1
  893. package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
  894. package/dist/src/instrumentation/background-task-runtime.js +0 -1
  895. package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
  896. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
  897. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
  898. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
  899. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
  900. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
  901. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
  902. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
  903. package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
  904. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
  905. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
  906. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
  907. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
  908. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
  909. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
  910. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
  911. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
  912. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
  913. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
  914. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
  915. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
  916. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
  917. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
  918. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
  919. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
  920. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
  921. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
  922. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
  923. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
  924. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
  925. package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
  926. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
  927. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
  928. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
  929. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
  930. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
  931. package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
  932. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
  933. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
  934. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
  935. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
  936. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
  937. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
  938. package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
  939. package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
  940. package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
  941. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
  942. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
  943. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
  944. package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
  945. package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
  946. package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
  947. package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
  948. package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
  949. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
  950. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
  951. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
  952. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
  953. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
  954. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
  955. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
  956. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
  957. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
  958. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
  959. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
  960. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
  961. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
  962. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
  963. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
  964. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
  965. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
  966. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
  967. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
  968. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
  969. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
  970. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
  971. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
  972. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
  973. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
  974. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
  975. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
  976. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
  977. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
  978. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
  979. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
  980. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
  981. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
  982. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
  983. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
  984. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
  985. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
  986. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
  987. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
  988. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
  989. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
  990. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
  991. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
  992. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
  993. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
  994. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
  995. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
  996. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
  997. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
  998. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
  999. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
  1000. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
  1001. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
  1002. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
  1003. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
  1004. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
  1005. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
  1006. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
  1007. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
  1008. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
  1009. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
  1010. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
  1011. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
  1012. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
  1013. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
  1014. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
  1015. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
  1016. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
  1017. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
  1018. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
  1019. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
  1020. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
  1021. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
  1022. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
  1023. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
  1024. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
  1025. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
  1026. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
  1027. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
  1028. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
  1029. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
  1030. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
  1031. package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
  1032. package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
  1033. package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
  1034. package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
  1035. package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
  1036. package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
  1037. package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
  1038. package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
  1039. package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
  1040. package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
  1041. package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
  1042. package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
  1043. package/dist/src/protocol/activity.d.ts +0 -112
  1044. package/dist/src/protocol/activity.js +0 -1
  1045. package/dist/src/protocol/agent-handle-error.d.ts +0 -13
  1046. package/dist/src/protocol/agent-handle-error.js +0 -1
  1047. package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
  1048. package/dist/src/public/channels/slack/activity-plan.js +0 -1
  1049. package/dist/src/public/channels/slack/activity.d.ts +0 -63
  1050. package/dist/src/public/channels/slack/activity.js +0 -2
  1051. package/dist/src/public/tools/connection-search.d.ts +0 -1
  1052. package/dist/src/public/tools/connection-search.js +0 -1
  1053. package/dist/src/public/tools/task-cancel.d.ts +0 -1
  1054. package/dist/src/public/tools/task-cancel.js +0 -1
  1055. package/dist/src/runtime/prompt/connections.d.ts +0 -9
  1056. package/dist/src/runtime/prompt/connections.js +0 -2
  1057. package/dist/src/shared/boundary-hook-error.d.ts +0 -4
  1058. package/dist/src/shared/boundary-hook-error.js +0 -1
  1059. package/dist/src/shared/empty-delivery.d.ts +0 -3
  1060. package/dist/src/shared/empty-delivery.js +0 -1
  1061. package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
  1062. package/dist/src/subagents/agent-handle-errors.js +0 -1
  1063. package/dist/src/subagents/callback-step.d.ts +0 -11
  1064. package/dist/src/subagents/callback-step.js +0 -1
  1065. package/dist/src/subagents/continuation-bundle.d.ts +0 -13
  1066. package/dist/src/subagents/continuation-bundle.js +0 -1
  1067. package/dist/src/subagents/handle-dispatch.d.ts +0 -65
  1068. package/dist/src/subagents/handle-dispatch.js +0 -1
  1069. package/dist/src/subagents/handles/operation-id.d.ts +0 -15
  1070. package/dist/src/subagents/handles/operation-id.js +0 -1
  1071. package/dist/src/subagents/handles/prompt.d.ts +0 -52
  1072. package/dist/src/subagents/handles/prompt.js +0 -3
  1073. package/dist/src/subagents/handles/query.d.ts +0 -41
  1074. package/dist/src/subagents/handles/query.js +0 -1
  1075. package/dist/src/subagents/handles/state-key.d.ts +0 -8
  1076. package/dist/src/subagents/handles/state-key.js +0 -1
  1077. package/dist/src/subagents/handles/store.d.ts +0 -217
  1078. package/dist/src/subagents/handles/store.js +0 -1
  1079. package/dist/src/subagents/handles/transitions.d.ts +0 -103
  1080. package/dist/src/subagents/handles/transitions.js +0 -1
  1081. package/dist/src/subagents/remote-dispatch.js +0 -1
  1082. package/dist/src/subagents/start-local.d.ts +0 -29
  1083. package/dist/src/subagents/start-local.js +0 -1
  1084. package/dist/src/subagents/start-remote.d.ts +0 -21
  1085. package/dist/src/subagents/start-remote.js +0 -1
  1086. package/dist/src/tasks/delivery-context.d.ts +0 -32
  1087. package/dist/src/tasks/delivery-context.js +0 -4
  1088. package/dist/src/tasks/delivery-policy.d.ts +0 -14
  1089. package/dist/src/tasks/delivery-policy.js +0 -1
  1090. package/dist/src/tasks/json.d.ts +0 -88
  1091. package/dist/src/tasks/json.js +0 -1
  1092. package/dist/src/tasks/notification.d.ts +0 -10
  1093. package/dist/src/tasks/notification.js +0 -1
  1094. package/dist/src/tasks/task-id.d.ts +0 -31
  1095. package/dist/src/tasks/task-id.js +0 -1
  1096. package/dist/src/tasks/task-inbox-token.d.ts +0 -2
  1097. package/dist/src/tasks/task-inbox-token.js +0 -1
  1098. package/dist/src/tasks/transitions.d.ts +0 -17
  1099. package/dist/src/tasks/transitions.js +0 -1
  1100. package/dist/src/tasks/types.d.ts +0 -136
  1101. package/dist/src/tasks/types.js +0 -1
  1102. package/dist/src/tools/framework/connection-search.d.ts +0 -3
  1103. package/dist/src/tools/framework/connection-search.js +0 -1
  1104. package/dist/src/tools/framework/task-cancel.d.ts +0 -4
  1105. package/dist/src/tools/framework/task-cancel.js +0 -1
  1106. package/dist/src/tools/framework/task-contract.d.ts +0 -19
  1107. package/dist/src/tools/framework/task-contract.js +0 -1
  1108. package/dist/src/tools/native-definition.d.ts +0 -7
  1109. package/dist/src/tools/native-definition.js +0 -1
  1110. package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
  1111. package/dist/src/tracing/agent-invocation-terminal.js +0 -1
  1112. /package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-driver-source.d.ts +0 -0
  1113. /package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-driver-source.js +0 -0
  1114. /package/dist/src/{extensions/code → computer-use}/extension/tools/computer_use.d.ts +0 -0
  1115. /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
  1116. /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_generate}from"../runtime/generate.js";var require_generate_key_pair=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.generateKeyPair=generateKeyPair;let t=require_generate();async function generateKeyPair(e,n){return(0,t.generateKeyPair)(e,n)}}));export default require_generate_key_pair();export{require_generate_key_pair};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_generate}from"../runtime/generate.js";var require_generate_secret=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.generateSecret=generateSecret;let t=require_generate();async function generateSecret(e,n){return(0,t.generateSecret)(e,n)}}));export default require_generate_secret();export{require_generate_secret};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_base64url}from"../runtime/base64url.js";import{require_errors}from"../util/errors.js";import{require_is_object}from"../lib/is_object.js";import{require_asn1}from"../runtime/asn1.js";import{require_jwk_to_key}from"../runtime/jwk_to_key.js";var require_import=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.importSPKI=importSPKI,e.importX509=importX509,e.importPKCS8=importPKCS8,e.importJWK=importJWK;let t=require_base64url(),n=require_asn1(),r=require_jwk_to_key(),i=require_errors(),a=require_is_object();async function importSPKI(e,t,r){if(typeof e!=`string`||e.indexOf(`-----BEGIN PUBLIC KEY-----`)!==0)throw TypeError(`"spki" must be SPKI formatted string`);return(0,n.fromSPKI)(e,t,r)}async function importX509(e,t,r){if(typeof e!=`string`||e.indexOf(`-----BEGIN CERTIFICATE-----`)!==0)throw TypeError(`"x509" must be X.509 formatted string`);return(0,n.fromX509)(e,t,r)}async function importPKCS8(e,t,r){if(typeof e!=`string`||e.indexOf(`-----BEGIN PRIVATE KEY-----`)!==0)throw TypeError(`"pkcs8" must be PKCS#8 formatted string`);return(0,n.fromPKCS8)(e,t,r)}async function importJWK(e,n){if(!(0,a.default)(e))throw TypeError(`JWK must be an object`);switch(n||=e.alg,e.kty){case`oct`:if(typeof e.k!=`string`||!e.k)throw TypeError(`missing "k" (Key Value) Parameter value`);return(0,t.decode)(e.k);case`RSA`:if(`oth`in e&&e.oth!==void 0)throw new i.JOSENotSupported(`RSA JWK "oth" (Other Primes Info) Parameter value is not supported`);case`EC`:case`OKP`:return(0,r.default)({...e,alg:n});default:throw new i.JOSENotSupported(`Unsupported "kty" (Key Type) Parameter value`)}}}));export default require_import();export{require_import};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_base64url}from"../runtime/base64url.js";import{require_decrypt}from"../runtime/decrypt.js";import{require_encrypt}from"../runtime/encrypt.js";var require_aesgcmkw=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.wrap=wrap,e.unwrap=unwrap;let t=require_encrypt(),n=require_decrypt(),r=require_base64url();async function wrap(e,n,i,a){let o=e.slice(0,7),s=await(0,t.default)(o,i,n,a,new Uint8Array);return{encryptedKey:s.ciphertext,iv:(0,r.encode)(s.iv),tag:(0,r.encode)(s.tag)}}async function unwrap(e,t,r,i,a){let o=e.slice(0,7);return(0,n.default)(o,t,r,i,a,new Uint8Array)}}));export default require_aesgcmkw();export{require_aesgcmkw};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_digest}from"../runtime/digest.js";var require_buffer_utils=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decoder=e.encoder=void 0,e.concat=concat,e.p2s=p2s,e.uint64be=uint64be,e.uint32be=uint32be,e.lengthAndInput=lengthAndInput,e.concatKdf=concatKdf;let t=require_digest();e.encoder=new TextEncoder,e.decoder=new TextDecoder;let n=2**32;function concat(...e){let t=e.reduce((e,{length:t})=>e+t,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function p2s(t,n){return concat(e.encoder.encode(t),new Uint8Array([0]),n)}function writeUInt32BE(e,t,r){if(t<0||t>=n)throw RangeError(`value must be >= 0 and <= ${n-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,t&255],r)}function uint64be(e){let t=Math.floor(e/n),r=e%n,i=new Uint8Array(8);return writeUInt32BE(i,t,0),writeUInt32BE(i,r,4),i}function uint32be(e){let t=new Uint8Array(4);return writeUInt32BE(t,e),t}function lengthAndInput(e){return concat(uint32be(e.length),e)}async function concatKdf(e,n,r){let i=Math.ceil((n>>3)/32),a=new Uint8Array(i*32);for(let n=0;n<i;n++){let i=new Uint8Array(4+e.length+r.length);i.set(uint32be(n+1)),i.set(e,4),i.set(r,4+e.length),a.set(await(0,t.default)(`sha256`,i),n*32)}return a.slice(0,n>>3)}}));export default require_buffer_utils();export{require_buffer_utils};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_random}from"../runtime/random.js";var require_cek=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bitLength=bitLength;let t=require_errors(),n=require_random();function bitLength(e){switch(e){case`A128GCM`:return 128;case`A192GCM`:return 192;case`A256GCM`:case`A128CBC-HS256`:return 256;case`A192CBC-HS384`:return 384;case`A256CBC-HS512`:return 512;default:throw new t.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}e.default=e=>(0,n.default)(new Uint8Array(bitLength(e)>>3))}));export default require_cek();export{require_cek};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_iv}from"./iv.js";var require_check_iv_length=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require_errors(),n=require_iv();e.default=(e,r)=>{if(r.length<<3!==(0,n.bitLength)(e))throw new t.JWEInvalid(`Invalid Initialization Vector length`)}}));export default require_check_iv_length();export{require_check_iv_length};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_invalid_key_input}from"./invalid_key_input.js";import{require_is_key_like}from"../runtime/is_key_like.js";import{require_is_jwk}from"./is_jwk.js";var require_check_key_type=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkKeyTypeWithJwk=void 0;let t=require_invalid_key_input(),n=require_is_key_like(),r=require_is_jwk(),tag=e=>e?.[Symbol.toStringTag],jwkMatchesOp=(e,t,n)=>{if(t.use!==void 0&&t.use!==`sig`)throw TypeError(`Invalid key for this operation, when present its use must be sig`);if(t.key_ops!==void 0&&t.key_ops.includes?.(n)!==!0)throw TypeError(`Invalid key for this operation, when present its key_ops must include ${n}`);if(t.alg!==void 0&&t.alg!==e)throw TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},symmetricTypeCheck=(e,i,a,o)=>{if(!(i instanceof Uint8Array)){if(o&&r.isJWK(i)){if(r.isSecretJWK(i)&&jwkMatchesOp(e,i,a))return;throw TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`)}if(!(0,n.default)(i))throw TypeError((0,t.withAlg)(e,i,...n.types,`Uint8Array`,o?`JSON Web Key`:null));if(i.type!==`secret`)throw TypeError(`${tag(i)} instances for symmetric algorithms must be of type "secret"`)}},asymmetricTypeCheck=(e,i,a,o)=>{if(o&&r.isJWK(i))switch(a){case`sign`:if(r.isPrivateJWK(i)&&jwkMatchesOp(e,i,a))return;throw TypeError(`JSON Web Key for this operation be a private JWK`);case`verify`:if(r.isPublicJWK(i)&&jwkMatchesOp(e,i,a))return;throw TypeError(`JSON Web Key for this operation be a public JWK`)}if(!(0,n.default)(i))throw TypeError((0,t.withAlg)(e,i,...n.types,o?`JSON Web Key`:null));if(i.type===`secret`)throw TypeError(`${tag(i)} instances for asymmetric algorithms must not be of type "secret"`);if(a===`sign`&&i.type===`public`)throw TypeError(`${tag(i)} instances for asymmetric algorithm signing must be of type "private"`);if(a===`decrypt`&&i.type===`public`)throw TypeError(`${tag(i)} instances for asymmetric algorithm decryption must be of type "private"`);if(i.algorithm&&a===`verify`&&i.type===`private`)throw TypeError(`${tag(i)} instances for asymmetric algorithm verifying must be of type "public"`);if(i.algorithm&&a===`encrypt`&&i.type===`private`)throw TypeError(`${tag(i)} instances for asymmetric algorithm encryption must be of type "public"`)};function checkKeyType(e,t,n,r){t.startsWith(`HS`)||t===`dir`||t.startsWith(`PBES2`)||/^A\d{3}(?:GCM)?KW$/.test(t)?symmetricTypeCheck(t,n,r,e):asymmetricTypeCheck(t,n,r,e)}e.default=checkKeyType.bind(void 0,!1),e.checkKeyTypeWithJwk=checkKeyType.bind(void 0,!0)}));export default require_check_key_type();export{require_check_key_type};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";var require_check_p2s=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=checkP2s;let t=require_errors();function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8)throw new t.JWEInvalid(`PBES2 Salt Input must be 8 or more octets`)}}));export default require_check_p2s();export{require_check_p2s};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_crypto_key=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkSigCryptoKey=checkSigCryptoKey,e.checkEncCryptoKey=checkEncCryptoKey;function unusable(e,t=`algorithm.name`){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case`ES256`:return`P-256`;case`ES384`:return`P-384`;case`ES512`:return`P-521`;default:throw Error(`unreachable`)}}function checkUsage(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e=`CryptoKey does not support this operation, its usages must include `;if(t.length>2){let n=t.pop();e+=`one of ${t.join(`, `)}, or ${n}.`}else t.length===2?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function checkSigCryptoKey(e,t,...n){switch(t){case`HS256`:case`HS384`:case`HS512`:{if(!isAlgorithm(e.algorithm,`HMAC`))throw unusable(`HMAC`);let n=parseInt(t.slice(2),10);if(getHashLength(e.algorithm.hash)!==n)throw unusable(`SHA-${n}`,`algorithm.hash`);break}case`RS256`:case`RS384`:case`RS512`:{if(!isAlgorithm(e.algorithm,`RSASSA-PKCS1-v1_5`))throw unusable(`RSASSA-PKCS1-v1_5`);let n=parseInt(t.slice(2),10);if(getHashLength(e.algorithm.hash)!==n)throw unusable(`SHA-${n}`,`algorithm.hash`);break}case`PS256`:case`PS384`:case`PS512`:{if(!isAlgorithm(e.algorithm,`RSA-PSS`))throw unusable(`RSA-PSS`);let n=parseInt(t.slice(2),10);if(getHashLength(e.algorithm.hash)!==n)throw unusable(`SHA-${n}`,`algorithm.hash`);break}case`EdDSA`:if(e.algorithm.name!==`Ed25519`&&e.algorithm.name!==`Ed448`)throw unusable(`Ed25519 or Ed448`);break;case`Ed25519`:if(!isAlgorithm(e.algorithm,`Ed25519`))throw unusable(`Ed25519`);break;case`ES256`:case`ES384`:case`ES512`:{if(!isAlgorithm(e.algorithm,`ECDSA`))throw unusable(`ECDSA`);let n=getNamedCurve(t);if(e.algorithm.namedCurve!==n)throw unusable(n,`algorithm.namedCurve`);break}default:throw TypeError(`CryptoKey does not support this operation`)}checkUsage(e,n)}function checkEncCryptoKey(e,t,...n){switch(t){case`A128GCM`:case`A192GCM`:case`A256GCM`:{if(!isAlgorithm(e.algorithm,`AES-GCM`))throw unusable(`AES-GCM`);let n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw unusable(n,`algorithm.length`);break}case`A128KW`:case`A192KW`:case`A256KW`:{if(!isAlgorithm(e.algorithm,`AES-KW`))throw unusable(`AES-KW`);let n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw unusable(n,`algorithm.length`);break}case`ECDH`:switch(e.algorithm.name){case`ECDH`:case`X25519`:case`X448`:break;default:throw unusable(`ECDH, X25519, or X448`)}break;case`PBES2-HS256+A128KW`:case`PBES2-HS384+A192KW`:case`PBES2-HS512+A256KW`:if(!isAlgorithm(e.algorithm,`PBKDF2`))throw unusable(`PBKDF2`);break;case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:{if(!isAlgorithm(e.algorithm,`RSA-OAEP`))throw unusable(`RSA-OAEP`);let n=parseInt(t.slice(9),10)||1;if(getHashLength(e.algorithm.hash)!==n)throw unusable(`SHA-${n}`,`algorithm.hash`);break}default:throw TypeError(`CryptoKey does not support this operation`)}checkUsage(e,n)}}));export default require_crypto_key();export{require_crypto_key};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_base64url}from"../runtime/base64url.js";import{require_errors}from"../util/errors.js";import{require_is_object}from"./is_object.js";import{require_aeskw}from"../runtime/aeskw.js";import{require_ecdhes}from"../runtime/ecdhes.js";import{require_pbes2kw}from"../runtime/pbes2kw.js";import{require_rsaes}from"../runtime/rsaes.js";import{require_normalize_key}from"../runtime/normalize_key.js";import{require_cek}from"./cek.js";import{require_import}from"../key/import.js";import{require_check_key_type}from"./check_key_type.js";import{require_aesgcmkw}from"./aesgcmkw.js";var require_decrypt_key_management=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require_aeskw(),n=require_ecdhes(),r=require_pbes2kw(),i=require_rsaes(),a=require_base64url(),o=require_normalize_key(),s=require_errors(),c=require_cek(),l=require_import(),u=require_check_key_type(),d=require_is_object(),f=require_aesgcmkw();async function decryptKeyManagement(e,p,m,h,g){switch((0,u.default)(e,p,`decrypt`),p=await o.default.normalizePrivateKey?.(p,e)||p,e){case`dir`:if(m!==void 0)throw new s.JWEInvalid(`Encountered unexpected JWE Encrypted Key`);return p;case`ECDH-ES`:if(m!==void 0)throw new s.JWEInvalid(`Encountered unexpected JWE Encrypted Key`);case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:{if(!(0,d.default)(h.epk))throw new s.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(!n.ecdhAllowed(p))throw new s.JOSENotSupported(`ECDH with the provided key is not allowed or not supported by your javascript runtime`);let r=await(0,l.importJWK)(h.epk,e),i,o;if(h.apu!==void 0){if(typeof h.apu!=`string`)throw new s.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);try{i=(0,a.decode)(h.apu)}catch{throw new s.JWEInvalid(`Failed to base64url decode the apu`)}}if(h.apv!==void 0){if(typeof h.apv!=`string`)throw new s.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);try{o=(0,a.decode)(h.apv)}catch{throw new s.JWEInvalid(`Failed to base64url decode the apv`)}}let u=await n.deriveKey(r,p,e===`ECDH-ES`?h.enc:e,e===`ECDH-ES`?(0,c.bitLength)(h.enc):parseInt(e.slice(-5,-2),10),i,o);if(e===`ECDH-ES`)return u;if(m===void 0)throw new s.JWEInvalid(`JWE Encrypted Key missing`);return(0,t.unwrap)(e.slice(-6),u,m)}case`RSA1_5`:case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:if(m===void 0)throw new s.JWEInvalid(`JWE Encrypted Key missing`);return(0,i.decrypt)(e,p,m);case`PBES2-HS256+A128KW`:case`PBES2-HS384+A192KW`:case`PBES2-HS512+A256KW`:{if(m===void 0)throw new s.JWEInvalid(`JWE Encrypted Key missing`);if(typeof h.p2c!=`number`)throw new s.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);let t=g?.maxPBES2Count||1e4;if(h.p2c>t)throw new s.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof h.p2s!=`string`)throw new s.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let n;try{n=(0,a.decode)(h.p2s)}catch{throw new s.JWEInvalid(`Failed to base64url decode the p2s`)}return(0,r.decrypt)(e,p,m,h.p2c,n)}case`A128KW`:case`A192KW`:case`A256KW`:if(m===void 0)throw new s.JWEInvalid(`JWE Encrypted Key missing`);return(0,t.unwrap)(e,p,m);case`A128GCMKW`:case`A192GCMKW`:case`A256GCMKW`:{if(m===void 0)throw new s.JWEInvalid(`JWE Encrypted Key missing`);if(typeof h.iv!=`string`)throw new s.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof h.tag!=`string`)throw new s.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let t;try{t=(0,a.decode)(h.iv)}catch{throw new s.JWEInvalid(`Failed to base64url decode the iv`)}let n;try{n=(0,a.decode)(h.tag)}catch{throw new s.JWEInvalid(`Failed to base64url decode the tag`)}return(0,f.unwrap)(e,p,m,t,n)}default:throw new s.JOSENotSupported(`Invalid or unsupported "alg" (JWE Algorithm) header value`)}}e.default=decryptKeyManagement}));export default require_decrypt_key_management();export{require_decrypt_key_management};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_base64url}from"../runtime/base64url.js";import{require_errors}from"../util/errors.js";import{require_aeskw}from"../runtime/aeskw.js";import{require_ecdhes}from"../runtime/ecdhes.js";import{require_pbes2kw}from"../runtime/pbes2kw.js";import{require_rsaes}from"../runtime/rsaes.js";import{require_normalize_key}from"../runtime/normalize_key.js";import{require_cek}from"./cek.js";import{require_check_key_type}from"./check_key_type.js";import{require_aesgcmkw}from"./aesgcmkw.js";import{require_export}from"../key/export.js";var require_encrypt_key_management=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require_aeskw(),n=require_ecdhes(),r=require_pbes2kw(),i=require_rsaes(),a=require_base64url(),o=require_normalize_key(),s=require_cek(),c=require_errors(),l=require_export(),u=require_check_key_type(),d=require_aesgcmkw();async function encryptKeyManagement(e,f,p,m,h={}){let g,_,v;switch((0,u.default)(e,p,`encrypt`),p=await o.default.normalizePublicKey?.(p,e)||p,e){case`dir`:v=p;break;case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:{if(!n.ecdhAllowed(p))throw new c.JOSENotSupported(`ECDH with the provided key is not allowed or not supported by your javascript runtime`);let{apu:r,apv:i}=h,{epk:o}=h;o||=(await n.generateEpk(p)).privateKey;let{x:u,y:d,crv:y,kty:b}=await(0,l.exportJWK)(o),x=await n.deriveKey(p,o,e===`ECDH-ES`?f:e,e===`ECDH-ES`?(0,s.bitLength)(f):parseInt(e.slice(-5,-2),10),r,i);if(_={epk:{x:u,crv:y,kty:b}},b===`EC`&&(_.epk.y=d),r&&(_.apu=(0,a.encode)(r)),i&&(_.apv=(0,a.encode)(i)),e===`ECDH-ES`){v=x;break}v=m||(0,s.default)(f);let S=e.slice(-6);g=await(0,t.wrap)(S,x,v);break}case`RSA1_5`:case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:v=m||(0,s.default)(f),g=await(0,i.encrypt)(e,p,v);break;case`PBES2-HS256+A128KW`:case`PBES2-HS384+A192KW`:case`PBES2-HS512+A256KW`:{v=m||(0,s.default)(f);let{p2c:t,p2s:n}=h;({encryptedKey:g,..._}=await(0,r.encrypt)(e,p,v,t,n));break}case`A128KW`:case`A192KW`:case`A256KW`:v=m||(0,s.default)(f),g=await(0,t.wrap)(e,p,v);break;case`A128GCMKW`:case`A192GCMKW`:case`A256GCMKW`:{v=m||(0,s.default)(f);let{iv:t}=h;({encryptedKey:g,..._}=await(0,d.wrap)(e,p,v,t));break}default:throw new c.JOSENotSupported(`Invalid or unsupported "alg" (JWE Algorithm) header value`)}return{cek:v,encryptedKey:g,parameters:_}}e.default=encryptKeyManagement}));export default require_encrypt_key_management();export{require_encrypt_key_management};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_epoch=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e=>Math.floor(e.getTime()/1e3)}));export default require_epoch();export{require_epoch};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_invalid_key_input=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.withAlg=withAlg;function message(e,t,...n){if(n=n.filter(Boolean),n.length>2){let t=n.pop();e+=`one of type ${n.join(`, `)}, or ${t}.`}else n.length===2?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return t==null?e+=` Received ${t}`:typeof t==`function`&&t.name?e+=` Received function ${t.name}`:typeof t==`object`&&t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}e.default=(e,...t)=>message(`Key must be `,e,...t);function withAlg(e,t,...n){return message(`Key for the ${e} algorithm must be `,t,...n)}}));export default require_invalid_key_input();export{require_invalid_key_input};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_is_disjoint=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=(...e)=>{let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let n;for(let e of t){let t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(let e of t){if(n.has(e))return!1;n.add(e)}}return!0}}));export default require_is_disjoint();export{require_is_disjoint};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_is_object}from"./is_object.js";var require_is_jwk=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isJWK=isJWK,e.isPrivateJWK=isPrivateJWK,e.isPublicJWK=isPublicJWK,e.isSecretJWK=isSecretJWK;let t=require_is_object();function isJWK(e){return(0,t.default)(e)&&typeof e.kty==`string`}function isPrivateJWK(e){return e.kty!==`oct`&&typeof e.d==`string`}function isPublicJWK(e){return e.kty!==`oct`&&e.d===void 0}function isSecretJWK(e){return isJWK(e)&&e.kty===`oct`&&typeof e.k==`string`}}));export default require_is_jwk();export{require_is_jwk};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_is_object=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=isObject;function isObjectLike(e){return typeof e==`object`&&!!e}function isObject(e){if(!isObjectLike(e)||Object.prototype.toString.call(e)!==`[object Object]`)return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}}));export default require_is_object();export{require_is_object};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_random}from"../runtime/random.js";var require_iv=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bitLength=bitLength;let t=require_errors(),n=require_random();function bitLength(e){switch(e){case`A128GCM`:case`A128GCMKW`:case`A192GCM`:case`A192GCMKW`:case`A256GCM`:case`A256GCMKW`:return 96;case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return 128;default:throw new t.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}e.default=e=>(0,n.default)(new Uint8Array(bitLength(e)>>3))}));export default require_iv();export{require_iv};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"./buffer_utils.js";import{require_errors}from"../util/errors.js";import{require_is_object}from"./is_object.js";import{require_epoch}from"./epoch.js";import{require_secs}from"./secs.js";var require_jwt_claims_set=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require_errors(),n=require_buffer_utils(),r=require_epoch(),i=require_secs(),a=require_is_object(),normalizeTyp=e=>e.toLowerCase().replace(/^application\//,``),checkAudiencePresence=(e,t)=>typeof e==`string`?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;e.default=(e,o,s={})=>{let c;try{c=JSON.parse(n.decoder.decode(o))}catch{}if(!(0,a.default)(c))throw new t.JWTInvalid(`JWT Claims Set must be a top-level JSON object`);let{typ:l}=s;if(l&&(typeof e.typ!=`string`||normalizeTyp(e.typ)!==normalizeTyp(l)))throw new t.JWTClaimValidationFailed(`unexpected "typ" JWT header value`,c,`typ`,`check_failed`);let{requiredClaims:u=[],issuer:d,subject:f,audience:p,maxTokenAge:m}=s,h=[...u];m!==void 0&&h.push(`iat`),p!==void 0&&h.push(`aud`),f!==void 0&&h.push(`sub`),d!==void 0&&h.push(`iss`);for(let e of new Set(h.reverse()))if(!(e in c))throw new t.JWTClaimValidationFailed(`missing required "${e}" claim`,c,e,`missing`);if(d&&!(Array.isArray(d)?d:[d]).includes(c.iss))throw new t.JWTClaimValidationFailed(`unexpected "iss" claim value`,c,`iss`,`check_failed`);if(f&&c.sub!==f)throw new t.JWTClaimValidationFailed(`unexpected "sub" claim value`,c,`sub`,`check_failed`);if(p&&!checkAudiencePresence(c.aud,typeof p==`string`?[p]:p))throw new t.JWTClaimValidationFailed(`unexpected "aud" claim value`,c,`aud`,`check_failed`);let g;switch(typeof s.clockTolerance){case`string`:g=(0,i.default)(s.clockTolerance);break;case`number`:g=s.clockTolerance;break;case`undefined`:g=0;break;default:throw TypeError(`Invalid clockTolerance option type`)}let{currentDate:_}=s,v=(0,r.default)(_||new Date);if((c.iat!==void 0||m)&&typeof c.iat!=`number`)throw new t.JWTClaimValidationFailed(`"iat" claim must be a number`,c,`iat`,`invalid`);if(c.nbf!==void 0){if(typeof c.nbf!=`number`)throw new t.JWTClaimValidationFailed(`"nbf" claim must be a number`,c,`nbf`,`invalid`);if(c.nbf>v+g)throw new t.JWTClaimValidationFailed(`"nbf" claim timestamp check failed`,c,`nbf`,`check_failed`)}if(c.exp!==void 0){if(typeof c.exp!=`number`)throw new t.JWTClaimValidationFailed(`"exp" claim must be a number`,c,`exp`,`invalid`);if(c.exp<=v-g)throw new t.JWTExpired(`"exp" claim timestamp check failed`,c,`exp`,`check_failed`)}if(m){let e=v-c.iat,n=typeof m==`number`?m:(0,i.default)(m);if(e-g>n)throw new t.JWTExpired(`"iat" claim timestamp check failed (too far in the past)`,c,`iat`,`check_failed`);if(e<0-g)throw new t.JWTClaimValidationFailed(`"iat" claim timestamp check failed (it should be in the past)`,c,`iat`,`check_failed`)}return c}}));export default require_jwt_claims_set();export{require_jwt_claims_set};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_private_symbols=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unprotected=void 0,e.unprotected=Symbol()}));export default require_private_symbols();export{require_private_symbols};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_secs=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;e.default=e=>{let n=t.exec(e);if(!n||n[4]&&n[1])throw TypeError(`Invalid time period format`);let r=parseFloat(n[2]),i=n[3].toLowerCase(),a;switch(i){case`sec`:case`secs`:case`second`:case`seconds`:case`s`:a=Math.round(r);break;case`minute`:case`minutes`:case`min`:case`mins`:case`m`:a=Math.round(r*60);break;case`hour`:case`hours`:case`hr`:case`hrs`:case`h`:a=Math.round(r*3600);break;case`day`:case`days`:case`d`:a=Math.round(r*86400);break;case`week`:case`weeks`:case`w`:a=Math.round(r*604800);break;default:a=Math.round(r*31557600)}return n[1]===`-`||n[4]===`ago`?-a:a}}));export default require_secs();export{require_secs};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_validate_algorithms=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=(e,t)=>{if(t!==void 0&&(!Array.isArray(t)||t.some(e=>typeof e!=`string`)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}}));export default require_validate_algorithms();export{require_validate_algorithms};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";var require_validate_crit=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require_errors();function validateCrit(e,n,r,i,a){if(a.crit!==void 0&&i?.crit===void 0)throw new e(`"crit" (Critical) Header Parameter MUST be integrity protected`);if(!i||i.crit===void 0)return new Set;if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some(e=>typeof e!=`string`||e.length===0))throw new e(`"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present`);let o;o=r===void 0?n:new Map([...Object.entries(r),...n.entries()]);for(let n of i.crit){if(!o.has(n))throw new t.JOSENotSupported(`Extension Header Parameter "${n}" is not recognized`);if(a[n]===void 0)throw new e(`Extension Header Parameter "${n}" is missing`);if(o.get(n)&&i[n]===void 0)throw new e(`Extension Header Parameter "${n}" MUST be integrity protected`)}return new Set(i.crit)}e.default=validateCrit}));export default require_validate_crit();export{require_validate_crit};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_errors}from"../util/errors.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_ciphers}from"./ciphers.js";import{require_is_key_like}from"./is_key_like.js";var require_aeskw=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unwrap=e.wrap=void 0;let t=require("node:buffer"),n=require("node:crypto"),r=require_errors(),i=require_buffer_utils(),a=require_webcrypto(),o=require_crypto_key(),s=require_is_key_object(),c=require_invalid_key_input(),l=require_ciphers(),u=require_is_key_like();function checkKeySize(e,t){if(e.symmetricKeySize<<3!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function ensureKeyObject(e,t,r){if((0,s.default)(e))return e;if(e instanceof Uint8Array)return(0,n.createSecretKey)(e);if((0,a.isCryptoKey)(e))return(0,o.checkEncCryptoKey)(e,t,r),n.KeyObject.from(e);throw TypeError((0,c.default)(e,...u.types,`Uint8Array`))}e.wrap=(e,a,o)=>{let s=`aes${parseInt(e.slice(1,4),10)}-wrap`;if(!(0,l.default)(s))throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`);let c=ensureKeyObject(a,e,`wrapKey`);checkKeySize(c,e);let u=(0,n.createCipheriv)(s,c,t.Buffer.alloc(8,166));return(0,i.concat)(u.update(o),u.final())},e.unwrap=(e,a,o)=>{let s=`aes${parseInt(e.slice(1,4),10)}-wrap`;if(!(0,l.default)(s))throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`);let c=ensureKeyObject(a,e,`unwrapKey`);checkKeySize(c,e);let u=(0,n.createDecipheriv)(s,c,t.Buffer.alloc(8,166));return(0,i.concat)(u.update(o),u.final())}}));export default require_aeskw();export{require_aeskw};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";var require_asn1=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fromX509=e.fromSPKI=e.fromPKCS8=e.toPKCS8=e.toSPKI=void 0;let t=require("node:crypto"),n=require("node:buffer"),r=require_webcrypto(),i=require_is_key_object(),a=require_invalid_key_input(),o=require_is_key_like(),genericExport=(e,n,s)=>{let c;if((0,r.isCryptoKey)(s)){if(!s.extractable)throw TypeError(`CryptoKey is not extractable`);c=t.KeyObject.from(s)}else if((0,i.default)(s))c=s;else throw TypeError((0,a.default)(s,...o.types));if(c.type!==e)throw TypeError(`key is not a ${e} key`);return c.export({format:`pem`,type:n})};e.toSPKI=e=>genericExport(`public`,`spki`,e),e.toPKCS8=e=>genericExport(`private`,`pkcs8`,e),e.fromPKCS8=e=>(0,t.createPrivateKey)({key:n.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,``),`base64`),type:`pkcs8`,format:`der`}),e.fromSPKI=e=>(0,t.createPublicKey)({key:n.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,``),`base64`),type:`spki`,format:`der`}),e.fromX509=e=>(0,t.createPublicKey)({key:e,type:`spki`,format:`pem`})}));export default require_asn1();export{require_asn1};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";var require_base64url=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=e.encodeBase64=e.decodeBase64=void 0;let t=require("node:buffer"),n=require_buffer_utils();function normalize(e){let t=e;return t instanceof Uint8Array&&(t=n.decoder.decode(t)),t}e.encode=e=>t.Buffer.from(e).toString(`base64url`),e.decodeBase64=e=>new Uint8Array(t.Buffer.from(e,`base64`)),e.encodeBase64=e=>t.Buffer.from(e).toString(`base64`),e.decode=e=>new Uint8Array(t.Buffer.from(normalize(e),`base64url`))}));export default require_base64url();export{require_base64url};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";var require_cbc_tag=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=cbcTag;let t=require("node:crypto"),n=require_buffer_utils();function cbcTag(e,r,i,a,o,s){let c=(0,n.concat)(e,r,i,(0,n.uint64be)(e.length<<3)),l=(0,t.createHmac)(`sha${a}`,o);return l.update(c),l.digest().slice(0,s>>3)}}));export default require_cbc_tag();export{require_cbc_tag};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_is_key_object}from"./is_key_object.js";var require_check_cek_length=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require_errors(),n=require_is_key_object();e.default=(e,r)=>{let i;switch(e){case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:i=parseInt(e.slice(-3),10);break;case`A128GCM`:case`A192GCM`:case`A256GCM`:i=parseInt(e.slice(1,4),10);break;default:throw new t.JOSENotSupported(`Content Encryption Algorithm ${e} is not supported either by JOSE or your javascript runtime`)}if(r instanceof Uint8Array){let e=r.byteLength<<3;if(e!==i)throw new t.JWEInvalid(`Invalid Content Encryption Key length. Expected ${i} bits, got ${e} bits`);return}if((0,n.default)(r)&&r.type===`secret`){let e=r.symmetricKeySize<<3;if(e!==i)throw new t.JWEInvalid(`Invalid Content Encryption Key length. Expected ${i} bits, got ${e} bits`);return}throw TypeError(`Invalid Content Encryption Key type`)}}));export default require_check_cek_length();export{require_check_cek_length};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_check_key_length=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto");e.default=(e,n)=>{let r;try{r=e instanceof t.KeyObject?e.asymmetricKeyDetails?.modulusLength:Buffer.from(e.n,`base64url`).byteLength<<3}catch{}if(typeof r!=`number`||r<2048)throw TypeError(`${n} requires key modulusLength to be 2048 bits or larger`)}}));export default require_check_key_length();export{require_check_key_length};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_ciphers=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto"),n;e.default=e=>(n||=new Set((0,t.getCiphers)()),n.has(e))}));export default require_ciphers();export{require_ciphers};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_errors}from"../util/errors.js";import{require_check_iv_length}from"../lib/check_iv_length.js";import{require_is_key_object}from"./is_key_object.js";import{require_check_cek_length}from"./check_cek_length.js";import{require_timing_safe_equal}from"./timing_safe_equal.js";import{require_cbc_tag}from"./cbc_tag.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_ciphers}from"./ciphers.js";import{require_is_key_like}from"./is_key_like.js";var require_decrypt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto"),n=require_check_iv_length(),r=require_check_cek_length(),i=require_buffer_utils(),a=require_errors(),o=require_timing_safe_equal(),s=require_cbc_tag(),c=require_webcrypto(),l=require_crypto_key(),u=require_is_key_object(),d=require_invalid_key_input(),f=require_ciphers(),p=require_is_key_like();function cbcDecrypt(e,n,r,c,l,d){let p=parseInt(e.slice(1,4),10);(0,u.default)(n)&&(n=n.export());let m=n.subarray(p>>3),h=n.subarray(0,p>>3),g=parseInt(e.slice(-3),10),_=`aes-${p}-cbc`;if(!(0,f.default)(_))throw new a.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`);let v=(0,s.default)(d,c,r,g,h,p),y;try{y=(0,o.default)(l,v)}catch{}if(!y)throw new a.JWEDecryptionFailed;let b;try{let e=(0,t.createDecipheriv)(_,m,c);b=(0,i.concat)(e.update(r),e.final())}catch{}if(!b)throw new a.JWEDecryptionFailed;return b}function gcmDecrypt(e,n,r,i,o,s){let c=`aes-${parseInt(e.slice(1,4),10)}-gcm`;if(!(0,f.default)(c))throw new a.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`);try{let e=(0,t.createDecipheriv)(c,n,i,{authTagLength:16});e.setAuthTag(o),s.byteLength&&e.setAAD(s,{plaintextLength:r.length});let a=e.update(r);return e.final(),a}catch{throw new a.JWEDecryptionFailed}}e.default=(e,i,o,s,f,m)=>{let h;if((0,c.isCryptoKey)(i))(0,l.checkEncCryptoKey)(i,e,`decrypt`),h=t.KeyObject.from(i);else if(i instanceof Uint8Array||(0,u.default)(i))h=i;else throw TypeError((0,d.default)(i,...p.types,`Uint8Array`));if(!s)throw new a.JWEInvalid(`JWE Initialization Vector missing`);if(!f)throw new a.JWEInvalid(`JWE Authentication Tag missing`);switch((0,r.default)(e,h),(0,n.default)(e,s),e){case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return cbcDecrypt(e,h,o,s,f,m);case`A128GCM`:case`A192GCM`:case`A256GCM`:return gcmDecrypt(e,h,o,s,f,m);default:throw new a.JOSENotSupported(`Unsupported JWE Content Encryption Algorithm`)}}}));export default require_decrypt();export{require_decrypt};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_digest=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto");e.default=(e,n)=>(0,t.createHash)(e).update(n).digest()}));export default require_digest();export{require_digest};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";var require_dsa_digest=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=dsaDigest;let t=require_errors();function dsaDigest(e){switch(e){case`PS256`:case`RS256`:case`ES256`:case`ES256K`:return`sha256`;case`PS384`:case`RS384`:case`ES384`:return`sha384`;case`PS512`:case`RS512`:case`ES512`:return`sha512`;case`Ed25519`:case`EdDSA`:return;default:throw new t.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}}));export default require_dsa_digest();export{require_dsa_digest};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_errors}from"../util/errors.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";import{require_get_named_curve}from"./get_named_curve.js";var require_ecdhes=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ecdhAllowed=void 0,e.deriveKey=deriveKey,e.generateEpk=generateEpk;let t=require("node:crypto"),n=require("node:util"),r=require_get_named_curve(),i=require_buffer_utils(),a=require_errors(),o=require_webcrypto(),s=require_crypto_key(),c=require_is_key_object(),l=require_invalid_key_input(),u=require_is_key_like(),d=(0,n.promisify)(t.generateKeyPair);async function deriveKey(e,n,r,a,d=new Uint8Array,f=new Uint8Array){let p;if((0,o.isCryptoKey)(e))(0,s.checkEncCryptoKey)(e,`ECDH`),p=t.KeyObject.from(e);else if((0,c.default)(e))p=e;else throw TypeError((0,l.default)(e,...u.types));let m;if((0,o.isCryptoKey)(n))(0,s.checkEncCryptoKey)(n,`ECDH`,`deriveBits`),m=t.KeyObject.from(n);else if((0,c.default)(n))m=n;else throw TypeError((0,l.default)(n,...u.types));let h=(0,i.concat)((0,i.lengthAndInput)(i.encoder.encode(r)),(0,i.lengthAndInput)(d),(0,i.lengthAndInput)(f),(0,i.uint32be)(a)),g=(0,t.diffieHellman)({privateKey:m,publicKey:p});return(0,i.concatKdf)(g,a,h)}async function generateEpk(e){let n;if((0,o.isCryptoKey)(e))n=t.KeyObject.from(e);else if((0,c.default)(e))n=e;else throw TypeError((0,l.default)(e,...u.types));switch(n.asymmetricKeyType){case`x25519`:return d(`x25519`);case`x448`:return d(`x448`);case`ec`:{let e=(0,r.default)(n);return d(`ec`,{namedCurve:e})}default:throw new a.JOSENotSupported(`Invalid or unsupported EPK`)}}e.ecdhAllowed=e=>[`P-256`,`P-384`,`P-521`,`X25519`,`X448`].includes((0,r.default)(e))}));export default require_ecdhes();export{require_ecdhes};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_errors}from"../util/errors.js";import{require_iv}from"../lib/iv.js";import{require_check_iv_length}from"../lib/check_iv_length.js";import{require_is_key_object}from"./is_key_object.js";import{require_check_cek_length}from"./check_cek_length.js";import{require_cbc_tag}from"./cbc_tag.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_ciphers}from"./ciphers.js";import{require_is_key_like}from"./is_key_like.js";var require_encrypt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto"),n=require_check_iv_length(),r=require_check_cek_length(),i=require_buffer_utils(),a=require_cbc_tag(),o=require_webcrypto(),s=require_crypto_key(),c=require_is_key_object(),l=require_invalid_key_input(),u=require_iv(),d=require_errors(),f=require_ciphers(),p=require_is_key_like();function cbcEncrypt(e,n,r,o,s){let l=parseInt(e.slice(1,4),10);(0,c.default)(r)&&(r=r.export());let u=r.subarray(l>>3),p=r.subarray(0,l>>3),m=`aes-${l}-cbc`;if(!(0,f.default)(m))throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`);let h=(0,t.createCipheriv)(m,u,o),g=(0,i.concat)(h.update(n),h.final()),_=parseInt(e.slice(-3),10);return{ciphertext:g,tag:(0,a.default)(s,o,g,_,p,l),iv:o}}function gcmEncrypt(e,n,r,i,a){let o=`aes-${parseInt(e.slice(1,4),10)}-gcm`;if(!(0,f.default)(o))throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`);let s=(0,t.createCipheriv)(o,r,i,{authTagLength:16});a.byteLength&&s.setAAD(a,{plaintextLength:n.length});let c=s.update(n);return s.final(),{ciphertext:c,tag:s.getAuthTag(),iv:i}}e.default=(e,i,a,f,m)=>{let h;if((0,o.isCryptoKey)(a))(0,s.checkEncCryptoKey)(a,e,`encrypt`),h=t.KeyObject.from(a);else if(a instanceof Uint8Array||(0,c.default)(a))h=a;else throw TypeError((0,l.default)(a,...p.types,`Uint8Array`));switch((0,r.default)(e,h),f?(0,n.default)(e,f):f=(0,u.default)(e),e){case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return cbcEncrypt(e,i,h,f,m);case`A128GCM`:case`A192GCM`:case`A256GCM`:return gcmEncrypt(e,i,h,f,m);default:throw new d.JOSENotSupported(`Unsupported JWE Content Encryption Algorithm`)}}}));export default require_encrypt();export{require_encrypt};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_errors}from"../util/errors.js";var require_fetch_jwks=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:http"),n=require("node:https"),r=require("node:events"),i=require_errors(),a=require_buffer_utils();e.default=async(e,o,s)=>{let c;switch(e.protocol){case`https:`:c=n.get;break;case`http:`:c=t.get;break;default:throw TypeError(`Unsupported URL protocol.`)}let{agent:l,headers:u}=s,d=c(e.href,{agent:l,timeout:o,headers:u}),[f]=await Promise.race([(0,r.once)(d,`response`),(0,r.once)(d,`timeout`)]);if(!f)throw d.destroy(),new i.JWKSTimeout;if(f.statusCode!==200)throw new i.JOSEError(`Expected 200 OK from the JSON Web Key Set HTTP response`);let p=[];for await(let e of f)p.push(e);try{return JSON.parse(a.decoder.decode((0,a.concat)(...p)))}catch{throw new i.JOSEError(`Failed to parse the JSON Web Key Set HTTP response as JSON`)}}}));export default require_fetch_jwks();export{require_fetch_jwks};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_random}from"./random.js";var require_generate=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.generateSecret=generateSecret,e.generateKeyPair=generateKeyPair;let t=require("node:crypto"),n=require("node:util"),r=require_random(),i=require_errors(),a=(0,n.promisify)(t.generateKeyPair);async function generateSecret(e,n){let a;switch(e){case`HS256`:case`HS384`:case`HS512`:case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:a=parseInt(e.slice(-3),10);break;case`A128KW`:case`A192KW`:case`A256KW`:case`A128GCMKW`:case`A192GCMKW`:case`A256GCMKW`:case`A128GCM`:case`A192GCM`:case`A256GCM`:a=parseInt(e.slice(1,4),10);break;default:throw new i.JOSENotSupported(`Invalid or unsupported JWK "alg" (Algorithm) Parameter value`)}return(0,t.createSecretKey)((0,r.default)(new Uint8Array(a>>3)))}async function generateKeyPair(e,t){switch(e){case`RS256`:case`RS384`:case`RS512`:case`PS256`:case`PS384`:case`PS512`:case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:case`RSA1_5`:{let e=t?.modulusLength??2048;if(typeof e!=`number`||e<2048)throw new i.JOSENotSupported(`Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used`);return await a(`rsa`,{modulusLength:e,publicExponent:65537})}case`ES256`:return a(`ec`,{namedCurve:`P-256`});case`ES256K`:return a(`ec`,{namedCurve:`secp256k1`});case`ES384`:return a(`ec`,{namedCurve:`P-384`});case`ES512`:return a(`ec`,{namedCurve:`P-521`});case`Ed25519`:return a(`ed25519`);case`EdDSA`:switch(t?.crv){case void 0:case`Ed25519`:return a(`ed25519`);case`Ed448`:return a(`ed448`);default:throw new i.JOSENotSupported(`Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448`)}case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:{let e=t?.crv??`P-256`;switch(e){case void 0:case`P-256`:case`P-384`:case`P-521`:return a(`ec`,{namedCurve:e});case`X25519`:return a(`x25519`);case`X448`:return a(`x448`);default:throw new i.JOSENotSupported(`Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448`)}}default:throw new i.JOSENotSupported(`Invalid or unsupported JWK "alg" (Algorithm) Parameter value`)}}}));export default require_generate();export{require_generate};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";import{require_is_jwk}from"../lib/is_jwk.js";var require_get_named_curve=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.weakMap=void 0;let t=require("node:crypto"),n=require_errors(),r=require_webcrypto(),i=require_is_key_object(),a=require_invalid_key_input(),o=require_is_key_like(),s=require_is_jwk();e.weakMap=new WeakMap;let namedCurveToJOSE=e=>{switch(e){case`prime256v1`:return`P-256`;case`secp384r1`:return`P-384`;case`secp521r1`:return`P-521`;case`secp256k1`:return`secp256k1`;default:throw new n.JOSENotSupported(`Unsupported key curve for this operation`)}};e.default=(e,n)=>{let c;if((0,r.isCryptoKey)(e))c=t.KeyObject.from(e);else if((0,i.default)(e))c=e;else if((0,s.isJWK)(e))return e.crv;else throw TypeError((0,a.default)(e,...o.types));if(c.type===`secret`)throw TypeError(`only "private" or "public" type keys can be used for this operation`);switch(c.asymmetricKeyType){case`ed25519`:case`ed448`:return`Ed${c.asymmetricKeyType.slice(2)}`;case`x25519`:case`x448`:return`X${c.asymmetricKeyType.slice(1)}`;case`ec`:{let e=c.asymmetricKeyDetails.namedCurve;return n?e:namedCurveToJOSE(e)}default:throw TypeError(`Invalid asymmetric key type for this operation`)}}}));export default require_get_named_curve();export{require_get_named_curve};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";import{require_is_jwk}from"../lib/is_jwk.js";var require_get_sign_verify_key=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=getSignVerifyKey;let t=require("node:crypto"),n=require_webcrypto(),r=require_crypto_key(),i=require_invalid_key_input(),a=require_is_key_like(),o=require_is_jwk();function getSignVerifyKey(e,s,c){if(s instanceof Uint8Array){if(!e.startsWith(`HS`))throw TypeError((0,i.default)(s,...a.types));return(0,t.createSecretKey)(s)}if(s instanceof t.KeyObject)return s;if((0,n.isCryptoKey)(s))return(0,r.checkSigCryptoKey)(s,e,c),t.KeyObject.from(s);if(o.isJWK(s))return e.startsWith(`HS`)?(0,t.createSecretKey)(Buffer.from(s.k,`base64url`)):s;throw TypeError((0,i.default)(s,...a.types,`Uint8Array`,`JSON Web Key`))}}));export default require_get_sign_verify_key();export{require_get_sign_verify_key};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";var require_hmac_digest=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=hmacDigest;let t=require_errors();function hmacDigest(e){switch(e){case`HS256`:return`sha256`;case`HS384`:return`sha384`;case`HS512`:return`sha512`;default:throw new t.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}}));export default require_hmac_digest();export{require_hmac_digest};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";var require_is_key_like=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.types=void 0;let t=require_webcrypto(),n=require_is_key_object();e.default=e=>(0,n.default)(e)||(0,t.isCryptoKey)(e);let r=[`KeyObject`];e.types=r,(globalThis.CryptoKey||t.default?.CryptoKey)&&r.push(`CryptoKey`)}));export default require_is_key_like();export{require_is_key_like};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_is_key_object=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:util");e.default=e=>t.types.isKeyObject(e)}));export default require_is_key_object();export{require_is_key_object};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_jwk_to_key=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto");e.default=e=>e.d?(0,t.createPrivateKey)({format:`jwk`,key:e}):(0,t.createPublicKey)({format:`jwk`,key:e})}));export default require_jwk_to_key();export{require_jwk_to_key};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_base64url}from"./base64url.js";import{require_errors}from"../util/errors.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";var require_key_to_jwk=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto"),n=require_base64url(),r=require_errors(),i=require_webcrypto(),a=require_is_key_object(),o=require_invalid_key_input(),s=require_is_key_like();e.default=e=>{let c;if((0,i.isCryptoKey)(e)){if(!e.extractable)throw TypeError(`CryptoKey is not extractable`);c=t.KeyObject.from(e)}else if((0,a.default)(e))c=e;else if(e instanceof Uint8Array)return{kty:`oct`,k:(0,n.encode)(e)};else throw TypeError((0,o.default)(e,...s.types,`Uint8Array`));if(c.type!==`secret`&&![`rsa`,`ec`,`ed25519`,`x25519`,`ed448`,`x448`].includes(c.asymmetricKeyType))throw new r.JOSENotSupported(`Unsupported key asymmetricKeyType`);return c.export({format:`jwk`})}}));export default require_key_to_jwk();export{require_key_to_jwk};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_errors}from"../util/errors.js";import{require_get_named_curve}from"./get_named_curve.js";import{require_check_key_length}from"./check_key_length.js";var require_node_key=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=keyForCrypto;let t=require("node:crypto"),n=require_get_named_curve(),r=require_errors(),i=require_check_key_length(),a=new Map([[`ES256`,`P-256`],[`ES256K`,`secp256k1`],[`ES384`,`P-384`],[`ES512`,`P-521`]]);function keyForCrypto(e,o){let s,c,l;if(o instanceof t.KeyObject)s=o.asymmetricKeyType,c=o.asymmetricKeyDetails;else switch(l=!0,o.kty){case`RSA`:s=`rsa`;break;case`EC`:s=`ec`;break;case`OKP`:if(o.crv===`Ed25519`){s=`ed25519`;break}if(o.crv===`Ed448`){s=`ed448`;break}throw TypeError(`Invalid key for this operation, its crv must be Ed25519 or Ed448`);default:throw TypeError(`Invalid key for this operation, its kty must be RSA, OKP, or EC`)}let u;switch(e){case`Ed25519`:if(s!==`ed25519`)throw TypeError(`Invalid key for this operation, its asymmetricKeyType must be ed25519`);break;case`EdDSA`:if(![`ed25519`,`ed448`].includes(s))throw TypeError(`Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448`);break;case`RS256`:case`RS384`:case`RS512`:if(s!==`rsa`)throw TypeError(`Invalid key for this operation, its asymmetricKeyType must be rsa`);(0,i.default)(o,e);break;case`PS256`:case`PS384`:case`PS512`:if(s===`rsa-pss`){let{hashAlgorithm:t,mgf1HashAlgorithm:n,saltLength:r}=c,i=parseInt(e.slice(-3),10);if(t!==void 0&&(t!==`sha${i}`||n!==t))throw TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`);if(r!==void 0&&r>i>>3)throw TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}else if(s!==`rsa`)throw TypeError(`Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss`);(0,i.default)(o,e),u={padding:t.constants.RSA_PKCS1_PSS_PADDING,saltLength:t.constants.RSA_PSS_SALTLEN_DIGEST};break;case`ES256`:case`ES256K`:case`ES384`:case`ES512`:{if(s!==`ec`)throw TypeError(`Invalid key for this operation, its asymmetricKeyType must be ec`);let t=(0,n.default)(o),r=a.get(e);if(t!==r)throw TypeError(`Invalid key curve for the algorithm, its curve must be ${r}, got ${t}`);u={dsaEncoding:`ieee-p1363`};break}default:throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}return l?{format:`jwk`,key:o,...u}:u?{...u,key:o}:o}}));export default require_node_key();export{require_node_key};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_normalize_key=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={}}));export default require_normalize_key();export{require_normalize_key};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_base64url}from"./base64url.js";import{require_random}from"./random.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";import{require_aeskw}from"./aeskw.js";import{require_check_p2s}from"../lib/check_p2s.js";var require_pbes2kw=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;let t=require("node:util"),n=require("node:crypto"),r=require_random(),i=require_buffer_utils(),a=require_base64url(),o=require_aeskw(),s=require_check_p2s(),c=require_webcrypto(),l=require_crypto_key(),u=require_is_key_object(),d=require_invalid_key_input(),f=require_is_key_like(),p=(0,t.promisify)(n.pbkdf2);function getPassword(e,t){if((0,u.default)(e))return e.export();if(e instanceof Uint8Array)return e;if((0,c.isCryptoKey)(e))return(0,l.checkEncCryptoKey)(e,t,`deriveBits`,`deriveKey`),n.KeyObject.from(e).export();throw TypeError((0,d.default)(e,...f.types,`Uint8Array`))}e.encrypt=async(e,t,n,c=2048,l=(0,r.default)(new Uint8Array(16)))=>{(0,s.default)(l);let u=(0,i.p2s)(e,l),d=parseInt(e.slice(13,16),10)>>3,f=getPassword(t,e),m=await p(f,u,c,d,`sha${e.slice(8,11)}`);return{encryptedKey:await(0,o.wrap)(e.slice(-6),m,n),p2c:c,p2s:(0,a.encode)(l)}},e.decrypt=async(e,t,n,r,a)=>{(0,s.default)(a);let c=(0,i.p2s)(e,a),l=parseInt(e.slice(13,16),10)>>3,u=getPassword(t,e),d=await p(u,c,r,l,`sha${e.slice(8,11)}`);return(0,o.unwrap)(e.slice(-6),d,n)}}));export default require_pbes2kw();export{require_pbes2kw};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_random=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=require("node:crypto");Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.randomFillSync}})}));export default require_random();export{require_random};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_is_key_object}from"./is_key_object.js";import{require_webcrypto}from"./webcrypto.js";import{require_crypto_key}from"../lib/crypto_key.js";import{require_invalid_key_input}from"../lib/invalid_key_input.js";import{require_is_key_like}from"./is_key_like.js";import{require_check_key_length}from"./check_key_length.js";var require_rsaes=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;let t=require("node:crypto"),n=require("node:util"),r=require_check_key_length(),i=require_webcrypto(),a=require_crypto_key(),o=require_is_key_object(),s=require_invalid_key_input(),c=require_is_key_like(),checkKey=(e,t)=>{if(e.asymmetricKeyType!==`rsa`)throw TypeError(`Invalid key for this operation, its asymmetricKeyType must be rsa`);(0,r.default)(e,t)},l=(0,n.deprecate)(()=>t.constants.RSA_PKCS1_PADDING,`The RSA1_5 "alg" (JWE Algorithm) is deprecated and will be removed in the next major revision.`),resolvePadding=e=>{switch(e){case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:return t.constants.RSA_PKCS1_OAEP_PADDING;case`RSA1_5`:return l();default:return}},resolveOaepHash=e=>{switch(e){case`RSA-OAEP`:return`sha1`;case`RSA-OAEP-256`:return`sha256`;case`RSA-OAEP-384`:return`sha384`;case`RSA-OAEP-512`:return`sha512`;default:return}};function ensureKeyObject(e,n,...r){if((0,o.default)(e))return e;if((0,i.isCryptoKey)(e))return(0,a.checkEncCryptoKey)(e,n,...r),t.KeyObject.from(e);throw TypeError((0,s.default)(e,...c.types))}e.encrypt=(e,n,r)=>{let i=resolvePadding(e),a=resolveOaepHash(e),o=ensureKeyObject(n,e,`wrapKey`,`encrypt`);return checkKey(o,e),(0,t.publicEncrypt)({key:o,oaepHash:a,padding:i},r)},e.decrypt=(e,n,r)=>{let i=resolvePadding(e),a=resolveOaepHash(e),o=ensureKeyObject(n,e,`unwrapKey`,`decrypt`);return checkKey(o,e),(0,t.privateDecrypt)({key:o,oaepHash:a,padding:i},r)}}));export default require_rsaes();export{require_rsaes};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_runtime=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=`node:crypto`}));export default require_runtime();export{require_runtime};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_dsa_digest}from"./dsa_digest.js";import{require_node_key}from"./node_key.js";import{require_hmac_digest}from"./hmac_digest.js";import{require_get_sign_verify_key}from"./get_sign_verify_key.js";var require_sign=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto"),n=require("node:util"),r=require_dsa_digest(),i=require_hmac_digest(),a=require_node_key(),o=require_get_sign_verify_key(),s=(0,n.promisify)(t.sign);e.default=async(e,n,c)=>{let l=(0,o.default)(e,n,`sign`);if(e.startsWith(`HS`)){let n=t.createHmac((0,i.default)(e),l);return n.update(c),n.digest()}return s((0,r.default)(e),c,(0,a.default)(e,l))}}));export default require_sign();export{require_sign};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_timing_safe_equal=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=require("node:crypto").timingSafeEqual}));export default require_timing_safe_equal();export{require_timing_safe_equal};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_dsa_digest}from"./dsa_digest.js";import{require_node_key}from"./node_key.js";import{require_get_sign_verify_key}from"./get_sign_verify_key.js";import{require_sign}from"./sign.js";var require_verify=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=require("node:crypto"),n=require("node:util"),r=require_dsa_digest(),i=require_node_key(),a=require_sign(),o=require_get_sign_verify_key(),s=(0,n.promisify)(t.verify);e.default=async(e,n,c,l)=>{let u=(0,o.default)(e,n,`verify`);if(e.startsWith(`HS`)){let n=await(0,a.default)(e,u,l),r=c;try{return t.timingSafeEqual(r,n)}catch{return!1}}let d=(0,r.default)(e),f=(0,i.default)(e,u);try{return await s(d,l,f,c)}catch{return!1}}}));export default require_verify();export{require_verify};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_webcrypto=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isCryptoKey=void 0;let t=require("node:crypto"),n=require("node:util");e.default=t.webcrypto,e.isCryptoKey=e=>n.types.isCryptoKey(e)}));export default require_webcrypto();export{require_webcrypto};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_base64url as require_base64url$1}from"../runtime/base64url.js";var require_base64url=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;let t=require_base64url$1();e.encode=t.encode,e.decode=t.decode}));export default require_base64url();export{require_base64url};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_errors}from"./errors.js";import{require_is_object}from"../lib/is_object.js";import{require_base64url}from"./base64url.js";var require_decode_jwt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeJwt=decodeJwt;let t=require_base64url(),n=require_buffer_utils(),r=require_is_object(),i=require_errors();function decodeJwt(e){if(typeof e!=`string`)throw new i.JWTInvalid(`JWTs must use Compact JWS serialization, JWT must be a string`);let{1:a,length:o}=e.split(`.`);if(o===5)throw new i.JWTInvalid(`Only JWTs using Compact JWS serialization can be decoded`);if(o!==3)throw new i.JWTInvalid(`Invalid JWT`);if(!a)throw new i.JWTInvalid(`JWTs must contain a payload`);let s;try{s=(0,t.decode)(a)}catch{throw new i.JWTInvalid(`Failed to base64url decode the payload`)}let c;try{c=JSON.parse(n.decoder.decode(s))}catch{throw new i.JWTInvalid(`Failed to parse the decoded payload as JSON`)}if(!(0,r.default)(c))throw new i.JWTInvalid(`Invalid JWT Claims Set`);return c}}));export default require_decode_jwt();export{require_decode_jwt};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_buffer_utils}from"../lib/buffer_utils.js";import{require_is_object}from"../lib/is_object.js";import{require_base64url}from"./base64url.js";var require_decode_protected_header=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeProtectedHeader=decodeProtectedHeader;let t=require_base64url(),n=require_buffer_utils(),r=require_is_object();function decodeProtectedHeader(e){let i;if(typeof e==`string`){let t=e.split(`.`);(t.length===3||t.length===5)&&([i]=t)}else if(typeof e==`object`&&e){if(`protected`in e)i=e.protected;else throw TypeError(`Token does not contain a Protected Header`)}try{if(typeof i!=`string`||!i)throw Error();let e=JSON.parse(n.decoder.decode((0,t.decode)(i)));if(!(0,r.default)(e))throw Error();return e}catch{throw TypeError(`Invalid Token or Protected Header formatting`)}}}));export default require_decode_protected_header();export{require_decode_protected_header};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";var require_errors=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JWSSignatureVerificationFailed=e.JWKSTimeout=e.JWKSMultipleMatchingKeys=e.JWKSNoMatchingKey=e.JWKSInvalid=e.JWKInvalid=e.JWTInvalid=e.JWSInvalid=e.JWEInvalid=e.JWEDecryptionFailed=e.JOSENotSupported=e.JOSEAlgNotAllowed=e.JWTExpired=e.JWTClaimValidationFailed=e.JOSEError=void 0;var JOSEError=class extends Error{static code=`ERR_JOSE_GENERIC`;code=`ERR_JOSE_GENERIC`;constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}};e.JOSEError=JOSEError,e.JWTClaimValidationFailed=class extends JOSEError{static code=`ERR_JWT_CLAIM_VALIDATION_FAILED`;code=`ERR_JWT_CLAIM_VALIDATION_FAILED`;claim;reason;payload;constructor(e,t,n=`unspecified`,r=`unspecified`){super(e,{cause:{claim:n,reason:r,payload:t}}),this.claim=n,this.reason=r,this.payload=t}},e.JWTExpired=class extends JOSEError{static code=`ERR_JWT_EXPIRED`;code=`ERR_JWT_EXPIRED`;claim;reason;payload;constructor(e,t,n=`unspecified`,r=`unspecified`){super(e,{cause:{claim:n,reason:r,payload:t}}),this.claim=n,this.reason=r,this.payload=t}},e.JOSEAlgNotAllowed=class extends JOSEError{static code=`ERR_JOSE_ALG_NOT_ALLOWED`;code=`ERR_JOSE_ALG_NOT_ALLOWED`},e.JOSENotSupported=class extends JOSEError{static code=`ERR_JOSE_NOT_SUPPORTED`;code=`ERR_JOSE_NOT_SUPPORTED`},e.JWEDecryptionFailed=class extends JOSEError{static code=`ERR_JWE_DECRYPTION_FAILED`;code=`ERR_JWE_DECRYPTION_FAILED`;constructor(e=`decryption operation failed`,t){super(e,t)}},e.JWEInvalid=class extends JOSEError{static code=`ERR_JWE_INVALID`;code=`ERR_JWE_INVALID`},e.JWSInvalid=class extends JOSEError{static code=`ERR_JWS_INVALID`;code=`ERR_JWS_INVALID`},e.JWTInvalid=class extends JOSEError{static code=`ERR_JWT_INVALID`;code=`ERR_JWT_INVALID`},e.JWKInvalid=class extends JOSEError{static code=`ERR_JWK_INVALID`;code=`ERR_JWK_INVALID`},e.JWKSInvalid=class extends JOSEError{static code=`ERR_JWKS_INVALID`;code=`ERR_JWKS_INVALID`},e.JWKSNoMatchingKey=class extends JOSEError{static code=`ERR_JWKS_NO_MATCHING_KEY`;code=`ERR_JWKS_NO_MATCHING_KEY`;constructor(e=`no applicable key found in the JSON Web Key Set`,t){super(e,t)}},e.JWKSMultipleMatchingKeys=class extends JOSEError{[Symbol.asyncIterator];static code=`ERR_JWKS_MULTIPLE_MATCHING_KEYS`;code=`ERR_JWKS_MULTIPLE_MATCHING_KEYS`;constructor(e=`multiple matching keys found in the JSON Web Key Set`,t){super(e,t)}},e.JWKSTimeout=class extends JOSEError{static code=`ERR_JWKS_TIMEOUT`;code=`ERR_JWKS_TIMEOUT`;constructor(e=`request timed out`,t){super(e,t)}},e.JWSSignatureVerificationFailed=class extends JOSEError{static code=`ERR_JWS_SIGNATURE_VERIFICATION_FAILED`;code=`ERR_JWS_SIGNATURE_VERIFICATION_FAILED`;constructor(e=`signature verification failed`,t){super(e,t)}}}));export default require_errors();export{require_errors};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../../../../../_virtual/_rolldown/runtime.js";import{require_runtime as require_runtime$1}from"../runtime/runtime.js";var require_runtime=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=require_runtime$1().default}));export default require_runtime();export{require_runtime};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_merge_stream=__commonJSMin(((e,t)=>{let{PassThrough:n}=require("stream");t.exports=function(){var e=[],t=new n({objectMode:!0});return t.setMaxListeners(0),t.add=add,t.isEmpty=isEmpty,t.on(`unpipe`,remove),Array.prototype.slice.call(arguments).forEach(add),t;function add(n){return Array.isArray(n)?(n.forEach(add),this):(e.push(n),n.once(`end`,remove.bind(null,n)),n.once(`error`,t.emit.bind(t,`error`)),n.pipe(t,{end:!1}),this)}function isEmpty(){return e.length==0}function remove(n){e=e.filter(function(e){return e!==n}),!e.length&&t.readable&&t.end()}}}));export default require_merge_stream();export{require_merge_stream};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_mimic_fn=__commonJSMin(((e,t)=>{let mimicFn=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=mimicFn,t.exports.default=mimicFn}));export default require_mimic_fn();export{require_mimic_fn};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";import{require_path_key}from"../../../path-key@3.1.1/node_modules/path-key/index.js";var require_npm_run_path=__commonJSMin(((e,t)=>{let n=require("path"),r=require_path_key(),npmRunPath=e=>{e={cwd:process.cwd(),path:process.env[r()],execPath:process.execPath,...e};let t,i=n.resolve(e.cwd),a=[];for(;t!==i;)a.push(n.join(i,`node_modules/.bin`)),t=i,i=n.resolve(i,`..`);let o=n.resolve(e.cwd,e.execPath,`..`);return a.push(o),a.concat(e.path).join(n.delimiter)};t.exports=npmRunPath,t.exports.default=npmRunPath,t.exports.env=e=>{e={env:process.env,...e};let n={...e.env},i=r({env:n});return e.path=n[i],n[i]=t.exports(e),n}}));export default require_npm_run_path();export{require_npm_run_path};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";import{require_mimic_fn}from"../../../mimic-fn@2.1.0/node_modules/mimic-fn/index.js";var require_onetime=__commonJSMin(((e,t)=>{let n=require_mimic_fn(),r=new WeakMap,onetime=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,onetime=function(...n){if(r.set(onetime,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(onetime,e),r.set(onetime,a),onetime};t.exports=onetime,t.exports.default=onetime,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}}));export default require_onetime();export{require_onetime};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_path_key=__commonJSMin(((e,t)=>{let pathKey=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=pathKey,t.exports.default=pathKey}));export default require_path_key();export{require_path_key};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";import{require_shebang_regex}from"../../../shebang-regex@3.0.0/node_modules/shebang-regex/index.js";var require_shebang_command=__commonJSMin(((e,t)=>{let n=require_shebang_regex();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}}));export default require_shebang_command();export{require_shebang_command};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_shebang_regex=__commonJSMin(((e,t)=>{t.exports=/^#!(.*)/}));export default require_shebang_regex();export{require_shebang_regex};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";import{require_signals}from"./signals.js";var require_signal_exit=__commonJSMin(((e,t)=>{var n=global.process;let processOk=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!processOk(n))t.exports=function(){return function(){}};else{var r=require("assert"),i=require_signals(),a=/^win/i.test(n.platform),o=require("events");typeof o!=`function`&&(o=o.EventEmitter);var s;n.__signal_exit_emitter__?s=n.__signal_exit_emitter__:(s=n.__signal_exit_emitter__=new o,s.count=0,s.emitted={}),s.infinite||(s.setMaxListeners(1/0),s.infinite=!0),t.exports=function(e,t){if(!processOk(global.process))return function(){};r.equal(typeof e,`function`,`a callback must be provided for exit handler`),l===!1&&load();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),s.on(n,e),function(){s.removeListener(n,e),s.listeners(`exit`).length===0&&s.listeners(`afterexit`).length===0&&unload()}};var unload=function(){l&&processOk(global.process)&&(l=!1,i.forEach(function(e){try{n.removeListener(e,c[e])}catch{}}),n.emit=d,n.reallyExit=u,--s.count)};t.exports.unload=unload;var emit=function(e,t,n){s.emitted[e]||(s.emitted[e]=!0,s.emit(e,t,n))},c={};i.forEach(function(e){c[e]=function(){processOk(global.process)&&n.listeners(e).length===s.count&&(unload(),emit(`exit`,null,e),emit(`afterexit`,null,e),a&&e===`SIGHUP`&&(e=`SIGINT`),n.kill(n.pid,e))}}),t.exports.signals=function(){return i};var l=!1,load=function(){!l&&processOk(global.process)&&(l=!0,s.count+=1,i=i.filter(function(e){try{return n.on(e,c[e]),!0}catch{return!1}}),n.emit=processEmit,n.reallyExit=processReallyExit)};t.exports.load=load;var u=n.reallyExit,processReallyExit=function(e){processOk(global.process)&&(n.exitCode=e||0,emit(`exit`,n.exitCode,null),emit(`afterexit`,n.exitCode,null),u.call(n,n.exitCode))},d=n.emit,processEmit=function(e,t){if(e===`exit`&&processOk(global.process)){t!==void 0&&(n.exitCode=t);var r=d.apply(this,arguments);return emit(`exit`,n.exitCode,null),emit(`afterexit`,n.exitCode,null),r}return d.apply(this,arguments)}}}));export default require_signal_exit();export{require_signal_exit};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_signals=__commonJSMin(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)}));export default require_signals();export{require_signals};
@@ -1,2 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_strip_final_newline=__commonJSMin(((e,t)=>{t.exports=e=>{let t=typeof e==`string`?`
2
- `:10,n=typeof e==`string`?`\r`:13;return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}}));export default require_strip_final_newline();export{require_strip_final_newline};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";import{require_isexe}from"../../../isexe@2.0.0/node_modules/isexe/index.js";var require_which=__commonJSMin(((e,t)=>{let n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=require("path"),i=n?`;`:`:`,a=require_isexe(),getNotFoundError=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),getPathInfo=(e,t)=>{let r=t.colon||i,a=e.match(/\//)||n&&e.match(/\\/)?[``]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(r)],o=n?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=n?o.split(r):[``];return n&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:a,pathExt:s,pathExtExe:o}},which=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:i,pathExt:o,pathExtExe:s}=getPathInfo(e,t),c=[],step=n=>new Promise((a,o)=>{if(n===i.length)return t.all&&c.length?a(c):o(getNotFoundError(e));let s=i[n],l=/^".*"$/.test(s)?s.slice(1,-1):s,u=r.join(l,e),d=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;a(subStep(d,n,0))}),subStep=(e,n,r)=>new Promise((i,l)=>{if(r===o.length)return i(step(n+1));let u=o[r];a(e+u,{pathExt:s},(a,o)=>{if(!a&&o){if(t.all)c.push(e+u);else return i(e+u)}return i(subStep(e,n,r+1))})});return n?step(0).then(e=>n(null,e),n):step(0)};t.exports=which,which.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:i,pathExtExe:o}=getPathInfo(e,t),s=[];for(let c=0;c<n.length;c++){let l=n[c],u=/^".*"$/.test(l)?l.slice(1,-1):l,d=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<i.length;e++){let n=f+i[e];try{if(a.sync(n,{pathExt:o})){if(t.all)s.push(n);else return n}}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw getNotFoundError(e)}}));export default require_which();export{require_which};
@@ -1,112 +0,0 @@
1
- export type ActivityWorkKind = "root-turn" | "subagent" | "remote-agent" | "task";
2
- export type ActivityWorkPhase = "running" | "completed" | "failed" | "cancelled";
3
- type ActivityActionKind = "tool" | "skill";
4
- export type ActivityActionPhase = "running" | "completed" | "failed" | "rejected" | "cancelled";
5
- type ActivityBlockerKind = "approval" | "authorization" | "input";
6
- export type ActivityBlockerPhase = "blocked" | "completed" | "cancelled" | "failed";
7
- export interface ActivityWorkIdentityV1 {
8
- readonly callId?: string;
9
- readonly id: string;
10
- readonly kind: ActivityWorkKind;
11
- readonly label?: string;
12
- readonly name?: string;
13
- readonly parentId?: string;
14
- readonly rootSessionId: string;
15
- readonly rootTurnId: string;
16
- readonly sessionId?: string;
17
- readonly turnId?: string;
18
- }
19
- export interface PendingActivitySettlementV1 {
20
- readonly entityKind: "action" | "blocker" | "work";
21
- readonly eventId: string;
22
- readonly outcome: ActivityActionPhase | ActivityBlockerPhase | ActivityWorkPhase;
23
- readonly settledAt: string;
24
- }
25
- export interface ActivityWorkStateV1 extends ActivityWorkIdentityV1 {
26
- readonly phase: ActivityWorkPhase;
27
- readonly settledAt?: string;
28
- readonly startedAt: string;
29
- }
30
- export interface ActivityActionIdentityV1 {
31
- readonly id: string;
32
- readonly kind: ActivityActionKind;
33
- readonly name: string;
34
- readonly parentWorkId: string;
35
- readonly rootTurnId: string;
36
- readonly stepIndex: number;
37
- }
38
- export interface ActivityActionStateV1 extends ActivityActionIdentityV1 {
39
- readonly label?: string;
40
- readonly phase: ActivityActionPhase;
41
- readonly settledAt?: string;
42
- readonly startedAt: string;
43
- }
44
- export interface ActivityBlockerIdentityV1 {
45
- readonly id: string;
46
- readonly kind: ActivityBlockerKind;
47
- readonly label?: string;
48
- readonly parentActionId?: string;
49
- readonly parentWorkId: string;
50
- readonly rootTurnId: string;
51
- }
52
- export interface ActivityBlockerStateV1 extends ActivityBlockerIdentityV1 {
53
- readonly phase: ActivityBlockerPhase;
54
- readonly settledAt?: string;
55
- readonly startedAt: string;
56
- }
57
- export type ActivityEventV1 = {
58
- readonly eventId: string;
59
- readonly kind: "work.started";
60
- readonly startedAt: string;
61
- readonly work: ActivityWorkIdentityV1;
62
- } | {
63
- readonly eventId: string;
64
- readonly kind: "work.settled";
65
- readonly outcome: Exclude<ActivityWorkPhase, "running">;
66
- readonly settledAt: string;
67
- readonly workId: string;
68
- } | {
69
- readonly action: ActivityActionIdentityV1;
70
- readonly eventId: string;
71
- readonly kind: "action.started";
72
- readonly startedAt: string;
73
- } | {
74
- readonly actionId: string;
75
- readonly eventId: string;
76
- readonly kind: "action.settled";
77
- readonly outcome: Exclude<ActivityActionPhase, "running">;
78
- readonly settledAt: string;
79
- } | {
80
- readonly actionId: string;
81
- readonly eventId: string;
82
- readonly kind: "action.label.updated";
83
- readonly label: string;
84
- } | {
85
- readonly blocker: ActivityBlockerIdentityV1;
86
- readonly eventId: string;
87
- readonly kind: "blocker.started";
88
- readonly startedAt: string;
89
- } | {
90
- readonly blockerId: string;
91
- readonly eventId: string;
92
- readonly kind: "blocker.settled";
93
- readonly outcome: Exclude<ActivityBlockerPhase, "blocked">;
94
- readonly settledAt: string;
95
- };
96
- export interface ActivityBatchV1 {
97
- readonly events: readonly ActivityEventV1[];
98
- readonly version: 1;
99
- }
100
- export interface ActivitySnapshotV1 {
101
- readonly actions: Readonly<Record<string, ActivityActionStateV1>>;
102
- readonly blockers: Readonly<Record<string, ActivityBlockerStateV1>>;
103
- readonly pendingSettlements: Readonly<Record<string, PendingActivitySettlementV1>>;
104
- readonly revision: number;
105
- readonly seenEventIds: readonly string[];
106
- readonly version: 1;
107
- readonly work: Readonly<Record<string, ActivityWorkStateV1>>;
108
- }
109
- export declare function parseActivityWorkIdentityV1(value: unknown): ActivityWorkIdentityV1 | undefined;
110
- /** Parses known lifecycle events while ignoring additive unknown event kinds. */
111
- export declare function parseActivityBatchV1(value: unknown): ActivityBatchV1 | undefined;
112
- export {};
@@ -1 +0,0 @@
1
- function parseActivityWorkIdentityV1(e){if(!isRecord(e))return;let t=e.kind;if(isOneOf(t,[`root-turn`,`subagent`,`remote-agent`,`task`])&&isIdentity(e.id)&&isIdentity(e.rootSessionId)&&isIdentity(e.rootTurnId)&&isOptionalIdentity(e.callId)&&isOptionalBoundedString(e.label)&&isOptionalBoundedString(e.name)&&isOptionalIdentity(e.parentId)&&isOptionalIdentity(e.sessionId)&&isOptionalIdentity(e.turnId))return{...e,callId:e.callId,id:e.id,kind:t,label:e.label,name:e.name,parentId:e.parentId,rootSessionId:e.rootSessionId,rootTurnId:e.rootTurnId,sessionId:e.sessionId,turnId:e.turnId}}function parseActivityBatchV1(e){if(!isRecord(e)||!hasOnlyKeys(e,[`events`,`version`])||e.version!==1||!Array.isArray(e.events)||e.events.length>100)return;let t=[];for(let n of e.events){if(!isRecord(n)||!isBoundedString(n.kind))return;let e=parseKnownEvent(n);if(e!==null){if(e===void 0)return;t.push(e)}}return{events:t,version:1}}function parseKnownEvent(e){switch(e.kind){case`work.started`:{if(!hasOnlyKeys(e,[`eventId`,`kind`,`startedAt`,`work`]))return;let t=parseActivityWorkIdentityV1(e.work);return!isIdentity(e.eventId)||!isBoundedString(e.startedAt)||t===void 0?void 0:{eventId:e.eventId,kind:`work.started`,startedAt:e.startedAt,work:t}}case`work.settled`:return!hasOnlyKeys(e,[`eventId`,`kind`,`outcome`,`settledAt`,`workId`])||!isIdentity(e.eventId)||!isOneOf(e.outcome,[`completed`,`failed`,`cancelled`])||!isBoundedString(e.settledAt)||!isIdentity(e.workId)?void 0:{eventId:e.eventId,kind:`work.settled`,outcome:e.outcome,settledAt:e.settledAt,workId:e.workId};case`action.started`:{if(!hasOnlyKeys(e,[`action`,`eventId`,`kind`,`startedAt`]))return;let t=parseActionIdentity(e.action);return!isIdentity(e.eventId)||!isBoundedString(e.startedAt)||t===void 0?void 0:{action:t,eventId:e.eventId,kind:`action.started`,startedAt:e.startedAt}}case`action.settled`:return!hasOnlyKeys(e,[`actionId`,`eventId`,`kind`,`outcome`,`settledAt`])||!isIdentity(e.actionId)||!isIdentity(e.eventId)||!isOneOf(e.outcome,[`completed`,`failed`,`rejected`,`cancelled`])||!isBoundedString(e.settledAt)?void 0:{actionId:e.actionId,eventId:e.eventId,kind:`action.settled`,outcome:e.outcome,settledAt:e.settledAt};case`action.label.updated`:return!hasOnlyKeys(e,[`actionId`,`eventId`,`kind`,`label`])||!isIdentity(e.actionId)||!isIdentity(e.eventId)||!isBoundedString(e.label)?void 0:{actionId:e.actionId,eventId:e.eventId,kind:`action.label.updated`,label:e.label};case`blocker.started`:{if(!hasOnlyKeys(e,[`blocker`,`eventId`,`kind`,`startedAt`]))return;let t=parseBlockerIdentity(e.blocker);return!isIdentity(e.eventId)||!isBoundedString(e.startedAt)||t===void 0?void 0:{blocker:t,eventId:e.eventId,kind:`blocker.started`,startedAt:e.startedAt}}case`blocker.settled`:return!hasOnlyKeys(e,[`blockerId`,`eventId`,`kind`,`outcome`,`settledAt`])||!isIdentity(e.blockerId)||!isIdentity(e.eventId)||!isOneOf(e.outcome,[`completed`,`cancelled`,`failed`])||!isBoundedString(e.settledAt)?void 0:{blockerId:e.blockerId,eventId:e.eventId,kind:`blocker.settled`,outcome:e.outcome,settledAt:e.settledAt};default:return null}}function parseActionIdentity(e){if(isRecord(e)&&hasOnlyKeys(e,[`id`,`kind`,`name`,`parentWorkId`,`rootTurnId`,`stepIndex`])&&!(!isIdentity(e.id)||!isOneOf(e.kind,[`tool`,`skill`])||!isBoundedString(e.name)||!isIdentity(e.parentWorkId)||!isIdentity(e.rootTurnId)||!Number.isInteger(e.stepIndex)||e.stepIndex<0))return{id:e.id,kind:e.kind,name:e.name,parentWorkId:e.parentWorkId,rootTurnId:e.rootTurnId,stepIndex:e.stepIndex}}function parseBlockerIdentity(e){if(isRecord(e)&&hasOnlyKeys(e,[`id`,`kind`,`label`,`parentActionId`,`parentWorkId`,`rootTurnId`])&&isIdentity(e.id)&&isOneOf(e.kind,[`approval`,`authorization`,`input`])&&isOptionalBoundedString(e.label)&&isOptionalIdentity(e.parentActionId)&&isIdentity(e.parentWorkId)&&isIdentity(e.rootTurnId))return{id:e.id,kind:e.kind,label:e.label,parentActionId:e.parentActionId,parentWorkId:e.parentWorkId,rootTurnId:e.rootTurnId}}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function hasOnlyKeys(e,t){return Object.keys(e).every(e=>t.includes(e))}function isBoundedString(e){return typeof e==`string`&&e.length>0&&e.length<=500}function isIdentity(e){return typeof e==`string`&&e.length>0&&e.length<=1e3}function isOptionalIdentity(e){return e===void 0||isIdentity(e)}function isOptionalBoundedString(e){return e===void 0||isBoundedString(e)}function isOneOf(e,t){return typeof e==`string`&&t.includes(e)}export{parseActivityBatchV1,parseActivityWorkIdentityV1};
@@ -1,13 +0,0 @@
1
- /** JSON error returned when an agent-handle operation cannot be completed. */
2
- export interface AgentHandleErrorJson<TCode extends string = string> {
3
- readonly code: TCode;
4
- readonly error: string;
5
- readonly ok: false;
6
- }
7
- /** Stable agent-handle errors shared by HTTP producers and consumers. */
8
- export declare const AgentHandleError: {
9
- readonly SessionNotResumable: {
10
- readonly code: "SESSION_NOT_RESUMABLE";
11
- readonly toJson: () => AgentHandleErrorJson<"SESSION_NOT_RESUMABLE">;
12
- };
13
- };
@@ -1 +0,0 @@
1
- function defineAgentHandleError(e,t){return{code:e,toJson:()=>({code:e,error:t,ok:!1})}}const AgentHandleError={SessionNotResumable:defineAgentHandleError(`SESSION_NOT_RESUMABLE`,`Session is not active and cannot be resumed.`)};export{AgentHandleError};
@@ -1,5 +0,0 @@
1
- import type { ChannelActivityRenderer } from "#channel/activity-renderer.js";
2
- import { type SlackBotToken } from "#public/channels/slack/api.js";
3
- import type { SlackTransportOptions } from "#public/channels/slack/transport.js";
4
- export declare const SLACK_ACTIVITY_PLAN_RENDERER_ID = "slack.experimental.plan.v1";
5
- export declare function createSlackPlanRenderer(apiOptions: SlackTransportOptions | undefined, botToken: SlackBotToken | undefined): ChannelActivityRenderer;
@@ -1 +0,0 @@
1
- import{callSlackApi}from"#public/channels/slack/api.js";const SLACK_ACTIVITY_PLAN_RENDERER_ID=`slack.experimental.plan.v1`;function createSlackPlanRenderer(e,t){return{id:SLACK_ACTIVITY_PLAN_RENDERER_ID,async dispose(){},async render({destination:n,snapshot:r,state:i}){let a=n.channelId,o=n.threadTs,s=n.teamId,c=n.triggeringUserId,l=n.installationTeamId;if(typeof a!=`string`||typeof o!=`string`||!o||typeof s!=`string`||typeof c!=`string`)return i;let u=isState(i)?i.streams:{},d={...u};for(let n of new Set(Object.values(r.work).map(e=>e.rootTurnId))){let i=project(r,n),f=u[n];if(!f){let n=await api(`chat.startStream`,{channel:a,thread_ts:o,recipient_team_id:s,recipient_user_id:c,task_display_mode:`plan`,chunks:[{type:`plan_update`,title:`Agent activity`},...i.parents.map(taskChunk)]},e,t,l);if(!n.ok||typeof n.ts!=`string`)throw Error(`Slack activity plan failed: ${n.error??`missing ts`}`);f={ts:n.ts,seen:Object.fromEntries(i.parents.map(e=>[e.id,e.phase])),stopped:!1}}if(f.stopped){d[n]=f;continue}let p=detailUpdates(i,f.seen);p.length&&await checked(`chat.appendStream`,{channel:a,ts:f.ts,chunks:p},e,t,l);let m=Object.fromEntries([...i.parents.map(e=>[e.id,e.phase]),...i.entities.map(e=>[e.id,entityVersion(e)])]);if(i.settled){await checked(`chat.stopStream`,{channel:a,ts:f.ts},e,t,l);let r=[{type:`plan`,title:`Agent activity`,tasks:i.parents.map(e=>({type:`task_card`,task_id:safeId(e.id),title:e.name,status:status(e.phase)}))}];await checked(`chat.update`,{channel:a,ts:f.ts,text:i.parents.map(e=>e.name).join(`, `),blocks:r},e,t,l),d[n]={ts:f.ts,seen:m,stopped:!0}}else d[n]={ts:f.ts,seen:m,stopped:!1}}return{streams:d}}}}function project(e,t){let n=Object.values(e.work).filter(e=>e.rootTurnId===t),r=n.filter(e=>e.kind===`root-turn`),i=new Set(r.map(e=>e.id)),a=n.filter(e=>e.parentId&&i.has(e.parentId));a.length||(a=r);let owner=e=>{let t=n.find(t=>t.id===e);for(;t?.parentId&&!a.some(e=>e.id===t.id);)t=n.find(e=>e.id===t.parentId);return t&&a.find(e=>e.id===t.id)},o=[];for(let e of n)if(!a.some(t=>t.id===e.id)&&!i.has(e.id)){let t=owner(e.id);t&&o.push({id:e.id,name:e.name??`Agent work`,phase:e.phase,parent:t.id})}for(let n of Object.values(e.actions).filter(e=>e.rootTurnId===t)){let e=owner(n.parentWorkId);e&&o.push({id:n.id,name:n.label??n.name,phase:n.phase,parent:e.id})}for(let n of Object.values(e.blockers).filter(e=>e.rootTurnId===t)){let e=owner(n.parentWorkId);e&&o.push({id:n.id,name:n.label??`Waiting`,phase:n.phase,parent:e.id})}let s=[...n,...Object.values(e.actions).filter(e=>e.rootTurnId===t),...Object.values(e.blockers).filter(e=>e.rootTurnId===t)].every(e=>e.phase!==`running`&&e.phase!==`blocked`);return{parents:a,entities:o,settled:s}}function detailUpdates(e,t){let n=e.parents.filter(e=>t[e.id]!==e.phase).map(taskChunk),r=e.entities.filter(e=>t[e.id]!==entityVersion(e)).map(t=>({type:`task_update`,id:safeId(t.parent),title:e.parents.find(e=>e.id===t.parent)?.name??`Agent work`,status:status(e.parents.find(e=>e.id===t.parent)?.phase??`running`),details:`${icon(t.phase)} ${t.name}\n`}));return[...n,...r]}function entityVersion(e){return`${e.phase}:${e.name}`}function taskChunk(e){return{type:`task_update`,id:safeId(e.id),title:e.kind===`root-turn`?`Agent turn`:e.label??e.name??`Agent work`,status:status(e.phase)}}function status(e){return e===`running`||e===`blocked`?`in_progress`:e===`completed`?`complete`:`error`}function icon(e){return e===`running`||e===`blocked`?`•`:e===`completed`?`✓`:e===`cancelled`?`–`:`✗`}function safeId(e){return e.replace(/[^a-zA-Z0-9_-]/g,`_`).slice(-200)}async function api(e,t,n,r,i){return callSlackApi({api:n,operation:e,body:t,botToken:r,context:{teamId:typeof i==`string`?i:void 0}})}async function checked(e,t,n,r,i){let a=await api(e,t,n,r,i);if(!a.ok)throw Error(`Slack ${e} failed: ${a.error??`unknown_error`}`)}function isState(e){return typeof e==`object`&&!!e&&typeof Reflect.get(e,`streams`)==`object`}export{SLACK_ACTIVITY_PLAN_RENDERER_ID,createSlackPlanRenderer};