dsh-botgroup 0.6.7 → 0.7.1

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 (478) hide show
  1. package/README.en.md +60 -122
  2. package/README.md +59 -121
  3. package/lib/client.js +11837 -7685
  4. package/lib/client.js.map +4 -4
  5. package/lib/host/activity/first-user.js +1 -1
  6. package/lib/host/activity/preview.js +1 -1
  7. package/lib/host/activity/remote.js +1 -1
  8. package/lib/host/activity/tracker.js +1 -1
  9. package/lib/host/automation/coordinator.js +1 -1
  10. package/lib/host/automation/delivery.js +1 -1
  11. package/lib/host/automation/errors.js +1 -1
  12. package/lib/host/automation/index.js +1 -1
  13. package/lib/host/automation/remote.js +1 -1
  14. package/lib/host/automation/store.js +1 -1
  15. package/lib/host/bot-context.d.ts +3 -0
  16. package/lib/host/bot-context.js +97 -22
  17. package/lib/host/bot-context.js.map +1 -1
  18. package/lib/host/capabilities/platform.js +1 -1
  19. package/lib/host/capabilities/remote.js +1 -1
  20. package/lib/host/capabilities/service.js +1 -1
  21. package/lib/host/collaboration/remote.js +1 -1
  22. package/lib/host/collaboration/service.js +1 -1
  23. package/lib/host/common/integration-stores.js +1 -1
  24. package/lib/host/common/native-ambient-source.d.ts +7 -0
  25. package/lib/host/common/native-ambient-source.js +15 -0
  26. package/lib/host/common/native-ambient-source.js.map +1 -0
  27. package/lib/host/common/operations.js +1 -1
  28. package/lib/host/common/subagent-activation.d.ts +7 -0
  29. package/lib/host/common/subagent-activation.js +10 -0
  30. package/lib/host/common/subagent-activation.js.map +1 -0
  31. package/lib/host/composer.js +1 -1
  32. package/lib/host/connectors/remote.js +1 -1
  33. package/lib/host/connectors/service.js +1 -1
  34. package/lib/host/data-flow/agent-binding.js +1 -1
  35. package/lib/host/data-flow/connector-boundary.js +1 -1
  36. package/lib/host/data-flow/delegation.js +4 -3
  37. package/lib/host/data-flow/delegation.js.map +1 -1
  38. package/lib/host/data-flow/egress.d.ts +6 -0
  39. package/lib/host/data-flow/egress.js +32 -2
  40. package/lib/host/data-flow/egress.js.map +1 -1
  41. package/lib/host/data-flow/grants.js +1 -1
  42. package/lib/host/data-flow/graph-capability.js +1 -1
  43. package/lib/host/data-flow/labels.js +3 -2
  44. package/lib/host/data-flow/labels.js.map +1 -1
  45. package/lib/host/data-flow/lineage.js +3 -2
  46. package/lib/host/data-flow/lineage.js.map +1 -1
  47. package/lib/host/data-flow/managed-copies.d.ts +11 -3
  48. package/lib/host/data-flow/managed-copies.js +1 -1
  49. package/lib/host/data-flow/native-policy.js +1 -1
  50. package/lib/host/data-flow/outlets.d.ts +66 -1
  51. package/lib/host/data-flow/outlets.js +61 -2
  52. package/lib/host/data-flow/outlets.js.map +1 -1
  53. package/lib/host/data-flow/tool-guard.js +12 -3
  54. package/lib/host/data-flow/tool-guard.js.map +1 -1
  55. package/lib/host/delegate/continuation.js +1 -1
  56. package/lib/host/delegate/guard.js +9 -5
  57. package/lib/host/delegate/guard.js.map +1 -1
  58. package/lib/host/delegate/tool.js +29 -2
  59. package/lib/host/delegate/tool.js.map +1 -1
  60. package/lib/host/errors.js +1 -1
  61. package/lib/host/groups/concurrent.js +25 -14
  62. package/lib/host/groups/concurrent.js.map +1 -1
  63. package/lib/host/groups/context-flow.d.ts +28 -0
  64. package/lib/host/groups/context-flow.js +127 -0
  65. package/lib/host/groups/context-flow.js.map +1 -0
  66. package/lib/host/groups/data-flow.d.ts +9 -3
  67. package/lib/host/groups/data-flow.js +81 -19
  68. package/lib/host/groups/data-flow.js.map +1 -1
  69. package/lib/host/groups/export-pending.d.ts +5 -0
  70. package/lib/host/groups/export-pending.js +36 -0
  71. package/lib/host/groups/export-pending.js.map +1 -0
  72. package/lib/host/groups/export-review.d.ts +35 -0
  73. package/lib/host/groups/export-review.js +235 -0
  74. package/lib/host/groups/export-review.js.map +1 -0
  75. package/lib/host/groups/export-settings.d.ts +94 -0
  76. package/lib/host/groups/export-settings.js +78 -0
  77. package/lib/host/groups/export-settings.js.map +1 -0
  78. package/lib/host/groups/failure.js +3 -1
  79. package/lib/host/groups/failure.js.map +1 -1
  80. package/lib/host/groups/members.d.ts +105 -2
  81. package/lib/host/groups/members.js +47 -4
  82. package/lib/host/groups/members.js.map +1 -1
  83. package/lib/host/groups/memory-status.d.ts +7 -0
  84. package/lib/host/groups/memory-status.js +66 -0
  85. package/lib/host/groups/memory-status.js.map +1 -0
  86. package/lib/host/groups/messages.d.ts +90 -0
  87. package/lib/host/groups/messages.js +20 -8
  88. package/lib/host/groups/messages.js.map +1 -1
  89. package/lib/host/groups/model-selection.js +1 -1
  90. package/lib/host/groups/model.d.ts +95 -0
  91. package/lib/host/groups/model.js +21 -2
  92. package/lib/host/groups/model.js.map +1 -1
  93. package/lib/host/groups/owner-follow-up.js +1 -1
  94. package/lib/host/groups/recall-sessions.d.ts +8 -0
  95. package/lib/host/groups/recall-sessions.js +20 -1
  96. package/lib/host/groups/recall-sessions.js.map +1 -1
  97. package/lib/host/groups/recall-tool.js +1 -1
  98. package/lib/host/groups/recall.d.ts +6 -2
  99. package/lib/host/groups/recall.js +63 -16
  100. package/lib/host/groups/recall.js.map +1 -1
  101. package/lib/host/groups/remote.d.ts +531 -0
  102. package/lib/host/groups/remote.js +81 -1
  103. package/lib/host/groups/remote.js.map +1 -1
  104. package/lib/host/groups/root-guard.js +1 -1
  105. package/lib/host/groups/roots.js +1 -1
  106. package/lib/host/groups/round-robin.js +1 -1
  107. package/lib/host/groups/routing.d.ts +29 -1
  108. package/lib/host/groups/routing.js +34 -3
  109. package/lib/host/groups/routing.js.map +1 -1
  110. package/lib/host/groups/service.d.ts +662 -4
  111. package/lib/host/groups/service.js +96 -9
  112. package/lib/host/groups/service.js.map +1 -1
  113. package/lib/host/groups/state.d.ts +229 -2
  114. package/lib/host/groups/state.js +32 -3
  115. package/lib/host/groups/state.js.map +1 -1
  116. package/lib/host/groups/supergroup-admission.d.ts +87 -0
  117. package/lib/host/groups/supergroup-admission.js +99 -0
  118. package/lib/host/groups/supergroup-admission.js.map +1 -0
  119. package/lib/host/groups/team-recipes.d.ts +125 -0
  120. package/lib/host/groups/team-recipes.js +100 -0
  121. package/lib/host/groups/team-recipes.js.map +1 -0
  122. package/lib/host/groups/turn-runner.d.ts +81 -0
  123. package/lib/host/groups/turn-runner.js +88 -18
  124. package/lib/host/groups/turn-runner.js.map +1 -1
  125. package/lib/host/groups/turns.d.ts +114 -1
  126. package/lib/host/groups/turns.js +67 -20
  127. package/lib/host/groups/turns.js.map +1 -1
  128. package/lib/host/groups/worker-tool.d.ts +8 -1
  129. package/lib/host/groups/worker-tool.js +87 -9
  130. package/lib/host/groups/worker-tool.js.map +1 -1
  131. package/lib/host/home.js +1 -1
  132. package/lib/host/im/service.js +1 -1
  133. package/lib/host/index.d.ts +2 -1
  134. package/lib/host/index.js +30 -2
  135. package/lib/host/index.js.map +1 -1
  136. package/lib/host/live-persona.js +1 -1
  137. package/lib/host/main-session.d.ts +5 -2
  138. package/lib/host/main-session.js +118 -12
  139. package/lib/host/main-session.js.map +1 -1
  140. package/lib/host/memory/admission.d.ts +1 -0
  141. package/lib/host/memory/admission.js +24 -1
  142. package/lib/host/memory/admission.js.map +1 -1
  143. package/lib/host/memory/auto-share.js +1 -1
  144. package/lib/host/memory/confirmation.d.ts +21 -5
  145. package/lib/host/memory/confirmation.js +1 -1
  146. package/lib/host/memory/conflicts.js +1 -1
  147. package/lib/host/memory/consolidation-config.d.ts +12 -0
  148. package/lib/host/memory/consolidation-config.js +13 -0
  149. package/lib/host/memory/consolidation-config.js.map +1 -0
  150. package/lib/host/memory/consolidation-native.d.ts +14 -0
  151. package/lib/host/memory/consolidation-native.js +72 -0
  152. package/lib/host/memory/consolidation-native.js.map +1 -0
  153. package/lib/host/memory/consolidation-source.d.ts +4 -0
  154. package/lib/host/memory/consolidation-source.js +25 -0
  155. package/lib/host/memory/consolidation-source.js.map +1 -0
  156. package/lib/host/memory/consolidation.d.ts +80 -0
  157. package/lib/host/memory/consolidation.js +270 -0
  158. package/lib/host/memory/consolidation.js.map +1 -0
  159. package/lib/host/memory/context.js +1 -1
  160. package/lib/host/memory/domain-v2.d.ts +53 -10
  161. package/lib/host/memory/domain-v2.js +5 -3
  162. package/lib/host/memory/domain-v2.js.map +1 -1
  163. package/lib/host/memory/facade.d.ts +147 -3
  164. package/lib/host/memory/facade.js +113 -3
  165. package/lib/host/memory/facade.js.map +1 -1
  166. package/lib/host/memory/forget-preview.js +1 -1
  167. package/lib/host/memory/forget-runner.js +1 -1
  168. package/lib/host/memory/forget-service.js +1 -1
  169. package/lib/host/memory/history-proof.js +1 -1
  170. package/lib/host/memory/history.js +1 -1
  171. package/lib/host/memory/layout-upgrade.js +23 -6
  172. package/lib/host/memory/layout-upgrade.js.map +1 -1
  173. package/lib/host/memory/migration.js +1 -1
  174. package/lib/host/memory/op-log.js +1 -1
  175. package/lib/host/memory/open-v2.js +1 -1
  176. package/lib/host/memory/owner-lease.js +1 -1
  177. package/lib/host/memory/persistent-map.js +1 -1
  178. package/lib/host/memory/port.js +1 -1
  179. package/lib/host/memory/preserve-inbox.js +1 -1
  180. package/lib/host/memory/projection.js +6 -1
  181. package/lib/host/memory/projection.js.map +1 -1
  182. package/lib/host/memory/prompt.js +1 -1
  183. package/lib/host/memory/query.js +1 -1
  184. package/lib/host/memory/quota-replay.js +1 -1
  185. package/lib/host/memory/quota.d.ts +21 -5
  186. package/lib/host/memory/quota.js +1 -1
  187. package/lib/host/memory/remote.d.ts +218 -0
  188. package/lib/host/memory/remote.js +41 -1
  189. package/lib/host/memory/remote.js.map +1 -1
  190. package/lib/host/memory/retrieval-config.js +1 -1
  191. package/lib/host/memory/retrieval-rank.js +1 -1
  192. package/lib/host/memory/retrieval-text.js +1 -1
  193. package/lib/host/memory/root-instructions.js +1 -1
  194. package/lib/host/memory/secrets.js +1 -1
  195. package/lib/host/memory/service.js +1 -1
  196. package/lib/host/memory/shards.js +1 -1
  197. package/lib/host/memory/store-v2.js +5 -2
  198. package/lib/host/memory/store-v2.js.map +1 -1
  199. package/lib/host/memory/temporal.js +3 -2
  200. package/lib/host/memory/temporal.js.map +1 -1
  201. package/lib/host/memory/tool-guidance.js +1 -1
  202. package/lib/host/memory/tools.js +1 -1
  203. package/lib/host/memory/trusted-ingress.js +1 -1
  204. package/lib/host/memory/version.d.ts +20 -4
  205. package/lib/host/memory/version.js +1 -1
  206. package/lib/host/messaging/config.js +1 -1
  207. package/lib/host/messaging/core.d.ts +11 -3
  208. package/lib/host/messaging/core.js +4 -3
  209. package/lib/host/messaging/core.js.map +1 -1
  210. package/lib/host/messaging/delivery.js +3 -1
  211. package/lib/host/messaging/delivery.js.map +1 -1
  212. package/lib/host/messaging/evidence.js +1 -1
  213. package/lib/host/messaging/interrupt.js +1 -1
  214. package/lib/host/messaging/recovery.js +1 -1
  215. package/lib/host/messaging/remote.d.ts +1 -1
  216. package/lib/host/messaging/remote.js +1 -1
  217. package/lib/host/messaging/reply-routing.js +1 -1
  218. package/lib/host/messaging/safety.js +8 -3
  219. package/lib/host/messaging/safety.js.map +1 -1
  220. package/lib/host/messaging/scoped-projection.d.ts +43 -0
  221. package/lib/host/messaging/scoped-projection.js +136 -0
  222. package/lib/host/messaging/scoped-projection.js.map +1 -0
  223. package/lib/host/messaging/service.d.ts +5 -2
  224. package/lib/host/messaging/service.js +16 -6
  225. package/lib/host/messaging/service.js.map +1 -1
  226. package/lib/host/messaging/store.d.ts +45 -13
  227. package/lib/host/messaging/store.js +4 -3
  228. package/lib/host/messaging/store.js.map +1 -1
  229. package/lib/host/messaging/tool.js +24 -5
  230. package/lib/host/messaging/tool.js.map +1 -1
  231. package/lib/host/messaging/wake.js +3 -3
  232. package/lib/host/messaging/wake.js.map +1 -1
  233. package/lib/host/native-schedule/outcomes.js +1 -1
  234. package/lib/host/native-schedule/service.js +10 -7
  235. package/lib/host/native-schedule/service.js.map +1 -1
  236. package/lib/host/notifications/data-flow.js +1 -1
  237. package/lib/host/notifications/remote.js +1 -1
  238. package/lib/host/notifications/service.js +1 -1
  239. package/lib/host/notifications/time.js +1 -1
  240. package/lib/host/notifications/tool.js +1 -1
  241. package/lib/host/onboarding/coordinator.js +1 -1
  242. package/lib/host/onboarding/guard.js +1 -1
  243. package/lib/host/proactive/auto-admission.js +1 -1
  244. package/lib/host/proactive/config.js +1 -1
  245. package/lib/host/proactive/coordinator-client.js +1 -1
  246. package/lib/host/proactive/deferred-notices.js +1 -1
  247. package/lib/host/proactive/execution-prompt.js +1 -1
  248. package/lib/host/proactive/execution.js +1 -1
  249. package/lib/host/proactive/executors/command.js +1 -1
  250. package/lib/host/proactive/executors/json-command-bridge-entry.js +1 -1
  251. package/lib/host/proactive/executors/json-command-bridge.js +1 -1
  252. package/lib/host/proactive/executors/loopback.js +1 -1
  253. package/lib/host/proactive/feedback-workflow.d.ts +3 -0
  254. package/lib/host/proactive/feedback-workflow.js +8 -3
  255. package/lib/host/proactive/feedback-workflow.js.map +1 -1
  256. package/lib/host/proactive/feedback.js +1 -1
  257. package/lib/host/proactive/follow-up-events.d.ts +2 -0
  258. package/lib/host/proactive/follow-up-events.js +63 -4
  259. package/lib/host/proactive/follow-up-events.js.map +1 -1
  260. package/lib/host/proactive/follow-up-facts.js +1 -1
  261. package/lib/host/proactive/follow-up-tool.js +3 -3
  262. package/lib/host/proactive/follow-up-tool.js.map +1 -1
  263. package/lib/host/proactive/governance-artifacts.js +1 -1
  264. package/lib/host/proactive/governance-service.js +1 -1
  265. package/lib/host/proactive/group-budget.js +1 -1
  266. package/lib/host/proactive/group-follow-up.js +1 -1
  267. package/lib/host/proactive/group-repair.js +1 -1
  268. package/lib/host/proactive/index.js +1 -1
  269. package/lib/host/proactive/lifecycle.js +1 -1
  270. package/lib/host/proactive/method-evaluation.js +1 -1
  271. package/lib/host/proactive/method-package.js +1 -1
  272. package/lib/host/proactive/method-skill.js +1 -1
  273. package/lib/host/proactive/model-budget.js +1 -1
  274. package/lib/host/proactive/notice-pump.js +1 -1
  275. package/lib/host/proactive/notification-bridge.js +1 -1
  276. package/lib/host/proactive/read-query.js +1 -1
  277. package/lib/host/proactive/remote.d.ts +169 -0
  278. package/lib/host/proactive/remote.js +1 -1
  279. package/lib/host/proactive/repair.js +1 -1
  280. package/lib/host/proactive/result-journal.js +1 -1
  281. package/lib/host/proactive/service.d.ts +1729 -51
  282. package/lib/host/proactive/service.js +48 -37
  283. package/lib/host/proactive/service.js.map +1 -1
  284. package/lib/host/proactive/session-history.d.ts +3 -0
  285. package/lib/host/proactive/session-history.js +21 -0
  286. package/lib/host/proactive/session-history.js.map +1 -0
  287. package/lib/host/proactive/setup.js +1 -1
  288. package/lib/host/proactive/sources/ci-feed.js +1 -1
  289. package/lib/host/proactive/sources/ci.js +1 -1
  290. package/lib/host/proactive/sources/github-ci.js +1 -1
  291. package/lib/host/proactive/task-cost.js +1 -1
  292. package/lib/host/proactive/wire.js +1 -1
  293. package/lib/host/proactive/work-continuation.js +1 -1
  294. package/lib/host/proactive/workspace-process.js +1 -1
  295. package/lib/host/proactive/workspace-repair.js +1 -1
  296. package/lib/host/reference-memory/backend.js +1 -1
  297. package/lib/host/reference-memory/cleanup-files.js +1 -1
  298. package/lib/host/reference-memory/copies.js +1 -1
  299. package/lib/host/reference-memory/files.js +1 -1
  300. package/lib/host/reference-memory/model.js +1 -1
  301. package/lib/host/reference-memory/service.js +1 -1
  302. package/lib/host/reference-memory/writer.js +1 -1
  303. package/lib/host/registry/identity.js +1 -1
  304. package/lib/host/registry/lifecycle.d.ts +4 -1
  305. package/lib/host/registry/lifecycle.js +3 -1
  306. package/lib/host/registry/lifecycle.js.map +1 -1
  307. package/lib/host/registry/mutations.js +1 -1
  308. package/lib/host/registry/presets.js +1 -1
  309. package/lib/host/registry/types.js +1 -1
  310. package/lib/host/registry-config.d.ts +5 -1
  311. package/lib/host/registry-config.js +11 -2
  312. package/lib/host/registry-config.js.map +1 -1
  313. package/lib/host/registry.d.ts +8 -0
  314. package/lib/host/registry.js +45 -4
  315. package/lib/host/registry.js.map +1 -1
  316. package/lib/host/shadow/budget.js +1 -1
  317. package/lib/host/shadow/config.js +1 -1
  318. package/lib/host/shadow/notification-adapter.js +1 -1
  319. package/lib/host/shadow/planner.js +1 -1
  320. package/lib/host/shadow/schedule-adapter.js +1 -1
  321. package/lib/host/shadow/service.js +1 -1
  322. package/lib/host/store.js +1 -1
  323. package/lib/host/stores/activity.js +1 -1
  324. package/lib/host/stores/bots.js +1 -1
  325. package/lib/host/stores/domain.js +1 -1
  326. package/lib/host/stores/memory.js +1 -1
  327. package/lib/host/supergroup/collaboration.d.ts +99 -0
  328. package/lib/host/supergroup/collaboration.js +362 -0
  329. package/lib/host/supergroup/collaboration.js.map +1 -0
  330. package/lib/host/supergroup/config.d.ts +15 -0
  331. package/lib/host/supergroup/config.js +34 -0
  332. package/lib/host/supergroup/config.js.map +1 -0
  333. package/lib/host/supergroup/input-capability.d.ts +4 -0
  334. package/lib/host/supergroup/input-capability.js +21 -0
  335. package/lib/host/supergroup/input-capability.js.map +1 -0
  336. package/lib/host/supergroup/recovery-view.d.ts +16 -0
  337. package/lib/host/supergroup/recovery-view.js +38 -0
  338. package/lib/host/supergroup/recovery-view.js.map +1 -0
  339. package/lib/host/supergroup/remote.d.ts +2064 -0
  340. package/lib/host/supergroup/remote.js +123 -0
  341. package/lib/host/supergroup/remote.js.map +1 -0
  342. package/lib/host/supergroup/service.d.ts +987 -0
  343. package/lib/host/supergroup/service.js +945 -0
  344. package/lib/host/supergroup/service.js.map +1 -0
  345. package/lib/host/supergroup/task-support.d.ts +266 -0
  346. package/lib/host/supergroup/task-support.js +323 -0
  347. package/lib/host/supergroup/task-support.js.map +1 -0
  348. package/lib/host/supergroup/tool.d.ts +4 -0
  349. package/lib/host/supergroup/tool.js +74 -0
  350. package/lib/host/supergroup/tool.js.map +1 -0
  351. package/lib/host/tools/bot-manage.js +7 -3
  352. package/lib/host/tools/bot-manage.js.map +1 -1
  353. package/lib/host/workspace/remote.js +1 -1
  354. package/lib/host/workspace/service.js +1 -1
  355. package/lib/index.d.ts +1 -1
  356. package/lib/index.js +1 -1
  357. package/lib/module-manifest.json +288 -258
  358. package/lib/proactive-coordinator/main.mjs +236 -25
  359. package/lib/proactive-coordinator/provenance.json +1 -1
  360. package/lib/shared/activity-preview.js +1 -1
  361. package/lib/shared/activity.js +1 -1
  362. package/lib/shared/automation-contract.js +1 -1
  363. package/lib/shared/automation.js +1 -1
  364. package/lib/shared/bot-brand.js +1 -1
  365. package/lib/shared/capabilities-contract.js +1 -1
  366. package/lib/shared/collaboration-contract.js +1 -1
  367. package/lib/shared/collaboration.js +1 -1
  368. package/lib/shared/connectors.js +1 -1
  369. package/lib/shared/data-flow.d.ts +1 -0
  370. package/lib/shared/data-flow.js +3 -1
  371. package/lib/shared/data-flow.js.map +1 -1
  372. package/lib/shared/eval-budget.js +1 -1
  373. package/lib/shared/group-export-review.d.ts +3 -0
  374. package/lib/shared/group-export-review.js +12 -0
  375. package/lib/shared/group-export-review.js.map +1 -0
  376. package/lib/shared/group-limits.d.ts +4 -0
  377. package/lib/shared/group-limits.js +6 -0
  378. package/lib/shared/group-limits.js.map +1 -0
  379. package/lib/shared/group-recall-reads.js +1 -1
  380. package/lib/shared/group-recall.js +1 -1
  381. package/lib/shared/groups-contract.d.ts +3002 -3
  382. package/lib/shared/groups-contract.js +25 -2
  383. package/lib/shared/groups-contract.js.map +1 -1
  384. package/lib/shared/groups.d.ts +317 -0
  385. package/lib/shared/groups.js +69 -8
  386. package/lib/shared/groups.js.map +1 -1
  387. package/lib/shared/identity.js +1 -1
  388. package/lib/shared/ids.js +1 -1
  389. package/lib/shared/integrations-contract.js +1 -1
  390. package/lib/shared/integrations.js +1 -1
  391. package/lib/shared/managed-flow.d.ts +4 -0
  392. package/lib/shared/managed-flow.js +2 -2
  393. package/lib/shared/managed-flow.js.map +1 -1
  394. package/lib/shared/memory-consolidation.d.ts +104 -0
  395. package/lib/shared/memory-consolidation.js +23 -0
  396. package/lib/shared/memory-consolidation.js.map +1 -0
  397. package/lib/shared/memory-forget.js +1 -1
  398. package/lib/shared/memory-management.d.ts +491 -1
  399. package/lib/shared/memory-management.js +9 -1
  400. package/lib/shared/memory-management.js.map +1 -1
  401. package/lib/shared/memory-ops.d.ts +17 -1
  402. package/lib/shared/memory-ops.js +1 -1
  403. package/lib/shared/memory-tool-names.js +1 -1
  404. package/lib/shared/memory-v2.d.ts +16 -0
  405. package/lib/shared/memory-v2.js +3 -1
  406. package/lib/shared/memory-v2.js.map +1 -1
  407. package/lib/shared/messaging-contract.d.ts +1 -1
  408. package/lib/shared/messaging-contract.js +1 -1
  409. package/lib/shared/messaging.d.ts +21 -10
  410. package/lib/shared/messaging.js +3 -1
  411. package/lib/shared/messaging.js.map +1 -1
  412. package/lib/shared/native-schedule.d.ts +21 -0
  413. package/lib/shared/native-schedule.js +15 -1
  414. package/lib/shared/native-schedule.js.map +1 -1
  415. package/lib/shared/notifications.js +1 -1
  416. package/lib/shared/onboarding-source.js +1 -1
  417. package/lib/shared/onboarding.js +1 -1
  418. package/lib/shared/operation-errors.d.ts +6 -0
  419. package/lib/shared/operation-errors.js +7 -1
  420. package/lib/shared/operation-errors.js.map +1 -1
  421. package/lib/shared/proactive/activity.js +1 -1
  422. package/lib/shared/proactive/document.js +1 -1
  423. package/lib/shared/proactive/feedback.d.ts +12 -0
  424. package/lib/shared/proactive/feedback.js +2 -2
  425. package/lib/shared/proactive/feedback.js.map +1 -1
  426. package/lib/shared/proactive/follow-up.d.ts +460 -0
  427. package/lib/shared/proactive/follow-up.js +15 -1
  428. package/lib/shared/proactive/follow-up.js.map +1 -1
  429. package/lib/shared/proactive/governance.js +1 -1
  430. package/lib/shared/proactive/group-follow-up.js +1 -1
  431. package/lib/shared/proactive/group-repair.js +1 -1
  432. package/lib/shared/proactive/handoff.js +1 -1
  433. package/lib/shared/proactive/method-evaluation.d.ts +4 -0
  434. package/lib/shared/proactive/method-evaluation.js +2 -1
  435. package/lib/shared/proactive/method-evaluation.js.map +1 -1
  436. package/lib/shared/proactive/method-package.js +1 -1
  437. package/lib/shared/proactive/notices.js +1 -1
  438. package/lib/shared/proactive/outcomes.js +1 -1
  439. package/lib/shared/proactive/protocol.d.ts +651 -0
  440. package/lib/shared/proactive/protocol.js +1 -1
  441. package/lib/shared/proactive/remote-contract.d.ts +828 -0
  442. package/lib/shared/proactive/remote-contract.js +1 -1
  443. package/lib/shared/proactive/repair.js +1 -1
  444. package/lib/shared/proactive/responsibility.js +1 -1
  445. package/lib/shared/proactive/setup.d.ts +83 -0
  446. package/lib/shared/proactive/setup.js +1 -1
  447. package/lib/shared/proactive/work-progress.js +1 -1
  448. package/lib/shared/proactive/work.js +1 -1
  449. package/lib/shared/proactive/workspace-repair.js +1 -1
  450. package/lib/shared/reference-memory.js +1 -1
  451. package/lib/shared/remote-contract.d.ts +1081 -47
  452. package/lib/shared/remote-contract.js +28 -2
  453. package/lib/shared/remote-contract.js.map +1 -1
  454. package/lib/shared/routine-outcomes.js +1 -1
  455. package/lib/shared/schema.js +1 -1
  456. package/lib/shared/secrets.js +1 -1
  457. package/lib/shared/shadow.js +1 -1
  458. package/lib/shared/supergroup-contract.d.ts +7535 -0
  459. package/lib/shared/supergroup-contract.js +26 -0
  460. package/lib/shared/supergroup-contract.js.map +1 -0
  461. package/lib/shared/supergroup.d.ts +1495 -0
  462. package/lib/shared/supergroup.js +56 -0
  463. package/lib/shared/supergroup.js.map +1 -0
  464. package/lib/shared/task-materials.d.ts +200 -0
  465. package/lib/shared/task-materials.js +44 -0
  466. package/lib/shared/task-materials.js.map +1 -0
  467. package/lib/shared/team-recipes.d.ts +130 -0
  468. package/lib/shared/team-recipes.js +28 -0
  469. package/lib/shared/team-recipes.js.map +1 -0
  470. package/lib/shared/version.d.ts +1 -1
  471. package/lib/shared/version.js +2 -2
  472. package/lib/shared/workspace-contract.js +1 -1
  473. package/lib/shared/workspace.js +1 -1
  474. package/lib/typert.host.js +1 -1
  475. package/lib/typert.remote-client.js +1 -1
  476. package/locale/en.json +305 -7
  477. package/locale/zh.json +305 -7
  478. package/package.json +2 -1
@@ -0,0 +1,987 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import { type UserMessage } from '@deepseek-ai/dsh-llm';
3
+ import type { TaskMaterialInput, TaskResumeInput } from '../../shared/task-materials.js';
4
+ import type { Agent } from '@deepseek-ai/dsh-agent';
5
+ import { type Domain } from '@deepseek-ai/dsh-storage-domain';
6
+ import { z } from 'zod';
7
+ import { type GroupKey } from '../../shared/groups.js';
8
+ import type { BotKey } from '../../shared/identity.js';
9
+ import { type SupergroupSendGroupInput, type SupergroupWorkView } from '../../shared/supergroup.js';
10
+ import type { DshBotRegistry } from '../registry.js';
11
+ import type { Groups } from '../groups/service.js';
12
+ import { type SupergroupConfig } from './config.js';
13
+ export declare const supergroupDomain: {
14
+ name: string;
15
+ version: number;
16
+ tables: {
17
+ works: import("@deepseek-ai/dsh-storage-domain").DomainTableSpec<string, {
18
+ id: string;
19
+ revision: number;
20
+ owner: {
21
+ botId: string;
22
+ botCreatedAt: number;
23
+ };
24
+ originSessionId: string;
25
+ inputMessageId: string;
26
+ inputMessageIds: string[];
27
+ configDigest: string;
28
+ readers: {
29
+ botId: string;
30
+ botCreatedAt: number;
31
+ }[];
32
+ createdAt: number;
33
+ updatedAt: number;
34
+ expiresAt: number;
35
+ turnIds: string[];
36
+ state: "unknown" | "running" | "completed" | "cancelled" | "creating" | "partial";
37
+ groupInputs: {
38
+ operationId: string;
39
+ digest: string;
40
+ messageId: string;
41
+ expectedRevision: number;
42
+ state: "unknown" | "queued" | "running" | "completed" | "cancelled" | "conflict" | "stored";
43
+ seq?: number | undefined;
44
+ acceptedRevision?: number | undefined;
45
+ memberIds?: string[] | undefined;
46
+ replyTo?: string | undefined;
47
+ reason?: string | undefined;
48
+ delivery?: {
49
+ id: string;
50
+ messageId: string;
51
+ digest: string;
52
+ targetSessionId: string;
53
+ resultVersion: string;
54
+ state: "unknown" | "queued" | "cancelled" | "dispatching" | "delivered" | "prepared" | "undeliverable";
55
+ inputSeq?: number | undefined;
56
+ answerMessageId?: string | undefined;
57
+ reason?: string | undefined;
58
+ } | undefined;
59
+ }[];
60
+ experts: {
61
+ id: string;
62
+ digest: string;
63
+ botId: string;
64
+ memberId: string;
65
+ turnId: string;
66
+ childSessionId: string;
67
+ state: "failed" | "pending" | "invited";
68
+ reason?: string | undefined;
69
+ }[];
70
+ group?: {
71
+ groupId: string;
72
+ groupCreatedAt: number;
73
+ } | undefined;
74
+ collaboration?: {
75
+ requests: number;
76
+ operations: {
77
+ id: string;
78
+ digest: string;
79
+ target: {
80
+ botId: string;
81
+ botCreatedAt: number;
82
+ };
83
+ state: "unknown" | "completed" | "failed" | "cancelled" | "prepared";
84
+ childId?: string | undefined;
85
+ status?: string | undefined;
86
+ resultDigest?: string | undefined;
87
+ errorCode?: string | undefined;
88
+ diagnostic?: string | undefined;
89
+ }[];
90
+ } | undefined;
91
+ initialPending?: boolean | undefined;
92
+ materials?: {
93
+ id: string;
94
+ operationId: string;
95
+ requestDigest: string;
96
+ kind: "file" | "input-text" | "github-ci";
97
+ name: string;
98
+ sourceId: string;
99
+ sourceVersion: string;
100
+ digest: string;
101
+ text: string;
102
+ question: string;
103
+ citation: string;
104
+ readers: {
105
+ botId: string;
106
+ botCreatedAt: number;
107
+ }[];
108
+ createdAt: number;
109
+ }[] | undefined;
110
+ blockers?: {
111
+ id: string;
112
+ assignmentId: string;
113
+ desiredRevision: number;
114
+ reason: string;
115
+ observedAt: number;
116
+ state: "ready" | "superseded" | "waiting" | "continued";
117
+ name?: string | undefined;
118
+ }[] | undefined;
119
+ resumes?: {
120
+ operationId: string;
121
+ digest: string;
122
+ messageId: string;
123
+ expectedRevision: number;
124
+ state: "unknown" | "queued" | "dispatching";
125
+ blockerIds: string[];
126
+ createdAt: number;
127
+ contentDigest?: string | undefined;
128
+ originalDigest?: string | undefined;
129
+ previousMessageId?: string | undefined;
130
+ }[] | undefined;
131
+ reason?: string | undefined;
132
+ }>;
133
+ };
134
+ };
135
+ export declare const supergroupInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
136
+ action: z.ZodLiteral<"start">;
137
+ memberIds: z.ZodArray<z.ZodString>;
138
+ }, z.core.$strict>, z.ZodObject<{
139
+ action: z.ZodLiteral<"continue">;
140
+ workId: z.ZodOptional<z.ZodString>;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ action: z.ZodLiteral<"status">;
143
+ workId: z.ZodOptional<z.ZodString>;
144
+ }, z.core.$strict>, z.ZodObject<{
145
+ action: z.ZodLiteral<"cancel">;
146
+ workId: z.ZodOptional<z.ZodString>;
147
+ }, z.core.$strict>], "action">;
148
+ export type SupergroupInput = z.output<typeof supergroupInputSchema>;
149
+ /** Same bounded, deterministic directory for model discovery and Host admission. */
150
+ export declare function supergroupCandidateIds(ownerId: string, directory: readonly {
151
+ id: string;
152
+ }[], config: Pick<SupergroupConfig, 'allowedBotIds' | 'maxExperts'>): string[];
153
+ /** Work links and admission receipts only; Groups and native Sessions own execution. */
154
+ export declare class Supergroup {
155
+ private readonly ctx;
156
+ private readonly registry;
157
+ private readonly groups;
158
+ private readonly domain;
159
+ private readonly serial;
160
+ private readonly active;
161
+ private readonly groupInputTails;
162
+ private readonly capabilities;
163
+ private readonly returns;
164
+ private stopped;
165
+ private offExpert?;
166
+ private closing?;
167
+ private collaboration?;
168
+ private releaseCollaboration?;
169
+ private readonly support;
170
+ private readonly proposedContinuations;
171
+ constructor(ctx: Context, registry: DshBotRegistry, groups: Groups, domain: Domain<typeof supergroupDomain>);
172
+ taskSupport(id: string): Promise<{
173
+ workId: string;
174
+ revision: number;
175
+ originSessionId: string;
176
+ inputMessageId: string;
177
+ owner: {
178
+ botId: string;
179
+ botCreatedAt: number;
180
+ };
181
+ readers: {
182
+ botId: string;
183
+ botCreatedAt: number;
184
+ }[];
185
+ blockers: {
186
+ id: string;
187
+ assignmentId: string;
188
+ desiredRevision: number;
189
+ reason: string;
190
+ observedAt: number;
191
+ state: "ready" | "superseded" | "waiting" | "continued";
192
+ name?: string | undefined;
193
+ }[];
194
+ materials: {
195
+ id: string;
196
+ operationId: string;
197
+ requestDigest: string;
198
+ kind: "file" | "input-text" | "github-ci";
199
+ name: string;
200
+ sourceId: string;
201
+ sourceVersion: string;
202
+ digest: string;
203
+ text: string;
204
+ question: string;
205
+ citation: string;
206
+ readers: {
207
+ botId: string;
208
+ botCreatedAt: number;
209
+ }[];
210
+ createdAt: number;
211
+ }[];
212
+ resumes: {
213
+ operationId: string;
214
+ digest: string;
215
+ messageId: string;
216
+ expectedRevision: number;
217
+ state: "unknown" | "queued" | "dispatching";
218
+ blockerIds: string[];
219
+ createdAt: number;
220
+ contentDigest?: string | undefined;
221
+ originalDigest?: string | undefined;
222
+ previousMessageId?: string | undefined;
223
+ }[];
224
+ inputs: {
225
+ messageId: string;
226
+ name: string;
227
+ version: string;
228
+ }[];
229
+ ci: {
230
+ id: string;
231
+ name: string;
232
+ version: string;
233
+ citation: string;
234
+ }[];
235
+ recovery?: {
236
+ state: "unknown" | "queued" | "running" | "delivered" | "waiting-input" | "closed" | "waiting-approval" | "dispatch-intent" | "ready-to-resume";
237
+ nativeApprovalCount: number;
238
+ holdsAgent: boolean;
239
+ timerWakeup: false;
240
+ durableToolResume: false;
241
+ } | undefined;
242
+ ownerName?: string | undefined;
243
+ originalQuestion?: string | undefined;
244
+ readerNames?: string[] | undefined;
245
+ }>;
246
+ addMaterial(input: TaskMaterialInput): Promise<{
247
+ workId: string;
248
+ revision: number;
249
+ originSessionId: string;
250
+ inputMessageId: string;
251
+ owner: {
252
+ botId: string;
253
+ botCreatedAt: number;
254
+ };
255
+ readers: {
256
+ botId: string;
257
+ botCreatedAt: number;
258
+ }[];
259
+ blockers: {
260
+ id: string;
261
+ assignmentId: string;
262
+ desiredRevision: number;
263
+ reason: string;
264
+ observedAt: number;
265
+ state: "ready" | "superseded" | "waiting" | "continued";
266
+ name?: string | undefined;
267
+ }[];
268
+ materials: {
269
+ id: string;
270
+ operationId: string;
271
+ requestDigest: string;
272
+ kind: "file" | "input-text" | "github-ci";
273
+ name: string;
274
+ sourceId: string;
275
+ sourceVersion: string;
276
+ digest: string;
277
+ text: string;
278
+ question: string;
279
+ citation: string;
280
+ readers: {
281
+ botId: string;
282
+ botCreatedAt: number;
283
+ }[];
284
+ createdAt: number;
285
+ }[];
286
+ resumes: {
287
+ operationId: string;
288
+ digest: string;
289
+ messageId: string;
290
+ expectedRevision: number;
291
+ state: "unknown" | "queued" | "dispatching";
292
+ blockerIds: string[];
293
+ createdAt: number;
294
+ contentDigest?: string | undefined;
295
+ originalDigest?: string | undefined;
296
+ previousMessageId?: string | undefined;
297
+ }[];
298
+ inputs: {
299
+ messageId: string;
300
+ name: string;
301
+ version: string;
302
+ }[];
303
+ ci: {
304
+ id: string;
305
+ name: string;
306
+ version: string;
307
+ citation: string;
308
+ }[];
309
+ recovery?: {
310
+ state: "unknown" | "queued" | "running" | "delivered" | "waiting-input" | "closed" | "waiting-approval" | "dispatch-intent" | "ready-to-resume";
311
+ nativeApprovalCount: number;
312
+ holdsAgent: boolean;
313
+ timerWakeup: false;
314
+ durableToolResume: false;
315
+ } | undefined;
316
+ ownerName?: string | undefined;
317
+ originalQuestion?: string | undefined;
318
+ readerNames?: string[] | undefined;
319
+ }>;
320
+ resumeWork(input: TaskResumeInput): Promise<{
321
+ workId: string;
322
+ revision: number;
323
+ originSessionId: string;
324
+ inputMessageId: string;
325
+ owner: {
326
+ botId: string;
327
+ botCreatedAt: number;
328
+ };
329
+ readers: {
330
+ botId: string;
331
+ botCreatedAt: number;
332
+ }[];
333
+ blockers: {
334
+ id: string;
335
+ assignmentId: string;
336
+ desiredRevision: number;
337
+ reason: string;
338
+ observedAt: number;
339
+ state: "ready" | "superseded" | "waiting" | "continued";
340
+ name?: string | undefined;
341
+ }[];
342
+ materials: {
343
+ id: string;
344
+ operationId: string;
345
+ requestDigest: string;
346
+ kind: "file" | "input-text" | "github-ci";
347
+ name: string;
348
+ sourceId: string;
349
+ sourceVersion: string;
350
+ digest: string;
351
+ text: string;
352
+ question: string;
353
+ citation: string;
354
+ readers: {
355
+ botId: string;
356
+ botCreatedAt: number;
357
+ }[];
358
+ createdAt: number;
359
+ }[];
360
+ resumes: {
361
+ operationId: string;
362
+ digest: string;
363
+ messageId: string;
364
+ expectedRevision: number;
365
+ state: "unknown" | "queued" | "dispatching";
366
+ blockerIds: string[];
367
+ createdAt: number;
368
+ contentDigest?: string | undefined;
369
+ originalDigest?: string | undefined;
370
+ previousMessageId?: string | undefined;
371
+ }[];
372
+ inputs: {
373
+ messageId: string;
374
+ name: string;
375
+ version: string;
376
+ }[];
377
+ ci: {
378
+ id: string;
379
+ name: string;
380
+ version: string;
381
+ citation: string;
382
+ }[];
383
+ recovery?: {
384
+ state: "unknown" | "queued" | "running" | "delivered" | "waiting-input" | "closed" | "waiting-approval" | "dispatch-intent" | "ready-to-resume";
385
+ nativeApprovalCount: number;
386
+ holdsAgent: boolean;
387
+ timerWakeup: false;
388
+ durableToolResume: false;
389
+ } | undefined;
390
+ ownerName?: string | undefined;
391
+ originalQuestion?: string | undefined;
392
+ readerNames?: string[] | undefined;
393
+ }>;
394
+ pendingTasks(): Promise<{
395
+ workId: string;
396
+ revision: number;
397
+ originSessionId: string;
398
+ inputMessageId: string;
399
+ owner: {
400
+ botId: string;
401
+ botCreatedAt: number;
402
+ };
403
+ readers: {
404
+ botId: string;
405
+ botCreatedAt: number;
406
+ }[];
407
+ blockers: {
408
+ id: string;
409
+ assignmentId: string;
410
+ desiredRevision: number;
411
+ reason: string;
412
+ observedAt: number;
413
+ state: "ready" | "superseded" | "waiting" | "continued";
414
+ name?: string | undefined;
415
+ }[];
416
+ materials: {
417
+ id: string;
418
+ operationId: string;
419
+ requestDigest: string;
420
+ kind: "file" | "input-text" | "github-ci";
421
+ name: string;
422
+ sourceId: string;
423
+ sourceVersion: string;
424
+ digest: string;
425
+ text: string;
426
+ question: string;
427
+ citation: string;
428
+ readers: {
429
+ botId: string;
430
+ botCreatedAt: number;
431
+ }[];
432
+ createdAt: number;
433
+ }[];
434
+ resumes: {
435
+ operationId: string;
436
+ digest: string;
437
+ messageId: string;
438
+ expectedRevision: number;
439
+ state: "unknown" | "queued" | "dispatching";
440
+ blockerIds: string[];
441
+ createdAt: number;
442
+ contentDigest?: string | undefined;
443
+ originalDigest?: string | undefined;
444
+ previousMessageId?: string | undefined;
445
+ }[];
446
+ inputs: {
447
+ messageId: string;
448
+ name: string;
449
+ version: string;
450
+ }[];
451
+ ci: {
452
+ id: string;
453
+ name: string;
454
+ version: string;
455
+ citation: string;
456
+ }[];
457
+ recovery?: {
458
+ state: "unknown" | "queued" | "running" | "delivered" | "waiting-input" | "closed" | "waiting-approval" | "dispatch-intent" | "ready-to-resume";
459
+ nativeApprovalCount: number;
460
+ holdsAgent: boolean;
461
+ timerWakeup: false;
462
+ durableToolResume: false;
463
+ } | undefined;
464
+ ownerName?: string | undefined;
465
+ originalQuestion?: string | undefined;
466
+ readerNames?: string[] | undefined;
467
+ }[]>;
468
+ start(): Promise<void>;
469
+ settings(): {
470
+ enabled: boolean;
471
+ };
472
+ /** Owner Remote only. Native ConfigEditor owns persistence and volatile apply. */
473
+ configure(value: {
474
+ enabled: boolean;
475
+ expectedEnabled: boolean;
476
+ }): Promise<{
477
+ enabled: boolean;
478
+ }>;
479
+ private config;
480
+ private groupMemberLimit;
481
+ private configDigest;
482
+ private read;
483
+ private put;
484
+ /** The latest substantive input must really be human. Ambient context is not authorization. */
485
+ private human;
486
+ private authorizeCollaboration;
487
+ continuationInstruction(agent: Agent): string;
488
+ checkContinuation(agent: Agent, messages?: readonly UserMessage[]): Promise<void>;
489
+ observeContinuation(agent: Agent): Promise<void>;
490
+ private reserveCollaborationRequest;
491
+ private reserveWorkRequest;
492
+ private finishCollaboration;
493
+ private pool;
494
+ private runtime;
495
+ private chosen;
496
+ invoke(agent: Agent, input: SupergroupInput, signal: AbortSignal): Promise<unknown>;
497
+ private execute;
498
+ private result;
499
+ private expert;
500
+ private ownerAgent;
501
+ private updateInput;
502
+ private reconcileDelivery;
503
+ private project;
504
+ catalog(input?: {
505
+ bot?: BotKey;
506
+ group?: GroupKey;
507
+ }): Promise<SupergroupWorkView[]>;
508
+ byGroup(group: GroupKey): Promise<SupergroupWorkView | null>;
509
+ /** Owner Remote only. Persist the original group human event even when its revision conflicts. */
510
+ sendGroupInput(value: SupergroupSendGroupInput): Promise<{
511
+ view: {
512
+ work: {
513
+ id: string;
514
+ revision: number;
515
+ owner: {
516
+ botId: string;
517
+ botCreatedAt: number;
518
+ };
519
+ originSessionId: string;
520
+ inputMessageId: string;
521
+ inputMessageIds: string[];
522
+ configDigest: string;
523
+ readers: {
524
+ botId: string;
525
+ botCreatedAt: number;
526
+ }[];
527
+ createdAt: number;
528
+ updatedAt: number;
529
+ expiresAt: number;
530
+ turnIds: string[];
531
+ state: "unknown" | "running" | "completed" | "cancelled" | "creating" | "partial";
532
+ groupInputs: {
533
+ operationId: string;
534
+ digest: string;
535
+ messageId: string;
536
+ expectedRevision: number;
537
+ state: "unknown" | "queued" | "running" | "completed" | "cancelled" | "conflict" | "stored";
538
+ seq?: number | undefined;
539
+ acceptedRevision?: number | undefined;
540
+ memberIds?: string[] | undefined;
541
+ replyTo?: string | undefined;
542
+ reason?: string | undefined;
543
+ delivery?: {
544
+ id: string;
545
+ messageId: string;
546
+ digest: string;
547
+ targetSessionId: string;
548
+ resultVersion: string;
549
+ state: "unknown" | "queued" | "cancelled" | "dispatching" | "delivered" | "prepared" | "undeliverable";
550
+ inputSeq?: number | undefined;
551
+ answerMessageId?: string | undefined;
552
+ reason?: string | undefined;
553
+ } | undefined;
554
+ }[];
555
+ experts: {
556
+ id: string;
557
+ digest: string;
558
+ botId: string;
559
+ memberId: string;
560
+ turnId: string;
561
+ childSessionId: string;
562
+ state: "failed" | "pending" | "invited";
563
+ reason?: string | undefined;
564
+ }[];
565
+ group?: {
566
+ groupId: string;
567
+ groupCreatedAt: number;
568
+ } | undefined;
569
+ collaboration?: {
570
+ requests: number;
571
+ operations: {
572
+ id: string;
573
+ digest: string;
574
+ target: {
575
+ botId: string;
576
+ botCreatedAt: number;
577
+ };
578
+ state: "unknown" | "completed" | "failed" | "cancelled" | "prepared";
579
+ childId?: string | undefined;
580
+ status?: string | undefined;
581
+ resultDigest?: string | undefined;
582
+ errorCode?: string | undefined;
583
+ diagnostic?: string | undefined;
584
+ }[];
585
+ } | undefined;
586
+ initialPending?: boolean | undefined;
587
+ materials?: {
588
+ id: string;
589
+ operationId: string;
590
+ requestDigest: string;
591
+ kind: "file" | "input-text" | "github-ci";
592
+ name: string;
593
+ sourceId: string;
594
+ sourceVersion: string;
595
+ digest: string;
596
+ text: string;
597
+ question: string;
598
+ citation: string;
599
+ readers: {
600
+ botId: string;
601
+ botCreatedAt: number;
602
+ }[];
603
+ createdAt: number;
604
+ }[] | undefined;
605
+ blockers?: {
606
+ id: string;
607
+ assignmentId: string;
608
+ desiredRevision: number;
609
+ reason: string;
610
+ observedAt: number;
611
+ state: "ready" | "superseded" | "waiting" | "continued";
612
+ name?: string | undefined;
613
+ }[] | undefined;
614
+ resumes?: {
615
+ operationId: string;
616
+ digest: string;
617
+ messageId: string;
618
+ expectedRevision: number;
619
+ state: "unknown" | "queued" | "dispatching";
620
+ blockerIds: string[];
621
+ createdAt: number;
622
+ contentDigest?: string | undefined;
623
+ originalDigest?: string | undefined;
624
+ previousMessageId?: string | undefined;
625
+ }[] | undefined;
626
+ reason?: string | undefined;
627
+ };
628
+ group?: {
629
+ unread: boolean;
630
+ readRevision: number;
631
+ group: {
632
+ id: string;
633
+ operationId: string;
634
+ createDigest: string;
635
+ createdAt: number;
636
+ updatedAt: number;
637
+ schemaVersion: 1;
638
+ name: string;
639
+ rootSessionId: string;
640
+ rootPresetId: "dsh-bot-group-root";
641
+ cwd: string;
642
+ mode: "natural" | "mention" | "round-robin";
643
+ membershipRevision: number;
644
+ revision: number;
645
+ archived: boolean;
646
+ state: "ready" | "creating" | "recovery_needed";
647
+ onDemand?: boolean | undefined;
648
+ memberRoles?: {
649
+ bot: {
650
+ botId: string;
651
+ botCreatedAt: number;
652
+ };
653
+ role: string;
654
+ }[] | undefined;
655
+ modelSelection?: {
656
+ provider: string;
657
+ model: string;
658
+ reasoningEffort?: string | undefined;
659
+ } | undefined;
660
+ memberModelSelections?: {
661
+ memberId: string;
662
+ modelSelection: {
663
+ provider: string;
664
+ model: string;
665
+ reasoningEffort?: string | undefined;
666
+ };
667
+ }[] | undefined;
668
+ modelRevision?: number | undefined;
669
+ nextMemberId?: string | undefined;
670
+ exportApprovals?: {
671
+ bot: {
672
+ botId: string;
673
+ botCreatedAt: number;
674
+ };
675
+ membershipRevision: number;
676
+ members: {
677
+ botId: string;
678
+ botCreatedAt: number;
679
+ }[];
680
+ enabledAt: number;
681
+ }[] | undefined;
682
+ supergroup?: {
683
+ workId: string;
684
+ originSessionId: string;
685
+ originMessageId: string;
686
+ owner: {
687
+ botId: string;
688
+ botCreatedAt: number;
689
+ };
690
+ readers: {
691
+ botId: string;
692
+ botCreatedAt: number;
693
+ }[];
694
+ expiresAt: number;
695
+ } | undefined;
696
+ };
697
+ members: {
698
+ id: string;
699
+ group: {
700
+ groupId: string;
701
+ groupCreatedAt: number;
702
+ };
703
+ bot: {
704
+ botId: string;
705
+ botCreatedAt: number;
706
+ };
707
+ order: number;
708
+ joinedAt: number;
709
+ enabled: boolean;
710
+ removedAt?: number | undefined;
711
+ }[];
712
+ unavailableMemberIds: string[];
713
+ running: boolean;
714
+ turns: {
715
+ id: string;
716
+ group: {
717
+ groupId: string;
718
+ groupCreatedAt: number;
719
+ };
720
+ operationId: string;
721
+ requestDigest: string;
722
+ inputMessageId: string;
723
+ createdAt: number;
724
+ updatedAt: number;
725
+ revision: number;
726
+ schemaVersion: 1;
727
+ membershipRevision: number;
728
+ orderedMemberIds: string[];
729
+ mode: "natural" | "mention" | "round-robin";
730
+ contextThroughSeq: number;
731
+ state: "running" | "completed" | "cancelled" | "accepted" | "recovery_needed" | "idle" | "paused" | "partial";
732
+ inputFlowId?: string | undefined;
733
+ inputFlowSessionId?: string | undefined;
734
+ ownerFollowUp?: {
735
+ predecessorTurnId: string;
736
+ predecessorTurnRevision: number;
737
+ membershipRevision: number;
738
+ modelRevision: number;
739
+ memberId: string;
740
+ bot: {
741
+ botId: string;
742
+ botCreatedAt: number;
743
+ };
744
+ botRevision: number;
745
+ modelSelection: {
746
+ provider: string;
747
+ model: string;
748
+ reasoningEffort?: string | undefined;
749
+ };
750
+ cardId: string;
751
+ cardRevision: number;
752
+ } | undefined;
753
+ proactive?: {
754
+ ticketId: string;
755
+ assignmentId: string;
756
+ provider: string;
757
+ model: string;
758
+ botRevisions: [number, number] | [number];
759
+ memberModels?: {
760
+ memberId: string;
761
+ modelSelection: {
762
+ provider: string;
763
+ model: string;
764
+ reasoningEffort?: string | undefined;
765
+ };
766
+ }[] | undefined;
767
+ modelRevision?: number | undefined;
768
+ followUp?: {
769
+ predecessorTurnId: string;
770
+ factId: string;
771
+ } | undefined;
772
+ requestBudget?: {
773
+ maxTokens: number;
774
+ outputTokens: number;
775
+ deadlineAt: string;
776
+ } | undefined;
777
+ repair?: {
778
+ phase: "plan" | "implement" | "review";
779
+ maxTokens: number;
780
+ outputTokens: number;
781
+ deadlineAt: string;
782
+ predecessorTurnId?: string | undefined;
783
+ } | undefined;
784
+ } | undefined;
785
+ inputSeq?: number | undefined;
786
+ routing?: {
787
+ strategy: "explicit" | "legacy" | "local-role" | "fallback";
788
+ version: 1;
789
+ candidateMemberIds: string[];
790
+ selectedMemberIds: string[];
791
+ reason: "failed" | "disabled" | "mode" | "mention" | "reply" | "round" | "role-match" | "no-match";
792
+ deciderCalls: 0;
793
+ plannedCalls: number;
794
+ modelRequests?: number | undefined;
795
+ } | undefined;
796
+ modelSelection?: {
797
+ provider: string;
798
+ model: string;
799
+ reasoningEffort?: string | undefined;
800
+ } | undefined;
801
+ memberModelSelections?: {
802
+ memberId: string;
803
+ modelSelection: {
804
+ provider: string;
805
+ model: string;
806
+ reasoningEffort?: string | undefined;
807
+ };
808
+ }[] | undefined;
809
+ predecessorTurnIds?: string[] | undefined;
810
+ followups?: {
811
+ operationId: string;
812
+ requestDigest: string;
813
+ deliveryId: string;
814
+ messageId: string;
815
+ state: "unknown" | "accepted" | "dispatching";
816
+ childMessageId?: string | undefined;
817
+ }[] | undefined;
818
+ replyTo?: string | undefined;
819
+ protocol?: 2 | undefined;
820
+ memoryStatusOnly?: true | undefined;
821
+ automaticExecutions?: number | undefined;
822
+ continuationAllowance?: number | undefined;
823
+ stoppedMemberIds?: string[] | undefined;
824
+ }[];
825
+ deliveries: {
826
+ id: string;
827
+ turnId: string;
828
+ memberId: string;
829
+ ordinal: number;
830
+ bot: {
831
+ botId: string;
832
+ botCreatedAt: number;
833
+ };
834
+ botRevision: number;
835
+ presetId: string;
836
+ contextOutputMessageIds: string[];
837
+ contextTruncated: boolean;
838
+ state: "unknown" | "running" | "completed" | "failed" | "cancelled" | "pending" | "starting" | "skipped";
839
+ revision?: number | undefined;
840
+ updatedAt?: number | undefined;
841
+ automatic?: boolean | undefined;
842
+ startedAt?: number | undefined;
843
+ endedAt?: number | undefined;
844
+ nativeRunId?: string | undefined;
845
+ childMessageId?: string | undefined;
846
+ joinedDeliveryId?: string | undefined;
847
+ childSessionId?: string | undefined;
848
+ inputFlowId?: string | undefined;
849
+ inputFlowSessionId?: string | undefined;
850
+ triggerMessageId?: string | undefined;
851
+ returnMemberId?: string | undefined;
852
+ requestDigest?: string | undefined;
853
+ skipped?: boolean | undefined;
854
+ outputMessageId?: string | undefined;
855
+ outputSeq?: number | undefined;
856
+ stopReason?: string | undefined;
857
+ reasonCode?: string | undefined;
858
+ exportFlowId?: string | undefined;
859
+ memoryWriteStatus?: "failed" | "saved" | "unverified" | undefined;
860
+ failure?: {
861
+ message: string;
862
+ code?: string | undefined;
863
+ requestId?: string | undefined;
864
+ status?: number | undefined;
865
+ } | undefined;
866
+ staleExportClosedAt?: number | undefined;
867
+ }[];
868
+ messages: {
869
+ id: string;
870
+ seq: number;
871
+ at: number;
872
+ text: string;
873
+ turnId: string;
874
+ hasNonText?: boolean | undefined;
875
+ attachments?: ({
876
+ type: "file";
877
+ attachment: {
878
+ attachmentId: string;
879
+ name: string;
880
+ bytes: number;
881
+ };
882
+ } | {
883
+ type: "image";
884
+ attachment: {
885
+ attachmentId: string;
886
+ mediaType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
887
+ bytes: number;
888
+ width: number;
889
+ height: number;
890
+ name?: string | undefined;
891
+ originalDimensions?: {
892
+ width: number;
893
+ height: number;
894
+ } | undefined;
895
+ };
896
+ offloaded?: true | undefined;
897
+ })[] | undefined;
898
+ replyTo?: string | undefined;
899
+ authorKind?: "bot" | "proactive" | "user" | undefined;
900
+ causeId?: string | undefined;
901
+ speaker?: {
902
+ bot: {
903
+ botId: string;
904
+ botCreatedAt: number;
905
+ };
906
+ name: string;
907
+ avatar?: string | undefined;
908
+ avatarColor?: "--dsw-alias-state-business-primary" | "--dsw-alias-state-success-primary" | "--dsw-alias-state-warn-label" | "--dsw-alias-state-error-primary" | "teal" | "cyan" | "indigo" | "purple" | "rose" | "orange" | "olive" | "slate" | undefined;
909
+ avatarVariant?: "classic" | "glasses" | "spout" | "baby" | "hat" | "sleeping" | "auto" | undefined;
910
+ } | undefined;
911
+ childSessionId?: string | undefined;
912
+ stopReason?: string | undefined;
913
+ failure?: {
914
+ message: string;
915
+ code?: string | undefined;
916
+ requestId?: string | undefined;
917
+ status?: number | undefined;
918
+ } | undefined;
919
+ }[];
920
+ hasEarlier: boolean;
921
+ exportPendingCount?: number | undefined;
922
+ latest?: {
923
+ seq: number;
924
+ at: number;
925
+ speaker?: {
926
+ bot: {
927
+ botId: string;
928
+ botCreatedAt: number;
929
+ };
930
+ name: string;
931
+ avatar?: string | undefined;
932
+ avatarColor?: "--dsw-alias-state-business-primary" | "--dsw-alias-state-success-primary" | "--dsw-alias-state-warn-label" | "--dsw-alias-state-error-primary" | "teal" | "cyan" | "indigo" | "purple" | "rose" | "orange" | "olive" | "slate" | undefined;
933
+ avatarVariant?: "classic" | "glasses" | "spout" | "baby" | "hat" | "sleeping" | "auto" | undefined;
934
+ } | undefined;
935
+ } | undefined;
936
+ reason?: "recovery-needed" | "root-owned-elsewhere" | "root-unavailable" | undefined;
937
+ } | undefined;
938
+ };
939
+ receipt: {
940
+ operationId: string;
941
+ digest: string;
942
+ messageId: string;
943
+ expectedRevision: number;
944
+ state: "unknown" | "queued" | "running" | "completed" | "cancelled" | "conflict" | "stored";
945
+ seq?: number | undefined;
946
+ acceptedRevision?: number | undefined;
947
+ memberIds?: string[] | undefined;
948
+ replyTo?: string | undefined;
949
+ reason?: string | undefined;
950
+ delivery?: {
951
+ id: string;
952
+ messageId: string;
953
+ digest: string;
954
+ targetSessionId: string;
955
+ resultVersion: string;
956
+ state: "unknown" | "queued" | "cancelled" | "dispatching" | "delivered" | "prepared" | "undeliverable";
957
+ inputSeq?: number | undefined;
958
+ answerMessageId?: string | undefined;
959
+ reason?: string | undefined;
960
+ } | undefined;
961
+ };
962
+ }>;
963
+ private scheduleGroupInput;
964
+ private deliverGroupResult;
965
+ forSession(input: {
966
+ sessionId: string;
967
+ messageId: string;
968
+ }): Promise<SupergroupWorkView | null>;
969
+ cancel(id: string, expectedRevision: number): Promise<void>;
970
+ private cancelCurrent;
971
+ configChanged(): Promise<void>;
972
+ close(): Promise<void>;
973
+ }
974
+ declare module '@deepseek-ai/dsh-llm' {
975
+ interface MessageSourceMap {
976
+ 'dsh-bot-supergroup-result': {
977
+ kind: 'dsh-bot-supergroup-result';
978
+ deliveryId: string;
979
+ workId: string;
980
+ group: GroupKey;
981
+ originSessionId: string;
982
+ originMessageId: string;
983
+ originSeq: number;
984
+ resultVersion: string;
985
+ };
986
+ }
987
+ }