mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
The scheduler kept every conversation edge it saw and, for conversation owners, chain loads, and owners of known tasks, the ended tasks above them, for the life of the process. Now an owner edge or an ended task's ownership is kept only while something is listed below it in #below: only the chains above live work are known, whole. Unneeded nodes are queued and swept at the end of each publication, or by a sweep job on the Session line after operations that publish nothing (rejected commits, reads), never during an operation, so a commit that creates work below a chain its own callback loaded keeps it. Later work in an old conversation loads its chain from storage again. Removes #conversationOwners, #pinned, #knownChildren, and #forget. A queued input triggers the withdrawal scan only while some task has cancellation intent, and chains are loaded only for queued inputs. 10,000 ended subagent cycles under a live parent: 10,000 settled tasks and 10,001 edges before, 0 and 1 now (bench:scheduler-memory); a later message into an old subagent conversation reads 7 records instead of 5.
141 lines
4.4 KiB
JSON
141 lines
4.4 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"
|
|
},
|
|
"./images": {
|
|
"source": "./src/images/index.ts",
|
|
"types": "./dist/images/index.d.ts",
|
|
"import": "./dist/images/index.js",
|
|
"default": "./dist/images/index.js"
|
|
},
|
|
"./images/node": {
|
|
"source": "./src/images/node.ts",
|
|
"types": "./dist/images/node.d.ts",
|
|
"import": "./dist/images/node.js",
|
|
"default": "./dist/images/node.js"
|
|
},
|
|
"./images/cloudflare": {
|
|
"source": "./src/images/cloudflare.ts",
|
|
"types": "./dist/images/cloudflare.d.ts",
|
|
"import": "./dist/images/cloudflare.js",
|
|
"default": "./dist/images/cloudflare.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",
|
|
"bench:scheduler-fanout": "node --conditions=source --experimental-strip-types test/scheduler-fanout-bench.ts",
|
|
"bench:scheduler-memory": "node --conditions=source --experimental-strip-types --expose-gc test/scheduler-memory-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",
|
|
"@silvia-odwyer/photon": "0.3.3",
|
|
"diff": "8.0.4",
|
|
"typebox": "1.3.27"
|
|
},
|
|
"devDependencies": {
|
|
"shx": "0.3.4",
|
|
"vitest": "4.1.11"
|
|
}
|
|
}
|