@coro-ai/runner 0.1.34 → 0.1.36

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 (596) hide show
  1. package/dashboard-dist/assets/{index-C7l2FOsX.js → index-DVdRvXW2.js} +1 -1
  2. package/dashboard-dist/index.html +1 -1
  3. package/dist/src/clients/github.d.ts +21 -10
  4. package/dist/src/clients/github.js +48 -40
  5. package/dist/src/clients/github.js.map +1 -1
  6. package/dist/src/cloud/db/postgres-backend.js +21 -13
  7. package/dist/src/cloud/db/postgres-backend.js.map +1 -1
  8. package/dist/src/cloud/db/schema.d.ts +1 -1
  9. package/dist/src/intake/system-prompt.js +3 -0
  10. package/dist/src/intake/system-prompt.js.map +1 -1
  11. package/dist/src/jobs/phase-assignment.d.ts +42 -0
  12. package/dist/src/jobs/phase-assignment.js +46 -43
  13. package/dist/src/jobs/phase-assignment.js.map +1 -1
  14. package/dist/src/jobs/runner.js +63 -34
  15. package/dist/src/jobs/runner.js.map +1 -1
  16. package/dist/src/plugins/refs.d.ts +50 -1
  17. package/dist/src/plugins/refs.js +97 -1
  18. package/dist/src/plugins/refs.js.map +1 -1
  19. package/dist/src/plugins/registry.d.ts +6 -0
  20. package/dist/src/plugins/registry.js +11 -2
  21. package/dist/src/plugins/registry.js.map +1 -1
  22. package/dist/src/plugins/types.d.ts +1 -1
  23. package/dist/src/prompt/builder.d.ts +2 -1
  24. package/dist/src/prompt/builder.js +42 -1
  25. package/dist/src/prompt/builder.js.map +1 -1
  26. package/dist/src/runner/build-settings.js +16 -4
  27. package/dist/src/runner/build-settings.js.map +1 -1
  28. package/dist/src/state/polling-transport.d.ts +41 -12
  29. package/dist/src/state/polling-transport.js +95 -56
  30. package/dist/src/state/polling-transport.js.map +1 -1
  31. package/dist/src/state/sqlite-backend.js +19 -13
  32. package/dist/src/state/sqlite-backend.js.map +1 -1
  33. package/dist/src/tools/run-subagent.js +10 -5
  34. package/dist/src/tools/run-subagent.js.map +1 -1
  35. package/node_modules/@coro-ai/cloud-protocol/package.json +1 -1
  36. package/node_modules/@coro-ai/intelligence-base/layer/agents/coder.md +1 -1
  37. package/node_modules/@coro-ai/intelligence-base/layer/agents/planner.md +1 -1
  38. package/node_modules/@coro-ai/intelligence-base/package.json +1 -1
  39. package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.d.ts +58 -0
  40. package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.d.ts.map +1 -0
  41. package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.js +278 -0
  42. package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.js.map +1 -0
  43. package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts +12 -1
  44. package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts.map +1 -1
  45. package/node_modules/@coro-ai/llm-anthropic/dist/executor.js +67 -44
  46. package/node_modules/@coro-ai/llm-anthropic/dist/executor.js.map +1 -1
  47. package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.d.ts.map +1 -1
  48. package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.js +4 -0
  49. package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.js.map +1 -1
  50. package/node_modules/@coro-ai/llm-anthropic/dist/index.d.ts +2 -1
  51. package/node_modules/@coro-ai/llm-anthropic/dist/index.d.ts.map +1 -1
  52. package/node_modules/@coro-ai/llm-anthropic/dist/index.js +6 -2
  53. package/node_modules/@coro-ai/llm-anthropic/dist/index.js.map +1 -1
  54. package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.d.ts +11 -0
  55. package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.d.ts.map +1 -0
  56. package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.js +112 -0
  57. package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.js.map +1 -0
  58. package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.d.ts +0 -26
  59. package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.d.ts.map +1 -1
  60. package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.js +40 -106
  61. package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.js.map +1 -1
  62. package/node_modules/@coro-ai/llm-anthropic/package.json +1 -1
  63. package/node_modules/@coro-ai/llm-openai/dist/executor.d.ts.map +1 -1
  64. package/node_modules/@coro-ai/llm-openai/dist/executor.js +13 -10
  65. package/node_modules/@coro-ai/llm-openai/dist/executor.js.map +1 -1
  66. package/node_modules/@coro-ai/llm-openai/dist/models.d.ts.map +1 -1
  67. package/node_modules/@coro-ai/llm-openai/dist/models.js +3 -0
  68. package/node_modules/@coro-ai/llm-openai/dist/models.js.map +1 -1
  69. package/node_modules/@coro-ai/llm-openai/package.json +1 -1
  70. package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.d.ts +10 -1
  71. package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.d.ts.map +1 -1
  72. package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.js +16 -2
  73. package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.js.map +1 -1
  74. package/node_modules/@coro-ai/plugin-sdk/dist/helpers.d.ts +27 -1
  75. package/node_modules/@coro-ai/plugin-sdk/dist/helpers.d.ts.map +1 -1
  76. package/node_modules/@coro-ai/plugin-sdk/dist/helpers.js +47 -0
  77. package/node_modules/@coro-ai/plugin-sdk/dist/helpers.js.map +1 -1
  78. package/node_modules/@coro-ai/plugin-sdk/dist/types.d.ts +65 -4
  79. package/node_modules/@coro-ai/plugin-sdk/dist/types.d.ts.map +1 -1
  80. package/node_modules/@coro-ai/plugin-sdk/package.json +1 -1
  81. package/node_modules/@hono/node-server/README.md +104 -25
  82. package/node_modules/@hono/node-server/dist/conninfo.cjs +22 -0
  83. package/node_modules/@hono/node-server/dist/{conninfo.d.ts → conninfo.d.cts} +4 -3
  84. package/node_modules/@hono/node-server/dist/conninfo.d.mts +4 -3
  85. package/node_modules/@hono/node-server/dist/conninfo.mjs +19 -16
  86. package/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs +5 -0
  87. package/node_modules/@hono/node-server/dist/constants-BXAKTxRC.cjs +11 -0
  88. package/node_modules/@hono/node-server/dist/early-hints.cjs +35 -0
  89. package/node_modules/@hono/node-server/dist/early-hints.d.cts +16 -0
  90. package/node_modules/@hono/node-server/dist/early-hints.d.mts +16 -0
  91. package/node_modules/@hono/node-server/dist/early-hints.mjs +33 -0
  92. package/node_modules/@hono/node-server/dist/index.cjs +1176 -0
  93. package/node_modules/@hono/node-server/dist/index.d.cts +101 -0
  94. package/node_modules/@hono/node-server/dist/index.d.mts +101 -8
  95. package/node_modules/@hono/node-server/dist/index.mjs +1146 -637
  96. package/node_modules/@hono/node-server/dist/serve-static.cjs +151 -0
  97. package/node_modules/@hono/node-server/dist/serve-static.d.cts +18 -0
  98. package/node_modules/@hono/node-server/dist/serve-static.d.mts +14 -13
  99. package/node_modules/@hono/node-server/dist/serve-static.mjs +143 -145
  100. package/node_modules/@hono/node-server/dist/utils/response.cjs +8 -0
  101. package/node_modules/@hono/node-server/dist/utils/response.d.cts +4 -0
  102. package/node_modules/@hono/node-server/dist/utils/response.d.mts +3 -2
  103. package/node_modules/@hono/node-server/dist/utils/response.mjs +6 -9
  104. package/node_modules/@hono/node-server/dist/utils/stream.cjs +65 -0
  105. package/node_modules/@hono/node-server/dist/utils/stream.d.cts +6 -0
  106. package/node_modules/@hono/node-server/dist/utils/stream.d.mts +6 -0
  107. package/node_modules/@hono/node-server/dist/utils/stream.mjs +64 -0
  108. package/node_modules/@hono/node-server/package.json +78 -54
  109. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map +1 -1
  110. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js +1 -12
  111. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map +1 -1
  112. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts +7 -0
  113. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map +1 -1
  114. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js +9 -3
  115. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map +1 -1
  116. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map +1 -1
  117. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js +5 -3
  118. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map +1 -1
  119. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.d.ts.map +1 -1
  120. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js +1 -12
  121. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js.map +1 -1
  122. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts +5 -0
  123. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts.map +1 -0
  124. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js +17 -0
  125. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js.map +1 -0
  126. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts +9 -1
  127. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts.map +1 -1
  128. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js +10 -4
  129. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js.map +1 -1
  130. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts +21 -0
  131. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts.map +1 -1
  132. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js +239 -41
  133. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js.map +1 -1
  134. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.d.ts.map +1 -1
  135. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js +25 -6
  136. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js.map +1 -1
  137. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts +32 -0
  138. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts.map +1 -0
  139. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js +64 -0
  140. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js.map +1 -0
  141. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts +5 -0
  142. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts.map +1 -1
  143. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js +10 -1
  144. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js.map +1 -1
  145. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.d.ts.map +1 -1
  146. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +2 -13
  147. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -1
  148. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts +7 -0
  149. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts.map +1 -1
  150. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js +9 -3
  151. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js.map +1 -1
  152. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts.map +1 -1
  153. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +5 -3
  154. package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -1
  155. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.d.ts.map +1 -1
  156. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +2 -13
  157. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -1
  158. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts +5 -0
  159. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts.map +1 -0
  160. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js +13 -0
  161. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js.map +1 -0
  162. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts +9 -1
  163. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts.map +1 -1
  164. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +10 -4
  165. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -1
  166. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts +21 -0
  167. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts.map +1 -1
  168. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js +239 -41
  169. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js.map +1 -1
  170. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.d.ts.map +1 -1
  171. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +25 -6
  172. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -1
  173. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts +32 -0
  174. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts.map +1 -0
  175. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js +57 -0
  176. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js.map +1 -0
  177. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts +5 -0
  178. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts.map +1 -1
  179. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +9 -0
  180. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -1
  181. package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/README.md +15 -14
  182. package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/index.js +0 -8
  183. package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/package.json +16 -12
  184. package/node_modules/@modelcontextprotocol/sdk/package.json +4 -3
  185. package/node_modules/express-rate-limit/dist/index.cjs +6 -1
  186. package/node_modules/express-rate-limit/dist/index.d.cts +10 -12
  187. package/node_modules/express-rate-limit/dist/index.d.mts +10 -12
  188. package/node_modules/express-rate-limit/dist/index.d.ts +10 -12
  189. package/node_modules/express-rate-limit/dist/index.mjs +6 -1
  190. package/node_modules/express-rate-limit/package.json +8 -8
  191. package/node_modules/express-rate-limit/readme.md +2 -2
  192. package/node_modules/fast-uri/index.js +54 -1
  193. package/node_modules/fast-uri/package.json +1 -1
  194. package/node_modules/fast-uri/test/security.test.js +198 -0
  195. package/node_modules/hono/dist/cjs/context.js +28 -13
  196. package/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
  197. package/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
  198. package/node_modules/hono/dist/cjs/hono-base.js +3 -2
  199. package/node_modules/hono/dist/cjs/jsx/base.js +27 -23
  200. package/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
  201. package/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
  202. package/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
  203. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -2
  204. package/node_modules/hono/dist/cjs/middleware/etag/index.js +4 -1
  205. package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
  206. package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
  207. package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
  208. package/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
  209. package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +10 -4
  210. package/node_modules/hono/dist/cjs/request.js +14 -11
  211. package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +55 -56
  212. package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +64 -85
  213. package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +13 -5
  214. package/node_modules/hono/dist/cjs/router/trie-router/node.js +1 -1
  215. package/node_modules/hono/dist/cjs/router.js +1 -1
  216. package/node_modules/hono/dist/cjs/utils/accept.js +1 -1
  217. package/node_modules/hono/dist/cjs/utils/body.js +6 -0
  218. package/node_modules/hono/dist/cjs/utils/cookie.js +3 -2
  219. package/node_modules/hono/dist/cjs/utils/stream.js +5 -2
  220. package/node_modules/hono/dist/cjs/utils/url.js +8 -8
  221. package/node_modules/hono/dist/context.js +28 -13
  222. package/node_modules/hono/dist/helper/proxy/index.js +4 -0
  223. package/node_modules/hono/dist/helper/streaming/sse.js +5 -4
  224. package/node_modules/hono/dist/hono-base.js +3 -2
  225. package/node_modules/hono/dist/jsx/base.js +27 -23
  226. package/node_modules/hono/dist/jsx/hooks/index.js +16 -13
  227. package/node_modules/hono/dist/middleware/cache/index.js +103 -8
  228. package/node_modules/hono/dist/middleware/compress/index.js +5 -0
  229. package/node_modules/hono/dist/middleware/cors/index.js +2 -2
  230. package/node_modules/hono/dist/middleware/etag/index.js +4 -1
  231. package/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
  232. package/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
  233. package/node_modules/hono/dist/middleware/language/language.js +10 -6
  234. package/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
  235. package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +10 -4
  236. package/node_modules/hono/dist/request.js +15 -12
  237. package/node_modules/hono/dist/router/reg-exp-router/node.js +55 -56
  238. package/node_modules/hono/dist/router/reg-exp-router/router.js +64 -85
  239. package/node_modules/hono/dist/router/reg-exp-router/trie.js +13 -5
  240. package/node_modules/hono/dist/router/trie-router/node.js +1 -1
  241. package/node_modules/hono/dist/router.js +1 -1
  242. package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
  243. package/node_modules/hono/dist/types/client/types.d.ts +1 -1
  244. package/node_modules/hono/dist/types/hono-base.d.ts +4 -3
  245. package/node_modules/hono/dist/types/jsx/base.d.ts +4 -2
  246. package/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
  247. package/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
  248. package/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
  249. package/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
  250. package/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
  251. package/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
  252. package/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
  253. package/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
  254. package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
  255. package/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
  256. package/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
  257. package/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
  258. package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +1 -1
  259. package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
  260. package/node_modules/hono/dist/types/router.d.ts +1 -1
  261. package/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
  262. package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
  263. package/node_modules/hono/dist/utils/accept.js +1 -1
  264. package/node_modules/hono/dist/utils/body.js +6 -0
  265. package/node_modules/hono/dist/utils/cookie.js +4 -3
  266. package/node_modules/hono/dist/utils/stream.js +5 -2
  267. package/node_modules/hono/dist/utils/url.js +6 -7
  268. package/node_modules/hono/package.json +10 -3
  269. package/node_modules/ip-address/README.md +146 -126
  270. package/node_modules/ip-address/dist/common.d.ts +29 -0
  271. package/node_modules/ip-address/dist/common.js +44 -5
  272. package/node_modules/ip-address/dist/common.js.map +1 -1
  273. package/node_modules/ip-address/dist/ipv4.d.ts +8 -1
  274. package/node_modules/ip-address/dist/ipv4.js +24 -20
  275. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  276. package/node_modules/ip-address/dist/ipv6.d.ts +68 -3
  277. package/node_modules/ip-address/dist/ipv6.js +180 -53
  278. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  279. package/node_modules/ip-address/dist/v4/constants.js +5 -1
  280. package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  281. package/node_modules/ip-address/dist/v6/constants.js +3 -2
  282. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  283. package/node_modules/ip-address/package.json +6 -4
  284. package/node_modules/jose/README.md +13 -16
  285. package/node_modules/jose/dist/types/index.d.ts +6 -5
  286. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +17 -11
  287. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +7 -19
  288. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +17 -11
  289. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +7 -19
  290. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +18 -13
  291. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +20 -21
  292. package/node_modules/jose/dist/types/jwk/embedded.d.ts +8 -12
  293. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -15
  294. package/node_modules/jose/dist/types/jwks/local.d.ts +12 -21
  295. package/node_modules/jose/dist/types/jwks/remote.d.ts +34 -165
  296. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +2 -13
  297. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +17 -13
  298. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +2 -13
  299. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +17 -13
  300. package/node_modules/jose/dist/types/jws/general/sign.d.ts +16 -17
  301. package/node_modules/jose/dist/types/jws/general/verify.d.ts +18 -15
  302. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +17 -11
  303. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +10 -34
  304. package/node_modules/jose/dist/types/jwt/sign.d.ts +2 -13
  305. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +4 -13
  306. package/node_modules/jose/dist/types/jwt/verify.d.ts +14 -13
  307. package/node_modules/jose/dist/types/key/export.d.ts +0 -14
  308. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +7 -14
  309. package/node_modules/jose/dist/types/key/generate_secret.d.ts +16 -14
  310. package/node_modules/jose/dist/types/key/import.d.ts +18 -28
  311. package/node_modules/jose/dist/types/types.d.ts +239 -222
  312. package/node_modules/jose/dist/types/util/base64url.d.ts +11 -4
  313. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -9
  314. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
  315. package/node_modules/jose/dist/types/util/errors.d.ts +128 -121
  316. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +4 -22
  317. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +5 -153
  318. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +16 -111
  319. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +23 -3
  320. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +66 -82
  321. package/node_modules/jose/dist/webapi/jwk/embedded.js +5 -3
  322. package/node_modules/jose/dist/webapi/jwks/local.js +32 -73
  323. package/node_modules/jose/dist/webapi/jwks/remote.js +19 -28
  324. package/node_modules/jose/dist/webapi/jws/compact/sign.js +5 -2
  325. package/node_modules/jose/dist/webapi/jws/compact/verify.js +4 -16
  326. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +7 -65
  327. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +3 -89
  328. package/node_modules/jose/dist/webapi/jws/general/sign.js +19 -15
  329. package/node_modules/jose/dist/webapi/jws/general/verify.js +29 -9
  330. package/node_modules/jose/dist/webapi/jwt/decrypt.js +5 -5
  331. package/node_modules/jose/dist/webapi/jwt/sign.js +2 -3
  332. package/node_modules/jose/dist/webapi/jwt/unsecured.js +4 -3
  333. package/node_modules/jose/dist/webapi/jwt/verify.js +6 -6
  334. package/node_modules/jose/dist/webapi/key/export.js +37 -4
  335. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +33 -82
  336. package/node_modules/jose/dist/webapi/key/generate_secret.js +2 -2
  337. package/node_modules/jose/dist/webapi/key/import.js +8 -8
  338. package/node_modules/jose/dist/webapi/lib/asn1.js +53 -122
  339. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +1 -0
  340. package/node_modules/jose/dist/webapi/lib/content_encryption.js +34 -109
  341. package/node_modules/jose/dist/webapi/lib/crypto_key.js +18 -126
  342. package/node_modules/jose/dist/webapi/lib/helpers.js +23 -0
  343. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -1
  344. package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +107 -0
  345. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +186 -0
  346. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +110 -0
  347. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +8 -98
  348. package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +73 -0
  349. package/node_modules/jose/dist/webapi/lib/jws_sign.js +74 -0
  350. package/node_modules/jose/dist/webapi/lib/jws_verify.js +107 -0
  351. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +68 -109
  352. package/node_modules/jose/dist/webapi/lib/key.js +132 -0
  353. package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
  354. package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
  355. package/node_modules/jose/dist/webapi/lib/key_management.js +162 -92
  356. package/node_modules/jose/dist/webapi/lib/options.js +48 -0
  357. package/node_modules/jose/dist/webapi/lib/signing.js +14 -56
  358. package/node_modules/jose/dist/webapi/lib/type_checks.js +13 -18
  359. package/node_modules/jose/dist/webapi/util/base64url.js +13 -4
  360. package/node_modules/jose/dist/webapi/util/decode_jwt.js +2 -2
  361. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -15
  362. package/node_modules/jose/dist/webapi/util/errors.js +1 -1
  363. package/node_modules/jose/package.json +2 -4
  364. package/node_modules/js-yaml/dist/js-yaml.js +5 -2
  365. package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
  366. package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
  367. package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
  368. package/node_modules/js-yaml/dist/js-yaml.mjs +3 -3
  369. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  370. package/node_modules/js-yaml/lib/type/omap.js +3 -3
  371. package/node_modules/js-yaml/package.json +1 -1
  372. package/node_modules/openai/CHANGELOG.md +32 -0
  373. package/node_modules/openai/azure.d.mts.map +1 -1
  374. package/node_modules/openai/azure.d.ts.map +1 -1
  375. package/node_modules/openai/azure.js +5 -1
  376. package/node_modules/openai/azure.js.map +1 -1
  377. package/node_modules/openai/azure.mjs +5 -1
  378. package/node_modules/openai/azure.mjs.map +1 -1
  379. package/node_modules/openai/helpers/standard-schema.d.mts +104 -0
  380. package/node_modules/openai/helpers/standard-schema.d.mts.map +1 -0
  381. package/node_modules/openai/helpers/standard-schema.d.ts +104 -0
  382. package/node_modules/openai/helpers/standard-schema.d.ts.map +1 -0
  383. package/node_modules/openai/helpers/standard-schema.js +320 -0
  384. package/node_modules/openai/helpers/standard-schema.js.map +1 -0
  385. package/node_modules/openai/helpers/standard-schema.mjs +314 -0
  386. package/node_modules/openai/helpers/standard-schema.mjs.map +1 -0
  387. package/node_modules/openai/helpers/zod.d.mts +26 -3
  388. package/node_modules/openai/helpers/zod.d.mts.map +1 -1
  389. package/node_modules/openai/helpers/zod.d.ts +26 -3
  390. package/node_modules/openai/helpers/zod.d.ts.map +1 -1
  391. package/node_modules/openai/helpers/zod.js +97 -7
  392. package/node_modules/openai/helpers/zod.js.map +1 -1
  393. package/node_modules/openai/helpers/zod.mjs +96 -7
  394. package/node_modules/openai/helpers/zod.mjs.map +1 -1
  395. package/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
  396. package/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
  397. package/node_modules/openai/lib/AbstractChatCompletionRunner.js +43 -1
  398. package/node_modules/openai/lib/AbstractChatCompletionRunner.js.map +1 -1
  399. package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +43 -1
  400. package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +1 -1
  401. package/node_modules/openai/lib/ChatCompletionStream.d.mts +2 -1
  402. package/node_modules/openai/lib/ChatCompletionStream.d.mts.map +1 -1
  403. package/node_modules/openai/lib/ChatCompletionStream.d.ts +2 -1
  404. package/node_modules/openai/lib/ChatCompletionStream.d.ts.map +1 -1
  405. package/node_modules/openai/lib/ChatCompletionStream.js +53 -14
  406. package/node_modules/openai/lib/ChatCompletionStream.js.map +1 -1
  407. package/node_modules/openai/lib/ChatCompletionStream.mjs +53 -14
  408. package/node_modules/openai/lib/ChatCompletionStream.mjs.map +1 -1
  409. package/node_modules/openai/lib/ResponsesParser.d.mts.map +1 -1
  410. package/node_modules/openai/lib/ResponsesParser.d.ts.map +1 -1
  411. package/node_modules/openai/lib/ResponsesParser.js +3 -5
  412. package/node_modules/openai/lib/ResponsesParser.js.map +1 -1
  413. package/node_modules/openai/lib/ResponsesParser.mjs +3 -5
  414. package/node_modules/openai/lib/ResponsesParser.mjs.map +1 -1
  415. package/node_modules/openai/lib/jsonschema.d.mts +3 -0
  416. package/node_modules/openai/lib/jsonschema.d.mts.map +1 -1
  417. package/node_modules/openai/lib/jsonschema.d.ts +3 -0
  418. package/node_modules/openai/lib/jsonschema.d.ts.map +1 -1
  419. package/node_modules/openai/lib/transform.d.mts +25 -1
  420. package/node_modules/openai/lib/transform.d.mts.map +1 -1
  421. package/node_modules/openai/lib/transform.d.ts +25 -1
  422. package/node_modules/openai/lib/transform.d.ts.map +1 -1
  423. package/node_modules/openai/lib/transform.js +1521 -82
  424. package/node_modules/openai/lib/transform.js.map +1 -1
  425. package/node_modules/openai/lib/transform.mjs +1515 -82
  426. package/node_modules/openai/lib/transform.mjs.map +1 -1
  427. package/node_modules/openai/package.json +1 -1
  428. package/node_modules/openai/resources/admin/organization/index.d.mts +1 -0
  429. package/node_modules/openai/resources/admin/organization/index.d.mts.map +1 -1
  430. package/node_modules/openai/resources/admin/organization/index.d.ts +1 -0
  431. package/node_modules/openai/resources/admin/organization/index.d.ts.map +1 -1
  432. package/node_modules/openai/resources/admin/organization/index.js +3 -1
  433. package/node_modules/openai/resources/admin/organization/index.js.map +1 -1
  434. package/node_modules/openai/resources/admin/organization/index.mjs +1 -0
  435. package/node_modules/openai/resources/admin/organization/index.mjs.map +1 -1
  436. package/node_modules/openai/resources/admin/organization/organization.d.mts +4 -0
  437. package/node_modules/openai/resources/admin/organization/organization.d.mts.map +1 -1
  438. package/node_modules/openai/resources/admin/organization/organization.d.ts +4 -0
  439. package/node_modules/openai/resources/admin/organization/organization.d.ts.map +1 -1
  440. package/node_modules/openai/resources/admin/organization/organization.js +4 -0
  441. package/node_modules/openai/resources/admin/organization/organization.js.map +1 -1
  442. package/node_modules/openai/resources/admin/organization/organization.mjs +4 -0
  443. package/node_modules/openai/resources/admin/organization/organization.mjs.map +1 -1
  444. package/node_modules/openai/resources/admin/organization/projects/index.d.mts +1 -0
  445. package/node_modules/openai/resources/admin/organization/projects/index.d.mts.map +1 -1
  446. package/node_modules/openai/resources/admin/organization/projects/index.d.ts +1 -0
  447. package/node_modules/openai/resources/admin/organization/projects/index.d.ts.map +1 -1
  448. package/node_modules/openai/resources/admin/organization/projects/index.js +3 -1
  449. package/node_modules/openai/resources/admin/organization/projects/index.js.map +1 -1
  450. package/node_modules/openai/resources/admin/organization/projects/index.mjs +1 -0
  451. package/node_modules/openai/resources/admin/organization/projects/index.mjs.map +1 -1
  452. package/node_modules/openai/resources/admin/organization/projects/projects.d.mts +4 -0
  453. package/node_modules/openai/resources/admin/organization/projects/projects.d.mts.map +1 -1
  454. package/node_modules/openai/resources/admin/organization/projects/projects.d.ts +4 -0
  455. package/node_modules/openai/resources/admin/organization/projects/projects.d.ts.map +1 -1
  456. package/node_modules/openai/resources/admin/organization/projects/projects.js +4 -0
  457. package/node_modules/openai/resources/admin/organization/projects/projects.js.map +1 -1
  458. package/node_modules/openai/resources/admin/organization/projects/projects.mjs +4 -0
  459. package/node_modules/openai/resources/admin/organization/projects/projects.mjs.map +1 -1
  460. package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.mts +115 -0
  461. package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.mts.map +1 -0
  462. package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.ts +115 -0
  463. package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.ts.map +1 -0
  464. package/node_modules/openai/resources/admin/organization/projects/spend-limit.js +67 -0
  465. package/node_modules/openai/resources/admin/organization/projects/spend-limit.js.map +1 -0
  466. package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs +63 -0
  467. package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs.map +1 -0
  468. package/node_modules/openai/resources/admin/organization/spend-limit.d.mts +108 -0
  469. package/node_modules/openai/resources/admin/organization/spend-limit.d.mts.map +1 -0
  470. package/node_modules/openai/resources/admin/organization/spend-limit.d.ts +108 -0
  471. package/node_modules/openai/resources/admin/organization/spend-limit.d.ts.map +1 -0
  472. package/node_modules/openai/resources/admin/organization/spend-limit.js +59 -0
  473. package/node_modules/openai/resources/admin/organization/spend-limit.js.map +1 -0
  474. package/node_modules/openai/resources/admin/organization/spend-limit.mjs +55 -0
  475. package/node_modules/openai/resources/admin/organization/spend-limit.mjs.map +1 -0
  476. package/node_modules/openai/resources/beta/responses/input-tokens.d.mts +6 -2
  477. package/node_modules/openai/resources/beta/responses/input-tokens.d.mts.map +1 -1
  478. package/node_modules/openai/resources/beta/responses/input-tokens.d.ts +6 -2
  479. package/node_modules/openai/resources/beta/responses/input-tokens.d.ts.map +1 -1
  480. package/node_modules/openai/resources/beta/responses/responses.d.mts +21 -11
  481. package/node_modules/openai/resources/beta/responses/responses.d.mts.map +1 -1
  482. package/node_modules/openai/resources/beta/responses/responses.d.ts +21 -11
  483. package/node_modules/openai/resources/beta/responses/responses.d.ts.map +1 -1
  484. package/node_modules/openai/resources/beta/responses/responses.js.map +1 -1
  485. package/node_modules/openai/resources/beta/responses/responses.mjs.map +1 -1
  486. package/node_modules/openai/resources/chat/completions/completions.d.mts +4 -3
  487. package/node_modules/openai/resources/chat/completions/completions.d.mts.map +1 -1
  488. package/node_modules/openai/resources/chat/completions/completions.d.ts +4 -3
  489. package/node_modules/openai/resources/chat/completions/completions.d.ts.map +1 -1
  490. package/node_modules/openai/resources/chat/completions/completions.js.map +1 -1
  491. package/node_modules/openai/resources/chat/completions/completions.mjs.map +1 -1
  492. package/node_modules/openai/resources/responses/input-tokens.d.mts +2 -1
  493. package/node_modules/openai/resources/responses/input-tokens.d.mts.map +1 -1
  494. package/node_modules/openai/resources/responses/input-tokens.d.ts +2 -1
  495. package/node_modules/openai/resources/responses/input-tokens.d.ts.map +1 -1
  496. package/node_modules/openai/resources/responses/responses.d.mts +9 -8
  497. package/node_modules/openai/resources/responses/responses.d.mts.map +1 -1
  498. package/node_modules/openai/resources/responses/responses.d.ts +9 -8
  499. package/node_modules/openai/resources/responses/responses.d.ts.map +1 -1
  500. package/node_modules/openai/resources/responses/responses.js.map +1 -1
  501. package/node_modules/openai/resources/responses/responses.mjs.map +1 -1
  502. package/node_modules/openai/resources/shared.d.mts +4 -1
  503. package/node_modules/openai/resources/shared.d.mts.map +1 -1
  504. package/node_modules/openai/resources/shared.d.ts +4 -1
  505. package/node_modules/openai/resources/shared.d.ts.map +1 -1
  506. package/node_modules/openai/src/azure.ts +5 -1
  507. package/node_modules/openai/src/helpers/standard-schema.ts +570 -0
  508. package/node_modules/openai/src/helpers/zod.ts +158 -29
  509. package/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +43 -1
  510. package/node_modules/openai/src/lib/ChatCompletionStream.ts +56 -8
  511. package/node_modules/openai/src/lib/ResponsesParser.ts +7 -5
  512. package/node_modules/openai/src/lib/jsonschema.ts +3 -0
  513. package/node_modules/openai/src/lib/transform.ts +1930 -103
  514. package/node_modules/openai/src/resources/admin/organization/index.ts +6 -0
  515. package/node_modules/openai/src/resources/admin/organization/organization.ts +16 -0
  516. package/node_modules/openai/src/resources/admin/organization/projects/index.ts +6 -0
  517. package/node_modules/openai/src/resources/admin/organization/projects/projects.ts +16 -0
  518. package/node_modules/openai/src/resources/admin/organization/projects/spend-limit.ts +156 -0
  519. package/node_modules/openai/src/resources/admin/organization/spend-limit.ts +144 -0
  520. package/node_modules/openai/src/resources/beta/responses/input-tokens.ts +6 -2
  521. package/node_modules/openai/src/resources/beta/responses/responses.ts +21 -10
  522. package/node_modules/openai/src/resources/chat/completions/completions.ts +4 -3
  523. package/node_modules/openai/src/resources/responses/input-tokens.ts +2 -1
  524. package/node_modules/openai/src/resources/responses/responses.ts +9 -7
  525. package/node_modules/openai/src/resources/shared.ts +4 -1
  526. package/node_modules/openai/src/version.ts +1 -1
  527. package/node_modules/openai/version.d.mts +1 -1
  528. package/node_modules/openai/version.d.ts +1 -1
  529. package/node_modules/openai/version.js +1 -1
  530. package/node_modules/openai/version.mjs +1 -1
  531. package/node_modules/process-warning/LICENSE +1 -1
  532. package/node_modules/process-warning/README.md +41 -2
  533. package/node_modules/process-warning/index.js +85 -17
  534. package/node_modules/process-warning/package.json +6 -7
  535. package/node_modules/process-warning/test/emit-once-only.test.js +3 -3
  536. package/node_modules/process-warning/test/emit-reset.test.js +4 -4
  537. package/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
  538. package/node_modules/process-warning/test/spy-warning.test.js +143 -0
  539. package/node_modules/process-warning/types/index.d.ts +15 -1
  540. package/node_modules/process-warning/types/index.tst.ts +48 -0
  541. package/node_modules/ws/package.json +1 -1
  542. package/package.json +6 -6
  543. package/node_modules/@hono/node-server/dist/conninfo.js +0 -42
  544. package/node_modules/@hono/node-server/dist/globals.d.mts +0 -2
  545. package/node_modules/@hono/node-server/dist/globals.d.ts +0 -2
  546. package/node_modules/@hono/node-server/dist/globals.js +0 -29
  547. package/node_modules/@hono/node-server/dist/globals.mjs +0 -5
  548. package/node_modules/@hono/node-server/dist/index.d.ts +0 -8
  549. package/node_modules/@hono/node-server/dist/index.js +0 -702
  550. package/node_modules/@hono/node-server/dist/listener.d.mts +0 -13
  551. package/node_modules/@hono/node-server/dist/listener.d.ts +0 -13
  552. package/node_modules/@hono/node-server/dist/listener.js +0 -670
  553. package/node_modules/@hono/node-server/dist/listener.mjs +0 -635
  554. package/node_modules/@hono/node-server/dist/request.d.mts +0 -25
  555. package/node_modules/@hono/node-server/dist/request.d.ts +0 -25
  556. package/node_modules/@hono/node-server/dist/request.js +0 -238
  557. package/node_modules/@hono/node-server/dist/request.mjs +0 -206
  558. package/node_modules/@hono/node-server/dist/response.d.mts +0 -26
  559. package/node_modules/@hono/node-server/dist/response.d.ts +0 -26
  560. package/node_modules/@hono/node-server/dist/response.js +0 -112
  561. package/node_modules/@hono/node-server/dist/response.mjs +0 -85
  562. package/node_modules/@hono/node-server/dist/serve-static.d.ts +0 -17
  563. package/node_modules/@hono/node-server/dist/serve-static.js +0 -177
  564. package/node_modules/@hono/node-server/dist/server.d.mts +0 -10
  565. package/node_modules/@hono/node-server/dist/server.d.ts +0 -10
  566. package/node_modules/@hono/node-server/dist/server.js +0 -696
  567. package/node_modules/@hono/node-server/dist/server.mjs +0 -660
  568. package/node_modules/@hono/node-server/dist/types.d.mts +0 -44
  569. package/node_modules/@hono/node-server/dist/types.d.ts +0 -44
  570. package/node_modules/@hono/node-server/dist/types.js +0 -18
  571. package/node_modules/@hono/node-server/dist/types.mjs +0 -0
  572. package/node_modules/@hono/node-server/dist/utils/response/constants.d.mts +0 -3
  573. package/node_modules/@hono/node-server/dist/utils/response/constants.d.ts +0 -3
  574. package/node_modules/@hono/node-server/dist/utils/response/constants.js +0 -30
  575. package/node_modules/@hono/node-server/dist/utils/response/constants.mjs +0 -5
  576. package/node_modules/@hono/node-server/dist/utils/response.d.ts +0 -3
  577. package/node_modules/@hono/node-server/dist/utils/response.js +0 -37
  578. package/node_modules/@hono/node-server/dist/utils.d.mts +0 -9
  579. package/node_modules/@hono/node-server/dist/utils.d.ts +0 -9
  580. package/node_modules/@hono/node-server/dist/utils.js +0 -99
  581. package/node_modules/@hono/node-server/dist/utils.mjs +0 -71
  582. package/node_modules/@hono/node-server/dist/vercel.d.mts +0 -7
  583. package/node_modules/@hono/node-server/dist/vercel.d.ts +0 -7
  584. package/node_modules/@hono/node-server/dist/vercel.js +0 -677
  585. package/node_modules/@hono/node-server/dist/vercel.mjs +0 -640
  586. package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
  587. package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
  588. package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
  589. package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
  590. package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -31
  591. package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
  592. package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
  593. package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
  594. package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
  595. package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
  596. package/node_modules/process-warning/types/index.test-d.ts +0 -36
@@ -119,6 +119,20 @@ export function normalizeObjectSchema(schema) {
119
119
  }
120
120
  return undefined;
121
121
  }
122
+ function getDotPath(path) {
123
+ if (path.length === 0) {
124
+ return 'object root';
125
+ }
126
+ return path.reduce((acc, seg, index) => {
127
+ if (index === 0) {
128
+ return String(seg);
129
+ }
130
+ if (typeof seg === 'number') {
131
+ return `${acc}[${seg}]`;
132
+ }
133
+ return `${acc}.${seg}`;
134
+ }, '');
135
+ }
122
136
  // --- Error message extraction ---
123
137
  /**
124
138
  * Safely extracts an error message from a parse result error.
@@ -126,16 +140,21 @@ export function normalizeObjectSchema(schema) {
126
140
  */
127
141
  export function getParseErrorMessage(error) {
128
142
  if (error && typeof error === 'object') {
143
+ // When present, prioritize zod issues and format as a message and path
144
+ if ('issues' in error && Array.isArray(error.issues) && error.issues.length > 0) {
145
+ return error.issues
146
+ .map((i) => {
147
+ if (!i.path?.length) {
148
+ return i.message;
149
+ }
150
+ return `${i.message} at ${getDotPath(i.path)}`;
151
+ })
152
+ .join('\n');
153
+ }
129
154
  // Try common error structures
130
155
  if ('message' in error && typeof error.message === 'string') {
131
156
  return error.message;
132
157
  }
133
- if ('issues' in error && Array.isArray(error.issues) && error.issues.length > 0) {
134
- const firstIssue = error.issues[0];
135
- if (firstIssue && typeof firstIssue === 'object' && 'message' in firstIssue) {
136
- return String(firstIssue.message);
137
- }
138
- }
139
158
  // Fallback: try to stringify the error
140
159
  try {
141
160
  return JSON.stringify(error);
@@ -1 +1 @@
1
- {"version":3,"file":"zod-compat.js","sourceRoot":"","sources":["../../../src/server/zod-compat.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,uDAAuD;AACvD,yDAAyD;AACzD,uDAAuD;AAKvD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AA8Ct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Q,GAAG,MAAkC,CAAC;QACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;QAC/B,IAAI,GAAG,EAAE,CAAC;YACN,4CAA4C;YAC5C,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAC,KAAK,CAAC;YAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrD,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,CAAC;QACL,CAAC;IACL,CAAC;IACD,MAAM,QAAQ,GAAG,MAAkC,CAAC;IACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC1B,IAAI,GAAG,EAAE,CAAC;QACN,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC,KAAK,CAAC;QAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrD,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;IACL,CAAC;IACD,gEAAgE;IAChE,MAAM,WAAW,GAAI,MAA8B,CAAC,KAAK,CAAC;IAC1D,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAClD,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Extracts the media type (the lowercased `type/subtype` pair, without
3
+ * parameters) from a raw `Content-Type` header value, or `undefined` when the
4
+ * header is missing or empty.
5
+ *
6
+ * Content-Type comparisons must use the parsed media type, never a substring
7
+ * search of the raw header: a value like `text/plain; a=application/json`
8
+ * contains the substring `application/json` but its media type is
9
+ * `text/plain`, and case variants or parameters make naive string comparison
10
+ * wrong in both directions.
11
+ *
12
+ * "Essence" is the WHATWG MIME Sniffing standard's term for the bare
13
+ * `type/subtype` pair (https://mimesniff.spec.whatwg.org/#mime-type-essence);
14
+ * the Fetch standard's request classification is defined against it
15
+ * (https://fetch.spec.whatwg.org/#cors-safelisted-request-header).
16
+ *
17
+ * Parsing is RFC 9110 (`content-type` package) first. When the parameter
18
+ * section is malformed (`application/json;`, `application/json; charset=`),
19
+ * browsers and most HTTP stacks still derive the media type from the segment
20
+ * before the first `;` — the fallback matches that widely-implemented
21
+ * behavior, so a header whose media type is unambiguous is not rejected for
22
+ * a sloppy parameter section.
23
+ */
24
+ export declare function mediaTypeEssence(header: string | null | undefined): string | undefined;
25
+ /**
26
+ * Whether a raw `Content-Type` header value denotes `application/json`.
27
+ * Parameters (for example `charset=utf-8`) are allowed and ignored; malformed
28
+ * parameter sections do not reject a header whose media type is unambiguously
29
+ * `application/json` (see `mediaTypeEssence` for the exact grammar).
30
+ */
31
+ export declare function isJsonContentType(header: string | null | undefined): boolean;
32
+ //# sourceMappingURL=mediaType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaType.d.ts","sourceRoot":"","sources":["../../../src/shared/mediaType.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAM5E"}
@@ -0,0 +1,57 @@
1
+ import contentType from 'content-type';
2
+ /**
3
+ * Extracts the media type (the lowercased `type/subtype` pair, without
4
+ * parameters) from a raw `Content-Type` header value, or `undefined` when the
5
+ * header is missing or empty.
6
+ *
7
+ * Content-Type comparisons must use the parsed media type, never a substring
8
+ * search of the raw header: a value like `text/plain; a=application/json`
9
+ * contains the substring `application/json` but its media type is
10
+ * `text/plain`, and case variants or parameters make naive string comparison
11
+ * wrong in both directions.
12
+ *
13
+ * "Essence" is the WHATWG MIME Sniffing standard's term for the bare
14
+ * `type/subtype` pair (https://mimesniff.spec.whatwg.org/#mime-type-essence);
15
+ * the Fetch standard's request classification is defined against it
16
+ * (https://fetch.spec.whatwg.org/#cors-safelisted-request-header).
17
+ *
18
+ * Parsing is RFC 9110 (`content-type` package) first. When the parameter
19
+ * section is malformed (`application/json;`, `application/json; charset=`),
20
+ * browsers and most HTTP stacks still derive the media type from the segment
21
+ * before the first `;` — the fallback matches that widely-implemented
22
+ * behavior, so a header whose media type is unambiguous is not rejected for
23
+ * a sloppy parameter section.
24
+ */
25
+ export function mediaTypeEssence(header) {
26
+ if (!header) {
27
+ return undefined;
28
+ }
29
+ try {
30
+ return contentType.parse(header).type;
31
+ }
32
+ catch {
33
+ const essence = (header.split(';', 1)[0] ?? '').trim().toLowerCase();
34
+ // A comma in the parameter tail of an unparseable value indicates
35
+ // joined duplicate headers — ambiguous, so no essence at all (keeps
36
+ // duplicate-header handling uniform whether or not the first copy
37
+ // carries parameters).
38
+ if (essence === '' || header.slice(essence.length).includes(',')) {
39
+ return undefined;
40
+ }
41
+ return essence;
42
+ }
43
+ }
44
+ /**
45
+ * Whether a raw `Content-Type` header value denotes `application/json`.
46
+ * Parameters (for example `charset=utf-8`) are allowed and ignored; malformed
47
+ * parameter sections do not reject a header whose media type is unambiguously
48
+ * `application/json` (see `mediaTypeEssence` for the exact grammar).
49
+ */
50
+ export function isJsonContentType(header) {
51
+ // Fast path: the exact literal is what SDK clients send on every POST.
52
+ if (header === 'application/json') {
53
+ return true;
54
+ }
55
+ return mediaTypeEssence(header) === 'application/json';
56
+ }
57
+ //# sourceMappingURL=mediaType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaType.js","sourceRoot":"","sources":["../../../src/shared/mediaType.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAiC;IAC9D,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,CAAC;QACD,OAAO,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACrE,kEAAkE;QAClE,oEAAoE;QACpE,kEAAkE;QAClE,uBAAuB;QACvB,IAAI,OAAO,KAAK,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/D,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAiC;IAC/D,uEAAuE;IACvE,IAAI,MAAM,KAAK,kBAAkB,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,gBAAgB,CAAC,MAAM,CAAC,KAAK,kBAAkB,CAAC;AAC3D,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import { JSONRPCMessage } from '../types.js';
2
+ export declare const STDIO_DEFAULT_MAX_BUFFER_SIZE: number;
2
3
  /**
3
4
  * Buffers a continuous stdio stream into discrete JSON-RPC messages.
4
5
  */
5
6
  export declare class ReadBuffer {
6
7
  private _buffer?;
8
+ private _maxBufferSize;
9
+ constructor(options?: {
10
+ maxBufferSize?: number;
11
+ });
7
12
  append(chunk: Buffer): void;
8
13
  readMessage(): JSONRPCMessage | null;
9
14
  clear(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../../src/shared/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAEnE;;GAEG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI3B,WAAW,IAAI,cAAc,GAAG,IAAI;IAepC,KAAK,IAAI,IAAI;CAGhB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAE/D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAEhE"}
1
+ {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../../src/shared/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAEnE,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D;;GAEG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,cAAc,CAAS;gBAEnB,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE;IAIhD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAS3B,WAAW,IAAI,cAAc,GAAG,IAAI;IAepC,KAAK,IAAI,IAAI;CAGhB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAE/D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAEhE"}
@@ -1,9 +1,18 @@
1
1
  import { JSONRPCMessageSchema } from '../types.js';
2
+ export const STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
2
3
  /**
3
4
  * Buffers a continuous stdio stream into discrete JSON-RPC messages.
4
5
  */
5
6
  export class ReadBuffer {
7
+ constructor(options) {
8
+ this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
9
+ }
6
10
  append(chunk) {
11
+ const newSize = (this._buffer?.length ?? 0) + chunk.length;
12
+ if (newSize > this._maxBufferSize) {
13
+ this.clear();
14
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
15
+ }
7
16
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
8
17
  }
9
18
  readMessage() {
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../../src/shared/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAO,UAAU;IAGnB,MAAM,CAAC,KAAa;QAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC/E,CAAC;IAED,WAAW;QACP,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAChD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC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AO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAChD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,KAAK;QACD,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC7B,CAAC;CACJ;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,OAAO,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AAC1C,CAAC"}
@@ -1,18 +1,18 @@
1
1
  # media-typer
2
2
 
3
- [![NPM Version][npm-version-image]][npm-url]
4
- [![NPM Downloads][npm-downloads-image]][npm-url]
3
+ [![NPM Version][npm-image]][npm-url]
4
+ [![NPM Downloads][downloads-image]][downloads-url]
5
5
  [![Node.js Version][node-version-image]][node-version-url]
6
- [![Build Status][travis-image]][travis-url]
6
+ [![Build Status][ci-image]][ci-url]
7
7
  [![Test Coverage][coveralls-image]][coveralls-url]
8
8
 
9
9
  Simple RFC 6838 media type parser.
10
10
 
11
- This module will parse a given media type into it's component parts, like type,
11
+ This module will parse a given media type into its component parts, like type,
12
12
  subtype, and suffix. A formatter is also provided to put them back together and
13
13
  the two can be combined to normalize media types into a canonical form.
14
14
 
15
- If you are looking to parse the string that represents a media type and it's
15
+ If you are looking to parse the string that represents a media type and its
16
16
  parameters in HTTP (for example, the `Content-Type` header), use the
17
17
  [content-type module](https://www.npmjs.com/package/content-type).
18
18
 
@@ -75,19 +75,20 @@ If any of the given object values are invalid, then a `TypeError` is thrown.
75
75
  var valid = typer.test('image/svg+xml')
76
76
  ```
77
77
 
78
- Validate a media type string. This will return `true` is the string is a well-
78
+ Validate a media type string. This will return `true` if the string is a well-
79
79
  formatted media type, or `false` otherwise.
80
80
 
81
81
  ## License
82
82
 
83
83
  [MIT](LICENSE)
84
84
 
85
- [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/media-typer/master
86
- [coveralls-url]: https://coveralls.io/r/jshttp/media-typer?branch=master
87
- [node-version-image]: https://badgen.net/npm/node/media-typer
88
- [node-version-url]: https://nodejs.org/en/download
89
- [npm-downloads-image]: https://badgen.net/npm/dm/media-typer
85
+ [ci-image]: https://img.shields.io/github/workflow/status/jshttp/media-typer/ci/master?label=ci
86
+ [ci-url]: https://github.com/jshttp/media-typer/actions/workflows/ci.yml
87
+ [npm-image]: https://img.shields.io/npm/v/media-typer.svg
90
88
  [npm-url]: https://npmjs.org/package/media-typer
91
- [npm-version-image]: https://badgen.net/npm/v/media-typer
92
- [travis-image]: https://badgen.net/travis/jshttp/media-typer/master
93
- [travis-url]: https://travis-ci.org/jshttp/media-typer
89
+ [node-version-image]: https://img.shields.io/node/v/media-typer.svg
90
+ [node-version-url]: https://nodejs.org/en/
91
+ [coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer/master.svg
92
+ [coveralls-url]: https://coveralls.io/r/jshttp/media-typer?branch=master
93
+ [downloads-image]: https://img.shields.io/npm/dm/media-typer.svg
94
+ [downloads-url]: https://npmjs.org/package/media-typer
@@ -83,10 +83,6 @@ function format (obj) {
83
83
  */
84
84
 
85
85
  function test (string) {
86
- if (!string) {
87
- throw new TypeError('argument string is required')
88
- }
89
-
90
86
  if (typeof string !== 'string') {
91
87
  throw new TypeError('argument string is required to be a string')
92
88
  }
@@ -103,10 +99,6 @@ function test (string) {
103
99
  */
104
100
 
105
101
  function parse (string) {
106
- if (!string) {
107
- throw new TypeError('argument string is required')
108
- }
109
-
110
102
  if (typeof string !== 'string') {
111
103
  throw new TypeError('argument string is required to be a string')
112
104
  }
@@ -1,20 +1,24 @@
1
1
  {
2
2
  "name": "media-typer",
3
3
  "description": "Simple RFC 6838 media type parser and formatter",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
6
  "license": "MIT",
7
7
  "repository": "jshttp/media-typer",
8
+ "funding": {
9
+ "type": "opencollective",
10
+ "url": "https://opencollective.com/express"
11
+ },
8
12
  "devDependencies": {
9
- "eslint": "5.16.0",
10
- "eslint-config-standard": "12.0.0",
11
- "eslint-plugin-import": "2.17.2",
12
- "eslint-plugin-markdown": "1.0.0",
13
- "eslint-plugin-node": "8.0.1",
14
- "eslint-plugin-promise": "4.1.1",
15
- "eslint-plugin-standard": "4.0.0",
16
- "mocha": "6.1.4",
17
- "nyc": "14.0.0"
13
+ "eslint": "7.23.0",
14
+ "eslint-config-standard": "14.1.1",
15
+ "eslint-plugin-import": "2.22.1",
16
+ "eslint-plugin-markdown": "1.0.2",
17
+ "eslint-plugin-node": "11.1.0",
18
+ "eslint-plugin-promise": "4.3.1",
19
+ "eslint-plugin-standard": "4.1.0",
20
+ "mocha": "9.2.0",
21
+ "nyc": "15.1.0"
18
22
  },
19
23
  "files": [
20
24
  "LICENSE",
@@ -27,7 +31,7 @@
27
31
  "scripts": {
28
32
  "lint": "eslint --plugin markdown --ext js,md .",
29
33
  "test": "mocha --reporter spec --check-leaks --bail test/",
30
- "test-cov": "nyc --reporter=html --reporter=text npm test",
31
- "test-travis": "nyc --reporter=text npm test"
34
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
35
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
32
36
  }
33
37
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/sdk",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "Model Context Protocol implementation for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
@@ -88,7 +88,8 @@
88
88
  "lint": "eslint src/ && prettier --check .",
89
89
  "lint:fix": "eslint src/ --fix && prettier --write .",
90
90
  "check": "npm run typecheck && npm run lint",
91
- "test": "vitest run",
91
+ "test": "vitest run --exclude \"test/e2e/**\"",
92
+ "test:e2e": "vitest run test/e2e",
92
93
  "test:watch": "vitest",
93
94
  "start": "npm run server",
94
95
  "server": "tsx watch --clear-screen=false scripts/cli.ts server",
@@ -100,7 +101,7 @@
100
101
  "test:conformance:client:all": "npx @modelcontextprotocol/conformance client --command 'npx tsx test/conformance/src/everythingClient.ts' --suite all --expected-failures test/conformance/conformance-baseline.yml"
101
102
  },
102
103
  "dependencies": {
103
- "@hono/node-server": "^1.19.9",
104
+ "@hono/node-server": "^1.19.9 || ^2.0.5",
104
105
  "ajv": "^8.17.1",
105
106
  "ajv-formats": "^3.0.1",
106
107
  "content-type": "^1.0.5",
@@ -44,10 +44,15 @@ module.exports = __toCommonJS(index_exports);
44
44
  // source/ip-key-generator.ts
45
45
  var import_node_net = require("node:net");
46
46
  var import_ip_address = require("ip-address");
47
+ var ipv4CompatibleSubnet = new import_ip_address.Address6("::/96");
47
48
  function ipKeyGenerator(ip, ipv6Subnet = 56) {
48
49
  if ((0, import_node_net.isIPv6)(ip)) {
49
50
  const address = new import_ip_address.Address6(ip);
50
- if (address.is4()) return address.to4().correctForm();
51
+ if (address.isMapped4() || // The deprecated IPv4-compatible notation keeps its existing behavior.
52
+ // Its range is shared with addresses that embed no IPv4 address at all
53
+ // (`::`, `::1`), so here the notation is what tells them apart.
54
+ address.is4() && address.isInSubnet(ipv4CompatibleSubnet))
55
+ return address.to4().correctForm();
51
56
  if (ipv6Subnet) {
52
57
  const subnet = new import_ip_address.Address6(`${ip}/${ipv6Subnet}`);
53
58
  return subnet.networkForm();
@@ -665,22 +665,20 @@ export declare class MemoryStore implements Store {
665
665
  */
666
666
  export declare const rateLimit: (passedOptions?: Partial<Options>) => RateLimitRequestHandler;
667
667
  /**
668
- * Time constants in milliseconds
669
- *
670
- * Use these with rate limit window calculations:
671
- * @example
672
- * // 5 minute window
673
- * windowMs: 5 * MINUTE
674
- *
675
- * // 2 hour window
676
- * windowMs: 2 * HOUR
677
- *
678
- * // 1 day window
679
- * windowMs: 1 * DAY
668
+ * @deprecated these are being replaced in the next major version
680
669
  */
681
670
  export declare const SECOND: number;
671
+ /**
672
+ * @deprecated these are being replaced in the next major version
673
+ */
682
674
  export declare const MINUTE: number;
675
+ /**
676
+ * @deprecated these are being replaced in the next major version
677
+ */
683
678
  export declare const HOUR: number;
679
+ /**
680
+ * @deprecated these are being replaced in the next major version
681
+ */
684
682
  export declare const DAY: number;
685
683
 
686
684
  export {
@@ -665,22 +665,20 @@ export declare class MemoryStore implements Store {
665
665
  */
666
666
  export declare const rateLimit: (passedOptions?: Partial<Options>) => RateLimitRequestHandler;
667
667
  /**
668
- * Time constants in milliseconds
669
- *
670
- * Use these with rate limit window calculations:
671
- * @example
672
- * // 5 minute window
673
- * windowMs: 5 * MINUTE
674
- *
675
- * // 2 hour window
676
- * windowMs: 2 * HOUR
677
- *
678
- * // 1 day window
679
- * windowMs: 1 * DAY
668
+ * @deprecated these are being replaced in the next major version
680
669
  */
681
670
  export declare const SECOND: number;
671
+ /**
672
+ * @deprecated these are being replaced in the next major version
673
+ */
682
674
  export declare const MINUTE: number;
675
+ /**
676
+ * @deprecated these are being replaced in the next major version
677
+ */
683
678
  export declare const HOUR: number;
679
+ /**
680
+ * @deprecated these are being replaced in the next major version
681
+ */
684
682
  export declare const DAY: number;
685
683
 
686
684
  export {
@@ -665,22 +665,20 @@ export declare class MemoryStore implements Store {
665
665
  */
666
666
  export declare const rateLimit: (passedOptions?: Partial<Options>) => RateLimitRequestHandler;
667
667
  /**
668
- * Time constants in milliseconds
669
- *
670
- * Use these with rate limit window calculations:
671
- * @example
672
- * // 5 minute window
673
- * windowMs: 5 * MINUTE
674
- *
675
- * // 2 hour window
676
- * windowMs: 2 * HOUR
677
- *
678
- * // 1 day window
679
- * windowMs: 1 * DAY
668
+ * @deprecated these are being replaced in the next major version
680
669
  */
681
670
  export declare const SECOND: number;
671
+ /**
672
+ * @deprecated these are being replaced in the next major version
673
+ */
682
674
  export declare const MINUTE: number;
675
+ /**
676
+ * @deprecated these are being replaced in the next major version
677
+ */
683
678
  export declare const HOUR: number;
679
+ /**
680
+ * @deprecated these are being replaced in the next major version
681
+ */
684
682
  export declare const DAY: number;
685
683
 
686
684
  export {
@@ -1,10 +1,15 @@
1
1
  // source/ip-key-generator.ts
2
2
  import { isIPv6 } from "node:net";
3
3
  import { Address6 } from "ip-address";
4
+ var ipv4CompatibleSubnet = new Address6("::/96");
4
5
  function ipKeyGenerator(ip, ipv6Subnet = 56) {
5
6
  if (isIPv6(ip)) {
6
7
  const address = new Address6(ip);
7
- if (address.is4()) return address.to4().correctForm();
8
+ if (address.isMapped4() || // The deprecated IPv4-compatible notation keeps its existing behavior.
9
+ // Its range is shared with addresses that embed no IPv4 address at all
10
+ // (`::`, `::1`), so here the notation is what tells them apart.
11
+ address.is4() && address.isInSubnet(ipv4CompatibleSubnet))
12
+ return address.to4().correctForm();
8
13
  if (ipv6Subnet) {
9
14
  const subnet = new Address6(`${ip}/${ipv6Subnet}`);
10
15
  return subnet.networkForm();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-rate-limit",
3
- "version": "8.6.0",
3
+ "version": "8.6.2",
4
4
  "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
5
5
  "author": {
6
6
  "name": "Nathan Friedly",
@@ -82,7 +82,7 @@
82
82
  "express": ">= 4.11"
83
83
  },
84
84
  "devDependencies": {
85
- "@asyncapi/specs": "6.8.1",
85
+ "@asyncapi/specs": "6.11.1",
86
86
  "@biomejs/biome": "2.4.6",
87
87
  "@express-rate-limit/prettier": "1.1.1",
88
88
  "@express-rate-limit/tsconfig": "1.0.5",
@@ -90,21 +90,21 @@
90
90
  "@types/debug": "4.1.13",
91
91
  "@types/express": "5.0.6",
92
92
  "@types/jest": "30.0.0",
93
- "@types/node": "26.1.1",
94
- "@types/supertest": "7.2.0",
93
+ "@types/node": "26.1.2",
94
+ "@types/supertest": "7.2.1",
95
95
  "del-cli": "7.0.0",
96
96
  "dts-bundle-generator": "8.1.2",
97
97
  "esbuild": "0.28.1",
98
98
  "express": "5.2.1",
99
99
  "husky": "9.1.7",
100
100
  "jest": "30.4.2",
101
- "lint-staged": "17.0.8",
102
- "mintlify": "4.2.688",
101
+ "lint-staged": "17.2.0",
102
+ "mintlify": "4.2.743",
103
103
  "npm-run-all": "4.1.5",
104
- "prettier": "3.9.5",
104
+ "prettier": "3.9.6",
105
105
  "ratelimit-header-parser": "0.1.0",
106
106
  "supertest": "7.2.2",
107
- "ts-jest": "29.4.11",
107
+ "ts-jest": "29.4.12",
108
108
  "ts-node": "10.9.2",
109
109
  "typescript": "5.9.3"
110
110
  },
@@ -21,10 +21,10 @@ The [full documentation](https://express-rate-limit.mintlify.app/overview) is
21
21
  available on-line.
22
22
 
23
23
  ```ts
24
- import { rateLimit, MINUTE } from 'express-rate-limit'
24
+ import { rateLimit } from 'express-rate-limit'
25
25
 
26
26
  const limiter = rateLimit({
27
- windowMs: 15 * MINUTE, // SECOND, MINUTE, HOUR, and DAY constants are available, or a use bare number for milliseconds
27
+ windowMs: 15 * 60 * 1000, // 15 minutes
28
28
  limit: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes).
29
29
  standardHeaders: 'draft-8', // draft-6: `RateLimit-*` headers; draft-7 & draft-8: combined `RateLimit` header
30
30
  legacyHeaders: false, // Disable the `X-RateLimit-*` headers.