mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Nested tool calls: ToolExecutionApi.executeTool() runs another tool as its own pi.tool task owned by the caller, keyed for replay-safe reattachment. Results for programs live in the caller's NestedResultDoc until it settles; pi.live.nestedTools shows each call with the arguments it runs with and a summary. TaskOptions.abandonOnRestart aborts work its creator awaited only in memory before it runs again after a restart. Structured output: structuredOutputSchema and structuredOutput, validated; a tool without a schema gives programs its bounded output (one text as a string, one image as itself, else the list). ToolExecutionResult.content is now output. callers and modelTools decide who may call a tool. Storage errors: any error a Storage method throws fails the Session, which closes itself; later calls and waits reject with SessionFailed, watches end with session_failed, and Session.closed settles. Nothing retries in the Harness. StorageRejected is removed; StorageRequestError marks invalid reads that fail only their call. Listener and onReport errors are contained and reported. Also updates scripts/issues/triage.ts and the vacation experiment for the content -> output rename.
120 lines
3.6 KiB
JSON
120 lines
3.6 KiB
JSON
{
|
|
"name": "@earendil-works/pi-durable",
|
|
"version": "1.1.0",
|
|
"description": "Durable conversation, task, and document runtime for Pi",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"source": "./src/index.ts",
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./env": {
|
|
"source": "./src/env/index.ts",
|
|
"types": "./dist/env/index.d.ts",
|
|
"import": "./dist/env/index.js",
|
|
"default": "./dist/env/index.js"
|
|
},
|
|
"./env/node": {
|
|
"source": "./src/env/node.ts",
|
|
"types": "./dist/env/node.d.ts",
|
|
"import": "./dist/env/node.js",
|
|
"default": "./dist/env/node.js"
|
|
},
|
|
"./tools": {
|
|
"source": "./src/tools/index.ts",
|
|
"types": "./dist/tools/index.d.ts",
|
|
"import": "./dist/tools/index.js",
|
|
"default": "./dist/tools/index.js"
|
|
},
|
|
"./storage/memory": {
|
|
"source": "./src/storage/memory.ts",
|
|
"types": "./dist/storage/memory.d.ts",
|
|
"import": "./dist/storage/memory.js",
|
|
"default": "./dist/storage/memory.js"
|
|
},
|
|
"./storage/jsonl": {
|
|
"source": "./src/storage/jsonl/index.ts",
|
|
"types": "./dist/storage/jsonl/index.d.ts",
|
|
"import": "./dist/storage/jsonl/index.js",
|
|
"default": "./dist/storage/jsonl/index.js"
|
|
},
|
|
"./storage/jsonl/node": {
|
|
"source": "./src/storage/jsonl/node.ts",
|
|
"types": "./dist/storage/jsonl/node.d.ts",
|
|
"import": "./dist/storage/jsonl/node.js",
|
|
"default": "./dist/storage/jsonl/node.js"
|
|
},
|
|
"./storage/sqlite": {
|
|
"source": "./src/storage/sqlite/index.ts",
|
|
"types": "./dist/storage/sqlite/index.d.ts",
|
|
"import": "./dist/storage/sqlite/index.js",
|
|
"default": "./dist/storage/sqlite/index.js"
|
|
},
|
|
"./storage/sqlite/cloudflare": {
|
|
"source": "./src/storage/sqlite/cloudflare.ts",
|
|
"types": "./dist/storage/sqlite/cloudflare.d.ts",
|
|
"import": "./dist/storage/sqlite/cloudflare.js",
|
|
"default": "./dist/storage/sqlite/cloudflare.js"
|
|
},
|
|
"./storage/sqlite/node": {
|
|
"source": "./src/storage/sqlite/node.ts",
|
|
"types": "./dist/storage/sqlite/node.d.ts",
|
|
"import": "./dist/storage/sqlite/node.js",
|
|
"default": "./dist/storage/sqlite/node.js"
|
|
},
|
|
"./testing": {
|
|
"source": "./src/testing/index.ts",
|
|
"types": "./dist/testing/index.d.ts",
|
|
"import": "./dist/testing/index.js",
|
|
"default": "./dist/testing/index.js"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"sideEffects": false,
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"CHANGELOG.md"
|
|
],
|
|
"scripts": {
|
|
"clean": "shx rm -rf dist",
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"test": "vitest --run",
|
|
"bench:storage": "vitest bench --config vitest.benchmark.config.ts",
|
|
"bench:storage:memory": "node --conditions=source --experimental-strip-types test/storage-memory.ts",
|
|
"bench:tool-output": "node --conditions=source --experimental-strip-types --expose-gc test/tool-output-bench.ts",
|
|
"bench:nested-tools": "node --conditions=source --experimental-strip-types --expose-gc test/nested-tools-bench.ts",
|
|
"bench:nested-images": "node --conditions=source --experimental-strip-types --expose-gc test/nested-images-bench.ts",
|
|
"prepublishOnly": "npm run clean && npm run build"
|
|
},
|
|
"keywords": [
|
|
"durable-execution",
|
|
"agents",
|
|
"conversations",
|
|
"tasks"
|
|
],
|
|
"author": "Earendil Works",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/earendil-works/pi.git",
|
|
"directory": "packages/durable"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.19.0"
|
|
},
|
|
"dependencies": {
|
|
"@earendil-works/chord": "^1.1.0",
|
|
"@earendil-works/pi-ai": "^1.1.0",
|
|
"diff": "8.0.4",
|
|
"typebox": "1.3.27"
|
|
},
|
|
"devDependencies": {
|
|
"shx": "0.3.4",
|
|
"vitest": "4.1.11"
|
|
}
|
|
}
|