jev-recipes 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +137 -48
  3. package/dist/catalog/generated/details/attribution-match.json +55 -0
  4. package/dist/catalog/generated/details/checkers-move.json +128 -0
  5. package/dist/catalog/generated/details/choose-action.json +102 -0
  6. package/dist/catalog/generated/details/evaluation-mention.json +48 -0
  7. package/dist/catalog/generated/details/evidence-independence.json +52 -0
  8. package/dist/catalog/generated/details/question-leading.json +52 -0
  9. package/dist/catalog/generated/details/response-refusal.json +55 -0
  10. package/dist/catalog/generated/details/take-turn.json +68 -0
  11. package/dist/catalog/generated/details/uncertainty-expression.json +55 -0
  12. package/dist/catalog/generated/loaders.js +9 -0
  13. package/dist/catalog/generated/metadata.js +310 -0
  14. package/dist/catalog/generated/names.d.ts +1 -1
  15. package/dist/catalog/generated/names.js +9 -0
  16. package/dist/catalog/schema.d.ts +9 -0
  17. package/dist/cli/schema.d.ts +27 -0
  18. package/dist/recipes/attribution-match/demo.json +27 -0
  19. package/dist/recipes/attribution-match/index.d.ts +5 -0
  20. package/dist/recipes/attribution-match/index.js +16 -0
  21. package/dist/recipes/attribution-match/schema.d.ts +40 -0
  22. package/dist/recipes/attribution-match/schema.js +20 -0
  23. package/dist/recipes/checkers-move/demo.json +58 -0
  24. package/dist/recipes/checkers-move/index.d.ts +5 -0
  25. package/dist/recipes/checkers-move/index.js +34 -0
  26. package/dist/recipes/checkers-move/schema.d.ts +48 -0
  27. package/dist/recipes/checkers-move/schema.js +73 -0
  28. package/dist/recipes/choose-action/demo.json +32 -0
  29. package/dist/recipes/choose-action/index.d.ts +5 -0
  30. package/dist/recipes/choose-action/index.js +8 -0
  31. package/dist/recipes/choose-action/schema.d.ts +42 -0
  32. package/dist/recipes/choose-action/schema.js +19 -0
  33. package/dist/recipes/evaluation-mention/demo.json +25 -0
  34. package/dist/recipes/evaluation-mention/index.d.ts +5 -0
  35. package/dist/recipes/evaluation-mention/index.js +16 -0
  36. package/dist/recipes/evaluation-mention/schema.d.ts +39 -0
  37. package/dist/recipes/evaluation-mention/schema.js +21 -0
  38. package/dist/recipes/evidence-independence/demo.json +26 -0
  39. package/dist/recipes/evidence-independence/index.d.ts +5 -0
  40. package/dist/recipes/evidence-independence/index.js +15 -0
  41. package/dist/recipes/evidence-independence/schema.d.ts +37 -0
  42. package/dist/recipes/evidence-independence/schema.js +19 -0
  43. package/dist/recipes/question-leading/demo.json +26 -0
  44. package/dist/recipes/question-leading/index.d.ts +5 -0
  45. package/dist/recipes/question-leading/index.js +16 -0
  46. package/dist/recipes/question-leading/schema.d.ts +40 -0
  47. package/dist/recipes/question-leading/schema.js +17 -0
  48. package/dist/recipes/response-refusal/demo.json +28 -0
  49. package/dist/recipes/response-refusal/index.d.ts +5 -0
  50. package/dist/recipes/response-refusal/index.js +18 -0
  51. package/dist/recipes/response-refusal/schema.d.ts +46 -0
  52. package/dist/recipes/response-refusal/schema.js +24 -0
  53. package/dist/recipes/take-turn/demo.json +22 -0
  54. package/dist/recipes/take-turn/index.d.ts +5 -0
  55. package/dist/recipes/take-turn/index.js +16 -0
  56. package/dist/recipes/take-turn/schema.d.ts +44 -0
  57. package/dist/recipes/take-turn/schema.js +23 -0
  58. package/dist/recipes/uncertainty-expression/demo.json +27 -0
  59. package/dist/recipes/uncertainty-expression/index.d.ts +5 -0
  60. package/dist/recipes/uncertainty-expression/index.js +17 -0
  61. package/dist/recipes/uncertainty-expression/schema.d.ts +43 -0
  62. package/dist/recipes/uncertainty-expression/schema.js +23 -0
  63. package/dist/src/index.d.ts +18 -0
  64. package/dist/src/index.js +9 -0
  65. package/package.json +37 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Add `checkers-move`: supply a structured board, player, and legal moves to receive a move ID in one logical Jev request. Includes American/English checkers instructions, board translation, input checks, and offline tests, bringing the source catalog to 81 recipes. No new runtime dependencies; live speed and playing strength remain unmeasured.
6
+
7
+ - 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.
8
+ - 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.
9
+
10
+ - Add six annotation recipes: `response-refusal`, `uncertainty-expression`, `evaluation-mention`, `attribution-match`, `question-leading`, and `evidence-independence`, bringing the source catalog to 78 recipes.
11
+ - Document their decision boundaries and research limitations; add offline contract, review-policy, discovery, and package checks without new runtime dependencies.
12
+ - Fix the package checker to accept both legacy npm archive reports and the npm 12 object format, including dependency archives.
13
+
5
14
  - Add six focused recipes: `instruction-conflict`, `task-dependency`, `task-duplicate`, `constraint-strength`, `requirement-testability`, and `claim-stance`.
6
15
  - Add a catalog growth roadmap, an AI alignment research protocol, research discovery tags, and an offline first-use command in the README.
7
16
 
package/README.md CHANGED
@@ -1,46 +1,45 @@
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 -->
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)
9
+
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)
6
11
 
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.
12
+ <!-- BEGIN GENERATED: summary -->
8
13
 
9
- [Browse all 72 recipes](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/README.md).
14
+ 81 focused recipes for JavaScript and TypeScript. Route messages, check evidence, and label model responses with a function call.
10
15
 
11
16
  <!-- END GENERATED: summary -->
12
17
 
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.
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.
14
19
 
15
- ## Try a decision
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.
16
21
 
17
- With Node.js 22.9 or newer, run a saved illustration without an API key:
22
+ ## Watch Jev play checkers against Jev using the checkers-move recipe
18
23
 
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.
24
+ https://github.com/user-attachments/assets/4ac10e7b-b57c-4d73-a2fe-fee90cd1e58d
24
25
 
25
26
  ## Use a recipe
26
27
 
27
- Requires Node.js 22.9 or newer. Install in your application:
28
+ 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.
29
+
30
+ **1. Install** in your project folder.
28
31
 
29
32
  ```sh
30
33
  npm install jev-recipes
31
34
  ```
32
35
 
33
- Set your API key in your server environment:
36
+ **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.
34
37
 
35
- ```sh
36
- export TYPESAFE_API_KEY='your-api-key'
37
- ```
38
-
39
- Choose a recipe, import it, and call it:
38
+ 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
39
 
41
40
  <!-- BEGIN GENERATED: quickstart -->
42
41
 
43
- ```ts
42
+ ```js
44
43
  import { route } from 'jev-recipes/route';
45
44
 
46
45
  const result = await route({
@@ -50,26 +49,86 @@ const result = await route({
50
49
  technical: 'Errors, outages, and broken integrations',
51
50
  },
52
51
  });
53
- console.log(result.status, result.route);
52
+
53
+ if (result.status === 'ready') {
54
+ console.log('Send this message to:', result.route);
55
+ } else {
56
+ console.log('Needs review: ask for more detail or send to a person.');
57
+ }
54
58
  ```
55
59
 
56
60
  <!-- END GENERATED: quickstart -->
57
61
 
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.
62
+ **3. Set your key and run.** Replace `your-api-key` with your TypeSafe key. For the standalone example:
63
+
64
+ ```sh
65
+ export TYPESAFE_API_KEY='your-api-key'
66
+ node route-message.mjs
67
+ ```
68
+
69
+ 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.
70
+
71
+ <details>
72
+ <summary>Windows PowerShell</summary>
73
+
74
+ ```powershell
75
+ $env:TYPESAFE_API_KEY = 'your-api-key'
76
+ node route-message.mjs
77
+ ```
78
+
79
+ </details>
80
+
81
+ Example output:
82
+
83
+ ```text
84
+ Send this message to: billing
85
+ ```
86
+
87
+ A live result can differ. When the choice is uncertain, the script prints the review message instead.
59
88
 
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.
89
+ **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.
61
90
 
62
- ## Find the right recipe
91
+ <a id="try-a-decision"></a>
63
92
 
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) |
93
+ <details>
94
+ <summary>Try the saved example without an API key</summary>
71
95
 
72
- Search the catalog and inspect a recipe without an API key:
96
+ ```sh
97
+ npx jev-recipes demo route
98
+ ```
99
+
100
+ 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.
101
+
102
+ </details>
103
+
104
+ ## Why recipes?
105
+
106
+ 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.
107
+
108
+ | Start with | You provide |
109
+ | ---------------- | -------------------------------------------------------------------------- |
110
+ | **Raw API** | HTTP handling, question, choices, validation, and review logic |
111
+ | **TypeSafe SDK** | Question, choices, task-specific validation, and review logic |
112
+ | **jev-recipes** | `route({ request, routes })` and the application code that uses its result |
113
+
114
+ [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.
115
+
116
+ <a id="find-the-right-recipe"></a>
117
+
118
+ ## Find your recipe
119
+
120
+ | Your task | Start with |
121
+ | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
122
+ | Send a request to the right team | [`route`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/route/README.md) |
123
+ | Find useful passages | [`rerank`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/rerank/README.md) |
124
+ | Check whether the evidence is enough to answer | [`answerability`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/answerability/README.md) |
125
+ | Check claims against supplied evidence | [`verify`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/verify/README.md) |
126
+ | Find missing or ambiguous requirements | [`clarify`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/clarify/README.md) |
127
+ | Label a response's stance toward a claim | [`claim-stance`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/claim-stance/README.md) |
128
+ | Choose a move from available game actions | [`choose-action`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/choose-action/README.md) |
129
+ | Choose a checkers move from your board and legal moves | [`checkers-move`](https://github.com/agencyenterprise/jev-recipes/blob/main/recipes/checkers-move/README.md) |
130
+
131
+ Search, inspect inputs, and try saved results without a key:
73
132
 
74
133
  ```sh
75
134
  npx jev-recipes list "enough evidence" --limit 5
@@ -77,42 +136,70 @@ npx jev-recipes describe answerability
77
136
  npx jev-recipes demo answerability
78
137
  ```
79
138
 
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.
139
+ [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.
140
+
141
+ For games, the [gameplay guide](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/gameplay.md) starts with a checkers decision using just the board, player, and legal moves. It also covers general action selection and narrative turn eligibility.
81
142
 
82
- ## Run your own input from the terminal
143
+ <a id="run-your-own-input-from-the-terminal"></a>
144
+
145
+ ## Use the terminal
146
+
147
+ Create a JSON input file:
83
148
 
84
149
  ```sh
85
150
  npx jev-recipes example route > input.json
86
151
  ```
87
152
 
88
- Edit the file, then run it with your key set:
153
+ Edit `request` and `routes` in `input.json`, then run with `TYPESAFE_API_KEY` set:
89
154
 
90
155
  ```sh
91
156
  npx jev-recipes run route input.json
92
157
  ```
93
158
 
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.
159
+ 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.
160
+
161
+ 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.
162
+
163
+ <a id="understand-the-result"></a>
164
+
165
+ ## Work with results
166
+
167
+ | Result or condition | What it means |
168
+ | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
169
+ | `route`: `status: 'ready'` | `route` contains the chosen name. Your application can use it to choose a handler. |
170
+ | `route`: `status: 'review'` | `route` is `null`. Ask for clarification or involve a person. |
171
+ | Other recipe results | Inspect the verdict and per-item checks. A confident result can identify a conflict or an unsupported claim. |
172
+ | Invalid input, malformed response, or provider failure | The function throws. Handle errors in your application. |
95
173
 
96
- ## Understand the result
174
+ 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
175
 
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.
176
+ 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
177
 
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.
178
+ ## Verification and scope
104
179
 
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).
180
+ 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.
181
+
182
+ - **Package checks:** create an npm archive, install it into a separate project, and exercise imports, declarations, and offline commands.
183
+ - **Recipe checks:** validate software behavior using mocked responses, including invalid inputs, confidence boundaries, and malformed answers.
184
+ - **Model evaluation:** offline tests and demos do not measure Jev's accuracy. Evaluate recipes on your own data for your intended use.
185
+
186
+ 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).
187
+
188
+ 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
189
 
107
190
  ## AI alignment research
108
191
 
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.
192
+ 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
193
 
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.
194
+ 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
195
 
113
- ## Contribute
196
+ <a id="contribute"></a>
114
197
 
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.
198
+ ## Contributing and support
199
+
200
+ [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.
201
+
202
+ To work on the repository:
116
203
 
117
204
  ```sh
118
205
  make setup
@@ -120,7 +207,9 @@ make docs
120
207
  make ci
121
208
  ```
122
209
 
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.
210
+ 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/`.
211
+
212
+ [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
213
 
125
214
  ## License
126
215
 
@@ -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,128 @@
1
+ {
2
+ "inputSchema": {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "board": {
7
+ "minItems": 1,
8
+ "maxItems": 24,
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "square": {
14
+ "type": "string",
15
+ "pattern": "^(?:[aceg][1357]|[bdfh][2468])$",
16
+ "description": "A playable square: a1 is bottom left; files a-h, ranks 1-8."
17
+ },
18
+ "player": { "type": "string", "enum": ["red", "black"] },
19
+ "king": {
20
+ "description": "True for a king; omitted or false for a man.",
21
+ "type": "boolean"
22
+ }
23
+ },
24
+ "required": ["square", "player"],
25
+ "additionalProperties": false
26
+ },
27
+ "description": "All remaining pieces. Unlisted squares are empty; red moves toward rank 8, black toward rank 1."
28
+ },
29
+ "player": {
30
+ "type": "string",
31
+ "enum": ["red", "black"],
32
+ "description": "The side whose turn it is and whose move should be chosen."
33
+ },
34
+ "legalMoves": {
35
+ "minItems": 1,
36
+ "maxItems": 50,
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "properties": {
41
+ "id": {
42
+ "type": "string",
43
+ "description": "Your move ID, returned unchanged when selected. __proto__ is reserved."
44
+ },
45
+ "from": {
46
+ "type": "string",
47
+ "pattern": "^(?:[aceg][1357]|[bdfh][2468])$",
48
+ "description": "A playable square: a1 is bottom left; files a-h, ranks 1-8."
49
+ },
50
+ "path": {
51
+ "minItems": 1,
52
+ "maxItems": 12,
53
+ "type": "array",
54
+ "items": {
55
+ "type": "string",
56
+ "pattern": "^(?:[aceg][1357]|[bdfh][2468])$",
57
+ "description": "A playable square: a1 is bottom left; files a-h, ranks 1-8."
58
+ },
59
+ "description": "Every landing square in order, excluding from. Include the full jump sequence."
60
+ },
61
+ "captures": {
62
+ "description": "Captured piece squares in jump order. Omit or use [] for an ordinary move.",
63
+ "maxItems": 12,
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "pattern": "^(?:[aceg][1357]|[bdfh][2468])$",
68
+ "description": "A playable square: a1 is bottom left; files a-h, ranks 1-8."
69
+ }
70
+ }
71
+ },
72
+ "required": ["id", "from", "path"],
73
+ "additionalProperties": false
74
+ },
75
+ "description": "One to fifty complete legal moves from your game, with unique IDs."
76
+ },
77
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
78
+ },
79
+ "required": ["board", "player", "legalMoves"],
80
+ "additionalProperties": false
81
+ },
82
+ "resultSchema": {
83
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
84
+ "type": "object",
85
+ "properties": {
86
+ "model": { "type": "string" },
87
+ "usage": {
88
+ "type": "object",
89
+ "properties": {
90
+ "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
91
+ "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
92
+ },
93
+ "required": ["input_tokens", "output_tokens"],
94
+ "additionalProperties": false
95
+ },
96
+ "status": { "type": "string", "enum": ["ready", "review"] },
97
+ "verdict": { "type": "string", "enum": ["matched", "none", "ambiguous"] },
98
+ "selection": { "type": ["string", "null"] },
99
+ "suggestedSelection": { "type": ["string", "null"] },
100
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
101
+ "probabilities": {
102
+ "type": "object",
103
+ "properties": {
104
+ "candidates": {
105
+ "type": "object",
106
+ "propertyNames": { "type": "string" },
107
+ "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 }
108
+ },
109
+ "none": { "type": "number", "minimum": 0, "maximum": 1 },
110
+ "ambiguous": { "type": "number", "minimum": 0, "maximum": 1 }
111
+ },
112
+ "required": ["candidates", "none", "ambiguous"],
113
+ "additionalProperties": false
114
+ }
115
+ },
116
+ "required": [
117
+ "model",
118
+ "usage",
119
+ "status",
120
+ "verdict",
121
+ "selection",
122
+ "suggestedSelection",
123
+ "confidence",
124
+ "probabilities"
125
+ ],
126
+ "additionalProperties": false
127
+ }
128
+ }
@@ -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
+ }