@introspection-ai/recipes 0.39.0 → 0.40.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 +5 -2
- package/dist/channels/index.d.ts +2 -2
- package/dist/channels/index.d.ts.map +1 -1
- package/dist/channels/index.js +1 -1
- package/dist/channels/index.js.map +1 -1
- package/dist/channels/module.d.ts +18 -0
- package/dist/channels/module.d.ts.map +1 -1
- package/dist/channels/module.js +6 -0
- package/dist/channels/module.js.map +1 -1
- package/dist/connector-tools.d.ts +2 -0
- package/dist/connector-tools.d.ts.map +1 -1
- package/dist/connector-tools.js +26 -11
- package/dist/connector-tools.js.map +1 -1
- package/dist/documents/index.d.ts +2 -2
- package/dist/documents/index.d.ts.map +1 -1
- package/dist/documents/index.js +1 -1
- package/dist/documents/index.js.map +1 -1
- package/dist/documents/module.d.ts +28 -4
- package/dist/documents/module.d.ts.map +1 -1
- package/dist/documents/module.js +34 -24
- package/dist/documents/module.js.map +1 -1
- package/dist/mcp-chunks/{chunk-ZK2E4S7E.js → chunk-EZKOZO3F.js} +2005 -0
- package/dist/mcp-daemon.js +1 -1
- package/dist/mcp-run-worker.js +1 -1
- package/dist/recipe/companions.d.ts +68 -0
- package/dist/recipe/companions.d.ts.map +1 -0
- package/dist/recipe/companions.js +149 -0
- package/dist/recipe/companions.js.map +1 -0
- package/dist/recipe/extensions.d.ts +6 -0
- package/dist/recipe/extensions.d.ts.map +1 -1
- package/dist/recipe/extensions.js +51 -14
- package/dist/recipe/extensions.js.map +1 -1
- package/dist/recipe/package.d.ts +60 -11
- package/dist/recipe/package.d.ts.map +1 -1
- package/dist/recipe/package.js +179 -81
- package/dist/recipe/package.js.map +1 -1
- package/dist/recipe/python.d.ts +16 -5
- package/dist/recipe/python.d.ts.map +1 -1
- package/dist/recipe/python.js +41 -31
- package/dist/recipe/python.js.map +1 -1
- package/dist/recipe/resolve.d.ts.map +1 -1
- package/dist/recipe/resolve.js +30 -16
- package/dist/recipe/resolve.js.map +1 -1
- package/dist/recipe/skills.d.ts +15 -1
- package/dist/recipe/skills.d.ts.map +1 -1
- package/dist/recipe/skills.js +26 -9
- package/dist/recipe/skills.js.map +1 -1
- package/docs/agent-composition.md +2 -2
- package/docs/channels.md +55 -11
- package/docs/documents.md +77 -17
- package/docs/interactions.md +1 -1
- package/docs/recipe-format.md +167 -62
- package/docs/slack.md +4 -5
- package/package.json +12 -7
package/docs/documents.md
CHANGED
|
@@ -24,10 +24,6 @@ Agents select `tools: [documents]`.
|
|
|
24
24
|
|
|
25
25
|
```json
|
|
26
26
|
{
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@introspection-ai/recipe-documents-docx": ">=0.1.0",
|
|
29
|
-
"@introspection-ai/recipe-documents-pdf": ">=0.1.0"
|
|
30
|
-
},
|
|
31
27
|
"pi": {
|
|
32
28
|
"documents": [{ "format": "docx" }, { "format": "pdf" }]
|
|
33
29
|
}
|
|
@@ -38,9 +34,51 @@ Agents select `tools: [documents]`.
|
|
|
38
34
|
tools: [documents]
|
|
39
35
|
```
|
|
40
36
|
|
|
41
|
-
Each declaration names a format
|
|
42
|
-
`@introspection-ai/recipe-documents-<format
|
|
43
|
-
|
|
37
|
+
Each declaration names a format, served by the package
|
|
38
|
+
`@introspection-ai/recipe-documents-<format>`. Recipes installs the docx and
|
|
39
|
+
pdf packages alongside itself (they are `optionalDependencies` of
|
|
40
|
+
`@introspection-ai/recipes`), so a Recipe that does not list them uses the
|
|
41
|
+
copy beside the running Recipes, Python environment and profiles included.
|
|
42
|
+
Declare it in `peerDependencies` by default, which says so explicitly: the
|
|
43
|
+
platform provides it.
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@introspection-ai/recipe-documents-docx": ">=X.Y.Z",
|
|
49
|
+
"@introspection-ai/recipe-documents-pdf": ">=X.Y.Z"
|
|
50
|
+
},
|
|
51
|
+
"pi": {
|
|
52
|
+
"documents": [
|
|
53
|
+
{ "format": "docx", "profile": "legal-redlining-en-US" },
|
|
54
|
+
{ "format": "pdf" }
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To pin an exact version, list the package in `dependencies` instead, and the
|
|
61
|
+
Recipe's copy wins:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@introspection-ai/recipe-documents-docx": "X.Y.Z"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`X.Y.Z` stands for a released version (`npm view @introspection-ai/recipe-documents-docx version`): a peer takes an open floor, `>=X.Y.Z`, and a pin an exact version.
|
|
72
|
+
|
|
73
|
+
Any other format must be declared, in `dependencies` (the
|
|
74
|
+
Recipe brings it) or `peerDependencies` (the platform provides it, and the
|
|
75
|
+
runtime image build fails without it); `recipes check` and the runtime both
|
|
76
|
+
reject a declaration with neither. Whichever copy loads must implement the
|
|
77
|
+
format contract the running Recipes implements (`apiVersion`, below), and a
|
|
78
|
+
package that declares a Recipes peer range must admit the running version, or
|
|
79
|
+
the Recipe fails to load naming the package and the fix. When neither the
|
|
80
|
+
Recipe nor the Recipes install has the package, add it to `dependencies` or
|
|
81
|
+
reinstall Recipes with `introspection upgrade`. An
|
|
44
82
|
optional `commands` allowlist narrows what that format may do, for every agent:
|
|
45
83
|
|
|
46
84
|
```json
|
|
@@ -92,6 +130,14 @@ profiles/
|
|
|
92
130
|
SKILL.md
|
|
93
131
|
```
|
|
94
132
|
|
|
133
|
+
Name a profile `<use-case>-<locale>`: a kebab-case use case, which may be a
|
|
134
|
+
domain and a task (`legal-redlining`, `house-style`), then a BCP 47 locale
|
|
135
|
+
with its region (`en-US`, `en-GB`), because spelling and conventions, legal
|
|
136
|
+
ones above all, differ by region. Use the language alone (`-en`) only when
|
|
137
|
+
the guidance doesn't depend on region. The folder and the frontmatter `name`
|
|
138
|
+
are the name in lower case (`house-style-en-gb`); a `profile` declaration
|
|
139
|
+
matches it in any case.
|
|
140
|
+
|
|
95
141
|
The `SKILL.md` starts with frontmatter. `name` must be the folder's name, in
|
|
96
142
|
lower case; `description` says when to read it:
|
|
97
143
|
|
|
@@ -325,38 +371,52 @@ looked at with `read`.
|
|
|
325
371
|
## Write a format
|
|
326
372
|
|
|
327
373
|
A format supplies an adapter and a capability descriptor; it writes no tool
|
|
328
|
-
schemas.
|
|
374
|
+
schemas. It exports a plain object, `RecipeDocumentFormatModule`, and
|
|
375
|
+
everything it needs from Recipes at run time arrives through `createAdapter`,
|
|
376
|
+
so the package imports only Recipes' types and needs no run-time dependency on
|
|
377
|
+
`@introspection-ai/recipes` (keep it in `devDependencies`):
|
|
329
378
|
|
|
330
379
|
```ts
|
|
331
|
-
import {
|
|
380
|
+
import type { RecipeDocumentFormatModule } from "@introspection-ai/recipes/documents";
|
|
332
381
|
|
|
333
|
-
|
|
382
|
+
const pdf: RecipeDocumentFormatModule = {
|
|
383
|
+
kind: "documents",
|
|
384
|
+
apiVersion: 1,
|
|
334
385
|
format: "pdf",
|
|
335
386
|
extensions: [".pdf"],
|
|
336
387
|
capabilities: { read: true, render: true },
|
|
337
|
-
createAdapter: ({ env }) => new PdfDocumentAdapter(env),
|
|
338
|
-
}
|
|
388
|
+
createAdapter: ({ env, python, runHelper }) => new PdfDocumentAdapter({ env, python, runHelper }),
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export default pdf;
|
|
339
392
|
```
|
|
340
393
|
|
|
394
|
+
`apiVersion` names the contract the format was written against; the host
|
|
395
|
+
refuses a different one, naming the package, both versions and the fix.
|
|
396
|
+
`createDocumentFormatModule` from `@introspection-ai/recipes/documents` builds
|
|
397
|
+
the same object, for a format that depends on Recipes anyway.
|
|
398
|
+
|
|
341
399
|
`createAdapter` also receives `python`: the interpreter of the environment the
|
|
342
400
|
format package's own `pi.runtime.python` declares, which the host prepares
|
|
343
401
|
(see [Runtime requirements](recipe-format.md#runtime-requirements)). It is
|
|
344
402
|
absent when the package declares none; an adapter that ignores it keeps
|
|
345
403
|
working.
|
|
346
404
|
|
|
347
|
-
A Python helper runs with `
|
|
348
|
-
|
|
405
|
+
A Python helper runs with `runHelper(script, request, { env, cwd, python,
|
|
406
|
+
signal })`, which the host passes to `createAdapter`: its
|
|
407
|
+
`runDocumentHelper`. It is
|
|
349
408
|
`runPythonJson` from `@introspection-ai/recipes/python` with the document
|
|
350
409
|
contract on top: the interpreter order above, including
|
|
351
410
|
`RECIPE_DOCUMENTS_PYTHON`; a helper that prints `{ "error": "..." }` fails the
|
|
352
411
|
call with that message; and the result is a `DocumentResult` (`text`,
|
|
353
412
|
`details`, `images`) whose `details.timing.call_ms` records the round trip.
|
|
354
|
-
The Word and PDF packages
|
|
355
|
-
`documentPythonExecutable` as `pythonExecutable`.
|
|
413
|
+
The Word and PDF packages run every command through it.
|
|
356
414
|
|
|
357
415
|
Registration checks that the adapter implements every method its
|
|
358
416
|
capabilities claim, and that the adapter returns the declared capabilities.
|
|
359
|
-
A format package ships its code and its profiles (see Skills and profiles)
|
|
417
|
+
A format package ships its code and its profiles (see Skills and profiles), so
|
|
418
|
+
a profile resolves the same from the copy installed alongside Recipes as from
|
|
419
|
+
a pinned one.
|
|
360
420
|
A skill that teaches a format library, such as Paper's `docx` skill, is a
|
|
361
421
|
dependency of the Recipe that uses it, installed when the runtime is baked.
|
|
362
422
|
|
package/docs/interactions.md
CHANGED
package/docs/recipe-format.md
CHANGED
|
@@ -86,53 +86,6 @@ partial version, or another manager. A Recipe installs with pnpm, so
|
|
|
86
86
|
read. An npm lockfile left in the tree MUST still carry the same package name
|
|
87
87
|
and version as `package.json`.
|
|
88
88
|
|
|
89
|
-
## Channel tools
|
|
90
|
-
|
|
91
|
-
`pi.channels` declares official provider tools that the host may register for
|
|
92
|
-
the Recipe. The declaration does not contain a connector ID, workspace ID, or
|
|
93
|
-
credential. A host binds those values when it starts a task.
|
|
94
|
-
|
|
95
|
-
```json
|
|
96
|
-
{
|
|
97
|
-
"dependencies": {
|
|
98
|
-
"@introspection-ai/recipe-channel-slack": ">=0.4.0 <1.0.0"
|
|
99
|
-
},
|
|
100
|
-
"pi": {
|
|
101
|
-
"channels": [
|
|
102
|
-
{
|
|
103
|
-
"provider": "slack"
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Each provider may appear once. The host derives the package name from the
|
|
111
|
-
provider. For example, `slack` resolves to
|
|
112
|
-
`@introspection-ai/recipe-channel-slack`. The package owns its tool catalog
|
|
113
|
-
and marks which tools are active by default.
|
|
114
|
-
|
|
115
|
-
The provider package must be in the Recipe's production dependencies and
|
|
116
|
-
lockfile. The host imports the package only when the Recipe declares the
|
|
117
|
-
provider. An agent lists each allowed tool by its full name, such as
|
|
118
|
-
`channels`, in its `tools` list. The host fails when the agent names a
|
|
119
|
-
tool that the connector does not register.
|
|
120
|
-
|
|
121
|
-
Chat providers share one connector shape. A channel connector registers the
|
|
122
|
-
provider-neutral `channels` tool with commands for supported operations. An
|
|
123
|
-
optional `commands` array on the connector restricts these operations for all
|
|
124
|
-
agents using it, for example `{"provider":"slack","commands":["read","reply"]}`.
|
|
125
|
-
Omitting it allows supported commands; an empty list exposes no channel tool.
|
|
126
|
-
`requireReply` is an optional boolean that defaults to `true` when channel tools
|
|
127
|
-
are enabled. Incoming turns then require a successful final `reply`, so an
|
|
128
|
-
enabled command allowlist must include `reply`. Set `requireReply: false` for
|
|
129
|
-
intentional silence, such as a read-only allowlist. See [Channel tools](channels.md).
|
|
130
|
-
|
|
131
|
-
`pi.documents` lists the document formats the `documents` tool opens, each as
|
|
132
|
-
`{"format": "<format>"}` with the package
|
|
133
|
-
`@introspection-ai/recipe-documents-<format>` as a dependency, and an optional
|
|
134
|
-
`commands` allowlist. See [Document tools](documents.md).
|
|
135
|
-
|
|
136
89
|
## Agents
|
|
137
90
|
|
|
138
91
|
`pi.agents` may declare YAML agent definitions explicitly. When omitted,
|
|
@@ -143,7 +96,7 @@ Recipe MUST contain at least one agent.
|
|
|
143
96
|
name: agent
|
|
144
97
|
description: Produce a sourced research brief.
|
|
145
98
|
ai:
|
|
146
|
-
model:
|
|
99
|
+
model: <provider>/<model> # one Pi has credentials for: pi --list-models
|
|
147
100
|
thinking_level: high
|
|
148
101
|
options:
|
|
149
102
|
max_tokens: 4096
|
|
@@ -228,6 +181,93 @@ The default agent is named `agent`. If no `agent` exists, a host MAY select the
|
|
|
228
181
|
only declared agent. When multiple agents exist without `agent`, the caller
|
|
229
182
|
MUST select one explicitly.
|
|
230
183
|
|
|
184
|
+
## First-party packages
|
|
185
|
+
|
|
186
|
+
Some tools come from packages we publish: **channel tools**
|
|
187
|
+
(`@introspection-ai/recipe-channel-<provider>`, such as Slack) and
|
|
188
|
+
**document tools** (`@introspection-ai/recipe-documents-<format>`, docx and
|
|
189
|
+
pdf). A Recipe turns one on with a `pi` declaration.
|
|
190
|
+
|
|
191
|
+
These are **companion packages**: Recipes installs them alongside itself, as
|
|
192
|
+
its `optionalDependencies`, so wherever Recipes is installed (Pi, a runtime
|
|
193
|
+
image, npm) they are there too.
|
|
194
|
+
|
|
195
|
+
- **Declare them as peers by default**, or omit them. The Recipe then uses the
|
|
196
|
+
copy beside the running Recipes and never brings a second one.
|
|
197
|
+
- **Pin one only when needed**, by listing it in `dependencies` with an exact
|
|
198
|
+
version. The Recipe's own copy then wins.
|
|
199
|
+
- **Any other package** the Recipe uses is a `dependency`, unless the platform
|
|
200
|
+
running it provides that package, in which case it is a peer. `recipes check`
|
|
201
|
+
warns about a peer a standard platform does not provide.
|
|
202
|
+
|
|
203
|
+
A package can also ship skills a Recipe uses; see
|
|
204
|
+
[Shipping skills in a package](#shipping-skills-in-a-package).
|
|
205
|
+
[Channel tools](channels.md) and [Document tools](documents.md) show full
|
|
206
|
+
examples, and how a loaded package is checked against the running Recipes.
|
|
207
|
+
|
|
208
|
+
### Channel tools
|
|
209
|
+
|
|
210
|
+
`pi.channels` declares official provider tools that the host may register for
|
|
211
|
+
the Recipe. The declaration does not contain a connector ID, workspace ID, or
|
|
212
|
+
credential. A host binds those values when it starts a task.
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"pi": {
|
|
217
|
+
"channels": [
|
|
218
|
+
{
|
|
219
|
+
"provider": "slack"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Each provider may appear once. The host derives the package name from the
|
|
227
|
+
provider. For example, `slack` resolves to
|
|
228
|
+
`@introspection-ai/recipe-channel-slack`. The package owns its tool catalog
|
|
229
|
+
and marks which tools are active by default.
|
|
230
|
+
|
|
231
|
+
The Slack package is a companion package (see above). The host imports it
|
|
232
|
+
only when the Recipe declares the provider. An agent lists each allowed tool by its full name, such as
|
|
233
|
+
`channels`, in its `tools` list. The host fails when the agent names a
|
|
234
|
+
tool that the connector does not register.
|
|
235
|
+
|
|
236
|
+
Chat providers share one connector shape. A channel connector registers the
|
|
237
|
+
provider-neutral `channels` tool with commands for supported operations. An
|
|
238
|
+
optional `commands` array on the connector restricts these operations for all
|
|
239
|
+
agents using it, for example `{"provider":"slack","commands":["read","reply"]}`.
|
|
240
|
+
Omitting it allows supported commands; an empty list exposes no channel tool.
|
|
241
|
+
`requireReply` is an optional boolean that defaults to `true` when channel tools
|
|
242
|
+
are enabled. Incoming turns then require a successful final `reply`, so an
|
|
243
|
+
enabled command allowlist must include `reply`. Set `requireReply: false` for
|
|
244
|
+
intentional silence, such as a read-only allowlist. See [Channel tools](channels.md).
|
|
245
|
+
|
|
246
|
+
### Document tools
|
|
247
|
+
|
|
248
|
+
`pi.documents` lists the document formats the `documents` tool opens, each as
|
|
249
|
+
`{"format": "<format>"}` served by the companion package
|
|
250
|
+
`@introspection-ai/recipe-documents-<format>`, with an optional `commands`
|
|
251
|
+
allowlist and `profile`. A profile is a skill with guidance for one
|
|
252
|
+
kind of work, such as `legal-redlining-en-US`, which the docx package ships.
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"peerDependencies": {
|
|
257
|
+
"@introspection-ai/recipe-documents-docx": ">=X.Y.Z",
|
|
258
|
+
"@introspection-ai/recipe-documents-pdf": ">=X.Y.Z"
|
|
259
|
+
},
|
|
260
|
+
"pi": {
|
|
261
|
+
"documents": [
|
|
262
|
+
{ "format": "docx", "profile": "legal-redlining-en-US" },
|
|
263
|
+
{ "format": "pdf" }
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
See [Document tools](documents.md).
|
|
270
|
+
|
|
231
271
|
## Judges
|
|
232
272
|
|
|
233
273
|
A Recipe MAY include portable LLM grading definitions as direct `.yaml` or
|
|
@@ -253,9 +293,11 @@ prompt when the selected agent has model-invocable skills and a `read` or
|
|
|
253
293
|
`bash` tool.
|
|
254
294
|
|
|
255
295
|
Skills follow the [Agent Skills](https://agentskills.io) directory convention
|
|
256
|
-
and are selected from the resources declared by `pi.skills
|
|
257
|
-
|
|
258
|
-
|
|
296
|
+
and are selected from the resources declared by `pi.skills` and by the
|
|
297
|
+
Recipe's dependencies (see [Shipping skills in a package](#shipping-skills-in-a-package)).
|
|
298
|
+
A skill is named by its `SKILL.md` frontmatter `name`, then by its containing
|
|
299
|
+
directory; a root-level unnamed `SKILL.md` uses the portable fallback name
|
|
300
|
+
`skill`.
|
|
259
301
|
|
|
260
302
|
Prompt templates are declared by `pi.prompts`. They retain Pi's normal SDK and
|
|
261
303
|
TUI behavior: hosts expose them through `AgentSession.promptTemplates`, and a
|
|
@@ -290,6 +332,69 @@ resources loaded; compatible hosts MUST keep those additions distinguishable
|
|
|
290
332
|
from Recipe-owned inputs. `tools` limits model-callable tools, not extension
|
|
291
333
|
hook execution.
|
|
292
334
|
|
|
335
|
+
## Shipping skills in a package
|
|
336
|
+
|
|
337
|
+
An npm package ships skills by declaring them in its own `package.json`, with
|
|
338
|
+
the same `pi.skills` key a Recipe uses:
|
|
339
|
+
|
|
340
|
+
```json
|
|
341
|
+
{
|
|
342
|
+
"name": "@acme/contract-skills",
|
|
343
|
+
"version": "1.2.0",
|
|
344
|
+
"files": ["skills"],
|
|
345
|
+
"pi": { "skills": ["skills"] }
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
A Recipe uses those skills by listing the package in `dependencies` (or in
|
|
350
|
+
`peerDependencies`, when the platform provides it) and selecting them by name
|
|
351
|
+
in an agent's `skills`, like its own:
|
|
352
|
+
|
|
353
|
+
```json
|
|
354
|
+
{
|
|
355
|
+
"name": "contracts",
|
|
356
|
+
"dependencies": { "@acme/contract-skills": "^1.2.0" },
|
|
357
|
+
"pi": {}
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
```yaml
|
|
362
|
+
name: agent
|
|
363
|
+
skills: [review-nda]
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
The rules:
|
|
367
|
+
|
|
368
|
+
- Hosts read `pi.skills` from each direct `dependencies` and
|
|
369
|
+
`peerDependencies` entry, found with Node's package resolution from the
|
|
370
|
+
Recipe directory: in the Recipe's own `node_modules`, or in one above it,
|
|
371
|
+
where an npm install hoists a dependency beside the Recipe and a platform
|
|
372
|
+
image installs the peers it provides. One that is not installed is skipped.
|
|
373
|
+
`devDependencies` and transitive dependencies are not read.
|
|
374
|
+
- Only an explicit `pi.skills` counts. A dependency's `skills/` folder is not
|
|
375
|
+
discovered by convention, and a dependency without `pi.skills` contributes
|
|
376
|
+
no skills.
|
|
377
|
+
- Paths are relative to the dependency package, MUST NOT resolve outside it
|
|
378
|
+
(including through symlinks, compared by real path), and every explicit path
|
|
379
|
+
MUST match. A violation is an error naming the package.
|
|
380
|
+
- Dependency skills join the Recipe's own skills. An agent's `skills` list
|
|
381
|
+
selects among all of them; an agent gets no skill it does not list.
|
|
382
|
+
- A name an agent selects MUST resolve to exactly one `SKILL.md` across the
|
|
383
|
+
Recipe and its dependencies. Two with the same name are an error naming
|
|
384
|
+
both. Give each skill a unique frontmatter `name`.
|
|
385
|
+
|
|
386
|
+
These skills arrive with the install: the build installs the Recipe's
|
|
387
|
+
dependencies from its lockfile, and nothing is fetched at run time. A check
|
|
388
|
+
run without `node_modules` cannot see dependency skills, so a skill an agent
|
|
389
|
+
selects that is not in the Recipe is a warning there rather than an error.
|
|
390
|
+
|
|
391
|
+
Document profiles use a different path. A Recipe such as
|
|
392
|
+
[`introspection-org/recipe-redlining`](https://github.com/introspection-org/recipe-redlining)
|
|
393
|
+
selects a profile in `pi.documents`, from a pinned docx package or the host
|
|
394
|
+
default (see [First-party packages](#first-party-packages)); the `documents`
|
|
395
|
+
tool delivers the core `documents` skill and that profile itself, for agents
|
|
396
|
+
that list the tool.
|
|
397
|
+
|
|
293
398
|
## Tools, subagents, and capabilities
|
|
294
399
|
|
|
295
400
|
`tools` is an allowlist. A host MUST expose no undeclared Pi or extension tool
|
|
@@ -372,9 +477,6 @@ first model call or reject the Recipe with an actionable diagnostic.
|
|
|
372
477
|
"lockfile": "python/uv.lock",
|
|
373
478
|
"version": ">=3.12,<3.15",
|
|
374
479
|
"imports": ["pandas", "openpyxl"]
|
|
375
|
-
},
|
|
376
|
-
"system": {
|
|
377
|
-
"packages": [{ "id": "document.pdf-tools", "version": "1" }]
|
|
378
480
|
}
|
|
379
481
|
}
|
|
380
482
|
}
|
|
@@ -390,16 +492,23 @@ uv as the interpreter request. `imports` are optional boot preflights, each a
|
|
|
390
492
|
dotted Python module name (`docx`, `paper_docx.api`); hosts import them with
|
|
391
493
|
`PYTHONHOME` removed.
|
|
392
494
|
|
|
495
|
+
`pi.runtime.python` is the only runtime key; any other key under `pi.runtime`
|
|
496
|
+
is rejected. PDF and Word work goes through the `documents` tool (`pi.documents`
|
|
497
|
+
with the `pdf` or `docx` format), not shell utilities. A Recipe that only uses
|
|
498
|
+
the `documents` tool needs no `pi.runtime.python`; the format packages bring
|
|
499
|
+
their own.
|
|
500
|
+
|
|
393
501
|
### Package declarations
|
|
394
502
|
|
|
395
503
|
A package the Recipe depends on MAY declare `pi.runtime.python` in its own
|
|
396
504
|
`package.json`, with the same fields relative to the package. Hosts read it
|
|
397
|
-
from each direct `dependencies` or `peerDependencies` entry
|
|
398
|
-
Recipe's `node_modules
|
|
505
|
+
from each direct `dependencies` or `peerDependencies` entry, found with Node's
|
|
506
|
+
package resolution from the Recipe directory (the Recipe's own `node_modules`,
|
|
507
|
+
or one above it when an npm install hoists the dependency beside the Recipe);
|
|
508
|
+
`devDependencies` and transitive dependencies are
|
|
399
509
|
not read, and a declared dependency that is not installed is skipped. A
|
|
400
510
|
package declaring it MUST ship the project's `pyproject.toml` and `uv.lock`:
|
|
401
|
-
when its `package.json` lists `files`, both must be covered.
|
|
402
|
-
is a Recipe-only declaration.
|
|
511
|
+
when its `package.json` lists `files`, both must be covered.
|
|
403
512
|
|
|
404
513
|
Each declaration gets its own environment:
|
|
405
514
|
|
|
@@ -482,10 +591,6 @@ The session API (`createAgentSession`) only checks: it never installs, so the
|
|
|
482
591
|
host prepares the environments before it creates sessions, and an unprepared
|
|
483
592
|
one fails construction.
|
|
484
593
|
|
|
485
|
-
System package ids name versioned, host-approved bundles. They are not apt,
|
|
486
|
-
brew, or shell commands. A host that does not provide a declared bundle MUST
|
|
487
|
-
fail closed; Recipes cannot run privileged installers.
|
|
488
|
-
|
|
489
594
|
Recipe packages are trusted application code. In particular, authored
|
|
490
595
|
TypeScript extensions execute inside the Pi process with its authority. A host
|
|
491
596
|
that accepts third-party Recipes MUST review or isolate them before execution;
|
package/docs/slack.md
CHANGED
|
@@ -14,9 +14,6 @@ protocol.
|
|
|
14
14
|
|
|
15
15
|
```json
|
|
16
16
|
{
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@introspection-ai/recipe-channel-slack": ">=0.4.0 <1.0.0"
|
|
19
|
-
},
|
|
20
17
|
"pi": {
|
|
21
18
|
"channels": [
|
|
22
19
|
{
|
|
@@ -27,8 +24,10 @@ protocol.
|
|
|
27
24
|
}
|
|
28
25
|
```
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
Recipes installs the Slack package alongside itself, so the declaration is
|
|
28
|
+
enough. To pin a version, add `"@introspection-ai/recipe-channel-slack":
|
|
29
|
+
">=0.6.0"` to `dependencies` and commit the lockfile; the Recipe's copy wins.
|
|
30
|
+
The host loads the package only for a Recipe that declares the connector.
|
|
32
31
|
|
|
33
32
|
The connector registers one `channels` tool. Agents select `tools: [channels]`;
|
|
34
33
|
all supported commands are immediately visible. An optional connector `commands`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@introspection-ai/recipes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.1",
|
|
4
4
|
"description": "The open format for vertical agents, built on Pi.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -95,8 +95,18 @@
|
|
|
95
95
|
"ajv": "^8.20.0",
|
|
96
96
|
"mcporter": "0.16.1",
|
|
97
97
|
"minimatch": "^10.2.6",
|
|
98
|
+
"semver": "^7.8.5",
|
|
98
99
|
"yaml": "^2.9.0"
|
|
99
100
|
},
|
|
101
|
+
"optionalDependencies": {
|
|
102
|
+
"@introspection-ai/recipe-channel-slack": ">=0.6.0",
|
|
103
|
+
"@introspection-ai/recipe-documents-docx": ">=0.3.0",
|
|
104
|
+
"@introspection-ai/recipe-documents-pdf": ">=0.2.0",
|
|
105
|
+
"@introspection-ai/mcp-client-linux-x64": "0.40.1",
|
|
106
|
+
"@introspection-ai/mcp-client-linux-arm64": "0.40.1",
|
|
107
|
+
"@introspection-ai/mcp-client-darwin-arm64": "0.40.1",
|
|
108
|
+
"@introspection-ai/mcp-client-darwin-x64": "0.40.1"
|
|
109
|
+
},
|
|
100
110
|
"peerDependencies": {
|
|
101
111
|
"@earendil-works/pi-agent-core": ">=1.1.0 <2.0.0",
|
|
102
112
|
"@earendil-works/pi-ai": ">=1.1.0 <2.0.0",
|
|
@@ -110,17 +120,12 @@
|
|
|
110
120
|
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
111
121
|
"@earendil-works/pi-tui": "1.4.0",
|
|
112
122
|
"@types/node": "^26.1.2",
|
|
123
|
+
"@types/semver": "^7.8.0",
|
|
113
124
|
"esbuild": "^0.28.1",
|
|
114
125
|
"typebox": "^1.0.56",
|
|
115
126
|
"typescript": "^7.0.2",
|
|
116
127
|
"vitest": "^5.0.1"
|
|
117
128
|
},
|
|
118
|
-
"optionalDependencies": {
|
|
119
|
-
"@introspection-ai/mcp-client-linux-x64": "0.39.0",
|
|
120
|
-
"@introspection-ai/mcp-client-linux-arm64": "0.39.0",
|
|
121
|
-
"@introspection-ai/mcp-client-darwin-arm64": "0.39.0",
|
|
122
|
-
"@introspection-ai/mcp-client-darwin-x64": "0.39.0"
|
|
123
|
-
},
|
|
124
129
|
"scripts": {
|
|
125
130
|
"build": "pnpm build:ts && pnpm build:native",
|
|
126
131
|
"build:workspace-packages": "pnpm --filter './packages/**' build",
|