bitfab 0.64.7 → 0.64.8
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-FZ7SSJ7S.js → chunk-25HVPGSF.js} +3 -3
- package/dist/{chunk-SZVZU3F6.js → chunk-2U4Y5FHT.js} +2 -2
- package/dist/{chunk-DIOPUOV3.js → chunk-2UDEQITO.js} +32 -8
- package/dist/chunk-2UDEQITO.js.map +1 -0
- package/dist/{chunk-RYZO7Q3P.js → chunk-P2SYAT44.js} +2 -2
- package/dist/{chunk-RYZO7Q3P.js.map → chunk-P2SYAT44.js.map} +1 -1
- package/dist/{chunk-TAGNRN6F.js → chunk-YGDXDDTX.js} +2 -2
- package/dist/{chunk-TAGNRN6F.js.map → chunk-YGDXDDTX.js.map} +1 -1
- package/dist/{http-QVLMJVZT.js → http-CWPHM5T3.js} +2 -2
- package/dist/{http-YUNQFRQY.js → http-JBQTF36K.js} +2 -2
- package/dist/index.cjs +28 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +3 -3
- package/dist/node.cjs +28 -3
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-PN6MNLGK.js → replay-LBALXLOM.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-DIOPUOV3.js.map +0 -1
- /package/dist/{chunk-FZ7SSJ7S.js.map → chunk-25HVPGSF.js.map} +0 -0
- /package/dist/{chunk-SZVZU3F6.js.map → chunk-2U4Y5FHT.js.map} +0 -0
- /package/dist/{http-QVLMJVZT.js.map → http-CWPHM5T3.js.map} +0 -0
- /package/dist/{http-YUNQFRQY.js.map → http-JBQTF36K.js.map} +0 -0
- /package/dist/{replay-PN6MNLGK.js.map → replay-LBALXLOM.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
flushTraces,
|
|
8
8
|
parseRetryAfterMs,
|
|
9
9
|
serializePayloadBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P2SYAT44.js";
|
|
11
11
|
export {
|
|
12
12
|
BitfabError,
|
|
13
13
|
HttpClient,
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
parseRetryAfterMs,
|
|
19
19
|
serializePayloadBody
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=http-
|
|
21
|
+
//# sourceMappingURL=http-CWPHM5T3.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
flushTraces,
|
|
8
8
|
parseRetryAfterMs,
|
|
9
9
|
serializePayloadBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YGDXDDTX.js";
|
|
11
11
|
import "./chunk-MT36GJMW.js";
|
|
12
12
|
export {
|
|
13
13
|
BitfabError,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
parseRetryAfterMs,
|
|
20
20
|
serializePayloadBody
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=http-
|
|
22
|
+
//# sourceMappingURL=http-JBQTF36K.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -51,7 +51,7 @@ var __version__, __packageName__;
|
|
|
51
51
|
var init_version_generated = __esm({
|
|
52
52
|
"src/version.generated.ts"() {
|
|
53
53
|
"use strict";
|
|
54
|
-
__version__ = "0.64.
|
|
54
|
+
__version__ = "0.64.8";
|
|
55
55
|
__packageName__ = "bitfab";
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -7055,9 +7055,34 @@ var GradersClient = class {
|
|
|
7055
7055
|
init_http();
|
|
7056
7056
|
|
|
7057
7057
|
// src/labels.ts
|
|
7058
|
+
init_errors();
|
|
7058
7059
|
init_http();
|
|
7059
7060
|
var LABELS_PATH = "/api/sdk/traces/labels";
|
|
7060
7061
|
var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
|
|
7062
|
+
function assertEveryVerdictNamesAnAssertion(updates) {
|
|
7063
|
+
const unscoped = updates.filter(
|
|
7064
|
+
(update) => !("archive" in update && update.archive === true) && (typeof update.assertionId !== "string" || update.assertionId === "")
|
|
7065
|
+
);
|
|
7066
|
+
if (unscoped.length > 0) {
|
|
7067
|
+
const targets = unscoped.map(
|
|
7068
|
+
(update) => update.traceId ?? update.originalTraceId
|
|
7069
|
+
);
|
|
7070
|
+
throw new BitfabError(
|
|
7071
|
+
`Agent verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.save, saveAll, and skip. Only archive may omit it, to clear an old whole-trace verdict.`
|
|
7072
|
+
);
|
|
7073
|
+
}
|
|
7074
|
+
}
|
|
7075
|
+
function assertEveryHumanVerdictNamesAnAssertion(updates) {
|
|
7076
|
+
const unscoped = updates.filter(
|
|
7077
|
+
(update) => typeof update.assertionId !== "string" || update.assertionId === ""
|
|
7078
|
+
);
|
|
7079
|
+
if (unscoped.length > 0) {
|
|
7080
|
+
const targets = unscoped.map((update) => update.traceId);
|
|
7081
|
+
throw new BitfabError(
|
|
7082
|
+
`Human verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.saveHuman and saveHumanAll.`
|
|
7083
|
+
);
|
|
7084
|
+
}
|
|
7085
|
+
}
|
|
7061
7086
|
function labelEvidencePath(traceId, assertionId) {
|
|
7062
7087
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions/${encodeURIComponent(assertionId)}/evidence`;
|
|
7063
7088
|
}
|
|
@@ -7070,6 +7095,7 @@ var LabelsClient = class {
|
|
|
7070
7095
|
return outcome;
|
|
7071
7096
|
}
|
|
7072
7097
|
async saveAll(updates, experimentId) {
|
|
7098
|
+
assertEveryVerdictNamesAnAssertion(updates);
|
|
7073
7099
|
const response = await this.httpClient.request(
|
|
7074
7100
|
LABELS_PATH,
|
|
7075
7101
|
{
|
|
@@ -7079,11 +7105,9 @@ var LabelsClient = class {
|
|
|
7079
7105
|
);
|
|
7080
7106
|
return response.labels;
|
|
7081
7107
|
}
|
|
7082
|
-
/** Withhold a verdict for a trace or replay attempt whose check did not run. */
|
|
7083
7108
|
async skip(target, experimentId) {
|
|
7084
7109
|
return this.save({ ...target, skip: true }, experimentId);
|
|
7085
7110
|
}
|
|
7086
|
-
/** Clear a previous verdict for a trace, replay attempt, or assertion. */
|
|
7087
7111
|
async archive(target, experimentId) {
|
|
7088
7112
|
return this.save({ ...target, archive: true }, experimentId);
|
|
7089
7113
|
}
|
|
@@ -7092,6 +7116,7 @@ var LabelsClient = class {
|
|
|
7092
7116
|
return outcome;
|
|
7093
7117
|
}
|
|
7094
7118
|
async saveHumanAll(updates) {
|
|
7119
|
+
assertEveryHumanVerdictNamesAnAssertion(updates);
|
|
7095
7120
|
const response = await this.httpClient.request(HUMAN_LABELS_PATH, { labels: updates });
|
|
7096
7121
|
return response.labels;
|
|
7097
7122
|
}
|