@mininglamp-oss/octo-runtime 1.1.5 → 1.1.7

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 (282) hide show
  1. package/apps/cli/dist/adapter-configurations.d.ts +4 -0
  2. package/apps/cli/dist/adapter-configurations.js +102 -0
  3. package/apps/cli/dist/build-info.json +2 -2
  4. package/apps/cli/dist/command-tree.js +1 -1
  5. package/apps/cli/dist/logs.js +8 -4
  6. package/apps/cli/dist/main.js +11 -5
  7. package/apps/cli/dist/output.js +5 -0
  8. package/apps/cli/dist/playboard.js +3 -2
  9. package/dist/public/dsh.d.ts +1 -1
  10. package/dist/public/dsh.js +1 -1
  11. package/node_modules/@mininglamp-oss/octo-runtime-acp-client/dist/index.js +5 -2
  12. package/node_modules/@mininglamp-oss/octo-runtime-acp-client/package.json +3 -3
  13. package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.d.ts +9 -1
  14. package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +17 -0
  15. package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/package.json +4 -4
  16. package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.d.ts +20 -2
  17. package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/package.json +3 -3
  18. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.d.ts +32 -2
  19. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.js +3 -0
  20. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/package.json +3 -3
  21. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.d.ts +19 -6
  22. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.js +161 -26
  23. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/package.json +4 -4
  24. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.js +8 -1
  25. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.d.ts +32 -2
  26. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/package.json +3 -3
  27. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-DYOJCNWF.js → chunk-CFKMMCO6.js} +6 -4
  28. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-UOQRXV3Q.js → chunk-LO34KB7D.js} +1 -1
  29. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/chunk-V5W6ZTYC.js +151 -0
  30. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.d.ts +5 -3
  31. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.js +3 -1
  32. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.d.ts +17 -3
  33. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +8 -6
  34. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/launch.d.ts +2 -1
  35. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/launch.js +2 -2
  36. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/trajectory.js +2 -2
  37. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/package.json +4 -3
  38. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.d.ts +9 -1
  39. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/client.js +8 -2
  40. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.d.ts +10 -6
  41. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/package.json +5 -5
  42. package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.d.ts +9 -1
  43. package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/package.json +2 -2
  44. package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.d.ts +9 -1
  45. package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/package.json +2 -2
  46. package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.d.ts +9 -1
  47. package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/package.json +2 -2
  48. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/compatibility.d.ts +2 -1
  49. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/compatibility.js +12 -40
  50. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.d.ts +22 -2
  51. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.js +422 -135
  52. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/package.json +3 -3
  53. package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.d.ts +6 -2
  54. package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.js +2 -0
  55. package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/package.json +4 -4
  56. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.d.ts +9 -1
  57. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +2 -2
  58. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.d.ts +9 -1
  59. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +2 -2
  60. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +19 -5
  61. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +15 -8
  62. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.d.ts +12 -0
  63. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.js +91 -0
  64. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log-worker.js +2 -2
  65. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log.js +13 -1
  66. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/service-status.d.ts +9 -0
  67. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/service-status.js +40 -0
  68. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +3 -2
  69. package/node_modules/@mininglamp-oss/octo-runtime-adapter-zcode-gui/dist/index.d.ts +20 -2
  70. package/node_modules/@mininglamp-oss/octo-runtime-adapter-zcode-gui/package.json +3 -3
  71. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapter-configurations.d.ts +4 -0
  72. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapter-configurations.js +102 -0
  73. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
  74. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/command-tree.js +1 -1
  75. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/logs.js +8 -4
  76. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/main.js +11 -5
  77. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.js +5 -0
  78. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/playboard.js +3 -2
  79. package/node_modules/@mininglamp-oss/octo-runtime-cli/package.json +24 -24
  80. package/node_modules/@mininglamp-oss/octo-runtime-cross-service/dist/runner.d.ts +2 -1
  81. package/node_modules/@mininglamp-oss/octo-runtime-cross-service/dist/runner.js +102 -52
  82. package/node_modules/@mininglamp-oss/octo-runtime-cross-service/dist/windows-task.js +8 -3
  83. package/node_modules/@mininglamp-oss/octo-runtime-cross-service/package.json +5 -3
  84. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.d.ts +4 -3
  85. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +9 -4
  86. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.js +2 -0
  87. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-input.d.ts +1 -1
  88. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-input.js +9 -6
  89. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.js +47 -4
  90. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
  91. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/client.js +2 -0
  92. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/invocation-manifest.js +4 -1
  93. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/process.d.ts +7 -0
  94. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/process.js +79 -5
  95. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.d.ts +3 -1
  96. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.js +22 -6
  97. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/service.js +2 -1
  98. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/submission-error.d.ts +5 -3
  99. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/submission-error.js +12 -6
  100. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/supervisor.d.ts +4 -2
  101. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/supervisor.js +131 -43
  102. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/package.json +4 -4
  103. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/config-schema.json +8 -1
  104. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/context-gap.d.ts +17 -1
  105. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/context-gap.js +22 -6
  106. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/history-context.d.ts +3 -0
  107. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/history-context.js +27 -0
  108. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/im-channel.js +462 -228
  109. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/rules-context.d.ts +5 -2
  110. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/rules-context.js +42 -4
  111. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/session-store.d.ts +5 -0
  112. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/stable-context.d.ts +15 -0
  113. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/stable-context.js +28 -0
  114. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/contracts.d.ts +16 -5
  115. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifact-policy.d.ts +4 -5
  116. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifact-policy.js +12 -9
  117. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifacts.d.ts +1 -0
  118. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifacts.js +7 -5
  119. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/identity.d.ts +15 -0
  120. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/identity.js +36 -0
  121. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/scheduler.d.ts +2 -0
  122. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/scheduler.js +10 -0
  123. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/dispatcher.d.ts +5 -2
  124. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/dispatcher.js +39 -22
  125. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/model-wait.d.ts +29 -0
  126. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/model-wait.js +171 -0
  127. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/task.d.ts +4 -1
  128. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/task.js +48 -6
  129. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/extra.js +14 -1
  130. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/lifecycle/configuration.js +4 -0
  131. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/run-projector.d.ts +7 -1
  132. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/run-projector.js +265 -38
  133. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/cards.d.ts +4 -0
  134. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/cards.js +5 -5
  135. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/client.d.ts +7 -0
  136. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/client.js +19 -2
  137. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/conversations.d.ts +3 -1
  138. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/conversations.js +4 -3
  139. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/errors.d.ts +0 -12
  140. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/errors.js +5 -3
  141. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/files.d.ts +2 -1
  142. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/files.js +8 -6
  143. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/messages.d.ts +3 -0
  144. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/messages.js +2 -2
  145. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-session.d.ts +2 -2
  146. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-session.js +27 -15
  147. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.d.ts +17 -1
  148. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.js +217 -50
  149. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connection-error.js +2 -4
  150. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connector.d.ts +3 -2
  151. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connector.js +41 -12
  152. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/contexts.d.ts +2 -6
  153. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/contexts.js +53 -82
  154. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-content.d.ts +12 -0
  155. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-content.js +133 -0
  156. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-messages.d.ts +21 -0
  157. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-messages.js +76 -0
  158. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.d.ts +0 -2
  159. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.js +0 -2
  160. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-identities.d.ts +16 -0
  161. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-identities.js +74 -0
  162. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-time.d.ts +4 -0
  163. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-time.js +19 -0
  164. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-trigger.d.ts +7 -0
  165. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-trigger.js +90 -0
  166. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/reasoning-frame.js +39 -2
  167. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/retry-after.d.ts +6 -0
  168. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/retry-after.js +60 -0
  169. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/wukong.d.ts +2 -1
  170. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/wukong.js +20 -8
  171. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/package.json +6 -6
  172. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/application/im-channel.js +10 -2
  173. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/extra.js +14 -1
  174. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/channel.js +2 -3
  175. package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/package.json +5 -5
  176. package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/package.json +2 -2
  177. package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/context-loader.d.ts +3 -2
  178. package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/context-loader.js +11 -4
  179. package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/endpoint.d.ts +2 -0
  180. package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/endpoint.js +5 -3
  181. package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/package.json +4 -4
  182. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +8 -1
  183. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.d.ts +2 -1
  184. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +9 -1
  185. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +18 -0
  186. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +3 -0
  187. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +6 -0
  188. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +14 -0
  189. package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +1 -1
  190. package/node_modules/iconv-lite/LICENSE +21 -0
  191. package/node_modules/iconv-lite/README.md +138 -0
  192. package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  193. package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  194. package/node_modules/iconv-lite/encodings/index.js +23 -0
  195. package/node_modules/iconv-lite/encodings/internal.js +218 -0
  196. package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  197. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  198. package/node_modules/iconv-lite/encodings/sbcs-data.js +180 -0
  199. package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  200. package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  201. package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  202. package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  203. package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  204. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  205. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  206. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  207. package/node_modules/iconv-lite/encodings/utf16.js +187 -0
  208. package/node_modules/iconv-lite/encodings/utf32.js +314 -0
  209. package/node_modules/iconv-lite/encodings/utf7.js +283 -0
  210. package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  211. package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  212. package/node_modules/iconv-lite/lib/index.d.ts +129 -0
  213. package/node_modules/iconv-lite/lib/index.js +182 -0
  214. package/node_modules/iconv-lite/lib/streams.js +105 -0
  215. package/node_modules/iconv-lite/package.json +70 -0
  216. package/node_modules/iconv-lite/types/encodings.d.ts +425 -0
  217. package/node_modules/safer-buffer/LICENSE +21 -0
  218. package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  219. package/node_modules/safer-buffer/Readme.md +156 -0
  220. package/node_modules/safer-buffer/dangerous.js +58 -0
  221. package/node_modules/safer-buffer/package.json +34 -0
  222. package/node_modules/safer-buffer/safer.js +77 -0
  223. package/node_modules/safer-buffer/tests.js +406 -0
  224. package/node_modules/semver/LICENSE +15 -0
  225. package/node_modules/semver/README.md +680 -0
  226. package/node_modules/semver/bin/semver.js +195 -0
  227. package/node_modules/semver/classes/comparator.js +143 -0
  228. package/node_modules/semver/classes/index.js +7 -0
  229. package/node_modules/semver/classes/range.js +577 -0
  230. package/node_modules/semver/classes/semver.js +350 -0
  231. package/node_modules/semver/functions/clean.js +8 -0
  232. package/node_modules/semver/functions/cmp.js +54 -0
  233. package/node_modules/semver/functions/coerce.js +62 -0
  234. package/node_modules/semver/functions/compare-build.js +9 -0
  235. package/node_modules/semver/functions/compare-loose.js +5 -0
  236. package/node_modules/semver/functions/compare.js +7 -0
  237. package/node_modules/semver/functions/diff.js +60 -0
  238. package/node_modules/semver/functions/eq.js +5 -0
  239. package/node_modules/semver/functions/gt.js +5 -0
  240. package/node_modules/semver/functions/gte.js +5 -0
  241. package/node_modules/semver/functions/inc.js +21 -0
  242. package/node_modules/semver/functions/lt.js +5 -0
  243. package/node_modules/semver/functions/lte.js +5 -0
  244. package/node_modules/semver/functions/major.js +5 -0
  245. package/node_modules/semver/functions/minor.js +5 -0
  246. package/node_modules/semver/functions/neq.js +5 -0
  247. package/node_modules/semver/functions/parse.js +18 -0
  248. package/node_modules/semver/functions/patch.js +5 -0
  249. package/node_modules/semver/functions/prerelease.js +8 -0
  250. package/node_modules/semver/functions/rcompare.js +5 -0
  251. package/node_modules/semver/functions/rsort.js +5 -0
  252. package/node_modules/semver/functions/satisfies.js +12 -0
  253. package/node_modules/semver/functions/sort.js +5 -0
  254. package/node_modules/semver/functions/truncate.js +48 -0
  255. package/node_modules/semver/functions/valid.js +8 -0
  256. package/node_modules/semver/index.js +93 -0
  257. package/node_modules/semver/internal/constants.js +37 -0
  258. package/node_modules/semver/internal/debug.js +11 -0
  259. package/node_modules/semver/internal/identifiers.js +29 -0
  260. package/node_modules/semver/internal/lrucache.js +42 -0
  261. package/node_modules/semver/internal/parse-options.js +17 -0
  262. package/node_modules/semver/internal/re.js +223 -0
  263. package/node_modules/semver/package.json +78 -0
  264. package/node_modules/semver/preload.js +4 -0
  265. package/node_modules/semver/range.bnf +17 -0
  266. package/node_modules/semver/ranges/gtr.js +6 -0
  267. package/node_modules/semver/ranges/intersects.js +9 -0
  268. package/node_modules/semver/ranges/ltr.js +6 -0
  269. package/node_modules/semver/ranges/max-satisfying.js +27 -0
  270. package/node_modules/semver/ranges/min-satisfying.js +26 -0
  271. package/node_modules/semver/ranges/min-version.js +63 -0
  272. package/node_modules/semver/ranges/outside.js +82 -0
  273. package/node_modules/semver/ranges/simplify.js +49 -0
  274. package/node_modules/semver/ranges/subset.js +249 -0
  275. package/node_modules/semver/ranges/to-comparators.js +10 -0
  276. package/node_modules/semver/ranges/valid.js +13 -0
  277. package/package.json +33 -27
  278. package/packages/octo-runtime-extra-channel-gateway/config-schema.json +8 -1
  279. package/packages/octo-runtime-protocol/schema/protocol.schema.json +57 -1
  280. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/chunk-G5PWGRL5.js +0 -209
  281. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/desktop-entry.d.ts +0 -1
  282. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/desktop-entry.js +0 -16
@@ -0,0 +1,171 @@
1
+ export const MODEL_WAIT_TIMEOUT_MESSAGE = "模型已连续 5 分钟未返回输出,本轮请求已超时。";
2
+ /** Gateway 每次尝试拥有的模型等待钟;只消费统一事件,不修改执行源或中止观察流。 */
3
+ export class ImModelWait {
4
+ clock;
5
+ changed;
6
+ timedOut;
7
+ #tools = new Set();
8
+ #interactions = new Set();
9
+ #activities = new Map();
10
+ #messages = new Map();
11
+ #since;
12
+ #clearTimer;
13
+ #stopped = true;
14
+ #queued = false;
15
+ #snapshot = { hasOutput: false };
16
+ constructor(clock, changed, timedOut) {
17
+ this.clock = clock;
18
+ this.changed = changed;
19
+ this.timedOut = timedOut;
20
+ }
21
+ get snapshot() {
22
+ return { ...this.#snapshot };
23
+ }
24
+ /** 新尝试从交接执行开始;队列通知及工具/交互活动另行暂停。 */
25
+ start() {
26
+ this.stop();
27
+ this.#stopped = false;
28
+ this.#queued = false;
29
+ this.#tools.clear();
30
+ this.#interactions.clear();
31
+ this.#activities.clear();
32
+ this.#messages.clear();
33
+ this.#snapshot = { hasOutput: false };
34
+ this.#resume();
35
+ }
36
+ accept(event) {
37
+ if (this.#stopped || this.#snapshot.timeout)
38
+ return;
39
+ const p = event.payload;
40
+ if (["run.completed", "run.failed", "run.cancelled"].includes(event.type)) {
41
+ this.stop();
42
+ return;
43
+ }
44
+ if (event.type === "run.queued")
45
+ this.#queued = true;
46
+ if (event.type === "run.started" || event.type === "model_step.started")
47
+ this.#queued = false;
48
+ if (event.type === "tool_call.create")
49
+ this.#tools.add(event.payload.id);
50
+ if (event.type === "tool_call.update")
51
+ this.#tools.delete(event.payload.id);
52
+ if (event.type === "interaction.requested")
53
+ this.#interactions.add(event.payload.interactionId);
54
+ if (event.type === "interaction.resolved")
55
+ this.#interactions.delete(event.payload.interactionId);
56
+ if (event.type === "activity.started") {
57
+ this.#queued = false;
58
+ if (["executing_tool", "waiting_input", "waiting_approval"].includes(event.payload.kind))
59
+ this.#activities.set(event.payload.activityId, event.payload.subject);
60
+ }
61
+ if (event.type === "activity.finished")
62
+ this.#activities.delete(event.payload.activityId);
63
+ // 同一工具/交互的活动和正式终态可以先后到达;正式终态足以关闭对应暂停原因。
64
+ if (event.type === "tool_call.update" || event.type === "interaction.resolved") {
65
+ const type = event.type === "tool_call.update" ? "tool" : "interaction";
66
+ const id = type === "tool" ? p.id : p.interactionId;
67
+ for (const [key, subject] of this.#activities)
68
+ if (subject.type === type && subject.id === id)
69
+ this.#activities.delete(key);
70
+ }
71
+ if (this.#content(event)) {
72
+ this.#snapshot.hasOutput = true;
73
+ this.#pause();
74
+ this.#queued = false;
75
+ }
76
+ if (this.#queued || this.#tools.size || this.#interactions.size || this.#activities.size)
77
+ this.#pause();
78
+ else
79
+ this.#resume();
80
+ }
81
+ #content(event) {
82
+ if (!["message.delta", "message.create", "message.update"].includes(event.type))
83
+ return false;
84
+ const p = event.payload;
85
+ const id = p.messageId ?? `${p.stepId ?? "run"}:${p.channel ?? "final"}`;
86
+ const previous = this.#messages.get(id);
87
+ const channel = p.channel ?? previous?.channel ?? "final";
88
+ const role = p.role ?? previous?.role;
89
+ const exposure = p.exposure ?? previous?.exposure;
90
+ const length = typeof p.text !== "string"
91
+ ? (previous?.length ?? 0)
92
+ : event.type === "message.delta"
93
+ ? (previous?.length ?? 0) + p.text.length
94
+ : p.text.length;
95
+ const retained = this.#messages.has(id) || this.#messages.size < 256;
96
+ if (retained)
97
+ this.#messages.set(id, {
98
+ length: Math.max(previous?.length ?? 0, length),
99
+ channel,
100
+ role,
101
+ exposure
102
+ });
103
+ if (role && role !== "assistant")
104
+ return false;
105
+ if (!["final", "commentary", "analysis"].includes(channel))
106
+ return false;
107
+ if (channel === "analysis" &&
108
+ !["public_reasoning", "public_summary", "public_plan"].includes(exposure ?? ""))
109
+ return false;
110
+ if (typeof p.text !== "string" || !p.text.trim())
111
+ return false;
112
+ // 只缓存长度,不保存正文;异常多消息时拒绝把未知快照冒充新内容,delta 仍可证明输出。
113
+ return event.type === "message.delta" || (retained && length > (previous?.length ?? 0));
114
+ }
115
+ #pause() {
116
+ this.#clearTimer?.();
117
+ this.#clearTimer = undefined;
118
+ this.#since = undefined;
119
+ delete this.#snapshot.seconds;
120
+ }
121
+ #resume() {
122
+ if (this.#since !== undefined)
123
+ return;
124
+ this.#since = this.clock.now();
125
+ this.#schedule();
126
+ }
127
+ #schedule() {
128
+ const elapsed = this.clock.now() - this.#since;
129
+ const next = Math.min(300_000, (Math.floor(elapsed / 30_000) + 1) * 30_000);
130
+ this.#clearTimer = this.clock.schedule(() => {
131
+ this.#clearTimer = undefined;
132
+ if (this.#stopped || this.#since === undefined)
133
+ return;
134
+ const elapsed = this.clock.now() - this.#since;
135
+ if (elapsed >= 300_000) {
136
+ this.#snapshot.timeout = "cancelling";
137
+ delete this.#snapshot.seconds;
138
+ this.#since = undefined;
139
+ // 取消 ACK 不代表结束;未在宽限内观察到终态时仍保留 Stop,禁止 Retry。
140
+ this.#clearTimer = this.clock.schedule(() => this.unconfirmed(), 10_000);
141
+ this.timedOut();
142
+ }
143
+ else {
144
+ this.#snapshot.seconds = Math.floor(elapsed / 30_000) * 30;
145
+ this.#schedule();
146
+ }
147
+ this.changed();
148
+ }, Math.max(0, next - elapsed));
149
+ }
150
+ unconfirmed() {
151
+ if (this.#stopped || this.#snapshot.timeout !== "cancelling")
152
+ return;
153
+ this.#clearTimer?.();
154
+ this.#clearTimer = undefined;
155
+ this.#snapshot.timeout = "unconfirmed";
156
+ this.changed();
157
+ }
158
+ /** 必须在同次源流正常耗尽且确认终态后调用,不能由 cancel ACK 调用。 */
159
+ confirmTermination() {
160
+ this.stop();
161
+ if (this.#snapshot.timeout)
162
+ this.#snapshot.timeout = "terminated";
163
+ }
164
+ /** Stop、排空及 dispose 共用清理;保留超时事实供终态和未知展示使用。 */
165
+ stop() {
166
+ this.#stopped = true;
167
+ this.#pause();
168
+ if (this.#snapshot.timeout === "cancelling")
169
+ this.#snapshot.timeout = "unconfirmed";
170
+ }
171
+ }
@@ -2,6 +2,7 @@ import type { ImModuleDependencies } from "../ports.js";
2
2
  import type { ImInvocationInput } from "./dispatcher.js";
3
3
  import { type FailureEnvelope, type CanonicalEvent, type InvokeEnvironment } from "@mininglamp-oss/octo-runtime-protocol";
4
4
  import type { ImBotConfig, ImTaskAttempt } from "../contracts.js";
5
+ import { ImModelWait } from "./model-wait.js";
5
6
  export declare const DEFAULT_CODEX_RETRY: Readonly<{
6
7
  enabled: true;
7
8
  max_consecutive_retries: 5;
@@ -25,11 +26,13 @@ export declare class ImTask {
25
26
  readonly environment: InvokeEnvironment;
26
27
  readonly onAttempt: (request: ImInvocationInput) => void;
27
28
  readonly time: ImTaskClock;
29
+ readonly onModelWaitChanged: () => void;
28
30
  readonly attempts: ImTaskAttempt[];
31
+ readonly modelWait: ImModelWait;
29
32
  /** 与 Channel 展示、诊断共用的本次未提交事实;不注入执行源事件。 */
30
33
  notSubmittedFailure?: FailureEnvelope;
31
34
  stopReason?: string;
32
- constructor(kernel: ImModuleDependencies["kernel"], request: ImInvocationInput, adapterType: string, config: ImBotConfig, environment: InvokeEnvironment, onAttempt: (request: ImInvocationInput) => void, time?: ImTaskClock);
35
+ constructor(kernel: ImModuleDependencies["kernel"], request: ImInvocationInput, adapterType: string, config: ImBotConfig, environment: InvokeEnvironment, onAttempt: (request: ImInvocationInput) => void, time?: ImTaskClock, onModelWaitChanged?: () => void);
33
36
  /** reset 只阻止后续尝试,不把 reset 变成取消当前 Provider 执行。 */
34
37
  stopRetries(): void;
35
38
  /** owner stop 只取消执行和后续尝试;当前订阅须继续消费真实终态。 */
@@ -4,6 +4,7 @@ import { performance } from "node:perf_hooks";
4
4
  import { setTimeout as delay } from "node:timers/promises";
5
5
  import { KernelError, isInvocationNotSubmitted } from "@mininglamp-oss/octo-runtime-executor-kernel";
6
6
  import { failurePayload } from "@mininglamp-oss/octo-runtime-protocol";
7
+ import { ImModelWait, MODEL_WAIT_TIMEOUT_MESSAGE } from "./model-wait.js";
7
8
  export const DEFAULT_CODEX_RETRY = Object.freeze({
8
9
  enabled: true,
9
10
  max_consecutive_retries: 5,
@@ -32,7 +33,9 @@ export class ImTask {
32
33
  environment;
33
34
  onAttempt;
34
35
  time;
36
+ onModelWaitChanged;
35
37
  attempts = [];
38
+ modelWait;
36
39
  /** 与 Channel 展示、诊断共用的本次未提交事实;不注入执行源事件。 */
37
40
  notSubmittedFailure;
38
41
  #policy;
@@ -49,18 +52,28 @@ export class ImTask {
49
52
  #started = false;
50
53
  #draining = false;
51
54
  stopReason;
52
- constructor(kernel, request, adapterType, config, environment, onAttempt, time = clock) {
55
+ constructor(kernel, request, adapterType, config, environment, onAttempt, time = clock, onModelWaitChanged = () => { }) {
53
56
  this.kernel = kernel;
54
57
  this.request = request;
55
58
  this.adapterType = adapterType;
56
59
  this.environment = environment;
57
60
  this.onAttempt = onAttempt;
58
61
  this.time = time;
62
+ this.onModelWaitChanged = onModelWaitChanged;
59
63
  this.#policy = { ...DEFAULT_CODEX_RETRY, ...config.codex_retry };
60
64
  this.#signal = AbortSignal.any([
61
65
  this.#abort.signal,
62
66
  ...(environment.signal ? [environment.signal] : [])
63
67
  ]);
68
+ this.modelWait = new ImModelWait(time, onModelWaitChanged, () => {
69
+ this.stopReason = "IM_MODEL_SILENCE_TIMEOUT";
70
+ void this.cancelExecution(this.stopReason)
71
+ .then((accepted) => {
72
+ if (!accepted)
73
+ this.modelWait.unconfirmed();
74
+ })
75
+ .catch(() => this.modelWait.unconfirmed());
76
+ });
64
77
  }
65
78
  /** reset 只阻止后续尝试,不把 reset 变成取消当前 Provider 执行。 */
66
79
  stopRetries() {
@@ -68,6 +81,8 @@ export class ImTask {
68
81
  }
69
82
  /** owner stop 只取消执行和后续尝试;当前订阅须继续消费真实终态。 */
70
83
  async drain(reason = "IM shutdown") {
84
+ this.modelWait.stop();
85
+ this.onModelWaitChanged();
71
86
  this.#draining = true;
72
87
  this.stopRetries();
73
88
  const active = this.#active;
@@ -87,19 +102,32 @@ export class ImTask {
87
102
  }
88
103
  }
89
104
  async cancel(reason = "IM user stop") {
90
- this.#abort.abort(reason);
105
+ // 活动执行保留原流以确认真实终态;尚未执行或退避时仍立即打断本地等待。
106
+ if (!this.#active)
107
+ this.#abort.abort(reason);
91
108
  return this.cancelExecution(reason);
92
109
  }
93
110
  /** 展示故障只请求停止执行及重试,保留观察 signal;返回取消受理结果,不代表执行终态。 */
94
111
  async cancelExecution(reason) {
112
+ // 超时自身还需保留取消确认宽限;其他停止来源立即清掉等待通知和全部计时。
113
+ if (reason !== "IM_MODEL_SILENCE_TIMEOUT") {
114
+ this.modelWait.stop();
115
+ this.onModelWaitChanged();
116
+ }
95
117
  this.stopRetries();
96
118
  if (!this.#active || this.#active.completion === "not_submitted")
97
119
  return true;
98
- this.#cancelPending ??= this.kernel.cancelInvocation(this.#active.invocationId, reason);
120
+ const pending = (this.#cancelPending ??= this.kernel.cancelInvocation(this.#active.invocationId, reason));
99
121
  try {
100
- return (await this.#cancelPending).accepted;
122
+ const { accepted } = await pending;
123
+ if (!accepted && this.#cancelPending === pending)
124
+ this.#cancelPending = undefined;
125
+ return accepted;
101
126
  }
102
127
  catch (error) {
128
+ // 未受理/失败的取消不能永久占住 Stop;并发请求仍复用同一个真实在途调用。
129
+ if (this.#cancelPending === pending)
130
+ this.#cancelPending = undefined;
103
131
  if (isInvocationNotSubmitted(error))
104
132
  return true;
105
133
  throw error;
@@ -107,7 +135,8 @@ export class ImTask {
107
135
  }
108
136
  #stop(reason) {
109
137
  this.stopReason ??= reason;
110
- void this.cancel(reason).catch(() => undefined);
138
+ this.#abort.abort(reason);
139
+ void this.cancelExecution(reason).catch(() => undefined);
111
140
  }
112
141
  async #settleCancellation() {
113
142
  await this.#cancelPending?.catch(() => undefined);
@@ -135,6 +164,7 @@ export class ImTask {
135
164
  return true;
136
165
  }
137
166
  #observe(event) {
167
+ this.modelWait.accept(event);
138
168
  // 工具和交互可能产生外部副作用;首次出现后不再自动重放本轮。
139
169
  if (event.type.startsWith("tool_call.") || event.type === "interaction.requested")
140
170
  this.#replaySafe = false;
@@ -177,6 +207,11 @@ export class ImTask {
177
207
  const deadline = this.time.now() +
178
208
  Number(this.request.contexts.items.find((item) => item.namespace === "octo.execution" && item.name === "limits")?.payload.run_timeout_ms ?? 86_400_000);
179
209
  const clearDeadline = this.time.schedule(() => this.#stop("IM_TASK_DEADLINE"), deadline - this.time.now());
210
+ const stopWaiting = () => {
211
+ this.modelWait.stop();
212
+ this.onModelWaitChanged();
213
+ };
214
+ this.#signal.addEventListener("abort", stopWaiting, { once: true });
180
215
  let request = this.request;
181
216
  try {
182
217
  while (!this.#signal.aborted && !this.#draining) {
@@ -199,6 +234,7 @@ export class ImTask {
199
234
  })
200
235
  };
201
236
  this.#active = active;
237
+ this.modelWait.start();
202
238
  this.#cancelPending = undefined;
203
239
  const attempt = {
204
240
  runId: request.runId,
@@ -230,6 +266,7 @@ export class ImTask {
230
266
  if (!terminal)
231
267
  throw new Error("IM_RUN_WITHOUT_TERMINAL");
232
268
  completion = "terminal_confirmed";
269
+ this.modelWait.confirmTermination();
233
270
  }
234
271
  catch (error) {
235
272
  if (isInvocationNotSubmitted(error)) {
@@ -252,6 +289,7 @@ export class ImTask {
252
289
  throw error;
253
290
  }
254
291
  finally {
292
+ this.modelWait.stop();
255
293
  // 必须等待消费结束及取消回执;未知结果不会进入下一次 invoke。
256
294
  await this.#settleCancellation();
257
295
  this.#active = undefined;
@@ -315,6 +353,8 @@ export class ImTask {
315
353
  yield this.#stoppedEvent();
316
354
  }
317
355
  finally {
356
+ this.#signal.removeEventListener("abort", stopWaiting);
357
+ this.modelWait.stop();
318
358
  clearDeadline();
319
359
  this.#recoveryTimer?.();
320
360
  }
@@ -328,7 +368,9 @@ export class ImTask {
328
368
  code: this.stopReason,
329
369
  message: this.stopReason === "IM_TASK_DEADLINE"
330
370
  ? "本轮任务已达到总运行时限。"
331
- : "模型服务连续故障,已达到自动恢复预算。"
371
+ : this.stopReason === "IM_MODEL_SILENCE_TIMEOUT"
372
+ ? MODEL_WAIT_TIMEOUT_MESSAGE
373
+ : "模型服务连续故障,已达到自动恢复预算。"
332
374
  }
333
375
  }
334
376
  : { protocolVersion: 2, type: "run.cancelled", payload: { reason: "IM user stop" } };
@@ -33,7 +33,20 @@ async function initialize(context, config, dependencies) {
33
33
  log: context.log,
34
34
  createSessionStore: dependencies.createSessionStore,
35
35
  // 只保存调用入口,不预取提示词;宿主更新业务存储后,下一个接纳的逻辑轮重新读取。
36
- prepareContexts: (bot, signal) => contexts.load(bot, signal),
36
+ prepareContexts: async (bot, signal) => {
37
+ let ignored = 0;
38
+ const business = await contexts.load(bot, signal, (items) => {
39
+ const selected = items.filter((item) => item.namespace !== "extra.im");
40
+ ignored += items.length - selected.length;
41
+ return selected;
42
+ });
43
+ // 保留命名空间误配只记数量,不输出内容或阻断当前任务。
44
+ if (ignored)
45
+ context.log("warn", "channel.context.reserved_ignored", {
46
+ ignored_items: ignored
47
+ });
48
+ return business;
49
+ },
37
50
  credentials: (bot) => Promise.resolve(configuredCredential(bot)),
38
51
  ...(allowed
39
52
  ? {
@@ -64,6 +64,10 @@ export function validateImConfig(config) {
64
64
  }
65
65
  if (config.context !== undefined)
66
66
  assertContextEnvelope(config.context);
67
+ const refreshInterval = config.stable_context_refresh_interval_turns;
68
+ if (refreshInterval !== undefined &&
69
+ (!Number.isSafeInteger(refreshInterval) || refreshInterval < 1))
70
+ throw new Error("IM_STABLE_CONTEXT_REFRESH_INTERVAL_INVALID");
67
71
  const delivery = config.artifact_delivery;
68
72
  if (delivery !== undefined) {
69
73
  if (!delivery || typeof delivery !== "object" || Array.isArray(delivery))
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * 公开事件投影:将 CanonicalEvent 累积为平台无关的展示快照。
3
- * 按消息/工具/模型轮次保留身份与顺序,仅公开协议允许的内容;不展示私有 reasoning。
3
+ * 只保留近期五条展示明细和必要在途元数据;最终正文独立保存,不展示私有 reasoning。
4
4
  */
5
5
  import type { CanonicalEvent, FailureEnvelope } from "@mininglamp-oss/octo-runtime-protocol";
6
6
  import type { ImTaskAttempt } from "../contracts.js";
7
+ import type { ModelWaitSnapshot } from "../execution/model-wait.js";
7
8
  export interface ProgressItem {
8
9
  id: string;
9
10
  kind: "model_step" | "reasoning" | "commentary" | "tool";
@@ -17,6 +18,7 @@ export interface ProgressItem {
17
18
  finishReason?: string;
18
19
  startedAtMs?: number;
19
20
  durationMs?: number;
21
+ ordinal?: number;
20
22
  }
21
23
  export interface RunPresentation {
22
24
  runId: string;
@@ -26,6 +28,7 @@ export interface RunPresentation {
26
28
  terminal?: "completed" | "failed" | "cancelled";
27
29
  elapsedMs?: number;
28
30
  items: ProgressItem[];
31
+ modelSteps?: ProgressItem[];
29
32
  reasoningCount: number;
30
33
  toolCallCount: number;
31
34
  modelStepCount: number;
@@ -42,6 +45,7 @@ export interface RunPresentation {
42
45
  message: string;
43
46
  };
44
47
  retryNoticeCount?: number;
48
+ modelWait?: ModelWaitSnapshot;
45
49
  }
46
50
  export declare class ImRunProjector {
47
51
  #private;
@@ -50,6 +54,8 @@ export declare class ImRunProjector {
50
54
  constructor(runId: string, allowToolPreview?: boolean);
51
55
  accept(event: CanonicalEvent, now?: number): void;
52
56
  get finalText(): string;
57
+ /** 最终文本已取出、卡片/投递收尾后调用;即使迟到回调仍引用对象,也不再持有正文。 */
58
+ dispose(): void;
53
59
  get finalReply(): {
54
60
  text: string;
55
61
  allowMention: boolean;