fix(deps): use host-provided pi core packages

This commit is contained in:
Patrick Wozniak
2026-08-04 02:13:06 +02:00
parent b151aaa9fe
commit 1579bfd4be
4 changed files with 356 additions and 308 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## Unreleased
- Use the host-provided `pi-ai` and `pi-coding-agent` core packages instead of installing a private pinned `pi-ai` runtime copy.
## 0.4.4 - 2026-08-03
- Fix cached input tokens being counted twice.
+345 -303
View File
File diff suppressed because it is too large Load Diff
+6 -4
View File
@@ -49,18 +49,20 @@
]
},
"devDependencies": {
"@earendil-works/pi-ai": "*",
"@types/node": "25.6.0",
"prettier": "^3.5.0",
"tsx": "4.22.4",
"typescript": "6.0.3"
},
"dependencies": {
"@earendil-works/pi-ai": "0.75.5"
},
"peerDependencies": {
"@earendil-works/pi-coding-agent": "^0.75.5"
"@earendil-works/pi-ai": "*",
"@earendil-works/pi-coding-agent": "*"
},
"peerDependenciesMeta": {
"@earendil-works/pi-ai": {
"optional": true
},
"@earendil-works/pi-coding-agent": {
"optional": true
}
+1 -1
View File
@@ -13,7 +13,7 @@ export function calculateCommandCodeCost(model: ModelLike, usage: Usage): void {
usage.cost.input = (model.cost.input / 1_000_000) * usage.input
usage.cost.output = (model.cost.output / 1_000_000) * usage.output
usage.cost.cacheRead = (model.cost.cacheRead / 1_000_000) * usage.cacheRead
usage.cost.cacheWrite = (model.cost.cacheWrite / 1_000_000) * usage.cacheWrite
usage.cost.cacheWrite = (model.cost.cacheWrite * usage.cacheWrite) / 1_000_000
usage.cost.total =
usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite
}