@erichll/pi-auto-review 0.18.3 → 0.20.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 +31 -0
- package/README.md +1 -1
- package/package.json +7 -7
- package/src/review/provider.ts +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.20.0 - 2026-09-23
|
|
4
|
+
|
|
5
|
+
- Require Pi `^0.87.1` for the development and peer dependency of
|
|
6
|
+
`@earendil-works/pi-ai` and `@earendil-works/pi-coding-agent` (validated
|
|
7
|
+
against the published 0.87.1 packages; `compat.d.ts`, the type surface this
|
|
8
|
+
package builds on, is unchanged from 0.86.1).
|
|
9
|
+
- Validate against `@gotgenes/pi-permission-system` 33.0.8 (runtime peer stays
|
|
10
|
+
`>=30.0.0`); no rule-semantics change observed.
|
|
11
|
+
- Upgrade the development `typescript` baseline: 7.0.2 was evaluated and kept
|
|
12
|
+
on 6.0.3 because TS7 (the native Go compiler) removes the stable
|
|
13
|
+
`transpileModule`/`ModuleKind` JS API used by `test/external-ts-loader.mjs`
|
|
14
|
+
to transpile `pi-permission-system`'s published `.ts` sources.
|
|
15
|
+
- Sync `examples/pi-permission-system.config.example.json` with the live
|
|
16
|
+
policy (add `goal_complete`, `obs_recall`, `pencil_read_skill`).
|
|
17
|
+
|
|
18
|
+
## 0.19.0 - 2026-09-20
|
|
19
|
+
|
|
20
|
+
- Require Pi `^0.86.0` for both the development and peer dependency of
|
|
21
|
+
`@earendil-works/pi-ai` and `@earendil-works/pi-coding-agent`.
|
|
22
|
+
- Migrate the reviewer model call to Pi 0.86's normalized `TranscriptContext`:
|
|
23
|
+
a registered provider `streamSimple` (models.json or extension-registered
|
|
24
|
+
custom providers) now receives `normalizeContext(...)` so the reviewer system
|
|
25
|
+
prompt and tool declarations arrive as the transcript's leading system
|
|
26
|
+
message. Before this change such providers read the removed
|
|
27
|
+
`context.systemPrompt`/`context.tools` and silently reviewed with a fallback
|
|
28
|
+
system prompt and no tools.
|
|
29
|
+
- Read the normalized transcript in the authorizer integration tests
|
|
30
|
+
(`getCurrentSystemPrompt` plus the last user message) and assert the leading
|
|
31
|
+
system message, so the fake `streamSimple` observes the same shape the real
|
|
32
|
+
provider adapters receive.
|
|
33
|
+
|
|
3
34
|
## 0.18.3 - 2026-09-20
|
|
4
35
|
|
|
5
36
|
- Move the `@gotgenes/pi-permission-system` development dependency to
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ that dependency is a hard prerequisite (see [Install and enable](#install-and-en
|
|
|
32
32
|
> `@gotgenes/pi-permission-system`. Pi does not auto-install peer packages, so
|
|
33
33
|
> install the permission system separately (once per machine) before this
|
|
34
34
|
> extension. This release line supports permission-system 30.0.0 and later,
|
|
35
|
-
> validated through 33.0.
|
|
35
|
+
> validated through 33.0.8:
|
|
36
36
|
|
|
37
37
|
Node.js 22.13.0 or newer is required. Permission auditing uses Node's built-in
|
|
38
38
|
`node:sqlite`; it does not require a SQLite CLI, system SQLite library, or npm
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erichll/pi-auto-review",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.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,15 +47,15 @@
|
|
|
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.87.1",
|
|
51
|
+
"@earendil-works/pi-coding-agent": "^0.87.1",
|
|
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.
|
|
58
|
-
"@gotgenes/pi-permission-system": "^33.0.
|
|
55
|
+
"@earendil-works/pi-ai": "^0.87.1",
|
|
56
|
+
"@earendil-works/pi-coding-agent": "^0.87.1",
|
|
57
|
+
"@earendil-works/pi-server": "^0.87.1",
|
|
58
|
+
"@gotgenes/pi-permission-system": "^33.0.8",
|
|
59
59
|
"@types/node": "^26.2.0",
|
|
60
60
|
"typescript": "^6.0.3"
|
|
61
61
|
}
|
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
|
|