@introspection-ai/recipes 0.13.0 → 0.14.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/README.md +45 -58
- package/dist/{agent-tool.d.ts → agents.d.ts} +4 -1
- package/dist/agents.d.ts.map +1 -0
- package/dist/{agent-tool.js → agents.js} +1 -1
- package/dist/agents.js.map +1 -0
- package/dist/api/extensions.d.ts +3 -0
- package/dist/api/extensions.d.ts.map +1 -0
- package/dist/api/extensions.js +2 -0
- package/dist/api/extensions.js.map +1 -0
- package/dist/api/mcp.d.ts +4 -0
- package/dist/api/mcp.d.ts.map +1 -0
- package/dist/api/mcp.js +2 -0
- package/dist/api/mcp.js.map +1 -0
- package/dist/api/session.d.ts +3 -0
- package/dist/api/session.d.ts.map +1 -0
- package/dist/api/session.js +2 -0
- package/dist/api/session.js.map +1 -0
- package/dist/child-agent.d.ts +5 -4
- package/dist/child-agent.d.ts.map +1 -1
- package/dist/child-agent.js +26 -117
- package/dist/child-agent.js.map +1 -1
- package/dist/child-session.d.ts +23 -0
- package/dist/child-session.d.ts.map +1 -0
- package/dist/child-session.js +48 -0
- package/dist/child-session.js.map +1 -0
- package/dist/extensions.d.ts +29 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +119 -0
- package/dist/extensions.js.map +1 -0
- package/dist/index.d.ts +4 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -13
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +38 -5
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +92 -41
- package/dist/inspect.js.map +1 -1
- package/dist/interactions.d.ts +18 -2
- package/dist/interactions.d.ts.map +1 -1
- package/dist/interactions.js +41 -10
- package/dist/interactions.js.map +1 -1
- package/dist/mcp-catalog.d.ts +1 -0
- package/dist/mcp-catalog.d.ts.map +1 -1
- package/dist/mcp-catalog.js +14 -6
- package/dist/mcp-catalog.js.map +1 -1
- package/dist/mcp-chunks/auth-command-ZLGYIEUY.js +273 -0
- package/dist/mcp-chunks/call-arguments-LU3W6D3K.js +13 -0
- package/dist/mcp-chunks/call-command-LKTKSYTH.js +612 -0
- package/dist/mcp-chunks/chunk-2U4BSDC4.js +3951 -0
- package/dist/mcp-chunks/chunk-2XL7MG7R.js +272 -0
- package/dist/mcp-chunks/chunk-3BJA27PY.js +2321 -0
- package/dist/mcp-chunks/chunk-4SQKWYFF.js +15 -0
- package/dist/mcp-chunks/chunk-5QOSCSQB.js +290 -0
- package/dist/mcp-chunks/chunk-6W5QFASN.js +77 -0
- package/dist/mcp-chunks/chunk-6XCZGU3G.js +1004 -0
- package/dist/mcp-chunks/chunk-7FHEBT5G.js +149 -0
- package/dist/mcp-chunks/chunk-7KA2VJVZ.js +114 -0
- package/dist/mcp-chunks/chunk-7UDVSOOF.js +138 -0
- package/dist/mcp-chunks/chunk-BNV3TPE4.js +66 -0
- package/dist/mcp-chunks/chunk-BTLAWHTA.js +129 -0
- package/dist/mcp-chunks/chunk-BV56DXPW.js +13 -0
- package/dist/mcp-chunks/chunk-BWHIA4PC.js +90 -0
- package/dist/mcp-chunks/chunk-BZIQOWE6.js +267 -0
- package/dist/mcp-chunks/chunk-D3MRAZ6H.js +16140 -0
- package/dist/mcp-chunks/chunk-DHBE7UBH.js +750 -0
- package/dist/mcp-chunks/chunk-E22DYOW5.js +251 -0
- package/dist/mcp-chunks/chunk-ECIVB7P4.js +139 -0
- package/dist/mcp-chunks/chunk-HKRJ6O36.js +1076 -0
- package/dist/mcp-chunks/chunk-IABRYROW.js +44 -0
- package/dist/mcp-chunks/chunk-J6LYIZXN.js +45 -0
- package/dist/mcp-chunks/chunk-L7NTQVYN.js +161 -0
- package/dist/mcp-chunks/chunk-LEZSACDE.js +141 -0
- package/dist/mcp-chunks/chunk-LKIBAYKU.js +208 -0
- package/dist/mcp-chunks/chunk-LNH5LAJD.js +152 -0
- package/dist/mcp-chunks/chunk-LQQEYD76.js +124 -0
- package/dist/mcp-chunks/chunk-LRKZP7DJ.js +47 -0
- package/dist/mcp-chunks/chunk-LS7PMWSR.js +109 -0
- package/dist/mcp-chunks/chunk-M3TPODXI.js +95 -0
- package/dist/mcp-chunks/chunk-MZ2NARG7.js +400 -0
- package/dist/mcp-chunks/chunk-N46NEFAF.js +45 -0
- package/dist/mcp-chunks/chunk-NNOEGEUZ.js +17273 -0
- package/dist/mcp-chunks/chunk-NRAJX5E4.js +69 -0
- package/dist/mcp-chunks/chunk-P3PSC54P.js +869 -0
- package/dist/mcp-chunks/chunk-PIIYJR44.js +6341 -0
- package/dist/mcp-chunks/chunk-PWYFKGKG.js +385 -0
- package/dist/mcp-chunks/chunk-SJCCBNZ4.js +45 -0
- package/dist/mcp-chunks/chunk-TATVT5IT.js +194 -0
- package/dist/mcp-chunks/chunk-TEUKFFQL.js +29 -0
- package/dist/mcp-chunks/chunk-UKYNQGNE.js +150 -0
- package/dist/mcp-chunks/chunk-UNKB4SBV.js +37 -0
- package/dist/mcp-chunks/chunk-WD6BOD24.js +138 -0
- package/dist/mcp-chunks/chunk-WQJZMCJN.js +73 -0
- package/dist/mcp-chunks/chunk-XANPGTLI.js +364 -0
- package/dist/mcp-chunks/chunk-XQK2JSW4.js +35 -0
- package/dist/mcp-chunks/chunk-YHQUTU6L.js +571 -0
- package/dist/mcp-chunks/chunk-YVZKMV5H.js +57 -0
- package/dist/mcp-chunks/cli-UV4QJZZM.js +929 -0
- package/dist/mcp-chunks/client-S7RQUG5U.js +13 -0
- package/dist/mcp-chunks/config-command-NLAGKID5.js +1101 -0
- package/dist/mcp-chunks/daemon-command-U242Z6VY.js +26 -0
- package/dist/mcp-chunks/dist-LK3SHAMX.js +6478 -0
- package/dist/mcp-chunks/emit-ts-command-VBXVXO6V.js +386 -0
- package/dist/mcp-chunks/generate-cli-runner-6CAZZA3P.js +1426 -0
- package/dist/mcp-chunks/inspect-cli-command-3ZORTOR7.js +111 -0
- package/dist/mcp-chunks/launch-YKRXHXJI.js +10 -0
- package/dist/mcp-chunks/lifecycle-XVKRHPH3.js +16 -0
- package/dist/mcp-chunks/list-command-2MEGGNFQ.js +4190 -0
- package/dist/mcp-chunks/output-utils-NKESLAJ6.js +12 -0
- package/dist/mcp-chunks/prompt-B1Yc1NPt-VGOTWJMN.js +918 -0
- package/dist/mcp-chunks/record-command-YXHTTTT5.js +17 -0
- package/dist/mcp-chunks/replay-command-25HJ6AQU.js +85 -0
- package/dist/mcp-chunks/resource-command-OO4NYF5C.js +97 -0
- package/dist/mcp-chunks/result-utils-MOHHLNM7.js +15 -0
- package/dist/mcp-chunks/runtime-5WJ3G25Y.js +33 -0
- package/dist/mcp-chunks/runtime-wrapper-RPWDIDBF.js +10 -0
- package/dist/mcp-chunks/serve-command-DHXJZMMN.js +3302 -0
- package/dist/mcp-chunks/timeouts-W2XWCCXR.js +18 -0
- package/dist/mcp-chunks/vault-command-PIYIUEZL.js +154 -0
- package/dist/mcp-daemon-client.d.ts +6 -1
- package/dist/mcp-daemon-client.d.ts.map +1 -1
- package/dist/mcp-daemon-client.js +119 -2
- package/dist/mcp-daemon-client.js.map +1 -1
- package/dist/mcp-daemon-protocol.d.ts +18 -1
- package/dist/mcp-daemon-protocol.d.ts.map +1 -1
- package/dist/mcp-daemon-protocol.js +31 -0
- package/dist/mcp-daemon-protocol.js.map +1 -1
- package/dist/mcp-daemon.js +169 -76602
- package/dist/mcp-daemon.js.map +1 -1
- package/dist/mcp-policy.d.ts +11 -0
- package/dist/mcp-policy.d.ts.map +1 -0
- package/dist/mcp-policy.js +27 -0
- package/dist/mcp-policy.js.map +1 -0
- package/dist/mcp-run-worker.js +38 -76540
- package/dist/mcp-tools.d.ts +39 -0
- package/dist/mcp-tools.d.ts.map +1 -0
- package/dist/mcp-tools.js +493 -0
- package/dist/mcp-tools.js.map +1 -0
- package/dist/mcp.d.ts +21 -9
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +101 -31
- package/dist/mcp.js.map +1 -1
- package/dist/model-binding.d.ts +39 -0
- package/dist/model-binding.d.ts.map +1 -0
- package/dist/model-binding.js +103 -0
- package/dist/model-binding.js.map +1 -0
- package/dist/pi-extension.d.ts +2 -22
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +296 -71
- package/dist/pi-extension.js.map +1 -1
- package/dist/recipe/resolve.d.ts +43 -20
- package/dist/recipe/resolve.d.ts.map +1 -1
- package/dist/recipe/resolve.js +215 -70
- package/dist/recipe/resolve.js.map +1 -1
- package/dist/recipe-agent.d.ts +24 -27
- package/dist/recipe-agent.d.ts.map +1 -1
- package/dist/recipe-agent.js +278 -230
- package/dist/recipe-agent.js.map +1 -1
- package/dist/recipe-check.d.ts +17 -0
- package/dist/recipe-check.d.ts.map +1 -0
- package/dist/recipe-check.js +258 -0
- package/dist/recipe-check.js.map +1 -0
- package/dist/recipe-extensions.d.ts.map +1 -1
- package/dist/recipe-extensions.js +0 -3
- package/dist/recipe-extensions.js.map +1 -1
- package/dist/recipe-model.d.ts +3 -1
- package/dist/recipe-model.d.ts.map +1 -1
- package/dist/recipe-model.js +15 -12
- package/dist/recipe-model.js.map +1 -1
- package/dist/recipe-package.d.ts +6 -28
- package/dist/recipe-package.d.ts.map +1 -1
- package/dist/recipe-package.js +248 -191
- package/dist/recipe-package.js.map +1 -1
- package/dist/recipe-skills.d.ts.map +1 -1
- package/dist/recipe-skills.js +42 -29
- package/dist/recipe-skills.js.map +1 -1
- package/dist/run-controller.d.ts +10 -9
- package/dist/run-controller.d.ts.map +1 -1
- package/dist/run-controller.js +28 -21
- package/dist/run-controller.js.map +1 -1
- package/dist/session.d.ts +40 -53
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +312 -173
- package/dist/session.js.map +1 -1
- package/dist/test-utils.d.ts +7 -7
- package/dist/test-utils.d.ts.map +1 -1
- package/dist/test-utils.js +32 -15
- package/dist/test-utils.js.map +1 -1
- package/docs/agent-composition.md +41 -35
- package/docs/host-api.md +201 -0
- package/docs/index.md +8 -14
- package/docs/interactions.md +12 -11
- package/docs/mcp-auth.md +6 -6
- package/docs/mcp-configuration.md +72 -24
- package/docs/pi-extension.md +39 -11
- package/docs/recipe-flow.md +9 -9
- package/docs/recipe-format.md +90 -41
- package/package.json +23 -17
- package/vendor/mcp-client/darwin-arm64/mcp-client +0 -0
- package/vendor/mcp-client/darwin-x64/mcp-client +0 -0
- package/vendor/mcp-client/linux-arm64/mcp-client +0 -0
- 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/dist/agent-tool.d.ts.map +0 -1
- package/dist/agent-tool.js.map +0 -1
- package/dist/run.d.ts +0 -28
- package/dist/run.d.ts.map +0 -1
- package/dist/run.js +0 -84
- package/dist/run.js.map +0 -1
- package/dist/testing.d.ts +0 -25
- package/dist/testing.d.ts.map +0 -1
- package/dist/testing.js +0 -96
- package/dist/testing.js.map +0 -1
- package/docs/deployment-configuration.md +0 -65
- package/docs/migration.md +0 -70
- package/docs/python-bindings-release.md +0 -47
- package/docs/recipe-evals.md +0 -70
- package/docs/recipe-judges.md +0 -152
- package/docs/runtime-library.md +0 -171
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@introspection-ai/recipes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "The open package format for complete, portable Pi agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -10,18 +10,19 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"vendor/mcp-client",
|
|
13
|
+
"vendor/recipe-check",
|
|
13
14
|
"docs",
|
|
14
15
|
"README.md",
|
|
15
16
|
"package.json"
|
|
16
17
|
],
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
19
|
-
"url": "git+ssh://git@github.com/introspection-org/
|
|
20
|
+
"url": "git+ssh://git@github.com/introspection-org/recipes.git"
|
|
20
21
|
},
|
|
21
22
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/introspection-org/
|
|
23
|
+
"url": "https://github.com/introspection-org/recipes/issues"
|
|
23
24
|
},
|
|
24
|
-
"homepage": "https://github.com/introspection-org/
|
|
25
|
+
"homepage": "https://github.com/introspection-org/recipes#readme",
|
|
25
26
|
"publishConfig": {
|
|
26
27
|
"access": "public",
|
|
27
28
|
"tag": "latest"
|
|
@@ -35,25 +36,29 @@
|
|
|
35
36
|
"types": "./dist/interactions.d.ts",
|
|
36
37
|
"import": "./dist/interactions.js"
|
|
37
38
|
},
|
|
39
|
+
"./extensions": {
|
|
40
|
+
"types": "./dist/api/extensions.d.ts",
|
|
41
|
+
"import": "./dist/api/extensions.js"
|
|
42
|
+
},
|
|
43
|
+
"./mcp": {
|
|
44
|
+
"types": "./dist/api/mcp.d.ts",
|
|
45
|
+
"import": "./dist/api/mcp.js"
|
|
46
|
+
},
|
|
38
47
|
"./pi-extension": {
|
|
39
48
|
"types": "./dist/pi-extension.d.ts",
|
|
40
49
|
"import": "./dist/pi-extension.js"
|
|
41
50
|
},
|
|
42
|
-
"./
|
|
43
|
-
"types": "./dist/
|
|
44
|
-
"import": "./dist/
|
|
51
|
+
"./agents": {
|
|
52
|
+
"types": "./dist/agents.d.ts",
|
|
53
|
+
"import": "./dist/agents.js"
|
|
45
54
|
},
|
|
46
55
|
"./recipe": {
|
|
47
56
|
"types": "./dist/recipe/resolve.d.ts",
|
|
48
57
|
"import": "./dist/recipe/resolve.js"
|
|
49
58
|
},
|
|
50
59
|
"./session": {
|
|
51
|
-
"types": "./dist/session.d.ts",
|
|
52
|
-
"import": "./dist/session.js"
|
|
53
|
-
},
|
|
54
|
-
"./run": {
|
|
55
|
-
"types": "./dist/run.d.ts",
|
|
56
|
-
"import": "./dist/run.js"
|
|
60
|
+
"types": "./dist/api/session.d.ts",
|
|
61
|
+
"import": "./dist/api/session.js"
|
|
57
62
|
},
|
|
58
63
|
"./test-utils": {
|
|
59
64
|
"types": "./dist/test-utils.d.ts",
|
|
@@ -72,6 +77,7 @@
|
|
|
72
77
|
"dependencies": {
|
|
73
78
|
"@introspection-sdk/introspection-pi": "^0.13.0",
|
|
74
79
|
"@opentelemetry/api": "^1.9.1",
|
|
80
|
+
"ajv": "^8.20.0",
|
|
75
81
|
"mcporter": "0.12.3",
|
|
76
82
|
"yaml": "^2.9.0"
|
|
77
83
|
},
|
|
@@ -96,11 +102,11 @@
|
|
|
96
102
|
"scripts": {
|
|
97
103
|
"build": "pnpm build:ts && pnpm build:native",
|
|
98
104
|
"build:ts": "rm -rf dist && tsc && node scripts/build-mcp-daemon.mjs",
|
|
99
|
-
"build:native": "cargo build --release -p pi-mcp-client && node scripts/package-mcp-client.mjs",
|
|
105
|
+
"build:native": "cargo build --release -p pi-mcp-client && cargo build --release -p recipe-check --bin recipe-check && node scripts/package-mcp-client.mjs && node scripts/package-recipe-check.mjs",
|
|
100
106
|
"bench:mcp-client": "pnpm build:ts && cargo build --release -p pi-mcp-client && node scripts/benchmark-mcp-client.mjs",
|
|
101
|
-
"typecheck": "
|
|
102
|
-
"test": "pnpm build:ts && cargo test -p pi-mcp-client -p
|
|
107
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
108
|
+
"test": "pnpm build:ts && cargo test -p pi-mcp-client -p recipe-check && cargo build -p pi-mcp-client && cargo build -p recipe-check --bin recipe-check && MCP_CLIENT_BIN=target/debug/mcp-client node scripts/package-mcp-client.mjs && vitest run",
|
|
103
109
|
"pack:check": "pnpm pack --dry-run --json | node scripts/check-npm-pack.mjs",
|
|
104
|
-
"clean": "rm -rf dist .turbo node_modules target vendor/mcp-client"
|
|
110
|
+
"clean": "rm -rf dist .turbo node_modules target vendor/mcp-client vendor/recipe-check"
|
|
105
111
|
}
|
|
106
112
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/agent-tool.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tool.d.ts","sourceRoot":"","sources":["../src/agent-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGlF,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,WAAW,GACX,QAAQ,GACR,aAAa,GACb,QAAQ,CAAC;AAEb,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,IAAI,eAAe,EAAE,CAAC;IAC1B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAA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C;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/run.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
|
2
|
-
import { type CreateRecipeSessionOptions } from "./session.js";
|
|
3
|
-
/**
|
|
4
|
-
* One turn, no server: create session → single prompt → await settle →
|
|
5
|
-
* dispose, always. The programmatic analog of `pi --mode json -p`.
|
|
6
|
-
*
|
|
7
|
-
* Agent-level failure never throws — it lands in `status: "failed"`. Only
|
|
8
|
-
* caller mistakes (bad options, unreadable recipe, missing credentials)
|
|
9
|
-
* throw, from session construction.
|
|
10
|
-
*/
|
|
11
|
-
export interface RunRecipeOptions extends CreateRecipeSessionOptions {
|
|
12
|
-
prompt: string;
|
|
13
|
-
timeoutMs?: number;
|
|
14
|
-
signal?: AbortSignal;
|
|
15
|
-
/** Session factory; defaults to `createRecipeSession`. Test/DI seam. */
|
|
16
|
-
sessionFactory?: (options: CreateRecipeSessionOptions) => Promise<import("./session.js").RecipeSessionHandle>;
|
|
17
|
-
}
|
|
18
|
-
export interface RecipeRunResult {
|
|
19
|
-
status: "finished" | "failed" | "cancelled";
|
|
20
|
-
/** Final assistant message text ("" if none). */
|
|
21
|
-
text: string;
|
|
22
|
-
/** Full transcript, Pi's message shape. */
|
|
23
|
-
messages: AgentMessage[];
|
|
24
|
-
/** Present iff status === "failed". */
|
|
25
|
-
error?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare function runRecipe(options: RunRecipeOptions): Promise<RecipeRunResult>;
|
|
28
|
-
//# sourceMappingURL=run.d.ts.map
|
package/dist/run.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,cAAc,CAAC;AAEtB;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAiB,SAAQ,0BAA0B;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,wEAAwE;IACxE,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,0BAA0B,KAChC,OAAO,CAAC,OAAO,cAAc,EAAE,mBAAmB,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC5C,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqBD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CAmE1B"}
|
package/dist/run.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { promptResultText } from "./child-agent.js";
|
|
2
|
-
import { createRecipeSession, } from "./session.js";
|
|
3
|
-
function lastAssistantStop(messages) {
|
|
4
|
-
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
5
|
-
const message = messages[index];
|
|
6
|
-
if (message?.role !== "assistant")
|
|
7
|
-
continue;
|
|
8
|
-
return {
|
|
9
|
-
...(typeof message.stopReason === "string"
|
|
10
|
-
? { stopReason: message.stopReason }
|
|
11
|
-
: {}),
|
|
12
|
-
...(typeof message.errorMessage === "string"
|
|
13
|
-
? { errorMessage: message.errorMessage }
|
|
14
|
-
: {}),
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return {};
|
|
18
|
-
}
|
|
19
|
-
export async function runRecipe(options) {
|
|
20
|
-
const { prompt, timeoutMs, signal, sessionFactory, ...sessionOptions } = options;
|
|
21
|
-
if (typeof prompt !== "string" || !prompt.trim()) {
|
|
22
|
-
throw new TypeError("runRecipe requires a non-empty prompt");
|
|
23
|
-
}
|
|
24
|
-
if (signal?.aborted) {
|
|
25
|
-
return { status: "cancelled", text: "", messages: [] };
|
|
26
|
-
}
|
|
27
|
-
const handle = await (sessionFactory ?? createRecipeSession)(sessionOptions);
|
|
28
|
-
let timedOut = false;
|
|
29
|
-
let aborted = false;
|
|
30
|
-
let timer;
|
|
31
|
-
const onAbort = () => {
|
|
32
|
-
aborted = true;
|
|
33
|
-
void handle.session.abort().catch(() => { });
|
|
34
|
-
};
|
|
35
|
-
try {
|
|
36
|
-
if (timeoutMs !== undefined) {
|
|
37
|
-
timer = setTimeout(() => {
|
|
38
|
-
timedOut = true;
|
|
39
|
-
void handle.session.abort().catch(() => { });
|
|
40
|
-
}, timeoutMs);
|
|
41
|
-
}
|
|
42
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
43
|
-
// The signal may have fired while the asynchronous session factory was
|
|
44
|
-
// resolving, before the listener existed.
|
|
45
|
-
if (signal?.aborted) {
|
|
46
|
-
aborted = true;
|
|
47
|
-
await handle.session.abort().catch(() => { });
|
|
48
|
-
return {
|
|
49
|
-
status: "cancelled",
|
|
50
|
-
text: "",
|
|
51
|
-
messages: [...handle.session.messages],
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
let promptError;
|
|
55
|
-
try {
|
|
56
|
-
await handle.session.prompt(prompt);
|
|
57
|
-
}
|
|
58
|
-
catch (err) {
|
|
59
|
-
promptError = err instanceof Error ? err.message : String(err);
|
|
60
|
-
}
|
|
61
|
-
const messages = [...handle.session.messages];
|
|
62
|
-
const text = promptResultText({ messages });
|
|
63
|
-
const { stopReason, errorMessage } = lastAssistantStop(messages);
|
|
64
|
-
if (timedOut || aborted || stopReason === "aborted") {
|
|
65
|
-
return { status: "cancelled", text, messages };
|
|
66
|
-
}
|
|
67
|
-
if (promptError !== undefined || stopReason === "error") {
|
|
68
|
-
return {
|
|
69
|
-
status: "failed",
|
|
70
|
-
text,
|
|
71
|
-
messages,
|
|
72
|
-
error: promptError ?? errorMessage ?? "agent error",
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
return { status: "finished", text, messages };
|
|
76
|
-
}
|
|
77
|
-
finally {
|
|
78
|
-
if (timer !== undefined)
|
|
79
|
-
clearTimeout(timer);
|
|
80
|
-
signal?.removeEventListener("abort", onAbort);
|
|
81
|
-
await handle.dispose();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=run.js.map
|
package/dist/run.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AA8BtB,SAAS,iBAAiB,CAAC,QAAiC;IAI1D,KAAK,IAAI,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAuC,CAAC;QACtE,IAAI,OAAO,EAAE,IAAI,KAAK,WAAW;YAAE,SAAS;QAC5C,OAAO;YACL,GAAG,CAAC,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ;gBACxC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE;gBACpC,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,OAAO,OAAO,CAAC,YAAY,KAAK,QAAQ;gBAC1C,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE;gBACxC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,OAAyB;IAEzB,MAAM,EAAE,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;QACT,IAAI,KAAK,KAAK,SAAS;YAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QAC7C,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;AACH,CAAC"}
|
package/dist/testing.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ExtensionEvent, ExtensionAPI, RegisteredCommand, ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
export interface MockExtensionAPI extends ExtensionAPI {
|
|
3
|
-
commands: Map<string, Omit<RegisteredCommand, "name" | "sourceInfo">>;
|
|
4
|
-
tools: Map<string, ToolDefinition<any, any, any>>;
|
|
5
|
-
flags: Map<string, {
|
|
6
|
-
description?: string;
|
|
7
|
-
type: "boolean" | "string";
|
|
8
|
-
default?: boolean | string;
|
|
9
|
-
}>;
|
|
10
|
-
flagValues: Map<string, boolean | string>;
|
|
11
|
-
handlers: Map<string, Array<(event: any, ctx: any) => unknown>>;
|
|
12
|
-
messages: unknown[];
|
|
13
|
-
sentMessages: Array<{
|
|
14
|
-
message: any;
|
|
15
|
-
options?: any;
|
|
16
|
-
}>;
|
|
17
|
-
messageRenderers: Map<string, (message: any, options: any, theme: any) => unknown>;
|
|
18
|
-
sessionName?: string;
|
|
19
|
-
activeTools: string[];
|
|
20
|
-
thinkingLevel?: string;
|
|
21
|
-
model?: unknown;
|
|
22
|
-
emitExtensionEvent(event: ExtensionEvent, ctx: any): Promise<unknown[]>;
|
|
23
|
-
}
|
|
24
|
-
export declare function createMockExtensionAPI(): MockExtensionAPI;
|
|
25
|
-
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,i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zE;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CA8FzD"}
|
package/dist/testing.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
export function createMockExtensionAPI() {
|
|
2
|
-
const commands = new Map();
|
|
3
|
-
const tools = new Map();
|
|
4
|
-
const flags = new Map();
|
|
5
|
-
const flagValues = new Map();
|
|
6
|
-
const handlers = new Map();
|
|
7
|
-
const messages = [];
|
|
8
|
-
const sentMessages = [];
|
|
9
|
-
const messageRenderers = new Map();
|
|
10
|
-
const api = {
|
|
11
|
-
commands,
|
|
12
|
-
tools,
|
|
13
|
-
flags,
|
|
14
|
-
flagValues,
|
|
15
|
-
handlers,
|
|
16
|
-
messages,
|
|
17
|
-
sentMessages,
|
|
18
|
-
messageRenderers,
|
|
19
|
-
activeTools: [],
|
|
20
|
-
on(event, handler) {
|
|
21
|
-
const list = handlers.get(event) ?? [];
|
|
22
|
-
list.push(handler);
|
|
23
|
-
handlers.set(event, list);
|
|
24
|
-
},
|
|
25
|
-
registerTool(tool) {
|
|
26
|
-
tools.set(tool.name, tool);
|
|
27
|
-
},
|
|
28
|
-
registerCommand(name, options) {
|
|
29
|
-
commands.set(name, options);
|
|
30
|
-
},
|
|
31
|
-
registerShortcut() { },
|
|
32
|
-
registerFlag(name, options) {
|
|
33
|
-
flags.set(name, options);
|
|
34
|
-
if (options.default !== undefined && !flagValues.has(name)) {
|
|
35
|
-
flagValues.set(name, options.default);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
getFlag(name) {
|
|
39
|
-
return flagValues.get(name);
|
|
40
|
-
},
|
|
41
|
-
registerMessageRenderer(customType, renderer) {
|
|
42
|
-
messageRenderers.set(customType, renderer);
|
|
43
|
-
},
|
|
44
|
-
sendMessage(message, options) {
|
|
45
|
-
messages.push(message);
|
|
46
|
-
sentMessages.push({ message, options });
|
|
47
|
-
},
|
|
48
|
-
sendUserMessage() { },
|
|
49
|
-
setSessionName(name) {
|
|
50
|
-
api.sessionName = name;
|
|
51
|
-
},
|
|
52
|
-
getSessionName() {
|
|
53
|
-
return api.sessionName;
|
|
54
|
-
},
|
|
55
|
-
setActiveTools(toolNames) {
|
|
56
|
-
api.activeTools = toolNames;
|
|
57
|
-
},
|
|
58
|
-
getActiveTools() {
|
|
59
|
-
return api.activeTools;
|
|
60
|
-
},
|
|
61
|
-
getAllTools() {
|
|
62
|
-
return [...tools.values()].map((tool) => ({
|
|
63
|
-
name: tool.name,
|
|
64
|
-
description: tool.description,
|
|
65
|
-
parameters: tool.parameters,
|
|
66
|
-
sourceInfo: { path: "<test>", source: "test", scope: "temporary", origin: "top-level" },
|
|
67
|
-
}));
|
|
68
|
-
},
|
|
69
|
-
setThinkingLevel(level) {
|
|
70
|
-
api.thinkingLevel = level;
|
|
71
|
-
},
|
|
72
|
-
getThinkingLevel() {
|
|
73
|
-
return api.thinkingLevel ?? "off";
|
|
74
|
-
},
|
|
75
|
-
async setModel(model) {
|
|
76
|
-
api.model = model;
|
|
77
|
-
return true;
|
|
78
|
-
},
|
|
79
|
-
async emitExtensionEvent(event, ctx) {
|
|
80
|
-
const results = [];
|
|
81
|
-
for (const handler of handlers.get(event.type) ?? []) {
|
|
82
|
-
results.push(await handler(event, ctx));
|
|
83
|
-
}
|
|
84
|
-
return results;
|
|
85
|
-
},
|
|
86
|
-
events: {
|
|
87
|
-
emit() { },
|
|
88
|
-
on() {
|
|
89
|
-
return () => { };
|
|
90
|
-
},
|
|
91
|
-
off() { },
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
return api;
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=testing.js.map
|
package/dist/testing.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,sBAAsB;IACpC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA0D,CAAC;IACnF,MAAM,KAAK,GAAG,IAAI,GAAG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CAAC,KAAc;YAC3B,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,CAAC,kBAAkB,CAAC,KAAqB,EAAE,GAAQ;YACtD,MAAM,OAAO,GAAc,EAAE,CAAC;YAC9B,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;gBACrD,OAAO,CAAC,IAAI,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;YAC1C,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,MAAM,EAAE;YACN,IAAI,KAAI,CAAC;YACT,EAAE;gBACA,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;YAClB,CAAC;YACD,GAAG,KAAI,CAAC;SACT;KAC6B,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Deployment configuration
|
|
2
|
-
|
|
3
|
-
How a recipe declares what its tasks need from the platform that runs them —
|
|
4
|
-
compute resources and scratch disk — and what an implementing platform does
|
|
5
|
-
with those declarations.
|
|
6
|
-
|
|
7
|
-
This spec is defined here, in Recipes, because it describes *Recipe
|
|
8
|
-
intent*: portable, platform-neutral declarations that any host can honor.
|
|
9
|
-
The validation grammar lives in `pi_recipe_check::resources`
|
|
10
|
-
(`validate_resources`) so every host — the Introspection CLI, a
|
|
11
|
-
platform's manifest validator, wasm/Python bindings — applies identical
|
|
12
|
-
rules with stable diagnostic codes. Platform-specific enforcement (floors,
|
|
13
|
-
caps, billing) is the implementer's job, not part of the grammar.
|
|
14
|
-
|
|
15
|
-
## Where the declarations live
|
|
16
|
-
|
|
17
|
-
Recipe *package* contents (`package.json#pi`, `agents/*.yaml`) are
|
|
18
|
-
materialized inside a running sandbox, after the machine that runs them
|
|
19
|
-
already exists — so deployment configuration cannot live there. It lives in
|
|
20
|
-
the host's deployment manifest, the file the platform reads *before*
|
|
21
|
-
provisioning. On Introspection that is the repo-root
|
|
22
|
-
`.introspection/<slug>.yaml` manifest's `runtime:` block:
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
runtime:
|
|
26
|
-
resources:
|
|
27
|
-
requests: { cpu: 500m, memory: 1.5Gi, storage: 10Gi }
|
|
28
|
-
limits: { cpu: 1500m, memory: 1.5Gi }
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## `resources`
|
|
32
|
-
|
|
33
|
-
Kubernetes-style `requests`/`limits` (`validate_resources`). Grammar:
|
|
34
|
-
`500m` millicores or decimal cores for CPU; bytes with binary
|
|
35
|
-
(`Ki`/`Mi`/`Gi`/`Ti`) or decimal (`k`/`M`/`G`/`T`) suffixes for memory and
|
|
36
|
-
storage (`0.1T` works). Quantities may also be JSON numbers — `cpu: 1.5`
|
|
37
|
-
(cores) or an integer byte count for memory. A request must not exceed its limit.
|
|
38
|
-
|
|
39
|
-
`storage` is the sandbox scratch-volume size and follows the PVC
|
|
40
|
-
convention (`spec.resources.requests.storage`): request-only — declaring
|
|
41
|
-
it under `limits` is rejected. Whether the scratch volume is persistent
|
|
42
|
-
(survives sandbox teardown for warm restore) or ephemeral stays a
|
|
43
|
-
*deployment* setting on the implementing platform — the recipe only sizes
|
|
44
|
-
it. Future io characteristics (e.g. a storage class) would be siblings in
|
|
45
|
-
the manifest, mirroring how Kubernetes expresses them outside the
|
|
46
|
-
quantity.
|
|
47
|
-
|
|
48
|
-
## How Introspection implements this
|
|
49
|
-
|
|
50
|
-
The reference implementation treats every declaration as an **upward
|
|
51
|
-
request** merged onto deployment-configured floors:
|
|
52
|
-
|
|
53
|
-
- cpu/memory requests: `max(recipe, deployment floor)`, capped by a
|
|
54
|
-
schedulability guard; limits raise to the resolved request.
|
|
55
|
-
- `requests.storage`: taken as declared — rounded up to whole GiB
|
|
56
|
-
(smaller scratch bills less; 1Gi is the validated minimum) and capped
|
|
57
|
-
at 300 GiB; undeclared uses the deployment default (10 GiB). Applied to
|
|
58
|
-
the sandbox's scratch volume (a persistent PVC when the deployment
|
|
59
|
-
enables warm storage, ephemeral emptyDir at the same mount path
|
|
60
|
-
otherwise).
|
|
61
|
-
|
|
62
|
-
Invalid declarations fail manifest validation at push — a recipe never
|
|
63
|
-
silently spawns with defaults because of a typo. Other platforms may
|
|
64
|
-
choose different enforcement; the declarations and their grammar are the
|
|
65
|
-
portable part.
|
package/docs/migration.md
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Migration to Recipes
|
|
2
|
-
|
|
3
|
-
The project and npm package are now **Recipes**:
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
@introspection-ai/pi-recipes → @introspection-ai/recipes
|
|
7
|
-
Pi Recipes → Recipes
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
The artifact remains **a Recipe**. The package format and focused runtime
|
|
11
|
-
entrypoints remain source-compatible unless noted below.
|
|
12
|
-
|
|
13
|
-
## Package imports
|
|
14
|
-
|
|
15
|
-
```diff
|
|
16
|
-
- import { resolveRecipe } from "@introspection-ai/pi-recipes/recipe";
|
|
17
|
-
+ import { resolveRecipe } from "@introspection-ai/recipes/recipe";
|
|
18
|
-
|
|
19
|
-
- import { createRecipeSession } from "@introspection-ai/pi-recipes/session";
|
|
20
|
-
+ import { createRecipeSession } from "@introspection-ai/recipes/session";
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
The same replacement applies to `/run`, `/pi`, `/interactions`, and
|
|
24
|
-
`/test-utils`. The former `/tracing` entrypoint is removed: pass a host-owned
|
|
25
|
-
tracer through `createRecipeSession({ otel })` instead.
|
|
26
|
-
|
|
27
|
-
## Pi extension
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
pi remove npm:@introspection-ai/pi-recipes
|
|
31
|
-
pi install npm:@introspection-ai/recipes
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The Recipe extension factory is now `createRecipesExtension`.
|
|
35
|
-
`createPiRecipesExtension` remains as a deprecated source-compatible alias.
|
|
36
|
-
|
|
37
|
-
Recipe-owned extensions that still import
|
|
38
|
-
`@introspection-ai/pi-recipes/interactions` are aliased to the current runtime
|
|
39
|
-
while they migrate.
|
|
40
|
-
|
|
41
|
-
## CLI
|
|
42
|
-
|
|
43
|
-
The standalone `recipes` executable has been retired. Use:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
introspection init
|
|
47
|
-
introspection check
|
|
48
|
-
introspection local
|
|
49
|
-
introspection dev
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Use ordinary Git and filesystem operations to clone, fork, copy, and publish
|
|
53
|
-
Recipe source.
|
|
54
|
-
|
|
55
|
-
## Hosting
|
|
56
|
-
|
|
57
|
-
`serveRecipe` and `@introspection-ai/recipes/serve` are not part of the new
|
|
58
|
-
package. Hosts integrate at `createRecipeSession`; HTTP protocols, persistence,
|
|
59
|
-
auth, and deployment adapters belong to the host.
|
|
60
|
-
|
|
61
|
-
`runRecipe` remains as the small one-turn convenience above the session API.
|
|
62
|
-
|
|
63
|
-
## Validation
|
|
64
|
-
|
|
65
|
-
The root npm package no longer downloads a platform-specific
|
|
66
|
-
`recipe-check` executable. Validation remains available through:
|
|
67
|
-
|
|
68
|
-
- `introspection check`;
|
|
69
|
-
- the `pi-recipe-check` Rust crate and binary;
|
|
70
|
-
- the `pi-recipe-check` Python package.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Python bindings release
|
|
2
|
-
|
|
3
|
-
The `pi-recipe-check` Rust crate and Python distribution are two artifacts of
|
|
4
|
-
one validator product and always use the same version. The binding's Cargo
|
|
5
|
-
package and dependency on the core must both match the core crate version.
|
|
6
|
-
`scripts/check-recipe-check-versions.mjs` enforces this invariant in CI.
|
|
7
|
-
|
|
8
|
-
Release Please owns both versions, changelogs, component tags, and GitHub
|
|
9
|
-
releases. Its `linked-versions` plugin advances both components to the same
|
|
10
|
-
version whenever either has a releasable change. The `cargo-workspace` plugin
|
|
11
|
-
keeps the local dependency current, but leaves candidate merging to
|
|
12
|
-
`linked-versions`. A Python-only fix therefore creates a patch release for
|
|
13
|
-
both artifacts, and a core release always includes a matching Python release.
|
|
14
|
-
Routine releases must not bump either Cargo version manually.
|
|
15
|
-
|
|
16
|
-
When Release Please creates a Python binding release, the release workflow:
|
|
17
|
-
|
|
18
|
-
1. Builds `abi3` wheels compatible with CPython 3.10 and newer for Linux
|
|
19
|
-
x86-64 and ARM64, macOS Apple Silicon and Intel, and Windows x86-64.
|
|
20
|
-
2. Builds a source distribution containing the local Rust workspace
|
|
21
|
-
dependency.
|
|
22
|
-
3. Waits for the matching `pi-recipe-check` crate publication to succeed.
|
|
23
|
-
4. Publishes all Python artifacts to PyPI through trusted publishing.
|
|
24
|
-
|
|
25
|
-
## One-time PyPI setup
|
|
26
|
-
|
|
27
|
-
Before the first release, create a pending trusted publisher for the unclaimed
|
|
28
|
-
`pi-recipe-check` project on PyPI with:
|
|
29
|
-
|
|
30
|
-
- Owner: `introspection-org`
|
|
31
|
-
- Repository: `pi-recipes`
|
|
32
|
-
- Workflow: `release-please.yml`
|
|
33
|
-
- Environment: `publish`
|
|
34
|
-
|
|
35
|
-
The GitHub `publish` environment should retain its existing deployment
|
|
36
|
-
protection. No long-lived PyPI API token is required.
|
|
37
|
-
|
|
38
|
-
Local release artifact checks use the locked development environment and the
|
|
39
|
-
same pinned maturin version as CI:
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
uv sync --project bindings/python --locked
|
|
43
|
-
uv run --project bindings/python --locked maturin build --locked --release --out dist \
|
|
44
|
-
--manifest-path bindings/python/Cargo.toml
|
|
45
|
-
uv run --project bindings/python --locked maturin sdist --out dist \
|
|
46
|
-
--manifest-path bindings/python/Cargo.toml
|
|
47
|
-
```
|
package/docs/recipe-evals.md
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Recipe eval declarations
|
|
2
|
-
|
|
3
|
-
A Recipe may pin offline evaluation suites without owning the evaluation
|
|
4
|
-
runner. The declaration makes quality inputs portable and reproducible; a host
|
|
5
|
-
or external tool decides when and where to execute them.
|
|
6
|
-
|
|
7
|
-
## Registry suite
|
|
8
|
-
|
|
9
|
-
```json
|
|
10
|
-
{
|
|
11
|
-
"pi": {
|
|
12
|
-
"evals": {
|
|
13
|
-
"suites": [
|
|
14
|
-
{
|
|
15
|
-
"name": "smoke",
|
|
16
|
-
"type": "registry",
|
|
17
|
-
"dataset": "acme/coding-smoke",
|
|
18
|
-
"version": "1.2.0"
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Registry suites MUST pin an exact dataset version. Mutable aliases such as
|
|
27
|
-
`latest` are invalid.
|
|
28
|
-
|
|
29
|
-
## Git suite
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"pi": {
|
|
34
|
-
"evals": {
|
|
35
|
-
"suites": [
|
|
36
|
-
{
|
|
37
|
-
"name": "terminal",
|
|
38
|
-
"type": "git",
|
|
39
|
-
"repo": "https://github.com/acme/agent-evals.git",
|
|
40
|
-
"rev": "4f7c2b0d6d8a...",
|
|
41
|
-
"dataset": "terminal"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Git suites SHOULD pin a commit SHA. The dataset path MUST stay inside the
|
|
50
|
-
checkout.
|
|
51
|
-
|
|
52
|
-
## Validation
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
introspection check
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
The validator checks declaration shape, unique suite names, immutable pins,
|
|
59
|
-
safe paths, and supported suite types without cloning or running the suite.
|
|
60
|
-
|
|
61
|
-
## Runtime boundary
|
|
62
|
-
|
|
63
|
-
Recipe sessions do not load or execute eval suites. The declaration belongs to
|
|
64
|
-
the portable artifact because it identifies the authored evidence associated
|
|
65
|
-
with that agent. Harbor, CI, Introspection, or another evaluation system may
|
|
66
|
-
adapt that declaration into its own execution model.
|
|
67
|
-
|
|
68
|
-
The selected Recipe agent remains the source of truth for model and behavior.
|
|
69
|
-
An eval runner MUST make any override explicit rather than silently changing
|
|
70
|
-
the agent under test.
|