@xgjktech/xg_cwork_im 1.19.41 → 1.19.43

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 (428) hide show
  1. package/README.md +488 -488
  2. package/dist/src/account-connection.d.ts +37 -0
  3. package/dist/src/account-connection.d.ts.map +1 -0
  4. package/dist/src/account-connection.js +437 -0
  5. package/dist/src/account-connection.js.map +1 -0
  6. package/dist/src/account-reconciler.d.ts +55 -0
  7. package/dist/src/account-reconciler.d.ts.map +1 -0
  8. package/dist/src/account-reconciler.js +294 -0
  9. package/dist/src/account-reconciler.js.map +1 -0
  10. package/dist/src/account-reconciler.test.d.ts +2 -0
  11. package/dist/src/account-reconciler.test.d.ts.map +1 -0
  12. package/dist/src/account-reconciler.test.js +148 -0
  13. package/dist/src/account-reconciler.test.js.map +1 -0
  14. package/dist/src/action-run-event.d.ts +20 -0
  15. package/dist/src/action-run-event.d.ts.map +1 -0
  16. package/dist/src/action-run-event.js +62 -0
  17. package/dist/src/action-run-event.js.map +1 -0
  18. package/dist/src/action-run-event.test.d.ts +2 -0
  19. package/dist/src/action-run-event.test.d.ts.map +1 -0
  20. package/dist/src/action-run-event.test.js +83 -0
  21. package/dist/src/action-run-event.test.js.map +1 -0
  22. package/dist/src/action-store-access.d.ts +27 -0
  23. package/dist/src/action-store-access.d.ts.map +1 -0
  24. package/dist/src/action-store-access.js +74 -0
  25. package/dist/src/action-store-access.js.map +1 -0
  26. package/dist/src/active-round-registry.d.ts +29 -0
  27. package/dist/src/active-round-registry.d.ts.map +1 -0
  28. package/dist/src/active-round-registry.js +60 -0
  29. package/dist/src/active-round-registry.js.map +1 -0
  30. package/dist/src/active-round-registry.test.d.ts +2 -0
  31. package/dist/src/active-round-registry.test.d.ts.map +1 -0
  32. package/dist/src/active-round-registry.test.js +62 -0
  33. package/dist/src/active-round-registry.test.js.map +1 -0
  34. package/dist/src/agent-context-types.d.ts +205 -0
  35. package/dist/src/agent-context-types.d.ts.map +1 -0
  36. package/dist/src/agent-context-types.js +132 -0
  37. package/dist/src/agent-context-types.js.map +1 -0
  38. package/dist/src/agent-context-types.test.d.ts +2 -0
  39. package/dist/src/agent-context-types.test.d.ts.map +1 -0
  40. package/dist/src/agent-context-types.test.js +123 -0
  41. package/dist/src/agent-context-types.test.js.map +1 -0
  42. package/dist/src/agent-stream-client-registry.d.ts +6 -0
  43. package/dist/src/agent-stream-client-registry.d.ts.map +1 -0
  44. package/dist/src/agent-stream-client-registry.js +14 -0
  45. package/dist/src/agent-stream-client-registry.js.map +1 -0
  46. package/dist/src/apply-sync-mapping.d.ts +15 -0
  47. package/dist/src/apply-sync-mapping.d.ts.map +1 -0
  48. package/dist/src/apply-sync-mapping.js +98 -0
  49. package/dist/src/apply-sync-mapping.js.map +1 -0
  50. package/dist/src/auth.d.ts +30 -0
  51. package/dist/src/auth.d.ts.map +1 -0
  52. package/dist/src/auth.js +66 -0
  53. package/dist/src/auth.js.map +1 -0
  54. package/dist/src/auto-model-router.d.ts +36 -0
  55. package/dist/src/auto-model-router.d.ts.map +1 -0
  56. package/dist/src/auto-model-router.js +60 -0
  57. package/dist/src/auto-model-router.js.map +1 -0
  58. package/dist/src/auto-model-router.test.d.ts +2 -0
  59. package/dist/src/auto-model-router.test.d.ts.map +1 -0
  60. package/dist/src/auto-model-router.test.js +99 -0
  61. package/dist/src/auto-model-router.test.js.map +1 -0
  62. package/dist/src/block-streaming-config.test.d.ts +2 -0
  63. package/dist/src/block-streaming-config.test.d.ts.map +1 -0
  64. package/dist/src/block-streaming-config.test.js +85 -0
  65. package/dist/src/block-streaming-config.test.js.map +1 -0
  66. package/dist/src/build-project-prompt.d.ts +40 -0
  67. package/dist/src/build-project-prompt.d.ts.map +1 -0
  68. package/dist/src/build-project-prompt.js +183 -0
  69. package/dist/src/build-project-prompt.js.map +1 -0
  70. package/dist/src/build-project-prompt.test.d.ts +2 -0
  71. package/dist/src/build-project-prompt.test.d.ts.map +1 -0
  72. package/dist/src/build-project-prompt.test.js +100 -0
  73. package/dist/src/build-project-prompt.test.js.map +1 -0
  74. package/dist/src/channel-config.d.ts +650 -0
  75. package/dist/src/channel-config.d.ts.map +1 -0
  76. package/dist/src/channel-config.js +372 -0
  77. package/dist/src/channel-config.js.map +1 -0
  78. package/dist/src/channel-config.test.d.ts +2 -0
  79. package/dist/src/channel-config.test.d.ts.map +1 -0
  80. package/dist/src/channel-config.test.js +56 -0
  81. package/dist/src/channel-config.test.js.map +1 -0
  82. package/dist/src/channel-disabled-account.test.d.ts +2 -0
  83. package/dist/src/channel-disabled-account.test.d.ts.map +1 -0
  84. package/dist/src/channel-disabled-account.test.js +44 -0
  85. package/dist/src/channel-disabled-account.test.js.map +1 -0
  86. package/dist/src/channel-log.d.ts +17 -0
  87. package/dist/src/channel-log.d.ts.map +1 -0
  88. package/dist/src/channel-log.js +45 -0
  89. package/dist/src/channel-log.js.map +1 -0
  90. package/dist/src/channel.d.ts +16 -0
  91. package/dist/src/channel.d.ts.map +1 -0
  92. package/dist/src/channel.js +149 -0
  93. package/dist/src/channel.js.map +1 -0
  94. package/dist/src/connection.d.ts +82 -0
  95. package/dist/src/connection.d.ts.map +1 -0
  96. package/dist/src/connection.js +386 -0
  97. package/dist/src/connection.js.map +1 -0
  98. package/dist/src/deliver-text.d.ts +30 -0
  99. package/dist/src/deliver-text.d.ts.map +1 -0
  100. package/dist/src/deliver-text.js +88 -0
  101. package/dist/src/deliver-text.js.map +1 -0
  102. package/dist/src/deliver-text.test.d.ts +2 -0
  103. package/dist/src/deliver-text.test.d.ts.map +1 -0
  104. package/dist/src/deliver-text.test.js +117 -0
  105. package/dist/src/deliver-text.test.js.map +1 -0
  106. package/dist/src/delivery/deliver-text.test.js +22 -22
  107. package/dist/src/delivery/turn-deliver-buffer.test.js +25 -25
  108. package/dist/src/delivery/user-facing-errors.d.ts +1 -0
  109. package/dist/src/delivery/user-facing-errors.d.ts.map +1 -1
  110. package/dist/src/delivery/user-facing-errors.js +7 -0
  111. package/dist/src/delivery/user-facing-errors.js.map +1 -1
  112. package/dist/src/delivery/user-facing-errors.test.js +12 -1
  113. package/dist/src/delivery/user-facing-errors.test.js.map +1 -1
  114. package/dist/src/dispatch-mentioned-reply.d.ts +42 -0
  115. package/dist/src/dispatch-mentioned-reply.d.ts.map +1 -0
  116. package/dist/src/dispatch-mentioned-reply.js +822 -0
  117. package/dist/src/dispatch-mentioned-reply.js.map +1 -0
  118. package/dist/src/gateway-session-queue.d.ts +41 -0
  119. package/dist/src/gateway-session-queue.d.ts.map +1 -0
  120. package/dist/src/gateway-session-queue.js +29 -0
  121. package/dist/src/gateway-session-queue.js.map +1 -0
  122. package/dist/src/group-history-tool.d.ts +31 -0
  123. package/dist/src/group-history-tool.d.ts.map +1 -0
  124. package/dist/src/group-history-tool.js +177 -0
  125. package/dist/src/group-history-tool.js.map +1 -0
  126. package/dist/src/im-tool-progress.d.ts +4 -0
  127. package/dist/src/im-tool-progress.d.ts.map +1 -0
  128. package/dist/src/im-tool-progress.js +87 -0
  129. package/dist/src/im-tool-progress.js.map +1 -0
  130. package/dist/src/inbound-archive.d.ts +4 -0
  131. package/dist/src/inbound-archive.d.ts.map +1 -0
  132. package/dist/src/inbound-archive.js +105 -0
  133. package/dist/src/inbound-archive.js.map +1 -0
  134. package/dist/src/inbound-attachment-meta.d.ts +13 -0
  135. package/dist/src/inbound-attachment-meta.d.ts.map +1 -0
  136. package/dist/src/inbound-attachment-meta.js +39 -0
  137. package/dist/src/inbound-attachment-meta.js.map +1 -0
  138. package/dist/src/inbound-chat-type.d.ts +33 -0
  139. package/dist/src/inbound-chat-type.d.ts.map +1 -0
  140. package/dist/src/inbound-chat-type.js +52 -0
  141. package/dist/src/inbound-chat-type.js.map +1 -0
  142. package/dist/src/inbound-display.d.ts +41 -0
  143. package/dist/src/inbound-display.d.ts.map +1 -0
  144. package/dist/src/inbound-display.js +169 -0
  145. package/dist/src/inbound-display.js.map +1 -0
  146. package/dist/src/inbound-file-download.d.ts +15 -0
  147. package/dist/src/inbound-file-download.d.ts.map +1 -0
  148. package/dist/src/inbound-file-download.js +48 -0
  149. package/dist/src/inbound-file-download.js.map +1 -0
  150. package/dist/src/inbound-input-media.d.ts +43 -0
  151. package/dist/src/inbound-input-media.d.ts.map +1 -0
  152. package/dist/src/inbound-input-media.js +230 -0
  153. package/dist/src/inbound-input-media.js.map +1 -0
  154. package/dist/src/inbound-media-local.d.ts +49 -0
  155. package/dist/src/inbound-media-local.d.ts.map +1 -0
  156. package/dist/src/inbound-media-local.js +194 -0
  157. package/dist/src/inbound-media-local.js.map +1 -0
  158. package/dist/src/inbound-model.d.ts +30 -0
  159. package/dist/src/inbound-model.d.ts.map +1 -0
  160. package/dist/src/inbound-model.js +40 -0
  161. package/dist/src/inbound-model.js.map +1 -0
  162. package/dist/src/inbound-model.test.d.ts +2 -0
  163. package/dist/src/inbound-model.test.d.ts.map +1 -0
  164. package/dist/src/inbound-model.test.js +66 -0
  165. package/dist/src/inbound-model.test.js.map +1 -0
  166. package/dist/src/inbound-terminal-delivery.d.ts +77 -0
  167. package/dist/src/inbound-terminal-delivery.d.ts.map +1 -0
  168. package/dist/src/inbound-terminal-delivery.js +251 -0
  169. package/dist/src/inbound-terminal-delivery.js.map +1 -0
  170. package/dist/src/inbound-terminal-state.d.ts +66 -0
  171. package/dist/src/inbound-terminal-state.d.ts.map +1 -0
  172. package/dist/src/inbound-terminal-state.js +180 -0
  173. package/dist/src/inbound-terminal-state.js.map +1 -0
  174. package/dist/src/inbound-terminal-state.test.d.ts +2 -0
  175. package/dist/src/inbound-terminal-state.test.d.ts.map +1 -0
  176. package/dist/src/inbound-terminal-state.test.js +224 -0
  177. package/dist/src/inbound-terminal-state.test.js.map +1 -0
  178. package/dist/src/interrupt-round.d.ts +9 -0
  179. package/dist/src/interrupt-round.d.ts.map +1 -0
  180. package/dist/src/interrupt-round.js +44 -0
  181. package/dist/src/interrupt-round.js.map +1 -0
  182. package/dist/src/interrupt-round.test.d.ts +2 -0
  183. package/dist/src/interrupt-round.test.d.ts.map +1 -0
  184. package/dist/src/interrupt-round.test.js +133 -0
  185. package/dist/src/interrupt-round.test.js.map +1 -0
  186. package/dist/src/item-event-guard.d.ts +28 -0
  187. package/dist/src/item-event-guard.d.ts.map +1 -0
  188. package/dist/src/item-event-guard.js +22 -0
  189. package/dist/src/item-event-guard.js.map +1 -0
  190. package/dist/src/item-event-guard.test.d.ts +2 -0
  191. package/dist/src/item-event-guard.test.d.ts.map +1 -0
  192. package/dist/src/item-event-guard.test.js +55 -0
  193. package/dist/src/item-event-guard.test.js.map +1 -0
  194. package/dist/src/modified-file-push-tracker.d.ts +24 -0
  195. package/dist/src/modified-file-push-tracker.d.ts.map +1 -0
  196. package/dist/src/modified-file-push-tracker.js +125 -0
  197. package/dist/src/modified-file-push-tracker.js.map +1 -0
  198. package/dist/src/nas-volumes.d.ts +43 -0
  199. package/dist/src/nas-volumes.d.ts.map +1 -0
  200. package/dist/src/nas-volumes.js +307 -0
  201. package/dist/src/nas-volumes.js.map +1 -0
  202. package/dist/src/nas-volumes.test.d.ts +2 -0
  203. package/dist/src/nas-volumes.test.d.ts.map +1 -0
  204. package/dist/src/nas-volumes.test.js +229 -0
  205. package/dist/src/nas-volumes.test.js.map +1 -0
  206. package/dist/src/per-message-fallback-notice.d.ts +43 -0
  207. package/dist/src/per-message-fallback-notice.d.ts.map +1 -0
  208. package/dist/src/per-message-fallback-notice.js +93 -0
  209. package/dist/src/per-message-fallback-notice.js.map +1 -0
  210. package/dist/src/per-message-fallback-notice.test.d.ts +2 -0
  211. package/dist/src/per-message-fallback-notice.test.d.ts.map +1 -0
  212. package/dist/src/per-message-fallback-notice.test.js +47 -0
  213. package/dist/src/per-message-fallback-notice.test.js.map +1 -0
  214. package/dist/src/per-message-model-pending.d.ts +17 -0
  215. package/dist/src/per-message-model-pending.d.ts.map +1 -0
  216. package/dist/src/per-message-model-pending.js +45 -0
  217. package/dist/src/per-message-model-pending.js.map +1 -0
  218. package/dist/src/plan/action-dispatch-event-compat.test.d.ts +2 -0
  219. package/dist/src/plan/action-dispatch-event-compat.test.d.ts.map +1 -0
  220. package/dist/src/plan/action-dispatch-event-compat.test.js +81 -0
  221. package/dist/src/plan/action-dispatch-event-compat.test.js.map +1 -0
  222. package/dist/src/plan/action-store-lifecycle.test.js +5 -5
  223. package/dist/src/plan/plan-core-db.test.js +9 -9
  224. package/dist/src/plan/plan-core-snapshot.test.js +9 -9
  225. package/dist/src/plan-blocked-notice.d.ts +14 -0
  226. package/dist/src/plan-blocked-notice.d.ts.map +1 -0
  227. package/dist/src/plan-blocked-notice.js +41 -0
  228. package/dist/src/plan-blocked-notice.js.map +1 -0
  229. package/dist/src/plan-blocked-notice.test.d.ts +2 -0
  230. package/dist/src/plan-blocked-notice.test.d.ts.map +1 -0
  231. package/dist/src/plan-blocked-notice.test.js +96 -0
  232. package/dist/src/plan-blocked-notice.test.js.map +1 -0
  233. package/dist/src/plan-event-subscription.d.ts +36 -0
  234. package/dist/src/plan-event-subscription.d.ts.map +1 -0
  235. package/dist/src/plan-event-subscription.js +57 -0
  236. package/dist/src/plan-event-subscription.js.map +1 -0
  237. package/dist/src/plan-event-subscription.test.d.ts +2 -0
  238. package/dist/src/plan-event-subscription.test.d.ts.map +1 -0
  239. package/dist/src/plan-event-subscription.test.js +167 -0
  240. package/dist/src/plan-event-subscription.test.js.map +1 -0
  241. package/dist/src/plan-stat-event.d.ts +28 -0
  242. package/dist/src/plan-stat-event.d.ts.map +1 -0
  243. package/dist/src/plan-stat-event.js +74 -0
  244. package/dist/src/plan-stat-event.js.map +1 -0
  245. package/dist/src/plan-stat-event.test.d.ts +2 -0
  246. package/dist/src/plan-stat-event.test.d.ts.map +1 -0
  247. package/dist/src/plan-stat-event.test.js +248 -0
  248. package/dist/src/plan-stat-event.test.js.map +1 -0
  249. package/dist/src/plan-store-access.d.ts +23 -0
  250. package/dist/src/plan-store-access.d.ts.map +1 -0
  251. package/dist/src/plan-store-access.js +96 -0
  252. package/dist/src/plan-store-access.js.map +1 -0
  253. package/dist/src/plan-store-access.test.d.ts +2 -0
  254. package/dist/src/plan-store-access.test.d.ts.map +1 -0
  255. package/dist/src/plan-store-access.test.js +207 -0
  256. package/dist/src/plan-store-access.test.js.map +1 -0
  257. package/dist/src/plan-tool-middleware.d.ts +27 -0
  258. package/dist/src/plan-tool-middleware.d.ts.map +1 -0
  259. package/dist/src/plan-tool-middleware.js +112 -0
  260. package/dist/src/plan-tool-middleware.js.map +1 -0
  261. package/dist/src/plan-tool-middleware.test.d.ts +2 -0
  262. package/dist/src/plan-tool-middleware.test.d.ts.map +1 -0
  263. package/dist/src/plan-tool-middleware.test.js +623 -0
  264. package/dist/src/plan-tool-middleware.test.js.map +1 -0
  265. package/dist/src/plan-tool-result.d.ts +18 -0
  266. package/dist/src/plan-tool-result.d.ts.map +1 -0
  267. package/dist/src/plan-tool-result.js +77 -0
  268. package/dist/src/plan-tool-result.js.map +1 -0
  269. package/dist/src/plan-tool-result.test.d.ts +2 -0
  270. package/dist/src/plan-tool-result.test.d.ts.map +1 -0
  271. package/dist/src/plan-tool-result.test.js +129 -0
  272. package/dist/src/plan-tool-result.test.js.map +1 -0
  273. package/dist/src/plan-ws-registry.d.ts +11 -0
  274. package/dist/src/plan-ws-registry.d.ts.map +1 -0
  275. package/dist/src/plan-ws-registry.js +27 -0
  276. package/dist/src/plan-ws-registry.js.map +1 -0
  277. package/dist/src/plan-ws-registry.test.d.ts +2 -0
  278. package/dist/src/plan-ws-registry.test.d.ts.map +1 -0
  279. package/dist/src/plan-ws-registry.test.js +43 -0
  280. package/dist/src/plan-ws-registry.test.js.map +1 -0
  281. package/dist/src/progress-display.d.ts +77 -0
  282. package/dist/src/progress-display.d.ts.map +1 -0
  283. package/dist/src/progress-display.js +420 -0
  284. package/dist/src/progress-display.js.map +1 -0
  285. package/dist/src/project-path-normalize.d.ts +30 -0
  286. package/dist/src/project-path-normalize.d.ts.map +1 -0
  287. package/dist/src/project-path-normalize.js +101 -0
  288. package/dist/src/project-path-normalize.js.map +1 -0
  289. package/dist/src/recommended-system-prompt.d.ts +3 -0
  290. package/dist/src/recommended-system-prompt.d.ts.map +1 -0
  291. package/dist/src/recommended-system-prompt.js +8 -0
  292. package/dist/src/recommended-system-prompt.js.map +1 -0
  293. package/dist/src/register-per-message-model-hook.d.ts +6 -0
  294. package/dist/src/register-per-message-model-hook.d.ts.map +1 -0
  295. package/dist/src/register-per-message-model-hook.js +22 -0
  296. package/dist/src/register-per-message-model-hook.js.map +1 -0
  297. package/dist/src/resolve-inbound-group-prompt.d.ts +21 -0
  298. package/dist/src/resolve-inbound-group-prompt.d.ts.map +1 -0
  299. package/dist/src/resolve-inbound-group-prompt.js +43 -0
  300. package/dist/src/resolve-inbound-group-prompt.js.map +1 -0
  301. package/dist/src/resource-file.d.ts +119 -0
  302. package/dist/src/resource-file.d.ts.map +1 -0
  303. package/dist/src/resource-file.js +533 -0
  304. package/dist/src/resource-file.js.map +1 -0
  305. package/dist/src/resource-file.test.d.ts +2 -0
  306. package/dist/src/resource-file.test.d.ts.map +1 -0
  307. package/dist/src/resource-file.test.js +64 -0
  308. package/dist/src/resource-file.test.js.map +1 -0
  309. package/dist/src/run-usage-session.d.ts +10 -0
  310. package/dist/src/run-usage-session.d.ts.map +1 -0
  311. package/dist/src/run-usage-session.js +29 -0
  312. package/dist/src/run-usage-session.js.map +1 -0
  313. package/dist/src/run-usage.d.ts +52 -0
  314. package/dist/src/run-usage.d.ts.map +1 -0
  315. package/dist/src/run-usage.js +93 -0
  316. package/dist/src/run-usage.js.map +1 -0
  317. package/dist/src/run-usage.test.d.ts +2 -0
  318. package/dist/src/run-usage.test.d.ts.map +1 -0
  319. package/dist/src/run-usage.test.js +90 -0
  320. package/dist/src/run-usage.test.js.map +1 -0
  321. package/dist/src/send-file-event.d.ts +26 -0
  322. package/dist/src/send-file-event.d.ts.map +1 -0
  323. package/dist/src/send-file-event.js +33 -0
  324. package/dist/src/send-file-event.js.map +1 -0
  325. package/dist/src/send-file-event.test.d.ts +2 -0
  326. package/dist/src/send-file-event.test.d.ts.map +1 -0
  327. package/dist/src/send-file-event.test.js +86 -0
  328. package/dist/src/send-file-event.test.js.map +1 -0
  329. package/dist/src/send-file-tool.d.ts +81 -0
  330. package/dist/src/send-file-tool.d.ts.map +1 -0
  331. package/dist/src/send-file-tool.js +363 -0
  332. package/dist/src/send-file-tool.js.map +1 -0
  333. package/dist/src/send-file-tool.test.d.ts +2 -0
  334. package/dist/src/send-file-tool.test.d.ts.map +1 -0
  335. package/dist/src/send-file-tool.test.js +176 -0
  336. package/dist/src/send-file-tool.test.js.map +1 -0
  337. package/dist/src/send-group-message-tool.d.ts +17 -0
  338. package/dist/src/send-group-message-tool.d.ts.map +1 -0
  339. package/dist/src/send-group-message-tool.js +82 -0
  340. package/dist/src/send-group-message-tool.js.map +1 -0
  341. package/dist/src/send-service.d.ts +83 -0
  342. package/dist/src/send-service.d.ts.map +1 -0
  343. package/dist/src/send-service.js +324 -0
  344. package/dist/src/send-service.js.map +1 -0
  345. package/dist/src/send-service.test.d.ts +2 -0
  346. package/dist/src/send-service.test.d.ts.map +1 -0
  347. package/dist/src/send-service.test.js +40 -0
  348. package/dist/src/send-service.test.js.map +1 -0
  349. package/dist/src/session/build-project-prompt.test.js +18 -18
  350. package/dist/src/session-im-context.d.ts +13 -0
  351. package/dist/src/session-im-context.d.ts.map +1 -0
  352. package/dist/src/session-im-context.js +45 -0
  353. package/dist/src/session-im-context.js.map +1 -0
  354. package/dist/src/subagent-delivery-phase.d.ts +10 -0
  355. package/dist/src/subagent-delivery-phase.d.ts.map +1 -0
  356. package/dist/src/subagent-delivery-phase.js +4 -0
  357. package/dist/src/subagent-delivery-phase.js.map +1 -0
  358. package/dist/src/subagent-delivery-phase.test.d.ts +2 -0
  359. package/dist/src/subagent-delivery-phase.test.d.ts.map +1 -0
  360. package/dist/src/subagent-delivery-phase.test.js +12 -0
  361. package/dist/src/subagent-delivery-phase.test.js.map +1 -0
  362. package/dist/src/subagent-monitor.d.ts +32 -0
  363. package/dist/src/subagent-monitor.d.ts.map +1 -0
  364. package/dist/src/subagent-monitor.js +370 -0
  365. package/dist/src/subagent-monitor.js.map +1 -0
  366. package/dist/src/subagent-monitor.test.d.ts +2 -0
  367. package/dist/src/subagent-monitor.test.d.ts.map +1 -0
  368. package/dist/src/subagent-monitor.test.js +214 -0
  369. package/dist/src/subagent-monitor.test.js.map +1 -0
  370. package/dist/src/sync-mapping-types.d.ts +220 -0
  371. package/dist/src/sync-mapping-types.d.ts.map +1 -0
  372. package/dist/src/sync-mapping-types.js +55 -0
  373. package/dist/src/sync-mapping-types.js.map +1 -0
  374. package/dist/src/sync-service-client.d.ts +29 -0
  375. package/dist/src/sync-service-client.d.ts.map +1 -0
  376. package/dist/src/sync-service-client.js +72 -0
  377. package/dist/src/sync-service-client.js.map +1 -0
  378. package/dist/src/thinking-ws-progress.d.ts +24 -0
  379. package/dist/src/thinking-ws-progress.d.ts.map +1 -0
  380. package/dist/src/thinking-ws-progress.js +45 -0
  381. package/dist/src/thinking-ws-progress.js.map +1 -0
  382. package/dist/src/thinking-ws-progress.test.d.ts +2 -0
  383. package/dist/src/thinking-ws-progress.test.d.ts.map +1 -0
  384. package/dist/src/thinking-ws-progress.test.js +38 -0
  385. package/dist/src/thinking-ws-progress.test.js.map +1 -0
  386. package/dist/src/tool-json-result.d.ts +14 -0
  387. package/dist/src/tool-json-result.d.ts.map +1 -0
  388. package/dist/src/tool-json-result.js +20 -0
  389. package/dist/src/tool-json-result.js.map +1 -0
  390. package/dist/src/turn/turn-agent-event-subscription.d.ts.map +1 -1
  391. package/dist/src/turn/turn-agent-event-subscription.js +14 -0
  392. package/dist/src/turn/turn-agent-event-subscription.js.map +1 -1
  393. package/dist/src/turn-deliver-buffer.d.ts +60 -0
  394. package/dist/src/turn-deliver-buffer.d.ts.map +1 -0
  395. package/dist/src/turn-deliver-buffer.js +133 -0
  396. package/dist/src/turn-deliver-buffer.js.map +1 -0
  397. package/dist/src/turn-deliver-buffer.test.d.ts +2 -0
  398. package/dist/src/turn-deliver-buffer.test.d.ts.map +1 -0
  399. package/dist/src/turn-deliver-buffer.test.js +184 -0
  400. package/dist/src/turn-deliver-buffer.test.js.map +1 -0
  401. package/dist/src/types.d.ts +386 -0
  402. package/dist/src/types.d.ts.map +1 -0
  403. package/dist/src/types.js +32 -0
  404. package/dist/src/types.js.map +1 -0
  405. package/dist/src/user-facing-errors.d.ts +32 -0
  406. package/dist/src/user-facing-errors.d.ts.map +1 -0
  407. package/dist/src/user-facing-errors.js +120 -0
  408. package/dist/src/user-facing-errors.js.map +1 -0
  409. package/dist/src/user-facing-errors.test.d.ts +2 -0
  410. package/dist/src/user-facing-errors.test.d.ts.map +1 -0
  411. package/dist/src/user-facing-errors.test.js +102 -0
  412. package/dist/src/user-facing-errors.test.js.map +1 -0
  413. package/dist/src/workspace/nas-volumes.test.js +3 -2
  414. package/dist/src/workspace/nas-volumes.test.js.map +1 -1
  415. package/dist/src/ws-inbound-schema.d.ts +14 -0
  416. package/dist/src/ws-inbound-schema.d.ts.map +1 -0
  417. package/dist/src/ws-inbound-schema.js +67 -0
  418. package/dist/src/ws-inbound-schema.js.map +1 -0
  419. package/dist/src/ws-run-event-unmapped.d.ts +10 -0
  420. package/dist/src/ws-run-event-unmapped.d.ts.map +1 -0
  421. package/dist/src/ws-run-event-unmapped.js +16 -0
  422. package/dist/src/ws-run-event-unmapped.js.map +1 -0
  423. package/dist/src/ws-run-event-unmapped.test.d.ts +2 -0
  424. package/dist/src/ws-run-event-unmapped.test.d.ts.map +1 -0
  425. package/dist/src/ws-run-event-unmapped.test.js +15 -0
  426. package/dist/src/ws-run-event-unmapped.test.js.map +1 -0
  427. package/openclaw.plugin.json +30 -30
  428. package/package.json +83 -83
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-run-event.test.js","sourceRoot":"","sources":["../../src/action-run-event.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,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,MAAM,EAAE,UAAU,EAAE;SACtD,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { PlanOrigin } from "@xgjktech/xg-openclaw-shared";
2
+ /** 与 xg-harness-tools 的 ActionDispatchEvent 保持兼容。
3
+ *
4
+ * shared 包 0.2.2 尚未导出 action store;因此这里仅实现 IM 所需的只读 get,
5
+ * 直接读取同一个 SQLite 文件的 actions.doc JSON,绝不创建表或写库。
6
+ */
7
+ export interface ActionDispatchEvent {
8
+ eventId: string;
9
+ event: "action_dispatch";
10
+ action: string;
11
+ topic?: string;
12
+ target: string;
13
+ version: number;
14
+ status: "completed" | "running" | "pending" | "failed";
15
+ scopeControl?: {
16
+ activeSessionOnly?: boolean;
17
+ };
18
+ payload: {
19
+ data: Record<string, unknown>;
20
+ };
21
+ timestamp: string;
22
+ origin?: PlanOrigin;
23
+ }
24
+ export declare function setActionStateDir(dir: string): void;
25
+ /** 按 eventId 反查权威 action。缺库、旧库、畸形数据和读取异常均降级为 undefined。 */
26
+ export declare function getActionById(eventId: string): ActionDispatchEvent | undefined;
27
+ //# sourceMappingURL=action-store-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-store-access.d.ts","sourceRoot":"","sources":["../../src/action-store-access.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACvD,YAAY,CAAC,EAAE;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/C,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;CACvB;AAQD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAKnD;AAwCD,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAkB9E"}
@@ -0,0 +1,74 @@
1
+ import { DatabaseSync } from "node:sqlite";
2
+ import { resolvePlanDbPath } from "@xgjktech/xg-openclaw-shared";
3
+ const LOG_PREFIX = "[xg_cwork_im] [action-store]";
4
+ let stateDir;
5
+ let db;
6
+ let warnedNoStateDir = false;
7
+ export function setActionStateDir(dir) {
8
+ stateDir = dir;
9
+ db?.close();
10
+ db = undefined;
11
+ warnedNoStateDir = false;
12
+ }
13
+ function getDb() {
14
+ if (db)
15
+ return db;
16
+ if (!stateDir) {
17
+ if (!warnedNoStateDir) {
18
+ console.warn(`${LOG_PREFIX} stateDir 未设置,无法打开 action 库`);
19
+ warnedNoStateDir = true;
20
+ }
21
+ return undefined;
22
+ }
23
+ let dbPath = "<unresolved>";
24
+ try {
25
+ dbPath = resolvePlanDbPath(stateDir);
26
+ db = new DatabaseSync(dbPath, { readOnly: true });
27
+ db.exec("PRAGMA busy_timeout = 5000;");
28
+ return db;
29
+ }
30
+ catch (cause) {
31
+ console.warn(`${LOG_PREFIX} 打开 action 库失败 dbPath=${dbPath} 原因=${String(cause)}`);
32
+ return undefined;
33
+ }
34
+ }
35
+ function isActionDispatchEvent(value) {
36
+ if (typeof value !== "object" || value === null)
37
+ return false;
38
+ const event = value;
39
+ const payload = event.payload;
40
+ return typeof event.eventId === "string" && event.eventId.trim() !== ""
41
+ && event.event === "action_dispatch"
42
+ && typeof event.action === "string" && event.action.trim() !== ""
43
+ && typeof event.target === "string" && event.target.trim() !== ""
44
+ && typeof event.version === "number" && Number.isFinite(event.version) && event.version > 0
45
+ && ["completed", "running", "pending", "failed"].includes(event.status)
46
+ && typeof event.timestamp === "string" && event.timestamp.trim() !== ""
47
+ && typeof payload === "object" && payload !== null
48
+ && typeof payload.data === "object"
49
+ && payload.data !== null;
50
+ }
51
+ /** 按 eventId 反查权威 action。缺库、旧库、畸形数据和读取异常均降级为 undefined。 */
52
+ export function getActionById(eventId) {
53
+ const handle = getDb();
54
+ if (!handle)
55
+ return undefined;
56
+ try {
57
+ const row = handle.prepare("SELECT doc FROM actions WHERE event_id = ?").get(eventId);
58
+ if (!row || typeof row.doc !== "string")
59
+ return undefined;
60
+ const action = JSON.parse(row.doc);
61
+ if (!isActionDispatchEvent(action)) {
62
+ console.warn(`${LOG_PREFIX} action 文档不符合契约 eventId=${eventId}`);
63
+ return undefined;
64
+ }
65
+ return action;
66
+ }
67
+ catch (cause) {
68
+ console.warn(`${LOG_PREFIX} 读取 action 失败 eventId=${eventId} 原因=${String(cause)}`);
69
+ db?.close();
70
+ db = undefined;
71
+ return undefined;
72
+ }
73
+ }
74
+ //# sourceMappingURL=action-store-access.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-store-access.js","sourceRoot":"","sources":["../../src/action-store-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAsBjE,MAAM,UAAU,GAAG,8BAA8B,CAAC;AAElD,IAAI,QAA4B,CAAC;AACjC,IAAI,EAA4B,CAAC;AACjC,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAE7B,MAAM,UAAU,iBAAiB,CAAC,GAAW;IACzC,QAAQ,GAAG,GAAG,CAAC;IACf,EAAE,EAAE,KAAK,EAAE,CAAC;IACZ,EAAE,GAAG,SAAS,CAAC;IACf,gBAAgB,GAAG,KAAK,CA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ACb,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,yBAAyB,OAAO,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClF,EAAE,EAAE,KAAK,EAAE,CAAC;QACZ,EAAE,GAAG,SAAS,CAAC;QACf,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { ImStreamClient } from "./connection.js";
2
+ export interface ActiveRound {
3
+ roundKey: string;
4
+ accountId: string;
5
+ groupId: string;
6
+ agentId: string;
7
+ sessionKey: string;
8
+ replyToMsgId: string;
9
+ generation: number;
10
+ streamClient: ImStreamClient;
11
+ startedAt: number;
12
+ expiresAt: number;
13
+ interrupted: boolean;
14
+ }
15
+ export declare const buildRoundKey: (accountId: string, groupId: string) => string;
16
+ export declare function registerActiveRound(params: {
17
+ accountId: string;
18
+ groupId: string;
19
+ agentId: string;
20
+ sessionKey: string;
21
+ replyToMsgId: string;
22
+ streamClient: ImStreamClient;
23
+ now?: number;
24
+ }): ActiveRound;
25
+ export declare function findActiveRoundForSubagent(groupId: string, now?: number): ActiveRound | undefined;
26
+ export declare function prepareActiveRoundInterrupt(accountId: string, groupId: string, now?: number): ActiveRound | undefined;
27
+ export declare function completeActiveRound(roundKey: string, generation: number): boolean;
28
+ export declare function __resetActiveRoundRegistryForTests(): void;
29
+ //# sourceMappingURL=active-round-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-round-registry.d.ts","sourceRoot":"","sources":["../../src/active-round-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItD,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,cAAc,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACxB;AAKD,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,EAAE,SAAS,MAAM,KAAG,MACI,CAAC;AAQxE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,cAAc,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,WAAW,CAqBd;AAED,wBAAgB,0BAA0B,CACtC,OAAO,EAAE,MAAM,EACf,GAAG,SAAa,GACjB,WAAW,GAAG,SAAS,CAWzB;AAED,wBAAgB,2BAA2B,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,GAAG,SAAa,GACjB,WAAW,GAAG,SAAS,CAMzB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAKjF;AAED,wBAAgB,kCAAkC,IAAI,IAAI,CAGzD"}
@@ -0,0 +1,60 @@
1
+ const ACTIVE_ROUND_TTL_MS = 30 * 60 * 1000;
2
+ const rounds = new Map();
3
+ const generations = new Map();
4
+ export const buildRoundKey = (accountId, groupId) => `${String(accountId || "").trim()}:${String(groupId || "").trim()}`;
5
+ function pruneExpired(now = Date.now()) {
6
+ for (const [roundKey, round] of rounds) {
7
+ if (round.expiresAt <= now)
8
+ rounds.delete(roundKey);
9
+ }
10
+ }
11
+ export function registerActiveRound(params) {
12
+ const now = params.now ?? Date.now();
13
+ pruneExpired(now);
14
+ const roundKey = buildRoundKey(params.accountId, params.groupId);
15
+ const generation = (generations.get(roundKey) ?? 0) + 1;
16
+ generations.set(roundKey, generation);
17
+ const round = {
18
+ roundKey,
19
+ accountId: params.accountId,
20
+ groupId: params.groupId,
21
+ agentId: params.agentId,
22
+ sessionKey: params.sessionKey,
23
+ replyToMsgId: params.replyToMsgId,
24
+ generation,
25
+ streamClient: params.streamClient,
26
+ startedAt: now,
27
+ expiresAt: now + ACTIVE_ROUND_TTL_MS,
28
+ interrupted: false,
29
+ };
30
+ rounds.set(roundKey, round);
31
+ return round;
32
+ }
33
+ export function findActiveRoundForSubagent(groupId, now = Date.now()) {
34
+ pruneExpired(now);
35
+ const matches = Array.from(rounds.values()).filter((round) => !round.interrupted && round.groupId === groupId);
36
+ if (matches.length > 1) {
37
+ console.warn(`[xg_cwork_im] [subagent] ambiguous active round groupId=${groupId}; monitoring rejected`);
38
+ }
39
+ return matches.length === 1 ? matches[0] : undefined;
40
+ }
41
+ export function prepareActiveRoundInterrupt(accountId, groupId, now = Date.now()) {
42
+ pruneExpired(now);
43
+ const round = rounds.get(buildRoundKey(accountId, groupId));
44
+ if (!round || round.interrupted)
45
+ return undefined;
46
+ round.interrupted = true;
47
+ return round;
48
+ }
49
+ export function completeActiveRound(roundKey, generation) {
50
+ const current = rounds.get(roundKey);
51
+ if (!current || current.generation !== generation)
52
+ return false;
53
+ rounds.delete(roundKey);
54
+ return true;
55
+ }
56
+ export function __resetActiveRoundRegistryForTests() {
57
+ rounds.clear();
58
+ generations.clear();
59
+ }
60
+ //# sourceMappingURL=active-round-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-round-registry.js","sourceRoot":"","sources":["../../src/active-round-registry.ts"],"names":[],"mappings":"AAEA,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAgB3C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC9C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,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AM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxB,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,kCAAkC;IAC9C,MAAM,CAAC,KAAK,EAAE,CAAC;IACf,WAAW,CAAC,KAAK,EAAE,CAAC;AACxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=active-round-registry.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-round-registry.test.d.ts","sourceRoot":"","sources":["../../src/active-round-registry.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import assert from "node:assert/strict";
2
+ import { afterEach, describe, it } from "node:test";
3
+ import { __resetActiveRoundRegistryForTests, completeActiveRound, findActiveRoundForSubagent, prepareActiveRoundInterrupt, registerActiveRound, } from "./active-round-registry.js";
4
+ const client = {};
5
+ afterEach(() => __resetActiveRoundRegistryForTests());
6
+ describe("active round registry", () => {
7
+ it("按 accountId:groupId 隔离,并用 generation 防止旧轮次误删新轮次", () => {
8
+ const first = registerActiveRound({
9
+ accountId: "account-a",
10
+ groupId: "group-1",
11
+ agentId: "main",
12
+ sessionKey: "session-a1",
13
+ replyToMsgId: "reply-a1",
14
+ streamClient: client,
15
+ });
16
+ const otherAccount = registerActiveRound({
17
+ accountId: "account-b",
18
+ groupId: "group-1",
19
+ agentId: "main",
20
+ sessionKey: "session-b1",
21
+ replyToMsgId: "reply-b1",
22
+ streamClient: client,
23
+ });
24
+ assert.equal(findActiveRoundForSubagent("group-1"), undefined);
25
+ assert.equal(prepareActiveRoundInterrupt("account-a", "group-1"), first);
26
+ assert.equal(prepareActiveRoundInterrupt("account-b", "group-1"), otherAccount);
27
+ const next = registerActiveRound({
28
+ accountId: "account-a",
29
+ groupId: "group-1",
30
+ agentId: "main",
31
+ sessionKey: "session-a2",
32
+ replyToMsgId: "reply-a2",
33
+ streamClient: client,
34
+ });
35
+ assert.equal(completeActiveRound(first.roundKey, first.generation), false);
36
+ assert.equal(prepareActiveRoundInterrupt("account-a", "group-1"), next);
37
+ });
38
+ it("超过 30 分钟的活动轮次不会再被 stop 命中", () => {
39
+ registerActiveRound({
40
+ accountId: "account-a",
41
+ groupId: "group-1",
42
+ agentId: "main",
43
+ sessionKey: "session-a1",
44
+ replyToMsgId: "reply-a1",
45
+ streamClient: client,
46
+ now: 1,
47
+ });
48
+ assert.equal(prepareActiveRoundInterrupt("account-a", "group-1", 30 * 60_000 + 2), undefined);
49
+ });
50
+ it("subagent 的目标 agentId 不影响按 groupId 命中唯一主轮次", () => {
51
+ const round = registerActiveRound({
52
+ accountId: "account-a",
53
+ groupId: "group-1",
54
+ agentId: "main",
55
+ sessionKey: "session-a1",
56
+ replyToMsgId: "reply-a1",
57
+ streamClient: client,
58
+ });
59
+ assert.equal(findActiveRoundForSubagent("group-1"), round);
60
+ });
61
+ });
62
+ //# sourceMappingURL=active-round-registry.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-round-registry.test.js","sourceRoot":"","sources":["../../src/active-round-registry.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACH,kCAAkC,EAClC,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,GAAG,EAAoB,CAAC;AAEpC,SAAS,CAAC,GAAG,EAAE,CAAC,kCAAkC,EAAE,CAAC,CAAC;AAEtD,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACvD,MAAM,KAAK,GAAG,mBAAmB,CAAC;YAC9B,SAAS,EAAE,WAAW;YACtB,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,YAAY;YACxB,YAAY,EAA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,2BAA2B,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,GAAG,MAAM,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAClG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACjD,MAAM,KAAK,GAAG,mBAAmB,CAAC;YAC9B,SAAS,EAAE,WAAW;YACtB,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,YAAY;YACxB,YAAY,EAAE,UAAU;YACxB,YAAY,EAAE,MAAM;SACvB,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,205 @@
1
+ /**
2
+ * robotMention.params.agentContext — 可选项目工作区 / NAS 挂载 + 知识库绑定 + 项目背景
3
+ */
4
+ import { z } from "zod";
5
+ export declare const nasVolumeSchema: z.ZodObject<{
6
+ realDir: z.ZodString;
7
+ dockerDir: z.ZodString;
8
+ mode: z.ZodEnum<["ro", "rw"]>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ realDir: string;
11
+ dockerDir: string;
12
+ mode: "ro" | "rw";
13
+ }, {
14
+ realDir: string;
15
+ dockerDir: string;
16
+ mode: "ro" | "rw";
17
+ }>;
18
+ export type NasVolume = z.infer<typeof nasVolumeSchema>;
19
+ /** 知识库空间 ID + 逻辑目录路径 */
20
+ declare const knowledgeBaseByPathSchema: z.ZodObject<{
21
+ projectId: z.ZodString;
22
+ folderPath: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ projectId: string;
25
+ folderPath: string;
26
+ }, {
27
+ projectId: string;
28
+ folderPath: string;
29
+ }>;
30
+ /** IM 常见:仅传知识库空间 ID(无 folderPath) */
31
+ declare const knowledgeBaseByProjectIdOnlySchema: z.ZodObject<{
32
+ projectId: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ projectId: string;
35
+ }, {
36
+ projectId: string;
37
+ }>;
38
+ export declare const agentContextKnowledgeBaseSchema: z.ZodUnion<[z.ZodObject<{
39
+ rootFileId: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ rootFileId: string;
42
+ }, {
43
+ rootFileId: string;
44
+ }>, z.ZodObject<{
45
+ projectId: z.ZodString;
46
+ folderPath: z.ZodString;
47
+ }, "strip", z.ZodTypeAny, {
48
+ projectId: string;
49
+ folderPath: string;
50
+ }, {
51
+ projectId: string;
52
+ folderPath: string;
53
+ }>, z.ZodObject<{
54
+ projectId: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ projectId: string;
57
+ }, {
58
+ projectId: string;
59
+ }>]>;
60
+ export type AgentContextKnowledgeBase = z.infer<typeof agentContextKnowledgeBaseSchema>;
61
+ /** 与 IM 后台约定的 `params.agentContext` 结构 */
62
+ export declare const robotMentionAgentContextSchema: z.ZodEffects<z.ZodObject<{
63
+ localRoot: z.ZodOptional<z.ZodObject<{
64
+ kind: z.ZodEnum<["workspace_relative", "host_absolute"]>;
65
+ path: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ kind: "workspace_relative" | "host_absolute";
68
+ path: string;
69
+ }, {
70
+ kind: "workspace_relative" | "host_absolute";
71
+ path: string;
72
+ }>>;
73
+ nasVolumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ realDir: z.ZodString;
75
+ dockerDir: z.ZodString;
76
+ mode: z.ZodEnum<["ro", "rw"]>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ realDir: string;
79
+ dockerDir: string;
80
+ mode: "ro" | "rw";
81
+ }, {
82
+ realDir: string;
83
+ dockerDir: string;
84
+ mode: "ro" | "rw";
85
+ }>, "many">>;
86
+ knowledgeBase: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
87
+ rootFileId: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ rootFileId: string;
90
+ }, {
91
+ rootFileId: string;
92
+ }>, z.ZodObject<{
93
+ projectId: z.ZodString;
94
+ folderPath: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ projectId: string;
97
+ folderPath: string;
98
+ }, {
99
+ projectId: string;
100
+ folderPath: string;
101
+ }>, z.ZodObject<{
102
+ projectId: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ projectId: string;
105
+ }, {
106
+ projectId: string;
107
+ }>]>>;
108
+ background: z.ZodOptional<z.ZodString>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ localRoot?: {
111
+ kind: "workspace_relative" | "host_absolute";
112
+ path: string;
113
+ } | undefined;
114
+ nasVolumes?: {
115
+ realDir: string;
116
+ dockerDir: string;
117
+ mode: "ro" | "rw";
118
+ }[] | undefined;
119
+ knowledgeBase?: {
120
+ rootFileId: string;
121
+ } | {
122
+ projectId: string;
123
+ folderPath: string;
124
+ } | {
125
+ projectId: string;
126
+ } | undefined;
127
+ background?: string | undefined;
128
+ }, {
129
+ localRoot?: {
130
+ kind: "workspace_relative" | "host_absolute";
131
+ path: string;
132
+ } | undefined;
133
+ nasVolumes?: {
134
+ realDir: string;
135
+ dockerDir: string;
136
+ mode: "ro" | "rw";
137
+ }[] | undefined;
138
+ knowledgeBase?: {
139
+ rootFileId: string;
140
+ } | {
141
+ projectId: string;
142
+ folderPath: string;
143
+ } | {
144
+ projectId: string;
145
+ } | undefined;
146
+ background?: string | undefined;
147
+ }>, {
148
+ localRoot?: {
149
+ kind: "workspace_relative" | "host_absolute";
150
+ path: string;
151
+ } | undefined;
152
+ nasVolumes?: {
153
+ realDir: string;
154
+ dockerDir: string;
155
+ mode: "ro" | "rw";
156
+ }[] | undefined;
157
+ knowledgeBase?: {
158
+ rootFileId: string;
159
+ } | {
160
+ projectId: string;
161
+ folderPath: string;
162
+ } | {
163
+ projectId: string;
164
+ } | undefined;
165
+ background?: string | undefined;
166
+ }, {
167
+ localRoot?: {
168
+ kind: "workspace_relative" | "host_absolute";
169
+ path: string;
170
+ } | undefined;
171
+ nasVolumes?: {
172
+ realDir: string;
173
+ dockerDir: string;
174
+ mode: "ro" | "rw";
175
+ }[] | undefined;
176
+ knowledgeBase?: {
177
+ rootFileId: string;
178
+ } | {
179
+ projectId: string;
180
+ folderPath: string;
181
+ } | {
182
+ projectId: string;
183
+ } | undefined;
184
+ background?: string | undefined;
185
+ }>;
186
+ export type RobotMentionAgentContext = z.infer<typeof robotMentionAgentContextSchema>;
187
+ export type ParseRobotMentionAgentContextResult = {
188
+ agentContext?: RobotMentionAgentContext;
189
+ /** 被忽略的非法字段;仅用于日志诊断,不得阻断消息处理。 */
190
+ fatalError?: string;
191
+ /** knowledgeBase 存在但无法解析时被丢弃 */
192
+ knowledgeBaseDropped?: boolean;
193
+ knowledgeBaseDropReason?: string;
194
+ };
195
+ /**
196
+ * 解析 agentContext;knowledgeBase 非法时丢弃该字段,仍保留工作区上下文与 background。
197
+ */
198
+ export declare function parseRobotMentionAgentContextDetailed(params: unknown): ParseRobotMentionAgentContextResult;
199
+ export declare function parseRobotMentionAgentContext(params: unknown): RobotMentionAgentContext | undefined;
200
+ /** 判断 knowledgeBase 是否为 projectId + folderPath 形式 */
201
+ export declare function isKnowledgeBaseByPath(kb: AgentContextKnowledgeBase): kb is z.infer<typeof knowledgeBaseByPathSchema>;
202
+ /** 判断 knowledgeBase 是否仅有 projectId(无 folderPath / rootFileId) */
203
+ export declare function isKnowledgeBaseByProjectIdOnly(kb: AgentContextKnowledgeBase): kb is z.infer<typeof knowledgeBaseByProjectIdOnlySchema>;
204
+ export {};
205
+ //# sourceMappingURL=agent-context-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-context-types.d.ts","sourceRoot":"","sources":["../../src/agent-context-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH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AI,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAE1D"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * robotMention.params.agentContext — 可选项目工作区 / NAS 挂载 + 知识库绑定 + 项目背景
3
+ */
4
+ import { z } from "zod";
5
+ import { LOCAL_ROOT_KINDS } from "./project-path-normalize.js";
6
+ const localRootSchema = z.object({
7
+ kind: z.enum(LOCAL_ROOT_KINDS),
8
+ path: z.string().min(1),
9
+ });
10
+ export const nasVolumeSchema = z.object({
11
+ realDir: z.string().min(1).max(1024),
12
+ dockerDir: z.string().min(1).max(1024),
13
+ mode: z.enum(["ro", "rw"]),
14
+ });
15
+ /** 知识库目录 fileId(与 projectId 形式二选一) */
16
+ const knowledgeBaseByFileIdSchema = z.object({
17
+ rootFileId: z.string().min(1),
18
+ });
19
+ /** 知识库空间 ID + 逻辑目录路径 */
20
+ const knowledgeBaseByPathSchema = z.object({
21
+ projectId: z.string().min(1),
22
+ folderPath: z.string().min(1),
23
+ });
24
+ /** IM 常见:仅传知识库空间 ID(无 folderPath) */
25
+ const knowledgeBaseByProjectIdOnlySchema = z.object({
26
+ projectId: z.string().min(1),
27
+ });
28
+ export const agentContextKnowledgeBaseSchema = z.union([
29
+ knowledgeBaseByFileIdSchema,
30
+ knowledgeBaseByPathSchema,
31
+ knowledgeBaseByProjectIdOnlySchema,
32
+ ]);
33
+ /** 与 IM 后台约定的 `params.agentContext` 结构 */
34
+ export const robotMentionAgentContextSchema = z.object({
35
+ localRoot: localRootSchema.optional(),
36
+ nasVolumes: z.array(nasVolumeSchema).max(16).optional(),
37
+ knowledgeBase: agentContextKnowledgeBaseSchema.optional(),
38
+ background: z.string().optional(),
39
+ }).superRefine((value, ctx) => {
40
+ if (!value.localRoot && !value.nasVolumes?.length) {
41
+ ctx.addIssue({
42
+ code: z.ZodIssueCode.custom,
43
+ path: ["localRoot"],
44
+ message: "localRoot 与 nasVolumes 至少需要提供一个",
45
+ });
46
+ }
47
+ });
48
+ function formatZodIssue(err) {
49
+ const issue = err.issues[0];
50
+ const path = issue?.path?.length ? issue.path.join(".") : "agentContext";
51
+ return `${path}: ${issue?.message ?? err.message}`;
52
+ }
53
+ /**
54
+ * 解析 agentContext;knowledgeBase 非法时丢弃该字段,仍保留工作区上下文与 background。
55
+ */
56
+ export function parseRobotMentionAgentContextDetailed(params) {
57
+ if (params == null || typeof params !== "object") {
58
+ return {};
59
+ }
60
+ const raw = params.agentContext;
61
+ if (raw == null || typeof raw !== "object") {
62
+ return {};
63
+ }
64
+ const record = raw;
65
+ const droppedReasons = [];
66
+ const localRootParsed = record.localRoot == null ? undefined : localRootSchema.safeParse(record.localRoot);
67
+ if (localRootParsed && !localRootParsed.success) {
68
+ droppedReasons.push(formatZodIssue(localRootParsed.error));
69
+ }
70
+ const nasVolumes = [];
71
+ if (record.nasVolumes != null) {
72
+ if (!Array.isArray(record.nasVolumes)) {
73
+ droppedReasons.push("nasVolumes: Expected array");
74
+ }
75
+ else {
76
+ for (const [index, rawVolume] of record.nasVolumes.slice(0, 16).entries()) {
77
+ const parsed = nasVolumeSchema.safeParse(rawVolume);
78
+ if (parsed.success) {
79
+ nasVolumes.push(parsed.data);
80
+ }
81
+ else {
82
+ droppedReasons.push(`nasVolumes.${index}: ${formatZodIssue(parsed.error)}`);
83
+ }
84
+ }
85
+ if (record.nasVolumes.length > 16) {
86
+ droppedReasons.push("nasVolumes: 超过 16 项的部分已忽略");
87
+ }
88
+ }
89
+ }
90
+ // 保持旧逻辑:没有有效工作区来源时忽略整个 agentContext,但绝不阻断消息。
91
+ if (!localRootParsed?.success && nasVolumes.length === 0) {
92
+ return {
93
+ ...(droppedReasons.length > 0 ? { fatalError: droppedReasons.join("; ") } : {}),
94
+ };
95
+ }
96
+ let knowledgeBase;
97
+ let knowledgeBaseDropped = false;
98
+ let knowledgeBaseDropReason;
99
+ if (record.knowledgeBase != null) {
100
+ const kbParsed = agentContextKnowledgeBaseSchema.safeParse(record.knowledgeBase);
101
+ if (kbParsed.success) {
102
+ knowledgeBase = kbParsed.data;
103
+ }
104
+ else {
105
+ knowledgeBaseDropped = true;
106
+ knowledgeBaseDropReason = formatZodIssue(kbParsed.error);
107
+ }
108
+ }
109
+ const background = typeof record.background === "string" ? record.background : undefined;
110
+ return {
111
+ agentContext: {
112
+ ...(localRootParsed?.success ? { localRoot: localRootParsed.data } : {}),
113
+ ...(nasVolumes.length > 0 ? { nasVolumes } : {}),
114
+ ...(knowledgeBase ? { knowledgeBase } : {}),
115
+ ...(background !== undefined ? { background } : {}),
116
+ },
117
+ ...(droppedReasons.length > 0 ? { fatalError: droppedReasons.join("; ") } : {}),
118
+ ...(knowledgeBaseDropped ? { knowledgeBaseDropped, knowledgeBaseDropReason } : {}),
119
+ };
120
+ }
121
+ export function parseRobotMentionAgentContext(params) {
122
+ return parseRobotMentionAgentContextDetailed(params).agentContext;
123
+ }
124
+ /** 判断 knowledgeBase 是否为 projectId + folderPath 形式 */
125
+ export function isKnowledgeBaseByPath(kb) {
126
+ return "projectId" in kb && "folderPath" in kb;
127
+ }
128
+ /** 判断 knowledgeBase 是否仅有 projectId(无 folderPath / rootFileId) */
129
+ export function isKnowledgeBaseByProjectIdOnly(kb) {
130
+ return "projectId" in kb && !("folderPath" in kb) && !("rootFileId" in kb);
131
+ }
132
+ //# sourceMappingURL=agent-context-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-context-types.js","sourceRoot":"","sources":["../../src/agent-context-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC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