@defai.digital/contracts 13.0.3

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 (388) hide show
  1. package/LICENSE +214 -0
  2. package/dist/ability/v1/index.d.ts +5 -0
  3. package/dist/ability/v1/index.d.ts.map +1 -0
  4. package/dist/ability/v1/index.js +5 -0
  5. package/dist/ability/v1/index.js.map +1 -0
  6. package/dist/ability/v1/schema.d.ts +288 -0
  7. package/dist/ability/v1/schema.d.ts.map +1 -0
  8. package/dist/ability/v1/schema.js +138 -0
  9. package/dist/ability/v1/schema.js.map +1 -0
  10. package/dist/agent/v1/index.d.ts +8 -0
  11. package/dist/agent/v1/index.d.ts.map +1 -0
  12. package/dist/agent/v1/index.js +31 -0
  13. package/dist/agent/v1/index.js.map +1 -0
  14. package/dist/agent/v1/schema.d.ts +4055 -0
  15. package/dist/agent/v1/schema.d.ts.map +1 -0
  16. package/dist/agent/v1/schema.js +970 -0
  17. package/dist/agent/v1/schema.js.map +1 -0
  18. package/dist/agent/v1/storage-port.d.ts +172 -0
  19. package/dist/agent/v1/storage-port.d.ts.map +1 -0
  20. package/dist/agent/v1/storage-port.js +10 -0
  21. package/dist/agent/v1/storage-port.js.map +1 -0
  22. package/dist/analysis/v1/index.d.ts +7 -0
  23. package/dist/analysis/v1/index.d.ts.map +1 -0
  24. package/dist/analysis/v1/index.js +21 -0
  25. package/dist/analysis/v1/index.js.map +1 -0
  26. package/dist/analysis/v1/schema.d.ts +348 -0
  27. package/dist/analysis/v1/schema.d.ts.map +1 -0
  28. package/dist/analysis/v1/schema.js +252 -0
  29. package/dist/analysis/v1/schema.js.map +1 -0
  30. package/dist/cli/v1/index.d.ts +8 -0
  31. package/dist/cli/v1/index.d.ts.map +1 -0
  32. package/dist/cli/v1/index.js +46 -0
  33. package/dist/cli/v1/index.js.map +1 -0
  34. package/dist/cli/v1/output.d.ts +347 -0
  35. package/dist/cli/v1/output.d.ts.map +1 -0
  36. package/dist/cli/v1/output.js +288 -0
  37. package/dist/cli/v1/output.js.map +1 -0
  38. package/dist/cli/v1/schema.d.ts +494 -0
  39. package/dist/cli/v1/schema.d.ts.map +1 -0
  40. package/dist/cli/v1/schema.js +342 -0
  41. package/dist/cli/v1/schema.js.map +1 -0
  42. package/dist/config/v1/config.d.ts +887 -0
  43. package/dist/config/v1/config.d.ts.map +1 -0
  44. package/dist/config/v1/config.js +348 -0
  45. package/dist/config/v1/config.js.map +1 -0
  46. package/dist/config/v1/errors.d.ts +84 -0
  47. package/dist/config/v1/errors.d.ts.map +1 -0
  48. package/dist/config/v1/errors.js +150 -0
  49. package/dist/config/v1/errors.js.map +1 -0
  50. package/dist/config/v1/events.d.ts +416 -0
  51. package/dist/config/v1/events.d.ts.map +1 -0
  52. package/dist/config/v1/events.js +204 -0
  53. package/dist/config/v1/events.js.map +1 -0
  54. package/dist/config/v1/index.d.ts +11 -0
  55. package/dist/config/v1/index.d.ts.map +1 -0
  56. package/dist/config/v1/index.js +49 -0
  57. package/dist/config/v1/index.js.map +1 -0
  58. package/dist/config/v1/operations.d.ts +293 -0
  59. package/dist/config/v1/operations.d.ts.map +1 -0
  60. package/dist/config/v1/operations.js +172 -0
  61. package/dist/config/v1/operations.js.map +1 -0
  62. package/dist/config/v1/provider-config.d.ts +124 -0
  63. package/dist/config/v1/provider-config.d.ts.map +1 -0
  64. package/dist/config/v1/provider-config.js +123 -0
  65. package/dist/config/v1/provider-config.js.map +1 -0
  66. package/dist/constants.d.ts +292 -0
  67. package/dist/constants.d.ts.map +1 -0
  68. package/dist/constants.js +370 -0
  69. package/dist/constants.js.map +1 -0
  70. package/dist/context/v1/index.d.ts +5 -0
  71. package/dist/context/v1/index.d.ts.map +1 -0
  72. package/dist/context/v1/index.js +13 -0
  73. package/dist/context/v1/index.js.map +1 -0
  74. package/dist/context/v1/schema.d.ts +289 -0
  75. package/dist/context/v1/schema.d.ts.map +1 -0
  76. package/dist/context/v1/schema.js +145 -0
  77. package/dist/context/v1/schema.js.map +1 -0
  78. package/dist/cross-cutting/v1/dead-letter.d.ts +305 -0
  79. package/dist/cross-cutting/v1/dead-letter.d.ts.map +1 -0
  80. package/dist/cross-cutting/v1/dead-letter.js +172 -0
  81. package/dist/cross-cutting/v1/dead-letter.js.map +1 -0
  82. package/dist/cross-cutting/v1/idempotency.d.ts +222 -0
  83. package/dist/cross-cutting/v1/idempotency.d.ts.map +1 -0
  84. package/dist/cross-cutting/v1/idempotency.js +170 -0
  85. package/dist/cross-cutting/v1/idempotency.js.map +1 -0
  86. package/dist/cross-cutting/v1/index.d.ts +14 -0
  87. package/dist/cross-cutting/v1/index.d.ts.map +1 -0
  88. package/dist/cross-cutting/v1/index.js +18 -0
  89. package/dist/cross-cutting/v1/index.js.map +1 -0
  90. package/dist/cross-cutting/v1/retention.d.ts +347 -0
  91. package/dist/cross-cutting/v1/retention.d.ts.map +1 -0
  92. package/dist/cross-cutting/v1/retention.js +178 -0
  93. package/dist/cross-cutting/v1/retention.js.map +1 -0
  94. package/dist/cross-cutting/v1/saga.d.ts +358 -0
  95. package/dist/cross-cutting/v1/saga.d.ts.map +1 -0
  96. package/dist/cross-cutting/v1/saga.js +219 -0
  97. package/dist/cross-cutting/v1/saga.js.map +1 -0
  98. package/dist/design/v1/index.d.ts +5 -0
  99. package/dist/design/v1/index.d.ts.map +1 -0
  100. package/dist/design/v1/index.js +5 -0
  101. package/dist/design/v1/index.js.map +1 -0
  102. package/dist/design/v1/schema.d.ts +748 -0
  103. package/dist/design/v1/schema.d.ts.map +1 -0
  104. package/dist/design/v1/schema.js +316 -0
  105. package/dist/design/v1/schema.js.map +1 -0
  106. package/dist/discussion/v1/index.d.ts +10 -0
  107. package/dist/discussion/v1/index.d.ts.map +1 -0
  108. package/dist/discussion/v1/index.js +21 -0
  109. package/dist/discussion/v1/index.js.map +1 -0
  110. package/dist/discussion/v1/schema.d.ts +1186 -0
  111. package/dist/discussion/v1/schema.d.ts.map +1 -0
  112. package/dist/discussion/v1/schema.js +560 -0
  113. package/dist/discussion/v1/schema.js.map +1 -0
  114. package/dist/file-system/v1/index.d.ts +7 -0
  115. package/dist/file-system/v1/index.d.ts.map +1 -0
  116. package/dist/file-system/v1/index.js +7 -0
  117. package/dist/file-system/v1/index.js.map +1 -0
  118. package/dist/file-system/v1/schema.d.ts +644 -0
  119. package/dist/file-system/v1/schema.d.ts.map +1 -0
  120. package/dist/file-system/v1/schema.js +278 -0
  121. package/dist/file-system/v1/schema.js.map +1 -0
  122. package/dist/guard/v1/index.d.ts +9 -0
  123. package/dist/guard/v1/index.d.ts.map +1 -0
  124. package/dist/guard/v1/index.js +10 -0
  125. package/dist/guard/v1/index.js.map +1 -0
  126. package/dist/guard/v1/schema.d.ts +308 -0
  127. package/dist/guard/v1/schema.d.ts.map +1 -0
  128. package/dist/guard/v1/schema.js +267 -0
  129. package/dist/guard/v1/schema.js.map +1 -0
  130. package/dist/index.d.ts +68 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/index.js +117 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/iterate/v1/index.d.ts +5 -0
  135. package/dist/iterate/v1/index.d.ts.map +1 -0
  136. package/dist/iterate/v1/index.js +13 -0
  137. package/dist/iterate/v1/index.js.map +1 -0
  138. package/dist/iterate/v1/schema.d.ts +693 -0
  139. package/dist/iterate/v1/schema.d.ts.map +1 -0
  140. package/dist/iterate/v1/schema.js +244 -0
  141. package/dist/iterate/v1/schema.js.map +1 -0
  142. package/dist/mcp/v1/index.d.ts +8 -0
  143. package/dist/mcp/v1/index.d.ts.map +1 -0
  144. package/dist/mcp/v1/index.js +20 -0
  145. package/dist/mcp/v1/index.js.map +1 -0
  146. package/dist/mcp/v1/prompts/index.d.ts +5 -0
  147. package/dist/mcp/v1/prompts/index.d.ts.map +1 -0
  148. package/dist/mcp/v1/prompts/index.js +5 -0
  149. package/dist/mcp/v1/prompts/index.js.map +1 -0
  150. package/dist/mcp/v1/prompts/schema.d.ts +266 -0
  151. package/dist/mcp/v1/prompts/schema.d.ts.map +1 -0
  152. package/dist/mcp/v1/prompts/schema.js +138 -0
  153. package/dist/mcp/v1/prompts/schema.js.map +1 -0
  154. package/dist/mcp/v1/rate-limit.schema.d.ts +175 -0
  155. package/dist/mcp/v1/rate-limit.schema.d.ts.map +1 -0
  156. package/dist/mcp/v1/rate-limit.schema.js +164 -0
  157. package/dist/mcp/v1/rate-limit.schema.js.map +1 -0
  158. package/dist/mcp/v1/resources/index.d.ts +5 -0
  159. package/dist/mcp/v1/resources/index.d.ts.map +1 -0
  160. package/dist/mcp/v1/resources/index.js +5 -0
  161. package/dist/mcp/v1/resources/index.js.map +1 -0
  162. package/dist/mcp/v1/resources/schema.d.ts +169 -0
  163. package/dist/mcp/v1/resources/schema.d.ts.map +1 -0
  164. package/dist/mcp/v1/resources/schema.js +118 -0
  165. package/dist/mcp/v1/resources/schema.js.map +1 -0
  166. package/dist/mcp/v1/runtime/cache.d.ts +204 -0
  167. package/dist/mcp/v1/runtime/cache.d.ts.map +1 -0
  168. package/dist/mcp/v1/runtime/cache.js +92 -0
  169. package/dist/mcp/v1/runtime/cache.js.map +1 -0
  170. package/dist/mcp/v1/runtime/index.d.ts +5 -0
  171. package/dist/mcp/v1/runtime/index.d.ts.map +1 -0
  172. package/dist/mcp/v1/runtime/index.js +9 -0
  173. package/dist/mcp/v1/runtime/index.js.map +1 -0
  174. package/dist/mcp/v1/runtime/limits.d.ts +113 -0
  175. package/dist/mcp/v1/runtime/limits.d.ts.map +1 -0
  176. package/dist/mcp/v1/runtime/limits.js +95 -0
  177. package/dist/mcp/v1/runtime/limits.js.map +1 -0
  178. package/dist/mcp/v1/runtime/response.d.ts +467 -0
  179. package/dist/mcp/v1/runtime/response.d.ts.map +1 -0
  180. package/dist/mcp/v1/runtime/response.js +130 -0
  181. package/dist/mcp/v1/runtime/response.js.map +1 -0
  182. package/dist/mcp/v1/runtime/timeout.d.ts +116 -0
  183. package/dist/mcp/v1/runtime/timeout.d.ts.map +1 -0
  184. package/dist/mcp/v1/runtime/timeout.js +116 -0
  185. package/dist/mcp/v1/runtime/timeout.js.map +1 -0
  186. package/dist/mcp/v1/schema.d.ts +171 -0
  187. package/dist/mcp/v1/schema.d.ts.map +1 -0
  188. package/dist/mcp/v1/schema.js +97 -0
  189. package/dist/mcp/v1/schema.js.map +1 -0
  190. package/dist/mcp/v1/tools/agent.d.ts +485 -0
  191. package/dist/mcp/v1/tools/agent.d.ts.map +1 -0
  192. package/dist/mcp/v1/tools/agent.js +264 -0
  193. package/dist/mcp/v1/tools/agent.js.map +1 -0
  194. package/dist/mcp/v1/tools/guard.d.ts +243 -0
  195. package/dist/mcp/v1/tools/guard.d.ts.map +1 -0
  196. package/dist/mcp/v1/tools/guard.js +136 -0
  197. package/dist/mcp/v1/tools/guard.js.map +1 -0
  198. package/dist/mcp/v1/tools/index.d.ts +15 -0
  199. package/dist/mcp/v1/tools/index.d.ts.map +1 -0
  200. package/dist/mcp/v1/tools/index.js +22 -0
  201. package/dist/mcp/v1/tools/index.js.map +1 -0
  202. package/dist/mcp/v1/tools/memory.d.ts +569 -0
  203. package/dist/mcp/v1/tools/memory.d.ts.map +1 -0
  204. package/dist/mcp/v1/tools/memory.js +319 -0
  205. package/dist/mcp/v1/tools/memory.js.map +1 -0
  206. package/dist/mcp/v1/tools/session.d.ts +545 -0
  207. package/dist/mcp/v1/tools/session.d.ts.map +1 -0
  208. package/dist/mcp/v1/tools/session.js +309 -0
  209. package/dist/mcp/v1/tools/session.js.map +1 -0
  210. package/dist/mcp/v1/tools/tool-list-schemas.d.ts +354 -0
  211. package/dist/mcp/v1/tools/tool-list-schemas.d.ts.map +1 -0
  212. package/dist/mcp/v1/tools/tool-list-schemas.js +140 -0
  213. package/dist/mcp/v1/tools/tool-list-schemas.js.map +1 -0
  214. package/dist/mcp/v1/tools/trace.d.ts +282 -0
  215. package/dist/mcp/v1/tools/trace.d.ts.map +1 -0
  216. package/dist/mcp/v1/tools/trace.js +94 -0
  217. package/dist/mcp/v1/tools/trace.js.map +1 -0
  218. package/dist/mcp/v1/tools/workflow.d.ts +146 -0
  219. package/dist/mcp/v1/tools/workflow.d.ts.map +1 -0
  220. package/dist/mcp/v1/tools/workflow.js +68 -0
  221. package/dist/mcp/v1/tools/workflow.js.map +1 -0
  222. package/dist/mcp/v1/trace/index.d.ts +5 -0
  223. package/dist/mcp/v1/trace/index.d.ts.map +1 -0
  224. package/dist/mcp/v1/trace/index.js +5 -0
  225. package/dist/mcp/v1/trace/index.js.map +1 -0
  226. package/dist/mcp/v1/trace/tool-trace.d.ts +107 -0
  227. package/dist/mcp/v1/trace/tool-trace.d.ts.map +1 -0
  228. package/dist/mcp/v1/trace/tool-trace.js +91 -0
  229. package/dist/mcp/v1/trace/tool-trace.js.map +1 -0
  230. package/dist/memory/v1/index.d.ts +2 -0
  231. package/dist/memory/v1/index.d.ts.map +1 -0
  232. package/dist/memory/v1/index.js +2 -0
  233. package/dist/memory/v1/index.js.map +1 -0
  234. package/dist/memory/v1/schema.d.ts +188 -0
  235. package/dist/memory/v1/schema.d.ts.map +1 -0
  236. package/dist/memory/v1/schema.js +108 -0
  237. package/dist/memory/v1/schema.js.map +1 -0
  238. package/dist/ml-lifecycle/v1/index.d.ts +12 -0
  239. package/dist/ml-lifecycle/v1/index.d.ts.map +1 -0
  240. package/dist/ml-lifecycle/v1/index.js +12 -0
  241. package/dist/ml-lifecycle/v1/index.js.map +1 -0
  242. package/dist/ml-lifecycle/v1/schema.d.ts +1207 -0
  243. package/dist/ml-lifecycle/v1/schema.d.ts.map +1 -0
  244. package/dist/ml-lifecycle/v1/schema.js +481 -0
  245. package/dist/ml-lifecycle/v1/schema.js.map +1 -0
  246. package/dist/orchestration/v1/index.d.ts +5 -0
  247. package/dist/orchestration/v1/index.d.ts.map +1 -0
  248. package/dist/orchestration/v1/index.js +23 -0
  249. package/dist/orchestration/v1/index.js.map +1 -0
  250. package/dist/orchestration/v1/schema.d.ts +1384 -0
  251. package/dist/orchestration/v1/schema.d.ts.map +1 -0
  252. package/dist/orchestration/v1/schema.js +394 -0
  253. package/dist/orchestration/v1/schema.js.map +1 -0
  254. package/dist/provider/v1/circuit-breaker.d.ts +151 -0
  255. package/dist/provider/v1/circuit-breaker.d.ts.map +1 -0
  256. package/dist/provider/v1/circuit-breaker.js +119 -0
  257. package/dist/provider/v1/circuit-breaker.js.map +1 -0
  258. package/dist/provider/v1/health.d.ts +246 -0
  259. package/dist/provider/v1/health.d.ts.map +1 -0
  260. package/dist/provider/v1/health.js +190 -0
  261. package/dist/provider/v1/health.js.map +1 -0
  262. package/dist/provider/v1/index.d.ts +13 -0
  263. package/dist/provider/v1/index.d.ts.map +1 -0
  264. package/dist/provider/v1/index.js +17 -0
  265. package/dist/provider/v1/index.js.map +1 -0
  266. package/dist/provider/v1/port.d.ts +237 -0
  267. package/dist/provider/v1/port.d.ts.map +1 -0
  268. package/dist/provider/v1/port.js +113 -0
  269. package/dist/provider/v1/port.js.map +1 -0
  270. package/dist/provider/v1/rate-limit.d.ts +214 -0
  271. package/dist/provider/v1/rate-limit.d.ts.map +1 -0
  272. package/dist/provider/v1/rate-limit.js +165 -0
  273. package/dist/provider/v1/rate-limit.js.map +1 -0
  274. package/dist/resilience/v1/circuit-breaker.d.ts +135 -0
  275. package/dist/resilience/v1/circuit-breaker.d.ts.map +1 -0
  276. package/dist/resilience/v1/circuit-breaker.js +105 -0
  277. package/dist/resilience/v1/circuit-breaker.js.map +1 -0
  278. package/dist/resilience/v1/index.d.ts +17 -0
  279. package/dist/resilience/v1/index.d.ts.map +1 -0
  280. package/dist/resilience/v1/index.js +17 -0
  281. package/dist/resilience/v1/index.js.map +1 -0
  282. package/dist/resilience/v1/loop-guard.d.ts +123 -0
  283. package/dist/resilience/v1/loop-guard.d.ts.map +1 -0
  284. package/dist/resilience/v1/loop-guard.js +96 -0
  285. package/dist/resilience/v1/loop-guard.js.map +1 -0
  286. package/dist/resilience/v1/metrics.d.ts +323 -0
  287. package/dist/resilience/v1/metrics.d.ts.map +1 -0
  288. package/dist/resilience/v1/metrics.js +183 -0
  289. package/dist/resilience/v1/metrics.js.map +1 -0
  290. package/dist/resilience/v1/rate-limiter.d.ts +122 -0
  291. package/dist/resilience/v1/rate-limiter.d.ts.map +1 -0
  292. package/dist/resilience/v1/rate-limiter.js +119 -0
  293. package/dist/resilience/v1/rate-limiter.js.map +1 -0
  294. package/dist/resilience/v1/resource-limits.d.ts +146 -0
  295. package/dist/resilience/v1/resource-limits.d.ts.map +1 -0
  296. package/dist/resilience/v1/resource-limits.js +130 -0
  297. package/dist/resilience/v1/resource-limits.js.map +1 -0
  298. package/dist/review/v1/index.d.ts +7 -0
  299. package/dist/review/v1/index.d.ts.map +1 -0
  300. package/dist/review/v1/index.js +23 -0
  301. package/dist/review/v1/index.js.map +1 -0
  302. package/dist/review/v1/schema.d.ts +1284 -0
  303. package/dist/review/v1/schema.d.ts.map +1 -0
  304. package/dist/review/v1/schema.js +423 -0
  305. package/dist/review/v1/schema.js.map +1 -0
  306. package/dist/routing/v1/index.d.ts +2 -0
  307. package/dist/routing/v1/index.d.ts.map +1 -0
  308. package/dist/routing/v1/index.js +2 -0
  309. package/dist/routing/v1/index.js.map +1 -0
  310. package/dist/routing/v1/schema.d.ts +315 -0
  311. package/dist/routing/v1/schema.d.ts.map +1 -0
  312. package/dist/routing/v1/schema.js +103 -0
  313. package/dist/routing/v1/schema.js.map +1 -0
  314. package/dist/scaffold/v1/index.d.ts +7 -0
  315. package/dist/scaffold/v1/index.d.ts.map +1 -0
  316. package/dist/scaffold/v1/index.js +7 -0
  317. package/dist/scaffold/v1/index.js.map +1 -0
  318. package/dist/scaffold/v1/schema.d.ts +351 -0
  319. package/dist/scaffold/v1/schema.d.ts.map +1 -0
  320. package/dist/scaffold/v1/schema.js +238 -0
  321. package/dist/scaffold/v1/schema.js.map +1 -0
  322. package/dist/session/v1/index.d.ts +7 -0
  323. package/dist/session/v1/index.d.ts.map +1 -0
  324. package/dist/session/v1/index.js +23 -0
  325. package/dist/session/v1/index.js.map +1 -0
  326. package/dist/session/v1/schema.d.ts +1156 -0
  327. package/dist/session/v1/schema.d.ts.map +1 -0
  328. package/dist/session/v1/schema.js +315 -0
  329. package/dist/session/v1/schema.js.map +1 -0
  330. package/dist/storage/v1/index.d.ts +9 -0
  331. package/dist/storage/v1/index.d.ts.map +1 -0
  332. package/dist/storage/v1/index.js +21 -0
  333. package/dist/storage/v1/index.js.map +1 -0
  334. package/dist/storage/v1/schema.d.ts +411 -0
  335. package/dist/storage/v1/schema.d.ts.map +1 -0
  336. package/dist/storage/v1/schema.js +167 -0
  337. package/dist/storage/v1/schema.js.map +1 -0
  338. package/dist/telemetry/v1/index.d.ts +5 -0
  339. package/dist/telemetry/v1/index.d.ts.map +1 -0
  340. package/dist/telemetry/v1/index.js +5 -0
  341. package/dist/telemetry/v1/index.js.map +1 -0
  342. package/dist/telemetry/v1/schema.d.ts +747 -0
  343. package/dist/telemetry/v1/schema.d.ts.map +1 -0
  344. package/dist/telemetry/v1/schema.js +300 -0
  345. package/dist/telemetry/v1/schema.js.map +1 -0
  346. package/dist/token-budget/v1/index.d.ts +7 -0
  347. package/dist/token-budget/v1/index.d.ts.map +1 -0
  348. package/dist/token-budget/v1/index.js +25 -0
  349. package/dist/token-budget/v1/index.js.map +1 -0
  350. package/dist/token-budget/v1/schema.d.ts +588 -0
  351. package/dist/token-budget/v1/schema.d.ts.map +1 -0
  352. package/dist/token-budget/v1/schema.js +239 -0
  353. package/dist/token-budget/v1/schema.js.map +1 -0
  354. package/dist/trace/v1/index.d.ts +2 -0
  355. package/dist/trace/v1/index.d.ts.map +1 -0
  356. package/dist/trace/v1/index.js +4 -0
  357. package/dist/trace/v1/index.js.map +1 -0
  358. package/dist/trace/v1/schema.d.ts +531 -0
  359. package/dist/trace/v1/schema.d.ts.map +1 -0
  360. package/dist/trace/v1/schema.js +243 -0
  361. package/dist/trace/v1/schema.js.map +1 -0
  362. package/dist/workflow/v1/index.d.ts +3 -0
  363. package/dist/workflow/v1/index.d.ts.map +1 -0
  364. package/dist/workflow/v1/index.js +8 -0
  365. package/dist/workflow/v1/index.js.map +1 -0
  366. package/dist/workflow/v1/schema.d.ts +267 -0
  367. package/dist/workflow/v1/schema.d.ts.map +1 -0
  368. package/dist/workflow/v1/schema.js +95 -0
  369. package/dist/workflow/v1/schema.js.map +1 -0
  370. package/dist/workflow/v1/step-guard.d.ts +571 -0
  371. package/dist/workflow/v1/step-guard.d.ts.map +1 -0
  372. package/dist/workflow/v1/step-guard.js +305 -0
  373. package/dist/workflow/v1/step-guard.js.map +1 -0
  374. package/dist/workflow-templates/v1/index.d.ts +8 -0
  375. package/dist/workflow-templates/v1/index.d.ts.map +1 -0
  376. package/dist/workflow-templates/v1/index.js +8 -0
  377. package/dist/workflow-templates/v1/index.js.map +1 -0
  378. package/dist/workflow-templates/v1/schema.d.ts +714 -0
  379. package/dist/workflow-templates/v1/schema.d.ts.map +1 -0
  380. package/dist/workflow-templates/v1/schema.js +168 -0
  381. package/dist/workflow-templates/v1/schema.js.map +1 -0
  382. package/package.json +142 -0
  383. package/src/guard/v1/policy.schema.json +56 -0
  384. package/src/mcp/v1/tools.schema.json +108 -0
  385. package/src/memory/v1/event.schema.json +136 -0
  386. package/src/routing/v1/decision.schema.json +155 -0
  387. package/src/trace/v1/event.schema.json +197 -0
  388. package/src/workflow/v1/workflow.schema.json +142 -0
@@ -0,0 +1,1186 @@
1
+ /**
2
+ * Discussion Domain Contracts v1
3
+ *
4
+ * Zod schemas for multi-model discussions enabling Claude, GLM, Qwen,
5
+ * Gemini, Codex, and Grok to collaborate on complex problems.
6
+ *
7
+ * @module @defai.digital/contracts/discussion/v1
8
+ */
9
+ import { z } from 'zod';
10
+ /** Maximum number of providers in a discussion */
11
+ export declare const MAX_PROVIDERS = 6;
12
+ /** Minimum number of providers in a discussion */
13
+ export declare const MIN_PROVIDERS = 2;
14
+ /** Maximum discussion rounds */
15
+ export declare const MAX_ROUNDS = 10;
16
+ /** Default discussion rounds */
17
+ export declare const DEFAULT_ROUNDS = 2;
18
+ /** Default provider timeout in ms */
19
+ export declare const DEFAULT_PROVIDER_TIMEOUT = 60000;
20
+ /** Maximum provider timeout in ms */
21
+ export declare const MAX_PROVIDER_TIMEOUT = 300000;
22
+ /** Default providers for discussions */
23
+ export declare const DEFAULT_PROVIDERS: readonly ["claude", "glm", "qwen", "gemini"];
24
+ /**
25
+ * Discussion patterns supported by the system
26
+ *
27
+ * Invariants:
28
+ * - INV-DISC-001: Pattern determines execution flow
29
+ * - INV-DISC-002: All patterns produce a final synthesis
30
+ */
31
+ export declare const DiscussionPatternSchema: z.ZodEnum<["round-robin", "debate", "critique", "voting", "synthesis"]>;
32
+ export type DiscussionPattern = z.infer<typeof DiscussionPatternSchema>;
33
+ /** Pattern descriptions for documentation/help */
34
+ export declare const PATTERN_DESCRIPTIONS: Record<DiscussionPattern, string>;
35
+ /**
36
+ * Consensus method for combining model outputs
37
+ */
38
+ export declare const ConsensusMethodSchema: z.ZodEnum<["synthesis", "voting", "moderator", "unanimous", "majority"]>;
39
+ export type ConsensusMethod = z.infer<typeof ConsensusMethodSchema>;
40
+ /**
41
+ * Consensus configuration
42
+ *
43
+ * Invariants:
44
+ * - INV-DISC-003: Moderator/synthesizer required when method needs it
45
+ * - INV-DISC-004: Threshold must be 0-1 for voting methods
46
+ */
47
+ export declare const ConsensusConfigSchema: z.ZodEffects<z.ZodObject<{
48
+ /** How to reach consensus */
49
+ method: z.ZodDefault<z.ZodEnum<["synthesis", "voting", "moderator", "unanimous", "majority"]>>;
50
+ /** Provider to synthesize/moderate (required for synthesis/moderator) */
51
+ synthesizer: z.ZodOptional<z.ZodString>;
52
+ /** Confidence threshold for voting (0-1) */
53
+ threshold: z.ZodDefault<z.ZodNumber>;
54
+ /** Whether to include dissenting opinions in output */
55
+ includeDissent: z.ZodDefault<z.ZodBoolean>;
56
+ /** Custom synthesis prompt */
57
+ synthesisPrompt: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
60
+ threshold: number;
61
+ includeDissent: boolean;
62
+ synthesizer?: string | undefined;
63
+ synthesisPrompt?: string | undefined;
64
+ }, {
65
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
66
+ threshold?: number | undefined;
67
+ synthesizer?: string | undefined;
68
+ includeDissent?: boolean | undefined;
69
+ synthesisPrompt?: string | undefined;
70
+ }>, {
71
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
72
+ threshold: number;
73
+ includeDissent: boolean;
74
+ synthesizer?: string | undefined;
75
+ synthesisPrompt?: string | undefined;
76
+ }, {
77
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
78
+ threshold?: number | undefined;
79
+ synthesizer?: string | undefined;
80
+ includeDissent?: boolean | undefined;
81
+ synthesisPrompt?: string | undefined;
82
+ }>;
83
+ export type ConsensusConfig = z.infer<typeof ConsensusConfigSchema>;
84
+ /**
85
+ * Role assignment for debate pattern
86
+ */
87
+ export declare const DebateRoleSchema: z.ZodEnum<["proponent", "opponent", "judge", "moderator", "neutral"]>;
88
+ export type DebateRole = z.infer<typeof DebateRoleSchema>;
89
+ /**
90
+ * Provider role assignment
91
+ */
92
+ export declare const RoleAssignmentSchema: z.ZodRecord<z.ZodString, z.ZodEnum<["proponent", "opponent", "judge", "moderator", "neutral"]>>;
93
+ export type RoleAssignment = z.infer<typeof RoleAssignmentSchema>;
94
+ /**
95
+ * Provider capability areas
96
+ */
97
+ export declare const ProviderCapabilitySchema: z.ZodEnum<["reasoning", "coding", "agentic", "research", "writing", "math", "ocr", "translation", "multilingual", "realtime", "tool-use", "long-context"]>;
98
+ export type ProviderCapability = z.infer<typeof ProviderCapabilitySchema>;
99
+ /**
100
+ * Provider strength mapping (for routing decisions)
101
+ */
102
+ export declare const PROVIDER_STRENGTHS: Record<string, ProviderCapability[]>;
103
+ /**
104
+ * Configuration for a discuss workflow step
105
+ *
106
+ * Invariants:
107
+ * - INV-DISC-005: At least 2 providers required
108
+ * - INV-DISC-006: Max 6 providers per discussion
109
+ * - INV-DISC-007: Rounds between 1-10
110
+ * - INV-DISC-008: Debate pattern requires role assignments
111
+ */
112
+ export declare const DiscussStepConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
113
+ /** Discussion pattern to use */
114
+ pattern: z.ZodDefault<z.ZodEnum<["round-robin", "debate", "critique", "voting", "synthesis"]>>;
115
+ /** Number of discussion rounds */
116
+ rounds: z.ZodDefault<z.ZodNumber>;
117
+ /** Providers to participate in discussion */
118
+ providers: z.ZodArray<z.ZodString, "many">;
119
+ /** Main discussion prompt/topic */
120
+ prompt: z.ZodString;
121
+ /** Provider-specific prompt overrides */
122
+ providerPrompts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
123
+ /** Role assignments (required for debate pattern) */
124
+ roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["proponent", "opponent", "judge", "moderator", "neutral"]>>>;
125
+ /** Consensus configuration */
126
+ consensus: z.ZodDefault<z.ZodEffects<z.ZodObject<{
127
+ /** How to reach consensus */
128
+ method: z.ZodDefault<z.ZodEnum<["synthesis", "voting", "moderator", "unanimous", "majority"]>>;
129
+ /** Provider to synthesize/moderate (required for synthesis/moderator) */
130
+ synthesizer: z.ZodOptional<z.ZodString>;
131
+ /** Confidence threshold for voting (0-1) */
132
+ threshold: z.ZodDefault<z.ZodNumber>;
133
+ /** Whether to include dissenting opinions in output */
134
+ includeDissent: z.ZodDefault<z.ZodBoolean>;
135
+ /** Custom synthesis prompt */
136
+ synthesisPrompt: z.ZodOptional<z.ZodString>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
139
+ threshold: number;
140
+ includeDissent: boolean;
141
+ synthesizer?: string | undefined;
142
+ synthesisPrompt?: string | undefined;
143
+ }, {
144
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
145
+ threshold?: number | undefined;
146
+ synthesizer?: string | undefined;
147
+ includeDissent?: boolean | undefined;
148
+ synthesisPrompt?: string | undefined;
149
+ }>, {
150
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
151
+ threshold: number;
152
+ includeDissent: boolean;
153
+ synthesizer?: string | undefined;
154
+ synthesisPrompt?: string | undefined;
155
+ }, {
156
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
157
+ threshold?: number | undefined;
158
+ synthesizer?: string | undefined;
159
+ includeDissent?: boolean | undefined;
160
+ synthesisPrompt?: string | undefined;
161
+ }>>;
162
+ /** Timeout per provider response in ms */
163
+ providerTimeout: z.ZodDefault<z.ZodNumber>;
164
+ /** Whether to continue if a provider fails */
165
+ continueOnProviderFailure: z.ZodDefault<z.ZodBoolean>;
166
+ /** Minimum providers required to succeed */
167
+ minProviders: z.ZodDefault<z.ZodNumber>;
168
+ /** Temperature for responses (0-2) */
169
+ temperature: z.ZodDefault<z.ZodNumber>;
170
+ /** Enable verbose output with all perspectives */
171
+ verbose: z.ZodDefault<z.ZodBoolean>;
172
+ /** Additional context for all providers */
173
+ context: z.ZodOptional<z.ZodString>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ prompt: string;
176
+ pattern: "round-robin" | "debate" | "critique" | "voting" | "synthesis";
177
+ providers: string[];
178
+ rounds: number;
179
+ temperature: number;
180
+ verbose: boolean;
181
+ consensus: {
182
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
183
+ threshold: number;
184
+ includeDissent: boolean;
185
+ synthesizer?: string | undefined;
186
+ synthesisPrompt?: string | undefined;
187
+ };
188
+ providerTimeout: number;
189
+ continueOnProviderFailure: boolean;
190
+ minProviders: number;
191
+ context?: string | undefined;
192
+ providerPrompts?: Record<string, string> | undefined;
193
+ roles?: Record<string, "moderator" | "proponent" | "opponent" | "judge" | "neutral"> | undefined;
194
+ }, {
195
+ prompt: string;
196
+ providers: string[];
197
+ context?: string | undefined;
198
+ pattern?: "round-robin" | "debate" | "critique" | "voting" | "synthesis" | undefined;
199
+ rounds?: number | undefined;
200
+ temperature?: number | undefined;
201
+ verbose?: boolean | undefined;
202
+ providerPrompts?: Record<string, string> | undefined;
203
+ roles?: Record<string, "moderator" | "proponent" | "opponent" | "judge" | "neutral"> | undefined;
204
+ consensus?: {
205
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
206
+ threshold?: number | undefined;
207
+ synthesizer?: string | undefined;
208
+ includeDissent?: boolean | undefined;
209
+ synthesisPrompt?: string | undefined;
210
+ } | undefined;
211
+ providerTimeout?: number | undefined;
212
+ continueOnProviderFailure?: boolean | undefined;
213
+ minProviders?: number | undefined;
214
+ }>, {
215
+ prompt: string;
216
+ pattern: "round-robin" | "debate" | "critique" | "voting" | "synthesis";
217
+ providers: string[];
218
+ rounds: number;
219
+ temperature: number;
220
+ verbose: boolean;
221
+ consensus: {
222
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
223
+ threshold: number;
224
+ includeDissent: boolean;
225
+ synthesizer?: string | undefined;
226
+ synthesisPrompt?: string | undefined;
227
+ };
228
+ providerTimeout: number;
229
+ continueOnProviderFailure: boolean;
230
+ minProviders: number;
231
+ context?: string | undefined;
232
+ providerPrompts?: Record<string, string> | undefined;
233
+ roles?: Record<string, "moderator" | "proponent" | "opponent" | "judge" | "neutral"> | undefined;
234
+ }, {
235
+ prompt: string;
236
+ providers: string[];
237
+ context?: string | undefined;
238
+ pattern?: "round-robin" | "debate" | "critique" | "voting" | "synthesis" | undefined;
239
+ rounds?: number | undefined;
240
+ temperature?: number | undefined;
241
+ verbose?: boolean | undefined;
242
+ providerPrompts?: Record<string, string> | undefined;
243
+ roles?: Record<string, "moderator" | "proponent" | "opponent" | "judge" | "neutral"> | undefined;
244
+ consensus?: {
245
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
246
+ threshold?: number | undefined;
247
+ synthesizer?: string | undefined;
248
+ includeDissent?: boolean | undefined;
249
+ synthesisPrompt?: string | undefined;
250
+ } | undefined;
251
+ providerTimeout?: number | undefined;
252
+ continueOnProviderFailure?: boolean | undefined;
253
+ minProviders?: number | undefined;
254
+ }>, {
255
+ prompt: string;
256
+ pattern: "round-robin" | "debate" | "critique" | "voting" | "synthesis";
257
+ providers: string[];
258
+ rounds: number;
259
+ temperature: number;
260
+ verbose: boolean;
261
+ consensus: {
262
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
263
+ threshold: number;
264
+ includeDissent: boolean;
265
+ synthesizer?: string | undefined;
266
+ synthesisPrompt?: string | undefined;
267
+ };
268
+ providerTimeout: number;
269
+ continueOnProviderFailure: boolean;
270
+ minProviders: number;
271
+ context?: string | undefined;
272
+ providerPrompts?: Record<string, string> | undefined;
273
+ roles?: Record<string, "moderator" | "proponent" | "opponent" | "judge" | "neutral"> | undefined;
274
+ }, {
275
+ prompt: string;
276
+ providers: string[];
277
+ context?: string | undefined;
278
+ pattern?: "round-robin" | "debate" | "critique" | "voting" | "synthesis" | undefined;
279
+ rounds?: number | undefined;
280
+ temperature?: number | undefined;
281
+ verbose?: boolean | undefined;
282
+ providerPrompts?: Record<string, string> | undefined;
283
+ roles?: Record<string, "moderator" | "proponent" | "opponent" | "judge" | "neutral"> | undefined;
284
+ consensus?: {
285
+ method?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
286
+ threshold?: number | undefined;
287
+ synthesizer?: string | undefined;
288
+ includeDissent?: boolean | undefined;
289
+ synthesisPrompt?: string | undefined;
290
+ } | undefined;
291
+ providerTimeout?: number | undefined;
292
+ continueOnProviderFailure?: boolean | undefined;
293
+ minProviders?: number | undefined;
294
+ }>;
295
+ export type DiscussStepConfig = z.infer<typeof DiscussStepConfigSchema>;
296
+ /**
297
+ * Single provider's response in a discussion
298
+ * Named DiscussionProviderResponseSchema to avoid conflict with provider/v1 ProviderResponseSchema
299
+ */
300
+ export declare const DiscussionProviderResponseSchema: z.ZodObject<{
301
+ /** Provider that generated this response */
302
+ provider: z.ZodString;
303
+ /** Response content */
304
+ content: z.ZodString;
305
+ /** Round number (1-indexed) */
306
+ round: z.ZodNumber;
307
+ /** Role in discussion (if applicable) */
308
+ role: z.ZodOptional<z.ZodEnum<["proponent", "opponent", "judge", "moderator", "neutral"]>>;
309
+ /** Confidence score (0-1) for voting */
310
+ confidence: z.ZodOptional<z.ZodNumber>;
311
+ /** Vote choice (for voting pattern) */
312
+ vote: z.ZodOptional<z.ZodString>;
313
+ /** Response timestamp */
314
+ timestamp: z.ZodString;
315
+ /** Duration in ms */
316
+ durationMs: z.ZodNumber;
317
+ /** Token count (if available) */
318
+ tokenCount: z.ZodOptional<z.ZodNumber>;
319
+ /** Whether response was truncated */
320
+ truncated: z.ZodOptional<z.ZodBoolean>;
321
+ /** Error if response failed */
322
+ error: z.ZodOptional<z.ZodString>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ timestamp: string;
325
+ durationMs: number;
326
+ content: string;
327
+ provider: string;
328
+ round: number;
329
+ error?: string | undefined;
330
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
331
+ tokenCount?: number | undefined;
332
+ truncated?: boolean | undefined;
333
+ confidence?: number | undefined;
334
+ vote?: string | undefined;
335
+ }, {
336
+ timestamp: string;
337
+ durationMs: number;
338
+ content: string;
339
+ provider: string;
340
+ round: number;
341
+ error?: string | undefined;
342
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
343
+ tokenCount?: number | undefined;
344
+ truncated?: boolean | undefined;
345
+ confidence?: number | undefined;
346
+ vote?: string | undefined;
347
+ }>;
348
+ export type DiscussionProviderResponse = z.infer<typeof DiscussionProviderResponseSchema>;
349
+ /**
350
+ * Discussion round containing all provider responses
351
+ */
352
+ export declare const DiscussionRoundSchema: z.ZodObject<{
353
+ /** Round number (1-indexed) */
354
+ roundNumber: z.ZodNumber;
355
+ /** Responses from each provider */
356
+ responses: z.ZodArray<z.ZodObject<{
357
+ /** Provider that generated this response */
358
+ provider: z.ZodString;
359
+ /** Response content */
360
+ content: z.ZodString;
361
+ /** Round number (1-indexed) */
362
+ round: z.ZodNumber;
363
+ /** Role in discussion (if applicable) */
364
+ role: z.ZodOptional<z.ZodEnum<["proponent", "opponent", "judge", "moderator", "neutral"]>>;
365
+ /** Confidence score (0-1) for voting */
366
+ confidence: z.ZodOptional<z.ZodNumber>;
367
+ /** Vote choice (for voting pattern) */
368
+ vote: z.ZodOptional<z.ZodString>;
369
+ /** Response timestamp */
370
+ timestamp: z.ZodString;
371
+ /** Duration in ms */
372
+ durationMs: z.ZodNumber;
373
+ /** Token count (if available) */
374
+ tokenCount: z.ZodOptional<z.ZodNumber>;
375
+ /** Whether response was truncated */
376
+ truncated: z.ZodOptional<z.ZodBoolean>;
377
+ /** Error if response failed */
378
+ error: z.ZodOptional<z.ZodString>;
379
+ }, "strip", z.ZodTypeAny, {
380
+ timestamp: string;
381
+ durationMs: number;
382
+ content: string;
383
+ provider: string;
384
+ round: number;
385
+ error?: string | undefined;
386
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
387
+ tokenCount?: number | undefined;
388
+ truncated?: boolean | undefined;
389
+ confidence?: number | undefined;
390
+ vote?: string | undefined;
391
+ }, {
392
+ timestamp: string;
393
+ durationMs: number;
394
+ content: string;
395
+ provider: string;
396
+ round: number;
397
+ error?: string | undefined;
398
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
399
+ tokenCount?: number | undefined;
400
+ truncated?: boolean | undefined;
401
+ confidence?: number | undefined;
402
+ vote?: string | undefined;
403
+ }>, "many">;
404
+ /** Round summary (if generated) */
405
+ summary: z.ZodOptional<z.ZodString>;
406
+ /** Round duration in ms */
407
+ durationMs: z.ZodNumber;
408
+ }, "strip", z.ZodTypeAny, {
409
+ durationMs: number;
410
+ roundNumber: number;
411
+ responses: {
412
+ timestamp: string;
413
+ durationMs: number;
414
+ content: string;
415
+ provider: string;
416
+ round: number;
417
+ error?: string | undefined;
418
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
419
+ tokenCount?: number | undefined;
420
+ truncated?: boolean | undefined;
421
+ confidence?: number | undefined;
422
+ vote?: string | undefined;
423
+ }[];
424
+ summary?: string | undefined;
425
+ }, {
426
+ durationMs: number;
427
+ roundNumber: number;
428
+ responses: {
429
+ timestamp: string;
430
+ durationMs: number;
431
+ content: string;
432
+ provider: string;
433
+ round: number;
434
+ error?: string | undefined;
435
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
436
+ tokenCount?: number | undefined;
437
+ truncated?: boolean | undefined;
438
+ confidence?: number | undefined;
439
+ vote?: string | undefined;
440
+ }[];
441
+ summary?: string | undefined;
442
+ }>;
443
+ export type DiscussionRound = z.infer<typeof DiscussionRoundSchema>;
444
+ /**
445
+ * Vote record from a single provider
446
+ */
447
+ export declare const VoteRecordSchema: z.ZodObject<{
448
+ /** Provider that cast the vote */
449
+ provider: z.ZodString;
450
+ /** Selected option */
451
+ choice: z.ZodString;
452
+ /** Confidence in the vote (0-1) */
453
+ confidence: z.ZodNumber;
454
+ /** Reasoning for the vote */
455
+ reasoning: z.ZodOptional<z.ZodString>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ provider: string;
458
+ confidence: number;
459
+ choice: string;
460
+ reasoning?: string | undefined;
461
+ }, {
462
+ provider: string;
463
+ confidence: number;
464
+ choice: string;
465
+ reasoning?: string | undefined;
466
+ }>;
467
+ export type VoteRecord = z.infer<typeof VoteRecordSchema>;
468
+ /**
469
+ * Voting results summary
470
+ */
471
+ export declare const VotingResultsSchema: z.ZodObject<{
472
+ /** Winning option */
473
+ winner: z.ZodString;
474
+ /** Raw vote counts per option */
475
+ votes: z.ZodRecord<z.ZodString, z.ZodNumber>;
476
+ /** Confidence-weighted vote counts */
477
+ weightedVotes: z.ZodRecord<z.ZodString, z.ZodNumber>;
478
+ /** Individual vote records */
479
+ voteRecords: z.ZodArray<z.ZodObject<{
480
+ /** Provider that cast the vote */
481
+ provider: z.ZodString;
482
+ /** Selected option */
483
+ choice: z.ZodString;
484
+ /** Confidence in the vote (0-1) */
485
+ confidence: z.ZodNumber;
486
+ /** Reasoning for the vote */
487
+ reasoning: z.ZodOptional<z.ZodString>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ provider: string;
490
+ confidence: number;
491
+ choice: string;
492
+ reasoning?: string | undefined;
493
+ }, {
494
+ provider: string;
495
+ confidence: number;
496
+ choice: string;
497
+ reasoning?: string | undefined;
498
+ }>, "many">;
499
+ /** Whether result was unanimous */
500
+ unanimous: z.ZodBoolean;
501
+ /** Margin of victory */
502
+ margin: z.ZodNumber;
503
+ }, "strip", z.ZodTypeAny, {
504
+ winner: string;
505
+ votes: Record<string, number>;
506
+ unanimous: boolean;
507
+ weightedVotes: Record<string, number>;
508
+ voteRecords: {
509
+ provider: string;
510
+ confidence: number;
511
+ choice: string;
512
+ reasoning?: string | undefined;
513
+ }[];
514
+ margin: number;
515
+ }, {
516
+ winner: string;
517
+ votes: Record<string, number>;
518
+ unanimous: boolean;
519
+ weightedVotes: Record<string, number>;
520
+ voteRecords: {
521
+ provider: string;
522
+ confidence: number;
523
+ choice: string;
524
+ reasoning?: string | undefined;
525
+ }[];
526
+ margin: number;
527
+ }>;
528
+ export type VotingResults = z.infer<typeof VotingResultsSchema>;
529
+ /**
530
+ * Dissenting opinion record
531
+ */
532
+ export declare const DissentRecordSchema: z.ZodObject<{
533
+ /** Provider with dissenting view */
534
+ provider: z.ZodString;
535
+ /** Summary of dissenting position */
536
+ position: z.ZodString;
537
+ /** Key points of disagreement */
538
+ keyPoints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ position: string;
541
+ provider: string;
542
+ keyPoints?: string[] | undefined;
543
+ }, {
544
+ position: string;
545
+ provider: string;
546
+ keyPoints?: string[] | undefined;
547
+ }>;
548
+ export type DissentRecord = z.infer<typeof DissentRecordSchema>;
549
+ /**
550
+ * Consensus details
551
+ */
552
+ export declare const ConsensusResultSchema: z.ZodObject<{
553
+ /** Method used to reach consensus */
554
+ method: z.ZodEnum<["synthesis", "voting", "moderator", "unanimous", "majority"]>;
555
+ /** Provider that synthesized/moderated */
556
+ synthesizer: z.ZodOptional<z.ZodString>;
557
+ /** Agreement score (0-1, how much providers agreed) */
558
+ agreementScore: z.ZodOptional<z.ZodNumber>;
559
+ /** Areas of strong agreement */
560
+ agreements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
561
+ /** Dissenting opinions */
562
+ dissent: z.ZodOptional<z.ZodArray<z.ZodObject<{
563
+ /** Provider with dissenting view */
564
+ provider: z.ZodString;
565
+ /** Summary of dissenting position */
566
+ position: z.ZodString;
567
+ /** Key points of disagreement */
568
+ keyPoints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ position: string;
571
+ provider: string;
572
+ keyPoints?: string[] | undefined;
573
+ }, {
574
+ position: string;
575
+ provider: string;
576
+ keyPoints?: string[] | undefined;
577
+ }>, "many">>;
578
+ }, "strip", z.ZodTypeAny, {
579
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
580
+ synthesizer?: string | undefined;
581
+ agreementScore?: number | undefined;
582
+ agreements?: string[] | undefined;
583
+ dissent?: {
584
+ position: string;
585
+ provider: string;
586
+ keyPoints?: string[] | undefined;
587
+ }[] | undefined;
588
+ }, {
589
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
590
+ synthesizer?: string | undefined;
591
+ agreementScore?: number | undefined;
592
+ agreements?: string[] | undefined;
593
+ dissent?: {
594
+ position: string;
595
+ provider: string;
596
+ keyPoints?: string[] | undefined;
597
+ }[] | undefined;
598
+ }>;
599
+ export type ConsensusResult = z.infer<typeof ConsensusResultSchema>;
600
+ /**
601
+ * Discussion error details
602
+ */
603
+ export declare const DiscussionErrorSchema: z.ZodObject<{
604
+ /** Error code */
605
+ code: z.ZodString;
606
+ /** Human-readable message */
607
+ message: z.ZodString;
608
+ /** Provider that caused error (if applicable) */
609
+ provider: z.ZodOptional<z.ZodString>;
610
+ /** Whether error is retryable */
611
+ retryable: z.ZodOptional<z.ZodBoolean>;
612
+ }, "strip", z.ZodTypeAny, {
613
+ code: string;
614
+ message: string;
615
+ retryable?: boolean | undefined;
616
+ provider?: string | undefined;
617
+ }, {
618
+ code: string;
619
+ message: string;
620
+ retryable?: boolean | undefined;
621
+ provider?: string | undefined;
622
+ }>;
623
+ export type DiscussionError = z.infer<typeof DiscussionErrorSchema>;
624
+ /**
625
+ * Discussion metadata
626
+ */
627
+ export declare const DiscussionMetadataSchema: z.ZodObject<{
628
+ /** When discussion started */
629
+ startedAt: z.ZodString;
630
+ /** When discussion completed */
631
+ completedAt: z.ZodString;
632
+ /** Total tokens used (if available) */
633
+ totalTokens: z.ZodOptional<z.ZodNumber>;
634
+ /** Estimated cost in USD (if available) */
635
+ estimatedCost: z.ZodOptional<z.ZodNumber>;
636
+ /** Session ID if associated */
637
+ sessionId: z.ZodOptional<z.ZodString>;
638
+ /** Trace ID for debugging */
639
+ traceId: z.ZodOptional<z.ZodString>;
640
+ }, "strip", z.ZodTypeAny, {
641
+ completedAt: string;
642
+ startedAt: string;
643
+ sessionId?: string | undefined;
644
+ traceId?: string | undefined;
645
+ totalTokens?: number | undefined;
646
+ estimatedCost?: number | undefined;
647
+ }, {
648
+ completedAt: string;
649
+ startedAt: string;
650
+ sessionId?: string | undefined;
651
+ traceId?: string | undefined;
652
+ totalTokens?: number | undefined;
653
+ estimatedCost?: number | undefined;
654
+ }>;
655
+ export type DiscussionMetadata = z.infer<typeof DiscussionMetadataSchema>;
656
+ /**
657
+ * Complete discussion result
658
+ *
659
+ * Invariants:
660
+ * - INV-DISC-009: Result always contains synthesis
661
+ * - INV-DISC-010: participatingProviders >= minProviders (when successful)
662
+ */
663
+ export declare const DiscussionResultSchema: z.ZodObject<{
664
+ /** Whether discussion completed successfully */
665
+ success: z.ZodBoolean;
666
+ /** Discussion pattern used */
667
+ pattern: z.ZodEnum<["round-robin", "debate", "critique", "voting", "synthesis"]>;
668
+ /** Original topic/prompt */
669
+ topic: z.ZodString;
670
+ /** Providers that participated */
671
+ participatingProviders: z.ZodArray<z.ZodString, "many">;
672
+ /** Providers that failed */
673
+ failedProviders: z.ZodArray<z.ZodString, "many">;
674
+ /** All discussion rounds */
675
+ rounds: z.ZodArray<z.ZodObject<{
676
+ /** Round number (1-indexed) */
677
+ roundNumber: z.ZodNumber;
678
+ /** Responses from each provider */
679
+ responses: z.ZodArray<z.ZodObject<{
680
+ /** Provider that generated this response */
681
+ provider: z.ZodString;
682
+ /** Response content */
683
+ content: z.ZodString;
684
+ /** Round number (1-indexed) */
685
+ round: z.ZodNumber;
686
+ /** Role in discussion (if applicable) */
687
+ role: z.ZodOptional<z.ZodEnum<["proponent", "opponent", "judge", "moderator", "neutral"]>>;
688
+ /** Confidence score (0-1) for voting */
689
+ confidence: z.ZodOptional<z.ZodNumber>;
690
+ /** Vote choice (for voting pattern) */
691
+ vote: z.ZodOptional<z.ZodString>;
692
+ /** Response timestamp */
693
+ timestamp: z.ZodString;
694
+ /** Duration in ms */
695
+ durationMs: z.ZodNumber;
696
+ /** Token count (if available) */
697
+ tokenCount: z.ZodOptional<z.ZodNumber>;
698
+ /** Whether response was truncated */
699
+ truncated: z.ZodOptional<z.ZodBoolean>;
700
+ /** Error if response failed */
701
+ error: z.ZodOptional<z.ZodString>;
702
+ }, "strip", z.ZodTypeAny, {
703
+ timestamp: string;
704
+ durationMs: number;
705
+ content: string;
706
+ provider: string;
707
+ round: number;
708
+ error?: string | undefined;
709
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
710
+ tokenCount?: number | undefined;
711
+ truncated?: boolean | undefined;
712
+ confidence?: number | undefined;
713
+ vote?: string | undefined;
714
+ }, {
715
+ timestamp: string;
716
+ durationMs: number;
717
+ content: string;
718
+ provider: string;
719
+ round: number;
720
+ error?: string | undefined;
721
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
722
+ tokenCount?: number | undefined;
723
+ truncated?: boolean | undefined;
724
+ confidence?: number | undefined;
725
+ vote?: string | undefined;
726
+ }>, "many">;
727
+ /** Round summary (if generated) */
728
+ summary: z.ZodOptional<z.ZodString>;
729
+ /** Round duration in ms */
730
+ durationMs: z.ZodNumber;
731
+ }, "strip", z.ZodTypeAny, {
732
+ durationMs: number;
733
+ roundNumber: number;
734
+ responses: {
735
+ timestamp: string;
736
+ durationMs: number;
737
+ content: string;
738
+ provider: string;
739
+ round: number;
740
+ error?: string | undefined;
741
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
742
+ tokenCount?: number | undefined;
743
+ truncated?: boolean | undefined;
744
+ confidence?: number | undefined;
745
+ vote?: string | undefined;
746
+ }[];
747
+ summary?: string | undefined;
748
+ }, {
749
+ durationMs: number;
750
+ roundNumber: number;
751
+ responses: {
752
+ timestamp: string;
753
+ durationMs: number;
754
+ content: string;
755
+ provider: string;
756
+ round: number;
757
+ error?: string | undefined;
758
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
759
+ tokenCount?: number | undefined;
760
+ truncated?: boolean | undefined;
761
+ confidence?: number | undefined;
762
+ vote?: string | undefined;
763
+ }[];
764
+ summary?: string | undefined;
765
+ }>, "many">;
766
+ /** Final synthesized output */
767
+ synthesis: z.ZodString;
768
+ /** Consensus details */
769
+ consensus: z.ZodObject<{
770
+ /** Method used to reach consensus */
771
+ method: z.ZodEnum<["synthesis", "voting", "moderator", "unanimous", "majority"]>;
772
+ /** Provider that synthesized/moderated */
773
+ synthesizer: z.ZodOptional<z.ZodString>;
774
+ /** Agreement score (0-1, how much providers agreed) */
775
+ agreementScore: z.ZodOptional<z.ZodNumber>;
776
+ /** Areas of strong agreement */
777
+ agreements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
778
+ /** Dissenting opinions */
779
+ dissent: z.ZodOptional<z.ZodArray<z.ZodObject<{
780
+ /** Provider with dissenting view */
781
+ provider: z.ZodString;
782
+ /** Summary of dissenting position */
783
+ position: z.ZodString;
784
+ /** Key points of disagreement */
785
+ keyPoints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
786
+ }, "strip", z.ZodTypeAny, {
787
+ position: string;
788
+ provider: string;
789
+ keyPoints?: string[] | undefined;
790
+ }, {
791
+ position: string;
792
+ provider: string;
793
+ keyPoints?: string[] | undefined;
794
+ }>, "many">>;
795
+ }, "strip", z.ZodTypeAny, {
796
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
797
+ synthesizer?: string | undefined;
798
+ agreementScore?: number | undefined;
799
+ agreements?: string[] | undefined;
800
+ dissent?: {
801
+ position: string;
802
+ provider: string;
803
+ keyPoints?: string[] | undefined;
804
+ }[] | undefined;
805
+ }, {
806
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
807
+ synthesizer?: string | undefined;
808
+ agreementScore?: number | undefined;
809
+ agreements?: string[] | undefined;
810
+ dissent?: {
811
+ position: string;
812
+ provider: string;
813
+ keyPoints?: string[] | undefined;
814
+ }[] | undefined;
815
+ }>;
816
+ /** Voting results (for voting pattern) */
817
+ votingResults: z.ZodOptional<z.ZodObject<{
818
+ /** Winning option */
819
+ winner: z.ZodString;
820
+ /** Raw vote counts per option */
821
+ votes: z.ZodRecord<z.ZodString, z.ZodNumber>;
822
+ /** Confidence-weighted vote counts */
823
+ weightedVotes: z.ZodRecord<z.ZodString, z.ZodNumber>;
824
+ /** Individual vote records */
825
+ voteRecords: z.ZodArray<z.ZodObject<{
826
+ /** Provider that cast the vote */
827
+ provider: z.ZodString;
828
+ /** Selected option */
829
+ choice: z.ZodString;
830
+ /** Confidence in the vote (0-1) */
831
+ confidence: z.ZodNumber;
832
+ /** Reasoning for the vote */
833
+ reasoning: z.ZodOptional<z.ZodString>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ provider: string;
836
+ confidence: number;
837
+ choice: string;
838
+ reasoning?: string | undefined;
839
+ }, {
840
+ provider: string;
841
+ confidence: number;
842
+ choice: string;
843
+ reasoning?: string | undefined;
844
+ }>, "many">;
845
+ /** Whether result was unanimous */
846
+ unanimous: z.ZodBoolean;
847
+ /** Margin of victory */
848
+ margin: z.ZodNumber;
849
+ }, "strip", z.ZodTypeAny, {
850
+ winner: string;
851
+ votes: Record<string, number>;
852
+ unanimous: boolean;
853
+ weightedVotes: Record<string, number>;
854
+ voteRecords: {
855
+ provider: string;
856
+ confidence: number;
857
+ choice: string;
858
+ reasoning?: string | undefined;
859
+ }[];
860
+ margin: number;
861
+ }, {
862
+ winner: string;
863
+ votes: Record<string, number>;
864
+ unanimous: boolean;
865
+ weightedVotes: Record<string, number>;
866
+ voteRecords: {
867
+ provider: string;
868
+ confidence: number;
869
+ choice: string;
870
+ reasoning?: string | undefined;
871
+ }[];
872
+ margin: number;
873
+ }>>;
874
+ /** Total duration in ms */
875
+ totalDurationMs: z.ZodNumber;
876
+ /** Discussion metadata */
877
+ metadata: z.ZodObject<{
878
+ /** When discussion started */
879
+ startedAt: z.ZodString;
880
+ /** When discussion completed */
881
+ completedAt: z.ZodString;
882
+ /** Total tokens used (if available) */
883
+ totalTokens: z.ZodOptional<z.ZodNumber>;
884
+ /** Estimated cost in USD (if available) */
885
+ estimatedCost: z.ZodOptional<z.ZodNumber>;
886
+ /** Session ID if associated */
887
+ sessionId: z.ZodOptional<z.ZodString>;
888
+ /** Trace ID for debugging */
889
+ traceId: z.ZodOptional<z.ZodString>;
890
+ }, "strip", z.ZodTypeAny, {
891
+ completedAt: string;
892
+ startedAt: string;
893
+ sessionId?: string | undefined;
894
+ traceId?: string | undefined;
895
+ totalTokens?: number | undefined;
896
+ estimatedCost?: number | undefined;
897
+ }, {
898
+ completedAt: string;
899
+ startedAt: string;
900
+ sessionId?: string | undefined;
901
+ traceId?: string | undefined;
902
+ totalTokens?: number | undefined;
903
+ estimatedCost?: number | undefined;
904
+ }>;
905
+ /** Error if discussion failed */
906
+ error: z.ZodOptional<z.ZodObject<{
907
+ /** Error code */
908
+ code: z.ZodString;
909
+ /** Human-readable message */
910
+ message: z.ZodString;
911
+ /** Provider that caused error (if applicable) */
912
+ provider: z.ZodOptional<z.ZodString>;
913
+ /** Whether error is retryable */
914
+ retryable: z.ZodOptional<z.ZodBoolean>;
915
+ }, "strip", z.ZodTypeAny, {
916
+ code: string;
917
+ message: string;
918
+ retryable?: boolean | undefined;
919
+ provider?: string | undefined;
920
+ }, {
921
+ code: string;
922
+ message: string;
923
+ retryable?: boolean | undefined;
924
+ provider?: string | undefined;
925
+ }>>;
926
+ }, "strip", z.ZodTypeAny, {
927
+ metadata: {
928
+ completedAt: string;
929
+ startedAt: string;
930
+ sessionId?: string | undefined;
931
+ traceId?: string | undefined;
932
+ totalTokens?: number | undefined;
933
+ estimatedCost?: number | undefined;
934
+ };
935
+ success: boolean;
936
+ totalDurationMs: number;
937
+ pattern: "round-robin" | "debate" | "critique" | "voting" | "synthesis";
938
+ rounds: {
939
+ durationMs: number;
940
+ roundNumber: number;
941
+ responses: {
942
+ timestamp: string;
943
+ durationMs: number;
944
+ content: string;
945
+ provider: string;
946
+ round: number;
947
+ error?: string | undefined;
948
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
949
+ tokenCount?: number | undefined;
950
+ truncated?: boolean | undefined;
951
+ confidence?: number | undefined;
952
+ vote?: string | undefined;
953
+ }[];
954
+ summary?: string | undefined;
955
+ }[];
956
+ topic: string;
957
+ participatingProviders: string[];
958
+ failedProviders: string[];
959
+ synthesis: string;
960
+ consensus: {
961
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
962
+ synthesizer?: string | undefined;
963
+ agreementScore?: number | undefined;
964
+ agreements?: string[] | undefined;
965
+ dissent?: {
966
+ position: string;
967
+ provider: string;
968
+ keyPoints?: string[] | undefined;
969
+ }[] | undefined;
970
+ };
971
+ error?: {
972
+ code: string;
973
+ message: string;
974
+ retryable?: boolean | undefined;
975
+ provider?: string | undefined;
976
+ } | undefined;
977
+ votingResults?: {
978
+ winner: string;
979
+ votes: Record<string, number>;
980
+ unanimous: boolean;
981
+ weightedVotes: Record<string, number>;
982
+ voteRecords: {
983
+ provider: string;
984
+ confidence: number;
985
+ choice: string;
986
+ reasoning?: string | undefined;
987
+ }[];
988
+ margin: number;
989
+ } | undefined;
990
+ }, {
991
+ metadata: {
992
+ completedAt: string;
993
+ startedAt: string;
994
+ sessionId?: string | undefined;
995
+ traceId?: string | undefined;
996
+ totalTokens?: number | undefined;
997
+ estimatedCost?: number | undefined;
998
+ };
999
+ success: boolean;
1000
+ totalDurationMs: number;
1001
+ pattern: "round-robin" | "debate" | "critique" | "voting" | "synthesis";
1002
+ rounds: {
1003
+ durationMs: number;
1004
+ roundNumber: number;
1005
+ responses: {
1006
+ timestamp: string;
1007
+ durationMs: number;
1008
+ content: string;
1009
+ provider: string;
1010
+ round: number;
1011
+ error?: string | undefined;
1012
+ role?: "moderator" | "proponent" | "opponent" | "judge" | "neutral" | undefined;
1013
+ tokenCount?: number | undefined;
1014
+ truncated?: boolean | undefined;
1015
+ confidence?: number | undefined;
1016
+ vote?: string | undefined;
1017
+ }[];
1018
+ summary?: string | undefined;
1019
+ }[];
1020
+ topic: string;
1021
+ participatingProviders: string[];
1022
+ failedProviders: string[];
1023
+ synthesis: string;
1024
+ consensus: {
1025
+ method: "voting" | "synthesis" | "moderator" | "unanimous" | "majority";
1026
+ synthesizer?: string | undefined;
1027
+ agreementScore?: number | undefined;
1028
+ agreements?: string[] | undefined;
1029
+ dissent?: {
1030
+ position: string;
1031
+ provider: string;
1032
+ keyPoints?: string[] | undefined;
1033
+ }[] | undefined;
1034
+ };
1035
+ error?: {
1036
+ code: string;
1037
+ message: string;
1038
+ retryable?: boolean | undefined;
1039
+ provider?: string | undefined;
1040
+ } | undefined;
1041
+ votingResults?: {
1042
+ winner: string;
1043
+ votes: Record<string, number>;
1044
+ unanimous: boolean;
1045
+ weightedVotes: Record<string, number>;
1046
+ voteRecords: {
1047
+ provider: string;
1048
+ confidence: number;
1049
+ choice: string;
1050
+ reasoning?: string | undefined;
1051
+ }[];
1052
+ margin: number;
1053
+ } | undefined;
1054
+ }>;
1055
+ export type DiscussionResult = z.infer<typeof DiscussionResultSchema>;
1056
+ /**
1057
+ * Request to start a discussion
1058
+ */
1059
+ export declare const DiscussionRequestSchema: z.ZodObject<{
1060
+ /** Topic or question to discuss */
1061
+ topic: z.ZodString;
1062
+ /** Discussion pattern */
1063
+ pattern: z.ZodOptional<z.ZodEnum<["round-robin", "debate", "critique", "voting", "synthesis"]>>;
1064
+ /** Providers to use (defaults to claude, glm, qwen, gemini) */
1065
+ providers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1066
+ /** Number of rounds */
1067
+ rounds: z.ZodOptional<z.ZodNumber>;
1068
+ /** Consensus method */
1069
+ consensusMethod: z.ZodOptional<z.ZodEnum<["synthesis", "voting", "moderator", "unanimous", "majority"]>>;
1070
+ /** Options for voting pattern */
1071
+ votingOptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1072
+ /** Additional context */
1073
+ context: z.ZodOptional<z.ZodString>;
1074
+ /** Session ID to associate with */
1075
+ sessionId: z.ZodOptional<z.ZodString>;
1076
+ /** Enable verbose output */
1077
+ verbose: z.ZodOptional<z.ZodBoolean>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ topic: string;
1080
+ context?: string | undefined;
1081
+ sessionId?: string | undefined;
1082
+ pattern?: "round-robin" | "debate" | "critique" | "voting" | "synthesis" | undefined;
1083
+ providers?: string[] | undefined;
1084
+ rounds?: number | undefined;
1085
+ consensusMethod?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
1086
+ verbose?: boolean | undefined;
1087
+ votingOptions?: string[] | undefined;
1088
+ }, {
1089
+ topic: string;
1090
+ context?: string | undefined;
1091
+ sessionId?: string | undefined;
1092
+ pattern?: "round-robin" | "debate" | "critique" | "voting" | "synthesis" | undefined;
1093
+ providers?: string[] | undefined;
1094
+ rounds?: number | undefined;
1095
+ consensusMethod?: "voting" | "synthesis" | "moderator" | "unanimous" | "majority" | undefined;
1096
+ verbose?: boolean | undefined;
1097
+ votingOptions?: string[] | undefined;
1098
+ }>;
1099
+ export type DiscussionRequest = z.infer<typeof DiscussionRequestSchema>;
1100
+ export declare const DiscussionErrorCodes: {
1101
+ /** Not enough providers available */
1102
+ readonly INSUFFICIENT_PROVIDERS: "DISCUSSION_INSUFFICIENT_PROVIDERS";
1103
+ /** Provider timed out */
1104
+ readonly PROVIDER_TIMEOUT: "DISCUSSION_PROVIDER_TIMEOUT";
1105
+ /** All providers failed */
1106
+ readonly ALL_PROVIDERS_FAILED: "DISCUSSION_ALL_PROVIDERS_FAILED";
1107
+ /** Failed to reach consensus */
1108
+ readonly CONSENSUS_FAILED: "DISCUSSION_CONSENSUS_FAILED";
1109
+ /** Invalid pattern specified */
1110
+ readonly INVALID_PATTERN: "DISCUSSION_INVALID_PATTERN";
1111
+ /** Invalid role assignments */
1112
+ readonly INVALID_ROLES: "DISCUSSION_INVALID_ROLES";
1113
+ /** Synthesis step failed */
1114
+ readonly SYNTHESIS_FAILED: "DISCUSSION_SYNTHESIS_FAILED";
1115
+ /** Invalid configuration */
1116
+ readonly INVALID_CONFIG: "DISCUSSION_INVALID_CONFIG";
1117
+ /** Provider not found */
1118
+ readonly PROVIDER_NOT_FOUND: "DISCUSSION_PROVIDER_NOT_FOUND";
1119
+ };
1120
+ export type DiscussionErrorCode = (typeof DiscussionErrorCodes)[keyof typeof DiscussionErrorCodes];
1121
+ /**
1122
+ * Validates discussion step configuration
1123
+ * @throws ZodError if validation fails
1124
+ */
1125
+ export declare function validateDiscussStepConfig(data: unknown): DiscussStepConfig;
1126
+ /**
1127
+ * Safely validates discussion step configuration
1128
+ */
1129
+ export declare function safeValidateDiscussStepConfig(data: unknown): {
1130
+ success: true;
1131
+ data: DiscussStepConfig;
1132
+ } | {
1133
+ success: false;
1134
+ error: z.ZodError;
1135
+ };
1136
+ /**
1137
+ * Validates discussion request
1138
+ * @throws ZodError if validation fails
1139
+ */
1140
+ export declare function validateDiscussionRequest(data: unknown): DiscussionRequest;
1141
+ /**
1142
+ * Safely validates discussion request
1143
+ */
1144
+ export declare function safeValidateDiscussionRequest(data: unknown): {
1145
+ success: true;
1146
+ data: DiscussionRequest;
1147
+ } | {
1148
+ success: false;
1149
+ error: z.ZodError;
1150
+ };
1151
+ /**
1152
+ * Validates discussion result
1153
+ * @throws ZodError if validation fails
1154
+ */
1155
+ export declare function validateDiscussionResult(data: unknown): DiscussionResult;
1156
+ /**
1157
+ * Safely validates discussion result
1158
+ */
1159
+ export declare function safeValidateDiscussionResult(data: unknown): {
1160
+ success: true;
1161
+ data: DiscussionResult;
1162
+ } | {
1163
+ success: false;
1164
+ error: z.ZodError;
1165
+ };
1166
+ /**
1167
+ * Creates default discussion step config
1168
+ */
1169
+ export declare function createDefaultDiscussStepConfig(prompt: string, providers?: string[]): DiscussStepConfig;
1170
+ /**
1171
+ * Creates a debate configuration
1172
+ */
1173
+ export declare function createDebateConfig(prompt: string, proponent?: string, opponent?: string, judge?: string): DiscussStepConfig;
1174
+ /**
1175
+ * Creates a voting configuration
1176
+ */
1177
+ export declare function createVotingConfig(prompt: string, options: string[], providers?: string[]): DiscussStepConfig;
1178
+ /**
1179
+ * Creates an empty successful discussion result
1180
+ */
1181
+ export declare function createEmptyDiscussionResult(pattern: DiscussionPattern, topic: string): DiscussionResult;
1182
+ /**
1183
+ * Creates a failed discussion result
1184
+ */
1185
+ export declare function createFailedDiscussionResult(pattern: DiscussionPattern, topic: string, errorCode: DiscussionErrorCode, errorMessage: string, startedAt: string): DiscussionResult;
1186
+ //# sourceMappingURL=schema.d.ts.map