maka-agent 0.2.1-dev.91.20261018 → 0.2.2-dev.97.20261024

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 (418) hide show
  1. package/DISCLAIMER-WIP +1 -1
  2. package/LICENSE +15 -11
  3. package/README.md +173 -1
  4. package/README.zh-CN.md +156 -0
  5. package/THIRD_PARTY_NOTICES.txt +12 -12
  6. package/dist/cli-core.js +1 -0
  7. package/dist/pi-goal.js +13 -0
  8. package/dist/pi-tui-runner.js +44 -1
  9. package/dist/run-command-core.js +256 -48
  10. package/dist/run-session-command.js +534 -0
  11. package/dist/run-session-result.js +38 -0
  12. package/dist/run-turn-outcome.js +174 -0
  13. package/dist/runtime-host-cli.js +32 -17
  14. package/dist/runtime-host-run-command.js +53 -165
  15. package/dist/runtime-host-run-mcp.js +3 -0
  16. package/dist/runtime-host-session-channel.js +3 -1
  17. package/dist/runtime-host-session-driver.js +5 -0
  18. package/dist/runtime-host-setup-command.js +114 -7
  19. package/dist/tui-copy-catalog.js +24 -0
  20. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  21. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Client.md +2 -0
  22. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/connect.js +10 -4
  23. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/symbols.js +1 -0
  24. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/agent.js +6 -2
  25. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  26. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  27. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client.js +3 -2
  28. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  29. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/cache-handler.js +48 -0
  30. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  31. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  32. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/decompress.js +15 -5
  33. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/index.js +3 -1
  34. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/parse.js +138 -137
  35. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/util.js +21 -2
  36. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
  37. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  38. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/fetch/index.js +3 -3
  39. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/infra/index.js +14 -0
  40. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  41. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  42. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/package.json +1 -1
  43. package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog-store.js +87 -0
  44. package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog.js +98 -21
  45. package/node_modules/@maka/acp-executor-plugin/dist/index.js +90 -14
  46. package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +3997 -56
  47. package/node_modules/@maka/core/dist/assistant-turn-ids.js +34 -0
  48. package/node_modules/@maka/core/dist/bot-chat-settings.js +10 -1
  49. package/node_modules/@maka/core/dist/event-wait-delivery.js +67 -0
  50. package/node_modules/@maka/core/dist/event-wait.js +75 -10
  51. package/node_modules/@maka/core/dist/executor-catalog.js +3 -1
  52. package/node_modules/@maka/core/dist/goal.js +54 -2
  53. package/node_modules/@maka/core/dist/model-catalog.js +19 -1
  54. package/node_modules/@maka/core/dist/model-metadata.generated.js +4 -14
  55. package/node_modules/@maka/core/dist/model-metadata.js +42 -1
  56. package/node_modules/@maka/core/dist/models-dev-projection.js +32 -1
  57. package/node_modules/@maka/core/dist/provider-registry.js +16 -2
  58. package/node_modules/@maka/core/dist/runtime-event-store.js +0 -1
  59. package/node_modules/@maka/core/dist/runtime-event.js +24 -2
  60. package/node_modules/@maka/core/dist/runtime-invocation.js +10 -0
  61. package/node_modules/@maka/core/dist/session-checkin.js +31 -0
  62. package/node_modules/@maka/core/dist/tool-ledger-scanner.js +1 -9
  63. package/node_modules/@maka/core/dist/tool-recovery-bundle.js +1 -14
  64. package/node_modules/@maka/core/dist/turn-origin.js +14 -2
  65. package/node_modules/@maka/core/dist/usage-stats/types.js +1 -0
  66. package/node_modules/@maka/core/package.json +3 -0
  67. package/node_modules/@maka/eval/node_modules/undici/README.md +25 -3
  68. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  69. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +11 -6
  70. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  71. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Errors.md +76 -1
  72. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  73. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
  74. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  75. package/node_modules/@maka/eval/node_modules/undici/docs/docs/index.md +12 -12
  76. package/node_modules/@maka/eval/node_modules/undici/docs/docs/type-map.json +66 -66
  77. package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  78. package/node_modules/@maka/eval/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  79. package/node_modules/@maka/eval/node_modules/undici/lib/core/connect.js +10 -4
  80. package/node_modules/@maka/eval/node_modules/undici/lib/core/constants.js +12 -1
  81. package/node_modules/@maka/eval/node_modules/undici/lib/core/errors.js +38 -1
  82. package/node_modules/@maka/eval/node_modules/undici/lib/core/request.js +16 -1
  83. package/node_modules/@maka/eval/node_modules/undici/lib/core/symbols.js +2 -0
  84. package/node_modules/@maka/eval/node_modules/undici/lib/core/util.js +26 -1
  85. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +6 -2
  86. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  87. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
  88. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +4 -1
  89. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  90. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  91. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  92. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
  93. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool.js +11 -8
  94. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  95. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  96. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  97. package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +153 -15
  98. package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  99. package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  100. package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +44 -11
  101. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/cache.js +11 -3
  102. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/decompress.js +22 -9
  103. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dns.js +11 -0
  104. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/response-error.js +72 -28
  105. package/node_modules/@maka/eval/node_modules/undici/lib/milo/LICENSE.md +7 -0
  106. package/node_modules/@maka/eval/node_modules/undici/lib/milo/no-simd.js +1002 -0
  107. package/node_modules/@maka/eval/node_modules/undici/lib/milo/simd.js +1002 -0
  108. package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +11 -0
  109. package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  110. package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  111. package/node_modules/@maka/eval/node_modules/undici/lib/util/cache.js +11 -5
  112. package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/util.js +19 -2
  113. package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  114. package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  115. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/body.js +47 -38
  116. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  117. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/headers.js +2 -2
  118. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/index.js +8 -4
  119. package/node_modules/@maka/eval/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  120. package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  121. package/node_modules/@maka/eval/node_modules/undici/package.json +9 -7
  122. package/node_modules/@maka/mcp/package.json +1 -1
  123. package/node_modules/@maka/runtime/dist/agent-run.js +5 -1
  124. package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
  125. package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +29 -15
  126. package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +10 -1
  127. package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +125 -131
  128. package/node_modules/@maka/runtime/dist/bots/bot-registry.js +19 -3
  129. package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +178 -6
  130. package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +163 -9
  131. package/node_modules/@maka/runtime/dist/context-budget-policy.js +9 -2
  132. package/node_modules/@maka/runtime/dist/event-wait-tool.js +69 -0
  133. package/node_modules/@maka/runtime/dist/goal-continuation.js +195 -117
  134. package/node_modules/@maka/runtime/dist/goal-state.js +8 -0
  135. package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +34 -4
  136. package/node_modules/@maka/runtime/dist/history-compaction.js +7 -0
  137. package/node_modules/@maka/runtime/dist/memory-extraction.js +0 -2
  138. package/node_modules/@maka/runtime/dist/model-factory.js +26 -6
  139. package/node_modules/@maka/runtime/dist/model-fetcher.js +8 -1
  140. package/node_modules/@maka/runtime/dist/model-history.js +16 -3
  141. package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +15 -5
  142. package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
  143. package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +49 -2
  144. package/node_modules/@maka/runtime/dist/plugin-executor-service.js +12 -3
  145. package/node_modules/@maka/runtime/dist/provider-error-classification.js +2 -0
  146. package/node_modules/@maka/runtime/dist/recovery-resolver.js +2 -1
  147. package/node_modules/@maka/runtime/dist/runtime-context.js +53 -0
  148. package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +3 -0
  149. package/node_modules/@maka/runtime/dist/sandbox-boundary-path.js +79 -2
  150. package/node_modules/@maka/runtime/dist/session-checkin.js +331 -0
  151. package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +7 -0
  152. package/node_modules/@maka/runtime/dist/session-manager.js +5 -1
  153. package/node_modules/@maka/runtime/dist/shell-run-manager.js +34 -0
  154. package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -3
  155. package/node_modules/@maka/runtime/dist/telemetry/builtin-pricing.js +21 -2
  156. package/node_modules/@maka/runtime/dist/tool-runtime.js +11 -2
  157. package/node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs +50 -1
  158. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/Client.md +2 -0
  159. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/connect.js +10 -4
  160. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/symbols.js +1 -0
  161. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/agent.js +6 -2
  162. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  163. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  164. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client.js +3 -2
  165. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  166. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/cache-handler.js +48 -0
  167. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  168. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  169. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/decompress.js +15 -5
  170. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/index.js +3 -1
  171. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/parse.js +138 -137
  172. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/util.js +21 -2
  173. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
  174. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  175. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/fetch/index.js +3 -3
  176. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/infra/index.js +14 -0
  177. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  178. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  179. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/package.json +1 -1
  180. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +1 -1
  181. package/node_modules/@maka/runtime/node_modules/undici/README.md +25 -3
  182. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  183. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +11 -6
  184. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  185. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Errors.md +76 -1
  186. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  187. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
  188. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  189. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/index.md +12 -12
  190. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/type-map.json +66 -66
  191. package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  192. package/node_modules/@maka/runtime/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  193. package/node_modules/@maka/runtime/node_modules/undici/lib/core/connect.js +10 -4
  194. package/node_modules/@maka/runtime/node_modules/undici/lib/core/constants.js +12 -1
  195. package/node_modules/@maka/runtime/node_modules/undici/lib/core/errors.js +38 -1
  196. package/node_modules/@maka/runtime/node_modules/undici/lib/core/request.js +16 -1
  197. package/node_modules/@maka/runtime/node_modules/undici/lib/core/symbols.js +2 -0
  198. package/node_modules/@maka/runtime/node_modules/undici/lib/core/util.js +26 -1
  199. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +6 -2
  200. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  201. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
  202. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +4 -1
  203. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  204. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  205. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  206. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
  207. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool.js +11 -8
  208. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  209. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  210. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  211. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +153 -15
  212. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  213. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  214. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +44 -11
  215. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/cache.js +11 -3
  216. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/decompress.js +22 -9
  217. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dns.js +11 -0
  218. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/response-error.js +72 -28
  219. package/node_modules/@maka/runtime/node_modules/undici/lib/milo/LICENSE.md +7 -0
  220. package/node_modules/@maka/runtime/node_modules/undici/lib/milo/no-simd.js +1002 -0
  221. package/node_modules/@maka/runtime/node_modules/undici/lib/milo/simd.js +1002 -0
  222. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +11 -0
  223. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  224. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  225. package/node_modules/@maka/runtime/node_modules/undici/lib/util/cache.js +11 -5
  226. package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/util.js +19 -2
  227. package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  228. package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  229. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/body.js +47 -38
  230. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  231. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/headers.js +2 -2
  232. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/index.js +8 -4
  233. package/node_modules/@maka/runtime/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  234. package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  235. package/node_modules/@maka/runtime/node_modules/undici/package.json +9 -7
  236. package/node_modules/@maka/runtime/package.json +3 -0
  237. package/node_modules/@maka/runtime-host/dist/assistant/bot/bridge.js +8 -0
  238. package/node_modules/@maka/runtime-host/dist/assistant/bot/capabilities.js +1 -0
  239. package/node_modules/@maka/runtime-host/dist/assistant/bot/controller.js +92 -22
  240. package/node_modules/@maka/runtime-host/dist/assistant/bot/host.js +11 -2
  241. package/node_modules/@maka/runtime-host/dist/assistant/bot/store.js +71 -2
  242. package/node_modules/@maka/runtime-host/dist/assistant/bot/turn-ids.js +38 -0
  243. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/assistant.js +7 -0
  244. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/controller.js +193 -32
  245. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/discovery-capabilities.js +69 -0
  246. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/host.js +15 -28
  247. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/notebook.js +286 -0
  248. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/prompt.js +31 -6
  249. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/store.js +18 -1
  250. package/node_modules/@maka/runtime-host/dist/assistant/memory-network/controller.js +203 -71
  251. package/node_modules/@maka/runtime-host/dist/assistant/memory-network/host.js +21 -5
  252. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-observer.js +94 -0
  253. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-store.js +253 -0
  254. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition.js +133 -0
  255. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/controller.js +27 -14
  256. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delegation.js +37 -5
  257. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delivery.js +1 -1
  258. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/host.js +16 -2
  259. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/matter.js +13 -0
  260. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/prompt.js +7 -5
  261. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/review.js +68 -14
  262. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/settlement-context.js +126 -0
  263. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/store.js +92 -6
  264. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/tools.js +93 -23
  265. package/node_modules/@maka/runtime-host/dist/assistant/service.js +72 -16
  266. package/node_modules/@maka/runtime-host/dist/client/host-profile.js +30 -1
  267. package/node_modules/@maka/runtime-host/dist/client/ssh-operator-activation.js +9 -2
  268. package/node_modules/@maka/runtime-host/dist/protocol/goal.js +119 -1
  269. package/node_modules/@maka/runtime-host/dist/protocol/index.js +10 -3
  270. package/node_modules/@maka/runtime-host/dist/protocol/operations.js +8 -1
  271. package/node_modules/@maka/runtime-host/dist/protocol/personal-assistant.js +1 -0
  272. package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +7 -1
  273. package/node_modules/@maka/runtime-host/dist/protocol/session-checkin.js +133 -0
  274. package/node_modules/@maka/runtime-host/dist/server/agent-settings-tools.js +0 -1
  275. package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +3 -2
  276. package/node_modules/@maka/runtime-host/dist/server/event-wait-manager.js +151 -20
  277. package/node_modules/@maka/runtime-host/dist/server/event-wait-observation-store.js +19 -0
  278. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +127 -11
  279. package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +47 -3
  280. package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +11 -0
  281. package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +5 -2
  282. package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +343 -53
  283. package/node_modules/@maka/runtime-host/dist/server/goal-event-waits.js +457 -0
  284. package/node_modules/@maka/runtime-host/dist/server/goal-execution-coordinator.js +23 -6
  285. package/node_modules/@maka/runtime-host/dist/server/goal-projection.js +24 -3
  286. package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +5 -1
  287. package/node_modules/@maka/runtime-host/dist/server/index.js +2 -0
  288. package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +44 -2
  289. package/node_modules/@maka/runtime-host/dist/server/personal-assistant-workspace.js +78 -0
  290. package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +8 -0
  291. package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +73 -3
  292. package/node_modules/@maka/runtime-host/dist/server/session-checkin.js +257 -0
  293. package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-coordinator.js +282 -0
  294. package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-publication.js +250 -0
  295. package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-access.js +166 -0
  296. package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-adapter.js +59 -0
  297. package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +4 -2
  298. package/node_modules/@maka/storage/dist/agent-run-store-contract.js +14 -3
  299. package/node_modules/@maka/storage/dist/agent-run-store.js +10 -0
  300. package/node_modules/@maka/storage/dist/codex-session-adapter.js +20 -3
  301. package/node_modules/@maka/storage/dist/context-offload-snapshot.js +2 -1
  302. package/node_modules/@maka/storage/dist/event-wait-authority.js +18 -1
  303. package/node_modules/@maka/storage/dist/event-wait-bridge.js +336 -0
  304. package/node_modules/@maka/storage/dist/execution-stores.js +39 -1
  305. package/node_modules/@maka/storage/dist/external-session-images.js +131 -0
  306. package/node_modules/@maka/storage/dist/external-session-importer.js +12 -2
  307. package/node_modules/@maka/storage/dist/goal-authority.js +2 -0
  308. package/node_modules/@maka/storage/dist/local-execution-persistence.js +27 -1
  309. package/node_modules/@maka/storage/dist/operational-state-store.js +1 -1
  310. package/node_modules/@maka/storage/dist/production-session-snapshot.js +14 -6
  311. package/node_modules/@maka/storage/dist/runtime-event-persistence.js +1 -0
  312. package/node_modules/@maka/storage/dist/session-bundle-policy.js +116 -16
  313. package/node_modules/@maka/storage/dist/session-checkpoint-publication-store.js +204 -0
  314. package/node_modules/@maka/storage/dist/session-store.js +37 -8
  315. package/node_modules/@maka/storage/dist/snapshot-operation-gate.js +65 -0
  316. package/node_modules/@maka/storage/dist/sqlite-context-offload-schema.js +3 -3
  317. package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +4 -2
  318. package/node_modules/@maka/storage/dist/sqlite-event-wait-authority.js +81 -8
  319. package/node_modules/@maka/storage/dist/sqlite-event-wait-bridge.js +94 -0
  320. package/node_modules/@maka/storage/dist/sqlite-reclamation-checkpoint.js +37 -0
  321. package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +7 -8
  322. package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +38 -162
  323. package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +7 -4
  324. package/node_modules/@maka/storage/dist/tool-commit-validation.js +1 -1
  325. package/node_modules/@maka/storage/package.json +4 -0
  326. package/node_modules/@modelcontextprotocol/client/dist/index-B-4n9P0J.d.mts.map +1 -0
  327. package/node_modules/@modelcontextprotocol/client/dist/index-J2FaQ-KY.d.cts.map +1 -0
  328. package/node_modules/@modelcontextprotocol/client/dist/index.cjs +76 -22
  329. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -1
  330. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -1
  331. package/node_modules/@modelcontextprotocol/client/dist/index.mjs +76 -22
  332. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
  333. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
  334. package/node_modules/@modelcontextprotocol/client/dist/{src-oZBjf3U1.cjs → src-DpAS0jfg.cjs} +105 -8
  335. package/node_modules/@modelcontextprotocol/client/dist/{src-xKF0PJN-.mjs → src-WCy6ifGf.mjs} +88 -9
  336. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +1 -1
  337. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +1 -1
  338. package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/package.json +2 -2
  339. package/node_modules/@modelcontextprotocol/client/package.json +5 -5
  340. package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
  341. package/node_modules/fast-uri/README.md +8 -0
  342. package/node_modules/fast-uri/index.js +98 -18
  343. package/node_modules/fast-uri/lib/utils.js +52 -0
  344. package/node_modules/fast-uri/package.json +1 -1
  345. package/node_modules/follow-redirects/index.js +10 -1
  346. package/node_modules/follow-redirects/package.json +1 -1
  347. package/node_modules/ip-address/README.md +104 -104
  348. package/node_modules/ip-address/dist/ipv4.js +7 -0
  349. package/node_modules/ip-address/dist/ipv6.js +7 -4
  350. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  351. package/node_modules/ip-address/package.json +2 -1
  352. package/node_modules/undici/README.md +25 -3
  353. package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  354. package/node_modules/undici/docs/docs/api/Client.md +11 -6
  355. package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  356. package/node_modules/undici/docs/docs/api/Errors.md +76 -1
  357. package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  358. package/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
  359. package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  360. package/node_modules/undici/docs/docs/index.md +12 -12
  361. package/node_modules/undici/docs/docs/type-map.json +66 -66
  362. package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  363. package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  364. package/node_modules/undici/lib/core/connect.js +10 -4
  365. package/node_modules/undici/lib/core/constants.js +12 -1
  366. package/node_modules/undici/lib/core/errors.js +38 -1
  367. package/node_modules/undici/lib/core/request.js +16 -1
  368. package/node_modules/undici/lib/core/symbols.js +2 -0
  369. package/node_modules/undici/lib/core/util.js +26 -1
  370. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  371. package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  372. package/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
  373. package/node_modules/undici/lib/dispatcher/client.js +4 -1
  374. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  375. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  376. package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  377. package/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
  378. package/node_modules/undici/lib/dispatcher/pool.js +11 -8
  379. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  380. package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  381. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  382. package/node_modules/undici/lib/handler/cache-handler.js +153 -15
  383. package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  384. package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  385. package/node_modules/undici/lib/handler/retry-handler.js +44 -11
  386. package/node_modules/undici/lib/interceptor/cache.js +11 -3
  387. package/node_modules/undici/lib/interceptor/decompress.js +22 -9
  388. package/node_modules/undici/lib/interceptor/dns.js +11 -0
  389. package/node_modules/undici/lib/interceptor/response-error.js +72 -28
  390. package/node_modules/undici/lib/milo/LICENSE.md +7 -0
  391. package/node_modules/undici/lib/milo/no-simd.js +1002 -0
  392. package/node_modules/undici/lib/milo/simd.js +1002 -0
  393. package/node_modules/undici/lib/mock/mock-agent.js +11 -0
  394. package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  395. package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  396. package/node_modules/undici/lib/util/cache.js +11 -5
  397. package/node_modules/undici/lib/web/cookies/util.js +19 -2
  398. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  399. package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  400. package/node_modules/undici/lib/web/fetch/body.js +47 -38
  401. package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  402. package/node_modules/undici/lib/web/fetch/headers.js +2 -2
  403. package/node_modules/undici/lib/web/fetch/index.js +8 -4
  404. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  405. package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  406. package/node_modules/undici/package.json +9 -7
  407. package/node_modules/zod/package.json +1 -1
  408. package/node_modules/zod/v4/core/compile.cjs +8 -0
  409. package/node_modules/zod/v4/core/compile.js +8 -0
  410. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  411. package/node_modules/zod/v4/core/schemas.js +30 -0
  412. package/node_modules/zod/v4/core/util.cjs +15 -0
  413. package/node_modules/zod/v4/core/util.js +14 -0
  414. package/node_modules/zod/v4/core/versions.cjs +1 -1
  415. package/node_modules/zod/v4/core/versions.js +1 -1
  416. package/package.json +2 -2
  417. package/node_modules/@modelcontextprotocol/client/dist/index-D_CiY-T3.d.cts.map +0 -1
  418. package/node_modules/@modelcontextprotocol/client/dist/index-D_QDtbiv.d.mts.map +0 -1
@@ -1,4 +1,4 @@
1
- const require_src = require('./src-oZBjf3U1.cjs');
1
+ const require_src = require('./src-DpAS0jfg.cjs');
2
2
  const require_cfWorkerProvider = require('./cfWorkerProvider-B3dvjU3F.cjs');
3
3
 
4
4
  //#region src/shimsWorkerd.ts
@@ -1,4 +1,4 @@
1
- import { n as preloadSchemas } from "./src-xKF0PJN-.mjs";
1
+ import { n as preloadSchemas } from "./src-WCy6ifGf.mjs";
2
2
  import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-BylNJ1R5.mjs";
3
3
 
4
4
  //#region src/shimsWorkerd.ts
@@ -3072,7 +3072,7 @@ function build() {
3072
3072
  const subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };
3073
3073
  const SubscriptionsListenRequestSchema$1 = wireRequest("subscriptions/listen", subscriptionsListenParamsShape);
3074
3074
  /**
3075
- * Anchor SubscriptionsListenResultMeta — required subscriptionId stamp on
3075
+ * Anchor SubscriptionsListenResultMetaObject — required subscriptionId stamp on
3076
3076
  * the graceful-close result. Extends `ResultMetaObject` since spec PR
3077
3077
  * #3002 (composed, so the serverInfo key and its leniency stay single-sourced).
3078
3078
  */
@@ -3345,7 +3345,8 @@ function build() {
3345
3345
  ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
3346
3346
  ReadResourceResultResponseSchema: wireResultResponse(zod_v4.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
3347
3347
  CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
3348
- DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
3348
+ DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
3349
+ SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
3349
3350
  };
3350
3351
  }
3351
3352
  let memo;
@@ -4093,6 +4094,10 @@ function isSpecRequestMethod(method) {
4093
4094
  function isSpecNotificationMethod(method) {
4094
4095
  return ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));
4095
4096
  }
4097
+ /** The names SEP-2663 re-defines for the Tasks extension on the era that removed them from core. */
4098
+ function isExtensionReusedRequestMethod(method) {
4099
+ return method === "tasks/get" || method === "tasks/cancel";
4100
+ }
4096
4101
  const ALL_CODECS = [rev2025Codec, rev2026Codec];
4097
4102
 
4098
4103
  //#endregion
@@ -5029,13 +5034,14 @@ function buildInputRequired(spec) {
5029
5034
  * @example Write-once tool requesting confirmation
5030
5035
  * ```ts
5031
5036
  * server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {
5032
- * const confirmed = acceptedContent<{ confirm: boolean }>(ctx.mcpReq.inputResponses, 'confirm');
5033
- * if (!confirmed) {
5037
+ * const confirmationSchema = z.object({ confirm: z.boolean() });
5038
+ * const confirmed = acceptedContent(ctx.mcpReq.inputResponses, 'confirm', confirmationSchema);
5039
+ * if (confirmed?.confirm !== true) {
5034
5040
  * return inputRequired({
5035
5041
  * inputRequests: {
5036
5042
  * confirm: inputRequired.elicit({
5037
5043
  * message: `Deploy to ${env}?`,
5038
- * requestedSchema: { type: 'object', properties: { confirm: { type: 'boolean' } }, required: ['confirm'] }
5044
+ * requestedSchema: confirmationSchema
5039
5045
  * })
5040
5046
  * }
5041
5047
  * });
@@ -5662,6 +5668,8 @@ var Protocol = class {
5662
5668
  _transport;
5663
5669
  _requestMessageId = 0;
5664
5670
  _requestHandlers = /* @__PURE__ */ new Map();
5671
+ /** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
5672
+ _customSchemaRequestMethods = /* @__PURE__ */ new Set();
5665
5673
  _requestHandlerAbortControllers = /* @__PURE__ */ new Map();
5666
5674
  _notificationHandlers = /* @__PURE__ */ new Map();
5667
5675
  _responseHandlers = /* @__PURE__ */ new Map();
@@ -5943,7 +5951,7 @@ var Protocol = class {
5943
5951
  return;
5944
5952
  }
5945
5953
  }
5946
- if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {
5954
+ if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
5947
5955
  sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
5948
5956
  return;
5949
5957
  }
@@ -6076,8 +6084,11 @@ var Protocol = class {
6076
6084
  }
6077
6085
  request(request, schemaOrOptions, maybeOptions) {
6078
6086
  const codec = this._resolveOutboundCodec(request.method);
6087
+ if (isStandardSchema(schemaOrOptions)) {
6088
+ if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec, request.method);
6089
+ return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
6090
+ }
6079
6091
  this._assertOutboundRequestInEra(codec, request.method);
6080
- if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
6081
6092
  const validate = codecResultValidator(codec, request.method);
6082
6093
  if (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
6083
6094
  return this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);
@@ -6322,6 +6333,8 @@ var Protocol = class {
6322
6333
  return maybeHandler(parsed.data, ctx);
6323
6334
  };
6324
6335
  else throw new TypeError("setRequestHandler: handler is required");
6336
+ if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
6337
+ else this._customSchemaRequestMethods.add(method);
6325
6338
  this._requestHandlers.set(method, this._wrapHandler(method, stored));
6326
6339
  }
6327
6340
  /**
@@ -6350,6 +6363,7 @@ var Protocol = class {
6350
6363
  */
6351
6364
  removeRequestHandler(method) {
6352
6365
  this._requestHandlers.delete(method);
6366
+ this._customSchemaRequestMethods.delete(method);
6353
6367
  }
6354
6368
  /**
6355
6369
  * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
@@ -6813,6 +6827,71 @@ function createFetchWithInit(baseFetch = fetch, baseInit) {
6813
6827
  });
6814
6828
  };
6815
6829
  }
6830
+ const REDIRECT_STATUSES = new Set([
6831
+ 301,
6832
+ 302,
6833
+ 303,
6834
+ 307,
6835
+ 308
6836
+ ]);
6837
+ const MAX_REDIRECTS = 5;
6838
+ /** Whether `to` has the scheme, host and port of `from`, or is its https form with both on the default port. */
6839
+ function isWithinOrigin(from, to) {
6840
+ if (from.protocol === to.protocol && from.host === to.host) return true;
6841
+ return from.protocol === "http:" && to.protocol === "https:" && from.hostname === to.hostname && !from.port && !to.port;
6842
+ }
6843
+ /** The URL that a redirect `response` to a request for `url` points at, if it names one. */
6844
+ function redirectTarget(url, response) {
6845
+ const location = REDIRECT_STATUSES.has(response.status) ? response.headers?.get("location") : void 0;
6846
+ if (!location) return void 0;
6847
+ try {
6848
+ return new URL(location, url);
6849
+ } catch {
6850
+ return;
6851
+ }
6852
+ }
6853
+ const leftToFetch = /* @__PURE__ */ new WeakSet();
6854
+ /** A copy of `baseFetch` that `fetchWithinOrigin` returns as it is, which leaves redirects to `baseFetch`. */
6855
+ function fetchLeavingRedirects(baseFetch) {
6856
+ const copy = (url, init) => baseFetch(url, init);
6857
+ leftToFetch.add(copy);
6858
+ return copy;
6859
+ }
6860
+ /** Wraps `baseFetch` to follow a redirect only when it keeps the method and stays within the origin of the request. */
6861
+ function fetchWithinOrigin(baseFetch) {
6862
+ if (leftToFetch.has(baseFetch)) return baseFetch;
6863
+ return async (url, init) => {
6864
+ if (init?.redirect === "error" || init?.redirect === "manual") return baseFetch(url, init);
6865
+ const method = (init?.method ?? "GET").toUpperCase();
6866
+ let current = url;
6867
+ for (let followed = 0;; followed++) {
6868
+ const response = await baseFetch(current, {
6869
+ ...init,
6870
+ redirect: "manual"
6871
+ });
6872
+ const target = redirectTarget(current, response);
6873
+ if (!target || followed === MAX_REDIRECTS) return response;
6874
+ const from = new URL(current);
6875
+ const keepsMethod = method === "GET" || response.status === 307 || response.status === 308;
6876
+ const keepsUserinfo = !(target.username || target.password) || target.username === from.username && target.password === from.password;
6877
+ if (!keepsMethod || !keepsUserinfo || !isWithinOrigin(from, target)) return response;
6878
+ await response.text?.().catch(() => {});
6879
+ current = target;
6880
+ }
6881
+ };
6882
+ }
6883
+ /** Error text for a redirect `response` to a request for `url` that was not followed, or `undefined` for any other response. */
6884
+ function unfollowedRedirect(url, response) {
6885
+ if (response.type === "opaqueredirect") return "Redirect not followed: this runtime does not expose where it points";
6886
+ const target = redirectTarget(response.url || url, response);
6887
+ if (!target) return void 0;
6888
+ target.username = target.password = target.search = target.hash = "";
6889
+ if (target.protocol === "http:" && new URL(response.url || url).protocol === "https:") {
6890
+ target.protocol = "https:";
6891
+ return `Redirect from https to plain http not followed; try ${target.href} as the endpoint`;
6892
+ }
6893
+ return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
6894
+ }
6816
6895
 
6817
6896
  //#endregion
6818
6897
  //#region ../core-internal/src/shared/uriTemplate.ts
@@ -7343,6 +7422,18 @@ Object.defineProperty(exports, 'encodeMcpParamValue', {
7343
7422
  return encodeMcpParamValue;
7344
7423
  }
7345
7424
  });
7425
+ Object.defineProperty(exports, 'fetchLeavingRedirects', {
7426
+ enumerable: true,
7427
+ get: function () {
7428
+ return fetchLeavingRedirects;
7429
+ }
7430
+ });
7431
+ Object.defineProperty(exports, 'fetchWithinOrigin', {
7432
+ enumerable: true,
7433
+ get: function () {
7434
+ return fetchWithinOrigin;
7435
+ }
7436
+ });
7346
7437
  Object.defineProperty(exports, 'fromJsonSchema', {
7347
7438
  enumerable: true,
7348
7439
  get: function () {
@@ -7523,6 +7614,12 @@ Object.defineProperty(exports, 'stampErrorBrands', {
7523
7614
  return stampErrorBrands;
7524
7615
  }
7525
7616
  });
7617
+ Object.defineProperty(exports, 'unfollowedRedirect', {
7618
+ enumerable: true,
7619
+ get: function () {
7620
+ return unfollowedRedirect;
7621
+ }
7622
+ });
7526
7623
  Object.defineProperty(exports, 'withInputRequired', {
7527
7624
  enumerable: true,
7528
7625
  get: function () {
@@ -7535,4 +7632,4 @@ Object.defineProperty(exports, 'withoutIssuer', {
7535
7632
  return withoutIssuer;
7536
7633
  }
7537
7634
  });
7538
- //# sourceMappingURL=src-oZBjf3U1.cjs.map
7635
+ //# sourceMappingURL=src-DpAS0jfg.cjs.map
@@ -3071,7 +3071,7 @@ function build() {
3071
3071
  const subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };
3072
3072
  const SubscriptionsListenRequestSchema$1 = wireRequest("subscriptions/listen", subscriptionsListenParamsShape);
3073
3073
  /**
3074
- * Anchor SubscriptionsListenResultMeta — required subscriptionId stamp on
3074
+ * Anchor SubscriptionsListenResultMetaObject — required subscriptionId stamp on
3075
3075
  * the graceful-close result. Extends `ResultMetaObject` since spec PR
3076
3076
  * #3002 (composed, so the serverInfo key and its leniency stay single-sourced).
3077
3077
  */
@@ -3344,7 +3344,8 @@ function build() {
3344
3344
  ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
3345
3345
  ReadResourceResultResponseSchema: wireResultResponse(z.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
3346
3346
  CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
3347
- DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
3347
+ DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
3348
+ SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
3348
3349
  };
3349
3350
  }
3350
3351
  let memo;
@@ -4092,6 +4093,10 @@ function isSpecRequestMethod(method) {
4092
4093
  function isSpecNotificationMethod(method) {
4093
4094
  return ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));
4094
4095
  }
4096
+ /** The names SEP-2663 re-defines for the Tasks extension on the era that removed them from core. */
4097
+ function isExtensionReusedRequestMethod(method) {
4098
+ return method === "tasks/get" || method === "tasks/cancel";
4099
+ }
4095
4100
  const ALL_CODECS = [rev2025Codec, rev2026Codec];
4096
4101
 
4097
4102
  //#endregion
@@ -5028,13 +5033,14 @@ function buildInputRequired(spec) {
5028
5033
  * @example Write-once tool requesting confirmation
5029
5034
  * ```ts
5030
5035
  * server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {
5031
- * const confirmed = acceptedContent<{ confirm: boolean }>(ctx.mcpReq.inputResponses, 'confirm');
5032
- * if (!confirmed) {
5036
+ * const confirmationSchema = z.object({ confirm: z.boolean() });
5037
+ * const confirmed = acceptedContent(ctx.mcpReq.inputResponses, 'confirm', confirmationSchema);
5038
+ * if (confirmed?.confirm !== true) {
5033
5039
  * return inputRequired({
5034
5040
  * inputRequests: {
5035
5041
  * confirm: inputRequired.elicit({
5036
5042
  * message: `Deploy to ${env}?`,
5037
- * requestedSchema: { type: 'object', properties: { confirm: { type: 'boolean' } }, required: ['confirm'] }
5043
+ * requestedSchema: confirmationSchema
5038
5044
  * })
5039
5045
  * }
5040
5046
  * });
@@ -5661,6 +5667,8 @@ var Protocol = class {
5661
5667
  _transport;
5662
5668
  _requestMessageId = 0;
5663
5669
  _requestHandlers = /* @__PURE__ */ new Map();
5670
+ /** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
5671
+ _customSchemaRequestMethods = /* @__PURE__ */ new Set();
5664
5672
  _requestHandlerAbortControllers = /* @__PURE__ */ new Map();
5665
5673
  _notificationHandlers = /* @__PURE__ */ new Map();
5666
5674
  _responseHandlers = /* @__PURE__ */ new Map();
@@ -5942,7 +5950,7 @@ var Protocol = class {
5942
5950
  return;
5943
5951
  }
5944
5952
  }
5945
- if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {
5953
+ if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
5946
5954
  sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
5947
5955
  return;
5948
5956
  }
@@ -6075,8 +6083,11 @@ var Protocol = class {
6075
6083
  }
6076
6084
  request(request, schemaOrOptions, maybeOptions) {
6077
6085
  const codec = this._resolveOutboundCodec(request.method);
6086
+ if (isStandardSchema(schemaOrOptions)) {
6087
+ if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec, request.method);
6088
+ return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
6089
+ }
6078
6090
  this._assertOutboundRequestInEra(codec, request.method);
6079
- if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
6080
6091
  const validate = codecResultValidator(codec, request.method);
6081
6092
  if (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
6082
6093
  return this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);
@@ -6321,6 +6332,8 @@ var Protocol = class {
6321
6332
  return maybeHandler(parsed.data, ctx);
6322
6333
  };
6323
6334
  else throw new TypeError("setRequestHandler: handler is required");
6335
+ if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
6336
+ else this._customSchemaRequestMethods.add(method);
6324
6337
  this._requestHandlers.set(method, this._wrapHandler(method, stored));
6325
6338
  }
6326
6339
  /**
@@ -6349,6 +6362,7 @@ var Protocol = class {
6349
6362
  */
6350
6363
  removeRequestHandler(method) {
6351
6364
  this._requestHandlers.delete(method);
6365
+ this._customSchemaRequestMethods.delete(method);
6352
6366
  }
6353
6367
  /**
6354
6368
  * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
@@ -6812,6 +6826,71 @@ function createFetchWithInit(baseFetch = fetch, baseInit) {
6812
6826
  });
6813
6827
  };
6814
6828
  }
6829
+ const REDIRECT_STATUSES = new Set([
6830
+ 301,
6831
+ 302,
6832
+ 303,
6833
+ 307,
6834
+ 308
6835
+ ]);
6836
+ const MAX_REDIRECTS = 5;
6837
+ /** Whether `to` has the scheme, host and port of `from`, or is its https form with both on the default port. */
6838
+ function isWithinOrigin(from, to) {
6839
+ if (from.protocol === to.protocol && from.host === to.host) return true;
6840
+ return from.protocol === "http:" && to.protocol === "https:" && from.hostname === to.hostname && !from.port && !to.port;
6841
+ }
6842
+ /** The URL that a redirect `response` to a request for `url` points at, if it names one. */
6843
+ function redirectTarget(url, response) {
6844
+ const location = REDIRECT_STATUSES.has(response.status) ? response.headers?.get("location") : void 0;
6845
+ if (!location) return void 0;
6846
+ try {
6847
+ return new URL(location, url);
6848
+ } catch {
6849
+ return;
6850
+ }
6851
+ }
6852
+ const leftToFetch = /* @__PURE__ */ new WeakSet();
6853
+ /** A copy of `baseFetch` that `fetchWithinOrigin` returns as it is, which leaves redirects to `baseFetch`. */
6854
+ function fetchLeavingRedirects(baseFetch) {
6855
+ const copy = (url, init) => baseFetch(url, init);
6856
+ leftToFetch.add(copy);
6857
+ return copy;
6858
+ }
6859
+ /** Wraps `baseFetch` to follow a redirect only when it keeps the method and stays within the origin of the request. */
6860
+ function fetchWithinOrigin(baseFetch) {
6861
+ if (leftToFetch.has(baseFetch)) return baseFetch;
6862
+ return async (url, init) => {
6863
+ if (init?.redirect === "error" || init?.redirect === "manual") return baseFetch(url, init);
6864
+ const method = (init?.method ?? "GET").toUpperCase();
6865
+ let current = url;
6866
+ for (let followed = 0;; followed++) {
6867
+ const response = await baseFetch(current, {
6868
+ ...init,
6869
+ redirect: "manual"
6870
+ });
6871
+ const target = redirectTarget(current, response);
6872
+ if (!target || followed === MAX_REDIRECTS) return response;
6873
+ const from = new URL(current);
6874
+ const keepsMethod = method === "GET" || response.status === 307 || response.status === 308;
6875
+ const keepsUserinfo = !(target.username || target.password) || target.username === from.username && target.password === from.password;
6876
+ if (!keepsMethod || !keepsUserinfo || !isWithinOrigin(from, target)) return response;
6877
+ await response.text?.().catch(() => {});
6878
+ current = target;
6879
+ }
6880
+ };
6881
+ }
6882
+ /** Error text for a redirect `response` to a request for `url` that was not followed, or `undefined` for any other response. */
6883
+ function unfollowedRedirect(url, response) {
6884
+ if (response.type === "opaqueredirect") return "Redirect not followed: this runtime does not expose where it points";
6885
+ const target = redirectTarget(response.url || url, response);
6886
+ if (!target) return void 0;
6887
+ target.username = target.password = target.search = target.hash = "";
6888
+ if (target.protocol === "http:" && new URL(response.url || url).protocol === "https:") {
6889
+ target.protocol = "https:";
6890
+ return `Redirect from https to plain http not followed; try ${target.href} as the endpoint`;
6891
+ }
6892
+ return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
6893
+ }
6815
6894
 
6816
6895
  //#endregion
6817
6896
  //#region ../core-internal/src/shared/uriTemplate.ts
@@ -7160,5 +7239,5 @@ function fromJsonSchema(schema, validator) {
7160
7239
  }
7161
7240
 
7162
7241
  //#endregion
7163
- export { legacyProtocolVersions as $, isInitializeRequest as A, SdkError as At, DiscoverResultSchema as B, mcpNameSource as C, IdJagTokenExchangeResponseSchema as Ct, assertCompleteRequestPrompt as D, OAuthProtectedResourceMetadataSchema as Dt, scanXMcpHeaderDeclarations as E, OAuthMetadataSchema as Et, isJSONRPCRequest as F, brandedHasInstance as Ft, MissingRequiredClientCapabilityError as G, ListChangedOptionsBaseSchema as H, isJSONRPCResponse as I, stampErrorBrands as It, UnsupportedProtocolVersionError as J, ProtocolError as K, isJSONRPCResultResponse as L, isInputRequiredResult as M, SdkHttpError as Mt, isJSONRPCErrorResponse as N, OAuthError as Nt, assertCompleteRequestResourceTemplate as O, OAuthTokensSchema as Ot, isJSONRPCNotification as P, OAuthErrorCode as Pt, isModernProtocolVersion as Q, isTaskAugmentedRequestParams as R, HEADER_MISMATCH_ERROR_CODE as S, withoutIssuer as St, encodeMcpParamValue as T, OAuthErrorResponseSchema as Tt, MODERN_WIRE_REVISION as U, JSONRPCMessageSchema as V, codecForVersion as W, ProtocolErrorCode as X, UrlElicitationRequiredError as Y, SUPPORTED_MODERN_PROTOCOL_VERSIONS as Z, isSpecType as _, SUPPORTED_PROTOCOL_VERSIONS as _t, createFetchWithInit as a, INTERNAL_ERROR as at, withInputRequired as b, checkResourceAllowed as bt, deserializeMessage as c, JSONRPC_VERSION as ct, isJsonContentType as d, METHOD_NOT_FOUND as dt, modernProtocolVersions as et, mediaTypeEssence as f, PARSE_ERROR as ft, mergeCapabilities as g, SUBSCRIPTION_ID_META_KEY as gt, Protocol as h, SERVER_INFO_META_KEY as ht, UriTemplate as i, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as it, isInitializedNotification as j, SdkErrorCode as jt, isCallToolResult as k, OpenIdProviderDiscoveryMetadataSchema as kt, serializeMessage as l, LATEST_PROTOCOL_VERSION as lt, DEFAULT_REQUEST_TIMEOUT_MSEC as m, RELATED_TASK_META_KEY as mt, preloadSchemas as n, CLIENT_CAPABILITIES_META_KEY as nt, ReadBuffer as o, INVALID_PARAMS as ot, runInputRequiredFlow as p, PROTOCOL_VERSION_META_KEY as pt, ResourceNotFoundError as q, InMemoryTransport as r, CLIENT_INFO_META_KEY as rt, STDIO_DEFAULT_MAX_BUFFER_SIZE as s, INVALID_REQUEST as st, fromJsonSchema as t, BAGGAGE_META_KEY as tt, getDisplayName as u, LOG_LEVEL_META_KEY as ut, specTypeSchemas as v, TRACEPARENT_META_KEY as vt, buildMcpParamHeaders as w, OAuthClientInformationFullSchema as wt, parseSchema as x, resourceUrlFromServerUrl as xt, resolveInputRequiredDriverConfig as y, TRACESTATE_META_KEY as yt, parseJSONRPCMessage as z };
7164
- //# sourceMappingURL=src-xKF0PJN-.mjs.map
7242
+ export { ProtocolErrorCode as $, assertCompleteRequestPrompt as A, OAuthProtectedResourceMetadataSchema as At, isJSONRPCResultResponse as B, withInputRequired as C, checkResourceAllowed as Ct, buildMcpParamHeaders as D, OAuthClientInformationFullSchema as Dt, mcpNameSource as E, IdJagTokenExchangeResponseSchema as Et, isInputRequiredResult as F, SdkHttpError as Ft, ListChangedOptionsBaseSchema as G, parseJSONRPCMessage as H, isJSONRPCErrorResponse as I, OAuthError as It, MissingRequiredClientCapabilityError as J, MODERN_WIRE_REVISION as K, isJSONRPCNotification as L, OAuthErrorCode as Lt, isCallToolResult as M, OpenIdProviderDiscoveryMetadataSchema as Mt, isInitializeRequest as N, SdkError as Nt, encodeMcpParamValue as O, OAuthErrorResponseSchema as Ot, isInitializedNotification as P, SdkErrorCode as Pt, UrlElicitationRequiredError as Q, isJSONRPCRequest as R, brandedHasInstance as Rt, resolveInputRequiredDriverConfig as S, TRACESTATE_META_KEY as St, HEADER_MISMATCH_ERROR_CODE as T, withoutIssuer as Tt, DiscoverResultSchema as U, isTaskAugmentedRequestParams as V, JSONRPCMessageSchema as W, ResourceNotFoundError as X, ProtocolError as Y, UnsupportedProtocolVersionError as Z, DEFAULT_REQUEST_TIMEOUT_MSEC as _, RELATED_TASK_META_KEY as _t, createFetchWithInit as a, CLIENT_CAPABILITIES_META_KEY as at, isSpecType as b, SUPPORTED_PROTOCOL_VERSIONS as bt, unfollowedRedirect as c, INTERNAL_ERROR as ct, deserializeMessage as d, JSONRPC_VERSION as dt, SUPPORTED_MODERN_PROTOCOL_VERSIONS as et, serializeMessage as f, LATEST_PROTOCOL_VERSION as ft, runInputRequiredFlow as g, PROTOCOL_VERSION_META_KEY as gt, mediaTypeEssence as h, PARSE_ERROR as ht, UriTemplate as i, BAGGAGE_META_KEY as it, assertCompleteRequestResourceTemplate as j, OAuthTokensSchema as jt, scanXMcpHeaderDeclarations as k, OAuthMetadataSchema as kt, ReadBuffer as l, INVALID_PARAMS as lt, isJsonContentType as m, METHOD_NOT_FOUND as mt, preloadSchemas as n, legacyProtocolVersions as nt, fetchLeavingRedirects as o, CLIENT_INFO_META_KEY as ot, getDisplayName as p, LOG_LEVEL_META_KEY as pt, codecForVersion as q, InMemoryTransport as r, modernProtocolVersions as rt, fetchWithinOrigin as s, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as st, fromJsonSchema as t, isModernProtocolVersion as tt, STDIO_DEFAULT_MAX_BUFFER_SIZE as u, INVALID_REQUEST as ut, Protocol as v, SERVER_INFO_META_KEY as vt, parseSchema as w, resourceUrlFromServerUrl as wt, specTypeSchemas as x, TRACEPARENT_META_KEY as xt, mergeCapabilities as y, SUBSCRIPTION_ID_META_KEY as yt, isJSONRPCResponse as z, stampErrorBrands as zt };
7243
+ //# sourceMappingURL=src-WCy6ifGf.mjs.map
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-Bnu9O96Y.cjs');
2
- const require_src = require('./src-oZBjf3U1.cjs');
2
+ const require_src = require('./src-DpAS0jfg.cjs');
3
3
  let node_process = require("node:process");
4
4
  node_process = require_chunk.__toESM(node_process);
5
5
  let node_stream = require("node:stream");
@@ -1,4 +1,4 @@
1
- import { At as SdkError, jt as SdkErrorCode, l as serializeMessage, o as ReadBuffer } from "./src-xKF0PJN-.mjs";
1
+ import { Nt as SdkError, Pt as SdkErrorCode, f as serializeMessage, l as ReadBuffer } from "./src-WCy6ifGf.mjs";
2
2
  import process from "node:process";
3
3
  import { PassThrough } from "node:stream";
4
4
  import spawn from "cross-spawn";
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/core",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Model Context Protocol for TypeScript — public Zod schemas (spec + OAuth/OpenID)",
5
- "license": "MIT",
5
+ "license": "Apache-2.0",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
7
7
  "homepage": "https://modelcontextprotocol.io",
8
8
  "bugs": "https://github.com/modelcontextprotocol/typescript-sdk/issues",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/client",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Model Context Protocol implementation for TypeScript - Client package",
5
- "license": "MIT",
5
+ "license": "Apache-2.0",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
7
7
  "homepage": "https://modelcontextprotocol.io",
8
8
  "bugs": "https://github.com/modelcontextprotocol/typescript-sdk/issues",
@@ -124,11 +124,11 @@
124
124
  "dependencies": {
125
125
  "cross-spawn": "^7.0.5",
126
126
  "eventsource": "^3.0.2",
127
- "eventsource-parser": "^3.0.0",
127
+ "eventsource-parser": "^3.0.8",
128
128
  "jose": "^6.1.3",
129
129
  "pkce-challenge": "^5.0.0",
130
130
  "zod": "^4.2.0",
131
- "@modelcontextprotocol/core": "2.2.0"
131
+ "@modelcontextprotocol/core": "2.3.0"
132
132
  },
133
133
  "devDependencies": {
134
134
  "@cfworker/json-schema": "^4.1.1",
@@ -147,7 +147,7 @@
147
147
  "typescript-eslint": "^8.48.1",
148
148
  "vitest": "^4.0.15",
149
149
  "tsdown": "^0.18.0",
150
- "@modelcontextprotocol/core-internal": "^2.0.2",
150
+ "@modelcontextprotocol/core-internal": "^2.0.3",
151
151
  "@modelcontextprotocol/tsconfig": "^2.0.0",
152
152
  "@modelcontextprotocol/vitest-config": "^2.0.0",
153
153
  "@modelcontextprotocol/eslint-config": "^2.0.0",
@@ -0,0 +1,35 @@
1
+ name: Release the package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ semver:
7
+ description: 'Release bump type'
8
+ required: true
9
+ type: choice
10
+ options:
11
+ - patch
12
+ - minor
13
+ - major
14
+ - prepatch
15
+ - preminor
16
+ - premajor
17
+ - prerelease
18
+ preid:
19
+ description: 'Prerelease identifier (e.g. rc), used by the pre* bump types'
20
+ required: false
21
+ type: string
22
+
23
+ permissions: {}
24
+
25
+ jobs:
26
+ release:
27
+ permissions:
28
+ id-token: write # required for npm provenance via OIDC
29
+ contents: write # required to push the release commit and the tag
30
+ uses: fastify/workflows/.github/workflows/reusable-release.yml@b0a2ab2d8259b6bd574b804cd6874bbd75c3577c
31
+ with:
32
+ semver: ${{ inputs.semver }}
33
+ preid: ${{ inputs.preid }}
34
+ dist-tag: ${{ startsWith(inputs.semver, 'pre') && 'three-next' || 'three' }}
35
+ make-latest: false
@@ -14,12 +14,18 @@ All of the above functions can accept an additional options argument that is an
14
14
 
15
15
  Malformed authorities and out-of-range ports are reported through the parsed component's `error` field. `normalize()` leaves malformed string inputs unchanged, and `equal()` returns `false` when either string input is malformed.
16
16
 
17
+ Schemes are never percent-decoded. RFC 3986 does not allow percent-encoding in a scheme, so an input such as `%6Aavascript:alert(1)` is reported as malformed (`error: 'URI scheme is malformed.'`) instead of being parsed as `javascript:`. `normalize()` leaves it unchanged, `equal()` returns `false`, and `resolve()` and `serialize()` throw.
18
+
19
+ For schemes with domain hosts (`http`, `https`, `ws`, `wss`, or any scheme with the `domainHost` option), a host containing an ASCII character that RFC 3986 does not allow in a reg-name (for example `@`, TAB, LF, CR, space, `"`, `<`, `>`, `^`, `` ` ``, `{`, `|`, `}`) is reported as malformed (`error: 'URI host is malformed.'`). It is never passed through a WHATWG URL parser that could treat `@` as a delimiter or strip whitespace. `normalize()` leaves such input unchanged, `equal()` returns `false`, and `resolve()` throws.
20
+
17
21
  * `scheme` (string)
18
22
  Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
19
23
 
20
24
  * `reference` (string)
21
25
  If set to `"suffix"`, it indicates that the URI is in the suffix format and the parser will use the option's `scheme` property to determine the URI's scheme.
22
26
 
27
+ A suffix reference is written without its scheme and without the `//` authority marker (RFC 3986 section 4.5). Such a reference is inherently ambiguous: an authority component cannot always be distinguished from a path. When the input carries an authority of the form `host:port` (for example `//javascript:80/x`) or a userinfo containing a colon, the serialized suffix output can begin with text that reparses as a URI scheme (for example `javascript:80/x`). Do not treat suffix output as a trusted absolute URL, and do not render it or use it in a scheme allowlist without first validating it with `parse()`. If you need an unambiguous result, use the default (non-suffix) serialization.
28
+
23
29
  * `tolerant` (boolean, false)
24
30
  If set to `true`, the parser will relax URI resolving rules.
25
31
 
@@ -79,6 +85,8 @@ uri.normalize('http://example.com/a%2Fb')
79
85
 
80
86
  Reserved path escapes such as `%2F` and `%2E` are preserved as path data during normalization and comparison.
81
87
 
88
+ Dot segments in relative references are removed without changing what the reference resolves to: leading `..` segments that cannot be collapsed are kept, a relative path is never turned into a root-relative one, and a first-segment colon exposed by the removal is kept behind a leading `./` so the reference is not reparsed as a scheme (`a/../b` → `b`, `../x` → `../x`, `x/..` → `./`, `a/../a:b` → `./a:b`).
89
+
82
90
  ### Equal
83
91
 
84
92
  ```js