@erichll/pi-auto-review 0.16.0 → 0.18.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 +6 -5
- package/package.json +4 -4
- package/src/broker/overrides.ts +1 -0
- package/src/index.ts +55 -1944
- package/src/policy-audit/classifier.ts +1 -1
- package/src/policy-audit/index.ts +2 -1
- package/src/policy.ts +19 -8
- package/src/review/audit.ts +14 -0
- package/src/review/complete.ts +347 -0
- package/src/review/config.ts +366 -0
- package/src/review/consts.ts +22 -0
- package/src/review/guards.ts +66 -0
- package/src/review/index.ts +61 -0
- package/src/review/input.ts +439 -0
- package/src/review/prompts.ts +33 -0
- package/src/review/provider.ts +583 -0
- package/src/review/types.ts +207 -0
- package/src/user-feedback.ts +34 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.0 - 2026-09-11
|
|
4
|
+
|
|
5
|
+
- Coordinated release for `@erichll/pi-sandbox 0.18.0`.
|
|
6
|
+
- Dismiss the above-editor widget eight seconds after an allow or auto-confirm
|
|
7
|
+
so a successful check does not stay on screen until the next review. Denials,
|
|
8
|
+
deferrals, and local-confirmation waits still remain until the next check.
|
|
9
|
+
- Raise the `@gotgenes/pi-permission-system` peer floor to `>=30.0.0` and drop
|
|
10
|
+
the upper bound. 29.x is no longer claimed; 32.x does not change the public
|
|
11
|
+
authorizer API this package uses, and later majors are no longer excluded by
|
|
12
|
+
the range.
|
|
13
|
+
|
|
14
|
+
## 0.17.0 - 2026-09-05
|
|
15
|
+
|
|
16
|
+
- Coordinated release for `@erichll/pi-sandbox 0.17.0`; the broker API and
|
|
17
|
+
approval behavior are unchanged.
|
|
18
|
+
- Align the development pin of `@gotgenes/pi-permission-system` to the 31.1.x
|
|
19
|
+
runtime line and update the authorizer-integration test to the 31.1.1
|
|
20
|
+
internal source layout (the 31.1.1 refactor moved `path-normalizer.ts`).
|
|
21
|
+
- Split the 2,778-line `src/index.ts` into a `src/review/` module directory
|
|
22
|
+
(`types`, `consts`, `config`, `audit`, `prompts`, `guards`, `input`,
|
|
23
|
+
`provider`, `complete`) with an internal barrel, matching the existing
|
|
24
|
+
`broker/` and `policy-audit/` conventions; the public export surface of
|
|
25
|
+
`src/index.ts` is unchanged.
|
|
26
|
+
- Harden TypeScript checking: enable `noUncheckedIndexedAccess` and
|
|
27
|
+
`noImplicitOverride` across the workspace and fix all 47 newly surfaced
|
|
28
|
+
unguarded-index sites.
|
|
29
|
+
- Replace the full custom TypeScript test loader with native Node type
|
|
30
|
+
transformation (`--experimental-transform-types`); a scoped hook now only
|
|
31
|
+
handles the TypeScript sources shipped inside `node_modules`, which Node
|
|
32
|
+
refuses to type-strip.
|
|
33
|
+
|
|
3
34
|
## 0.16.0 - 2026-09-05
|
|
4
35
|
|
|
5
36
|
- Coordinated release for `@erichll/pi-sandbox 0.16.0`; the broker API and
|
package/README.md
CHANGED
|
@@ -31,8 +31,7 @@ that dependency is a hard prerequisite (see [Install and enable](#install-and-en
|
|
|
31
31
|
> **Prerequisite:** pi-auto-review is an authorizer inside
|
|
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
|
-
> extension. This release line supports permission-system
|
|
35
|
-
> latest 31.x release:
|
|
34
|
+
> extension. This release line supports permission-system 30.0.0 and later:
|
|
36
35
|
|
|
37
36
|
Node.js 22.13.0 or newer is required. Permission auditing uses Node's built-in
|
|
38
37
|
`node:sqlite`; it does not require a SQLite CLI, system SQLite library, or npm
|
|
@@ -178,9 +177,11 @@ Interactive sessions show the current permission check in a single widget
|
|
|
178
177
|
above the editor. Each check first shows its surface, compact target, and the
|
|
179
178
|
dynamically configured reviewer model, then replaces that content in place
|
|
180
179
|
with the outcome, target and rationale, model, token usage, duration, and any
|
|
181
|
-
extra call count. A new check replaces the previous result
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
extra call count. A new check replaces the previous result. Allowed and
|
|
181
|
+
auto-confirmed results dismiss after eight seconds so they do not occupy the
|
|
182
|
+
editor; denials, deferrals, and local-confirmation waits stay until the next
|
|
183
|
+
check, a session change, or shutdown. Concurrent older checks cannot overwrite
|
|
184
|
+
the most recently started one.
|
|
184
185
|
|
|
185
186
|
Every request still has its own model call, verdict, grant, local confirmation,
|
|
186
187
|
and audit record. No new review-result transcript entries are written. Existing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erichll/pi-auto-review",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
47
|
-
"test": "node --disable-warning=ExperimentalWarning --experimental-
|
|
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
50
|
"@earendil-works/pi-ai": "^0.85.0",
|
|
51
51
|
"@earendil-works/pi-coding-agent": "^0.85.0",
|
|
52
|
-
"@gotgenes/pi-permission-system": ">=
|
|
52
|
+
"@gotgenes/pi-permission-system": ">=30.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@earendil-works/pi-ai": "^0.85.0",
|
|
56
56
|
"@earendil-works/pi-coding-agent": "^0.85.0",
|
|
57
57
|
"@earendil-works/pi-server": "^0.85.0",
|
|
58
|
-
"@gotgenes/pi-permission-system": "31.
|
|
58
|
+
"@gotgenes/pi-permission-system": "31.1.1",
|
|
59
59
|
"@types/node": "^26.2.0",
|
|
60
60
|
"typescript": "^6.0.3"
|
|
61
61
|
}
|
package/src/broker/overrides.ts
CHANGED
|
@@ -145,6 +145,7 @@ export class RecentDenialStore {
|
|
|
145
145
|
);
|
|
146
146
|
if (index < 0) return;
|
|
147
147
|
const denial = this.#denials[index];
|
|
148
|
+
if (!denial) return;
|
|
148
149
|
const key = this.key(sessionId, denial.requestHash);
|
|
149
150
|
const pending = this.#breakGlassPending.get(key);
|
|
150
151
|
if (pending) {
|