@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,1284 @@
1
+ /**
2
+ * Review Domain Contracts v1
3
+ *
4
+ * Schemas for AI-powered code review with focused analysis modes.
5
+ *
6
+ * Invariants:
7
+ * - INV-REV-001: Focus Mode Isolation
8
+ * - INV-REV-002: Confidence Filtering
9
+ * - INV-REV-003: Explanation Required
10
+ * - INV-REV-004: Actionable Suggestions
11
+ * - INV-REV-OPS-001: Timeout Handling
12
+ * - INV-REV-OPS-002: Provider Fallback
13
+ * - INV-REV-OUT-001: Severity Ordering
14
+ * - INV-REV-OUT-002: Health Score Calculation
15
+ * - INV-REV-OUT-003: SARIF Compliance
16
+ */
17
+ import { z } from 'zod';
18
+ /**
19
+ * Review focus modes - each mode provides specialized analysis
20
+ * INV-REV-001: Each focus mode MUST only report issues relevant to that focus
21
+ */
22
+ export declare const ReviewFocusSchema: z.ZodEnum<["security", "architecture", "performance", "maintainability", "correctness", "all"]>;
23
+ export type ReviewFocus = z.infer<typeof ReviewFocusSchema>;
24
+ /**
25
+ * Review request schema
26
+ */
27
+ export declare const ReviewRequestSchema: z.ZodObject<{
28
+ /** Unique request ID */
29
+ requestId: z.ZodString;
30
+ /** Paths to review (files or directories) */
31
+ paths: z.ZodArray<z.ZodString, "many">;
32
+ /** Focus mode for specialized review */
33
+ focus: z.ZodDefault<z.ZodEnum<["security", "architecture", "performance", "maintainability", "correctness", "all"]>>;
34
+ /** Additional context for the reviewer */
35
+ context: z.ZodOptional<z.ZodString>;
36
+ /** Minimum confidence threshold (0-1) - INV-REV-002 */
37
+ minConfidence: z.ZodDefault<z.ZodNumber>;
38
+ /** Maximum files to analyze */
39
+ maxFiles: z.ZodDefault<z.ZodNumber>;
40
+ /** Maximum lines per file */
41
+ maxLinesPerFile: z.ZodDefault<z.ZodNumber>;
42
+ /** Provider to use (optional, uses default routing) */
43
+ providerId: z.ZodOptional<z.ZodString>;
44
+ /** Timeout in milliseconds - INV-REV-OPS-001 */
45
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
46
+ /** Output format */
47
+ outputFormat: z.ZodDefault<z.ZodEnum<["markdown", "json", "sarif"]>>;
48
+ /** Dry run - only show what would be analyzed */
49
+ dryRun: z.ZodDefault<z.ZodBoolean>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ requestId: string;
52
+ timeoutMs: number;
53
+ paths: string[];
54
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
55
+ minConfidence: number;
56
+ maxFiles: number;
57
+ maxLinesPerFile: number;
58
+ outputFormat: "markdown" | "json" | "sarif";
59
+ dryRun: boolean;
60
+ context?: string | undefined;
61
+ providerId?: string | undefined;
62
+ }, {
63
+ requestId: string;
64
+ paths: string[];
65
+ context?: string | undefined;
66
+ timeoutMs?: number | undefined;
67
+ providerId?: string | undefined;
68
+ focus?: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness" | undefined;
69
+ minConfidence?: number | undefined;
70
+ maxFiles?: number | undefined;
71
+ maxLinesPerFile?: number | undefined;
72
+ outputFormat?: "markdown" | "json" | "sarif" | undefined;
73
+ dryRun?: boolean | undefined;
74
+ }>;
75
+ export type ReviewRequest = z.infer<typeof ReviewRequestSchema>;
76
+ /**
77
+ * Review comment severity levels
78
+ * INV-REV-OUT-001: Comments MUST be ordered by severity (critical first)
79
+ */
80
+ export declare const ReviewCommentSeveritySchema: z.ZodEnum<["critical", "warning", "suggestion", "note"]>;
81
+ export type ReviewCommentSeverity = z.infer<typeof ReviewCommentSeveritySchema>;
82
+ /**
83
+ * Review comment schema
84
+ * INV-REV-003: Every comment MUST include rationale (body field)
85
+ * INV-REV-004: Comments with severity >= warning MUST include suggestion
86
+ */
87
+ export declare const ReviewCommentSchema: z.ZodObject<{
88
+ /** Unique comment ID */
89
+ commentId: z.ZodString;
90
+ /** File path */
91
+ file: z.ZodString;
92
+ /** Starting line number */
93
+ line: z.ZodNumber;
94
+ /** Ending line number (for multi-line comments) */
95
+ lineEnd: z.ZodOptional<z.ZodNumber>;
96
+ /** Comment severity */
97
+ severity: z.ZodEnum<["critical", "warning", "suggestion", "note"]>;
98
+ /** Short title (max 100 chars) */
99
+ title: z.ZodString;
100
+ /** Detailed explanation (markdown supported) - Required per INV-REV-003 */
101
+ body: z.ZodString;
102
+ /** Why this matters */
103
+ rationale: z.ZodOptional<z.ZodString>;
104
+ /** Suggested fix or improvement - Required for critical/warning per INV-REV-004 */
105
+ suggestion: z.ZodOptional<z.ZodString>;
106
+ /** Code snippet showing the fix */
107
+ suggestedCode: z.ZodOptional<z.ZodString>;
108
+ /** Review focus that triggered this */
109
+ focus: z.ZodEnum<["security", "architecture", "performance", "maintainability", "correctness", "all"]>;
110
+ /** Confidence score (0-1) - INV-REV-002 */
111
+ confidence: z.ZodNumber;
112
+ /** Category tag */
113
+ category: z.ZodString;
114
+ }, "strip", z.ZodTypeAny, {
115
+ severity: "critical" | "suggestion" | "warning" | "note";
116
+ category: string;
117
+ title: string;
118
+ confidence: number;
119
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
120
+ commentId: string;
121
+ file: string;
122
+ line: number;
123
+ body: string;
124
+ suggestion?: string | undefined;
125
+ lineEnd?: number | undefined;
126
+ rationale?: string | undefined;
127
+ suggestedCode?: string | undefined;
128
+ }, {
129
+ severity: "critical" | "suggestion" | "warning" | "note";
130
+ category: string;
131
+ title: string;
132
+ confidence: number;
133
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
134
+ commentId: string;
135
+ file: string;
136
+ line: number;
137
+ body: string;
138
+ suggestion?: string | undefined;
139
+ lineEnd?: number | undefined;
140
+ rationale?: string | undefined;
141
+ suggestedCode?: string | undefined;
142
+ }>;
143
+ export type ReviewComment = z.infer<typeof ReviewCommentSchema>;
144
+ /**
145
+ * Review summary statistics
146
+ * INV-REV-OUT-002: Health score MUST reflect weighted severity counts
147
+ */
148
+ export declare const ReviewSummarySchema: z.ZodObject<{
149
+ /** Total comments by severity */
150
+ bySeverity: z.ZodObject<{
151
+ critical: z.ZodNumber;
152
+ warning: z.ZodNumber;
153
+ suggestion: z.ZodNumber;
154
+ note: z.ZodNumber;
155
+ }, "strip", z.ZodTypeAny, {
156
+ critical: number;
157
+ suggestion: number;
158
+ warning: number;
159
+ note: number;
160
+ }, {
161
+ critical: number;
162
+ suggestion: number;
163
+ warning: number;
164
+ note: number;
165
+ }>;
166
+ /** Total comments by focus */
167
+ byFocus: z.ZodRecord<z.ZodString, z.ZodNumber>;
168
+ /** Files with most issues */
169
+ hotspots: z.ZodArray<z.ZodObject<{
170
+ file: z.ZodString;
171
+ commentCount: z.ZodNumber;
172
+ }, "strip", z.ZodTypeAny, {
173
+ file: string;
174
+ commentCount: number;
175
+ }, {
176
+ file: string;
177
+ commentCount: number;
178
+ }>, "many">;
179
+ /** Overall health score (0-100) - Calculated per INV-REV-OUT-002 */
180
+ healthScore: z.ZodNumber;
181
+ /** One-line verdict */
182
+ verdict: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ bySeverity: {
185
+ critical: number;
186
+ suggestion: number;
187
+ warning: number;
188
+ note: number;
189
+ };
190
+ byFocus: Record<string, number>;
191
+ hotspots: {
192
+ file: string;
193
+ commentCount: number;
194
+ }[];
195
+ healthScore: number;
196
+ verdict: string;
197
+ }, {
198
+ bySeverity: {
199
+ critical: number;
200
+ suggestion: number;
201
+ warning: number;
202
+ note: number;
203
+ };
204
+ byFocus: Record<string, number>;
205
+ hotspots: {
206
+ file: string;
207
+ commentCount: number;
208
+ }[];
209
+ healthScore: number;
210
+ verdict: string;
211
+ }>;
212
+ export type ReviewSummary = z.infer<typeof ReviewSummarySchema>;
213
+ /**
214
+ * Review result schema
215
+ */
216
+ export declare const ReviewResultSchema: z.ZodObject<{
217
+ /** Unique result ID */
218
+ resultId: z.ZodString;
219
+ /** Original request ID */
220
+ requestId: z.ZodString;
221
+ /** Review comments - ordered by severity per INV-REV-OUT-001 */
222
+ comments: z.ZodArray<z.ZodObject<{
223
+ /** Unique comment ID */
224
+ commentId: z.ZodString;
225
+ /** File path */
226
+ file: z.ZodString;
227
+ /** Starting line number */
228
+ line: z.ZodNumber;
229
+ /** Ending line number (for multi-line comments) */
230
+ lineEnd: z.ZodOptional<z.ZodNumber>;
231
+ /** Comment severity */
232
+ severity: z.ZodEnum<["critical", "warning", "suggestion", "note"]>;
233
+ /** Short title (max 100 chars) */
234
+ title: z.ZodString;
235
+ /** Detailed explanation (markdown supported) - Required per INV-REV-003 */
236
+ body: z.ZodString;
237
+ /** Why this matters */
238
+ rationale: z.ZodOptional<z.ZodString>;
239
+ /** Suggested fix or improvement - Required for critical/warning per INV-REV-004 */
240
+ suggestion: z.ZodOptional<z.ZodString>;
241
+ /** Code snippet showing the fix */
242
+ suggestedCode: z.ZodOptional<z.ZodString>;
243
+ /** Review focus that triggered this */
244
+ focus: z.ZodEnum<["security", "architecture", "performance", "maintainability", "correctness", "all"]>;
245
+ /** Confidence score (0-1) - INV-REV-002 */
246
+ confidence: z.ZodNumber;
247
+ /** Category tag */
248
+ category: z.ZodString;
249
+ }, "strip", z.ZodTypeAny, {
250
+ severity: "critical" | "suggestion" | "warning" | "note";
251
+ category: string;
252
+ title: string;
253
+ confidence: number;
254
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
255
+ commentId: string;
256
+ file: string;
257
+ line: number;
258
+ body: string;
259
+ suggestion?: string | undefined;
260
+ lineEnd?: number | undefined;
261
+ rationale?: string | undefined;
262
+ suggestedCode?: string | undefined;
263
+ }, {
264
+ severity: "critical" | "suggestion" | "warning" | "note";
265
+ category: string;
266
+ title: string;
267
+ confidence: number;
268
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
269
+ commentId: string;
270
+ file: string;
271
+ line: number;
272
+ body: string;
273
+ suggestion?: string | undefined;
274
+ lineEnd?: number | undefined;
275
+ rationale?: string | undefined;
276
+ suggestedCode?: string | undefined;
277
+ }>, "many">;
278
+ /** Summary statistics */
279
+ summary: z.ZodObject<{
280
+ /** Total comments by severity */
281
+ bySeverity: z.ZodObject<{
282
+ critical: z.ZodNumber;
283
+ warning: z.ZodNumber;
284
+ suggestion: z.ZodNumber;
285
+ note: z.ZodNumber;
286
+ }, "strip", z.ZodTypeAny, {
287
+ critical: number;
288
+ suggestion: number;
289
+ warning: number;
290
+ note: number;
291
+ }, {
292
+ critical: number;
293
+ suggestion: number;
294
+ warning: number;
295
+ note: number;
296
+ }>;
297
+ /** Total comments by focus */
298
+ byFocus: z.ZodRecord<z.ZodString, z.ZodNumber>;
299
+ /** Files with most issues */
300
+ hotspots: z.ZodArray<z.ZodObject<{
301
+ file: z.ZodString;
302
+ commentCount: z.ZodNumber;
303
+ }, "strip", z.ZodTypeAny, {
304
+ file: string;
305
+ commentCount: number;
306
+ }, {
307
+ file: string;
308
+ commentCount: number;
309
+ }>, "many">;
310
+ /** Overall health score (0-100) - Calculated per INV-REV-OUT-002 */
311
+ healthScore: z.ZodNumber;
312
+ /** One-line verdict */
313
+ verdict: z.ZodString;
314
+ }, "strip", z.ZodTypeAny, {
315
+ bySeverity: {
316
+ critical: number;
317
+ suggestion: number;
318
+ warning: number;
319
+ note: number;
320
+ };
321
+ byFocus: Record<string, number>;
322
+ hotspots: {
323
+ file: string;
324
+ commentCount: number;
325
+ }[];
326
+ healthScore: number;
327
+ verdict: string;
328
+ }, {
329
+ bySeverity: {
330
+ critical: number;
331
+ suggestion: number;
332
+ warning: number;
333
+ note: number;
334
+ };
335
+ byFocus: Record<string, number>;
336
+ hotspots: {
337
+ file: string;
338
+ commentCount: number;
339
+ }[];
340
+ healthScore: number;
341
+ verdict: string;
342
+ }>;
343
+ /** Files that were reviewed */
344
+ filesReviewed: z.ZodArray<z.ZodString, "many">;
345
+ /** Total lines analyzed */
346
+ linesAnalyzed: z.ZodNumber;
347
+ /** Provider used */
348
+ providerId: z.ZodString;
349
+ /** Model used */
350
+ modelId: z.ZodString;
351
+ /** Duration in milliseconds */
352
+ durationMs: z.ZodNumber;
353
+ /** Completion timestamp */
354
+ completedAt: z.ZodString;
355
+ }, "strip", z.ZodTypeAny, {
356
+ summary: {
357
+ bySeverity: {
358
+ critical: number;
359
+ suggestion: number;
360
+ warning: number;
361
+ note: number;
362
+ };
363
+ byFocus: Record<string, number>;
364
+ hotspots: {
365
+ file: string;
366
+ commentCount: number;
367
+ }[];
368
+ healthScore: number;
369
+ verdict: string;
370
+ };
371
+ durationMs: number;
372
+ requestId: string;
373
+ completedAt: string;
374
+ providerId: string;
375
+ resultId: string;
376
+ comments: {
377
+ severity: "critical" | "suggestion" | "warning" | "note";
378
+ category: string;
379
+ title: string;
380
+ confidence: number;
381
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
382
+ commentId: string;
383
+ file: string;
384
+ line: number;
385
+ body: string;
386
+ suggestion?: string | undefined;
387
+ lineEnd?: number | undefined;
388
+ rationale?: string | undefined;
389
+ suggestedCode?: string | undefined;
390
+ }[];
391
+ filesReviewed: string[];
392
+ linesAnalyzed: number;
393
+ modelId: string;
394
+ }, {
395
+ summary: {
396
+ bySeverity: {
397
+ critical: number;
398
+ suggestion: number;
399
+ warning: number;
400
+ note: number;
401
+ };
402
+ byFocus: Record<string, number>;
403
+ hotspots: {
404
+ file: string;
405
+ commentCount: number;
406
+ }[];
407
+ healthScore: number;
408
+ verdict: string;
409
+ };
410
+ durationMs: number;
411
+ requestId: string;
412
+ completedAt: string;
413
+ providerId: string;
414
+ resultId: string;
415
+ comments: {
416
+ severity: "critical" | "suggestion" | "warning" | "note";
417
+ category: string;
418
+ title: string;
419
+ confidence: number;
420
+ focus: "performance" | "architecture" | "all" | "security" | "maintainability" | "correctness";
421
+ commentId: string;
422
+ file: string;
423
+ line: number;
424
+ body: string;
425
+ suggestion?: string | undefined;
426
+ lineEnd?: number | undefined;
427
+ rationale?: string | undefined;
428
+ suggestedCode?: string | undefined;
429
+ }[];
430
+ filesReviewed: string[];
431
+ linesAnalyzed: number;
432
+ modelId: string;
433
+ }>;
434
+ export type ReviewResult = z.infer<typeof ReviewResultSchema>;
435
+ /**
436
+ * SARIF 2.1.0 compliant rule schema
437
+ */
438
+ export declare const SarifRuleSchema: z.ZodObject<{
439
+ id: z.ZodString;
440
+ name: z.ZodOptional<z.ZodString>;
441
+ shortDescription: z.ZodOptional<z.ZodObject<{
442
+ text: z.ZodString;
443
+ }, "strip", z.ZodTypeAny, {
444
+ text: string;
445
+ }, {
446
+ text: string;
447
+ }>>;
448
+ fullDescription: z.ZodOptional<z.ZodObject<{
449
+ text: z.ZodString;
450
+ }, "strip", z.ZodTypeAny, {
451
+ text: string;
452
+ }, {
453
+ text: string;
454
+ }>>;
455
+ defaultConfiguration: z.ZodOptional<z.ZodObject<{
456
+ level: z.ZodOptional<z.ZodEnum<["error", "warning", "note", "none"]>>;
457
+ }, "strip", z.ZodTypeAny, {
458
+ level?: "error" | "none" | "warning" | "note" | undefined;
459
+ }, {
460
+ level?: "error" | "none" | "warning" | "note" | undefined;
461
+ }>>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ id: string;
464
+ name?: string | undefined;
465
+ shortDescription?: {
466
+ text: string;
467
+ } | undefined;
468
+ fullDescription?: {
469
+ text: string;
470
+ } | undefined;
471
+ defaultConfiguration?: {
472
+ level?: "error" | "none" | "warning" | "note" | undefined;
473
+ } | undefined;
474
+ }, {
475
+ id: string;
476
+ name?: string | undefined;
477
+ shortDescription?: {
478
+ text: string;
479
+ } | undefined;
480
+ fullDescription?: {
481
+ text: string;
482
+ } | undefined;
483
+ defaultConfiguration?: {
484
+ level?: "error" | "none" | "warning" | "note" | undefined;
485
+ } | undefined;
486
+ }>;
487
+ export type SarifRule = z.infer<typeof SarifRuleSchema>;
488
+ /**
489
+ * SARIF 2.1.0 compliant result location schema
490
+ */
491
+ export declare const SarifLocationSchema: z.ZodObject<{
492
+ physicalLocation: z.ZodObject<{
493
+ artifactLocation: z.ZodObject<{
494
+ uri: z.ZodString;
495
+ }, "strip", z.ZodTypeAny, {
496
+ uri: string;
497
+ }, {
498
+ uri: string;
499
+ }>;
500
+ region: z.ZodOptional<z.ZodObject<{
501
+ startLine: z.ZodNumber;
502
+ endLine: z.ZodOptional<z.ZodNumber>;
503
+ startColumn: z.ZodOptional<z.ZodNumber>;
504
+ endColumn: z.ZodOptional<z.ZodNumber>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ startLine: number;
507
+ endLine?: number | undefined;
508
+ startColumn?: number | undefined;
509
+ endColumn?: number | undefined;
510
+ }, {
511
+ startLine: number;
512
+ endLine?: number | undefined;
513
+ startColumn?: number | undefined;
514
+ endColumn?: number | undefined;
515
+ }>>;
516
+ }, "strip", z.ZodTypeAny, {
517
+ artifactLocation: {
518
+ uri: string;
519
+ };
520
+ region?: {
521
+ startLine: number;
522
+ endLine?: number | undefined;
523
+ startColumn?: number | undefined;
524
+ endColumn?: number | undefined;
525
+ } | undefined;
526
+ }, {
527
+ artifactLocation: {
528
+ uri: string;
529
+ };
530
+ region?: {
531
+ startLine: number;
532
+ endLine?: number | undefined;
533
+ startColumn?: number | undefined;
534
+ endColumn?: number | undefined;
535
+ } | undefined;
536
+ }>;
537
+ }, "strip", z.ZodTypeAny, {
538
+ physicalLocation: {
539
+ artifactLocation: {
540
+ uri: string;
541
+ };
542
+ region?: {
543
+ startLine: number;
544
+ endLine?: number | undefined;
545
+ startColumn?: number | undefined;
546
+ endColumn?: number | undefined;
547
+ } | undefined;
548
+ };
549
+ }, {
550
+ physicalLocation: {
551
+ artifactLocation: {
552
+ uri: string;
553
+ };
554
+ region?: {
555
+ startLine: number;
556
+ endLine?: number | undefined;
557
+ startColumn?: number | undefined;
558
+ endColumn?: number | undefined;
559
+ } | undefined;
560
+ };
561
+ }>;
562
+ export type SarifLocation = z.infer<typeof SarifLocationSchema>;
563
+ /**
564
+ * SARIF 2.1.0 compliant result schema
565
+ */
566
+ export declare const SarifResultSchema: z.ZodObject<{
567
+ ruleId: z.ZodString;
568
+ level: z.ZodEnum<["error", "warning", "note", "none"]>;
569
+ message: z.ZodObject<{
570
+ text: z.ZodString;
571
+ }, "strip", z.ZodTypeAny, {
572
+ text: string;
573
+ }, {
574
+ text: string;
575
+ }>;
576
+ locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
577
+ physicalLocation: z.ZodObject<{
578
+ artifactLocation: z.ZodObject<{
579
+ uri: z.ZodString;
580
+ }, "strip", z.ZodTypeAny, {
581
+ uri: string;
582
+ }, {
583
+ uri: string;
584
+ }>;
585
+ region: z.ZodOptional<z.ZodObject<{
586
+ startLine: z.ZodNumber;
587
+ endLine: z.ZodOptional<z.ZodNumber>;
588
+ startColumn: z.ZodOptional<z.ZodNumber>;
589
+ endColumn: z.ZodOptional<z.ZodNumber>;
590
+ }, "strip", z.ZodTypeAny, {
591
+ startLine: number;
592
+ endLine?: number | undefined;
593
+ startColumn?: number | undefined;
594
+ endColumn?: number | undefined;
595
+ }, {
596
+ startLine: number;
597
+ endLine?: number | undefined;
598
+ startColumn?: number | undefined;
599
+ endColumn?: number | undefined;
600
+ }>>;
601
+ }, "strip", z.ZodTypeAny, {
602
+ artifactLocation: {
603
+ uri: string;
604
+ };
605
+ region?: {
606
+ startLine: number;
607
+ endLine?: number | undefined;
608
+ startColumn?: number | undefined;
609
+ endColumn?: number | undefined;
610
+ } | undefined;
611
+ }, {
612
+ artifactLocation: {
613
+ uri: string;
614
+ };
615
+ region?: {
616
+ startLine: number;
617
+ endLine?: number | undefined;
618
+ startColumn?: number | undefined;
619
+ endColumn?: number | undefined;
620
+ } | undefined;
621
+ }>;
622
+ }, "strip", z.ZodTypeAny, {
623
+ physicalLocation: {
624
+ artifactLocation: {
625
+ uri: string;
626
+ };
627
+ region?: {
628
+ startLine: number;
629
+ endLine?: number | undefined;
630
+ startColumn?: number | undefined;
631
+ endColumn?: number | undefined;
632
+ } | undefined;
633
+ };
634
+ }, {
635
+ physicalLocation: {
636
+ artifactLocation: {
637
+ uri: string;
638
+ };
639
+ region?: {
640
+ startLine: number;
641
+ endLine?: number | undefined;
642
+ startColumn?: number | undefined;
643
+ endColumn?: number | undefined;
644
+ } | undefined;
645
+ };
646
+ }>, "many">>;
647
+ fixes: z.ZodOptional<z.ZodArray<z.ZodObject<{
648
+ description: z.ZodObject<{
649
+ text: z.ZodString;
650
+ }, "strip", z.ZodTypeAny, {
651
+ text: string;
652
+ }, {
653
+ text: string;
654
+ }>;
655
+ artifactChanges: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
656
+ }, "strip", z.ZodTypeAny, {
657
+ description: {
658
+ text: string;
659
+ };
660
+ artifactChanges?: unknown[] | undefined;
661
+ }, {
662
+ description: {
663
+ text: string;
664
+ };
665
+ artifactChanges?: unknown[] | undefined;
666
+ }>, "many">>;
667
+ }, "strip", z.ZodTypeAny, {
668
+ message: {
669
+ text: string;
670
+ };
671
+ level: "error" | "none" | "warning" | "note";
672
+ ruleId: string;
673
+ locations?: {
674
+ physicalLocation: {
675
+ artifactLocation: {
676
+ uri: string;
677
+ };
678
+ region?: {
679
+ startLine: number;
680
+ endLine?: number | undefined;
681
+ startColumn?: number | undefined;
682
+ endColumn?: number | undefined;
683
+ } | undefined;
684
+ };
685
+ }[] | undefined;
686
+ fixes?: {
687
+ description: {
688
+ text: string;
689
+ };
690
+ artifactChanges?: unknown[] | undefined;
691
+ }[] | undefined;
692
+ }, {
693
+ message: {
694
+ text: string;
695
+ };
696
+ level: "error" | "none" | "warning" | "note";
697
+ ruleId: string;
698
+ locations?: {
699
+ physicalLocation: {
700
+ artifactLocation: {
701
+ uri: string;
702
+ };
703
+ region?: {
704
+ startLine: number;
705
+ endLine?: number | undefined;
706
+ startColumn?: number | undefined;
707
+ endColumn?: number | undefined;
708
+ } | undefined;
709
+ };
710
+ }[] | undefined;
711
+ fixes?: {
712
+ description: {
713
+ text: string;
714
+ };
715
+ artifactChanges?: unknown[] | undefined;
716
+ }[] | undefined;
717
+ }>;
718
+ export type SarifResult = z.infer<typeof SarifResultSchema>;
719
+ /**
720
+ * SARIF 2.1.0 compliant output schema
721
+ * INV-REV-OUT-003: MUST comply with SARIF 2.1.0 schema
722
+ */
723
+ export declare const SarifOutputSchema: z.ZodObject<{
724
+ $schema: z.ZodLiteral<"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json">;
725
+ version: z.ZodLiteral<"2.1.0">;
726
+ runs: z.ZodArray<z.ZodObject<{
727
+ tool: z.ZodObject<{
728
+ driver: z.ZodObject<{
729
+ name: z.ZodString;
730
+ version: z.ZodString;
731
+ informationUri: z.ZodOptional<z.ZodString>;
732
+ rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
733
+ id: z.ZodString;
734
+ name: z.ZodOptional<z.ZodString>;
735
+ shortDescription: z.ZodOptional<z.ZodObject<{
736
+ text: z.ZodString;
737
+ }, "strip", z.ZodTypeAny, {
738
+ text: string;
739
+ }, {
740
+ text: string;
741
+ }>>;
742
+ fullDescription: z.ZodOptional<z.ZodObject<{
743
+ text: z.ZodString;
744
+ }, "strip", z.ZodTypeAny, {
745
+ text: string;
746
+ }, {
747
+ text: string;
748
+ }>>;
749
+ defaultConfiguration: z.ZodOptional<z.ZodObject<{
750
+ level: z.ZodOptional<z.ZodEnum<["error", "warning", "note", "none"]>>;
751
+ }, "strip", z.ZodTypeAny, {
752
+ level?: "error" | "none" | "warning" | "note" | undefined;
753
+ }, {
754
+ level?: "error" | "none" | "warning" | "note" | undefined;
755
+ }>>;
756
+ }, "strip", z.ZodTypeAny, {
757
+ id: string;
758
+ name?: string | undefined;
759
+ shortDescription?: {
760
+ text: string;
761
+ } | undefined;
762
+ fullDescription?: {
763
+ text: string;
764
+ } | undefined;
765
+ defaultConfiguration?: {
766
+ level?: "error" | "none" | "warning" | "note" | undefined;
767
+ } | undefined;
768
+ }, {
769
+ id: string;
770
+ name?: string | undefined;
771
+ shortDescription?: {
772
+ text: string;
773
+ } | undefined;
774
+ fullDescription?: {
775
+ text: string;
776
+ } | undefined;
777
+ defaultConfiguration?: {
778
+ level?: "error" | "none" | "warning" | "note" | undefined;
779
+ } | undefined;
780
+ }>, "many">>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ name: string;
783
+ version: string;
784
+ informationUri?: string | undefined;
785
+ rules?: {
786
+ id: string;
787
+ name?: string | undefined;
788
+ shortDescription?: {
789
+ text: string;
790
+ } | undefined;
791
+ fullDescription?: {
792
+ text: string;
793
+ } | undefined;
794
+ defaultConfiguration?: {
795
+ level?: "error" | "none" | "warning" | "note" | undefined;
796
+ } | undefined;
797
+ }[] | undefined;
798
+ }, {
799
+ name: string;
800
+ version: string;
801
+ informationUri?: string | undefined;
802
+ rules?: {
803
+ id: string;
804
+ name?: string | undefined;
805
+ shortDescription?: {
806
+ text: string;
807
+ } | undefined;
808
+ fullDescription?: {
809
+ text: string;
810
+ } | undefined;
811
+ defaultConfiguration?: {
812
+ level?: "error" | "none" | "warning" | "note" | undefined;
813
+ } | undefined;
814
+ }[] | undefined;
815
+ }>;
816
+ }, "strip", z.ZodTypeAny, {
817
+ driver: {
818
+ name: string;
819
+ version: string;
820
+ informationUri?: string | undefined;
821
+ rules?: {
822
+ id: string;
823
+ name?: string | undefined;
824
+ shortDescription?: {
825
+ text: string;
826
+ } | undefined;
827
+ fullDescription?: {
828
+ text: string;
829
+ } | undefined;
830
+ defaultConfiguration?: {
831
+ level?: "error" | "none" | "warning" | "note" | undefined;
832
+ } | undefined;
833
+ }[] | undefined;
834
+ };
835
+ }, {
836
+ driver: {
837
+ name: string;
838
+ version: string;
839
+ informationUri?: string | undefined;
840
+ rules?: {
841
+ id: string;
842
+ name?: string | undefined;
843
+ shortDescription?: {
844
+ text: string;
845
+ } | undefined;
846
+ fullDescription?: {
847
+ text: string;
848
+ } | undefined;
849
+ defaultConfiguration?: {
850
+ level?: "error" | "none" | "warning" | "note" | undefined;
851
+ } | undefined;
852
+ }[] | undefined;
853
+ };
854
+ }>;
855
+ results: z.ZodArray<z.ZodObject<{
856
+ ruleId: z.ZodString;
857
+ level: z.ZodEnum<["error", "warning", "note", "none"]>;
858
+ message: z.ZodObject<{
859
+ text: z.ZodString;
860
+ }, "strip", z.ZodTypeAny, {
861
+ text: string;
862
+ }, {
863
+ text: string;
864
+ }>;
865
+ locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
866
+ physicalLocation: z.ZodObject<{
867
+ artifactLocation: z.ZodObject<{
868
+ uri: z.ZodString;
869
+ }, "strip", z.ZodTypeAny, {
870
+ uri: string;
871
+ }, {
872
+ uri: string;
873
+ }>;
874
+ region: z.ZodOptional<z.ZodObject<{
875
+ startLine: z.ZodNumber;
876
+ endLine: z.ZodOptional<z.ZodNumber>;
877
+ startColumn: z.ZodOptional<z.ZodNumber>;
878
+ endColumn: z.ZodOptional<z.ZodNumber>;
879
+ }, "strip", z.ZodTypeAny, {
880
+ startLine: number;
881
+ endLine?: number | undefined;
882
+ startColumn?: number | undefined;
883
+ endColumn?: number | undefined;
884
+ }, {
885
+ startLine: number;
886
+ endLine?: number | undefined;
887
+ startColumn?: number | undefined;
888
+ endColumn?: number | undefined;
889
+ }>>;
890
+ }, "strip", z.ZodTypeAny, {
891
+ artifactLocation: {
892
+ uri: string;
893
+ };
894
+ region?: {
895
+ startLine: number;
896
+ endLine?: number | undefined;
897
+ startColumn?: number | undefined;
898
+ endColumn?: number | undefined;
899
+ } | undefined;
900
+ }, {
901
+ artifactLocation: {
902
+ uri: string;
903
+ };
904
+ region?: {
905
+ startLine: number;
906
+ endLine?: number | undefined;
907
+ startColumn?: number | undefined;
908
+ endColumn?: number | undefined;
909
+ } | undefined;
910
+ }>;
911
+ }, "strip", z.ZodTypeAny, {
912
+ physicalLocation: {
913
+ artifactLocation: {
914
+ uri: string;
915
+ };
916
+ region?: {
917
+ startLine: number;
918
+ endLine?: number | undefined;
919
+ startColumn?: number | undefined;
920
+ endColumn?: number | undefined;
921
+ } | undefined;
922
+ };
923
+ }, {
924
+ physicalLocation: {
925
+ artifactLocation: {
926
+ uri: string;
927
+ };
928
+ region?: {
929
+ startLine: number;
930
+ endLine?: number | undefined;
931
+ startColumn?: number | undefined;
932
+ endColumn?: number | undefined;
933
+ } | undefined;
934
+ };
935
+ }>, "many">>;
936
+ fixes: z.ZodOptional<z.ZodArray<z.ZodObject<{
937
+ description: z.ZodObject<{
938
+ text: z.ZodString;
939
+ }, "strip", z.ZodTypeAny, {
940
+ text: string;
941
+ }, {
942
+ text: string;
943
+ }>;
944
+ artifactChanges: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
945
+ }, "strip", z.ZodTypeAny, {
946
+ description: {
947
+ text: string;
948
+ };
949
+ artifactChanges?: unknown[] | undefined;
950
+ }, {
951
+ description: {
952
+ text: string;
953
+ };
954
+ artifactChanges?: unknown[] | undefined;
955
+ }>, "many">>;
956
+ }, "strip", z.ZodTypeAny, {
957
+ message: {
958
+ text: string;
959
+ };
960
+ level: "error" | "none" | "warning" | "note";
961
+ ruleId: string;
962
+ locations?: {
963
+ physicalLocation: {
964
+ artifactLocation: {
965
+ uri: string;
966
+ };
967
+ region?: {
968
+ startLine: number;
969
+ endLine?: number | undefined;
970
+ startColumn?: number | undefined;
971
+ endColumn?: number | undefined;
972
+ } | undefined;
973
+ };
974
+ }[] | undefined;
975
+ fixes?: {
976
+ description: {
977
+ text: string;
978
+ };
979
+ artifactChanges?: unknown[] | undefined;
980
+ }[] | undefined;
981
+ }, {
982
+ message: {
983
+ text: string;
984
+ };
985
+ level: "error" | "none" | "warning" | "note";
986
+ ruleId: string;
987
+ locations?: {
988
+ physicalLocation: {
989
+ artifactLocation: {
990
+ uri: string;
991
+ };
992
+ region?: {
993
+ startLine: number;
994
+ endLine?: number | undefined;
995
+ startColumn?: number | undefined;
996
+ endColumn?: number | undefined;
997
+ } | undefined;
998
+ };
999
+ }[] | undefined;
1000
+ fixes?: {
1001
+ description: {
1002
+ text: string;
1003
+ };
1004
+ artifactChanges?: unknown[] | undefined;
1005
+ }[] | undefined;
1006
+ }>, "many">;
1007
+ }, "strip", z.ZodTypeAny, {
1008
+ tool: {
1009
+ driver: {
1010
+ name: string;
1011
+ version: string;
1012
+ informationUri?: string | undefined;
1013
+ rules?: {
1014
+ id: string;
1015
+ name?: string | undefined;
1016
+ shortDescription?: {
1017
+ text: string;
1018
+ } | undefined;
1019
+ fullDescription?: {
1020
+ text: string;
1021
+ } | undefined;
1022
+ defaultConfiguration?: {
1023
+ level?: "error" | "none" | "warning" | "note" | undefined;
1024
+ } | undefined;
1025
+ }[] | undefined;
1026
+ };
1027
+ };
1028
+ results: {
1029
+ message: {
1030
+ text: string;
1031
+ };
1032
+ level: "error" | "none" | "warning" | "note";
1033
+ ruleId: string;
1034
+ locations?: {
1035
+ physicalLocation: {
1036
+ artifactLocation: {
1037
+ uri: string;
1038
+ };
1039
+ region?: {
1040
+ startLine: number;
1041
+ endLine?: number | undefined;
1042
+ startColumn?: number | undefined;
1043
+ endColumn?: number | undefined;
1044
+ } | undefined;
1045
+ };
1046
+ }[] | undefined;
1047
+ fixes?: {
1048
+ description: {
1049
+ text: string;
1050
+ };
1051
+ artifactChanges?: unknown[] | undefined;
1052
+ }[] | undefined;
1053
+ }[];
1054
+ }, {
1055
+ tool: {
1056
+ driver: {
1057
+ name: string;
1058
+ version: string;
1059
+ informationUri?: string | undefined;
1060
+ rules?: {
1061
+ id: string;
1062
+ name?: string | undefined;
1063
+ shortDescription?: {
1064
+ text: string;
1065
+ } | undefined;
1066
+ fullDescription?: {
1067
+ text: string;
1068
+ } | undefined;
1069
+ defaultConfiguration?: {
1070
+ level?: "error" | "none" | "warning" | "note" | undefined;
1071
+ } | undefined;
1072
+ }[] | undefined;
1073
+ };
1074
+ };
1075
+ results: {
1076
+ message: {
1077
+ text: string;
1078
+ };
1079
+ level: "error" | "none" | "warning" | "note";
1080
+ ruleId: string;
1081
+ locations?: {
1082
+ physicalLocation: {
1083
+ artifactLocation: {
1084
+ uri: string;
1085
+ };
1086
+ region?: {
1087
+ startLine: number;
1088
+ endLine?: number | undefined;
1089
+ startColumn?: number | undefined;
1090
+ endColumn?: number | undefined;
1091
+ } | undefined;
1092
+ };
1093
+ }[] | undefined;
1094
+ fixes?: {
1095
+ description: {
1096
+ text: string;
1097
+ };
1098
+ artifactChanges?: unknown[] | undefined;
1099
+ }[] | undefined;
1100
+ }[];
1101
+ }>, "many">;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ version: "2.1.0";
1104
+ $schema: "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json";
1105
+ runs: {
1106
+ tool: {
1107
+ driver: {
1108
+ name: string;
1109
+ version: string;
1110
+ informationUri?: string | undefined;
1111
+ rules?: {
1112
+ id: string;
1113
+ name?: string | undefined;
1114
+ shortDescription?: {
1115
+ text: string;
1116
+ } | undefined;
1117
+ fullDescription?: {
1118
+ text: string;
1119
+ } | undefined;
1120
+ defaultConfiguration?: {
1121
+ level?: "error" | "none" | "warning" | "note" | undefined;
1122
+ } | undefined;
1123
+ }[] | undefined;
1124
+ };
1125
+ };
1126
+ results: {
1127
+ message: {
1128
+ text: string;
1129
+ };
1130
+ level: "error" | "none" | "warning" | "note";
1131
+ ruleId: string;
1132
+ locations?: {
1133
+ physicalLocation: {
1134
+ artifactLocation: {
1135
+ uri: string;
1136
+ };
1137
+ region?: {
1138
+ startLine: number;
1139
+ endLine?: number | undefined;
1140
+ startColumn?: number | undefined;
1141
+ endColumn?: number | undefined;
1142
+ } | undefined;
1143
+ };
1144
+ }[] | undefined;
1145
+ fixes?: {
1146
+ description: {
1147
+ text: string;
1148
+ };
1149
+ artifactChanges?: unknown[] | undefined;
1150
+ }[] | undefined;
1151
+ }[];
1152
+ }[];
1153
+ }, {
1154
+ version: "2.1.0";
1155
+ $schema: "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json";
1156
+ runs: {
1157
+ tool: {
1158
+ driver: {
1159
+ name: string;
1160
+ version: string;
1161
+ informationUri?: string | undefined;
1162
+ rules?: {
1163
+ id: string;
1164
+ name?: string | undefined;
1165
+ shortDescription?: {
1166
+ text: string;
1167
+ } | undefined;
1168
+ fullDescription?: {
1169
+ text: string;
1170
+ } | undefined;
1171
+ defaultConfiguration?: {
1172
+ level?: "error" | "none" | "warning" | "note" | undefined;
1173
+ } | undefined;
1174
+ }[] | undefined;
1175
+ };
1176
+ };
1177
+ results: {
1178
+ message: {
1179
+ text: string;
1180
+ };
1181
+ level: "error" | "none" | "warning" | "note";
1182
+ ruleId: string;
1183
+ locations?: {
1184
+ physicalLocation: {
1185
+ artifactLocation: {
1186
+ uri: string;
1187
+ };
1188
+ region?: {
1189
+ startLine: number;
1190
+ endLine?: number | undefined;
1191
+ startColumn?: number | undefined;
1192
+ endColumn?: number | undefined;
1193
+ } | undefined;
1194
+ };
1195
+ }[] | undefined;
1196
+ fixes?: {
1197
+ description: {
1198
+ text: string;
1199
+ };
1200
+ artifactChanges?: unknown[] | undefined;
1201
+ }[] | undefined;
1202
+ }[];
1203
+ }[];
1204
+ }>;
1205
+ export type SarifOutput = z.infer<typeof SarifOutputSchema>;
1206
+ export declare const ReviewErrorCode: {
1207
+ readonly INVALID_INPUT: "INVALID_INPUT";
1208
+ readonly REVIEW_FAILED: "REVIEW_FAILED";
1209
+ readonly TIMEOUT: "TIMEOUT";
1210
+ readonly PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
1211
+ readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
1212
+ readonly PARSE_ERROR: "PARSE_ERROR";
1213
+ readonly INVALID_PATH: "INVALID_PATH";
1214
+ readonly NO_FILES_FOUND: "NO_FILES_FOUND";
1215
+ };
1216
+ export type ReviewErrorCode = (typeof ReviewErrorCode)[keyof typeof ReviewErrorCode];
1217
+ /**
1218
+ * Validates a review request
1219
+ */
1220
+ export declare function validateReviewRequest(data: unknown): ReviewRequest;
1221
+ /**
1222
+ * Safe validation for review request
1223
+ */
1224
+ export declare function safeValidateReviewRequest(data: unknown): {
1225
+ success: true;
1226
+ data: ReviewRequest;
1227
+ } | {
1228
+ success: false;
1229
+ error: z.ZodError;
1230
+ };
1231
+ /**
1232
+ * Validates a review result
1233
+ */
1234
+ export declare function validateReviewResult(data: unknown): ReviewResult;
1235
+ /**
1236
+ * Safe validation for review result
1237
+ */
1238
+ export declare function safeValidateReviewResult(data: unknown): {
1239
+ success: true;
1240
+ data: ReviewResult;
1241
+ } | {
1242
+ success: false;
1243
+ error: z.ZodError;
1244
+ };
1245
+ /**
1246
+ * Validates a review comment
1247
+ */
1248
+ export declare function validateReviewComment(data: unknown): ReviewComment;
1249
+ /**
1250
+ * Validates SARIF output
1251
+ */
1252
+ export declare function validateSarifOutput(data: unknown): SarifOutput;
1253
+ /**
1254
+ * Calculate health score from severity counts
1255
+ * Formula: 100 - (critical*25 + warning*10 + suggestion*2)
1256
+ * Clamped to 0-100 range
1257
+ * INV-REV-OUT-002: Health score MUST reflect weighted severity counts
1258
+ */
1259
+ export declare function calculateHealthScore(critical: number, warning: number, suggestion: number): number;
1260
+ /**
1261
+ * Severity ordering for sorting comments
1262
+ * INV-REV-OUT-001: Comments MUST be ordered by severity (critical first)
1263
+ */
1264
+ export declare const SEVERITY_ORDER: Record<ReviewCommentSeverity, number>;
1265
+ /**
1266
+ * Compare function for sorting comments by severity
1267
+ * Primary: severity (critical first)
1268
+ * Secondary: confidence (descending)
1269
+ * Tertiary: file path (alphabetical)
1270
+ */
1271
+ export declare function compareCommentsBySeverity(a: ReviewComment, b: ReviewComment): number;
1272
+ /**
1273
+ * Sort comments according to INV-REV-OUT-001
1274
+ */
1275
+ export declare function sortCommentsBySeverity(comments: ReviewComment[]): ReviewComment[];
1276
+ /**
1277
+ * Creates an empty review summary
1278
+ */
1279
+ export declare function createEmptyReviewSummary(): ReviewSummary;
1280
+ /**
1281
+ * Creates a review summary from comments
1282
+ */
1283
+ export declare function createReviewSummary(comments: ReviewComment[]): ReviewSummary;
1284
+ //# sourceMappingURL=schema.d.ts.map