@introspection-ai/recipes 0.55.0 → 0.56.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/artifact-links.d.ts +25 -0
- package/dist/artifact-links.d.ts.map +1 -0
- package/dist/artifact-links.js +92 -0
- package/dist/artifact-links.js.map +1 -0
- package/dist/artifact-viewer-tui.d.ts +2 -1
- package/dist/artifact-viewer-tui.d.ts.map +1 -1
- package/dist/artifact-viewer-tui.js.map +1 -1
- package/dist/artifact-viewer.d.ts +2 -1
- package/dist/artifact-viewer.d.ts.map +1 -1
- package/dist/artifact-viewer.js +49 -3
- package/dist/artifact-viewer.js.map +1 -1
- package/dist/artifact.d.ts +5 -4
- package/dist/artifact.d.ts.map +1 -1
- package/dist/artifact.js +4 -1
- package/dist/artifact.js.map +1 -1
- package/dist/batch/files.d.ts +16 -0
- package/dist/batch/files.d.ts.map +1 -0
- package/dist/batch/files.js +58 -0
- package/dist/batch/files.js.map +1 -0
- package/dist/batch/index.d.ts +67 -0
- package/dist/batch/index.d.ts.map +1 -0
- package/dist/batch/index.js +109 -0
- package/dist/batch/index.js.map +1 -0
- package/dist/batch/limiter.d.ts +20 -0
- package/dist/batch/limiter.d.ts.map +1 -0
- package/dist/batch/limiter.js +54 -0
- package/dist/batch/limiter.js.map +1 -0
- package/dist/batch/lines.d.ts +58 -0
- package/dist/batch/lines.d.ts.map +1 -0
- package/dist/batch/lines.js +77 -0
- package/dist/batch/lines.js.map +1 -0
- package/dist/batch/params.d.ts +30 -0
- package/dist/batch/params.d.ts.map +1 -0
- package/dist/batch/params.js +48 -0
- package/dist/batch/params.js.map +1 -0
- package/dist/batch/runner.d.ts +77 -0
- package/dist/batch/runner.d.ts.map +1 -0
- package/dist/batch/runner.js +240 -0
- package/dist/batch/runner.js.map +1 -0
- package/dist/batch/shards.d.ts +42 -0
- package/dist/batch/shards.d.ts.map +1 -0
- package/dist/batch/shards.js +115 -0
- package/dist/batch/shards.js.map +1 -0
- package/dist/otel-baggage.d.ts +7 -0
- package/dist/otel-baggage.d.ts.map +1 -0
- package/dist/otel-baggage.js +7 -0
- package/dist/otel-baggage.js.map +1 -0
- package/dist/recipe/manifest.generated.d.ts +2 -1
- package/dist/recipe/manifest.generated.d.ts.map +1 -1
- package/dist/recipe/manifest.generated.js +2 -1
- package/dist/recipe/manifest.generated.js.map +1 -1
- package/dist/review.d.ts +1 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +1 -1
- package/dist/review.js.map +1 -1
- package/dist/session.d.ts +4 -2
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +29 -10
- package/dist/session.js.map +1 -1
- package/docs/README.md +19 -18
- package/docs/batch.md +223 -0
- package/docs/pi-extension.md +42 -0
- package/package.json +11 -6
package/docs/pi-extension.md
CHANGED
|
@@ -158,6 +158,48 @@ available in Pi's interactive terminal, ...` so the model can tell the user
|
|
|
158
158
|
where to look. If a Recipe extension registers its own `show_artifact`, the
|
|
159
159
|
host keeps it and registers neither the built-in tool nor `/recipe view`.
|
|
160
160
|
|
|
161
|
+
### Binary artifacts in a browser host
|
|
162
|
+
|
|
163
|
+
A host with `storeArtifact` can also show DOCX, PDF and common image files
|
|
164
|
+
through the same `show_artifact({ path })` tool. The host receives the original
|
|
165
|
+
`Uint8Array` and MIME type, persists it, and returns its file id. The recorded
|
|
166
|
+
result carries `kind: "file"`, that id and byte count, with empty `content`;
|
|
167
|
+
no binary payload is put in the conversation. Browser hosts render those bytes
|
|
168
|
+
with their file preview component, including after a conversation reload.
|
|
169
|
+
|
|
170
|
+
The existing working-directory and symlink boundary applies, with a 25 MiB cap.
|
|
171
|
+
Binary `ref` and text `diff` requests are refused. Without a binary-capable
|
|
172
|
+
`storeArtifact` implementation the host must not opt into this contract; the
|
|
173
|
+
terminal cannot render binary files. Hosts upgrading from the string-only
|
|
174
|
+
callback must handle both `string` and `Uint8Array` content.
|
|
175
|
+
|
|
176
|
+
### Explicit artifact links
|
|
177
|
+
|
|
178
|
+
Hosts resolve explicit Markdown destinations against known artifact references
|
|
179
|
+
with `resolveArtifactLink` from `@introspection-ai/recipes/review`. The resolver
|
|
180
|
+
is shared, browser-safe code; it neither parses prose nor reads or uploads files.
|
|
181
|
+
A local host leaves an unuploaded file's authored path intact. A hosted UI can
|
|
182
|
+
map `file.id` to its file page, map `source` to its pinned repository view, and
|
|
183
|
+
return no URL for `path` so the link opens its existing artifact viewer.
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
const link = resolveArtifactLink("outputs/report.md", artifacts, {
|
|
187
|
+
workspaceRoot: "/workspace",
|
|
188
|
+
file: ({ id }) => `/files/${encodeURIComponent(id)}`,
|
|
189
|
+
path: () => undefined,
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`artifacts` belongs to the current conversation or selected document, never a
|
|
194
|
+
global basename index. The latest exact workspace-path match wins. `fromPath`
|
|
195
|
+
resolves links relative to a document; absolute paths require `workspaceRoot`
|
|
196
|
+
and cannot escape it. Local `file:` URLs use the same workspace boundary; remote
|
|
197
|
+
file authorities are refused. Percent-encoded filenames and URL fragments are supported.
|
|
198
|
+
External URLs, malformed destinations, query-bearing paths and unknown files
|
|
199
|
+
are left to the host's ordinary link handling. Bare paths, inline code, fenced
|
|
200
|
+
code and images do not invoke this API. Opening a known reference needs no
|
|
201
|
+
additional tool call; persistence remains part of the standard artifact tool.
|
|
202
|
+
|
|
161
203
|
### Reviewing several files
|
|
162
204
|
|
|
163
205
|
List `review_artifacts` and the agent can ask the user to review several
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@introspection-ai/recipes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "The open format for vertical agents, built on Pi.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
"types": "./dist/agents.d.ts",
|
|
62
62
|
"import": "./dist/agents.js"
|
|
63
63
|
},
|
|
64
|
+
"./batch": {
|
|
65
|
+
"types": "./dist/batch/index.d.ts",
|
|
66
|
+
"import": "./dist/batch/index.js"
|
|
67
|
+
},
|
|
64
68
|
"./recipe": {
|
|
65
69
|
"types": "./dist/recipe/resolve.d.ts",
|
|
66
70
|
"import": "./dist/recipe/resolve.js"
|
|
@@ -122,7 +126,6 @@
|
|
|
122
126
|
"dependencies": {
|
|
123
127
|
"@earendil-works/pi-mcp": ">=1.1.0 <2.0.0",
|
|
124
128
|
"@introspection-sdk/introspection-pi": ">=0.47.0",
|
|
125
|
-
"@opentelemetry/api": "^1.9.1",
|
|
126
129
|
"ajv": "^8.20.0",
|
|
127
130
|
"mcporter": "0.16.1",
|
|
128
131
|
"minimatch": "^10.2.6",
|
|
@@ -139,16 +142,17 @@
|
|
|
139
142
|
"@introspection-ai/recipe-productivity-microsoft": ">=0.1.0",
|
|
140
143
|
"@introspection-ai/recipe-search": ">=0.1.0",
|
|
141
144
|
"@introspection-ai/recipe-signature": ">=0.1.0",
|
|
142
|
-
"@introspection-ai/mcp-client-linux-x64": "0.
|
|
143
|
-
"@introspection-ai/mcp-client-linux-arm64": "0.
|
|
144
|
-
"@introspection-ai/mcp-client-darwin-arm64": "0.
|
|
145
|
-
"@introspection-ai/mcp-client-darwin-x64": "0.
|
|
145
|
+
"@introspection-ai/mcp-client-linux-x64": "0.56.0",
|
|
146
|
+
"@introspection-ai/mcp-client-linux-arm64": "0.56.0",
|
|
147
|
+
"@introspection-ai/mcp-client-darwin-arm64": "0.56.0",
|
|
148
|
+
"@introspection-ai/mcp-client-darwin-x64": "0.56.0"
|
|
146
149
|
},
|
|
147
150
|
"peerDependencies": {
|
|
148
151
|
"@earendil-works/pi-agent-core": ">=1.1.0 <2.0.0",
|
|
149
152
|
"@earendil-works/pi-ai": ">=1.1.0 <2.0.0",
|
|
150
153
|
"@earendil-works/pi-coding-agent": ">=1.1.0 <2.0.0",
|
|
151
154
|
"@earendil-works/pi-tui": ">=1.1.0 <2.0.0",
|
|
155
|
+
"@opentelemetry/api": "^1.10.0",
|
|
152
156
|
"typebox": "*"
|
|
153
157
|
},
|
|
154
158
|
"devDependencies": {
|
|
@@ -157,6 +161,7 @@
|
|
|
157
161
|
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
158
162
|
"@earendil-works/pi-tui": "1.5.0",
|
|
159
163
|
"@eslint/js": "9.39.5",
|
|
164
|
+
"@opentelemetry/api": "^1.10.0",
|
|
160
165
|
"@pollyjs/adapter-fetch": "^6.0.7",
|
|
161
166
|
"@pollyjs/core": "^6.0.6",
|
|
162
167
|
"@pollyjs/persister-fs": "^6.0.6",
|