poe-code 3.0.98 → 3.0.99-beta.1

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.
@@ -691,6 +691,11 @@ import chalk8 from "chalk";
691
691
  // packages/agent-spawn/src/acp/spawn.ts
692
692
  import { spawn as spawnChildProcess3 } from "node:child_process";
693
693
 
694
+ // packages/agent-spawn/src/acp/middlewares/spawn-log.ts
695
+ import path from "node:path";
696
+ import { homedir } from "node:os";
697
+ import { mkdir, open } from "node:fs/promises";
698
+
694
699
  // src/utils/command-checks.ts
695
700
  function formatCommandRunnerResult(result) {
696
701
  const stdout = result.stdout.length > 0 ? result.stdout : "<empty>";
@@ -1044,20 +1049,20 @@ function getConfigFormat(pathOrFormat) {
1044
1049
  }
1045
1050
  return formatRegistry[formatName];
1046
1051
  }
1047
- function detectFormat(path2) {
1048
- const ext = getExtension(path2);
1052
+ function detectFormat(path3) {
1053
+ const ext = getExtension(path3);
1049
1054
  return extensionMap[ext];
1050
1055
  }
1051
- function getExtension(path2) {
1052
- const lastDot = path2.lastIndexOf(".");
1056
+ function getExtension(path3) {
1057
+ const lastDot = path3.lastIndexOf(".");
1053
1058
  if (lastDot === -1) {
1054
1059
  return "";
1055
1060
  }
1056
- return path2.slice(lastDot).toLowerCase();
1061
+ return path3.slice(lastDot).toLowerCase();
1057
1062
  }
1058
1063
 
1059
1064
  // packages/config-mutations/src/execution/path-utils.ts
1060
- import path from "node:path";
1065
+ import path2 from "node:path";
1061
1066
  function expandHome(targetPath, homeDir) {
1062
1067
  if (!targetPath?.startsWith("~")) {
1063
1068
  return targetPath;
@@ -1074,7 +1079,7 @@ function expandHome(targetPath, homeDir) {
1074
1079
  remainder = remainder.slice(1);
1075
1080
  }
1076
1081
  }
1077
- return remainder.length === 0 ? homeDir : path.join(homeDir, remainder);
1082
+ return remainder.length === 0 ? homeDir : path2.join(homeDir, remainder);
1078
1083
  }
1079
1084
  function validateHomePath(targetPath) {
1080
1085
  if (typeof targetPath !== "string" || targetPath.length === 0) {
@@ -1092,12 +1097,12 @@ function resolvePath(rawPath, homeDir, pathMapper) {
1092
1097
  if (!pathMapper) {
1093
1098
  return expanded;
1094
1099
  }
1095
- const rawDirectory = path.dirname(expanded);
1100
+ const rawDirectory = path2.dirname(expanded);
1096
1101
  const mappedDirectory = pathMapper.mapTargetDirectory({
1097
1102
  targetDirectory: rawDirectory
1098
1103
  });
1099
- const filename = path.basename(expanded);
1100
- return filename.length === 0 ? mappedDirectory : path.join(mappedDirectory, filename);
1104
+ const filename = path2.basename(expanded);
1105
+ return filename.length === 0 ? mappedDirectory : path2.join(mappedDirectory, filename);
1101
1106
  }
1102
1107
 
1103
1108
  // packages/config-mutations/src/fs-utils.ts