jev-recipes 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +5 -3
  2. package/dist/catalog/evidence.d.ts +21 -0
  3. package/dist/catalog/evidence.js +1 -0
  4. package/dist/catalog/generated/details/paragraph-boundary.json +42 -0
  5. package/dist/catalog/generated/details/text-block-role.json +77 -0
  6. package/dist/catalog/generated/loaders.js +2 -0
  7. package/dist/catalog/generated/metadata.js +1207 -0
  8. package/dist/catalog/generated/names.d.ts +1 -1
  9. package/dist/catalog/generated/names.js +2 -0
  10. package/dist/catalog/index.d.ts +3 -0
  11. package/dist/catalog/schema.d.ts +2 -0
  12. package/dist/cli/schema.d.ts +6 -0
  13. package/dist/evaluation/archive.d.ts +8 -8
  14. package/dist/evaluation/decisions.js +1 -1
  15. package/dist/evaluation/schema.d.ts +6 -6
  16. package/dist/recipes/action-effects/index.js +5 -5
  17. package/dist/recipes/causal-attribution/schema.d.ts +3 -3
  18. package/dist/recipes/completion-gate/index.js +2 -2
  19. package/dist/recipes/context-prune/index.js +3 -3
  20. package/dist/recipes/motivation-source/schema.d.ts +3 -3
  21. package/dist/recipes/paragraph-boundary/demo.json +19 -0
  22. package/dist/recipes/paragraph-boundary/index.d.ts +5 -0
  23. package/dist/recipes/paragraph-boundary/index.js +15 -0
  24. package/dist/recipes/paragraph-boundary/schema.d.ts +39 -0
  25. package/dist/recipes/paragraph-boundary/schema.js +17 -0
  26. package/dist/recipes/response-refusal/schema.d.ts +3 -3
  27. package/dist/recipes/text-block-role/demo.json +29 -0
  28. package/dist/recipes/text-block-role/index.d.ts +5 -0
  29. package/dist/recipes/text-block-role/index.js +21 -0
  30. package/dist/recipes/text-block-role/schema.d.ts +56 -0
  31. package/dist/recipes/text-block-role/schema.js +26 -0
  32. package/dist/src/index.d.ts +4 -0
  33. package/dist/src/index.js +2 -0
  34. package/package.json +9 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # jev-recipes
2
2
 
3
- **Small AI decisions. Ready to use in your code.**
3
+ **Small, readable decisions for Jev and compatible System One APIs.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/jev-recipes)](https://www.npmjs.com/package/jev-recipes)
6
6
  [![CI](https://github.com/agencyenterprise/jev-recipes/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/agencyenterprise/jev-recipes/actions/workflows/ci.yml)
@@ -11,11 +11,13 @@
11
11
 
12
12
  <!-- BEGIN GENERATED: summary -->
13
13
 
14
- 246 focused recipes for JavaScript and TypeScript. Route messages, check evidence, and label model responses with a function call.
14
+ 248 focused recipes for JavaScript and TypeScript. Route messages, check evidence, and label model responses with a function call.
15
15
 
16
16
  <!-- END GENERATED: summary -->
17
17
 
18
- Each recipe accepts your data, calls [Jev through TypeSafe's API](https://docs.typesafe.ai/introduction), and returns a structured decision. Use it in a Node.js backend, a script, or a research evaluation. Your application decides what happens next.
18
+ Each recipe accepts your data, calls [Jev through TypeSafe's System One API](https://docs.typesafe.ai/introduction) or an injected compatible client, and returns a structured decision. Use it in a Node.js backend, a script, or a research evaluation. Your application decides what happens next.
19
+
20
+ Start with [three runnable paths](https://github.com/agencyenterprise/jev-recipes/blob/main/examples/getting-started/README.md): route work, select evidence, or review an agent action. Each shows a ready result, review, and provider failure. The [document example](https://github.com/agencyenterprise/jev-recipes/blob/main/examples/ingestion/README.md) preserves source text while proposing structural decisions.
19
21
 
20
22
  For example, give `route` a support message and descriptions of your teams. It returns a team such as `billing`, or a review outcome when the choice is uncertain.
21
23
 
@@ -0,0 +1,21 @@
1
+ export interface RecipeEvidence {
2
+ kind: 'fixture' | 'earlier' | 'synthetic' | 'public-dataset' | 'human-reviewed' | 'mixed' | 'unspecified';
3
+ label: string;
4
+ experimental: boolean;
5
+ measurement: {
6
+ model: string;
7
+ date: string | null;
8
+ split: string | null;
9
+ cases: number;
10
+ ready: number | null;
11
+ reviewRate: number | null;
12
+ readyAccuracy: number | null;
13
+ failed: number | null;
14
+ provenance: {
15
+ method: string;
16
+ source: string;
17
+ cases: number;
18
+ }[];
19
+ acceptanceMet: boolean | null;
20
+ } | null;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "left": { "type": "string" },
7
+ "right": { "type": "string" },
8
+ "before": { "type": "string" },
9
+ "after": { "type": "string" },
10
+ "context": { "type": "string" },
11
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
12
+ },
13
+ "required": ["left", "right"]
14
+ },
15
+ "resultSchema": {
16
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
17
+ "type": "object",
18
+ "properties": {
19
+ "model": { "type": "string" },
20
+ "usage": {
21
+ "type": "object",
22
+ "properties": {
23
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
24
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
25
+ },
26
+ "required": ["input_tokens", "output_tokens"],
27
+ "additionalProperties": false
28
+ },
29
+ "status": { "type": "string", "enum": ["ready", "review"] },
30
+ "verdict": { "type": "string", "enum": ["continue", "separate", "unclear"] },
31
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
32
+ "probabilities": {
33
+ "type": "object",
34
+ "propertyNames": { "type": "string", "enum": ["continue", "separate", "unclear"] },
35
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
36
+ "required": ["continue", "separate", "unclear"]
37
+ }
38
+ },
39
+ "required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
40
+ "additionalProperties": false
41
+ }
42
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "text": { "type": "string" },
7
+ "before": { "type": "string" },
8
+ "after": { "type": "string" },
9
+ "context": { "type": "string" },
10
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
11
+ },
12
+ "required": ["text"]
13
+ },
14
+ "resultSchema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "type": "object",
17
+ "properties": {
18
+ "model": { "type": "string" },
19
+ "usage": {
20
+ "type": "object",
21
+ "properties": {
22
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
23
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
24
+ },
25
+ "required": ["input_tokens", "output_tokens"],
26
+ "additionalProperties": false
27
+ },
28
+ "status": { "type": "string", "enum": ["ready", "review"] },
29
+ "verdict": {
30
+ "type": "string",
31
+ "enum": [
32
+ "heading",
33
+ "body",
34
+ "list_item",
35
+ "code",
36
+ "table",
37
+ "caption",
38
+ "formula",
39
+ "other",
40
+ "unclear"
41
+ ]
42
+ },
43
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
44
+ "probabilities": {
45
+ "type": "object",
46
+ "propertyNames": {
47
+ "type": "string",
48
+ "enum": [
49
+ "heading",
50
+ "body",
51
+ "list_item",
52
+ "code",
53
+ "table",
54
+ "caption",
55
+ "formula",
56
+ "other",
57
+ "unclear"
58
+ ]
59
+ },
60
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
61
+ "required": [
62
+ "heading",
63
+ "body",
64
+ "list_item",
65
+ "code",
66
+ "table",
67
+ "caption",
68
+ "formula",
69
+ "other",
70
+ "unclear"
71
+ ]
72
+ }
73
+ },
74
+ "required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
75
+ "additionalProperties": false
76
+ }
77
+ }
@@ -155,6 +155,7 @@ export const recipeLoaders = {
155
155
  'objective-fit': () => import('../../recipes/objective-fit/index.js').then((recipe) => (input, options) => recipe.objectiveFit(recipe.objectiveFitInputSchema.parse(input), options)),
156
156
  'offer-terms-facets': () => import('../../recipes/offer-terms-facets/index.js').then((recipe) => (input, options) => recipe.offerTermsFacets(recipe.offerTermsFacetsInputSchema.parse(input), options)),
157
157
  'outcome-framing': () => import('../../recipes/outcome-framing/index.js').then((recipe) => (input, options) => recipe.outcomeFraming(recipe.outcomeFramingInputSchema.parse(input), options)),
158
+ 'paragraph-boundary': () => import('../../recipes/paragraph-boundary/index.js').then((recipe) => (input, options) => recipe.paragraphBoundary(recipe.paragraphBoundaryInputSchema.parse(input), options)),
158
159
  'passage-compare': () => import('../../recipes/passage-compare/index.js').then((recipe) => (input, options) => recipe.passageCompare(recipe.passageCompareInputSchema.parse(input), options)),
159
160
  'passage-difficulty': () => import('../../recipes/passage-difficulty/index.js').then((recipe) => (input, options) => recipe.passageDifficulty(recipe.passageDifficultyInputSchema.parse(input), options)),
160
161
  'passage-duplicate': () => import('../../recipes/passage-duplicate/index.js').then((recipe) => (input, options) => recipe.passageDuplicate(recipe.passageDuplicateInputSchema.parse(input), options)),
@@ -231,6 +232,7 @@ export const recipeLoaders = {
231
232
  'task-overlap': () => import('../../recipes/task-overlap/index.js').then((recipe) => (input, options) => recipe.taskOverlap(recipe.taskOverlapInputSchema.parse(input), options)),
232
233
  'tempo-change': () => import('../../recipes/tempo-change/index.js').then((recipe) => (input, options) => recipe.tempoChange(recipe.tempoChangeInputSchema.parse(input), options)),
233
234
  'tension-level': () => import('../../recipes/tension-level/index.js').then((recipe) => (input, options) => recipe.tensionLevel(recipe.tensionLevelInputSchema.parse(input), options)),
235
+ 'text-block-role': () => import('../../recipes/text-block-role/index.js').then((recipe) => (input, options) => recipe.textBlockRole(recipe.textBlockRoleInputSchema.parse(input), options)),
234
236
  'ticket-match': () => import('../../recipes/ticket-match/index.js').then((recipe) => (input, options) => recipe.ticketMatch(recipe.ticketMatchInputSchema.parse(input), options)),
235
237
  'tone-check': () => import('../../recipes/tone-check/index.js').then((recipe) => (input, options) => recipe.toneCheck(recipe.toneCheckInputSchema.parse(input), options)),
236
238
  'tool-call-gate': () => import('../../recipes/tool-call-gate/index.js').then((recipe) => (input, options) => recipe.toolCallGate(recipe.toolCallGateInputSchema.parse(input), options)),