@agentv/core 0.7.4 → 0.7.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/dist/{chunk-L6RCDZ4Z.js → chunk-7XM7HYRS.js} +6 -2
- package/dist/chunk-7XM7HYRS.js.map +1 -0
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +1 -1
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-L6RCDZ4Z.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -52,6 +52,7 @@ __export(index_exports, {
|
|
|
52
52
|
isTestMessageRole: () => isTestMessageRole,
|
|
53
53
|
listTargetNames: () => listTargetNames,
|
|
54
54
|
loadEvalCases: () => loadEvalCases,
|
|
55
|
+
normalizeLineEndings: () => normalizeLineEndings,
|
|
55
56
|
readTargetDefinitions: () => readTargetDefinitions,
|
|
56
57
|
readTextFile: () => readTextFile,
|
|
57
58
|
resolveAndCreateProvider: () => resolveAndCreateProvider,
|
|
@@ -133,9 +134,12 @@ async function fileExists(filePath) {
|
|
|
133
134
|
return false;
|
|
134
135
|
}
|
|
135
136
|
}
|
|
137
|
+
function normalizeLineEndings(content) {
|
|
138
|
+
return content.replace(/\r\n/g, "\n");
|
|
139
|
+
}
|
|
136
140
|
async function readTextFile(filePath) {
|
|
137
141
|
const content = await (0, import_promises.readFile)(filePath, "utf8");
|
|
138
|
-
return content
|
|
142
|
+
return normalizeLineEndings(content);
|
|
139
143
|
}
|
|
140
144
|
async function findGitRoot(startPath) {
|
|
141
145
|
let currentDir = import_node_path.default.dirname(import_node_path.default.resolve(startPath));
|
|
@@ -959,7 +963,6 @@ async function defaultCommandRunner(command, options) {
|
|
|
959
963
|
};
|
|
960
964
|
try {
|
|
961
965
|
const { stdout, stderr } = await execAsync(command, execOptions);
|
|
962
|
-
console.error(`[CLI DEBUG] SUCCESS - stdout: ${stdout.length} bytes, stderr: ${stderr.length} bytes`);
|
|
963
966
|
return {
|
|
964
967
|
stdout,
|
|
965
968
|
stderr,
|
|
@@ -970,8 +973,6 @@ async function defaultCommandRunner(command, options) {
|
|
|
970
973
|
};
|
|
971
974
|
} catch (error) {
|
|
972
975
|
const execError = error;
|
|
973
|
-
console.error(`[CLI DEBUG] ERROR - code: ${execError.code}, message: ${execError.message}`);
|
|
974
|
-
console.error(`[CLI DEBUG] stdout: ${execError.stdout?.length ?? 0} bytes, stderr: ${execError.stderr?.length ?? 0} bytes`);
|
|
975
976
|
return {
|
|
976
977
|
stdout: execError.stdout ?? "",
|
|
977
978
|
stderr: execError.stderr ?? "",
|
|
@@ -1039,7 +1040,7 @@ var CliProvider = class {
|
|
|
1039
1040
|
}
|
|
1040
1041
|
async readAndCleanupOutputFile(filePath) {
|
|
1041
1042
|
try {
|
|
1042
|
-
const content = await
|
|
1043
|
+
const content = await readTextFile(filePath);
|
|
1043
1044
|
return content;
|
|
1044
1045
|
} catch (error) {
|
|
1045
1046
|
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
@@ -4078,6 +4079,7 @@ function createAgentKernel() {
|
|
|
4078
4079
|
isTestMessageRole,
|
|
4079
4080
|
listTargetNames,
|
|
4080
4081
|
loadEvalCases,
|
|
4082
|
+
normalizeLineEndings,
|
|
4081
4083
|
readTargetDefinitions,
|
|
4082
4084
|
readTextFile,
|
|
4083
4085
|
resolveAndCreateProvider,
|