oh-my-promptfoo 1.14.0 → 1.15.0
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/README.md +5 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,3 +116,8 @@ npx promptfoo eval -c promptfooconfig.yaml
|
|
|
116
116
|
`Provider` starts the agent at its private workspace root unless `workingDir`
|
|
117
117
|
selects a prepared subdirectory. The optional `agent-workspace/` sibling layout
|
|
118
118
|
is documented in the provider guide; the root layout remains the default.
|
|
119
|
+
|
|
120
|
+
Enable `fileChanges: true` to capture durable file-change evidence in
|
|
121
|
+
`metadata.fileChanges` (schemaVersion 2). `changedFiles` contains added and
|
|
122
|
+
modified files, each with `change: "added" | "modified"` and base64 after-bytes;
|
|
123
|
+
`deletedFiles` and the optional diff record the remaining changes.
|
package/dist/index.cjs
CHANGED
|
@@ -1815,7 +1815,7 @@ async function captureFileChanges(handle, baseline) {
|
|
|
1815
1815
|
var omit = omit2;
|
|
1816
1816
|
if (baseline.failure) throw Error(baseline.failure);
|
|
1817
1817
|
const after = await walk(handle, baseline.ignored, false, baseline.tracked, baseline);
|
|
1818
|
-
const
|
|
1818
|
+
const changedFiles = {};
|
|
1819
1819
|
const deletedFiles = [];
|
|
1820
1820
|
const omittedPaths = [];
|
|
1821
1821
|
const codes = /* @__PURE__ */ new Set();
|
|
@@ -1850,7 +1850,7 @@ async function captureFileChanges(handle, baseline) {
|
|
|
1850
1850
|
continue;
|
|
1851
1851
|
}
|
|
1852
1852
|
total += current.bytes.length;
|
|
1853
|
-
Object.defineProperty(
|
|
1853
|
+
Object.defineProperty(changedFiles, path, {
|
|
1854
1854
|
enumerable: true,
|
|
1855
1855
|
value: {
|
|
1856
1856
|
kind: current.kind,
|
|
@@ -1889,8 +1889,8 @@ async function captureFileChanges(handle, baseline) {
|
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
1891
|
const result = {
|
|
1892
|
-
schemaVersion:
|
|
1893
|
-
|
|
1892
|
+
schemaVersion: 2,
|
|
1893
|
+
changedFiles,
|
|
1894
1894
|
deletedFiles,
|
|
1895
1895
|
...diff || diffTruncated ? { diff: { format: "unified", content: diff, truncated: diffTruncated } } : {}
|
|
1896
1896
|
};
|
|
@@ -1904,9 +1904,9 @@ async function captureFileChanges(handle, baseline) {
|
|
|
1904
1904
|
} : { ...result, status: "complete", truncated: false };
|
|
1905
1905
|
} catch (error) {
|
|
1906
1906
|
return {
|
|
1907
|
-
schemaVersion:
|
|
1907
|
+
schemaVersion: 2,
|
|
1908
1908
|
status: "failed",
|
|
1909
|
-
|
|
1909
|
+
changedFiles: {},
|
|
1910
1910
|
deletedFiles: [],
|
|
1911
1911
|
truncated: false,
|
|
1912
1912
|
failure: {
|
|
@@ -7236,9 +7236,9 @@ var Provider = class _Provider extends Calls {
|
|
|
7236
7236
|
let fileChanges;
|
|
7237
7237
|
if (this.config.fileChanges) {
|
|
7238
7238
|
fileChanges = baseline ? await captureFileChanges(handle, baseline) : {
|
|
7239
|
-
schemaVersion:
|
|
7239
|
+
schemaVersion: 2,
|
|
7240
7240
|
status: "failed",
|
|
7241
|
-
|
|
7241
|
+
changedFiles: {},
|
|
7242
7242
|
deletedFiles: [],
|
|
7243
7243
|
truncated: false,
|
|
7244
7244
|
failure: {
|