@introspection-ai/recipes 0.14.0 → 0.14.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.
- package/README.md +2 -0
- package/dist/recipe-check.d.ts +1 -0
- package/dist/recipe-check.d.ts.map +1 -1
- package/dist/recipe-check.js +3 -0
- package/dist/recipe-check.js.map +1 -1
- package/docs/index.md +1 -0
- package/docs/mcp-configuration.md +1 -1
- package/docs/recipe-format.md +16 -0
- package/docs/recipe-judges.md +140 -0
- package/package.json +1 -1
- package/vendor/recipe-check/darwin-arm64/recipe-check +0 -0
- package/vendor/recipe-check/darwin-x64/recipe-check +0 -0
- package/vendor/recipe-check/linux-arm64/recipe-check +0 -0
- package/vendor/recipe-check/linux-x64/recipe-check +0 -0
- package/vendor/recipe-check/linux-x64-musl/recipe-check +0 -0
- package/vendor/recipe-check/win32-x64/recipe-check.exe +0 -0
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ my-recipe/
|
|
|
50
50
|
├── agents/*.yaml # models, tools, skills, subagents, policy
|
|
51
51
|
├── skills/**/SKILL.md # reusable domain workflows
|
|
52
52
|
├── extensions/*.ts # optional Recipe-owned Pi extensions
|
|
53
|
+
├── judges/*.yaml # optional portable evaluation definitions
|
|
53
54
|
└── .pi/mcp.local.example.json # optional binding template
|
|
54
55
|
```
|
|
55
56
|
|
|
@@ -161,6 +162,7 @@ for manual and CI validation.
|
|
|
161
162
|
- [Agent composition](docs/agent-composition.md)
|
|
162
163
|
- [Interactions](docs/interactions.md)
|
|
163
164
|
- [MCP configuration](docs/mcp-configuration.md)
|
|
165
|
+
- [Recipe judges](docs/recipe-judges.md)
|
|
164
166
|
|
|
165
167
|
## Contributing
|
|
166
168
|
|
package/dist/recipe-check.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface RecipeCheckDiagnostic {
|
|
|
11
11
|
export interface RecipeCheckReport {
|
|
12
12
|
valid: boolean;
|
|
13
13
|
diagnostics: RecipeCheckDiagnostic[];
|
|
14
|
+
resources?: Record<string, number>;
|
|
14
15
|
}
|
|
15
16
|
export declare function checkRecipeAtLoad(recipeDir: string, env: NodeJS.ProcessEnv): Promise<RecipeCheckReport>;
|
|
16
17
|
export declare function formatRecipeDiagnostics(diagnostics: readonly RecipeCheckDiagnostic[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-check.d.ts","sourceRoot":"","sources":["../src/recipe-check.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,qBAAqB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"recipe-check.d.ts","sourceRoot":"","sources":["../src/recipe-check.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAuPD,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,CAAC,UAAU,GACrB,OAAO,CAAC,iBAAiB,CAAC,CAyC5B;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,qBAAqB,EAAE,GAC5C,MAAM,CAUR"}
|
package/dist/recipe-check.js
CHANGED
|
@@ -102,6 +102,9 @@ function validatorCommand(env) {
|
|
|
102
102
|
}
|
|
103
103
|
function needsContent(path) {
|
|
104
104
|
return (path === "package.json" ||
|
|
105
|
+
path === "package-lock.json" ||
|
|
106
|
+
path === "npm-shrinkwrap.json" ||
|
|
107
|
+
path === ".pi/mcp.local.example.json" ||
|
|
105
108
|
path === "SKILL.md" ||
|
|
106
109
|
path.endsWith("/SKILL.md") ||
|
|
107
110
|
path.endsWith(".yaml") ||
|
package/dist/recipe-check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-check.js","sourceRoot":"","sources":["../src/recipe-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"recipe-check.js","sourceRoot":"","sources":["../src/recipe-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAA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AC,CAAsB,CACxE,CAAC;YACJ,CAAC;YAAC,OAAO,UAAU,EAAE,CAAC;gBACpB,YAAY,CACV,IAAI,KAAK,CACP,2CAA2C,UAAU,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAC/I,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,WAA6C;IAE7C,OAAO,WAAW;SACf,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;QAClB,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI;YAC9B,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE;YACtD,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,OAAO,UAAU,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,GAAG,QAAQ,KAAK,UAAU,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;IAClG,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/docs/index.md
CHANGED
|
@@ -17,6 +17,7 @@ task lifecycle, protocols, and deployment.
|
|
|
17
17
|
| Compose agents and subagents | [Agent composition](agent-composition.md) |
|
|
18
18
|
| Ask for user input across hosts | [Interactions](interactions.md) |
|
|
19
19
|
| Declare capability policy and bindings | [MCP configuration](mcp-configuration.md) |
|
|
20
|
+
| Define portable evaluation judges | [Recipe judges](recipe-judges.md) |
|
|
20
21
|
|
|
21
22
|
## Boundary
|
|
22
23
|
|
|
@@ -131,7 +131,7 @@ export CONTACTS_MCP_TOKEN='...'
|
|
|
131
131
|
pi --recipe . --agent agent
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
Do not commit or distribute `.pi/mcp.local.json`;
|
|
134
|
+
Do not commit or distribute `.pi/mcp.local.json`; Recipe validation rejects
|
|
135
135
|
local configuration. Commit `.pi/mcp.local.example.json` when a binding template
|
|
136
136
|
is helpful. A host binds its own endpoint and credential system to the same
|
|
137
137
|
shape. A binding overrides a package-manifest endpoint with the same id,
|
package/docs/recipe-format.md
CHANGED
|
@@ -76,6 +76,11 @@ Unknown top-level `package.json` fields retain normal npm semantics. Unknown
|
|
|
76
76
|
Recipe fields inside supported `pi` structures are validation errors unless a
|
|
77
77
|
later format version explicitly defines them.
|
|
78
78
|
|
|
79
|
+
When a Recipe declares non-empty `dependencies` or `optionalDependencies`, it
|
|
80
|
+
MUST commit one supported dependency lockfile: `package-lock.json`,
|
|
81
|
+
`npm-shrinkwrap.json`, `pnpm-lock.yaml`, or `yarn.lock`. npm lockfiles MUST
|
|
82
|
+
carry the same package name and version as `package.json`.
|
|
83
|
+
|
|
79
84
|
## Agents
|
|
80
85
|
|
|
81
86
|
`pi.agents` may declare YAML agent definitions explicitly. When omitted,
|
|
@@ -122,6 +127,17 @@ The default agent is named `agent`. If no `agent` exists, a host MAY select the
|
|
|
122
127
|
only declared agent. When multiple agents exist without `agent`, the caller
|
|
123
128
|
MUST select one explicitly.
|
|
124
129
|
|
|
130
|
+
## Judges
|
|
131
|
+
|
|
132
|
+
A Recipe MAY include portable LLM grading definitions as direct `.yaml` or
|
|
133
|
+
`.yml` children of `judges/`. Nested files are not judge sources. Judge names
|
|
134
|
+
MUST be unique within the package.
|
|
135
|
+
|
|
136
|
+
The authored schema, defaults, applicability gates, and model configuration are
|
|
137
|
+
defined in [Recipe judges](recipe-judges.md). The Recipe Format owns this
|
|
138
|
+
declarative evaluation contract; hosts own transcript assembly, execution,
|
|
139
|
+
credentials, retries, persistence, and result processing.
|
|
140
|
+
|
|
125
141
|
## Instructions, skills, prompts, and extensions
|
|
126
142
|
|
|
127
143
|
`SYSTEM.md`, when present, is package-wide instruction source. Agent
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Recipe judge definitions
|
|
2
|
+
|
|
3
|
+
Recipe judges are optional, recipe-owned LLM grading definitions. Author them
|
|
4
|
+
as direct children of `judges/` using a lowercase `.yaml` or `.yml` extension:
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
my-recipe/
|
|
8
|
+
judges/
|
|
9
|
+
helpful.yaml
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Nested files such as `judges/calibration/helpful.yaml` are not judge sources.
|
|
13
|
+
`introspection check` discovers this direct-child set. Recipes without judge
|
|
14
|
+
sources have no judge diagnostics.
|
|
15
|
+
|
|
16
|
+
## Ownership boundary
|
|
17
|
+
|
|
18
|
+
The validator behind `introspection check` owns the portable authored YAML
|
|
19
|
+
specification and its static, file-oriented diagnostics.
|
|
20
|
+
|
|
21
|
+
Evaluation systems own execution: applicability checks, conversation assembly,
|
|
22
|
+
transcript protection, model requests, retries, verdict normalization, and
|
|
23
|
+
evaluation identity. Implementations should consume or remain explicitly
|
|
24
|
+
compatible with the authored specification defined here. New authored fields
|
|
25
|
+
must land in this checker and its contract tests rather than appearing in only
|
|
26
|
+
one evaluator.
|
|
27
|
+
|
|
28
|
+
Validation reports do not contain normalized judge definitions or
|
|
29
|
+
host-specific registry data.
|
|
30
|
+
|
|
31
|
+
## Definition shape
|
|
32
|
+
|
|
33
|
+
The minimal definition is:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
judge: helpful
|
|
37
|
+
|
|
38
|
+
instructions: |
|
|
39
|
+
Determine whether the assistant answered the user correctly.
|
|
40
|
+
|
|
41
|
+
llm:
|
|
42
|
+
model: gpt-5
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`judge`, `instructions`, and `llm.model` are required and non-empty. Judge names
|
|
46
|
+
must be unique across all judge files in one Recipe. Evaluators default
|
|
47
|
+
`llm.provider` to `openai`.
|
|
48
|
+
|
|
49
|
+
The canonical expanded definition is:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
judge: helpful
|
|
53
|
+
description: Did the assistant answer correctly?
|
|
54
|
+
|
|
55
|
+
on:
|
|
56
|
+
- event: message
|
|
57
|
+
match:
|
|
58
|
+
role: assistant
|
|
59
|
+
|
|
60
|
+
instructions: |
|
|
61
|
+
Determine whether the assistant answered the user correctly.
|
|
62
|
+
|
|
63
|
+
llm:
|
|
64
|
+
provider: openai
|
|
65
|
+
model: gpt-5
|
|
66
|
+
request:
|
|
67
|
+
temperature: 0
|
|
68
|
+
max_tokens: 1024
|
|
69
|
+
reasoning_effort: medium
|
|
70
|
+
transport:
|
|
71
|
+
timeout_ms: 60000
|
|
72
|
+
max_retries: 2
|
|
73
|
+
max_retry_delay_ms: 5000
|
|
74
|
+
local:
|
|
75
|
+
base_url: https://api.openai.com/v1
|
|
76
|
+
api_key_env: OPENAI_API_KEY
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Unknown fields are errors at every level. The obsolete top-level `model:`
|
|
80
|
+
block is rejected.
|
|
81
|
+
|
|
82
|
+
### LLM settings
|
|
83
|
+
|
|
84
|
+
- `provider` is a 1-64 byte lowercase slug containing ASCII letters, digits,
|
|
85
|
+
and hyphens. The portable checker does not restrict it to managed platform
|
|
86
|
+
providers because custom slugs can be used with an explicit local endpoint.
|
|
87
|
+
- `model` is a trimmed, non-empty string of at most 255 bytes.
|
|
88
|
+
- `request.temperature` is a finite number from 0 through 2 and defaults to 0.
|
|
89
|
+
- `request.max_tokens` is an integer from 1 through 131072 when present;
|
|
90
|
+
explicit `null` is treated as omitted.
|
|
91
|
+
- `request.reasoning_effort` is a 1-64 byte lowercase slug containing ASCII
|
|
92
|
+
letters and hyphens; explicit `null` is treated as omitted.
|
|
93
|
+
- `transport.timeout_ms` is an integer from 1 through 600000 and defaults to
|
|
94
|
+
60000.
|
|
95
|
+
- `transport.max_retries` is an integer from 0 through 10 and defaults to 0.
|
|
96
|
+
- `transport.max_retry_delay_ms` is an integer from 0 through 60000 and
|
|
97
|
+
defaults to 5000.
|
|
98
|
+
- `local` requires both `base_url` and `api_key_env`. The URL must be HTTP(S),
|
|
99
|
+
have a host, contain no embedded credentials, query, or fragment, and use
|
|
100
|
+
HTTPS unless it targets `localhost`, `127.0.0.1`, or `::1`. `api_key_env` is
|
|
101
|
+
an environment-variable name, not a credential value.
|
|
102
|
+
|
|
103
|
+
Transport and local settings affect execution but not authored grading
|
|
104
|
+
identity. The evaluator remains responsible for applying defaults, building
|
|
105
|
+
requests, and routing execution.
|
|
106
|
+
|
|
107
|
+
## Applicability
|
|
108
|
+
|
|
109
|
+
`on` is optional. Omission, an empty mapping, or an empty list makes the judge
|
|
110
|
+
applicable to every conversation selected for judging. Otherwise it is an
|
|
111
|
+
OR-list of matchers. Supported events are `message`, `tool`, and `feedback`;
|
|
112
|
+
fields within one `match` mapping are ANDed by the evaluator.
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
on:
|
|
116
|
+
- event: message
|
|
117
|
+
match:
|
|
118
|
+
role: user
|
|
119
|
+
text: /refund|invoice/i
|
|
120
|
+
- event: tool
|
|
121
|
+
match:
|
|
122
|
+
name: shell
|
|
123
|
+
args.command: /pytest/i
|
|
124
|
+
- event: feedback
|
|
125
|
+
match:
|
|
126
|
+
sentiment: negative
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Match keys are non-empty field paths. Regex literals use Rust regex syntax and
|
|
130
|
+
support unique `i`, `m`, `s`, and `u` flags. `environment`, `runtime_group`, and
|
|
131
|
+
paths ending in `pattern_id` are platform-owned and cannot appear as authored
|
|
132
|
+
match fields. The evaluator owns dotted-path traversal and gate evaluation.
|
|
133
|
+
|
|
134
|
+
## Diagnostics
|
|
135
|
+
|
|
136
|
+
Invalid Recipe content is reported through the normal diagnostics model. Judge
|
|
137
|
+
diagnostics use stable `judge.*` codes, Recipe-relative source paths, useful
|
|
138
|
+
help text, and deterministic ordering. YAML syntax failures use
|
|
139
|
+
`judge.yaml_malformed` and include a 1-based source span when the parser
|
|
140
|
+
provides one.
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|