opencode-acp 1.18.1-pr.416.176 → 1.18.1-pr.416.177

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/dist/index.js CHANGED
@@ -9657,7 +9657,7 @@ async function resolveSafeToFileTarget(targetPath, options) {
9657
9657
  } catch {
9658
9658
  }
9659
9659
  }
9660
- const physicallyAllowed = realAllowedDirs.every((dir) => !containsOrIs(join4(dir), physicalPath) === false) && realAllowedDirs.some((dir) => containsOrIs(join4(dir), physicalPath));
9660
+ const physicallyAllowed = realAllowedDirs.some((dir) => containsOrIs(dir, physicalPath));
9661
9661
  if (!physicallyAllowed) {
9662
9662
  return {
9663
9663
  ok: false,
@@ -9916,13 +9916,13 @@ function createDecompressTool(factoryCtx) {
9916
9916
  }
9917
9917
  const blockMessages = rawMessages.filter((m) => msgIdSet.has(extractMessageId(m)));
9918
9918
  const lines2 = blockMessages.map(extractMessageText2);
9919
- const fileContent = lines2.length > 0 ? lines2.join("\n\n---\n\n") : targets[0]?.blocks[0]?.summary ?? "(no content available)";
9920
9919
  const fsp2 = await import("fs/promises");
9921
9920
  const { constants } = await import("fs");
9921
+ const fileContent = lines2.length > 0 ? lines2.join("\n\n---\n\n") : targets[0]?.blocks[0]?.summary ?? "(no content available)";
9922
9922
  const flags = constants.O_WRONLY | constants.O_CREAT | constants.O_TRUNC | (process.platform === "win32" ? 0 : constants.O_NOFOLLOW);
9923
9923
  const handle = await fsp2.open(safe.filePath, flags, 384);
9924
9924
  try {
9925
- await handle.writeFile(fileContent, "utf-8");
9925
+ await handle.write(Buffer.from(fileContent, "utf-8"));
9926
9926
  } finally {
9927
9927
  await handle.close();
9928
9928
  }
@@ -10670,7 +10670,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
10670
10670
  import { join as join5 } from "path";
10671
10671
  import { existsSync as existsSync4 } from "fs";
10672
10672
  import { homedir as homedir4 } from "os";
10673
- var LOG_VERSION = true ? "1.18.1-pr.416.176" : "dev";
10673
+ var LOG_VERSION = true ? "1.18.1-pr.416.177" : "dev";
10674
10674
  var LEVEL_RANK = {
10675
10675
  debug: 10,
10676
10676
  info: 20,
@@ -13354,7 +13354,7 @@ var server = (async (ctx) => {
13354
13354
  }
13355
13355
  const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
13356
13356
  logger.info("ACP plugin initialized", {
13357
- version: true ? "1.18.1-pr.416.176" : "dev",
13357
+ version: true ? "1.18.1-pr.416.177" : "dev",
13358
13358
  workspace: ctx.directory,
13359
13359
  logLevel: logger.level,
13360
13360
  debug: config.debug,