maka-agent 0.2.2-dev.92.20261019 → 0.2.2-dev.98.20261024

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/LICENSE +7 -7
  2. package/README.md +78 -18
  3. package/README.zh-CN.md +73 -15
  4. package/THIRD_PARTY_NOTICES.txt +12 -12
  5. package/dist/pi-goal.js +13 -0
  6. package/dist/pi-tui-runner.js +44 -1
  7. package/dist/run-command-core.js +111 -70
  8. package/dist/run-session-command.js +91 -15
  9. package/dist/run-turn-outcome.js +2 -33
  10. package/dist/runtime-host-session-channel.js +3 -1
  11. package/dist/runtime-host-session-driver.js +5 -0
  12. package/dist/tui-copy-catalog.js +24 -0
  13. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  14. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Client.md +2 -0
  15. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/connect.js +10 -4
  16. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/symbols.js +1 -0
  17. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/agent.js +6 -2
  18. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  19. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  20. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client.js +3 -2
  21. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  22. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/cache-handler.js +48 -0
  23. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  24. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  25. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/decompress.js +15 -5
  26. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/index.js +3 -1
  27. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/parse.js +138 -137
  28. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/util.js +21 -2
  29. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
  30. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  31. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/fetch/index.js +3 -3
  32. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/infra/index.js +14 -0
  33. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  34. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  35. package/node_modules/@ai-sdk/provider-utils/node_modules/undici/package.json +1 -1
  36. package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog-store.js +87 -0
  37. package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog.js +98 -21
  38. package/node_modules/@maka/acp-executor-plugin/dist/index.js +90 -14
  39. package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +3997 -56
  40. package/node_modules/@maka/core/dist/assistant-turn-ids.js +34 -0
  41. package/node_modules/@maka/core/dist/event-wait.js +28 -10
  42. package/node_modules/@maka/core/dist/executor-catalog.js +3 -1
  43. package/node_modules/@maka/core/dist/model-catalog.js +19 -1
  44. package/node_modules/@maka/core/dist/model-metadata.generated.js +4 -14
  45. package/node_modules/@maka/core/dist/model-metadata.js +42 -1
  46. package/node_modules/@maka/core/dist/models-dev-projection.js +32 -1
  47. package/node_modules/@maka/core/dist/provider-registry.js +16 -2
  48. package/node_modules/@maka/core/dist/runtime-event.js +8 -0
  49. package/node_modules/@maka/core/dist/session-checkin.js +31 -0
  50. package/node_modules/@maka/core/dist/usage-stats/types.js +1 -0
  51. package/node_modules/@maka/core/package.json +2 -0
  52. package/node_modules/@maka/eval/node_modules/undici/README.md +25 -3
  53. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  54. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +11 -6
  55. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  56. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Errors.md +76 -1
  57. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  58. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
  59. package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  60. package/node_modules/@maka/eval/node_modules/undici/docs/docs/index.md +12 -12
  61. package/node_modules/@maka/eval/node_modules/undici/docs/docs/type-map.json +66 -66
  62. package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  63. package/node_modules/@maka/eval/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  64. package/node_modules/@maka/eval/node_modules/undici/lib/core/connect.js +10 -4
  65. package/node_modules/@maka/eval/node_modules/undici/lib/core/constants.js +12 -1
  66. package/node_modules/@maka/eval/node_modules/undici/lib/core/errors.js +38 -1
  67. package/node_modules/@maka/eval/node_modules/undici/lib/core/request.js +16 -1
  68. package/node_modules/@maka/eval/node_modules/undici/lib/core/symbols.js +2 -0
  69. package/node_modules/@maka/eval/node_modules/undici/lib/core/util.js +26 -1
  70. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +6 -2
  71. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  72. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
  73. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +4 -1
  74. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  75. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  76. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  77. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
  78. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool.js +11 -8
  79. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  80. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  81. package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  82. package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +153 -15
  83. package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  84. package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  85. package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +44 -11
  86. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/cache.js +11 -3
  87. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/decompress.js +22 -9
  88. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dns.js +11 -0
  89. package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/response-error.js +72 -28
  90. package/node_modules/@maka/eval/node_modules/undici/lib/milo/LICENSE.md +7 -0
  91. package/node_modules/@maka/eval/node_modules/undici/lib/milo/no-simd.js +1002 -0
  92. package/node_modules/@maka/eval/node_modules/undici/lib/milo/simd.js +1002 -0
  93. package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +11 -0
  94. package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  95. package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  96. package/node_modules/@maka/eval/node_modules/undici/lib/util/cache.js +11 -5
  97. package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/util.js +19 -2
  98. package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  99. package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  100. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/body.js +47 -38
  101. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  102. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/headers.js +2 -2
  103. package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/index.js +8 -4
  104. package/node_modules/@maka/eval/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  105. package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  106. package/node_modules/@maka/eval/node_modules/undici/package.json +9 -7
  107. package/node_modules/@maka/mcp/package.json +1 -1
  108. package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +22 -9
  109. package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +10 -1
  110. package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +101 -127
  111. package/node_modules/@maka/runtime/dist/event-wait-tool.js +2 -2
  112. package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +32 -1
  113. package/node_modules/@maka/runtime/dist/history-compaction.js +7 -0
  114. package/node_modules/@maka/runtime/dist/model-factory.js +26 -6
  115. package/node_modules/@maka/runtime/dist/model-fetcher.js +8 -1
  116. package/node_modules/@maka/runtime/dist/model-history.js +16 -3
  117. package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +7 -2
  118. package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +49 -2
  119. package/node_modules/@maka/runtime/dist/plugin-executor-service.js +12 -3
  120. package/node_modules/@maka/runtime/dist/runtime-context.js +53 -0
  121. package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +3 -0
  122. package/node_modules/@maka/runtime/dist/session-checkin.js +331 -0
  123. package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +7 -0
  124. package/node_modules/@maka/runtime/dist/shell-run-manager.js +34 -0
  125. package/node_modules/@maka/runtime/dist/telemetry/builtin-pricing.js +21 -2
  126. package/node_modules/@maka/runtime/dist/tool-runtime.js +8 -0
  127. package/node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs +50 -1
  128. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/Client.md +2 -0
  129. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/connect.js +10 -4
  130. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/symbols.js +1 -0
  131. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/agent.js +6 -2
  132. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  133. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  134. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client.js +3 -2
  135. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  136. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/cache-handler.js +48 -0
  137. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  138. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  139. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/decompress.js +15 -5
  140. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/index.js +3 -1
  141. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/parse.js +138 -137
  142. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/util.js +21 -2
  143. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
  144. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  145. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/fetch/index.js +3 -3
  146. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/infra/index.js +14 -0
  147. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  148. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  149. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/package.json +1 -1
  150. package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +1 -1
  151. package/node_modules/@maka/runtime/node_modules/undici/README.md +25 -3
  152. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  153. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +11 -6
  154. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  155. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Errors.md +76 -1
  156. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  157. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
  158. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  159. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/index.md +12 -12
  160. package/node_modules/@maka/runtime/node_modules/undici/docs/docs/type-map.json +66 -66
  161. package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  162. package/node_modules/@maka/runtime/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  163. package/node_modules/@maka/runtime/node_modules/undici/lib/core/connect.js +10 -4
  164. package/node_modules/@maka/runtime/node_modules/undici/lib/core/constants.js +12 -1
  165. package/node_modules/@maka/runtime/node_modules/undici/lib/core/errors.js +38 -1
  166. package/node_modules/@maka/runtime/node_modules/undici/lib/core/request.js +16 -1
  167. package/node_modules/@maka/runtime/node_modules/undici/lib/core/symbols.js +2 -0
  168. package/node_modules/@maka/runtime/node_modules/undici/lib/core/util.js +26 -1
  169. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +6 -2
  170. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  171. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
  172. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +4 -1
  173. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  174. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  175. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  176. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
  177. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool.js +11 -8
  178. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  179. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  180. package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  181. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +153 -15
  182. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  183. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  184. package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +44 -11
  185. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/cache.js +11 -3
  186. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/decompress.js +22 -9
  187. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dns.js +11 -0
  188. package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/response-error.js +72 -28
  189. package/node_modules/@maka/runtime/node_modules/undici/lib/milo/LICENSE.md +7 -0
  190. package/node_modules/@maka/runtime/node_modules/undici/lib/milo/no-simd.js +1002 -0
  191. package/node_modules/@maka/runtime/node_modules/undici/lib/milo/simd.js +1002 -0
  192. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +11 -0
  193. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  194. package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  195. package/node_modules/@maka/runtime/node_modules/undici/lib/util/cache.js +11 -5
  196. package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/util.js +19 -2
  197. package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  198. package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  199. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/body.js +47 -38
  200. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  201. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/headers.js +2 -2
  202. package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/index.js +8 -4
  203. package/node_modules/@maka/runtime/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  204. package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  205. package/node_modules/@maka/runtime/node_modules/undici/package.json +9 -7
  206. package/node_modules/@maka/runtime/package.json +2 -0
  207. package/node_modules/@maka/runtime-host/dist/assistant/bot/bridge.js +8 -0
  208. package/node_modules/@maka/runtime-host/dist/assistant/bot/capabilities.js +1 -0
  209. package/node_modules/@maka/runtime-host/dist/assistant/bot/controller.js +64 -13
  210. package/node_modules/@maka/runtime-host/dist/assistant/bot/host.js +11 -2
  211. package/node_modules/@maka/runtime-host/dist/assistant/bot/store.js +71 -2
  212. package/node_modules/@maka/runtime-host/dist/assistant/bot/turn-ids.js +38 -0
  213. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/assistant.js +7 -0
  214. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/controller.js +193 -32
  215. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/discovery-capabilities.js +69 -0
  216. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/host.js +15 -28
  217. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/notebook.js +286 -0
  218. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/prompt.js +31 -6
  219. package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/store.js +18 -1
  220. package/node_modules/@maka/runtime-host/dist/assistant/memory-network/controller.js +1 -1
  221. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-observer.js +94 -0
  222. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-store.js +253 -0
  223. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition.js +133 -0
  224. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/controller.js +27 -14
  225. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delegation.js +35 -5
  226. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delivery.js +1 -1
  227. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/host.js +16 -2
  228. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/matter.js +13 -0
  229. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/prompt.js +7 -5
  230. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/review.js +1 -1
  231. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/settlement-context.js +126 -0
  232. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/store.js +92 -6
  233. package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/tools.js +87 -23
  234. package/node_modules/@maka/runtime-host/dist/assistant/service.js +49 -5
  235. package/node_modules/@maka/runtime-host/dist/protocol/goal.js +119 -1
  236. package/node_modules/@maka/runtime-host/dist/protocol/index.js +7 -1
  237. package/node_modules/@maka/runtime-host/dist/protocol/operations.js +8 -1
  238. package/node_modules/@maka/runtime-host/dist/protocol/personal-assistant.js +1 -0
  239. package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +7 -1
  240. package/node_modules/@maka/runtime-host/dist/protocol/session-checkin.js +133 -0
  241. package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +3 -2
  242. package/node_modules/@maka/runtime-host/dist/server/event-wait-manager.js +63 -12
  243. package/node_modules/@maka/runtime-host/dist/server/event-wait-observation-store.js +19 -0
  244. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +123 -11
  245. package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +47 -3
  246. package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +126 -4
  247. package/node_modules/@maka/runtime-host/dist/server/goal-event-waits.js +58 -19
  248. package/node_modules/@maka/runtime-host/dist/server/goal-projection.js +24 -3
  249. package/node_modules/@maka/runtime-host/dist/server/index.js +2 -0
  250. package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +44 -2
  251. package/node_modules/@maka/runtime-host/dist/server/personal-assistant-workspace.js +78 -0
  252. package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +73 -3
  253. package/node_modules/@maka/runtime-host/dist/server/session-checkin.js +257 -0
  254. package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-coordinator.js +282 -0
  255. package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-publication.js +250 -0
  256. package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-access.js +166 -0
  257. package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-adapter.js +59 -0
  258. package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +4 -2
  259. package/node_modules/@maka/storage/dist/context-offload-snapshot.js +2 -1
  260. package/node_modules/@maka/storage/dist/execution-stores.js +36 -1
  261. package/node_modules/@maka/storage/dist/local-execution-persistence.js +26 -0
  262. package/node_modules/@maka/storage/dist/production-session-snapshot.js +14 -6
  263. package/node_modules/@maka/storage/dist/runtime-event-persistence.js +1 -0
  264. package/node_modules/@maka/storage/dist/session-bundle-policy.js +86 -16
  265. package/node_modules/@maka/storage/dist/session-checkpoint-publication-store.js +204 -0
  266. package/node_modules/@maka/storage/dist/snapshot-operation-gate.js +65 -0
  267. package/node_modules/@maka/storage/dist/sqlite-context-offload-schema.js +3 -3
  268. package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +4 -2
  269. package/node_modules/@maka/storage/dist/sqlite-reclamation-checkpoint.js +37 -0
  270. package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +31 -0
  271. package/node_modules/@maka/storage/package.json +3 -0
  272. package/node_modules/@modelcontextprotocol/client/dist/index-B-4n9P0J.d.mts.map +1 -0
  273. package/node_modules/@modelcontextprotocol/client/dist/index-J2FaQ-KY.d.cts.map +1 -0
  274. package/node_modules/@modelcontextprotocol/client/dist/index.cjs +76 -22
  275. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -1
  276. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -1
  277. package/node_modules/@modelcontextprotocol/client/dist/index.mjs +76 -22
  278. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
  279. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
  280. package/node_modules/@modelcontextprotocol/client/dist/{src-oZBjf3U1.cjs → src-DpAS0jfg.cjs} +105 -8
  281. package/node_modules/@modelcontextprotocol/client/dist/{src-xKF0PJN-.mjs → src-WCy6ifGf.mjs} +88 -9
  282. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +1 -1
  283. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +1 -1
  284. package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/package.json +2 -2
  285. package/node_modules/@modelcontextprotocol/client/package.json +5 -5
  286. package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
  287. package/node_modules/fast-uri/README.md +8 -0
  288. package/node_modules/fast-uri/index.js +98 -18
  289. package/node_modules/fast-uri/lib/utils.js +52 -0
  290. package/node_modules/fast-uri/package.json +1 -1
  291. package/node_modules/follow-redirects/index.js +10 -1
  292. package/node_modules/follow-redirects/package.json +1 -1
  293. package/node_modules/ip-address/README.md +104 -104
  294. package/node_modules/ip-address/dist/ipv4.js +7 -0
  295. package/node_modules/ip-address/dist/ipv6.js +7 -4
  296. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  297. package/node_modules/ip-address/package.json +2 -1
  298. package/node_modules/undici/README.md +25 -3
  299. package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  300. package/node_modules/undici/docs/docs/api/Client.md +11 -6
  301. package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  302. package/node_modules/undici/docs/docs/api/Errors.md +76 -1
  303. package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  304. package/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
  305. package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  306. package/node_modules/undici/docs/docs/index.md +12 -12
  307. package/node_modules/undici/docs/docs/type-map.json +66 -66
  308. package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  309. package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  310. package/node_modules/undici/lib/core/connect.js +10 -4
  311. package/node_modules/undici/lib/core/constants.js +12 -1
  312. package/node_modules/undici/lib/core/errors.js +38 -1
  313. package/node_modules/undici/lib/core/request.js +16 -1
  314. package/node_modules/undici/lib/core/symbols.js +2 -0
  315. package/node_modules/undici/lib/core/util.js +26 -1
  316. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  317. package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  318. package/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
  319. package/node_modules/undici/lib/dispatcher/client.js +4 -1
  320. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  321. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  322. package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  323. package/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
  324. package/node_modules/undici/lib/dispatcher/pool.js +11 -8
  325. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  326. package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  327. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  328. package/node_modules/undici/lib/handler/cache-handler.js +153 -15
  329. package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  330. package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  331. package/node_modules/undici/lib/handler/retry-handler.js +44 -11
  332. package/node_modules/undici/lib/interceptor/cache.js +11 -3
  333. package/node_modules/undici/lib/interceptor/decompress.js +22 -9
  334. package/node_modules/undici/lib/interceptor/dns.js +11 -0
  335. package/node_modules/undici/lib/interceptor/response-error.js +72 -28
  336. package/node_modules/undici/lib/milo/LICENSE.md +7 -0
  337. package/node_modules/undici/lib/milo/no-simd.js +1002 -0
  338. package/node_modules/undici/lib/milo/simd.js +1002 -0
  339. package/node_modules/undici/lib/mock/mock-agent.js +11 -0
  340. package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  341. package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  342. package/node_modules/undici/lib/util/cache.js +11 -5
  343. package/node_modules/undici/lib/web/cookies/util.js +19 -2
  344. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  345. package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  346. package/node_modules/undici/lib/web/fetch/body.js +47 -38
  347. package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  348. package/node_modules/undici/lib/web/fetch/headers.js +2 -2
  349. package/node_modules/undici/lib/web/fetch/index.js +8 -4
  350. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  351. package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  352. package/node_modules/undici/package.json +9 -7
  353. package/node_modules/zod/package.json +1 -1
  354. package/node_modules/zod/v4/core/compile.cjs +8 -0
  355. package/node_modules/zod/v4/core/compile.js +8 -0
  356. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  357. package/node_modules/zod/v4/core/schemas.js +30 -0
  358. package/node_modules/zod/v4/core/util.cjs +15 -0
  359. package/node_modules/zod/v4/core/util.js +14 -0
  360. package/node_modules/zod/v4/core/versions.cjs +1 -1
  361. package/node_modules/zod/v4/core/versions.js +1 -1
  362. package/package.json +2 -2
  363. package/node_modules/@modelcontextprotocol/client/dist/index-D_CiY-T3.d.cts.map +0 -1
  364. package/node_modules/@modelcontextprotocol/client/dist/index-D_QDtbiv.d.mts.map +0 -1
package/LICENSE CHANGED
@@ -353,10 +353,10 @@ SOFTWARE.
353
353
 
354
354
  Zod dependency patch
355
355
 
356
- Source: https://www.npmjs.com/package/zod/v/4.6.5
356
+ Source: https://www.npmjs.com/package/zod/v/4.6.7
357
357
  Repository: https://github.com/colinhacks/zod
358
- Version: 4.6.5
359
- Dependency patch: patches/zod+4.6.5.patch
358
+ Version: 4.6.7
359
+ Dependency patch: patches/zod+4.6.7.patch
360
360
  Copyright (c) 2025 Colin McDonnell
361
361
  License: MIT
362
362
 
@@ -387,12 +387,12 @@ SOFTWARE.
387
387
 
388
388
  Model Context Protocol client dependency patch
389
389
 
390
- Source: https://www.npmjs.com/package/@modelcontextprotocol/client/v/2.2.0
390
+ Source: https://www.npmjs.com/package/@modelcontextprotocol/client/v/2.3.0
391
391
  Repository: https://github.com/modelcontextprotocol/typescript-sdk
392
- Version: 2.2.0
393
- Dependency patch: patches/@modelcontextprotocol+client+2.2.0.patch
392
+ Version: 2.3.0
393
+ Dependency patch: patches/@modelcontextprotocol+client+2.3.0.patch
394
394
  Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
395
- Declared package license: MIT
395
+ Declared package license: Apache-2.0
396
396
 
397
397
  Maka redistributes a source patch that releases settled request observers under
398
398
  transport backpressure. The upstream package's LICENSE describes a transition
package/README.md CHANGED
@@ -143,29 +143,91 @@ and network access and should only be used in an environment you are prepared to
143
143
  modify.
144
144
 
145
145
 
146
- For another agent to drive a Session, request structured output or explicitly submit without waiting:
146
+ For a parent agent coordinating work across calls, prefer `--no-wait`, save the returned
147
+ `sessionId` as `$session`, then wait when ready to handle an interaction or result:
147
148
 
148
149
  ```sh
149
- maka run "Inspect this project" --json
150
150
  maka run "Inspect this project" --no-wait
151
+ maka run --session "$session" --wait --json
151
152
  ```
152
153
 
153
- Both forms return a `sessionId` in their JSON result. Ordinary runs still wait and print the final
154
- answer by default. Built-in AskUser is an exception: it returns question JSON and exits 0
155
- while the Turn waits. Scripts that need a final answer should use `--json` and inspect `status`,
156
- not treat exit code 0 alone as task completion. `--no-wait` returns after admission; use the
157
- Session ID to observe the eventual result. Given a returned Session ID in `$session`:
154
+ `--no-wait` already returns JSON; an extra `--json` is unnecessary. Ordinary `maka run` keeps its
155
+ blocking default and prints the final answer, making it suitable for a single shell call.
156
+ Use `maka run "Inspect this project" --json` for a structured blocking result.
157
+
158
+ Choose the next Session call by purpose:
158
159
 
159
160
  ```sh
160
161
  maka run --session "$session" --status
161
- maka run --session "$session" --wait --json
162
- maka run --session "$session" --answer '["Yes",null]' --wait --json
163
- maka run --session "$session" "Inspect the tests next" --queue --wait --json
162
+ maka run --session "$session" --recap --json
163
+ maka run --session "$session" --answer '["Yes",null]' --json
164
+ maka run --session "$session" "Inspect the tests next" --no-wait
164
165
  maka run --session "$session" "Focus on the parser" --steer --no-wait
165
166
  maka run --session "$session" --result --json
166
- maka run --session "$session" --resume --wait --json
167
+ maka run --session "$session" --resume --json
167
168
  ```
168
169
 
170
+ An added prompt queues by default, so `--queue` is optional. Repeating the same flag or value is
171
+ accepted; conflicting values and incompatible actions still produce a usage error. Execution commands wait unless given
172
+ `--no-wait`; `--session <id> --wait` explicitly observes the current Turn without submitting work.
173
+
174
+ | Call | Default stdout | Meaning of exit 0 |
175
+ | --- | --- | --- |
176
+ | Ordinary run or Session wait/result | Final answer text; pending interactions are JSON | Inspect the outcome; a pending interaction still needs a decision |
177
+ | `--no-wait` | JSON admission receipt | Submission accepted, not task completion |
178
+ | `--status` / `--stop` | JSON | Observation or stop request succeeded |
179
+ | Model settings without an action | JSON with `configuration` | Settings saved; execution is unchanged |
180
+ | `--recap` | Summary text | Independent summary generated |
181
+
182
+ Rejecting an approval informs the model and lets the same Turn continue within existing permissions
183
+ or explain the blocker. A tool failure alone does not override the Runtime terminal status. Waits
184
+ return at Turn completion or the next interaction; `--deny --no-wait` only submits the decision.
185
+
186
+ Use `--json` on waits, results, and recaps for uniform structured results. `status` is the lifecycle;
187
+ `finalOutput` is the task answer; `recap` is progress; `submission` is an admission receipt. Errors are brief text on stderr by default. Explicit `--json` returns structured errors on stdout,
188
+ including the original message and Host `code` when available. An operation error does not assert
189
+ that the Session failed. For a remote Host, repeat the same `--host <profile-id>`
190
+ on every call. `--session` inherits saved settings and accepts persistent model/connection/thinking updates.
191
+ Workspace, timeout, and Graph overrides still require legacy `--resume <id>` and are rejected
192
+ before connecting when combined with `--session`.
193
+
194
+ Change a Session's model persistently, then explicitly choose continuation or a new message:
195
+
196
+ ```sh
197
+ maka run --session "$session" --model "other-model"
198
+ maka run --session "$session" --model "other-model" --resume --json
199
+ maka run --session "$session" --model "other-model" "Continue the review" --no-wait
200
+ ```
201
+
202
+ These are three alternatives. The first only saves settings and returns a JSON `configuration`
203
+ receipt with `connection`, `model`, and `thinking`; it does not start or resume execution.
204
+ Add `--connection <slug>` to select a different saved account. Native native model/connection changes reset
205
+ thinking to the model default unless `--thinking` is supplied; selecting the same target preserves the saved level. The new settings persist for future
206
+ calls, like Desktop model selection; global defaults and permissions are unchanged.
207
+
208
+ Settings are saved before an explicit action, so they remain saved if that later action fails.
209
+ CLI does not classify why execution stopped or choose a model automatically. Host errors such
210
+ as busy-session rejection are returned without implicitly stopping the Turn or resubmitting the
211
+ old prompt. Resume uses the Host's existing safe-continuation operation; a new prompt is new input.
212
+
213
+ `--recap` generates a one-sentence summary of recorded Session progress using the same
214
+ independent model call as TUI `/recap`. It works during an active Turn without steering,
215
+ queueing, stopping, or waiting for that Turn to finish. Without `--json` it prints the summary;
216
+ with `--json` it returns `sessionId`, current `status`, and a separate `recap` field, for example:
217
+
218
+ ```json
219
+ {"sessionId":"…","status":"running","queued":0,"recap":"You asked for a review; the parser is checked and test verification is still pending."}
220
+ ```
221
+
222
+ The recap is a snapshot of the history captured when generation starts. It cannot see unrecorded
223
+ work or results from a tool that has not returned, and execution can advance while it is generated.
224
+ Each invocation requests a fresh summary and consumes model usage; `--status` remains the cheap
225
+ status query. A recap is not the final answer (`--result`) or a reply from the running agent.
226
+ Combine `--status --recap` to return JSON containing both status/boundary and progress. Other
227
+ Session actions, prompts, and wait flags cannot be combined with recap.
228
+ Successful recap generation exits 0 even if the Session's latest Turn failed; generation errors
229
+ exit 1. Ctrl+C cancels the CLI observer and leaves Host execution running.
230
+
169
231
  Session controls (`--session`) inherit the Host's saved permissions, just as they inherit the
170
232
  model and working directory. Continuing, queueing, steering, or answering does not require another
171
233
  `--yolo` and does not change the boundary. Add `--yolo` only to explicitly grant full access.
@@ -185,8 +247,8 @@ For Host-owned Session execution, `--wait` and `--status` return `needs_approval
185
247
  `expansion`, and `justification`; internal request IDs stay inside the CLI. Review the scope, then:
186
248
 
187
249
  ```sh
188
- maka run --session "$session" --approve --wait --json
189
- maka run --session "$session" --deny --wait --json
250
+ maka run --session "$session" --approve --json
251
+ maka run --session "$session" --deny --json
190
252
  ```
191
253
 
192
254
  These are alternative decisions, not a sequence to execute. Both continue the original Turn and
@@ -201,7 +263,7 @@ Ordinary blocking runs retain their existing sandbox-boundary denial behavior.
201
263
  For coordination, submit follow-ups without blocking, then service the Session's interactions:
202
264
 
203
265
  ```sh
204
- maka run --session "$session" "Inspect the tests next" --queue --no-wait --json
266
+ maka run --session "$session" "Inspect the tests next" --no-wait
205
267
  maka run --session "$session" --wait --json
206
268
  ```
207
269
 
@@ -217,7 +279,7 @@ Assistant Inbox conversations instead return `submission: "inbox"`, without a wo
217
279
 
218
280
  Queue is the default: each explicit queued message opens its own subsequent Turn. Steer uses the
219
281
  Host's existing current-Turn delivery and may carry over if it misses that Turn's last boundary.
220
- Submitting a queued prompt with `--wait` follows that message's execution. It does not return
282
+ Submitting a queued prompt without `--no-wait` follows that message's execution (`--wait` is optional). It does not return
221
283
  questions from an earlier Turn blocking the queue; service those through a separate Session
222
284
  wait/answer call, or use the coordination workflow above. Steer with `--wait`
223
285
  observes the Turn selected on attachment; it does not guarantee consumption before that Turn ends. A standalone `--wait` fixes its
@@ -235,9 +297,7 @@ remain waiting in the Host. A wait reports the actual interaction kind and a rec
235
297
  interactive client on the same Host, or stop the Turn explicitly. Detached admission does not
236
298
  promise that subsequent execution will need no interaction.
237
299
 
238
- Session commands use the saved configuration. Keep using the legacy `--resume <session-id>`
239
- selector for blocking runs that supply configuration, cwd, timeout or Graph options; that selector
240
- continues accepting a new prompt. `--session <id> --resume` instead requests safe continuation of
300
+ `--session <id> --resume` instead requests safe continuation of
241
301
  stopped execution. An idle Session prompt can use `--max-steps`; a queued or steering message
242
302
  cannot attach a step cap to an existing Turn.
243
303
 
package/README.zh-CN.md CHANGED
@@ -109,27 +109,86 @@ Maka 默认会在执行高权限工具操作前询问。`maka run --yolo` 会授
109
109
  权限,只应在你允许任务修改的环境中使用。
110
110
 
111
111
 
112
- 主代理可以请求结构化结果,或显式提交后返回:
112
+ 主代理跨多次调用协调任务时,推荐使用 `--no-wait`,把返回的 `sessionId` 保存为 `$session`,
113
+ 准备处理交互或接收结果时再等待:
113
114
 
114
115
  ```sh
115
- maka run "检查这个项目" --json
116
116
  maka run "检查这个项目" --no-wait
117
+ maka run --session "$session" --wait --json
117
118
  ```
118
119
 
119
- 这两种调用的 JSON 结果都包含 `sessionId`。普通调用仍默认等待并输出最终答案。
120
- `--no-wait` 在提交被接收后返回;使用会话 ID 查询后续结果。假设返回的会话 ID 保存在
121
- `$session` 中:
120
+ `--no-wait` 本身就返回 JSON,无需再加 `--json`。普通 `maka run` 仍默认等待并输出最终答案,
121
+ 适合单次 shell 调用;需要结构化的阻塞结果时使用 `maka run "检查这个项目" --json`。
122
+
123
+ 根据目的选择下一次会话调用:
122
124
 
123
125
  ```sh
124
126
  maka run --session "$session" --status
125
- maka run --session "$session" --wait --json
126
- maka run --session "$session" --answer '["是",null]' --wait --json
127
- maka run --session "$session" "接下来检查测试" --queue --wait --json
127
+ maka run --session "$session" --recap --json
128
+ maka run --session "$session" --answer '["是",null]' --json
129
+ maka run --session "$session" "接下来检查测试" --no-wait
128
130
  maka run --session "$session" "重点检查参数解析" --steer --no-wait
129
131
  maka run --session "$session" --result --json
130
- maka run --session "$session" --resume --wait --json
132
+ maka run --session "$session" --resume --json
133
+ ```
134
+
135
+ 追加 prompt 默认排队,无需重复 `--queue`。重复相同参数或相同值可以接受;值冲突或无法
136
+ 同时执行的动作组合仍返回用法错误。执行命令默认等待,指定 `--no-wait` 才提交后返回;
137
+ `--session <id> --wait` 则是不提交新工作,只观察当前 Turn。
138
+
139
+ | 调用 | 默认 stdout | 退出码 0 的含义 |
140
+ | --- | --- | --- |
141
+ | 普通 run 或会话 wait/result | 最终答案文本;待处理交互返回 JSON | 仍须检查结果,待处理交互需要调用方决定 |
142
+ | `--no-wait` | JSON 接收回执 | 提交被接收,不代表任务完成 |
143
+ | `--status` / `--stop` | JSON | 状态查询或停止请求成功 |
144
+ | 模型设置且无动作 | 带 `configuration` 的 JSON | 设置已保存,执行状态不变 |
145
+ | `--recap` | 摘要文本 | 独立摘要生成成功 |
146
+
147
+ 在 wait、result、recap 上加 `--json` 可统一为结构化结果。`status` 表示生命周期,
148
+ `finalOutput` 是任务答案,`recap` 是进展,`submission` 是接收回执。
149
+ 远程 Host 的每次调用都应携带相同的 `--host <profile-id>`。
150
+
151
+ 拒绝审批会将决定反馈给模型,同一个 Turn 可以在现有权限内继续或说明阻碍。工具失败本身不会
152
+ 覆盖 Runtime 的终态。wait 等到 Turn 结束或下一次交互时返回;`--deny --no-wait` 只提交决定。
153
+ 错误默认以简短文本输出到 stderr;显式 `--json` 才向 stdout 输出结构化错误,保留原始信息和
154
+ Host 已提供的 `code`。操作失败不代表 Session 已失败。
155
+
156
+ `--session` 继承已保存的设置,并允许持久更新模型、连接和 thinking。工作目录、timeout 和
157
+ Graph 覆盖仍需使用旧选择器 `--resume <id>`;与 `--session` 组合时会在连接前拒绝。
158
+
159
+ 会话模型切换会持久保存,再由显式参数决定续跑或发送新消息:
160
+
161
+ ```sh
162
+ maka run --session "$session" --model "other-model"
163
+ maka run --session "$session" --model "other-model" --resume --json
164
+ maka run --session "$session" --model "other-model" "继续审查" --no-wait
131
165
  ```
132
166
 
167
+ 这三条是不同用法。第一条只保存设置,返回带有 `connection`、`model`、`thinking` 的 JSON
168
+ `configuration` 回执,不会启动或恢复执行。加 `--connection <slug>` 可以选择另一个已保存的
169
+ 账号。原生模型或连接实际改变时会将 thinking 重置为模型默认值,除非显式指定 `--thinking`;选择相同目标会保留已保存的级别。
170
+ 与 Desktop 切换模型一样,新设置对后续调用持续生效;全局默认值和权限不变。
171
+
172
+ 设置先保存,再执行显式动作;即使后续动作失败,已保存的设置仍然保留。CLI 不判断会话因何
173
+ 停止,也不自动选择模型。Host 返回忙碌等错误时会直接返回,不隐式停止 Turn 或重发旧 prompt。
174
+ resume 使用 Host 已有的安全续跑操作;提供新 prompt 则是新输入。
175
+
176
+ `--recap` 复用 TUI `/recap` 的独立模型调用,用一句话总结会话已记录的进展。
177
+ 它可以在 Turn 运行中使用,不会 steering、排队、停止当前 Turn,也不等 Turn 完成。
178
+ 不加 `--json` 时直接输出摘要;加上后返回 `sessionId`、当前 `status` 和独立的 `recap` 字段,例如:
179
+
180
+ ```json
181
+ {"sessionId":"…","status":"running","queued":0,"recap":"你要求审查代码;参数解析已检查,测试验证尚未完成。"}
182
+ ```
183
+
184
+ 摘要基于生成开始时读取的历史快照,无法看到尚未记录的工作或尚未返回的工具结果;
185
+ 生成期间任务可能继续推进。每次调用都会重新请求模型并产生模型用量;只查状态继续用
186
+ `--status`。摘要不是最终答案(`--result`),也不是正在运行的代理直接回复的消息。
187
+ `--status --recap` 可组合返回包含状态、执行边界和进展的 JSON;recap 不能与其他会话动作、
188
+ prompt 或等待参数组合使用。
189
+ 摘要生成成功返回退出码 0,即使会话最近的 Turn 失败;生成失败返回退出码 1。
190
+ Ctrl+C 取消 CLI 观察,不会停止 Host 中的执行。
191
+
133
192
  会话控制(`--session`)与继承模型、工作目录一样,继承 Host 已保存的权限。续跑、queue、
134
193
  steer 和回答问题不需要重复 `--yolo`,也不会改变执行边界;只有要显式授予完整权限时才加
135
194
  `--yolo`。`--status` 会报告 `executionBoundary`:受管 `read_only`/`writable`、bypass 或 external。
@@ -148,8 +207,8 @@ steer 和回答问题不需要重复 `--yolo`,也不会改变执行边界;
148
207
  ID 不暴露。查看范围后,选择批准或拒绝:
149
208
 
150
209
  ```sh
151
- maka run --session "$session" --approve --wait --json
152
- maka run --session "$session" --deny --wait --json
210
+ maka run --session "$session" --approve --json
211
+ maka run --session "$session" --deny --json
153
212
  ```
154
213
 
155
214
  上面两条命令是二选一,不能顺序执行。它们都继续原 Turn,要求会话中恰好有一个待处理沙箱
@@ -162,7 +221,7 @@ Host 扩展受管沙箱边界,并保存供该会话后续执行使用,不会
162
221
  协调线程推荐先后台入队,再处理会话交互:
163
222
 
164
223
  ```sh
165
- maka run --session "$session" "接下来检查测试" --queue --no-wait --json
224
+ maka run --session "$session" "接下来检查测试" --no-wait
166
225
  maka run --session "$session" --wait --json
167
226
  ```
168
227
 
@@ -176,7 +235,7 @@ Turn 的问题,或 `needs_approval` 和沙箱请求;先回答交互,后续
176
235
  助手 Inbox 会话返回 `submission: "inbox"`,不包含工作 Turn 的结果或队列计数,即使指定 `--wait` 也立即返回接收回执。这仅确认消息已进入 Inbox;委派工作的结果需通过对应工作会话查询。
177
236
 
178
237
  默认使用 queue,每条显式排队消息对应一个独立后续 Turn。steer 沿用 Host 当前 Turn 的追加
179
- 机制,错过最后处理边界时可能进入后续 Turn。提交排队消息时的 `--wait` 跟踪该消息对应的执行,不会返回前一 Turn 阻塞队列的问题;
238
+ 机制,错过最后处理边界时可能进入后续 Turn。提交排队消息且未指定 `--no-wait` 时,调用跟踪该消息对应的执行(可显式加 `--wait`),不会返回前一 Turn 阻塞队列的问题;
180
239
  这类问题要通过独立的会话 wait/answer 处理,或采用上面的协调流程。steer 配合 `--wait` 观察连接时选定的
181
240
  Turn,不保证追加消息一定在该 Turn 结束前消费。
182
241
  单独 `--wait` 在连接时固定目标,空闲时读取最近结果。`--result` 不等待仍在执行的 Turn。
@@ -190,8 +249,7 @@ run 的取消行为保持原样。显式停止 Host 执行可用 `maka run --ses
190
249
  命令:使用同一 Host 的交互式客户端处理,或显式停止该 Turn。后台提交成功不保证后续执行
191
250
  不会请求交互。
192
251
 
193
- 会话控制使用已保存的配置。需要指定配置、cwd、timeout 或 Graph 选项的阻塞运行,继续使用
194
- 兼容入口 `--resume <session-id>` 选择会话并提供新 prompt。`--session <id> --resume` 则表示
252
+ `--session <id> --resume` 则表示
195
253
  安全恢复已停止的执行。空闲会话的新 prompt 可以使用 `--max-steps`,排队或 steer 消息不能
196
254
  给已有 Turn 附加步数上限。
197
255
 
@@ -752,9 +752,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
752
752
 
753
753
  ================================================================================
754
754
 
755
- Package: @modelcontextprotocol/client@2.2.0
756
- Declared license: MIT
757
- Selected license: MIT
755
+ Package: @modelcontextprotocol/client@2.3.0
756
+ Declared license: Apache-2.0
757
+ Selected license: Apache-2.0
758
758
  Repository: git+https://github.com/modelcontextprotocol/typescript-sdk.git
759
759
 
760
760
  --- LICENSE ---
@@ -977,9 +977,9 @@ the full license text.
977
977
 
978
978
  ================================================================================
979
979
 
980
- Package: @modelcontextprotocol/core@2.2.0
981
- Declared license: MIT
982
- Selected license: MIT
980
+ Package: @modelcontextprotocol/core@2.3.0
981
+ Declared license: Apache-2.0
982
+ Selected license: Apache-2.0
983
983
  Repository: git+https://github.com/modelcontextprotocol/typescript-sdk.git
984
984
 
985
985
  --- LICENSE ---
@@ -3970,7 +3970,7 @@ SOFTWARE.
3970
3970
 
3971
3971
  ================================================================================
3972
3972
 
3973
- Package: fast-uri@3.1.8
3973
+ Package: fast-uri@3.1.9
3974
3974
  Declared license: BSD-3-Clause
3975
3975
  Selected license: BSD-3-Clause
3976
3976
  Repository: git+https://github.com/fastify/fast-uri.git
@@ -4027,7 +4027,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
4027
4027
 
4028
4028
  ================================================================================
4029
4029
 
4030
- Package: follow-redirects@1.16.0
4030
+ Package: follow-redirects@1.16.1
4031
4031
  Declared license: MIT
4032
4032
  Selected license: MIT
4033
4033
  Repository: git+ssh://git@github.com/follow-redirects/follow-redirects.git
@@ -4781,7 +4781,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4781
4781
 
4782
4782
  ================================================================================
4783
4783
 
4784
- Package: ip-address@10.7.2
4784
+ Package: ip-address@10.7.4
4785
4785
  Declared license: MIT
4786
4786
  Selected license: MIT
4787
4787
  Repository: https://github.com/beaugunderson/ip-address.git
@@ -7444,7 +7444,7 @@ PERFORMANCE OF THIS SOFTWARE.
7444
7444
 
7445
7445
  ================================================================================
7446
7446
 
7447
- Package: undici@7.30.0
7447
+ Package: undici@7.30.1
7448
7448
  Declared license: MIT
7449
7449
  Selected license: MIT
7450
7450
  Repository: git+https://github.com/nodejs/undici.git
@@ -7474,7 +7474,7 @@ SOFTWARE.
7474
7474
 
7475
7475
  ================================================================================
7476
7476
 
7477
- Package: undici@8.11.2
7477
+ Package: undici@8.12.3
7478
7478
  Declared license: MIT
7479
7479
  Selected license: MIT
7480
7480
  Repository: git+https://github.com/nodejs/undici.git
@@ -7934,7 +7934,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
7934
7934
 
7935
7935
  ================================================================================
7936
7936
 
7937
- Package: zod@4.6.5
7937
+ Package: zod@4.6.7
7938
7938
  Declared license: MIT
7939
7939
  Selected license: MIT
7940
7940
  Repository: git+https://github.com/colinhacks/zod.git
package/dist/pi-goal.js CHANGED
@@ -85,6 +85,8 @@ export function formatGoalElapsed(elapsedMs) {
85
85
  */
86
86
  export function goalStatusLineText(goal, now) {
87
87
  const counter = `${goal.iterations}/${goal.maxIterations}`;
88
+ if (goal.eventWait)
89
+ return `goal ${goal.eventWait.phase === 'observing' ? 'waiting for task' : 'awaiting continuation'} ${counter}`;
88
90
  if (goal.status === 'active') {
89
91
  return `goal ${counter} ${formatGoalElapsed(goalElapsedMs(goal, now))}`;
90
92
  }
@@ -135,6 +137,17 @@ export function goalSummaryLines(goal, now) {
135
137
  else if (goal.tokensSpent > 0) {
136
138
  lines.push(`Tokens: ${formatTokenCount(goal.tokensSpent)}`);
137
139
  }
140
+ if (goal.eventWait) {
141
+ const wait = goal.eventWait;
142
+ lines.push(wait.phase === 'awaiting_admission'
143
+ ? 'Result available; waiting to continue.'
144
+ : wait.observation?.state === 'unknown'
145
+ ? 'Background task state temporarily unverifiable.'
146
+ : 'Waiting for background task.');
147
+ if (wait.observation?.state === 'unknown' && wait.observation.reasonCode)
148
+ lines.push(`Observation: ${inlineGoalText(wait.observation.reasonCode)}`);
149
+ lines.push(`Task: ${inlineGoalText(wait.resource.resourceId)}`, `Reason: ${inlineGoalText(wait.reason)}`, `Deadline: ${new Date(wait.deadlineAt).toISOString()}`, '/goal cancel-wait pauses the Goal; the background task keeps running.');
150
+ }
138
151
  if (goal.lastReason)
139
152
  lines.push(`Last evaluator note: ${inlineGoalText(goal.lastReason)}`);
140
153
  return lines;
@@ -4062,12 +4062,55 @@ export async function runMakaPiTui(input) {
4062
4062
  return;
4063
4063
  }
4064
4064
  const action = parts[1];
4065
+ if (parts.length === 2 && action === 'cancel-wait') {
4066
+ if (busy) {
4067
+ state.entries.push({
4068
+ kind: 'notice',
4069
+ level: 'info',
4070
+ text: TUI_COPY_RESOURCES.goal[locale].cancelWaitBusy,
4071
+ });
4072
+ requestRender();
4073
+ return;
4074
+ }
4075
+ const goal = input.driver.getGoal?.();
4076
+ const wait = goal?.eventWait;
4077
+ if (!goal || !wait || !input.driver.cancelGoalEventWait) {
4078
+ state.entries.push({
4079
+ kind: 'notice',
4080
+ level: 'info',
4081
+ text: TUI_COPY_RESOURCES.goal[locale].noCancellableWait,
4082
+ });
4083
+ requestRender();
4084
+ return;
4085
+ }
4086
+ // Capture the displayed identity before any await; never retarget retries.
4087
+ const target = {
4088
+ sessionId: goal.sessionId,
4089
+ goalId: goal.goalId,
4090
+ controlGeneration: wait.controlGeneration,
4091
+ waitId: wait.waitId,
4092
+ expectedGoalRevision: goal.revision,
4093
+ };
4094
+ void runControl(async () => {
4095
+ const result = await input.driver.cancelGoalEventWait(target);
4096
+ currentGoal = result.goal;
4097
+ state.entries.push({
4098
+ kind: 'notice',
4099
+ level: 'info',
4100
+ text: result.outcome === 'cancelled' || result.outcome === 'already_cancelled'
4101
+ ? TUI_COPY_RESOURCES.goal[locale].waitCancelled
4102
+ : TUI_COPY_RESOURCES.goal[locale].waitChanged,
4103
+ });
4104
+ requestRender();
4105
+ });
4106
+ return;
4107
+ }
4065
4108
  if (parts.length !== 2 ||
4066
4109
  (action !== 'pause' && action !== 'resume' && action !== 'clear')) {
4067
4110
  state.entries.push({
4068
4111
  kind: 'notice',
4069
4112
  level: 'error',
4070
- text: 'Usage: /goal [pause|resume|clear]',
4113
+ text: TUI_COPY_RESOURCES.goal[locale].usage,
4071
4114
  });
4072
4115
  requestRender();
4073
4116
  return;