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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const toneCheckVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
pass: "pass";
|
|
5
|
+
fail: "fail";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const toneCheckInputSchema: z.ZodObject<{
|
|
8
|
+
draft: z.ZodString;
|
|
9
|
+
criteria: z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
text: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const toneCheckResultSchema: z.ZodObject<{
|
|
16
|
+
model: z.ZodString;
|
|
17
|
+
usage: z.ZodObject<{
|
|
18
|
+
input_tokens: z.ZodNumber;
|
|
19
|
+
output_tokens: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
status: z.ZodEnum<{
|
|
22
|
+
ready: "ready";
|
|
23
|
+
review: "review";
|
|
24
|
+
}>;
|
|
25
|
+
allPassed: z.ZodBoolean;
|
|
26
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
status: z.ZodEnum<{
|
|
29
|
+
ready: "ready";
|
|
30
|
+
review: "review";
|
|
31
|
+
}>;
|
|
32
|
+
verdict: z.ZodEnum<{
|
|
33
|
+
unclear: "unclear";
|
|
34
|
+
pass: "pass";
|
|
35
|
+
fail: "fail";
|
|
36
|
+
}>;
|
|
37
|
+
confidence: z.ZodNumber;
|
|
38
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
39
|
+
unclear: "unclear";
|
|
40
|
+
pass: "pass";
|
|
41
|
+
fail: "fail";
|
|
42
|
+
}>, z.ZodNumber>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type ToneCheckInput = z.infer<typeof toneCheckInputSchema>;
|
|
46
|
+
export type ToneCheckResult = z.infer<typeof toneCheckResultSchema>;
|
|
47
|
+
export type ToneCheckVerdict = z.infer<typeof toneCheckVerdictSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, textItemsSchema, } from '../../src/schema.js';
|
|
3
|
+
export const toneCheckVerdictSchema = z.enum(['pass', 'fail', 'unclear']);
|
|
4
|
+
export const toneCheckInputSchema = z.object({
|
|
5
|
+
draft: nonEmptyText,
|
|
6
|
+
criteria: textItemsSchema,
|
|
7
|
+
minConfidence: probability.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const toneCheckResultSchema = resultMetadataSchema.extend({
|
|
10
|
+
status: decisionStatusSchema,
|
|
11
|
+
allPassed: z.boolean(),
|
|
12
|
+
checks: z
|
|
13
|
+
.array(z.object({
|
|
14
|
+
id: nonEmptyText,
|
|
15
|
+
status: decisionStatusSchema,
|
|
16
|
+
verdict: toneCheckVerdictSchema,
|
|
17
|
+
confidence: probability,
|
|
18
|
+
probabilities: z.record(toneCheckVerdictSchema, probability),
|
|
19
|
+
}))
|
|
20
|
+
.min(1)
|
|
21
|
+
.max(50),
|
|
22
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { ToolFitInput, ToolFitResult } from './schema.js';
|
|
3
|
+
export declare function toolFit(input: ToolFitInput, options?: RecipeOptions): Promise<ToolFitResult>;
|
|
4
|
+
export { toolFitInputSchema, toolFitResultSchema, toolFitVerdictSchema } from './schema.js';
|
|
5
|
+
export type { ToolFitInput, ToolFitResult, ToolFitVerdict } from './schema.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { toolFitInputSchema, toolFitResultSchema } from './schema.js';
|
|
3
|
+
export async function toolFit(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = toolFitInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'Can the capabilities explicitly described in tool perform task? Do not assume capabilities that are not described. Capability fit is separate from permission to invoke the tool.', {
|
|
6
|
+
fits: 'The described capabilities can perform the requested task.',
|
|
7
|
+
does_not_fit: 'The described capabilities do not cover the task or explicitly exclude it.',
|
|
8
|
+
unclear: 'The capability description lacks facts needed to decide.',
|
|
9
|
+
}, options);
|
|
10
|
+
return toolFitResultSchema.parse({
|
|
11
|
+
...decision,
|
|
12
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { toolFitInputSchema, toolFitResultSchema, toolFitVerdictSchema } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'tool-fit',
|
|
3
|
+
title: 'Check a tool fit',
|
|
4
|
+
description: 'Can the capabilities explicitly described in tool perform task?',
|
|
5
|
+
category: 'workflow',
|
|
6
|
+
tags: ['workflow', 'tool', 'fit'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Assesses a supplied capability description. It does not discover tools, validate credentials, or grant permission.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const toolFitVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
fits: "fits";
|
|
5
|
+
does_not_fit: "does_not_fit";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const toolFitInputSchema: z.ZodObject<{
|
|
8
|
+
task: z.ZodString;
|
|
9
|
+
tool: z.ZodString;
|
|
10
|
+
context: z.ZodOptional<z.ZodString>;
|
|
11
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const toolFitResultSchema: z.ZodObject<{
|
|
14
|
+
model: z.ZodString;
|
|
15
|
+
usage: z.ZodObject<{
|
|
16
|
+
input_tokens: z.ZodNumber;
|
|
17
|
+
output_tokens: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
status: z.ZodEnum<{
|
|
20
|
+
ready: "ready";
|
|
21
|
+
review: "review";
|
|
22
|
+
}>;
|
|
23
|
+
verdict: z.ZodEnum<{
|
|
24
|
+
unclear: "unclear";
|
|
25
|
+
fits: "fits";
|
|
26
|
+
does_not_fit: "does_not_fit";
|
|
27
|
+
}>;
|
|
28
|
+
confidence: z.ZodNumber;
|
|
29
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
30
|
+
unclear: "unclear";
|
|
31
|
+
fits: "fits";
|
|
32
|
+
does_not_fit: "does_not_fit";
|
|
33
|
+
}>, z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type ToolFitInput = z.infer<typeof toolFitInputSchema>;
|
|
36
|
+
export type ToolFitResult = z.infer<typeof toolFitResultSchema>;
|
|
37
|
+
export type ToolFitVerdict = z.infer<typeof toolFitVerdictSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const toolFitVerdictSchema = z.enum(['fits', 'does_not_fit', 'unclear']);
|
|
4
|
+
export const toolFitInputSchema = z.object({
|
|
5
|
+
task: nonEmptyText,
|
|
6
|
+
tool: nonEmptyText,
|
|
7
|
+
context: nonEmptyText.optional(),
|
|
8
|
+
minConfidence: probability.optional(),
|
|
9
|
+
});
|
|
10
|
+
export const toolFitResultSchema = resultMetadataSchema.extend({
|
|
11
|
+
status: decisionStatusSchema,
|
|
12
|
+
verdict: toolFitVerdictSchema,
|
|
13
|
+
confidence: probability,
|
|
14
|
+
probabilities: z.record(toolFitVerdictSchema, probability),
|
|
15
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { TopicShiftInput, TopicShiftResult } from './schema.js';
|
|
3
|
+
export declare function topicShift(input: TopicShiftInput, options?: RecipeOptions): Promise<TopicShiftResult>;
|
|
4
|
+
export { topicShiftInputSchema, topicShiftResultSchema, topicShiftVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { TopicShiftInput, TopicShiftResult, TopicShiftVerdict } from './schema.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { topicShiftInputSchema, topicShiftResultSchema } from './schema.js';
|
|
3
|
+
export async function topicShift(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = topicShiftInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'Does message stay with currentTopic, introduce a different topic, or contain both? A new detail within the same subject is not automatically a new topic.', {
|
|
6
|
+
same_topic: 'The message remains within the current subject.',
|
|
7
|
+
new_topic: 'The message moves to a different subject.',
|
|
8
|
+
mixed: 'The message substantively addresses both the current and a new subject.',
|
|
9
|
+
unclear: 'The subject relationship cannot be resolved.',
|
|
10
|
+
}, options);
|
|
11
|
+
return topicShiftResultSchema.parse({
|
|
12
|
+
...decision,
|
|
13
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { topicShiftInputSchema, topicShiftResultSchema, topicShiftVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'topic-shift',
|
|
3
|
+
title: 'Detect a topic shift',
|
|
4
|
+
description: 'Does message stay with currentTopic, introduce a different topic, or contain both?',
|
|
5
|
+
category: 'conversation',
|
|
6
|
+
tags: ['conversation', 'topic', 'shift'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Compares one message with a supplied topic. It does not generate topic labels or split conversation threads.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const topicShiftVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
same_topic: "same_topic";
|
|
5
|
+
new_topic: "new_topic";
|
|
6
|
+
mixed: "mixed";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const topicShiftInputSchema: z.ZodObject<{
|
|
9
|
+
currentTopic: z.ZodString;
|
|
10
|
+
message: z.ZodString;
|
|
11
|
+
context: z.ZodOptional<z.ZodString>;
|
|
12
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const topicShiftResultSchema: 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
|
+
same_topic: "same_topic";
|
|
27
|
+
new_topic: "new_topic";
|
|
28
|
+
mixed: "mixed";
|
|
29
|
+
}>;
|
|
30
|
+
confidence: z.ZodNumber;
|
|
31
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
32
|
+
unclear: "unclear";
|
|
33
|
+
same_topic: "same_topic";
|
|
34
|
+
new_topic: "new_topic";
|
|
35
|
+
mixed: "mixed";
|
|
36
|
+
}>, z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type TopicShiftInput = z.infer<typeof topicShiftInputSchema>;
|
|
39
|
+
export type TopicShiftResult = z.infer<typeof topicShiftResultSchema>;
|
|
40
|
+
export type TopicShiftVerdict = z.infer<typeof topicShiftVerdictSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const topicShiftVerdictSchema = z.enum(['same_topic', 'new_topic', 'mixed', 'unclear']);
|
|
4
|
+
export const topicShiftInputSchema = z.object({
|
|
5
|
+
currentTopic: nonEmptyText,
|
|
6
|
+
message: nonEmptyText,
|
|
7
|
+
context: nonEmptyText.optional(),
|
|
8
|
+
minConfidence: probability.optional(),
|
|
9
|
+
});
|
|
10
|
+
export const topicShiftResultSchema = resultMetadataSchema.extend({
|
|
11
|
+
status: decisionStatusSchema,
|
|
12
|
+
verdict: topicShiftVerdictSchema,
|
|
13
|
+
confidence: probability,
|
|
14
|
+
probabilities: z.record(topicShiftVerdictSchema, probability),
|
|
15
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { TroubleshootingFitInput, TroubleshootingFitResult } from './schema.js';
|
|
3
|
+
export declare function troubleshootingFit(input: TroubleshootingFitInput, options?: RecipeOptions): Promise<TroubleshootingFitResult>;
|
|
4
|
+
export { troubleshootingFitInputSchema, troubleshootingFitResultSchema, troubleshootingFitVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { TroubleshootingFitInput, TroubleshootingFitResult, TroubleshootingFitVerdict, } from './schema.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { troubleshootingFitInputSchema, troubleshootingFitResultSchema } from './schema.js';
|
|
3
|
+
export async function troubleshootingFit(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = troubleshootingFitInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, "Does procedure address symptoms under the described circumstances? Match the procedure's stated purpose and prerequisites, without inventing a diagnosis.", {
|
|
6
|
+
applicable: 'The procedure covers the described symptoms and its stated prerequisites are met.',
|
|
7
|
+
unsuitable: 'The procedure concerns different symptoms or incompatible prerequisites.',
|
|
8
|
+
unclear: 'The symptoms or prerequisites are insufficiently specified.',
|
|
9
|
+
}, options);
|
|
10
|
+
return troubleshootingFitResultSchema.parse({
|
|
11
|
+
...decision,
|
|
12
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { troubleshootingFitInputSchema, troubleshootingFitResultSchema, troubleshootingFitVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'troubleshooting-fit',
|
|
3
|
+
title: 'Check troubleshooting applicability',
|
|
4
|
+
description: 'Does procedure address symptoms under the described circumstances?',
|
|
5
|
+
category: 'support',
|
|
6
|
+
tags: ['support', 'troubleshooting', 'fit'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Assesses a supplied procedure; it does not diagnose a root cause, generate steps, or execute them.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const troubleshootingFitVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
unsuitable: "unsuitable";
|
|
5
|
+
applicable: "applicable";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const troubleshootingFitInputSchema: z.ZodObject<{
|
|
8
|
+
symptoms: z.ZodString;
|
|
9
|
+
procedure: z.ZodString;
|
|
10
|
+
context: z.ZodOptional<z.ZodString>;
|
|
11
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const troubleshootingFitResultSchema: z.ZodObject<{
|
|
14
|
+
model: z.ZodString;
|
|
15
|
+
usage: z.ZodObject<{
|
|
16
|
+
input_tokens: z.ZodNumber;
|
|
17
|
+
output_tokens: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
status: z.ZodEnum<{
|
|
20
|
+
ready: "ready";
|
|
21
|
+
review: "review";
|
|
22
|
+
}>;
|
|
23
|
+
verdict: z.ZodEnum<{
|
|
24
|
+
unclear: "unclear";
|
|
25
|
+
unsuitable: "unsuitable";
|
|
26
|
+
applicable: "applicable";
|
|
27
|
+
}>;
|
|
28
|
+
confidence: z.ZodNumber;
|
|
29
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
30
|
+
unclear: "unclear";
|
|
31
|
+
unsuitable: "unsuitable";
|
|
32
|
+
applicable: "applicable";
|
|
33
|
+
}>, z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type TroubleshootingFitInput = z.infer<typeof troubleshootingFitInputSchema>;
|
|
36
|
+
export type TroubleshootingFitResult = z.infer<typeof troubleshootingFitResultSchema>;
|
|
37
|
+
export type TroubleshootingFitVerdict = z.infer<typeof troubleshootingFitVerdictSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const troubleshootingFitVerdictSchema = z.enum(['applicable', 'unsuitable', 'unclear']);
|
|
4
|
+
export const troubleshootingFitInputSchema = z.object({
|
|
5
|
+
symptoms: nonEmptyText,
|
|
6
|
+
procedure: nonEmptyText,
|
|
7
|
+
context: nonEmptyText.optional(),
|
|
8
|
+
minConfidence: probability.optional(),
|
|
9
|
+
});
|
|
10
|
+
export const troubleshootingFitResultSchema = resultMetadataSchema.extend({
|
|
11
|
+
status: decisionStatusSchema,
|
|
12
|
+
verdict: troubleshootingFitVerdictSchema,
|
|
13
|
+
confidence: probability,
|
|
14
|
+
probabilities: z.record(troubleshootingFitVerdictSchema, probability),
|
|
15
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { TurnIntentInput, TurnIntentResult } from './schema.js';
|
|
3
|
+
export declare function turnIntent(input: TurnIntentInput, options?: RecipeOptions): Promise<TurnIntentResult>;
|
|
4
|
+
export { turnIntentInputSchema, turnIntentResultSchema, turnIntentVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { TurnIntentInput, TurnIntentResult, TurnIntentVerdict } from './schema.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { turnIntentInputSchema, turnIntentResultSchema } from './schema.js';
|
|
3
|
+
export async function turnIntent(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = turnIntentInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'What is the primary communicative purpose of message in context? For mixed messages choose the purpose that changes what the application should do next; choose unclear if none dominates.', {
|
|
6
|
+
request: 'The message asks for new work or information.',
|
|
7
|
+
answer: 'The message supplies information requested earlier.',
|
|
8
|
+
correction: 'The message corrects a prior fact or instruction.',
|
|
9
|
+
cancellation: 'The message asks to stop or pause an existing task.',
|
|
10
|
+
acknowledgment: 'The message acknowledges prior content without requesting substantive work.',
|
|
11
|
+
other: 'The purpose is clear but does not fit the listed purposes.',
|
|
12
|
+
unclear: 'The primary purpose cannot be established.',
|
|
13
|
+
}, options);
|
|
14
|
+
return turnIntentResultSchema.parse({
|
|
15
|
+
...decision,
|
|
16
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { turnIntentInputSchema, turnIntentResultSchema, turnIntentVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'turn-intent',
|
|
3
|
+
title: 'Identify a conversation turn',
|
|
4
|
+
description: 'What is the primary communicative purpose of message in context?',
|
|
5
|
+
category: 'conversation',
|
|
6
|
+
tags: ['conversation', 'turn', 'intent'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Returns the primary purpose only. It does not split a message into separate requests or execute instructions.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const turnIntentVerdictSchema: z.ZodEnum<{
|
|
3
|
+
request: "request";
|
|
4
|
+
unclear: "unclear";
|
|
5
|
+
answer: "answer";
|
|
6
|
+
correction: "correction";
|
|
7
|
+
cancellation: "cancellation";
|
|
8
|
+
acknowledgment: "acknowledgment";
|
|
9
|
+
other: "other";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const turnIntentInputSchema: z.ZodObject<{
|
|
12
|
+
message: z.ZodString;
|
|
13
|
+
context: z.ZodOptional<z.ZodString>;
|
|
14
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const turnIntentResultSchema: 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
|
+
verdict: z.ZodEnum<{
|
|
27
|
+
request: "request";
|
|
28
|
+
unclear: "unclear";
|
|
29
|
+
answer: "answer";
|
|
30
|
+
correction: "correction";
|
|
31
|
+
cancellation: "cancellation";
|
|
32
|
+
acknowledgment: "acknowledgment";
|
|
33
|
+
other: "other";
|
|
34
|
+
}>;
|
|
35
|
+
confidence: z.ZodNumber;
|
|
36
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
37
|
+
request: "request";
|
|
38
|
+
unclear: "unclear";
|
|
39
|
+
answer: "answer";
|
|
40
|
+
correction: "correction";
|
|
41
|
+
cancellation: "cancellation";
|
|
42
|
+
acknowledgment: "acknowledgment";
|
|
43
|
+
other: "other";
|
|
44
|
+
}>, z.ZodNumber>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type TurnIntentInput = z.infer<typeof turnIntentInputSchema>;
|
|
47
|
+
export type TurnIntentResult = z.infer<typeof turnIntentResultSchema>;
|
|
48
|
+
export type TurnIntentVerdict = z.infer<typeof turnIntentVerdictSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const turnIntentVerdictSchema = z.enum([
|
|
4
|
+
'request',
|
|
5
|
+
'answer',
|
|
6
|
+
'correction',
|
|
7
|
+
'cancellation',
|
|
8
|
+
'acknowledgment',
|
|
9
|
+
'other',
|
|
10
|
+
'unclear',
|
|
11
|
+
]);
|
|
12
|
+
export const turnIntentInputSchema = z.object({
|
|
13
|
+
message: nonEmptyText,
|
|
14
|
+
context: nonEmptyText.optional(),
|
|
15
|
+
minConfidence: probability.optional(),
|
|
16
|
+
});
|
|
17
|
+
export const turnIntentResultSchema = resultMetadataSchema.extend({
|
|
18
|
+
status: decisionStatusSchema,
|
|
19
|
+
verdict: turnIntentVerdictSchema,
|
|
20
|
+
confidence: probability,
|
|
21
|
+
probabilities: z.record(turnIntentVerdictSchema, probability),
|
|
22
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { UrgencySignalInput, UrgencySignalResult } from './schema.js';
|
|
3
|
+
export declare function urgencySignal(input: UrgencySignalInput, options?: RecipeOptions): Promise<UrgencySignalResult>;
|
|
4
|
+
export { urgencySignalInputSchema, urgencySignalResultSchema, urgencySignalVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { UrgencySignalInput, UrgencySignalResult, UrgencySignalVerdict } from './schema.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { urgencySignalInputSchema, urgencySignalResultSchema } from './schema.js';
|
|
3
|
+
export async function urgencySignal(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = urgencySignalInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'Does message explicitly request urgent attention? Look for stated urgency, not inferred importance, customer tone, or an unstated interpretation of a date.', {
|
|
6
|
+
expressed: 'The message explicitly asks for immediate, urgent, or expedited attention.',
|
|
7
|
+
not_expressed: 'The message does not explicitly ask for urgent attention.',
|
|
8
|
+
unclear: 'The urgency language is too ambiguous to interpret.',
|
|
9
|
+
}, options);
|
|
10
|
+
return urgencySignalResultSchema.parse({
|
|
11
|
+
...decision,
|
|
12
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { urgencySignalInputSchema, urgencySignalResultSchema, urgencySignalVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
id: 'urgency-signal',
|
|
3
|
+
title: 'Detect an explicit urgency request',
|
|
4
|
+
description: 'Does message explicitly request urgent attention?',
|
|
5
|
+
category: 'support',
|
|
6
|
+
tags: ['support', 'urgency', 'signal'],
|
|
7
|
+
limitations: [
|
|
8
|
+
'Detects an expressed urgency request. Compute deadline proximity and apply incident or service priority rules in code.',
|
|
9
|
+
],
|
|
10
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const urgencySignalVerdictSchema: z.ZodEnum<{
|
|
3
|
+
unclear: "unclear";
|
|
4
|
+
expressed: "expressed";
|
|
5
|
+
not_expressed: "not_expressed";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const urgencySignalInputSchema: z.ZodObject<{
|
|
8
|
+
message: z.ZodString;
|
|
9
|
+
context: z.ZodOptional<z.ZodString>;
|
|
10
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const urgencySignalResultSchema: 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
|
+
expressed: "expressed";
|
|
25
|
+
not_expressed: "not_expressed";
|
|
26
|
+
}>;
|
|
27
|
+
confidence: z.ZodNumber;
|
|
28
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
29
|
+
unclear: "unclear";
|
|
30
|
+
expressed: "expressed";
|
|
31
|
+
not_expressed: "not_expressed";
|
|
32
|
+
}>, z.ZodNumber>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type UrgencySignalInput = z.infer<typeof urgencySignalInputSchema>;
|
|
35
|
+
export type UrgencySignalResult = z.infer<typeof urgencySignalResultSchema>;
|
|
36
|
+
export type UrgencySignalVerdict = z.infer<typeof urgencySignalVerdictSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const urgencySignalVerdictSchema = z.enum(['expressed', 'not_expressed', 'unclear']);
|
|
4
|
+
export const urgencySignalInputSchema = z.object({
|
|
5
|
+
message: nonEmptyText,
|
|
6
|
+
context: nonEmptyText.optional(),
|
|
7
|
+
minConfidence: probability.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const urgencySignalResultSchema = resultMetadataSchema.extend({
|
|
10
|
+
status: decisionStatusSchema,
|
|
11
|
+
verdict: urgencySignalVerdictSchema,
|
|
12
|
+
confidence: probability,
|
|
13
|
+
probabilities: z.record(urgencySignalVerdictSchema, probability),
|
|
14
|
+
});
|
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { parseChoiceAnswer } from '../../src/answers.js';
|
|
4
|
-
import { claimVerdictSchema, verifyInputSchema } from './schema.js';
|
|
1
|
+
import { evaluateChecks } from '../../src/checks.js';
|
|
2
|
+
import { verifyInputSchema, verifyResultSchema } from './schema.js';
|
|
5
3
|
export async function verify(input, options = {}) {
|
|
6
4
|
const { claims, minConfidence = 0.8 } = verifyInputSchema.parse(input);
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
state: { claims },
|
|
10
|
-
questions: evidenceQuestions,
|
|
11
|
-
}, options);
|
|
12
|
-
const checks = claims.map((claim, index) => {
|
|
13
|
-
const answer = parseChoiceAnswer(response.answers[`claim_${index}`], claimVerdictSchema.options);
|
|
14
|
-
return {
|
|
15
|
-
id: claim.id,
|
|
16
|
-
status: answer.confidence >= minConfidence ? 'ready' : 'review',
|
|
17
|
-
verdict: answer.choice,
|
|
18
|
-
confidence: answer.confidence,
|
|
19
|
-
probabilities: answer.probabilities,
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
const allSupported = checks.every((check) => check.status === 'ready' && check.verdict === 'supported');
|
|
23
|
-
return { checks, allSupported, model: response.model, usage: response.usage };
|
|
24
|
-
}
|
|
25
|
-
function createEvidenceQuestions(claims) {
|
|
26
|
-
const evidenceCriteria = {
|
|
5
|
+
const evaluation = await evaluateChecks({ claims }, claims, (index) => `How does claims[${index}].evidence relate to claims[${index}].claim? ` +
|
|
6
|
+
'Use only that paired evidence. Do not fill gaps with outside knowledge.', {
|
|
27
7
|
supported: 'The supplied evidence states or directly implies the entire claim.',
|
|
28
8
|
contradicted: 'The supplied evidence states or directly implies something incompatible with the claim.',
|
|
29
9
|
unsupported: 'The evidence is insufficient to support or contradict the entire claim.',
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
}, options, 'claim');
|
|
11
|
+
const checks = evaluation.checks.map((check) => ({
|
|
12
|
+
...check,
|
|
13
|
+
status: check.confidence >= minConfidence ? 'ready' : 'review',
|
|
14
|
+
}));
|
|
15
|
+
const allSupported = checks.every((check) => check.status === 'ready' && check.verdict === 'supported');
|
|
16
|
+
return verifyResultSchema.parse({ ...evaluation, checks, allSupported });
|
|
37
17
|
}
|
|
38
18
|
export { verifyInputSchema, verifyResultSchema } from './schema.js';
|