@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,4055 @@
1
+ /**
2
+ * Agent Domain Contracts v1
3
+ *
4
+ * Zod schemas for agent profiles, orchestration, and events.
5
+ */
6
+ import { z } from 'zod';
7
+ /**
8
+ * Agent personality traits
9
+ */
10
+ export declare const AgentPersonalitySchema: z.ZodObject<{
11
+ traits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
+ catchphrase: z.ZodOptional<z.ZodString>;
13
+ communicationStyle: z.ZodOptional<z.ZodString>;
14
+ decisionMaking: z.ZodOptional<z.ZodString>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ traits?: string[] | undefined;
17
+ catchphrase?: string | undefined;
18
+ communicationStyle?: string | undefined;
19
+ decisionMaking?: string | undefined;
20
+ }, {
21
+ traits?: string[] | undefined;
22
+ catchphrase?: string | undefined;
23
+ communicationStyle?: string | undefined;
24
+ decisionMaking?: string | undefined;
25
+ }>;
26
+ export type AgentPersonality = z.infer<typeof AgentPersonalitySchema>;
27
+ /**
28
+ * Ability selection configuration
29
+ */
30
+ export declare const AbilitySelectionSchema: z.ZodObject<{
31
+ core: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
32
+ taskBased: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
33
+ loadAll: z.ZodOptional<z.ZodBoolean>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ core?: string[] | undefined;
36
+ taskBased?: Record<string, string[]> | undefined;
37
+ loadAll?: boolean | undefined;
38
+ }, {
39
+ core?: string[] | undefined;
40
+ taskBased?: Record<string, string[]> | undefined;
41
+ loadAll?: boolean | undefined;
42
+ }>;
43
+ export type AbilitySelection = z.infer<typeof AbilitySelectionSchema>;
44
+ /**
45
+ * Redirect rule for agent selection
46
+ */
47
+ export declare const RedirectRuleSchema: z.ZodObject<{
48
+ phrase: z.ZodString;
49
+ suggest: z.ZodString;
50
+ }, "strip", z.ZodTypeAny, {
51
+ phrase: string;
52
+ suggest: string;
53
+ }, {
54
+ phrase: string;
55
+ suggest: string;
56
+ }>;
57
+ export type RedirectRule = z.infer<typeof RedirectRuleSchema>;
58
+ /**
59
+ * Agent category for routing classification
60
+ *
61
+ * Categories help CLI understand agent roles:
62
+ * - orchestrator: Delegates to others (CEO, CTO, architecture)
63
+ * - implementer: Executes tasks directly (backend, frontend, devops)
64
+ * - reviewer: Reviews/audits work (reviewer, security, quality)
65
+ * - specialist: Domain expert (blockchain, ml-engineer, quantum)
66
+ * - generalist: Fallback agent (standard)
67
+ */
68
+ export declare const AgentCategorySchema: z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>;
69
+ export type AgentCategory = z.infer<typeof AgentCategorySchema>;
70
+ /**
71
+ * Selection metadata for agent routing
72
+ *
73
+ * Invariants:
74
+ * - INV-AGT-SEL-005: exampleTasks boost confidence when matched
75
+ * - INV-AGT-SEL-006: notForTasks reduce confidence when matched
76
+ */
77
+ export declare const SelectionMetadataSchema: z.ZodObject<{
78
+ primaryIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
79
+ secondarySignals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
+ negativeIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
81
+ redirectWhen: z.ZodOptional<z.ZodArray<z.ZodObject<{
82
+ phrase: z.ZodString;
83
+ suggest: z.ZodString;
84
+ }, "strip", z.ZodTypeAny, {
85
+ phrase: string;
86
+ suggest: string;
87
+ }, {
88
+ phrase: string;
89
+ suggest: string;
90
+ }>, "many">>;
91
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
92
+ antiKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
+ exampleTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
+ notForTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
+ agentCategory: z.ZodOptional<z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ primaryIntents?: string[] | undefined;
98
+ secondarySignals?: string[] | undefined;
99
+ negativeIntents?: string[] | undefined;
100
+ redirectWhen?: {
101
+ phrase: string;
102
+ suggest: string;
103
+ }[] | undefined;
104
+ keywords?: string[] | undefined;
105
+ antiKeywords?: string[] | undefined;
106
+ exampleTasks?: string[] | undefined;
107
+ notForTasks?: string[] | undefined;
108
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
109
+ }, {
110
+ primaryIntents?: string[] | undefined;
111
+ secondarySignals?: string[] | undefined;
112
+ negativeIntents?: string[] | undefined;
113
+ redirectWhen?: {
114
+ phrase: string;
115
+ suggest: string;
116
+ }[] | undefined;
117
+ keywords?: string[] | undefined;
118
+ antiKeywords?: string[] | undefined;
119
+ exampleTasks?: string[] | undefined;
120
+ notForTasks?: string[] | undefined;
121
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
122
+ }>;
123
+ export type SelectionMetadata = z.infer<typeof SelectionMetadataSchema>;
124
+ /**
125
+ * Provider affinity configuration for multi-model discussions
126
+ *
127
+ * Invariants:
128
+ * - INV-AGT-AFF-001: Preferred providers are prioritized in discussions
129
+ * - INV-AGT-AFF-002: Default synthesizer is used for consensus when not specified
130
+ */
131
+ export declare const ProviderAffinitySchema: z.ZodObject<{
132
+ /** Preferred providers for this agent's discussions (ordered by preference) */
133
+ preferred: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
134
+ /** Provider to use for synthesis/consensus */
135
+ defaultSynthesizer: z.ZodOptional<z.ZodString>;
136
+ /** Providers to exclude from discussions */
137
+ excluded: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
+ /** Override provider for specific task types */
139
+ taskOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
140
+ /** Provider-specific temperature overrides */
141
+ temperatureOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ preferred?: string[] | undefined;
144
+ defaultSynthesizer?: string | undefined;
145
+ excluded?: string[] | undefined;
146
+ taskOverrides?: Record<string, string> | undefined;
147
+ temperatureOverrides?: Record<string, number> | undefined;
148
+ }, {
149
+ preferred?: string[] | undefined;
150
+ defaultSynthesizer?: string | undefined;
151
+ excluded?: string[] | undefined;
152
+ taskOverrides?: Record<string, string> | undefined;
153
+ temperatureOverrides?: Record<string, number> | undefined;
154
+ }>;
155
+ export type ProviderAffinity = z.infer<typeof ProviderAffinitySchema>;
156
+ /**
157
+ * Orchestration configuration
158
+ */
159
+ export declare const OrchestrationConfigSchema: z.ZodObject<{
160
+ maxDelegationDepth: z.ZodOptional<z.ZodNumber>;
161
+ canReadWorkspaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
+ canWriteToShared: z.ZodOptional<z.ZodBoolean>;
163
+ delegationTimeout: z.ZodOptional<z.ZodNumber>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ maxDelegationDepth?: number | undefined;
166
+ canReadWorkspaces?: string[] | undefined;
167
+ canWriteToShared?: boolean | undefined;
168
+ delegationTimeout?: number | undefined;
169
+ }, {
170
+ maxDelegationDepth?: number | undefined;
171
+ canReadWorkspaces?: string[] | undefined;
172
+ canWriteToShared?: boolean | undefined;
173
+ delegationTimeout?: number | undefined;
174
+ }>;
175
+ export type OrchestrationConfig = z.infer<typeof OrchestrationConfigSchema>;
176
+ /**
177
+ * Agent retry policy for workflow steps
178
+ */
179
+ export declare const AgentRetryPolicySchema: z.ZodObject<{
180
+ maxAttempts: z.ZodNumber;
181
+ backoffMs: z.ZodNumber;
182
+ backoffMultiplier: z.ZodNumber;
183
+ retryOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["timeout", "rateLimit", "serverError", "networkError"]>, "many">>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ maxAttempts: number;
186
+ backoffMs: number;
187
+ backoffMultiplier: number;
188
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
189
+ }, {
190
+ maxAttempts: number;
191
+ backoffMs: number;
192
+ backoffMultiplier: number;
193
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
194
+ }>;
195
+ export type AgentRetryPolicy = z.infer<typeof AgentRetryPolicySchema>;
196
+ /**
197
+ * Agent step type enumeration (includes 'delegate' and 'discuss' for multi-model)
198
+ */
199
+ export declare const AgentStepTypeSchema: z.ZodEnum<["prompt", "tool", "conditional", "loop", "parallel", "delegate", "discuss"]>;
200
+ export type AgentStepType = z.infer<typeof AgentStepTypeSchema>;
201
+ /**
202
+ * Agent workflow step schema (extended with agent-specific fields)
203
+ */
204
+ export declare const AgentWorkflowStepSchema: z.ZodObject<{
205
+ stepId: z.ZodString;
206
+ name: z.ZodString;
207
+ description: z.ZodOptional<z.ZodString>;
208
+ type: z.ZodEnum<["prompt", "tool", "conditional", "loop", "parallel", "delegate", "discuss"]>;
209
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
210
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
211
+ condition: z.ZodOptional<z.ZodString>;
212
+ parallel: z.ZodOptional<z.ZodBoolean>;
213
+ retryPolicy: z.ZodOptional<z.ZodObject<{
214
+ maxAttempts: z.ZodNumber;
215
+ backoffMs: z.ZodNumber;
216
+ backoffMultiplier: z.ZodNumber;
217
+ retryOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["timeout", "rateLimit", "serverError", "networkError"]>, "many">>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ maxAttempts: number;
220
+ backoffMs: number;
221
+ backoffMultiplier: number;
222
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
223
+ }, {
224
+ maxAttempts: number;
225
+ backoffMs: number;
226
+ backoffMultiplier: number;
227
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
228
+ }>>;
229
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
230
+ keyQuestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
231
+ outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
232
+ streaming: z.ZodOptional<z.ZodBoolean>;
233
+ saveToMemory: z.ZodOptional<z.ZodBoolean>;
234
+ checkpoint: z.ZodOptional<z.ZodBoolean>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
237
+ stepId: string;
238
+ name: string;
239
+ config: Record<string, unknown>;
240
+ parallel?: boolean | undefined;
241
+ retryPolicy?: {
242
+ maxAttempts: number;
243
+ backoffMs: number;
244
+ backoffMultiplier: number;
245
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
246
+ } | undefined;
247
+ description?: string | undefined;
248
+ dependencies?: string[] | undefined;
249
+ outputs?: string[] | undefined;
250
+ timeoutMs?: number | undefined;
251
+ streaming?: boolean | undefined;
252
+ condition?: string | undefined;
253
+ keyQuestions?: string[] | undefined;
254
+ saveToMemory?: boolean | undefined;
255
+ checkpoint?: boolean | undefined;
256
+ }, {
257
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
258
+ stepId: string;
259
+ name: string;
260
+ parallel?: boolean | undefined;
261
+ retryPolicy?: {
262
+ maxAttempts: number;
263
+ backoffMs: number;
264
+ backoffMultiplier: number;
265
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
266
+ } | undefined;
267
+ config?: Record<string, unknown> | undefined;
268
+ description?: string | undefined;
269
+ dependencies?: string[] | undefined;
270
+ outputs?: string[] | undefined;
271
+ timeoutMs?: number | undefined;
272
+ streaming?: boolean | undefined;
273
+ condition?: string | undefined;
274
+ keyQuestions?: string[] | undefined;
275
+ saveToMemory?: boolean | undefined;
276
+ checkpoint?: boolean | undefined;
277
+ }>;
278
+ export type AgentWorkflowStep = z.infer<typeof AgentWorkflowStepSchema>;
279
+ /**
280
+ * Agent profile schema - the aggregate root for agents
281
+ *
282
+ * Includes workflow validation:
283
+ * - INV-AGT-WF-001: Prompt-type workflow steps must have non-empty 'prompt' in config
284
+ * - INV-AGT-WF-002: Delegate-type workflow steps must have 'targetAgent' in config
285
+ * - INV-AGT-WF-003: Step dependencies must reference existing step IDs
286
+ */
287
+ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
288
+ agentId: z.ZodString;
289
+ displayName: z.ZodOptional<z.ZodString>;
290
+ version: z.ZodOptional<z.ZodString>;
291
+ description: z.ZodString;
292
+ role: z.ZodOptional<z.ZodString>;
293
+ expertise: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
294
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
295
+ systemPrompt: z.ZodOptional<z.ZodString>;
296
+ workflow: z.ZodOptional<z.ZodArray<z.ZodObject<{
297
+ stepId: z.ZodString;
298
+ name: z.ZodString;
299
+ description: z.ZodOptional<z.ZodString>;
300
+ type: z.ZodEnum<["prompt", "tool", "conditional", "loop", "parallel", "delegate", "discuss"]>;
301
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
302
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
303
+ condition: z.ZodOptional<z.ZodString>;
304
+ parallel: z.ZodOptional<z.ZodBoolean>;
305
+ retryPolicy: z.ZodOptional<z.ZodObject<{
306
+ maxAttempts: z.ZodNumber;
307
+ backoffMs: z.ZodNumber;
308
+ backoffMultiplier: z.ZodNumber;
309
+ retryOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["timeout", "rateLimit", "serverError", "networkError"]>, "many">>;
310
+ }, "strip", z.ZodTypeAny, {
311
+ maxAttempts: number;
312
+ backoffMs: number;
313
+ backoffMultiplier: number;
314
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
315
+ }, {
316
+ maxAttempts: number;
317
+ backoffMs: number;
318
+ backoffMultiplier: number;
319
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
320
+ }>>;
321
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
322
+ keyQuestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
323
+ outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
324
+ streaming: z.ZodOptional<z.ZodBoolean>;
325
+ saveToMemory: z.ZodOptional<z.ZodBoolean>;
326
+ checkpoint: z.ZodOptional<z.ZodBoolean>;
327
+ }, "strip", z.ZodTypeAny, {
328
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
329
+ stepId: string;
330
+ name: string;
331
+ config: Record<string, unknown>;
332
+ parallel?: boolean | undefined;
333
+ retryPolicy?: {
334
+ maxAttempts: number;
335
+ backoffMs: number;
336
+ backoffMultiplier: number;
337
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
338
+ } | undefined;
339
+ description?: string | undefined;
340
+ dependencies?: string[] | undefined;
341
+ outputs?: string[] | undefined;
342
+ timeoutMs?: number | undefined;
343
+ streaming?: boolean | undefined;
344
+ condition?: string | undefined;
345
+ keyQuestions?: string[] | undefined;
346
+ saveToMemory?: boolean | undefined;
347
+ checkpoint?: boolean | undefined;
348
+ }, {
349
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
350
+ stepId: string;
351
+ name: string;
352
+ parallel?: boolean | undefined;
353
+ retryPolicy?: {
354
+ maxAttempts: number;
355
+ backoffMs: number;
356
+ backoffMultiplier: number;
357
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
358
+ } | undefined;
359
+ config?: Record<string, unknown> | undefined;
360
+ description?: string | undefined;
361
+ dependencies?: string[] | undefined;
362
+ outputs?: string[] | undefined;
363
+ timeoutMs?: number | undefined;
364
+ streaming?: boolean | undefined;
365
+ condition?: string | undefined;
366
+ keyQuestions?: string[] | undefined;
367
+ saveToMemory?: boolean | undefined;
368
+ checkpoint?: boolean | undefined;
369
+ }>, "many">>;
370
+ personality: z.ZodOptional<z.ZodObject<{
371
+ traits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
372
+ catchphrase: z.ZodOptional<z.ZodString>;
373
+ communicationStyle: z.ZodOptional<z.ZodString>;
374
+ decisionMaking: z.ZodOptional<z.ZodString>;
375
+ }, "strip", z.ZodTypeAny, {
376
+ traits?: string[] | undefined;
377
+ catchphrase?: string | undefined;
378
+ communicationStyle?: string | undefined;
379
+ decisionMaking?: string | undefined;
380
+ }, {
381
+ traits?: string[] | undefined;
382
+ catchphrase?: string | undefined;
383
+ communicationStyle?: string | undefined;
384
+ decisionMaking?: string | undefined;
385
+ }>>;
386
+ abilities: z.ZodOptional<z.ZodObject<{
387
+ core: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
388
+ taskBased: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
389
+ loadAll: z.ZodOptional<z.ZodBoolean>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ core?: string[] | undefined;
392
+ taskBased?: Record<string, string[]> | undefined;
393
+ loadAll?: boolean | undefined;
394
+ }, {
395
+ core?: string[] | undefined;
396
+ taskBased?: Record<string, string[]> | undefined;
397
+ loadAll?: boolean | undefined;
398
+ }>>;
399
+ thinkingPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
400
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
401
+ parallel: z.ZodOptional<z.ZodBoolean>;
402
+ temperature: z.ZodOptional<z.ZodNumber>;
403
+ maxTokens: z.ZodOptional<z.ZodNumber>;
404
+ orchestration: z.ZodOptional<z.ZodObject<{
405
+ maxDelegationDepth: z.ZodOptional<z.ZodNumber>;
406
+ canReadWorkspaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
407
+ canWriteToShared: z.ZodOptional<z.ZodBoolean>;
408
+ delegationTimeout: z.ZodOptional<z.ZodNumber>;
409
+ }, "strip", z.ZodTypeAny, {
410
+ maxDelegationDepth?: number | undefined;
411
+ canReadWorkspaces?: string[] | undefined;
412
+ canWriteToShared?: boolean | undefined;
413
+ delegationTimeout?: number | undefined;
414
+ }, {
415
+ maxDelegationDepth?: number | undefined;
416
+ canReadWorkspaces?: string[] | undefined;
417
+ canWriteToShared?: boolean | undefined;
418
+ delegationTimeout?: number | undefined;
419
+ }>>;
420
+ providerAffinity: z.ZodOptional<z.ZodObject<{
421
+ /** Preferred providers for this agent's discussions (ordered by preference) */
422
+ preferred: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
423
+ /** Provider to use for synthesis/consensus */
424
+ defaultSynthesizer: z.ZodOptional<z.ZodString>;
425
+ /** Providers to exclude from discussions */
426
+ excluded: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
427
+ /** Override provider for specific task types */
428
+ taskOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
429
+ /** Provider-specific temperature overrides */
430
+ temperatureOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
431
+ }, "strip", z.ZodTypeAny, {
432
+ preferred?: string[] | undefined;
433
+ defaultSynthesizer?: string | undefined;
434
+ excluded?: string[] | undefined;
435
+ taskOverrides?: Record<string, string> | undefined;
436
+ temperatureOverrides?: Record<string, number> | undefined;
437
+ }, {
438
+ preferred?: string[] | undefined;
439
+ defaultSynthesizer?: string | undefined;
440
+ excluded?: string[] | undefined;
441
+ taskOverrides?: Record<string, string> | undefined;
442
+ temperatureOverrides?: Record<string, number> | undefined;
443
+ }>>;
444
+ selectionMetadata: z.ZodOptional<z.ZodObject<{
445
+ primaryIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
446
+ secondarySignals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
447
+ negativeIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
448
+ redirectWhen: z.ZodOptional<z.ZodArray<z.ZodObject<{
449
+ phrase: z.ZodString;
450
+ suggest: z.ZodString;
451
+ }, "strip", z.ZodTypeAny, {
452
+ phrase: string;
453
+ suggest: string;
454
+ }, {
455
+ phrase: string;
456
+ suggest: string;
457
+ }>, "many">>;
458
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
459
+ antiKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
460
+ exampleTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
461
+ notForTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
462
+ agentCategory: z.ZodOptional<z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>>;
463
+ }, "strip", z.ZodTypeAny, {
464
+ primaryIntents?: string[] | undefined;
465
+ secondarySignals?: string[] | undefined;
466
+ negativeIntents?: string[] | undefined;
467
+ redirectWhen?: {
468
+ phrase: string;
469
+ suggest: string;
470
+ }[] | undefined;
471
+ keywords?: string[] | undefined;
472
+ antiKeywords?: string[] | undefined;
473
+ exampleTasks?: string[] | undefined;
474
+ notForTasks?: string[] | undefined;
475
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
476
+ }, {
477
+ primaryIntents?: string[] | undefined;
478
+ secondarySignals?: string[] | undefined;
479
+ negativeIntents?: string[] | undefined;
480
+ redirectWhen?: {
481
+ phrase: string;
482
+ suggest: string;
483
+ }[] | undefined;
484
+ keywords?: string[] | undefined;
485
+ antiKeywords?: string[] | undefined;
486
+ exampleTasks?: string[] | undefined;
487
+ notForTasks?: string[] | undefined;
488
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
489
+ }>>;
490
+ team: z.ZodOptional<z.ZodString>;
491
+ collaboratesWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
492
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
493
+ priority: z.ZodOptional<z.ZodNumber>;
494
+ enabled: z.ZodDefault<z.ZodBoolean>;
495
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
496
+ createdAt: z.ZodOptional<z.ZodString>;
497
+ updatedAt: z.ZodOptional<z.ZodString>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ description: string;
500
+ enabled: boolean;
501
+ agentId: string;
502
+ parallel?: boolean | undefined;
503
+ version?: string | undefined;
504
+ metadata?: Record<string, unknown> | undefined;
505
+ priority?: number | undefined;
506
+ team?: string | undefined;
507
+ displayName?: string | undefined;
508
+ capabilities?: string[] | undefined;
509
+ role?: string | undefined;
510
+ expertise?: string[] | undefined;
511
+ tags?: string[] | undefined;
512
+ workflow?: {
513
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
514
+ stepId: string;
515
+ name: string;
516
+ config: Record<string, unknown>;
517
+ parallel?: boolean | undefined;
518
+ retryPolicy?: {
519
+ maxAttempts: number;
520
+ backoffMs: number;
521
+ backoffMultiplier: number;
522
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
523
+ } | undefined;
524
+ description?: string | undefined;
525
+ dependencies?: string[] | undefined;
526
+ outputs?: string[] | undefined;
527
+ timeoutMs?: number | undefined;
528
+ streaming?: boolean | undefined;
529
+ condition?: string | undefined;
530
+ keyQuestions?: string[] | undefined;
531
+ saveToMemory?: boolean | undefined;
532
+ checkpoint?: boolean | undefined;
533
+ }[] | undefined;
534
+ orchestration?: {
535
+ maxDelegationDepth?: number | undefined;
536
+ canReadWorkspaces?: string[] | undefined;
537
+ canWriteToShared?: boolean | undefined;
538
+ delegationTimeout?: number | undefined;
539
+ } | undefined;
540
+ createdAt?: string | undefined;
541
+ updatedAt?: string | undefined;
542
+ dependencies?: string[] | undefined;
543
+ abilities?: {
544
+ core?: string[] | undefined;
545
+ taskBased?: Record<string, string[]> | undefined;
546
+ loadAll?: boolean | undefined;
547
+ } | undefined;
548
+ maxTokens?: number | undefined;
549
+ systemPrompt?: string | undefined;
550
+ personality?: {
551
+ traits?: string[] | undefined;
552
+ catchphrase?: string | undefined;
553
+ communicationStyle?: string | undefined;
554
+ decisionMaking?: string | undefined;
555
+ } | undefined;
556
+ thinkingPatterns?: string[] | undefined;
557
+ temperature?: number | undefined;
558
+ providerAffinity?: {
559
+ preferred?: string[] | undefined;
560
+ defaultSynthesizer?: string | undefined;
561
+ excluded?: string[] | undefined;
562
+ taskOverrides?: Record<string, string> | undefined;
563
+ temperatureOverrides?: Record<string, number> | undefined;
564
+ } | undefined;
565
+ selectionMetadata?: {
566
+ primaryIntents?: string[] | undefined;
567
+ secondarySignals?: string[] | undefined;
568
+ negativeIntents?: string[] | undefined;
569
+ redirectWhen?: {
570
+ phrase: string;
571
+ suggest: string;
572
+ }[] | undefined;
573
+ keywords?: string[] | undefined;
574
+ antiKeywords?: string[] | undefined;
575
+ exampleTasks?: string[] | undefined;
576
+ notForTasks?: string[] | undefined;
577
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
578
+ } | undefined;
579
+ collaboratesWith?: string[] | undefined;
580
+ }, {
581
+ description: string;
582
+ agentId: string;
583
+ parallel?: boolean | undefined;
584
+ version?: string | undefined;
585
+ metadata?: Record<string, unknown> | undefined;
586
+ enabled?: boolean | undefined;
587
+ priority?: number | undefined;
588
+ team?: string | undefined;
589
+ displayName?: string | undefined;
590
+ capabilities?: string[] | undefined;
591
+ role?: string | undefined;
592
+ expertise?: string[] | undefined;
593
+ tags?: string[] | undefined;
594
+ workflow?: {
595
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
596
+ stepId: string;
597
+ name: string;
598
+ parallel?: boolean | undefined;
599
+ retryPolicy?: {
600
+ maxAttempts: number;
601
+ backoffMs: number;
602
+ backoffMultiplier: number;
603
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
604
+ } | undefined;
605
+ config?: Record<string, unknown> | undefined;
606
+ description?: string | undefined;
607
+ dependencies?: string[] | undefined;
608
+ outputs?: string[] | undefined;
609
+ timeoutMs?: number | undefined;
610
+ streaming?: boolean | undefined;
611
+ condition?: string | undefined;
612
+ keyQuestions?: string[] | undefined;
613
+ saveToMemory?: boolean | undefined;
614
+ checkpoint?: boolean | undefined;
615
+ }[] | undefined;
616
+ orchestration?: {
617
+ maxDelegationDepth?: number | undefined;
618
+ canReadWorkspaces?: string[] | undefined;
619
+ canWriteToShared?: boolean | undefined;
620
+ delegationTimeout?: number | undefined;
621
+ } | undefined;
622
+ createdAt?: string | undefined;
623
+ updatedAt?: string | undefined;
624
+ dependencies?: string[] | undefined;
625
+ abilities?: {
626
+ core?: string[] | undefined;
627
+ taskBased?: Record<string, string[]> | undefined;
628
+ loadAll?: boolean | undefined;
629
+ } | undefined;
630
+ maxTokens?: number | undefined;
631
+ systemPrompt?: string | undefined;
632
+ personality?: {
633
+ traits?: string[] | undefined;
634
+ catchphrase?: string | undefined;
635
+ communicationStyle?: string | undefined;
636
+ decisionMaking?: string | undefined;
637
+ } | undefined;
638
+ thinkingPatterns?: string[] | undefined;
639
+ temperature?: number | undefined;
640
+ providerAffinity?: {
641
+ preferred?: string[] | undefined;
642
+ defaultSynthesizer?: string | undefined;
643
+ excluded?: string[] | undefined;
644
+ taskOverrides?: Record<string, string> | undefined;
645
+ temperatureOverrides?: Record<string, number> | undefined;
646
+ } | undefined;
647
+ selectionMetadata?: {
648
+ primaryIntents?: string[] | undefined;
649
+ secondarySignals?: string[] | undefined;
650
+ negativeIntents?: string[] | undefined;
651
+ redirectWhen?: {
652
+ phrase: string;
653
+ suggest: string;
654
+ }[] | undefined;
655
+ keywords?: string[] | undefined;
656
+ antiKeywords?: string[] | undefined;
657
+ exampleTasks?: string[] | undefined;
658
+ notForTasks?: string[] | undefined;
659
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
660
+ } | undefined;
661
+ collaboratesWith?: string[] | undefined;
662
+ }>, {
663
+ description: string;
664
+ enabled: boolean;
665
+ agentId: string;
666
+ parallel?: boolean | undefined;
667
+ version?: string | undefined;
668
+ metadata?: Record<string, unknown> | undefined;
669
+ priority?: number | undefined;
670
+ team?: string | undefined;
671
+ displayName?: string | undefined;
672
+ capabilities?: string[] | undefined;
673
+ role?: string | undefined;
674
+ expertise?: string[] | undefined;
675
+ tags?: string[] | undefined;
676
+ workflow?: {
677
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
678
+ stepId: string;
679
+ name: string;
680
+ config: Record<string, unknown>;
681
+ parallel?: boolean | undefined;
682
+ retryPolicy?: {
683
+ maxAttempts: number;
684
+ backoffMs: number;
685
+ backoffMultiplier: number;
686
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
687
+ } | undefined;
688
+ description?: string | undefined;
689
+ dependencies?: string[] | undefined;
690
+ outputs?: string[] | undefined;
691
+ timeoutMs?: number | undefined;
692
+ streaming?: boolean | undefined;
693
+ condition?: string | undefined;
694
+ keyQuestions?: string[] | undefined;
695
+ saveToMemory?: boolean | undefined;
696
+ checkpoint?: boolean | undefined;
697
+ }[] | undefined;
698
+ orchestration?: {
699
+ maxDelegationDepth?: number | undefined;
700
+ canReadWorkspaces?: string[] | undefined;
701
+ canWriteToShared?: boolean | undefined;
702
+ delegationTimeout?: number | undefined;
703
+ } | undefined;
704
+ createdAt?: string | undefined;
705
+ updatedAt?: string | undefined;
706
+ dependencies?: string[] | undefined;
707
+ abilities?: {
708
+ core?: string[] | undefined;
709
+ taskBased?: Record<string, string[]> | undefined;
710
+ loadAll?: boolean | undefined;
711
+ } | undefined;
712
+ maxTokens?: number | undefined;
713
+ systemPrompt?: string | undefined;
714
+ personality?: {
715
+ traits?: string[] | undefined;
716
+ catchphrase?: string | undefined;
717
+ communicationStyle?: string | undefined;
718
+ decisionMaking?: string | undefined;
719
+ } | undefined;
720
+ thinkingPatterns?: string[] | undefined;
721
+ temperature?: number | undefined;
722
+ providerAffinity?: {
723
+ preferred?: string[] | undefined;
724
+ defaultSynthesizer?: string | undefined;
725
+ excluded?: string[] | undefined;
726
+ taskOverrides?: Record<string, string> | undefined;
727
+ temperatureOverrides?: Record<string, number> | undefined;
728
+ } | undefined;
729
+ selectionMetadata?: {
730
+ primaryIntents?: string[] | undefined;
731
+ secondarySignals?: string[] | undefined;
732
+ negativeIntents?: string[] | undefined;
733
+ redirectWhen?: {
734
+ phrase: string;
735
+ suggest: string;
736
+ }[] | undefined;
737
+ keywords?: string[] | undefined;
738
+ antiKeywords?: string[] | undefined;
739
+ exampleTasks?: string[] | undefined;
740
+ notForTasks?: string[] | undefined;
741
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
742
+ } | undefined;
743
+ collaboratesWith?: string[] | undefined;
744
+ }, {
745
+ description: string;
746
+ agentId: string;
747
+ parallel?: boolean | undefined;
748
+ version?: string | undefined;
749
+ metadata?: Record<string, unknown> | undefined;
750
+ enabled?: boolean | undefined;
751
+ priority?: number | undefined;
752
+ team?: string | undefined;
753
+ displayName?: string | undefined;
754
+ capabilities?: string[] | undefined;
755
+ role?: string | undefined;
756
+ expertise?: string[] | undefined;
757
+ tags?: string[] | undefined;
758
+ workflow?: {
759
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
760
+ stepId: string;
761
+ name: string;
762
+ parallel?: boolean | undefined;
763
+ retryPolicy?: {
764
+ maxAttempts: number;
765
+ backoffMs: number;
766
+ backoffMultiplier: number;
767
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
768
+ } | undefined;
769
+ config?: Record<string, unknown> | undefined;
770
+ description?: string | undefined;
771
+ dependencies?: string[] | undefined;
772
+ outputs?: string[] | undefined;
773
+ timeoutMs?: number | undefined;
774
+ streaming?: boolean | undefined;
775
+ condition?: string | undefined;
776
+ keyQuestions?: string[] | undefined;
777
+ saveToMemory?: boolean | undefined;
778
+ checkpoint?: boolean | undefined;
779
+ }[] | undefined;
780
+ orchestration?: {
781
+ maxDelegationDepth?: number | undefined;
782
+ canReadWorkspaces?: string[] | undefined;
783
+ canWriteToShared?: boolean | undefined;
784
+ delegationTimeout?: number | undefined;
785
+ } | undefined;
786
+ createdAt?: string | undefined;
787
+ updatedAt?: string | undefined;
788
+ dependencies?: string[] | undefined;
789
+ abilities?: {
790
+ core?: string[] | undefined;
791
+ taskBased?: Record<string, string[]> | undefined;
792
+ loadAll?: boolean | undefined;
793
+ } | undefined;
794
+ maxTokens?: number | undefined;
795
+ systemPrompt?: string | undefined;
796
+ personality?: {
797
+ traits?: string[] | undefined;
798
+ catchphrase?: string | undefined;
799
+ communicationStyle?: string | undefined;
800
+ decisionMaking?: string | undefined;
801
+ } | undefined;
802
+ thinkingPatterns?: string[] | undefined;
803
+ temperature?: number | undefined;
804
+ providerAffinity?: {
805
+ preferred?: string[] | undefined;
806
+ defaultSynthesizer?: string | undefined;
807
+ excluded?: string[] | undefined;
808
+ taskOverrides?: Record<string, string> | undefined;
809
+ temperatureOverrides?: Record<string, number> | undefined;
810
+ } | undefined;
811
+ selectionMetadata?: {
812
+ primaryIntents?: string[] | undefined;
813
+ secondarySignals?: string[] | undefined;
814
+ negativeIntents?: string[] | undefined;
815
+ redirectWhen?: {
816
+ phrase: string;
817
+ suggest: string;
818
+ }[] | undefined;
819
+ keywords?: string[] | undefined;
820
+ antiKeywords?: string[] | undefined;
821
+ exampleTasks?: string[] | undefined;
822
+ notForTasks?: string[] | undefined;
823
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
824
+ } | undefined;
825
+ collaboratesWith?: string[] | undefined;
826
+ }>;
827
+ export type AgentProfile = z.infer<typeof AgentProfileSchema>;
828
+ /**
829
+ * Options for running an agent
830
+ */
831
+ export declare const AgentRunOptionsSchema: z.ZodObject<{
832
+ memory: z.ZodOptional<z.ZodBoolean>;
833
+ saveMemory: z.ZodOptional<z.ZodBoolean>;
834
+ sessionId: z.ZodOptional<z.ZodString>;
835
+ createSession: z.ZodOptional<z.ZodBoolean>;
836
+ provider: z.ZodOptional<z.ZodString>;
837
+ model: z.ZodOptional<z.ZodString>;
838
+ format: z.ZodOptional<z.ZodEnum<["text", "json"]>>;
839
+ verbose: z.ZodOptional<z.ZodBoolean>;
840
+ debug: z.ZodOptional<z.ZodBoolean>;
841
+ quiet: z.ZodOptional<z.ZodBoolean>;
842
+ parallel: z.ZodOptional<z.ZodBoolean>;
843
+ streaming: z.ZodOptional<z.ZodBoolean>;
844
+ resumable: z.ZodOptional<z.ZodBoolean>;
845
+ checkpoint: z.ZodOptional<z.ZodBoolean>;
846
+ idempotencyKey: z.ZodOptional<z.ZodString>;
847
+ delegationContext: z.ZodOptional<z.ZodLazy<z.ZodObject<{
848
+ currentDepth: z.ZodNumber;
849
+ maxDepth: z.ZodNumber;
850
+ delegationChain: z.ZodArray<z.ZodString, "many">;
851
+ initiatorAgentId: z.ZodString;
852
+ rootTaskId: z.ZodString;
853
+ startedAt: z.ZodOptional<z.ZodString>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ currentDepth: number;
856
+ maxDepth: number;
857
+ delegationChain: string[];
858
+ initiatorAgentId: string;
859
+ rootTaskId: string;
860
+ startedAt?: string | undefined;
861
+ }, {
862
+ currentDepth: number;
863
+ maxDepth: number;
864
+ delegationChain: string[];
865
+ initiatorAgentId: string;
866
+ rootTaskId: string;
867
+ startedAt?: string | undefined;
868
+ }>>>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ memory?: boolean | undefined;
871
+ parallel?: boolean | undefined;
872
+ sessionId?: string | undefined;
873
+ format?: "text" | "json" | undefined;
874
+ provider?: string | undefined;
875
+ streaming?: boolean | undefined;
876
+ model?: string | undefined;
877
+ checkpoint?: boolean | undefined;
878
+ saveMemory?: boolean | undefined;
879
+ createSession?: boolean | undefined;
880
+ verbose?: boolean | undefined;
881
+ debug?: boolean | undefined;
882
+ quiet?: boolean | undefined;
883
+ resumable?: boolean | undefined;
884
+ idempotencyKey?: string | undefined;
885
+ delegationContext?: {
886
+ currentDepth: number;
887
+ maxDepth: number;
888
+ delegationChain: string[];
889
+ initiatorAgentId: string;
890
+ rootTaskId: string;
891
+ startedAt?: string | undefined;
892
+ } | undefined;
893
+ }, {
894
+ memory?: boolean | undefined;
895
+ parallel?: boolean | undefined;
896
+ sessionId?: string | undefined;
897
+ format?: "text" | "json" | undefined;
898
+ provider?: string | undefined;
899
+ streaming?: boolean | undefined;
900
+ model?: string | undefined;
901
+ checkpoint?: boolean | undefined;
902
+ saveMemory?: boolean | undefined;
903
+ createSession?: boolean | undefined;
904
+ verbose?: boolean | undefined;
905
+ debug?: boolean | undefined;
906
+ quiet?: boolean | undefined;
907
+ resumable?: boolean | undefined;
908
+ idempotencyKey?: string | undefined;
909
+ delegationContext?: {
910
+ currentDepth: number;
911
+ maxDepth: number;
912
+ delegationChain: string[];
913
+ initiatorAgentId: string;
914
+ rootTaskId: string;
915
+ startedAt?: string | undefined;
916
+ } | undefined;
917
+ }>;
918
+ export type AgentRunOptions = z.infer<typeof AgentRunOptionsSchema>;
919
+ /**
920
+ * Agent event types
921
+ */
922
+ export declare const AgentEventTypeSchema: z.ZodEnum<["agent.registered", "agent.started", "agent.stageStarted", "agent.stageCompleted", "agent.stageFailed", "agent.delegated", "agent.delegationReturned", "agent.completed", "agent.failed"]>;
923
+ export type AgentEventType = z.infer<typeof AgentEventTypeSchema>;
924
+ /**
925
+ * Agent error schema
926
+ */
927
+ export declare const AgentErrorSchema: z.ZodObject<{
928
+ code: z.ZodString;
929
+ message: z.ZodString;
930
+ stepId: z.ZodOptional<z.ZodString>;
931
+ retryable: z.ZodOptional<z.ZodBoolean>;
932
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
933
+ }, "strip", z.ZodTypeAny, {
934
+ code: string;
935
+ message: string;
936
+ stepId?: string | undefined;
937
+ details?: Record<string, unknown> | undefined;
938
+ retryable?: boolean | undefined;
939
+ }, {
940
+ code: string;
941
+ message: string;
942
+ stepId?: string | undefined;
943
+ details?: Record<string, unknown> | undefined;
944
+ retryable?: boolean | undefined;
945
+ }>;
946
+ export type AgentError = z.infer<typeof AgentErrorSchema>;
947
+ /**
948
+ * Agent event payload variants
949
+ */
950
+ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
951
+ type: z.ZodLiteral<"registered">;
952
+ profile: z.ZodEffects<z.ZodObject<{
953
+ agentId: z.ZodString;
954
+ displayName: z.ZodOptional<z.ZodString>;
955
+ version: z.ZodOptional<z.ZodString>;
956
+ description: z.ZodString;
957
+ role: z.ZodOptional<z.ZodString>;
958
+ expertise: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
959
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
960
+ systemPrompt: z.ZodOptional<z.ZodString>;
961
+ workflow: z.ZodOptional<z.ZodArray<z.ZodObject<{
962
+ stepId: z.ZodString;
963
+ name: z.ZodString;
964
+ description: z.ZodOptional<z.ZodString>;
965
+ type: z.ZodEnum<["prompt", "tool", "conditional", "loop", "parallel", "delegate", "discuss"]>;
966
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
967
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
968
+ condition: z.ZodOptional<z.ZodString>;
969
+ parallel: z.ZodOptional<z.ZodBoolean>;
970
+ retryPolicy: z.ZodOptional<z.ZodObject<{
971
+ maxAttempts: z.ZodNumber;
972
+ backoffMs: z.ZodNumber;
973
+ backoffMultiplier: z.ZodNumber;
974
+ retryOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["timeout", "rateLimit", "serverError", "networkError"]>, "many">>;
975
+ }, "strip", z.ZodTypeAny, {
976
+ maxAttempts: number;
977
+ backoffMs: number;
978
+ backoffMultiplier: number;
979
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
980
+ }, {
981
+ maxAttempts: number;
982
+ backoffMs: number;
983
+ backoffMultiplier: number;
984
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
985
+ }>>;
986
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
987
+ keyQuestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
988
+ outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
989
+ streaming: z.ZodOptional<z.ZodBoolean>;
990
+ saveToMemory: z.ZodOptional<z.ZodBoolean>;
991
+ checkpoint: z.ZodOptional<z.ZodBoolean>;
992
+ }, "strip", z.ZodTypeAny, {
993
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
994
+ stepId: string;
995
+ name: string;
996
+ config: Record<string, unknown>;
997
+ parallel?: boolean | undefined;
998
+ retryPolicy?: {
999
+ maxAttempts: number;
1000
+ backoffMs: number;
1001
+ backoffMultiplier: number;
1002
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1003
+ } | undefined;
1004
+ description?: string | undefined;
1005
+ dependencies?: string[] | undefined;
1006
+ outputs?: string[] | undefined;
1007
+ timeoutMs?: number | undefined;
1008
+ streaming?: boolean | undefined;
1009
+ condition?: string | undefined;
1010
+ keyQuestions?: string[] | undefined;
1011
+ saveToMemory?: boolean | undefined;
1012
+ checkpoint?: boolean | undefined;
1013
+ }, {
1014
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1015
+ stepId: string;
1016
+ name: string;
1017
+ parallel?: boolean | undefined;
1018
+ retryPolicy?: {
1019
+ maxAttempts: number;
1020
+ backoffMs: number;
1021
+ backoffMultiplier: number;
1022
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1023
+ } | undefined;
1024
+ config?: Record<string, unknown> | undefined;
1025
+ description?: string | undefined;
1026
+ dependencies?: string[] | undefined;
1027
+ outputs?: string[] | undefined;
1028
+ timeoutMs?: number | undefined;
1029
+ streaming?: boolean | undefined;
1030
+ condition?: string | undefined;
1031
+ keyQuestions?: string[] | undefined;
1032
+ saveToMemory?: boolean | undefined;
1033
+ checkpoint?: boolean | undefined;
1034
+ }>, "many">>;
1035
+ personality: z.ZodOptional<z.ZodObject<{
1036
+ traits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1037
+ catchphrase: z.ZodOptional<z.ZodString>;
1038
+ communicationStyle: z.ZodOptional<z.ZodString>;
1039
+ decisionMaking: z.ZodOptional<z.ZodString>;
1040
+ }, "strip", z.ZodTypeAny, {
1041
+ traits?: string[] | undefined;
1042
+ catchphrase?: string | undefined;
1043
+ communicationStyle?: string | undefined;
1044
+ decisionMaking?: string | undefined;
1045
+ }, {
1046
+ traits?: string[] | undefined;
1047
+ catchphrase?: string | undefined;
1048
+ communicationStyle?: string | undefined;
1049
+ decisionMaking?: string | undefined;
1050
+ }>>;
1051
+ abilities: z.ZodOptional<z.ZodObject<{
1052
+ core: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1053
+ taskBased: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1054
+ loadAll: z.ZodOptional<z.ZodBoolean>;
1055
+ }, "strip", z.ZodTypeAny, {
1056
+ core?: string[] | undefined;
1057
+ taskBased?: Record<string, string[]> | undefined;
1058
+ loadAll?: boolean | undefined;
1059
+ }, {
1060
+ core?: string[] | undefined;
1061
+ taskBased?: Record<string, string[]> | undefined;
1062
+ loadAll?: boolean | undefined;
1063
+ }>>;
1064
+ thinkingPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1065
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1066
+ parallel: z.ZodOptional<z.ZodBoolean>;
1067
+ temperature: z.ZodOptional<z.ZodNumber>;
1068
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1069
+ orchestration: z.ZodOptional<z.ZodObject<{
1070
+ maxDelegationDepth: z.ZodOptional<z.ZodNumber>;
1071
+ canReadWorkspaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1072
+ canWriteToShared: z.ZodOptional<z.ZodBoolean>;
1073
+ delegationTimeout: z.ZodOptional<z.ZodNumber>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ maxDelegationDepth?: number | undefined;
1076
+ canReadWorkspaces?: string[] | undefined;
1077
+ canWriteToShared?: boolean | undefined;
1078
+ delegationTimeout?: number | undefined;
1079
+ }, {
1080
+ maxDelegationDepth?: number | undefined;
1081
+ canReadWorkspaces?: string[] | undefined;
1082
+ canWriteToShared?: boolean | undefined;
1083
+ delegationTimeout?: number | undefined;
1084
+ }>>;
1085
+ providerAffinity: z.ZodOptional<z.ZodObject<{
1086
+ /** Preferred providers for this agent's discussions (ordered by preference) */
1087
+ preferred: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1088
+ /** Provider to use for synthesis/consensus */
1089
+ defaultSynthesizer: z.ZodOptional<z.ZodString>;
1090
+ /** Providers to exclude from discussions */
1091
+ excluded: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1092
+ /** Override provider for specific task types */
1093
+ taskOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1094
+ /** Provider-specific temperature overrides */
1095
+ temperatureOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ preferred?: string[] | undefined;
1098
+ defaultSynthesizer?: string | undefined;
1099
+ excluded?: string[] | undefined;
1100
+ taskOverrides?: Record<string, string> | undefined;
1101
+ temperatureOverrides?: Record<string, number> | undefined;
1102
+ }, {
1103
+ preferred?: string[] | undefined;
1104
+ defaultSynthesizer?: string | undefined;
1105
+ excluded?: string[] | undefined;
1106
+ taskOverrides?: Record<string, string> | undefined;
1107
+ temperatureOverrides?: Record<string, number> | undefined;
1108
+ }>>;
1109
+ selectionMetadata: z.ZodOptional<z.ZodObject<{
1110
+ primaryIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1111
+ secondarySignals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1112
+ negativeIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1113
+ redirectWhen: z.ZodOptional<z.ZodArray<z.ZodObject<{
1114
+ phrase: z.ZodString;
1115
+ suggest: z.ZodString;
1116
+ }, "strip", z.ZodTypeAny, {
1117
+ phrase: string;
1118
+ suggest: string;
1119
+ }, {
1120
+ phrase: string;
1121
+ suggest: string;
1122
+ }>, "many">>;
1123
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1124
+ antiKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1125
+ exampleTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1126
+ notForTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1127
+ agentCategory: z.ZodOptional<z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>>;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ primaryIntents?: string[] | undefined;
1130
+ secondarySignals?: string[] | undefined;
1131
+ negativeIntents?: string[] | undefined;
1132
+ redirectWhen?: {
1133
+ phrase: string;
1134
+ suggest: string;
1135
+ }[] | undefined;
1136
+ keywords?: string[] | undefined;
1137
+ antiKeywords?: string[] | undefined;
1138
+ exampleTasks?: string[] | undefined;
1139
+ notForTasks?: string[] | undefined;
1140
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1141
+ }, {
1142
+ primaryIntents?: string[] | undefined;
1143
+ secondarySignals?: string[] | undefined;
1144
+ negativeIntents?: string[] | undefined;
1145
+ redirectWhen?: {
1146
+ phrase: string;
1147
+ suggest: string;
1148
+ }[] | undefined;
1149
+ keywords?: string[] | undefined;
1150
+ antiKeywords?: string[] | undefined;
1151
+ exampleTasks?: string[] | undefined;
1152
+ notForTasks?: string[] | undefined;
1153
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1154
+ }>>;
1155
+ team: z.ZodOptional<z.ZodString>;
1156
+ collaboratesWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1157
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1158
+ priority: z.ZodOptional<z.ZodNumber>;
1159
+ enabled: z.ZodDefault<z.ZodBoolean>;
1160
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1161
+ createdAt: z.ZodOptional<z.ZodString>;
1162
+ updatedAt: z.ZodOptional<z.ZodString>;
1163
+ }, "strip", z.ZodTypeAny, {
1164
+ description: string;
1165
+ enabled: boolean;
1166
+ agentId: string;
1167
+ parallel?: boolean | undefined;
1168
+ version?: string | undefined;
1169
+ metadata?: Record<string, unknown> | undefined;
1170
+ priority?: number | undefined;
1171
+ team?: string | undefined;
1172
+ displayName?: string | undefined;
1173
+ capabilities?: string[] | undefined;
1174
+ role?: string | undefined;
1175
+ expertise?: string[] | undefined;
1176
+ tags?: string[] | undefined;
1177
+ workflow?: {
1178
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1179
+ stepId: string;
1180
+ name: string;
1181
+ config: Record<string, unknown>;
1182
+ parallel?: boolean | undefined;
1183
+ retryPolicy?: {
1184
+ maxAttempts: number;
1185
+ backoffMs: number;
1186
+ backoffMultiplier: number;
1187
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1188
+ } | undefined;
1189
+ description?: string | undefined;
1190
+ dependencies?: string[] | undefined;
1191
+ outputs?: string[] | undefined;
1192
+ timeoutMs?: number | undefined;
1193
+ streaming?: boolean | undefined;
1194
+ condition?: string | undefined;
1195
+ keyQuestions?: string[] | undefined;
1196
+ saveToMemory?: boolean | undefined;
1197
+ checkpoint?: boolean | undefined;
1198
+ }[] | undefined;
1199
+ orchestration?: {
1200
+ maxDelegationDepth?: number | undefined;
1201
+ canReadWorkspaces?: string[] | undefined;
1202
+ canWriteToShared?: boolean | undefined;
1203
+ delegationTimeout?: number | undefined;
1204
+ } | undefined;
1205
+ createdAt?: string | undefined;
1206
+ updatedAt?: string | undefined;
1207
+ dependencies?: string[] | undefined;
1208
+ abilities?: {
1209
+ core?: string[] | undefined;
1210
+ taskBased?: Record<string, string[]> | undefined;
1211
+ loadAll?: boolean | undefined;
1212
+ } | undefined;
1213
+ maxTokens?: number | undefined;
1214
+ systemPrompt?: string | undefined;
1215
+ personality?: {
1216
+ traits?: string[] | undefined;
1217
+ catchphrase?: string | undefined;
1218
+ communicationStyle?: string | undefined;
1219
+ decisionMaking?: string | undefined;
1220
+ } | undefined;
1221
+ thinkingPatterns?: string[] | undefined;
1222
+ temperature?: number | undefined;
1223
+ providerAffinity?: {
1224
+ preferred?: string[] | undefined;
1225
+ defaultSynthesizer?: string | undefined;
1226
+ excluded?: string[] | undefined;
1227
+ taskOverrides?: Record<string, string> | undefined;
1228
+ temperatureOverrides?: Record<string, number> | undefined;
1229
+ } | undefined;
1230
+ selectionMetadata?: {
1231
+ primaryIntents?: string[] | undefined;
1232
+ secondarySignals?: string[] | undefined;
1233
+ negativeIntents?: string[] | undefined;
1234
+ redirectWhen?: {
1235
+ phrase: string;
1236
+ suggest: string;
1237
+ }[] | undefined;
1238
+ keywords?: string[] | undefined;
1239
+ antiKeywords?: string[] | undefined;
1240
+ exampleTasks?: string[] | undefined;
1241
+ notForTasks?: string[] | undefined;
1242
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1243
+ } | undefined;
1244
+ collaboratesWith?: string[] | undefined;
1245
+ }, {
1246
+ description: string;
1247
+ agentId: string;
1248
+ parallel?: boolean | undefined;
1249
+ version?: string | undefined;
1250
+ metadata?: Record<string, unknown> | undefined;
1251
+ enabled?: boolean | undefined;
1252
+ priority?: number | undefined;
1253
+ team?: string | undefined;
1254
+ displayName?: string | undefined;
1255
+ capabilities?: string[] | undefined;
1256
+ role?: string | undefined;
1257
+ expertise?: string[] | undefined;
1258
+ tags?: string[] | undefined;
1259
+ workflow?: {
1260
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1261
+ stepId: string;
1262
+ name: string;
1263
+ parallel?: boolean | undefined;
1264
+ retryPolicy?: {
1265
+ maxAttempts: number;
1266
+ backoffMs: number;
1267
+ backoffMultiplier: number;
1268
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1269
+ } | undefined;
1270
+ config?: Record<string, unknown> | undefined;
1271
+ description?: string | undefined;
1272
+ dependencies?: string[] | undefined;
1273
+ outputs?: string[] | undefined;
1274
+ timeoutMs?: number | undefined;
1275
+ streaming?: boolean | undefined;
1276
+ condition?: string | undefined;
1277
+ keyQuestions?: string[] | undefined;
1278
+ saveToMemory?: boolean | undefined;
1279
+ checkpoint?: boolean | undefined;
1280
+ }[] | undefined;
1281
+ orchestration?: {
1282
+ maxDelegationDepth?: number | undefined;
1283
+ canReadWorkspaces?: string[] | undefined;
1284
+ canWriteToShared?: boolean | undefined;
1285
+ delegationTimeout?: number | undefined;
1286
+ } | undefined;
1287
+ createdAt?: string | undefined;
1288
+ updatedAt?: string | undefined;
1289
+ dependencies?: string[] | undefined;
1290
+ abilities?: {
1291
+ core?: string[] | undefined;
1292
+ taskBased?: Record<string, string[]> | undefined;
1293
+ loadAll?: boolean | undefined;
1294
+ } | undefined;
1295
+ maxTokens?: number | undefined;
1296
+ systemPrompt?: string | undefined;
1297
+ personality?: {
1298
+ traits?: string[] | undefined;
1299
+ catchphrase?: string | undefined;
1300
+ communicationStyle?: string | undefined;
1301
+ decisionMaking?: string | undefined;
1302
+ } | undefined;
1303
+ thinkingPatterns?: string[] | undefined;
1304
+ temperature?: number | undefined;
1305
+ providerAffinity?: {
1306
+ preferred?: string[] | undefined;
1307
+ defaultSynthesizer?: string | undefined;
1308
+ excluded?: string[] | undefined;
1309
+ taskOverrides?: Record<string, string> | undefined;
1310
+ temperatureOverrides?: Record<string, number> | undefined;
1311
+ } | undefined;
1312
+ selectionMetadata?: {
1313
+ primaryIntents?: string[] | undefined;
1314
+ secondarySignals?: string[] | undefined;
1315
+ negativeIntents?: string[] | undefined;
1316
+ redirectWhen?: {
1317
+ phrase: string;
1318
+ suggest: string;
1319
+ }[] | undefined;
1320
+ keywords?: string[] | undefined;
1321
+ antiKeywords?: string[] | undefined;
1322
+ exampleTasks?: string[] | undefined;
1323
+ notForTasks?: string[] | undefined;
1324
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1325
+ } | undefined;
1326
+ collaboratesWith?: string[] | undefined;
1327
+ }>, {
1328
+ description: string;
1329
+ enabled: boolean;
1330
+ agentId: string;
1331
+ parallel?: boolean | undefined;
1332
+ version?: string | undefined;
1333
+ metadata?: Record<string, unknown> | undefined;
1334
+ priority?: number | undefined;
1335
+ team?: string | undefined;
1336
+ displayName?: string | undefined;
1337
+ capabilities?: string[] | undefined;
1338
+ role?: string | undefined;
1339
+ expertise?: string[] | undefined;
1340
+ tags?: string[] | undefined;
1341
+ workflow?: {
1342
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1343
+ stepId: string;
1344
+ name: string;
1345
+ config: Record<string, unknown>;
1346
+ parallel?: boolean | undefined;
1347
+ retryPolicy?: {
1348
+ maxAttempts: number;
1349
+ backoffMs: number;
1350
+ backoffMultiplier: number;
1351
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1352
+ } | undefined;
1353
+ description?: string | undefined;
1354
+ dependencies?: string[] | undefined;
1355
+ outputs?: string[] | undefined;
1356
+ timeoutMs?: number | undefined;
1357
+ streaming?: boolean | undefined;
1358
+ condition?: string | undefined;
1359
+ keyQuestions?: string[] | undefined;
1360
+ saveToMemory?: boolean | undefined;
1361
+ checkpoint?: boolean | undefined;
1362
+ }[] | undefined;
1363
+ orchestration?: {
1364
+ maxDelegationDepth?: number | undefined;
1365
+ canReadWorkspaces?: string[] | undefined;
1366
+ canWriteToShared?: boolean | undefined;
1367
+ delegationTimeout?: number | undefined;
1368
+ } | undefined;
1369
+ createdAt?: string | undefined;
1370
+ updatedAt?: string | undefined;
1371
+ dependencies?: string[] | undefined;
1372
+ abilities?: {
1373
+ core?: string[] | undefined;
1374
+ taskBased?: Record<string, string[]> | undefined;
1375
+ loadAll?: boolean | undefined;
1376
+ } | undefined;
1377
+ maxTokens?: number | undefined;
1378
+ systemPrompt?: string | undefined;
1379
+ personality?: {
1380
+ traits?: string[] | undefined;
1381
+ catchphrase?: string | undefined;
1382
+ communicationStyle?: string | undefined;
1383
+ decisionMaking?: string | undefined;
1384
+ } | undefined;
1385
+ thinkingPatterns?: string[] | undefined;
1386
+ temperature?: number | undefined;
1387
+ providerAffinity?: {
1388
+ preferred?: string[] | undefined;
1389
+ defaultSynthesizer?: string | undefined;
1390
+ excluded?: string[] | undefined;
1391
+ taskOverrides?: Record<string, string> | undefined;
1392
+ temperatureOverrides?: Record<string, number> | undefined;
1393
+ } | undefined;
1394
+ selectionMetadata?: {
1395
+ primaryIntents?: string[] | undefined;
1396
+ secondarySignals?: string[] | undefined;
1397
+ negativeIntents?: string[] | undefined;
1398
+ redirectWhen?: {
1399
+ phrase: string;
1400
+ suggest: string;
1401
+ }[] | undefined;
1402
+ keywords?: string[] | undefined;
1403
+ antiKeywords?: string[] | undefined;
1404
+ exampleTasks?: string[] | undefined;
1405
+ notForTasks?: string[] | undefined;
1406
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1407
+ } | undefined;
1408
+ collaboratesWith?: string[] | undefined;
1409
+ }, {
1410
+ description: string;
1411
+ agentId: string;
1412
+ parallel?: boolean | undefined;
1413
+ version?: string | undefined;
1414
+ metadata?: Record<string, unknown> | undefined;
1415
+ enabled?: boolean | undefined;
1416
+ priority?: number | undefined;
1417
+ team?: string | undefined;
1418
+ displayName?: string | undefined;
1419
+ capabilities?: string[] | undefined;
1420
+ role?: string | undefined;
1421
+ expertise?: string[] | undefined;
1422
+ tags?: string[] | undefined;
1423
+ workflow?: {
1424
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1425
+ stepId: string;
1426
+ name: string;
1427
+ parallel?: boolean | undefined;
1428
+ retryPolicy?: {
1429
+ maxAttempts: number;
1430
+ backoffMs: number;
1431
+ backoffMultiplier: number;
1432
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1433
+ } | undefined;
1434
+ config?: Record<string, unknown> | undefined;
1435
+ description?: string | undefined;
1436
+ dependencies?: string[] | undefined;
1437
+ outputs?: string[] | undefined;
1438
+ timeoutMs?: number | undefined;
1439
+ streaming?: boolean | undefined;
1440
+ condition?: string | undefined;
1441
+ keyQuestions?: string[] | undefined;
1442
+ saveToMemory?: boolean | undefined;
1443
+ checkpoint?: boolean | undefined;
1444
+ }[] | undefined;
1445
+ orchestration?: {
1446
+ maxDelegationDepth?: number | undefined;
1447
+ canReadWorkspaces?: string[] | undefined;
1448
+ canWriteToShared?: boolean | undefined;
1449
+ delegationTimeout?: number | undefined;
1450
+ } | undefined;
1451
+ createdAt?: string | undefined;
1452
+ updatedAt?: string | undefined;
1453
+ dependencies?: string[] | undefined;
1454
+ abilities?: {
1455
+ core?: string[] | undefined;
1456
+ taskBased?: Record<string, string[]> | undefined;
1457
+ loadAll?: boolean | undefined;
1458
+ } | undefined;
1459
+ maxTokens?: number | undefined;
1460
+ systemPrompt?: string | undefined;
1461
+ personality?: {
1462
+ traits?: string[] | undefined;
1463
+ catchphrase?: string | undefined;
1464
+ communicationStyle?: string | undefined;
1465
+ decisionMaking?: string | undefined;
1466
+ } | undefined;
1467
+ thinkingPatterns?: string[] | undefined;
1468
+ temperature?: number | undefined;
1469
+ providerAffinity?: {
1470
+ preferred?: string[] | undefined;
1471
+ defaultSynthesizer?: string | undefined;
1472
+ excluded?: string[] | undefined;
1473
+ taskOverrides?: Record<string, string> | undefined;
1474
+ temperatureOverrides?: Record<string, number> | undefined;
1475
+ } | undefined;
1476
+ selectionMetadata?: {
1477
+ primaryIntents?: string[] | undefined;
1478
+ secondarySignals?: string[] | undefined;
1479
+ negativeIntents?: string[] | undefined;
1480
+ redirectWhen?: {
1481
+ phrase: string;
1482
+ suggest: string;
1483
+ }[] | undefined;
1484
+ keywords?: string[] | undefined;
1485
+ antiKeywords?: string[] | undefined;
1486
+ exampleTasks?: string[] | undefined;
1487
+ notForTasks?: string[] | undefined;
1488
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1489
+ } | undefined;
1490
+ collaboratesWith?: string[] | undefined;
1491
+ }>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ type: "registered";
1494
+ profile: {
1495
+ description: string;
1496
+ enabled: boolean;
1497
+ agentId: string;
1498
+ parallel?: boolean | undefined;
1499
+ version?: string | undefined;
1500
+ metadata?: Record<string, unknown> | undefined;
1501
+ priority?: number | undefined;
1502
+ team?: string | undefined;
1503
+ displayName?: string | undefined;
1504
+ capabilities?: string[] | undefined;
1505
+ role?: string | undefined;
1506
+ expertise?: string[] | undefined;
1507
+ tags?: string[] | undefined;
1508
+ workflow?: {
1509
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1510
+ stepId: string;
1511
+ name: string;
1512
+ config: Record<string, unknown>;
1513
+ parallel?: boolean | undefined;
1514
+ retryPolicy?: {
1515
+ maxAttempts: number;
1516
+ backoffMs: number;
1517
+ backoffMultiplier: number;
1518
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1519
+ } | undefined;
1520
+ description?: string | undefined;
1521
+ dependencies?: string[] | undefined;
1522
+ outputs?: string[] | undefined;
1523
+ timeoutMs?: number | undefined;
1524
+ streaming?: boolean | undefined;
1525
+ condition?: string | undefined;
1526
+ keyQuestions?: string[] | undefined;
1527
+ saveToMemory?: boolean | undefined;
1528
+ checkpoint?: boolean | undefined;
1529
+ }[] | undefined;
1530
+ orchestration?: {
1531
+ maxDelegationDepth?: number | undefined;
1532
+ canReadWorkspaces?: string[] | undefined;
1533
+ canWriteToShared?: boolean | undefined;
1534
+ delegationTimeout?: number | undefined;
1535
+ } | undefined;
1536
+ createdAt?: string | undefined;
1537
+ updatedAt?: string | undefined;
1538
+ dependencies?: string[] | undefined;
1539
+ abilities?: {
1540
+ core?: string[] | undefined;
1541
+ taskBased?: Record<string, string[]> | undefined;
1542
+ loadAll?: boolean | undefined;
1543
+ } | undefined;
1544
+ maxTokens?: number | undefined;
1545
+ systemPrompt?: string | undefined;
1546
+ personality?: {
1547
+ traits?: string[] | undefined;
1548
+ catchphrase?: string | undefined;
1549
+ communicationStyle?: string | undefined;
1550
+ decisionMaking?: string | undefined;
1551
+ } | undefined;
1552
+ thinkingPatterns?: string[] | undefined;
1553
+ temperature?: number | undefined;
1554
+ providerAffinity?: {
1555
+ preferred?: string[] | undefined;
1556
+ defaultSynthesizer?: string | undefined;
1557
+ excluded?: string[] | undefined;
1558
+ taskOverrides?: Record<string, string> | undefined;
1559
+ temperatureOverrides?: Record<string, number> | undefined;
1560
+ } | undefined;
1561
+ selectionMetadata?: {
1562
+ primaryIntents?: string[] | undefined;
1563
+ secondarySignals?: string[] | undefined;
1564
+ negativeIntents?: string[] | undefined;
1565
+ redirectWhen?: {
1566
+ phrase: string;
1567
+ suggest: string;
1568
+ }[] | undefined;
1569
+ keywords?: string[] | undefined;
1570
+ antiKeywords?: string[] | undefined;
1571
+ exampleTasks?: string[] | undefined;
1572
+ notForTasks?: string[] | undefined;
1573
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1574
+ } | undefined;
1575
+ collaboratesWith?: string[] | undefined;
1576
+ };
1577
+ }, {
1578
+ type: "registered";
1579
+ profile: {
1580
+ description: string;
1581
+ agentId: string;
1582
+ parallel?: boolean | undefined;
1583
+ version?: string | undefined;
1584
+ metadata?: Record<string, unknown> | undefined;
1585
+ enabled?: boolean | undefined;
1586
+ priority?: number | undefined;
1587
+ team?: string | undefined;
1588
+ displayName?: string | undefined;
1589
+ capabilities?: string[] | undefined;
1590
+ role?: string | undefined;
1591
+ expertise?: string[] | undefined;
1592
+ tags?: string[] | undefined;
1593
+ workflow?: {
1594
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1595
+ stepId: string;
1596
+ name: string;
1597
+ parallel?: boolean | undefined;
1598
+ retryPolicy?: {
1599
+ maxAttempts: number;
1600
+ backoffMs: number;
1601
+ backoffMultiplier: number;
1602
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1603
+ } | undefined;
1604
+ config?: Record<string, unknown> | undefined;
1605
+ description?: string | undefined;
1606
+ dependencies?: string[] | undefined;
1607
+ outputs?: string[] | undefined;
1608
+ timeoutMs?: number | undefined;
1609
+ streaming?: boolean | undefined;
1610
+ condition?: string | undefined;
1611
+ keyQuestions?: string[] | undefined;
1612
+ saveToMemory?: boolean | undefined;
1613
+ checkpoint?: boolean | undefined;
1614
+ }[] | undefined;
1615
+ orchestration?: {
1616
+ maxDelegationDepth?: number | undefined;
1617
+ canReadWorkspaces?: string[] | undefined;
1618
+ canWriteToShared?: boolean | undefined;
1619
+ delegationTimeout?: number | undefined;
1620
+ } | undefined;
1621
+ createdAt?: string | undefined;
1622
+ updatedAt?: string | undefined;
1623
+ dependencies?: string[] | undefined;
1624
+ abilities?: {
1625
+ core?: string[] | undefined;
1626
+ taskBased?: Record<string, string[]> | undefined;
1627
+ loadAll?: boolean | undefined;
1628
+ } | undefined;
1629
+ maxTokens?: number | undefined;
1630
+ systemPrompt?: string | undefined;
1631
+ personality?: {
1632
+ traits?: string[] | undefined;
1633
+ catchphrase?: string | undefined;
1634
+ communicationStyle?: string | undefined;
1635
+ decisionMaking?: string | undefined;
1636
+ } | undefined;
1637
+ thinkingPatterns?: string[] | undefined;
1638
+ temperature?: number | undefined;
1639
+ providerAffinity?: {
1640
+ preferred?: string[] | undefined;
1641
+ defaultSynthesizer?: string | undefined;
1642
+ excluded?: string[] | undefined;
1643
+ taskOverrides?: Record<string, string> | undefined;
1644
+ temperatureOverrides?: Record<string, number> | undefined;
1645
+ } | undefined;
1646
+ selectionMetadata?: {
1647
+ primaryIntents?: string[] | undefined;
1648
+ secondarySignals?: string[] | undefined;
1649
+ negativeIntents?: string[] | undefined;
1650
+ redirectWhen?: {
1651
+ phrase: string;
1652
+ suggest: string;
1653
+ }[] | undefined;
1654
+ keywords?: string[] | undefined;
1655
+ antiKeywords?: string[] | undefined;
1656
+ exampleTasks?: string[] | undefined;
1657
+ notForTasks?: string[] | undefined;
1658
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1659
+ } | undefined;
1660
+ collaboratesWith?: string[] | undefined;
1661
+ };
1662
+ }>, z.ZodObject<{
1663
+ type: z.ZodLiteral<"started">;
1664
+ sessionId: z.ZodOptional<z.ZodString>;
1665
+ input: z.ZodUnknown;
1666
+ }, "strip", z.ZodTypeAny, {
1667
+ type: "started";
1668
+ sessionId?: string | undefined;
1669
+ input?: unknown;
1670
+ }, {
1671
+ type: "started";
1672
+ sessionId?: string | undefined;
1673
+ input?: unknown;
1674
+ }>, z.ZodObject<{
1675
+ type: z.ZodLiteral<"stageStarted">;
1676
+ stepId: z.ZodString;
1677
+ stageName: z.ZodString;
1678
+ }, "strip", z.ZodTypeAny, {
1679
+ type: "stageStarted";
1680
+ stepId: string;
1681
+ stageName: string;
1682
+ }, {
1683
+ type: "stageStarted";
1684
+ stepId: string;
1685
+ stageName: string;
1686
+ }>, z.ZodObject<{
1687
+ type: z.ZodLiteral<"stageCompleted">;
1688
+ stepId: z.ZodString;
1689
+ output: z.ZodUnknown;
1690
+ }, "strip", z.ZodTypeAny, {
1691
+ type: "stageCompleted";
1692
+ stepId: string;
1693
+ output?: unknown;
1694
+ }, {
1695
+ type: "stageCompleted";
1696
+ stepId: string;
1697
+ output?: unknown;
1698
+ }>, z.ZodObject<{
1699
+ type: z.ZodLiteral<"stageFailed">;
1700
+ stepId: z.ZodString;
1701
+ error: z.ZodObject<{
1702
+ code: z.ZodString;
1703
+ message: z.ZodString;
1704
+ stepId: z.ZodOptional<z.ZodString>;
1705
+ retryable: z.ZodOptional<z.ZodBoolean>;
1706
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1707
+ }, "strip", z.ZodTypeAny, {
1708
+ code: string;
1709
+ message: string;
1710
+ stepId?: string | undefined;
1711
+ details?: Record<string, unknown> | undefined;
1712
+ retryable?: boolean | undefined;
1713
+ }, {
1714
+ code: string;
1715
+ message: string;
1716
+ stepId?: string | undefined;
1717
+ details?: Record<string, unknown> | undefined;
1718
+ retryable?: boolean | undefined;
1719
+ }>;
1720
+ }, "strip", z.ZodTypeAny, {
1721
+ type: "stageFailed";
1722
+ stepId: string;
1723
+ error: {
1724
+ code: string;
1725
+ message: string;
1726
+ stepId?: string | undefined;
1727
+ details?: Record<string, unknown> | undefined;
1728
+ retryable?: boolean | undefined;
1729
+ };
1730
+ }, {
1731
+ type: "stageFailed";
1732
+ stepId: string;
1733
+ error: {
1734
+ code: string;
1735
+ message: string;
1736
+ stepId?: string | undefined;
1737
+ details?: Record<string, unknown> | undefined;
1738
+ retryable?: boolean | undefined;
1739
+ };
1740
+ }>, z.ZodObject<{
1741
+ type: z.ZodLiteral<"delegated">;
1742
+ targetAgent: z.ZodString;
1743
+ task: z.ZodString;
1744
+ }, "strip", z.ZodTypeAny, {
1745
+ type: "delegated";
1746
+ task: string;
1747
+ targetAgent: string;
1748
+ }, {
1749
+ type: "delegated";
1750
+ task: string;
1751
+ targetAgent: string;
1752
+ }>, z.ZodObject<{
1753
+ type: z.ZodLiteral<"delegationReturned">;
1754
+ fromAgent: z.ZodString;
1755
+ result: z.ZodUnknown;
1756
+ }, "strip", z.ZodTypeAny, {
1757
+ type: "delegationReturned";
1758
+ fromAgent: string;
1759
+ result?: unknown;
1760
+ }, {
1761
+ type: "delegationReturned";
1762
+ fromAgent: string;
1763
+ result?: unknown;
1764
+ }>, z.ZodObject<{
1765
+ type: z.ZodLiteral<"completed">;
1766
+ output: z.ZodUnknown;
1767
+ durationMs: z.ZodNumber;
1768
+ }, "strip", z.ZodTypeAny, {
1769
+ type: "completed";
1770
+ durationMs: number;
1771
+ output?: unknown;
1772
+ }, {
1773
+ type: "completed";
1774
+ durationMs: number;
1775
+ output?: unknown;
1776
+ }>, z.ZodObject<{
1777
+ type: z.ZodLiteral<"failed">;
1778
+ error: z.ZodObject<{
1779
+ code: z.ZodString;
1780
+ message: z.ZodString;
1781
+ stepId: z.ZodOptional<z.ZodString>;
1782
+ retryable: z.ZodOptional<z.ZodBoolean>;
1783
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1784
+ }, "strip", z.ZodTypeAny, {
1785
+ code: string;
1786
+ message: string;
1787
+ stepId?: string | undefined;
1788
+ details?: Record<string, unknown> | undefined;
1789
+ retryable?: boolean | undefined;
1790
+ }, {
1791
+ code: string;
1792
+ message: string;
1793
+ stepId?: string | undefined;
1794
+ details?: Record<string, unknown> | undefined;
1795
+ retryable?: boolean | undefined;
1796
+ }>;
1797
+ }, "strip", z.ZodTypeAny, {
1798
+ type: "failed";
1799
+ error: {
1800
+ code: string;
1801
+ message: string;
1802
+ stepId?: string | undefined;
1803
+ details?: Record<string, unknown> | undefined;
1804
+ retryable?: boolean | undefined;
1805
+ };
1806
+ }, {
1807
+ type: "failed";
1808
+ error: {
1809
+ code: string;
1810
+ message: string;
1811
+ stepId?: string | undefined;
1812
+ details?: Record<string, unknown> | undefined;
1813
+ retryable?: boolean | undefined;
1814
+ };
1815
+ }>]>;
1816
+ export type AgentEventPayload = z.infer<typeof AgentEventPayloadSchema>;
1817
+ /**
1818
+ * Base event schema
1819
+ */
1820
+ export declare const BaseEventSchema: z.ZodObject<{
1821
+ eventId: z.ZodString;
1822
+ timestamp: z.ZodString;
1823
+ version: z.ZodNumber;
1824
+ correlationId: z.ZodString;
1825
+ causationId: z.ZodOptional<z.ZodString>;
1826
+ spanId: z.ZodOptional<z.ZodString>;
1827
+ traceId: z.ZodOptional<z.ZodString>;
1828
+ }, "strip", z.ZodTypeAny, {
1829
+ version: number;
1830
+ timestamp: string;
1831
+ eventId: string;
1832
+ correlationId: string;
1833
+ traceId?: string | undefined;
1834
+ causationId?: string | undefined;
1835
+ spanId?: string | undefined;
1836
+ }, {
1837
+ version: number;
1838
+ timestamp: string;
1839
+ eventId: string;
1840
+ correlationId: string;
1841
+ traceId?: string | undefined;
1842
+ causationId?: string | undefined;
1843
+ spanId?: string | undefined;
1844
+ }>;
1845
+ /**
1846
+ * Agent event schema
1847
+ */
1848
+ export declare const AgentEventSchema: z.ZodObject<{
1849
+ eventId: z.ZodString;
1850
+ timestamp: z.ZodString;
1851
+ version: z.ZodNumber;
1852
+ correlationId: z.ZodString;
1853
+ causationId: z.ZodOptional<z.ZodString>;
1854
+ spanId: z.ZodOptional<z.ZodString>;
1855
+ traceId: z.ZodOptional<z.ZodString>;
1856
+ } & {
1857
+ aggregateId: z.ZodString;
1858
+ type: z.ZodEnum<["agent.registered", "agent.started", "agent.stageStarted", "agent.stageCompleted", "agent.stageFailed", "agent.delegated", "agent.delegationReturned", "agent.completed", "agent.failed"]>;
1859
+ payload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1860
+ type: z.ZodLiteral<"registered">;
1861
+ profile: z.ZodEffects<z.ZodObject<{
1862
+ agentId: z.ZodString;
1863
+ displayName: z.ZodOptional<z.ZodString>;
1864
+ version: z.ZodOptional<z.ZodString>;
1865
+ description: z.ZodString;
1866
+ role: z.ZodOptional<z.ZodString>;
1867
+ expertise: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1868
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1869
+ systemPrompt: z.ZodOptional<z.ZodString>;
1870
+ workflow: z.ZodOptional<z.ZodArray<z.ZodObject<{
1871
+ stepId: z.ZodString;
1872
+ name: z.ZodString;
1873
+ description: z.ZodOptional<z.ZodString>;
1874
+ type: z.ZodEnum<["prompt", "tool", "conditional", "loop", "parallel", "delegate", "discuss"]>;
1875
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1876
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1877
+ condition: z.ZodOptional<z.ZodString>;
1878
+ parallel: z.ZodOptional<z.ZodBoolean>;
1879
+ retryPolicy: z.ZodOptional<z.ZodObject<{
1880
+ maxAttempts: z.ZodNumber;
1881
+ backoffMs: z.ZodNumber;
1882
+ backoffMultiplier: z.ZodNumber;
1883
+ retryOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["timeout", "rateLimit", "serverError", "networkError"]>, "many">>;
1884
+ }, "strip", z.ZodTypeAny, {
1885
+ maxAttempts: number;
1886
+ backoffMs: number;
1887
+ backoffMultiplier: number;
1888
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1889
+ }, {
1890
+ maxAttempts: number;
1891
+ backoffMs: number;
1892
+ backoffMultiplier: number;
1893
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1894
+ }>>;
1895
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1896
+ keyQuestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1897
+ outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1898
+ streaming: z.ZodOptional<z.ZodBoolean>;
1899
+ saveToMemory: z.ZodOptional<z.ZodBoolean>;
1900
+ checkpoint: z.ZodOptional<z.ZodBoolean>;
1901
+ }, "strip", z.ZodTypeAny, {
1902
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1903
+ stepId: string;
1904
+ name: string;
1905
+ config: Record<string, unknown>;
1906
+ parallel?: boolean | undefined;
1907
+ retryPolicy?: {
1908
+ maxAttempts: number;
1909
+ backoffMs: number;
1910
+ backoffMultiplier: number;
1911
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1912
+ } | undefined;
1913
+ description?: string | undefined;
1914
+ dependencies?: string[] | undefined;
1915
+ outputs?: string[] | undefined;
1916
+ timeoutMs?: number | undefined;
1917
+ streaming?: boolean | undefined;
1918
+ condition?: string | undefined;
1919
+ keyQuestions?: string[] | undefined;
1920
+ saveToMemory?: boolean | undefined;
1921
+ checkpoint?: boolean | undefined;
1922
+ }, {
1923
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1924
+ stepId: string;
1925
+ name: string;
1926
+ parallel?: boolean | undefined;
1927
+ retryPolicy?: {
1928
+ maxAttempts: number;
1929
+ backoffMs: number;
1930
+ backoffMultiplier: number;
1931
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1932
+ } | undefined;
1933
+ config?: Record<string, unknown> | undefined;
1934
+ description?: string | undefined;
1935
+ dependencies?: string[] | undefined;
1936
+ outputs?: string[] | undefined;
1937
+ timeoutMs?: number | undefined;
1938
+ streaming?: boolean | undefined;
1939
+ condition?: string | undefined;
1940
+ keyQuestions?: string[] | undefined;
1941
+ saveToMemory?: boolean | undefined;
1942
+ checkpoint?: boolean | undefined;
1943
+ }>, "many">>;
1944
+ personality: z.ZodOptional<z.ZodObject<{
1945
+ traits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1946
+ catchphrase: z.ZodOptional<z.ZodString>;
1947
+ communicationStyle: z.ZodOptional<z.ZodString>;
1948
+ decisionMaking: z.ZodOptional<z.ZodString>;
1949
+ }, "strip", z.ZodTypeAny, {
1950
+ traits?: string[] | undefined;
1951
+ catchphrase?: string | undefined;
1952
+ communicationStyle?: string | undefined;
1953
+ decisionMaking?: string | undefined;
1954
+ }, {
1955
+ traits?: string[] | undefined;
1956
+ catchphrase?: string | undefined;
1957
+ communicationStyle?: string | undefined;
1958
+ decisionMaking?: string | undefined;
1959
+ }>>;
1960
+ abilities: z.ZodOptional<z.ZodObject<{
1961
+ core: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1962
+ taskBased: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1963
+ loadAll: z.ZodOptional<z.ZodBoolean>;
1964
+ }, "strip", z.ZodTypeAny, {
1965
+ core?: string[] | undefined;
1966
+ taskBased?: Record<string, string[]> | undefined;
1967
+ loadAll?: boolean | undefined;
1968
+ }, {
1969
+ core?: string[] | undefined;
1970
+ taskBased?: Record<string, string[]> | undefined;
1971
+ loadAll?: boolean | undefined;
1972
+ }>>;
1973
+ thinkingPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1974
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1975
+ parallel: z.ZodOptional<z.ZodBoolean>;
1976
+ temperature: z.ZodOptional<z.ZodNumber>;
1977
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1978
+ orchestration: z.ZodOptional<z.ZodObject<{
1979
+ maxDelegationDepth: z.ZodOptional<z.ZodNumber>;
1980
+ canReadWorkspaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1981
+ canWriteToShared: z.ZodOptional<z.ZodBoolean>;
1982
+ delegationTimeout: z.ZodOptional<z.ZodNumber>;
1983
+ }, "strip", z.ZodTypeAny, {
1984
+ maxDelegationDepth?: number | undefined;
1985
+ canReadWorkspaces?: string[] | undefined;
1986
+ canWriteToShared?: boolean | undefined;
1987
+ delegationTimeout?: number | undefined;
1988
+ }, {
1989
+ maxDelegationDepth?: number | undefined;
1990
+ canReadWorkspaces?: string[] | undefined;
1991
+ canWriteToShared?: boolean | undefined;
1992
+ delegationTimeout?: number | undefined;
1993
+ }>>;
1994
+ providerAffinity: z.ZodOptional<z.ZodObject<{
1995
+ /** Preferred providers for this agent's discussions (ordered by preference) */
1996
+ preferred: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1997
+ /** Provider to use for synthesis/consensus */
1998
+ defaultSynthesizer: z.ZodOptional<z.ZodString>;
1999
+ /** Providers to exclude from discussions */
2000
+ excluded: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2001
+ /** Override provider for specific task types */
2002
+ taskOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2003
+ /** Provider-specific temperature overrides */
2004
+ temperatureOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2005
+ }, "strip", z.ZodTypeAny, {
2006
+ preferred?: string[] | undefined;
2007
+ defaultSynthesizer?: string | undefined;
2008
+ excluded?: string[] | undefined;
2009
+ taskOverrides?: Record<string, string> | undefined;
2010
+ temperatureOverrides?: Record<string, number> | undefined;
2011
+ }, {
2012
+ preferred?: string[] | undefined;
2013
+ defaultSynthesizer?: string | undefined;
2014
+ excluded?: string[] | undefined;
2015
+ taskOverrides?: Record<string, string> | undefined;
2016
+ temperatureOverrides?: Record<string, number> | undefined;
2017
+ }>>;
2018
+ selectionMetadata: z.ZodOptional<z.ZodObject<{
2019
+ primaryIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2020
+ secondarySignals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2021
+ negativeIntents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2022
+ redirectWhen: z.ZodOptional<z.ZodArray<z.ZodObject<{
2023
+ phrase: z.ZodString;
2024
+ suggest: z.ZodString;
2025
+ }, "strip", z.ZodTypeAny, {
2026
+ phrase: string;
2027
+ suggest: string;
2028
+ }, {
2029
+ phrase: string;
2030
+ suggest: string;
2031
+ }>, "many">>;
2032
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2033
+ antiKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2034
+ exampleTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2035
+ notForTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2036
+ agentCategory: z.ZodOptional<z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>>;
2037
+ }, "strip", z.ZodTypeAny, {
2038
+ primaryIntents?: string[] | undefined;
2039
+ secondarySignals?: string[] | undefined;
2040
+ negativeIntents?: string[] | undefined;
2041
+ redirectWhen?: {
2042
+ phrase: string;
2043
+ suggest: string;
2044
+ }[] | undefined;
2045
+ keywords?: string[] | undefined;
2046
+ antiKeywords?: string[] | undefined;
2047
+ exampleTasks?: string[] | undefined;
2048
+ notForTasks?: string[] | undefined;
2049
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2050
+ }, {
2051
+ primaryIntents?: string[] | undefined;
2052
+ secondarySignals?: string[] | undefined;
2053
+ negativeIntents?: string[] | undefined;
2054
+ redirectWhen?: {
2055
+ phrase: string;
2056
+ suggest: string;
2057
+ }[] | undefined;
2058
+ keywords?: string[] | undefined;
2059
+ antiKeywords?: string[] | undefined;
2060
+ exampleTasks?: string[] | undefined;
2061
+ notForTasks?: string[] | undefined;
2062
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2063
+ }>>;
2064
+ team: z.ZodOptional<z.ZodString>;
2065
+ collaboratesWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2066
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2067
+ priority: z.ZodOptional<z.ZodNumber>;
2068
+ enabled: z.ZodDefault<z.ZodBoolean>;
2069
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2070
+ createdAt: z.ZodOptional<z.ZodString>;
2071
+ updatedAt: z.ZodOptional<z.ZodString>;
2072
+ }, "strip", z.ZodTypeAny, {
2073
+ description: string;
2074
+ enabled: boolean;
2075
+ agentId: string;
2076
+ parallel?: boolean | undefined;
2077
+ version?: string | undefined;
2078
+ metadata?: Record<string, unknown> | undefined;
2079
+ priority?: number | undefined;
2080
+ team?: string | undefined;
2081
+ displayName?: string | undefined;
2082
+ capabilities?: string[] | undefined;
2083
+ role?: string | undefined;
2084
+ expertise?: string[] | undefined;
2085
+ tags?: string[] | undefined;
2086
+ workflow?: {
2087
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2088
+ stepId: string;
2089
+ name: string;
2090
+ config: Record<string, unknown>;
2091
+ parallel?: boolean | undefined;
2092
+ retryPolicy?: {
2093
+ maxAttempts: number;
2094
+ backoffMs: number;
2095
+ backoffMultiplier: number;
2096
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2097
+ } | undefined;
2098
+ description?: string | undefined;
2099
+ dependencies?: string[] | undefined;
2100
+ outputs?: string[] | undefined;
2101
+ timeoutMs?: number | undefined;
2102
+ streaming?: boolean | undefined;
2103
+ condition?: string | undefined;
2104
+ keyQuestions?: string[] | undefined;
2105
+ saveToMemory?: boolean | undefined;
2106
+ checkpoint?: boolean | undefined;
2107
+ }[] | undefined;
2108
+ orchestration?: {
2109
+ maxDelegationDepth?: number | undefined;
2110
+ canReadWorkspaces?: string[] | undefined;
2111
+ canWriteToShared?: boolean | undefined;
2112
+ delegationTimeout?: number | undefined;
2113
+ } | undefined;
2114
+ createdAt?: string | undefined;
2115
+ updatedAt?: string | undefined;
2116
+ dependencies?: string[] | undefined;
2117
+ abilities?: {
2118
+ core?: string[] | undefined;
2119
+ taskBased?: Record<string, string[]> | undefined;
2120
+ loadAll?: boolean | undefined;
2121
+ } | undefined;
2122
+ maxTokens?: number | undefined;
2123
+ systemPrompt?: string | undefined;
2124
+ personality?: {
2125
+ traits?: string[] | undefined;
2126
+ catchphrase?: string | undefined;
2127
+ communicationStyle?: string | undefined;
2128
+ decisionMaking?: string | undefined;
2129
+ } | undefined;
2130
+ thinkingPatterns?: string[] | undefined;
2131
+ temperature?: number | undefined;
2132
+ providerAffinity?: {
2133
+ preferred?: string[] | undefined;
2134
+ defaultSynthesizer?: string | undefined;
2135
+ excluded?: string[] | undefined;
2136
+ taskOverrides?: Record<string, string> | undefined;
2137
+ temperatureOverrides?: Record<string, number> | undefined;
2138
+ } | undefined;
2139
+ selectionMetadata?: {
2140
+ primaryIntents?: string[] | undefined;
2141
+ secondarySignals?: string[] | undefined;
2142
+ negativeIntents?: string[] | undefined;
2143
+ redirectWhen?: {
2144
+ phrase: string;
2145
+ suggest: string;
2146
+ }[] | undefined;
2147
+ keywords?: string[] | undefined;
2148
+ antiKeywords?: string[] | undefined;
2149
+ exampleTasks?: string[] | undefined;
2150
+ notForTasks?: string[] | undefined;
2151
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2152
+ } | undefined;
2153
+ collaboratesWith?: string[] | undefined;
2154
+ }, {
2155
+ description: string;
2156
+ agentId: string;
2157
+ parallel?: boolean | undefined;
2158
+ version?: string | undefined;
2159
+ metadata?: Record<string, unknown> | undefined;
2160
+ enabled?: boolean | undefined;
2161
+ priority?: number | undefined;
2162
+ team?: string | undefined;
2163
+ displayName?: string | undefined;
2164
+ capabilities?: string[] | undefined;
2165
+ role?: string | undefined;
2166
+ expertise?: string[] | undefined;
2167
+ tags?: string[] | undefined;
2168
+ workflow?: {
2169
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2170
+ stepId: string;
2171
+ name: string;
2172
+ parallel?: boolean | undefined;
2173
+ retryPolicy?: {
2174
+ maxAttempts: number;
2175
+ backoffMs: number;
2176
+ backoffMultiplier: number;
2177
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2178
+ } | undefined;
2179
+ config?: Record<string, unknown> | undefined;
2180
+ description?: string | undefined;
2181
+ dependencies?: string[] | undefined;
2182
+ outputs?: string[] | undefined;
2183
+ timeoutMs?: number | undefined;
2184
+ streaming?: boolean | undefined;
2185
+ condition?: string | undefined;
2186
+ keyQuestions?: string[] | undefined;
2187
+ saveToMemory?: boolean | undefined;
2188
+ checkpoint?: boolean | undefined;
2189
+ }[] | undefined;
2190
+ orchestration?: {
2191
+ maxDelegationDepth?: number | undefined;
2192
+ canReadWorkspaces?: string[] | undefined;
2193
+ canWriteToShared?: boolean | undefined;
2194
+ delegationTimeout?: number | undefined;
2195
+ } | undefined;
2196
+ createdAt?: string | undefined;
2197
+ updatedAt?: string | undefined;
2198
+ dependencies?: string[] | undefined;
2199
+ abilities?: {
2200
+ core?: string[] | undefined;
2201
+ taskBased?: Record<string, string[]> | undefined;
2202
+ loadAll?: boolean | undefined;
2203
+ } | undefined;
2204
+ maxTokens?: number | undefined;
2205
+ systemPrompt?: string | undefined;
2206
+ personality?: {
2207
+ traits?: string[] | undefined;
2208
+ catchphrase?: string | undefined;
2209
+ communicationStyle?: string | undefined;
2210
+ decisionMaking?: string | undefined;
2211
+ } | undefined;
2212
+ thinkingPatterns?: string[] | undefined;
2213
+ temperature?: number | undefined;
2214
+ providerAffinity?: {
2215
+ preferred?: string[] | undefined;
2216
+ defaultSynthesizer?: string | undefined;
2217
+ excluded?: string[] | undefined;
2218
+ taskOverrides?: Record<string, string> | undefined;
2219
+ temperatureOverrides?: Record<string, number> | undefined;
2220
+ } | undefined;
2221
+ selectionMetadata?: {
2222
+ primaryIntents?: string[] | undefined;
2223
+ secondarySignals?: string[] | undefined;
2224
+ negativeIntents?: string[] | undefined;
2225
+ redirectWhen?: {
2226
+ phrase: string;
2227
+ suggest: string;
2228
+ }[] | undefined;
2229
+ keywords?: string[] | undefined;
2230
+ antiKeywords?: string[] | undefined;
2231
+ exampleTasks?: string[] | undefined;
2232
+ notForTasks?: string[] | undefined;
2233
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2234
+ } | undefined;
2235
+ collaboratesWith?: string[] | undefined;
2236
+ }>, {
2237
+ description: string;
2238
+ enabled: boolean;
2239
+ agentId: string;
2240
+ parallel?: boolean | undefined;
2241
+ version?: string | undefined;
2242
+ metadata?: Record<string, unknown> | undefined;
2243
+ priority?: number | undefined;
2244
+ team?: string | undefined;
2245
+ displayName?: string | undefined;
2246
+ capabilities?: string[] | undefined;
2247
+ role?: string | undefined;
2248
+ expertise?: string[] | undefined;
2249
+ tags?: string[] | undefined;
2250
+ workflow?: {
2251
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2252
+ stepId: string;
2253
+ name: string;
2254
+ config: Record<string, unknown>;
2255
+ parallel?: boolean | undefined;
2256
+ retryPolicy?: {
2257
+ maxAttempts: number;
2258
+ backoffMs: number;
2259
+ backoffMultiplier: number;
2260
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2261
+ } | undefined;
2262
+ description?: string | undefined;
2263
+ dependencies?: string[] | undefined;
2264
+ outputs?: string[] | undefined;
2265
+ timeoutMs?: number | undefined;
2266
+ streaming?: boolean | undefined;
2267
+ condition?: string | undefined;
2268
+ keyQuestions?: string[] | undefined;
2269
+ saveToMemory?: boolean | undefined;
2270
+ checkpoint?: boolean | undefined;
2271
+ }[] | undefined;
2272
+ orchestration?: {
2273
+ maxDelegationDepth?: number | undefined;
2274
+ canReadWorkspaces?: string[] | undefined;
2275
+ canWriteToShared?: boolean | undefined;
2276
+ delegationTimeout?: number | undefined;
2277
+ } | undefined;
2278
+ createdAt?: string | undefined;
2279
+ updatedAt?: string | undefined;
2280
+ dependencies?: string[] | undefined;
2281
+ abilities?: {
2282
+ core?: string[] | undefined;
2283
+ taskBased?: Record<string, string[]> | undefined;
2284
+ loadAll?: boolean | undefined;
2285
+ } | undefined;
2286
+ maxTokens?: number | undefined;
2287
+ systemPrompt?: string | undefined;
2288
+ personality?: {
2289
+ traits?: string[] | undefined;
2290
+ catchphrase?: string | undefined;
2291
+ communicationStyle?: string | undefined;
2292
+ decisionMaking?: string | undefined;
2293
+ } | undefined;
2294
+ thinkingPatterns?: string[] | undefined;
2295
+ temperature?: number | undefined;
2296
+ providerAffinity?: {
2297
+ preferred?: string[] | undefined;
2298
+ defaultSynthesizer?: string | undefined;
2299
+ excluded?: string[] | undefined;
2300
+ taskOverrides?: Record<string, string> | undefined;
2301
+ temperatureOverrides?: Record<string, number> | undefined;
2302
+ } | undefined;
2303
+ selectionMetadata?: {
2304
+ primaryIntents?: string[] | undefined;
2305
+ secondarySignals?: string[] | undefined;
2306
+ negativeIntents?: string[] | undefined;
2307
+ redirectWhen?: {
2308
+ phrase: string;
2309
+ suggest: string;
2310
+ }[] | undefined;
2311
+ keywords?: string[] | undefined;
2312
+ antiKeywords?: string[] | undefined;
2313
+ exampleTasks?: string[] | undefined;
2314
+ notForTasks?: string[] | undefined;
2315
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2316
+ } | undefined;
2317
+ collaboratesWith?: string[] | undefined;
2318
+ }, {
2319
+ description: string;
2320
+ agentId: string;
2321
+ parallel?: boolean | undefined;
2322
+ version?: string | undefined;
2323
+ metadata?: Record<string, unknown> | undefined;
2324
+ enabled?: boolean | undefined;
2325
+ priority?: number | undefined;
2326
+ team?: string | undefined;
2327
+ displayName?: string | undefined;
2328
+ capabilities?: string[] | undefined;
2329
+ role?: string | undefined;
2330
+ expertise?: string[] | undefined;
2331
+ tags?: string[] | undefined;
2332
+ workflow?: {
2333
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2334
+ stepId: string;
2335
+ name: string;
2336
+ parallel?: boolean | undefined;
2337
+ retryPolicy?: {
2338
+ maxAttempts: number;
2339
+ backoffMs: number;
2340
+ backoffMultiplier: number;
2341
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2342
+ } | undefined;
2343
+ config?: Record<string, unknown> | undefined;
2344
+ description?: string | undefined;
2345
+ dependencies?: string[] | undefined;
2346
+ outputs?: string[] | undefined;
2347
+ timeoutMs?: number | undefined;
2348
+ streaming?: boolean | undefined;
2349
+ condition?: string | undefined;
2350
+ keyQuestions?: string[] | undefined;
2351
+ saveToMemory?: boolean | undefined;
2352
+ checkpoint?: boolean | undefined;
2353
+ }[] | undefined;
2354
+ orchestration?: {
2355
+ maxDelegationDepth?: number | undefined;
2356
+ canReadWorkspaces?: string[] | undefined;
2357
+ canWriteToShared?: boolean | undefined;
2358
+ delegationTimeout?: number | undefined;
2359
+ } | undefined;
2360
+ createdAt?: string | undefined;
2361
+ updatedAt?: string | undefined;
2362
+ dependencies?: string[] | undefined;
2363
+ abilities?: {
2364
+ core?: string[] | undefined;
2365
+ taskBased?: Record<string, string[]> | undefined;
2366
+ loadAll?: boolean | undefined;
2367
+ } | undefined;
2368
+ maxTokens?: number | undefined;
2369
+ systemPrompt?: string | undefined;
2370
+ personality?: {
2371
+ traits?: string[] | undefined;
2372
+ catchphrase?: string | undefined;
2373
+ communicationStyle?: string | undefined;
2374
+ decisionMaking?: string | undefined;
2375
+ } | undefined;
2376
+ thinkingPatterns?: string[] | undefined;
2377
+ temperature?: number | undefined;
2378
+ providerAffinity?: {
2379
+ preferred?: string[] | undefined;
2380
+ defaultSynthesizer?: string | undefined;
2381
+ excluded?: string[] | undefined;
2382
+ taskOverrides?: Record<string, string> | undefined;
2383
+ temperatureOverrides?: Record<string, number> | undefined;
2384
+ } | undefined;
2385
+ selectionMetadata?: {
2386
+ primaryIntents?: string[] | undefined;
2387
+ secondarySignals?: string[] | undefined;
2388
+ negativeIntents?: string[] | undefined;
2389
+ redirectWhen?: {
2390
+ phrase: string;
2391
+ suggest: string;
2392
+ }[] | undefined;
2393
+ keywords?: string[] | undefined;
2394
+ antiKeywords?: string[] | undefined;
2395
+ exampleTasks?: string[] | undefined;
2396
+ notForTasks?: string[] | undefined;
2397
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2398
+ } | undefined;
2399
+ collaboratesWith?: string[] | undefined;
2400
+ }>;
2401
+ }, "strip", z.ZodTypeAny, {
2402
+ type: "registered";
2403
+ profile: {
2404
+ description: string;
2405
+ enabled: boolean;
2406
+ agentId: string;
2407
+ parallel?: boolean | undefined;
2408
+ version?: string | undefined;
2409
+ metadata?: Record<string, unknown> | undefined;
2410
+ priority?: number | undefined;
2411
+ team?: string | undefined;
2412
+ displayName?: string | undefined;
2413
+ capabilities?: string[] | undefined;
2414
+ role?: string | undefined;
2415
+ expertise?: string[] | undefined;
2416
+ tags?: string[] | undefined;
2417
+ workflow?: {
2418
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2419
+ stepId: string;
2420
+ name: string;
2421
+ config: Record<string, unknown>;
2422
+ parallel?: boolean | undefined;
2423
+ retryPolicy?: {
2424
+ maxAttempts: number;
2425
+ backoffMs: number;
2426
+ backoffMultiplier: number;
2427
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2428
+ } | undefined;
2429
+ description?: string | undefined;
2430
+ dependencies?: string[] | undefined;
2431
+ outputs?: string[] | undefined;
2432
+ timeoutMs?: number | undefined;
2433
+ streaming?: boolean | undefined;
2434
+ condition?: string | undefined;
2435
+ keyQuestions?: string[] | undefined;
2436
+ saveToMemory?: boolean | undefined;
2437
+ checkpoint?: boolean | undefined;
2438
+ }[] | undefined;
2439
+ orchestration?: {
2440
+ maxDelegationDepth?: number | undefined;
2441
+ canReadWorkspaces?: string[] | undefined;
2442
+ canWriteToShared?: boolean | undefined;
2443
+ delegationTimeout?: number | undefined;
2444
+ } | undefined;
2445
+ createdAt?: string | undefined;
2446
+ updatedAt?: string | undefined;
2447
+ dependencies?: string[] | undefined;
2448
+ abilities?: {
2449
+ core?: string[] | undefined;
2450
+ taskBased?: Record<string, string[]> | undefined;
2451
+ loadAll?: boolean | undefined;
2452
+ } | undefined;
2453
+ maxTokens?: number | undefined;
2454
+ systemPrompt?: string | undefined;
2455
+ personality?: {
2456
+ traits?: string[] | undefined;
2457
+ catchphrase?: string | undefined;
2458
+ communicationStyle?: string | undefined;
2459
+ decisionMaking?: string | undefined;
2460
+ } | undefined;
2461
+ thinkingPatterns?: string[] | undefined;
2462
+ temperature?: number | undefined;
2463
+ providerAffinity?: {
2464
+ preferred?: string[] | undefined;
2465
+ defaultSynthesizer?: string | undefined;
2466
+ excluded?: string[] | undefined;
2467
+ taskOverrides?: Record<string, string> | undefined;
2468
+ temperatureOverrides?: Record<string, number> | undefined;
2469
+ } | undefined;
2470
+ selectionMetadata?: {
2471
+ primaryIntents?: string[] | undefined;
2472
+ secondarySignals?: string[] | undefined;
2473
+ negativeIntents?: string[] | undefined;
2474
+ redirectWhen?: {
2475
+ phrase: string;
2476
+ suggest: string;
2477
+ }[] | undefined;
2478
+ keywords?: string[] | undefined;
2479
+ antiKeywords?: string[] | undefined;
2480
+ exampleTasks?: string[] | undefined;
2481
+ notForTasks?: string[] | undefined;
2482
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2483
+ } | undefined;
2484
+ collaboratesWith?: string[] | undefined;
2485
+ };
2486
+ }, {
2487
+ type: "registered";
2488
+ profile: {
2489
+ description: string;
2490
+ agentId: string;
2491
+ parallel?: boolean | undefined;
2492
+ version?: string | undefined;
2493
+ metadata?: Record<string, unknown> | undefined;
2494
+ enabled?: boolean | undefined;
2495
+ priority?: number | undefined;
2496
+ team?: string | undefined;
2497
+ displayName?: string | undefined;
2498
+ capabilities?: string[] | undefined;
2499
+ role?: string | undefined;
2500
+ expertise?: string[] | undefined;
2501
+ tags?: string[] | undefined;
2502
+ workflow?: {
2503
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2504
+ stepId: string;
2505
+ name: string;
2506
+ parallel?: boolean | undefined;
2507
+ retryPolicy?: {
2508
+ maxAttempts: number;
2509
+ backoffMs: number;
2510
+ backoffMultiplier: number;
2511
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2512
+ } | undefined;
2513
+ config?: Record<string, unknown> | undefined;
2514
+ description?: string | undefined;
2515
+ dependencies?: string[] | undefined;
2516
+ outputs?: string[] | undefined;
2517
+ timeoutMs?: number | undefined;
2518
+ streaming?: boolean | undefined;
2519
+ condition?: string | undefined;
2520
+ keyQuestions?: string[] | undefined;
2521
+ saveToMemory?: boolean | undefined;
2522
+ checkpoint?: boolean | undefined;
2523
+ }[] | undefined;
2524
+ orchestration?: {
2525
+ maxDelegationDepth?: number | undefined;
2526
+ canReadWorkspaces?: string[] | undefined;
2527
+ canWriteToShared?: boolean | undefined;
2528
+ delegationTimeout?: number | undefined;
2529
+ } | undefined;
2530
+ createdAt?: string | undefined;
2531
+ updatedAt?: string | undefined;
2532
+ dependencies?: string[] | undefined;
2533
+ abilities?: {
2534
+ core?: string[] | undefined;
2535
+ taskBased?: Record<string, string[]> | undefined;
2536
+ loadAll?: boolean | undefined;
2537
+ } | undefined;
2538
+ maxTokens?: number | undefined;
2539
+ systemPrompt?: string | undefined;
2540
+ personality?: {
2541
+ traits?: string[] | undefined;
2542
+ catchphrase?: string | undefined;
2543
+ communicationStyle?: string | undefined;
2544
+ decisionMaking?: string | undefined;
2545
+ } | undefined;
2546
+ thinkingPatterns?: string[] | undefined;
2547
+ temperature?: number | undefined;
2548
+ providerAffinity?: {
2549
+ preferred?: string[] | undefined;
2550
+ defaultSynthesizer?: string | undefined;
2551
+ excluded?: string[] | undefined;
2552
+ taskOverrides?: Record<string, string> | undefined;
2553
+ temperatureOverrides?: Record<string, number> | undefined;
2554
+ } | undefined;
2555
+ selectionMetadata?: {
2556
+ primaryIntents?: string[] | undefined;
2557
+ secondarySignals?: string[] | undefined;
2558
+ negativeIntents?: string[] | undefined;
2559
+ redirectWhen?: {
2560
+ phrase: string;
2561
+ suggest: string;
2562
+ }[] | undefined;
2563
+ keywords?: string[] | undefined;
2564
+ antiKeywords?: string[] | undefined;
2565
+ exampleTasks?: string[] | undefined;
2566
+ notForTasks?: string[] | undefined;
2567
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2568
+ } | undefined;
2569
+ collaboratesWith?: string[] | undefined;
2570
+ };
2571
+ }>, z.ZodObject<{
2572
+ type: z.ZodLiteral<"started">;
2573
+ sessionId: z.ZodOptional<z.ZodString>;
2574
+ input: z.ZodUnknown;
2575
+ }, "strip", z.ZodTypeAny, {
2576
+ type: "started";
2577
+ sessionId?: string | undefined;
2578
+ input?: unknown;
2579
+ }, {
2580
+ type: "started";
2581
+ sessionId?: string | undefined;
2582
+ input?: unknown;
2583
+ }>, z.ZodObject<{
2584
+ type: z.ZodLiteral<"stageStarted">;
2585
+ stepId: z.ZodString;
2586
+ stageName: z.ZodString;
2587
+ }, "strip", z.ZodTypeAny, {
2588
+ type: "stageStarted";
2589
+ stepId: string;
2590
+ stageName: string;
2591
+ }, {
2592
+ type: "stageStarted";
2593
+ stepId: string;
2594
+ stageName: string;
2595
+ }>, z.ZodObject<{
2596
+ type: z.ZodLiteral<"stageCompleted">;
2597
+ stepId: z.ZodString;
2598
+ output: z.ZodUnknown;
2599
+ }, "strip", z.ZodTypeAny, {
2600
+ type: "stageCompleted";
2601
+ stepId: string;
2602
+ output?: unknown;
2603
+ }, {
2604
+ type: "stageCompleted";
2605
+ stepId: string;
2606
+ output?: unknown;
2607
+ }>, z.ZodObject<{
2608
+ type: z.ZodLiteral<"stageFailed">;
2609
+ stepId: z.ZodString;
2610
+ error: z.ZodObject<{
2611
+ code: z.ZodString;
2612
+ message: z.ZodString;
2613
+ stepId: z.ZodOptional<z.ZodString>;
2614
+ retryable: z.ZodOptional<z.ZodBoolean>;
2615
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2616
+ }, "strip", z.ZodTypeAny, {
2617
+ code: string;
2618
+ message: string;
2619
+ stepId?: string | undefined;
2620
+ details?: Record<string, unknown> | undefined;
2621
+ retryable?: boolean | undefined;
2622
+ }, {
2623
+ code: string;
2624
+ message: string;
2625
+ stepId?: string | undefined;
2626
+ details?: Record<string, unknown> | undefined;
2627
+ retryable?: boolean | undefined;
2628
+ }>;
2629
+ }, "strip", z.ZodTypeAny, {
2630
+ type: "stageFailed";
2631
+ stepId: string;
2632
+ error: {
2633
+ code: string;
2634
+ message: string;
2635
+ stepId?: string | undefined;
2636
+ details?: Record<string, unknown> | undefined;
2637
+ retryable?: boolean | undefined;
2638
+ };
2639
+ }, {
2640
+ type: "stageFailed";
2641
+ stepId: string;
2642
+ error: {
2643
+ code: string;
2644
+ message: string;
2645
+ stepId?: string | undefined;
2646
+ details?: Record<string, unknown> | undefined;
2647
+ retryable?: boolean | undefined;
2648
+ };
2649
+ }>, z.ZodObject<{
2650
+ type: z.ZodLiteral<"delegated">;
2651
+ targetAgent: z.ZodString;
2652
+ task: z.ZodString;
2653
+ }, "strip", z.ZodTypeAny, {
2654
+ type: "delegated";
2655
+ task: string;
2656
+ targetAgent: string;
2657
+ }, {
2658
+ type: "delegated";
2659
+ task: string;
2660
+ targetAgent: string;
2661
+ }>, z.ZodObject<{
2662
+ type: z.ZodLiteral<"delegationReturned">;
2663
+ fromAgent: z.ZodString;
2664
+ result: z.ZodUnknown;
2665
+ }, "strip", z.ZodTypeAny, {
2666
+ type: "delegationReturned";
2667
+ fromAgent: string;
2668
+ result?: unknown;
2669
+ }, {
2670
+ type: "delegationReturned";
2671
+ fromAgent: string;
2672
+ result?: unknown;
2673
+ }>, z.ZodObject<{
2674
+ type: z.ZodLiteral<"completed">;
2675
+ output: z.ZodUnknown;
2676
+ durationMs: z.ZodNumber;
2677
+ }, "strip", z.ZodTypeAny, {
2678
+ type: "completed";
2679
+ durationMs: number;
2680
+ output?: unknown;
2681
+ }, {
2682
+ type: "completed";
2683
+ durationMs: number;
2684
+ output?: unknown;
2685
+ }>, z.ZodObject<{
2686
+ type: z.ZodLiteral<"failed">;
2687
+ error: z.ZodObject<{
2688
+ code: z.ZodString;
2689
+ message: z.ZodString;
2690
+ stepId: z.ZodOptional<z.ZodString>;
2691
+ retryable: z.ZodOptional<z.ZodBoolean>;
2692
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2693
+ }, "strip", z.ZodTypeAny, {
2694
+ code: string;
2695
+ message: string;
2696
+ stepId?: string | undefined;
2697
+ details?: Record<string, unknown> | undefined;
2698
+ retryable?: boolean | undefined;
2699
+ }, {
2700
+ code: string;
2701
+ message: string;
2702
+ stepId?: string | undefined;
2703
+ details?: Record<string, unknown> | undefined;
2704
+ retryable?: boolean | undefined;
2705
+ }>;
2706
+ }, "strip", z.ZodTypeAny, {
2707
+ type: "failed";
2708
+ error: {
2709
+ code: string;
2710
+ message: string;
2711
+ stepId?: string | undefined;
2712
+ details?: Record<string, unknown> | undefined;
2713
+ retryable?: boolean | undefined;
2714
+ };
2715
+ }, {
2716
+ type: "failed";
2717
+ error: {
2718
+ code: string;
2719
+ message: string;
2720
+ stepId?: string | undefined;
2721
+ details?: Record<string, unknown> | undefined;
2722
+ retryable?: boolean | undefined;
2723
+ };
2724
+ }>]>;
2725
+ }, "strip", z.ZodTypeAny, {
2726
+ type: "agent.registered" | "agent.started" | "agent.stageStarted" | "agent.stageCompleted" | "agent.stageFailed" | "agent.delegated" | "agent.delegationReturned" | "agent.completed" | "agent.failed";
2727
+ version: number;
2728
+ timestamp: string;
2729
+ eventId: string;
2730
+ payload: {
2731
+ type: "registered";
2732
+ profile: {
2733
+ description: string;
2734
+ enabled: boolean;
2735
+ agentId: string;
2736
+ parallel?: boolean | undefined;
2737
+ version?: string | undefined;
2738
+ metadata?: Record<string, unknown> | undefined;
2739
+ priority?: number | undefined;
2740
+ team?: string | undefined;
2741
+ displayName?: string | undefined;
2742
+ capabilities?: string[] | undefined;
2743
+ role?: string | undefined;
2744
+ expertise?: string[] | undefined;
2745
+ tags?: string[] | undefined;
2746
+ workflow?: {
2747
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2748
+ stepId: string;
2749
+ name: string;
2750
+ config: Record<string, unknown>;
2751
+ parallel?: boolean | undefined;
2752
+ retryPolicy?: {
2753
+ maxAttempts: number;
2754
+ backoffMs: number;
2755
+ backoffMultiplier: number;
2756
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2757
+ } | undefined;
2758
+ description?: string | undefined;
2759
+ dependencies?: string[] | undefined;
2760
+ outputs?: string[] | undefined;
2761
+ timeoutMs?: number | undefined;
2762
+ streaming?: boolean | undefined;
2763
+ condition?: string | undefined;
2764
+ keyQuestions?: string[] | undefined;
2765
+ saveToMemory?: boolean | undefined;
2766
+ checkpoint?: boolean | undefined;
2767
+ }[] | undefined;
2768
+ orchestration?: {
2769
+ maxDelegationDepth?: number | undefined;
2770
+ canReadWorkspaces?: string[] | undefined;
2771
+ canWriteToShared?: boolean | undefined;
2772
+ delegationTimeout?: number | undefined;
2773
+ } | undefined;
2774
+ createdAt?: string | undefined;
2775
+ updatedAt?: string | undefined;
2776
+ dependencies?: string[] | undefined;
2777
+ abilities?: {
2778
+ core?: string[] | undefined;
2779
+ taskBased?: Record<string, string[]> | undefined;
2780
+ loadAll?: boolean | undefined;
2781
+ } | undefined;
2782
+ maxTokens?: number | undefined;
2783
+ systemPrompt?: string | undefined;
2784
+ personality?: {
2785
+ traits?: string[] | undefined;
2786
+ catchphrase?: string | undefined;
2787
+ communicationStyle?: string | undefined;
2788
+ decisionMaking?: string | undefined;
2789
+ } | undefined;
2790
+ thinkingPatterns?: string[] | undefined;
2791
+ temperature?: number | undefined;
2792
+ providerAffinity?: {
2793
+ preferred?: string[] | undefined;
2794
+ defaultSynthesizer?: string | undefined;
2795
+ excluded?: string[] | undefined;
2796
+ taskOverrides?: Record<string, string> | undefined;
2797
+ temperatureOverrides?: Record<string, number> | undefined;
2798
+ } | undefined;
2799
+ selectionMetadata?: {
2800
+ primaryIntents?: string[] | undefined;
2801
+ secondarySignals?: string[] | undefined;
2802
+ negativeIntents?: string[] | undefined;
2803
+ redirectWhen?: {
2804
+ phrase: string;
2805
+ suggest: string;
2806
+ }[] | undefined;
2807
+ keywords?: string[] | undefined;
2808
+ antiKeywords?: string[] | undefined;
2809
+ exampleTasks?: string[] | undefined;
2810
+ notForTasks?: string[] | undefined;
2811
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2812
+ } | undefined;
2813
+ collaboratesWith?: string[] | undefined;
2814
+ };
2815
+ } | {
2816
+ type: "started";
2817
+ sessionId?: string | undefined;
2818
+ input?: unknown;
2819
+ } | {
2820
+ type: "stageStarted";
2821
+ stepId: string;
2822
+ stageName: string;
2823
+ } | {
2824
+ type: "stageCompleted";
2825
+ stepId: string;
2826
+ output?: unknown;
2827
+ } | {
2828
+ type: "stageFailed";
2829
+ stepId: string;
2830
+ error: {
2831
+ code: string;
2832
+ message: string;
2833
+ stepId?: string | undefined;
2834
+ details?: Record<string, unknown> | undefined;
2835
+ retryable?: boolean | undefined;
2836
+ };
2837
+ } | {
2838
+ type: "delegated";
2839
+ task: string;
2840
+ targetAgent: string;
2841
+ } | {
2842
+ type: "delegationReturned";
2843
+ fromAgent: string;
2844
+ result?: unknown;
2845
+ } | {
2846
+ type: "completed";
2847
+ durationMs: number;
2848
+ output?: unknown;
2849
+ } | {
2850
+ type: "failed";
2851
+ error: {
2852
+ code: string;
2853
+ message: string;
2854
+ stepId?: string | undefined;
2855
+ details?: Record<string, unknown> | undefined;
2856
+ retryable?: boolean | undefined;
2857
+ };
2858
+ };
2859
+ correlationId: string;
2860
+ aggregateId: string;
2861
+ traceId?: string | undefined;
2862
+ causationId?: string | undefined;
2863
+ spanId?: string | undefined;
2864
+ }, {
2865
+ type: "agent.registered" | "agent.started" | "agent.stageStarted" | "agent.stageCompleted" | "agent.stageFailed" | "agent.delegated" | "agent.delegationReturned" | "agent.completed" | "agent.failed";
2866
+ version: number;
2867
+ timestamp: string;
2868
+ eventId: string;
2869
+ payload: {
2870
+ type: "registered";
2871
+ profile: {
2872
+ description: string;
2873
+ agentId: string;
2874
+ parallel?: boolean | undefined;
2875
+ version?: string | undefined;
2876
+ metadata?: Record<string, unknown> | undefined;
2877
+ enabled?: boolean | undefined;
2878
+ priority?: number | undefined;
2879
+ team?: string | undefined;
2880
+ displayName?: string | undefined;
2881
+ capabilities?: string[] | undefined;
2882
+ role?: string | undefined;
2883
+ expertise?: string[] | undefined;
2884
+ tags?: string[] | undefined;
2885
+ workflow?: {
2886
+ type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2887
+ stepId: string;
2888
+ name: string;
2889
+ parallel?: boolean | undefined;
2890
+ retryPolicy?: {
2891
+ maxAttempts: number;
2892
+ backoffMs: number;
2893
+ backoffMultiplier: number;
2894
+ retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2895
+ } | undefined;
2896
+ config?: Record<string, unknown> | undefined;
2897
+ description?: string | undefined;
2898
+ dependencies?: string[] | undefined;
2899
+ outputs?: string[] | undefined;
2900
+ timeoutMs?: number | undefined;
2901
+ streaming?: boolean | undefined;
2902
+ condition?: string | undefined;
2903
+ keyQuestions?: string[] | undefined;
2904
+ saveToMemory?: boolean | undefined;
2905
+ checkpoint?: boolean | undefined;
2906
+ }[] | undefined;
2907
+ orchestration?: {
2908
+ maxDelegationDepth?: number | undefined;
2909
+ canReadWorkspaces?: string[] | undefined;
2910
+ canWriteToShared?: boolean | undefined;
2911
+ delegationTimeout?: number | undefined;
2912
+ } | undefined;
2913
+ createdAt?: string | undefined;
2914
+ updatedAt?: string | undefined;
2915
+ dependencies?: string[] | undefined;
2916
+ abilities?: {
2917
+ core?: string[] | undefined;
2918
+ taskBased?: Record<string, string[]> | undefined;
2919
+ loadAll?: boolean | undefined;
2920
+ } | undefined;
2921
+ maxTokens?: number | undefined;
2922
+ systemPrompt?: string | undefined;
2923
+ personality?: {
2924
+ traits?: string[] | undefined;
2925
+ catchphrase?: string | undefined;
2926
+ communicationStyle?: string | undefined;
2927
+ decisionMaking?: string | undefined;
2928
+ } | undefined;
2929
+ thinkingPatterns?: string[] | undefined;
2930
+ temperature?: number | undefined;
2931
+ providerAffinity?: {
2932
+ preferred?: string[] | undefined;
2933
+ defaultSynthesizer?: string | undefined;
2934
+ excluded?: string[] | undefined;
2935
+ taskOverrides?: Record<string, string> | undefined;
2936
+ temperatureOverrides?: Record<string, number> | undefined;
2937
+ } | undefined;
2938
+ selectionMetadata?: {
2939
+ primaryIntents?: string[] | undefined;
2940
+ secondarySignals?: string[] | undefined;
2941
+ negativeIntents?: string[] | undefined;
2942
+ redirectWhen?: {
2943
+ phrase: string;
2944
+ suggest: string;
2945
+ }[] | undefined;
2946
+ keywords?: string[] | undefined;
2947
+ antiKeywords?: string[] | undefined;
2948
+ exampleTasks?: string[] | undefined;
2949
+ notForTasks?: string[] | undefined;
2950
+ agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2951
+ } | undefined;
2952
+ collaboratesWith?: string[] | undefined;
2953
+ };
2954
+ } | {
2955
+ type: "started";
2956
+ sessionId?: string | undefined;
2957
+ input?: unknown;
2958
+ } | {
2959
+ type: "stageStarted";
2960
+ stepId: string;
2961
+ stageName: string;
2962
+ } | {
2963
+ type: "stageCompleted";
2964
+ stepId: string;
2965
+ output?: unknown;
2966
+ } | {
2967
+ type: "stageFailed";
2968
+ stepId: string;
2969
+ error: {
2970
+ code: string;
2971
+ message: string;
2972
+ stepId?: string | undefined;
2973
+ details?: Record<string, unknown> | undefined;
2974
+ retryable?: boolean | undefined;
2975
+ };
2976
+ } | {
2977
+ type: "delegated";
2978
+ task: string;
2979
+ targetAgent: string;
2980
+ } | {
2981
+ type: "delegationReturned";
2982
+ fromAgent: string;
2983
+ result?: unknown;
2984
+ } | {
2985
+ type: "completed";
2986
+ durationMs: number;
2987
+ output?: unknown;
2988
+ } | {
2989
+ type: "failed";
2990
+ error: {
2991
+ code: string;
2992
+ message: string;
2993
+ stepId?: string | undefined;
2994
+ details?: Record<string, unknown> | undefined;
2995
+ retryable?: boolean | undefined;
2996
+ };
2997
+ };
2998
+ correlationId: string;
2999
+ aggregateId: string;
3000
+ traceId?: string | undefined;
3001
+ causationId?: string | undefined;
3002
+ spanId?: string | undefined;
3003
+ }>;
3004
+ export type AgentEvent = z.infer<typeof AgentEventSchema>;
3005
+ /**
3006
+ * Agent execution result
3007
+ */
3008
+ export declare const AgentResultSchema: z.ZodObject<{
3009
+ success: z.ZodBoolean;
3010
+ agentId: z.ZodString;
3011
+ sessionId: z.ZodOptional<z.ZodString>;
3012
+ output: z.ZodOptional<z.ZodUnknown>;
3013
+ stepResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
3014
+ stepId: z.ZodString;
3015
+ success: z.ZodBoolean;
3016
+ output: z.ZodOptional<z.ZodUnknown>;
3017
+ durationMs: z.ZodNumber;
3018
+ retryCount: z.ZodNumber;
3019
+ skipped: z.ZodBoolean;
3020
+ error: z.ZodOptional<z.ZodObject<{
3021
+ code: z.ZodString;
3022
+ message: z.ZodString;
3023
+ stepId: z.ZodOptional<z.ZodString>;
3024
+ retryable: z.ZodOptional<z.ZodBoolean>;
3025
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3026
+ }, "strip", z.ZodTypeAny, {
3027
+ code: string;
3028
+ message: string;
3029
+ stepId?: string | undefined;
3030
+ details?: Record<string, unknown> | undefined;
3031
+ retryable?: boolean | undefined;
3032
+ }, {
3033
+ code: string;
3034
+ message: string;
3035
+ stepId?: string | undefined;
3036
+ details?: Record<string, unknown> | undefined;
3037
+ retryable?: boolean | undefined;
3038
+ }>>;
3039
+ }, "strip", z.ZodTypeAny, {
3040
+ stepId: string;
3041
+ durationMs: number;
3042
+ skipped: boolean;
3043
+ success: boolean;
3044
+ retryCount: number;
3045
+ error?: {
3046
+ code: string;
3047
+ message: string;
3048
+ stepId?: string | undefined;
3049
+ details?: Record<string, unknown> | undefined;
3050
+ retryable?: boolean | undefined;
3051
+ } | undefined;
3052
+ output?: unknown;
3053
+ }, {
3054
+ stepId: string;
3055
+ durationMs: number;
3056
+ skipped: boolean;
3057
+ success: boolean;
3058
+ retryCount: number;
3059
+ error?: {
3060
+ code: string;
3061
+ message: string;
3062
+ stepId?: string | undefined;
3063
+ details?: Record<string, unknown> | undefined;
3064
+ retryable?: boolean | undefined;
3065
+ } | undefined;
3066
+ output?: unknown;
3067
+ }>, "many">>;
3068
+ error: z.ZodOptional<z.ZodObject<{
3069
+ code: z.ZodString;
3070
+ message: z.ZodString;
3071
+ stepId: z.ZodOptional<z.ZodString>;
3072
+ retryable: z.ZodOptional<z.ZodBoolean>;
3073
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3074
+ }, "strip", z.ZodTypeAny, {
3075
+ code: string;
3076
+ message: string;
3077
+ stepId?: string | undefined;
3078
+ details?: Record<string, unknown> | undefined;
3079
+ retryable?: boolean | undefined;
3080
+ }, {
3081
+ code: string;
3082
+ message: string;
3083
+ stepId?: string | undefined;
3084
+ details?: Record<string, unknown> | undefined;
3085
+ retryable?: boolean | undefined;
3086
+ }>>;
3087
+ totalDurationMs: z.ZodNumber;
3088
+ }, "strip", z.ZodTypeAny, {
3089
+ agentId: string;
3090
+ success: boolean;
3091
+ totalDurationMs: number;
3092
+ sessionId?: string | undefined;
3093
+ error?: {
3094
+ code: string;
3095
+ message: string;
3096
+ stepId?: string | undefined;
3097
+ details?: Record<string, unknown> | undefined;
3098
+ retryable?: boolean | undefined;
3099
+ } | undefined;
3100
+ output?: unknown;
3101
+ stepResults?: {
3102
+ stepId: string;
3103
+ durationMs: number;
3104
+ skipped: boolean;
3105
+ success: boolean;
3106
+ retryCount: number;
3107
+ error?: {
3108
+ code: string;
3109
+ message: string;
3110
+ stepId?: string | undefined;
3111
+ details?: Record<string, unknown> | undefined;
3112
+ retryable?: boolean | undefined;
3113
+ } | undefined;
3114
+ output?: unknown;
3115
+ }[] | undefined;
3116
+ }, {
3117
+ agentId: string;
3118
+ success: boolean;
3119
+ totalDurationMs: number;
3120
+ sessionId?: string | undefined;
3121
+ error?: {
3122
+ code: string;
3123
+ message: string;
3124
+ stepId?: string | undefined;
3125
+ details?: Record<string, unknown> | undefined;
3126
+ retryable?: boolean | undefined;
3127
+ } | undefined;
3128
+ output?: unknown;
3129
+ stepResults?: {
3130
+ stepId: string;
3131
+ durationMs: number;
3132
+ skipped: boolean;
3133
+ success: boolean;
3134
+ retryCount: number;
3135
+ error?: {
3136
+ code: string;
3137
+ message: string;
3138
+ stepId?: string | undefined;
3139
+ details?: Record<string, unknown> | undefined;
3140
+ retryable?: boolean | undefined;
3141
+ } | undefined;
3142
+ output?: unknown;
3143
+ }[] | undefined;
3144
+ }>;
3145
+ export type AgentResult = z.infer<typeof AgentResultSchema>;
3146
+ /**
3147
+ * Agent error codes
3148
+ */
3149
+ export declare const AgentErrorCode: {
3150
+ readonly AGENT_NOT_FOUND: "AGENT_NOT_FOUND";
3151
+ readonly AGENT_VALIDATION_ERROR: "AGENT_VALIDATION_ERROR";
3152
+ readonly AGENT_DELEGATION_DEPTH_EXCEEDED: "AGENT_DELEGATION_DEPTH_EXCEEDED";
3153
+ readonly AGENT_DELEGATION_TIMEOUT: "AGENT_DELEGATION_TIMEOUT";
3154
+ readonly AGENT_STAGE_FAILED: "AGENT_STAGE_FAILED";
3155
+ readonly AGENT_DEPENDENCY_FAILED: "AGENT_DEPENDENCY_FAILED";
3156
+ readonly AGENT_PERMISSION_DENIED: "AGENT_PERMISSION_DENIED";
3157
+ readonly AGENT_ALREADY_RUNNING: "AGENT_ALREADY_RUNNING";
3158
+ readonly AGENT_WORKFLOW_INVALID: "AGENT_WORKFLOW_INVALID";
3159
+ };
3160
+ export type AgentErrorCode = (typeof AgentErrorCode)[keyof typeof AgentErrorCode];
3161
+ /**
3162
+ * Validates an agent profile
3163
+ */
3164
+ export declare function validateAgentProfile(data: unknown): AgentProfile;
3165
+ /**
3166
+ * Safely validates an agent profile
3167
+ */
3168
+ export declare function safeValidateAgentProfile(data: unknown): {
3169
+ success: true;
3170
+ data: AgentProfile;
3171
+ } | {
3172
+ success: false;
3173
+ error: z.ZodError;
3174
+ };
3175
+ /**
3176
+ * Validates agent run options
3177
+ */
3178
+ export declare function validateAgentRunOptions(data: unknown): AgentRunOptions;
3179
+ /**
3180
+ * Checkpoint configuration
3181
+ *
3182
+ * Invariants:
3183
+ * - INV-CP-001: Checkpoint contains all data needed to resume
3184
+ * - INV-CP-002: Resumed execution starts from step after checkpoint
3185
+ */
3186
+ export declare const CheckpointConfigSchema: z.ZodObject<{
3187
+ /** Enable checkpointing */
3188
+ enabled: z.ZodDefault<z.ZodBoolean>;
3189
+ /** Checkpoint after every N steps (0 = every step) */
3190
+ intervalSteps: z.ZodDefault<z.ZodNumber>;
3191
+ /** Checkpoint retention period in hours */
3192
+ retentionHours: z.ZodDefault<z.ZodNumber>;
3193
+ /** Include memory snapshot in checkpoint */
3194
+ includeMemory: z.ZodDefault<z.ZodBoolean>;
3195
+ /** Max checkpoints to retain per agent */
3196
+ maxCheckpoints: z.ZodDefault<z.ZodNumber>;
3197
+ }, "strip", z.ZodTypeAny, {
3198
+ enabled: boolean;
3199
+ intervalSteps: number;
3200
+ retentionHours: number;
3201
+ includeMemory: boolean;
3202
+ maxCheckpoints: number;
3203
+ }, {
3204
+ enabled?: boolean | undefined;
3205
+ intervalSteps?: number | undefined;
3206
+ retentionHours?: number | undefined;
3207
+ includeMemory?: boolean | undefined;
3208
+ maxCheckpoints?: number | undefined;
3209
+ }>;
3210
+ export type CheckpointConfig = z.infer<typeof CheckpointConfigSchema>;
3211
+ /**
3212
+ * Memory snapshot item for checkpoint
3213
+ */
3214
+ export declare const MemorySnapshotItemSchema: z.ZodObject<{
3215
+ key: z.ZodString;
3216
+ value: z.ZodUnknown;
3217
+ namespace: z.ZodOptional<z.ZodString>;
3218
+ }, "strip", z.ZodTypeAny, {
3219
+ key: string;
3220
+ value?: unknown;
3221
+ namespace?: string | undefined;
3222
+ }, {
3223
+ key: string;
3224
+ value?: unknown;
3225
+ namespace?: string | undefined;
3226
+ }>;
3227
+ export type MemorySnapshotItem = z.infer<typeof MemorySnapshotItemSchema>;
3228
+ /**
3229
+ * Checkpoint schema - persisted execution state
3230
+ */
3231
+ export declare const CheckpointSchema: z.ZodObject<{
3232
+ /** Unique checkpoint identifier */
3233
+ checkpointId: z.ZodString;
3234
+ /** Agent that created this checkpoint */
3235
+ agentId: z.ZodString;
3236
+ /** Session if applicable */
3237
+ sessionId: z.ZodOptional<z.ZodString>;
3238
+ /** Workflow if applicable */
3239
+ workflowId: z.ZodOptional<z.ZodString>;
3240
+ /** Current step index (0-based) */
3241
+ stepIndex: z.ZodNumber;
3242
+ /** ID of the last completed step */
3243
+ completedStepId: z.ZodString;
3244
+ /** Accumulated outputs from completed steps */
3245
+ stepOutputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3246
+ /** Execution context at checkpoint time */
3247
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3248
+ /** Memory state snapshot (if configured) */
3249
+ memorySnapshot: z.ZodOptional<z.ZodArray<z.ZodObject<{
3250
+ key: z.ZodString;
3251
+ value: z.ZodUnknown;
3252
+ namespace: z.ZodOptional<z.ZodString>;
3253
+ }, "strip", z.ZodTypeAny, {
3254
+ key: string;
3255
+ value?: unknown;
3256
+ namespace?: string | undefined;
3257
+ }, {
3258
+ key: string;
3259
+ value?: unknown;
3260
+ namespace?: string | undefined;
3261
+ }>, "many">>;
3262
+ /** Checkpoint creation time */
3263
+ createdAt: z.ZodString;
3264
+ /** Checkpoint expiration time */
3265
+ expiresAt: z.ZodOptional<z.ZodString>;
3266
+ }, "strip", z.ZodTypeAny, {
3267
+ context: Record<string, unknown>;
3268
+ agentId: string;
3269
+ stepIndex: number;
3270
+ createdAt: string;
3271
+ checkpointId: string;
3272
+ completedStepId: string;
3273
+ stepOutputs: Record<string, unknown>;
3274
+ workflowId?: string | undefined;
3275
+ sessionId?: string | undefined;
3276
+ memorySnapshot?: {
3277
+ key: string;
3278
+ value?: unknown;
3279
+ namespace?: string | undefined;
3280
+ }[] | undefined;
3281
+ expiresAt?: string | undefined;
3282
+ }, {
3283
+ context: Record<string, unknown>;
3284
+ agentId: string;
3285
+ stepIndex: number;
3286
+ createdAt: string;
3287
+ checkpointId: string;
3288
+ completedStepId: string;
3289
+ stepOutputs: Record<string, unknown>;
3290
+ workflowId?: string | undefined;
3291
+ sessionId?: string | undefined;
3292
+ memorySnapshot?: {
3293
+ key: string;
3294
+ value?: unknown;
3295
+ namespace?: string | undefined;
3296
+ }[] | undefined;
3297
+ expiresAt?: string | undefined;
3298
+ }>;
3299
+ export type Checkpoint = z.infer<typeof CheckpointSchema>;
3300
+ /**
3301
+ * Resume context from checkpoint
3302
+ */
3303
+ export declare const ResumeContextSchema: z.ZodObject<{
3304
+ /** Step index to resume from */
3305
+ startFromStep: z.ZodNumber;
3306
+ /** Outputs from previously completed steps */
3307
+ previousOutputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3308
+ /** Execution context */
3309
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3310
+ /** Memory snapshot to restore */
3311
+ memorySnapshot: z.ZodOptional<z.ZodArray<z.ZodObject<{
3312
+ key: z.ZodString;
3313
+ value: z.ZodUnknown;
3314
+ namespace: z.ZodOptional<z.ZodString>;
3315
+ }, "strip", z.ZodTypeAny, {
3316
+ key: string;
3317
+ value?: unknown;
3318
+ namespace?: string | undefined;
3319
+ }, {
3320
+ key: string;
3321
+ value?: unknown;
3322
+ namespace?: string | undefined;
3323
+ }>, "many">>;
3324
+ }, "strip", z.ZodTypeAny, {
3325
+ context: Record<string, unknown>;
3326
+ previousOutputs: Record<string, unknown>;
3327
+ startFromStep: number;
3328
+ memorySnapshot?: {
3329
+ key: string;
3330
+ value?: unknown;
3331
+ namespace?: string | undefined;
3332
+ }[] | undefined;
3333
+ }, {
3334
+ context: Record<string, unknown>;
3335
+ previousOutputs: Record<string, unknown>;
3336
+ startFromStep: number;
3337
+ memorySnapshot?: {
3338
+ key: string;
3339
+ value?: unknown;
3340
+ namespace?: string | undefined;
3341
+ }[] | undefined;
3342
+ }>;
3343
+ export type ResumeContext = z.infer<typeof ResumeContextSchema>;
3344
+ /**
3345
+ * Checkpoint error codes
3346
+ */
3347
+ export declare const CheckpointErrorCodes: {
3348
+ readonly CHECKPOINT_NOT_FOUND: "CHECKPOINT_NOT_FOUND";
3349
+ readonly CHECKPOINT_EXPIRED: "CHECKPOINT_EXPIRED";
3350
+ readonly CHECKPOINT_INVALID: "CHECKPOINT_INVALID";
3351
+ readonly CHECKPOINT_SAVE_FAILED: "CHECKPOINT_SAVE_FAILED";
3352
+ };
3353
+ export type CheckpointErrorCode = (typeof CheckpointErrorCodes)[keyof typeof CheckpointErrorCodes];
3354
+ /**
3355
+ * Delegation context - tracks delegation chain
3356
+ *
3357
+ * Invariants:
3358
+ * - INV-DT-001: Depth never exceeds maxDepth
3359
+ * - INV-DT-002: No circular delegations (agent can't delegate to itself or ancestors)
3360
+ */
3361
+ export declare const DelegationContextSchema: z.ZodObject<{
3362
+ /** Current depth in delegation chain */
3363
+ currentDepth: z.ZodNumber;
3364
+ /** Maximum allowed delegation depth */
3365
+ maxDepth: z.ZodNumber;
3366
+ /** Chain of agent IDs in delegation (oldest first) */
3367
+ delegationChain: z.ZodArray<z.ZodString, "many">;
3368
+ /** Original initiator agent ID */
3369
+ initiatorAgentId: z.ZodString;
3370
+ /** Root task ID for correlation */
3371
+ rootTaskId: z.ZodString;
3372
+ /** Timestamp when delegation chain started */
3373
+ startedAt: z.ZodOptional<z.ZodString>;
3374
+ }, "strip", z.ZodTypeAny, {
3375
+ currentDepth: number;
3376
+ maxDepth: number;
3377
+ delegationChain: string[];
3378
+ initiatorAgentId: string;
3379
+ rootTaskId: string;
3380
+ startedAt?: string | undefined;
3381
+ }, {
3382
+ currentDepth: number;
3383
+ maxDepth: number;
3384
+ delegationChain: string[];
3385
+ initiatorAgentId: string;
3386
+ rootTaskId: string;
3387
+ startedAt?: string | undefined;
3388
+ }>;
3389
+ export type DelegationContext = z.infer<typeof DelegationContextSchema>;
3390
+ /**
3391
+ * Delegation request
3392
+ */
3393
+ export declare const DelegationRequestSchema: z.ZodObject<{
3394
+ /** Agent initiating the delegation */
3395
+ fromAgentId: z.ZodString;
3396
+ /** Target agent to delegate to */
3397
+ toAgentId: z.ZodString;
3398
+ /** Task description */
3399
+ task: z.ZodString;
3400
+ /** Delegation context for tracking */
3401
+ context: z.ZodObject<{
3402
+ /** Current depth in delegation chain */
3403
+ currentDepth: z.ZodNumber;
3404
+ /** Maximum allowed delegation depth */
3405
+ maxDepth: z.ZodNumber;
3406
+ /** Chain of agent IDs in delegation (oldest first) */
3407
+ delegationChain: z.ZodArray<z.ZodString, "many">;
3408
+ /** Original initiator agent ID */
3409
+ initiatorAgentId: z.ZodString;
3410
+ /** Root task ID for correlation */
3411
+ rootTaskId: z.ZodString;
3412
+ /** Timestamp when delegation chain started */
3413
+ startedAt: z.ZodOptional<z.ZodString>;
3414
+ }, "strip", z.ZodTypeAny, {
3415
+ currentDepth: number;
3416
+ maxDepth: number;
3417
+ delegationChain: string[];
3418
+ initiatorAgentId: string;
3419
+ rootTaskId: string;
3420
+ startedAt?: string | undefined;
3421
+ }, {
3422
+ currentDepth: number;
3423
+ maxDepth: number;
3424
+ delegationChain: string[];
3425
+ initiatorAgentId: string;
3426
+ rootTaskId: string;
3427
+ startedAt?: string | undefined;
3428
+ }>;
3429
+ /** Timeout for delegated task in ms */
3430
+ timeout: z.ZodOptional<z.ZodNumber>;
3431
+ /** Input data for delegated agent */
3432
+ input: z.ZodOptional<z.ZodUnknown>;
3433
+ }, "strip", z.ZodTypeAny, {
3434
+ context: {
3435
+ currentDepth: number;
3436
+ maxDepth: number;
3437
+ delegationChain: string[];
3438
+ initiatorAgentId: string;
3439
+ rootTaskId: string;
3440
+ startedAt?: string | undefined;
3441
+ };
3442
+ task: string;
3443
+ fromAgentId: string;
3444
+ toAgentId: string;
3445
+ timeout?: number | undefined;
3446
+ input?: unknown;
3447
+ }, {
3448
+ context: {
3449
+ currentDepth: number;
3450
+ maxDepth: number;
3451
+ delegationChain: string[];
3452
+ initiatorAgentId: string;
3453
+ rootTaskId: string;
3454
+ startedAt?: string | undefined;
3455
+ };
3456
+ task: string;
3457
+ fromAgentId: string;
3458
+ toAgentId: string;
3459
+ timeout?: number | undefined;
3460
+ input?: unknown;
3461
+ }>;
3462
+ export type DelegationRequest = z.infer<typeof DelegationRequestSchema>;
3463
+ /**
3464
+ * Delegation result
3465
+ */
3466
+ export declare const DelegationResultSchema: z.ZodObject<{
3467
+ /** Whether delegation succeeded */
3468
+ success: z.ZodBoolean;
3469
+ /** Agent that handled the delegation */
3470
+ handledBy: z.ZodString;
3471
+ /** Result from delegated agent */
3472
+ result: z.ZodOptional<z.ZodUnknown>;
3473
+ /** Error if delegation failed */
3474
+ error: z.ZodOptional<z.ZodObject<{
3475
+ code: z.ZodString;
3476
+ message: z.ZodString;
3477
+ stepId: z.ZodOptional<z.ZodString>;
3478
+ retryable: z.ZodOptional<z.ZodBoolean>;
3479
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3480
+ }, "strip", z.ZodTypeAny, {
3481
+ code: string;
3482
+ message: string;
3483
+ stepId?: string | undefined;
3484
+ details?: Record<string, unknown> | undefined;
3485
+ retryable?: boolean | undefined;
3486
+ }, {
3487
+ code: string;
3488
+ message: string;
3489
+ stepId?: string | undefined;
3490
+ details?: Record<string, unknown> | undefined;
3491
+ retryable?: boolean | undefined;
3492
+ }>>;
3493
+ /** Duration of delegated execution */
3494
+ durationMs: z.ZodNumber;
3495
+ /** Final delegation depth reached */
3496
+ finalDepth: z.ZodNumber;
3497
+ }, "strip", z.ZodTypeAny, {
3498
+ durationMs: number;
3499
+ success: boolean;
3500
+ handledBy: string;
3501
+ finalDepth: number;
3502
+ error?: {
3503
+ code: string;
3504
+ message: string;
3505
+ stepId?: string | undefined;
3506
+ details?: Record<string, unknown> | undefined;
3507
+ retryable?: boolean | undefined;
3508
+ } | undefined;
3509
+ result?: unknown;
3510
+ }, {
3511
+ durationMs: number;
3512
+ success: boolean;
3513
+ handledBy: string;
3514
+ finalDepth: number;
3515
+ error?: {
3516
+ code: string;
3517
+ message: string;
3518
+ stepId?: string | undefined;
3519
+ details?: Record<string, unknown> | undefined;
3520
+ retryable?: boolean | undefined;
3521
+ } | undefined;
3522
+ result?: unknown;
3523
+ }>;
3524
+ export type DelegationResult = z.infer<typeof DelegationResultSchema>;
3525
+ /**
3526
+ * Delegation check result
3527
+ */
3528
+ export declare const DelegationCheckResultSchema: z.ZodObject<{
3529
+ /** Whether delegation is allowed */
3530
+ allowed: z.ZodBoolean;
3531
+ /** Reason if not allowed */
3532
+ reason: z.ZodOptional<z.ZodString>;
3533
+ /** Detailed message */
3534
+ message: z.ZodOptional<z.ZodString>;
3535
+ }, "strip", z.ZodTypeAny, {
3536
+ allowed: boolean;
3537
+ message?: string | undefined;
3538
+ reason?: string | undefined;
3539
+ }, {
3540
+ allowed: boolean;
3541
+ message?: string | undefined;
3542
+ reason?: string | undefined;
3543
+ }>;
3544
+ export type DelegationCheckResult = z.infer<typeof DelegationCheckResultSchema>;
3545
+ /**
3546
+ * Delegation error codes
3547
+ */
3548
+ export declare const DelegationErrorCodes: {
3549
+ readonly MAX_DEPTH_EXCEEDED: "DELEGATION_MAX_DEPTH_EXCEEDED";
3550
+ readonly CIRCULAR_DELEGATION: "DELEGATION_CIRCULAR";
3551
+ readonly TARGET_NOT_FOUND: "DELEGATION_TARGET_NOT_FOUND";
3552
+ readonly TARGET_UNAVAILABLE: "DELEGATION_TARGET_UNAVAILABLE";
3553
+ readonly TIMEOUT: "DELEGATION_TIMEOUT";
3554
+ readonly PERMISSION_DENIED: "DELEGATION_PERMISSION_DENIED";
3555
+ };
3556
+ export type DelegationErrorCode = (typeof DelegationErrorCodes)[keyof typeof DelegationErrorCodes];
3557
+ /**
3558
+ * Parallel execution failure strategy
3559
+ */
3560
+ export declare const ParallelFailureStrategySchema: z.ZodEnum<["failFast", "failSafe", "continueOnError"]>;
3561
+ export type ParallelFailureStrategy = z.infer<typeof ParallelFailureStrategySchema>;
3562
+ /**
3563
+ * Parallel execution configuration
3564
+ *
3565
+ * Invariants:
3566
+ * - INV-PE-001: Independent steps execute concurrently
3567
+ * - INV-PE-002: Dependencies honored (DAG ordering)
3568
+ * - INV-PE-003: Concurrency limit respected
3569
+ */
3570
+ export declare const ParallelExecutionConfigSchema: z.ZodObject<{
3571
+ /** Enable parallel execution */
3572
+ enabled: z.ZodDefault<z.ZodBoolean>;
3573
+ /** Maximum concurrent steps (INV-PE-003) */
3574
+ maxConcurrency: z.ZodDefault<z.ZodNumber>;
3575
+ /** Strategy when one parallel step fails */
3576
+ failureStrategy: z.ZodDefault<z.ZodEnum<["failFast", "failSafe", "continueOnError"]>>;
3577
+ /** Timeout for entire parallel group in ms */
3578
+ groupTimeoutMs: z.ZodOptional<z.ZodNumber>;
3579
+ /** Enable step-level checkpointing in parallel groups */
3580
+ checkpointParallel: z.ZodDefault<z.ZodBoolean>;
3581
+ }, "strip", z.ZodTypeAny, {
3582
+ enabled: boolean;
3583
+ maxConcurrency: number;
3584
+ failureStrategy: "failFast" | "failSafe" | "continueOnError";
3585
+ checkpointParallel: boolean;
3586
+ groupTimeoutMs?: number | undefined;
3587
+ }, {
3588
+ enabled?: boolean | undefined;
3589
+ maxConcurrency?: number | undefined;
3590
+ failureStrategy?: "failFast" | "failSafe" | "continueOnError" | undefined;
3591
+ groupTimeoutMs?: number | undefined;
3592
+ checkpointParallel?: boolean | undefined;
3593
+ }>;
3594
+ export type ParallelExecutionConfig = z.infer<typeof ParallelExecutionConfigSchema>;
3595
+ /**
3596
+ * Parallel step result
3597
+ */
3598
+ export declare const ParallelStepResultSchema: z.ZodObject<{
3599
+ /** Step identifier */
3600
+ stepId: z.ZodString;
3601
+ /** Whether step succeeded */
3602
+ success: z.ZodBoolean;
3603
+ /** Step output */
3604
+ output: z.ZodOptional<z.ZodUnknown>;
3605
+ /** Error message if failed */
3606
+ error: z.ZodOptional<z.ZodString>;
3607
+ /** Error code if failed */
3608
+ errorCode: z.ZodOptional<z.ZodString>;
3609
+ /** Step duration in ms */
3610
+ durationMs: z.ZodNumber;
3611
+ /** Whether step was cancelled */
3612
+ cancelled: z.ZodOptional<z.ZodBoolean>;
3613
+ /** Retry count for this step */
3614
+ retryCount: z.ZodOptional<z.ZodNumber>;
3615
+ }, "strip", z.ZodTypeAny, {
3616
+ stepId: string;
3617
+ durationMs: number;
3618
+ success: boolean;
3619
+ error?: string | undefined;
3620
+ output?: unknown;
3621
+ errorCode?: string | undefined;
3622
+ retryCount?: number | undefined;
3623
+ cancelled?: boolean | undefined;
3624
+ }, {
3625
+ stepId: string;
3626
+ durationMs: number;
3627
+ success: boolean;
3628
+ error?: string | undefined;
3629
+ output?: unknown;
3630
+ errorCode?: string | undefined;
3631
+ retryCount?: number | undefined;
3632
+ cancelled?: boolean | undefined;
3633
+ }>;
3634
+ export type ParallelStepResult = z.infer<typeof ParallelStepResultSchema>;
3635
+ /**
3636
+ * Parallel group execution result
3637
+ */
3638
+ export declare const ParallelGroupResultSchema: z.ZodObject<{
3639
+ /** Group identifier */
3640
+ groupId: z.ZodString;
3641
+ /** Results for each step in the group */
3642
+ stepResults: z.ZodArray<z.ZodObject<{
3643
+ /** Step identifier */
3644
+ stepId: z.ZodString;
3645
+ /** Whether step succeeded */
3646
+ success: z.ZodBoolean;
3647
+ /** Step output */
3648
+ output: z.ZodOptional<z.ZodUnknown>;
3649
+ /** Error message if failed */
3650
+ error: z.ZodOptional<z.ZodString>;
3651
+ /** Error code if failed */
3652
+ errorCode: z.ZodOptional<z.ZodString>;
3653
+ /** Step duration in ms */
3654
+ durationMs: z.ZodNumber;
3655
+ /** Whether step was cancelled */
3656
+ cancelled: z.ZodOptional<z.ZodBoolean>;
3657
+ /** Retry count for this step */
3658
+ retryCount: z.ZodOptional<z.ZodNumber>;
3659
+ }, "strip", z.ZodTypeAny, {
3660
+ stepId: string;
3661
+ durationMs: number;
3662
+ success: boolean;
3663
+ error?: string | undefined;
3664
+ output?: unknown;
3665
+ errorCode?: string | undefined;
3666
+ retryCount?: number | undefined;
3667
+ cancelled?: boolean | undefined;
3668
+ }, {
3669
+ stepId: string;
3670
+ durationMs: number;
3671
+ success: boolean;
3672
+ error?: string | undefined;
3673
+ output?: unknown;
3674
+ errorCode?: string | undefined;
3675
+ retryCount?: number | undefined;
3676
+ cancelled?: boolean | undefined;
3677
+ }>, "many">;
3678
+ /** Total duration for the group in ms */
3679
+ totalDurationMs: z.ZodNumber;
3680
+ /** Whether all steps succeeded */
3681
+ allSucceeded: z.ZodBoolean;
3682
+ /** List of failed step IDs */
3683
+ failedSteps: z.ZodArray<z.ZodString, "many">;
3684
+ /** List of cancelled step IDs */
3685
+ cancelledSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3686
+ /** Number of steps executed */
3687
+ stepsExecuted: z.ZodNumber;
3688
+ /** Number of steps skipped */
3689
+ stepsSkipped: z.ZodOptional<z.ZodNumber>;
3690
+ }, "strip", z.ZodTypeAny, {
3691
+ stepResults: {
3692
+ stepId: string;
3693
+ durationMs: number;
3694
+ success: boolean;
3695
+ error?: string | undefined;
3696
+ output?: unknown;
3697
+ errorCode?: string | undefined;
3698
+ retryCount?: number | undefined;
3699
+ cancelled?: boolean | undefined;
3700
+ }[];
3701
+ totalDurationMs: number;
3702
+ groupId: string;
3703
+ allSucceeded: boolean;
3704
+ failedSteps: string[];
3705
+ stepsExecuted: number;
3706
+ cancelledSteps?: string[] | undefined;
3707
+ stepsSkipped?: number | undefined;
3708
+ }, {
3709
+ stepResults: {
3710
+ stepId: string;
3711
+ durationMs: number;
3712
+ success: boolean;
3713
+ error?: string | undefined;
3714
+ output?: unknown;
3715
+ errorCode?: string | undefined;
3716
+ retryCount?: number | undefined;
3717
+ cancelled?: boolean | undefined;
3718
+ }[];
3719
+ totalDurationMs: number;
3720
+ groupId: string;
3721
+ allSucceeded: boolean;
3722
+ failedSteps: string[];
3723
+ stepsExecuted: number;
3724
+ cancelledSteps?: string[] | undefined;
3725
+ stepsSkipped?: number | undefined;
3726
+ }>;
3727
+ export type ParallelGroupResult = z.infer<typeof ParallelGroupResultSchema>;
3728
+ /**
3729
+ * Parallel execution error codes
3730
+ */
3731
+ export declare const ParallelExecutionErrorCodes: {
3732
+ readonly GROUP_TIMEOUT: "PARALLEL_GROUP_TIMEOUT";
3733
+ readonly STEP_FAILED: "PARALLEL_STEP_FAILED";
3734
+ readonly CONCURRENCY_EXCEEDED: "PARALLEL_CONCURRENCY_EXCEEDED";
3735
+ readonly CIRCULAR_DEPENDENCY: "PARALLEL_CIRCULAR_DEPENDENCY";
3736
+ };
3737
+ export type ParallelExecutionErrorCode = (typeof ParallelExecutionErrorCodes)[keyof typeof ParallelExecutionErrorCodes];
3738
+ /**
3739
+ * Validates checkpoint configuration
3740
+ */
3741
+ export declare function validateCheckpointConfig(data: unknown): CheckpointConfig;
3742
+ /**
3743
+ * Validates a checkpoint
3744
+ */
3745
+ export declare function validateCheckpoint(data: unknown): Checkpoint;
3746
+ /**
3747
+ * Validates delegation context
3748
+ */
3749
+ export declare function validateDelegationContext(data: unknown): DelegationContext;
3750
+ /**
3751
+ * Validates delegation request
3752
+ */
3753
+ export declare function validateDelegationRequest(data: unknown): DelegationRequest;
3754
+ /**
3755
+ * Validates parallel execution configuration
3756
+ */
3757
+ export declare function validateParallelExecutionConfig(data: unknown): ParallelExecutionConfig;
3758
+ /**
3759
+ * Creates default checkpoint configuration
3760
+ */
3761
+ export declare function createDefaultCheckpointConfig(): CheckpointConfig;
3762
+ /**
3763
+ * Creates default parallel execution configuration
3764
+ */
3765
+ export declare function createDefaultParallelExecutionConfig(): ParallelExecutionConfig;
3766
+ /**
3767
+ * Creates initial delegation context for root agent
3768
+ */
3769
+ export declare function createRootDelegationContext(agentId: string, taskId: string, maxDepth?: number): DelegationContext;
3770
+ /**
3771
+ * Tool execution result
3772
+ *
3773
+ * Invariants:
3774
+ * - INV-TOOL-001: Tool execution must validate inputs before execution
3775
+ * - INV-TOOL-002: Tool results must be immutable after creation
3776
+ */
3777
+ export declare const ToolExecutionResultSchema: z.ZodObject<{
3778
+ /** Whether the tool execution succeeded */
3779
+ success: z.ZodBoolean;
3780
+ /** Output from the tool (any JSON-serializable value) */
3781
+ output: z.ZodOptional<z.ZodUnknown>;
3782
+ /** Error message if execution failed */
3783
+ error: z.ZodOptional<z.ZodString>;
3784
+ /** Error code if execution failed */
3785
+ errorCode: z.ZodOptional<z.ZodString>;
3786
+ /** Whether the error is retryable */
3787
+ retryable: z.ZodOptional<z.ZodBoolean>;
3788
+ /** Execution duration in milliseconds */
3789
+ durationMs: z.ZodOptional<z.ZodNumber>;
3790
+ }, "strip", z.ZodTypeAny, {
3791
+ success: boolean;
3792
+ durationMs?: number | undefined;
3793
+ error?: string | undefined;
3794
+ retryable?: boolean | undefined;
3795
+ output?: unknown;
3796
+ errorCode?: string | undefined;
3797
+ }, {
3798
+ success: boolean;
3799
+ durationMs?: number | undefined;
3800
+ error?: string | undefined;
3801
+ retryable?: boolean | undefined;
3802
+ output?: unknown;
3803
+ errorCode?: string | undefined;
3804
+ }>;
3805
+ export type ToolExecutionResult = z.infer<typeof ToolExecutionResultSchema>;
3806
+ /**
3807
+ * Tool execution request
3808
+ */
3809
+ export declare const ToolExecutionRequestSchema: z.ZodObject<{
3810
+ /** Name of the tool to execute */
3811
+ toolName: z.ZodString;
3812
+ /** Arguments to pass to the tool */
3813
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3814
+ /** Timeout in milliseconds */
3815
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3816
+ /** Idempotency key for safe retries */
3817
+ idempotencyKey: z.ZodOptional<z.ZodString>;
3818
+ }, "strip", z.ZodTypeAny, {
3819
+ toolName: string;
3820
+ args: Record<string, unknown>;
3821
+ timeoutMs?: number | undefined;
3822
+ idempotencyKey?: string | undefined;
3823
+ }, {
3824
+ toolName: string;
3825
+ args: Record<string, unknown>;
3826
+ timeoutMs?: number | undefined;
3827
+ idempotencyKey?: string | undefined;
3828
+ }>;
3829
+ export type ToolExecutionRequest = z.infer<typeof ToolExecutionRequestSchema>;
3830
+ /**
3831
+ * Tool executor interface schema (for documentation/validation)
3832
+ *
3833
+ * This interface is implemented by tool execution bridges that connect
3834
+ * agent/workflow execution to actual tool handlers.
3835
+ *
3836
+ * Invariants:
3837
+ * - INV-TOOL-001: Tool execution must validate inputs before execution
3838
+ * - INV-TOOL-002: Tool results must be immutable (frozen) after creation
3839
+ * - INV-TOOL-003: Unknown tools must return error, not throw
3840
+ */
3841
+ export declare const ToolExecutorConfigSchema: z.ZodObject<{
3842
+ /** Default timeout for tool execution in ms */
3843
+ defaultTimeoutMs: z.ZodDefault<z.ZodNumber>;
3844
+ /** Whether to validate inputs against tool schemas */
3845
+ validateInputs: z.ZodDefault<z.ZodBoolean>;
3846
+ /** Whether to freeze outputs for immutability */
3847
+ freezeOutputs: z.ZodDefault<z.ZodBoolean>;
3848
+ }, "strip", z.ZodTypeAny, {
3849
+ defaultTimeoutMs: number;
3850
+ validateInputs: boolean;
3851
+ freezeOutputs: boolean;
3852
+ }, {
3853
+ defaultTimeoutMs?: number | undefined;
3854
+ validateInputs?: boolean | undefined;
3855
+ freezeOutputs?: boolean | undefined;
3856
+ }>;
3857
+ export type ToolExecutorConfig = z.infer<typeof ToolExecutorConfigSchema>;
3858
+ /**
3859
+ * Tool executor error codes
3860
+ */
3861
+ export declare const ToolExecutorErrorCodes: {
3862
+ readonly TOOL_NOT_FOUND: "TOOL_NOT_FOUND";
3863
+ readonly TOOL_VALIDATION_ERROR: "TOOL_VALIDATION_ERROR";
3864
+ readonly TOOL_EXECUTION_ERROR: "TOOL_EXECUTION_ERROR";
3865
+ readonly TOOL_TIMEOUT: "TOOL_TIMEOUT";
3866
+ readonly TOOL_PERMISSION_DENIED: "TOOL_PERMISSION_DENIED";
3867
+ };
3868
+ export type ToolExecutorErrorCode = (typeof ToolExecutorErrorCodes)[keyof typeof ToolExecutorErrorCodes];
3869
+ /**
3870
+ * Validates tool execution result
3871
+ */
3872
+ export declare function validateToolExecutionResult(data: unknown): ToolExecutionResult;
3873
+ /**
3874
+ * Validates tool execution request
3875
+ */
3876
+ export declare function validateToolExecutionRequest(data: unknown): ToolExecutionRequest;
3877
+ /**
3878
+ * Creates a successful tool execution result
3879
+ */
3880
+ export declare function createToolExecutionSuccess(output: unknown, durationMs?: number): ToolExecutionResult;
3881
+ /**
3882
+ * Creates a failed tool execution result
3883
+ */
3884
+ export declare function createToolExecutionFailure(error: string, errorCode: ToolExecutorErrorCode, retryable?: boolean, durationMs?: number): ToolExecutionResult;
3885
+ /**
3886
+ * Agent recommendation request schema
3887
+ *
3888
+ * Invariants:
3889
+ * - INV-AGT-SEL-001: Selection is deterministic (same input = same output)
3890
+ * - INV-AGT-SEL-004: Always returns at least one result (fallback to 'standard')
3891
+ */
3892
+ export declare const AgentRecommendRequestSchema: z.ZodObject<{
3893
+ /** Task description to match against agents */
3894
+ task: z.ZodString;
3895
+ /** Filter by team */
3896
+ team: z.ZodOptional<z.ZodString>;
3897
+ /** Required capabilities */
3898
+ requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3899
+ /** Agents to exclude from matching */
3900
+ excludeAgents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3901
+ /** Maximum number of results */
3902
+ maxResults: z.ZodDefault<z.ZodNumber>;
3903
+ }, "strip", z.ZodTypeAny, {
3904
+ task: string;
3905
+ maxResults: number;
3906
+ team?: string | undefined;
3907
+ requiredCapabilities?: string[] | undefined;
3908
+ excludeAgents?: string[] | undefined;
3909
+ }, {
3910
+ task: string;
3911
+ team?: string | undefined;
3912
+ requiredCapabilities?: string[] | undefined;
3913
+ excludeAgents?: string[] | undefined;
3914
+ maxResults?: number | undefined;
3915
+ }>;
3916
+ export type AgentRecommendRequest = z.infer<typeof AgentRecommendRequestSchema>;
3917
+ /**
3918
+ * Agent match result (used in alternatives)
3919
+ */
3920
+ export declare const AgentMatchSchema: z.ZodObject<{
3921
+ agentId: z.ZodString;
3922
+ confidence: z.ZodNumber;
3923
+ reason: z.ZodOptional<z.ZodString>;
3924
+ }, "strip", z.ZodTypeAny, {
3925
+ agentId: string;
3926
+ confidence: number;
3927
+ reason?: string | undefined;
3928
+ }, {
3929
+ agentId: string;
3930
+ confidence: number;
3931
+ reason?: string | undefined;
3932
+ }>;
3933
+ export type AgentMatch = z.infer<typeof AgentMatchSchema>;
3934
+ /**
3935
+ * Agent recommendation result schema
3936
+ *
3937
+ * Invariants:
3938
+ * - INV-AGT-SEL-002: Confidence is between 0 and 1
3939
+ * - INV-AGT-SEL-003: Results sorted by confidence descending
3940
+ */
3941
+ export declare const AgentRecommendResultSchema: z.ZodObject<{
3942
+ /** Best matching agent ID */
3943
+ recommended: z.ZodString;
3944
+ /** Match confidence 0-1 */
3945
+ confidence: z.ZodNumber;
3946
+ /** Why this agent was selected */
3947
+ reason: z.ZodString;
3948
+ /** Alternative agent matches */
3949
+ alternatives: z.ZodArray<z.ZodObject<{
3950
+ agentId: z.ZodString;
3951
+ confidence: z.ZodNumber;
3952
+ reason: z.ZodOptional<z.ZodString>;
3953
+ }, "strip", z.ZodTypeAny, {
3954
+ agentId: string;
3955
+ confidence: number;
3956
+ reason?: string | undefined;
3957
+ }, {
3958
+ agentId: string;
3959
+ confidence: number;
3960
+ reason?: string | undefined;
3961
+ }>, "many">;
3962
+ }, "strip", z.ZodTypeAny, {
3963
+ reason: string;
3964
+ confidence: number;
3965
+ recommended: string;
3966
+ alternatives: {
3967
+ agentId: string;
3968
+ confidence: number;
3969
+ reason?: string | undefined;
3970
+ }[];
3971
+ }, {
3972
+ reason: string;
3973
+ confidence: number;
3974
+ recommended: string;
3975
+ alternatives: {
3976
+ agentId: string;
3977
+ confidence: number;
3978
+ reason?: string | undefined;
3979
+ }[];
3980
+ }>;
3981
+ export type AgentRecommendResult = z.infer<typeof AgentRecommendResultSchema>;
3982
+ /**
3983
+ * Agent capabilities query request schema
3984
+ */
3985
+ export declare const AgentCapabilitiesRequestSchema: z.ZodObject<{
3986
+ /** Filter by agent category */
3987
+ category: z.ZodOptional<z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>>;
3988
+ /** Include disabled agents */
3989
+ includeDisabled: z.ZodDefault<z.ZodBoolean>;
3990
+ }, "strip", z.ZodTypeAny, {
3991
+ includeDisabled: boolean;
3992
+ category?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
3993
+ }, {
3994
+ category?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
3995
+ includeDisabled?: boolean | undefined;
3996
+ }>;
3997
+ export type AgentCapabilitiesRequest = z.infer<typeof AgentCapabilitiesRequestSchema>;
3998
+ /**
3999
+ * Agent capabilities result schema
4000
+ */
4001
+ export declare const AgentCapabilitiesResultSchema: z.ZodObject<{
4002
+ /** All unique capabilities */
4003
+ capabilities: z.ZodArray<z.ZodString, "many">;
4004
+ /** Capability → agent IDs mapping */
4005
+ agentsByCapability: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
4006
+ /** Agent ID → capabilities mapping */
4007
+ capabilitiesByAgent: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
4008
+ /** Agent ID → category mapping */
4009
+ categoriesByAgent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>>>;
4010
+ }, "strip", z.ZodTypeAny, {
4011
+ capabilities: string[];
4012
+ agentsByCapability: Record<string, string[]>;
4013
+ capabilitiesByAgent: Record<string, string[]>;
4014
+ categoriesByAgent?: Record<string, "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist"> | undefined;
4015
+ }, {
4016
+ capabilities: string[];
4017
+ agentsByCapability: Record<string, string[]>;
4018
+ capabilitiesByAgent: Record<string, string[]>;
4019
+ categoriesByAgent?: Record<string, "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist"> | undefined;
4020
+ }>;
4021
+ export type AgentCapabilitiesResult = z.infer<typeof AgentCapabilitiesResultSchema>;
4022
+ /**
4023
+ * Agent selection context for the selector
4024
+ */
4025
+ export declare const AgentSelectionContextSchema: z.ZodObject<{
4026
+ team: z.ZodOptional<z.ZodString>;
4027
+ requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4028
+ excludeAgents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4029
+ }, "strip", z.ZodTypeAny, {
4030
+ team?: string | undefined;
4031
+ requiredCapabilities?: string[] | undefined;
4032
+ excludeAgents?: string[] | undefined;
4033
+ }, {
4034
+ team?: string | undefined;
4035
+ requiredCapabilities?: string[] | undefined;
4036
+ excludeAgents?: string[] | undefined;
4037
+ }>;
4038
+ export type AgentSelectionContext = z.infer<typeof AgentSelectionContextSchema>;
4039
+ /**
4040
+ * Validates agent recommendation request
4041
+ */
4042
+ export declare function validateAgentRecommendRequest(data: unknown): AgentRecommendRequest;
4043
+ /**
4044
+ * Validates agent recommendation result
4045
+ */
4046
+ export declare function validateAgentRecommendResult(data: unknown): AgentRecommendResult;
4047
+ /**
4048
+ * Validates agent capabilities request
4049
+ */
4050
+ export declare function validateAgentCapabilitiesRequest(data: unknown): AgentCapabilitiesRequest;
4051
+ /**
4052
+ * Validates agent capabilities result
4053
+ */
4054
+ export declare function validateAgentCapabilitiesResult(data: unknown): AgentCapabilitiesResult;
4055
+ //# sourceMappingURL=schema.d.ts.map