9e7582aa03
This PR: - Adds retainedTail to compaction entries in the new agent harness so we don't have to walk up the tree for the 2000 tokens before compaction, - Changes getPathToRoot to getPathToRootOrCompaction to only load until last compaction, as unnecessary to access all nodes where it is called, - Adds a SQLite storage backend, in a separate packages/session-backend-sqlite, with a migration system and schemas as per on-site discussions: sessions to match session header messages (except for metadata, which I couldn't understand what it's used for or where it gets written, so I omitted it), session_entries for shared entry types as columns plus payload as a json for what remains, session_sequences to represent the append-only, serialized nature of the jsonl files, branch_entries to attribute nodes to branches (relationship one-to-many), and session_materialized with the session info (see /session in TUI) to act as a "cache" or quick-access for costs, message count, token info, labels, session name, and model-thinking-level config (e.g. for fast resume). - This is compatible with the new agent harness Session abstraction.
72 lines
3.9 KiB
JSON
72 lines
3.9 KiB
JSON
{
|
|
"name": "pi-monorepo",
|
|
"private": true,
|
|
"type": "module",
|
|
"workspaces": [
|
|
"packages/*",
|
|
"packages/storage/*",
|
|
"packages/coding-agent/examples/extensions/with-deps",
|
|
"packages/coding-agent/examples/extensions/custom-provider-anthropic",
|
|
"packages/coding-agent/examples/extensions/custom-provider-gitlab-duo",
|
|
"packages/coding-agent/examples/extensions/sandbox",
|
|
"packages/coding-agent/examples/extensions/gondolin"
|
|
],
|
|
"scripts": {
|
|
"clean": "npm run clean --workspaces",
|
|
"build": "cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../storage/sqlite-node && npm run build && cd ../../coding-agent && npm run build && cd ../orchestrator && npm run build",
|
|
"build:offline": "cd packages/tui && npm run build && cd ../ai && npm run build:offline && cd ../agent && npm run build && cd ../storage/sqlite-node && npm run build && cd ../../coding-agent && npm run build && cd ../orchestrator && npm run build",
|
|
"check": "biome check --write --error-on-warnings . && npm run check:pinned-deps && npm run check:ts-imports && npm run check:shrinkwrap && npm run check:install-lock:coding-agent && tsgo --noEmit && npm run check:browser-smoke",
|
|
"check:browser-smoke": "node scripts/check-browser-smoke.mjs",
|
|
"check:pinned-deps": "node scripts/check-pinned-deps.mjs",
|
|
"check:shrinkwrap": "node scripts/generate-coding-agent-shrinkwrap.mjs --check",
|
|
"check:install-lock:coding-agent": "node scripts/generate-coding-agent-install-lock.mjs --check",
|
|
"check:ts-imports": "node scripts/check-ts-relative-imports.mjs",
|
|
"generate:models": "npm --prefix packages/ai run generate-models && npm --prefix packages/ai run generate-image-models",
|
|
"hydrate:model-data": "npm --prefix packages/ai run hydrate-model-data",
|
|
"check:model-data": "npm --prefix packages/ai run check:model-data",
|
|
"generate:model-catalog": "npm --prefix packages/ai run generate-model-catalog",
|
|
"diff:model-catalog": "node scripts/diff-model-catalog.mjs",
|
|
"check:model-catalog": "node scripts/publish-model-catalog.mjs --input .artifacts/model-catalog --dry-run",
|
|
"profile:tui": "node scripts/profile-coding-agent-node.mjs --mode tui",
|
|
"profile:rpc": "node scripts/profile-coding-agent-node.mjs --mode rpc",
|
|
"test": "npm run test --workspaces --if-present",
|
|
"version:patch": "npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts",
|
|
"version:minor": "npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts",
|
|
"version:major": "npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts",
|
|
"version:set": "npm version -ws",
|
|
"prepublishOnly": "npm run clean && npm run build && npm run check",
|
|
"publish": "npm run prepublishOnly && node scripts/publish.mjs",
|
|
"publish:dry": "npm run prepublishOnly && node scripts/publish.mjs --dry-run",
|
|
"release:local": "node scripts/local-release.mjs",
|
|
"shrinkwrap:coding-agent": "node scripts/generate-coding-agent-shrinkwrap.mjs",
|
|
"install-lock:coding-agent": "node scripts/generate-coding-agent-install-lock.mjs",
|
|
"release:patch": "node scripts/release.mjs patch",
|
|
"release:minor": "node scripts/release.mjs minor",
|
|
"release:major": "node scripts/release.mjs major",
|
|
"release:fix-links": "node scripts/release-notes.mjs fix-github-releases",
|
|
"prepare": "husky"
|
|
},
|
|
"devDependencies": {
|
|
"@anthropic-ai/sandbox-runtime": "0.0.26",
|
|
"@biomejs/biome": "2.3.5",
|
|
"@types/node": "22.19.19",
|
|
"@typescript/native-preview": "7.0.0-dev.20260120.1",
|
|
"esbuild": "0.28.1",
|
|
"husky": "9.1.7",
|
|
"jiti": "2.7.0",
|
|
"shx": "0.4.0",
|
|
"tsx": "4.22.1",
|
|
"typescript": "5.9.3"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.19.0"
|
|
},
|
|
"version": "0.0.3",
|
|
"overrides": {
|
|
"rimraf": "6.1.2",
|
|
"gaxios": {
|
|
"rimraf": "6.1.2"
|
|
}
|
|
}
|
|
}
|