@erichll/pi-auto-review 0.15.0 → 0.15.1
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 +3 -3
- package/src/policy-audit/index.ts +2 -0
- package/src/policy-audit/report.ts +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.1 - 2026-08-31
|
|
4
|
+
|
|
5
|
+
- Adapt the policy audit to `@gotgenes/pi-permission-system` v28.0.0. Ask
|
|
6
|
+
decisions made by a registered authorizer chain link — including
|
|
7
|
+
pi-auto-review's own model review — now broadcast `authorizer_allowed` /
|
|
8
|
+
`authorizer_denied` instead of `user_approved` / `user_denied`. The audit
|
|
9
|
+
whitelist records both new values verbatim instead of collapsing them into
|
|
10
|
+
`unknown`, and approval sources surface them under their own name.
|
|
11
|
+
- Keep suggestion evidence strictly human/session-based: `authorizer_allowed`
|
|
12
|
+
deliberately does not join `SUCCESS_RESOLUTIONS`, because counting the
|
|
13
|
+
extension's own machine review as evidence would create a feedback loop
|
|
14
|
+
(model review allows → evidence → suggested auto-allow rule → future review
|
|
15
|
+
bypassed). Authorizer-resolved rows still count as "reviewed" for the
|
|
16
|
+
display-only low-risk candidate list so those surfaces stay visible.
|
|
17
|
+
- Bump the `@gotgenes/pi-permission-system` peer range to `^28.0.0`.
|
|
18
|
+
|
|
3
19
|
## 0.15.0 - 2026-08-29
|
|
4
20
|
|
|
5
21
|
- Fix a deterministic reviewer-unavailable denial for large CJK tool inputs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erichll/pi-auto-review",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
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",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@earendil-works/pi-ai": "^0.84.4",
|
|
51
51
|
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
52
|
-
"@gotgenes/pi-permission-system": "^
|
|
52
|
+
"@gotgenes/pi-permission-system": "^28.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@earendil-works/pi-ai": "^0.84.4",
|
|
56
56
|
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
57
|
-
"@gotgenes/pi-permission-system": "
|
|
57
|
+
"@gotgenes/pi-permission-system": "28.0.0",
|
|
58
58
|
"@types/node": "^26.2.0",
|
|
59
59
|
"typescript": "^6.0.3"
|
|
60
60
|
}
|
|
@@ -42,6 +42,11 @@ export type PolicyAuditReportOptions = {
|
|
|
42
42
|
scope: "current" | "all"; days: number; top: number; minCount: number;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
// Suggestion evidence must stay strictly human/session-based. Since
|
|
46
|
+
// permission-system v28, decisions made by a registered authorizer chain link
|
|
47
|
+
// (including pi-auto-review's own model review) resolve to `authorizer_allowed`
|
|
48
|
+
// instead of `user_approved`. Counting those here would create a feedback loop:
|
|
49
|
+
// machine review allows → evidence → suggested auto-allow rule → review bypassed.
|
|
45
50
|
const SUCCESS_RESOLUTIONS = new Set([
|
|
46
51
|
"user_approved", "user_approved_for_session", "session_approved", "auto_approved",
|
|
47
52
|
]);
|
|
@@ -70,8 +75,15 @@ function rank(
|
|
|
70
75
|
.slice(0, top);
|
|
71
76
|
}
|
|
72
77
|
|
|
78
|
+
// "Reviewed" marks ask-path rows that some reviewer resolved — human clicks and,
|
|
79
|
+
// since permission-system v28, named authorizer links alike — so low-risk
|
|
80
|
+
// candidates stay visible even when only the machine authorizer decides them.
|
|
81
|
+
// Display-only: SUCCESS_RESOLUTIONS still gates suggestion evidence.
|
|
73
82
|
function reviewed(row: PolicyAuditAggregateRow): boolean {
|
|
74
|
-
return [
|
|
83
|
+
return [
|
|
84
|
+
"user_approved", "user_approved_for_session", "user_denied", "auto_approved",
|
|
85
|
+
"authorizer_allowed", "authorizer_denied",
|
|
86
|
+
].includes(row.resolution);
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
type CandidateGroup = {
|