maka-agent 0.2.0-dev.3.20260830 → 0.2.0-dev.30.20260912

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 (2155) hide show
  1. package/LICENSE +242 -5
  2. package/README.md +38 -19
  3. package/README.zh-CN.md +34 -19
  4. package/RUNTIME_HOST_PEER_DEPENDENCIES.rust.tsv +70 -0
  5. package/RUNTIME_HOST_PEER_THIRD_PARTY_NOTICES.txt +1839 -140
  6. package/THIRD_PARTY_NOTICES.txt +85 -258
  7. package/dist/acp/maka-acp-agent.js +7 -3
  8. package/dist/acp/session-configuration.js +143 -0
  9. package/dist/acp/session-registry.js +393 -0
  10. package/dist/acp/stdio-server.js +20 -1
  11. package/dist/activation-command.js +1 -2
  12. package/dist/cli-core.js +99 -102
  13. package/dist/cli-ui-locale.js +7 -2
  14. package/dist/eval-bundle-path.js +1 -1
  15. package/dist/mcp-capability-provider.js +8 -11
  16. package/dist/onboarding-catalog.js +4 -5
  17. package/dist/pi-transcript-tools.js +6 -0
  18. package/dist/pi-transcript.js +74 -29
  19. package/dist/pi-tui-form-interaction.js +497 -0
  20. package/dist/pi-tui-layout.js +60 -12
  21. package/dist/pi-tui-mcp-status.js +122 -124
  22. package/dist/pi-tui-pickers.js +562 -102
  23. package/dist/pi-tui-runner.js +722 -170
  24. package/dist/pi-tui-todo.js +221 -0
  25. package/dist/pi-tui-transcript-viewer.js +134 -7
  26. package/dist/run-command-core.js +6 -14
  27. package/dist/runtime-host-access-command.js +37 -4
  28. package/dist/runtime-host-capability-provider-command.js +16 -2
  29. package/dist/runtime-host-cli-context.js +300 -80
  30. package/dist/runtime-host-cli-installation.js +8 -2
  31. package/dist/runtime-host-cli.js +397 -67
  32. package/dist/runtime-host-handoff-surface.js +108 -0
  33. package/dist/runtime-host-help.js +244 -0
  34. package/dist/runtime-host-installed-update-activator.js +70 -33
  35. package/dist/runtime-host-installed-update-bootstrap.js +13 -0
  36. package/dist/runtime-host-installed-update-coordinator.js +44 -96
  37. package/dist/runtime-host-lifecycle-transaction.js +101 -28
  38. package/dist/runtime-host-local-handoff.js +215 -41
  39. package/dist/runtime-host-local-managed-activation.js +84 -0
  40. package/dist/runtime-host-local-source-retirement.js +119 -0
  41. package/dist/runtime-host-local-target-activation.js +141 -0
  42. package/dist/runtime-host-managed-deployment.js +158 -51
  43. package/dist/runtime-host-managed-lifecycle-manager.js +5 -6
  44. package/dist/runtime-host-onboarding.js +368 -21
  45. package/dist/runtime-host-openrc-service.js +469 -0
  46. package/dist/runtime-host-operator-retirement.js +50 -0
  47. package/dist/runtime-host-package-deployment.js +36 -2
  48. package/dist/runtime-host-peer-artifact.js +3 -3
  49. package/dist/runtime-host-peer-management-command.js +30 -12
  50. package/dist/runtime-host-peer-mesh-management-command.js +18 -1
  51. package/dist/runtime-host-plugin-command.js +101 -0
  52. package/dist/runtime-host-profile-command.js +1 -1
  53. package/dist/runtime-host-run-command.js +32 -57
  54. package/dist/runtime-host-service-command.js +3 -3
  55. package/dist/runtime-host-service-management-command.js +67 -17
  56. package/dist/runtime-host-service-manager.js +3 -3
  57. package/dist/runtime-host-session-channel.js +16 -0
  58. package/dist/runtime-host-session-driver.js +85 -32
  59. package/dist/runtime-host-session-update.js +62 -0
  60. package/dist/runtime-host-setup-command.js +103 -65
  61. package/dist/runtime-host-systemd-service.js +9 -3
  62. package/dist/runtime-host-task-readiness.js +2 -3
  63. package/dist/runtime-host-tui-command.js +58 -77
  64. package/dist/runtime-host-tui-context.js +56 -17
  65. package/dist/runtime-host-tui-owner.js +226 -0
  66. package/dist/runtime-host-update-command.js +131 -48
  67. package/dist/runtime-host-update-discovery.js +1 -0
  68. package/dist/runtime-host-update-reconciliation.js +7 -7
  69. package/dist/runtime-host-windows-service.js +166 -0
  70. package/dist/runtime-host-windows-task-launcher-artifact.js +75 -0
  71. package/dist/session-export-command.js +72 -0
  72. package/dist/session-import-command.js +69 -0
  73. package/dist/tui-autocomplete-layout.js +3 -1
  74. package/dist/tui-clipboard.js +86 -0
  75. package/dist/tui-context-refresh.js +103 -0
  76. package/dist/tui-copy-catalog.js +976 -14
  77. package/dist/tui-copy-command.js +103 -0
  78. package/dist/tui-editor-render.js +36 -0
  79. package/dist/tui-host-owner-copy.js +24 -0
  80. package/dist/tui-mcp-control.js +87 -10
  81. package/dist/tui-mcp-remote-publication.js +395 -0
  82. package/native/runtime-host-peer/prebuilds/darwin-arm64/maka_runtime_host_peer.node +0 -0
  83. package/native/runtime-host-peer/prebuilds/linux-arm64/maka_runtime_host_peer.node +0 -0
  84. package/native/runtime-host-peer/prebuilds/linux-x64/maka_runtime_host_peer.node +0 -0
  85. package/native/runtime-host-peer/prebuilds/win32-x64/maka_runtime_host_peer.node +0 -0
  86. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  87. package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +117 -0
  88. package/node_modules/@ai-sdk/anthropic/dist/index.js +937 -411
  89. package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +335 -160
  90. package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +132 -43
  91. package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  92. package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/package.json +63 -0
  93. package/node_modules/@ai-sdk/anthropic/package.json +6 -6
  94. package/node_modules/@ai-sdk/cohere/CHANGELOG.md +105 -0
  95. package/node_modules/@ai-sdk/cohere/dist/index.js +20 -22
  96. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  97. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +1 -0
  98. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  99. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +63 -0
  100. package/node_modules/@ai-sdk/cohere/package.json +6 -6
  101. package/node_modules/@ai-sdk/google/CHANGELOG.md +176 -0
  102. package/node_modules/@ai-sdk/google/dist/index.js +4441 -2801
  103. package/node_modules/@ai-sdk/google/dist/internal/index.js +640 -177
  104. package/node_modules/@ai-sdk/google/docs/15-google.mdx +225 -97
  105. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  106. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +1 -0
  107. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  108. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +63 -0
  109. package/node_modules/@ai-sdk/google/package.json +6 -6
  110. package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +81 -0
  111. package/node_modules/@ai-sdk/open-responses/dist/index.js +570 -22
  112. package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +123 -2
  113. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +38 -0
  114. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +1 -1
  115. package/node_modules/@ai-sdk/open-responses/package.json +3 -3
  116. package/node_modules/@ai-sdk/openai/CHANGELOG.md +184 -0
  117. package/node_modules/@ai-sdk/openai/dist/index.js +2013 -736
  118. package/node_modules/@ai-sdk/openai/dist/internal/index.js +1377 -478
  119. package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +208 -52
  120. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  121. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +13 -0
  122. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +1 -0
  123. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  124. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
  125. package/node_modules/@ai-sdk/openai/package.json +6 -6
  126. package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +126 -0
  127. package/node_modules/@ai-sdk/openai-compatible/dist/index.js +105 -20
  128. package/node_modules/@ai-sdk/openai-compatible/dist/internal/index.js +9 -0
  129. package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +78 -0
  130. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  131. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +1 -0
  132. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  133. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +63 -0
  134. package/node_modules/@ai-sdk/openai-compatible/package.json +6 -6
  135. package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +92 -0
  136. package/node_modules/@ai-sdk/provider-utils/dist/index.js +664 -168
  137. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  138. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +13 -0
  139. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +1 -0
  140. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  141. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
  142. package/node_modules/@ai-sdk/provider-utils/package.json +5 -5
  143. package/node_modules/@earendil-works/pi-tui/README.md +1 -1
  144. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +36 -3
  145. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -4
  146. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
  147. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +24 -4
  148. package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
  149. package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
  150. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -2
  151. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +2 -8
  152. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
  153. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +37 -2
  154. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +4 -10
  155. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +63 -16
  156. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +105 -45
  157. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  158. package/node_modules/@maka/core/dist/agent-run.js +25 -336
  159. package/node_modules/@maka/core/dist/artifacts.js +26 -23
  160. package/node_modules/@maka/core/dist/attachments.js +95 -1
  161. package/node_modules/@maka/core/dist/bot-events.js +18 -63
  162. package/node_modules/@maka/core/dist/bounded-response.js +71 -0
  163. package/node_modules/@maka/core/dist/canonical-json.js +27 -0
  164. package/node_modules/@maka/core/dist/canonical-runtime-event.js +3 -1
  165. package/node_modules/@maka/core/dist/capabilities.js +35 -0
  166. package/node_modules/@maka/core/dist/chat-model-choice.js +11 -31
  167. package/node_modules/@maka/core/dist/client-capability-grant.js +149 -0
  168. package/node_modules/@maka/core/dist/collaboration.js +12 -0
  169. package/node_modules/@maka/core/dist/computer-use.js +27 -93
  170. package/node_modules/@maka/core/dist/connection-error-copy.js +17 -34
  171. package/node_modules/@maka/core/dist/connection-readiness.js +3 -31
  172. package/node_modules/@maka/core/dist/deep-research.js +1 -20
  173. package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
  174. package/node_modules/@maka/core/dist/display-redaction.js +18 -0
  175. package/node_modules/@maka/core/dist/durable-tool-result-projection.js +124 -0
  176. package/node_modules/@maka/core/dist/events.js +22 -14
  177. package/node_modules/@maka/core/dist/execution-inspect.js +12 -21
  178. package/node_modules/@maka/core/dist/foreign-session.js +3 -3
  179. package/node_modules/@maka/core/dist/health.js +50 -45
  180. package/node_modules/@maka/core/dist/interaction.js +623 -2
  181. package/node_modules/@maka/core/dist/llm-connections.js +115 -87
  182. package/node_modules/@maka/core/dist/local-memory.js +2 -2
  183. package/node_modules/@maka/core/dist/maka-wordmark.js +23 -0
  184. package/node_modules/@maka/core/dist/model-call-attempt.js +134 -82
  185. package/node_modules/@maka/core/dist/model-call-usage-projection.js +0 -183
  186. package/node_modules/@maka/core/dist/model-catalog.js +191 -322
  187. package/node_modules/@maka/core/dist/model-facts.js +206 -0
  188. package/node_modules/@maka/core/dist/model-failure.js +40 -0
  189. package/node_modules/@maka/core/dist/model-metadata.generated.js +1910 -1875
  190. package/node_modules/@maka/core/dist/model-metadata.js +217 -209
  191. package/node_modules/@maka/core/dist/model-projection-transition.js +145 -0
  192. package/node_modules/@maka/core/dist/model-thinking.js +73 -24
  193. package/node_modules/@maka/core/dist/model-web-search.js +5 -4
  194. package/node_modules/@maka/core/dist/models-dev-projection.js +302 -0
  195. package/node_modules/@maka/core/dist/models-dev-refresh.js +55 -0
  196. package/node_modules/@maka/core/dist/onboarding.js +2 -1
  197. package/node_modules/@maka/core/dist/permission-profile.js +17 -0
  198. package/node_modules/@maka/core/dist/provider-auth.js +47 -291
  199. package/node_modules/@maka/core/dist/provider-registry.js +115 -373
  200. package/node_modules/@maka/core/dist/record-schema.js +22 -2
  201. package/node_modules/@maka/core/dist/redaction.js +78 -40
  202. package/node_modules/@maka/core/dist/relative-time.js +6 -5
  203. package/node_modules/@maka/core/dist/run-composition.js +77 -2
  204. package/node_modules/@maka/core/dist/runtime-boundary.js +109 -37
  205. package/node_modules/@maka/core/dist/runtime-event-store.js +6 -0
  206. package/node_modules/@maka/core/dist/runtime-event.js +248 -9
  207. package/node_modules/@maka/core/dist/runtime-handoff.js +98 -0
  208. package/node_modules/@maka/core/dist/runtime-invocation.js +223 -0
  209. package/node_modules/@maka/core/dist/runtime-logical-execution.js +112 -0
  210. package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +198 -44
  211. package/node_modules/@maka/core/dist/runtime-policy/credential-vault-codec.js +9 -1
  212. package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +93 -0
  213. package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +118 -4
  214. package/node_modules/@maka/core/dist/runtime-policy.js +6 -2
  215. package/node_modules/@maka/core/dist/scheduled-task.js +12 -2
  216. package/node_modules/@maka/core/dist/session-name.js +0 -1
  217. package/node_modules/@maka/core/dist/session-send-projection.js +2 -1
  218. package/node_modules/@maka/core/dist/session-start-mode.js +42 -0
  219. package/node_modules/@maka/core/dist/session-todo.js +101 -0
  220. package/node_modules/@maka/core/dist/session-trace.js +5 -1
  221. package/node_modules/@maka/core/dist/session.js +313 -52
  222. package/node_modules/@maka/core/dist/settings.js +27 -8
  223. package/node_modules/@maka/core/dist/slash-command-catalog.js +4 -0
  224. package/node_modules/@maka/core/dist/task-submission-readiness.js +2 -1
  225. package/node_modules/@maka/core/dist/text-sanitize.js +27 -2
  226. package/node_modules/@maka/core/dist/tool-activity-args.js +4 -0
  227. package/node_modules/@maka/core/dist/tool-quiet-preview.js +20 -10
  228. package/node_modules/@maka/core/dist/tool-result-archive-evidence.js +20 -0
  229. package/node_modules/@maka/core/dist/tool-result-record-schema.js +4 -2
  230. package/node_modules/@maka/core/dist/ui-locale.js +23 -10
  231. package/node_modules/@maka/core/dist/usage-ledger-merge.js +10 -9
  232. package/node_modules/@maka/core/dist/usage-record-schema.js +38 -30
  233. package/node_modules/@maka/core/dist/usage-stats/types.js +2 -0
  234. package/node_modules/@maka/core/dist/workhub-action-result.js +68 -0
  235. package/node_modules/@maka/core/dist/workhub-routing.js +126 -0
  236. package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/index.js +2175 -0
  237. package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
  238. package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
  239. package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
  240. package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
  241. package/node_modules/@maka/core/node_modules/intl-messageformat/intl-messageformat.iife.js +2807 -0
  242. package/node_modules/@maka/core/node_modules/intl-messageformat/package.json +40 -0
  243. package/node_modules/@maka/core/package.json +22 -3
  244. package/node_modules/@maka/eval/dist/experiment-directory.js +4 -13
  245. package/node_modules/@maka/eval/dist/external-subject.js +1 -1
  246. package/node_modules/@maka/eval/dist/harbor-external-subject.js +4 -3
  247. package/node_modules/@maka/eval/dist/harness-executor.js +3 -2
  248. package/node_modules/@maka/eval/dist/install-preflight.js +39 -10
  249. package/node_modules/@maka/eval/dist/process-termination.js +83 -0
  250. package/node_modules/@maka/eval/dist/toolchain-verification.js +1 -1
  251. package/node_modules/@maka/eval/harbor/egress-proxy/entrypoint.sh +2 -1
  252. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +4 -0
  253. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  254. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  255. package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
  256. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +7 -2
  257. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
  258. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  259. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  260. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +3 -2
  261. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  262. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
  263. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  264. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
  265. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  266. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
  267. package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +8 -0
  268. package/node_modules/@maka/eval/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  269. package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  270. package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +8 -0
  271. package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +83 -11
  272. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dump.js +1 -1
  273. package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +13 -1
  274. package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-utils.js +11 -10
  275. package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/parse.js +4 -2
  276. package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  277. package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  278. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/request.js +2 -3
  279. package/node_modules/@maka/eval/node_modules/undici/package.json +3 -3
  280. package/node_modules/@maka/eval/package.json +1 -1
  281. package/node_modules/@maka/mcp/dist/form-elicitation.js +213 -0
  282. package/node_modules/@maka/mcp/dist/index.js +465 -68
  283. package/node_modules/@maka/mcp/dist/sep-2243.js +3 -3
  284. package/node_modules/@maka/runtime/dist/active-tool-result-prune.js +45 -131
  285. package/node_modules/@maka/runtime/dist/agent-graph-timeline.js +12 -11
  286. package/node_modules/@maka/runtime/dist/agent-run-inspect.js +37 -85
  287. package/node_modules/@maka/runtime/dist/agent-run-recovery.js +36 -46
  288. package/node_modules/@maka/runtime/dist/agent-run.js +616 -468
  289. package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
  290. package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +125 -3751
  291. package/node_modules/@maka/runtime/dist/ai-sdk-compaction-contract.js +6 -1
  292. package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +553 -451
  293. package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +632 -0
  294. package/node_modules/@maka/runtime/dist/ai-sdk-tool-repair.js +115 -0
  295. package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +2716 -0
  296. package/node_modules/@maka/runtime/dist/archive-read-tool.js +30 -7
  297. package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
  298. package/node_modules/@maka/runtime/dist/bots/base-adapter.js +17 -0
  299. package/node_modules/@maka/runtime/dist/bots/bot-test.js +40 -23
  300. package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +93 -24
  301. package/node_modules/@maka/runtime/dist/bots/discord-bridge.js +4 -4
  302. package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +28 -25
  303. package/node_modules/@maka/runtime/dist/bots/qq-bridge.js +6 -4
  304. package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +8 -7
  305. package/node_modules/@maka/runtime/dist/bots/telegram-bridge.js +7 -31
  306. package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +104 -48
  307. package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +45 -42
  308. package/node_modules/@maka/runtime/dist/bots/ws-bridge-base.js +2 -3
  309. package/node_modules/@maka/runtime/dist/builtin-tools.js +48 -4
  310. package/node_modules/@maka/runtime/dist/bundled-skill-catalog.generated.js +1 -1
  311. package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
  312. package/node_modules/@maka/runtime/dist/computer-use-codec.js +1 -141
  313. package/node_modules/@maka/runtime/dist/computer-use-tools.js +27 -106
  314. package/node_modules/@maka/runtime/dist/context-budget-helpers.js +4 -57
  315. package/node_modules/@maka/runtime/dist/context-budget-policy.js +25 -54
  316. package/node_modules/@maka/runtime/dist/context-budget.js +32 -102
  317. package/node_modules/@maka/runtime/dist/context-diagnostics.js +72 -33
  318. package/node_modules/@maka/runtime/dist/continuation-replay.js +22 -11
  319. package/node_modules/@maka/runtime/dist/conversation-copy.js +559 -186
  320. package/node_modules/@maka/runtime/dist/cua-frame-state.js +1 -69
  321. package/node_modules/@maka/runtime/dist/deep-research-tools.js +15 -24
  322. package/node_modules/@maka/runtime/dist/durable-tool-result-projection.js +436 -0
  323. package/node_modules/@maka/runtime/dist/edit-replace.js +2 -2
  324. package/node_modules/@maka/runtime/dist/execution-inspect.js +56 -41
  325. package/node_modules/@maka/runtime/dist/filesystem-worker/operations.js +5 -6
  326. package/node_modules/@maka/runtime/dist/github-copilot-oauth-enrollment.js +267 -0
  327. package/node_modules/@maka/runtime/dist/goal-continuation.js +41 -5
  328. package/node_modules/@maka/runtime/dist/goal-evaluator.js +10 -4
  329. package/node_modules/@maka/runtime/dist/history-compact-checkpoint-coordinator.js +16 -6
  330. package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +79 -29
  331. package/node_modules/@maka/runtime/dist/history-compact-error.js +10 -2
  332. package/node_modules/@maka/runtime/dist/history-compact-input-fit.js +7 -1
  333. package/node_modules/@maka/runtime/dist/history-compact-ledger.js +18 -18
  334. package/node_modules/@maka/runtime/dist/history-compact-summarizer.js +132 -110
  335. package/node_modules/@maka/runtime/dist/history-compact-summary-validation.js +14 -30
  336. package/node_modules/@maka/runtime/dist/history-compaction.js +101 -89
  337. package/node_modules/@maka/runtime/dist/image-file.js +5 -20
  338. package/node_modules/@maka/runtime/dist/interaction-authority.js +85 -0
  339. package/node_modules/@maka/runtime/dist/latest-context-snapshot.js +112 -23
  340. package/node_modules/@maka/runtime/dist/ledger-tool-result-archive-reader.js +174 -0
  341. package/node_modules/@maka/runtime/dist/local-web-fetch.js +2 -43
  342. package/node_modules/@maka/runtime/dist/mcp-tools.js +93 -35
  343. package/node_modules/@maka/runtime/dist/memory-extraction-evidence.js +7 -1
  344. package/node_modules/@maka/runtime/dist/memory-extraction.js +23 -18
  345. package/node_modules/@maka/runtime/dist/message-authority.js +9 -0
  346. package/node_modules/@maka/runtime/dist/model-adapter.js +103 -122
  347. package/node_modules/@maka/runtime/dist/model-factory.js +34 -81
  348. package/node_modules/@maka/runtime/dist/model-fetcher.js +64 -10
  349. package/node_modules/@maka/runtime/dist/model-history.js +267 -157
  350. package/node_modules/@maka/runtime/dist/model-projection-transition-ledger.js +207 -0
  351. package/node_modules/@maka/runtime/dist/model-runtime.js +87 -110
  352. package/node_modules/@maka/runtime/dist/native-web-search-tool.js +2 -1
  353. package/node_modules/@maka/runtime/dist/oauth-provider-contracts.js +28 -1
  354. package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +28 -73
  355. package/node_modules/@maka/runtime/dist/openai-responses-websocket.js +2 -5
  356. package/node_modules/@maka/runtime/dist/opencode-session-header.js +31 -0
  357. package/node_modules/@maka/runtime/dist/plan-mode.js +0 -65
  358. package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
  359. package/node_modules/@maka/runtime/dist/plugin-agent-service.js +131 -0
  360. package/node_modules/@maka/runtime/dist/plugin-approval-service.js +33 -0
  361. package/node_modules/@maka/runtime/dist/plugin-attachment-service.js +53 -0
  362. package/node_modules/@maka/runtime/dist/plugin-command-service.js +100 -0
  363. package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +184 -22
  364. package/node_modules/@maka/runtime/dist/plugin-data-services.js +332 -0
  365. package/node_modules/@maka/runtime/dist/plugin-fs-service.js +62 -0
  366. package/node_modules/@maka/runtime/dist/plugin-goal-service.js +61 -0
  367. package/node_modules/@maka/runtime/dist/plugin-invocation-signal.js +24 -0
  368. package/node_modules/@maka/runtime/dist/plugin-llm-service.js +85 -0
  369. package/node_modules/@maka/runtime/dist/plugin-lsp-service.js +94 -0
  370. package/node_modules/@maka/runtime/dist/plugin-runtime.js +239 -10
  371. package/node_modules/@maka/runtime/dist/plugin-scope-registry.js +91 -0
  372. package/node_modules/@maka/runtime/dist/plugin-session-query-service.js +71 -0
  373. package/node_modules/@maka/runtime/dist/plugin-shell-env-service.js +87 -0
  374. package/node_modules/@maka/runtime/dist/plugin-shell-service.js +74 -0
  375. package/node_modules/@maka/runtime/dist/plugin-skill-service.js +93 -0
  376. package/node_modules/@maka/runtime/dist/plugin-system-prompt-service.js +346 -0
  377. package/node_modules/@maka/runtime/dist/plugin-tool-service.js +171 -0
  378. package/node_modules/@maka/runtime/dist/plugin-user-question-service.js +43 -0
  379. package/node_modules/@maka/runtime/dist/plugin-web-service.js +69 -0
  380. package/node_modules/@maka/runtime/dist/prior-run-context.js +24 -94
  381. package/node_modules/@maka/runtime/dist/process-tree-terminator.js +2 -2
  382. package/node_modules/@maka/runtime/dist/prompt-composition.js +36 -31
  383. package/node_modules/@maka/runtime/dist/provider-error-classification.js +84 -123
  384. package/node_modules/@maka/runtime/dist/provider-image-overflow-recovery.js +12 -31
  385. package/node_modules/@maka/runtime/dist/provider-request-telemetry.js +172 -196
  386. package/node_modules/@maka/runtime/dist/quiescent-session-snapshot.js +78 -0
  387. package/node_modules/@maka/runtime/dist/recovery-resolver.js +18 -14
  388. package/node_modules/@maka/runtime/dist/request-customization-fetch.js +14 -7
  389. package/node_modules/@maka/runtime/dist/request-shape.js +187 -365
  390. package/node_modules/@maka/runtime/dist/run-handoff-gate.js +97 -0
  391. package/node_modules/@maka/runtime/dist/run-trace.js +2 -34
  392. package/node_modules/@maka/runtime/dist/runtime-continuation-admission.js +1 -1
  393. package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +107 -65
  394. package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +238 -224
  395. package/node_modules/@maka/runtime/dist/runtime-kernel.js +518 -225
  396. package/node_modules/@maka/runtime/dist/runtime-ledger-repair.js +221 -448
  397. package/node_modules/@maka/runtime/dist/runtime-read-model.js +94 -198
  398. package/node_modules/@maka/runtime/dist/runtime-resume.js +162 -126
  399. package/node_modules/@maka/runtime/dist/sandbox/index.js +0 -1
  400. package/node_modules/@maka/runtime/dist/sandbox/linux-sandbox.js +0 -12
  401. package/node_modules/@maka/runtime/dist/sandbox/macos-seatbelt.js +68 -21
  402. package/node_modules/@maka/runtime/dist/sandbox/sandbox-manager.js +0 -35
  403. package/node_modules/@maka/runtime/dist/sandbox/windows-sandbox.js +0 -12
  404. package/node_modules/@maka/runtime/dist/scheduled-task-tools.js +3 -0
  405. package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +62 -21
  406. package/node_modules/@maka/runtime/dist/session-export.js +178 -0
  407. package/node_modules/@maka/runtime/dist/session-import.js +100 -0
  408. package/node_modules/@maka/runtime/dist/session-manager.js +666 -855
  409. package/node_modules/@maka/runtime/dist/session-projection-helpers.js +16 -28
  410. package/node_modules/@maka/runtime/dist/session-recap.js +83 -15
  411. package/node_modules/@maka/runtime/dist/session-todo-tools.js +67 -0
  412. package/node_modules/@maka/runtime/dist/session-trace-projection.js +25 -30
  413. package/node_modules/@maka/runtime/dist/shell-detect.js +3 -7
  414. package/node_modules/@maka/runtime/dist/shell-run-contract.js +0 -1
  415. package/node_modules/@maka/runtime/dist/shell-run-manager.js +10 -45
  416. package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +13 -6
  417. package/node_modules/@maka/runtime/dist/shell-tools.js +78 -2
  418. package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +64 -13
  419. package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
  420. package/node_modules/@maka/runtime/dist/stream-graph-projection.js +18 -15
  421. package/node_modules/@maka/runtime/dist/stream-graph-read-model.js +5 -0
  422. package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -8
  423. package/node_modules/@maka/runtime/dist/stream-usage-fallback-fetch.js +74 -0
  424. package/node_modules/@maka/runtime/dist/subagent-tools.js +2 -80
  425. package/node_modules/@maka/runtime/dist/subscription-credentials.js +51 -4
  426. package/node_modules/@maka/runtime/dist/subscription-model-fetch.js +51 -11
  427. package/node_modules/@maka/runtime/dist/system-prompt/main-session-prompt.js +21 -2
  428. package/node_modules/@maka/runtime/dist/system-prompt/workspace-instructions.js +11 -6
  429. package/node_modules/@maka/runtime/dist/tavily-search.js +8 -2
  430. package/node_modules/@maka/runtime/dist/telemetry/model-pricing.generated.js +93 -83
  431. package/node_modules/@maka/runtime/dist/terminal-run-commit.js +37 -172
  432. package/node_modules/@maka/runtime/dist/test-connection.js +36 -30
  433. package/node_modules/@maka/runtime/dist/text-line-window.js +49 -0
  434. package/node_modules/@maka/runtime/dist/tool-activation-identity.js +41 -0
  435. package/node_modules/@maka/runtime/dist/tool-availability.js +85 -7
  436. package/node_modules/@maka/runtime/dist/tool-output.js +35 -12
  437. package/node_modules/@maka/runtime/dist/tool-result-archive-encoding.js +38 -0
  438. package/node_modules/@maka/runtime/dist/tool-result-archive-resource.js +396 -53
  439. package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +288 -0
  440. package/node_modules/@maka/runtime/dist/tool-result-archive.js +67 -172
  441. package/node_modules/@maka/runtime/dist/tool-runtime.js +374 -122
  442. package/node_modules/@maka/runtime/dist/unified-diff.js +40 -10
  443. package/node_modules/@maka/runtime/dist/web-fetch-tool.js +4 -2
  444. package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +6222 -1798
  445. package/node_modules/@maka/runtime/dist/workspace-executor.js +2 -6
  446. package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +13 -0
  447. package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +551 -0
  448. package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/package.json +78 -0
  449. package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/CHANGELOG.md +3269 -0
  450. package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +13 -0
  451. package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/dist/index.js +3835 -0
  452. package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +1610 -0
  453. package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/package.json +80 -0
  454. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  455. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +13 -0
  456. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +1 -0
  457. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  458. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +63 -0
  459. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/README.md +44 -8
  460. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/package.json +4 -4
  461. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +39 -3
  462. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +4 -0
  463. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +4 -4
  464. package/node_modules/@maka/runtime/node_modules/ai/CHANGELOG.md +10271 -0
  465. package/node_modules/@maka/runtime/node_modules/ai/LICENSE +13 -0
  466. package/node_modules/@maka/runtime/node_modules/ai/dist/index.js +20146 -0
  467. package/node_modules/@maka/runtime/node_modules/ai/dist/internal/index.js +3690 -0
  468. package/node_modules/@maka/runtime/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +185 -0
  469. package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/04-loop-control.mdx +517 -0
  470. package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +413 -0
  471. package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +338 -0
  472. package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +815 -0
  473. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +525 -0
  474. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +1512 -0
  475. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +680 -0
  476. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +371 -0
  477. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +333 -0
  478. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +163 -0
  479. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +180 -0
  480. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +372 -0
  481. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +241 -0
  482. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +855 -0
  483. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/index.mdx +137 -0
  484. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +683 -0
  485. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +69 -0
  486. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +47 -0
  487. package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +826 -0
  488. package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +406 -0
  489. package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +216 -0
  490. package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +582 -0
  491. package/node_modules/@maka/runtime/node_modules/ai/docs/06-advanced/04-caching.mdx +182 -0
  492. package/node_modules/@maka/runtime/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +117 -0
  493. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +3267 -0
  494. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +4303 -0
  495. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +330 -0
  496. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +332 -0
  497. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +331 -0
  498. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +253 -0
  499. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +125 -0
  500. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +1102 -0
  501. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
  502. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
  503. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
  504. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
  505. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
  506. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +368 -0
  507. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +331 -0
  508. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +147 -0
  509. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +250 -0
  510. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +493 -0
  511. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +256 -0
  512. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +199 -0
  513. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +125 -0
  514. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +1035 -0
  515. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +361 -0
  516. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +157 -0
  517. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +32 -0
  518. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +31 -0
  519. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +43 -0
  520. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +52 -0
  521. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
  522. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +43 -0
  523. package/node_modules/@maka/runtime/node_modules/ai/package.json +127 -0
  524. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +4 -0
  525. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  526. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  527. package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
  528. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +7 -2
  529. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
  530. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  531. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  532. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +3 -2
  533. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  534. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
  535. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  536. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
  537. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  538. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
  539. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +8 -0
  540. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  541. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  542. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +8 -0
  543. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +83 -11
  544. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dump.js +1 -1
  545. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +13 -1
  546. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-utils.js +11 -10
  547. package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/parse.js +4 -2
  548. package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  549. package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  550. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/request.js +2 -3
  551. package/node_modules/@maka/runtime/node_modules/undici/package.json +3 -3
  552. package/node_modules/@maka/runtime/package.json +39 -15
  553. package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +75 -38
  554. package/node_modules/@maka/runtime-host/dist/candidate-entry.js +10 -2
  555. package/node_modules/@maka/runtime-host/dist/candidate-launch-owner-guard.js +13 -0
  556. package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +64 -25
  557. package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +87 -3
  558. package/node_modules/@maka/runtime-host/dist/client/connect-or-spawn.js +13 -2
  559. package/node_modules/@maka/runtime-host/dist/client/connection.js +144 -51
  560. package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +244 -0
  561. package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +309 -0
  562. package/node_modules/@maka/runtime-host/dist/client/host-profile.js +483 -94
  563. package/node_modules/@maka/runtime-host/dist/client/host-retirement.js +28 -5
  564. package/node_modules/@maka/runtime-host/dist/client/index.js +12 -8
  565. package/node_modules/@maka/runtime-host/dist/client/launcher.js +12 -3
  566. package/node_modules/@maka/runtime-host/dist/client/oauth-presentation.js +1 -1
  567. package/node_modules/@maka/runtime-host/dist/client/owner-connection-code.js +38 -4
  568. package/node_modules/@maka/runtime-host/dist/client/peer-client.js +408 -25
  569. package/node_modules/@maka/runtime-host/dist/client/process-identity.js +73 -0
  570. package/node_modules/@maka/runtime-host/dist/client/reconnect-lifecycle.js +72 -7
  571. package/node_modules/@maka/runtime-host/dist/client/reconnecting-connection.js +8 -0
  572. package/node_modules/@maka/runtime-host/dist/client/registered-host-termination.js +107 -0
  573. package/node_modules/@maka/runtime-host/dist/client/remote-compatibility-error.js +2 -0
  574. package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +46 -5
  575. package/node_modules/@maka/runtime-host/dist/client/ssh-operator-activation.js +48 -11
  576. package/node_modules/@maka/runtime-host/dist/client/wsl-control.js +0 -8
  577. package/node_modules/@maka/runtime-host/dist/client/wsl-environment.js +12 -8
  578. package/node_modules/@maka/runtime-host/dist/client-capability-entity-id.js +27 -0
  579. package/node_modules/@maka/runtime-host/dist/control/endpoint.js +1 -3
  580. package/node_modules/@maka/runtime-host/dist/node-error.js +22 -0
  581. package/node_modules/@maka/runtime-host/dist/operator/access-management-frame.js +10 -1
  582. package/node_modules/@maka/runtime-host/dist/operator/index.js +5 -2
  583. package/node_modules/@maka/runtime-host/dist/operator/managed-deployment.js +17 -8
  584. package/node_modules/@maka/runtime-host/dist/operator/operator-command.js +110 -0
  585. package/node_modules/@maka/runtime-host/dist/operator/peer-management-frame.js +2 -0
  586. package/node_modules/@maka/runtime-host/dist/operator/peer-mesh-management-frame.js +14 -0
  587. package/node_modules/@maka/runtime-host/dist/operator/retirement-cancellation.js +20 -0
  588. package/node_modules/@maka/runtime-host/dist/operator/service-management-frame.js +5 -6
  589. package/node_modules/@maka/runtime-host/dist/operator/setup-frame.js +32 -6
  590. package/node_modules/@maka/runtime-host/dist/peer-mesh/display-name.js +30 -0
  591. package/node_modules/@maka/runtime-host/dist/peer-mesh/index.js +3 -3
  592. package/node_modules/@maka/runtime-host/dist/peer-mesh/limits.js +1 -2
  593. package/node_modules/@maka/runtime-host/dist/peer-mesh/model.js +72 -73
  594. package/node_modules/@maka/runtime-host/dist/peer-mesh/node.js +1334 -418
  595. package/node_modules/@maka/runtime-host/dist/peer-mesh/owner.js +33 -68
  596. package/node_modules/@maka/runtime-host/dist/peer-mesh/store.js +147 -52
  597. package/node_modules/@maka/runtime-host/dist/peer-reachability/index.js +21 -0
  598. package/node_modules/@maka/runtime-host/dist/peer-reachability/model.js +202 -0
  599. package/node_modules/@maka/runtime-host/dist/peer-reachability/owner.js +118 -0
  600. package/node_modules/@maka/runtime-host/dist/peer-reachability/publisher.js +243 -0
  601. package/node_modules/@maka/runtime-host/dist/protocol/agent-graph.js +4 -1
  602. package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +11 -20
  603. package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +233 -41
  604. package/node_modules/@maka/runtime-host/dist/protocol/configuration.js +55 -9
  605. package/node_modules/@maka/runtime-host/dist/protocol/connection-catalog-change.js +26 -0
  606. package/node_modules/@maka/runtime-host/dist/protocol/connection-effects.js +15 -8
  607. package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
  608. package/node_modules/@maka/runtime-host/dist/protocol/external-session.js +4 -0
  609. package/node_modules/@maka/runtime-host/dist/protocol/host-resources.js +253 -0
  610. package/node_modules/@maka/runtime-host/dist/protocol/host-status.js +49 -11
  611. package/node_modules/@maka/runtime-host/dist/protocol/index.js +202 -2
  612. package/node_modules/@maka/runtime-host/dist/protocol/message.js +12 -7
  613. package/node_modules/@maka/runtime-host/dist/protocol/network-proxy.js +1 -7
  614. package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +104 -8
  615. package/node_modules/@maka/runtime-host/dist/protocol/operations.js +21 -5
  616. package/node_modules/@maka/runtime-host/dist/protocol/peer-mesh.js +72 -32
  617. package/node_modules/@maka/runtime-host/dist/protocol/plan.js +1 -0
  618. package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +559 -0
  619. package/node_modules/@maka/runtime-host/dist/protocol/project-catalog.js +2 -2
  620. package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +81 -26
  621. package/node_modules/@maka/runtime-host/dist/protocol/scheduled-task.js +19 -6
  622. package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
  623. package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +1 -1
  624. package/node_modules/@maka/runtime-host/dist/protocol/session-collaboration.js +68 -4
  625. package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +42 -21
  626. package/node_modules/@maka/runtime-host/dist/protocol/session-retirement.js +30 -3
  627. package/node_modules/@maka/runtime-host/dist/protocol/session-revision.js +11 -2
  628. package/node_modules/@maka/runtime-host/dist/protocol/session-todo.js +53 -0
  629. package/node_modules/@maka/runtime-host/dist/protocol/session-transcript.js +3 -7
  630. package/node_modules/@maka/runtime-host/dist/protocol/session-turns.js +29 -58
  631. package/node_modules/@maka/runtime-host/dist/protocol/skill-catalog.js +2 -1
  632. package/node_modules/@maka/runtime-host/dist/protocol/turn.js +16 -13
  633. package/node_modules/@maka/runtime-host/dist/protocol/usage-pricing.js +20 -2
  634. package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +174 -75
  635. package/node_modules/@maka/runtime-host/dist/server/access-authority.js +87 -22
  636. package/node_modules/@maka/runtime-host/dist/server/access-credential-metadata.js +4 -2
  637. package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +135 -48
  638. package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
  639. package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
  640. package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
  641. package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +0 -3
  642. package/node_modules/@maka/runtime-host/dist/server/agent-graph-execution-coordinator.js +1 -2
  643. package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +19 -22
  644. package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +10 -4
  645. package/node_modules/@maka/runtime-host/dist/server/candidate.js +3 -0
  646. package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +2 -1
  647. package/node_modules/@maka/runtime-host/dist/server/canonical-turn-snapshot.js +34 -24
  648. package/node_modules/@maka/runtime-host/dist/server/canonical-usage-reader.js +24 -11
  649. package/node_modules/@maka/runtime-host/dist/server/child-agent-composition.js +1 -1
  650. package/node_modules/@maka/runtime-host/dist/server/client-capability-coordinator.js +282 -30
  651. package/node_modules/@maka/runtime-host/dist/server/client-capability-invocation-broker.js +258 -51
  652. package/node_modules/@maka/runtime-host/dist/server/client-capability-provider-id.js +31 -0
  653. package/node_modules/@maka/runtime-host/dist/server/client-capability-recovery.js +10 -7
  654. package/node_modules/@maka/runtime-host/dist/server/configuration-coordinator.js +20 -1
  655. package/node_modules/@maka/runtime-host/dist/server/connection-effect-coordinator.js +43 -18
  656. package/node_modules/@maka/runtime-host/dist/server/connection-session.js +45 -14
  657. package/node_modules/@maka/runtime-host/dist/server/daily-review-coordinator.js +164 -82
  658. package/node_modules/@maka/runtime-host/dist/server/deep-research-coordinator.js +1 -1
  659. package/node_modules/@maka/runtime-host/dist/server/execution-artifacts.js +65 -36
  660. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +1074 -176
  661. package/node_modules/@maka/runtime-host/dist/server/execution-inspect-coordinator.js +35 -29
  662. package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +112 -18
  663. package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +85 -73
  664. package/node_modules/@maka/runtime-host/dist/server/execution-service.js +49 -24
  665. package/node_modules/@maka/runtime-host/dist/server/extension-bundle.js +249 -0
  666. package/node_modules/@maka/runtime-host/dist/server/extension-package-manifest.js +262 -0
  667. package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
  668. package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +13 -10
  669. package/node_modules/@maka/runtime-host/dist/server/failure-diagnostic.js +24 -0
  670. package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +53 -28
  671. package/node_modules/@maka/runtime-host/dist/server/host-change-feed.js +11 -0
  672. package/node_modules/@maka/runtime-host/dist/server/host-kernel.js +163 -27
  673. package/node_modules/@maka/runtime-host/dist/server/host-residency-registry.js +41 -20
  674. package/node_modules/@maka/runtime-host/dist/server/host-resource-collector.js +223 -0
  675. package/node_modules/@maka/runtime-host/dist/server/host-resource-probe-main.js +44 -0
  676. package/node_modules/@maka/runtime-host/dist/server/host-resource-probe.js +83 -0
  677. package/node_modules/@maka/runtime-host/dist/server/host-session-availability.js +5 -2
  678. package/node_modules/@maka/runtime-host/dist/server/hosted-execution-admission-registry.js +3 -1
  679. package/node_modules/@maka/runtime-host/dist/server/hosted-execution-projection.js +12 -7
  680. package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +131 -69
  681. package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +64 -4
  682. package/node_modules/@maka/runtime-host/dist/server/index.js +5 -0
  683. package/node_modules/@maka/runtime-host/dist/server/interaction-coordinator.js +305 -34
  684. package/node_modules/@maka/runtime-host/dist/server/interaction-projection.js +36 -1
  685. package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +173 -109
  686. package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
  687. package/node_modules/@maka/runtime-host/dist/server/listener-set.js +6 -4
  688. package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
  689. package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +339 -66
  690. package/node_modules/@maka/runtime-host/dist/server/model-metadata-refresh.js +96 -0
  691. package/node_modules/@maka/runtime-host/dist/server/network-proxy-coordinator.js +0 -1
  692. package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +169 -45
  693. package/node_modules/@maka/runtime-host/dist/server/oauth-execution-authority.js +20 -3
  694. package/node_modules/@maka/runtime-host/dist/server/operation-dispatcher.js +47 -125
  695. package/node_modules/@maka/runtime-host/dist/server/peer-listener.js +131 -48
  696. package/node_modules/@maka/runtime-host/dist/server/peer-mesh-authority.js +20 -1
  697. package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +11 -5
  698. package/node_modules/@maka/runtime-host/dist/server/plugin-composition-patch.js +58 -0
  699. package/node_modules/@maka/runtime-host/dist/server/plugin-composition-store.js +141 -0
  700. package/node_modules/@maka/runtime-host/dist/server/plugin-data-runtime.js +234 -0
  701. package/node_modules/@maka/runtime-host/dist/server/plugin-package-loader.js +130 -0
  702. package/node_modules/@maka/runtime-host/dist/server/plugin-package-store.js +528 -0
  703. package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +263 -0
  704. package/node_modules/@maka/runtime-host/dist/server/plugin-platform.js +1148 -0
  705. package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
  706. package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
  707. package/node_modules/@maka/runtime-host/dist/server/root-admission-owner.js +32 -7
  708. package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +689 -188
  709. package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +72 -18
  710. package/node_modules/@maka/runtime-host/dist/server/runtime-resource-coordinator.js +11 -8
  711. package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +12 -18
  712. package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +150 -41
  713. package/node_modules/@maka/runtime-host/dist/server/serial-outbound-writer.js +46 -4
  714. package/node_modules/@maka/runtime-host/dist/server/session-admission-gate.js +21 -1
  715. package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +163 -0
  716. package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +247 -33
  717. package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +107 -46
  718. package/node_modules/@maka/runtime-host/dist/server/session-effect-coordinator.js +1 -1
  719. package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +66 -14
  720. package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +113 -67
  721. package/node_modules/@maka/runtime-host/dist/server/session-revision-graph-references.js +18 -10
  722. package/node_modules/@maka/runtime-host/dist/server/session-sidecar-purge.js +2 -1
  723. package/node_modules/@maka/runtime-host/dist/server/session-todo-coordinator.js +77 -0
  724. package/node_modules/@maka/runtime-host/dist/server/session-transcript-pager.js +34 -5
  725. package/node_modules/@maka/runtime-host/dist/server/session-transcript-reader.js +371 -70
  726. package/node_modules/@maka/runtime-host/dist/server/session-turn-access-request-coordinator.js +43 -26
  727. package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +4 -1
  728. package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +18 -2
  729. package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
  730. package/node_modules/@maka/runtime-host/dist/server/storage-maintenance.js +109 -0
  731. package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +79 -35
  732. package/node_modules/@maka/runtime-host/dist/server/web-fetch-tool.js +1 -1
  733. package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +545 -33
  734. package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +446 -131
  735. package/node_modules/@maka/runtime-host/dist/server/workhub-message-attachments.js +46 -0
  736. package/node_modules/@maka/runtime-host/dist/transport/framed-byte-stream-transport.js +4 -1
  737. package/node_modules/@maka/runtime-host/dist/transport/local-ipc-framing.js +4 -2
  738. package/node_modules/@maka/runtime-host/dist/transport/peer-native.js +112 -24
  739. package/node_modules/@maka/runtime-host/dist/transport/resumable-peer-stream.js +469 -0
  740. package/node_modules/@maka/runtime-host/dist/webrtc-stun-policy.js +114 -0
  741. package/node_modules/@maka/runtime-host/package.json +7 -1
  742. package/node_modules/@maka/storage/dist/agent-run-store.js +350 -236
  743. package/node_modules/@maka/storage/dist/artifact-attachments.js +66 -18
  744. package/node_modules/@maka/storage/dist/artifact-metadata-codec.js +24 -28
  745. package/node_modules/@maka/storage/dist/artifact-store.js +203 -767
  746. package/node_modules/@maka/storage/dist/artifact-stores.js +6 -10
  747. package/node_modules/@maka/storage/dist/artifact-writer-lock.js +1 -1
  748. package/node_modules/@maka/storage/dist/atomic-file-write.js +74 -0
  749. package/node_modules/@maka/storage/dist/claude-code-session-adapter.js +0 -5
  750. package/node_modules/@maka/storage/dist/codex-session-adapter.js +298 -198
  751. package/node_modules/@maka/storage/dist/context-offload-snapshot.js +397 -0
  752. package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
  753. package/node_modules/@maka/storage/dist/conversation-operational-state.js +7 -0
  754. package/node_modules/@maka/storage/dist/credential-store.js +15 -63
  755. package/node_modules/@maka/storage/dist/execution-record-codec.js +1 -22
  756. package/node_modules/@maka/storage/dist/execution-stores.js +37 -21
  757. package/node_modules/@maka/storage/dist/file-lifetime-owner.js +30 -2
  758. package/node_modules/@maka/storage/dist/file-session-repository.js +1012 -0
  759. package/node_modules/@maka/storage/dist/git-exec.js +61 -0
  760. package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +8 -35
  761. package/node_modules/@maka/storage/dist/goal-authority.js +2 -2
  762. package/node_modules/@maka/storage/dist/interaction-store-public.js +1 -1
  763. package/node_modules/@maka/storage/dist/interaction-store.js +188 -3
  764. package/node_modules/@maka/storage/dist/legacy-run-header.js +327 -0
  765. package/node_modules/@maka/storage/dist/mcp-config-store.js +10 -25
  766. package/node_modules/@maka/storage/dist/message-admission-store.js +3 -0
  767. package/node_modules/@maka/storage/dist/model-call-ledger.js +199 -32
  768. package/node_modules/@maka/storage/dist/model-call-usage-sql.js +136 -0
  769. package/node_modules/@maka/storage/dist/model-facts-store.js +56 -0
  770. package/node_modules/@maka/storage/dist/opencode-session-adapter.js +0 -4
  771. package/node_modules/@maka/storage/dist/operational-state-backup.js +15 -11
  772. package/node_modules/@maka/storage/dist/operational-state-store-public.js +1 -1
  773. package/node_modules/@maka/storage/dist/operational-state-store.js +27 -2
  774. package/node_modules/@maka/storage/dist/production-session-snapshot.js +761 -0
  775. package/node_modules/@maka/storage/dist/project-catalog.js +8 -23
  776. package/node_modules/@maka/storage/dist/quiescent-session-snapshot.js +1154 -0
  777. package/node_modules/@maka/storage/dist/runtime-event-invariants.js +2 -2
  778. package/node_modules/@maka/storage/dist/runtime-event-persistence.js +6 -0
  779. package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +182 -62
  780. package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +540 -117
  781. package/node_modules/@maka/storage/dist/runtime-policy/document-io.js +22 -16
  782. package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +207 -0
  783. package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +148 -5
  784. package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +10 -4
  785. package/node_modules/@maka/storage/dist/runtime-policy-stores.js +7 -3
  786. package/node_modules/@maka/storage/dist/runtime-transcript-query.js +308 -0
  787. package/node_modules/@maka/storage/dist/scheduled-task-store.js +256 -283
  788. package/node_modules/@maka/storage/dist/session-bundle-manifest.js +5 -17
  789. package/node_modules/@maka/storage/dist/session-bundle-policy.js +1031 -34
  790. package/node_modules/@maka/storage/dist/session-bundle-ustar.js +12 -0
  791. package/node_modules/@maka/storage/dist/session-copy-cleanup.js +12 -7
  792. package/node_modules/@maka/storage/dist/session-message-projection.js +24 -5
  793. package/node_modules/@maka/storage/dist/session-repository.js +767 -0
  794. package/node_modules/@maka/storage/dist/session-store.js +110 -115
  795. package/node_modules/@maka/storage/dist/session-todo-authority.js +106 -0
  796. package/node_modules/@maka/storage/dist/session-todo-store.js +169 -0
  797. package/node_modules/@maka/storage/dist/settings-store.js +24 -29
  798. package/node_modules/@maka/storage/dist/sqlite-artifact-metadata.js +51 -17
  799. package/node_modules/@maka/storage/dist/sqlite-artifact-schema.js +55 -5
  800. package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +42 -12
  801. package/node_modules/@maka/storage/dist/sqlite-core-execution-schema.js +45 -2
  802. package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +367 -1
  803. package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +373 -82
  804. package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +63 -5
  805. package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +493 -914
  806. package/node_modules/@maka/storage/dist/sqlite-usage-schema.js +200 -20
  807. package/node_modules/@maka/storage/dist/sqlite-usage-store.js +29 -6
  808. package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +5 -8
  809. package/node_modules/@maka/storage/dist/stable-storage.js +16 -2
  810. package/node_modules/@maka/storage/dist/storage-id.js +28 -0
  811. package/node_modules/@maka/storage/dist/storage-writer-composition.js +3 -3
  812. package/node_modules/@maka/storage/dist/tool-result-archive-evidence.js +138 -0
  813. package/node_modules/@maka/storage/dist/usage-stores.js +9 -3
  814. package/node_modules/@maka/storage/dist/work-board-store.js +4 -4
  815. package/node_modules/@maka/storage/dist/workspace-identity.js +2 -15
  816. package/node_modules/@maka/storage/dist/workspace-version-authority-internal.js +1 -8
  817. package/node_modules/@maka/storage/package.json +8 -2
  818. package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +22 -5
  819. package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +22 -5
  820. package/node_modules/@slack/types/dist/events/agent.js +3 -0
  821. package/node_modules/@slack/types/dist/events/index.js +44 -0
  822. package/node_modules/@slack/types/package.json +47 -0
  823. package/node_modules/@slack/web-api/README.md +382 -0
  824. package/node_modules/@slack/web-api/dist/methods.js +1636 -0
  825. package/node_modules/@slack/web-api/dist/types/request/agents.js +3 -0
  826. package/node_modules/@slack/web-api/dist/types/request/blocks.js +3 -0
  827. package/node_modules/@slack/web-api/dist/types/response/AdminUsersGetExpirationResponse.js +11 -0
  828. package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsRenameResponse.js +11 -0
  829. package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsSetStatusResponse.js +11 -0
  830. package/node_modules/@slack/web-api/dist/types/response/BlocksValidateResponse.js +11 -0
  831. package/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +11 -0
  832. package/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +11 -0
  833. package/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +48 -0
  834. package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +67 -0
  835. package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +72 -0
  836. package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +48 -0
  837. package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +11 -0
  838. package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +11 -0
  839. package/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +11 -0
  840. package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +11 -0
  841. package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +11 -0
  842. package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +11 -0
  843. package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +11 -0
  844. package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +11 -0
  845. package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +11 -0
  846. package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +11 -0
  847. package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +11 -0
  848. package/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +11 -0
  849. package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +11 -0
  850. package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +11 -0
  851. package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +11 -0
  852. package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +11 -0
  853. package/node_modules/@slack/web-api/node_modules/@types/retry/LICENSE +21 -0
  854. package/node_modules/@slack/web-api/node_modules/@types/retry/README.md +15 -0
  855. package/node_modules/@slack/web-api/node_modules/@types/retry/package.json +30 -0
  856. package/node_modules/@slack/web-api/package.json +71 -0
  857. package/node_modules/@types/node/README.md +1 -1
  858. package/node_modules/@types/node/package.json +2 -2
  859. package/node_modules/fast-uri/index.js +215 -47
  860. package/node_modules/fast-uri/lib/schemes.js +9 -4
  861. package/node_modules/fast-uri/lib/utils.js +396 -92
  862. package/node_modules/fast-uri/package.json +1 -1
  863. package/node_modules/fs-native-extensions/package.json +1 -1
  864. package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.bare +0 -0
  865. package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.bare +0 -0
  866. package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.bare +0 -0
  867. package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.bare +0 -0
  868. package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.bare +0 -0
  869. package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.node +0 -0
  870. package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.bare +0 -0
  871. package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.node +0 -0
  872. package/node_modules/fs-native-extensions/prebuilds/ios-arm64/fs-native-extensions.bare +0 -0
  873. package/node_modules/fs-native-extensions/prebuilds/ios-arm64-simulator/fs-native-extensions.bare +0 -0
  874. package/node_modules/fs-native-extensions/prebuilds/ios-x64-simulator/fs-native-extensions.bare +0 -0
  875. package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.bare +0 -0
  876. package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.bare +0 -0
  877. package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.bare +0 -0
  878. package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.node +0 -0
  879. package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.bare +0 -0
  880. package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.node +0 -0
  881. package/node_modules/fs-native-extensions/src/win32.c +50 -11
  882. package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
  883. package/node_modules/qs/CHANGELOG.md +15 -0
  884. package/node_modules/qs/README.md +19 -1
  885. package/node_modules/qs/dist/qs.js +21 -21
  886. package/node_modules/qs/eslint.config.mjs +1 -1
  887. package/node_modules/qs/lib/parse.js +3 -4
  888. package/node_modules/qs/lib/stringify.js +23 -8
  889. package/node_modules/qs/lib/utils.js +10 -3
  890. package/node_modules/qs/package.json +4 -4
  891. package/node_modules/run/README.md +109 -18
  892. package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
  893. package/node_modules/run/dist/continuation-validation.js +116 -1
  894. package/node_modules/run/dist/errors.js +12 -2
  895. package/node_modules/run/dist/host-function-invocation.js +2 -1
  896. package/node_modules/run/dist/run.js +30 -4
  897. package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
  898. package/node_modules/run/dist/runtime/guest-sources.js +214 -56
  899. package/node_modules/run/dist/runtime/manager.js +575 -116
  900. package/node_modules/run/dist/runtime/max-workers.js +8 -4
  901. package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
  902. package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
  903. package/node_modules/run/dist/runtime/worker-source.js +1 -1
  904. package/node_modules/run/dist/utils/options.js +7 -0
  905. package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
  906. package/node_modules/run/dist/utils/serde.js +1 -7
  907. package/node_modules/run/dist/utils/source-cache.js +83 -13
  908. package/node_modules/run/package.json +6 -4
  909. package/node_modules/systeminformation/LICENSE +20 -0
  910. package/node_modules/systeminformation/README.md +1251 -0
  911. package/node_modules/systeminformation/lib/audio.js +335 -0
  912. package/node_modules/systeminformation/lib/battery.js +334 -0
  913. package/node_modules/systeminformation/lib/bluetooth.js +315 -0
  914. package/node_modules/systeminformation/lib/bluetoothVendors.js +1138 -0
  915. package/node_modules/systeminformation/lib/cli.js +100 -0
  916. package/node_modules/systeminformation/lib/cpu.js +2285 -0
  917. package/node_modules/systeminformation/lib/docker.js +791 -0
  918. package/node_modules/systeminformation/lib/dockerSocket.js +117 -0
  919. package/node_modules/systeminformation/lib/filesystem.js +1853 -0
  920. package/node_modules/systeminformation/lib/graphics.js +1317 -0
  921. package/node_modules/systeminformation/lib/index.js +520 -0
  922. package/node_modules/systeminformation/lib/internet.js +265 -0
  923. package/node_modules/systeminformation/lib/memory.js +622 -0
  924. package/node_modules/systeminformation/lib/network.js +2008 -0
  925. package/node_modules/systeminformation/lib/osinfo.js +1290 -0
  926. package/node_modules/systeminformation/lib/printer.js +209 -0
  927. package/node_modules/systeminformation/lib/processes.js +1459 -0
  928. package/node_modules/systeminformation/lib/system.js +855 -0
  929. package/node_modules/systeminformation/lib/usb.js +309 -0
  930. package/node_modules/systeminformation/lib/users.js +412 -0
  931. package/node_modules/systeminformation/lib/util.js +2833 -0
  932. package/node_modules/systeminformation/lib/virtualbox.js +116 -0
  933. package/node_modules/systeminformation/lib/wifi.js +839 -0
  934. package/node_modules/systeminformation/package.json +102 -0
  935. package/node_modules/undici/docs/docs/api/Client.md +4 -0
  936. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  937. package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  938. package/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
  939. package/node_modules/undici/lib/dispatcher/agent.js +7 -2
  940. package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
  941. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  942. package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  943. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  944. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  945. package/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
  946. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  947. package/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
  948. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  949. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
  950. package/node_modules/undici/lib/handler/cache-handler.js +8 -0
  951. package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  952. package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  953. package/node_modules/undici/lib/handler/redirect-handler.js +8 -0
  954. package/node_modules/undici/lib/handler/retry-handler.js +83 -11
  955. package/node_modules/undici/lib/interceptor/dump.js +1 -1
  956. package/node_modules/undici/lib/mock/mock-agent.js +13 -1
  957. package/node_modules/undici/lib/mock/mock-utils.js +11 -10
  958. package/node_modules/undici/lib/web/cookies/parse.js +4 -2
  959. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  960. package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  961. package/node_modules/undici/lib/web/fetch/request.js +2 -3
  962. package/node_modules/undici/package.json +3 -3
  963. package/node_modules/zod/README.md +27 -0
  964. package/node_modules/zod/compile.cjs +77 -0
  965. package/node_modules/zod/compile.js +52 -0
  966. package/node_modules/zod/index.cjs +2 -2
  967. package/node_modules/zod/index.js +5 -2
  968. package/node_modules/zod/package.json +13 -2
  969. package/node_modules/zod/v3/ZodError.cjs +22 -12
  970. package/node_modules/zod/v3/ZodError.js +22 -12
  971. package/node_modules/zod/v3/types.cjs +7 -5
  972. package/node_modules/zod/v3/types.js +7 -5
  973. package/node_modules/zod/v4/classic/checks.cjs +2 -1
  974. package/node_modules/zod/v4/classic/checks.js +1 -1
  975. package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
  976. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  977. package/node_modules/zod/v4/classic/errors.cjs +43 -34
  978. package/node_modules/zod/v4/classic/errors.js +43 -34
  979. package/node_modules/zod/v4/classic/external.cjs +30 -27
  980. package/node_modules/zod/v4/classic/external.js +5 -8
  981. package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
  982. package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
  983. package/node_modules/zod/v4/classic/in-out.cjs +63 -0
  984. package/node_modules/zod/v4/classic/in-out.js +36 -0
  985. package/node_modules/zod/v4/classic/index.cjs +2 -2
  986. package/node_modules/zod/v4/classic/index.js +2 -2
  987. package/node_modules/zod/v4/classic/iso.cjs +11 -22
  988. package/node_modules/zod/v4/classic/iso.js +2 -17
  989. package/node_modules/zod/v4/classic/parse.cjs +4 -1
  990. package/node_modules/zod/v4/classic/parse.js +1 -0
  991. package/node_modules/zod/v4/classic/schemas.cjs +498 -398
  992. package/node_modules/zod/v4/classic/schemas.js +492 -396
  993. package/node_modules/zod/v4/core/api.cjs +23 -4
  994. package/node_modules/zod/v4/core/api.js +21 -4
  995. package/node_modules/zod/v4/core/checks.cjs +37 -31
  996. package/node_modules/zod/v4/core/checks.js +37 -31
  997. package/node_modules/zod/v4/core/compile.cjs +1813 -0
  998. package/node_modules/zod/v4/core/compile.js +1783 -0
  999. package/node_modules/zod/v4/core/core.cjs +81 -18
  1000. package/node_modules/zod/v4/core/core.js +82 -19
  1001. package/node_modules/zod/v4/core/doc.cjs +5 -7
  1002. package/node_modules/zod/v4/core/doc.js +5 -7
  1003. package/node_modules/zod/v4/core/errors.cjs +110 -25
  1004. package/node_modules/zod/v4/core/errors.js +110 -25
  1005. package/node_modules/zod/v4/core/index.cjs +5 -1
  1006. package/node_modules/zod/v4/core/index.js +3 -0
  1007. package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
  1008. package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
  1009. package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
  1010. package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
  1011. package/node_modules/zod/v4/core/memoizer.cjs +268 -0
  1012. package/node_modules/zod/v4/core/memoizer.js +261 -0
  1013. package/node_modules/zod/v4/core/parse.cjs +96 -34
  1014. package/node_modules/zod/v4/core/parse.js +94 -33
  1015. package/node_modules/zod/v4/core/regexes.cjs +27 -15
  1016. package/node_modules/zod/v4/core/regexes.js +24 -13
  1017. package/node_modules/zod/v4/core/registries.js +2 -2
  1018. package/node_modules/zod/v4/core/schemas.cjs +537 -326
  1019. package/node_modules/zod/v4/core/schemas.js +526 -325
  1020. package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
  1021. package/node_modules/zod/v4/core/to-json-schema.js +241 -39
  1022. package/node_modules/zod/v4/core/util.cjs +212 -31
  1023. package/node_modules/zod/v4/core/util.js +202 -30
  1024. package/node_modules/zod/v4/core/versions.cjs +2 -2
  1025. package/node_modules/zod/v4/core/versions.js +2 -2
  1026. package/node_modules/zod/v4/core/visit.cjs +195 -0
  1027. package/node_modules/zod/v4/core/visit.js +169 -0
  1028. package/node_modules/zod/v4/index.cjs +15 -5
  1029. package/node_modules/zod/v4/index.js +3 -2
  1030. package/node_modules/zod/v4/locales/ar.cjs +3 -0
  1031. package/node_modules/zod/v4/locales/ar.js +3 -0
  1032. package/node_modules/zod/v4/locales/az.cjs +3 -0
  1033. package/node_modules/zod/v4/locales/az.js +3 -0
  1034. package/node_modules/zod/v4/locales/be.cjs +10 -0
  1035. package/node_modules/zod/v4/locales/be.js +10 -0
  1036. package/node_modules/zod/v4/locales/bg.cjs +3 -0
  1037. package/node_modules/zod/v4/locales/bg.js +3 -0
  1038. package/node_modules/zod/v4/locales/bn.cjs +138 -0
  1039. package/node_modules/zod/v4/locales/bn.js +111 -0
  1040. package/node_modules/zod/v4/locales/ca.cjs +3 -0
  1041. package/node_modules/zod/v4/locales/ca.js +3 -0
  1042. package/node_modules/zod/v4/locales/ckb.cjs +158 -0
  1043. package/node_modules/zod/v4/locales/ckb.js +131 -0
  1044. package/node_modules/zod/v4/locales/cs.cjs +3 -0
  1045. package/node_modules/zod/v4/locales/cs.js +3 -0
  1046. package/node_modules/zod/v4/locales/da.cjs +5 -2
  1047. package/node_modules/zod/v4/locales/da.js +5 -2
  1048. package/node_modules/zod/v4/locales/de.cjs +3 -0
  1049. package/node_modules/zod/v4/locales/de.js +3 -0
  1050. package/node_modules/zod/v4/locales/el.cjs +1 -0
  1051. package/node_modules/zod/v4/locales/el.js +1 -0
  1052. package/node_modules/zod/v4/locales/en.cjs +14 -4
  1053. package/node_modules/zod/v4/locales/en.js +14 -4
  1054. package/node_modules/zod/v4/locales/eo.cjs +3 -0
  1055. package/node_modules/zod/v4/locales/eo.js +3 -0
  1056. package/node_modules/zod/v4/locales/es.cjs +2 -0
  1057. package/node_modules/zod/v4/locales/es.js +2 -0
  1058. package/node_modules/zod/v4/locales/fa.cjs +3 -0
  1059. package/node_modules/zod/v4/locales/fa.js +3 -0
  1060. package/node_modules/zod/v4/locales/fi.cjs +3 -0
  1061. package/node_modules/zod/v4/locales/fi.js +3 -0
  1062. package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
  1063. package/node_modules/zod/v4/locales/fr-CA.js +3 -0
  1064. package/node_modules/zod/v4/locales/fr.cjs +16 -14
  1065. package/node_modules/zod/v4/locales/fr.js +16 -14
  1066. package/node_modules/zod/v4/locales/gu.cjs +138 -0
  1067. package/node_modules/zod/v4/locales/gu.js +111 -0
  1068. package/node_modules/zod/v4/locales/he.cjs +5 -0
  1069. package/node_modules/zod/v4/locales/he.js +5 -0
  1070. package/node_modules/zod/v4/locales/hi.cjs +136 -0
  1071. package/node_modules/zod/v4/locales/hi.js +109 -0
  1072. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  1073. package/node_modules/zod/v4/locales/hr.js +2 -0
  1074. package/node_modules/zod/v4/locales/hu.cjs +3 -0
  1075. package/node_modules/zod/v4/locales/hu.js +3 -0
  1076. package/node_modules/zod/v4/locales/hy.cjs +9 -0
  1077. package/node_modules/zod/v4/locales/hy.js +9 -0
  1078. package/node_modules/zod/v4/locales/id.cjs +3 -0
  1079. package/node_modules/zod/v4/locales/id.js +3 -0
  1080. package/node_modules/zod/v4/locales/index.cjs +22 -2
  1081. package/node_modules/zod/v4/locales/index.js +10 -0
  1082. package/node_modules/zod/v4/locales/is.cjs +3 -0
  1083. package/node_modules/zod/v4/locales/is.js +3 -0
  1084. package/node_modules/zod/v4/locales/it.cjs +3 -0
  1085. package/node_modules/zod/v4/locales/it.js +3 -0
  1086. package/node_modules/zod/v4/locales/ja.cjs +3 -0
  1087. package/node_modules/zod/v4/locales/ja.js +3 -0
  1088. package/node_modules/zod/v4/locales/ka.cjs +3 -0
  1089. package/node_modules/zod/v4/locales/ka.js +3 -0
  1090. package/node_modules/zod/v4/locales/km.cjs +3 -0
  1091. package/node_modules/zod/v4/locales/km.js +3 -0
  1092. package/node_modules/zod/v4/locales/kn.cjs +141 -0
  1093. package/node_modules/zod/v4/locales/kn.js +114 -0
  1094. package/node_modules/zod/v4/locales/ko.cjs +3 -0
  1095. package/node_modules/zod/v4/locales/ko.js +3 -0
  1096. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  1097. package/node_modules/zod/v4/locales/lt.js +2 -0
  1098. package/node_modules/zod/v4/locales/mk.cjs +3 -0
  1099. package/node_modules/zod/v4/locales/mk.js +3 -0
  1100. package/node_modules/zod/v4/locales/ms.cjs +3 -0
  1101. package/node_modules/zod/v4/locales/ms.js +3 -0
  1102. package/node_modules/zod/v4/locales/ne.cjs +136 -0
  1103. package/node_modules/zod/v4/locales/ne.js +109 -0
  1104. package/node_modules/zod/v4/locales/nl.cjs +3 -0
  1105. package/node_modules/zod/v4/locales/nl.js +3 -0
  1106. package/node_modules/zod/v4/locales/nn.cjs +138 -0
  1107. package/node_modules/zod/v4/locales/nn.js +111 -0
  1108. package/node_modules/zod/v4/locales/no.cjs +5 -2
  1109. package/node_modules/zod/v4/locales/no.js +5 -2
  1110. package/node_modules/zod/v4/locales/ota.cjs +3 -0
  1111. package/node_modules/zod/v4/locales/ota.js +3 -0
  1112. package/node_modules/zod/v4/locales/pl.cjs +3 -0
  1113. package/node_modules/zod/v4/locales/pl.js +3 -0
  1114. package/node_modules/zod/v4/locales/ps.cjs +3 -0
  1115. package/node_modules/zod/v4/locales/ps.js +3 -0
  1116. package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
  1117. package/node_modules/zod/v4/locales/pt-BR.js +141 -0
  1118. package/node_modules/zod/v4/locales/pt.cjs +87 -55
  1119. package/node_modules/zod/v4/locales/pt.js +87 -55
  1120. package/node_modules/zod/v4/locales/ro.cjs +1 -0
  1121. package/node_modules/zod/v4/locales/ro.js +1 -0
  1122. package/node_modules/zod/v4/locales/ru.cjs +10 -0
  1123. package/node_modules/zod/v4/locales/ru.js +10 -0
  1124. package/node_modules/zod/v4/locales/sk.cjs +141 -0
  1125. package/node_modules/zod/v4/locales/sk.js +114 -0
  1126. package/node_modules/zod/v4/locales/sl.cjs +3 -0
  1127. package/node_modules/zod/v4/locales/sl.js +3 -0
  1128. package/node_modules/zod/v4/locales/sv.cjs +5 -2
  1129. package/node_modules/zod/v4/locales/sv.js +5 -2
  1130. package/node_modules/zod/v4/locales/ta.cjs +3 -0
  1131. package/node_modules/zod/v4/locales/ta.js +3 -0
  1132. package/node_modules/zod/v4/locales/th.cjs +3 -0
  1133. package/node_modules/zod/v4/locales/th.js +3 -0
  1134. package/node_modules/zod/v4/locales/tk.cjs +132 -0
  1135. package/node_modules/zod/v4/locales/tk.js +105 -0
  1136. package/node_modules/zod/v4/locales/tr.cjs +3 -0
  1137. package/node_modules/zod/v4/locales/tr.js +3 -0
  1138. package/node_modules/zod/v4/locales/uk.cjs +3 -0
  1139. package/node_modules/zod/v4/locales/uk.js +3 -0
  1140. package/node_modules/zod/v4/locales/ur.cjs +3 -0
  1141. package/node_modules/zod/v4/locales/ur.js +3 -0
  1142. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  1143. package/node_modules/zod/v4/locales/uz.js +1 -0
  1144. package/node_modules/zod/v4/locales/vi.cjs +3 -0
  1145. package/node_modules/zod/v4/locales/vi.js +3 -0
  1146. package/node_modules/zod/v4/locales/yo.cjs +3 -0
  1147. package/node_modules/zod/v4/locales/yo.js +3 -0
  1148. package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
  1149. package/node_modules/zod/v4/locales/zh-CN.js +3 -0
  1150. package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
  1151. package/node_modules/zod/v4/locales/zh-TW.js +3 -0
  1152. package/node_modules/zod/v4/mini/checks.cjs +2 -1
  1153. package/node_modules/zod/v4/mini/checks.js +1 -1
  1154. package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
  1155. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  1156. package/node_modules/zod/v4/mini/external.cjs +12 -1
  1157. package/node_modules/zod/v4/mini/external.js +3 -1
  1158. package/node_modules/zod/v4/mini/in-out.cjs +63 -0
  1159. package/node_modules/zod/v4/mini/in-out.js +36 -0
  1160. package/node_modules/zod/v4/mini/parse.cjs +3 -1
  1161. package/node_modules/zod/v4/mini/parse.js +1 -1
  1162. package/node_modules/zod/v4/mini/schemas.cjs +75 -47
  1163. package/node_modules/zod/v4/mini/schemas.js +71 -45
  1164. package/package.json +3 -4
  1165. package/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +0 -549
  1166. package/node_modules/@ai-sdk/code-mode/package.json +0 -78
  1167. package/node_modules/@ai-sdk/gateway/CHANGELOG.md +0 -3067
  1168. package/node_modules/@ai-sdk/gateway/dist/index.js +0 -3208
  1169. package/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +0 -1297
  1170. package/node_modules/@ai-sdk/gateway/package.json +0 -80
  1171. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +0 -2444
  1172. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/README.md +0 -1
  1173. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -4295
  1174. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/package.json +0 -82
  1175. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/LICENSE +0 -16
  1176. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/README.md +0 -24
  1177. package/node_modules/@ai-sdk/open-responses/node_modules/undici/LICENSE +0 -21
  1178. package/node_modules/@ai-sdk/open-responses/node_modules/undici/README.md +0 -741
  1179. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Agent.md +0 -84
  1180. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
  1181. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
  1182. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
  1183. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Client.md +0 -288
  1184. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
  1185. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Connector.md +0 -115
  1186. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ContentType.md +0 -57
  1187. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Cookies.md +0 -128
  1188. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Debug.md +0 -62
  1189. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
  1190. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
  1191. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
  1192. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Errors.md +0 -49
  1193. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EventSource.md +0 -45
  1194. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Fetch.md +0 -60
  1195. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
  1196. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
  1197. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
  1198. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
  1199. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
  1200. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockClient.md +0 -81
  1201. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
  1202. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockPool.md +0 -555
  1203. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Pool.md +0 -84
  1204. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
  1205. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
  1206. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
  1207. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
  1208. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
  1209. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
  1210. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
  1211. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -275
  1212. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Util.md +0 -25
  1213. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
  1214. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
  1215. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
  1216. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
  1217. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
  1218. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
  1219. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
  1220. package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
  1221. package/node_modules/@ai-sdk/open-responses/node_modules/undici/index-fetch.js +0 -65
  1222. package/node_modules/@ai-sdk/open-responses/node_modules/undici/index.js +0 -234
  1223. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/abort-signal.js +0 -59
  1224. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-connect.js +0 -110
  1225. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-pipeline.js +0 -252
  1226. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-request.js +0 -214
  1227. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-stream.js +0 -209
  1228. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-upgrade.js +0 -111
  1229. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/index.js +0 -7
  1230. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/readable.js +0 -580
  1231. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/memory-cache-store.js +0 -279
  1232. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -467
  1233. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/connect.js +0 -153
  1234. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/constants.js +0 -143
  1235. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/diagnostics.js +0 -227
  1236. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/errors.js +0 -477
  1237. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/request.js +0 -464
  1238. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-client.js +0 -422
  1239. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-utils.js +0 -212
  1240. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/symbols.js +0 -75
  1241. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/tree.js +0 -160
  1242. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/util.js +0 -992
  1243. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/agent.js +0 -158
  1244. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
  1245. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h1.js +0 -1731
  1246. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
  1247. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client.js +0 -664
  1248. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -184
  1249. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
  1250. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
  1251. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
  1252. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
  1253. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
  1254. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool.js +0 -118
  1255. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -319
  1256. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
  1257. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
  1258. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -260
  1259. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/encoding/index.js +0 -33
  1260. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/global.js +0 -59
  1261. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-handler.js +0 -760
  1262. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
  1263. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/decorator-handler.js +0 -67
  1264. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
  1265. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/redirect-handler.js +0 -238
  1266. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/retry-handler.js +0 -418
  1267. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
  1268. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/wrap-handler.js +0 -105
  1269. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/cache.js +0 -602
  1270. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/decompress.js +0 -259
  1271. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
  1272. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dns.js +0 -571
  1273. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dump.js +0 -112
  1274. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/redirect.js +0 -21
  1275. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/response-error.js +0 -95
  1276. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/retry.js +0 -19
  1277. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/.gitkeep +0 -0
  1278. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/constants.js +0 -531
  1279. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
  1280. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
  1281. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/utils.js +0 -12
  1282. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-agent.js +0 -232
  1283. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-call-history.js +0 -248
  1284. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-client.js +0 -68
  1285. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-errors.js +0 -29
  1286. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
  1287. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-pool.js +0 -68
  1288. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-symbols.js +0 -32
  1289. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-utils.js +0 -486
  1290. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
  1291. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
  1292. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
  1293. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
  1294. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/cache.js +0 -676
  1295. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/date.js +0 -670
  1296. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/promise.js +0 -28
  1297. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/runtime-features.js +0 -124
  1298. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/stats.js +0 -32
  1299. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/timers.js +0 -425
  1300. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cache.js +0 -864
  1301. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
  1302. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/util.js +0 -45
  1303. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/constants.js +0 -12
  1304. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/index.js +0 -199
  1305. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/parse.js +0 -314
  1306. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/util.js +0 -352
  1307. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
  1308. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
  1309. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/util.js +0 -29
  1310. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/LICENSE +0 -21
  1311. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/body.js +0 -509
  1312. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/constants.js +0 -131
  1313. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/data-url.js +0 -596
  1314. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
  1315. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata.js +0 -259
  1316. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/global.js +0 -40
  1317. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/headers.js +0 -719
  1318. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/index.js +0 -2413
  1319. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/request.js +0 -1115
  1320. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/response.js +0 -641
  1321. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/util.js +0 -1522
  1322. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/infra/index.js +0 -229
  1323. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
  1324. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
  1325. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/webidl/index.js +0 -1006
  1326. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/connection.js +0 -329
  1327. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/constants.js +0 -126
  1328. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/events.js +0 -331
  1329. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/frame.js +0 -133
  1330. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -100
  1331. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/receiver.js +0 -507
  1332. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/sender.js +0 -109
  1333. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
  1334. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -498
  1335. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/util.js +0 -347
  1336. package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/websocket.js +0 -758
  1337. package/node_modules/@ai-sdk/open-responses/node_modules/undici/package.json +0 -152
  1338. package/node_modules/@ai-sdk/open-responses/node_modules/undici/scripts/strip-comments.js +0 -10
  1339. package/node_modules/@ai-sdk/open-responses/node_modules/undici/types/README.md +0 -6
  1340. package/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1218
  1341. package/node_modules/@ai-sdk/provider/package.json +0 -63
  1342. package/node_modules/@formatjs/icu-messageformat-parser/index.js +0 -2173
  1343. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +0 -207
  1344. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +0 -160
  1345. package/node_modules/@formatjs/icu-messageformat-parser/package.json +0 -21
  1346. package/node_modules/@formatjs/icu-messageformat-parser/printer.js +0 -224
  1347. package/node_modules/@maka/core/dist/task-ledger.js +0 -797
  1348. package/node_modules/@maka/runtime/dist/sandbox/diagnostics.js +0 -285
  1349. package/node_modules/@maka/runtime/dist/system-prompt/sandbox-context-prompt.js +0 -77
  1350. package/node_modules/@maka/runtime/dist/system-prompt/session-environment-prompt.js +0 -47
  1351. package/node_modules/@maka/runtime/dist/task-ledger-tools.js +0 -244
  1352. package/node_modules/@maka/runtime/dist/test-helpers.js +0 -61
  1353. package/node_modules/@maka/runtime/node_modules/@slack/types/dist/events/index.js +0 -43
  1354. package/node_modules/@maka/runtime/node_modules/@slack/types/package.json +0 -47
  1355. package/node_modules/@maka/runtime/node_modules/@slack/web-api/README.md +0 -390
  1356. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/methods.js +0 -1610
  1357. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +0 -3
  1358. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +0 -3
  1359. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +0 -3
  1360. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +0 -37
  1361. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +0 -82
  1362. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +0 -63
  1363. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +0 -3
  1364. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +0 -3
  1365. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +0 -3
  1366. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +0 -3
  1367. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +0 -3
  1368. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +0 -3
  1369. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +0 -3
  1370. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +0 -3
  1371. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +0 -3
  1372. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +0 -3
  1373. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +0 -3
  1374. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +0 -3
  1375. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +0 -3
  1376. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +0 -3
  1377. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +0 -3
  1378. package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +0 -3
  1379. package/node_modules/@maka/runtime/node_modules/@slack/web-api/package.json +0 -71
  1380. package/node_modules/@maka/runtime-host/dist/protocol/task-ledger.js +0 -321
  1381. package/node_modules/@maka/runtime-host/dist/server/task-ledger-coordinator.js +0 -154
  1382. package/node_modules/@maka/storage/dist/artifact-metadata-repository.js +0 -19
  1383. package/node_modules/@maka/storage/dist/artifact-storage-layout.js +0 -26
  1384. package/node_modules/@maka/storage/dist/provider-request-capture-artifact.js +0 -31
  1385. package/node_modules/@maka/storage/dist/task-ledger-authority.js +0 -121
  1386. package/node_modules/@maka/storage/dist/task-ledger-store-internal.js +0 -32
  1387. package/node_modules/@maka/storage/dist/task-ledger-store.js +0 -663
  1388. package/node_modules/ai/CHANGELOG.md +0 -9971
  1389. package/node_modules/ai/dist/index.js +0 -18513
  1390. package/node_modules/ai/dist/internal/index.js +0 -3680
  1391. package/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +0 -179
  1392. package/node_modules/ai/docs/03-agents/04-loop-control.mdx +0 -515
  1393. package/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +0 -412
  1394. package/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +0 -326
  1395. package/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +0 -718
  1396. package/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +0 -513
  1397. package/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +0 -1509
  1398. package/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +0 -617
  1399. package/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +0 -344
  1400. package/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +0 -332
  1401. package/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +0 -180
  1402. package/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +0 -155
  1403. package/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +0 -149
  1404. package/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +0 -830
  1405. package/node_modules/ai/docs/03-ai-sdk-core/index.mdx +0 -132
  1406. package/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +0 -495
  1407. package/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -65
  1408. package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +0 -45
  1409. package/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +0 -798
  1410. package/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +0 -401
  1411. package/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +0 -212
  1412. package/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +0 -578
  1413. package/node_modules/ai/docs/06-advanced/04-caching.mdx +0 -175
  1414. package/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +0 -111
  1415. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +0 -3253
  1416. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +0 -4261
  1417. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +0 -304
  1418. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +0 -302
  1419. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +0 -317
  1420. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +0 -252
  1421. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +0 -92
  1422. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +0 -1102
  1423. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +0 -342
  1424. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +0 -268
  1425. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +0 -145
  1426. package/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +0 -225
  1427. package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +0 -493
  1428. package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +0 -256
  1429. package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +0 -166
  1430. package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +0 -120
  1431. package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +0 -954
  1432. package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +0 -347
  1433. package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -26
  1434. package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +0 -26
  1435. package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +0 -36
  1436. package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +0 -41
  1437. package/node_modules/ai/package.json +0 -117
  1438. package/node_modules/intl-messageformat/intl-messageformat.iife.js +0 -2807
  1439. package/node_modules/intl-messageformat/package.json +0 -40
  1440. package/packages/eval/dist/attempt-store.js +0 -138
  1441. package/packages/eval/dist/cli.js +0 -119
  1442. package/packages/eval/dist/experiment-directory.js +0 -59
  1443. package/packages/eval/dist/experiment.js +0 -49
  1444. package/packages/eval/dist/external-subject.js +0 -488
  1445. package/packages/eval/dist/harbor-external-subject.js +0 -929
  1446. package/packages/eval/dist/harbor-maka-subject.js +0 -83
  1447. package/packages/eval/dist/harness-environment.js +0 -80
  1448. package/packages/eval/dist/harness-executor.js +0 -1013
  1449. package/packages/eval/dist/index.js +0 -28
  1450. package/packages/eval/dist/install-preflight.js +0 -201
  1451. package/packages/eval/dist/maka-artifacts.js +0 -126
  1452. package/packages/eval/dist/maka-runtime-policy.js +0 -42
  1453. package/packages/eval/dist/maka-subject.js +0 -268
  1454. package/packages/eval/dist/metering-checkpoint.js +0 -80
  1455. package/packages/eval/dist/provider-admission.js +0 -39
  1456. package/packages/eval/dist/provider-metering.js +0 -67
  1457. package/packages/eval/dist/provider-web-tool-surface.js +0 -74
  1458. package/packages/eval/dist/relay-result-frame.js +0 -38
  1459. package/packages/eval/dist/result.js +0 -94
  1460. package/packages/eval/dist/runner.js +0 -290
  1461. package/packages/eval/dist/spec.js +0 -135
  1462. package/packages/eval/dist/toolchain-verification.js +0 -130
  1463. package/packages/eval/harbor/deepseek-codex-models.json +0 -69
  1464. package/packages/eval/harbor/deepseek-harness-profile/cordis.patch.yml +0 -140
  1465. package/packages/eval/harbor/deepseek-harness-profile/cordis.yml +0 -18
  1466. package/packages/eval/harbor/deepseek-harness-profile/package.json +0 -10
  1467. package/packages/eval/harbor/docker-compose-egress-proxy.yaml +0 -57
  1468. package/packages/eval/harbor/egress-proxy/Dockerfile +0 -25
  1469. package/packages/eval/harbor/egress-proxy/entrypoint.sh +0 -62
  1470. package/packages/eval/harbor/egress-proxy/network-policy +0 -148
  1471. package/packages/eval/harbor/egress_filter.py +0 -435
  1472. package/packages/eval/harbor/eval_framework.py +0 -40
  1473. package/packages/eval/harbor/relay_agent.py +0 -686
  1474. package/packages/eval/harbor/run_trial.py +0 -223
  1475. package/packages/eval/package.json +0 -20
  1476. /package/node_modules/@ai-sdk/{code-mode → anthropic/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  1477. /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/README.md +0 -0
  1478. /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/dist/index.js +0 -0
  1479. /package/node_modules/@ai-sdk/{gateway → cohere/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  1480. /package/node_modules/@ai-sdk/{provider → google/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  1481. /package/node_modules/{ai → @ai-sdk/openai-compatible/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  1482. /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/LICENSE.md +0 -0
  1483. /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/README.md +0 -0
  1484. /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/LICENSE.md +0 -0
  1485. /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/README.md +0 -0
  1486. /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/index.js +0 -0
  1487. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/README.md +0 -0
  1488. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval-continuation.js +0 -0
  1489. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval.js +0 -0
  1490. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/code-mode-tool.js +0 -0
  1491. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
  1492. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
  1493. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/errors.js +0 -0
  1494. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
  1495. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/index.js +0 -0
  1496. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -0
  1497. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
  1498. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-prompt.js +0 -0
  1499. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/types.js +0 -0
  1500. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
  1501. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/src/tsconfig.json +0 -0
  1502. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/README.md +0 -0
  1503. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/README.md +0 -0
  1504. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/00-introduction/index.mdx +0 -0
  1505. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/01-overview.mdx +0 -0
  1506. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/03-prompts.mdx +0 -0
  1507. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/04-tools.mdx +0 -0
  1508. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/05-streaming.mdx +0 -0
  1509. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/06-provider-options.mdx +0 -0
  1510. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/index.mdx +0 -0
  1511. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/00-choosing-a-provider.mdx +0 -0
  1512. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
  1513. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/02-nextjs-app-router.mdx +0 -0
  1514. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +0 -0
  1515. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/04-svelte.mdx +0 -0
  1516. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/05-nuxt.mdx +0 -0
  1517. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/06-nodejs.mdx +0 -0
  1518. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/07-expo.mdx +0 -0
  1519. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/08-tanstack-start.mdx +0 -0
  1520. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/09-coding-agents.mdx +0 -0
  1521. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/index.mdx +0 -0
  1522. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/01-overview.mdx +0 -0
  1523. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/02-building-agents.mdx +0 -0
  1524. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/03-workflows.mdx +0 -0
  1525. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/05-configuring-call-options.mdx +0 -0
  1526. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-memory.mdx +0 -0
  1527. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-subagents.mdx +0 -0
  1528. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/08-terminal-ui.mdx +0 -0
  1529. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/index.mdx +0 -0
  1530. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
  1531. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/05-generating-text.mdx +0 -0
  1532. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +0 -0
  1533. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
  1534. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/18-code-mode.mdx +0 -0
  1535. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +0 -0
  1536. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
  1537. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/26-reasoning.mdx +0 -0
  1538. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
  1539. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/31-reranking.mdx +0 -0
  1540. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-realtime.mdx +0 -0
  1541. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
  1542. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
  1543. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/40-middleware.mdx +0 -0
  1544. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +0 -0
  1545. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/45-provider-management.mdx +0 -0
  1546. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/55-testing.mdx +0 -0
  1547. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-devtools.mdx +0 -0
  1548. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +0 -0
  1549. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +0 -0
  1550. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +0 -0
  1551. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +0 -0
  1552. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +0 -0
  1553. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +0 -0
  1554. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
  1555. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/01-overview.mdx +0 -0
  1556. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +0 -0
  1557. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +0 -0
  1558. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +0 -0
  1559. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
  1560. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/05-completion.mdx +0 -0
  1561. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +0 -0
  1562. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +0 -0
  1563. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
  1564. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
  1565. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
  1566. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
  1567. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +0 -0
  1568. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
  1569. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
  1570. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +0 -0
  1571. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
  1572. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +0 -0
  1573. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
  1574. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
  1575. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +0 -0
  1576. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
  1577. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
  1578. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/02-stopping-streams.mdx +0 -0
  1579. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/03-backpressure.mdx +0 -0
  1580. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
  1581. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
  1582. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
  1583. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
  1584. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
  1585. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
  1586. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
  1587. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/index.mdx +0 -0
  1588. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
  1589. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
  1590. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +0 -0
  1591. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +0 -0
  1592. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
  1593. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
  1594. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
  1595. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
  1596. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +0 -0
  1597. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -0
  1598. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +0 -0
  1599. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +0 -0
  1600. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
  1601. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
  1602. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
  1603. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
  1604. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
  1605. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
  1606. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
  1607. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
  1608. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
  1609. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +0 -0
  1610. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +0 -0
  1611. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
  1612. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +0 -0
  1613. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +0 -0
  1614. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
  1615. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +0 -0
  1616. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +0 -0
  1617. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
  1618. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
  1619. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
  1620. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
  1621. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
  1622. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -0
  1623. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
  1624. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
  1625. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
  1626. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
  1627. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
  1628. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
  1629. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
  1630. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
  1631. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
  1632. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +0 -0
  1633. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -0
  1634. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
  1635. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/42-pipe-ui-message-stream-to-response.mdx +0 -0
  1636. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
  1637. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
  1638. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
  1639. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
  1640. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +0 -0
  1641. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
  1642. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +0 -0
  1643. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +0 -0
  1644. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +0 -0
  1645. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
  1646. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
  1647. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
  1648. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
  1649. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
  1650. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
  1651. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
  1652. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
  1653. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
  1654. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
  1655. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +0 -0
  1656. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
  1657. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
  1658. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
  1659. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
  1660. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
  1661. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
  1662. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
  1663. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +0 -0
  1664. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
  1665. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
  1666. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
  1667. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
  1668. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
  1669. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
  1670. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
  1671. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
  1672. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
  1673. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +0 -0
  1674. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +0 -0
  1675. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +0 -0
  1676. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
  1677. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
  1678. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
  1679. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
  1680. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
  1681. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-too-many-embedding-values-for-call-error.mdx +0 -0
  1682. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-not-found-for-approval-error.mdx +0 -0
  1683. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
  1684. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
  1685. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +0 -0
  1686. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
  1687. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +0 -0
  1688. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
  1689. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/index.mdx +0 -0
  1690. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
  1691. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
  1692. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
  1693. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
  1694. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
  1695. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
  1696. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
  1697. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +0 -0
  1698. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
  1699. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +0 -0
  1700. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
  1701. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
  1702. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/index.mdx +0 -0
  1703. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
  1704. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
  1705. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
  1706. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
  1707. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
  1708. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
  1709. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
  1710. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
  1711. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
  1712. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
  1713. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
  1714. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
  1715. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +0 -0
  1716. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
  1717. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
  1718. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +0 -0
  1719. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
  1720. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
  1721. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
  1722. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
  1723. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
  1724. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +0 -0
  1725. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
  1726. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
  1727. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
  1728. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
  1729. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
  1730. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
  1731. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
  1732. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
  1733. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +0 -0
  1734. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/index.mdx +0 -0
  1735. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/LICENSE +0 -0
  1736. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/README.md +0 -0
  1737. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/dist/index.js +0 -0
  1738. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/package.json +0 -0
  1739. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/LICENSE +0 -0
  1740. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/README.md +0 -0
  1741. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/block-elements.js +0 -0
  1742. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/blocks.js +0 -0
  1743. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/composition-objects.js +0 -0
  1744. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/extensions.js +0 -0
  1745. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/calls.js +0 -0
  1746. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/chunk.js +0 -0
  1747. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/bot-profile.js +0 -0
  1748. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/status-emoji-display-info.js +0 -0
  1749. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/dialog.js +0 -0
  1750. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/app.js +0 -0
  1751. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/assistant.js +0 -0
  1752. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/call.js +0 -0
  1753. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/channel.js +0 -0
  1754. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/dnd.js +0 -0
  1755. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/email.js +0 -0
  1756. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/emoji.js +0 -0
  1757. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/entity-details-requested.js +0 -0
  1758. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/file.js +0 -0
  1759. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/function.js +0 -0
  1760. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/grid-migration.js +0 -0
  1761. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/group.js +0 -0
  1762. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/im.js +0 -0
  1763. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/invite.js +0 -0
  1764. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/link-shared.js +0 -0
  1765. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/member.js +0 -0
  1766. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message-metadata.js +0 -0
  1767. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message.js +0 -0
  1768. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/pin.js +0 -0
  1769. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/reaction.js +0 -0
  1770. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/shared-channel.js +0 -0
  1771. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/star.js +0 -0
  1772. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/steps-from-apps.js +0 -0
  1773. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/subteam.js +0 -0
  1774. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/team.js +0 -0
  1775. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/token.js +0 -0
  1776. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/user.js +0 -0
  1777. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/index.js +0 -0
  1778. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-attachments.js +0 -0
  1779. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-metadata.js +0 -0
  1780. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/views.js +0 -0
  1781. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/LICENSE +0 -0
  1782. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/WebClient.js +0 -0
  1783. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/chat-stream.js +0 -0
  1784. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/errors.js +0 -0
  1785. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/file-upload.js +0 -0
  1786. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/helpers.js +0 -0
  1787. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/index.js +0 -0
  1788. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/instrument.js +0 -0
  1789. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/logger.js +0 -0
  1790. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/retry-policies.js +0 -0
  1791. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/helpers.js +0 -0
  1792. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/analytics.js +0 -0
  1793. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/apps.js +0 -0
  1794. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/auth.js +0 -0
  1795. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/barriers.js +0 -0
  1796. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/conversations.js +0 -0
  1797. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/emoji.js +0 -0
  1798. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/functions.js +0 -0
  1799. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/inviteRequests.js +0 -0
  1800. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/roles.js +0 -0
  1801. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/teams.js +0 -0
  1802. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/usergroups.js +0 -0
  1803. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/users.js +0 -0
  1804. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/workflows.js +0 -0
  1805. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/api.js +0 -0
  1806. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/apps.js +0 -0
  1807. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/assistant.js +0 -0
  1808. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/auth.js +0 -0
  1809. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bookmarks.js +0 -0
  1810. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bots.js +0 -0
  1811. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/calls.js +0 -0
  1812. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/canvas.js +0 -0
  1813. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/chat.js +0 -0
  1814. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/common.js +0 -0
  1815. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/conversations.js +0 -0
  1816. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dialog.js +0 -0
  1817. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dnd.js +0 -0
  1818. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/emoji.js +0 -0
  1819. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/entity.js +0 -0
  1820. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/files.js +0 -0
  1821. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/functions.js +0 -0
  1822. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/index.js +0 -0
  1823. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/manifest.js +0 -0
  1824. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/migration.js +0 -0
  1825. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/oauth.js +0 -0
  1826. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/openid.js +0 -0
  1827. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/pins.js +0 -0
  1828. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reactions.js +0 -0
  1829. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reminders.js +0 -0
  1830. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/rtm.js +0 -0
  1831. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/search.js +0 -0
  1832. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/slackLists.js +0 -0
  1833. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/stars.js +0 -0
  1834. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/team.js +0 -0
  1835. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/tooling.js +0 -0
  1836. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/usergroups.js +0 -0
  1837. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/users.js +0 -0
  1838. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/views.js +0 -0
  1839. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/workflows.js +0 -0
  1840. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAnalyticsGetFileResponse.js +0 -0
  1841. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsActivitiesListResponse.js +0 -0
  1842. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApproveResponse.js +0 -0
  1843. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApprovedListResponse.js +0 -0
  1844. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsClearResolutionResponse.js +0 -0
  1845. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigLookupResponse.js +0 -0
  1846. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigSetResponse.js +0 -0
  1847. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsCancelResponse.js +0 -0
  1848. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsListResponse.js +0 -0
  1849. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictResponse.js +0 -0
  1850. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictedListResponse.js +0 -0
  1851. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsUninstallResponse.js +0 -0
  1852. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyAssignEntitiesResponse.js +0 -0
  1853. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyGetEntitiesResponse.js +0 -0
  1854. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyRemoveEntitiesResponse.js +0 -0
  1855. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersCreateResponse.js +0 -0
  1856. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersDeleteResponse.js +0 -0
  1857. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersListResponse.js +0 -0
  1858. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersUpdateResponse.js +0 -0
  1859. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsArchiveResponse.js +0 -0
  1860. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkArchiveResponse.js +0 -0
  1861. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkDeleteResponse.js +0 -0
  1862. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkMoveResponse.js +0 -0
  1863. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPrivateResponse.js +0 -0
  1864. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPublicResponse.js +0 -0
  1865. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsCreateResponse.js +0 -0
  1866. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDeleteResponse.js +0 -0
  1867. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDisconnectSharedResponse.js +0 -0
  1868. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.js +0 -0
  1869. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetConversationPrefsResponse.js +0 -0
  1870. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetCustomRetentionResponse.js +0 -0
  1871. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetTeamsResponse.js +0 -0
  1872. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsInviteResponse.js +0 -0
  1873. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsLookupResponse.js +0 -0
  1874. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRemoveCustomRetentionResponse.js +0 -0
  1875. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRenameResponse.js +0 -0
  1876. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessAddGroupResponse.js +0 -0
  1877. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessListGroupsResponse.js +0 -0
  1878. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.js +0 -0
  1879. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSearchResponse.js +0 -0
  1880. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetConversationPrefsResponse.js +0 -0
  1881. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetCustomRetentionResponse.js +0 -0
  1882. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetTeamsResponse.js +0 -0
  1883. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsUnarchiveResponse.js +0 -0
  1884. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistAddResponse.js +0 -0
  1885. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.js +0 -0
  1886. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistRemoveResponse.js +0 -0
  1887. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddAliasResponse.js +0 -0
  1888. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddResponse.js +0 -0
  1889. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiListResponse.js +0 -0
  1890. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRemoveResponse.js +0 -0
  1891. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRenameResponse.js +0 -0
  1892. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsListResponse.js +0 -0
  1893. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsLookupResponse.js +0 -0
  1894. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsSetResponse.js +0 -0
  1895. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApproveResponse.js +0 -0
  1896. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApprovedListResponse.js +0 -0
  1897. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDeniedListResponse.js +0 -0
  1898. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDenyResponse.js +0 -0
  1899. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsListResponse.js +0 -0
  1900. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesAddAssignmentsResponse.js +0 -0
  1901. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesListAssignmentsResponse.js +0 -0
  1902. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesRemoveAssignmentsResponse.js +0 -0
  1903. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsAdminsListResponse.js +0 -0
  1904. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsCreateResponse.js +0 -0
  1905. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsListResponse.js +0 -0
  1906. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsOwnersListResponse.js +0 -0
  1907. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsInfoResponse.js +0 -0
  1908. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.js +0 -0
  1909. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDescriptionResponse.js +0 -0
  1910. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.js +0 -0
  1911. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetIconResponse.js +0 -0
  1912. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetNameResponse.js +0 -0
  1913. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddChannelsResponse.js +0 -0
  1914. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddTeamsResponse.js +0 -0
  1915. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsListChannelsResponse.js +0 -0
  1916. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsRemoveChannelsResponse.js +0 -0
  1917. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersAssignResponse.js +0 -0
  1918. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersInviteResponse.js +0 -0
  1919. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersListResponse.js +0 -0
  1920. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersRemoveResponse.js +0 -0
  1921. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionClearSettingsResponse.js +0 -0
  1922. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionGetSettingsResponse.js +0 -0
  1923. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionInvalidateResponse.js +0 -0
  1924. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionListResponse.js +0 -0
  1925. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetBulkResponse.js +0 -0
  1926. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetResponse.js +0 -0
  1927. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionSetSettingsResponse.js +0 -0
  1928. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetAdminResponse.js +0 -0
  1929. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetExpirationResponse.js +0 -0
  1930. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetOwnerResponse.js +0 -0
  1931. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetRegularResponse.js +0 -0
  1932. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersUnsupportedVersionsExportResponse.js +0 -0
  1933. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsAddResponse.js +0 -0
  1934. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsRemoveResponse.js +0 -0
  1935. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsPermissionsLookupResponse.js +0 -0
  1936. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsSearchResponse.js +0 -0
  1937. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsUnpublishResponse.js +0 -0
  1938. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ApiTestResponse.js +0 -0
  1939. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsConnectionsOpenResponse.js +0 -0
  1940. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsEventAuthorizationsListResponse.js +0 -0
  1941. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestCreateResponse.js +0 -0
  1942. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestDeleteResponse.js +0 -0
  1943. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestExportResponse.js +0 -0
  1944. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestUpdateResponse.js +0 -0
  1945. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestValidateResponse.js +0 -0
  1946. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsInfoResponse.js +0 -0
  1947. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsRequestResponse.js +0 -0
  1948. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsResourcesListResponse.js +0 -0
  1949. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsScopesListResponse.js +0 -0
  1950. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersListResponse.js +0 -0
  1951. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersRequestResponse.js +0 -0
  1952. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUninstallResponse.js +0 -0
  1953. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUserConnectionUpdateResponse.js +0 -0
  1954. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetStatusResponse.js +0 -0
  1955. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetSuggestedPromptsResponse.js +0 -0
  1956. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetTitleResponse.js +0 -0
  1957. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthRevokeResponse.js +0 -0
  1958. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTeamsListResponse.js +0 -0
  1959. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTestResponse.js +0 -0
  1960. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksAddResponse.js +0 -0
  1961. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksEditResponse.js +0 -0
  1962. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksListResponse.js +0 -0
  1963. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksRemoveResponse.js +0 -0
  1964. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BotsInfoResponse.js +0 -0
  1965. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsAddResponse.js +0 -0
  1966. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsEndResponse.js +0 -0
  1967. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsInfoResponse.js +0 -0
  1968. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsAddResponse.js +0 -0
  1969. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsRemoveResponse.js +0 -0
  1970. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsUpdateResponse.js +0 -0
  1971. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessDeleteResponse.js +0 -0
  1972. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessSetResponse.js +0 -0
  1973. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesCreateResponse.js +0 -0
  1974. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesDeleteResponse.js +0 -0
  1975. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesEditResponse.js +0 -0
  1976. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesSectionsLookupResponse.js +0 -0
  1977. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsArchiveResponse.js +0 -0
  1978. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsCreateResponse.js +0 -0
  1979. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsHistoryResponse.js +0 -0
  1980. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInfoResponse.js +0 -0
  1981. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInviteResponse.js +0 -0
  1982. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsJoinResponse.js +0 -0
  1983. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsKickResponse.js +0 -0
  1984. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsLeaveResponse.js +0 -0
  1985. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsListResponse.js +0 -0
  1986. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsMarkResponse.js +0 -0
  1987. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRenameResponse.js +0 -0
  1988. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRepliesResponse.js +0 -0
  1989. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetPurposeResponse.js +0 -0
  1990. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetTopicResponse.js +0 -0
  1991. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsUnarchiveResponse.js +0 -0
  1992. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteResponse.js +0 -0
  1993. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteScheduledMessageResponse.js +0 -0
  1994. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatGetPermalinkResponse.js +0 -0
  1995. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatMeMessageResponse.js +0 -0
  1996. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostEphemeralResponse.js +0 -0
  1997. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostMessageResponse.js +0 -0
  1998. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduleMessageResponse.js +0 -0
  1999. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduledMessagesListResponse.js +0 -0
  2000. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUnfurlResponse.js +0 -0
  2001. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUpdateResponse.js +0 -0
  2002. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsAcceptSharedInviteResponse.js +0 -0
  2003. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsApproveSharedInviteResponse.js +0 -0
  2004. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsArchiveResponse.js +0 -0
  2005. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCanvasesCreateResponse.js +0 -0
  2006. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCloseResponse.js +0 -0
  2007. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCreateResponse.js +0 -0
  2008. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsDeclineSharedInviteResponse.js +0 -0
  2009. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsExternalInvitePermissionsSetResponse.js +0 -0
  2010. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsHistoryResponse.js +0 -0
  2011. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInfoResponse.js +0 -0
  2012. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteResponse.js +0 -0
  2013. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteSharedResponse.js +0 -0
  2014. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsJoinResponse.js +0 -0
  2015. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsKickResponse.js +0 -0
  2016. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsLeaveResponse.js +0 -0
  2017. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListConnectInvitesResponse.js +0 -0
  2018. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListResponse.js +0 -0
  2019. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMarkResponse.js +0 -0
  2020. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMembersResponse.js +0 -0
  2021. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsOpenResponse.js +0 -0
  2022. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRenameResponse.js +0 -0
  2023. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRepliesResponse.js +0 -0
  2024. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteApproveResponse.js +0 -0
  2025. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteDenyResponse.js +0 -0
  2026. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +0 -0
  2027. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetPurposeResponse.js +0 -0
  2028. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetTopicResponse.js +0 -0
  2029. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsUnarchiveResponse.js +0 -0
  2030. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DialogOpenResponse.js +0 -0
  2031. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndDndResponse.js +0 -0
  2032. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndSnoozeResponse.js +0 -0
  2033. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndInfoResponse.js +0 -0
  2034. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndSetSnoozeResponse.js +0 -0
  2035. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndTeamInfoResponse.js +0 -0
  2036. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EmojiListResponse.js +0 -0
  2037. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EntityPresentDetailsResponse.js +0 -0
  2038. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsAddResponse.js +0 -0
  2039. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsDeleteResponse.js +0 -0
  2040. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsEditResponse.js +0 -0
  2041. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCompleteUploadExternalResponse.js +0 -0
  2042. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesDeleteResponse.js +0 -0
  2043. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesGetUploadURLExternalResponse.js +0 -0
  2044. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesInfoResponse.js +0 -0
  2045. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesListResponse.js +0 -0
  2046. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteAddResponse.js +0 -0
  2047. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteInfoResponse.js +0 -0
  2048. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteListResponse.js +0 -0
  2049. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteRemoveResponse.js +0 -0
  2050. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteShareResponse.js +0 -0
  2051. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteUpdateResponse.js +0 -0
  2052. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRevokePublicURLResponse.js +0 -0
  2053. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesSharedPublicURLResponse.js +0 -0
  2054. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesUploadResponse.js +0 -0
  2055. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteErrorResponse.js +0 -0
  2056. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteSuccessResponse.js +0 -0
  2057. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsArchiveResponse.js +0 -0
  2058. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCloseResponse.js +0 -0
  2059. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateChildResponse.js +0 -0
  2060. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateResponse.js +0 -0
  2061. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsHistoryResponse.js +0 -0
  2062. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInfoResponse.js +0 -0
  2063. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInviteResponse.js +0 -0
  2064. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsKickResponse.js +0 -0
  2065. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsLeaveResponse.js +0 -0
  2066. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsListResponse.js +0 -0
  2067. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsMarkResponse.js +0 -0
  2068. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsOpenResponse.js +0 -0
  2069. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRenameResponse.js +0 -0
  2070. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRepliesResponse.js +0 -0
  2071. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetPurposeResponse.js +0 -0
  2072. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetTopicResponse.js +0 -0
  2073. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsUnarchiveResponse.js +0 -0
  2074. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImCloseResponse.js +0 -0
  2075. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImHistoryResponse.js +0 -0
  2076. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImListResponse.js +0 -0
  2077. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImMarkResponse.js +0 -0
  2078. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImOpenResponse.js +0 -0
  2079. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImRepliesResponse.js +0 -0
  2080. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MigrationExchangeResponse.js +0 -0
  2081. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimCloseResponse.js +0 -0
  2082. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimHistoryResponse.js +0 -0
  2083. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimListResponse.js +0 -0
  2084. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimMarkResponse.js +0 -0
  2085. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimOpenResponse.js +0 -0
  2086. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimRepliesResponse.js +0 -0
  2087. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthAccessResponse.js +0 -0
  2088. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthTokenResponse.js +0 -0
  2089. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2AccessResponse.js +0 -0
  2090. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2ExchangeResponse.js +0 -0
  2091. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectTokenResponse.js +0 -0
  2092. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectUserInfoResponse.js +0 -0
  2093. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsAddResponse.js +0 -0
  2094. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsRemoveResponse.js +0 -0
  2095. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsAddResponse.js +0 -0
  2096. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsGetResponse.js +0 -0
  2097. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsListResponse.js +0 -0
  2098. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsRemoveResponse.js +0 -0
  2099. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersAddResponse.js +0 -0
  2100. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersCompleteResponse.js +0 -0
  2101. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersDeleteResponse.js +0 -0
  2102. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersInfoResponse.js +0 -0
  2103. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersListResponse.js +0 -0
  2104. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmConnectResponse.js +0 -0
  2105. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmStartResponse.js +0 -0
  2106. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/SearchMessagesResponse.js +0 -0
  2107. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsAddResponse.js +0 -0
  2108. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsListResponse.js +0 -0
  2109. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsRemoveResponse.js +0 -0
  2110. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamAccessLogsResponse.js +0 -0
  2111. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillableInfoResponse.js +0 -0
  2112. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillingInfoResponse.js +0 -0
  2113. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsDisconnectResponse.js +0 -0
  2114. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsListResponse.js +0 -0
  2115. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamInfoResponse.js +0 -0
  2116. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamIntegrationLogsResponse.js +0 -0
  2117. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamPreferencesListResponse.js +0 -0
  2118. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamProfileGetResponse.js +0 -0
  2119. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ToolingTokensRotateResponse.js +0 -0
  2120. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsCreateResponse.js +0 -0
  2121. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsDisableResponse.js +0 -0
  2122. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsEnableResponse.js +0 -0
  2123. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsListResponse.js +0 -0
  2124. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUpdateResponse.js +0 -0
  2125. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersListResponse.js +0 -0
  2126. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersUpdateResponse.js +0 -0
  2127. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersConversationsResponse.js +0 -0
  2128. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDeletePhotoResponse.js +0 -0
  2129. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDiscoverableContactsLookupResponse.js +0 -0
  2130. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersGetPresenceResponse.js +0 -0
  2131. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersIdentityResponse.js +0 -0
  2132. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersInfoResponse.js +0 -0
  2133. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersListResponse.js +0 -0
  2134. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersLookupByEmailResponse.js +0 -0
  2135. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileGetResponse.js +0 -0
  2136. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileSetResponse.js +0 -0
  2137. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetActiveResponse.js +0 -0
  2138. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPhotoResponse.js +0 -0
  2139. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPresenceResponse.js +0 -0
  2140. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsOpenResponse.js +0 -0
  2141. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPublishResponse.js +0 -0
  2142. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPushResponse.js +0 -0
  2143. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsUpdateResponse.js +0 -0
  2144. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepCompletedResponse.js +0 -0
  2145. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepFailedResponse.js +0 -0
  2146. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsUpdateStepResponse.js +0 -0
  2147. /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/index.js +0 -0
  2148. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/License +0 -0
  2149. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/README.md +0 -0
  2150. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/dns.js +0 -0
  2151. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/stop.js +0 -0
  2152. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/index.js +0 -0
  2153. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry.js +0 -0
  2154. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry_operation.js +0 -0
  2155. /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/package.json +0 -0
@@ -0,0 +1,2716 @@
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
+ import { DEFAULT_TOOL_MODE, isToolMode } from '@maka/core/tool-mode';
20
+ import { resolveEffectiveOrchestration, } from '@maka/core/orchestration';
21
+ import { stripUndefinedDeep } from '@maka/core/tool-args-identity';
22
+ import { YIELD_AGENT_GRAPH_TOOL_NAME, } from './stream-graph-supervisor-tools.js';
23
+ import Ajv from 'ajv';
24
+ import Ajv2019 from 'ajv/dist/2019.js';
25
+ import Ajv2020 from 'ajv/dist/2020.js';
26
+ import { z } from 'zod';
27
+ import { AsyncEventQueue } from './async-queue.js';
28
+ import { DEFAULT_CODE_MODE_EXECUTION_POLICY, executeCodeCell, } from './code-mode.js';
29
+ import { StreamWatchdog, formatStreamWatchdogError, } from './stream-watchdog.js';
30
+ import { isRuntimeCommitBoundaryError, } from './tool-runtime.js';
31
+ import { persistedOpenAiResponsesStepMessages } from './openai-responses-continuation.js';
32
+ import { composeRequestProjection, } from './request-projection.js';
33
+ import { decodePlaintextResponsesReasoningState, responsesReasoningItemId, } from './responses-reasoning-state.js';
34
+ import { finitePositive } from './context-budget-helpers.js';
35
+ import { contextDiagnosticsCompactionOf, } from './context-diagnostics.js';
36
+ import { hasActiveToolResultPruneDiagnosticPatch, hasBlockingReplayDiagnostics, } from './ai-sdk-compaction.js';
37
+ import { RunTrace } from './run-trace.js';
38
+ import { REQUEST_SANDBOX_BOUNDARY_TOOL_NAME, SANDBOX_BOUNDARY_DENIED_FOR_TURN, SANDBOX_BOUNDARY_FINALIZATION_PROMPT, } from './sandbox-boundary-tool.js';
39
+ import { buildRuntimeEventModelReplayPlan, buildSteeringEnvelope, collectToolActivityTurnIds, compatibleProviderReasoningReplayEventIds, formatTextWithInlineRefs, steeringMessagesMissingFromBase, steeringModelMessage, } from './model-history.js';
40
+ import { toolSchemaCharsForDiagnostics, requestCompositionToolSchemas, stableHash, toolCatalogHash, } from './request-shape.js';
41
+ import { toolAvailabilityHash } from './tool-availability.js';
42
+ import { renderSwarmModePrompt } from './swarm-mode.js';
43
+ import { renderGraphModePrompt } from './graph-mode.js';
44
+ import { modelUsesNativeOpenAiResponses } from './model-runtime.js';
45
+ import { applyRuntimeEventContextBudget, buildContextBudgetDiagnosticShell, mergeContextBudgetDiagnostic, mergeContextBudgetDiagnosticPatches, minimalContextBudgetDiagnostic, shouldAppendContextCompactedNote, shouldAppendContextCompactionFailedOpenNote, } from './context-budget.js';
46
+ import { isHistoryCompactContentEvent } from './history-compaction.js';
47
+ import { canContinueHistoryCompactCheckpointForModel, historyCompactSourceDigest, isProviderHistoryCompactCheckpoint, matchHistoryCompactCheckpointPrefix, projectHistoryCompactCheckpointReplay, } from './history-compact-checkpoint.js';
48
+ import { resolveSelectedModelContextWindow } from './context-budget-policy.js';
49
+ import { INVALID_TOOL_NAME, isProviderSandboxBoundaryAttempt, repairMakaToolCall, } from './ai-sdk-tool-repair.js';
50
+ const CHILD_STEP_BUDGET_FINALIZATION_PROMPT = [
51
+ '<step_budget_finalization>',
52
+ 'This is the final budgeted step for this child-agent turn.',
53
+ 'Do not call tools. Return the best concise final answer now using evidence already gathered.',
54
+ 'Clearly separate verified findings from inference and explicitly name any remaining gaps.',
55
+ '</step_budget_finalization>',
56
+ ].join('\n');
57
+ function providerToolResultContent(toolName, output, input) {
58
+ if (output === undefined) {
59
+ return {
60
+ kind: 'text',
61
+ text: `${toolName} completed without a structured result.`,
62
+ };
63
+ }
64
+ if (toolName !== 'WebSearch') {
65
+ return { kind: 'json', value: output };
66
+ }
67
+ const queryFromInput = providerWebSearchQuery(input);
68
+ if (Array.isArray(output)) {
69
+ const rows = [];
70
+ for (const result of output) {
71
+ if (!result ||
72
+ typeof result !== 'object' ||
73
+ result.type !== 'web_search_result' ||
74
+ typeof result.url !== 'string') {
75
+ continue;
76
+ }
77
+ const item = result;
78
+ try {
79
+ const parsed = new URL(item.url);
80
+ if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:')
81
+ continue;
82
+ rows.push({
83
+ title: typeof item.title === 'string' && item.title.trim() ? item.title : parsed.hostname,
84
+ url: parsed.toString(),
85
+ snippet: typeof item.pageAge === 'string' ? item.pageAge : '',
86
+ source: parsed.hostname,
87
+ });
88
+ }
89
+ catch {
90
+ // Provider source rows are untrusted; malformed URLs are dropped.
91
+ }
92
+ }
93
+ return {
94
+ kind: 'web_search',
95
+ provider: 'model',
96
+ query: queryFromInput,
97
+ rows,
98
+ };
99
+ }
100
+ if (!output || typeof output !== 'object')
101
+ return { kind: 'json', value: output };
102
+ const providerError = output;
103
+ if (providerError.type === 'web_search_tool_result_error' ||
104
+ typeof providerError.errorCode === 'string') {
105
+ return {
106
+ kind: 'web_search_error',
107
+ ok: false,
108
+ provider: 'model',
109
+ ...(queryFromInput ? { query: queryFromInput } : {}),
110
+ reason: 'provider_error',
111
+ message: typeof providerError.errorCode === 'string'
112
+ ? `Provider web search failed: ${providerError.errorCode}`
113
+ : 'Provider web search failed.',
114
+ };
115
+ }
116
+ const action = output.action;
117
+ const sources = output.sources;
118
+ let query = queryFromInput;
119
+ if (action && typeof action === 'object') {
120
+ const value = action;
121
+ if (Array.isArray(value.queries)) {
122
+ query = value.queries.filter((item) => typeof item === 'string').join(' | ');
123
+ }
124
+ else if (typeof value.query === 'string') {
125
+ query = value.query;
126
+ }
127
+ }
128
+ const rows = [];
129
+ if (Array.isArray(sources)) {
130
+ for (const source of sources) {
131
+ if (!source ||
132
+ typeof source !== 'object' ||
133
+ source.type !== 'url' ||
134
+ typeof source.url !== 'string') {
135
+ continue;
136
+ }
137
+ const url = source.url;
138
+ try {
139
+ const parsed = new URL(url);
140
+ if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:')
141
+ continue;
142
+ rows.push({
143
+ title: parsed.hostname,
144
+ url: parsed.toString(),
145
+ snippet: '',
146
+ source: parsed.hostname,
147
+ });
148
+ }
149
+ catch {
150
+ // Provider source rows are untrusted; malformed URLs are dropped.
151
+ }
152
+ }
153
+ }
154
+ return { kind: 'web_search', provider: 'model', query, rows };
155
+ }
156
+ function providerWebSearchQuery(input) {
157
+ let value = input;
158
+ if (typeof input === 'string') {
159
+ try {
160
+ value = JSON.parse(input);
161
+ }
162
+ catch {
163
+ return '';
164
+ }
165
+ }
166
+ if (!value || typeof value !== 'object')
167
+ return '';
168
+ const query = value.query;
169
+ return typeof query === 'string' ? query : '';
170
+ }
171
+ function mergeTextProviderOptions(current, next, textOffset) {
172
+ const shifted = structuredClone(next);
173
+ const shiftedOpenAi = shifted.openai;
174
+ if (shiftedOpenAi && typeof shiftedOpenAi === 'object' && !Array.isArray(shiftedOpenAi)) {
175
+ const annotations = shiftedOpenAi.annotations;
176
+ if (Array.isArray(annotations) && textOffset > 0) {
177
+ shiftedOpenAi.annotations = annotations.map((annotation) => {
178
+ if (!annotation || typeof annotation !== 'object' || Array.isArray(annotation)) {
179
+ return annotation;
180
+ }
181
+ const value = { ...annotation };
182
+ if (typeof value.startIndex === 'number')
183
+ value.startIndex += textOffset;
184
+ if (typeof value.endIndex === 'number')
185
+ value.endIndex += textOffset;
186
+ if (typeof value.start_index === 'number')
187
+ value.start_index += textOffset;
188
+ if (typeof value.end_index === 'number')
189
+ value.end_index += textOffset;
190
+ return value;
191
+ });
192
+ }
193
+ }
194
+ if (!current)
195
+ return shifted;
196
+ const merged = { ...structuredClone(current), ...shifted };
197
+ const currentOpenAi = current.openai;
198
+ if (currentOpenAi &&
199
+ typeof currentOpenAi === 'object' &&
200
+ !Array.isArray(currentOpenAi) &&
201
+ shiftedOpenAi &&
202
+ typeof shiftedOpenAi === 'object' &&
203
+ !Array.isArray(shiftedOpenAi)) {
204
+ const left = currentOpenAi;
205
+ const right = shiftedOpenAi;
206
+ const openai = { ...left, ...right };
207
+ const leftAnnotations = Array.isArray(left.annotations) ? left.annotations : [];
208
+ const rightAnnotations = Array.isArray(right.annotations) ? right.annotations : [];
209
+ if (leftAnnotations.length > 0 || rightAnnotations.length > 0) {
210
+ openai.annotations = [...leftAnnotations, ...rightAnnotations];
211
+ }
212
+ if (typeof left.itemId === 'string' &&
213
+ typeof right.itemId === 'string' &&
214
+ left.itemId !== right.itemId) {
215
+ delete openai.itemId;
216
+ }
217
+ merged.openai = openai;
218
+ }
219
+ return merged;
220
+ }
221
+ function projectToolModePlan(plan, toolMode, execTool, nested) {
222
+ if (toolMode === 'direct')
223
+ return plan;
224
+ const catalog = requestCompositionToolSchemas([...nested.values()], [...nested.keys()]);
225
+ const projectedExec = {
226
+ ...execTool,
227
+ description: [
228
+ execTool.description,
229
+ 'This is the only callable tool. Call the following tools from inside exec.',
230
+ 'After tool_search, return its result and use the refreshed catalog in the next exec call.',
231
+ JSON.stringify(catalog),
232
+ ].join('\n'),
233
+ };
234
+ return {
235
+ ...plan,
236
+ providerTools: [
237
+ projectedExec,
238
+ ...plan.providerTools.filter((tool) => tool.name === INVALID_TOOL_NAME),
239
+ ],
240
+ activeTools: [execTool.name],
241
+ ...(plan.projectActiveTools
242
+ ? { projectActiveTools: () => ({ activeTools: [execTool.name] }) }
243
+ : {}),
244
+ currentRepairToolNames: () => [execTool.name],
245
+ diagnostics: () => undefined,
246
+ };
247
+ }
248
+ function nestableToolSnapshot(providerTools, activeToolNames) {
249
+ const active = new Set(activeToolNames);
250
+ return new Map(providerTools
251
+ .filter((tool) => active.has(tool.name) &&
252
+ tool.name !== INVALID_TOOL_NAME &&
253
+ tool.name !== 'exec' &&
254
+ tool.providerTool === undefined &&
255
+ tool.nesting !== 'direct_only')
256
+ .map((tool) => [tool.name, tool]));
257
+ }
258
+ const codeModeJsonSchemaOptions = {
259
+ allErrors: true,
260
+ strict: false,
261
+ validateFormats: false,
262
+ };
263
+ const codeModeDraft7Validator = new Ajv(codeModeJsonSchemaOptions);
264
+ const codeModeDraft2019Validator = new Ajv2019(codeModeJsonSchemaOptions);
265
+ const codeModeDraft2020Validator = new Ajv2020(codeModeJsonSchemaOptions);
266
+ const codeModeCompiledSchemas = new WeakMap();
267
+ async function validateCodeModeToolInput(tool, input) {
268
+ const parameters = tool.parameters;
269
+ const parserResult = parameters.safeParseAsync
270
+ ? await parameters.safeParseAsync(input)
271
+ : parameters.safeParse?.(input);
272
+ if (parserResult) {
273
+ if (parserResult.success)
274
+ return parserResult.data;
275
+ throw invalidCodeModeToolArguments(tool.name, parserResult.error);
276
+ }
277
+ if (parameters.validate) {
278
+ const validationResult = await parameters.validate(input);
279
+ if (validationResult.success)
280
+ return validationResult.value;
281
+ throw invalidCodeModeToolArguments(tool.name, validationResult.error);
282
+ }
283
+ const schema = await parameters.jsonSchema;
284
+ const validator = compileCodeModeJsonSchema(schema ?? tool.parameters);
285
+ if (!validator || validator(input))
286
+ return input;
287
+ throw invalidCodeModeToolArguments(tool.name, validator.errors);
288
+ }
289
+ function compileCodeModeJsonSchema(schema) {
290
+ if (typeof schema === 'boolean')
291
+ return codeModeDraft2020Validator.compile(schema);
292
+ if (typeof schema !== 'object' || schema === null || Array.isArray(schema))
293
+ return undefined;
294
+ const cached = codeModeCompiledSchemas.get(schema);
295
+ if (cached)
296
+ return cached;
297
+ const declaredDialect = schema.$schema;
298
+ const dialect = typeof declaredDialect === 'string' ? declaredDialect : '';
299
+ const validator = dialect.includes('draft-07')
300
+ ? codeModeDraft7Validator
301
+ : dialect.includes('2019-09')
302
+ ? codeModeDraft2019Validator
303
+ : codeModeDraft2020Validator;
304
+ const schemaForCompile = dialect.startsWith('https://json-schema.org/draft-07/schema')
305
+ ? { ...schema, $schema: dialect.replace('https://', 'http://') }
306
+ : schema;
307
+ const compiled = validator.compile(schemaForCompile);
308
+ codeModeCompiledSchemas.set(schema, compiled);
309
+ return compiled;
310
+ }
311
+ function invalidCodeModeToolArguments(toolName, error) {
312
+ return new Error(`Invalid arguments for tool "${toolName}": ${schemaErrorSummary(error)}`);
313
+ }
314
+ function schemaErrorSummary(error) {
315
+ if (error && typeof error === 'object' && Array.isArray(error.issues)) {
316
+ const issues = error.issues;
317
+ return issues
318
+ .slice(0, 5)
319
+ .map((issue) => {
320
+ const path = Array.isArray(issue.path) ? issue.path.join('.') : '';
321
+ const message = typeof issue.message === 'string' ? issue.message : 'invalid value';
322
+ return path ? `${path}: ${message}` : message;
323
+ })
324
+ .join('; ')
325
+ .slice(0, 1000);
326
+ }
327
+ if (Array.isArray(error)) {
328
+ return error
329
+ .slice(0, 5)
330
+ .map((issue) => {
331
+ const path = issue.instancePath || issue.schemaPath;
332
+ return `${path || 'input'} ${issue.message ?? 'is invalid'}`;
333
+ })
334
+ .join('; ')
335
+ .slice(0, 1000);
336
+ }
337
+ return 'input does not match the declared schema';
338
+ }
339
+ function joinPromptFragments(fragments) {
340
+ const joined = fragments
341
+ .map((fragment) => fragment?.trim())
342
+ .filter((fragment) => Boolean(fragment))
343
+ .join('\n\n');
344
+ return joined.length > 0 ? joined : undefined;
345
+ }
346
+ const MAX_WAITING_CODE_MODE_CELLS = 1;
347
+ const MAX_PROVIDER_ATTEMPTS_PER_STEP = 10;
348
+ const MAX_IDLE_WATCHDOG_RETRIES_PER_STEP = 1;
349
+ const MAX_INCOMPLETE_STREAM_RETRIES_PER_STEP = 1;
350
+ // A mid-stream cut after partial thinking seals one transcript fragment per
351
+ // retry. A gateway that systematically kills long thinking streams (the
352
+ // 2026-08-28 incident shape) would otherwise spend the full attempt budget
353
+ // accumulating fragments before failing anyway, so fail fast after one.
354
+ const MAX_SEALED_THINKING_RETRIES_PER_STEP = 1;
355
+ const PROVIDER_RETRY_BASE_DELAY_MS = 1_000;
356
+ const PROVIDER_RETRY_MAX_DELAY_MS = 32_000;
357
+ const PROVIDER_RETRY_JITTER_FACTOR = 0.25;
358
+ function providerRetryDelayMs(failedAttempt, retryAfterMs) {
359
+ if (retryAfterMs !== undefined)
360
+ return retryAfterMs;
361
+ const base = Math.min(PROVIDER_RETRY_BASE_DELAY_MS * 2 ** Math.max(0, failedAttempt - 1), PROVIDER_RETRY_MAX_DELAY_MS);
362
+ return Math.ceil(base + Math.random() * PROVIDER_RETRY_JITTER_FACTOR * base);
363
+ }
364
+ function providerRetryReason(kind) {
365
+ switch (kind) {
366
+ case 'stream_truncated':
367
+ case 'network':
368
+ case 'provider_unavailable':
369
+ case 'rate_limit':
370
+ case 'timeout':
371
+ return kind;
372
+ case 'provider_capacity':
373
+ return 'provider_capacity';
374
+ default:
375
+ return 'unknown';
376
+ }
377
+ }
378
+ function isIncompleteProviderFinishReason(reason) {
379
+ return reason === undefined || reason === 'other' || reason === 'unknown';
380
+ }
381
+ /**
382
+ * The mutable state of ONE `send()`.
383
+ *
384
+ * Identity is readonly and captured at dispatch: a tool that executes minutes
385
+ * later commits against the run that actually issued it, never against whatever
386
+ * run happens to be current when it finishes. The remaining fields are the
387
+ * turn's own stream/abort bookkeeping, isolated so an overlapping turn on the
388
+ * same backend cannot observe or clear them.
389
+ *
390
+ * Each turn owns its ToolRuntime for the same reason: gating, the loop gate,
391
+ * the subagent and child-run limiters, durable attempts, and step admission are
392
+ * all per-turn facts.
393
+ */
394
+ export class AiSdkTurn {
395
+ deps;
396
+ request;
397
+ abortController = new AbortController();
398
+ activeTools = new Map();
399
+ aborted = false;
400
+ loopStopRequested = false;
401
+ loopStopReason;
402
+ handoffPaused = false;
403
+ watchdog = null;
404
+ runTrace = null;
405
+ imageBudget = { used: 0, decisions: new Map() };
406
+ injectedSteeringMessages = [];
407
+ memoryExtractRequested = false;
408
+ memorySourceMessages;
409
+ memorySourceEventMessagePositions;
410
+ memorySourceSystemPrompt;
411
+ memorySourceTools;
412
+ memorySourceActiveTools;
413
+ finalAssistantText;
414
+ codeModeTools;
415
+ turnId;
416
+ runId;
417
+ orchestration;
418
+ toolRuntime;
419
+ constructor(deps, request) {
420
+ this.deps = deps;
421
+ this.request = request;
422
+ this.turnId = request.turnId;
423
+ this.runId = request.runId;
424
+ this.orchestration =
425
+ request.orchestration ??
426
+ resolveEffectiveOrchestration(deps.backend.header.orchestrationMode, undefined);
427
+ this.toolRuntime = deps.createToolRuntime(this);
428
+ }
429
+ async *run() {
430
+ yield* this.runWithinScope(this.request);
431
+ }
432
+ /** Release resources after the backend removes this turn from its active index. */
433
+ async close() {
434
+ this.deps.modelAdapter.endContinuation(this.turnId);
435
+ await this.toolRuntime.endTurn(this.aborted ? 'aborted' : 'completed');
436
+ }
437
+ requestStop(reason, mode) {
438
+ if (mode === 'after_step') {
439
+ this.loopStopRequested = true;
440
+ this.runTrace?.abortRequested(reason);
441
+ return;
442
+ }
443
+ this.aborted = true;
444
+ this.abortController.abort();
445
+ this.runTrace?.abortRequested(reason);
446
+ }
447
+ async endAbortedTools() {
448
+ await this.toolRuntime.endTurn('aborted');
449
+ }
450
+ async respondToSandboxBoundary(decision) {
451
+ return await this.toolRuntime.respondToSandboxBoundaryResponse(decision);
452
+ }
453
+ respondToUserQuestion(response) {
454
+ return this.toolRuntime.respondToUserQuestion(response);
455
+ }
456
+ memorySourceSnapshot(boundary) {
457
+ if (!this.runId ||
458
+ !this.memorySourceMessages ||
459
+ !this.memorySourceTools ||
460
+ !this.memorySourceActiveTools) {
461
+ return undefined;
462
+ }
463
+ const sourceMessages = boundary.trigger === 'extract' && this.finalAssistantText
464
+ ? [
465
+ ...this.memorySourceMessages,
466
+ {
467
+ role: 'assistant',
468
+ content: [{ type: 'text', text: this.finalAssistantText }],
469
+ },
470
+ ]
471
+ : this.memorySourceMessages;
472
+ const memoryProjection = projectMemoryConversationPrefix(sourceMessages, this.memorySourceEventMessagePositions);
473
+ return {
474
+ ...boundary,
475
+ sourceHeader: memoryExtractionModelHeader(this.deps.backend.header),
476
+ ...(this.memorySourceSystemPrompt
477
+ ? { sourceSystemPrompt: this.memorySourceSystemPrompt }
478
+ : {}),
479
+ sourceMessages: structuredClone(memoryProjection.messages),
480
+ ...(memoryProjection.eventMessagePositions
481
+ ? {
482
+ sourceEventMessagePositions: structuredClone(memoryProjection.eventMessagePositions),
483
+ }
484
+ : {}),
485
+ sourceTools: { ...this.memorySourceTools },
486
+ sourceActiveTools: [...this.memorySourceActiveTools],
487
+ sourceProviderOptions: structuredClone(this.deps.resolvedProviderOptions),
488
+ ...(this.deps.modelAdapter.maxOutputTokens() !== undefined
489
+ ? { sourceMaxOutputTokens: this.deps.modelAdapter.maxOutputTokens() }
490
+ : {}),
491
+ ...(resolveSelectedModelContextWindow(this.deps.backend.connection, this.deps.backend.modelId) !== undefined
492
+ ? {
493
+ sourceContextWindowTokens: resolveSelectedModelContextWindow(this.deps.backend.connection, this.deps.backend.modelId),
494
+ }
495
+ : {}),
496
+ sessionId: this.deps.backend.sessionId,
497
+ runId: this.runId,
498
+ turnId: this.turnId,
499
+ workspaceKey: this.deps.backend.header.workspaceRoot,
500
+ };
501
+ }
502
+ dispatchAutomaticMemoryCompaction(dispatch) {
503
+ const capabilities = this.deps.backend.memoryExtraction;
504
+ const boundary = dispatch.checkpoint.memoryExtractionBoundary;
505
+ if (!capabilities ||
506
+ !this.runId ||
507
+ !boundary ||
508
+ modelUsesNativeOpenAiResponses(this.deps.backend.connection, this.deps.backend.modelId)) {
509
+ return;
510
+ }
511
+ try {
512
+ capabilities.extract({
513
+ trigger: 'compaction',
514
+ sourceHeader: memoryExtractionModelHeader(this.deps.backend.header),
515
+ // Compaction messages are rebuilt from the durable RuntimeEvent prefix
516
+ // inside the background lane, avoiding a full Memory projection here.
517
+ sourceMessages: [],
518
+ rebuildSourceContextFromCompactionCheckpoint: true,
519
+ sourceTools: {},
520
+ sourceActiveTools: [],
521
+ ...(this.deps.modelAdapter.maxOutputTokens() !== undefined
522
+ ? { sourceMaxOutputTokens: this.deps.modelAdapter.maxOutputTokens() }
523
+ : {}),
524
+ ...(resolveSelectedModelContextWindow(this.deps.backend.connection, this.deps.backend.modelId) !== undefined
525
+ ? {
526
+ sourceContextWindowTokens: resolveSelectedModelContextWindow(this.deps.backend.connection, this.deps.backend.modelId),
527
+ }
528
+ : {}),
529
+ sessionId: this.deps.backend.sessionId,
530
+ runId: this.runId,
531
+ turnId: this.turnId,
532
+ workspaceKey: this.deps.backend.header.workspaceRoot,
533
+ compactionCheckpointId: dispatch.checkpoint.checkpointId,
534
+ compactionBoundaryEventId: boundary.runtimeEventId,
535
+ });
536
+ }
537
+ catch {
538
+ // Automatic memory extraction is fail-open and must never perturb the caller.
539
+ }
540
+ }
541
+ automaticMemoryCompactionSupported() {
542
+ return (this.deps.backend.memoryExtraction !== undefined &&
543
+ !modelUsesNativeOpenAiResponses(this.deps.backend.connection, this.deps.backend.modelId));
544
+ }
545
+ automaticMemoryCompactionDecision() {
546
+ const capabilities = this.deps.backend.memoryExtraction;
547
+ if (!capabilities)
548
+ return { disposition: 'eligible', dispatch: false };
549
+ if (this.deps.backend.header.subagentParent || this.deps.backend.header.isArchived) {
550
+ return { disposition: 'policy_denied', dispatch: false };
551
+ }
552
+ const gate = capabilities.automaticGate?.() ?? {
553
+ allowed: false,
554
+ reason: 'unavailable',
555
+ };
556
+ if (gate.allowed)
557
+ return { disposition: 'eligible', dispatch: true };
558
+ return gate.reason === 'unavailable'
559
+ ? { disposition: 'eligible', dispatch: false }
560
+ : { disposition: 'policy_denied', dispatch: false };
561
+ }
562
+ createCodeModeExecTool(eventSink) {
563
+ return {
564
+ name: 'exec',
565
+ description: [
566
+ 'Execute a bounded orchestration cell over the active tools.',
567
+ 'Use tools.<name>(args), await dependent calls, and Promise.all for independent calls.',
568
+ 'The sandbox has no process, filesystem, network, timer, eval, import, or cross-cell state.',
569
+ 'Terminate by returning a JSON-serializable value. Failures return a structured diagnostic.',
570
+ ].join(' '),
571
+ parameters: z.object({ code: z.string() }),
572
+ executionSemantics: 'exclusive_step',
573
+ nesting: 'direct_only',
574
+ recoveryMode: 'never_auto_retry',
575
+ impl: (args, context) => this.executeCodeModeCell(eventSink, args.code, context),
576
+ };
577
+ }
578
+ /**
579
+ * A note about what happened inside this invocation, written to the
580
+ * invocation's own ledger. Fail-open: the note explains a turn, it is not
581
+ * what the turn did, so losing it must never end a send that is otherwise
582
+ * fine. Returns whether the note landed.
583
+ */
584
+ async recordSystemNote(kind, turnId, data) {
585
+ if (!this.deps.backend.recordSystemNote)
586
+ return false;
587
+ return await this.deps.backend
588
+ .recordSystemNote(kind, turnId, data)
589
+ .then(() => true)
590
+ .catch(() => false);
591
+ }
592
+ // --------------------------------------------------------------------------
593
+ // manual history compaction
594
+ // --------------------------------------------------------------------------
595
+ async *runWithinScope(input) {
596
+ const turnId = input.turnId;
597
+ const maxSteps = input.maxSteps === null ? undefined : (input.maxSteps ?? this.deps.maxSteps);
598
+ const toolRuntime = this.toolRuntime;
599
+ const turnAbortController = this.abortController;
600
+ const midTurnState = this.deps.compaction.buildMidTurnCapacityCompactState(input);
601
+ const queue = new AsyncEventQueue();
602
+ const codeModeExecTool = this.createCodeModeExecTool(queue);
603
+ // One AssistantMessage is flushed per provider step (not per turn), so the
604
+ // ledger records the text↔tool timeline at step granularity and each step's
605
+ // Anthropic thinking signature stays paired with its own thinking text. The
606
+ // turn's first step reuses this id; every later step rotates to a fresh one
607
+ // at its step boundary (see the stream loop below).
608
+ let currentStepMessageId = this.deps.newId();
609
+ let stepText = '';
610
+ let stepTextProviderOptions;
611
+ let stepTextPartStartOffset = 0;
612
+ let stepThinkingParts = [];
613
+ let stepThinkingPartsById = new Map();
614
+ let stepContentOrder = [];
615
+ const recordStepContent = (kind) => {
616
+ if (!stepContentOrder.includes(kind))
617
+ stepContentOrder.push(kind);
618
+ };
619
+ // Flush the current step's AssistantMessage (text + thinking) and the paired
620
+ // terminal thinking/text events, then clear the per-step accumulators.
621
+ // Persist when the step produced text OR reasoning — a thinking-only step
622
+ // (Anthropic's signed/omitted reasoning has empty text) still round-trips its
623
+ // signed block; a pure-tool step (no text, no thinking) writes nothing, so
624
+ // tool-only steps leave no placeholder assistant row. thinking_complete
625
+ // precedes text_complete so the read-model attaches this step's reasoning to
626
+ // this step's assistant row. Hoisted to turn scope so both the streaming
627
+ // path and the abort/error handler can flush a partial step.
628
+ const resetStep = () => {
629
+ stepText = '';
630
+ stepTextProviderOptions = undefined;
631
+ stepTextPartStartOffset = 0;
632
+ stepThinkingParts = [];
633
+ stepThinkingPartsById = new Map();
634
+ stepContentOrder = [];
635
+ };
636
+ const flushStep = async () => {
637
+ const hasThinking = stepThinkingParts.length > 0;
638
+ if (stepText.length === 0 && !hasThinking) {
639
+ resetStep();
640
+ return;
641
+ }
642
+ const stepId = currentStepMessageId;
643
+ if (hasThinking) {
644
+ for (const part of stepThinkingParts) {
645
+ queue.push({
646
+ type: 'thinking_complete',
647
+ id: this.deps.newId(),
648
+ turnId,
649
+ ts: this.deps.now(),
650
+ messageId: stepId,
651
+ text: part.text,
652
+ ...(part.signature !== undefined ? { signature: part.signature } : {}),
653
+ // No sanitiser here, unlike the tool call below: these options are
654
+ // not the provider's object. `translateChunk` rebuilds reasoning
655
+ // metadata from two named string fields, so an omitted provider
656
+ // field cannot arrive as an explicit `undefined` and break the
657
+ // canonical encoding. Passing the provider's object through
658
+ // instead would need the same `stripUndefinedDeep` a tool call has.
659
+ ...(part.providerOptions !== undefined
660
+ ? { providerOptions: part.providerOptions }
661
+ : {}),
662
+ });
663
+ }
664
+ }
665
+ queue.push({
666
+ type: 'text_complete',
667
+ id: this.deps.newId(),
668
+ turnId,
669
+ ts: this.deps.now(),
670
+ messageId: stepId,
671
+ text: stepText,
672
+ ...(stepTextProviderOptions !== undefined
673
+ ? { providerOptions: stepTextProviderOptions }
674
+ : {}),
675
+ });
676
+ this.finalAssistantText = stepText.length > 0 ? stepText : undefined;
677
+ resetStep();
678
+ };
679
+ let tokenUsage;
680
+ let tokenUsageCostUsd;
681
+ // Per-send sum of every COMPLETED step's usage, merged at each finish-step
682
+ // boundary. When the send aborts (mid-turn exhaust, user stop, stream
683
+ // error) the SDK's cumulative `usage` promise may not resolve, but this sum is
684
+ // real provider-reported evidence for the steps that did finish — IF every
685
+ // completed step produced a usable sample. One unusable sample makes the
686
+ // sum a partial cost, and LlmCallRecord has no partial marker, so the flag
687
+ // fails the whole fallback closed (#972: incomplete usage is no usage).
688
+ let completedStepUsage;
689
+ let sawUnusableStepUsage = false;
690
+ // Input tokens from the last completed step — the actual prompt token count
691
+ // of the final API request. Used to compute contextRemaining for the TUI
692
+ // statusline ctx segment (#1067): contextRemaining = contextWindow - this.
693
+ // result.usage.inputTokens is cumulative across steps and would produce
694
+ // misleading >100% percentages, so the per-step value is captured here.
695
+ let lastStepInputTokens;
696
+ /** Tool count of the request that produced `lastStepInputTokens`. */
697
+ let lastStepActiveToolCount;
698
+ // Output tokens of the same step: with the input they are the baseline the
699
+ // next request is judged from (everything the model produced is re-sent).
700
+ let lastStepOutputTokens;
701
+ let streamStatus = 'success';
702
+ let streamErrorClass;
703
+ let runtimeSteps = 0;
704
+ let toolAvailabilityForTelemetry = undefined;
705
+ let contextBudgetForTelemetry;
706
+ let contextCompactedNoteWritten = false;
707
+ let contextCompactionFailedOpenNoteWritten = false;
708
+ let contextWindowOverrunNoteWritten = false;
709
+ let contextReportedWindowNoteWritten = false;
710
+ let contextOverflowAfterCompactionNoteWritten = false;
711
+ let contextWindowSuggestionNoteWritten = false;
712
+ // A compaction decision is known the moment its stage reports it — the
713
+ // pre-turn replay resolves its fold before the first request goes out —
714
+ // while the settlement path is skipped entirely by a stop or a stream
715
+ // error. Write both notes when the decision is known, once per send,
716
+ // whichever stage reports first (#4850).
717
+ const appendCompactionDecisionNotes = async (contextBudget) => {
718
+ if (!contextCompactionFailedOpenNoteWritten &&
719
+ shouldAppendContextCompactionFailedOpenNote(contextBudget)) {
720
+ // The most recent stage that refused the fold: a send can carry both a
721
+ // priorReplay and an activeStep refusal after a diagnostic merge, and
722
+ // array order would pin the stale one.
723
+ const failOpenReason = contextBudget?.compactionDecisions
724
+ ?.filter((decision) => decision.boundaryKind === 'historyCompact' && decision.decision === 'failedOpen')
725
+ .at(-1)?.failOpenReason;
726
+ // Mark written only after the append lands: a failed write must leave
727
+ // the flag down so the settlement fallback can still record the note.
728
+ contextCompactionFailedOpenNoteWritten = await this.recordSystemNote('context_compaction_failed_open', turnId, failOpenReason !== undefined ? { failOpenReason } : undefined);
729
+ }
730
+ if (!contextCompactedNoteWritten && shouldAppendContextCompactedNote(contextBudget)) {
731
+ contextCompactedNoteWritten = await this.recordSystemNote('context_compacted', turnId);
732
+ }
733
+ };
734
+ // Request index (0-based) at which the active prune last rewrote the
735
+ // request. A step Maka pruned is not append-only, so usage may legitimately
736
+ // shrink.
737
+ let pruneAppliedAtStep;
738
+ const trace = new RunTrace({
739
+ sessionId: this.deps.backend.sessionId,
740
+ turnId,
741
+ connectionSlug: this.deps.backend.connection.slug,
742
+ providerId: this.deps.backend.connection.providerType,
743
+ modelId: this.deps.backend.modelId,
744
+ newId: this.deps.newId,
745
+ now: this.deps.now,
746
+ record: this.deps.backend.recordRunTrace,
747
+ });
748
+ this.runTrace = trace;
749
+ trace.turnStarted({
750
+ orchestrationMode: this.orchestration.mode,
751
+ orchestrationSource: this.orchestration.source,
752
+ agentSwarmAuthorization: this.orchestration.agentSwarmAuthorization,
753
+ });
754
+ if (this.deps.backend.planTraceContext) {
755
+ trace.emit('plan', 'plan_context_resolved', 'Plan context resolved', {
756
+ ...this.deps.backend.planTraceContext,
757
+ });
758
+ if (this.deps.backend.planTraceContext.executionId) {
759
+ trace.emit('plan', 'plan_execution_started', 'Plan execution turn started', {
760
+ ...this.deps.backend.planTraceContext,
761
+ });
762
+ }
763
+ }
764
+ const providerRequestTracker = this.deps.providerTelemetry.createTracker({
765
+ turnId,
766
+ callKind: 'main',
767
+ modelId: this.deps.backend.modelId,
768
+ runId: this.runId,
769
+ });
770
+ const providerRequestTraceId = providerRequestTracker?.traceId;
771
+ // --- Resolve model (API key already attached at construct time) ---
772
+ let model;
773
+ try {
774
+ model = this.deps.modelAdapter.resolveModel();
775
+ trace.modelResolved();
776
+ }
777
+ catch (err) {
778
+ trace.modelResolveFailed(err);
779
+ queue.push(this.makeErrorEvent(turnId, err));
780
+ queue.push({
781
+ type: 'complete',
782
+ id: this.deps.newId(),
783
+ turnId,
784
+ ts: this.deps.now(),
785
+ stopReason: 'error',
786
+ });
787
+ queue.close();
788
+ yield* this.drain(queue);
789
+ return;
790
+ }
791
+ // --- Build the provider-visible schema set. Tool execution stays in Runtime. ---
792
+ // Each logical step freezes its own scoped catalog and search projection.
793
+ // Mutable activation belongs to this turn and follows contribution identity.
794
+ const requiredOrchestrationTools = this.orchestration.mode === 'swarm'
795
+ ? new Set([
796
+ 'agent_list',
797
+ 'update_agent_graph',
798
+ 'yield_agent_graph',
799
+ 'agent_swarm_status',
800
+ 'agent_output',
801
+ ])
802
+ : this.orchestration.mode === 'graph'
803
+ ? new Set([
804
+ 'agent_list',
805
+ 'view_agent_graph',
806
+ 'update_agent_graph',
807
+ 'yield_agent_graph',
808
+ 'agent_swarm_status',
809
+ 'agent_output',
810
+ ])
811
+ : new Set();
812
+ const requestedToolMode = input.toolMode ?? this.deps.backend.header.toolMode ?? DEFAULT_TOOL_MODE;
813
+ if (!isToolMode(requestedToolMode)) {
814
+ throw new Error(`Invalid tool mode: ${String(requestedToolMode)}`);
815
+ }
816
+ const toolMode = requestedToolMode;
817
+ const snapshotStepTools = () => {
818
+ const snapshot = this.deps.snapshotToolAvailability();
819
+ if (toolMode === 'code_mode' && snapshot.hostTools.some((tool) => tool.name === 'exec')) {
820
+ throw new Error('Tool name "exec" is reserved for Code Mode.');
821
+ }
822
+ const basePlan = snapshot.runtime.prepare(this.activeTools, requiredOrchestrationTools);
823
+ const nestedTools = nestableToolSnapshot(basePlan.providerTools, basePlan.activeTools);
824
+ const plan = projectToolModePlan(basePlan, toolMode, codeModeExecTool, toolRuntime.hasSandboxBoundaryDenial()
825
+ ? new Map([...nestedTools].filter(([name]) => name !== REQUEST_SANDBOX_BOUNDARY_TOOL_NAME))
826
+ : nestedTools);
827
+ const modelTools = {};
828
+ for (const tool of plan.providerTools) {
829
+ modelTools[tool.name] = tool.providerTool
830
+ ? { kind: 'provider', providerTool: tool.providerTool }
831
+ : { kind: 'function', description: tool.description, inputSchema: tool.parameters };
832
+ }
833
+ toolRuntime.setGating(plan.gating);
834
+ return { plan, providerTools: plan.providerTools, modelTools, nestedTools };
835
+ };
836
+ let { plan, providerTools, modelTools, nestedTools } = snapshotStepTools();
837
+ let activeToolResultPruneDiagnosticPatch = {};
838
+ let midTurnCompactDiagnosticPatch;
839
+ // Tool names the repair path matches a mis-cased call against — follows the
840
+ // current step's snapshot so a tool activated mid-turn is repairable on the
841
+ // step it becomes active, not routed to `invalid`.
842
+ const boundaryAwareToolNames = (names) => {
843
+ if (toolRuntime.shouldFinalizeSandboxBoundary())
844
+ return [];
845
+ return toolRuntime.hasSandboxBoundaryDenial()
846
+ ? names.filter((name) => name !== REQUEST_SANDBOX_BOUNDARY_TOOL_NAME)
847
+ : [...names];
848
+ };
849
+ const currentRepairToolNames = () => boundaryAwareToolNames(plan.currentRepairToolNames());
850
+ let resolvedSystemPrompt = { sourceRevisions: [] };
851
+ let systemPrompt;
852
+ // --- Build messages from RuntimeEvent history and its compatibility projection. ---
853
+ const priorReplayResult = await this.buildPriorMessages(input);
854
+ if (this.aborted) {
855
+ queue.push({
856
+ type: 'abort',
857
+ id: this.deps.newId(),
858
+ turnId,
859
+ ts: this.deps.now(),
860
+ reason: 'user_stop',
861
+ });
862
+ queue.push({
863
+ type: 'complete',
864
+ id: this.deps.newId(),
865
+ turnId,
866
+ ts: this.deps.now(),
867
+ stopReason: 'user_stop',
868
+ });
869
+ queue.close();
870
+ yield* this.drain(queue);
871
+ return;
872
+ }
873
+ const priorReplay = priorReplayResult;
874
+ if (input.continuation && priorReplay.messages.length === 0) {
875
+ const replay = priorReplayFailureTrace(priorReplay);
876
+ const error = new ContinuationReplayEmptyError(replay.gate, replay.diagnosticCodes);
877
+ trace.modelStreamFailed(error.code, error, replay);
878
+ queue.push(this.makeErrorEvent(turnId, error));
879
+ queue.push({
880
+ type: 'complete',
881
+ id: this.deps.newId(),
882
+ turnId,
883
+ ts: this.deps.now(),
884
+ stopReason: 'error',
885
+ });
886
+ queue.close();
887
+ yield* this.drain(queue);
888
+ return;
889
+ }
890
+ // The pre-turn replay's fold decision is final here: surface it now so a
891
+ // stop or stream error later in the send cannot keep it from the
892
+ // transcript (#4850).
893
+ await appendCompactionDecisionNotes(priorReplay.contextBudget);
894
+ if (midTurnState) {
895
+ // Roll-forward seed: the latest durable checkpoint (loaded or written at
896
+ // turn start) so a mid-turn summary only re-reads the newly folded span.
897
+ const checkpoint = priorReplay.latestHistoryCompactCheckpoint;
898
+ midTurnState.previousCheckpoint =
899
+ checkpoint &&
900
+ canContinueHistoryCompactCheckpointForModel(checkpoint, this.deps.backend.connection, this.deps.backend.header.llmConnectionId, this.deps.backend.modelId)
901
+ ? checkpoint
902
+ : undefined;
903
+ }
904
+ /**
905
+ * The fold THIS request's prompt was built under (#2323).
906
+ *
907
+ * Called once per physical dispatch rather than once per send, because the
908
+ * boundary moves between dispatches of the same send: mid-turn capacity
909
+ * compaction advances it before a later step, and overflow recovery
910
+ * advances it before it resends the request the provider just rejected.
911
+ * Sealed from session state at settlement it would be whichever fold
912
+ * arrived last — not the one the sealed prompt was actually made of.
913
+ *
914
+ * Mid-turn state is the single rolling authority whenever the turn has one:
915
+ * it is seeded just above from the pre-turn checkpoint and is what both of
916
+ * those folds write to. A turn without that seam can only have been built
917
+ * under the pre-turn checkpoint.
918
+ */
919
+ const requestHistoryCompactBoundary = () => {
920
+ const checkpoint = midTurnState
921
+ ? midTurnState.previousCheckpoint
922
+ : priorReplay.latestHistoryCompactCheckpoint;
923
+ return checkpoint ? contextDiagnosticsCompactionOf(checkpoint) : undefined;
924
+ };
925
+ // --- Background pump: streamText → stream → normalize → queue ---
926
+ const pumpDone = (async () => {
927
+ const watchdogState = {
928
+ current: null,
929
+ };
930
+ let providerRequestAbortController = new AbortController();
931
+ const watchdogTimeoutState = { current: null };
932
+ const currentWatchdogTimeout = () => watchdogTimeoutState.current;
933
+ const consumeWatchdogTimeout = () => {
934
+ const timeout = watchdogTimeoutState.current;
935
+ watchdogTimeoutState.current = null;
936
+ return timeout;
937
+ };
938
+ let lastCompletedStepHadToolResult = false;
939
+ let terminalProviderErrorReason;
940
+ let terminalRetry;
941
+ try {
942
+ const startWatchdog = () => {
943
+ watchdogState.current?.stop();
944
+ const next = new StreamWatchdog({
945
+ now: this.deps.now,
946
+ connectTimeoutMs: this.deps.backend.streamConnectTimeoutMs,
947
+ idleTimeoutMs: this.deps.backend.streamIdleTimeoutMs,
948
+ ...this.deps.backend.streamWatchdogTimer,
949
+ onTimeout: (timeout) => {
950
+ const error = new Error(formatStreamWatchdogError(timeout));
951
+ watchdogTimeoutState.current = { phase: timeout.phase, error };
952
+ providerRequestAbortController.abort(error);
953
+ },
954
+ });
955
+ watchdogState.current = next;
956
+ this.watchdog = next;
957
+ next.start();
958
+ };
959
+ const activeTools = plan.activeTools;
960
+ const currentUserContent = input.continuation
961
+ ? undefined
962
+ : await this.deps.messageProjection.buildCurrentUserContent(this.imageBudget, input.text, input.attachments, input.directoryReferences, input.quotes, input.headAnchorRuntimeEvent?.id);
963
+ const messages = currentUserContent === undefined
964
+ ? [...priorReplay.messages]
965
+ : [
966
+ ...priorReplay.messages,
967
+ {
968
+ role: 'user',
969
+ content: currentUserContent,
970
+ },
971
+ ];
972
+ const loadDurableTurnEvents = async () => {
973
+ const loadTurnRuntimeEvents = this.deps.backend.loadTurnRuntimeEvents;
974
+ if (!loadTurnRuntimeEvents) {
975
+ throw new Error('durable current-run reader is required for tool continuation');
976
+ }
977
+ await queue.waitUntilConsumedThroughCurrent();
978
+ return (await loadTurnRuntimeEvents(turnId)).filter((event) => event.turnId === turnId);
979
+ };
980
+ const loadDurableTurnProjection = async () => {
981
+ const turnEvents = await loadDurableTurnEvents();
982
+ const projectionCheckpoint = midTurnState?.projectionCheckpoint;
983
+ const rawProjectionEvents = projectionCheckpoint
984
+ ? [
985
+ ...midTurnState.priorContentEvents,
986
+ ...turnEvents.filter(isHistoryCompactContentEvent),
987
+ ]
988
+ : turnEvents;
989
+ let replayEvents = rawProjectionEvents;
990
+ let effectiveProjectionCheckpoint = projectionCheckpoint;
991
+ if (projectionCheckpoint) {
992
+ const checkpointMatch = matchHistoryCompactCheckpointPrefix(projectionCheckpoint, rawProjectionEvents);
993
+ if (checkpointMatch.reason) {
994
+ throw new Error(`durable checkpoint projection mismatch: ${checkpointMatch.reason}`);
995
+ }
996
+ // Content-currency guard: the raw identity still matches, but a
997
+ // transition committed after this fold (e.g. an active-turn prune
998
+ // in this very send) changed the effective view the block was
999
+ // built from. Replay without the stale block — the provider
1000
+ // decides fit and overflow recovery re-folds (#4845 review).
1001
+ const pinnedEffectiveDigest = projectionCheckpoint.coverage.effectiveSourceDigest;
1002
+ const coveredEffective = await this.deps.compaction.foldEffectiveModelHistory(checkpointMatch.coveredRuntimeEvents);
1003
+ if (pinnedEffectiveDigest === undefined ||
1004
+ historyCompactSourceDigest(coveredEffective) !== pinnedEffectiveDigest) {
1005
+ effectiveProjectionCheckpoint = undefined;
1006
+ }
1007
+ else {
1008
+ replayEvents = projectHistoryCompactCheckpointReplay(projectionCheckpoint, checkpointMatch.coveredRuntimeEvents, checkpointMatch.successorRuntimeEvents);
1009
+ }
1010
+ // The checkpoint was capacity-validated before it was persisted.
1011
+ // Do not re-run that gate against a later, larger successor tail:
1012
+ // the active-step shaper must see that growth so it can roll the
1013
+ // checkpoint forward instead of resurrecting raw history.
1014
+ }
1015
+ // The current Turn is model-visible history like any other, so it is
1016
+ // folded through the same reducer before it becomes messages. Without
1017
+ // this, a result archived at step N is rebuilt in full at step N+1 and
1018
+ // the ledger's account of what the model sees stops being true.
1019
+ const foldedReplayEvents = await this.deps.compaction.foldEffectiveModelHistory(replayEvents);
1020
+ const replayPlan = buildRuntimeEventModelReplayPlan(foldedReplayEvents, {
1021
+ toolActivityTurnIds: collectToolActivityTurnIds([
1022
+ ...(input.runtimeContext ?? []),
1023
+ ...turnEvents,
1024
+ ]),
1025
+ });
1026
+ if (hasBlockingReplayDiagnostics(replayPlan) ||
1027
+ (replayPlan.hasProviderNativeSemantics &&
1028
+ !this.deps.messageProjection.canReplayProviderNative(replayPlan))) {
1029
+ throw new Error('durable current-run projection is not replayable');
1030
+ }
1031
+ const currentTurnMessages = await this.deps.messageProjection.materializeRuntimeReplayPlan(replayPlan, this.imageBudget, effectiveProjectionCheckpoint, compatibleProviderReasoningReplayEventIds(replayEvents, input.runtimeContextInvocations, this.deps.backend.providerStateIdentity, this.deps.backend.modelId, this.runId));
1032
+ return effectiveProjectionCheckpoint
1033
+ ? currentTurnMessages
1034
+ : [...priorReplay.messages, ...currentTurnMessages];
1035
+ };
1036
+ // Tool Availability describes the provider-visible (active) subset. A
1037
+ // group loaded this turn expands that subset on later requests, so the
1038
+ // terminal trace is refined against the final active set below.
1039
+ contextBudgetForTelemetry = priorReplay.contextBudget;
1040
+ const computeToolAvailability = (active) => {
1041
+ const toolSchemaChars = toolSchemaCharsForDiagnostics(providerTools, active);
1042
+ return plan.diagnostics(active, toolSchemaChars);
1043
+ };
1044
+ toolAvailabilityForTelemetry = computeToolAvailability(activeTools);
1045
+ trace.modelStreamStarted(activeTools, {
1046
+ ...(toolAvailabilityForTelemetry !== undefined
1047
+ ? { toolAvailability: toolAvailabilityForTelemetry }
1048
+ : {}),
1049
+ ...(priorReplay.contextBudget ? { contextBudget: priorReplay.contextBudget } : {}),
1050
+ });
1051
+ const onMidTurnDiagnosticPatch = (patch) => {
1052
+ midTurnCompactDiagnosticPatch = mergeContextBudgetDiagnosticPatches(midTurnCompactDiagnosticPatch, patch);
1053
+ };
1054
+ const capacityProviderTools = [...providerTools];
1055
+ const midTurnCapacityHook = this.deps.compaction.buildMidTurnCapacityCompactProjection(turnId, midTurnState, queue, capacityProviderTools, onMidTurnDiagnosticPatch, this, this.automaticMemoryCompactionSupported()
1056
+ ? () => this.automaticMemoryCompactionDecision()
1057
+ : undefined, this.automaticMemoryCompactionSupported()
1058
+ ? (dispatch) => this.dispatchAutomaticMemoryCompaction(dispatch)
1059
+ : undefined, turnAbortController.signal);
1060
+ // When mid-turn capacity compaction is active, the prune must also cover
1061
+ // the newest completed step; see collectPrunableCompletedStepToolCallIds.
1062
+ const activeToolResultPruneIncludesNewestStep = midTurnState !== undefined;
1063
+ const activeToolResultPruneHook = this.deps.compaction.buildActiveToolResultPruneProjection(turnId, activeToolResultPruneIncludesNewestStep, (patch) => {
1064
+ pruneAppliedAtStep = runtimeSteps;
1065
+ activeToolResultPruneDiagnosticPatch = mergeActiveToolResultPruneDiagnosticPatches(activeToolResultPruneDiagnosticPatch, patch);
1066
+ });
1067
+ const projectCurrentToolAvailability = (options) => plan.projectActiveTools?.(options);
1068
+ const shapedProjection = composeRequestProjection(projectCurrentToolAvailability, midTurnCapacityHook, activeToolResultPruneHook);
1069
+ // Hooks shape; nothing measures the final payload. Whether it fits is
1070
+ // the provider's answer (#4559).
1071
+ const requestProjection = shapedProjection;
1072
+ const completedProviderSteps = [];
1073
+ let requestMessages = messages;
1074
+ // The compaction module runs at most once per send. This tracks the
1075
+ // reactive entry; the proactive one sets the same flag on the mid-turn
1076
+ // state, and each consults the other, so a send that already folded
1077
+ // reports the oversized message instead of folding again (#4559).
1078
+ let overflowRetryUsed = false;
1079
+ let result;
1080
+ let providerOutcome;
1081
+ let finishReason = 'stop';
1082
+ let terminalProviderError;
1083
+ agentLoop: for (;;) {
1084
+ ({ plan, providerTools, modelTools, nestedTools } = snapshotStepTools());
1085
+ resolvedSystemPrompt = await this.resolveSystemPrompt();
1086
+ systemPrompt = joinPromptFragments([
1087
+ resolvedSystemPrompt.text,
1088
+ this.orchestration.mode === 'swarm' ? renderSwarmModePrompt() : undefined,
1089
+ this.orchestration.mode === 'graph' ? renderGraphModePrompt() : undefined,
1090
+ ]);
1091
+ capacityProviderTools.splice(0, capacityProviderTools.length, ...providerTools);
1092
+ await this.drainSteeringInto(input, queue);
1093
+ if (this.deps.backend.loadTurnRuntimeEvents) {
1094
+ requestMessages = await loadDurableTurnProjection();
1095
+ }
1096
+ else {
1097
+ const missingSteering = steeringMessagesMissingFromBase(this.injectedSteeringMessages, requestMessages);
1098
+ if (missingSteering.length > 0)
1099
+ requestMessages = [...requestMessages, ...missingSteering];
1100
+ }
1101
+ // Resolved BEFORE request projection so the capacity measurement and
1102
+ // the request that goes out are the same request: a finalization step
1103
+ // adds prompt fragments and sends no tool schemas, and an anchor
1104
+ // paired with the un-finalized shape describes a different payload.
1105
+ const finalChildSummaryStep = this.deps.backend.header.collaborationMode === 'agent' &&
1106
+ maxSteps !== undefined &&
1107
+ maxSteps > 1 &&
1108
+ runtimeSteps === maxSteps - 1 &&
1109
+ completedProviderSteps.length > 0;
1110
+ const sandboxBoundaryFinalizationStep = toolRuntime.shouldFinalizeSandboxBoundary() ||
1111
+ (toolRuntime.hasSandboxBoundaryDenial() &&
1112
+ maxSteps !== undefined &&
1113
+ runtimeSteps === maxSteps - 1);
1114
+ if (sandboxBoundaryFinalizationStep) {
1115
+ toolRuntime.forceSandboxBoundaryFinalization();
1116
+ }
1117
+ const requestSystemPrompt = joinPromptFragments([
1118
+ systemPrompt,
1119
+ finalChildSummaryStep ? CHILD_STEP_BUDGET_FINALIZATION_PROMPT : undefined,
1120
+ toolRuntime.hasSandboxBoundaryDenial() ? SANDBOX_BOUNDARY_DENIED_FOR_TURN : undefined,
1121
+ sandboxBoundaryFinalizationStep ? SANDBOX_BOUNDARY_FINALIZATION_PROMPT : undefined,
1122
+ ]);
1123
+ const resolveDispatch = (active) => ({
1124
+ systemPromptChars: requestSystemPrompt?.length ?? 0,
1125
+ activeTools: finalChildSummaryStep || sandboxBoundaryFinalizationStep
1126
+ ? []
1127
+ : boundaryAwareToolNames(active ?? plan.currentRepairToolNames()),
1128
+ });
1129
+ const dynamicContextMessages = (resolvedSystemPrompt.contexts ?? []).map(({ text }) => ({ role: 'user', content: text }));
1130
+ const contextualRequestMessages = dynamicContextMessages.length === 0
1131
+ ? requestMessages
1132
+ : [...requestMessages, ...dynamicContextMessages];
1133
+ const shaped = requestProjection
1134
+ ? await requestProjection({
1135
+ completedSteps: completedProviderSteps,
1136
+ stepNumber: runtimeSteps,
1137
+ model,
1138
+ messages: contextualRequestMessages,
1139
+ resolveDispatch,
1140
+ })
1141
+ : undefined;
1142
+ const projectedMessages = shaped?.messages ?? contextualRequestMessages;
1143
+ const activeToolsForRequest = resolveDispatch(shaped?.activeTools).activeTools;
1144
+ const requestCompositionId = this.runId && this.deps.backend.recordRequestComposition
1145
+ ? await this.deps.backend.recordRequestComposition(this.runId, {
1146
+ compositionId: this.deps.newId(),
1147
+ step: runtimeSteps,
1148
+ sourceRevisions: resolvedSystemPrompt.sourceRevisions,
1149
+ systemPromptHash: stableHash(requestSystemPrompt ?? ''),
1150
+ toolCatalogHash: toolCatalogHash(providerTools),
1151
+ toolAvailabilityHash: toolAvailabilityHash(this.deps.backend.toolAvailability),
1152
+ providerOptionsHash: stableHash(this.deps.resolvedProviderOptions),
1153
+ toolNames: activeToolsForRequest,
1154
+ toolSchemas: requestCompositionToolSchemas(providerTools, activeToolsForRequest),
1155
+ })
1156
+ : undefined;
1157
+ providerRequestTracker?.setStep(runtimeSteps, requestCompositionId);
1158
+ let attemptMessages = projectedMessages;
1159
+ let providerAttempt = 1;
1160
+ let idleWatchdogRetryCount = 0;
1161
+ let incompleteStreamRetryCount = 0;
1162
+ let sealedThinkingRetryCount = 0;
1163
+ const returnedToolCalls = [];
1164
+ let providerToolActivityCount = 0;
1165
+ const providerToolInputs = new Map();
1166
+ let providerStepUsage;
1167
+ for (;;) {
1168
+ providerRequestAbortController = new AbortController();
1169
+ watchdogTimeoutState.current = null;
1170
+ startWatchdog();
1171
+ // Monotonic facts for this physical request. The step accumulators
1172
+ // are cleared after flushStep(), so they cannot decide whether a
1173
+ // later stream failure is safe to retry.
1174
+ let attemptSawText = false;
1175
+ let attemptSawThinking = false;
1176
+ let attemptSawToolActivity = false;
1177
+ let attemptSawContinuationMetadata = false;
1178
+ let attemptReachedStepBoundary = false;
1179
+ const attemptHasNoObservableOutput = () => !attemptSawText &&
1180
+ !attemptSawThinking &&
1181
+ !attemptSawToolActivity &&
1182
+ !attemptSawContinuationMetadata &&
1183
+ !attemptReachedStepBoundary;
1184
+ // Thinking is the only output that can be sealed into its own
1185
+ // message before a retry: flushStep() closes the fragment under
1186
+ // the current message id and the retry streams into a fresh one,
1187
+ // so the user never sees spliced or duplicated content. Text,
1188
+ // tool activity, continuation metadata, and step boundaries stay
1189
+ // non-recoverable for the reasons each of them is tracked.
1190
+ const attemptCanRecoverWithSealedThinking = () => !attemptSawText &&
1191
+ !attemptSawToolActivity &&
1192
+ !attemptSawContinuationMetadata &&
1193
+ !attemptReachedStepBoundary;
1194
+ this.memorySourceMessages = [...attemptMessages];
1195
+ this.memorySourceEventMessagePositions =
1196
+ this.deps.messageProjection.memoryEventMessagePositions(attemptMessages);
1197
+ this.memorySourceSystemPrompt = requestSystemPrompt;
1198
+ this.memorySourceTools = modelTools;
1199
+ this.memorySourceActiveTools = [...activeToolsForRequest];
1200
+ this.finalAssistantText = undefined;
1201
+ // Keep a denied boundary request as a Code Mode trap: the provider
1202
+ // no longer sees it as a direct tool, but a nested retry must still
1203
+ // reach ToolRuntime's denial latch instead of becoming an endlessly
1204
+ // variable unknown-tool error inside `exec`.
1205
+ this.codeModeTools =
1206
+ toolMode === 'code_mode' && activeToolsForRequest.includes('exec')
1207
+ ? nestedTools
1208
+ : undefined;
1209
+ const requestWatchdog = watchdogState.current;
1210
+ // Read here, beside the messages it describes: `attemptMessages` is
1211
+ // rebuilt in place by overflow recovery, and the boundary it folded
1212
+ // under must travel with that rebuild, not with the step.
1213
+ const historyCompactBoundary = requestHistoryCompactBoundary();
1214
+ result = await this.deps.modelAdapter.startStream({
1215
+ model,
1216
+ messages: attemptMessages,
1217
+ tools: modelTools,
1218
+ activeTools: activeToolsForRequest,
1219
+ onStreamActivity: () => requestWatchdog?.markActivity(),
1220
+ repairToolCall: async ({ toolCall, error, }) => {
1221
+ return repairMakaToolCall({
1222
+ toolCall,
1223
+ availableToolNames: currentRepairToolNames(),
1224
+ toolParameters: (name) => providerTools.find((candidate) => candidate.name === name)?.parameters,
1225
+ toolCategoryHint: (name) => providerTools.find((candidate) => candidate.name === name)?.categoryHint,
1226
+ error,
1227
+ });
1228
+ },
1229
+ system: requestSystemPrompt,
1230
+ abortSignal: AbortSignal.any([
1231
+ turnAbortController.signal,
1232
+ providerRequestAbortController.signal,
1233
+ ]),
1234
+ ...(providerRequestTracker ? { providerRequestTracker } : {}),
1235
+ ...(historyCompactBoundary ? { historyCompactBoundary } : {}),
1236
+ continuationKey: this.turnId,
1237
+ });
1238
+ for await (const event of result.events) {
1239
+ if (this.aborted)
1240
+ break;
1241
+ if (event.kind === 'error') {
1242
+ // Settlement owns the failure; stop before any synthesized
1243
+ // trailer and consume the one authoritative outcome below.
1244
+ break;
1245
+ }
1246
+ const incompleteFinish = (event.kind === 'finish' || event.kind === 'step-finish') &&
1247
+ isIncompleteProviderFinishReason(event.finishReason);
1248
+ if ((event.kind === 'finish' || event.kind === 'step-finish') && !incompleteFinish) {
1249
+ attemptReachedStepBoundary = true;
1250
+ }
1251
+ if (event.kind === 'step-finish') {
1252
+ // AI SDK can synthesize `finish-step(other)` when the provider
1253
+ // stream reaches EOF without a terminal frame. That is not a
1254
+ // completed model step and must not consume the step budget or
1255
+ // checkpoint imaginary usage before the safe retry below.
1256
+ if (!incompleteFinish) {
1257
+ // Step boundary: AI SDK 7 delimits steps with `finish-step`
1258
+ // (and `step-finish` for legacy replay fixtures); the adapter
1259
+ // reduces both to this event. A duplicate boundary is harmless:
1260
+ // the second flush no-ops (accumulators already cleared) and one
1261
+ // extra id rotation just discards an unused id.
1262
+ runtimeSteps += 1;
1263
+ const stepUsage = event.usage;
1264
+ providerStepUsage = stepUsage;
1265
+ if (!stepUsage)
1266
+ sawUnusableStepUsage = true;
1267
+ // Silent eviction / rewrite check (#4559): this step only
1268
+ // appended (no fold, no prune, no image omission) yet the
1269
+ // provider counted no more input tokens than for the previous
1270
+ // request. Not-greater, not strictly-fewer: a provider that
1271
+ // truncates to a fixed window (Ollama's `num_ctx`) reports the
1272
+ // same total on every later request while Maka keeps
1273
+ // appending, so a plateau is the signal, and an equal count
1274
+ // after an append is already impossible without provider-side
1275
+ // eviction or rewriting. Input against input: the previous
1276
+ // reply's reasoning may not be resent, so input + output is
1277
+ // not the floor of the next input on every wire.
1278
+ const completedRequestIndex = runtimeSteps - 1;
1279
+ // A finalization step resolves an empty tool set, so its
1280
+ // request legitimately drops several thousand schema tokens
1281
+ // with no fold, prune or image omission. Maka shaped that
1282
+ // request; the provider did not drop anything.
1283
+ const toolSchemaShrank = lastStepActiveToolCount !== undefined &&
1284
+ activeToolsForRequest.length < lastStepActiveToolCount;
1285
+ // Across the send boundary the comparison is the same one,
1286
+ // against the last request a provider accepted before this
1287
+ // send. A provider that truncates to a fixed window reports
1288
+ // the same input on every later request while the user keeps
1289
+ // adding turns, and a send of one or two steps never sees
1290
+ // that from the inside: the live evidence plateaus at 3,716
1291
+ // input tokens across eight turns with nothing reported
1292
+ // (#4623). The first request of a send therefore compares
1293
+ // against the persisted anchor, which is route-validated
1294
+ // where it is read; a fold before that request would explain
1295
+ // a smaller input by itself, so it disables the comparison.
1296
+ const acrossSends = completedRequestIndex === 0;
1297
+ const priorInput = acrossSends
1298
+ ? midTurnState?.compactionAppliedThisSend === true
1299
+ ? undefined
1300
+ : midTurnState?.priorAcceptedInputTokens
1301
+ : lastStepInputTokens;
1302
+ if (!this.deps.session.contextProviderDroppingReported &&
1303
+ !toolSchemaShrank &&
1304
+ midTurnState &&
1305
+ priorInput !== undefined &&
1306
+ midTurnState.replacedStepNumber !== completedRequestIndex &&
1307
+ pruneAppliedAtStep !== completedRequestIndex &&
1308
+ midTurnState.omittedImageToolResults.size === 0 &&
1309
+ stepUsage !== undefined &&
1310
+ Number.isFinite(stepUsage.inputTokens) &&
1311
+ stepUsage.inputTokens > 0 &&
1312
+ // Across sends the test is equality, not "did not grow".
1313
+ // Inside a send Maka knows it only appended, so any
1314
+ // shortfall is the provider's. Across the boundary it does
1315
+ // not: a manual compaction leaves the pre-compaction anchor
1316
+ // behind, a turn can carry a smaller tool set, and a user
1317
+ // can edit or branch history. All three shrink the input
1318
+ // legitimately, and none of them lands on exactly the same
1319
+ // count. A provider truncating to a fixed window does, on
1320
+ // every later request.
1321
+ (acrossSends
1322
+ ? stepUsage.inputTokens === priorInput
1323
+ : stepUsage.inputTokens <= priorInput)) {
1324
+ this.deps.session.contextProviderDroppingReported = true;
1325
+ await this.recordSystemNote('context_provider_dropping', turnId, {
1326
+ inputTokens: stepUsage.inputTokens,
1327
+ priorInputTokens: priorInput,
1328
+ });
1329
+ }
1330
+ // Fail closed: reset on every step boundary so a missing final
1331
+ // step's usage does not leave a stale value from an earlier step.
1332
+ // The reply needed more room than the declared window had
1333
+ // left after this request's own input. Both halves are the
1334
+ // provider's numbers, read after the fact: the reserve that
1335
+ // should have kept them apart was measured from a smaller
1336
+ // previous reply. Say so once per send; the next request
1337
+ // folds anyway because the baseline now exceeds the window.
1338
+ if (!contextWindowOverrunNoteWritten &&
1339
+ midTurnState?.capacity !== undefined &&
1340
+ stepUsage !== undefined &&
1341
+ Number.isFinite(stepUsage.inputTokens) &&
1342
+ stepUsage.inputTokens > 0 &&
1343
+ Number.isFinite(stepUsage.outputTokens) &&
1344
+ stepUsage.outputTokens > 0 &&
1345
+ stepUsage.inputTokens + stepUsage.outputTokens > midTurnState.capacity) {
1346
+ contextWindowOverrunNoteWritten = true;
1347
+ await this.recordSystemNote('context_window_overrun', turnId, {
1348
+ usedTokens: stepUsage.inputTokens + stepUsage.outputTokens,
1349
+ declaredContextWindow: midTurnState.capacity,
1350
+ });
1351
+ }
1352
+ // Nothing declared, and the provider accepted a request past
1353
+ // the window this model reports. Every other signal in this
1354
+ // design stays dark there: no rejection to recover from, no
1355
+ // plateau to read, and no declaration to arm the proactive
1356
+ // threshold, so the session degrades quietly and
1357
+ // indefinitely (#4634). Report the two real numbers and
1358
+ // leave the decision with the user: a reported window is a
1359
+ // hint, and Maka still declares nothing on their behalf.
1360
+ //
1361
+ // Once per crossing, not once per send. On these providers
1362
+ // usage keeps growing past the line (305K → 322K observed),
1363
+ // so the note fires on the transition: the previous accepted
1364
+ // total was still inside the reported window and this one is
1365
+ // not. The baseline carries that previous total across
1366
+ // sessions through the persisted anchor, so a resumed
1367
+ // session does not repeat a crossing it already reported.
1368
+ if (!contextReportedWindowNoteWritten &&
1369
+ midTurnState !== undefined &&
1370
+ midTurnState.capacity === undefined &&
1371
+ stepUsage !== undefined &&
1372
+ Number.isFinite(stepUsage.inputTokens) &&
1373
+ stepUsage.inputTokens > 0 &&
1374
+ Number.isFinite(stepUsage.outputTokens)) {
1375
+ const reported = resolveSelectedModelContextWindow(this.deps.backend.connection, this.deps.backend.modelId);
1376
+ const used = stepUsage.inputTokens + Math.max(0, stepUsage.outputTokens);
1377
+ // `baselineTokens` still describes the request before this
1378
+ // one: the capacity hook sets it from the previous step, or
1379
+ // from the persisted anchor on a send's first request.
1380
+ const previousTotal = midTurnState.baselineTokens;
1381
+ const crossedNow = reported !== undefined &&
1382
+ used > reported &&
1383
+ (previousTotal === undefined || previousTotal <= reported);
1384
+ if (reported !== undefined && crossedNow) {
1385
+ contextReportedWindowNoteWritten = true;
1386
+ await this.recordSystemNote('context_reported_window_exceeded', turnId, {
1387
+ usedTokens: used,
1388
+ reportedContextWindow: reported,
1389
+ });
1390
+ }
1391
+ }
1392
+ lastStepInputTokens = stepUsage?.inputTokens;
1393
+ lastStepOutputTokens = stepUsage?.outputTokens;
1394
+ lastStepActiveToolCount = activeToolsForRequest.length;
1395
+ // A `finishReason: length` is deliberately not a trigger. The
1396
+ // reply may have been cut because the provider ran out of
1397
+ // window room, or because the provider's own output cap is
1398
+ // lower than the one Maka sends. Those are indistinguishable
1399
+ // from outside, and an indistinguishable signal must not
1400
+ // drive an action; the cut reply is visible to the user
1401
+ // either way (#4559).
1402
+ if (stepUsage) {
1403
+ completedStepUsage = mergeNormalizedUsage(completedStepUsage, stepUsage);
1404
+ this.deps.session.cumulativeUsageCheckpoint = mergeNormalizedUsage(this.deps.session.cumulativeUsageCheckpoint, stepUsage);
1405
+ await this.deps.backend.recordUsageCheckpoint?.({
1406
+ ...this.deps.session.cumulativeUsageCheckpoint,
1407
+ costUsd: this.deps.providerTelemetry.normalizedUsageCostUsd(this.deps.session.cumulativeUsageCheckpoint),
1408
+ });
1409
+ }
1410
+ }
1411
+ }
1412
+ if (event.kind === 'text-start') {
1413
+ if (stepText.length > 0 && event.providerItemBoundary === true) {
1414
+ await flushStep();
1415
+ currentStepMessageId = this.deps.newId();
1416
+ }
1417
+ stepTextPartStartOffset = stepText.length;
1418
+ }
1419
+ else if (event.kind === 'text') {
1420
+ if (event.text.length > 0)
1421
+ recordStepContent('text');
1422
+ stepText += event.text;
1423
+ if (event.text.length > 0)
1424
+ attemptSawText = true;
1425
+ queue.push({
1426
+ type: 'text_delta',
1427
+ id: this.deps.newId(),
1428
+ turnId,
1429
+ ts: this.deps.now(),
1430
+ messageId: currentStepMessageId,
1431
+ text: event.text,
1432
+ });
1433
+ }
1434
+ else if (event.kind === 'text-end') {
1435
+ if (event.providerOptions !== undefined) {
1436
+ attemptSawContinuationMetadata = true;
1437
+ stepTextProviderOptions = mergeTextProviderOptions(stepTextProviderOptions, stripUndefinedDeep(event.providerOptions), stepTextPartStartOffset);
1438
+ }
1439
+ if (event.providerItemBoundary === true) {
1440
+ await flushStep();
1441
+ currentStepMessageId = this.deps.newId();
1442
+ }
1443
+ }
1444
+ else if (event.kind === 'thinking-start') {
1445
+ if (event.providerOptions !== undefined) {
1446
+ attemptSawContinuationMetadata = true;
1447
+ }
1448
+ const part = {
1449
+ text: '',
1450
+ ...(event.providerOptions !== undefined
1451
+ ? { providerOptions: event.providerOptions }
1452
+ : {}),
1453
+ };
1454
+ stepThinkingParts.push(part);
1455
+ if (event.reasoningPartId) {
1456
+ stepThinkingPartsById.set(event.reasoningPartId, part);
1457
+ }
1458
+ }
1459
+ else if (event.kind === 'thinking') {
1460
+ if (event.text.length > 0)
1461
+ recordStepContent('thinking');
1462
+ if (event.text.length > 0)
1463
+ attemptSawThinking = true;
1464
+ if (event.providerOptions !== undefined) {
1465
+ if (event.providerOptionsOrigin !== 'maka_transport') {
1466
+ attemptSawContinuationMetadata = true;
1467
+ }
1468
+ }
1469
+ const partId = event.reasoningPartId ?? responsesReasoningItemId(event.providerOptions);
1470
+ let part;
1471
+ if (typeof partId === 'string' && partId.length > 0) {
1472
+ part = stepThinkingPartsById.get(partId);
1473
+ if (part &&
1474
+ event.providerOptions === undefined &&
1475
+ decodePlaintextResponsesReasoningState(part.providerOptions).kind === 'valid') {
1476
+ // The SDK does not suppress a stray delta after
1477
+ // output_item.done. Keep it out of the finalized item or
1478
+ // its durable summary boundaries will no longer match.
1479
+ part = { text: '' };
1480
+ stepThinkingParts.push(part);
1481
+ stepThinkingPartsById.set(partId, part);
1482
+ }
1483
+ if (!part) {
1484
+ part = { text: '' };
1485
+ stepThinkingParts.push(part);
1486
+ stepThinkingPartsById.set(partId, part);
1487
+ }
1488
+ }
1489
+ else {
1490
+ part = stepThinkingParts.at(-1);
1491
+ if (part &&
1492
+ decodePlaintextResponsesReasoningState(part.providerOptions).kind === 'valid') {
1493
+ // An invalid next item has no usable stream id. Do not
1494
+ // append its deltas to the finalized item: partial-error
1495
+ // flush must keep that item's durable boundaries valid.
1496
+ part = undefined;
1497
+ }
1498
+ }
1499
+ if (!part) {
1500
+ part = { text: '' };
1501
+ stepThinkingParts.push(part);
1502
+ }
1503
+ const nextPartText = part.text + event.text;
1504
+ if (event.reasoningSummaryText !== undefined &&
1505
+ event.reasoningSummaryText !== nextPartText) {
1506
+ throw new Error('Streamed plaintext Responses reasoning does not match final provider summary');
1507
+ }
1508
+ part.text = nextPartText;
1509
+ if (event.providerOptions !== undefined) {
1510
+ part.providerOptions = event.providerOptions;
1511
+ }
1512
+ queue.push({
1513
+ type: 'thinking_delta',
1514
+ id: this.deps.newId(),
1515
+ turnId,
1516
+ ts: this.deps.now(),
1517
+ messageId: currentStepMessageId,
1518
+ text: event.text,
1519
+ });
1520
+ }
1521
+ else if (event.kind === 'thinking-signature') {
1522
+ attemptSawContinuationMetadata = true;
1523
+ let part = event.reasoningPartId
1524
+ ? stepThinkingPartsById.get(event.reasoningPartId)
1525
+ : stepThinkingParts.at(-1);
1526
+ if (!part) {
1527
+ part = { text: '' };
1528
+ stepThinkingParts.push(part);
1529
+ if (event.reasoningPartId) {
1530
+ stepThinkingPartsById.set(event.reasoningPartId, part);
1531
+ }
1532
+ }
1533
+ part.signature = event.signature;
1534
+ }
1535
+ else if (event.kind === 'provider-tool-input') {
1536
+ // The provider has started its own tool. Even without a
1537
+ // final tool-call/result event, retrying can repeat external
1538
+ // work that the Runtime cannot observe or reconcile.
1539
+ attemptSawToolActivity = true;
1540
+ }
1541
+ else if (event.kind === 'tool-call') {
1542
+ attemptSawToolActivity = true;
1543
+ recordStepContent('tools');
1544
+ if (event.toolCall.providerExecuted) {
1545
+ providerToolActivityCount += 1;
1546
+ providerToolInputs.set(event.toolCall.toolCallId, event.toolCall.input);
1547
+ queue.push({
1548
+ type: 'tool_start',
1549
+ id: this.deps.newId(),
1550
+ turnId,
1551
+ ts: this.deps.now(),
1552
+ toolUseId: event.toolCall.toolCallId,
1553
+ toolName: event.toolCall.toolName,
1554
+ args: event.toolCall.input,
1555
+ providerExecuted: true,
1556
+ activityKind: 'websearch',
1557
+ displayName: 'Web search',
1558
+ stepId: currentStepMessageId,
1559
+ ...(event.toolCall.providerOptions !== undefined
1560
+ ? {
1561
+ providerOptions: stripUndefinedDeep(event.toolCall.providerOptions),
1562
+ }
1563
+ : {}),
1564
+ });
1565
+ }
1566
+ else {
1567
+ returnedToolCalls.push(event.toolCall);
1568
+ }
1569
+ }
1570
+ else if (event.kind === 'provider-tool-result') {
1571
+ attemptSawToolActivity = true;
1572
+ providerToolActivityCount += 1;
1573
+ const providerOutput = stripUndefinedDeep(event.output);
1574
+ queue.push({
1575
+ type: 'tool_result',
1576
+ id: this.deps.newId(),
1577
+ turnId,
1578
+ ts: this.deps.now(),
1579
+ toolUseId: event.toolCallId,
1580
+ providerExecuted: true,
1581
+ ...(providerOutput !== undefined ? { providerOutput } : {}),
1582
+ isError: event.isError === true,
1583
+ content: providerToolResultContent(event.toolName, providerOutput, providerToolInputs.get(event.toolCallId)),
1584
+ });
1585
+ providerToolInputs.delete(event.toolCallId);
1586
+ }
1587
+ else if (event.kind === 'step-finish' && !incompleteFinish) {
1588
+ // The step's text/thinking deltas are all in (the stream is
1589
+ // drained in order), so flush this step's AssistantMessage and
1590
+ // rotate to a fresh id for the next step. Tool settlement
1591
+ // below receives this step's pre-rotation id, so durable replay
1592
+ // can regroup calls with this reasoning/text.
1593
+ await flushStep();
1594
+ if (midTurnState) {
1595
+ // Durability clock: step N's thinking/text completion events
1596
+ // are enqueued by flushStep just above, so only after this
1597
+ // boundary can a seq-ack wait for step N mean anything. Wake
1598
+ // waiters AFTER the increment or they would re-check a stale
1599
+ // count and sleep.
1600
+ midTurnState.flushedSteps += 1;
1601
+ queue.wake();
1602
+ }
1603
+ }
1604
+ }
1605
+ watchdogState.current?.stop();
1606
+ // This timeout belongs to the physical request that just settled.
1607
+ // Consume it before recovery/flush work: a later persistence error
1608
+ // must not be reported as the already-handled watchdog timeout.
1609
+ const settledWatchdogTimeout = consumeWatchdogTimeout();
1610
+ providerOutcome = await result.outcome;
1611
+ const incompleteStreamTerminal = providerOutcome.kind === 'truncated';
1612
+ const incompleteStreamHasNoObservableOutput = incompleteStreamTerminal &&
1613
+ !attemptSawText &&
1614
+ !attemptSawThinking &&
1615
+ !attemptSawToolActivity &&
1616
+ !attemptSawContinuationMetadata;
1617
+ const attemptFailure = settledWatchdogTimeout?.error ??
1618
+ (providerOutcome.kind === 'completed' ? undefined : providerOutcome.failure);
1619
+ if (attemptFailure && !this.aborted) {
1620
+ const failure = settledWatchdogTimeout || providerOutcome.kind === 'completed'
1621
+ ? this.deps.modelAdapter.normalizeFailure(attemptFailure)
1622
+ : providerOutcome.failure;
1623
+ if (this.loopStopRequested) {
1624
+ terminalProviderError = settledWatchdogTimeout?.error ?? failure;
1625
+ terminalProviderErrorReason =
1626
+ lastCompletedStepHadToolResult && failure.kind === 'timeout'
1627
+ ? 'model_after_tool_timeout'
1628
+ : undefined;
1629
+ break agentLoop;
1630
+ }
1631
+ // A retry is a fresh provider request that would run at least one
1632
+ // more step; with the send-level budget already spent there is
1633
+ // nothing left to grant it, so the error is terminal.
1634
+ const stepBudgetRemains = maxSteps === undefined || runtimeSteps < maxSteps;
1635
+ const recovered = stepBudgetRemains && attemptHasNoObservableOutput()
1636
+ ? await this.deps.compaction.recoverFromOverflowError({
1637
+ error: attemptFailure,
1638
+ retryAlreadyUsed: overflowRetryUsed || (midTurnState?.compactionAttemptedThisSend ?? false),
1639
+ midTurnState,
1640
+ turnId,
1641
+ stepNumber: runtimeSteps,
1642
+ currentMessages: attemptMessages,
1643
+ activeTools: activeToolsForRequest,
1644
+ queue,
1645
+ onDiagnosticPatch: onMidTurnDiagnosticPatch,
1646
+ origin: this,
1647
+ ...(this.automaticMemoryCompactionSupported()
1648
+ ? {
1649
+ memoryCompactionDecision: () => this.automaticMemoryCompactionDecision(),
1650
+ onMemoryCompaction: (dispatch) => this.dispatchAutomaticMemoryCompaction(dispatch),
1651
+ }
1652
+ : {}),
1653
+ abortSignal: turnAbortController.signal,
1654
+ })
1655
+ : undefined;
1656
+ if (recovered) {
1657
+ overflowRetryUsed = true;
1658
+ // Recovery rebuilds the request from the durable ledger, whose
1659
+ // tool results intentionally retain their full bodies. Re-enter
1660
+ // the active-result projection before dispatch so an archived
1661
+ // result cannot reappear in provider context on the retry.
1662
+ const recoveredProjection = activeToolResultPruneHook
1663
+ ? await activeToolResultPruneHook({
1664
+ completedSteps: completedProviderSteps,
1665
+ stepNumber: runtimeSteps,
1666
+ model,
1667
+ messages: recovered.messages,
1668
+ activeTools: activeToolsForRequest,
1669
+ resolveDispatch,
1670
+ })
1671
+ : undefined;
1672
+ attemptMessages = recoveredProjection?.messages ?? recovered.messages;
1673
+ continue;
1674
+ }
1675
+ // Window suggestion (#4559): the provider rejected a request and
1676
+ // no recovery is left — the one fold is spent, or there was no
1677
+ // seam. The baseline is a proven-fit total (input + output of an
1678
+ // accepted request), so it is a number the user can declare; the
1679
+ // trigger is `>=`, so declaring exactly it folds before this
1680
+ // point next time. Once per send, and only when the turn is
1681
+ // about to surface the error rather than continue.
1682
+ const acceptedTotal = midTurnState?.lastAcceptedTotalTokens;
1683
+ if (!contextWindowSuggestionNoteWritten &&
1684
+ failure.kind === 'context_overflow' &&
1685
+ midTurnState &&
1686
+ acceptedTotal !== undefined &&
1687
+ (midTurnState.capacity === undefined || acceptedTotal < midTurnState.capacity)) {
1688
+ contextWindowSuggestionNoteWritten = true;
1689
+ await this.recordSystemNote('context_window_suggestion', turnId, {
1690
+ suggestedContextWindow: acceptedTotal,
1691
+ ...(midTurnState.capacity !== undefined
1692
+ ? { declaredContextWindow: midTurnState.capacity }
1693
+ : {}),
1694
+ });
1695
+ }
1696
+ // A folded projection was selected in this send and the provider
1697
+ // still rejects the request. That is worth saying, because the
1698
+ // usual remedy has already been applied; it is NOT proof that the
1699
+ // new message alone is the cause, since what remains also carries
1700
+ // the system prompt, the tool schemas, the summary and the recent
1701
+ // tail. A fold that failed open is deliberately excluded: that
1702
+ // request went out with its full raw history, so nothing about
1703
+ // its size can be concluded (#4559).
1704
+ if (!contextOverflowAfterCompactionNoteWritten &&
1705
+ failure.kind === 'context_overflow' &&
1706
+ midTurnState?.compactionAppliedThisSend === true) {
1707
+ contextOverflowAfterCompactionNoteWritten = true;
1708
+ await this.recordSystemNote('context_overflow_after_compaction', turnId);
1709
+ }
1710
+ const idleWatchdogRecovery = settledWatchdogTimeout?.phase === 'idle' &&
1711
+ idleWatchdogRetryCount < MAX_IDLE_WATCHDOG_RETRIES_PER_STEP &&
1712
+ attemptCanRecoverWithSealedThinking();
1713
+ const incompleteStreamRecovery = incompleteStreamTerminal &&
1714
+ incompleteStreamRetryCount < MAX_INCOMPLETE_STREAM_RETRIES_PER_STEP &&
1715
+ incompleteStreamHasNoObservableOutput;
1716
+ // Same seal-and-retry contract as the watchdog path, entered when
1717
+ // the failure arrives as a retryable provider/network error
1718
+ // instead of a local idle timeout. `!idleWatchdogRecovery` keeps
1719
+ // every watchdog-shaped outcome on its existing path, and
1720
+ // `!attemptHasNoObservableOutput()` keeps no-output retries on
1721
+ // the plain budget so this one is spent only on sealed fragments.
1722
+ const sealedThinkingRecovery = !idleWatchdogRecovery &&
1723
+ failure.retryable &&
1724
+ sealedThinkingRetryCount < MAX_SEALED_THINKING_RETRIES_PER_STEP &&
1725
+ attemptCanRecoverWithSealedThinking() &&
1726
+ !attemptHasNoObservableOutput();
1727
+ // The stopping gate also supplies the durable reason. An absent
1728
+ // decision means this attempt is allowed to retry.
1729
+ let retry;
1730
+ if (!(attemptHasNoObservableOutput() ||
1731
+ idleWatchdogRecovery ||
1732
+ incompleteStreamRecovery ||
1733
+ sealedThinkingRecovery)) {
1734
+ retry = {
1735
+ decision: 'declined',
1736
+ because: attemptSawToolActivity ? 'side_effects' : 'observable_output',
1737
+ };
1738
+ }
1739
+ else if (!stepBudgetRemains) {
1740
+ retry = { decision: 'declined', because: 'budget' };
1741
+ }
1742
+ else if (providerAttempt >= MAX_PROVIDER_ATTEMPTS_PER_STEP) {
1743
+ retry = { decision: 'exhausted', attempts: providerAttempt };
1744
+ }
1745
+ else if (failure.kind === 'context_overflow') {
1746
+ retry = { decision: 'declined', because: 'policy' };
1747
+ }
1748
+ else if (!(failure.retryable || idleWatchdogRecovery || incompleteStreamRecovery)) {
1749
+ retry =
1750
+ incompleteStreamTerminal &&
1751
+ incompleteStreamRetryCount >= MAX_INCOMPLETE_STREAM_RETRIES_PER_STEP
1752
+ ? { decision: 'exhausted', attempts: providerAttempt }
1753
+ : { decision: 'declined', because: 'policy' };
1754
+ }
1755
+ if (!retry) {
1756
+ if (idleWatchdogRecovery)
1757
+ idleWatchdogRetryCount += 1;
1758
+ if (sealedThinkingRecovery)
1759
+ sealedThinkingRetryCount += 1;
1760
+ if (incompleteStreamRecovery)
1761
+ incompleteStreamRetryCount += 1;
1762
+ if ((idleWatchdogRecovery || sealedThinkingRecovery) &&
1763
+ stepThinkingParts.length > 0) {
1764
+ await flushStep();
1765
+ currentStepMessageId = this.deps.newId();
1766
+ }
1767
+ // The failed request did not return authoritative usage. Keep
1768
+ // effectiveness recoverable, but fail final metering closed.
1769
+ sawUnusableStepUsage = true;
1770
+ const delayMs = providerRetryDelayMs(providerAttempt, failure.retryAfterMs);
1771
+ const nextAttempt = providerAttempt + 1;
1772
+ const maxAttempts = idleWatchdogRecovery || incompleteStreamRecovery || sealedThinkingRecovery
1773
+ ? nextAttempt
1774
+ : MAX_PROVIDER_ATTEMPTS_PER_STEP;
1775
+ const reason = providerRetryReason(failure.kind);
1776
+ queue.push({
1777
+ type: 'provider_retry',
1778
+ id: this.deps.newId(),
1779
+ turnId,
1780
+ ts: this.deps.now(),
1781
+ phase: 'scheduled',
1782
+ attempt: nextAttempt,
1783
+ maxAttempts,
1784
+ delayMs,
1785
+ remainingMs: delayMs,
1786
+ reason,
1787
+ });
1788
+ await this.deps.providerRetrySleep(delayMs, turnAbortController.signal);
1789
+ providerAttempt = nextAttempt;
1790
+ queue.push({
1791
+ type: 'provider_retry',
1792
+ id: this.deps.newId(),
1793
+ turnId,
1794
+ ts: this.deps.now(),
1795
+ phase: 'started',
1796
+ attempt: providerAttempt,
1797
+ maxAttempts,
1798
+ reason,
1799
+ });
1800
+ continue;
1801
+ }
1802
+ // Unrecoverable (not context-length, latch spent, no seam, or no
1803
+ // safe fold): surface the real provider error via the terminal
1804
+ // handler after settling any authoritative usage — never a
1805
+ // fabricated success.
1806
+ terminalProviderError = settledWatchdogTimeout?.error ?? failure;
1807
+ terminalRetry = { error: terminalProviderError, retry };
1808
+ terminalProviderErrorReason =
1809
+ lastCompletedStepHadToolResult && failure.kind === 'timeout'
1810
+ ? 'model_after_tool_timeout'
1811
+ : undefined;
1812
+ break agentLoop;
1813
+ }
1814
+ break;
1815
+ }
1816
+ // If the stream loop exited because stop() flipped this.aborted while a
1817
+ // provider kept yielding after abort instead of throwing, route to the
1818
+ // abort handling below. Without this, the post-stream success path would
1819
+ // persist a partial assistant turn and emit a false end_turn completion.
1820
+ if (this.aborted) {
1821
+ throw Object.assign(new Error('aborted'), { name: 'AbortError' });
1822
+ }
1823
+ // Catch-all: flush any residual step content if the provider closed the
1824
+ // stream without a trailing `finish-step` for the last step.
1825
+ const providerStepId = currentStepMessageId;
1826
+ await flushStep();
1827
+ if (providerOutcome.kind !== 'completed')
1828
+ throw providerOutcome.failure;
1829
+ finishReason = providerOutcome.finishReason;
1830
+ await queue.waitUntilConsumedThroughCurrent();
1831
+ if (returnedToolCalls.length > 0) {
1832
+ const continuationBudgetRemains = maxSteps === undefined || runtimeSteps < maxSteps;
1833
+ if (continuationBudgetRemains && !this.deps.backend.loadTurnRuntimeEvents) {
1834
+ throw new Error('durable current-run reader is required for tool continuation');
1835
+ }
1836
+ if (this.deps.backend.loadTurnRuntimeEvents) {
1837
+ // Queue consumption alone does not prove that the latest assistant
1838
+ // facts remain readable. Fail before any external tool side effect
1839
+ // when the authoritative ledger became unavailable after the step.
1840
+ await loadDurableTurnEvents();
1841
+ }
1842
+ const toolsByName = new Map(providerTools.map((tool) => [tool.name, tool]));
1843
+ const settlementOutcomes = await Promise.allSettled(returnedToolCalls.map(async (toolCall) => {
1844
+ if (toolCall.providerExecuted) {
1845
+ throw new Error(`Provider-executed tool call "${toolCall.toolName}" is outside the main-agent tool loop`);
1846
+ }
1847
+ const sandboxBoundaryAttempt = isProviderSandboxBoundaryAttempt(toolCall);
1848
+ const deniedBoundaryRequest = toolRuntime.hasSandboxBoundaryDenial() &&
1849
+ toolCall.toolName.toLowerCase() === REQUEST_SANDBOX_BOUNDARY_TOOL_NAME;
1850
+ if (deniedBoundaryRequest) {
1851
+ toolRuntime.forceSandboxBoundaryFinalization();
1852
+ }
1853
+ const blockedToolCall = sandboxBoundaryFinalizationStep || deniedBoundaryRequest;
1854
+ const requestedTool = blockedToolCall
1855
+ ? undefined
1856
+ : toolsByName.get(toolCall.toolName);
1857
+ const tool = requestedTool ?? toolsByName.get(INVALID_TOOL_NAME);
1858
+ if (!tool)
1859
+ throw new Error('Runtime invalid-tool fallback is unavailable');
1860
+ const unavailableError = sandboxBoundaryFinalizationStep
1861
+ ? 'Sandbox boundary finalization does not permit tool execution.'
1862
+ : deniedBoundaryRequest
1863
+ ? SANDBOX_BOUNDARY_DENIED_FOR_TURN
1864
+ : 'returned tool is unavailable';
1865
+ return await toolRuntime.settleToolCall({
1866
+ tool,
1867
+ turnId,
1868
+ stepId: providerStepId,
1869
+ toolCallId: toolCall.toolCallId,
1870
+ // Provider metadata is persisted verbatim into an immutable
1871
+ // RuntimeEvent, and a field the response did not carry
1872
+ // arrives as an explicit `undefined` — which JSON drops, so
1873
+ // the event no longer reads back as it was written and the
1874
+ // store refuses it. One refusal took every tool-calling turn
1875
+ // with it.
1876
+ ...(toolCall.providerOptions !== undefined
1877
+ ? {
1878
+ providerOptions: stripUndefinedDeep(toolCall.providerOptions),
1879
+ }
1880
+ : {}),
1881
+ input: requestedTool !== undefined
1882
+ ? toolCall.input
1883
+ : {
1884
+ tool: toolCall.toolName,
1885
+ error: unavailableError,
1886
+ ...(sandboxBoundaryAttempt ? { sandboxBoundaryAttempt: true } : {}),
1887
+ },
1888
+ abortSignal: turnAbortController.signal,
1889
+ eventSink: queue,
1890
+ });
1891
+ }));
1892
+ const rejectedSettlement = settlementOutcomes.find((outcome) => outcome.status === 'rejected');
1893
+ if (rejectedSettlement)
1894
+ throw rejectedSettlement.reason;
1895
+ settlementOutcomes.forEach((outcome, index) => {
1896
+ // All settlements completed and rejection was checked above;
1897
+ // preserve provider order for Plan and Yield result handling.
1898
+ if (outcome.status === 'rejected')
1899
+ throw outcome.reason;
1900
+ const settlement = outcome.value;
1901
+ const toolCall = returnedToolCalls[index];
1902
+ if (isPlanToolResult(settlement.result)) {
1903
+ this.handlePlanToolResult(settlement.result, queue);
1904
+ }
1905
+ if (returnedToolCalls.length === 1 &&
1906
+ toolCall?.toolName === YIELD_AGENT_GRAPH_TOOL_NAME &&
1907
+ isAgentGraphYieldToolResult(settlement.result)) {
1908
+ this.handleAgentGraphYieldToolResult(settlement.result);
1909
+ }
1910
+ });
1911
+ // Continuation reads durable events, not raw results. Do not retain
1912
+ // an entire completed batch across the next provider request.
1913
+ settlementOutcomes.length = 0;
1914
+ await queue.waitUntilConsumedThroughCurrent();
1915
+ const continuationWillRun = (maxSteps === undefined || runtimeSteps < maxSteps) &&
1916
+ !this.loopStopRequested &&
1917
+ !this.aborted;
1918
+ if (continuationWillRun && providerOutcome.continuation === 'pending') {
1919
+ const persistedProjection = await loadDurableTurnProjection();
1920
+ const responseMessages = persistedOpenAiResponsesStepMessages(attemptMessages, persistedProjection, returnedToolCalls.map((toolCall) => toolCall.toolCallId));
1921
+ if (responseMessages) {
1922
+ this.deps.modelAdapter.recordContinuationResponse(this.turnId, responseMessages);
1923
+ }
1924
+ else {
1925
+ this.deps.modelAdapter.clearContinuation(this.turnId);
1926
+ }
1927
+ }
1928
+ }
1929
+ completedProviderSteps.push({
1930
+ toolCalls: returnedToolCalls,
1931
+ ...(providerStepUsage ? { usage: providerStepUsage } : {}),
1932
+ });
1933
+ lastCompletedStepHadToolResult = returnedToolCalls.length > 0;
1934
+ const stepLimitReached = maxSteps !== undefined && runtimeSteps >= maxSteps;
1935
+ if (sandboxBoundaryFinalizationStep ||
1936
+ (stepLimitReached &&
1937
+ (toolRuntime.shouldFinalizeSandboxBoundary() ||
1938
+ toolRuntime.hasSandboxBoundaryDenial()))) {
1939
+ this.loopStopReason = 'permission_handoff';
1940
+ this.loopStopRequested = true;
1941
+ }
1942
+ const mayTakeAnotherStep = !stepLimitReached && !this.loopStopRequested && !this.aborted;
1943
+ if (returnedToolCalls.length > 0 && mayTakeAnotherStep) {
1944
+ if ((await input.handoffBoundary?.(turnAbortController.signal, maxSteps === undefined ? null : maxSteps - runtimeSteps)) === 'pause') {
1945
+ this.handoffPaused = true;
1946
+ break agentLoop;
1947
+ }
1948
+ if (this.aborted || this.loopStopRequested)
1949
+ break agentLoop;
1950
+ currentStepMessageId = this.deps.newId();
1951
+ continue agentLoop;
1952
+ }
1953
+ // Continuing the turn needs the durable current-run reader, for the
1954
+ // same reason the tool-call edge above demands it: the next request
1955
+ // has to carry the assistant output this step just produced, and only
1956
+ // the ledger projection has it. The no-reader fallback at the top of
1957
+ // the loop appends steering alone, which would ask the model to
1958
+ // redirect work it cannot see. Without a reader this edge is skipped
1959
+ // rather than throwing — the turn still completes and the Host folds
1960
+ // the message into the next Turn, which is today's behaviour.
1961
+ if (mayTakeAnotherStep && this.deps.backend.loadTurnRuntimeEvents) {
1962
+ // Last chance for a steer that landed after this turn's final
1963
+ // tool-call boundary — including the only boundary a tool-free
1964
+ // turn has, which precedes the model's first token. Without it the
1965
+ // message is never pulled at all, and whether Steer works would
1966
+ // depend on the model happening to call a tool afterwards (#3529).
1967
+ // A step-limited turn deliberately skips this: its budget is spent,
1968
+ // and the Host folds the message into the next Turn instead.
1969
+ const injectedBefore = this.injectedSteeringMessages.length;
1970
+ await this.drainSteeringInto(input, queue);
1971
+ // Re-read the stop flags: the drain awaits a durable push, so an
1972
+ // `after_step` stop or an abort can land while it is in flight, and
1973
+ // `mayTakeAnotherStep` is stale by now. Stop wins — the message is
1974
+ // already durable, so the Host folds it into the next Turn.
1975
+ if (this.injectedSteeringMessages.length > injectedBefore &&
1976
+ !this.loopStopRequested &&
1977
+ !this.aborted) {
1978
+ await queue.waitUntilConsumedThroughCurrent();
1979
+ if ((await input.handoffBoundary?.(turnAbortController.signal, maxSteps === undefined ? null : maxSteps - runtimeSteps)) === 'pause') {
1980
+ this.handoffPaused = true;
1981
+ break agentLoop;
1982
+ }
1983
+ if (this.aborted || this.loopStopRequested)
1984
+ break agentLoop;
1985
+ currentStepMessageId = this.deps.newId();
1986
+ continue agentLoop;
1987
+ }
1988
+ }
1989
+ break agentLoop;
1990
+ }
1991
+ // Refine Tool Availability against the final active set. Deferred
1992
+ // loading may add tools, while boundary convergence may remove them;
1993
+ // comparing membership avoids missing a same-size swap.
1994
+ const finalActiveTools = currentRepairToolNames();
1995
+ if (finalActiveTools.length !== activeTools.length ||
1996
+ finalActiveTools.some((name, index) => name !== activeTools[index])) {
1997
+ toolAvailabilityForTelemetry = computeToolAvailability(finalActiveTools);
1998
+ }
1999
+ // Final usage event. Each adapter result covers one provider request.
2000
+ // The send-level owner is `completedStepUsage`, which spans every
2001
+ // Runtime loop step and retry. Recording only the final result would
2002
+ // silently drop prior requests. An unusable sample in ANY request fails
2003
+ // the whole record closed (#972).
2004
+ try {
2005
+ const attemptTotalUsage = providerOutcome.usage;
2006
+ tokenUsage = sawUnusableStepUsage ? undefined : (completedStepUsage ?? attemptTotalUsage);
2007
+ if (tokenUsage) {
2008
+ tokenUsageCostUsd = this.deps.providerTelemetry.normalizedUsageCostUsd(tokenUsage);
2009
+ const contextBudgetForUsage = contextBudgetWithRequestProjectionDiagnostics(contextBudgetForTelemetry, activeToolResultPruneDiagnosticPatch, midTurnCompactDiagnosticPatch);
2010
+ // Persisted alongside the live event so transcript rebuilds from
2011
+ // stored messages keep the TUI ctx segment instead of degrading to
2012
+ // `?/<window>` (#4019). Computed once; both writers share it.
2013
+ const contextRemainingForUsage = (() => {
2014
+ const contextWindow = resolveSelectedModelContextWindow(this.deps.backend.connection, this.deps.backend.modelId);
2015
+ if (lastStepInputTokens !== undefined && contextWindow !== undefined) {
2016
+ return Math.max(0, contextWindow - lastStepInputTokens);
2017
+ }
2018
+ return undefined;
2019
+ })();
2020
+ // The anchor the NEXT turn judges its first request from — see
2021
+ // `LastRequestAnchor`. `input` below is the sum across this send's
2022
+ // steps and anchors nothing; the LAST step's real input and output
2023
+ // are what the next request re-sends. No usable input count, no
2024
+ // anchor: the next turn then has no proactive fold until its first
2025
+ // accepted request.
2026
+ const anchorInputTokens = finitePositive(lastStepInputTokens);
2027
+ const anchorOutputTokens = lastStepOutputTokens !== undefined && Number.isFinite(lastStepOutputTokens)
2028
+ ? Math.max(0, lastStepOutputTokens)
2029
+ : undefined;
2030
+ // One shared usage payload for the durable message and the live
2031
+ // event: twin per-field literals drifted before (#4019), so a field
2032
+ // now has exactly one definition site.
2033
+ const usageFields = {
2034
+ input: tokenUsage.inputTokens,
2035
+ output: tokenUsage.outputTokens,
2036
+ cacheHitInput: tokenUsage.cacheHitInputTokens,
2037
+ cacheMissInput: tokenUsage.cacheMissInputTokens,
2038
+ cacheMissInputSource: tokenUsage.cacheMissInputSource,
2039
+ cacheWriteInput: tokenUsage.cacheWriteInputTokens,
2040
+ reasoning: tokenUsage.reasoningTokens,
2041
+ total: tokenUsage.totalTokens,
2042
+ ...(tokenUsage.rawFinishReason !== undefined
2043
+ ? { rawFinishReason: tokenUsage.rawFinishReason }
2044
+ : {}),
2045
+ ...(runtimeSteps > 0 ? { runtimeSteps } : {}),
2046
+ ...(tokenUsage.cachedInputTokens > 0
2047
+ ? { cacheRead: tokenUsage.cachedInputTokens }
2048
+ : {}),
2049
+ ...(tokenUsage.cacheWriteInputTokens > 0
2050
+ ? { cacheCreation: tokenUsage.cacheWriteInputTokens }
2051
+ : {}),
2052
+ ...(tokenUsageCostUsd !== undefined ? { costUsd: tokenUsageCostUsd } : {}),
2053
+ ...(contextBudgetForUsage ? { contextBudget: contextBudgetForUsage } : {}),
2054
+ ...(contextRemainingForUsage !== undefined
2055
+ ? { contextRemaining: contextRemainingForUsage }
2056
+ : {}),
2057
+ ...(providerRequestTraceId ? { providerRequestTraceId } : {}),
2058
+ ...(anchorInputTokens !== undefined
2059
+ ? {
2060
+ lastRequestAnchor: {
2061
+ inputTokens: anchorInputTokens,
2062
+ ...(anchorOutputTokens !== undefined
2063
+ ? { outputTokens: anchorOutputTokens }
2064
+ : {}),
2065
+ modelId: this.deps.backend.modelId,
2066
+ ...(this.deps.backend.header.llmConnectionId !== undefined
2067
+ ? { connectionId: this.deps.backend.header.llmConnectionId }
2068
+ : {}),
2069
+ },
2070
+ }
2071
+ : {}),
2072
+ };
2073
+ // Settlement fallback: a mid-turn or request-hook fold is only
2074
+ // known here. Notes already written at decision time are skipped
2075
+ // by the flags inside.
2076
+ await appendCompactionDecisionNotes(contextBudgetForUsage);
2077
+ queue.push({
2078
+ type: 'token_usage',
2079
+ id: this.deps.newId(),
2080
+ turnId,
2081
+ ts: this.deps.now(),
2082
+ ...usageFields,
2083
+ });
2084
+ }
2085
+ }
2086
+ catch {
2087
+ // best-effort; ai-sdk usage promise may reject on abort
2088
+ }
2089
+ // Nothing may await between this check and terminal emission: Stop must
2090
+ // win even when it arrives during post-stream usage persistence.
2091
+ if (this.aborted)
2092
+ throw Object.assign(new Error('aborted'), { name: 'AbortError' });
2093
+ if (terminalProviderError)
2094
+ throw terminalProviderError;
2095
+ // Usage above still belongs to this physical attempt. Its Runtime owner
2096
+ // seals the drained stream; no complete/abort event ends the logical Turn.
2097
+ if (this.handoffPaused)
2098
+ return;
2099
+ const stopReason = this.loopStopReason ??
2100
+ (maxSteps !== undefined && finishReason === 'tool-calls'
2101
+ ? 'step_limit'
2102
+ : this.mapFinishReason(finishReason));
2103
+ trace.modelStreamCompleted(stopReason);
2104
+ const completeEvent = {
2105
+ type: 'complete',
2106
+ id: this.deps.newId(),
2107
+ turnId,
2108
+ ts: this.deps.now(),
2109
+ stopReason,
2110
+ };
2111
+ queue.push(completeEvent);
2112
+ if (this.memoryExtractRequested && this.deps.backend.memoryExtraction) {
2113
+ const snapshot = this.memorySourceSnapshot({
2114
+ trigger: 'extract',
2115
+ terminalEventId: completeEvent.id,
2116
+ });
2117
+ if (snapshot) {
2118
+ void queue
2119
+ .waitUntilConsumedThroughCurrent()
2120
+ .then(() => this.deps.backend.memoryExtraction?.extract(snapshot))
2121
+ .catch(() => undefined);
2122
+ }
2123
+ }
2124
+ }
2125
+ catch (err) {
2126
+ streamStatus = this.aborted ? 'aborted' : 'error';
2127
+ streamErrorClass = this.deps.modelAdapter.classifyError(currentWatchdogTimeout()?.error ?? err);
2128
+ // Flush the in-flight step's partial text/thinking before the terminal
2129
+ // abort/error events. Earlier steps already flushed at their
2130
+ // `finish-step`; this keeps their and this step's streamed-out output on
2131
+ // BOTH exits — user stop and provider error / watchdog timeout — so the
2132
+ // transcript keeps what the user actually saw.
2133
+ await flushStep().catch(() => { });
2134
+ if (this.aborted) {
2135
+ queue.push({
2136
+ type: 'abort',
2137
+ id: this.deps.newId(),
2138
+ turnId,
2139
+ ts: this.deps.now(),
2140
+ reason: 'user_stop',
2141
+ });
2142
+ queue.push({
2143
+ type: 'complete',
2144
+ id: this.deps.newId(),
2145
+ turnId,
2146
+ ts: this.deps.now(),
2147
+ stopReason: 'user_stop',
2148
+ });
2149
+ }
2150
+ else {
2151
+ const terminalError = currentWatchdogTimeout()?.error ?? err;
2152
+ queue.push({
2153
+ ...this.makeErrorEvent(turnId, terminalError, terminalProviderErrorReason),
2154
+ ...(terminalRetry && terminalRetry.error === terminalError
2155
+ ? { retry: terminalRetry.retry }
2156
+ : {}),
2157
+ });
2158
+ trace.modelStreamFailed(streamErrorClass, terminalError, priorReplayFailureTrace(priorReplay));
2159
+ queue.push({
2160
+ type: 'complete',
2161
+ id: this.deps.newId(),
2162
+ turnId,
2163
+ ts: this.deps.now(),
2164
+ stopReason: 'error',
2165
+ });
2166
+ }
2167
+ }
2168
+ finally {
2169
+ watchdogState.current?.stop();
2170
+ if (this.watchdog === watchdogState.current)
2171
+ this.watchdog = null;
2172
+ contextBudgetForTelemetry = contextBudgetWithRequestProjectionDiagnostics(contextBudgetForTelemetry, activeToolResultPruneDiagnosticPatch, midTurnCompactDiagnosticPatch);
2173
+ // `tokenUsage` still backfills from the completed steps when the send
2174
+ // ended without a final `usage`: the terminal outcome and the
2175
+ // `token_usage` SessionEvent below both read it. An unusable sample in
2176
+ // any step fails it closed rather than posing a partial sum as the
2177
+ // whole call (#972).
2178
+ //
2179
+ // The send-level `recordLlmCall` that used to sit here is gone (#1679).
2180
+ // It measured the same provider requests the canonical seam now settles
2181
+ // into `ModelCallAttempt`, one record per physical request instead of
2182
+ // one aggregate per send, and keeping both would have been two
2183
+ // independent meters free to disagree.
2184
+ //
2185
+ // What does NOT follow it out is the diagnostics that rode on it. The
2186
+ // exhausted and aborted paths emit no `token_usage` SessionEvent, so
2187
+ // their compaction decisions and the accumulated usage of the steps that
2188
+ // did complete had that record as their only durable home. They move to
2189
+ // the run trace, which carries no cost and meters nothing.
2190
+ if (!tokenUsage && completedStepUsage && !sawUnusableStepUsage) {
2191
+ tokenUsage = completedStepUsage;
2192
+ tokenUsageCostUsd = this.deps.providerTelemetry.normalizedUsageCostUsd(tokenUsage);
2193
+ }
2194
+ trace.sendDiagnostics({
2195
+ status: streamStatus,
2196
+ ...(streamErrorClass ? { errorClass: streamErrorClass } : {}),
2197
+ ...(tokenUsage
2198
+ ? {
2199
+ inputTokens: tokenUsage.inputTokens,
2200
+ outputTokens: tokenUsage.outputTokens,
2201
+ totalTokens: tokenUsage.totalTokens,
2202
+ }
2203
+ : {}),
2204
+ ...(contextBudgetForTelemetry !== undefined
2205
+ ? { contextBudget: contextBudgetForTelemetry }
2206
+ : {}),
2207
+ ...(toolAvailabilityForTelemetry !== undefined
2208
+ ? { toolAvailability: toolAvailabilityForTelemetry }
2209
+ : {}),
2210
+ });
2211
+ queue.close();
2212
+ }
2213
+ })();
2214
+ let drainedNormally = false;
2215
+ try {
2216
+ // drain() carries the seq-ack semantics (consumer pull = processed ack);
2217
+ // every consumer-facing path must go through it.
2218
+ yield* this.drain(queue);
2219
+ drainedNormally = true;
2220
+ }
2221
+ finally {
2222
+ if (!drainedNormally)
2223
+ turnAbortController.abort();
2224
+ await pumpDone.catch(() => { });
2225
+ }
2226
+ }
2227
+ async executeCodeModeCell(eventSink, code, context) {
2228
+ const snapshot = new Map(this.codeModeTools);
2229
+ let nestedOutputBytes = 0;
2230
+ let nestedOutputLimitExceeded = false;
2231
+ const nestedEventSink = {
2232
+ push: (event) => {
2233
+ if (event.type === 'tool_output_delta') {
2234
+ const nextBytes = new TextEncoder().encode(event.chunk).byteLength;
2235
+ if (nestedOutputLimitExceeded ||
2236
+ nestedOutputBytes + nextBytes > DEFAULT_CODE_MODE_EXECUTION_POLICY.maxToolOutputBytes) {
2237
+ nestedOutputLimitExceeded = true;
2238
+ return;
2239
+ }
2240
+ nestedOutputBytes += nextBytes;
2241
+ }
2242
+ eventSink.push(event);
2243
+ },
2244
+ pushAndWaitUntilConsumed: (event) => eventSink.pushAndWaitUntilConsumed(event),
2245
+ };
2246
+ // Admission covers the whole cell, including host waits. executeCodeCell
2247
+ // waits for every started host call
2248
+ // on both success and cancellation, so settlement is the release boundary.
2249
+ //
2250
+ // One cell may wait; the next is turned away rather than queued, which is
2251
+ // what the Code Mode adapter did before this moved to the side that owns
2252
+ // execution. Nothing awaits between reading `waitingCount` and the enqueue
2253
+ // inside `acquire`, so the pair is atomic.
2254
+ if (this.deps.codeCellAdmission.waitingCount >= MAX_WAITING_CODE_MODE_CELLS) {
2255
+ return {
2256
+ ok: false,
2257
+ error: { kind: 'limit_exceeded', message: 'Code Mode execution queue is full' },
2258
+ toolCalls: [],
2259
+ };
2260
+ }
2261
+ const permit = await this.deps.codeCellAdmission.acquire(context.abortSignal);
2262
+ try {
2263
+ return await executeCodeCell({
2264
+ code,
2265
+ signal: context.abortSignal,
2266
+ tools: [...snapshot.values()].map((tool) => ({
2267
+ name: tool.name,
2268
+ })),
2269
+ isFatalToolError: isRuntimeCommitBoundaryError,
2270
+ callTool: async (name, input, signal) => {
2271
+ if (this.loopStopRequested)
2272
+ throw new Error('The turn has yielded; no further tools may run.');
2273
+ const tool = snapshot.get(name);
2274
+ if (!tool)
2275
+ throw new Error(`Tool "${name}" is not active or nestable in this cell`);
2276
+ const parsedInput = await validateCodeModeToolInput(tool, input);
2277
+ const settlement = await this.toolRuntime.settleToolCall({
2278
+ tool,
2279
+ turnId: context.turnId,
2280
+ toolCallId: `${context.toolCallId}:nested:${this.deps.newId()}`,
2281
+ stepId: `${context.toolCallId}:nested`,
2282
+ input: parsedInput,
2283
+ abortSignal: signal,
2284
+ eventSink: nestedEventSink,
2285
+ origin: 'code_mode',
2286
+ parentToolCallId: context.toolCallId,
2287
+ ...(context.operationId ? { parentOperationId: context.operationId } : {}),
2288
+ maxResultBytes: DEFAULT_CODE_MODE_EXECUTION_POLICY.maxToolOutputBytes,
2289
+ });
2290
+ if (settlement.providerError !== undefined) {
2291
+ throw new Error(settlement.providerError);
2292
+ }
2293
+ if (nestedOutputLimitExceeded) {
2294
+ throw new Error('Code Mode nested output byte limit exceeded');
2295
+ }
2296
+ if (isPlanToolResult(settlement.result))
2297
+ this.handlePlanToolResult(settlement.result, eventSink);
2298
+ if (name === YIELD_AGENT_GRAPH_TOOL_NAME &&
2299
+ isAgentGraphYieldToolResult(settlement.result)) {
2300
+ this.handleAgentGraphYieldToolResult(settlement.result);
2301
+ }
2302
+ return settlement.result;
2303
+ },
2304
+ });
2305
+ }
2306
+ finally {
2307
+ permit.release();
2308
+ }
2309
+ }
2310
+ handlePlanToolResult(result, queue) {
2311
+ const turnId = this.turnId;
2312
+ if (result.kind === 'plan_submitted') {
2313
+ const proposal = result.proposal;
2314
+ queue.push({
2315
+ type: 'plan_submitted',
2316
+ id: this.deps.newId(),
2317
+ turnId,
2318
+ ts: this.deps.now(),
2319
+ planId: proposal.planId,
2320
+ proposalId: proposal.proposalId,
2321
+ revision: proposal.revision,
2322
+ title: proposal.title,
2323
+ ...(proposal.overview ? { overview: proposal.overview } : {}),
2324
+ ...(proposal.risks ? { risks: proposal.risks } : {}),
2325
+ steps: proposal.steps.map((step) => ({ ...step, status: 'pending' })),
2326
+ });
2327
+ this.runTrace?.emit('plan', 'plan_submitted', 'Plan submitted', {
2328
+ planId: proposal.planId,
2329
+ proposalId: proposal.proposalId,
2330
+ revision: proposal.revision,
2331
+ storeVersion: result.storeVersion,
2332
+ });
2333
+ this.loopStopReason = 'plan_handoff';
2334
+ this.loopStopRequested = true;
2335
+ return;
2336
+ }
2337
+ const traceType = result.kind;
2338
+ this.runTrace?.emit('plan', traceType, 'Plan execution state changed', {
2339
+ planId: result.execution.planId,
2340
+ proposalId: result.execution.proposalId,
2341
+ executionId: result.execution.executionId,
2342
+ storeVersion: result.storeVersion,
2343
+ });
2344
+ // Completing or cancelling the execution is a tool boundary, not the end of
2345
+ // the conversational Turn. The execution prompt tells the model to persist
2346
+ // final progress before its final response, so let it consume this result
2347
+ // and produce that response on the next provider step.
2348
+ }
2349
+ handleAgentGraphYieldToolResult(result) {
2350
+ this.runTrace?.emit('agent_graph', 'graph_supervisor_yielded', 'Graph supervisor yielded', {
2351
+ pendingWorkCount: result.pendingWorkCount,
2352
+ liveOperatorCount: result.liveOperatorCount,
2353
+ reason: result.reason,
2354
+ });
2355
+ this.loopStopReason = 'graph_yield';
2356
+ this.loopStopRequested = true;
2357
+ }
2358
+ mapFinishReason(reason) {
2359
+ return this.deps.modelAdapter.mapFinishReason(reason);
2360
+ }
2361
+ makeErrorEvent(turnId, err, reasonOverride) {
2362
+ return this.deps.modelAdapter.makeErrorEvent(turnId, err, reasonOverride);
2363
+ }
2364
+ /** Materialize canonical RuntimeEvent history into ai-sdk's message format. */
2365
+ async buildPriorMessages(input) {
2366
+ if (!input.runtimeContext) {
2367
+ return {
2368
+ status: 'ready',
2369
+ messages: [],
2370
+ gate: 'runtime_replay_text_only',
2371
+ diagnostics: [],
2372
+ };
2373
+ }
2374
+ // A handoff changes the physical Run, not the logical Turn. Its admitted
2375
+ // replay is all predecessor history, including events with this turnId.
2376
+ const rawPriorRuntimeContext = input.continuation
2377
+ ? input.runtimeContext
2378
+ : input.runtimeContext.filter((event) => event.turnId !== input.turnId);
2379
+ // Everything below reads EFFECTIVE model history: raw events folded through
2380
+ // the durable projection-transition reducer (#4283). Replay, budgeting and
2381
+ // compaction share one input, so no RuntimeEvent replay path can resurrect
2382
+ // content a committed transition removed.
2383
+ const preparedContextBudget = await this.deps.compaction.prepareContextBudgetPolicy(rawPriorRuntimeContext, input.turnId);
2384
+ const priorRuntimeContext = preparedContextBudget.events;
2385
+ const providerReasoningReplayEventIds = compatibleProviderReasoningReplayEventIds(priorRuntimeContext, input.runtimeContextInvocations, this.deps.backend.providerStateIdentity, this.deps.backend.modelId);
2386
+ let contextBudget = preparedContextBudget.policy;
2387
+ // Match the durable checkpoint against the RAW ledger prefix: every
2388
+ // creation path (standalone compactHistory and the mid-turn state) pins
2389
+ // its coverage digest on raw events, so matching the folded view here
2390
+ // lets any durable projection transition inside the covered prefix orphan
2391
+ // the checkpoint and silently fail open into a full-history replay
2392
+ // (#4842). The projected [block, tail] is then folded through the
2393
+ // transition reducer before it becomes messages, so a committed
2394
+ // transition still cannot resurrect content for the model (#4283).
2395
+ const budgeted = applyRuntimeEventContextBudget(rawPriorRuntimeContext, contextBudget);
2396
+ let runtimeContext = await this.deps.compaction.foldEffectiveModelHistory(budgeted?.events ?? rawPriorRuntimeContext);
2397
+ let contextBudgetDiagnostic = budgeted?.diagnostic;
2398
+ let projectedHistoryCompactCheckpoint = budgeted?.historyCompactCheckpoint;
2399
+ if (preparedContextBudget.diagnosticPatch) {
2400
+ contextBudgetDiagnostic = mergeContextBudgetDiagnostic(contextBudgetDiagnostic ??
2401
+ buildContextBudgetDiagnosticShell(priorRuntimeContext, runtimeContext, contextBudget), preparedContextBudget.diagnosticPatch);
2402
+ }
2403
+ // No pre-turn estimate gate: the turn's first request is judged by the
2404
+ // request-projection hook from the previous request's real usage, and by
2405
+ // the provider when it goes out (#4559).
2406
+ // The boundary belongs to the RuntimeEvent projection above.
2407
+ const replayBoundary = (fromRuntimeReplay) => fromRuntimeReplay && projectedHistoryCompactCheckpoint
2408
+ ? { latestHistoryCompactCheckpoint: projectedHistoryCompactCheckpoint }
2409
+ : {};
2410
+ const plan = buildRuntimeEventModelReplayPlan(runtimeContext,
2411
+ // `runtimeContext` may be a budget/history-search slice; the tool-turn
2412
+ // thinking skip is a whole-history invariant, so seed it from the full
2413
+ // prior ledger so a sliced-in tool-turn thinking still gets skipped.
2414
+ { toolActivityTurnIds: collectToolActivityTurnIds(priorRuntimeContext) });
2415
+ const hasProviderHistoryCompactCheckpoint = projectedHistoryCompactCheckpoint !== undefined &&
2416
+ isProviderHistoryCompactCheckpoint(projectedHistoryCompactCheckpoint);
2417
+ const materializeReplayFallback = () => this.deps.messageProjection.materializeRuntimeReplayTextOnly(this.imageBudget, plan, projectedHistoryCompactCheckpoint);
2418
+ if (plan.items.length === 0 && !hasProviderHistoryCompactCheckpoint) {
2419
+ return {
2420
+ status: 'ready',
2421
+ messages: await materializeReplayFallback(),
2422
+ gate: 'runtime_replay_text_only',
2423
+ diagnostics: plan.diagnostics,
2424
+ runtimeEventCount: runtimeContext.length,
2425
+ ...(contextBudgetDiagnostic ? { contextBudget: contextBudgetDiagnostic } : {}),
2426
+ ...replayBoundary(true),
2427
+ };
2428
+ }
2429
+ if (hasBlockingReplayDiagnostics(plan)) {
2430
+ return {
2431
+ status: 'ready',
2432
+ messages: await materializeReplayFallback(),
2433
+ gate: input.continuation
2434
+ ? 'runtime_replay_text_only'
2435
+ : 'runtime_replay_unsupported_semantics',
2436
+ diagnostics: plan.diagnostics,
2437
+ runtimeEventCount: runtimeContext.length,
2438
+ ...(contextBudgetDiagnostic ? { contextBudget: contextBudgetDiagnostic } : {}),
2439
+ ...replayBoundary(true),
2440
+ };
2441
+ }
2442
+ if (!plan.hasProviderNativeSemantics) {
2443
+ return {
2444
+ status: 'ready',
2445
+ messages: await this.deps.messageProjection.materializeRuntimeReplayPlan(plan, this.imageBudget, projectedHistoryCompactCheckpoint, providerReasoningReplayEventIds),
2446
+ gate: 'runtime_replay_text_only',
2447
+ diagnostics: plan.diagnostics,
2448
+ runtimeEventCount: runtimeContext.length,
2449
+ ...(contextBudgetDiagnostic ? { contextBudget: contextBudgetDiagnostic } : {}),
2450
+ ...replayBoundary(true),
2451
+ };
2452
+ }
2453
+ if (!this.deps.messageProjection.canReplayProviderNative(plan)) {
2454
+ // Degrade per item, not per plan: an unsupported provider-executed pair
2455
+ // must not cost unrelated client tool history (#2972). Thinking items
2456
+ // stay in the plan; materializeRuntimeReplayPlan degrades unsupported
2457
+ // reasoning per item via reasoningReplay.
2458
+ const degradedPlan = this.deps.messageProjection.dropUnsupportedReplayItems(plan);
2459
+ return {
2460
+ status: 'ready',
2461
+ messages: degradedPlan.items.length > 0 || hasProviderHistoryCompactCheckpoint
2462
+ ? await this.deps.messageProjection.materializeRuntimeReplayPlan(degradedPlan, this.imageBudget, projectedHistoryCompactCheckpoint, providerReasoningReplayEventIds)
2463
+ : await materializeReplayFallback(),
2464
+ gate: input.continuation
2465
+ ? 'runtime_replay_text_only'
2466
+ : 'runtime_replay_unsupported_semantics',
2467
+ diagnostics: plan.diagnostics,
2468
+ runtimeEventCount: runtimeContext.length,
2469
+ ...(contextBudgetDiagnostic ? { contextBudget: contextBudgetDiagnostic } : {}),
2470
+ ...replayBoundary(true),
2471
+ };
2472
+ }
2473
+ return {
2474
+ status: 'ready',
2475
+ messages: await this.deps.messageProjection.materializeRuntimeReplayPlan(plan, this.imageBudget, projectedHistoryCompactCheckpoint, providerReasoningReplayEventIds),
2476
+ gate: 'runtime_replay_provider_native',
2477
+ diagnostics: plan.diagnostics,
2478
+ runtimeEventCount: runtimeContext.length,
2479
+ ...(contextBudgetDiagnostic ? { contextBudget: contextBudgetDiagnostic } : {}),
2480
+ ...replayBoundary(true),
2481
+ };
2482
+ }
2483
+ async resolveSystemPrompt() {
2484
+ const turnId = this.turnId;
2485
+ if (typeof this.deps.backend.systemPrompt === 'function') {
2486
+ const resolved = await this.deps.backend.systemPrompt({
2487
+ sessionId: this.deps.backend.sessionId,
2488
+ turnId,
2489
+ cwd: this.deps.backend.header.cwd,
2490
+ emitSkillCatalogTrace: (message, data) => this.runTrace?.emit('skill', 'skill_catalog_built', message, data),
2491
+ });
2492
+ return typeof resolved === 'string' || resolved === undefined
2493
+ ? { ...(resolved === undefined ? {} : { text: resolved }), sourceRevisions: [] }
2494
+ : resolved;
2495
+ }
2496
+ return {
2497
+ ...(this.deps.backend.systemPrompt === undefined
2498
+ ? {}
2499
+ : { text: this.deps.backend.systemPrompt }),
2500
+ sourceRevisions: [],
2501
+ };
2502
+ }
2503
+ async *drain(queue) {
2504
+ try {
2505
+ for await (const ev of queue) {
2506
+ yield ev;
2507
+ // Generator backpressure IS the consumer's ack: this line runs only
2508
+ // when the consumer's loop body finished for `ev` and pulled the next
2509
+ // event, so `consumedCount` counts fully PROCESSED events. AgentRun
2510
+ // persists each mapped event before continuing, so an acked event is
2511
+ // either durable or deliberately skipped (partials, non-terminal
2512
+ // errors) — exactly the set a durable read can ever return.
2513
+ queue.ackConsumed();
2514
+ }
2515
+ }
2516
+ finally {
2517
+ // The consumer abandoned or finished the stream; wake any seq-ack waiter
2518
+ // so it observes `consumerDetached` instead of blocking forever.
2519
+ queue.noteConsumerDetached();
2520
+ }
2521
+ }
2522
+ /**
2523
+ * Drain the caller's pending steering at a step boundary. Each message is
2524
+ * echoed as a `steering_message` event (so the ledger + transcript render the
2525
+ * interjection in place) and accumulated as an envelope-wrapped user message
2526
+ * for injection into subsequent provider requests.
2527
+ *
2528
+ * Persist-before-include invariant: the initial user message is durable
2529
+ * before the backend is invoked, and a steered message must hold the same
2530
+ * line — the provider must never start executing a directive the ledger does
2531
+ * not carry. The seq-ack boundary provides that without a second write path:
2532
+ * the consumer's pull is the ack, and AgentRun persists each mapped event
2533
+ * before continuing (see drain()), so once everything enqueued up to the
2534
+ * steering event is consumed, the event is durable. If the consumer detaches
2535
+ * (the persist path failed or the turn is being torn down) before that, the
2536
+ * message is nacked and NOT included in any request; an abort after the push
2537
+ * waits for that same convergence — durable ⇒ ack (history owns it), detach
2538
+ * ⇒ nack — and only then throws so the dying request is never sent.
2539
+ */
2540
+ async drainSteeringInto(input, queue) {
2541
+ const turnId = this.turnId;
2542
+ const abortSignal = this.abortController.signal;
2543
+ const pull = input.pullSteering;
2544
+ if (!pull)
2545
+ return;
2546
+ const leases = await pull();
2547
+ if (leases.length === 0)
2548
+ return;
2549
+ // Binary settlement: every pulled lease settles exactly once, decided
2550
+ // ONLY by the persistence fact — durably consumed ⇒ ack + injection set;
2551
+ // provably never persisted (never pushed, or the consumer detached
2552
+ // without consuming it) ⇒ nack. An abort does NOT settle a pushed lease:
2553
+ // it only stops new pushes and the dying request; the wait continues
2554
+ // until the teardown converges it (the flow drains after terminal events
2555
+ // or detaches on failure), because nacking a durably appended event
2556
+ // would put the same directive in the account twice — once via history
2557
+ // replay, once via the reclaimed queue.
2558
+ const undelivered = [...leases];
2559
+ try {
2560
+ for (const lease of leases) {
2561
+ if (this.aborted || abortSignal?.aborted) {
2562
+ // Never pushed: settles as undelivered.
2563
+ throw Object.assign(new Error('aborted before steering was pushed'), {
2564
+ name: 'AbortError',
2565
+ });
2566
+ }
2567
+ if (queue.consumerDetached) {
2568
+ throw new Error('steering message was not durably consumed: event consumer detached');
2569
+ }
2570
+ // Materialize provider content before publishing the durable event.
2571
+ // After consumption there must be no fallible gap before ack/injection.
2572
+ const eventId = this.deps.newId();
2573
+ const providerContent = await this.deps.messageProjection.appendImageParts(this.imageBudget, buildSteeringEnvelope(formatTextWithInlineRefs(lease.content.text, lease.content)), lease.content.attachments, `steering:${eventId}`);
2574
+ if (this.aborted || abortSignal?.aborted) {
2575
+ throw Object.assign(new Error('aborted before steering was pushed'), {
2576
+ name: 'AbortError',
2577
+ });
2578
+ }
2579
+ if (queue.consumerDetached) {
2580
+ throw new Error('steering message was not durably consumed: event consumer detached');
2581
+ }
2582
+ await queue.pushAndWaitUntilConsumed({
2583
+ type: 'steering_message',
2584
+ id: eventId,
2585
+ turnId,
2586
+ ts: this.deps.now(),
2587
+ messageId: lease.messageId,
2588
+ content: lease.content,
2589
+ ...(lease.submittedContentDigest
2590
+ ? { submittedContentDigest: lease.submittedContentDigest }
2591
+ : {}),
2592
+ });
2593
+ // The mapped RuntimeEvent inherits this session event's id, so the
2594
+ // injected message and its future ledger replay share one identity.
2595
+ this.injectedSteeringMessages.push(steeringModelMessage(eventId, providerContent));
2596
+ input.ackSteering?.([lease.id]);
2597
+ undelivered.shift();
2598
+ if (this.aborted || abortSignal?.aborted) {
2599
+ // Settled (the ledger owns the message; the next turn replays it),
2600
+ // but the send is dying: stop before any request is built with it.
2601
+ throw Object.assign(new Error('aborted after steering was durable'), {
2602
+ name: 'AbortError',
2603
+ });
2604
+ }
2605
+ }
2606
+ }
2607
+ catch (error) {
2608
+ if (undelivered.length > 0) {
2609
+ input.nackSteering?.(undelivered.map((lease) => lease.id));
2610
+ }
2611
+ throw error;
2612
+ }
2613
+ }
2614
+ }
2615
+ function isPlanToolResult(output) {
2616
+ if (!output || typeof output !== 'object')
2617
+ return false;
2618
+ return [
2619
+ 'plan_submitted',
2620
+ 'plan_progress_updated',
2621
+ 'plan_execution_completed',
2622
+ 'plan_execution_cancelled',
2623
+ ].includes(String(output.kind));
2624
+ }
2625
+ function isAgentGraphYieldToolResult(output) {
2626
+ if (output === null || typeof output !== 'object' || Array.isArray(output))
2627
+ return false;
2628
+ const result = output;
2629
+ return (Object.keys(result).length === 4 &&
2630
+ result.kind === 'agent_graph_yielded' &&
2631
+ typeof result.pendingWorkCount === 'number' &&
2632
+ Number.isSafeInteger(result.pendingWorkCount) &&
2633
+ result.pendingWorkCount > 0 &&
2634
+ typeof result.liveOperatorCount === 'number' &&
2635
+ Number.isSafeInteger(result.liveOperatorCount) &&
2636
+ result.liveOperatorCount >= 0 &&
2637
+ typeof result.reason === 'string' &&
2638
+ result.reason.length > 0 &&
2639
+ result.reason.length <= 4_000 &&
2640
+ result.reason.trim() === result.reason);
2641
+ }
2642
+ function priorReplayFailureTrace(replay) {
2643
+ return {
2644
+ gate: replay.gate,
2645
+ diagnosticCodes: [...new Set(replay.diagnostics.map((diagnostic) => diagnostic.code))],
2646
+ };
2647
+ }
2648
+ class ContinuationReplayEmptyError extends Error {
2649
+ replayGate;
2650
+ diagnosticCodes;
2651
+ code = 'continuation_replay_empty';
2652
+ constructor(replayGate, diagnosticCodes) {
2653
+ super(`Continuation replay is empty after ${replayGate}`);
2654
+ this.replayGate = replayGate;
2655
+ this.diagnosticCodes = diagnosticCodes;
2656
+ this.name = 'ContinuationReplayEmptyError';
2657
+ }
2658
+ }
2659
+ function mergeActiveToolResultPruneDiagnosticPatches(left, right) {
2660
+ return {
2661
+ ...sumOptionalCounts('activePrunedToolResults', left, right),
2662
+ ...sumOptionalCounts('activeSupersededToolResults', left, right),
2663
+ ...sumOptionalCounts('activeDuplicateToolResults', left, right),
2664
+ ...sumOptionalCounts('activeArchiveFailures', left, right),
2665
+ ...sumOptionalCounts('activeEstimatedTokensSaved', left, right),
2666
+ };
2667
+ }
2668
+ function mergeNormalizedUsage(current, next) {
2669
+ if (!current)
2670
+ return next;
2671
+ const cacheMissInputSource = current.cacheMissInputSource === 'explicit' || next.cacheMissInputSource === 'explicit'
2672
+ ? 'explicit'
2673
+ : 'derived';
2674
+ const cacheHitInputTokens = current.cacheHitInputTokens + next.cacheHitInputTokens;
2675
+ return {
2676
+ inputTokens: current.inputTokens + next.inputTokens,
2677
+ outputTokens: current.outputTokens + next.outputTokens,
2678
+ cacheHitInputTokens,
2679
+ cacheMissInputTokens: current.cacheMissInputTokens + next.cacheMissInputTokens,
2680
+ cacheMissInputSource,
2681
+ cacheWriteInputTokens: current.cacheWriteInputTokens + next.cacheWriteInputTokens,
2682
+ reasoningTokens: current.reasoningTokens + next.reasoningTokens,
2683
+ totalTokens: current.totalTokens + next.totalTokens,
2684
+ ...(next.rawFinishReason !== undefined ? { rawFinishReason: next.rawFinishReason } : {}),
2685
+ cachedInputTokens: cacheHitInputTokens,
2686
+ };
2687
+ }
2688
+ function sumOptionalCounts(key, left, right) {
2689
+ const total = (left[key] ?? 0) + (right[key] ?? 0);
2690
+ return total > 0 ? { [key]: total } : {};
2691
+ }
2692
+ function contextBudgetWithRequestProjectionDiagnostics(base, patch, compactionPatch) {
2693
+ const prunePatch = hasActiveToolResultPruneDiagnosticPatch(patch) ? patch : undefined;
2694
+ const mergedPatch = mergeContextBudgetDiagnosticPatches(prunePatch, compactionPatch);
2695
+ if (!mergedPatch)
2696
+ return base;
2697
+ return mergeContextBudgetDiagnostic(base ?? minimalContextBudgetDiagnostic(), mergedPatch);
2698
+ }
2699
+ function projectMemoryConversationPrefix(messages, eventMessagePositions) {
2700
+ // Context visibility and durable evidence authority are separate boundaries.
2701
+ // Keep the exact source prefix so the auxiliary request preserves referents
2702
+ // and provider-cache shape. The Evidence Index and trusted admission layer
2703
+ // independently restrict durable citations to user-authored RuntimeEvents.
2704
+ return {
2705
+ messages: [...messages],
2706
+ ...(eventMessagePositions ? { eventMessagePositions } : {}),
2707
+ };
2708
+ }
2709
+ function memoryExtractionModelHeader(header) {
2710
+ return {
2711
+ ...(header.llmConnectionId === undefined ? {} : { llmConnectionId: header.llmConnectionId }),
2712
+ llmConnectionSlug: header.llmConnectionSlug,
2713
+ model: header.model,
2714
+ ...(header.thinkingLevel !== undefined ? { thinkingLevel: header.thinkingLevel } : {}),
2715
+ };
2716
+ }