@erichll/pi-auto-review 0.18.3 → 0.19.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/CHANGELOG.md +16 -0
- package/package.json +6 -6
- package/src/review/provider.ts +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.0 - 2026-09-20
|
|
4
|
+
|
|
5
|
+
- Require Pi `^0.86.0` for both the development and peer dependency of
|
|
6
|
+
`@earendil-works/pi-ai` and `@earendil-works/pi-coding-agent`.
|
|
7
|
+
- Migrate the reviewer model call to Pi 0.86's normalized `TranscriptContext`:
|
|
8
|
+
a registered provider `streamSimple` (models.json or extension-registered
|
|
9
|
+
custom providers) now receives `normalizeContext(...)` so the reviewer system
|
|
10
|
+
prompt and tool declarations arrive as the transcript's leading system
|
|
11
|
+
message. Before this change such providers read the removed
|
|
12
|
+
`context.systemPrompt`/`context.tools` and silently reviewed with a fallback
|
|
13
|
+
system prompt and no tools.
|
|
14
|
+
- Read the normalized transcript in the authorizer integration tests
|
|
15
|
+
(`getCurrentSystemPrompt` plus the last user message) and assert the leading
|
|
16
|
+
system message, so the fake `streamSimple` observes the same shape the real
|
|
17
|
+
provider adapters receive.
|
|
18
|
+
|
|
3
19
|
## 0.18.3 - 2026-09-20
|
|
4
20
|
|
|
5
21
|
- Move the `@gotgenes/pi-permission-system` development dependency to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erichll/pi-auto-review",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Fail-closed, model-backed approval broker for Pi: deterministically hard-denies dangerous operations, reviews dangerous boundaries with a reviewer model, and issues one-shot expiring grants that OS sandbox adapters must consume before retrying.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"test": "node --disable-warning=ExperimentalWarning --experimental-transform-types --import ./test/register-external-ts.mjs --test test/*.test.ts"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@earendil-works/pi-ai": "^0.
|
|
51
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
50
|
+
"@earendil-works/pi-ai": "^0.86.0",
|
|
51
|
+
"@earendil-works/pi-coding-agent": "^0.86.0",
|
|
52
52
|
"@gotgenes/pi-permission-system": ">=30.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@earendil-works/pi-ai": "^0.
|
|
56
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
57
|
-
"@earendil-works/pi-server": "^0.
|
|
55
|
+
"@earendil-works/pi-ai": "^0.86.0",
|
|
56
|
+
"@earendil-works/pi-coding-agent": "^0.86.0",
|
|
57
|
+
"@earendil-works/pi-server": "^0.86.0",
|
|
58
58
|
"@gotgenes/pi-permission-system": "^33.0.1",
|
|
59
59
|
"@types/node": "^26.2.0",
|
|
60
60
|
"typescript": "^6.0.3"
|
package/src/review/provider.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
import { completeSimple } from "@earendil-works/pi-ai/compat";
|
|
3
|
+
import { completeSimple, normalizeContext } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import type { BoundaryRequest } from "../broker/index.ts";
|
|
5
5
|
import type { UserReviewUsage } from "../user-feedback.ts";
|
|
6
6
|
import type {
|
|
@@ -572,8 +572,17 @@ export async function modelCall(
|
|
|
572
572
|
metadata.retryAfterMs = parseRetryAfterMs(response.headers);
|
|
573
573
|
},
|
|
574
574
|
};
|
|
575
|
+
// 0.86 moved the provider-facing request to a normalized transcript: the
|
|
576
|
+
// system prompt and tool declarations now travel as the transcript's leading
|
|
577
|
+
// system message. Providers registered by extensions receive that shape, so
|
|
578
|
+
// normalize before calling a registered streamSimple. completeSimple still
|
|
579
|
+
// accepts a Context and normalizes internally.
|
|
575
580
|
return (runtime.streamSimple
|
|
576
|
-
? await runtime.streamSimple(
|
|
581
|
+
? await runtime.streamSimple(
|
|
582
|
+
runtime.model,
|
|
583
|
+
normalizeContext(context),
|
|
584
|
+
options,
|
|
585
|
+
).result()
|
|
577
586
|
: await completeSimple(runtime.model, context, options)) as CompletionMessage;
|
|
578
587
|
}
|
|
579
588
|
|