@introspection-ai/recipes 0.63.1 → 0.64.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.
- package/dist/agent-tool/arguments.d.ts +39 -0
- package/dist/agent-tool/arguments.d.ts.map +1 -0
- package/dist/agent-tool/arguments.generated.d.ts +4 -0
- package/dist/agent-tool/arguments.generated.d.ts.map +1 -0
- package/dist/agent-tool/arguments.generated.js +60 -0
- package/dist/agent-tool/arguments.generated.js.map +1 -0
- package/dist/agent-tool/arguments.js +8 -0
- package/dist/agent-tool/arguments.js.map +1 -0
- package/dist/agents.d.ts +28 -6
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +269 -46
- package/dist/agents.js.map +1 -1
- package/dist/batch/agent-batches.d.ts +53 -0
- package/dist/batch/agent-batches.d.ts.map +1 -0
- package/dist/batch/agent-batches.js +168 -0
- package/dist/batch/agent-batches.js.map +1 -0
- package/dist/batch/index.d.ts +2 -0
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +2 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/child/agent-completions.d.ts +16 -1
- package/dist/child/agent-completions.d.ts.map +1 -1
- package/dist/child/agent-completions.js +31 -5
- package/dist/child/agent-completions.js.map +1 -1
- package/dist/child/agent-store.d.ts +2 -0
- package/dist/child/agent-store.d.ts.map +1 -1
- package/dist/child/agent-store.js.map +1 -1
- package/dist/child/agent.d.ts +9 -0
- package/dist/child/agent.d.ts.map +1 -1
- package/dist/child/agent.js +7 -0
- package/dist/child/agent.js.map +1 -1
- package/dist/child/arguments.d.ts +32 -0
- package/dist/child/arguments.d.ts.map +1 -0
- package/dist/child/arguments.generated.d.ts +4 -0
- package/dist/child/arguments.generated.d.ts.map +1 -0
- package/dist/child/arguments.generated.js +29 -0
- package/dist/child/arguments.generated.js.map +1 -0
- package/dist/child/arguments.js +8 -0
- package/dist/child/arguments.js.map +1 -0
- package/dist/child/messages.d.ts +128 -0
- package/dist/child/messages.d.ts.map +1 -0
- package/dist/child/messages.js +265 -0
- package/dist/child/messages.js.map +1 -0
- package/dist/child/session.d.ts +10 -0
- package/dist/child/session.d.ts.map +1 -1
- package/dist/child/session.js +22 -3
- package/dist/child/session.js.map +1 -1
- package/dist/child/streaming-usage.d.ts +40 -0
- package/dist/child/streaming-usage.d.ts.map +1 -0
- package/dist/child/streaming-usage.js +101 -0
- package/dist/child/streaming-usage.js.map +1 -0
- package/dist/pi-extension.d.ts +2 -0
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +236 -42
- package/dist/pi-extension.js.map +1 -1
- package/dist/recipe/manifest.generated.d.ts +1 -1
- package/dist/recipe/manifest.generated.js +1 -1
- package/dist/run-controller.d.ts +5 -0
- package/dist/run-controller.d.ts.map +1 -1
- package/dist/run-controller.js +70 -8
- package/dist/run-controller.js.map +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +15 -1
- package/dist/session.js.map +1 -1
- package/dist/skill-progress.d.ts +12 -1
- package/dist/skill-progress.d.ts.map +1 -1
- package/dist/skill-progress.js +11 -4
- package/dist/skill-progress.js.map +1 -1
- package/docs/agent-batch.md +87 -0
- package/docs/agent-composition.md +49 -19
- package/docs/batch.md +7 -0
- package/docs/productivity/google.md +27 -15
- package/package.json +6 -6
|
@@ -6,11 +6,11 @@ of agents without making every agent identical.
|
|
|
6
6
|
|
|
7
7
|
## The Three Layers
|
|
8
8
|
|
|
9
|
-
| Layer
|
|
10
|
-
|
|
|
11
|
-
| `package.json#pi` | Entire Recipe package
|
|
12
|
-
| `SYSTEM.md`
|
|
13
|
-
| `agents/*.yaml`
|
|
9
|
+
| Layer | Scope | Use it for |
|
|
10
|
+
| ----------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `package.json#pi` | Entire Recipe package | Declaring agents, the executable extension closure, skills, prompts, and MCP servers |
|
|
12
|
+
| `SYSTEM.md` | Every root and delegated agent in the recipe | Shared mission, terminology, policies, and workflow rules |
|
|
13
|
+
| `agents/*.yaml` | One selected agent | Model, tools, selected skills, visible subagents, MCP policy, and role-specific instructions |
|
|
14
14
|
|
|
15
15
|
`SYSTEM.md` is the shared recipe instruction layer. A root agent and every
|
|
16
16
|
delegated subagent start from the same recipe-level content. Put instructions
|
|
@@ -46,7 +46,7 @@ of a base configuration.
|
|
|
46
46
|
name: agent
|
|
47
47
|
description: Main release coordinator
|
|
48
48
|
ai:
|
|
49
|
-
model: <provider>/<model>
|
|
49
|
+
model: <provider>/<model> # one Pi has credentials for: pi --list-models
|
|
50
50
|
thinking_level: medium
|
|
51
51
|
tools: [read, bash]
|
|
52
52
|
skills: [release-policy]
|
|
@@ -87,16 +87,16 @@ must still name that agent in its `subagents` list.
|
|
|
87
87
|
Omission means "inherit" for a derived agent. Declaring a field means
|
|
88
88
|
"override or merge" according to its type.
|
|
89
89
|
|
|
90
|
-
| Field
|
|
91
|
-
|
|
|
92
|
-
| `description`
|
|
93
|
-
| `ai`
|
|
94
|
-
| `session`
|
|
95
|
-
| `tools`
|
|
96
|
-
| `skills`
|
|
97
|
-
| `phases`
|
|
98
|
-
| `subagents`
|
|
99
|
-
| `mcp`
|
|
90
|
+
| Field | Derived-agent behavior |
|
|
91
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
92
|
+
| `description` | Child value replaces the base; omission inherits it |
|
|
93
|
+
| `ai` | Merges by key when `model` is omitted; declaring `ai.model` starts a fresh AI configuration |
|
|
94
|
+
| `session` | Merges by key; nested settings objects merge recursively |
|
|
95
|
+
| `tools` | Child array replaces the inherited allowlist; `[]` clears it |
|
|
96
|
+
| `skills` | Child array replaces the inherited selection; `[]` clears it |
|
|
97
|
+
| `phases` | Child array replaces the inherited phases; omission inherits them |
|
|
98
|
+
| `subagents` | Child array replaces inherited visibility; `[]` clears it |
|
|
99
|
+
| `mcp` | Omission inherits; a declared block replaces the complete inherited policy |
|
|
100
100
|
| `system_instructions` | Omission inherits; `append` composes after inherited instructions; `replace` replaces the complete inherited prompt |
|
|
101
101
|
|
|
102
102
|
Agent instruction blocks compose in inheritance order. A child's `append`
|
|
@@ -129,7 +129,7 @@ needs.
|
|
|
129
129
|
|
|
130
130
|
```yaml
|
|
131
131
|
ai:
|
|
132
|
-
model: <provider>/<model>
|
|
132
|
+
model: <provider>/<model> # one Pi has credentials for: pi --list-models
|
|
133
133
|
thinking_level: medium
|
|
134
134
|
options:
|
|
135
135
|
temperature: 0.2
|
|
@@ -140,12 +140,12 @@ ai:
|
|
|
140
140
|
betas: [context-1m]
|
|
141
141
|
context_management: {}
|
|
142
142
|
openrouter:
|
|
143
|
-
routing:
|
|
143
|
+
routing: # forwarded opaquely to OpenRouter
|
|
144
144
|
order: [anthropic]
|
|
145
145
|
only: [anthropic]
|
|
146
146
|
allow_fallbacks: true
|
|
147
147
|
vercel_ai_gateway:
|
|
148
|
-
routing:
|
|
148
|
+
routing: # providerOptions.gateway on Vercel requests
|
|
149
149
|
order: [anthropic, bedrock]
|
|
150
150
|
only: [anthropic, bedrock]
|
|
151
151
|
session:
|
|
@@ -213,6 +213,36 @@ Skill and subagent selection controls prompt exposure and active capability,
|
|
|
213
213
|
not filesystem isolation. All agents run in the same Recipe package and current
|
|
214
214
|
workspace. Use sandboxing and external authorization for security boundaries.
|
|
215
215
|
|
|
216
|
+
A session runs at most 4 subagent runs at once; later starts are recorded and wait, shown as `queued`, until a run ends. The Pi extension takes another limit as `subagentConcurrency`, and an embedded host as `inProcessRunController.concurrency`. A queued run can be waited on, read or closed; closing it takes it out of the queue, and a message to it answers that it has not started yet.
|
|
217
|
+
|
|
218
|
+
The `agent` tool's `batch` action runs one subagent per row of a list; see
|
|
219
|
+
[Batches of subagents](agent-batch.md).
|
|
220
|
+
|
|
221
|
+
Every subagent also gets `send_message`, to tell another agent of the same
|
|
222
|
+
session something before it finishes, as Claude Code's teammates use
|
|
223
|
+
`SendMessage`. It takes `to`, `message` and an optional `deliver`: `to` is
|
|
224
|
+
`root`, the agent the user runs, or another run's name, which is its label, or
|
|
225
|
+
its id; `deliver` is `steer` (the default), for something the recipient should
|
|
226
|
+
act on soon, `followUp`, for a milestone that can wait until it finishes its
|
|
227
|
+
current work, or `status`, a one-line progress note shown on the sender's own
|
|
228
|
+
line in the agents widget, in place of its current command, that reaches no
|
|
229
|
+
agent and ignores `to`. A status may carry `usage` (`input`, `output`, `cost`),
|
|
230
|
+
the running total of work the sender ran elsewhere, such as cloud trials; the
|
|
231
|
+
widget shows it as `reported ↑… ↓… $…` beside the run's own usage, and each
|
|
232
|
+
status replaces the last total. `usage` with another `deliver` is an error.
|
|
233
|
+
Labels are unique within a session while their run is open, so `start` refuses
|
|
234
|
+
a label already in use, and each subagent's system prompt names it: "Your
|
|
235
|
+
name is <label> (run <id>)". A message reaches a recipient that is waiting at once: an `agent` wait in progress returns it, whichever run it
|
|
236
|
+
waits on, and says the awaited run is still running; a child waiting for its
|
|
237
|
+
runs between turns takes it as its next turn. Otherwise a steer reaches the
|
|
238
|
+
recipient now, and a follow-up to a busy recipient is held until its next wait
|
|
239
|
+
ends or its turn does, so messages arrive in the order they were sent; a
|
|
240
|
+
message to an idle root starts a turn. A wait returns every held message, in
|
|
241
|
+
send order. A run that has finished takes no messages. The parent replies with the `agent`
|
|
242
|
+
tool's `message`. Messaging works in the Pi extension's sessions; a host that
|
|
243
|
+
embeds a root session through `createAgentSession` runs its subagents
|
|
244
|
+
without it.
|
|
245
|
+
|
|
216
246
|
## Root Agents and Subagents
|
|
217
247
|
|
|
218
248
|
An agent selected with `--agent` is a root agent. If its effective `subagents`
|
package/docs/batch.md
CHANGED
|
@@ -198,6 +198,13 @@ an async context manager, which the Node SDK does by default. If your SDK also
|
|
|
198
198
|
propagates W3C baggage on outgoing HTTP requests, these entries are sent with
|
|
199
199
|
those requests too, so keep them to ids rather than anything sensitive.
|
|
200
200
|
|
|
201
|
+
## From an agent
|
|
202
|
+
|
|
203
|
+
An agent can start a batch of subagents itself, with the `agent` tool's
|
|
204
|
+
`batch` action: each row runs as a subagent of its session, and results are
|
|
205
|
+
written in the format below. See
|
|
206
|
+
[Batches of subagents](agent-batch.md).
|
|
207
|
+
|
|
201
208
|
## Agents that use subagents
|
|
202
209
|
|
|
203
210
|
Each prompt is one run of the controller. If the batch's agent starts
|
|
@@ -31,21 +31,33 @@ Every command is served by Google's REST APIs, and the descriptor declares
|
|
|
31
31
|
each `rest`. The mapping is static and versioned: the package's contract
|
|
32
32
|
tests pin each request and result shape.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
34
|
+
The table lists every operation a command calls, by the method's id in the
|
|
35
|
+
API's discovery document, which is also the span's
|
|
36
|
+
`introspection.api.operation_id`. An operation in *italics* is called only
|
|
37
|
+
under the condition given. Label and calendar-zone lookups are made once per
|
|
38
|
+
session and reused.
|
|
39
|
+
|
|
40
|
+
| Command | Operations | Conditions and parameters |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `mail search` | `gmail.users.messages.list`, `gmail.users.messages.get` per result, *`gmail.users.labels.list`* | `messages.list` with `q=` (the query, `from:`, `after:`, `before:`, `is:unread`), `labelIds=` for `folder` and `includeSpamTrash=true` for spam or trash, paged with `pageToken`; `messages.get` with `format=full` and `fields=` limited to headers and part structure; `labels.list` to name a result's labels, and to resolve a `folder` that is not a system label |
|
|
43
|
+
| `mail read` | `gmail.users.messages.get` or `gmail.users.threads.get`, *`gmail.users.labels.list`*, *`gmail.users.messages.attachments.get`* | `messages.get` for `message_id`, `threads.get` for `thread_id`, both `format=full`; `labels.list` to name the labels; `attachments.get` when Gmail stores a body part apart (up to 5 MB) |
|
|
44
|
+
| `mail fetch_attachment` | `gmail.users.messages.get`, *`gmail.users.messages.attachments.get`* | `messages.get` with `format=full` to find the part; `attachments.get` unless the part's data is inline |
|
|
45
|
+
| `mail draft` | *`gmail.users.messages.get`*, `gmail.users.drafts.create` | `messages.get` (`format=full`) for the parent when `reply_to_id` is given |
|
|
46
|
+
| `mail update_draft` | `gmail.users.drafts.get`, *`gmail.users.messages.attachments.get`*, `gmail.users.drafts.update` | `drafts.get` with `format=full`; `attachments.get` when `body` is not given and the kept body is stored apart |
|
|
47
|
+
| `mail send` | `gmail.users.drafts.send` | Never retried |
|
|
48
|
+
| `mail label` | *`gmail.users.labels.list`*, `gmail.users.messages.modify`, *`gmail.users.messages.get`* | `labels.list` to resolve label names that are not system labels and to name the result's labels; `messages.get` (`format=full`, structure `fields=`) when `modify` returns no headers |
|
|
49
|
+
| `mail move` | *`gmail.users.labels.list`*, `gmail.users.messages.modify`, *`gmail.users.messages.get`* | As `mail label`; `archive` resolves no label |
|
|
50
|
+
| `calendar list` | *`calendar.calendarList.list`*, `calendar.events.list` | `calendarList.list` (`maxResults=250`, paged) when `calendar` names one other than `primary`; `events.list` with `timeMin=`, `timeMax=`, `singleEvents=true`, `orderBy=startTime`, paged with `pageToken` |
|
|
51
|
+
| `calendar read` | `calendar.events.get`, *`calendar.calendars.get`* | `calendars.get` (`fields=timeZone`) when the event has no time zone of its own |
|
|
52
|
+
| `calendar free_busy` | `calendar.freebusy.query` | `POST`, though a read |
|
|
53
|
+
| `calendar create` | `calendar.events.insert` | On `primary`, `sendUpdates=all`; `conferenceDataVersion=1` when `online_meeting` |
|
|
54
|
+
| `calendar update` | `calendar.events.patch`, *`calendar.calendars.get`* | `sendUpdates=all`, `conferenceDataVersion=1` when `online_meeting`; `calendars.get` (`fields=timeZone`) when neither `time_zone` nor the event gives a zone |
|
|
55
|
+
| `calendar respond` | `calendar.events.get`, `calendar.events.patch` | `events.patch` with `sendUpdates=all` and only `attendees`, the person's own `responseStatus` (and comment) changed |
|
|
56
|
+
| `calendar cancel` | `calendar.events.delete` | `sendUpdates=all` |
|
|
57
|
+
| `drive search` | `drive.files.list` | `q=` (`trashed = false` and `fullText contains`, `in parents`, `modifiedTime >`), `fields=`, paged with `pageToken` |
|
|
58
|
+
| `drive read` | `drive.files.get`, then *`drive.files.export`* or *`drive.files.get`* | First `files.get` with `fields=` for metadata; then `files.export` with `mimeType=` (`text/plain` or `text/csv`) for Docs, Sheets and Slides, or `files.get` with `alt=media` and a `Range` header for a text file; neither for other files |
|
|
59
|
+
| `drive download` | `drive.files.get`, then *`drive.files.export`* or *`drive.files.get`* | First `files.get` with `fields=` for metadata; then `files.export` with `mimeType=` (`.docx`, `.xlsx`, `.pptx` types) for Docs, Sheets and Slides, or `files.get` with `alt=media` for a stored file |
|
|
60
|
+
| `drive upload` | `drive.files.create` | `POST upload/drive/v3/files` with `uploadType=multipart` up to 5 MB; above it `uploadType=resumable`, then `PUT` of the bytes to the returned session URI, same operation |
|
|
49
61
|
|
|
50
62
|
### MCP later
|
|
51
63
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@introspection-ai/recipes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "The open format for vertical agents, built on Pi.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -152,10 +152,10 @@
|
|
|
152
152
|
"@introspection-ai/recipe-productivity-microsoft": ">=0.1.0",
|
|
153
153
|
"@introspection-ai/recipe-search": ">=0.1.0",
|
|
154
154
|
"@introspection-ai/recipe-signature": ">=0.1.0",
|
|
155
|
-
"@introspection-ai/mcp-client-linux-x64": "0.
|
|
156
|
-
"@introspection-ai/mcp-client-linux-arm64": "0.
|
|
157
|
-
"@introspection-ai/mcp-client-darwin-arm64": "0.
|
|
158
|
-
"@introspection-ai/mcp-client-darwin-x64": "0.
|
|
155
|
+
"@introspection-ai/mcp-client-linux-x64": "0.64.0",
|
|
156
|
+
"@introspection-ai/mcp-client-linux-arm64": "0.64.0",
|
|
157
|
+
"@introspection-ai/mcp-client-darwin-arm64": "0.64.0",
|
|
158
|
+
"@introspection-ai/mcp-client-darwin-x64": "0.64.0"
|
|
159
159
|
},
|
|
160
160
|
"peerDependencies": {
|
|
161
161
|
"@earendil-works/pi-agent-core": ">=1.1.0 <2.0.0",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"@types/semver": "^7.8.0",
|
|
180
180
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
181
181
|
"esbuild": "^0.28.1",
|
|
182
|
-
"eslint": "
|
|
182
|
+
"eslint": "10.15.0",
|
|
183
183
|
"eslint-config-prettier": "10.1.8",
|
|
184
184
|
"eslint-plugin-only-warn": "1.2.1",
|
|
185
185
|
"knip": "6.46.1",
|