@qqbrowser/qbot-dsh 0.1.6 → 0.1.7

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 (254) hide show
  1. package/lib/client.js +1 -1
  2. package/lib/sandbox-local.js +1 -1
  3. package/node_modules/@aws-sdk/core/package.json +1 -1
  4. package/node_modules/@aws-sdk/credential-provider-env/package.json +1 -1
  5. package/node_modules/@aws-sdk/credential-provider-http/package.json +1 -1
  6. package/node_modules/@aws-sdk/credential-provider-ini/package.json +1 -1
  7. package/node_modules/@aws-sdk/credential-provider-login/package.json +1 -1
  8. package/node_modules/@aws-sdk/credential-provider-node/package.json +1 -1
  9. package/node_modules/@aws-sdk/credential-provider-process/package.json +1 -1
  10. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +8 -4
  11. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +8 -4
  12. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +1 -1
  13. package/node_modules/@aws-sdk/credential-provider-sso/package.json +1 -1
  14. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +1 -1
  15. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +1 -1
  16. package/node_modules/@aws-sdk/middleware-eventstream/package.json +1 -1
  17. package/node_modules/@aws-sdk/middleware-websocket/package.json +1 -1
  18. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  19. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  20. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  21. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  23. package/node_modules/@aws-sdk/nested-clients/package.json +1 -1
  24. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +1 -1
  25. package/node_modules/@aws-sdk/types/package.json +1 -1
  26. package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  32. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  36. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  39. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  42. package/node_modules/@deepseek-ai/dsh-browser-jsapi/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +5 -5
  54. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-jsapi-bridge/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  89. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  91. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  93. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  95. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  96. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  97. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +3 -3
  98. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  99. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  100. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  102. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  104. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  108. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-tool-browser/lib/index.js +1 -1
  190. package/node_modules/@deepseek-ai/dsh-tool-browser/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  194. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  205. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  210. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  216. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  217. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +1 -1
  218. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +1 -1
  219. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +1 -1
  220. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +1 -1
  221. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +1 -1
  222. package/node_modules/jose/dist/webapi/jwk/embedded.js +1 -1
  223. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +1 -1
  224. package/node_modules/jose/dist/webapi/jwks/local.js +1 -1
  225. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  226. package/node_modules/jose/dist/webapi/jws/compact/sign.js +1 -1
  227. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +1 -1
  228. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +1 -1
  229. package/node_modules/jose/dist/webapi/jws/general/sign.js +1 -1
  230. package/node_modules/jose/dist/webapi/jws/general/verify.js +1 -1
  231. package/node_modules/jose/dist/webapi/jwt/decrypt.js +1 -1
  232. package/node_modules/jose/dist/webapi/jwt/encrypt.js +1 -1
  233. package/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
  234. package/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -1
  235. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +1 -1
  236. package/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
  237. package/node_modules/jose/dist/webapi/key/import.js +1 -1
  238. package/node_modules/jose/dist/webapi/lib/asn1.js +4 -4
  239. package/node_modules/jose/dist/webapi/lib/content_encryption.js +1 -1
  240. package/node_modules/jose/dist/webapi/lib/deflate.js +1 -1
  241. package/node_modules/jose/dist/webapi/lib/helpers.js +1 -1
  242. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +1 -1
  243. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +1 -1
  244. package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +1 -0
  245. package/node_modules/jose/dist/webapi/lib/jws_sign.js +1 -1
  246. package/node_modules/jose/dist/webapi/lib/jws_verify.js +1 -1
  247. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
  248. package/node_modules/jose/dist/webapi/lib/key.js +1 -1
  249. package/node_modules/jose/dist/webapi/lib/key_management.js +1 -1
  250. package/node_modules/jose/dist/webapi/lib/key_options.js +1 -0
  251. package/node_modules/jose/dist/webapi/lib/options.js +1 -1
  252. package/node_modules/jose/dist/webapi/lib/type_checks.js +1 -1
  253. package/node_modules/jose/package.json +1 -1
  254. package/package.json +1 -1
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tool-subagent","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-jobs":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-tool-subagent","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-jobs":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-agent":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tool-subagent-control","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./list-agents":{"types":"./lib/types/list-agents.d.ts","default":"./lib/types/list-agents.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-tool-subagent-control","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./list-agents":{"types":"./lib/types/list-agents.d.ts","default":"./lib/types/list-agents.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tool-subagent-report","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-tool-subagent-report","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tool-todo","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-tool-todo","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tool-web","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-web":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7"},"dependencies":{"@joplin/turndown-plugin-gfm":"^1.0.67","turndown":"^7.2.4","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-tool-web","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-web":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@joplin/turndown-plugin-gfm":"^1.0.67","turndown":"^7.2.4","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tool-workflow","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-workflow":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-tool-workflow","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-workflow":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-tools","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./presentation":{"types":"./lib/types/presentation.d.ts","default":"./lib/types/presentation.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-code-runtime":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-user-approval":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-tools","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./presentation":{"types":"./lib/types/presentation.d.ts","default":"./lib/types/presentation.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-user-approval":"^0.1.0-rc.7","@deepseek-ai/dsh-code-runtime":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-typert-loader","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-typert-loader","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-typert-registry","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-typert-registry","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-user-approval","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-user-approval","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-user-questions","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-user-questions","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-web-app","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./startup":{"types":"./lib/types/startup.d.ts","default":"./lib/startup.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./cordis.patch.yml":"./cordis.patch.yml","./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"commander":"^15.0.0","@deepseek-ai/dsh-app-boot":"^0.1.0-rc.7","@deepseek-ai/dsh-client-hmr":"^0.1.0-rc.7","@deepseek-ai/dsh-client-locale":"^0.1.0-rc.7","@deepseek-ai/dsh-client-runtime":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-agent-preset":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-conversation":"^0.1.0-rc.7","@deepseek-ai/dsh-client-connection":"^0.1.0-rc.7","@deepseek-ai/dsh-client-modules":"^0.1.0-rc.7","@deepseek-ai/dsh-api-remotes":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-directory-picker-browse":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-message-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-cordis":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-deliverables":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-layout":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-directory-picker-native":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-model-selection":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-models":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-permission-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-plugin-inventory":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-plan":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-plugins":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-general":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-user-questions":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-sidebar":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-skill":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-input-trigger":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-jobs":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-jsapi-bridge":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-theme":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-tool":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-trajectory":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-workflow-run":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-workspace":"^0.1.0-rc.7","@deepseek-ai/dsh-cmdline":"^0.1.0-rc.7","@deepseek-ai/dsh-code-runtime-worker-thread":"^0.1.0-rc.7","@deepseek-ai/dsh-web-frontend":"^0.1.0-rc.7","@deepseek-ai/dsh-host-frontend-static":"^0.1.0-rc.7","@deepseek-ai/dsh-cordis-client-runner":"^0.1.0-rc.7","@deepseek-ai/dsh-host-apiproxy":"^0.1.0-rc.7","@deepseek-ai/dsh-cordis-host-runner":"^0.1.0-rc.7","@deepseek-ai/dsh-host-directory-picker-browse":"^0.1.0-rc.7","@deepseek-ai/dsh-host-directory-picker-auto":"^0.1.0-rc.7","@deepseek-ai/dsh-host-plugin-inventory":"^0.1.0-rc.7","@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/dsh-host-directory-picker-native":"^0.1.0-rc.7","@deepseek-ai/dsh-message-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-session-log-export":"^0.1.0-rc.7","@deepseek-ai/dsh-session-stats":"^0.1.0-rc.7","@deepseek-ai/dsh-storage":"^0.1.0-rc.7","@deepseek-ai/dsh-storage-json":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection-cache":"^0.1.0-rc.7","@deepseek-ai/dsh-workspace":"^0.1.0-rc.7","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-storage-domain":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-shell-env":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-web-app","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./startup":{"types":"./lib/types/startup.d.ts","default":"./lib/startup.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./cordis.patch.yml":"./cordis.patch.yml","./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"commander":"^15.0.0","@deepseek-ai/dsh-api-remotes":"^0.1.0-rc.7","@deepseek-ai/dsh-app-boot":"^0.1.0-rc.7","@deepseek-ai/dsh-client-connection":"^0.1.0-rc.7","@deepseek-ai/dsh-client-hmr":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-client-locale":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-client-runtime":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-conversation":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-agent-preset":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-cordis":"^0.1.0-rc.7","@deepseek-ai/dsh-client-modules":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-message-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-directory-picker-native":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-layout":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-models":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-model-selection":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-plugin-inventory":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-permission-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-deliverables":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-plugins":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-user-questions":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-plan":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings-general":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-sidebar":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-directory-picker-browse":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-skill":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-jobs":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-jsapi-bridge":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-theme":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-tool":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-workflow-run":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-workspace":"^0.1.0-rc.7","@deepseek-ai/dsh-cmdline":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-trajectory":"^0.1.0-rc.7","@deepseek-ai/dsh-cordis-client-runner":"^0.1.0-rc.7","@deepseek-ai/dsh-cordis-host-runner":"^0.1.0-rc.7","@deepseek-ai/dsh-code-runtime-worker-thread":"^0.1.0-rc.7","@deepseek-ai/dsh-web-frontend":"^0.1.0-rc.7","@deepseek-ai/dsh-host-frontend-static":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-input-trigger":"^0.1.0-rc.7","@deepseek-ai/dsh-host-apiproxy":"^0.1.0-rc.7","@deepseek-ai/dsh-host-directory-picker-auto":"^0.1.0-rc.7","@deepseek-ai/dsh-host-directory-picker-browse":"^0.1.0-rc.7","@deepseek-ai/dsh-host-directory-picker-native":"^0.1.0-rc.7","@deepseek-ai/dsh-host-plugin-inventory":"^0.1.0-rc.7","@deepseek-ai/dsh-message-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-session-stats":"^0.1.0-rc.7","@deepseek-ai/dsh-session-log-export":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection-cache":"^0.1.0-rc.7","@deepseek-ai/dsh-storage":"^0.1.0-rc.7","@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-storage-domain":"^0.1.0-rc.7","@deepseek-ai/dsh-storage-json":"^0.1.0-rc.7","@deepseek-ai/dsh-workspace":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-shell-env":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-web-search-deepseek","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-credentials":"^0.1.0-rc.7","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-web":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-web-search-deepseek","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-web":"^0.1.0-rc.7","@deepseek-ai/dsh-credentials":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-workflow","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-workflow","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-agent":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-workflow-worker-thread","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./worker":{"types":"./lib/types/worker.d.ts","default":"./lib/worker.cjs"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-workflow":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-workflow-worker-thread","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./worker":{"types":"./lib/types/worker.d.ts","default":"./lib/worker.cjs"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-workflow":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-workspace","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-storage":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-storage-domain":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"},"dependencies":{"zod":"^4.4.3"}}
1
+ {"name":"@deepseek-ai/dsh-workspace","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-storage":"^0.1.0-rc.7","@deepseek-ai/dsh-storage-domain":"^0.1.0-rc.7"},"dependencies":{"zod":"^4.4.3"}}
@@ -1 +1 @@
1
- var s=Object.defineProperty;var n=(r,t)=>s(r,"name",{value:t,configurable:!0});import{FlattenedEncrypt as a}from"../flattened/encrypt.js";export class CompactEncrypt{static{n(this,"CompactEncrypt")}#t;constructor(t){this.#t=new a(t)}setContentEncryptionKey(t){return this.#t.setContentEncryptionKey(t),this}setInitializationVector(t){return this.#t.setInitializationVector(t),this}setProtectedHeader(t){return this.#t.setProtectedHeader(t),this}setKeyManagementParameters(t){return this.#t.setKeyManagementParameters(t),this}async encrypt(t,i){const e=await this.#t.encrypt(t,i);return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(".")}}
1
+ var a=Object.defineProperty;var n=(i,t)=>a(i,"name",{value:t,configurable:!0});import{assertNotSet as r}from"../../lib/helpers.js";import{assertUint8Array as o}from"../../lib/type_checks.js";import{createJWE as c}from"../../lib/jwe_encrypt.js";export class CompactEncrypt{static{n(this,"CompactEncrypt")}#n;#t;#e;#r;#i;constructor(t){o(t,"plaintext"),this.#n=t}setContentEncryptionKey(t){return r(this.#e,"setContentEncryptionKey"),this.#e=t,this}setInitializationVector(t){return r(this.#r,"setInitializationVector"),this.#r=t,this}setProtectedHeader(t){return r(this.#t,"setProtectedHeader"),this.#t=t,this}setKeyManagementParameters(t){return r(this.#i,"setKeyManagementParameters"),this.#i=t,this}async encrypt(t,s){const e=await c([this.#n,this.#t,void 0,void 0,void 0,this.#e,this.#r,this.#i,void 0,!1],t,s);return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(".")}}
@@ -1 +1 @@
1
- var p=Object.defineProperty;var r=(t,e)=>p(t,"name",{value:e,configurable:!0});import{JWEInvalid as i}from"../../util/errors.js";import{isObject as n}from"../../lib/type_checks.js";import{prepareDecrypt as o,decryptJWE as a,decryptResult as m,checkShared as d,checkRecipient as f}from"../../lib/jwe_decrypt.js";export async function flattenedDecrypt(t,e,c){if(!n(t))throw new i("Flattened JWE must be an object");return d(t),f(t),m(t,await a(t,o(c),e))}r(flattenedDecrypt,"flattenedDecrypt");
1
+ var s=Object.defineProperty;var o=(t,e)=>s(t,"name",{value:e,configurable:!0});import{JWEInvalid as a}from"../../util/errors.js";import{isObject as h}from"../../lib/type_checks.js";import{prepareDecrypt as d,decryptJWE as f,decryptResult as m,checkRecipient as y,snapshotSharedJWE as E,snapshotRecipientJWE as J}from"../../lib/jwe_decrypt.js";export async function flattenedDecrypt(t,e,c){if(!h(t))throw new a("Flattened JWE must be an object");const p=E(t),[n,,i]=J(t);if(!n)throw i;const r={...p,...n};return y(r),m(r,await f(r,d(c),e))}o(flattenedDecrypt,"flattenedDecrypt");
@@ -1 +1 @@
1
- var n=Object.defineProperty;var s=(i,t)=>n(i,"name",{value:t,configurable:!0});import{unprotected as h,assertNotSet as e}from"../../lib/helpers.js";import{JWEInvalid as a}from"../../util/errors.js";import{createJWE as d}from"../../lib/jwe_encrypt.js";import{validateCritDuplicates as o}from"../../lib/options.js";export class FlattenedEncrypt{static{s(this,"FlattenedEncrypt")}#n;#t;#e;#r;#h;#i;#s;#a;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this.#n=t}setKeyManagementParameters(t){return e(this.#a,"setKeyManagementParameters"),this.#a=t,this}setProtectedHeader(t){return e(this.#t,"setProtectedHeader"),this.#t=t,this}setSharedUnprotectedHeader(t){return e(this.#e,"setSharedUnprotectedHeader"),this.#e=t,this}setUnprotectedHeader(t){return e(this.#r,"setUnprotectedHeader"),this.#r=t,this}setAdditionalAuthenticatedData(t){return this.#h=t,this}setContentEncryptionKey(t){return e(this.#i,"setContentEncryptionKey"),this.#i=t,this}setInitializationVector(t){return e(this.#s,"setInitializationVector"),this.#s=t,this}async encrypt(t,r){if(!this.#t&&!this.#r&&!this.#e)throw new a("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");return o(a,this.#t),d([this.#n,this.#t,this.#r,this.#e,this.#h,this.#i,this.#s,this.#a,r?.crit,r?h in r:!1],t)}}
1
+ var a=Object.defineProperty;var s=(r,t)=>a(r,"name",{value:t,configurable:!0});import{assertNotSet as e}from"../../lib/helpers.js";import{createJWE as n}from"../../lib/jwe_encrypt.js";import{assertUint8Array as h}from"../../lib/type_checks.js";export class FlattenedEncrypt{static{s(this,"FlattenedEncrypt")}#n;#t;#e;#r;#h;#s;#i;#a;constructor(t){h(t,"plaintext"),this.#n=t}setKeyManagementParameters(t){return e(this.#a,"setKeyManagementParameters"),this.#a=t,this}setProtectedHeader(t){return e(this.#t,"setProtectedHeader"),this.#t=t,this}setSharedUnprotectedHeader(t){return e(this.#e,"setSharedUnprotectedHeader"),this.#e=t,this}setUnprotectedHeader(t){return e(this.#r,"setUnprotectedHeader"),this.#r=t,this}setAdditionalAuthenticatedData(t){return this.#h=t,this}setContentEncryptionKey(t){return e(this.#s,"setContentEncryptionKey"),this.#s=t,this}setInitializationVector(t){return e(this.#i,"setInitializationVector"),this.#i=t,this}async encrypt(t,i){return n([this.#n,this.#t,this.#r,this.#e,this.#h,this.#s,this.#i,this.#a,void 0,!1],t,i)}}
@@ -1 +1 @@
1
- var d=Object.defineProperty;var o=(e,n)=>d(e,"name",{value:n,configurable:!0});import{prepareDecrypt as y,shareJWE as l,decryptRecipient as f,decryptResult as g,checkShared as m,checkRecipient as E}from"../../lib/jwe_decrypt.js";import{JWEDecryptionFailed as p,JWEInvalid as i}from"../../util/errors.js";import{isObject as s}from"../../lib/type_checks.js";export async function generalDecrypt(e,n,h){if(!s(e))throw new i("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(s))throw new i("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new i("JWE Recipients has no members");let a,c;try{m(e),a=y(h),c=l(e)}catch{throw new p}if(e.recipients.length>1)for(const{header:r}of e.recipients){const t=c[0]?.alg??r?.alg??e.unprotected?.alg;if(t==="dir"||t==="ECDH-ES")throw new i(`"${t}" alg may only have a single recipient`)}for(const r of e.recipients)try{const t={aad:e.aad,ciphertext:e.ciphertext,encrypted_key:r.encrypted_key,header:r.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected};return E(t),g(t,await f(t,c,a,n))}catch{}throw new p}o(generalDecrypt,"generalDecrypt");
1
+ var w=Object.defineProperty;var l=(r,c)=>w(r,"name",{value:c,configurable:!0});import{prepareDecrypt as d,shareJWE as g,decryptRecipient as E,decryptResult as J,checkRecipient as W,snapshotSharedJWE as R,snapshotRecipientJWE as u}from"../../lib/jwe_decrypt.js";import{JWEDecryptionFailed as f,JWEInvalid as n}from"../../util/errors.js";import{isObject as y}from"../../lib/type_checks.js";export async function generalDecrypt(r,c,m){if(!y(r))throw new n("General JWE must be an object");const a=r.recipients;if(!Array.isArray(a))throw new n("JWE Recipients missing or incorrect type");const i=Array.from(a);if(!i.every(y))throw new n("JWE Recipients missing or incorrect type");if(!i.length)throw new n("JWE Recipients has no members");let p,o,s;try{p=d(m),o=R(r),s=g(o)}catch{throw new f}const h=i.map(t=>u(t));if(i.length>1)for(const[,t]of h){const e=s[0]?.alg??t??o.unprotected?.alg;if(e==="dir"||e==="ECDH-ES")throw new n(`"${e}" alg may only have a single recipient`)}for(const[t]of h)if(t)try{const e={...o,...t};return W(e),J(e,await E(e,s,p,c))}catch{}throw new f}l(generalDecrypt,"generalDecrypt");
@@ -1 +1 @@
1
- var P=Object.defineProperty;var u=(p,e)=>P(p,"name",{value:e,configurable:!0});import{FlattenedEncrypt as v}from"../flattened/encrypt.js";import{assertNotSet as f}from"../../lib/helpers.js";import{JWEInvalid as l}from"../../util/errors.js";import{generateCek as x}from"../../lib/content_encryption.js";import{encryptKeyManagement as A}from"../../lib/key_management.js";import{encode as M}from"../../util/base64url.js";import{validateCritDuplicates as U}from"../../lib/options.js";import{checkDisjoint as K,checkEncryptHeaders as _,encryptJWE as b}from"../../lib/jwe_encrypt.js";import{prepareKey as D}from"../../lib/key.js";import{jweAlgorithm as S}from"../../lib/jwe_algorithms.js";class R{static{u(this,"IndividualRecipient")}#e;state;constructor(e,a,i){this.#e=e,this.state=[void 0,void 0,a,i]}setUnprotectedHeader(e){return f(this.state[0],"setUnprotectedHeader"),this.state[0]=e,this}setKeyManagementParameters(e){return f(this.state[1],"setKeyManagementParameters"),this.state[1]=e,this}addRecipient(...e){return this.#e.addRecipient(...e)}encrypt(...e){return this.#e.encrypt(...e)}done(){return this.#e}}function H(p,e,a){const{aad:i,protected:h,unprotected:s,header:r}=p;i&&(e.aad=i),h&&(e.protected=h),s&&(e.unprotected=s),r&&(a.header=r)}u(H,"copyOptionalMembers");export class GeneralEncrypt{static{u(this,"GeneralEncrypt")}#e;#t=[];#r;#n;#i;constructor(e){this.#e=e}addRecipient(e,a){const i=new R(this,e,a?.crit);return this.#t.push(i),i}setProtectedHeader(e){return f(this.#r,"setProtectedHeader"),this.#r=e,this}setSharedUnprotectedHeader(e){return f(this.#n,"setSharedUnprotectedHeader"),this.#n=e,this}setAdditionalAuthenticatedData(e){return this.#i=e,this}async encrypt(){if(!this.#t.length)throw new l("at least one recipient must be added");if(!(this.#e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");if(this.#t.length===1){const[r]=this.#t,[m,o,y,d]=r.state,t=await new v(this.#e).setAdditionalAuthenticatedData(this.#i).setProtectedHeader(this.#r).setSharedUnprotectedHeader(this.#n).setUnprotectedHeader(m).setKeyManagementParameters(o).encrypt(y,{crit:d}),n={ciphertext:t.ciphertext,iv:t.iv,recipients:[{}],tag:t.tag};return t.encrypted_key&&(n.recipients[0].encrypted_key=t.encrypted_key),H(t,n,n.recipients[0]),n}U(l,this.#r);let e;const a=[],i=[];for(let r=0;r<this.#t.length;r++){const m=this.#t[r],[o,y,,d]=m.state,t=[this.#e,this.#r,o,this.#n,this.#i,void 0,void 0,y,d,!0],n=_(t);if(a.push(t),i.push(n),n[1]==="dir"||n[1]==="ECDH-ES")throw new l(`"${n[1]}" alg may only have a single recipient`);if(!e)e=n[2];else if(e!==n[2])throw new l('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}const h=x(i[0][3]),s={ciphertext:"",recipients:[]};for(let r=0;r<this.#t.length;r++){const m=this.#t[r],[o,y,d]=m.state,t={};if(s.recipients.push(t),r===0){a[0][5]=h;const c=await b(a[0],i[0],d);s.ciphertext=c.ciphertext,s.iv=c.iv,s.tag=c.tag,t.encrypted_key=c.encrypted_key,H(c,s,t);continue}const[,n,,k]=i[r],w=await D(S(n),d,"encrypt"),[,E,g]=await A(n,k,w,h,y);if(t.encrypted_key=M(E),o||g){const c={...o,...g};g&&K(this.#r,c,this.#n),t.header=c}}return s}}
1
+ var v=Object.defineProperty;var l=(u,e)=>v(u,"name",{value:e,configurable:!0});import{assertNotSet as g}from"../../lib/helpers.js";import{JWEInvalid as H}from"../../util/errors.js";import{generateCek as M}from"../../lib/content_encryption.js";import{encryptKeyManagement as U}from"../../lib/key_management.js";import{encode as _}from"../../util/base64url.js";import{checkDisjoint as A,checkEncryptHeaders as K,createJWE as b,encryptJWE as J}from"../../lib/jwe_encrypt.js";import{prepareKey as R}from"../../lib/key.js";import{jweAlgorithm as S}from"../../lib/jwe_algorithms.js";import{assertUint8Array as W}from"../../lib/type_checks.js";class D{static{l(this,"IndividualRecipient")}#e;state;constructor(e,a,i){this.#e=e,this.state=[void 0,void 0,a,i]}setUnprotectedHeader(e){return g(this.state[0],"setUnprotectedHeader"),this.state[0]=e,this}setKeyManagementParameters(e){return g(this.state[1],"setKeyManagementParameters"),this.state[1]=e,this}addRecipient(...e){return this.#e.addRecipient(...e)}encrypt(...e){return this.#e.encrypt(...e)}done(){return this.#e}}function E(u,e,a){const{aad:i,protected:s,unprotected:o,header:m}=u;i&&(e.aad=i),s&&(e.protected=s),o&&(e.unprotected=o),m&&(a.header=m)}l(E,"copyOptionalMembers");export class GeneralEncrypt{static{l(this,"GeneralEncrypt")}#e;#t=[];#r;#n;#i;constructor(e){this.#e=e}addRecipient(e,a){const i=new D(this,e,a?.crit);return this.#t.push(i),i}setProtectedHeader(e){return g(this.#r,"setProtectedHeader"),this.#r=e,this}setSharedUnprotectedHeader(e){return g(this.#n,"setSharedUnprotectedHeader"),this.#n=e,this}setAdditionalAuthenticatedData(e){return this.#i=e,this}async encrypt(){if(!this.#t.length)throw new H("at least one recipient must be added");if(W(this.#e,"plaintext"),this.#t.length===1){const[t,y,f,h]=this.#t[0].state,r=await b([this.#e,this.#r,t,this.#n,this.#i,void 0,void 0,y,h,!1],f),n={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.encrypted_key&&(n.recipients[0].encrypted_key=r.encrypted_key),E(r,n,n.recipients[0]),n}let e,a=this.#r,i=this.#n;const s=[],o=[];for(let t=0;t<this.#t.length;t++){const y=this.#t[t],[f,h,,r]=y.state,n=[this.#e,a,f,i,this.#i,void 0,void 0,h,r,!0],c=K(n);if(s.push(n),o.push(c),t===0&&(a=n[1],i=n[3]),c[1]==="dir"||c[1]==="ECDH-ES")throw new H(`"${c[1]}" alg may only have a single recipient`);if(!e)e=c[2];else if(e!==c[2])throw new H('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}const m=M(o[0][3]),p={ciphertext:"",recipients:[]};for(let t=0;t<this.#t.length;t++){const y=this.#t[t],[,f,h]=y.state,r={};if(p.recipients.push(r),t===0){s[0][5]=m;const d=await J(s[0],o[0],h);p.ciphertext=d.ciphertext,p.iv=d.iv,p.tag=d.tag,r.encrypted_key=d.encrypted_key,E(d,p,r);continue}const[,n,,c]=o[t],w=s[t][2],x=await R(S(n),h,"encrypt"),[,P,k]=await U(n,c,x,m,f);if(r.encrypted_key=_(P),w||k){const d={...w,...k};k&&A(s[t][1],d,s[t][3]),r.header=d}}return p}}
@@ -1 +1 @@
1
- var n=Object.defineProperty;var a=(e,r)=>n(e,"name",{value:r,configurable:!0});import{jwkToKey as w}from"../lib/jwk_to_key.js";import{jwsAlgorithm as b}from"../lib/jws_algorithms.js";import{isObject as c}from"../lib/type_checks.js";import{JWSInvalid as m}from"../util/errors.js";export async function EmbeddedJWK(e,r){const t={...e,...r?.header};if(!c(t.jwk))throw new m('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const i=b(t.alg),o=await w(i,{...t.jwk,ext:!0});if(o.type!=="public")throw new m('"jwk" (JSON Web Key) Header Parameter must be a public key');return o}a(EmbeddedJWK,"EmbeddedJWK");
1
+ var s=Object.defineProperty;var d=(r,a)=>s(r,"name",{value:a,configurable:!0});import{jwkToKey as w}from"../lib/jwk_to_key.js";import{jwsAlgorithm as l}from"../lib/jws_algorithms.js";import{isObject as u}from"../lib/type_checks.js";import{JWSInvalid as t}from"../util/errors.js";import{normalizeJwk as b}from"../lib/jwk_metadata.js";export async function EmbeddedJWK(r,a){const i={...r,...a?.header};if(!u(i.jwk))throw new t('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let e;try{e=b(i.jwk)}catch(m){throw new t("Invalid Embedded JWK",{cause:m})}const n=l(i.alg);if(e.use!==void 0&&e.use!=="sig")throw new t('Invalid Embedded JWK, its "use" must be "sig" when present');if(e.alg!==void 0&&e.alg!==n.alg)throw new t(`Invalid Embedded JWK, its "alg" must be "${n.alg}" when present`);const o=await w(n,{...e,ext:!0});if(o.type!=="public")throw new t('"jwk" (JSON Web Key) Header Parameter must be a public key');return o}d(EmbeddedJWK,"EmbeddedJWK");
@@ -1 +1 @@
1
- var c=Object.defineProperty;var n=(t,e)=>c(t,"name",{value:e,configurable:!0});import{digest as p}from"../lib/helpers.js";import{encode as s}from"../util/base64url.js";import{JOSENotSupported as m,JWKInvalid as y}from"../util/errors.js";import{encode as u}from"../lib/buffer_utils.js";import{isKeyLike as k}from"../lib/is_key_like.js";import{isJWK as f}from"../lib/type_checks.js";import{exportJWK as b}from"../key/export.js";import{invalidKeyInput as h}from"../lib/invalid_key_input.js";const a=n((t,e)=>{if(typeof t!="string"||!t)throw new y(`${e} missing or invalid`)},"check");export async function calculateJwkThumbprint(t,e){let r;if(f(t))r=t;else if(k(t))r=await b(t);else throw new TypeError(h(t,"CryptoKey","KeyObject","JSON Web Key"));if(e??="sha256",e!=="sha256"&&e!=="sha384"&&e!=="sha512")throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let o;switch(r.kty){case"AKP":a(r.alg,'"alg" (Algorithm) Parameter'),a(r.pub,'"pub" (Public key) Parameter'),o={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":a(r.crv,'"crv" (Curve) Parameter'),a(r.x,'"x" (X Coordinate) Parameter'),a(r.y,'"y" (Y Coordinate) Parameter'),o={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":a(r.crv,'"crv" (Subtype of Key Pair) Parameter'),a(r.x,'"x" (Public Key) Parameter'),o={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":a(r.e,'"e" (Exponent) Parameter'),a(r.n,'"n" (Modulus) Parameter'),o={e:r.e,kty:r.kty,n:r.n};break;case"oct":a(r.k,'"k" (Key Value) Parameter'),o={k:r.k,kty:r.kty};break;default:throw new m('"kty" (Key Type) Parameter missing or unsupported')}const i=u(JSON.stringify(o));return s(await p(e,i))}n(calculateJwkThumbprint,"calculateJwkThumbprint");export async function calculateJwkThumbprintUri(t,e){e??="sha256";const r=await calculateJwkThumbprint(t,e);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${e.slice(-3)}:${r}`}n(calculateJwkThumbprintUri,"calculateJwkThumbprintUri");
1
+ var c=Object.defineProperty;var n=(e,t)=>c(e,"name",{value:t,configurable:!0});import{digest as m}from"../lib/helpers.js";import{encode as u}from"../util/base64url.js";import{JOSENotSupported as f,JWKInvalid as i}from"../util/errors.js";import{encode as k}from"../lib/buffer_utils.js";import{isKeyLike as b}from"../lib/is_key_like.js";import{isObject as w}from"../lib/type_checks.js";import{exportJWK as h}from"../key/export.js";import{invalidKeyInput as p}from"../lib/invalid_key_input.js";import{snapshotJwk as s}from"../lib/jwk_metadata.js";const a=n((e,t)=>{if(typeof e!="string"||!e)throw new i(`${t} missing or invalid`)},"check");export async function calculateJwkThumbprint(e,t){let r;if(w(e)){if(r=s(e),typeof r.kty!="string")throw new TypeError(p(e,"CryptoKey","KeyObject","JSON Web Key"))}else if(b(e))r=s(await h(e));else throw new TypeError(p(e,"CryptoKey","KeyObject","JSON Web Key"));if(t??="sha256",t!=="sha256"&&t!=="sha384"&&t!=="sha512")throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let o;switch(r.kty){case"AKP":a(r.alg,'"alg" (Algorithm) Parameter'),a(r.pub,'"pub" (Public key) Parameter'),o={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":a(r.crv,'"crv" (Curve) Parameter'),a(r.x,'"x" (X Coordinate) Parameter'),a(r.y,'"y" (Y Coordinate) Parameter'),o={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":a(r.crv,'"crv" (Subtype of Key Pair) Parameter'),a(r.x,'"x" (Public Key) Parameter'),o={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":a(r.e,'"e" (Exponent) Parameter'),a(r.n,'"n" (Modulus) Parameter'),o={e:r.e,kty:r.kty,n:r.n};break;case"oct":if(typeof r.k!="string")throw new i('"k" (Key Value) Parameter missing or invalid');o={k:r.k,kty:r.kty};break;default:throw new f('"kty" (Key Type) Parameter missing or unsupported')}const y=k(JSON.stringify(o));return u(await m(t,y))}n(calculateJwkThumbprint,"calculateJwkThumbprint");export async function calculateJwkThumbprintUri(e,t){t??="sha256";const r=await calculateJwkThumbprint(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}n(calculateJwkThumbprintUri,"calculateJwkThumbprintUri");
@@ -1 +1 @@
1
- var d=Object.defineProperty;var s=(t,e)=>d(t,"name",{value:e,configurable:!0});import{jwkToKey as h}from"../lib/jwk_to_key.js";import{JWS as m}from"../lib/jws_algorithms.js";import{JWKSInvalid as l,JOSENotSupported as S,JWKSNoMatchingKey as K,JWKSMultipleMatchingKeys as W}from"../util/errors.js";import{isObject as J}from"../lib/type_checks.js";function b(t){const e=typeof t=="string"?m[t]:void 0;if(!e||e.secret)throw new S('Unsupported "alg" value for a JSON Web Key Set');return e}s(b,"signatureAlgorithm");function v(t){if(!t||typeof t!="object")return!1;const{keys:e}=t;return Array.isArray(e)&&e.every(J)}s(v,"isJWKSLike");class A{static{s(this,"LocalJWKSetImpl")}#e;#t=new WeakMap;constructor(e){if(!v(e))throw new l("JSON Web Key Set malformed");this.#e=structuredClone(e)}jwks(){return this.#e}async getKey(e,o){const{alg:n,kid:i}={...e,...o?.header},c=b(n),a=this.#e.keys.filter(r=>c.kty.includes(r.kty)&&(typeof i!="string"||i===r.kid)&&(!(typeof r.alg=="string"||r.kty==="AKP")||n===r.alg)&&(typeof r.use!="string"||r.use==="sig")&&(!Array.isArray(r.key_ops)||r.key_ops.includes("verify"))&&(!c.crv||r.crv===c.crv)),{0:f,length:y}=a;if(y===0)throw new K;if(y!==1){const r=new W,p=this.#t;throw r[Symbol.asyncIterator]=async function*(){for(const g of a)try{yield await u(p,g,c)}catch{}},r}return u(this.#t,f,c)}}async function u(t,e,o){const n=t.get(e)||t.set(e,{__proto__:null}).get(e);if(n[o.alg]===void 0){const i=await h(o,{...e,alg:o.alg,ext:!0});if(i.type!=="public")throw new l("JSON Web Key Set members must be public keys");n[o.alg]=i}return n[o.alg]}s(u,"importWithAlgCache");export function createLocalJWKSet(t){const e=new A(t),o=s(async(n,i)=>e.getKey(n,i),"localJWKSet");return Object.defineProperty(o,"jwks",{value:s(()=>structuredClone(e.jwks()),"value")}),o}s(createLocalJWKSet,"createLocalJWKSet");
1
+ var S=Object.defineProperty;var d=(n,e)=>S(n,"name",{value:e,configurable:!0});import{jwkToKey as h}from"../lib/jwk_to_key.js";import{JWS as g}from"../lib/jws_algorithms.js";import{JWKSInvalid as w,JOSENotSupported as K,JWKSNoMatchingKey as J,JWKSMultipleMatchingKeys as k}from"../util/errors.js";import{isJwkSet as W}from"../lib/type_checks.js";import{snapshotJwk as b}from"../lib/jwk_metadata.js";function v(n,e,c,r){const{kty:t,key_ops:o,ext:f,kid:y,alg:i,use:u,crv:l}=b(n),s=Array.isArray(o)?[...o]:o;return(f===void 0||typeof f=="boolean")&&(s===void 0||Array.isArray(s)&&s.every((a,p)=>typeof a=="string"&&s.indexOf(a)===p)&&s.includes("verify"))&&e.kty.includes(t)&&(r===void 0||typeof r=="string"&&r===y)&&(i===void 0?t!=="AKP":c===i)&&(u===void 0||u==="sig")&&(!e.crv||l===e.crv)}d(v,"isUsableJWK");async function m(n,e,c){const r=n.get(e)||n.set(e,{}).get(e),{alg:t}=c;if(r[t]===void 0){const o=await h(c,{...e,alg:t,ext:!0});if(o.type!=="public")throw new w("JSON Web Key Set members must be public keys");r[t]=o}return r[t]}d(m,"importWithAlgCache");export function createLocalJWKSet(n){let e;try{e=structuredClone(n)}catch{}if(!W(e))throw new w("JSON Web Key Set malformed");const c=new WeakMap;return Object.defineProperty(d(async(t,o)=>{const{alg:f,kid:y}={...t,...o?.header},i=typeof f=="string"?g[f]:void 0;if(!i||i.secret)throw new K('Unsupported "alg" value for a JSON Web Key Set');const u=e.keys.filter(a=>v(a,i,f,y)),{0:l,length:s}=u;if(!s)throw new J;if(s!==1){const a=new k;throw a[Symbol.asyncIterator]=async function*(){for(const p of u)try{yield await m(c,p,i)}catch{}},a}return m(c,l,i)},"localJWKSet"),"jwks",{value:d(()=>structuredClone(e),"value")})}d(createLocalJWKSet,"createLocalJWKSet");
@@ -1 +1 @@
1
- var f=Object.defineProperty;var i=(t,e)=>f(t,"name",{value:e,configurable:!0});import{JOSEError as h,JWKSNoMatchingKey as l,JWKSTimeout as w}from"../util/errors.js";import{createLocalJWKSet as c}from"./local.js";import{isObject as u}from"../lib/type_checks.js";function m(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}i(m,"isCloudflareWorkers");let a;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(a="jose/v6.2.9");export const customFetch=Symbol();async function d(t,e,s,r=fetch){const o=await r(t,{method:"GET",signal:s,redirect:"manual",headers:e}).catch(n=>{throw n.name==="TimeoutError"?new w:n});if(o.status!==200)throw new h("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new h("Failed to parse the JSON Web Key Set HTTP response as JSON")}}i(d,"fetchJwks");export const jwksCache=Symbol();function y(t,e){return!(typeof t!="object"||t===null||!("uat"in t)||typeof t.uat!="number"||Date.now()-t.uat>=e||!("jwks"in t)||!u(t.jwks)||!Array.isArray(t.jwks.keys)||!Array.prototype.every.call(t.jwks.keys,u))}i(y,"isFreshJwksCache");class p{static{i(this,"RemoteJWKSetImpl")}#n;#a;#h;#o;#i;#t;#e;#c;#r;#s;constructor(e,s){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");this.#n=new URL(e.href);const r=s??{};this.#a=typeof r.timeoutDuration=="number"?r.timeoutDuration:5e3,this.#h=typeof r.cooldownDuration=="number"?r.cooldownDuration:3e4,this.#o=typeof r.cacheMaxAge=="number"?r.cacheMaxAge:6e5,this.#e=new Headers(r.headers),a&&!this.#e.has("User-Agent")&&this.#e.set("User-Agent",a),this.#e.has("accept")||(this.#e.set("accept","application/json"),this.#e.append("accept","application/jwk-set+json")),this.#c=r[customFetch];const o=r[jwksCache];o!==void 0&&(this.#s=o,y(o,this.#o)&&(this.#i=this.#s.uat,this.#r=c(this.#s.jwks)))}pendingFetch(){return!!this.#t}#u(e){return typeof this.#i=="number"&&Date.now()<this.#i+e}coolingDown(){return this.#u(this.#h)}fresh(){return this.#u(this.#o)}jwks(){return this.#r?.jwks()}async getKey(e,s){(!this.#r||!this.fresh())&&await this.reload();try{return await this.#r(e,s)}catch(r){if(r instanceof l&&this.coolingDown()===!1)return await this.reload(),this.#r(e,s);throw r}}async reload(){this.#t&&m()&&(this.#t=void 0),this.#t||=d(this.#n.href,this.#e,AbortSignal.timeout(this.#a),this.#c).then(e=>{this.#r=c(e),this.#s&&(this.#s.uat=Date.now(),this.#s.jwks=e),this.#i=Date.now()}).finally(()=>{this.#t=void 0}),await this.#t}}export function createRemoteJWKSet(t,e){const s=new p(t,e),r=i(async(o,n)=>s.getKey(o,n),"remoteJWKSet");return Object.defineProperties(r,{coolingDown:{get:i(()=>s.coolingDown(),"get"),enumerable:!0},fresh:{get:i(()=>s.fresh(),"get"),enumerable:!0},reload:{value:i(()=>s.reload(),"value"),enumerable:!0},reloading:{get:i(()=>s.pendingFetch(),"get"),enumerable:!0},jwks:{value:i(()=>s.jwks(),"value"),enumerable:!0}}),r}i(createRemoteJWKSet,"createRemoteJWKSet");
1
+ var k=Object.defineProperty;var t=(e,n)=>k(e,"name",{value:n,configurable:!0});import{JOSEError as N,JWKSNoMatchingKey as D,JWKSTimeout as K}from"../util/errors.js";import{createLocalJWKSet as j}from"./local.js";import{isJwkSet as O}from"../lib/type_checks.js";function R(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}t(R,"isCloudflareWorkers");let b;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(b="jose/v6.2.10");export const customFetch=Symbol();async function v(e,n,l,o=fetch){const r=await o(e,{method:"GET",signal:l,redirect:"manual",headers:n}).catch(h=>{throw h.name==="TimeoutError"?new K:h});if(r.status!==200)throw new N("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await r.json()}catch{throw new N("Failed to parse the JSON Web Key Set HTTP response as JSON")}}t(v,"fetchJwks");export const jwksCache=Symbol();function w(e,n){return Number.isFinite(e)&&Date.now()<e+n}t(w,"isFreshFor");function A(e,n,l){if(Number.isNaN(e))throw new TypeError(`"${l}" option must not be NaN`);return typeof e=="number"?e:n}t(A,"validateDuration");export function createRemoteJWKSet(e,n){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");const l=new URL(e.href).href,o=n??{},r=o.timeoutDuration;if(typeof r=="number"&&(!Number.isInteger(r)||r<0))throw new TypeError('"timeoutDuration" option must be a non-negative integer');const h=typeof r=="number"?r:5e3,y=A(o.cooldownDuration,3e4,"cooldownDuration"),d=A(o.cacheMaxAge,6e5,"cacheMaxAge"),m=new Headers(o.headers);b&&!m.has("User-Agent")&&m.set("User-Agent",b),m.has("accept")||m.set("accept","application/json, application/jwk-set+json");const J=o[customFetch],c=o[jwksCache];let u,a,T=0,S=0,f;if(c&&typeof c=="object"){const{uat:i,jwks:s}=c;w(i,d)&&O(s)&&(u=i,f=j(s))}const g=t(async()=>{if(a&&R()&&(a=void 0),!a){const i=++T,s=a=v(l,m,AbortSignal.timeout(h),J).then(p=>{const W=j(p);if(i<=S)return;f=W;const E=Date.now();c&&(c.uat=E,c.jwks=p),u=E,S=i}).finally(()=>{a===s&&(a=void 0)})}await a},"reload");return Object.defineProperties(t(async(i,s)=>{(!f||!w(u,d))&&await g();try{return await f(i,s)}catch(p){if(p instanceof D&&!w(u,y))return await g(),f(i,s);throw p}},"remoteJWKSet"),{coolingDown:{get:t(()=>w(u,y),"get"),enumerable:!0},fresh:{get:t(()=>w(u,d),"get"),enumerable:!0},reload:{value:g,enumerable:!0},reloading:{get:t(()=>!!a,"get"),enumerable:!0},jwks:{value:t(()=>f?.jwks(),"value"),enumerable:!0}})}t(createRemoteJWKSet,"createRemoteJWKSet");
@@ -1 +1 @@
1
- var n=Object.defineProperty;var o=(r,t)=>n(r,"name",{value:t,configurable:!0});import{FlattenedSign as a}from"../flattened/sign.js";import{unencodedPayload as i}from"../../lib/jws_sign.js";export class CompactSign{static{o(this,"CompactSign")}#t;#e;constructor(t){this.#t=new a(t)}setProtectedHeader(t){return this.#t.setProtectedHeader(t),this.#e=t,this}async sign(t,s){if(i(this.#e))throw new TypeError("use the flattened module for creating JWS with b64: false");const e=await this.#t.sign(t,s);return`${e.protected}.${e.payload}.${e.signature}`}}
1
+ var a=Object.defineProperty;var r=(e,t)=>a(e,"name",{value:t,configurable:!0});import{createCompactSignature as s}from"../../lib/jws_sign.js";import{assertNotSet as i}from"../../lib/helpers.js";export class CompactSign{static{r(this,"CompactSign")}#e;#t;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#e=t}setProtectedHeader(t){return i(this.#t,"setProtectedHeader"),this.#t=t,this}async sign(t,o){return s(this.#e,this.#t,o?.crit,t,()=>{throw new TypeError("use the flattened module for creating JWS with b64: false")})}}
@@ -1 +1 @@
1
- var i=Object.defineProperty;var r=(e,t)=>i(e,"name",{value:t,configurable:!0});import{createSignature as o}from"../../lib/jws_sign.js";import{assertNotSet as s}from"../../lib/helpers.js";export class FlattenedSign{static{r(this,"FlattenedSign")}#r;#t;#e;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#r=t}setProtectedHeader(t){return s(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return s(this.#e,"setUnprotectedHeader"),this.#e=t,this}async sign(t,a){return o({payload:this.#r,protectedHeader:this.#t,unprotectedHeader:this.#e,crit:a?.crit},t)}}
1
+ var o=Object.defineProperty;var r=(e,t)=>o(e,"name",{value:t,configurable:!0});import{createSignature as n}from"../../lib/jws_sign.js";import{assertNotSet as s}from"../../lib/helpers.js";export class FlattenedSign{static{r(this,"FlattenedSign")}#r;#t;#e;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#r=t}setProtectedHeader(t){return s(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return s(this.#e,"setUnprotectedHeader"),this.#e=t,this}async sign(t,a){const[i]=await n({payload:this.#r,protectedHeader:this.#t,unprotectedHeader:this.#e,crit:a?.crit},t);return i}}
@@ -1 +1 @@
1
- var d=Object.defineProperty;var n=(e,r)=>d(e,"name",{value:r,configurable:!0});import{JWSInvalid as t}from"../../util/errors.js";import{isObject as i}from"../../lib/type_checks.js";import{prepareVerify as a,verifySignature as f,verifyResult as p}from"../../lib/jws_verify.js";export async function flattenedVerify(e,r,o){if(!i(e))throw new t("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new t('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new t("JWS Protected Header incorrect type");if(e.payload===void 0)throw new t("JWS Payload missing");if(typeof e.signature!="string")throw new t("JWS Signature missing or incorrect type");if(e.header!==void 0&&!i(e.header))throw new t("JWS Unprotected Header incorrect type");return p(e,await f(e,a(o),r))}n(flattenedVerify,"flattenedVerify");
1
+ var a=Object.defineProperty;var o=(r,n)=>a(r,"name",{value:n,configurable:!0});import{JWSInvalid as t}from"../../util/errors.js";import{isObject as i}from"../../lib/type_checks.js";import{encodeJsonUnencodedPayload as f,prepareVerify as c,snapshotJws as p,verifySignature as s,verifyResult as h}from"../../lib/jws_verify.js";export async function flattenedVerify(r,n,d){if(!i(r))throw new t("Flattened JWS must be an object");const e=p(r);if(e.protected===void 0&&e.header===void 0)throw new t('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new t("JWS Protected Header incorrect type");if(e.payload===void 0)throw new t("JWS Payload missing");if(typeof e.signature!="string")throw new t("JWS Signature missing or incorrect type");if(e.header!==void 0&&!i(e.header))throw new t("JWS Unprotected Header incorrect type");return h(e,await s(e,c(d),n,f))}o(flattenedVerify,"flattenedVerify");
@@ -1 +1 @@
1
- var g=Object.defineProperty;var n=(r,t)=>g(r,"name",{value:t,configurable:!0});import{createSignature as f}from"../../lib/jws_sign.js";import{JWSInvalid as i}from"../../util/errors.js";import{assertNotSet as o}from"../../lib/helpers.js";class y{static{n(this,"IndividualSignature")}#t;state;constructor(t,s,e){this.#t=t,this.state=[void 0,void 0,s,e?.crit]}setProtectedHeader(t){return o(this.state[0],"setProtectedHeader"),this.state[0]=t,this}setUnprotectedHeader(t){return o(this.state[1],"setUnprotectedHeader"),this.state[1]=t,this}addSignature(...t){return this.#t.addSignature(...t)}sign(...t){return this.#t.sign(...t)}done(){return this.#t}}export class GeneralSign{static{n(this,"GeneralSign")}#t;#e=[];constructor(t){this.#t=t}addSignature(t,s){const e=new y(this,t,s);return this.#e.push(e),e}async sign(){if(!this.#e.length)throw new i("at least one signature must be added");if(!(this.#t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");const t={signatures:[],payload:""},s=[];for(let e=0;e<this.#e.length;e++){const d=this.#e[e],[u,c,h,p]=d.state,{payload:a,...l}=await f({payload:this.#t,protectedHeader:u,unprotectedHeader:c,crit:p,encoded:s},h);if(e===0)t.payload=a;else if(t.payload!==a)throw new i("inconsistent use of JWS Unencoded Payload (RFC7797)");t.signatures.push(l)}return t}}
1
+ var y=Object.defineProperty;var a=(r,t)=>y(r,"name",{value:t,configurable:!0});import{createSignature as w}from"../../lib/jws_sign.js";import{JWSInvalid as o}from"../../util/errors.js";import{assertNotSet as d}from"../../lib/helpers.js";class S{static{a(this,"IndividualSignature")}#t;state;constructor(t,s,e){this.#t=t,this.state=[void 0,void 0,s,e?.crit]}setProtectedHeader(t){return d(this.state[0],"setProtectedHeader"),this.state[0]=t,this}setUnprotectedHeader(t){return d(this.state[1],"setUnprotectedHeader"),this.state[1]=t,this}addSignature(...t){return this.#t.addSignature(...t)}sign(...t){return this.#t.sign(...t)}done(){return this.#t}}export class GeneralSign{static{a(this,"GeneralSign")}#t;#e=[];constructor(t){this.#t=t}addSignature(t,s){const e=new S(this,t,s);return this.#e.push(e),e}async sign(){if(!this.#e.length)throw new o("at least one signature must be added");if(!(this.#t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");const t={signatures:[],payload:""},s=[];let e;for(let n=0;n<this.#e.length;n++){const u=this.#e[n],[c,h,g,l]=u.state,[{payload:p,...f},i]=await w({payload:this.#t,protectedHeader:c,unprotectedHeader:h,crit:l,encoded:s},g);if(e===void 0)e=i,t.payload=p;else if(e!==i)throw new o("inconsistent use of JWS Unencoded Payload (RFC7797)");t.signatures.push(f)}return t}}
@@ -1 +1 @@
1
- var h=Object.defineProperty;var s=(r,n)=>h(r,"name",{value:n,configurable:!0});import{prepareVerify as g,verifySignature as p,verifyResult as m}from"../../lib/jws_verify.js";import{JWSInvalid as w,JWSSignatureVerificationFailed as u}from"../../util/errors.js";import{isObject as o}from"../../lib/type_checks.js";export async function generalVerify(r,n,y){if(!o(r))throw new w("General JWS must be an object");const{signatures:i,payload:a}=r;if(!Array.isArray(i)||!i.every(o))throw new w("JWS Signatures missing or incorrect type");let f;try{if(a===void 0)throw new Error;f=g(y)}catch{throw new u}for(const d of i)try{const{protected:e,header:t,signature:c}=d;if(e===void 0&&t===void 0)throw new Error;if(e!==void 0&&typeof e!="string")throw new Error;if(typeof c!="string")throw new Error;if(t!==void 0&&!o(t))throw new Error;return m(d,await p({header:t,payload:a,protected:e,signature:c},f,n))}catch{}throw new u}s(generalVerify,"generalVerify");
1
+ var l=Object.defineProperty;var u=(t,i)=>l(t,"name",{value:i,configurable:!0});import{encodeJsonUnencodedPayload as g,parseProtectedHeader as h,prepareVerify as m,snapshotJws as S,verifySignature as J,verifyResult as A}from"../../lib/jws_verify.js";import{JWSInvalid as f,JWSSignatureVerificationFailed as w}from"../../util/errors.js";import{isObject as y}from"../../lib/type_checks.js";function b(t,i){try{const d=S(t,[i]),{protected:r,header:n,signature:s}=d;if(r===void 0&&n===void 0||r!==void 0&&typeof r!="string"||typeof s!="string"||n!==void 0&&!y(n))return;const o=h(r),{b64:c,crit:a}=o;return[d,o,Array.isArray(a)&&a.includes("b64")?typeof c=="boolean"?c?1:2:0:1]}catch{return}}u(b,"snapshotSignature");export async function generalVerify(t,i,d){if(!y(t))throw new f("General JWS must be an object");const{signatures:r,payload:n}=t;if(!Array.isArray(r))throw new f("JWS Signatures missing or incorrect type");const s=Array.from(r);if(!s.every(y))throw new f("JWS Signatures missing or incorrect type");let o;try{if(n===void 0)throw new Error;o=m(d)}catch{throw new w}const c=n instanceof Uint8Array?new Uint8Array(n):n,a=s.map(e=>b(e,c)).filter(e=>e!==void 0);let p=0;for(const[,,e]of a)if(p|=e,p===3)throw new f("inconsistent use of JWS Unencoded Payload (RFC7797)");for(const e of a)try{return A(e[0],await J(e[0],o,i,g,e[1]))}catch{}throw new w}u(generalVerify,"generalVerify");
@@ -1 +1 @@
1
- var n=Object.defineProperty;var c=(i,a)=>n(i,"name",{value:a,configurable:!0});import{prepareDecrypt as o,decryptCompact as p}from"../lib/jwe_decrypt.js";import{validateClaimsSet as u}from"../lib/jwt_claims_set.js";import{JWTClaimValidationFailed as s}from"../util/errors.js";export async function jwtDecrypt(i,a,m){const r=await p(i,o(m),a),e=r[1],t=u(e,r[0],m);if(e.iss!==void 0&&e.iss!==t.iss)throw new s('replicated "iss" claim header parameter mismatch',t,"iss","mismatch");if(e.sub!==void 0&&e.sub!==t.sub)throw new s('replicated "sub" claim header parameter mismatch',t,"sub","mismatch");if(e.aud!==void 0&&JSON.stringify(e.aud)!==JSON.stringify(t.aud))throw new s('replicated "aud" claim header parameter mismatch',t,"aud","mismatch");const d={payload:t,protectedHeader:e};return typeof a=="function"?{...d,key:r[2]}:d}c(jwtDecrypt,"jwtDecrypt");
1
+ var m=Object.defineProperty;var n=(i,r)=>m(i,"name",{value:r,configurable:!0});import{prepareDecrypt as p,decryptCompact as s}from"../lib/jwe_decrypt.js";import{validateClaimsSet as f}from"../lib/jwt_claims_set.js";import{JWTClaimValidationFailed as u}from"../util/errors.js";export async function jwtDecrypt(i,r,c){const o=await s(i,p(c),r),e=o[1],a=f(e,o[0],c);for(const t of["iss","sub","aud"])if(e[t]!==void 0&&(t==="aud"?JSON.stringify(e.aud)!==JSON.stringify(a.aud):e[t]!==a[t]))throw new u(`replicated "${t}" claim header parameter mismatch`,a,t,"mismatch");const d={payload:a,protectedHeader:e};return typeof r=="function"?{...d,key:o[2]}:d}n(jwtDecrypt,"jwtDecrypt");
@@ -1 +1 @@
1
- var h=Object.defineProperty;var r=(i,t)=>h(i,"name",{value:t,configurable:!0});import{CompactEncrypt as a}from"../jwe/compact/encrypt.js";import{JWTClaimsBuilder as u}from"../lib/jwt_claims_set.js";import{assertNotSet as s}from"../lib/helpers.js";export class EncryptJWT{static{r(this,"EncryptJWT")}#s;#i;#r;#e;#n;#h;#a;#t;constructor(t={}){this.#t=new u(t)}setIssuer(t){return this.#t.iss=t,this}setSubject(t){return this.#t.sub=t,this}setAudience(t){return this.#t.aud=t,this}setJti(t){return this.#t.jti=t,this}setNotBefore(t){return this.#t.nbf=t,this}setExpirationTime(t){return this.#t.exp=t,this}setIssuedAt(t){return this.#t.iat=t,this}setProtectedHeader(t){return s(this.#e,"setProtectedHeader"),this.#e=t,this}setKeyManagementParameters(t){return s(this.#r,"setKeyManagementParameters"),this.#r=t,this}setContentEncryptionKey(t){return s(this.#s,"setContentEncryptionKey"),this.#s=t,this}setInitializationVector(t){return s(this.#i,"setInitializationVector"),this.#i=t,this}replicateIssuerAsHeader(){return this.#n=!0,this}replicateSubjectAsHeader(){return this.#h=!0,this}replicateAudienceAsHeader(){return this.#a=!0,this}async encrypt(t,n){const e=new a(this.#t.data());return this.#e&&(this.#n||this.#h||this.#a)&&(this.#e={...this.#e,iss:this.#n?this.#t.iss:void 0,sub:this.#h?this.#t.sub:void 0,aud:this.#a?this.#t.aud:void 0}),e.setProtectedHeader(this.#e),this.#i&&e.setInitializationVector(this.#i),this.#s&&e.setContentEncryptionKey(this.#s),this.#r&&e.setKeyManagementParameters(this.#r),e.encrypt(t,n)}}
1
+ var d=Object.defineProperty;var n=(r,e)=>d(r,"name",{value:e,configurable:!0});import{createJWE as c}from"../lib/jwe_encrypt.js";import{JWTClaimsBuilder as u,jwtClaim as s,jwtData as o}from"../lib/jwt_claims_set.js";import{assertNotSet as i}from"../lib/helpers.js";const p=u;export class EncryptJWT extends p{static{n(this,"EncryptJWT")}#t;#i;#s;#e;#r;#n;#a;setProtectedHeader(e){return i(this.#e,"setProtectedHeader"),this.#e=e,this}setKeyManagementParameters(e){return i(this.#s,"setKeyManagementParameters"),this.#s=e,this}setContentEncryptionKey(e){return i(this.#t,"setContentEncryptionKey"),this.#t=e,this}setInitializationVector(e){return i(this.#i,"setInitializationVector"),this.#i=e,this}replicateIssuerAsHeader(){return this.#r=!0,this}replicateSubjectAsHeader(){return this.#n=!0,this}replicateAudienceAsHeader(){return this.#a=!0,this}async encrypt(e,a){const h=o(this);this.#e&&(this.#r||this.#n||this.#a)&&(this.#e={...this.#e,iss:this.#r?s(this,"iss"):void 0,sub:this.#n?s(this,"sub"):void 0,aud:this.#a?s(this,"aud"):void 0});const t=await c([h,this.#e,void 0,void 0,void 0,this.#t,this.#i,this.#s,void 0,!1],e,a);return[t.protected,t.encrypted_key,t.iv,t.ciphertext,t.tag].join(".")}}
@@ -1 +1 @@
1
- var n=Object.defineProperty;var i=(e,t)=>n(e,"name",{value:t,configurable:!0});import{CompactSign as o}from"../jws/compact/sign.js";import{unencodedPayload as h}from"../lib/jws_sign.js";import{JWTInvalid as u}from"../util/errors.js";import{JWTClaimsBuilder as d}from"../lib/jwt_claims_set.js";export class SignJWT{static{i(this,"SignJWT")}#e;#t;constructor(t={}){this.#t=new d(t)}setIssuer(t){return this.#t.iss=t,this}setSubject(t){return this.#t.sub=t,this}setAudience(t){return this.#t.aud=t,this}setJti(t){return this.#t.jti=t,this}setNotBefore(t){return this.#t.nbf=t,this}setExpirationTime(t){return this.#t.exp=t,this}setIssuedAt(t){return this.#t.iat=t,this}setProtectedHeader(t){return this.#e=t,this}async sign(t,r){const s=new o(this.#t.data());if(s.setProtectedHeader(this.#e),h(this.#e))throw new u("JWTs MUST NOT use unencoded payload");return s.sign(t,r)}}
1
+ var o=Object.defineProperty;var r=(e,t)=>o(e,"name",{value:t,configurable:!0});import{createCompactSignature as i}from"../lib/jws_sign.js";import{JWTInvalid as a}from"../util/errors.js";import{JWTClaimsBuilder as n,jwtData as d}from"../lib/jwt_claims_set.js";import{assertNotSet as c}from"../lib/helpers.js";const m=n;export class SignJWT extends m{static{r(this,"SignJWT")}#t;setProtectedHeader(t){return c(this.#t,"setProtectedHeader"),this.#t=t,this}async sign(t,s){return i(d(this),this.#t,s?.crit,t,()=>{throw new a("JWTs MUST NOT use unencoded payload")})}}
@@ -1 +1 @@
1
- var h=Object.defineProperty;var o=(n,e)=>h(n,"name",{value:e,configurable:!0});import*as i from"../util/base64url.js";import{strictDecoder as l}from"../lib/buffer_utils.js";import{decodeBase64url as p}from"../lib/helpers.js";import{JWTInvalid as r}from"../util/errors.js";import{validateClaimsSet as m,JWTClaimsBuilder as f}from"../lib/jwt_claims_set.js";export class UnsecuredJWT{static{o(this,"UnsecuredJWT")}#e;constructor(e={}){this.#e=new f(e)}encode(){const e=i.encode(JSON.stringify({alg:"none"})),s=i.encode(this.#e.data());return`${e}.${s}.`}setIssuer(e){return this.#e.iss=e,this}setSubject(e){return this.#e.sub=e,this}setAudience(e){return this.#e.aud=e,this}setJti(e){return this.#e.jti=e,this}setNotBefore(e){return this.#e.nbf=e,this}setExpirationTime(e){return this.#e.exp=e,this}setIssuedAt(e){return this.#e.iat=e,this}static decode(e,s){if(typeof e!="string")throw new r("Unsecured JWT must be a string");const{0:d,1:a,2:c,length:u}=e.split(".");if(u!==3||c!=="")throw new r("Invalid Unsecured JWT");let t;try{if(t=JSON.parse(l.decode(i.decode(d))),t.alg!=="none")throw new Error}catch{throw new r("Invalid Unsecured JWT")}return{payload:m(t,p(a,"payload",r),s),header:t}}}
1
+ var J=Object.defineProperty;var i=(r,n)=>J(r,"name",{value:n,configurable:!0});import*as c from"../util/base64url.js";import{decodeBase64url as m,parseJoseHeader as W}from"../lib/helpers.js";import{JWSInvalid as o,JWTInvalid as a}from"../util/errors.js";import{validateClaimsSet as h,JWTClaimsBuilder as w,jwtData as T}from"../lib/jwt_claims_set.js";import{JWS_RECOGNIZED as v,validateB64 as y,validateCrit as g}from"../lib/options.js";const U=w;export class UnsecuredJWT extends U{static{i(this,"UnsecuredJWT")}encode(){const n=c.encode(JSON.stringify({alg:"none"})),d=c.encode(T(this));return`${n}.${d}.`}static decode(n,d){if(typeof n!="string")throw new a("Unsecured JWT must be a string");const{0:l,1:u,2:f,length:p}=n.split(".");if(p!==3||f!=="")throw new a("Invalid Unsecured JWT");let e,s;try{e=W(l,o,"JWS Protected Header is invalid");const t=g(o,v,void 0,e,e);s=y(e,t)}catch(t){throw t instanceof o?new a("Invalid Unsecured JWT",{cause:t}):t}if(e.alg!=="none")throw new a("Invalid Unsecured JWT");if(!s)throw new a("JWTs MUST NOT use unencoded payload");return{payload:h(e,m(u,"payload",a),d),header:e}}}
@@ -1 +1 @@
1
- var d=Object.defineProperty;var o=(t,e)=>d(t,"name",{value:e,configurable:!0});import{JOSENotSupported as u}from"../util/errors.js";import{keyAlgorithm as l,unsupportedAlg as c,algArgument as a}from"../lib/key_algorithm.js";function i(t){const e=t?.modulusLength??2048;if(typeof e!="number"||e<2048)throw new u("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return e}o(i,"getModulusLengthOption");export async function generateKeyPair(t,e){const r=l(t,a);r.secret&&c(a);let n;if(r.resolve){const s=e?.crv??"P-256";switch(s){case"P-256":case"P-384":case"P-521":n={name:"ECDH",namedCurve:s};break;case"X25519":n={name:"X25519"};break;default:throw new u("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519")}}else{if(r.crv!==void 0&&e?.crv!==void 0&&e.crv!==r.crv)throw new u(`Invalid or unsupported crv option provided, the only supported value for ${t} is ${r.crv}`);n=r.kty[0]==="RSA"?{...r.subtle,publicExponent:Uint8Array.of(1,0,1),modulusLength:i(e)}:r.subtle}return crypto.subtle.generateKey(n,e?.extractable??!1,[...r.usages[1],...r.usages[0]])}o(generateKeyPair,"generateKeyPair");
1
+ var i=Object.defineProperty;var o=(t,e)=>i(t,"name",{value:e,configurable:!0});import{JOSENotSupported as u}from"../util/errors.js";import{validateExtractableOption as l}from"../lib/key_options.js";import{keyAlgorithm as c,unsupportedAlg as p,algArgument as s}from"../lib/key_algorithm.js";function v(t){const e=t?.modulusLength??2048;if(typeof e!="number"||!Number.isInteger(e)||e<2048)throw new u("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return e}o(v,"getModulusLengthOption");export async function generateKeyPair(t,e){const d=l(e?.extractable),r=c(t,s);r.secret&&p(s);let n;if(r.resolve){const a=e?.crv??"P-256";switch(a){case"P-256":case"P-384":case"P-521":n={name:"ECDH",namedCurve:a};break;case"X25519":n={name:"X25519"};break;default:throw new u("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519")}}else{if(r.crv!==void 0&&e?.crv!==void 0&&e.crv!==r.crv)throw new u(`Invalid or unsupported crv option provided, the only supported value for ${t} is ${r.crv}`);n=r.kty[0]==="RSA"?{...r.subtle,publicExponent:Uint8Array.of(1,0,1),modulusLength:v(e)}:r.subtle}return crypto.subtle.generateKey(n,d??!1,[...r.usages[1],...r.usages[0]])}o(generateKeyPair,"generateKeyPair");
@@ -1 +1 @@
1
- var n=Object.defineProperty;var c=(a,t)=>n(a,"name",{value:t,configurable:!0});import{unsupportedAlg as A,algArgument as p}from"../lib/key_algorithm.js";export async function generateSecret(a,t){let e,s,r;switch(a){case"HS256":case"HS384":case"HS512":e=parseInt(a.slice(-3),10),s={name:"HMAC",hash:`SHA-${e}`,length:e},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return e=parseInt(a.slice(-3),10),crypto.getRandomValues(new Uint8Array(e>>3));case"A128KW":case"A192KW":case"A256KW":e=parseInt(a.slice(1,4),10),s={name:"AES-KW",length:e},r=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":e=parseInt(a.slice(1,4),10),s={name:"AES-GCM",length:e},r=["encrypt","decrypt"];break;default:A(p)}return crypto.subtle.generateKey(s,t?.extractable??!1,r)}c(generateSecret,"generateSecret");
1
+ var A=Object.defineProperty;var s=(e,r)=>A(e,"name",{value:r,configurable:!0});import{unsupportedAlg as l,algArgument as i}from"../lib/key_algorithm.js";import{validateExtractableOption as C}from"../lib/key_options.js";export async function generateSecret(e,r){const n=C(r?.extractable);let a,t,c;switch(e){case"HS256":case"HS384":case"HS512":a=+e.slice(-3),t={name:"HMAC",hash:`SHA-${a}`,length:a},c=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return crypto.getRandomValues(new Uint8Array(+e.slice(-3)>>3));case"A128KW":case"A192KW":case"A256KW":a=+e.slice(1,4),t={name:"AES-KW",length:a},c=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":a=+e.slice(1,4),t={name:"AES-GCM",length:a},c=["encrypt","decrypt"];break;default:l(i)}return crypto.subtle.generateKey(t,n??!1,c)}s(generateSecret,"generateSecret");
@@ -1 +1 @@
1
- var a=Object.defineProperty;var o=(r,e)=>a(r,"name",{value:e,configurable:!0});import{decode as f}from"../util/base64url.js";import{fromSPKI as s,fromPKCS8 as p,fromX509 as u}from"../lib/asn1.js";import{jwkToKey as i}from"../lib/jwk_to_key.js";import{keyAlgorithm as m}from"../lib/key_algorithm.js";import{JOSENotSupported as y}from"../util/errors.js";import{isObject as c}from"../lib/type_checks.js";export async function importSPKI(r,e,t){if(typeof r!="string"||r.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return s(r,e,t)}o(importSPKI,"importSPKI");export async function importX509(r,e,t){if(typeof r!="string"||r.indexOf("-----BEGIN CERTIFICATE-----")!==0)throw new TypeError('"x509" must be X.509 formatted string');return u(r,e,t)}o(importX509,"importX509");export async function importPKCS8(r,e,t){if(typeof r!="string"||r.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return p(r,e,t)}o(importPKCS8,"importPKCS8");export async function importJWK(r,e,t){if(!c(r))throw new TypeError("JWK must be an object");e??=r.alg;const n=t?.extractable??r.ext;if(r.kty!=="oct"&&!e)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');switch(r.kty){case"oct":if(typeof r.k!="string"||!r.k)throw new TypeError('missing "k" (Key Value) Parameter value');return f(r.k);case"RSA":return i(m(e),{...r,alg:e,ext:n});case"AKP":{if(typeof r.alg!="string"||!r.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(e!==void 0&&e!==r.alg)throw new TypeError("JWK alg and alg option value mismatch");return i(m(r.alg),{...r,ext:n})}case"EC":case"OKP":return i(m(e),{...r,alg:e,ext:n});default:throw new y('Unsupported "kty" (Key Type) Parameter value')}}o(importJWK,"importJWK");
1
+ var p=Object.defineProperty;var n=(r,t)=>p(r,"name",{value:t,configurable:!0});import{decode as c}from"../util/base64url.js";import{fromSPKI as y,fromPKCS8 as u,fromX509 as w}from"../lib/asn1.js";import{jwkToKey as a}from"../lib/jwk_to_key.js";import{keyAlgorithm as s}from"../lib/key_algorithm.js";import{JOSENotSupported as E}from"../util/errors.js";import{isObject as d}from"../lib/type_checks.js";import{validateExtractableOption as l}from"../lib/key_options.js";import{normalizeJwk as K}from"../lib/jwk_metadata.js";export async function importSPKI(r,t,o){if(typeof r!="string"||r.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return y(r,t,o)}n(importSPKI,"importSPKI");export async function importX509(r,t,o){if(typeof r!="string"||r.indexOf("-----BEGIN CERTIFICATE-----")!==0)throw new TypeError('"x509" must be X.509 formatted string');return w(r,t,o)}n(importX509,"importX509");export async function importPKCS8(r,t,o){if(typeof r!="string"||r.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return u(r,t,o)}n(importPKCS8,"importPKCS8");export async function importJWK(r,t,o){if(!d(r))throw new TypeError("JWK must be an object");const e=K(r),f=l(o?.extractable),{alg:i}=e;t??=i;const m=f??e.ext;if(e.kty!=="oct"&&!t)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');switch(e.kty){case"oct":if(typeof e.k!="string")throw new TypeError('missing "k" (Key Value) Parameter value');return c(e.k);case"AKP":{if(typeof i!="string"||!i)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(t!==i)throw new TypeError("JWK alg and alg option value mismatch");return a(s(t),{...e,ext:m})}case"RSA":case"EC":case"OKP":return a(s(t),{...e,alg:t,ext:m});default:throw new E('Unsupported "kty" (Key Type) Parameter value')}}n(importJWK,"importJWK");
@@ -1,4 +1,4 @@
1
- var y=Object.defineProperty;var o=(r,e)=>y(r,"name",{value:e,configurable:!0});import{invalidKeyInput as I}from"./invalid_key_input.js";import{encodeBase64 as K,decodeBase64 as b}from"../lib/base64.js";import{JOSENotSupported as v}from"../util/errors.js";import{keyAlgorithm as P,unsupportedAlg as S,algArgument as E}from"./key_algorithm.js";import{isCryptoKey as C,isKeyObject as N}from"./is_key_like.js";const A=o((r,e)=>{const t=(r.match(/.{1,64}/g)||[]).join(`
2
- `);return`-----BEGIN ${e}-----
3
- ${t}
4
- -----END ${e}-----`},"formatPEM"),h=o(async(r,e,t)=>{if(N(t)){if(t.type!==r)throw new TypeError(`key is not a ${r} key`);return t.export({format:"pem",type:e})}if(!C(t))throw new TypeError(I(t,"CryptoKey","KeyObject"));if(!t.extractable)throw new TypeError("CryptoKey is not extractable");if(t.type!==r)throw new TypeError(`key is not a ${r} key`);return A(K(new Uint8Array(await crypto.subtle.exportKey(e,t))),`${r.toUpperCase()} KEY`)},"genericExport");export const toSPKI=o(r=>h("public","spki",r),"toSPKI"),toPKCS8=o(r=>h("private","pkcs8",r),"toPKCS8");const p=o((r,e)=>{if(r.byteLength!==e.length)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},"bytesEqual"),m=o(r=>({data:r,pos:0}),"createASN1State"),x=o(r=>{const e=r.data[r.pos++];if(e===void 0)throw new Error("Unexpected end of ASN.1 input");return e},"readByte"),s=o(r=>{const e=x(r);if(e&128){const t=e&127;let n=0;for(let i=0;i<t;i++)n=n<<8|x(r);return n}return e},"parseLength"),g=o((r,e=1)=>{for(;e-- >0;){r.pos++;const t=s(r);r.pos+=t}},"skipElement"),c=o((r,e,t)=>{if(x(r)!==e)throw new Error(t)},"expectTag"),w=o((r,e)=>{if(e<0||r.pos+e>r.data.length)throw new Error("Unexpected end of ASN.1 input");const t=r.data.subarray(r.pos,r.pos+e);return r.pos+=e,t},"getSubarray"),O=o(r=>{c(r,6,"Expected algorithm OID");const e=s(r);return w(r,e)},"parseAlgorithmOID");function D(r,e){if(c(r,48,`Invalid ${e==="spki"?"SPKI":"PKCS#8"} structure`),s(r),e==="pkcs8"){c(r,2,"Expected version field");const t=s(r);r.pos+=t}c(r,48,"Expected algorithm identifier"),s(r)}o(D,"parseKeyHeader");const B=o(r=>{const e=O(r);if(p(e,[43,101,110]))return"X25519";if(!p(e,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");c(r,6,"Expected curve OID");const t=s(r),n=w(r,t);if(p(n,[42,134,72,206,61,3,1,7]))return"P-256";if(p(n,[43,129,4,0,34]))return"P-384";if(p(n,[43,129,4,0,35]))return"P-521";throw new Error("Unsupported named curve")},"parseECAlgorithmIdentifier"),a=o(async(r,e,t,n)=>{const i=P(t,E);i.secret&&S(E);const l=r==="spki";let u;if(i.resolve)try{const d=m(e);D(d,r),u=i.resolve({crv:B(d)})}catch{throw new v("Invalid or unsupported key format")}else u=i.subtle;return crypto.subtle.importKey(r,e,u,n?.extractable??l,i.usages[l?0:1])},"genericImport"),f=o((r,e)=>b(r.replace(e,"")),"processPEMData");export const fromPKCS8=o((r,e,t)=>{const n=f(r,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g);return a("pkcs8",n,e,t)},"fromPKCS8"),fromSPKI=o((r,e,t)=>{const n=f(r,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);return a("spki",n,e,t)},"fromSPKI");function L(r){const e=m(r);c(e,48,"Invalid certificate structure"),s(e),c(e,48,"Invalid tbsCertificate structure"),s(e),r[e.pos]===160?g(e,6):g(e,5);const t=e.pos;c(e,48,"Invalid SPKI structure");const n=s(e);return r.subarray(t,t+n+(e.pos-t))}o(L,"spkiFromX509");export const fromX509=o((r,e,t)=>{let n;try{const i=f(r,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);n=L(i)}catch(i){throw new TypeError("Failed to parse the X.509 certificate",{cause:i})}return a("spki",n,e,t)},"fromX509");
1
+ var I=Object.defineProperty;var o=(r,t)=>I(r,"name",{value:t,configurable:!0});import{invalidKeyInput as b}from"./invalid_key_input.js";import{encodeBase64 as K,decodeBase64 as v}from"../lib/base64.js";import{JOSENotSupported as S}from"../util/errors.js";import{keyAlgorithm as P,unsupportedAlg as C,algArgument as h}from"./key_algorithm.js";import{isCryptoKey as N,isKeyObject as A}from"./is_key_like.js";import{validateExtractableOption as O}from"./key_options.js";const D=o((r,t)=>{const e=(r.match(/.{1,64}/g)||[]).join(`
2
+ `);return`-----BEGIN ${t}-----
3
+ ${e}
4
+ -----END ${t}-----`},"formatPEM"),m=o(async(r,t,e)=>{if(A(e)){if(e.type!==r)throw new TypeError(`key is not a ${r} key`);return e.export({format:"pem",type:t})}if(!N(e))throw new TypeError(b(e,"CryptoKey","KeyObject"));if(!e.extractable)throw new TypeError("CryptoKey is not extractable");if(e.type!==r)throw new TypeError(`key is not a ${r} key`);return D(K(new Uint8Array(await crypto.subtle.exportKey(t,e))),`${r.toUpperCase()} KEY`)},"genericExport");export const toSPKI=o(r=>m("public","spki",r),"toSPKI"),toPKCS8=o(r=>m("private","pkcs8",r),"toPKCS8");const a=o((r,t)=>{if(r.byteLength!==t.length)return!1;for(let e=0;e<r.byteLength;e++)if(r[e]!==t[e])return!1;return!0},"bytesEqual"),g=o(r=>({data:r,pos:0}),"createASN1State"),u=o(r=>{const t=r.data[r.pos++];if(t===void 0)throw new Error("Unexpected end of ASN.1 input");return t},"readByte"),c=o(r=>{const t=u(r);if(t&128){const e=t&127;let n=0;for(let i=0;i<e;i++)n=n<<8|u(r);return n}return t},"parseLength"),w=o((r,t=1)=>{for(;t-- >0;){r.pos++;const e=c(r);r.pos+=e}},"skipElement"),s=o((r,t,e)=>{if(u(r)!==t)throw new Error(e)},"expectTag"),y=o((r,t)=>{if(t<0||r.pos+t>r.data.length)throw new Error("Unexpected end of ASN.1 input");const e=r.data.subarray(r.pos,r.pos+t);return r.pos+=t,e},"getSubarray"),L=o(r=>{s(r,6,"Expected algorithm OID");const t=c(r);return y(r,t)},"parseAlgorithmOID");function B(r,t){if(s(r,48,`Invalid ${t==="spki"?"SPKI":"PKCS#8"} structure`),c(r),t==="pkcs8"){s(r,2,"Expected version field");const e=c(r);r.pos+=e}s(r,48,"Expected algorithm identifier"),c(r)}o(B,"parseKeyHeader");const U=o(r=>{const t=L(r);if(a(t,[43,101,110]))return"X25519";if(!a(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");s(r,6,"Expected curve OID");const e=c(r),n=y(r,e);if(a(n,[42,134,72,206,61,3,1,7]))return"P-256";if(a(n,[43,129,4,0,34]))return"P-384";if(a(n,[43,129,4,0,35]))return"P-521";throw new Error("Unsupported named curve")},"parseECAlgorithmIdentifier"),f=o(async(r,t,e,n)=>{const i=O(n?.extractable),p=P(e,h);p.secret&&C(h);const d=r==="spki";let x;if(p.resolve)try{const E=g(t);B(E,r),x=p.resolve({crv:U(E)})}catch{throw new S("Invalid or unsupported key format")}else x=p.subtle;return crypto.subtle.importKey(r,t,x,i??d,p.usages[d?0:1])},"genericImport"),l=o((r,t)=>v(r.replace(t,"")),"processPEMData");export const fromPKCS8=o((r,t,e)=>{const n=l(r,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g);return f("pkcs8",n,t,e)},"fromPKCS8"),fromSPKI=o((r,t,e)=>{const n=l(r,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);return f("spki",n,t,e)},"fromSPKI");function $(r){const t=g(r);s(t,48,"Invalid certificate structure");const e=c(t);if(e<0||t.pos+e>t.data.length)throw new Error("Unexpected end of ASN.1 input");s(t,48,"Invalid tbsCertificate structure"),c(t),r[t.pos]===160?w(t,6):w(t,5);const n=t.pos;s(t,48,"Invalid SPKI structure");const i=c(t);return r.subarray(n,n+i+(t.pos-n))}o($,"spkiFromX509");export const fromX509=o((r,t,e)=>{let n;try{const i=l(r,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);n=$(i)}catch(i){throw new TypeError("Failed to parse the X.509 certificate",{cause:i})}return f("spki",n,t,e)},"fromX509");
@@ -1 +1 @@
1
- var d=Object.defineProperty;var i=(n,t)=>d(n,"name",{value:t,configurable:!0});import{concat as f,uint64be as b}from"./buffer_utils.js";import{checkCryptoKey as A}from"./crypto_key.js";import{invalidKeyInput as m}from"./invalid_key_input.js";import{JWEDecryptionFailed as h,JWEInvalid as p}from"../util/errors.js";import{isCryptoKey as K}from"./is_key_like.js";export const generateCek=i(n=>crypto.getRandomValues(new Uint8Array(n.cekBits>>3)),"generateCek");function C(n,t){const e=n.byteLength<<3;if(e!==t)throw new p(`Invalid Content Encryption Key length. Expected ${t} bits, got ${e} bits`)}i(C,"checkCekLength");export const generateIv=i(n=>crypto.getRandomValues(new Uint8Array(n.ivBits>>3)),"generateIv");export function checkIvLength(n,t){if(t.length<<3!==n.ivBits)throw new p("Invalid Initialization Vector length")}i(checkIvLength,"checkIvLength");async function E(n,t,e){if(!(t instanceof Uint8Array))throw new TypeError(m(t,"Uint8Array"));const r=n.cekBits>>1,a=await crypto.subtle.importKey("raw",t.subarray(r>>3),"AES-CBC",!1,[e]),c=await crypto.subtle.importKey("raw",t.subarray(0,r>>3),{hash:`SHA-${r<<1}`,name:"HMAC"},!1,["sign"]);return[a,c,r]}i(E,"cbcKeySetup");async function U(n,t,e){return new Uint8Array((await crypto.subtle.sign("HMAC",n,t)).slice(0,e>>3))}i(U,"cbcHmacTag");async function S(n,t,e,r,a){const[c,o,y]=await E(n,e,"encrypt"),s=new Uint8Array(await crypto.subtle.encrypt({iv:r,name:"AES-CBC"},c,t)),w=f(a,r,s,b(a.length*8)),l=await U(o,w,y);return{ciphertext:s,tag:l,iv:r}}i(S,"cbcEncrypt");async function B(n,t){const e={name:"HMAC",hash:"SHA-256"},r=await crypto.subtle.generateKey(e,!1,["sign","verify"]),a=await crypto.subtle.sign(e,r,n);return crypto.subtle.verify(e,r,a,t)}i(B,"timingSafeEqual");async function I(n,t,e,r,a,c){const[o,y,s]=await E(n,t,"decrypt"),w=f(c,r,e,b(c.length*8)),l=await U(y,w,s);let g;try{g=await B(a,l)}catch{}if(!g)throw new h;let u;try{u=new Uint8Array(await crypto.subtle.decrypt({iv:r,name:"AES-CBC"},o,e))}catch{}if(!u)throw new h;return u}i(I,"cbcDecrypt");async function x(n,t,e,r,a){const c=e instanceof Uint8Array?await crypto.subtle.importKey("raw",e,"AES-GCM",!1,["encrypt"]):(A(e,n.subtle,"encrypt"),e),o=new Uint8Array(await crypto.subtle.encrypt({additionalData:a,iv:r,name:"AES-GCM",tagLength:128},c,t)),y=o.slice(-16);return{ciphertext:o.slice(0,-16),tag:y,iv:r}}i(x,"gcmEncrypt");async function D(n,t,e,r,a,c){const o=t instanceof Uint8Array?await crypto.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(A(t,n.subtle,"decrypt"),t);try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:c,iv:r,name:"AES-GCM",tagLength:128},o,f(e,a)))}catch{throw new h}}i(D,"gcmDecrypt");export async function encrypt(n,t,e,r,a){if(!K(e)&&!(e instanceof Uint8Array))throw new TypeError(m(e,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));return r?checkIvLength(n,r):r=generateIv(n),e instanceof Uint8Array&&C(e,n.cekBits),n.cbc?S(n,t,e,r,a):x(n,t,e,r,a)}i(encrypt,"encrypt");export async function decrypt(n,t,e,r,a,c){if(!K(t)&&!(t instanceof Uint8Array))throw new TypeError(m(t,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!r)throw new p("JWE Initialization Vector missing");if(!a)throw new p("JWE Authentication Tag missing");return checkIvLength(n,r),t instanceof Uint8Array&&C(t,n.cekBits),n.cbc?I(n,t,e,r,a,c):D(n,t,e,r,a,c)}i(decrypt,"decrypt");
1
+ var E=Object.defineProperty;var i=(t,n)=>E(t,"name",{value:n,configurable:!0});import{concat as l,uint64be as h}from"./buffer_utils.js";import{checkCryptoKey as m}from"./crypto_key.js";import{invalidKeyInput as f}from"./invalid_key_input.js";import{JWEDecryptionFailed as g,JWEInvalid as p}from"../util/errors.js";import{isCryptoKey as b}from"./is_key_like.js";export const generateCek=i(t=>crypto.getRandomValues(new Uint8Array(t.cekBits>>3)),"generateCek");function A(t,n){const e=t.byteLength<<3;if(e!==n)throw new p(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}i(A,"checkCekLength");export const generateIv=i(t=>crypto.getRandomValues(new Uint8Array(t.ivBits>>3)),"generateIv");export function checkIvLength(t,n){if(n.length<<3!==t.ivBits)throw new p("Invalid Initialization Vector length")}i(checkIvLength,"checkIvLength");async function K(t,n,e){if(!(n instanceof Uint8Array))throw new TypeError(f(n,"Uint8Array"));const r=t.cekBits>>1,a=await crypto.subtle.importKey("raw",n.subarray(r>>3),"AES-CBC",!1,[e]),c=await crypto.subtle.importKey("raw",n.subarray(0,r>>3),{hash:`SHA-${r<<1}`,name:"HMAC"},!1,["sign"]);return[a,c,r]}i(K,"cbcKeySetup");async function C(t,n,e){return new Uint8Array((await crypto.subtle.sign("HMAC",t,n)).slice(0,e>>3))}i(C,"cbcHmacTag");async function U(t,n,e,r,a){const[c,o,y]=await K(t,e,"encrypt"),s=new Uint8Array(await crypto.subtle.encrypt({iv:r,name:"AES-CBC"},c,n)),w=l(a,r,s,h(a.length*8)),u=await C(o,w,y);return{ciphertext:s,tag:u,iv:r}}i(U,"cbcEncrypt");async function d(t,n){const e={name:"HMAC",hash:"SHA-256"},r=await crypto.subtle.generateKey(e,!1,["sign","verify"]),a=await crypto.subtle.sign(e,r,t);return crypto.subtle.verify(e,r,a,n)}i(d,"timingSafeEqual");async function S(t,n,e,r,a,c){const[o,y,s]=await K(t,n,"decrypt"),w=l(c,r,e,h(c.length*8)),u=await C(y,w,s);try{if(await d(a,u))return new Uint8Array(await crypto.subtle.decrypt({iv:r,name:"AES-CBC"},o,e))}catch{}throw new g}i(S,"cbcDecrypt");async function B(t,n,e,r,a){const c=e instanceof Uint8Array?await crypto.subtle.importKey("raw",e,"AES-GCM",!1,["encrypt"]):(m(e,t.subtle,"encrypt"),e),o=new Uint8Array(await crypto.subtle.encrypt({additionalData:a,iv:r,name:"AES-GCM",tagLength:128},c,n)),y=o.slice(-16);return{ciphertext:o.slice(0,-16),tag:y,iv:r}}i(B,"gcmEncrypt");async function I(t,n,e,r,a,c){const o=n instanceof Uint8Array?await crypto.subtle.importKey("raw",n,"AES-GCM",!1,["decrypt"]):(m(n,t.subtle,"decrypt"),n);try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:c,iv:r,name:"AES-GCM",tagLength:128},o,l(e,a)))}catch{throw new g}}i(I,"gcmDecrypt");export async function encrypt(t,n,e,r,a){if(!b(e)&&!(e instanceof Uint8Array))throw new TypeError(f(e,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));return r?checkIvLength(t,r):r=generateIv(t),e instanceof Uint8Array&&A(e,t.cekBits),t.cbc?U(t,n,e,r,a):B(t,n,e,r,a)}i(encrypt,"encrypt");export async function decrypt(t,n,e,r,a,c){if(!b(n)&&!(n instanceof Uint8Array))throw new TypeError(f(n,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!r)throw new p("JWE Initialization Vector missing");if(!a)throw new p("JWE Authentication Tag missing");if(!t.cbc&&a.length!==16)throw new p("Invalid Authentication Tag length");return checkIvLength(t,r),n instanceof Uint8Array&&A(n,t.cekBits),t.cbc?S(t,n,e,r,a,c):I(t,n,e,r,a,c)}i(decrypt,"decrypt");
@@ -1 +1 @@
1
- var f=Object.defineProperty;var s=(e,r)=>f(e,"name",{value:r,configurable:!0});import{JOSENotSupported as m,JWEInvalid as u}from"../util/errors.js";import{concat as d}from"./buffer_utils.js";function p(e){if(typeof globalThis[e]>"u")throw new m(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}s(p,"supported");export async function compress(e){p("CompressionStream");const r=new CompressionStream("deflate-raw"),t=r.writable.getWriter();t.write(e).catch(()=>{}),t.close().catch(()=>{});const o=[],n=r.readable.getReader();for(;;){const{value:a,done:c}=await n.read();if(c)break;o.push(a)}return d(...o)}s(compress,"compress");export async function decompress(e,r){p("DecompressionStream");const t=new DecompressionStream("deflate-raw"),o=t.writable.getWriter();o.write(e).catch(()=>{}),o.close().catch(()=>{});const n=[];let a=0;const c=t.readable.getReader();for(;;){const{value:i,done:l}=await c.read();if(l)break;if(n.push(i),a+=i.byteLength,r!==1/0&&a>r)throw new u("Decompressed plaintext exceeded the configured limit")}return d(...n)}s(decompress,"decompress");
1
+ var u=Object.defineProperty;var i=(e,r)=>u(e,"name",{value:r,configurable:!0});import{JOSENotSupported as p,JWEInvalid as d}from"../util/errors.js";import{concat as m}from"./buffer_utils.js";export function validateZip(e,r){if(e.zip!==void 0&&e.zip!=="DEF")throw new p('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value.');if(e.zip!==void 0&&!r?.zip)throw new d('JWE "zip" (Compression Algorithm) Header Parameter MUST be in a protected header.')}i(validateZip,"validateZip");function f(e){if(typeof globalThis[e]>"u")throw new p(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}i(f,"supported");export async function compress(e){f("CompressionStream");const r=new CompressionStream("deflate-raw"),t=r.writable.getWriter();t.write(e).catch(()=>{}),t.close().catch(()=>{});const o=[],n=r.readable.getReader();for(;;){const{value:a,done:s}=await n.read();if(s)break;o.push(a)}return m(...o)}i(compress,"compress");export async function decompress(e,r){f("DecompressionStream");const t=new DecompressionStream("deflate-raw"),o=t.writable.getWriter();o.write(e).catch(()=>{}),o.close().catch(()=>{});const n=[];let a=0;const s=t.readable.getReader();for(;;){const{value:c,done:l}=await s.read();if(l)break;if(n.push(c),a+=c.byteLength,r!==1/0&&a>r)throw new d("Decompressed plaintext exceeded the configured limit")}return m(...n)}i(decompress,"decompress");
@@ -1 +1 @@
1
- var i=Object.defineProperty;var o=(t,e)=>i(t,"name",{value:e,configurable:!0});import{decode as c}from"../util/base64url.js";import{encode as a,strictDecoder as d}from"./buffer_utils.js";import{isObject as s}from"./type_checks.js";export const unprotected=Symbol();export function assertNotSet(t,e){if(t)throw new TypeError(`${e} can only be called once`)}o(assertNotSet,"assertNotSet");export function decodeBase64url(t,e,r){try{return c(t)}catch{throw new r(`Failed to base64url decode the ${e}`)}}o(decodeBase64url,"decodeBase64url");export function encodeBase64url(t,e,r){try{return a(t)}catch{throw new r(`The ${e} is not a valid base64url string`)}}o(encodeBase64url,"encodeBase64url");export async function digest(t,e){const r=`SHA-${t.slice(-3)}`;return new Uint8Array(await crypto.subtle.digest(r,e))}o(digest,"digest");export function parseJoseHeader(t,e,r){let n;try{n=JSON.parse(d.decode(c(t)))}catch{throw new e(r)}if(!s(n))throw new e(r);return n}o(parseJoseHeader,"parseJoseHeader");
1
+ var i=Object.defineProperty;var o=(t,e)=>i(t,"name",{value:e,configurable:!0});import{decode as c}from"../util/base64url.js";import{encode as d,strictDecoder as a}from"./buffer_utils.js";import{isObject as s}from"./type_checks.js";export const unprotected=Symbol();export function assertNotSet(t,e){if(t!==void 0)throw new TypeError(`${e} can only be called once`)}o(assertNotSet,"assertNotSet");export function decodeBase64url(t,e,r){try{return c(t)}catch{throw new r(`Failed to base64url decode the ${e}`)}}o(decodeBase64url,"decodeBase64url");export function encodeBase64url(t,e,r){try{return d(t)}catch{throw new r(`The ${e} is not a valid base64url string`)}}o(encodeBase64url,"encodeBase64url");export async function digest(t,e){const r=`SHA-${t.slice(-3)}`;return new Uint8Array(await crypto.subtle.digest(r,e))}o(digest,"digest");export function parseJoseHeader(t,e,r){let n;try{n=JSON.parse(a.decode(c(t)))}catch{throw new e(r)}if(!s(n))throw new e(r);return n}o(parseJoseHeader,"parseJoseHeader");