@gotgenes/pi-permission-system 7.1.0 → 7.1.2
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 +19 -0
- package/package.json +1 -1
- package/src/extension-config.ts +1 -1
- package/src/handlers/gates/bash-path-extractor.ts +1 -1
- package/src/handlers/index.ts +2 -6
- package/src/permission-manager.ts +0 -3
- package/src/skill-prompt-sanitizer.ts +1 -3
- package/src/types.ts +2 -2
- package/src/wildcard-matcher.ts +1 -1
- package/src/handlers/gates/index.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [7.1.2](https://github.com/gotgenes/pi-packages/compare/pi-permission-system-v7.1.1...pi-permission-system-v7.1.2) (2026-05-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* resolve fallow dead-code warnings ([2113f6b](https://github.com/gotgenes/pi-packages/commit/2113f6bc49812ce32ac68d0e2dd88e0a60b4474a))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
* plan barrel discipline enforcement ([#155](https://github.com/gotgenes/pi-packages/issues/155)) ([58692cf](https://github.com/gotgenes/pi-packages/commit/58692cf98235ee5cc82e714943fb4238b78601c4))
|
|
19
|
+
|
|
20
|
+
## [7.1.1](https://github.com/gotgenes/pi-packages/compare/pi-permission-system-v7.1.0...pi-permission-system-v7.1.1) (2026-05-22)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
|
|
25
|
+
* **retro:** add retro notes for issue [#122](https://github.com/gotgenes/pi-packages/issues/122) ([d17f86d](https://github.com/gotgenes/pi-packages/commit/d17f86d2d0a3b33113a606cb32754d5ebbd3a215))
|
|
26
|
+
|
|
8
27
|
## [7.1.0](https://github.com/gotgenes/pi-packages/compare/pi-permission-system-v7.0.1...pi-permission-system-v7.1.0) (2026-05-22)
|
|
9
28
|
|
|
10
29
|
|
package/package.json
CHANGED
package/src/extension-config.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const DEFAULT_EXTENSION_CONFIG: PermissionSystemExtensionConfig = {
|
|
|
20
20
|
yoloMode: false,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
function resolveExtensionRoot(moduleUrl = import.meta.url): string {
|
|
24
24
|
return join(dirname(fileURLToPath(moduleUrl)), "..");
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -54,7 +54,7 @@ function getParser(): Promise<TSParser> {
|
|
|
54
54
|
* Reset the cached parser promise. Only used by tests to avoid
|
|
55
55
|
* cross-test pollution or to inject a mock parser.
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
function resetParserForTesting(): void {
|
|
58
58
|
parserPromise = null;
|
|
59
59
|
}
|
|
60
60
|
|
package/src/handlers/index.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export { AgentPrepHandler
|
|
1
|
+
export { AgentPrepHandler } from "./before-agent-start";
|
|
2
2
|
export { SessionLifecycleHandler } from "./lifecycle";
|
|
3
|
-
export {
|
|
4
|
-
extractSkillNameFromInput,
|
|
5
|
-
getEventInput,
|
|
6
|
-
PermissionGateHandler,
|
|
7
|
-
} from "./permission-gate-handler";
|
|
3
|
+
export { PermissionGateHandler } from "./permission-gate-handler";
|
|
@@ -296,8 +296,5 @@ function deriveSource(
|
|
|
296
296
|
return rule.layer === "default" ? "default" : "tool";
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
// Keep isPermissionState and toRecord available for convenience — they are
|
|
300
|
-
// used directly in some handler files that import from permission-manager.
|
|
301
|
-
export { isPermissionState, toRecord } from "./common";
|
|
302
299
|
// Re-export types that external modules import from this file.
|
|
303
300
|
export type { PolicyLoader, ResolvedPolicyPaths } from "./policy-loader";
|
|
@@ -92,9 +92,7 @@ function parseSkillEntries(sectionBody: string): ParsedSkillPromptEntry[] {
|
|
|
92
92
|
return entries;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
prompt: string,
|
|
97
|
-
): SkillPromptSection | null {
|
|
95
|
+
function parseSkillPromptSection(prompt: string): SkillPromptSection | null {
|
|
98
96
|
const start = prompt.indexOf(AVAILABLE_SKILLS_OPEN_TAG);
|
|
99
97
|
if (start === -1) {
|
|
100
98
|
return null;
|
package/src/types.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type FlatPermissionConfig = Record<
|
|
|
14
14
|
PermissionState | Record<string, PermissionState>
|
|
15
15
|
>;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
type BuiltInToolName =
|
|
18
18
|
| "bash"
|
|
19
19
|
| "read"
|
|
20
20
|
| "write"
|
|
@@ -23,7 +23,7 @@ export type BuiltInToolName =
|
|
|
23
23
|
| "find"
|
|
24
24
|
| "ls";
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
type SpecialPermissionName = "external_directory";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Per-scope permission config shape after loading and validation.
|
package/src/wildcard-matcher.ts
CHANGED
|
@@ -48,7 +48,7 @@ export function compileWildcardPatternEntries<TState>(
|
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
function compileWildcardPatterns<TState>(
|
|
52
52
|
patterns: Record<string, TState>,
|
|
53
53
|
): CompiledWildcardPattern<TState>[] {
|
|
54
54
|
return compileWildcardPatternEntries(Object.entries(patterns));
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { describeBashExternalDirectoryGate } from "./bash-external-directory";
|
|
2
|
-
export { describeBashPathGate } from "./bash-path";
|
|
3
|
-
export type {
|
|
4
|
-
GateBypass,
|
|
5
|
-
GateDescriptor,
|
|
6
|
-
GateResult,
|
|
7
|
-
GateRunnerDeps,
|
|
8
|
-
} from "./descriptor";
|
|
9
|
-
export { isGateBypass, isGateDescriptor } from "./descriptor";
|
|
10
|
-
export { describeExternalDirectoryGate } from "./external-directory";
|
|
11
|
-
export { deriveDecisionValue, deriveResolution } from "./helpers";
|
|
12
|
-
export { describePathGate } from "./path";
|
|
13
|
-
export { runGateCheck } from "./runner";
|
|
14
|
-
export { describeSkillReadGate } from "./skill-read";
|
|
15
|
-
export { describeToolGate } from "./tool";
|
|
16
|
-
export type { GateOutcome, ToolCallContext } from "./types";
|