jev-recipes 0.2.0 → 0.4.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 (437) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/README.md +74 -85
  3. package/dist/catalog/generated/details/action-scope.json +43 -0
  4. package/dist/catalog/generated/details/answer-consistency.json +46 -0
  5. package/dist/catalog/generated/details/answer-coverage.json +66 -0
  6. package/dist/catalog/generated/details/answer-invalidation.json +43 -0
  7. package/dist/catalog/generated/details/answer-relevance.json +45 -0
  8. package/dist/catalog/generated/details/answerability.json +55 -0
  9. package/dist/catalog/generated/details/argument-fit.json +41 -0
  10. package/dist/catalog/generated/details/attempted-step.json +39 -0
  11. package/dist/catalog/generated/details/audience-fit.json +45 -0
  12. package/dist/catalog/generated/details/cache-match.json +41 -0
  13. package/dist/catalog/generated/details/cancellation-check.json +40 -0
  14. package/dist/catalog/generated/details/certainty-match.json +45 -0
  15. package/dist/catalog/generated/details/change-meaning.json +43 -0
  16. package/dist/catalog/generated/details/citation-match.json +64 -0
  17. package/dist/catalog/generated/details/citation-needed.json +39 -0
  18. package/dist/catalog/generated/details/claim-stance.json +55 -0
  19. package/dist/catalog/generated/details/clarify.json +64 -0
  20. package/dist/catalog/generated/details/confirmation-match.json +40 -0
  21. package/dist/catalog/generated/details/constraint-strength.json +48 -0
  22. package/dist/catalog/generated/details/context-role.json +45 -0
  23. package/dist/catalog/generated/details/correction-target.json +68 -0
  24. package/dist/catalog/generated/details/document-role.json +68 -0
  25. package/dist/catalog/generated/details/draft-compare.json +44 -0
  26. package/dist/catalog/generated/details/evidence-conflict.json +46 -0
  27. package/dist/catalog/generated/details/evidence-novelty.json +55 -0
  28. package/dist/catalog/generated/details/fact-stability.json +39 -0
  29. package/dist/catalog/generated/details/failure-kind.json +68 -0
  30. package/dist/catalog/generated/details/feedback-kind.json +69 -0
  31. package/dist/catalog/generated/details/field-select.json +68 -0
  32. package/dist/catalog/generated/details/followup-link.json +68 -0
  33. package/dist/catalog/generated/details/freshness-needed.json +38 -0
  34. package/dist/catalog/generated/details/frustration-signal.json +39 -0
  35. package/dist/catalog/generated/details/handoff.json +75 -0
  36. package/dist/catalog/generated/details/incident-match.json +68 -0
  37. package/dist/catalog/generated/details/instruction-conflict.json +52 -0
  38. package/dist/catalog/generated/details/instruction-fit.json +40 -0
  39. package/dist/catalog/generated/details/intent-change.json +43 -0
  40. package/dist/catalog/generated/details/issue-impact.json +42 -0
  41. package/dist/catalog/generated/details/memory-relation.json +46 -0
  42. package/dist/catalog/generated/details/memory-scope.json +42 -0
  43. package/dist/catalog/generated/details/memory-value.json +46 -0
  44. package/dist/catalog/generated/details/passage-duplicate.json +42 -0
  45. package/dist/catalog/generated/details/preference-kind.json +45 -0
  46. package/dist/catalog/generated/details/promise-check.json +42 -0
  47. package/dist/catalog/generated/details/query-equivalence.json +43 -0
  48. package/dist/catalog/generated/details/query-specificity.json +39 -0
  49. package/dist/catalog/generated/details/reference-resolve.json +69 -0
  50. package/dist/catalog/generated/details/repeated-attempt.json +43 -0
  51. package/dist/catalog/generated/details/reply-template-match.json +68 -0
  52. package/dist/catalog/generated/details/requirement-testability.json +45 -0
  53. package/dist/catalog/generated/details/rerank.json +55 -0
  54. package/dist/catalog/generated/details/resolution-check.json +40 -0
  55. package/dist/catalog/generated/details/response-needed.json +42 -0
  56. package/dist/catalog/generated/details/result-outcome.json +42 -0
  57. package/dist/catalog/generated/details/result-usefulness.json +45 -0
  58. package/dist/catalog/generated/details/retrieval-needed.json +39 -0
  59. package/dist/catalog/generated/details/route.json +51 -0
  60. package/dist/catalog/generated/details/source-applicability.json +39 -0
  61. package/dist/catalog/generated/details/step-complete.json +39 -0
  62. package/dist/catalog/generated/details/step-progress.json +43 -0
  63. package/dist/catalog/generated/details/summary-coverage.json +66 -0
  64. package/dist/catalog/generated/details/task-dependency.json +61 -0
  65. package/dist/catalog/generated/details/task-duplicate.json +49 -0
  66. package/dist/catalog/generated/details/ticket-match.json +43 -0
  67. package/dist/catalog/generated/details/tone-check.json +63 -0
  68. package/dist/catalog/generated/details/tool-fit.json +40 -0
  69. package/dist/catalog/generated/details/topic-shift.json +43 -0
  70. package/dist/catalog/generated/details/troubleshooting-fit.json +40 -0
  71. package/dist/catalog/generated/details/turn-intent.json +69 -0
  72. package/dist/catalog/generated/details/urgency-signal.json +39 -0
  73. package/dist/catalog/generated/details/verify.json +66 -0
  74. package/dist/catalog/generated/details/workaround-fit.json +40 -0
  75. package/dist/catalog/generated/loaders.d.ts +3 -0
  76. package/dist/catalog/generated/loaders.js +74 -0
  77. package/dist/catalog/generated/metadata.d.ts +2 -0
  78. package/dist/catalog/generated/metadata.js +1286 -0
  79. package/dist/catalog/generated/names.d.ts +1 -0
  80. package/dist/catalog/generated/names.js +75 -0
  81. package/dist/catalog/index.d.ts +9 -1764
  82. package/dist/catalog/index.js +8 -24
  83. package/dist/catalog/runner.d.ts +4 -0
  84. package/dist/catalog/runner.js +5 -0
  85. package/dist/catalog/schema.d.ts +57 -50
  86. package/dist/catalog/schema.js +2 -2
  87. package/dist/catalog/search.d.ts +3 -0
  88. package/dist/catalog/search.js +60 -0
  89. package/dist/cli/index.js +17 -8
  90. package/dist/cli/schema.d.ts +169 -167
  91. package/dist/cli/schema.js +37 -4
  92. package/dist/recipes/action-scope/schema.d.ts +3 -3
  93. package/dist/recipes/answer-consistency/schema.d.ts +3 -3
  94. package/dist/recipes/answer-coverage/schema.d.ts +6 -6
  95. package/dist/recipes/answerability/schema.d.ts +6 -6
  96. package/dist/recipes/cancellation-check/schema.d.ts +3 -3
  97. package/dist/recipes/certainty-match/schema.d.ts +3 -3
  98. package/dist/recipes/citation-needed/schema.d.ts +3 -3
  99. package/dist/recipes/claim-stance/demo.json +27 -0
  100. package/dist/recipes/claim-stance/index.d.ts +5 -0
  101. package/dist/recipes/claim-stance/index.js +17 -0
  102. package/dist/recipes/claim-stance/schema.d.ts +43 -0
  103. package/dist/recipes/claim-stance/schema.js +23 -0
  104. package/dist/recipes/clarify/schema.d.ts +3 -3
  105. package/dist/recipes/constraint-strength/demo.json +25 -0
  106. package/dist/recipes/constraint-strength/index.d.ts +5 -0
  107. package/dist/recipes/constraint-strength/index.js +16 -0
  108. package/dist/recipes/constraint-strength/schema.d.ts +39 -0
  109. package/dist/recipes/constraint-strength/schema.js +21 -0
  110. package/dist/recipes/document-role/schema.d.ts +6 -6
  111. package/dist/recipes/evidence-conflict/schema.d.ts +6 -6
  112. package/dist/recipes/feedback-kind/schema.d.ts +3 -3
  113. package/dist/recipes/freshness-needed/schema.d.ts +3 -3
  114. package/dist/recipes/handoff/schema.d.ts +3 -3
  115. package/dist/recipes/instruction-conflict/demo.json +27 -0
  116. package/dist/recipes/instruction-conflict/index.d.ts +5 -0
  117. package/dist/recipes/instruction-conflict/index.js +16 -0
  118. package/dist/recipes/instruction-conflict/schema.d.ts +40 -0
  119. package/dist/recipes/instruction-conflict/schema.js +22 -0
  120. package/dist/recipes/passage-duplicate/schema.d.ts +3 -3
  121. package/dist/recipes/preference-kind/schema.d.ts +6 -6
  122. package/dist/recipes/promise-check/schema.d.ts +3 -3
  123. package/dist/recipes/query-equivalence/schema.d.ts +3 -3
  124. package/dist/recipes/requirement-testability/demo.json +24 -0
  125. package/dist/recipes/requirement-testability/index.d.ts +5 -0
  126. package/dist/recipes/requirement-testability/index.js +15 -0
  127. package/dist/recipes/requirement-testability/schema.d.ts +36 -0
  128. package/dist/recipes/requirement-testability/schema.js +16 -0
  129. package/dist/recipes/result-outcome/schema.d.ts +3 -3
  130. package/dist/recipes/retrieval-needed/schema.d.ts +3 -3
  131. package/dist/recipes/step-progress/schema.d.ts +3 -3
  132. package/dist/recipes/summary-coverage/schema.d.ts +3 -3
  133. package/dist/recipes/task-dependency/demo.json +28 -0
  134. package/dist/recipes/task-dependency/index.d.ts +5 -0
  135. package/dist/recipes/task-dependency/index.js +17 -0
  136. package/dist/recipes/task-dependency/schema.d.ts +43 -0
  137. package/dist/recipes/task-dependency/schema.js +23 -0
  138. package/dist/recipes/task-duplicate/demo.json +27 -0
  139. package/dist/recipes/task-duplicate/index.d.ts +5 -0
  140. package/dist/recipes/task-duplicate/index.js +16 -0
  141. package/dist/recipes/task-duplicate/schema.d.ts +40 -0
  142. package/dist/recipes/task-duplicate/schema.js +22 -0
  143. package/dist/recipes/ticket-match/schema.d.ts +3 -3
  144. package/dist/recipes/topic-shift/schema.d.ts +3 -3
  145. package/dist/recipes/turn-intent/schema.d.ts +12 -12
  146. package/dist/src/index.d.ts +129 -117
  147. package/dist/src/index.js +57 -50
  148. package/dist/src/schema.d.ts +5 -0
  149. package/dist/src/schema.js +2 -0
  150. package/package.json +221 -188
  151. package/dist/catalog/groups/answers.d.ts +0 -565
  152. package/dist/catalog/groups/answers.js +0 -82
  153. package/dist/catalog/groups/conversation.d.ts +0 -608
  154. package/dist/catalog/groups/conversation.js +0 -90
  155. package/dist/catalog/groups/knowledge.d.ts +0 -522
  156. package/dist/catalog/groups/knowledge.js +0 -82
  157. package/dist/catalog/groups/retrieval.d.ts +0 -664
  158. package/dist/catalog/groups/retrieval.js +0 -106
  159. package/dist/catalog/groups/support.d.ts +0 -522
  160. package/dist/catalog/groups/support.js +0 -82
  161. package/dist/catalog/groups/workflow.d.ts +0 -623
  162. package/dist/catalog/groups/workflow.js +0 -98
  163. package/dist/catalog/recipes.d.ts +0 -3488
  164. package/dist/catalog/recipes.js +0 -14
  165. package/dist/examples/support/index.d.ts +0 -1
  166. package/dist/examples/support/index.js +0 -37
  167. package/dist/examples/support/schema.d.ts +0 -566
  168. package/dist/examples/support/schema.js +0 -76
  169. package/dist/examples/support/workflow.d.ts +0 -3
  170. package/dist/examples/support/workflow.js +0 -85
  171. package/dist/recipes/action-scope/metadata.d.ts +0 -8
  172. package/dist/recipes/action-scope/metadata.js +0 -10
  173. package/dist/recipes/answer-consistency/metadata.d.ts +0 -8
  174. package/dist/recipes/answer-consistency/metadata.js +0 -10
  175. package/dist/recipes/answer-coverage/metadata.d.ts +0 -8
  176. package/dist/recipes/answer-coverage/metadata.js +0 -11
  177. package/dist/recipes/answer-invalidation/metadata.d.ts +0 -8
  178. package/dist/recipes/answer-invalidation/metadata.js +0 -10
  179. package/dist/recipes/answer-relevance/metadata.d.ts +0 -8
  180. package/dist/recipes/answer-relevance/metadata.js +0 -10
  181. package/dist/recipes/answerability/metadata.d.ts +0 -8
  182. package/dist/recipes/answerability/metadata.js +0 -11
  183. package/dist/recipes/argument-fit/metadata.d.ts +0 -8
  184. package/dist/recipes/argument-fit/metadata.js +0 -10
  185. package/dist/recipes/attempted-step/metadata.d.ts +0 -8
  186. package/dist/recipes/attempted-step/metadata.js +0 -10
  187. package/dist/recipes/audience-fit/metadata.d.ts +0 -8
  188. package/dist/recipes/audience-fit/metadata.js +0 -10
  189. package/dist/recipes/cache-match/metadata.d.ts +0 -8
  190. package/dist/recipes/cache-match/metadata.js +0 -10
  191. package/dist/recipes/cancellation-check/metadata.d.ts +0 -8
  192. package/dist/recipes/cancellation-check/metadata.js +0 -10
  193. package/dist/recipes/certainty-match/metadata.d.ts +0 -8
  194. package/dist/recipes/certainty-match/metadata.js +0 -10
  195. package/dist/recipes/change-meaning/metadata.d.ts +0 -8
  196. package/dist/recipes/change-meaning/metadata.js +0 -10
  197. package/dist/recipes/citation-match/metadata.d.ts +0 -9
  198. package/dist/recipes/citation-match/metadata.js +0 -12
  199. package/dist/recipes/citation-needed/metadata.d.ts +0 -8
  200. package/dist/recipes/citation-needed/metadata.js +0 -10
  201. package/dist/recipes/clarify/metadata.d.ts +0 -8
  202. package/dist/recipes/clarify/metadata.js +0 -11
  203. package/dist/recipes/confirmation-match/metadata.d.ts +0 -8
  204. package/dist/recipes/confirmation-match/metadata.js +0 -10
  205. package/dist/recipes/context-role/metadata.d.ts +0 -8
  206. package/dist/recipes/context-role/metadata.js +0 -10
  207. package/dist/recipes/correction-target/metadata.d.ts +0 -8
  208. package/dist/recipes/correction-target/metadata.js +0 -11
  209. package/dist/recipes/document-role/metadata.d.ts +0 -8
  210. package/dist/recipes/document-role/metadata.js +0 -10
  211. package/dist/recipes/draft-compare/metadata.d.ts +0 -8
  212. package/dist/recipes/draft-compare/metadata.js +0 -10
  213. package/dist/recipes/evidence-conflict/metadata.d.ts +0 -8
  214. package/dist/recipes/evidence-conflict/metadata.js +0 -10
  215. package/dist/recipes/evidence-novelty/metadata.d.ts +0 -8
  216. package/dist/recipes/evidence-novelty/metadata.js +0 -11
  217. package/dist/recipes/fact-stability/metadata.d.ts +0 -8
  218. package/dist/recipes/fact-stability/metadata.js +0 -10
  219. package/dist/recipes/failure-kind/metadata.d.ts +0 -8
  220. package/dist/recipes/failure-kind/metadata.js +0 -11
  221. package/dist/recipes/feedback-kind/metadata.d.ts +0 -8
  222. package/dist/recipes/feedback-kind/metadata.js +0 -10
  223. package/dist/recipes/field-select/metadata.d.ts +0 -8
  224. package/dist/recipes/field-select/metadata.js +0 -11
  225. package/dist/recipes/followup-link/metadata.d.ts +0 -8
  226. package/dist/recipes/followup-link/metadata.js +0 -11
  227. package/dist/recipes/freshness-needed/metadata.d.ts +0 -8
  228. package/dist/recipes/freshness-needed/metadata.js +0 -10
  229. package/dist/recipes/frustration-signal/metadata.d.ts +0 -8
  230. package/dist/recipes/frustration-signal/metadata.js +0 -10
  231. package/dist/recipes/handoff/metadata.d.ts +0 -8
  232. package/dist/recipes/handoff/metadata.js +0 -11
  233. package/dist/recipes/incident-match/metadata.d.ts +0 -8
  234. package/dist/recipes/incident-match/metadata.js +0 -11
  235. package/dist/recipes/instruction-fit/metadata.d.ts +0 -8
  236. package/dist/recipes/instruction-fit/metadata.js +0 -10
  237. package/dist/recipes/intent-change/metadata.d.ts +0 -8
  238. package/dist/recipes/intent-change/metadata.js +0 -10
  239. package/dist/recipes/issue-impact/metadata.d.ts +0 -8
  240. package/dist/recipes/issue-impact/metadata.js +0 -10
  241. package/dist/recipes/memory-relation/metadata.d.ts +0 -8
  242. package/dist/recipes/memory-relation/metadata.js +0 -10
  243. package/dist/recipes/memory-scope/metadata.d.ts +0 -8
  244. package/dist/recipes/memory-scope/metadata.js +0 -10
  245. package/dist/recipes/memory-value/metadata.d.ts +0 -8
  246. package/dist/recipes/memory-value/metadata.js +0 -10
  247. package/dist/recipes/passage-duplicate/metadata.d.ts +0 -8
  248. package/dist/recipes/passage-duplicate/metadata.js +0 -10
  249. package/dist/recipes/preference-kind/metadata.d.ts +0 -8
  250. package/dist/recipes/preference-kind/metadata.js +0 -10
  251. package/dist/recipes/promise-check/metadata.d.ts +0 -8
  252. package/dist/recipes/promise-check/metadata.js +0 -10
  253. package/dist/recipes/query-equivalence/metadata.d.ts +0 -8
  254. package/dist/recipes/query-equivalence/metadata.js +0 -10
  255. package/dist/recipes/query-specificity/metadata.d.ts +0 -8
  256. package/dist/recipes/query-specificity/metadata.js +0 -10
  257. package/dist/recipes/reference-resolve/metadata.d.ts +0 -8
  258. package/dist/recipes/reference-resolve/metadata.js +0 -11
  259. package/dist/recipes/repeated-attempt/metadata.d.ts +0 -8
  260. package/dist/recipes/repeated-attempt/metadata.js +0 -10
  261. package/dist/recipes/reply-template-match/metadata.d.ts +0 -8
  262. package/dist/recipes/reply-template-match/metadata.js +0 -11
  263. package/dist/recipes/rerank/metadata.d.ts +0 -8
  264. package/dist/recipes/rerank/metadata.js +0 -11
  265. package/dist/recipes/resolution-check/metadata.d.ts +0 -8
  266. package/dist/recipes/resolution-check/metadata.js +0 -10
  267. package/dist/recipes/response-needed/metadata.d.ts +0 -8
  268. package/dist/recipes/response-needed/metadata.js +0 -10
  269. package/dist/recipes/result-outcome/metadata.d.ts +0 -8
  270. package/dist/recipes/result-outcome/metadata.js +0 -10
  271. package/dist/recipes/result-usefulness/metadata.d.ts +0 -8
  272. package/dist/recipes/result-usefulness/metadata.js +0 -10
  273. package/dist/recipes/retrieval-needed/metadata.d.ts +0 -8
  274. package/dist/recipes/retrieval-needed/metadata.js +0 -10
  275. package/dist/recipes/route/metadata.d.ts +0 -8
  276. package/dist/recipes/route/metadata.js +0 -11
  277. package/dist/recipes/source-applicability/metadata.d.ts +0 -8
  278. package/dist/recipes/source-applicability/metadata.js +0 -10
  279. package/dist/recipes/step-complete/metadata.d.ts +0 -8
  280. package/dist/recipes/step-complete/metadata.js +0 -10
  281. package/dist/recipes/step-progress/metadata.d.ts +0 -8
  282. package/dist/recipes/step-progress/metadata.js +0 -10
  283. package/dist/recipes/summary-coverage/metadata.d.ts +0 -8
  284. package/dist/recipes/summary-coverage/metadata.js +0 -11
  285. package/dist/recipes/ticket-match/metadata.d.ts +0 -8
  286. package/dist/recipes/ticket-match/metadata.js +0 -10
  287. package/dist/recipes/tone-check/metadata.d.ts +0 -8
  288. package/dist/recipes/tone-check/metadata.js +0 -11
  289. package/dist/recipes/tool-fit/metadata.d.ts +0 -8
  290. package/dist/recipes/tool-fit/metadata.js +0 -10
  291. package/dist/recipes/topic-shift/metadata.d.ts +0 -8
  292. package/dist/recipes/topic-shift/metadata.js +0 -10
  293. package/dist/recipes/troubleshooting-fit/metadata.d.ts +0 -8
  294. package/dist/recipes/troubleshooting-fit/metadata.js +0 -10
  295. package/dist/recipes/turn-intent/metadata.d.ts +0 -8
  296. package/dist/recipes/turn-intent/metadata.js +0 -10
  297. package/dist/recipes/urgency-signal/metadata.d.ts +0 -8
  298. package/dist/recipes/urgency-signal/metadata.js +0 -10
  299. package/dist/recipes/verify/metadata.d.ts +0 -8
  300. package/dist/recipes/verify/metadata.js +0 -11
  301. package/dist/recipes/workaround-fit/metadata.d.ts +0 -8
  302. package/dist/recipes/workaround-fit/metadata.js +0 -10
  303. package/examples/support/README.md +0 -60
  304. package/examples/support/demo.json +0 -156
  305. package/recipes/README.md +0 -128
  306. package/recipes/action-scope/README.md +0 -49
  307. package/recipes/answer-consistency/README.md +0 -50
  308. package/recipes/answer-coverage/README.md +0 -60
  309. package/recipes/answer-invalidation/README.md +0 -50
  310. package/recipes/answer-relevance/README.md +0 -49
  311. package/recipes/answerability/README.md +0 -54
  312. package/recipes/argument-fit/README.md +0 -51
  313. package/recipes/attempted-step/README.md +0 -48
  314. package/recipes/audience-fit/README.md +0 -50
  315. package/recipes/cache-match/README.md +0 -51
  316. package/recipes/cancellation-check/README.md +0 -50
  317. package/recipes/certainty-match/README.md +0 -49
  318. package/recipes/change-meaning/README.md +0 -49
  319. package/recipes/citation-match/README.md +0 -51
  320. package/recipes/citation-needed/README.md +0 -49
  321. package/recipes/clarify/README.md +0 -61
  322. package/recipes/confirmation-match/README.md +0 -49
  323. package/recipes/context-role/README.md +0 -49
  324. package/recipes/correction-target/README.md +0 -52
  325. package/recipes/document-role/README.md +0 -51
  326. package/recipes/draft-compare/README.md +0 -54
  327. package/recipes/evidence-conflict/README.md +0 -51
  328. package/recipes/evidence-novelty/README.md +0 -56
  329. package/recipes/fact-stability/README.md +0 -47
  330. package/recipes/failure-kind/README.md +0 -52
  331. package/recipes/feedback-kind/README.md +0 -51
  332. package/recipes/field-select/README.md +0 -53
  333. package/recipes/followup-link/README.md +0 -52
  334. package/recipes/freshness-needed/README.md +0 -46
  335. package/recipes/frustration-signal/README.md +0 -47
  336. package/recipes/handoff/README.md +0 -56
  337. package/recipes/incident-match/README.md +0 -52
  338. package/recipes/instruction-fit/README.md +0 -49
  339. package/recipes/intent-change/README.md +0 -50
  340. package/recipes/issue-impact/README.md +0 -48
  341. package/recipes/memory-relation/README.md +0 -52
  342. package/recipes/memory-scope/README.md +0 -50
  343. package/recipes/memory-value/README.md +0 -50
  344. package/recipes/passage-duplicate/README.md +0 -49
  345. package/recipes/preference-kind/README.md +0 -48
  346. package/recipes/promise-check/README.md +0 -48
  347. package/recipes/query-equivalence/README.md +0 -50
  348. package/recipes/query-specificity/README.md +0 -47
  349. package/recipes/reference-resolve/README.md +0 -54
  350. package/recipes/repeated-attempt/README.md +0 -50
  351. package/recipes/reply-template-match/README.md +0 -52
  352. package/recipes/rerank/README.md +0 -55
  353. package/recipes/resolution-check/README.md +0 -49
  354. package/recipes/response-needed/README.md +0 -48
  355. package/recipes/result-outcome/README.md +0 -49
  356. package/recipes/result-usefulness/README.md +0 -49
  357. package/recipes/retrieval-needed/README.md +0 -48
  358. package/recipes/route/README.md +0 -47
  359. package/recipes/source-applicability/README.md +0 -48
  360. package/recipes/step-complete/README.md +0 -48
  361. package/recipes/step-progress/README.md +0 -51
  362. package/recipes/summary-coverage/README.md +0 -60
  363. package/recipes/ticket-match/README.md +0 -50
  364. package/recipes/tone-check/README.md +0 -55
  365. package/recipes/tool-fit/README.md +0 -49
  366. package/recipes/topic-shift/README.md +0 -50
  367. package/recipes/troubleshooting-fit/README.md +0 -49
  368. package/recipes/turn-intent/README.md +0 -52
  369. package/recipes/urgency-signal/README.md +0 -47
  370. package/recipes/verify/README.md +0 -54
  371. package/recipes/workaround-fit/README.md +0 -50
  372. /package/{recipes → dist/recipes}/action-scope/demo.json +0 -0
  373. /package/{recipes → dist/recipes}/answer-consistency/demo.json +0 -0
  374. /package/{recipes → dist/recipes}/answer-coverage/demo.json +0 -0
  375. /package/{recipes → dist/recipes}/answer-invalidation/demo.json +0 -0
  376. /package/{recipes → dist/recipes}/answer-relevance/demo.json +0 -0
  377. /package/{recipes → dist/recipes}/answerability/demo.json +0 -0
  378. /package/{recipes → dist/recipes}/argument-fit/demo.json +0 -0
  379. /package/{recipes → dist/recipes}/attempted-step/demo.json +0 -0
  380. /package/{recipes → dist/recipes}/audience-fit/demo.json +0 -0
  381. /package/{recipes → dist/recipes}/cache-match/demo.json +0 -0
  382. /package/{recipes → dist/recipes}/cancellation-check/demo.json +0 -0
  383. /package/{recipes → dist/recipes}/certainty-match/demo.json +0 -0
  384. /package/{recipes → dist/recipes}/change-meaning/demo.json +0 -0
  385. /package/{recipes → dist/recipes}/citation-match/demo.json +0 -0
  386. /package/{recipes → dist/recipes}/citation-needed/demo.json +0 -0
  387. /package/{recipes → dist/recipes}/clarify/demo.json +0 -0
  388. /package/{recipes → dist/recipes}/confirmation-match/demo.json +0 -0
  389. /package/{recipes → dist/recipes}/context-role/demo.json +0 -0
  390. /package/{recipes → dist/recipes}/correction-target/demo.json +0 -0
  391. /package/{recipes → dist/recipes}/document-role/demo.json +0 -0
  392. /package/{recipes → dist/recipes}/draft-compare/demo.json +0 -0
  393. /package/{recipes → dist/recipes}/evidence-conflict/demo.json +0 -0
  394. /package/{recipes → dist/recipes}/evidence-novelty/demo.json +0 -0
  395. /package/{recipes → dist/recipes}/fact-stability/demo.json +0 -0
  396. /package/{recipes → dist/recipes}/failure-kind/demo.json +0 -0
  397. /package/{recipes → dist/recipes}/feedback-kind/demo.json +0 -0
  398. /package/{recipes → dist/recipes}/field-select/demo.json +0 -0
  399. /package/{recipes → dist/recipes}/followup-link/demo.json +0 -0
  400. /package/{recipes → dist/recipes}/freshness-needed/demo.json +0 -0
  401. /package/{recipes → dist/recipes}/frustration-signal/demo.json +0 -0
  402. /package/{recipes → dist/recipes}/handoff/demo.json +0 -0
  403. /package/{recipes → dist/recipes}/incident-match/demo.json +0 -0
  404. /package/{recipes → dist/recipes}/instruction-fit/demo.json +0 -0
  405. /package/{recipes → dist/recipes}/intent-change/demo.json +0 -0
  406. /package/{recipes → dist/recipes}/issue-impact/demo.json +0 -0
  407. /package/{recipes → dist/recipes}/memory-relation/demo.json +0 -0
  408. /package/{recipes → dist/recipes}/memory-scope/demo.json +0 -0
  409. /package/{recipes → dist/recipes}/memory-value/demo.json +0 -0
  410. /package/{recipes → dist/recipes}/passage-duplicate/demo.json +0 -0
  411. /package/{recipes → dist/recipes}/preference-kind/demo.json +0 -0
  412. /package/{recipes → dist/recipes}/promise-check/demo.json +0 -0
  413. /package/{recipes → dist/recipes}/query-equivalence/demo.json +0 -0
  414. /package/{recipes → dist/recipes}/query-specificity/demo.json +0 -0
  415. /package/{recipes → dist/recipes}/reference-resolve/demo.json +0 -0
  416. /package/{recipes → dist/recipes}/repeated-attempt/demo.json +0 -0
  417. /package/{recipes → dist/recipes}/reply-template-match/demo.json +0 -0
  418. /package/{recipes → dist/recipes}/rerank/demo.json +0 -0
  419. /package/{recipes → dist/recipes}/resolution-check/demo.json +0 -0
  420. /package/{recipes → dist/recipes}/response-needed/demo.json +0 -0
  421. /package/{recipes → dist/recipes}/result-outcome/demo.json +0 -0
  422. /package/{recipes → dist/recipes}/result-usefulness/demo.json +0 -0
  423. /package/{recipes → dist/recipes}/retrieval-needed/demo.json +0 -0
  424. /package/{recipes → dist/recipes}/route/demo.json +0 -0
  425. /package/{recipes → dist/recipes}/source-applicability/demo.json +0 -0
  426. /package/{recipes → dist/recipes}/step-complete/demo.json +0 -0
  427. /package/{recipes → dist/recipes}/step-progress/demo.json +0 -0
  428. /package/{recipes → dist/recipes}/summary-coverage/demo.json +0 -0
  429. /package/{recipes → dist/recipes}/ticket-match/demo.json +0 -0
  430. /package/{recipes → dist/recipes}/tone-check/demo.json +0 -0
  431. /package/{recipes → dist/recipes}/tool-fit/demo.json +0 -0
  432. /package/{recipes → dist/recipes}/topic-shift/demo.json +0 -0
  433. /package/{recipes → dist/recipes}/troubleshooting-fit/demo.json +0 -0
  434. /package/{recipes → dist/recipes}/turn-intent/demo.json +0 -0
  435. /package/{recipes → dist/recipes}/urgency-signal/demo.json +0 -0
  436. /package/{recipes → dist/recipes}/verify/demo.json +0 -0
  437. /package/{recipes → dist/recipes}/workaround-fit/demo.json +0 -0
@@ -1,14 +0,0 @@
1
- import { answersRecipes } from './groups/answers.js';
2
- import { retrievalRecipes } from './groups/retrieval.js';
3
- import { conversationRecipes } from './groups/conversation.js';
4
- import { workflowRecipes } from './groups/workflow.js';
5
- import { supportRecipes } from './groups/support.js';
6
- import { knowledgeRecipes } from './groups/knowledge.js';
7
- export const recipes = {
8
- ...answersRecipes,
9
- ...retrievalRecipes,
10
- ...conversationRecipes,
11
- ...workflowRecipes,
12
- ...supportRecipes,
13
- ...knowledgeRecipes,
14
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,37 +0,0 @@
1
- import { readFile } from 'node:fs/promises';
2
- import { z } from 'zod';
3
- import { createClient } from '../../src/client.js';
4
- import { answerSupportRequest } from './workflow.js';
5
- import { supportFixtureSchema } from './schema.js';
6
- async function main() {
7
- const args = z.union([z.tuple([]), z.tuple([z.literal('--live')])]).parse(process.argv.slice(2));
8
- const fixtureJson = await readFile(new URL('../../../examples/support/demo.json', import.meta.url), 'utf8');
9
- const fixture = supportFixtureSchema.parse(JSON.parse(fixtureJson));
10
- const live = args[0] === '--live';
11
- const client = live
12
- ? createClient({ timeout: 20_000, retry: { maxRetries: 0 } })
13
- : createFixtureClient(fixture.responses);
14
- const result = await answerSupportRequest(fixture.input, async () => fixture.draft, { client });
15
- process.stdout.write(`${JSON.stringify({
16
- mode: live ? 'live' : 'demo',
17
- note: live
18
- ? 'Live Jev decisions with a saved draft answer. No generative model was called.'
19
- : 'Hand-authored decision fixtures and a saved draft. No model was called; this does not measure accuracy.',
20
- result,
21
- }, null, 2)}\n`);
22
- }
23
- function createFixtureClient(responses) {
24
- return {
25
- systemOne: async (request) => {
26
- const key = Object.keys(request.questions).join(',');
27
- const response = responses[key];
28
- if (response === undefined)
29
- throw new Error(`No offline response for questions: ${key}`);
30
- return response;
31
- },
32
- };
33
- }
34
- main().catch((error) => {
35
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
36
- process.exitCode = 1;
37
- });
@@ -1,566 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const supportInputSchema: z.ZodObject<{
3
- request: z.ZodString;
4
- context: z.ZodOptional<z.ZodString>;
5
- routes: z.ZodRecord<z.ZodString, z.ZodString>;
6
- requirements: z.ZodArray<z.ZodObject<{
7
- id: z.ZodString;
8
- description: z.ZodString;
9
- }, z.core.$strip>>;
10
- handoffRules: z.ZodArray<z.ZodObject<{
11
- id: z.ZodString;
12
- description: z.ZodString;
13
- }, z.core.$strip>>;
14
- evidence: z.ZodArray<z.ZodObject<{
15
- id: z.ZodString;
16
- text: z.ZodString;
17
- }, z.core.$strip>>;
18
- minConfidence: z.ZodOptional<z.ZodNumber>;
19
- minRelevance: z.ZodOptional<z.ZodNumber>;
20
- topK: z.ZodOptional<z.ZodNumber>;
21
- }, z.core.$strip>;
22
- export declare const supportDraftContextSchema: z.ZodObject<{
23
- request: z.ZodString;
24
- context: z.ZodOptional<z.ZodString>;
25
- route: z.ZodString;
26
- evidence: z.ZodArray<z.ZodObject<{
27
- id: z.ZodString;
28
- text: z.ZodString;
29
- }, z.core.$strip>>;
30
- }, z.core.$strip>;
31
- export declare const supportDraftSchema: z.ZodObject<{
32
- claims: z.ZodArray<z.ZodObject<{
33
- id: z.ZodString;
34
- claim: z.ZodString;
35
- evidenceIds: z.ZodArray<z.ZodString>;
36
- }, z.core.$strip>>;
37
- }, z.core.$strip>;
38
- export declare const supportDecisionsSchema: z.ZodObject<{
39
- handoff: z.ZodOptional<z.ZodObject<{
40
- model: z.ZodString;
41
- usage: z.ZodObject<{
42
- input_tokens: z.ZodNumber;
43
- output_tokens: z.ZodNumber;
44
- }, z.core.$strip>;
45
- status: z.ZodEnum<{
46
- ready: "ready";
47
- review: "review";
48
- }>;
49
- decision: z.ZodEnum<{
50
- review: "review";
51
- human: "human";
52
- continue: "continue";
53
- }>;
54
- matchedRules: z.ZodArray<z.ZodString>;
55
- uncertainRules: z.ZodArray<z.ZodString>;
56
- checks: z.ZodArray<z.ZodObject<{
57
- id: z.ZodString;
58
- status: z.ZodEnum<{
59
- ready: "ready";
60
- review: "review";
61
- }>;
62
- verdict: z.ZodEnum<{
63
- matches: "matches";
64
- does_not_match: "does_not_match";
65
- unclear: "unclear";
66
- }>;
67
- confidence: z.ZodNumber;
68
- probabilities: z.ZodRecord<z.ZodEnum<{
69
- matches: "matches";
70
- does_not_match: "does_not_match";
71
- unclear: "unclear";
72
- }>, z.ZodNumber>;
73
- }, z.core.$strip>>;
74
- }, z.core.$strip>>;
75
- clarify: z.ZodOptional<z.ZodObject<{
76
- model: z.ZodString;
77
- usage: z.ZodObject<{
78
- input_tokens: z.ZodNumber;
79
- output_tokens: z.ZodNumber;
80
- }, z.core.$strip>;
81
- status: z.ZodEnum<{
82
- ready: "ready";
83
- review: "review";
84
- }>;
85
- canProceed: z.ZodBoolean;
86
- missing: z.ZodArray<z.ZodString>;
87
- ambiguous: z.ZodArray<z.ZodString>;
88
- checks: z.ZodArray<z.ZodObject<{
89
- id: z.ZodString;
90
- status: z.ZodEnum<{
91
- ready: "ready";
92
- review: "review";
93
- }>;
94
- verdict: z.ZodEnum<{
95
- ambiguous: "ambiguous";
96
- present: "present";
97
- missing: "missing";
98
- }>;
99
- confidence: z.ZodNumber;
100
- probabilities: z.ZodRecord<z.ZodEnum<{
101
- ambiguous: "ambiguous";
102
- present: "present";
103
- missing: "missing";
104
- }>, z.ZodNumber>;
105
- }, z.core.$strip>>;
106
- }, z.core.$strip>>;
107
- route: z.ZodOptional<z.ZodObject<{
108
- model: z.ZodString;
109
- usage: z.ZodObject<{
110
- input_tokens: z.ZodNumber;
111
- output_tokens: z.ZodNumber;
112
- }, z.core.$strip>;
113
- status: z.ZodEnum<{
114
- ready: "ready";
115
- review: "review";
116
- }>;
117
- route: z.ZodNullable<z.ZodString>;
118
- suggestedRoute: z.ZodNullable<z.ZodString>;
119
- confidence: z.ZodNumber;
120
- probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
121
- }, z.core.$strip>>;
122
- rerank: z.ZodOptional<z.ZodObject<{
123
- model: z.ZodString;
124
- usage: z.ZodObject<{
125
- input_tokens: z.ZodNumber;
126
- output_tokens: z.ZodNumber;
127
- }, z.core.$strip>;
128
- status: z.ZodEnum<{
129
- ready: "ready";
130
- review: "review";
131
- }>;
132
- items: z.ZodArray<z.ZodObject<{
133
- id: z.ZodString;
134
- text: z.ZodString;
135
- relevance: z.ZodNumber;
136
- }, z.core.$strip>>;
137
- evaluated: z.ZodNumber;
138
- }, z.core.$strip>>;
139
- answerability: z.ZodOptional<z.ZodObject<{
140
- model: z.ZodString;
141
- usage: z.ZodObject<{
142
- input_tokens: z.ZodNumber;
143
- output_tokens: z.ZodNumber;
144
- }, z.core.$strip>;
145
- status: z.ZodEnum<{
146
- ready: "ready";
147
- review: "review";
148
- }>;
149
- verdict: z.ZodEnum<{
150
- sufficient: "sufficient";
151
- partial: "partial";
152
- insufficient: "insufficient";
153
- conflicting: "conflicting";
154
- }>;
155
- canAnswer: z.ZodBoolean;
156
- confidence: z.ZodNumber;
157
- probabilities: z.ZodRecord<z.ZodEnum<{
158
- sufficient: "sufficient";
159
- partial: "partial";
160
- insufficient: "insufficient";
161
- conflicting: "conflicting";
162
- }>, z.ZodNumber>;
163
- }, z.core.$strip>>;
164
- verify: z.ZodOptional<z.ZodObject<{
165
- model: z.ZodString;
166
- usage: z.ZodObject<{
167
- input_tokens: z.ZodNumber;
168
- output_tokens: z.ZodNumber;
169
- }, z.core.$strip>;
170
- checks: z.ZodArray<z.ZodObject<{
171
- id: z.ZodString;
172
- status: z.ZodEnum<{
173
- ready: "ready";
174
- review: "review";
175
- }>;
176
- verdict: z.ZodEnum<{
177
- supported: "supported";
178
- contradicted: "contradicted";
179
- unsupported: "unsupported";
180
- }>;
181
- confidence: z.ZodNumber;
182
- probabilities: z.ZodRecord<z.ZodEnum<{
183
- supported: "supported";
184
- contradicted: "contradicted";
185
- unsupported: "unsupported";
186
- }>, z.ZodNumber>;
187
- }, z.core.$strip>>;
188
- allSupported: z.ZodBoolean;
189
- }, z.core.$strip>>;
190
- }, z.core.$strip>;
191
- export declare const supportResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
192
- outcome: z.ZodLiteral<"answered">;
193
- answer: z.ZodString;
194
- draft: z.ZodObject<{
195
- claims: z.ZodArray<z.ZodObject<{
196
- id: z.ZodString;
197
- claim: z.ZodString;
198
- evidenceIds: z.ZodArray<z.ZodString>;
199
- }, z.core.$strip>>;
200
- }, z.core.$strip>;
201
- decisions: z.ZodObject<{
202
- handoff: z.ZodOptional<z.ZodObject<{
203
- model: z.ZodString;
204
- usage: z.ZodObject<{
205
- input_tokens: z.ZodNumber;
206
- output_tokens: z.ZodNumber;
207
- }, z.core.$strip>;
208
- status: z.ZodEnum<{
209
- ready: "ready";
210
- review: "review";
211
- }>;
212
- decision: z.ZodEnum<{
213
- review: "review";
214
- human: "human";
215
- continue: "continue";
216
- }>;
217
- matchedRules: z.ZodArray<z.ZodString>;
218
- uncertainRules: z.ZodArray<z.ZodString>;
219
- checks: z.ZodArray<z.ZodObject<{
220
- id: z.ZodString;
221
- status: z.ZodEnum<{
222
- ready: "ready";
223
- review: "review";
224
- }>;
225
- verdict: z.ZodEnum<{
226
- matches: "matches";
227
- does_not_match: "does_not_match";
228
- unclear: "unclear";
229
- }>;
230
- confidence: z.ZodNumber;
231
- probabilities: z.ZodRecord<z.ZodEnum<{
232
- matches: "matches";
233
- does_not_match: "does_not_match";
234
- unclear: "unclear";
235
- }>, z.ZodNumber>;
236
- }, z.core.$strip>>;
237
- }, z.core.$strip>>;
238
- clarify: z.ZodOptional<z.ZodObject<{
239
- model: z.ZodString;
240
- usage: z.ZodObject<{
241
- input_tokens: z.ZodNumber;
242
- output_tokens: z.ZodNumber;
243
- }, z.core.$strip>;
244
- status: z.ZodEnum<{
245
- ready: "ready";
246
- review: "review";
247
- }>;
248
- canProceed: z.ZodBoolean;
249
- missing: z.ZodArray<z.ZodString>;
250
- ambiguous: z.ZodArray<z.ZodString>;
251
- checks: z.ZodArray<z.ZodObject<{
252
- id: z.ZodString;
253
- status: z.ZodEnum<{
254
- ready: "ready";
255
- review: "review";
256
- }>;
257
- verdict: z.ZodEnum<{
258
- ambiguous: "ambiguous";
259
- present: "present";
260
- missing: "missing";
261
- }>;
262
- confidence: z.ZodNumber;
263
- probabilities: z.ZodRecord<z.ZodEnum<{
264
- ambiguous: "ambiguous";
265
- present: "present";
266
- missing: "missing";
267
- }>, z.ZodNumber>;
268
- }, z.core.$strip>>;
269
- }, z.core.$strip>>;
270
- route: z.ZodOptional<z.ZodObject<{
271
- model: z.ZodString;
272
- usage: z.ZodObject<{
273
- input_tokens: z.ZodNumber;
274
- output_tokens: z.ZodNumber;
275
- }, z.core.$strip>;
276
- status: z.ZodEnum<{
277
- ready: "ready";
278
- review: "review";
279
- }>;
280
- route: z.ZodNullable<z.ZodString>;
281
- suggestedRoute: z.ZodNullable<z.ZodString>;
282
- confidence: z.ZodNumber;
283
- probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
284
- }, z.core.$strip>>;
285
- rerank: z.ZodOptional<z.ZodObject<{
286
- model: z.ZodString;
287
- usage: z.ZodObject<{
288
- input_tokens: z.ZodNumber;
289
- output_tokens: z.ZodNumber;
290
- }, z.core.$strip>;
291
- status: z.ZodEnum<{
292
- ready: "ready";
293
- review: "review";
294
- }>;
295
- items: z.ZodArray<z.ZodObject<{
296
- id: z.ZodString;
297
- text: z.ZodString;
298
- relevance: z.ZodNumber;
299
- }, z.core.$strip>>;
300
- evaluated: z.ZodNumber;
301
- }, z.core.$strip>>;
302
- answerability: z.ZodOptional<z.ZodObject<{
303
- model: z.ZodString;
304
- usage: z.ZodObject<{
305
- input_tokens: z.ZodNumber;
306
- output_tokens: z.ZodNumber;
307
- }, z.core.$strip>;
308
- status: z.ZodEnum<{
309
- ready: "ready";
310
- review: "review";
311
- }>;
312
- verdict: z.ZodEnum<{
313
- sufficient: "sufficient";
314
- partial: "partial";
315
- insufficient: "insufficient";
316
- conflicting: "conflicting";
317
- }>;
318
- canAnswer: z.ZodBoolean;
319
- confidence: z.ZodNumber;
320
- probabilities: z.ZodRecord<z.ZodEnum<{
321
- sufficient: "sufficient";
322
- partial: "partial";
323
- insufficient: "insufficient";
324
- conflicting: "conflicting";
325
- }>, z.ZodNumber>;
326
- }, z.core.$strip>>;
327
- verify: z.ZodOptional<z.ZodObject<{
328
- model: z.ZodString;
329
- usage: z.ZodObject<{
330
- input_tokens: z.ZodNumber;
331
- output_tokens: z.ZodNumber;
332
- }, z.core.$strip>;
333
- checks: z.ZodArray<z.ZodObject<{
334
- id: z.ZodString;
335
- status: z.ZodEnum<{
336
- ready: "ready";
337
- review: "review";
338
- }>;
339
- verdict: z.ZodEnum<{
340
- supported: "supported";
341
- contradicted: "contradicted";
342
- unsupported: "unsupported";
343
- }>;
344
- confidence: z.ZodNumber;
345
- probabilities: z.ZodRecord<z.ZodEnum<{
346
- supported: "supported";
347
- contradicted: "contradicted";
348
- unsupported: "unsupported";
349
- }>, z.ZodNumber>;
350
- }, z.core.$strip>>;
351
- allSupported: z.ZodBoolean;
352
- }, z.core.$strip>>;
353
- }, z.core.$strip>;
354
- }, z.core.$strip>, z.ZodObject<{
355
- outcome: z.ZodEnum<{
356
- review: "review";
357
- human: "human";
358
- clarification: "clarification";
359
- no_evidence: "no_evidence";
360
- cannot_answer: "cannot_answer";
361
- unverified: "unverified";
362
- }>;
363
- stage: z.ZodEnum<{
364
- route: "route";
365
- answerability: "answerability";
366
- verify: "verify";
367
- rerank: "rerank";
368
- clarify: "clarify";
369
- handoff: "handoff";
370
- }>;
371
- decisions: z.ZodObject<{
372
- handoff: z.ZodOptional<z.ZodObject<{
373
- model: z.ZodString;
374
- usage: z.ZodObject<{
375
- input_tokens: z.ZodNumber;
376
- output_tokens: z.ZodNumber;
377
- }, z.core.$strip>;
378
- status: z.ZodEnum<{
379
- ready: "ready";
380
- review: "review";
381
- }>;
382
- decision: z.ZodEnum<{
383
- review: "review";
384
- human: "human";
385
- continue: "continue";
386
- }>;
387
- matchedRules: z.ZodArray<z.ZodString>;
388
- uncertainRules: z.ZodArray<z.ZodString>;
389
- checks: z.ZodArray<z.ZodObject<{
390
- id: z.ZodString;
391
- status: z.ZodEnum<{
392
- ready: "ready";
393
- review: "review";
394
- }>;
395
- verdict: z.ZodEnum<{
396
- matches: "matches";
397
- does_not_match: "does_not_match";
398
- unclear: "unclear";
399
- }>;
400
- confidence: z.ZodNumber;
401
- probabilities: z.ZodRecord<z.ZodEnum<{
402
- matches: "matches";
403
- does_not_match: "does_not_match";
404
- unclear: "unclear";
405
- }>, z.ZodNumber>;
406
- }, z.core.$strip>>;
407
- }, z.core.$strip>>;
408
- clarify: z.ZodOptional<z.ZodObject<{
409
- model: z.ZodString;
410
- usage: z.ZodObject<{
411
- input_tokens: z.ZodNumber;
412
- output_tokens: z.ZodNumber;
413
- }, z.core.$strip>;
414
- status: z.ZodEnum<{
415
- ready: "ready";
416
- review: "review";
417
- }>;
418
- canProceed: z.ZodBoolean;
419
- missing: z.ZodArray<z.ZodString>;
420
- ambiguous: z.ZodArray<z.ZodString>;
421
- checks: z.ZodArray<z.ZodObject<{
422
- id: z.ZodString;
423
- status: z.ZodEnum<{
424
- ready: "ready";
425
- review: "review";
426
- }>;
427
- verdict: z.ZodEnum<{
428
- ambiguous: "ambiguous";
429
- present: "present";
430
- missing: "missing";
431
- }>;
432
- confidence: z.ZodNumber;
433
- probabilities: z.ZodRecord<z.ZodEnum<{
434
- ambiguous: "ambiguous";
435
- present: "present";
436
- missing: "missing";
437
- }>, z.ZodNumber>;
438
- }, z.core.$strip>>;
439
- }, z.core.$strip>>;
440
- route: z.ZodOptional<z.ZodObject<{
441
- model: z.ZodString;
442
- usage: z.ZodObject<{
443
- input_tokens: z.ZodNumber;
444
- output_tokens: z.ZodNumber;
445
- }, z.core.$strip>;
446
- status: z.ZodEnum<{
447
- ready: "ready";
448
- review: "review";
449
- }>;
450
- route: z.ZodNullable<z.ZodString>;
451
- suggestedRoute: z.ZodNullable<z.ZodString>;
452
- confidence: z.ZodNumber;
453
- probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
454
- }, z.core.$strip>>;
455
- rerank: z.ZodOptional<z.ZodObject<{
456
- model: z.ZodString;
457
- usage: z.ZodObject<{
458
- input_tokens: z.ZodNumber;
459
- output_tokens: z.ZodNumber;
460
- }, z.core.$strip>;
461
- status: z.ZodEnum<{
462
- ready: "ready";
463
- review: "review";
464
- }>;
465
- items: z.ZodArray<z.ZodObject<{
466
- id: z.ZodString;
467
- text: z.ZodString;
468
- relevance: z.ZodNumber;
469
- }, z.core.$strip>>;
470
- evaluated: z.ZodNumber;
471
- }, z.core.$strip>>;
472
- answerability: z.ZodOptional<z.ZodObject<{
473
- model: z.ZodString;
474
- usage: z.ZodObject<{
475
- input_tokens: z.ZodNumber;
476
- output_tokens: z.ZodNumber;
477
- }, z.core.$strip>;
478
- status: z.ZodEnum<{
479
- ready: "ready";
480
- review: "review";
481
- }>;
482
- verdict: z.ZodEnum<{
483
- sufficient: "sufficient";
484
- partial: "partial";
485
- insufficient: "insufficient";
486
- conflicting: "conflicting";
487
- }>;
488
- canAnswer: z.ZodBoolean;
489
- confidence: z.ZodNumber;
490
- probabilities: z.ZodRecord<z.ZodEnum<{
491
- sufficient: "sufficient";
492
- partial: "partial";
493
- insufficient: "insufficient";
494
- conflicting: "conflicting";
495
- }>, z.ZodNumber>;
496
- }, z.core.$strip>>;
497
- verify: z.ZodOptional<z.ZodObject<{
498
- model: z.ZodString;
499
- usage: z.ZodObject<{
500
- input_tokens: z.ZodNumber;
501
- output_tokens: z.ZodNumber;
502
- }, z.core.$strip>;
503
- checks: z.ZodArray<z.ZodObject<{
504
- id: z.ZodString;
505
- status: z.ZodEnum<{
506
- ready: "ready";
507
- review: "review";
508
- }>;
509
- verdict: z.ZodEnum<{
510
- supported: "supported";
511
- contradicted: "contradicted";
512
- unsupported: "unsupported";
513
- }>;
514
- confidence: z.ZodNumber;
515
- probabilities: z.ZodRecord<z.ZodEnum<{
516
- supported: "supported";
517
- contradicted: "contradicted";
518
- unsupported: "unsupported";
519
- }>, z.ZodNumber>;
520
- }, z.core.$strip>>;
521
- allSupported: z.ZodBoolean;
522
- }, z.core.$strip>>;
523
- }, z.core.$strip>;
524
- }, z.core.$strip>], "outcome">;
525
- export declare const supportFixtureSchema: z.ZodObject<{
526
- input: z.ZodObject<{
527
- request: z.ZodString;
528
- context: z.ZodOptional<z.ZodString>;
529
- routes: z.ZodRecord<z.ZodString, z.ZodString>;
530
- requirements: z.ZodArray<z.ZodObject<{
531
- id: z.ZodString;
532
- description: z.ZodString;
533
- }, z.core.$strip>>;
534
- handoffRules: z.ZodArray<z.ZodObject<{
535
- id: z.ZodString;
536
- description: z.ZodString;
537
- }, z.core.$strip>>;
538
- evidence: z.ZodArray<z.ZodObject<{
539
- id: z.ZodString;
540
- text: z.ZodString;
541
- }, z.core.$strip>>;
542
- minConfidence: z.ZodOptional<z.ZodNumber>;
543
- minRelevance: z.ZodOptional<z.ZodNumber>;
544
- topK: z.ZodOptional<z.ZodNumber>;
545
- }, z.core.$strip>;
546
- draft: z.ZodObject<{
547
- claims: z.ZodArray<z.ZodObject<{
548
- id: z.ZodString;
549
- claim: z.ZodString;
550
- evidenceIds: z.ZodArray<z.ZodString>;
551
- }, z.core.$strip>>;
552
- }, z.core.$strip>;
553
- responses: z.ZodRecord<z.ZodString, z.ZodObject<{
554
- model: z.ZodString;
555
- usage: z.ZodObject<{
556
- input_tokens: z.ZodNumber;
557
- output_tokens: z.ZodNumber;
558
- }, z.core.$strip>;
559
- answers: z.ZodRecord<z.ZodString, z.ZodUnknown>;
560
- }, z.core.$strip>>;
561
- }, z.core.$strip>;
562
- export type SupportInput = z.infer<typeof supportInputSchema>;
563
- export type SupportDraftContext = z.infer<typeof supportDraftContextSchema>;
564
- export type SupportDraft = z.infer<typeof supportDraftSchema>;
565
- export type SupportDecisions = z.infer<typeof supportDecisionsSchema>;
566
- export type SupportResult = z.infer<typeof supportResultSchema>;
@@ -1,76 +0,0 @@
1
- import { z } from 'zod';
2
- import { nonEmptyText, probability, decisionResponseSchema } from '../../src/schema.js';
3
- import { routeInputSchema, routeResultSchema } from '../../recipes/route/schema.js';
4
- import { rerankResultSchema } from '../../recipes/rerank/schema.js';
5
- import { verifyResultSchema } from '../../recipes/verify/schema.js';
6
- import { answerabilityEvidenceSchema, answerabilityResultSchema, } from '../../recipes/answerability/schema.js';
7
- import { clarifyInputSchema, clarifyResultSchema } from '../../recipes/clarify/schema.js';
8
- import { handoffInputSchema, handoffResultSchema } from '../../recipes/handoff/schema.js';
9
- export const supportInputSchema = z.object({
10
- request: nonEmptyText,
11
- context: nonEmptyText.optional(),
12
- routes: routeInputSchema.shape.routes,
13
- requirements: clarifyInputSchema.shape.requirements,
14
- handoffRules: handoffInputSchema.shape.rules,
15
- evidence: z
16
- .array(answerabilityEvidenceSchema)
17
- .max(100)
18
- .refine((items) => new Set(items.map((item) => item.id)).size === items.length, 'Evidence IDs must be unique.'),
19
- minConfidence: probability.optional(),
20
- minRelevance: probability.optional(),
21
- topK: z.number().int().min(1).max(50).optional(),
22
- });
23
- export const supportDraftContextSchema = z.object({
24
- request: nonEmptyText,
25
- context: nonEmptyText.optional(),
26
- route: nonEmptyText,
27
- evidence: z.array(answerabilityEvidenceSchema).min(1).max(50),
28
- });
29
- export const supportDraftSchema = z.object({
30
- claims: z
31
- .array(z.object({
32
- id: nonEmptyText,
33
- claim: nonEmptyText,
34
- evidenceIds: z
35
- .array(nonEmptyText)
36
- .min(1)
37
- .max(50)
38
- .refine((ids) => new Set(ids).size === ids.length, 'Evidence references must be unique.'),
39
- }))
40
- .min(1)
41
- .max(100)
42
- .refine((claims) => new Set(claims.map((claim) => claim.id)).size === claims.length, 'Claim IDs must be unique.'),
43
- });
44
- export const supportDecisionsSchema = z.object({
45
- handoff: handoffResultSchema.optional(),
46
- clarify: clarifyResultSchema.optional(),
47
- route: routeResultSchema.optional(),
48
- rerank: rerankResultSchema.optional(),
49
- answerability: answerabilityResultSchema.optional(),
50
- verify: verifyResultSchema.optional(),
51
- });
52
- export const supportResultSchema = z.discriminatedUnion('outcome', [
53
- z.object({
54
- outcome: z.literal('answered'),
55
- answer: nonEmptyText,
56
- draft: supportDraftSchema,
57
- decisions: supportDecisionsSchema,
58
- }),
59
- z.object({
60
- outcome: z.enum([
61
- 'human',
62
- 'review',
63
- 'clarification',
64
- 'no_evidence',
65
- 'cannot_answer',
66
- 'unverified',
67
- ]),
68
- stage: z.enum(['handoff', 'clarify', 'route', 'rerank', 'answerability', 'verify']),
69
- decisions: supportDecisionsSchema,
70
- }),
71
- ]);
72
- export const supportFixtureSchema = z.object({
73
- input: supportInputSchema,
74
- draft: supportDraftSchema,
75
- responses: z.record(nonEmptyText, decisionResponseSchema),
76
- });