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
@@ -31,6 +31,7 @@
31
31
  * Phase 1 scope: types + small pure helpers only. No storage, runner,
32
32
  * projection, or ledger logic lives here. Those arrive in later nodes.
33
33
  */
34
+ import { decodeEventWaitProvenance } from './event-wait-delivery.js';
34
35
  import { isWorkHubActionReceipt } from './workhub-action-result.js';
35
36
  import { isToolCallOutcome } from './tool-result-status.js';
36
37
  import { isModelRetryDecision } from './model-failure.js';
@@ -182,6 +183,7 @@ const TEXT_CONTENT_SHAPE = defineObjectShape()(['kind', 'text'], [
182
183
  'quotes',
183
184
  'inlineReferences',
184
185
  'steering',
186
+ 'runtimeContextName',
185
187
  'providerOptions',
186
188
  ]);
187
189
  const THINKING_CONTENT_SHAPE = defineObjectShape()(['kind', 'text'], ['signature', 'providerOptions']);
@@ -236,7 +238,7 @@ const INVOCATION_ROOT_SHAPES = {
236
238
  user: defineObjectShape()(['kind'], []),
237
239
  context_compact: defineObjectShape()(['kind'], []),
238
240
  scheduled_task: defineObjectShape()(['kind', 'scheduledTaskId'], []),
239
- goal: defineObjectShape()(['kind', 'goalId'], []),
241
+ goal: defineObjectShape()(['kind', 'goalId'], ['eventWait']),
240
242
  agent_graph_supervisor_wake: defineObjectShape()(['kind', 'wakeId', 'attemptId'], []),
241
243
  legacy_automation: defineObjectShape()(['kind', 'legacyAutomationId'], []),
242
244
  };
@@ -378,11 +380,15 @@ export function decodeRuntimeEvent(value) {
378
380
  content: {
379
381
  kind: 'text',
380
382
  ...normalizeMessageContent(value.content),
383
+ ...(value.content.interrupted === true ? { interrupted: true } : {}),
381
384
  ...(value.content.summary !== undefined ? { summary: value.content.summary } : {}),
382
385
  ...(value.content.origin !== undefined
383
386
  ? { origin: decodeTurnOrigin(value.content.origin) }
384
387
  : {}),
385
388
  ...(value.content.steering === true ? { steering: true } : {}),
389
+ ...(value.content.runtimeContextName !== undefined
390
+ ? { runtimeContextName: value.content.runtimeContextName }
391
+ : {}),
386
392
  },
387
393
  };
388
394
  }
@@ -408,6 +414,9 @@ function isRuntimeEventContent(value) {
408
414
  (value.summary !== undefined && typeof value.summary !== 'string') ||
409
415
  (value.origin !== undefined && !isTurnOrigin(value.origin)) ||
410
416
  (value.steering !== undefined && value.steering !== true) ||
417
+ (value.runtimeContextName !== undefined &&
418
+ (typeof value.runtimeContextName !== 'string' ||
419
+ value.runtimeContextName.length === 0)) ||
411
420
  (value.interrupted !== undefined && value.interrupted !== true) ||
412
421
  (value.providerOptions !== undefined && !isRecord(value.providerOptions))) {
413
422
  return false;
@@ -538,7 +547,9 @@ function isRuntimeInvocationRootAuthority(value) {
538
547
  return (hasExactShape(value, INVOCATION_ROOT_SHAPES.scheduled_task) &&
539
548
  isNonEmptyString(value.scheduledTaskId));
540
549
  case 'goal':
541
- return hasExactShape(value, INVOCATION_ROOT_SHAPES.goal) && isNonEmptyString(value.goalId);
550
+ return (hasExactShape(value, INVOCATION_ROOT_SHAPES.goal) &&
551
+ isNonEmptyString(value.goalId) &&
552
+ isEventWaitProvenance(value.eventWait));
542
553
  case 'agent_graph_supervisor_wake':
543
554
  return (hasExactShape(value, INVOCATION_ROOT_SHAPES.agent_graph_supervisor_wake) &&
544
555
  isNonEmptyString(value.wakeId) &&
@@ -882,3 +893,14 @@ export function createRuntimeEventId(prefix = 'rt-event') {
882
893
  __runtimeEventSeq += 1;
883
894
  return `${prefix}_${Date.now().toString(36)}_${__runtimeEventSeq.toString(36)}`;
884
895
  }
896
+ function isEventWaitProvenance(value) {
897
+ if (value === undefined)
898
+ return true;
899
+ try {
900
+ decodeEventWaitProvenance(value);
901
+ return true;
902
+ }
903
+ catch {
904
+ return false;
905
+ }
906
+ }
@@ -16,6 +16,15 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
+ /**
20
+ * One physical execution attempt, as the event spine describes it.
21
+ *
22
+ * An invocation is an opening fact, the events that follow it, and — once it
23
+ * has ended — a terminal event. Everything a reader used to take from a mutable
24
+ * Run header is a projection of those three, so there is nothing here that a
25
+ * writer could set independently of the events.
26
+ */
27
+ import { sameEventWaitProvenance } from './event-wait-delivery.js';
19
28
  import { isTerminalRuntimeEvent } from './runtime-event.js';
20
29
  /** Persisted namespace used only by deterministic legacy-transcript conversion runs. */
21
30
  export const TRANSCRIPT_LEDGER_INVOCATION_ID_PREFIX = 'transcript-';
@@ -205,6 +214,7 @@ export function invocationMatchesHostedRootExecution(invocation, execution) {
205
214
  case 'goal':
206
215
  return (root.kind === 'goal' &&
207
216
  root.goalId === execution.goalId &&
217
+ sameEventWaitProvenance(root.eventWait, execution.eventWait) &&
208
218
  source.kind === 'fresh' &&
209
219
  lineageIsExactly(lineage, {}));
210
220
  case 'agent_graph_supervisor_wake':
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+ /** Check-in card vocabulary shared by the Runtime, the Host protocol and clients. */
20
+ export const CHECKIN_MAX_CARDS = 4;
21
+ export const CHECKIN_TITLE_MAX_CHARS = 80;
22
+ export const CHECKIN_QUOTE_MAX_CHARS = 300;
23
+ export const CHECKIN_INSTRUCTION_MAX_CHARS = 2_000;
24
+ export const CHECKIN_CARD_ACTIONS = ['resume', 'continue', 'new_session', 'answer'];
25
+ export const CHECKIN_EVIDENCE_SOURCES = ['signal', 'user_request', 'assistant_message'];
26
+ export function isCheckinCardAction(value) {
27
+ return typeof value === 'string' && CHECKIN_CARD_ACTIONS.includes(value);
28
+ }
29
+ export function isCheckinEvidenceSource(value) {
30
+ return (typeof value === 'string' && CHECKIN_EVIDENCE_SOURCES.includes(value));
31
+ }
@@ -588,15 +588,7 @@ function validateTransitionShape(events, expectedTransition) {
588
588
  (expectedTransition === 't2_outcome' &&
589
589
  actual.length === 1 &&
590
590
  actual[0] === 'function_response' &&
591
- events[0]?.refs?.operationId !== undefined) ||
592
- (expectedTransition === 'recovery_bundle' &&
593
- ((actual.length === 2 &&
594
- actual[0] === 'reconcile_result' &&
595
- actual[1] === 'recovery_decision') ||
596
- (actual.length === 3 &&
597
- actual[0] === 'reconcile_result' &&
598
- actual[1] === 'function_response' &&
599
- actual[2] === 'recovery_decision')));
591
+ events[0]?.refs?.operationId !== undefined);
600
592
  if (valid)
601
593
  return { ok: true };
602
594
  return {
@@ -19,14 +19,6 @@
19
19
  import { canonicalToolArgsHash } from './tool-args-identity.js';
20
20
  import { validateToolLedgerEventLane, } from './tool-ledger-scanner.js';
21
21
  import { isToolRecoveryFactEnvelope, } from './tool-recovery-fact.js';
22
- export class ToolRecoveryBundleValidationError extends Error {
23
- code;
24
- name = 'ToolRecoveryBundleValidationError';
25
- constructor(code, message) {
26
- super(message);
27
- this.code = code;
28
- }
29
- }
30
22
  export function validateToolRecoveryEventBundle(input) {
31
23
  const { operation } = input;
32
24
  const call = input.callEvent.content;
@@ -135,13 +127,8 @@ export function validateToolRecoveryEventBundle(input) {
135
127
  }
136
128
  return { ok: true, reconcile, decision };
137
129
  }
138
- export function assertToolRecoveryEventBundle(input) {
139
- const result = validateToolRecoveryEventBundle(input);
140
- if (!result.ok)
141
- throw new ToolRecoveryBundleValidationError(result.code, result.message);
142
- return { reconcile: result.reconcile, decision: result.decision };
143
- }
144
130
  /**
131
+ * Read compatibility for historical recovery bundles. Current tools never produce these facts.
145
132
  * Interprets the recovery tail of one scanner-owned operation. Resolver and
146
133
  * projection rebuild must consume this result instead of independently
147
134
  * assembling facts or defining their own causal-order rules.
@@ -16,12 +16,13 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
+ import { decodeEventWaitProvenance } from './event-wait-delivery.js';
19
20
  import { defineObjectShape, hasExactShape, isRecord } from './record-schema.js';
20
21
  const EXTERNAL_CONNECTOR_ORIGIN_SHAPE = defineObjectShape()(['kind', 'connectorId'], ['senderId']);
21
22
  const SCHEDULED_TASK_ORIGIN_SHAPE = defineObjectShape()(['kind', 'scheduledTaskId'], []);
22
23
  const CLOUD_ACTIVATION_ORIGIN_SHAPE = defineObjectShape()(['kind', 'activationId'], []);
23
24
  const LEGACY_AUTOMATION_ORIGIN_SHAPE = defineObjectShape()(['kind', 'automationId'], []);
24
- const GOAL_ORIGIN_SHAPE = defineObjectShape()(['kind', 'goalId'], []);
25
+ const GOAL_ORIGIN_SHAPE = defineObjectShape()(['kind', 'goalId'], ['eventWait']);
25
26
  const AGENT_GRAPH_ORIGIN_SHAPE = defineObjectShape()(['kind', 'graphId', 'wakeId', 'attemptId'], []);
26
27
  /** Decode a persisted or runtime turn origin, normalizing released Automation rows. */
27
28
  export function decodeTurnOrigin(value) {
@@ -72,7 +73,18 @@ export function decodeTurnOrigin(value) {
72
73
  if (hasExactShape(value, GOAL_ORIGIN_SHAPE) &&
73
74
  value.kind === 'goal' &&
74
75
  typeof value.goalId === 'string') {
75
- return { kind: 'goal', goalId: value.goalId };
76
+ try {
77
+ return {
78
+ kind: 'goal',
79
+ goalId: value.goalId,
80
+ ...(value.eventWait === undefined
81
+ ? {}
82
+ : { eventWait: decodeEventWaitProvenance(value.eventWait) }),
83
+ };
84
+ }
85
+ catch {
86
+ return undefined;
87
+ }
76
88
  }
77
89
  if (hasExactShape(value, AGENT_GRAPH_ORIGIN_SHAPE) &&
78
90
  value.kind === 'agent_graph' &&
@@ -27,6 +27,7 @@ export const MODEL_CALL_KINDS = [
27
27
  'goal_evaluation',
28
28
  'session_title',
29
29
  'session_recap',
30
+ 'session_checkin',
30
31
  'prompt_suggestion',
31
32
  'daily_review',
32
33
  'memory_extraction',
@@ -23,6 +23,7 @@
23
23
  "./tool-result-preview": "./dist/tool-result-preview.js",
24
24
  "./workspace-version-authority": "./dist/workspace-version-authority.js",
25
25
  "./runtime-policy": "./dist/runtime-policy.js",
26
+ "./event-wait-delivery": "./dist/event-wait-delivery.js",
26
27
  "./event-wait": "./dist/event-wait.js",
27
28
  "./goal": "./dist/goal.js",
28
29
  "./execution-log-coverage": "./dist/execution-log-coverage.js",
@@ -87,6 +88,7 @@
87
88
  "./agent-graph-client-projection": "./dist/agent-graph-client-projection.js",
88
89
  "./agent-graph-supervisor-wake": "./dist/agent-graph-supervisor-wake.js",
89
90
  "./session-todo": "./dist/session-todo.js",
91
+ "./session-checkin": "./dist/session-checkin.js",
90
92
  "./external-session": "./dist/external-session.js",
91
93
  "./daily-review": "./dist/daily-review.js",
92
94
  "./work-board": "./dist/work-board.js",
@@ -147,6 +149,7 @@
147
149
  "./project": "./dist/project.js",
148
150
  "./pty-output-view": "./dist/pty-output-view.js",
149
151
  "./relative-time": "./dist/relative-time.js",
152
+ "./assistant-turn-ids": "./dist/assistant-turn-ids.js",
150
153
  "./archive-retention": "./dist/archive-retention.js",
151
154
  "./run-composition": "./dist/run-composition.js",
152
155
  "./runtime-event-store": "./dist/runtime-event-store.js",
@@ -86,6 +86,24 @@ Using [benchmark-http2.js](https://github.com/nodejs/undici/blob/main/benchmarks
86
86
 
87
87
  Node.js includes a built-in `fetch()` implementation powered by undici starting from Node.js v18. However, there are important differences between using the built-in fetch and installing undici as a separate module.
88
88
 
89
+ ### WebAssembly requirement
90
+
91
+ Undici's HTTP/1 parser requires WebAssembly. There is no alternative parser when
92
+ WebAssembly is unavailable, for example in Node.js configurations where
93
+ `--jitless` disables it. The existence of `fetch` does not imply that it can make
94
+ HTTP/1 requests in that environment.
95
+
96
+ When the HTTP/1 parser is needed without WebAssembly, Client and dispatcher
97
+ requests fail with an `Error` whose code is `ERR_WEBASSEMBLY_NOT_SUPPORTED`.
98
+ `fetch` rejects with a `TypeError` carrying that error in `error.cause`. Importing
99
+ Undici, accessing `fetch`, and using `Headers`, `FormData`, `Request`, or `Response`
100
+ do not themselves require the HTTP/1 parser.
101
+
102
+ The error is defined locally in Undici and does not depend on Node.js providing
103
+ that error code. For built-in fetch, this behavior depends on the bundled Undici
104
+ version. Node.js receives upstream fixes through its normal vendored Undici
105
+ update, rather than changes to the generated bundle alone.
106
+
89
107
  ### Built-in Fetch (Node.js v18+)
90
108
 
91
109
  Node.js's built-in fetch is powered by a bundled version of undici:
@@ -773,14 +791,18 @@ and `undici.Agent`) which will enable the family autoselection algorithm when es
773
791
 
774
792
  ## Collaborators
775
793
 
776
- * [__Daniele Belardi__](https://github.com/dnlup), <https://www.npmjs.com/~dnlup>
777
- * [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood>
794
+ * [__Aras Abbasi__](https://github.com/Uzlopak)
795
+ * [__Carlos Fuentes__](https://github.com/metcoder95), <https://www.npmjs.com/~metcoder95>
796
+ * [__Ethan Arrowood__](https://github.com/Ethan-Arrowood), <https://www.npmjs.com/~ethan_arrowood>
778
797
  * [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina>
779
798
  * [__Matthew Aitken__](https://github.com/KhafraDev), <https://www.npmjs.com/~khaf>
799
+ * [__Mert Can Altin__](https://github.com/mertcanaltin), <https://www.npmjs.com/~mertcanaltin>
780
800
  * [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag>
781
- * [__Szymon Marczak__](https://github.com/szmarczak), <https://www.npmjs.com/~szmarczak>
801
+ * [__Trivikram Kamat__](https://github.com/trivikr), <https://www.npmjs.com/~trivikr>
802
+ * [__tsctx__](https://github.com/tsctx)
782
803
 
783
804
  ## Past Collaborators
805
+ * [__Szymon Marczak__](https://github.com/szmarczak), <https://www.npmjs.com/~szmarczak>
784
806
  * [__Tomas Della Vedova__](https://github.com/delvedor), <https://www.npmjs.com/~delvedor>
785
807
 
786
808
  ### Releasers
@@ -42,7 +42,8 @@ added: v7.0.0
42
42
  Stores cached responses in memory. The store enforces upper bounds on the total
43
43
  number of responses, the total size of all responses, and the size of any single
44
44
  response. When a limit is exceeded, the store evicts approximately half of its
45
- entries and emits a [`'maxSizeExceeded'`](#event-maxsizeexceeded) event.
45
+ entries, least recently used first, and emits a
46
+ [`'maxSizeExceeded'`](#event-maxsizeexceeded) event.
46
47
 
47
48
  ```mjs
48
49
  import { interceptors, cacheStores, Agent, setGlobalDispatcher } from 'undici'
@@ -163,7 +164,9 @@ added: v7.0.0
163
164
  -->
164
165
 
165
166
  Stores cached responses in a SQLite database using the [`node:sqlite`][] API.
166
- The constructor throws when [`node:sqlite`][] is not available.
167
+ The constructor throws when [`node:sqlite`][] is not available. Response bodies
168
+ larger than `compressThreshold` are stored compressed with zstd and
169
+ decompressed when read back, saving database space.
167
170
 
168
171
  ```mjs
169
172
  import { interceptors, cacheStores, Agent, setGlobalDispatcher } from 'undici'
@@ -189,9 +192,16 @@ added: v7.0.0
189
192
  * `maxEntrySize` {number} The maximum size, in bytes, of a single response
190
193
  body. Responses whose body exceeds this value are not cached. Must not
191
194
  exceed `2000000000` (2 GB). **Default:** `2000000000` (2 GB).
195
+ * `compressThreshold` {number} The size, in bytes, above which a response
196
+ body is stored compressed with zstd. Responses with an easily compressible
197
+ Content-Type (e.g. json, xml, plain text) are compressed regardless of
198
+ size. Requires a Node version with zstd
199
+ support (22.19+); when unavailable, bodies are stored uncompressed.
200
+ **Default:** `1048576` (1 MiB).
192
201
 
193
- `maxCount` and `maxEntrySize` must be non-negative integers; a `TypeError` is
194
- thrown otherwise, or if `maxEntrySize` is greater than 2 GB.
202
+ `maxCount`, `maxEntrySize`, and `compressThreshold` must be non-negative
203
+ integers; a `TypeError` is thrown otherwise, or if `maxEntrySize` is greater
204
+ than 2 GB.
195
205
 
196
206
  ### `sqliteCacheStore.close()`
197
207
 
@@ -225,7 +235,8 @@ added: v7.0.0
225
235
  See [`GetResult`](#getresult).
226
236
 
227
237
  Looks up a cached response for `key`, comparing the request method and every
228
- header named in the stored `vary` map.
238
+ header named in the stored `vary` map. A body that was stored compressed is
239
+ decompressed before being returned.
229
240
 
230
241
  ### `sqliteCacheStore.set(key, value)`
231
242
 
@@ -240,9 +251,11 @@ added: v7.0.0
240
251
  * Returns: {undefined}
241
252
 
242
253
  Writes a response into the database directly, without going through a stream. If
243
- the body exceeds `maxEntrySize`, nothing is stored. When an entry already exists
244
- for `key` it is overwritten; otherwise a new row is inserted and old entries are
245
- pruned to honour `maxCount`. This method is used internally by
254
+ the body exceeds `maxEntrySize`, nothing is stored. A body larger than
255
+ `compressThreshold`, or with an easily compressible Content-Type (e.g. json,
256
+ xml, plain text), is compressed with zstd before being written. When an entry
257
+ already exists for `key` it is overwritten; otherwise a new row is inserted and
258
+ old entries are pruned to honour `maxCount`. This method is used internally by
246
259
  [`sqliteCacheStore.createWriteStream()`](#sqlitecachestorecreatewritestreamkey-value).
247
260
 
248
261
  ### `sqliteCacheStore.createWriteStream(key, value)`
@@ -260,7 +273,9 @@ added: v7.0.0
260
273
 
261
274
  Returns a {Writable} stream used to write the response body into the store. When
262
275
  the stream finishes, the buffered body is committed via
263
- [`sqliteCacheStore.set()`](#sqlitecachestoresetkey-value). If the body exceeds
276
+ [`sqliteCacheStore.set()`](#sqlitecachestoresetkey-value), where bodies larger
277
+ than `compressThreshold` or with an easily compressible Content-Type are
278
+ compressed with zstd. If the body exceeds
264
279
  `maxEntrySize`, the stream is destroyed and nothing is stored.
265
280
 
266
281
  ### `sqliteCacheStore.delete(key)`
@@ -116,8 +116,8 @@ added: v1.0.0
116
116
  * `maxConcurrentStreams` {number} _Deprecated: use h2Options.useH2c instead_ The maximum number of concurrent HTTP/2
117
117
  streams for a single session. Once h2 is negotiated this — not `pipelining`,
118
118
  which is HTTP/1.1 only — is the ceiling used to dispatch in-flight requests.
119
- It may be overridden by the server's `SETTINGS_MAX_CONCURRENT_STREAMS`
120
- frame. **Default:** `100`.
119
+ The server's `SETTINGS_MAX_CONCURRENT_STREAMS` can lower this limit, but
120
+ not raise it. **Default:** `100`.
121
121
  * `connectionWindowSize` {number} _Deprecated: use h2Options.connectionWindowSize instead_ The HTTP/2 connection-level flow-control
122
122
  window size set via `ClientHttp2Session.setLocalWindowSize()`. Must be a
123
123
  positive integer. **Default:** `524288`.
@@ -130,8 +130,8 @@ added: v1.0.0
130
130
  * `maxConcurrentStreams` {number} The maximum number of concurrent HTTP/2
131
131
  streams for a single session. Once h2 is negotiated this — not `pipelining`,
132
132
  which is HTTP/1.1 only — is the ceiling used to dispatch in-flight requests.
133
- It may be overridden by the server's `SETTINGS_MAX_CONCURRENT_STREAMS`
134
- frame. **Default:** `100`.
133
+ The server's `SETTINGS_MAX_CONCURRENT_STREAMS` can lower this limit, but
134
+ not raise it. **Default:** `100`.
135
135
  * `connectionWindowSize` {number} The HTTP/2 connection-level flow-control
136
136
  window size set via `ClientHttp2Session.setLocalWindowSize()`. Must be a
137
137
  positive integer. **Default:** `524288`.
@@ -148,8 +148,13 @@ added: v1.0.0
148
148
  payloads, and decompressed (`permessage-deflate`) messages. Set to `0` to
149
149
  disable the limit. **Default:** `134217728`.
150
150
  * `eventSource` {Object} (optional) EventSource-specific configuration.
151
- * `maxEventSize` {number} The maximum allowed event size, in bytes, for
152
- EventSource messages. Set to `0` to disable the limit.
151
+ * `maxEventSize` {number} The maximum total bytes of data and metadata
152
+ field values retained for a pending EventSource event. Each unfinished
153
+ line is separately limited to this value plus seven syntax bytes, before
154
+ its line ending arrives. The number of `data:` lines per event and input
155
+ chunks buffered for an unfinished line are each limited to
156
+ `min(131072, max(1024, floor(maxEventSize / 128)))` to bound object overhead.
157
+ Set to `0` to disable these limits.
153
158
  **Default:** `buffer.kStringMaxLength`.
154
159
  * Returns: {Client}
155
160
 
@@ -209,6 +209,9 @@ added: v4.0.0
209
209
  * `path` {string} The request path.
210
210
  * `method` {string} The HTTP method, e.g. `'GET'` or `'POST'`.
211
211
  * `body` {string|Buffer|Uint8Array|Readable|FormData|null} The request body.
212
+ Undici's network clients require a `FormData` body created by the same
213
+ undici package instance. A body from another source, including Node.js's
214
+ built-in `FormData`, is rejected with an `InvalidArgumentError`.
212
215
  **Default:** `null`.
213
216
  * `headers` {UndiciHeaders} Request headers. **Default:** `null`.
214
217
  * `query` {Object} Query string parameters embedded into the request URL. Both
@@ -18,7 +18,7 @@ if (err instanceof errors.ConnectTimeoutError) {
18
18
  }
19
19
  ```
20
20
 
21
- All errors, except [`HTTPParserError`][], extend [`UndiciError`][]. Each error
21
+ All errors, except [`HTTPParserError`][] and `WebAssemblyNotSupportedError`, extend [`UndiciError`][]. Each error
22
22
  carries a stable `code` string (for example `UND_ERR_CONNECT_TIMEOUT`) and a
23
23
  `name`.
24
24
 
@@ -32,6 +32,37 @@ if (err.code === 'UND_ERR_CONNECT_TIMEOUT') {
32
32
  }
33
33
  ```
34
34
 
35
+ ## Timeout-related errors
36
+
37
+ The timeout errors below are controlled by dispatcher/client options:
38
+
39
+ | Error code | When it is thrown | Related option |
40
+ | ---------- | ----------------- | -------------- |
41
+ | `UND_ERR_CONNECT_TIMEOUT` | A connection could not be established before the connection timeout elapsed. | [`connect.timeout`](Client.md) |
42
+ | `UND_ERR_HEADERS_TIMEOUT` | The full response headers were not received before the headers timeout elapsed. | [`headersTimeout`](Client.md) |
43
+ | `UND_ERR_BODY_TIMEOUT` | While reading the response body, no new data arrived before the body timeout elapsed. | [`bodyTimeout`](Client.md) |
44
+ | `UND_ERR_SOCKET` | A generic socket-level failure happened. | Inspect `error.socket` for connection details. |
45
+
46
+ ### Configuring timeouts for `fetch`
47
+
48
+ If you are using `fetch` (including Node.js built-in `fetch`), configure timeouts
49
+ through the global dispatcher:
50
+
51
+ ```js
52
+ import { Agent, setGlobalDispatcher, fetch } from 'undici'
53
+
54
+ setGlobalDispatcher(new Agent({
55
+ connect: { timeout: 10_000 }, // connection phase
56
+ headersTimeout: 15_000, // wait for response headers
57
+ bodyTimeout: 30_000 // wait between response body chunks
58
+ }))
59
+
60
+ await fetch('https://example.com/data')
61
+ ```
62
+
63
+ You can inspect timeout error codes from `error.code` or (for wrapped fetch
64
+ errors) from `error.cause?.code`.
65
+
35
66
  ## Class: `UndiciError`
36
67
 
37
68
  <!-- YAML
@@ -52,6 +83,35 @@ on a well-known symbol rather than the prototype chain.
52
83
  * `name` {string} Always `'UndiciError'`.
53
84
  * `code` {string} Always `'UND_ERR'`.
54
85
 
86
+ ## Class: `WebAssemblyNotSupportedError`
87
+
88
+ * Extends: {Error}
89
+
90
+ WebAssembly is unavailable when Undici initializes its HTTP/1 parser. Undici does
91
+ not provide an alternative parser for environments without WebAssembly, including
92
+ Node.js configurations where `--jitless` disables it. The check is performed when
93
+ the parser is needed, not when importing Undici or accessing `fetch`.
94
+
95
+ * `name` {string} Always `'Error'`.
96
+ * `code` {string} Always `'ERR_WEBASSEMBLY_NOT_SUPPORTED'`.
97
+ * `message` {string} By default `'WebAssembly is not supported in this environment, but is required for HTTP/1 parsing'`.
98
+
99
+ Client and dispatcher requests report this error directly. `fetch` rejects with
100
+ a `TypeError` whose `cause` is this error:
101
+
102
+ ```js
103
+ try {
104
+ await fetch('http://localhost:3000')
105
+ } catch (error) {
106
+ if (error.cause?.code === 'ERR_WEBASSEMBLY_NOT_SUPPORTED') {
107
+ // HTTP/1 parsing requires WebAssembly in this environment.
108
+ }
109
+ }
110
+ ```
111
+
112
+ `Headers`, `FormData`, `Request`, `Response`, and other operations that do not need
113
+ the HTTP/1 parser remain usable without WebAssembly.
114
+
55
115
  ## Class: `ConnectTimeoutError`
56
116
 
57
117
  <!-- YAML
@@ -436,6 +496,7 @@ The response returned an error status code. This is raised, for example, when th
436
496
  * `code` {string} Always `'UND_ERR_RESPONSE'`.
437
497
  * `statusCode` {number} The HTTP status code of the response.
438
498
  * `body` {Object|string|null} The response body.
499
+ * `bodyTruncated` {boolean} Whether `body` was truncated by a configured limit.
439
500
  * `headers` {Object|string[]|null} The response headers.
440
501
 
441
502
  ### `new ResponseError(message, code, options)`
@@ -445,6 +506,7 @@ The response returned an error status code. This is raised, for example, when th
445
506
  * `options` {Object}
446
507
  * `headers` {Object|string[]|null} The response headers. (optional)
447
508
  * `body` {Object|string|null} The response body. (optional)
509
+ * `bodyTruncated` {boolean} Whether `body` was truncated. **Default:** `false`.
448
510
 
449
511
  ## Class: `ProxyConnectionError`
450
512
 
@@ -512,6 +574,19 @@ The maximum number of allowed origins has been reached.
512
574
  * `name` {string} Always `'MaxOriginsReachedError'`.
513
575
  * `code` {string} Always `'UND_ERR_MAX_ORIGINS_REACHED'`.
514
576
 
577
+ ## Class: `MaxRedirectsError`
578
+
579
+ <!-- YAML
580
+ added: v8.12.0
581
+ -->
582
+
583
+ * Extends: {UndiciError}
584
+
585
+ The maximum number of redirects has been reached.
586
+
587
+ * `name` {string} Always `'MaxRedirectsError'`.
588
+ * `code` {string} Always `'UND_ERR_REDIRECT_MAX'`.
589
+
515
590
  ## Class: `Socks5ProxyError`
516
591
 
517
592
  <!-- YAML
@@ -55,8 +55,9 @@ added: v7.7.0
55
55
  hostname, and port. Only the `http:` protocol is supported.
56
56
  * `options` {H2CClientOptions} (optional)
57
57
  * `maxConcurrentStreams` {number} The maximum number of concurrent HTTP/2
58
- streams for the session. It is advertised to the server and may be overridden
59
- by a remote `SETTINGS` frame. Must be a positive integer. **Default:** `100`.
58
+ streams for the session. The server's `SETTINGS_MAX_CONCURRENT_STREAMS` can
59
+ lower this limit, but not raise it. Must be a positive integer.
60
+ **Default:** `100`.
60
61
  * `pipelining` {number} The number of concurrent requests multiplexed over the
61
62
  single connection. For an `H2CClient` this is aliased to
62
63
  `maxConcurrentStreams` and may not exceed it. Must be a positive integer.
@@ -163,9 +163,10 @@ Follows HTTP redirects (3xx responses) automatically.
163
163
  * `maxRedirections` {number} Maximum number of redirects to follow. Passing
164
164
  `0` disables redirect following entirely. **Default:** `undefined`
165
165
  (inherits from the per-request `maxRedirections` option).
166
- * `throwOnMaxRedirect` {boolean} When `true`, throws an error once the
167
- redirect limit is reached instead of returning the final redirect response.
168
- **Default:** `false`.
166
+ * `throwOnMaxRedirect` {boolean} When `true`, throws an error when a
167
+ redirect would be followed but the redirect limit has been reached, instead
168
+ of returning that redirect response. A non-redirect response after exactly
169
+ `maxRedirections` redirects is returned normally. **Default:** `false`.
169
170
  * `stripHeadersOnRedirect` {string[]} List of header names to remove from
170
171
  the request when following any redirect. **Default:** `[]`.
171
172
  * `stripHeadersOnCrossOriginRedirect` {string[]} List of header names to
@@ -198,7 +199,10 @@ const agent = new Agent().compose(
198
199
  ## `interceptors.decompress([opts])`
199
200
 
200
201
  Automatically decompresses response bodies encoded with `gzip`, `x-gzip`,
201
- `br` (Brotli), `deflate`, `compress`, `x-compress`, or `zstd`.
202
+ `br` (Brotli), `deflate`, or `zstd`. Any other coding, including `compress`
203
+ and `x-compress`, is left untouched, matching `fetch()`. As required by
204
+ [RFC 9659](https://www.rfc-editor.org/rfc/rfc9659.html), a `zstd` frame that
205
+ requires a window size larger than 8 MB fails to decode.
202
206
 
203
207
  > **Experimental:** This interceptor is experimental and subject to change.
204
208
  > A one-time `ExperimentalWarning` is emitted on first use.
@@ -244,8 +248,11 @@ The error body is automatically decoded for `application/json` and
244
248
 
245
249
  **Parameters**
246
250
 
247
- * `opts` {Object} (optional) — currently reserved for future use; may be
248
- omitted.
251
+ * `opts` {Object} (optional)
252
+ * `maxSize` {number} Maximum number of response body bytes to include in the
253
+ error. If the body exceeds this limit, the resulting `ResponseError`
254
+ contains the retained prefix with `bodyTruncated` set to `true`. Set to `0`
255
+ to disable the limit. **Default:** `1048576` (1 MiB).
249
256
 
250
257
  **Returns:** {Dispatcher.DispatcherComposeInterceptor}
251
258
 
@@ -334,8 +341,21 @@ backing store.
334
341
 
335
342
  **Parameters**
336
343
 
337
- * `opts` {CacheHandler.CacheOptions} (optional) See the
338
- [`CacheStore`](./CacheStore.md) documentation for accepted fields.
344
+ * `opts` {Object} (optional)
345
+ * `store` {CacheStore} The store that cached responses are kept in. See
346
+ [`CacheStore`](./CacheStore.md). **Default:** a new `MemoryCacheStore`.
347
+ * `methods` {string[]} The HTTP methods to cache. Only safe methods are
348
+ allowed (`GET`, `HEAD`, `OPTIONS`, `TRACE`) and at least one is required.
349
+ **Default:** `['GET']`.
350
+ * `cacheByDefault` {number} RFC 9111 allows caching responses that are not
351
+ explicitly marked as cacheable or not cacheable. Set this to cache such
352
+ responses. **Default:** `undefined`.
353
+ * `type` {string} Whether the cache is `'shared'` or `'private'`, which
354
+ decides how directives such as `s-maxage` and `private` are applied.
355
+ **Default:** `'shared'`.
356
+ * `origins` {(string|RegExp)[]} Only requests to these origins are cached.
357
+ Strings are compared case-insensitively. **Default:** `undefined` (all
358
+ origins are cached).
339
359
 
340
360
  **Returns:** {Dispatcher.DispatcherComposeInterceptor}
341
361