pi-landstrip 0.5.4 → 0.5.5
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/index.ts +10 -10
- package/package.json +2 -2
package/index.ts
CHANGED
|
@@ -73,14 +73,14 @@ interface LandstripPolicy {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
interface LandstripErrorResponse {
|
|
76
|
-
|
|
76
|
+
reason: 'Other' | 'LaunchFailed' | 'SetupFailed' | 'Usage';
|
|
77
77
|
file?: string;
|
|
78
78
|
program?: string;
|
|
79
79
|
type?: 'filesystem' | 'network' | 'platform' | 'launch' | 'encoding';
|
|
80
|
-
|
|
80
|
+
source: string;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const LANDSTRIP_VERSION = [0,
|
|
83
|
+
const LANDSTRIP_VERSION = [0, 11, 0] as const;
|
|
84
84
|
const SUPPORTED_PLATFORMS = new Set<NodeJS.Platform>(['linux', 'darwin', 'win32']);
|
|
85
85
|
|
|
86
86
|
const DEFAULT_CONFIG: SandboxConfig = {
|
|
@@ -418,13 +418,13 @@ function parseLandstripErrors(output: string): LandstripErrorResponse[] {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
if (
|
|
421
|
-
fields.
|
|
422
|
-
['
|
|
423
|
-
fields.
|
|
421
|
+
fields.reason &&
|
|
422
|
+
['Other', 'LaunchFailed', 'SetupFailed', 'Usage'].includes(fields.reason) &&
|
|
423
|
+
fields.source
|
|
424
424
|
) {
|
|
425
425
|
const error: LandstripErrorResponse = {
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
reason: fields.reason as LandstripErrorResponse['reason'],
|
|
427
|
+
source: fields.source,
|
|
428
428
|
};
|
|
429
429
|
|
|
430
430
|
if (fields.file) error.file = fields.file;
|
|
@@ -447,7 +447,7 @@ function parseLandstripErrors(output: string): LandstripErrorResponse[] {
|
|
|
447
447
|
function formatLandstripErrors(errors: LandstripErrorResponse[]): string {
|
|
448
448
|
return errors
|
|
449
449
|
.map((err) => {
|
|
450
|
-
const parts: string[] = [`landstrip: ${err.
|
|
450
|
+
const parts: string[] = [`landstrip: ${err.reason}`];
|
|
451
451
|
|
|
452
452
|
if (err.file) {
|
|
453
453
|
parts.push(` (${err.file})`);
|
|
@@ -458,7 +458,7 @@ function formatLandstripErrors(errors: LandstripErrorResponse[]): string {
|
|
|
458
458
|
if (err.type) {
|
|
459
459
|
parts.push(`:${err.type}`);
|
|
460
460
|
}
|
|
461
|
-
parts.push(`: ${err.
|
|
461
|
+
parts.push(`: ${err.source}`);
|
|
462
462
|
|
|
463
463
|
return parts.join('');
|
|
464
464
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-landstrip",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Landlock-based sandboxing for pi with interactive permission prompts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landstrip",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@earendil-works/pi-tui": "^0.78.0",
|
|
34
|
-
"@jarkkojs/landstrip": "^0.
|
|
34
|
+
"@jarkkojs/landstrip": "^0.11.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@earendil-works/pi-coding-agent": "^0.78.0",
|