@xynogen/pix-gate 0.1.15 → 0.1.16
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/package.json +3 -2
- package/src/lib.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-gate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Pi extension — permission gate for dangerous bash commands (confirm/block with TUI dialog)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@xynogen/pix-pretty": "^1.7.9",
|
|
46
|
-
"@xynogen/pix-data": "^0.
|
|
46
|
+
"@xynogen/pix-data": "^0.4.0",
|
|
47
|
+
"@xynogen/pix-runtime": "^0.2.0"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"@earendil-works/pi-coding-agent": "*",
|
package/src/lib.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Pure helpers for pix-gate — no Pi API deps, fully unit-testable.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { config } from "@xynogen/pix-runtime/config";
|
|
6
|
+
import { type GateRuleConfig, gateSection } from "@xynogen/pix-runtime/sections";
|
|
6
7
|
|
|
7
8
|
export type Severity = "critical" | "dangerous" | "risky";
|
|
8
9
|
|
|
@@ -130,7 +131,7 @@ export const DEFAULT_RULES: Rule[] = [
|
|
|
130
131
|
|
|
131
132
|
export function loadUserConfig(): UserConfig {
|
|
132
133
|
// Read from ~/.pi/agent/pix.json gate section
|
|
133
|
-
const pix =
|
|
134
|
+
const pix = config(gateSection);
|
|
134
135
|
return {
|
|
135
136
|
disableDefaults: pix.disableDefaults || undefined,
|
|
136
137
|
autoApprove: pix.autoApprove.length > 0 ? pix.autoApprove : undefined,
|