pi-landstrip 0.20.17 → 0.20.19

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.
Files changed (2) hide show
  1. package/dist/index.ts +7 -7
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -4929,9 +4929,7 @@ ${outputText}` }
4929
4929
  }, ctx);
4930
4930
  const traps = parseLandstripTraps(trapBuffer);
4931
4931
  if (traps.length > 0) {
4932
- const formatted = [...new Set(formatLandstripTraps(traps).split(`
4933
- `))].join(`
4934
- `);
4932
+ const formatted = formatLandstripTraps(traps);
4935
4933
  try {
4936
4934
  writeSync(outputFd, Buffer.from(`${formatted}
4937
4935
  `, "utf8"));
@@ -7136,7 +7134,11 @@ ${paths}${note}`, permissionOptionsFor(ctx), promptSignal);
7136
7134
  const decoder = new StringDecoder3("utf8");
7137
7135
  let buffer = "";
7138
7136
  let prompts = Promise.resolve();
7137
+ const reportedErrors = new Set;
7139
7138
  const reportTrapError = (message) => {
7139
+ if (reportedErrors.has(message))
7140
+ return;
7141
+ reportedErrors.add(message);
7140
7142
  notify(ctx, message, "error");
7141
7143
  if (!ctx.hasUI)
7142
7144
  console.error(`pi-landstrip: ${message}`);
@@ -7171,7 +7173,7 @@ ${paths}${note}`, permissionOptionsFor(ctx), promptSignal);
7171
7173
  if (!trap)
7172
7174
  continue;
7173
7175
  if (!isQueryTrap(trap)) {
7174
- if (isFilesystemTrap(trap) && trap.operation === "read" && matchesPattern(normalizeBlockedPath(trap.path, cwd), allowances.protectedPaths ?? [], cwd)) {
7176
+ if (isFilesystemTrap(trap) && matchesPattern(normalizeBlockedPath(trap.path, cwd), allowances.protectedPaths ?? [], cwd)) {
7175
7177
  continue;
7176
7178
  }
7177
7179
  reportTrapError(formatLandstripTraps2([trap]));
@@ -7775,9 +7777,7 @@ ${paths}${note}`, permissionOptionsFor(ctx), promptSignal);
7775
7777
  const landstripErrors = parseLandstripTraps2(landstripErrorOutput);
7776
7778
  if (landstripErrors.length === 0)
7777
7779
  return null;
7778
- return [...new Set(formatLandstripTraps2(landstripErrors).split(`
7779
- `))].join(`
7780
- `);
7780
+ return formatLandstripTraps2(landstripErrors);
7781
7781
  };
7782
7782
  const blockedReadPathForRetry = (nativeOutput) => {
7783
7783
  const config = loadConfig(ctx.cwd, ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-landstrip",
3
- "version": "0.20.17",
3
+ "version": "0.20.19",
4
4
  "description": "Sandboxed Bash and process-backed agents for Pi",
5
5
  "keywords": [
6
6
  "landstrip",
@@ -39,7 +39,7 @@
39
39
  "ci:test": "npm run test"
40
40
  },
41
41
  "dependencies": {
42
- "@landstrip/landstrip-api": "^0.20.17",
42
+ "@landstrip/landstrip-api": "^0.20.19",
43
43
  "jsonc-parser": "^3.3.1",
44
44
  "minimatch": "^10.2.5",
45
45
  "undici": "^8.9.0",