@agenshield/interceptor 0.6.2 → 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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Seatbelt Profile Manager
3
+ *
4
+ * Generates macOS seatbelt (sandbox-exec) SBPL profiles from SandboxConfig,
5
+ * writes them to disk with content-hash naming for caching, and manages cleanup.
6
+ *
7
+ * Uses captured-original fs functions to avoid interception loops.
8
+ */
9
+ import type { SandboxConfig } from '@agenshield/ipc';
10
+ export declare class ProfileManager {
11
+ private profileDir;
12
+ private ensuredDir;
13
+ constructor(profileDir: string);
14
+ /**
15
+ * Get or create a profile file on disk. Returns the absolute path.
16
+ * Uses content-hash naming so identical configs reuse the same file.
17
+ */
18
+ getOrCreateProfile(content: string): string;
19
+ /**
20
+ * Generate an SBPL profile from a SandboxConfig.
21
+ */
22
+ generateProfile(sandbox: SandboxConfig): string;
23
+ /**
24
+ * Remove stale profile files older than maxAgeMs.
25
+ */
26
+ cleanup(maxAgeMs: number): void;
27
+ /**
28
+ * Escape a string for safe inclusion in SBPL
29
+ */
30
+ private escapeSbpl;
31
+ /**
32
+ * Ensure the profile directory exists
33
+ */
34
+ private ensureDir;
35
+ }
36
+ //# sourceMappingURL=profile-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-manager.d.ts","sourceRoot":"","sources":["../../src/seatbelt/profile-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAarD,qBAAa,cAAc;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;gBAEf,UAAU,EAAE,MAAM;IAI9B;;;OAGG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAc3C;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;IAgL/C;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAwB/B;;OAEG;IACH,OAAO,CAAC,UAAU;IAIlB;;OAEG;IACH,OAAO,CAAC,SAAS;CAgBlB"}