jev-recipes 0.4.0 → 0.4.1

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 (59) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +134 -50
  3. package/dist/catalog/generated/details/attribution-match.json +55 -0
  4. package/dist/catalog/generated/details/choose-action.json +102 -0
  5. package/dist/catalog/generated/details/evaluation-mention.json +48 -0
  6. package/dist/catalog/generated/details/evidence-independence.json +52 -0
  7. package/dist/catalog/generated/details/question-leading.json +52 -0
  8. package/dist/catalog/generated/details/response-refusal.json +55 -0
  9. package/dist/catalog/generated/details/take-turn.json +68 -0
  10. package/dist/catalog/generated/details/uncertainty-expression.json +55 -0
  11. package/dist/catalog/generated/loaders.js +8 -0
  12. package/dist/catalog/generated/metadata.js +283 -0
  13. package/dist/catalog/generated/names.d.ts +1 -1
  14. package/dist/catalog/generated/names.js +8 -0
  15. package/dist/catalog/schema.d.ts +8 -0
  16. package/dist/cli/schema.d.ts +24 -0
  17. package/dist/recipes/attribution-match/demo.json +27 -0
  18. package/dist/recipes/attribution-match/index.d.ts +5 -0
  19. package/dist/recipes/attribution-match/index.js +16 -0
  20. package/dist/recipes/attribution-match/schema.d.ts +40 -0
  21. package/dist/recipes/attribution-match/schema.js +20 -0
  22. package/dist/recipes/choose-action/demo.json +32 -0
  23. package/dist/recipes/choose-action/index.d.ts +5 -0
  24. package/dist/recipes/choose-action/index.js +8 -0
  25. package/dist/recipes/choose-action/schema.d.ts +42 -0
  26. package/dist/recipes/choose-action/schema.js +19 -0
  27. package/dist/recipes/evaluation-mention/demo.json +25 -0
  28. package/dist/recipes/evaluation-mention/index.d.ts +5 -0
  29. package/dist/recipes/evaluation-mention/index.js +16 -0
  30. package/dist/recipes/evaluation-mention/schema.d.ts +39 -0
  31. package/dist/recipes/evaluation-mention/schema.js +21 -0
  32. package/dist/recipes/evidence-independence/demo.json +26 -0
  33. package/dist/recipes/evidence-independence/index.d.ts +5 -0
  34. package/dist/recipes/evidence-independence/index.js +15 -0
  35. package/dist/recipes/evidence-independence/schema.d.ts +37 -0
  36. package/dist/recipes/evidence-independence/schema.js +19 -0
  37. package/dist/recipes/question-leading/demo.json +26 -0
  38. package/dist/recipes/question-leading/index.d.ts +5 -0
  39. package/dist/recipes/question-leading/index.js +16 -0
  40. package/dist/recipes/question-leading/schema.d.ts +40 -0
  41. package/dist/recipes/question-leading/schema.js +17 -0
  42. package/dist/recipes/response-refusal/demo.json +28 -0
  43. package/dist/recipes/response-refusal/index.d.ts +5 -0
  44. package/dist/recipes/response-refusal/index.js +18 -0
  45. package/dist/recipes/response-refusal/schema.d.ts +46 -0
  46. package/dist/recipes/response-refusal/schema.js +24 -0
  47. package/dist/recipes/take-turn/demo.json +22 -0
  48. package/dist/recipes/take-turn/index.d.ts +5 -0
  49. package/dist/recipes/take-turn/index.js +16 -0
  50. package/dist/recipes/take-turn/schema.d.ts +44 -0
  51. package/dist/recipes/take-turn/schema.js +23 -0
  52. package/dist/recipes/uncertainty-expression/demo.json +27 -0
  53. package/dist/recipes/uncertainty-expression/index.d.ts +5 -0
  54. package/dist/recipes/uncertainty-expression/index.js +17 -0
  55. package/dist/recipes/uncertainty-expression/schema.d.ts +43 -0
  56. package/dist/recipes/uncertainty-expression/schema.js +23 -0
  57. package/dist/src/index.d.ts +16 -0
  58. package/dist/src/index.js +8 -0
  59. package/package.json +33 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Add `take-turn` and `choose-action` for narrative turn eligibility and game action recommendations, with optional ordered player history, offline tests, and a gameplay composition guide. The source catalog now contains 80 recipes.
6
+ - Clarify that `.mjs` is a standalone Node quickstart option; existing JavaScript ES module and TypeScript projects can use their normal file types and start commands.
7
+
8
+ - Add six annotation recipes: `response-refusal`, `uncertainty-expression`, `evaluation-mention`, `attribution-match`, `question-leading`, and `evidence-independence`, bringing the source catalog to 78 recipes.
9
+ - Document their decision boundaries and research limitations; add offline contract, review-policy, discovery, and package checks without new runtime dependencies.
10
+ - Fix the package checker to accept both legacy npm archive reports and the npm 12 object format, including dependency archives.
11
+
5
12
  - Add six focused recipes: `instruction-conflict`, `task-dependency`, `task-duplicate`, `constraint-strength`, `requirement-testability`, and `claim-stance`.
6
13
  - Add a catalog growth roadmap, an AI alignment research protocol, research discovery tags, and an offline first-use command in the README.
7
14
 
package/README.md CHANGED
@@ -1,46 +1,41 @@
1
1
  # jev-recipes
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/jev-recipes?logo=npm)](https://www.npmjs.com/package/jev-recipes)
3
+ **Small AI decisions. Ready to use in your code.**
4
4
 
5
- <!-- BEGIN GENERATED: summary -->
6
-
7
- 72 small TypeScript recipes for decisions inside an AI application. Route a request, select useful evidence, or check a claim with a function call.
5
+ [![npm version](https://img.shields.io/npm/v/jev-recipes)](https://www.npmjs.com/package/jev-recipes)
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)
7
+ [![Node.js version](https://img.shields.io/node/v/jev-recipes)](https://nodejs.org/)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/agencyenterprise/jev-recipes/blob/main/LICENSE)
8
9
 
9
- [Browse all 72 recipes](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/README.md).
10
+ [Quickstart](#use-a-recipe) | [Recipe catalog](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/README.md) | [API vs. SDK vs. recipes](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/api-sdk-recipes.md) | [Contributing](https://github.com/agencyenterprise/jev-recipes/blob/main/CONTRIBUTING.md)
10
11
 
11
- <!-- END GENERATED: summary -->
12
+ <!-- BEGIN GENERATED: summary -->
12
13
 
13
- [Jev](https://docs.typesafe.ai/introduction) makes the underlying decisions. This package supplies focused instructions, validated inputs and results, and clear review outcomes. Your application decides what to do next.
14
+ 80 focused recipes for JavaScript and TypeScript. Route messages, check evidence, and label model responses with a function call.
14
15
 
15
- ## Try a decision
16
+ <!-- END GENERATED: summary -->
16
17
 
17
- With Node.js 22.9 or newer, run a saved illustration without an API key:
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
19
 
19
- ```sh
20
- npx jev-recipes demo action-scope
21
- ```
22
-
23
- It compares a request to explain a deployment failure with a proposed production deployment and returns `additional_work`. This is an offline fixture, not a live model assessment. To evaluate your own input, install the package and set a key below.
20
+ 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.
24
21
 
25
22
  ## Use a recipe
26
23
 
27
- Requires Node.js 22.9 or newer. Install in your application:
24
+ Requires **Node.js 22.9 or newer**, ES modules, and a **[TypeSafe API key](https://console.typesafe.ai/keys)**. Live calls send the supplied input to TypeSafe and use API quota.
25
+
26
+ **1. Install** in your project folder.
28
27
 
29
28
  ```sh
30
29
  npm install jev-recipes
31
30
  ```
32
31
 
33
- Set your API key in your server environment:
34
-
35
- ```sh
36
- export TYPESAFE_API_KEY='your-api-key'
37
- ```
32
+ **2. Add the code below to your app**, or save it as `route-message.mjs` in the same folder to try a standalone Node example.
38
33
 
39
- Choose a recipe, import it, and call it:
34
+ The `.mjs` extension is optional. We suggest it for this example because Node recognizes it as an ES module without changing your project settings. Existing apps can use `.js` with `"type": "module"` in `package.json`, or `.ts` with their usual TypeScript setup. See [Node's module formats](https://nodejs.org/api/packages.html#type).
40
35
 
41
36
  <!-- BEGIN GENERATED: quickstart -->
42
37
 
43
- ```ts
38
+ ```js
44
39
  import { route } from 'jev-recipes/route';
45
40
 
46
41
  const result = await route({
@@ -50,26 +45,85 @@ const result = await route({
50
45
  technical: 'Errors, outages, and broken integrations',
51
46
  },
52
47
  });
53
- console.log(result.status, result.route);
48
+
49
+ if (result.status === 'ready') {
50
+ console.log('Send this message to:', result.route);
51
+ } else {
52
+ console.log('Needs review: ask for more detail or send to a person.');
53
+ }
54
54
  ```
55
55
 
56
56
  <!-- END GENERATED: quickstart -->
57
57
 
58
- For `route`, a `ready` result contains the chosen route. A `review` result has a null route: ask for clarification or involve a person. Invalid input, malformed responses, and provider failures throw errors.
58
+ **3. Set your key and run.** Replace `your-api-key` with your TypeSafe key. For the standalone example:
59
+
60
+ ```sh
61
+ export TYPESAFE_API_KEY='your-api-key'
62
+ node route-message.mjs
63
+ ```
64
+
65
+ If you saved it as `route-message.js` in an ES module project, run `node route-message.js`. For an existing app or TypeScript project, use its normal start command.
66
+
67
+ <details>
68
+ <summary>Windows PowerShell</summary>
69
+
70
+ ```powershell
71
+ $env:TYPESAFE_API_KEY = 'your-api-key'
72
+ node route-message.mjs
73
+ ```
74
+
75
+ </details>
76
+
77
+ Example output:
78
+
79
+ ```text
80
+ Send this message to: billing
81
+ ```
82
+
83
+ A live result can differ. When the choice is uncertain, the script prints the review message instead.
84
+
85
+ **Make it yours:** replace `request` with your incoming message and `routes` with your team's names and descriptions. Replace `console.log` with your queue or handler logic. Keep the key and live calls on the server.
86
+
87
+ <a id="try-a-decision"></a>
88
+
89
+ <details>
90
+ <summary>Try the saved example without an API key</summary>
91
+
92
+ ```sh
93
+ npx jev-recipes demo route
94
+ ```
95
+
96
+ This runs an offline fixture and prints JSON with `result.status: "ready"` and `result.route: "billing"`. No model is called. Use it to inspect the interface before setting up a key.
97
+
98
+ </details>
99
+
100
+ ## Why recipes?
101
+
102
+ The TypeSafe SDK handles API calls and typed answers. Recipes add the instructions, input and response validation, confidence policy, and result handling for a specific decision.
103
+
104
+ | Start with | You provide |
105
+ | ---------------- | -------------------------------------------------------------------------- |
106
+ | **Raw API** | HTTP handling, question, choices, validation, and review logic |
107
+ | **TypeSafe SDK** | Question, choices, task-specific validation, and review logic |
108
+ | **jev-recipes** | `route({ request, routes })` and the application code that uses its result |
109
+
110
+ [See the same task implemented all three ways](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/api-sdk-recipes.md). All three use the same service. Recipes reduce the decision logic you need to build, test, and maintain.
59
111
 
60
- Live calls send the supplied input to TypeSafe and use API quota. Keep the key on the server. No Makefile or build step is needed to use the installed package.
112
+ <a id="find-the-right-recipe"></a>
61
113
 
62
- ## Find the right recipe
114
+ ## Find your recipe
63
115
 
64
- | I want to… | Start with |
65
- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
66
- | Send a request to the right handler | [`route`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/route/README.md) |
67
- | Select relevant passages | [`rerank`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/rerank/README.md) |
68
- | Check whether I have enough evidence to answer | [`answerability`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/answerability/README.md) |
69
- | Check claims against evidence | [`verify`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/verify/README.md) |
70
- | Check whether a draft answers each question | [`answer-coverage`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/answer-coverage/README.md) |
116
+ | Your task | Start with |
117
+ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
118
+ | Send a request to the right team | [`route`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/route/README.md) |
119
+ | Find useful passages | [`rerank`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/rerank/README.md) |
120
+ | Check whether the evidence is enough to answer | [`answerability`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/answerability/README.md) |
121
+ | Check claims against supplied evidence | [`verify`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/verify/README.md) |
122
+ | Find missing or ambiguous requirements | [`clarify`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/clarify/README.md) |
123
+ | Label a response's stance toward a claim | [`claim-stance`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/claim-stance/README.md) |
124
+ | Choose a move from available game actions | [`choose-action`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/choose-action/README.md) |
71
125
 
72
- Search the catalog and inspect a recipe without an API key:
126
+ Search, inspect inputs, and try saved results without a key:
73
127
 
74
128
  ```sh
75
129
  npx jev-recipes list "enough evidence" --limit 5
@@ -77,42 +131,70 @@ npx jev-recipes describe answerability
77
131
  npx jev-recipes demo answerability
78
132
  ```
79
133
 
80
- `list` ranks matching recipes and supports `--category`. `describe` shows when to use a recipe, related alternatives, input and result schemas, and example input. `demo` runs a saved illustration without calling a model. CLI output is JSON, so it also works in scripts and agent tools.
134
+ [Browse the complete catalog](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/README.md). Each guide includes an import, input reference, result behavior, limitations, and related recipes.
81
135
 
82
- ## Run your own input from the terminal
136
+ For games, the [gameplay guide](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/gameplay.md) shows how to combine turn eligibility with action selection using rules, current state, and player history.
137
+
138
+ <a id="run-your-own-input-from-the-terminal"></a>
139
+
140
+ ## Use the terminal
141
+
142
+ Create a JSON input file:
83
143
 
84
144
  ```sh
85
145
  npx jev-recipes example route > input.json
86
146
  ```
87
147
 
88
- Edit the file, then run it with your key set:
148
+ Edit `request` and `routes` in `input.json`, then run with `TYPESAFE_API_KEY` set:
89
149
 
90
150
  ```sh
91
151
  npx jev-recipes run route input.json
92
152
  ```
93
153
 
94
- The installed CLI reads its environment; it does not load `.env` automatically. Errors go to stderr with exit code 1. A review outcome is a completed evaluation, so inspect the result before acting.
154
+ Read `result.status` and `result.route` in the JSON output. Substitute another recipe's name in both commands to use a different decision. Run `npx jev-recipes --help` for all commands.
155
+
156
+ The CLI reads environment variables; it does not automatically load `.env`. Errors go to stderr with exit code `1`. A review outcome is a completed evaluation, so inspect the result before acting.
157
+
158
+ <a id="understand-the-result"></a>
159
+
160
+ ## Work with results
161
+
162
+ | Result or condition | What it means |
163
+ | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
164
+ | `route`: `status: 'ready'` | `route` contains the chosen name. Your application can use it to choose a handler. |
165
+ | `route`: `status: 'review'` | `route` is `null`. Ask for clarification or involve a person. |
166
+ | Other recipe results | Inspect the verdict and per-item checks. A confident result can identify a conflict or an unsupported claim. |
167
+ | Invalid input, malformed response, or provider failure | The function throws. Handle errors in your application. |
95
168
 
96
- ## Understand the result
169
+ Batch recipes expose their own summaries, such as `verify.allSupported` and its per-claim checks. Every result includes model and token usage. Confidence is a signal for your policy, not a guarantee of correctness.
97
170
 
98
- - Read the recipe's outcome as well as its confidence or review status. A confident assessment can identify an unsupported claim or missing information.
99
- - Batch recipes preserve individual checks. `verify` includes `allSupported` and per-claim statuses rather than one overall status.
100
- - Results include model and token usage. Confidence is not a guarantee of correctness.
101
- - Pass `{ client, model, signal }` as a second argument when you need to configure a call.
171
+ Pass `{ client, model, signal }` as the optional second argument to configure a call. [Shared behavior and limits](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/README.md#shared-options-and-behavior) covers configuration, input limits, and uncertainty.
102
172
 
103
- Use direct imports such as `jev-recipes/route` to load a recipe and its dependencies. Root imports remain supported. Installation still downloads one package; direct imports do not selectively download files.
173
+ ## Verification and scope
104
174
 
105
- Your application owns retrieval, generation, storage, and actions. Each recipe returns a decision. See [shared behavior and limits](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/README.md#shared-options-and-behavior).
175
+ The [CI workflow](https://github.com/agencyenterprise/jev-recipes/actions/workflows/ci.yml) runs on Node.js 22 and 24. `make ci` checks types, formatting, generated-file consistency, recipe test coverage, tooling, and the installable package.
176
+
177
+ - **Package checks:** create an npm archive, install it into a separate project, and exercise imports, declarations, and offline commands.
178
+ - **Recipe checks:** validate software behavior using mocked responses, including invalid inputs, confidence boundaries, and malformed answers.
179
+ - **Model evaluation:** offline tests and demos do not measure Jev's accuracy. Evaluate recipes on your own data for your intended use.
180
+
181
+ The package contains compiled code, type declarations, catalog data, and offline demo assets. Tests, build tools, and source guides stay out of the npm archive. [Publishing details](https://github.com/agencyenterprise/jev-recipes/blob/main/RELEASING.md).
182
+
183
+ Direct imports such as `jev-recipes/route` load the selected recipe and its dependencies. Installation downloads one package; it does not selectively download individual recipes.
106
184
 
107
185
  ## AI alignment research
108
186
 
109
- Use focused decisions to annotate model outputs for research. `claim-stance` labels a response's expressed agreement with a claim; `verify` checks supplied evidence; `draft-compare` compares responses under a rubric. These are candidate components of an evaluation, with uncertainty available for review.
187
+ Recipes can serve as candidate annotation tools in controlled experiments. `claim-stance` labels expressed agreement, `verify` checks supplied evidence, and `draft-compare` compares responses under a rubric.
110
188
 
111
- The [AI alignment research guide](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/ai-alignment-research.md) outlines a controlled agreement study, human annotation checks, and ways to work with saved outputs. The recipes do not infer a model's internal motives or establish that it is aligned.
189
+ The [research guide](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/ai-alignment-research.md) outlines a controlled agreement study and validation against human annotations. These labels describe observable outputs; they do not establish internal motives or prove that a model is aligned.
112
190
 
113
- ## Contribute
191
+ <a id="contribute"></a>
114
192
 
115
- The recipe folder owns its code, schemas, metadata, demo, and guide. Tests stay under `tests/recipe/` and are not published. Exports and the catalog are generated from the recipe folders.
193
+ ## Contributing and support
194
+
195
+ [Report a bug or request a recipe](https://github.com/agencyenterprise/jev-recipes/issues). Include the recipe name, package and Node.js versions, and a minimal reproduction. Keep API keys and private inputs out of reports.
196
+
197
+ To work on the repository:
116
198
 
117
199
  ```sh
118
200
  make setup
@@ -120,7 +202,9 @@ make docs
120
202
  make ci
121
203
  ```
122
204
 
123
- Run `make help` for all commands. [Contributing](https://github.com/agencyenterprise/jev-recipes/blob/main/CONTRIBUTING.md) explains authoring and generation; [releasing](https://github.com/agencyenterprise/jev-recipes/blob/main/RELEASING.md) explains package checks and publishing.
205
+ The recipe folder owns its implementation, schemas, metadata, demo, and guide. Exports and catalog entries are generated from those folders. Tests live under `tests/recipe/`.
206
+
207
+ [Contributing guide](https://github.com/agencyenterprise/jev-recipes/blob/main/CONTRIBUTING.md) | [Roadmap](https://github.com/agencyenterprise/jev-recipes/blob/main/RECIPE_ROADMAP.md) | [Changelog](https://github.com/agencyenterprise/jev-recipes/blob/main/CHANGELOG.md)
124
208
 
125
209
  ## License
126
210
 
@@ -0,0 +1,55 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "statement": {
7
+ "type": "string",
8
+ "description": "One statement or faithful paraphrase whose attributed speaker or source should be checked."
9
+ },
10
+ "attributedTo": {
11
+ "type": "string",
12
+ "description": "The speaker or source claimed to have made or explicitly endorsed the statement."
13
+ },
14
+ "source": {
15
+ "type": "string",
16
+ "description": "The supplied transcript or excerpt, including speaker labels or attribution context needed to check the claim."
17
+ },
18
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
19
+ },
20
+ "required": ["statement", "attributedTo", "source"]
21
+ },
22
+ "resultSchema": {
23
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
24
+ "type": "object",
25
+ "properties": {
26
+ "model": { "type": "string" },
27
+ "usage": {
28
+ "type": "object",
29
+ "properties": {
30
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
31
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
32
+ },
33
+ "required": ["input_tokens", "output_tokens"],
34
+ "additionalProperties": false
35
+ },
36
+ "status": { "type": "string", "enum": ["ready", "review"] },
37
+ "verdict": {
38
+ "type": "string",
39
+ "enum": ["matched", "mismatched", "not_attributed", "unclear"]
40
+ },
41
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
42
+ "probabilities": {
43
+ "type": "object",
44
+ "propertyNames": {
45
+ "type": "string",
46
+ "enum": ["matched", "mismatched", "not_attributed", "unclear"]
47
+ },
48
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
49
+ "required": ["matched", "mismatched", "not_attributed", "unclear"]
50
+ }
51
+ },
52
+ "required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
53
+ "additionalProperties": false
54
+ }
55
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "player": {
7
+ "type": "string",
8
+ "description": "The player whose next action should be chosen."
9
+ },
10
+ "objective": {
11
+ "type": "string",
12
+ "description": "The goal or scoring preference used to compare eligible actions."
13
+ },
14
+ "rules": {
15
+ "type": "string",
16
+ "description": "Applicable game rules, including turn, phase, resource, and action constraints."
17
+ },
18
+ "environment": {
19
+ "type": "string",
20
+ "description": "The current game snapshot available to the player, after the supplied history."
21
+ },
22
+ "actions": {
23
+ "minItems": 1,
24
+ "maxItems": 50,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "properties": { "id": { "type": "string" }, "text": { "type": "string" } },
29
+ "required": ["id", "text"]
30
+ },
31
+ "description": "One to fifty candidate actions with unique IDs and concrete action descriptions."
32
+ },
33
+ "history": {
34
+ "maxItems": 100,
35
+ "type": "array",
36
+ "items": {
37
+ "type": "object",
38
+ "properties": {
39
+ "player": {
40
+ "type": "string",
41
+ "description": "The player who took the recorded action."
42
+ },
43
+ "action": {
44
+ "type": "string",
45
+ "description": "The observed action, including its known outcome when relevant."
46
+ }
47
+ },
48
+ "required": ["player", "action"]
49
+ },
50
+ "description": "Optional observed actions by any players, oldest first. May be empty or incomplete."
51
+ },
52
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
53
+ },
54
+ "required": ["player", "objective", "rules", "environment", "actions"]
55
+ },
56
+ "resultSchema": {
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "type": "object",
59
+ "properties": {
60
+ "model": { "type": "string" },
61
+ "usage": {
62
+ "type": "object",
63
+ "properties": {
64
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
65
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
66
+ },
67
+ "required": ["input_tokens", "output_tokens"],
68
+ "additionalProperties": false
69
+ },
70
+ "status": { "type": "string", "enum": ["ready", "review"] },
71
+ "verdict": { "type": "string", "enum": ["matched", "none", "ambiguous"] },
72
+ "selection": { "type": ["string", "null"] },
73
+ "suggestedSelection": { "type": ["string", "null"] },
74
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
75
+ "probabilities": {
76
+ "type": "object",
77
+ "properties": {
78
+ "candidates": {
79
+ "type": "object",
80
+ "propertyNames": { "type": "string" },
81
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 }
82
+ },
83
+ "none": { "type": "number", "minimum": 0, "maximum": 1 },
84
+ "ambiguous": { "type": "number", "minimum": 0, "maximum": 1 }
85
+ },
86
+ "required": ["candidates", "none", "ambiguous"],
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "required": [
91
+ "model",
92
+ "usage",
93
+ "status",
94
+ "verdict",
95
+ "selection",
96
+ "suggestedSelection",
97
+ "confidence",
98
+ "probabilities"
99
+ ],
100
+ "additionalProperties": false
101
+ }
102
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "response": {
7
+ "type": "string",
8
+ "description": "The response to inspect for explicit references to evaluation of an AI response or model."
9
+ },
10
+ "context": {
11
+ "type": "string",
12
+ "description": "Surrounding text used only to resolve who or what the response refers to."
13
+ },
14
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
15
+ },
16
+ "required": ["response"]
17
+ },
18
+ "resultSchema": {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "type": "object",
21
+ "properties": {
22
+ "model": { "type": "string" },
23
+ "usage": {
24
+ "type": "object",
25
+ "properties": {
26
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
27
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
28
+ },
29
+ "required": ["input_tokens", "output_tokens"],
30
+ "additionalProperties": false
31
+ },
32
+ "status": { "type": "string", "enum": ["ready", "review"] },
33
+ "verdict": { "type": "string", "enum": ["self_reference", "discussion", "none", "unclear"] },
34
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
35
+ "probabilities": {
36
+ "type": "object",
37
+ "propertyNames": {
38
+ "type": "string",
39
+ "enum": ["self_reference", "discussion", "none", "unclear"]
40
+ },
41
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
42
+ "required": ["self_reference", "discussion", "none", "unclear"]
43
+ }
44
+ },
45
+ "required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
46
+ "additionalProperties": false
47
+ }
48
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "claim": {
7
+ "type": "string",
8
+ "description": "One claim that defines which supporting evidence origins matter."
9
+ },
10
+ "firstProvenance": {
11
+ "type": "string",
12
+ "description": "The first report's supplied source chain, observations, data collection, or other origin details for the claim."
13
+ },
14
+ "secondProvenance": {
15
+ "type": "string",
16
+ "description": "The second report's supplied source chain, observations, data collection, or other origin details for the claim."
17
+ },
18
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
19
+ },
20
+ "required": ["claim", "firstProvenance", "secondProvenance"]
21
+ },
22
+ "resultSchema": {
23
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
24
+ "type": "object",
25
+ "properties": {
26
+ "model": { "type": "string" },
27
+ "usage": {
28
+ "type": "object",
29
+ "properties": {
30
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
31
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
32
+ },
33
+ "required": ["input_tokens", "output_tokens"],
34
+ "additionalProperties": false
35
+ },
36
+ "status": { "type": "string", "enum": ["ready", "review"] },
37
+ "verdict": { "type": "string", "enum": ["shared_origin", "separate_origins", "unclear"] },
38
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
39
+ "probabilities": {
40
+ "type": "object",
41
+ "propertyNames": {
42
+ "type": "string",
43
+ "enum": ["shared_origin", "separate_origins", "unclear"]
44
+ },
45
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
46
+ "required": ["shared_origin", "separate_origins", "unclear"]
47
+ }
48
+ },
49
+ "required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
50
+ "additionalProperties": false
51
+ }
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "question": {
7
+ "type": "string",
8
+ "description": "One question, including any framing that the respondent sees."
9
+ },
10
+ "proposedAnswer": {
11
+ "type": "string",
12
+ "description": "One candidate answer or position whose treatment by the question should be assessed."
13
+ },
14
+ "context": {
15
+ "type": "string",
16
+ "description": "Supplied context needed to interpret references and the candidate answer."
17
+ },
18
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
19
+ },
20
+ "required": ["question", "proposedAnswer"]
21
+ },
22
+ "resultSchema": {
23
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
24
+ "type": "object",
25
+ "properties": {
26
+ "model": { "type": "string" },
27
+ "usage": {
28
+ "type": "object",
29
+ "properties": {
30
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
31
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
32
+ },
33
+ "required": ["input_tokens", "output_tokens"],
34
+ "additionalProperties": false
35
+ },
36
+ "status": { "type": "string", "enum": ["ready", "review"] },
37
+ "verdict": { "type": "string", "enum": ["favors", "disfavors", "neutral", "unclear"] },
38
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
39
+ "probabilities": {
40
+ "type": "object",
41
+ "propertyNames": {
42
+ "type": "string",
43
+ "enum": ["favors", "disfavors", "neutral", "unclear"]
44
+ },
45
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
46
+ "required": ["favors", "disfavors", "neutral", "unclear"]
47
+ }
48
+ },
49
+ "required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
50
+ "additionalProperties": false
51
+ }
52
+ }