jev-recipes 0.0.4 → 0.2.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.
- package/CHANGELOG.md +11 -0
- package/README.md +52 -63
- package/dist/catalog/groups/answers.d.ts +565 -0
- package/dist/catalog/groups/answers.js +82 -0
- package/dist/catalog/groups/conversation.d.ts +608 -0
- package/dist/catalog/groups/conversation.js +90 -0
- package/dist/catalog/groups/knowledge.d.ts +522 -0
- package/dist/catalog/groups/knowledge.js +82 -0
- package/dist/catalog/groups/retrieval.d.ts +664 -0
- package/dist/catalog/groups/retrieval.js +106 -0
- package/dist/catalog/groups/support.d.ts +522 -0
- package/dist/catalog/groups/support.js +82 -0
- package/dist/catalog/groups/workflow.d.ts +623 -0
- package/dist/catalog/groups/workflow.js +98 -0
- package/dist/catalog/index.d.ts +1564 -5
- package/dist/catalog/recipes.d.ts +3239 -102
- package/dist/catalog/recipes.js +12 -48
- package/dist/catalog/schema.d.ts +65 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/schema.d.ts +191 -3
- package/dist/examples/support/schema.d.ts +7 -7
- package/dist/recipes/action-scope/index.d.ts +5 -0
- package/dist/recipes/action-scope/index.js +15 -0
- package/dist/recipes/action-scope/metadata.d.ts +8 -0
- package/dist/recipes/action-scope/metadata.js +10 -0
- package/dist/recipes/action-scope/schema.d.ts +37 -0
- package/dist/recipes/action-scope/schema.js +15 -0
- package/dist/recipes/answer-consistency/index.d.ts +5 -0
- package/dist/recipes/answer-consistency/index.js +16 -0
- package/dist/recipes/answer-consistency/metadata.d.ts +8 -0
- package/dist/recipes/answer-consistency/metadata.js +10 -0
- package/dist/recipes/answer-consistency/schema.d.ts +40 -0
- package/dist/recipes/answer-consistency/schema.js +20 -0
- package/dist/recipes/answer-coverage/index.d.ts +5 -0
- package/dist/recipes/answer-coverage/index.js +22 -0
- package/dist/recipes/answer-coverage/metadata.d.ts +8 -0
- package/dist/recipes/answer-coverage/metadata.js +11 -0
- package/dist/recipes/answer-coverage/schema.d.ts +50 -0
- package/dist/recipes/answer-coverage/schema.js +22 -0
- package/dist/recipes/answer-invalidation/index.d.ts +5 -0
- package/dist/recipes/answer-invalidation/index.js +15 -0
- package/dist/recipes/answer-invalidation/metadata.d.ts +8 -0
- package/dist/recipes/answer-invalidation/metadata.js +10 -0
- package/dist/recipes/answer-invalidation/schema.d.ts +37 -0
- package/dist/recipes/answer-invalidation/schema.js +19 -0
- package/dist/recipes/answer-relevance/index.d.ts +5 -0
- package/dist/recipes/answer-relevance/index.js +16 -0
- package/dist/recipes/answer-relevance/metadata.d.ts +8 -0
- package/dist/recipes/answer-relevance/metadata.js +10 -0
- package/dist/recipes/answer-relevance/schema.d.ts +39 -0
- package/dist/recipes/answer-relevance/schema.js +19 -0
- package/dist/recipes/answerability/index.js +15 -27
- package/dist/recipes/argument-fit/index.d.ts +5 -0
- package/dist/recipes/argument-fit/index.js +15 -0
- package/dist/recipes/argument-fit/metadata.d.ts +8 -0
- package/dist/recipes/argument-fit/metadata.js +10 -0
- package/dist/recipes/argument-fit/schema.d.ts +38 -0
- package/dist/recipes/argument-fit/schema.js +16 -0
- package/dist/recipes/attempted-step/index.d.ts +5 -0
- package/dist/recipes/attempted-step/index.js +15 -0
- package/dist/recipes/attempted-step/metadata.d.ts +8 -0
- package/dist/recipes/attempted-step/metadata.js +10 -0
- package/dist/recipes/attempted-step/schema.d.ts +36 -0
- package/dist/recipes/attempted-step/schema.js +14 -0
- package/dist/recipes/audience-fit/index.d.ts +5 -0
- package/dist/recipes/audience-fit/index.js +16 -0
- package/dist/recipes/audience-fit/metadata.d.ts +8 -0
- package/dist/recipes/audience-fit/metadata.js +10 -0
- package/dist/recipes/audience-fit/schema.d.ts +39 -0
- package/dist/recipes/audience-fit/schema.js +19 -0
- package/dist/recipes/cache-match/index.d.ts +5 -0
- package/dist/recipes/cache-match/index.js +15 -0
- package/dist/recipes/cache-match/metadata.d.ts +8 -0
- package/dist/recipes/cache-match/metadata.js +10 -0
- package/dist/recipes/cache-match/schema.d.ts +38 -0
- package/dist/recipes/cache-match/schema.js +16 -0
- package/dist/recipes/cancellation-check/index.d.ts +5 -0
- package/dist/recipes/cancellation-check/index.js +16 -0
- package/dist/recipes/cancellation-check/metadata.d.ts +8 -0
- package/dist/recipes/cancellation-check/metadata.js +10 -0
- package/dist/recipes/cancellation-check/schema.d.ts +40 -0
- package/dist/recipes/cancellation-check/schema.js +15 -0
- package/dist/recipes/certainty-match/index.d.ts +5 -0
- package/dist/recipes/certainty-match/index.js +16 -0
- package/dist/recipes/certainty-match/metadata.d.ts +8 -0
- package/dist/recipes/certainty-match/metadata.js +10 -0
- package/dist/recipes/certainty-match/schema.d.ts +39 -0
- package/dist/recipes/certainty-match/schema.js +19 -0
- package/dist/recipes/change-meaning/index.d.ts +5 -0
- package/dist/recipes/change-meaning/index.js +15 -0
- package/dist/recipes/change-meaning/metadata.d.ts +8 -0
- package/dist/recipes/change-meaning/metadata.js +10 -0
- package/dist/recipes/change-meaning/schema.d.ts +37 -0
- package/dist/recipes/change-meaning/schema.js +15 -0
- package/dist/recipes/citation-match/index.d.ts +5 -0
- package/dist/recipes/citation-match/index.js +21 -0
- package/dist/recipes/citation-match/metadata.d.ts +9 -0
- package/dist/recipes/citation-match/metadata.js +12 -0
- package/dist/recipes/citation-match/schema.d.ts +41 -0
- package/dist/recipes/citation-match/schema.js +13 -0
- package/dist/recipes/citation-needed/index.d.ts +5 -0
- package/dist/recipes/citation-needed/index.js +15 -0
- package/dist/recipes/citation-needed/metadata.d.ts +8 -0
- package/dist/recipes/citation-needed/metadata.js +10 -0
- package/dist/recipes/citation-needed/schema.d.ts +36 -0
- package/dist/recipes/citation-needed/schema.js +14 -0
- package/dist/recipes/clarify/index.js +15 -34
- package/dist/recipes/clarify/schema.d.ts +3 -3
- package/dist/recipes/confirmation-match/index.d.ts +5 -0
- package/dist/recipes/confirmation-match/index.js +15 -0
- package/dist/recipes/confirmation-match/metadata.d.ts +8 -0
- package/dist/recipes/confirmation-match/metadata.js +10 -0
- package/dist/recipes/confirmation-match/schema.d.ts +37 -0
- package/dist/recipes/confirmation-match/schema.js +15 -0
- package/dist/recipes/context-role/index.d.ts +5 -0
- package/dist/recipes/context-role/index.js +16 -0
- package/dist/recipes/context-role/metadata.d.ts +8 -0
- package/dist/recipes/context-role/metadata.js +10 -0
- package/dist/recipes/context-role/schema.d.ts +39 -0
- package/dist/recipes/context-role/schema.js +19 -0
- package/dist/recipes/correction-target/index.d.ts +5 -0
- package/dist/recipes/correction-target/index.js +7 -0
- package/dist/recipes/correction-target/metadata.d.ts +8 -0
- package/dist/recipes/correction-target/metadata.js +11 -0
- package/dist/recipes/correction-target/schema.d.ts +36 -0
- package/dist/recipes/correction-target/schema.js +9 -0
- package/dist/recipes/document-role/index.d.ts +5 -0
- package/dist/recipes/document-role/index.js +19 -0
- package/dist/recipes/document-role/metadata.d.ts +8 -0
- package/dist/recipes/document-role/metadata.js +10 -0
- package/dist/recipes/document-role/schema.d.ts +47 -0
- package/dist/recipes/document-role/schema.js +21 -0
- package/dist/recipes/draft-compare/index.d.ts +5 -0
- package/dist/recipes/draft-compare/index.js +17 -0
- package/dist/recipes/draft-compare/metadata.d.ts +8 -0
- package/dist/recipes/draft-compare/metadata.js +10 -0
- package/dist/recipes/draft-compare/schema.d.ts +44 -0
- package/dist/recipes/draft-compare/schema.js +16 -0
- package/dist/recipes/evidence-conflict/index.d.ts +5 -0
- package/dist/recipes/evidence-conflict/index.js +16 -0
- package/dist/recipes/evidence-conflict/metadata.d.ts +8 -0
- package/dist/recipes/evidence-conflict/metadata.js +10 -0
- package/dist/recipes/evidence-conflict/schema.d.ts +40 -0
- package/dist/recipes/evidence-conflict/schema.js +20 -0
- package/dist/recipes/evidence-novelty/index.d.ts +5 -0
- package/dist/recipes/evidence-novelty/index.js +16 -0
- package/dist/recipes/evidence-novelty/metadata.d.ts +8 -0
- package/dist/recipes/evidence-novelty/metadata.js +11 -0
- package/dist/recipes/evidence-novelty/schema.d.ts +43 -0
- package/dist/recipes/evidence-novelty/schema.js +20 -0
- package/dist/recipes/fact-stability/index.d.ts +5 -0
- package/dist/recipes/fact-stability/index.js +15 -0
- package/dist/recipes/fact-stability/metadata.d.ts +8 -0
- package/dist/recipes/fact-stability/metadata.js +10 -0
- package/dist/recipes/fact-stability/schema.d.ts +36 -0
- package/dist/recipes/fact-stability/schema.js +14 -0
- package/dist/recipes/failure-kind/index.d.ts +5 -0
- package/dist/recipes/failure-kind/index.js +7 -0
- package/dist/recipes/failure-kind/metadata.d.ts +8 -0
- package/dist/recipes/failure-kind/metadata.js +11 -0
- package/dist/recipes/failure-kind/schema.d.ts +36 -0
- package/dist/recipes/failure-kind/schema.js +9 -0
- package/dist/recipes/feedback-kind/index.d.ts +5 -0
- package/dist/recipes/feedback-kind/index.js +19 -0
- package/dist/recipes/feedback-kind/metadata.d.ts +8 -0
- package/dist/recipes/feedback-kind/metadata.js +10 -0
- package/dist/recipes/feedback-kind/schema.d.ts +48 -0
- package/dist/recipes/feedback-kind/schema.js +22 -0
- package/dist/recipes/field-select/index.d.ts +5 -0
- package/dist/recipes/field-select/index.js +7 -0
- package/dist/recipes/field-select/metadata.d.ts +8 -0
- package/dist/recipes/field-select/metadata.js +11 -0
- package/dist/recipes/field-select/schema.d.ts +36 -0
- package/dist/recipes/field-select/schema.js +9 -0
- package/dist/recipes/followup-link/index.d.ts +5 -0
- package/dist/recipes/followup-link/index.js +7 -0
- package/dist/recipes/followup-link/metadata.d.ts +8 -0
- package/dist/recipes/followup-link/metadata.js +11 -0
- package/dist/recipes/followup-link/schema.d.ts +36 -0
- package/dist/recipes/followup-link/schema.js +9 -0
- package/dist/recipes/freshness-needed/index.d.ts +5 -0
- package/dist/recipes/freshness-needed/index.js +15 -0
- package/dist/recipes/freshness-needed/metadata.d.ts +8 -0
- package/dist/recipes/freshness-needed/metadata.js +10 -0
- package/dist/recipes/freshness-needed/schema.d.ts +35 -0
- package/dist/recipes/freshness-needed/schema.js +13 -0
- package/dist/recipes/frustration-signal/index.d.ts +5 -0
- package/dist/recipes/frustration-signal/index.js +15 -0
- package/dist/recipes/frustration-signal/metadata.d.ts +8 -0
- package/dist/recipes/frustration-signal/metadata.js +10 -0
- package/dist/recipes/frustration-signal/schema.d.ts +36 -0
- package/dist/recipes/frustration-signal/schema.js +14 -0
- package/dist/recipes/handoff/index.js +16 -35
- package/dist/recipes/incident-match/index.d.ts +5 -0
- package/dist/recipes/incident-match/index.js +7 -0
- package/dist/recipes/incident-match/metadata.d.ts +8 -0
- package/dist/recipes/incident-match/metadata.js +11 -0
- package/dist/recipes/incident-match/schema.d.ts +36 -0
- package/dist/recipes/incident-match/schema.js +9 -0
- package/dist/recipes/instruction-fit/index.d.ts +5 -0
- package/dist/recipes/instruction-fit/index.js +15 -0
- package/dist/recipes/instruction-fit/metadata.d.ts +8 -0
- package/dist/recipes/instruction-fit/metadata.js +10 -0
- package/dist/recipes/instruction-fit/schema.d.ts +37 -0
- package/dist/recipes/instruction-fit/schema.js +15 -0
- package/dist/recipes/intent-change/index.d.ts +5 -0
- package/dist/recipes/intent-change/index.js +16 -0
- package/dist/recipes/intent-change/metadata.d.ts +8 -0
- package/dist/recipes/intent-change/metadata.js +10 -0
- package/dist/recipes/intent-change/schema.d.ts +40 -0
- package/dist/recipes/intent-change/schema.js +15 -0
- package/dist/recipes/issue-impact/index.d.ts +5 -0
- package/dist/recipes/issue-impact/index.js +16 -0
- package/dist/recipes/issue-impact/metadata.d.ts +8 -0
- package/dist/recipes/issue-impact/metadata.js +10 -0
- package/dist/recipes/issue-impact/schema.d.ts +39 -0
- package/dist/recipes/issue-impact/schema.js +14 -0
- package/dist/recipes/memory-relation/index.d.ts +5 -0
- package/dist/recipes/memory-relation/index.js +18 -0
- package/dist/recipes/memory-relation/metadata.d.ts +8 -0
- package/dist/recipes/memory-relation/metadata.js +10 -0
- package/dist/recipes/memory-relation/schema.d.ts +46 -0
- package/dist/recipes/memory-relation/schema.js +22 -0
- package/dist/recipes/memory-scope/index.d.ts +5 -0
- package/dist/recipes/memory-scope/index.js +17 -0
- package/dist/recipes/memory-scope/metadata.d.ts +8 -0
- package/dist/recipes/memory-scope/metadata.js +10 -0
- package/dist/recipes/memory-scope/schema.d.ts +42 -0
- package/dist/recipes/memory-scope/schema.js +14 -0
- package/dist/recipes/memory-value/index.d.ts +5 -0
- package/dist/recipes/memory-value/index.js +16 -0
- package/dist/recipes/memory-value/metadata.d.ts +8 -0
- package/dist/recipes/memory-value/metadata.js +10 -0
- package/dist/recipes/memory-value/schema.d.ts +40 -0
- package/dist/recipes/memory-value/schema.js +20 -0
- package/dist/recipes/passage-duplicate/index.d.ts +5 -0
- package/dist/recipes/passage-duplicate/index.js +16 -0
- package/dist/recipes/passage-duplicate/metadata.d.ts +8 -0
- package/dist/recipes/passage-duplicate/metadata.js +10 -0
- package/dist/recipes/passage-duplicate/schema.d.ts +39 -0
- package/dist/recipes/passage-duplicate/schema.js +19 -0
- package/dist/recipes/preference-kind/index.d.ts +5 -0
- package/dist/recipes/preference-kind/index.js +16 -0
- package/dist/recipes/preference-kind/metadata.d.ts +8 -0
- package/dist/recipes/preference-kind/metadata.js +10 -0
- package/dist/recipes/preference-kind/schema.d.ts +39 -0
- package/dist/recipes/preference-kind/schema.js +19 -0
- package/dist/recipes/promise-check/index.d.ts +5 -0
- package/dist/recipes/promise-check/index.js +15 -0
- package/dist/recipes/promise-check/metadata.d.ts +8 -0
- package/dist/recipes/promise-check/metadata.js +10 -0
- package/dist/recipes/promise-check/schema.d.ts +36 -0
- package/dist/recipes/promise-check/schema.js +14 -0
- package/dist/recipes/query-equivalence/index.d.ts +5 -0
- package/dist/recipes/query-equivalence/index.js +16 -0
- package/dist/recipes/query-equivalence/metadata.d.ts +8 -0
- package/dist/recipes/query-equivalence/metadata.js +10 -0
- package/dist/recipes/query-equivalence/schema.d.ts +40 -0
- package/dist/recipes/query-equivalence/schema.js +20 -0
- package/dist/recipes/query-specificity/index.d.ts +5 -0
- package/dist/recipes/query-specificity/index.js +15 -0
- package/dist/recipes/query-specificity/metadata.d.ts +8 -0
- package/dist/recipes/query-specificity/metadata.js +10 -0
- package/dist/recipes/query-specificity/schema.d.ts +36 -0
- package/dist/recipes/query-specificity/schema.js +14 -0
- package/dist/recipes/reference-resolve/index.d.ts +5 -0
- package/dist/recipes/reference-resolve/index.js +7 -0
- package/dist/recipes/reference-resolve/metadata.d.ts +8 -0
- package/dist/recipes/reference-resolve/metadata.js +11 -0
- package/dist/recipes/reference-resolve/schema.d.ts +37 -0
- package/dist/recipes/reference-resolve/schema.js +10 -0
- package/dist/recipes/repeated-attempt/index.d.ts +5 -0
- package/dist/recipes/repeated-attempt/index.js +15 -0
- package/dist/recipes/repeated-attempt/metadata.d.ts +8 -0
- package/dist/recipes/repeated-attempt/metadata.js +10 -0
- package/dist/recipes/repeated-attempt/schema.d.ts +37 -0
- package/dist/recipes/repeated-attempt/schema.js +19 -0
- package/dist/recipes/reply-template-match/index.d.ts +5 -0
- package/dist/recipes/reply-template-match/index.js +7 -0
- package/dist/recipes/reply-template-match/metadata.d.ts +8 -0
- package/dist/recipes/reply-template-match/metadata.js +11 -0
- package/dist/recipes/reply-template-match/schema.d.ts +36 -0
- package/dist/recipes/reply-template-match/schema.js +9 -0
- package/dist/recipes/rerank/index.js +7 -7
- package/dist/recipes/resolution-check/index.d.ts +5 -0
- package/dist/recipes/resolution-check/index.js +15 -0
- package/dist/recipes/resolution-check/metadata.d.ts +8 -0
- package/dist/recipes/resolution-check/metadata.js +10 -0
- package/dist/recipes/resolution-check/schema.d.ts +37 -0
- package/dist/recipes/resolution-check/schema.js +15 -0
- package/dist/recipes/response-needed/index.d.ts +5 -0
- package/dist/recipes/response-needed/index.js +15 -0
- package/dist/recipes/response-needed/metadata.d.ts +8 -0
- package/dist/recipes/response-needed/metadata.js +10 -0
- package/dist/recipes/response-needed/schema.d.ts +36 -0
- package/dist/recipes/response-needed/schema.js +14 -0
- package/dist/recipes/result-outcome/index.d.ts +5 -0
- package/dist/recipes/result-outcome/index.js +16 -0
- package/dist/recipes/result-outcome/metadata.d.ts +8 -0
- package/dist/recipes/result-outcome/metadata.js +10 -0
- package/dist/recipes/result-outcome/schema.d.ts +39 -0
- package/dist/recipes/result-outcome/schema.js +19 -0
- package/dist/recipes/result-usefulness/index.d.ts +5 -0
- package/dist/recipes/result-usefulness/index.js +16 -0
- package/dist/recipes/result-usefulness/metadata.d.ts +8 -0
- package/dist/recipes/result-usefulness/metadata.js +10 -0
- package/dist/recipes/result-usefulness/schema.d.ts +39 -0
- package/dist/recipes/result-usefulness/schema.js +19 -0
- package/dist/recipes/retrieval-needed/index.d.ts +5 -0
- package/dist/recipes/retrieval-needed/index.js +15 -0
- package/dist/recipes/retrieval-needed/metadata.d.ts +8 -0
- package/dist/recipes/retrieval-needed/metadata.js +10 -0
- package/dist/recipes/retrieval-needed/schema.d.ts +36 -0
- package/dist/recipes/retrieval-needed/schema.js +14 -0
- package/dist/recipes/route/index.js +12 -21
- package/dist/recipes/source-applicability/index.d.ts +5 -0
- package/dist/recipes/source-applicability/index.js +15 -0
- package/dist/recipes/source-applicability/metadata.d.ts +8 -0
- package/dist/recipes/source-applicability/metadata.js +10 -0
- package/dist/recipes/source-applicability/schema.d.ts +36 -0
- package/dist/recipes/source-applicability/schema.js +14 -0
- package/dist/recipes/step-complete/index.d.ts +5 -0
- package/dist/recipes/step-complete/index.js +15 -0
- package/dist/recipes/step-complete/metadata.d.ts +8 -0
- package/dist/recipes/step-complete/metadata.js +10 -0
- package/dist/recipes/step-complete/schema.d.ts +36 -0
- package/dist/recipes/step-complete/schema.js +14 -0
- package/dist/recipes/step-progress/index.d.ts +5 -0
- package/dist/recipes/step-progress/index.js +16 -0
- package/dist/recipes/step-progress/metadata.d.ts +8 -0
- package/dist/recipes/step-progress/metadata.js +10 -0
- package/dist/recipes/step-progress/schema.d.ts +40 -0
- package/dist/recipes/step-progress/schema.js +15 -0
- package/dist/recipes/summary-coverage/index.d.ts +5 -0
- package/dist/recipes/summary-coverage/index.js +22 -0
- package/dist/recipes/summary-coverage/metadata.d.ts +8 -0
- package/dist/recipes/summary-coverage/metadata.js +11 -0
- package/dist/recipes/summary-coverage/schema.d.ts +50 -0
- package/dist/recipes/summary-coverage/schema.js +22 -0
- package/dist/recipes/ticket-match/index.d.ts +5 -0
- package/dist/recipes/ticket-match/index.js +16 -0
- package/dist/recipes/ticket-match/metadata.d.ts +8 -0
- package/dist/recipes/ticket-match/metadata.js +10 -0
- package/dist/recipes/ticket-match/schema.d.ts +40 -0
- package/dist/recipes/ticket-match/schema.js +15 -0
- package/dist/recipes/tone-check/index.d.ts +5 -0
- package/dist/recipes/tone-check/index.js +21 -0
- package/dist/recipes/tone-check/metadata.d.ts +8 -0
- package/dist/recipes/tone-check/metadata.js +11 -0
- package/dist/recipes/tone-check/schema.d.ts +47 -0
- package/dist/recipes/tone-check/schema.js +22 -0
- package/dist/recipes/tool-fit/index.d.ts +5 -0
- package/dist/recipes/tool-fit/index.js +15 -0
- package/dist/recipes/tool-fit/metadata.d.ts +8 -0
- package/dist/recipes/tool-fit/metadata.js +10 -0
- package/dist/recipes/tool-fit/schema.d.ts +37 -0
- package/dist/recipes/tool-fit/schema.js +15 -0
- package/dist/recipes/topic-shift/index.d.ts +5 -0
- package/dist/recipes/topic-shift/index.js +16 -0
- package/dist/recipes/topic-shift/metadata.d.ts +8 -0
- package/dist/recipes/topic-shift/metadata.js +10 -0
- package/dist/recipes/topic-shift/schema.d.ts +40 -0
- package/dist/recipes/topic-shift/schema.js +15 -0
- package/dist/recipes/troubleshooting-fit/index.d.ts +5 -0
- package/dist/recipes/troubleshooting-fit/index.js +15 -0
- package/dist/recipes/troubleshooting-fit/metadata.d.ts +8 -0
- package/dist/recipes/troubleshooting-fit/metadata.js +10 -0
- package/dist/recipes/troubleshooting-fit/schema.d.ts +37 -0
- package/dist/recipes/troubleshooting-fit/schema.js +15 -0
- package/dist/recipes/turn-intent/index.d.ts +5 -0
- package/dist/recipes/turn-intent/index.js +19 -0
- package/dist/recipes/turn-intent/metadata.d.ts +8 -0
- package/dist/recipes/turn-intent/metadata.js +10 -0
- package/dist/recipes/turn-intent/schema.d.ts +48 -0
- package/dist/recipes/turn-intent/schema.js +22 -0
- package/dist/recipes/urgency-signal/index.d.ts +5 -0
- package/dist/recipes/urgency-signal/index.js +15 -0
- package/dist/recipes/urgency-signal/metadata.d.ts +8 -0
- package/dist/recipes/urgency-signal/metadata.js +10 -0
- package/dist/recipes/urgency-signal/schema.d.ts +36 -0
- package/dist/recipes/urgency-signal/schema.js +14 -0
- package/dist/recipes/verify/index.js +11 -31
- package/dist/recipes/workaround-fit/index.d.ts +5 -0
- package/dist/recipes/workaround-fit/index.js +15 -0
- package/dist/recipes/workaround-fit/metadata.d.ts +8 -0
- package/dist/recipes/workaround-fit/metadata.js +10 -0
- package/dist/recipes/workaround-fit/schema.d.ts +37 -0
- package/dist/recipes/workaround-fit/schema.js +15 -0
- package/dist/src/checks.d.ts +14 -0
- package/dist/src/checks.js +21 -0
- package/dist/src/decisions.d.ts +13 -0
- package/dist/src/decisions.js +26 -0
- package/dist/src/index.d.ts +120 -0
- package/dist/src/index.js +60 -0
- package/dist/src/schema.d.ts +48 -0
- package/dist/src/schema.js +30 -1
- package/dist/src/selection.d.ts +2 -0
- package/dist/src/selection.js +30 -0
- package/examples/support/README.md +1 -1
- package/package.json +254 -7
- package/recipes/README.md +128 -0
- package/recipes/action-scope/README.md +49 -0
- package/recipes/action-scope/demo.json +25 -0
- package/recipes/answer-consistency/README.md +50 -0
- package/recipes/answer-consistency/demo.json +26 -0
- package/recipes/answer-coverage/README.md +60 -0
- package/recipes/answer-coverage/demo.json +46 -0
- package/recipes/answer-invalidation/README.md +50 -0
- package/recipes/answer-invalidation/demo.json +26 -0
- package/recipes/answer-relevance/README.md +49 -0
- package/recipes/answer-relevance/demo.json +26 -0
- package/recipes/answerability/README.md +39 -14
- package/recipes/argument-fit/README.md +51 -0
- package/recipes/argument-fit/demo.json +26 -0
- package/recipes/attempted-step/README.md +48 -0
- package/recipes/attempted-step/demo.json +25 -0
- package/recipes/audience-fit/README.md +50 -0
- package/recipes/audience-fit/demo.json +26 -0
- package/recipes/cache-match/README.md +51 -0
- package/recipes/cache-match/demo.json +26 -0
- package/recipes/cancellation-check/README.md +50 -0
- package/recipes/cancellation-check/demo.json +26 -0
- package/recipes/certainty-match/README.md +49 -0
- package/recipes/certainty-match/demo.json +26 -0
- package/recipes/change-meaning/README.md +49 -0
- package/recipes/change-meaning/demo.json +25 -0
- package/recipes/citation-match/README.md +51 -0
- package/recipes/citation-match/demo.json +44 -0
- package/recipes/citation-needed/README.md +49 -0
- package/recipes/citation-needed/demo.json +25 -0
- package/recipes/clarify/README.md +42 -13
- package/recipes/confirmation-match/README.md +49 -0
- package/recipes/confirmation-match/demo.json +25 -0
- package/recipes/context-role/README.md +49 -0
- package/recipes/context-role/demo.json +26 -0
- package/recipes/correction-target/README.md +52 -0
- package/recipes/correction-target/demo.json +35 -0
- package/recipes/document-role/README.md +51 -0
- package/recipes/document-role/demo.json +28 -0
- package/recipes/draft-compare/README.md +54 -0
- package/recipes/draft-compare/demo.json +29 -0
- package/recipes/evidence-conflict/README.md +51 -0
- package/recipes/evidence-conflict/demo.json +27 -0
- package/recipes/evidence-novelty/README.md +56 -0
- package/recipes/evidence-novelty/demo.json +32 -0
- package/recipes/fact-stability/README.md +47 -0
- package/recipes/fact-stability/demo.json +24 -0
- package/recipes/failure-kind/README.md +52 -0
- package/recipes/failure-kind/demo.json +35 -0
- package/recipes/feedback-kind/README.md +51 -0
- package/recipes/feedback-kind/demo.json +28 -0
- package/recipes/field-select/README.md +53 -0
- package/recipes/field-select/demo.json +36 -0
- package/recipes/followup-link/README.md +52 -0
- package/recipes/followup-link/demo.json +35 -0
- package/recipes/freshness-needed/README.md +46 -0
- package/recipes/freshness-needed/demo.json +24 -0
- package/recipes/frustration-signal/README.md +47 -0
- package/recipes/frustration-signal/demo.json +24 -0
- package/recipes/handoff/README.md +34 -13
- package/recipes/incident-match/README.md +52 -0
- package/recipes/incident-match/demo.json +35 -0
- package/recipes/instruction-fit/README.md +49 -0
- package/recipes/instruction-fit/demo.json +25 -0
- package/recipes/intent-change/README.md +50 -0
- package/recipes/intent-change/demo.json +26 -0
- package/recipes/issue-impact/README.md +48 -0
- package/recipes/issue-impact/demo.json +25 -0
- package/recipes/memory-relation/README.md +52 -0
- package/recipes/memory-relation/demo.json +28 -0
- package/recipes/memory-scope/README.md +50 -0
- package/recipes/memory-scope/demo.json +27 -0
- package/recipes/memory-value/README.md +50 -0
- package/recipes/memory-value/demo.json +26 -0
- package/recipes/passage-duplicate/README.md +49 -0
- package/recipes/passage-duplicate/demo.json +26 -0
- package/recipes/preference-kind/README.md +48 -0
- package/recipes/preference-kind/demo.json +25 -0
- package/recipes/promise-check/README.md +48 -0
- package/recipes/promise-check/demo.json +25 -0
- package/recipes/query-equivalence/README.md +50 -0
- package/recipes/query-equivalence/demo.json +26 -0
- package/recipes/query-specificity/README.md +47 -0
- package/recipes/query-specificity/demo.json +24 -0
- package/recipes/reference-resolve/README.md +54 -0
- package/recipes/reference-resolve/demo.json +36 -0
- package/recipes/repeated-attempt/README.md +50 -0
- package/recipes/repeated-attempt/demo.json +26 -0
- package/recipes/reply-template-match/README.md +52 -0
- package/recipes/reply-template-match/demo.json +35 -0
- package/recipes/rerank/README.md +40 -10
- package/recipes/resolution-check/README.md +49 -0
- package/recipes/resolution-check/demo.json +25 -0
- package/recipes/response-needed/README.md +48 -0
- package/recipes/response-needed/demo.json +25 -0
- package/recipes/result-outcome/README.md +49 -0
- package/recipes/result-outcome/demo.json +26 -0
- package/recipes/result-usefulness/README.md +49 -0
- package/recipes/result-usefulness/demo.json +26 -0
- package/recipes/retrieval-needed/README.md +48 -0
- package/recipes/retrieval-needed/demo.json +25 -0
- package/recipes/route/README.md +30 -7
- package/recipes/source-applicability/README.md +48 -0
- package/recipes/source-applicability/demo.json +25 -0
- package/recipes/step-complete/README.md +48 -0
- package/recipes/step-complete/demo.json +25 -0
- package/recipes/step-progress/README.md +51 -0
- package/recipes/step-progress/demo.json +27 -0
- package/recipes/summary-coverage/README.md +60 -0
- package/recipes/summary-coverage/demo.json +46 -0
- package/recipes/ticket-match/README.md +50 -0
- package/recipes/ticket-match/demo.json +26 -0
- package/recipes/tone-check/README.md +55 -0
- package/recipes/tone-check/demo.json +30 -0
- package/recipes/tool-fit/README.md +49 -0
- package/recipes/tool-fit/demo.json +25 -0
- package/recipes/topic-shift/README.md +50 -0
- package/recipes/topic-shift/demo.json +26 -0
- package/recipes/troubleshooting-fit/README.md +49 -0
- package/recipes/troubleshooting-fit/demo.json +25 -0
- package/recipes/turn-intent/README.md +52 -0
- package/recipes/turn-intent/demo.json +29 -0
- package/recipes/urgency-signal/README.md +47 -0
- package/recipes/urgency-signal/demo.json +24 -0
- package/recipes/verify/README.md +37 -13
- package/recipes/workaround-fit/README.md +50 -0
- package/recipes/workaround-fit/demo.json +26 -0
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { parseChoiceAnswer } from '../../src/answers.js';
|
|
4
|
-
import { routeInputSchema } from './schema.js';
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { routeInputSchema, routeResultSchema } from './schema.js';
|
|
5
3
|
export async function route(input, options = {}) {
|
|
6
4
|
const { request, routes, minConfidence = 0.8 } = routeInputSchema.parse(input);
|
|
7
|
-
const
|
|
5
|
+
const decision = await evaluateChoice({ request }, 'Choose the single route that best handles request. Use __review__ when no route clearly fits.', {
|
|
8
6
|
...routes,
|
|
9
7
|
__review__: 'The request is ambiguous, no route fits, or more information is needed.',
|
|
10
|
-
};
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
state: { request },
|
|
15
|
-
questions: { route: routingQuestion },
|
|
16
|
-
}, options);
|
|
17
|
-
const answer = parseChoiceAnswer(response.answers.route, Object.keys(routingCriteria));
|
|
18
|
-
const suggestedRoute = answer.choice === '__review__' ? null : answer.choice;
|
|
19
|
-
const requiresReview = suggestedRoute === null || answer.confidence < minConfidence;
|
|
20
|
-
return {
|
|
8
|
+
}, options, 'route');
|
|
9
|
+
const suggestedRoute = decision.verdict === '__review__' ? null : decision.verdict;
|
|
10
|
+
const requiresReview = suggestedRoute === null || decision.confidence < minConfidence;
|
|
11
|
+
return routeResultSchema.parse({
|
|
21
12
|
status: requiresReview ? 'review' : 'ready',
|
|
22
13
|
route: requiresReview ? null : suggestedRoute,
|
|
23
14
|
suggestedRoute,
|
|
24
|
-
confidence:
|
|
25
|
-
probabilities:
|
|
26
|
-
model:
|
|
27
|
-
usage:
|
|
28
|
-
};
|
|
15
|
+
confidence: decision.confidence,
|
|
16
|
+
probabilities: decision.probabilities,
|
|
17
|
+
model: decision.model,
|
|
18
|
+
usage: decision.usage,
|
|
19
|
+
});
|
|
29
20
|
}
|
|
30
21
|
export { routeInputSchema, routeResultSchema } from './schema.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { SourceApplicabilityInput, SourceApplicabilityResult } from './schema.js';
|
|
3
|
+
export declare function sourceApplicability(input: SourceApplicabilityInput, options?: RecipeOptions): Promise<SourceApplicabilityResult>;
|
|
4
|
+
export { sourceApplicabilityInputSchema, sourceApplicabilityResultSchema, sourceApplicabilityVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { SourceApplicabilityInput, SourceApplicabilityResult, SourceApplicabilityVerdict, } from './schema.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { sourceApplicabilityInputSchema, sourceApplicabilityResultSchema } from './schema.js';
|
|
3
|
+
export async function sourceApplicability(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = sourceApplicabilityInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'Does the scope described in passage apply to scenario? Distinguish applicable information from information about another product, environment, role, or condition.', {
|
|
6
|
+
applies: 'The passage explicitly covers or unambiguously applies to the scenario.',
|
|
7
|
+
does_not_apply: 'The passage is scoped to incompatible circumstances.',
|
|
8
|
+
unclear: 'Required scope information is missing or ambiguous.',
|
|
9
|
+
}, options);
|
|
10
|
+
return sourceApplicabilityResultSchema.parse({
|
|
11
|
+
...decision,
|
|
12
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { sourceApplicabilityInputSchema, sourceApplicabilityResultSchema, sourceApplicabilityVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'source-applicability',
|
|
3
|
+
title: 'Check source applicability',
|
|
4
|
+
description: 'Does the scope described in passage apply to scenario?',
|
|
5
|
+
category: 'retrieval',
|
|
6
|
+
tags: ['retrieval', 'source', 'applicability', 'rag', 'evidence'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Assesses semantic scope. Enforce tenant, access, exact version, and region constraints in application code.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sourceApplicabilityVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
applies: "applies";
|
|
5
|
+
does_not_apply: "does_not_apply";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const sourceApplicabilityInputSchema: z.ZodObject<{
|
|
8
|
+
passage: z.ZodString;
|
|
9
|
+
scenario: z.ZodString;
|
|
10
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const sourceApplicabilityResultSchema: z.ZodObject<{
|
|
13
|
+
model: z.ZodString;
|
|
14
|
+
usage: z.ZodObject<{
|
|
15
|
+
input_tokens: z.ZodNumber;
|
|
16
|
+
output_tokens: z.ZodNumber;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
status: z.ZodEnum<{
|
|
19
|
+
ready: "ready";
|
|
20
|
+
review: "review";
|
|
21
|
+
}>;
|
|
22
|
+
verdict: z.ZodEnum<{
|
|
23
|
+
unclear: "unclear";
|
|
24
|
+
applies: "applies";
|
|
25
|
+
does_not_apply: "does_not_apply";
|
|
26
|
+
}>;
|
|
27
|
+
confidence: z.ZodNumber;
|
|
28
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
29
|
+
unclear: "unclear";
|
|
30
|
+
applies: "applies";
|
|
31
|
+
does_not_apply: "does_not_apply";
|
|
32
|
+
}>, z.ZodNumber>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type SourceApplicabilityInput = z.infer<typeof sourceApplicabilityInputSchema>;
|
|
35
|
+
export type SourceApplicabilityResult = z.infer<typeof sourceApplicabilityResultSchema>;
|
|
36
|
+
export type SourceApplicabilityVerdict = z.infer<typeof sourceApplicabilityVerdictSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const sourceApplicabilityVerdictSchema = z.enum(['applies', 'does_not_apply', 'unclear']);
|
|
4
|
+
export const sourceApplicabilityInputSchema = z.object({
|
|
5
|
+
passage: nonEmptyText,
|
|
6
|
+
scenario: nonEmptyText,
|
|
7
|
+
minConfidence: probability.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const sourceApplicabilityResultSchema = resultMetadataSchema.extend({
|
|
10
|
+
status: decisionStatusSchema,
|
|
11
|
+
verdict: sourceApplicabilityVerdictSchema,
|
|
12
|
+
confidence: probability,
|
|
13
|
+
probabilities: z.record(sourceApplicabilityVerdictSchema, probability),
|
|
14
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { StepCompleteInput, StepCompleteResult } from './schema.js';
|
|
3
|
+
export declare function stepComplete(input: StepCompleteInput, options?: RecipeOptions): Promise<StepCompleteResult>;
|
|
4
|
+
export { stepCompleteInputSchema, stepCompleteResultSchema, stepCompleteVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { StepCompleteInput, StepCompleteResult, StepCompleteVerdict } from './schema.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { stepCompleteInputSchema, stepCompleteResultSchema } from './schema.js';
|
|
3
|
+
export async function stepComplete(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = stepCompleteInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'Does evidence establish that condition has been met? A plan, attempted action, or unsupported assertion of completion is not enough unless the condition specifically concerns that report.', {
|
|
6
|
+
met: 'The evidence establishes the full condition is satisfied.',
|
|
7
|
+
unmet: 'The evidence establishes the condition is not fully satisfied.',
|
|
8
|
+
unclear: 'The evidence does not establish whether the condition is satisfied.',
|
|
9
|
+
}, options);
|
|
10
|
+
return stepCompleteResultSchema.parse({
|
|
11
|
+
...decision,
|
|
12
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { stepCompleteInputSchema, stepCompleteResultSchema, stepCompleteVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'step-complete',
|
|
3
|
+
title: 'Check one completion condition',
|
|
4
|
+
description: 'Does evidence establish that condition has been met?',
|
|
5
|
+
category: 'workflow',
|
|
6
|
+
tags: ['workflow', 'step', 'complete'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Assesses supplied evidence for one condition. Use exact system state checks when the condition can be determined in code.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const stepCompleteVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
met: "met";
|
|
5
|
+
unmet: "unmet";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const stepCompleteInputSchema: z.ZodObject<{
|
|
8
|
+
condition: z.ZodString;
|
|
9
|
+
evidence: z.ZodString;
|
|
10
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const stepCompleteResultSchema: z.ZodObject<{
|
|
13
|
+
model: z.ZodString;
|
|
14
|
+
usage: z.ZodObject<{
|
|
15
|
+
input_tokens: z.ZodNumber;
|
|
16
|
+
output_tokens: z.ZodNumber;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
status: z.ZodEnum<{
|
|
19
|
+
ready: "ready";
|
|
20
|
+
review: "review";
|
|
21
|
+
}>;
|
|
22
|
+
verdict: z.ZodEnum<{
|
|
23
|
+
unclear: "unclear";
|
|
24
|
+
met: "met";
|
|
25
|
+
unmet: "unmet";
|
|
26
|
+
}>;
|
|
27
|
+
confidence: z.ZodNumber;
|
|
28
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
29
|
+
unclear: "unclear";
|
|
30
|
+
met: "met";
|
|
31
|
+
unmet: "unmet";
|
|
32
|
+
}>, z.ZodNumber>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type StepCompleteInput = z.infer<typeof stepCompleteInputSchema>;
|
|
35
|
+
export type StepCompleteResult = z.infer<typeof stepCompleteResultSchema>;
|
|
36
|
+
export type StepCompleteVerdict = z.infer<typeof stepCompleteVerdictSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const stepCompleteVerdictSchema = z.enum(['met', 'unmet', 'unclear']);
|
|
4
|
+
export const stepCompleteInputSchema = z.object({
|
|
5
|
+
condition: nonEmptyText,
|
|
6
|
+
evidence: nonEmptyText,
|
|
7
|
+
minConfidence: probability.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const stepCompleteResultSchema = resultMetadataSchema.extend({
|
|
10
|
+
status: decisionStatusSchema,
|
|
11
|
+
verdict: stepCompleteVerdictSchema,
|
|
12
|
+
confidence: probability,
|
|
13
|
+
probabilities: z.record(stepCompleteVerdictSchema, probability),
|
|
14
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { StepProgressInput, StepProgressResult } from './schema.js';
|
|
3
|
+
export declare function stepProgress(input: StepProgressInput, options?: RecipeOptions): Promise<StepProgressResult>;
|
|
4
|
+
export { stepProgressInputSchema, stepProgressResultSchema, stepProgressVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { StepProgressInput, StepProgressResult, StepProgressVerdict } from './schema.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { stepProgressInputSchema, stepProgressResultSchema } from './schema.js';
|
|
3
|
+
export async function stepProgress(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = stepProgressInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'How does observation change progress toward objective relative to previousState? Base the decision on observed information or achieved conditions, not an unsupported claim of progress.', {
|
|
6
|
+
progress: 'The observation establishes a useful new fact or achieved condition toward the objective.',
|
|
7
|
+
no_progress: 'The observation leaves the relevant state essentially unchanged.',
|
|
8
|
+
setback: 'The observation establishes loss of previously achieved progress or a worsened relevant state.',
|
|
9
|
+
unclear: 'The change in progress cannot be determined.',
|
|
10
|
+
}, options);
|
|
11
|
+
return stepProgressResultSchema.parse({
|
|
12
|
+
...decision,
|
|
13
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { stepProgressInputSchema, stepProgressResultSchema, stepProgressVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'step-progress',
|
|
3
|
+
title: 'Check step progress',
|
|
4
|
+
description: 'How does observation change progress toward objective relative to previousState?',
|
|
5
|
+
category: 'workflow',
|
|
6
|
+
tags: ['workflow', 'step', 'progress'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Compares one observation with a supplied prior state. It does not measure elapsed time or schedule the next step.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const stepProgressVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
progress: "progress";
|
|
5
|
+
no_progress: "no_progress";
|
|
6
|
+
setback: "setback";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const stepProgressInputSchema: z.ZodObject<{
|
|
9
|
+
objective: z.ZodString;
|
|
10
|
+
previousState: z.ZodString;
|
|
11
|
+
observation: z.ZodString;
|
|
12
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const stepProgressResultSchema: z.ZodObject<{
|
|
15
|
+
model: z.ZodString;
|
|
16
|
+
usage: z.ZodObject<{
|
|
17
|
+
input_tokens: z.ZodNumber;
|
|
18
|
+
output_tokens: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
ready: "ready";
|
|
22
|
+
review: "review";
|
|
23
|
+
}>;
|
|
24
|
+
verdict: z.ZodEnum<{
|
|
25
|
+
unclear: "unclear";
|
|
26
|
+
progress: "progress";
|
|
27
|
+
no_progress: "no_progress";
|
|
28
|
+
setback: "setback";
|
|
29
|
+
}>;
|
|
30
|
+
confidence: z.ZodNumber;
|
|
31
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
32
|
+
unclear: "unclear";
|
|
33
|
+
progress: "progress";
|
|
34
|
+
no_progress: "no_progress";
|
|
35
|
+
setback: "setback";
|
|
36
|
+
}>, z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type StepProgressInput = z.infer<typeof stepProgressInputSchema>;
|
|
39
|
+
export type StepProgressResult = z.infer<typeof stepProgressResultSchema>;
|
|
40
|
+
export type StepProgressVerdict = z.infer<typeof stepProgressVerdictSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const stepProgressVerdictSchema = z.enum(['progress', 'no_progress', 'setback', 'unclear']);
|
|
4
|
+
export const stepProgressInputSchema = z.object({
|
|
5
|
+
objective: nonEmptyText,
|
|
6
|
+
previousState: nonEmptyText,
|
|
7
|
+
observation: nonEmptyText,
|
|
8
|
+
minConfidence: probability.optional(),
|
|
9
|
+
});
|
|
10
|
+
export const stepProgressResultSchema = resultMetadataSchema.extend({
|
|
11
|
+
status: decisionStatusSchema,
|
|
12
|
+
verdict: stepProgressVerdictSchema,
|
|
13
|
+
confidence: probability,
|
|
14
|
+
probabilities: z.record(stepProgressVerdictSchema, probability),
|
|
15
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { SummaryCoverageInput, SummaryCoverageResult } from './schema.js';
|
|
3
|
+
export declare function summaryCoverage(input: SummaryCoverageInput, options?: RecipeOptions): Promise<SummaryCoverageResult>;
|
|
4
|
+
export { summaryCoverageInputSchema, summaryCoverageResultSchema, summaryCoverageVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { SummaryCoverageInput, SummaryCoverageResult, SummaryCoverageVerdict, } from './schema.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { evaluateChecks } from '../../src/checks.js';
|
|
2
|
+
import { summaryCoverageInputSchema, summaryCoverageResultSchema } from './schema.js';
|
|
3
|
+
export async function summaryCoverage(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = summaryCoverageInputSchema.parse(input);
|
|
5
|
+
const evaluation = await evaluateChecks(state, state.points, (index) => `Does summary preserve the material meaning of points[${index}].text? Paraphrases count, but dropping a material constraint makes coverage partial.`, {
|
|
6
|
+
preserved: 'The full material meaning of this point is retained.',
|
|
7
|
+
partial: 'Some meaning is retained but a material detail or constraint is missing.',
|
|
8
|
+
missing: 'This point is absent or its meaning is reversed.',
|
|
9
|
+
unclear: 'The summary is too ambiguous to establish coverage.',
|
|
10
|
+
}, options);
|
|
11
|
+
const checks = evaluation.checks.map((check) => ({
|
|
12
|
+
...check,
|
|
13
|
+
status: check.confidence < minConfidence || check.verdict === 'unclear' ? 'review' : 'ready',
|
|
14
|
+
}));
|
|
15
|
+
return summaryCoverageResultSchema.parse({
|
|
16
|
+
...evaluation,
|
|
17
|
+
checks,
|
|
18
|
+
status: checks.some((check) => check.status === 'review') ? 'review' : 'ready',
|
|
19
|
+
allPreserved: checks.every((check) => check.status === 'ready' && check.verdict === 'preserved'),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { summaryCoverageInputSchema, summaryCoverageResultSchema, summaryCoverageVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'summary-coverage',
|
|
3
|
+
title: 'Check summary coverage',
|
|
4
|
+
description: 'Check whether a summary preserves each supplied point.',
|
|
5
|
+
category: 'answer-quality',
|
|
6
|
+
tags: ['answer-quality', 'summary', 'coverage', 'rag', 'evidence'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Checks the points you supply. It does not select important points from a transcript or detect unrelated invented statements.',
|
|
9
|
+
'Supply 1 to 50 items per list, each with a unique non-empty ID and non-empty text.',
|
|
10
|
+
],
|
|
11
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const summaryCoverageVerdictSchema: z.ZodEnum<{
|
|
3
|
+
partial: "partial";
|
|
4
|
+
missing: "missing";
|
|
5
|
+
unclear: "unclear";
|
|
6
|
+
preserved: "preserved";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const summaryCoverageInputSchema: z.ZodObject<{
|
|
9
|
+
summary: z.ZodString;
|
|
10
|
+
points: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
text: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const summaryCoverageResultSchema: z.ZodObject<{
|
|
17
|
+
model: z.ZodString;
|
|
18
|
+
usage: z.ZodObject<{
|
|
19
|
+
input_tokens: z.ZodNumber;
|
|
20
|
+
output_tokens: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
status: z.ZodEnum<{
|
|
23
|
+
ready: "ready";
|
|
24
|
+
review: "review";
|
|
25
|
+
}>;
|
|
26
|
+
allPreserved: z.ZodBoolean;
|
|
27
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
ready: "ready";
|
|
31
|
+
review: "review";
|
|
32
|
+
}>;
|
|
33
|
+
verdict: z.ZodEnum<{
|
|
34
|
+
partial: "partial";
|
|
35
|
+
missing: "missing";
|
|
36
|
+
unclear: "unclear";
|
|
37
|
+
preserved: "preserved";
|
|
38
|
+
}>;
|
|
39
|
+
confidence: z.ZodNumber;
|
|
40
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
41
|
+
partial: "partial";
|
|
42
|
+
missing: "missing";
|
|
43
|
+
unclear: "unclear";
|
|
44
|
+
preserved: "preserved";
|
|
45
|
+
}>, z.ZodNumber>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type SummaryCoverageInput = z.infer<typeof summaryCoverageInputSchema>;
|
|
49
|
+
export type SummaryCoverageResult = z.infer<typeof summaryCoverageResultSchema>;
|
|
50
|
+
export type SummaryCoverageVerdict = z.infer<typeof summaryCoverageVerdictSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, textItemsSchema, } from '../../src/schema.js';
|
|
3
|
+
export const summaryCoverageVerdictSchema = z.enum(['preserved', 'partial', 'missing', 'unclear']);
|
|
4
|
+
export const summaryCoverageInputSchema = z.object({
|
|
5
|
+
summary: nonEmptyText,
|
|
6
|
+
points: textItemsSchema,
|
|
7
|
+
minConfidence: probability.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const summaryCoverageResultSchema = resultMetadataSchema.extend({
|
|
10
|
+
status: decisionStatusSchema,
|
|
11
|
+
allPreserved: z.boolean(),
|
|
12
|
+
checks: z
|
|
13
|
+
.array(z.object({
|
|
14
|
+
id: nonEmptyText,
|
|
15
|
+
status: decisionStatusSchema,
|
|
16
|
+
verdict: summaryCoverageVerdictSchema,
|
|
17
|
+
confidence: probability,
|
|
18
|
+
probabilities: z.record(summaryCoverageVerdictSchema, probability),
|
|
19
|
+
}))
|
|
20
|
+
.min(1)
|
|
21
|
+
.max(50),
|
|
22
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { TicketMatchInput, TicketMatchResult } from './schema.js';
|
|
3
|
+
export declare function ticketMatch(input: TicketMatchInput, options?: RecipeOptions): Promise<TicketMatchResult>;
|
|
4
|
+
export { ticketMatchInputSchema, ticketMatchResultSchema, ticketMatchVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { TicketMatchInput, TicketMatchResult, TicketMatchVerdict } from './schema.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { ticketMatchInputSchema, ticketMatchResultSchema } from './schema.js';
|
|
3
|
+
export async function ticketMatch(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = ticketMatchInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'Do firstTicket and secondTicket describe the same underlying reported issue? Similar symptoms alone establish relatedness, not identity. Use only supplied links between the reports.', {
|
|
6
|
+
same_issue: 'The reports contain enough shared identifying context to establish the same issue.',
|
|
7
|
+
related: 'The reports share symptoms or a subject but do not establish the same issue.',
|
|
8
|
+
different: 'The reports describe materially different issues.',
|
|
9
|
+
unclear: 'The descriptions are insufficient to establish even their relationship.',
|
|
10
|
+
}, options);
|
|
11
|
+
return ticketMatchResultSchema.parse({
|
|
12
|
+
...decision,
|
|
13
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { ticketMatchInputSchema, ticketMatchResultSchema, ticketMatchVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'ticket-match',
|
|
3
|
+
title: 'Compare support tickets',
|
|
4
|
+
description: 'Do firstTicket and secondTicket describe the same underlying reported issue?',
|
|
5
|
+
category: 'support',
|
|
6
|
+
tags: ['support', 'ticket', 'match'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Does not merge tickets or establish a shared root cause from similar symptoms alone. Compare exact identifiers in code.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ticketMatchVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
related: "related";
|
|
5
|
+
different: "different";
|
|
6
|
+
same_issue: "same_issue";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const ticketMatchInputSchema: z.ZodObject<{
|
|
9
|
+
firstTicket: z.ZodString;
|
|
10
|
+
secondTicket: z.ZodString;
|
|
11
|
+
context: z.ZodOptional<z.ZodString>;
|
|
12
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const ticketMatchResultSchema: z.ZodObject<{
|
|
15
|
+
model: z.ZodString;
|
|
16
|
+
usage: z.ZodObject<{
|
|
17
|
+
input_tokens: z.ZodNumber;
|
|
18
|
+
output_tokens: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
ready: "ready";
|
|
22
|
+
review: "review";
|
|
23
|
+
}>;
|
|
24
|
+
verdict: z.ZodEnum<{
|
|
25
|
+
unclear: "unclear";
|
|
26
|
+
related: "related";
|
|
27
|
+
different: "different";
|
|
28
|
+
same_issue: "same_issue";
|
|
29
|
+
}>;
|
|
30
|
+
confidence: z.ZodNumber;
|
|
31
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
32
|
+
unclear: "unclear";
|
|
33
|
+
related: "related";
|
|
34
|
+
different: "different";
|
|
35
|
+
same_issue: "same_issue";
|
|
36
|
+
}>, z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type TicketMatchInput = z.infer<typeof ticketMatchInputSchema>;
|
|
39
|
+
export type TicketMatchResult = z.infer<typeof ticketMatchResultSchema>;
|
|
40
|
+
export type TicketMatchVerdict = z.infer<typeof ticketMatchVerdictSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const ticketMatchVerdictSchema = z.enum(['same_issue', 'related', 'different', 'unclear']);
|
|
4
|
+
export const ticketMatchInputSchema = z.object({
|
|
5
|
+
firstTicket: nonEmptyText,
|
|
6
|
+
secondTicket: nonEmptyText,
|
|
7
|
+
context: nonEmptyText.optional(),
|
|
8
|
+
minConfidence: probability.optional(),
|
|
9
|
+
});
|
|
10
|
+
export const ticketMatchResultSchema = resultMetadataSchema.extend({
|
|
11
|
+
status: decisionStatusSchema,
|
|
12
|
+
verdict: ticketMatchVerdictSchema,
|
|
13
|
+
confidence: probability,
|
|
14
|
+
probabilities: z.record(ticketMatchVerdictSchema, probability),
|
|
15
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { ToneCheckInput, ToneCheckResult } from './schema.js';
|
|
3
|
+
export declare function toneCheck(input: ToneCheckInput, options?: RecipeOptions): Promise<ToneCheckResult>;
|
|
4
|
+
export { toneCheckInputSchema, toneCheckResultSchema, toneCheckVerdictSchema } from './schema.js';
|
|
5
|
+
export type { ToneCheckInput, ToneCheckResult, ToneCheckVerdict } from './schema.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { evaluateChecks } from '../../src/checks.js';
|
|
2
|
+
import { toneCheckInputSchema, toneCheckResultSchema } from './schema.js';
|
|
3
|
+
export async function toneCheck(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = toneCheckInputSchema.parse(input);
|
|
5
|
+
const evaluation = await evaluateChecks(state, state.criteria, (index) => `Does draft satisfy the writing criterion in criteria[${index}].text? Evaluate only this criterion and the observable wording.`, {
|
|
6
|
+
pass: 'The wording satisfies this criterion.',
|
|
7
|
+
fail: 'The wording violates this criterion.',
|
|
8
|
+
unclear: 'The criterion or wording is too ambiguous to assess.',
|
|
9
|
+
}, options);
|
|
10
|
+
const checks = evaluation.checks.map((check) => ({
|
|
11
|
+
...check,
|
|
12
|
+
status: check.confidence < minConfidence || check.verdict === 'unclear' ? 'review' : 'ready',
|
|
13
|
+
}));
|
|
14
|
+
return toneCheckResultSchema.parse({
|
|
15
|
+
...evaluation,
|
|
16
|
+
checks,
|
|
17
|
+
status: checks.some((check) => check.status === 'review') ? 'review' : 'ready',
|
|
18
|
+
allPassed: checks.every((check) => check.status === 'ready' && check.verdict === 'pass'),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export { toneCheckInputSchema, toneCheckResultSchema, toneCheckVerdictSchema } from './schema.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'tone-check',
|
|
3
|
+
title: 'Check writing criteria',
|
|
4
|
+
description: 'Check a draft against each supplied writing criterion.',
|
|
5
|
+
category: 'answer-quality',
|
|
6
|
+
tags: ['answer-quality', 'tone', 'check', 'rag', 'evidence'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Checks supplied writing criteria. It does not rewrite text, determine factual accuracy, or check exact character counts.',
|
|
9
|
+
'Supply 1 to 50 items per list, each with a unique non-empty ID and non-empty text.',
|
|
10
|
+
],
|
|
11
|
+
};
|