@hank-warren/pi-auto-permissions 0.6.0 → 0.7.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 ADDED
@@ -0,0 +1,38 @@
1
+ # @hank-warren/pi-auto-permissions
2
+
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ad12ad0: Rename the eval-logging prompt's block option to "Block — asking was appropriate".
8
+
9
+ Label clarity only — the schema is unchanged (`userChoice: "block"`, `expectedDecision: "ask_user"`). A block always affirms that asking was right: the guardian has no reject verdict (its non-approve outcomes are `ask_user` and `revise`), so the only true rejection in the system is the user's at this prompt. Plain "Block" from the logging-disabled prompt still classifies identically, including for override evidence.
10
+
11
+ ## 0.6.1
12
+
13
+ ### Patch Changes
14
+
15
+ - cf12677: ship CHANGELOG.md in the published tarball
16
+ - Updated dependencies [cf12677]
17
+ - @hank-warren/pi-permission-selector@1.0.1
18
+
19
+ ## 0.6.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 500fe67: Remove the `ExtensionSelectorComponent` monkey patch; compose `OptionSelector` explicitly (spec §9.4).
24
+
25
+ `pi-permission-selector` is now a **pure library**: it no longer registers an extension, patches nothing, and standalone installs do nothing — the reason for the major bump. `selector-patch.ts` and `index.ts` are deleted; `keys.ts` and `selector.ts` remain the frozen cross-package surface. Dialogs this repo does not own (pi's model/theme/session pickers, third-party extensions) revert to stock arrows+Enter, an accepted trade-off (spec §9.3): nothing here breaks when a pi upgrade changes selector internals.
26
+
27
+ `pi-auto-permissions` renders both of its prompts — the guardian approval prompt and the `request_override` prompt — through `ctx.ui.custom()` with the shared `OptionSelector` from `@hank-warren/pi-permission-selector` (a new plain dependency), instead of `ctx.ui.select` plus the global patch. Behavior is preserved: numbered options with `1`–`9` hotkeys, Tab-to-comment on the approval prompt (the note is still delivered as a steering user message, now by pi-auto-permissions itself), exact legacy option strings for `classifyPromptChoice`, and Herdr blocked-state bracketing. Cancellation semantics match `ctx.ui.select`: Esc, abort of the prompt signal, and a host that cannot render custom UI all resolve `undefined`, which every caller treats as deny/cancel — never allow.
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [500fe67]
32
+ - @hank-warren/pi-permission-selector@1.0.0
33
+
34
+ ## 0.5.1
35
+
36
+ ### Patch Changes
37
+
38
+ - 67abcf5: document the optional `HERDR_ENV` herdr pane blocked indicator
package/README.md CHANGED
@@ -201,7 +201,7 @@ The path defaults to `review-evals.jsonl` beside the Auto Permissions config and
201
201
  When logging is enabled, prompted reviews offer three choices:
202
202
 
203
203
  - **Allow — asking was unnecessary** executes the command and records `userChoice: "allow_unnecessary"` with `expectedDecision: "approve"`.
204
- - **Block** remains the second choice, blocks the command, and records `userChoice: "block"` with `expectedDecision: "ask_user"`.
204
+ - **Block — asking was appropriate** remains the second choice, blocks the command, and records `userChoice: "block"` with `expectedDecision: "ask_user"`. (A block always affirms the prompt: the guardian has no reject verdict — its only non-approve outcomes are asking you or bouncing the command back to the agent as `revise` — so the only true rejection in the system is yours at this prompt.)
205
205
  - **Allow — asking was appropriate** executes the command and records `userChoice: "allow_appropriate"` with `expectedDecision: "ask_user"`.
206
206
 
207
207
  When logging is disabled, the prompt retains the normal **Allow** and **Block** choices. Prompts from Pi or other extensions are unchanged.
package/evaluation-log.ts CHANGED
@@ -5,7 +5,7 @@ import type { PermissionDecision, ReviewEvidenceRecord } from "./review.js";
5
5
  export const PROMPT_FEEDBACK_OPTIONS = {
6
6
  allowUnnecessary: "Allow — asking was unnecessary",
7
7
  allowAppropriate: "Allow — asking was appropriate",
8
- block: "Block",
8
+ block: "Block — asking was appropriate",
9
9
  } as const;
10
10
 
11
11
  export type PromptEvaluationUserChoice = "allow_unnecessary" | "allow_appropriate" | "block";
@@ -47,6 +47,10 @@ export interface PromptEvaluationRecord {
47
47
 
48
48
  export function classifyPromptChoice(choice: string | undefined): PromptChoiceClassification | undefined {
49
49
  if (choice === "Allow") return { allowsExecution: true };
50
+ // Plain "Block" is still live: the logging-disabled prompt offers
51
+ // ["Allow", "Block"]. It carries the same block semantics as the labeled
52
+ // variant so override evidence works in both prompt modes.
53
+ if (choice === "Block") return { allowsExecution: false, userChoice: "block" };
50
54
  if (choice === PROMPT_FEEDBACK_OPTIONS.allowUnnecessary) {
51
55
  return { allowsExecution: true, userChoice: "allow_unnecessary" };
52
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hank-warren/pi-auto-permissions",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Fork of @ogulcancelik/pi-auto-permissions with dialog-answer user evidence: context-aware Bash permissions for Pi with automated guardian review.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -49,10 +49,11 @@
49
49
  "usage-log.ts",
50
50
  "widget-status.ts",
51
51
  "README.md",
52
- "LICENSE"
52
+ "LICENSE",
53
+ "CHANGELOG.md"
53
54
  ],
54
55
  "dependencies": {
55
- "@hank-warren/pi-permission-selector": "^1.0.0"
56
+ "@hank-warren/pi-permission-selector": "^1.0.1"
56
57
  },
57
58
  "peerDependencies": {
58
59
  "@earendil-works/pi-ai": "*",