@trigger.dev/core 4.5.16 → 4.6.0

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 (307) hide show
  1. package/dist/commonjs/schemas/eventFilter.d.ts +27 -105
  2. package/dist/commonjs/schemas/eventFilter.js +38 -38
  3. package/dist/commonjs/schemas/eventFilter.js.map +1 -1
  4. package/dist/commonjs/schemas/json.d.ts +3 -3
  5. package/dist/commonjs/schemas/json.js +20 -12
  6. package/dist/commonjs/schemas/json.js.map +1 -1
  7. package/dist/commonjs/v3/apiClient/core.d.ts +14 -14
  8. package/dist/commonjs/v3/apiClient/core.js +39 -18
  9. package/dist/commonjs/v3/apiClient/core.js.map +1 -1
  10. package/dist/commonjs/v3/apiClient/encodeTaskIdForPath.d.ts +6 -0
  11. package/dist/commonjs/v3/apiClient/encodeTaskIdForPath.js +20 -0
  12. package/dist/commonjs/v3/apiClient/encodeTaskIdForPath.js.map +1 -0
  13. package/dist/commonjs/v3/apiClient/index.d.ts +82 -184
  14. package/dist/commonjs/v3/apiClient/index.js +27 -8
  15. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  16. package/dist/commonjs/v3/apiClient/stream.d.ts +4 -4
  17. package/dist/commonjs/v3/apiClient/stream.js.map +1 -1
  18. package/dist/commonjs/v3/errors.d.ts +5 -4
  19. package/dist/commonjs/v3/errors.js.map +1 -1
  20. package/dist/commonjs/v3/index.d.ts +1 -1
  21. package/dist/commonjs/v3/index.js.map +1 -1
  22. package/dist/commonjs/v3/realtimeStreams/sessionStreamInstance.js +3 -0
  23. package/dist/commonjs/v3/realtimeStreams/sessionStreamInstance.js.map +1 -1
  24. package/dist/commonjs/v3/realtimeStreams/streamsWriterV1.js +3 -0
  25. package/dist/commonjs/v3/realtimeStreams/streamsWriterV1.js.map +1 -1
  26. package/dist/commonjs/v3/realtimeStreams/streamsWriterV2.js +4 -0
  27. package/dist/commonjs/v3/realtimeStreams/streamsWriterV2.js.map +1 -1
  28. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +25 -114
  29. package/dist/commonjs/v3/runEngineWorker/supervisor/http.js +5 -12
  30. package/dist/commonjs/v3/runEngineWorker/supervisor/http.js.map +1 -1
  31. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +594 -4187
  32. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.js +84 -67
  33. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.js.map +1 -1
  34. package/dist/commonjs/v3/runEngineWorker/supervisor/types.d.ts +2 -0
  35. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +15 -110
  36. package/dist/commonjs/v3/runEngineWorker/workload/http.js +8 -16
  37. package/dist/commonjs/v3/runEngineWorker/workload/http.js.map +1 -1
  38. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +465 -3624
  39. package/dist/commonjs/v3/runEngineWorker/workload/schemas.js +10 -9
  40. package/dist/commonjs/v3/runEngineWorker/workload/schemas.js.map +1 -1
  41. package/dist/commonjs/v3/schemas/api.d.ts +1869 -12681
  42. package/dist/commonjs/v3/schemas/api.js +1023 -943
  43. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  44. package/dist/commonjs/v3/schemas/build.d.ts +645 -9115
  45. package/dist/commonjs/v3/schemas/build.js +71 -71
  46. package/dist/commonjs/v3/schemas/build.js.map +1 -1
  47. package/dist/commonjs/v3/schemas/checkpoints.d.ts +121 -461
  48. package/dist/commonjs/v3/schemas/checkpoints.js +11 -11
  49. package/dist/commonjs/v3/schemas/checkpoints.js.map +1 -1
  50. package/dist/commonjs/v3/schemas/common.d.ts +1018 -6499
  51. package/dist/commonjs/v3/schemas/common.js +225 -218
  52. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  53. package/dist/commonjs/v3/schemas/config.d.ts +3 -9
  54. package/dist/commonjs/v3/schemas/config.js +4 -4
  55. package/dist/commonjs/v3/schemas/config.js.map +1 -1
  56. package/dist/commonjs/v3/schemas/errors.d.ts +42 -173
  57. package/dist/commonjs/v3/schemas/errors.js +44 -44
  58. package/dist/commonjs/v3/schemas/errors.js.map +1 -1
  59. package/dist/commonjs/v3/schemas/eventFilter.d.ts +23 -91
  60. package/dist/commonjs/v3/schemas/eventFilter.js +35 -35
  61. package/dist/commonjs/v3/schemas/eventFilter.js.map +1 -1
  62. package/dist/commonjs/v3/schemas/fetch.d.ts +119 -415
  63. package/dist/commonjs/v3/schemas/fetch.js +17 -14
  64. package/dist/commonjs/v3/schemas/fetch.js.map +1 -1
  65. package/dist/commonjs/v3/schemas/messages.d.ts +603 -7438
  66. package/dist/commonjs/v3/schemas/messages.js +50 -50
  67. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  68. package/dist/commonjs/v3/schemas/openTelemetry.d.ts +50 -401
  69. package/dist/commonjs/v3/schemas/openTelemetry.js +32 -32
  70. package/dist/commonjs/v3/schemas/openTelemetry.js.map +1 -1
  71. package/dist/commonjs/v3/schemas/query.d.ts +51 -273
  72. package/dist/commonjs/v3/schemas/query.js +41 -40
  73. package/dist/commonjs/v3/schemas/query.js.map +1 -1
  74. package/dist/commonjs/v3/schemas/queues.d.ts +29 -100
  75. package/dist/commonjs/v3/schemas/queues.js +22 -22
  76. package/dist/commonjs/v3/schemas/queues.js.map +1 -1
  77. package/dist/commonjs/v3/schemas/reports.d.ts +150 -692
  78. package/dist/commonjs/v3/schemas/reports.js +55 -55
  79. package/dist/commonjs/v3/schemas/reports.js.map +1 -1
  80. package/dist/commonjs/v3/schemas/resources.d.ts +533 -5985
  81. package/dist/commonjs/v3/schemas/resources.js +49 -49
  82. package/dist/commonjs/v3/schemas/resources.js.map +1 -1
  83. package/dist/commonjs/v3/schemas/runEngine.d.ts +467 -1822
  84. package/dist/commonjs/v3/schemas/runEngine.js +113 -109
  85. package/dist/commonjs/v3/schemas/runEngine.js.map +1 -1
  86. package/dist/commonjs/v3/schemas/scheduleWindow.d.ts +2 -2
  87. package/dist/commonjs/v3/schemas/scheduleWindow.js +3 -3
  88. package/dist/commonjs/v3/schemas/scheduleWindow.js.map +1 -1
  89. package/dist/commonjs/v3/schemas/schemas.d.ts +788 -7456
  90. package/dist/commonjs/v3/schemas/schemas.js +133 -132
  91. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  92. package/dist/commonjs/v3/schemas/snapshotRoute.d.ts +33 -0
  93. package/dist/commonjs/v3/schemas/snapshotRoute.js +33 -0
  94. package/dist/commonjs/v3/schemas/snapshotRoute.js.map +1 -0
  95. package/dist/commonjs/v3/schemas/style.d.ts +24 -86
  96. package/dist/commonjs/v3/schemas/style.js +12 -12
  97. package/dist/commonjs/v3/schemas/style.js.map +1 -1
  98. package/dist/commonjs/v3/schemas/tokens.d.ts +5 -31
  99. package/dist/commonjs/v3/schemas/tokens.js +10 -10
  100. package/dist/commonjs/v3/schemas/tokens.js.map +1 -1
  101. package/dist/commonjs/v3/schemas/warmStart.d.ts +2 -8
  102. package/dist/commonjs/v3/schemas/warmStart.js +4 -4
  103. package/dist/commonjs/v3/schemas/warmStart.js.map +1 -1
  104. package/dist/commonjs/v3/schemas/webhookApi.d.ts +75 -249
  105. package/dist/commonjs/v3/schemas/webhookApi.js +41 -41
  106. package/dist/commonjs/v3/schemas/webhookApi.js.map +1 -1
  107. package/dist/commonjs/v3/schemas/webhookConfig.d.ts +473 -3309
  108. package/dist/commonjs/v3/schemas/webhookConfig.js +79 -78
  109. package/dist/commonjs/v3/schemas/webhookConfig.js.map +1 -1
  110. package/dist/commonjs/v3/schemas/webhookFilter.d.ts +16 -4
  111. package/dist/commonjs/v3/schemas/webhookFilter.js +16 -16
  112. package/dist/commonjs/v3/schemas/webhookFilter.js.map +1 -1
  113. package/dist/commonjs/v3/schemas/webhooks.d.ts +247 -2055
  114. package/dist/commonjs/v3/schemas/webhooks.js +116 -115
  115. package/dist/commonjs/v3/schemas/webhooks.js.map +1 -1
  116. package/dist/commonjs/v3/serverOnly/httpServer.d.ts +19 -8
  117. package/dist/commonjs/v3/serverOnly/httpServer.js +6 -3
  118. package/dist/commonjs/v3/serverOnly/httpServer.js.map +1 -1
  119. package/dist/commonjs/v3/sessionStreams/chatSnapshot.d.ts +163 -16
  120. package/dist/commonjs/v3/sessionStreams/chatSnapshot.js +332 -8
  121. package/dist/commonjs/v3/sessionStreams/chatSnapshot.js.map +1 -1
  122. package/dist/commonjs/v3/sessionStreams/router.d.ts +39 -1
  123. package/dist/commonjs/v3/sessionStreams/router.js +62 -0
  124. package/dist/commonjs/v3/sessionStreams/router.js.map +1 -1
  125. package/dist/commonjs/v3/sessionStreams/wireProtocol.d.ts +15 -0
  126. package/dist/commonjs/v3/sessionStreams/wireProtocol.js +16 -1
  127. package/dist/commonjs/v3/sessionStreams/wireProtocol.js.map +1 -1
  128. package/dist/commonjs/v3/test/test-session-stream-manager.js +5 -1
  129. package/dist/commonjs/v3/test/test-session-stream-manager.js.map +1 -1
  130. package/dist/commonjs/v3/types/schemas.d.ts +21 -1
  131. package/dist/commonjs/v3/types/schemas.js +2 -1
  132. package/dist/commonjs/v3/types/schemas.js.map +1 -1
  133. package/dist/commonjs/v3/types/tools.d.ts +16 -5
  134. package/dist/commonjs/v3/types/tools.js +2 -2
  135. package/dist/commonjs/v3/types/tools.js.map +1 -1
  136. package/dist/commonjs/v3/utils/ioSerialization.js +3 -3
  137. package/dist/commonjs/v3/utils/ioSerialization.js.map +1 -1
  138. package/dist/commonjs/v3/utils/zod.d.ts +8 -0
  139. package/dist/commonjs/v3/utils/zod.js +8 -0
  140. package/dist/commonjs/v3/utils/zod.js.map +1 -0
  141. package/dist/commonjs/v3/workloadDeploymentToken.d.ts +2 -21
  142. package/dist/commonjs/v3/workloadDeploymentToken.js +10 -10
  143. package/dist/commonjs/v3/workloadDeploymentToken.js.map +1 -1
  144. package/dist/commonjs/v3/zodIpc.d.ts +6 -6
  145. package/dist/commonjs/v3/zodIpc.js +20 -18
  146. package/dist/commonjs/v3/zodIpc.js.map +1 -1
  147. package/dist/commonjs/v3/zodMessageHandler.d.ts +14 -21
  148. package/dist/commonjs/v3/zodMessageHandler.js +20 -7
  149. package/dist/commonjs/v3/zodMessageHandler.js.map +1 -1
  150. package/dist/commonjs/v3/zodSocket.d.ts +11 -11
  151. package/dist/commonjs/v3/zodSocket.js +9 -8
  152. package/dist/commonjs/v3/zodSocket.js.map +1 -1
  153. package/dist/commonjs/version.js +1 -1
  154. package/dist/esm/schemas/eventFilter.d.ts +27 -105
  155. package/dist/esm/schemas/eventFilter.js +2 -2
  156. package/dist/esm/schemas/eventFilter.js.map +1 -1
  157. package/dist/esm/schemas/json.d.ts +3 -3
  158. package/dist/esm/schemas/json.js +11 -3
  159. package/dist/esm/schemas/json.js.map +1 -1
  160. package/dist/esm/v3/apiClient/core.d.ts +14 -14
  161. package/dist/esm/v3/apiClient/core.js +38 -17
  162. package/dist/esm/v3/apiClient/core.js.map +1 -1
  163. package/dist/esm/v3/apiClient/encodeTaskIdForPath.d.ts +6 -0
  164. package/dist/esm/v3/apiClient/encodeTaskIdForPath.js +17 -0
  165. package/dist/esm/v3/apiClient/encodeTaskIdForPath.js.map +1 -0
  166. package/dist/esm/v3/apiClient/index.d.ts +82 -184
  167. package/dist/esm/v3/apiClient/index.js +22 -4
  168. package/dist/esm/v3/apiClient/index.js.map +1 -1
  169. package/dist/esm/v3/apiClient/stream.d.ts +4 -4
  170. package/dist/esm/v3/apiClient/stream.js.map +1 -1
  171. package/dist/esm/v3/errors.d.ts +5 -4
  172. package/dist/esm/v3/errors.js.map +1 -1
  173. package/dist/esm/v3/index.d.ts +1 -1
  174. package/dist/esm/v3/index.js.map +1 -1
  175. package/dist/esm/v3/realtimeStreams/sessionStreamInstance.js +3 -0
  176. package/dist/esm/v3/realtimeStreams/sessionStreamInstance.js.map +1 -1
  177. package/dist/esm/v3/realtimeStreams/streamsWriterV1.js +3 -0
  178. package/dist/esm/v3/realtimeStreams/streamsWriterV1.js.map +1 -1
  179. package/dist/esm/v3/realtimeStreams/streamsWriterV2.js +4 -0
  180. package/dist/esm/v3/realtimeStreams/streamsWriterV2.js.map +1 -1
  181. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +25 -114
  182. package/dist/esm/v3/runEngineWorker/supervisor/http.js +4 -11
  183. package/dist/esm/v3/runEngineWorker/supervisor/http.js.map +1 -1
  184. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +594 -4187
  185. package/dist/esm/v3/runEngineWorker/supervisor/schemas.js +22 -5
  186. package/dist/esm/v3/runEngineWorker/supervisor/schemas.js.map +1 -1
  187. package/dist/esm/v3/runEngineWorker/supervisor/types.d.ts +2 -0
  188. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +15 -110
  189. package/dist/esm/v3/runEngineWorker/workload/http.js +8 -16
  190. package/dist/esm/v3/runEngineWorker/workload/http.js.map +1 -1
  191. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +465 -3624
  192. package/dist/esm/v3/runEngineWorker/workload/schemas.js +5 -4
  193. package/dist/esm/v3/runEngineWorker/workload/schemas.js.map +1 -1
  194. package/dist/esm/v3/schemas/api.d.ts +1869 -12681
  195. package/dist/esm/v3/schemas/api.js +115 -35
  196. package/dist/esm/v3/schemas/api.js.map +1 -1
  197. package/dist/esm/v3/schemas/build.d.ts +645 -9115
  198. package/dist/esm/v3/schemas/build.js +10 -10
  199. package/dist/esm/v3/schemas/build.js.map +1 -1
  200. package/dist/esm/v3/schemas/checkpoints.d.ts +121 -461
  201. package/dist/esm/v3/schemas/checkpoints.js +1 -1
  202. package/dist/esm/v3/schemas/checkpoints.js.map +1 -1
  203. package/dist/esm/v3/schemas/common.d.ts +1018 -6499
  204. package/dist/esm/v3/schemas/common.js +17 -10
  205. package/dist/esm/v3/schemas/common.js.map +1 -1
  206. package/dist/esm/v3/schemas/config.d.ts +3 -9
  207. package/dist/esm/v3/schemas/config.js +1 -1
  208. package/dist/esm/v3/schemas/config.js.map +1 -1
  209. package/dist/esm/v3/schemas/errors.d.ts +42 -173
  210. package/dist/esm/v3/schemas/errors.js +1 -1
  211. package/dist/esm/v3/schemas/errors.js.map +1 -1
  212. package/dist/esm/v3/schemas/eventFilter.d.ts +23 -91
  213. package/dist/esm/v3/schemas/eventFilter.js +2 -2
  214. package/dist/esm/v3/schemas/eventFilter.js.map +1 -1
  215. package/dist/esm/v3/schemas/fetch.d.ts +119 -415
  216. package/dist/esm/v3/schemas/fetch.js +6 -3
  217. package/dist/esm/v3/schemas/fetch.js.map +1 -1
  218. package/dist/esm/v3/schemas/messages.d.ts +603 -7438
  219. package/dist/esm/v3/schemas/messages.js +3 -3
  220. package/dist/esm/v3/schemas/messages.js.map +1 -1
  221. package/dist/esm/v3/schemas/openTelemetry.d.ts +50 -401
  222. package/dist/esm/v3/schemas/openTelemetry.js +2 -2
  223. package/dist/esm/v3/schemas/openTelemetry.js.map +1 -1
  224. package/dist/esm/v3/schemas/query.d.ts +51 -273
  225. package/dist/esm/v3/schemas/query.js +4 -3
  226. package/dist/esm/v3/schemas/query.js.map +1 -1
  227. package/dist/esm/v3/schemas/queues.d.ts +29 -100
  228. package/dist/esm/v3/schemas/queues.js +1 -1
  229. package/dist/esm/v3/schemas/queues.js.map +1 -1
  230. package/dist/esm/v3/schemas/reports.d.ts +150 -692
  231. package/dist/esm/v3/schemas/reports.js +5 -5
  232. package/dist/esm/v3/schemas/reports.js.map +1 -1
  233. package/dist/esm/v3/schemas/resources.d.ts +533 -5985
  234. package/dist/esm/v3/schemas/resources.js +3 -3
  235. package/dist/esm/v3/schemas/resources.js.map +1 -1
  236. package/dist/esm/v3/schemas/runEngine.d.ts +467 -1822
  237. package/dist/esm/v3/schemas/runEngine.js +11 -3
  238. package/dist/esm/v3/schemas/runEngine.js.map +1 -1
  239. package/dist/esm/v3/schemas/scheduleWindow.d.ts +2 -2
  240. package/dist/esm/v3/schemas/scheduleWindow.js +1 -1
  241. package/dist/esm/v3/schemas/scheduleWindow.js.map +1 -1
  242. package/dist/esm/v3/schemas/schemas.d.ts +788 -7456
  243. package/dist/esm/v3/schemas/schemas.js +11 -10
  244. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  245. package/dist/esm/v3/schemas/snapshotRoute.d.ts +33 -0
  246. package/dist/esm/v3/schemas/snapshotRoute.js +30 -0
  247. package/dist/esm/v3/schemas/snapshotRoute.js.map +1 -0
  248. package/dist/esm/v3/schemas/style.d.ts +24 -86
  249. package/dist/esm/v3/schemas/style.js +1 -1
  250. package/dist/esm/v3/schemas/style.js.map +1 -1
  251. package/dist/esm/v3/schemas/tokens.d.ts +5 -31
  252. package/dist/esm/v3/schemas/tokens.js +1 -1
  253. package/dist/esm/v3/schemas/tokens.js.map +1 -1
  254. package/dist/esm/v3/schemas/warmStart.d.ts +2 -8
  255. package/dist/esm/v3/schemas/warmStart.js +1 -1
  256. package/dist/esm/v3/schemas/warmStart.js.map +1 -1
  257. package/dist/esm/v3/schemas/webhookApi.d.ts +75 -249
  258. package/dist/esm/v3/schemas/webhookApi.js +2 -2
  259. package/dist/esm/v3/schemas/webhookApi.js.map +1 -1
  260. package/dist/esm/v3/schemas/webhookConfig.d.ts +473 -3309
  261. package/dist/esm/v3/schemas/webhookConfig.js +10 -9
  262. package/dist/esm/v3/schemas/webhookConfig.js.map +1 -1
  263. package/dist/esm/v3/schemas/webhookFilter.d.ts +16 -4
  264. package/dist/esm/v3/schemas/webhookFilter.js +1 -1
  265. package/dist/esm/v3/schemas/webhookFilter.js.map +1 -1
  266. package/dist/esm/v3/schemas/webhooks.d.ts +247 -2055
  267. package/dist/esm/v3/schemas/webhooks.js +3 -2
  268. package/dist/esm/v3/schemas/webhooks.js.map +1 -1
  269. package/dist/esm/v3/serverOnly/httpServer.d.ts +19 -8
  270. package/dist/esm/v3/serverOnly/httpServer.js +5 -2
  271. package/dist/esm/v3/serverOnly/httpServer.js.map +1 -1
  272. package/dist/esm/v3/sessionStreams/chatSnapshot.d.ts +163 -16
  273. package/dist/esm/v3/sessionStreams/chatSnapshot.js +318 -2
  274. package/dist/esm/v3/sessionStreams/chatSnapshot.js.map +1 -1
  275. package/dist/esm/v3/sessionStreams/router.d.ts +39 -1
  276. package/dist/esm/v3/sessionStreams/router.js +62 -0
  277. package/dist/esm/v3/sessionStreams/router.js.map +1 -1
  278. package/dist/esm/v3/sessionStreams/wireProtocol.d.ts +15 -0
  279. package/dist/esm/v3/sessionStreams/wireProtocol.js +15 -0
  280. package/dist/esm/v3/sessionStreams/wireProtocol.js.map +1 -1
  281. package/dist/esm/v3/test/test-session-stream-manager.js +5 -1
  282. package/dist/esm/v3/test/test-session-stream-manager.js.map +1 -1
  283. package/dist/esm/v3/types/schemas.d.ts +21 -1
  284. package/dist/esm/v3/types/schemas.js +2 -1
  285. package/dist/esm/v3/types/schemas.js.map +1 -1
  286. package/dist/esm/v3/types/tools.d.ts +16 -5
  287. package/dist/esm/v3/types/tools.js +2 -2
  288. package/dist/esm/v3/types/tools.js.map +1 -1
  289. package/dist/esm/v3/utils/ioSerialization.js +1 -1
  290. package/dist/esm/v3/utils/ioSerialization.js.map +1 -1
  291. package/dist/esm/v3/utils/zod.d.ts +8 -0
  292. package/dist/esm/v3/utils/zod.js +5 -0
  293. package/dist/esm/v3/utils/zod.js.map +1 -0
  294. package/dist/esm/v3/workloadDeploymentToken.d.ts +2 -21
  295. package/dist/esm/v3/workloadDeploymentToken.js +1 -1
  296. package/dist/esm/v3/workloadDeploymentToken.js.map +1 -1
  297. package/dist/esm/v3/zodIpc.d.ts +6 -6
  298. package/dist/esm/v3/zodIpc.js +5 -3
  299. package/dist/esm/v3/zodIpc.js.map +1 -1
  300. package/dist/esm/v3/zodMessageHandler.d.ts +14 -21
  301. package/dist/esm/v3/zodMessageHandler.js +16 -3
  302. package/dist/esm/v3/zodMessageHandler.js.map +1 -1
  303. package/dist/esm/v3/zodSocket.d.ts +11 -11
  304. package/dist/esm/v3/zodSocket.js +3 -2
  305. package/dist/esm/v3/zodSocket.js.map +1 -1
  306. package/dist/esm/version.js +1 -1
  307. package/package.json +7 -3
@@ -1,13 +1,26 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/v4";
2
2
  /** A positive integer plus `m`, `h`, `d` or `w`, capped at 90d. Reports bucket by whole minutes. */
3
- export declare const ReportPeriodSchema: z.ZodEffects<z.ZodString, string, string>;
3
+ export declare const ReportPeriodSchema: z.ZodString;
4
4
  export type ReportPeriod = z.infer<typeof ReportPeriodSchema>;
5
5
  /** The response encodings the endpoint can render. `json` returns a `ReportViewModel`. */
6
- export declare const ReportFormatSchema: z.ZodEnum<["markdown", "json", "ansi"]>;
6
+ export declare const ReportFormatSchema: z.ZodEnum<{
7
+ ansi: "ansi";
8
+ json: "json";
9
+ markdown: "markdown";
10
+ }>;
7
11
  export type ReportFormat = z.infer<typeof ReportFormatSchema>;
8
- export declare const ReportSeveritySchema: z.ZodEnum<["ok", "warn", "crit"]>;
12
+ export declare const ReportSeveritySchema: z.ZodEnum<{
13
+ crit: "crit";
14
+ ok: "ok";
15
+ warn: "warn";
16
+ }>;
9
17
  export type ReportSeverity = z.infer<typeof ReportSeveritySchema>;
10
- export declare const ReportUnitSchema: z.ZodEnum<["ms", "count", "ratio", "perMin"]>;
18
+ export declare const ReportUnitSchema: z.ZodEnum<{
19
+ count: "count";
20
+ ms: "ms";
21
+ perMin: "perMin";
22
+ ratio: "ratio";
23
+ }>;
11
24
  export type ReportUnit = z.infer<typeof ReportUnitSchema>;
12
25
  /** A code resolved to a human string by the renderer's message table. */
13
26
  export declare const ReportReasonCodeSchema: z.ZodString;
@@ -16,818 +29,263 @@ export type ReportReasonCode = z.infer<typeof ReportReasonCodeSchema>;
16
29
  export declare const ReportLinkKeySchema: z.ZodString;
17
30
  export type ReportLinkKey = z.infer<typeof ReportLinkKeySchema>;
18
31
  export declare const ReportDeltaSchema: z.ZodObject<{
19
- dir: z.ZodEnum<["up", "down", "flat"]>;
20
- /** rounded value/normal multiplier; renderer decides whether to print "". */
32
+ dir: z.ZodEnum<{
33
+ down: "down";
34
+ flat: "flat";
35
+ up: "up";
36
+ }>;
21
37
  mult: z.ZodOptional<z.ZodNumber>;
22
- }, "strip", z.ZodTypeAny, {
23
- dir: "down" | "flat" | "up";
24
- mult?: number | undefined;
25
- }, {
26
- dir: "down" | "flat" | "up";
27
- mult?: number | undefined;
28
- }>;
38
+ }, z.core.$strip>;
29
39
  export type ReportDelta = z.infer<typeof ReportDeltaSchema>;
30
40
  export declare const ReportMetricSeriesSchema: z.ZodObject<{
31
- points: z.ZodArray<z.ZodNumber, "many">;
32
- /** "estimated" = a proxy (e.g. pending backlog), shown informational-only. */
33
- kind: z.ZodEnum<["measured", "estimated"]>;
34
- }, "strip", z.ZodTypeAny, {
35
- points: number[];
36
- kind: "estimated" | "measured";
37
- }, {
38
- points: number[];
39
- kind: "estimated" | "measured";
40
- }>;
41
+ points: z.ZodArray<z.ZodNumber>;
42
+ kind: z.ZodEnum<{
43
+ estimated: "estimated";
44
+ measured: "measured";
45
+ }>;
46
+ }, z.core.$strip>;
41
47
  export type ReportMetricSeries = z.infer<typeof ReportMetricSeriesSchema>;
42
48
  export declare const ReportMetricSchema: z.ZodObject<{
43
- /** A code, e.g. "start_latency_p95"; the messages map turns it into the label. */
44
49
  id: z.ZodString;
45
50
  value: z.ZodNumber;
46
- unit: z.ZodEnum<["ms", "count", "ratio", "perMin"]>;
47
- aggregation: z.ZodOptional<z.ZodEnum<["p95", "rate", "ratio", "count"]>>;
48
- /** baseline; renderer formats "(normal ~7s)". */
51
+ unit: z.ZodEnum<{
52
+ count: "count";
53
+ ms: "ms";
54
+ perMin: "perMin";
55
+ ratio: "ratio";
56
+ }>;
57
+ aggregation: z.ZodOptional<z.ZodEnum<{
58
+ count: "count";
59
+ p95: "p95";
60
+ rate: "rate";
61
+ ratio: "ratio";
62
+ }>>;
49
63
  normal: z.ZodOptional<z.ZodNumber>;
50
64
  delta: z.ZodOptional<z.ZodObject<{
51
- dir: z.ZodEnum<["up", "down", "flat"]>;
52
- /** rounded value/normal multiplier; renderer decides whether to print "". */
65
+ dir: z.ZodEnum<{
66
+ down: "down";
67
+ flat: "flat";
68
+ up: "up";
69
+ }>;
53
70
  mult: z.ZodOptional<z.ZodNumber>;
54
- }, "strip", z.ZodTypeAny, {
55
- dir: "down" | "flat" | "up";
56
- mult?: number | undefined;
57
- }, {
58
- dir: "down" | "flat" | "up";
59
- mult?: number | undefined;
60
- }>>;
71
+ }, z.core.$strip>>;
61
72
  series: z.ZodOptional<z.ZodObject<{
62
- points: z.ZodArray<z.ZodNumber, "many">;
63
- /** "estimated" = a proxy (e.g. pending backlog), shown informational-only. */
64
- kind: z.ZodEnum<["measured", "estimated"]>;
65
- }, "strip", z.ZodTypeAny, {
66
- points: number[];
67
- kind: "estimated" | "measured";
68
- }, {
69
- points: number[];
70
- kind: "estimated" | "measured";
71
- }>>;
72
- /** named sub-values for composite metrics (e.g. throughput { done, triggered }). */
73
+ points: z.ZodArray<z.ZodNumber>;
74
+ kind: z.ZodEnum<{
75
+ estimated: "estimated";
76
+ measured: "measured";
77
+ }>;
78
+ }, z.core.$strip>>;
73
79
  breakdown: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
74
- /** shown on a cause line INSTEAD of "(normal ~x)", e.g. "pinned 40 of last 60 min". */
75
80
  annotation: z.ZodOptional<z.ZodObject<{
76
81
  code: z.ZodString;
77
82
  value: z.ZodOptional<z.ZodNumber>;
78
- }, "strip", z.ZodTypeAny, {
79
- code: string;
80
- value?: number | undefined;
81
- }, {
82
- code: string;
83
- value?: number | undefined;
83
+ }, z.core.$strip>>;
84
+ availability: z.ZodOptional<z.ZodEnum<{
85
+ measured: "measured";
86
+ unknown: "unknown";
84
87
  }>>;
85
- /** "unknown" means `value` is a placeholder a consumer must not read as real. Absent = measured. */
86
- availability: z.ZodOptional<z.ZodEnum<["measured", "unknown"]>>;
87
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
88
- }, "strip", z.ZodTypeAny, {
89
- id: string;
90
- value: number;
91
- unit: "count" | "ms" | "perMin" | "ratio";
92
- aggregation?: "count" | "p95" | "rate" | "ratio" | undefined;
93
- normal?: number | undefined;
94
- delta?: {
95
- dir: "down" | "flat" | "up";
96
- mult?: number | undefined;
97
- } | undefined;
98
- series?: {
99
- points: number[];
100
- kind: "estimated" | "measured";
101
- } | undefined;
102
- breakdown?: Record<string, number> | undefined;
103
- annotation?: {
104
- code: string;
105
- value?: number | undefined;
106
- } | undefined;
107
- availability?: "measured" | "unknown" | undefined;
108
- severity: "crit" | "ok" | "warn";
109
- }, {
110
- id: string;
111
- value: number;
112
- unit: "count" | "ms" | "perMin" | "ratio";
113
- aggregation?: "count" | "p95" | "rate" | "ratio" | undefined;
114
- normal?: number | undefined;
115
- delta?: {
116
- dir: "down" | "flat" | "up";
117
- mult?: number | undefined;
118
- } | undefined;
119
- series?: {
120
- points: number[];
121
- kind: "estimated" | "measured";
122
- } | undefined;
123
- breakdown?: Record<string, number> | undefined;
124
- annotation?: {
125
- code: string;
126
- value?: number | undefined;
127
- } | undefined;
128
- availability?: "measured" | "unknown" | undefined;
129
- severity: "crit" | "ok" | "warn";
130
- }>;
88
+ severity: z.ZodEnum<{
89
+ crit: "crit";
90
+ ok: "ok";
91
+ warn: "warn";
92
+ }>;
93
+ }, z.core.$strip>;
131
94
  export type ReportMetric = z.infer<typeof ReportMetricSchema>;
132
95
  export declare const ReportRecommendationSchema: z.ZodObject<{
133
96
  code: z.ZodString;
134
97
  link: z.ZodOptional<z.ZodString>;
135
- }, "strip", z.ZodTypeAny, {
136
- code: string;
137
- link?: string | undefined;
138
- }, {
139
- code: string;
140
- link?: string | undefined;
141
- }>;
98
+ }, z.core.$strip>;
142
99
  export type ReportRecommendation = z.infer<typeof ReportRecommendationSchema>;
143
100
  /** A footer line: an action, or the "do nothing" option (carries value). */
144
101
  export declare const ReportFooterEntrySchema: z.ZodObject<{
145
102
  code: z.ZodString;
146
103
  link: z.ZodOptional<z.ZodString>;
147
- /** a computed fact (e.g. drainMinutes), never invented. */
148
104
  value: z.ZodOptional<z.ZodNumber>;
149
- }, "strip", z.ZodTypeAny, {
150
- code: string;
151
- link?: string | undefined;
152
- value?: number | undefined;
153
- }, {
154
- code: string;
155
- link?: string | undefined;
156
- value?: number | undefined;
157
- }>;
105
+ }, z.core.$strip>;
158
106
  export type ReportFooterEntry = z.infer<typeof ReportFooterEntrySchema>;
159
107
  /** A ruled-out cause + its evidence, e.g. "not your code" (never emitted without evidence). */
160
108
  export declare const ReportExclusionSchema: z.ZodObject<{
161
109
  code: z.ZodString;
162
110
  evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
163
- }, "strip", z.ZodTypeAny, {
164
- code: string;
165
- evidence?: Record<string, number> | undefined;
166
- }, {
167
- code: string;
168
- evidence?: Record<string, number> | undefined;
169
- }>;
111
+ }, z.core.$strip>;
170
112
  export type ReportExclusion = z.infer<typeof ReportExclusionSchema>;
171
113
  /** A measured fact backing the verdict. `ReportExclusion` states what the problem isn't. */
172
114
  export declare const ReportObservationSchema: z.ZodObject<{
173
115
  code: z.ZodString;
174
116
  evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
175
- }, "strip", z.ZodTypeAny, {
176
- code: string;
177
- evidence?: Record<string, number> | undefined;
178
- }, {
179
- code: string;
180
- evidence?: Record<string, number> | undefined;
181
- }>;
117
+ }, z.core.$strip>;
182
118
  export type ReportObservation = z.infer<typeof ReportObservationSchema>;
183
119
  export declare const ReportFindingSchema: z.ZodObject<{
184
- /** "flow" | "execution" | "liveness" | future "infrastructure" | "billing" */
185
120
  type: z.ZodString;
186
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
187
- /** Code for the state or cause, e.g. "env_limit_saturation" | "healthy". */
121
+ severity: z.ZodEnum<{
122
+ crit: "crit";
123
+ ok: "ok";
124
+ warn: "warn";
125
+ }>;
188
126
  reason: z.ZodString;
189
- /** Code for the "read:" line. Built last, may span findings. */
190
127
  read: z.ZodOptional<z.ZodString>;
191
- /** metric ids this finding covers, in causal order when degraded. */
192
- metricIds: z.ZodArray<z.ZodString, "many">;
193
- /** A single primary action. */
128
+ metricIds: z.ZodArray<z.ZodString>;
194
129
  recommendation: z.ZodOptional<z.ZodObject<{
195
130
  code: z.ZodString;
196
131
  link: z.ZodOptional<z.ZodString>;
197
- }, "strip", z.ZodTypeAny, {
198
- code: string;
199
- link?: string | undefined;
200
- }, {
201
- code: string;
202
- link?: string | undefined;
203
- }>>;
204
- /** optional parenthetical — same shape as recommendation. */
132
+ }, z.core.$strip>>;
205
133
  hedge: z.ZodOptional<z.ZodObject<{
206
134
  code: z.ZodString;
207
135
  link: z.ZodOptional<z.ZodString>;
208
- }, "strip", z.ZodTypeAny, {
209
- code: string;
210
- link?: string | undefined;
211
- }, {
212
- code: string;
213
- link?: string | undefined;
214
- }>>;
215
- /** contiguous breach window of the driving metric -> "(last 40 min)". */
136
+ }, z.core.$strip>>;
216
137
  anomalyWindow: z.ZodOptional<z.ZodObject<{
217
138
  minutes: z.ZodNumber;
218
139
  touchesEnd: z.ZodBoolean;
219
- }, "strip", z.ZodTypeAny, {
220
- minutes: number;
221
- touchesEnd: boolean;
222
- }, {
223
- minutes: number;
224
- touchesEnd: boolean;
225
- }>>;
226
- /** Which dimension and key own the problem. `of` is the denominator label the renderer prints. */
140
+ }, z.core.$strip>>;
227
141
  attribution: z.ZodOptional<z.ZodObject<{
228
142
  dim: z.ZodString;
229
143
  key: z.ZodString;
230
144
  share: z.ZodNumber;
231
145
  of: z.ZodString;
232
- }, "strip", z.ZodTypeAny, {
233
- dim: string;
234
- key: string;
235
- share: number;
236
- of: string;
237
- }, {
238
- dim: string;
239
- key: string;
240
- share: number;
241
- of: string;
242
- }>>;
243
- /** Ruled-out causes and evidence, rendered under the `read:` line. */
146
+ }, z.core.$strip>>;
244
147
  exclusions: z.ZodOptional<z.ZodArray<z.ZodObject<{
245
148
  code: z.ZodString;
246
149
  evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
247
- }, "strip", z.ZodTypeAny, {
248
- code: string;
249
- evidence?: Record<string, number> | undefined;
250
- }, {
251
- code: string;
252
- evidence?: Record<string, number> | undefined;
253
- }>, "many">>;
254
- /** Supporting facts, rendered under the `read:` line after the exclusions. */
150
+ }, z.core.$strip>>>;
255
151
  observations: z.ZodOptional<z.ZodArray<z.ZodObject<{
256
152
  code: z.ZodString;
257
153
  evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
258
- }, "strip", z.ZodTypeAny, {
259
- code: string;
260
- evidence?: Record<string, number> | undefined;
261
- }, {
262
- code: string;
263
- evidence?: Record<string, number> | undefined;
264
- }>, "many">>;
265
- }, "strip", z.ZodTypeAny, {
266
- type: string;
267
- severity: "crit" | "ok" | "warn";
268
- reason: string;
269
- read?: string | undefined;
270
- metricIds: string[];
271
- recommendation?: {
272
- code: string;
273
- link?: string | undefined;
274
- } | undefined;
275
- hedge?: {
276
- code: string;
277
- link?: string | undefined;
278
- } | undefined;
279
- anomalyWindow?: {
280
- minutes: number;
281
- touchesEnd: boolean;
282
- } | undefined;
283
- attribution?: {
284
- dim: string;
285
- key: string;
286
- share: number;
287
- of: string;
288
- } | undefined;
289
- exclusions?: {
290
- code: string;
291
- evidence?: Record<string, number> | undefined;
292
- }[] | undefined;
293
- observations?: {
294
- code: string;
295
- evidence?: Record<string, number> | undefined;
296
- }[] | undefined;
297
- }, {
298
- type: string;
299
- severity: "crit" | "ok" | "warn";
300
- reason: string;
301
- read?: string | undefined;
302
- metricIds: string[];
303
- recommendation?: {
304
- code: string;
305
- link?: string | undefined;
306
- } | undefined;
307
- hedge?: {
308
- code: string;
309
- link?: string | undefined;
310
- } | undefined;
311
- anomalyWindow?: {
312
- minutes: number;
313
- touchesEnd: boolean;
314
- } | undefined;
315
- attribution?: {
316
- dim: string;
317
- key: string;
318
- share: number;
319
- of: string;
320
- } | undefined;
321
- exclusions?: {
322
- code: string;
323
- evidence?: Record<string, number> | undefined;
324
- }[] | undefined;
325
- observations?: {
326
- code: string;
327
- evidence?: Record<string, number> | undefined;
328
- }[] | undefined;
329
- }>;
154
+ }, z.core.$strip>>>;
155
+ }, z.core.$strip>;
330
156
  export type ReportFinding = z.infer<typeof ReportFindingSchema>;
331
157
  export declare const ReportSummaryStatementSchema: z.ZodObject<{
332
158
  findingType: z.ZodString;
333
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
334
- /** Renders from (findingType, severity) unless a reason is present. */
159
+ severity: z.ZodEnum<{
160
+ crit: "crit";
161
+ ok: "ok";
162
+ warn: "warn";
163
+ }>;
335
164
  reason: z.ZodOptional<z.ZodString>;
336
- }, "strip", z.ZodTypeAny, {
337
- findingType: string;
338
- severity: "crit" | "ok" | "warn";
339
- reason?: string | undefined;
340
- }, {
341
- findingType: string;
342
- severity: "crit" | "ok" | "warn";
343
- reason?: string | undefined;
344
- }>;
165
+ }, z.core.$strip>;
345
166
  export type ReportSummaryStatement = z.infer<typeof ReportSummaryStatementSchema>;
346
167
  export declare const ReportLinkSchema: z.ZodObject<{
347
168
  key: z.ZodString;
348
169
  label: z.ZodString;
349
170
  url: z.ZodString;
350
- }, "strip", z.ZodTypeAny, {
351
- key: string;
352
- label: string;
353
- url: string;
354
- }, {
355
- key: string;
356
- label: string;
357
- url: string;
358
- }>;
171
+ }, z.core.$strip>;
359
172
  export type ReportLink = z.infer<typeof ReportLinkSchema>;
360
173
  export declare const ReportViewModelSchema: z.ZodObject<{
361
- /** "health" | "cost" | … */
362
174
  title: z.ZodString;
363
- /** "prod" */
364
175
  scope: z.ZodString;
365
- /** "last 1h" */
366
176
  period: z.ZodString;
367
- /** "vs your 7d normal" */
368
177
  baselineLabel: z.ZodOptional<z.ZodString>;
369
- /** ISO string. Passed in, never read from the clock inside interpret. */
370
178
  generatedAt: z.ZodString;
371
- /** live window length in minutes — lets the renderer say "of last 60 min". */
372
179
  windowMinutes: z.ZodNumber;
373
180
  summary: z.ZodObject<{
374
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
181
+ severity: z.ZodEnum<{
182
+ crit: "crit";
183
+ ok: "ok";
184
+ warn: "warn";
185
+ }>;
375
186
  statements: z.ZodArray<z.ZodObject<{
376
187
  findingType: z.ZodString;
377
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
378
- /** Renders from (findingType, severity) unless a reason is present. */
188
+ severity: z.ZodEnum<{
189
+ crit: "crit";
190
+ ok: "ok";
191
+ warn: "warn";
192
+ }>;
379
193
  reason: z.ZodOptional<z.ZodString>;
380
- }, "strip", z.ZodTypeAny, {
381
- findingType: string;
382
- severity: "crit" | "ok" | "warn";
383
- reason?: string | undefined;
384
- }, {
385
- findingType: string;
386
- severity: "crit" | "ok" | "warn";
387
- reason?: string | undefined;
388
- }>, "many">;
389
- }, "strip", z.ZodTypeAny, {
390
- severity: "crit" | "ok" | "warn";
391
- statements: {
392
- findingType: string;
393
- severity: "crit" | "ok" | "warn";
394
- reason?: string | undefined;
395
- }[];
396
- }, {
397
- severity: "crit" | "ok" | "warn";
398
- statements: {
399
- findingType: string;
400
- severity: "crit" | "ok" | "warn";
401
- reason?: string | undefined;
402
- }[];
403
- }>;
194
+ }, z.core.$strip>>;
195
+ }, z.core.$strip>;
404
196
  findings: z.ZodArray<z.ZodObject<{
405
- /** "flow" | "execution" | "liveness" | future "infrastructure" | "billing" */
406
197
  type: z.ZodString;
407
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
408
- /** Code for the state or cause, e.g. "env_limit_saturation" | "healthy". */
198
+ severity: z.ZodEnum<{
199
+ crit: "crit";
200
+ ok: "ok";
201
+ warn: "warn";
202
+ }>;
409
203
  reason: z.ZodString;
410
- /** Code for the "read:" line. Built last, may span findings. */
411
204
  read: z.ZodOptional<z.ZodString>;
412
- /** metric ids this finding covers, in causal order when degraded. */
413
- metricIds: z.ZodArray<z.ZodString, "many">;
414
- /** A single primary action. */
205
+ metricIds: z.ZodArray<z.ZodString>;
415
206
  recommendation: z.ZodOptional<z.ZodObject<{
416
207
  code: z.ZodString;
417
208
  link: z.ZodOptional<z.ZodString>;
418
- }, "strip", z.ZodTypeAny, {
419
- code: string;
420
- link?: string | undefined;
421
- }, {
422
- code: string;
423
- link?: string | undefined;
424
- }>>;
425
- /** optional parenthetical — same shape as recommendation. */
209
+ }, z.core.$strip>>;
426
210
  hedge: z.ZodOptional<z.ZodObject<{
427
211
  code: z.ZodString;
428
212
  link: z.ZodOptional<z.ZodString>;
429
- }, "strip", z.ZodTypeAny, {
430
- code: string;
431
- link?: string | undefined;
432
- }, {
433
- code: string;
434
- link?: string | undefined;
435
- }>>;
436
- /** contiguous breach window of the driving metric -> "(last 40 min)". */
213
+ }, z.core.$strip>>;
437
214
  anomalyWindow: z.ZodOptional<z.ZodObject<{
438
215
  minutes: z.ZodNumber;
439
216
  touchesEnd: z.ZodBoolean;
440
- }, "strip", z.ZodTypeAny, {
441
- minutes: number;
442
- touchesEnd: boolean;
443
- }, {
444
- minutes: number;
445
- touchesEnd: boolean;
446
- }>>;
447
- /** Which dimension and key own the problem. `of` is the denominator label the renderer prints. */
217
+ }, z.core.$strip>>;
448
218
  attribution: z.ZodOptional<z.ZodObject<{
449
219
  dim: z.ZodString;
450
220
  key: z.ZodString;
451
221
  share: z.ZodNumber;
452
222
  of: z.ZodString;
453
- }, "strip", z.ZodTypeAny, {
454
- dim: string;
455
- key: string;
456
- share: number;
457
- of: string;
458
- }, {
459
- dim: string;
460
- key: string;
461
- share: number;
462
- of: string;
463
- }>>;
464
- /** Ruled-out causes and evidence, rendered under the `read:` line. */
223
+ }, z.core.$strip>>;
465
224
  exclusions: z.ZodOptional<z.ZodArray<z.ZodObject<{
466
225
  code: z.ZodString;
467
226
  evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
468
- }, "strip", z.ZodTypeAny, {
469
- code: string;
470
- evidence?: Record<string, number> | undefined;
471
- }, {
472
- code: string;
473
- evidence?: Record<string, number> | undefined;
474
- }>, "many">>;
475
- /** Supporting facts, rendered under the `read:` line after the exclusions. */
227
+ }, z.core.$strip>>>;
476
228
  observations: z.ZodOptional<z.ZodArray<z.ZodObject<{
477
229
  code: z.ZodString;
478
230
  evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
479
- }, "strip", z.ZodTypeAny, {
480
- code: string;
481
- evidence?: Record<string, number> | undefined;
482
- }, {
483
- code: string;
484
- evidence?: Record<string, number> | undefined;
485
- }>, "many">>;
486
- }, "strip", z.ZodTypeAny, {
487
- type: string;
488
- severity: "crit" | "ok" | "warn";
489
- reason: string;
490
- read?: string | undefined;
491
- metricIds: string[];
492
- recommendation?: {
493
- code: string;
494
- link?: string | undefined;
495
- } | undefined;
496
- hedge?: {
497
- code: string;
498
- link?: string | undefined;
499
- } | undefined;
500
- anomalyWindow?: {
501
- minutes: number;
502
- touchesEnd: boolean;
503
- } | undefined;
504
- attribution?: {
505
- dim: string;
506
- key: string;
507
- share: number;
508
- of: string;
509
- } | undefined;
510
- exclusions?: {
511
- code: string;
512
- evidence?: Record<string, number> | undefined;
513
- }[] | undefined;
514
- observations?: {
515
- code: string;
516
- evidence?: Record<string, number> | undefined;
517
- }[] | undefined;
518
- }, {
519
- type: string;
520
- severity: "crit" | "ok" | "warn";
521
- reason: string;
522
- read?: string | undefined;
523
- metricIds: string[];
524
- recommendation?: {
525
- code: string;
526
- link?: string | undefined;
527
- } | undefined;
528
- hedge?: {
529
- code: string;
530
- link?: string | undefined;
531
- } | undefined;
532
- anomalyWindow?: {
533
- minutes: number;
534
- touchesEnd: boolean;
535
- } | undefined;
536
- attribution?: {
537
- dim: string;
538
- key: string;
539
- share: number;
540
- of: string;
541
- } | undefined;
542
- exclusions?: {
543
- code: string;
544
- evidence?: Record<string, number> | undefined;
545
- }[] | undefined;
546
- observations?: {
547
- code: string;
548
- evidence?: Record<string, number> | undefined;
549
- }[] | undefined;
550
- }>, "many">;
231
+ }, z.core.$strip>>>;
232
+ }, z.core.$strip>>;
551
233
  metrics: z.ZodArray<z.ZodObject<{
552
- /** A code, e.g. "start_latency_p95"; the messages map turns it into the label. */
553
234
  id: z.ZodString;
554
235
  value: z.ZodNumber;
555
- unit: z.ZodEnum<["ms", "count", "ratio", "perMin"]>;
556
- aggregation: z.ZodOptional<z.ZodEnum<["p95", "rate", "ratio", "count"]>>;
557
- /** baseline; renderer formats "(normal ~7s)". */
236
+ unit: z.ZodEnum<{
237
+ count: "count";
238
+ ms: "ms";
239
+ perMin: "perMin";
240
+ ratio: "ratio";
241
+ }>;
242
+ aggregation: z.ZodOptional<z.ZodEnum<{
243
+ count: "count";
244
+ p95: "p95";
245
+ rate: "rate";
246
+ ratio: "ratio";
247
+ }>>;
558
248
  normal: z.ZodOptional<z.ZodNumber>;
559
249
  delta: z.ZodOptional<z.ZodObject<{
560
- dir: z.ZodEnum<["up", "down", "flat"]>;
561
- /** rounded value/normal multiplier; renderer decides whether to print "". */
250
+ dir: z.ZodEnum<{
251
+ down: "down";
252
+ flat: "flat";
253
+ up: "up";
254
+ }>;
562
255
  mult: z.ZodOptional<z.ZodNumber>;
563
- }, "strip", z.ZodTypeAny, {
564
- dir: "down" | "flat" | "up";
565
- mult?: number | undefined;
566
- }, {
567
- dir: "down" | "flat" | "up";
568
- mult?: number | undefined;
569
- }>>;
256
+ }, z.core.$strip>>;
570
257
  series: z.ZodOptional<z.ZodObject<{
571
- points: z.ZodArray<z.ZodNumber, "many">;
572
- /** "estimated" = a proxy (e.g. pending backlog), shown informational-only. */
573
- kind: z.ZodEnum<["measured", "estimated"]>;
574
- }, "strip", z.ZodTypeAny, {
575
- points: number[];
576
- kind: "estimated" | "measured";
577
- }, {
578
- points: number[];
579
- kind: "estimated" | "measured";
580
- }>>;
581
- /** named sub-values for composite metrics (e.g. throughput { done, triggered }). */
258
+ points: z.ZodArray<z.ZodNumber>;
259
+ kind: z.ZodEnum<{
260
+ estimated: "estimated";
261
+ measured: "measured";
262
+ }>;
263
+ }, z.core.$strip>>;
582
264
  breakdown: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
583
- /** shown on a cause line INSTEAD of "(normal ~x)", e.g. "pinned 40 of last 60 min". */
584
265
  annotation: z.ZodOptional<z.ZodObject<{
585
266
  code: z.ZodString;
586
267
  value: z.ZodOptional<z.ZodNumber>;
587
- }, "strip", z.ZodTypeAny, {
588
- code: string;
589
- value?: number | undefined;
590
- }, {
591
- code: string;
592
- value?: number | undefined;
268
+ }, z.core.$strip>>;
269
+ availability: z.ZodOptional<z.ZodEnum<{
270
+ measured: "measured";
271
+ unknown: "unknown";
593
272
  }>>;
594
- /** "unknown" means `value` is a placeholder a consumer must not read as real. Absent = measured. */
595
- availability: z.ZodOptional<z.ZodEnum<["measured", "unknown"]>>;
596
- severity: z.ZodEnum<["ok", "warn", "crit"]>;
597
- }, "strip", z.ZodTypeAny, {
598
- id: string;
599
- value: number;
600
- unit: "count" | "ms" | "perMin" | "ratio";
601
- aggregation?: "count" | "p95" | "rate" | "ratio" | undefined;
602
- normal?: number | undefined;
603
- delta?: {
604
- dir: "down" | "flat" | "up";
605
- mult?: number | undefined;
606
- } | undefined;
607
- series?: {
608
- points: number[];
609
- kind: "estimated" | "measured";
610
- } | undefined;
611
- breakdown?: Record<string, number> | undefined;
612
- annotation?: {
613
- code: string;
614
- value?: number | undefined;
615
- } | undefined;
616
- availability?: "measured" | "unknown" | undefined;
617
- severity: "crit" | "ok" | "warn";
618
- }, {
619
- id: string;
620
- value: number;
621
- unit: "count" | "ms" | "perMin" | "ratio";
622
- aggregation?: "count" | "p95" | "rate" | "ratio" | undefined;
623
- normal?: number | undefined;
624
- delta?: {
625
- dir: "down" | "flat" | "up";
626
- mult?: number | undefined;
627
- } | undefined;
628
- series?: {
629
- points: number[];
630
- kind: "estimated" | "measured";
631
- } | undefined;
632
- breakdown?: Record<string, number> | undefined;
633
- annotation?: {
634
- code: string;
635
- value?: number | undefined;
636
- } | undefined;
637
- availability?: "measured" | "unknown" | undefined;
638
- severity: "crit" | "ok" | "warn";
639
- }>, "many">;
640
- /** dense structured payload for agents. */
273
+ severity: z.ZodEnum<{
274
+ crit: "crit";
275
+ ok: "ok";
276
+ warn: "warn";
277
+ }>;
278
+ }, z.core.$strip>>;
641
279
  facts: z.ZodRecord<z.ZodString, z.ZodUnknown>;
642
280
  links: z.ZodArray<z.ZodObject<{
643
281
  key: z.ZodString;
644
282
  label: z.ZodString;
645
283
  url: z.ZodString;
646
- }, "strip", z.ZodTypeAny, {
647
- key: string;
648
- label: string;
649
- url: string;
650
- }, {
651
- key: string;
652
- label: string;
653
- url: string;
654
- }>, "many">;
655
- /** dominant finding's action + optional "do nothing" option. Max two entries. */
284
+ }, z.core.$strip>>;
656
285
  footer: z.ZodArray<z.ZodObject<{
657
286
  code: z.ZodString;
658
287
  link: z.ZodOptional<z.ZodString>;
659
- /** a computed fact (e.g. drainMinutes), never invented. */
660
288
  value: z.ZodOptional<z.ZodNumber>;
661
- }, "strip", z.ZodTypeAny, {
662
- code: string;
663
- link?: string | undefined;
664
- value?: number | undefined;
665
- }, {
666
- code: string;
667
- link?: string | undefined;
668
- value?: number | undefined;
669
- }>, "many">;
670
- }, "strip", z.ZodTypeAny, {
671
- title: string;
672
- scope: string;
673
- period: string;
674
- baselineLabel?: string | undefined;
675
- generatedAt: string;
676
- windowMinutes: number;
677
- summary: {
678
- severity: "crit" | "ok" | "warn";
679
- statements: {
680
- findingType: string;
681
- severity: "crit" | "ok" | "warn";
682
- reason?: string | undefined;
683
- }[];
684
- };
685
- findings: {
686
- type: string;
687
- severity: "crit" | "ok" | "warn";
688
- reason: string;
689
- read?: string | undefined;
690
- metricIds: string[];
691
- recommendation?: {
692
- code: string;
693
- link?: string | undefined;
694
- } | undefined;
695
- hedge?: {
696
- code: string;
697
- link?: string | undefined;
698
- } | undefined;
699
- anomalyWindow?: {
700
- minutes: number;
701
- touchesEnd: boolean;
702
- } | undefined;
703
- attribution?: {
704
- dim: string;
705
- key: string;
706
- share: number;
707
- of: string;
708
- } | undefined;
709
- exclusions?: {
710
- code: string;
711
- evidence?: Record<string, number> | undefined;
712
- }[] | undefined;
713
- observations?: {
714
- code: string;
715
- evidence?: Record<string, number> | undefined;
716
- }[] | undefined;
717
- }[];
718
- metrics: {
719
- id: string;
720
- value: number;
721
- unit: "count" | "ms" | "perMin" | "ratio";
722
- aggregation?: "count" | "p95" | "rate" | "ratio" | undefined;
723
- normal?: number | undefined;
724
- delta?: {
725
- dir: "down" | "flat" | "up";
726
- mult?: number | undefined;
727
- } | undefined;
728
- series?: {
729
- points: number[];
730
- kind: "estimated" | "measured";
731
- } | undefined;
732
- breakdown?: Record<string, number> | undefined;
733
- annotation?: {
734
- code: string;
735
- value?: number | undefined;
736
- } | undefined;
737
- availability?: "measured" | "unknown" | undefined;
738
- severity: "crit" | "ok" | "warn";
739
- }[];
740
- facts: Record<string, unknown>;
741
- links: {
742
- key: string;
743
- label: string;
744
- url: string;
745
- }[];
746
- footer: {
747
- code: string;
748
- link?: string | undefined;
749
- value?: number | undefined;
750
- }[];
751
- }, {
752
- title: string;
753
- scope: string;
754
- period: string;
755
- baselineLabel?: string | undefined;
756
- generatedAt: string;
757
- windowMinutes: number;
758
- summary: {
759
- severity: "crit" | "ok" | "warn";
760
- statements: {
761
- findingType: string;
762
- severity: "crit" | "ok" | "warn";
763
- reason?: string | undefined;
764
- }[];
765
- };
766
- findings: {
767
- type: string;
768
- severity: "crit" | "ok" | "warn";
769
- reason: string;
770
- read?: string | undefined;
771
- metricIds: string[];
772
- recommendation?: {
773
- code: string;
774
- link?: string | undefined;
775
- } | undefined;
776
- hedge?: {
777
- code: string;
778
- link?: string | undefined;
779
- } | undefined;
780
- anomalyWindow?: {
781
- minutes: number;
782
- touchesEnd: boolean;
783
- } | undefined;
784
- attribution?: {
785
- dim: string;
786
- key: string;
787
- share: number;
788
- of: string;
789
- } | undefined;
790
- exclusions?: {
791
- code: string;
792
- evidence?: Record<string, number> | undefined;
793
- }[] | undefined;
794
- observations?: {
795
- code: string;
796
- evidence?: Record<string, number> | undefined;
797
- }[] | undefined;
798
- }[];
799
- metrics: {
800
- id: string;
801
- value: number;
802
- unit: "count" | "ms" | "perMin" | "ratio";
803
- aggregation?: "count" | "p95" | "rate" | "ratio" | undefined;
804
- normal?: number | undefined;
805
- delta?: {
806
- dir: "down" | "flat" | "up";
807
- mult?: number | undefined;
808
- } | undefined;
809
- series?: {
810
- points: number[];
811
- kind: "estimated" | "measured";
812
- } | undefined;
813
- breakdown?: Record<string, number> | undefined;
814
- annotation?: {
815
- code: string;
816
- value?: number | undefined;
817
- } | undefined;
818
- availability?: "measured" | "unknown" | undefined;
819
- severity: "crit" | "ok" | "warn";
820
- }[];
821
- facts: Record<string, unknown>;
822
- links: {
823
- key: string;
824
- label: string;
825
- url: string;
826
- }[];
827
- footer: {
828
- code: string;
829
- link?: string | undefined;
830
- value?: number | undefined;
831
- }[];
832
- }>;
289
+ }, z.core.$strip>>;
290
+ }, z.core.$strip>;
833
291
  export type ReportViewModel = z.infer<typeof ReportViewModelSchema>;