pi-landstrip 0.5.1 → 0.5.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/index.ts +12 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -356,6 +356,12 @@ function extractBlockedPath(output: string, cwd: string): string | null {
|
|
|
356
356
|
);
|
|
357
357
|
if (match) return normalizeBlockedPath(match[1], cwd);
|
|
358
358
|
|
|
359
|
+
// Landstrip structured error format with file field
|
|
360
|
+
const landstripErrors = parseLandstripErrors(output);
|
|
361
|
+
for (const error of landstripErrors) {
|
|
362
|
+
if (error.file) return normalizeBlockedPath(error.file, cwd);
|
|
363
|
+
}
|
|
364
|
+
|
|
359
365
|
return null;
|
|
360
366
|
}
|
|
361
367
|
|
|
@@ -1061,6 +1067,12 @@ export function createLandstripIntegration(
|
|
|
1061
1067
|
const choice = await promptWriteBlock(ctx, blockedPath);
|
|
1062
1068
|
if (choice !== 'abort') await applyWriteChoice(choice, blockedPath, cwd);
|
|
1063
1069
|
}
|
|
1070
|
+
} else if (!blockedPath && ctx.hasUI) {
|
|
1071
|
+
const landstripErrors = parseLandstripErrors(stderrAcc);
|
|
1072
|
+
if (landstripErrors.length > 0) {
|
|
1073
|
+
const formatted = formatLandstripErrors(landstripErrors);
|
|
1074
|
+
ctx.ui.notify(`Sandbox blocked an operation: ${formatted}`, 'warning');
|
|
1075
|
+
}
|
|
1064
1076
|
}
|
|
1065
1077
|
|
|
1066
1078
|
resolvePromise({ exitCode: code });
|