@zeldrisho/pi-gate 0.6.0 → 0.6.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 +8 -1
- package/LICENSE +1 -1
- package/README.md +7 -2
- package/package.json +6 -6
- package/src/index.ts +7 -14
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.1] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Stop notifying at session start when operation rules load successfully.
|
|
15
|
+
|
|
10
16
|
## [0.6.0] - 2026-10-01
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -76,7 +82,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
76
82
|
- support `prompt`, `block`, and `allow` actions, with longest-pattern-wins resolution
|
|
77
83
|
- block rather than auto-approve in non-UI modes
|
|
78
84
|
|
|
79
|
-
[Unreleased]: https://github.com/zeldrisho/pi-packages/compare/pi-gate-v0.6.
|
|
85
|
+
[Unreleased]: https://github.com/zeldrisho/pi-packages/compare/pi-gate-v0.6.1...HEAD
|
|
86
|
+
[0.6.1]: https://github.com/zeldrisho/pi-packages/compare/pi-gate-v0.6.0...pi-gate-v0.6.1
|
|
80
87
|
[0.6.0]: https://github.com/zeldrisho/pi-packages/compare/pi-gate-v0.5.0...pi-gate-v0.6.0
|
|
81
88
|
[0.5.0]: https://github.com/zeldrisho/pi-packages/compare/pi-gate-v0.4.1...pi-gate-v0.5.0
|
|
82
89
|
[0.4.1]: https://github.com/zeldrisho/pi-packages/compare/pi-gate-v0.4.0...pi-gate-v0.4.1
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -6,10 +6,13 @@ Pi extension that blocks or confirms `bash` tool calls and protects its configur
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
pi install npm:@zeldrisho/pi-gate
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
# Project:
|
|
10
11
|
pi install -l npm:@zeldrisho/pi-gate
|
|
11
12
|
```
|
|
12
13
|
|
|
14
|
+
Use `pi config` to enable or disable this extension interactively. Run `pi list` to see configured packages and their install paths.
|
|
15
|
+
|
|
13
16
|
## Configure
|
|
14
17
|
|
|
15
18
|
The extension reads `~/.pi/agent/gate.json`, falling back to legacy `~/.pi/agent/pi-gate.json` only when `gate.json` is absent. Set `PI_CODING_AGENT_DIR` to use a different configuration directory. If both files exist, only `gate.json` is used—even if it is invalid. To migrate, rename `pi-gate.json` to `gate.json` and run `/reload`; existing files are never automatically renamed, merged, or overwritten.
|
|
@@ -51,7 +54,9 @@ When running in a Herdr-managed TUI pane, pi-gate can report an active approval
|
|
|
51
54
|
|
|
52
55
|
```bash
|
|
53
56
|
pi remove npm:@zeldrisho/pi-gate
|
|
54
|
-
|
|
57
|
+
|
|
58
|
+
# Project:
|
|
59
|
+
pi remove -l npm:@zeldrisho/pi-gate
|
|
55
60
|
```
|
|
56
61
|
|
|
57
62
|
## License
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeldrisho/pi-gate",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Pi extension that
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "Pi extension that gates bash commands and protects its configuration from tool edits",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"command-blocking",
|
|
7
7
|
"command-confirmation",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"url": "https://github.com/zeldrisho/pi-packages/issues"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"author": "
|
|
19
|
+
"author": "zeldrisho",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "https://github.com/zeldrisho/pi-packages.git",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@earendil-works/pi-coding-agent": "^
|
|
35
|
+
"@earendil-works/pi-coding-agent": "^1.3.0",
|
|
36
36
|
"typescript": "^7.0.2",
|
|
37
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
38
|
-
"vite-plus": "1.
|
|
37
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
|
|
38
|
+
"vite-plus": "1.3.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "*"
|
package/src/index.ts
CHANGED
|
@@ -115,26 +115,19 @@ export default function piGate(pi: ExtensionAPI): void {
|
|
|
115
115
|
const path = configPath();
|
|
116
116
|
const ruleCount = Object.keys(config.operations).length;
|
|
117
117
|
|
|
118
|
-
if (loadResult.status === "loaded") {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
);
|
|
124
|
-
} else {
|
|
125
|
-
ctx.ui.notify(
|
|
126
|
-
`pi-gate: ${ruleCount} operation rule${ruleCount === 1 ? "" : "s"} loaded from ${path}`,
|
|
127
|
-
"info",
|
|
128
|
-
);
|
|
129
|
-
}
|
|
118
|
+
if (loadResult.status === "loaded" && ruleCount === 0) {
|
|
119
|
+
ctx.ui.notify(
|
|
120
|
+
`pi-gate: ${path} is empty; no commands are gated. Add rules to the "operations" object to start gating.`,
|
|
121
|
+
"warning",
|
|
122
|
+
);
|
|
130
123
|
} else if (loadResult.status === "failed") {
|
|
131
124
|
ctx.ui.notify(
|
|
132
125
|
"pi-gate: configuration exists but could not be loaded; prompting for all commands until it is fixed.",
|
|
133
126
|
"warning",
|
|
134
127
|
);
|
|
135
|
-
} else {
|
|
128
|
+
} else if (loadResult.status === "missing") {
|
|
136
129
|
ctx.ui.notify(
|
|
137
|
-
`pi-gate: no configuration found at ${
|
|
130
|
+
`pi-gate: no configuration found at ${path}; all commands are allowed until it is created.`,
|
|
138
131
|
"warning",
|
|
139
132
|
);
|
|
140
133
|
}
|