bitfab 0.53.4 → 0.54.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/dist/{chunk-DIYUW2KO.js → chunk-CLYCJGJE.js} +2 -2
- package/dist/{chunk-DIYUW2KO.js.map → chunk-CLYCJGJE.js.map} +1 -1
- package/dist/{chunk-53RMN23L.js → chunk-JAXMD6AP.js} +65 -16
- package/dist/chunk-JAXMD6AP.js.map +1 -0
- package/dist/{chunk-JKVR5436.js → chunk-O2OJIGL3.js} +2 -2
- package/dist/{chunk-RZC7MYVZ.js → chunk-SEHWHFUY.js} +2 -2
- package/dist/{chunk-RZC7MYVZ.js.map → chunk-SEHWHFUY.js.map} +1 -1
- package/dist/{chunk-YD5XI5YH.js → chunk-VQB5RCFD.js} +3 -3
- package/dist/{http-VRS3FQU3.js → http-G43RIR7E.js} +2 -2
- package/dist/{http-7WGJNBGI.js → http-RXH2N5BB.js} +2 -2
- package/dist/index.cjs +61 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -6
- package/dist/index.d.ts +40 -6
- package/dist/index.js +5 -3
- package/dist/node.cjs +61 -11
- 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 +5 -3
- package/dist/node.js.map +1 -1
- package/dist/{replay-LRCSZ7IX.js → replay-XQITDIRJ.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-53RMN23L.js.map +0 -1
- /package/dist/{chunk-JKVR5436.js.map → chunk-O2OJIGL3.js.map} +0 -0
- /package/dist/{chunk-YD5XI5YH.js.map → chunk-VQB5RCFD.js.map} +0 -0
- /package/dist/{http-7WGJNBGI.js.map → http-G43RIR7E.js.map} +0 -0
- /package/dist/{http-VRS3FQU3.js.map → http-RXH2N5BB.js.map} +0 -0
- /package/dist/{replay-LRCSZ7IX.js.map → replay-XQITDIRJ.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BitfabError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CLYCJGJE.js";
|
|
4
4
|
|
|
5
5
|
// src/codeChange.ts
|
|
6
6
|
var NUL = String.fromCharCode(0);
|
|
@@ -207,7 +207,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
207
207
|
sessionId: seedCase.sessionId
|
|
208
208
|
})
|
|
209
209
|
);
|
|
210
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
210
|
+
const { flushTraces: flushTraces2 } = await import("./http-G43RIR7E.js");
|
|
211
211
|
await flushTraces2(3e4);
|
|
212
212
|
return { pipeline, traceFunctionKey, traceIds };
|
|
213
213
|
}
|
|
@@ -744,4 +744,4 @@ export {
|
|
|
744
744
|
runRegistryMain,
|
|
745
745
|
runIfEntrypoint
|
|
746
746
|
};
|
|
747
|
-
//# sourceMappingURL=chunk-
|
|
747
|
+
//# sourceMappingURL=chunk-VQB5RCFD.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CLYCJGJE.js";
|
|
10
10
|
export {
|
|
11
11
|
BitfabError,
|
|
12
12
|
HttpClient,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
parseRetryAfterMs,
|
|
17
17
|
serializePayloadBody
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=http-
|
|
19
|
+
//# sourceMappingURL=http-G43RIR7E.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SEHWHFUY.js";
|
|
10
10
|
import "./chunk-VCRFFCLY.js";
|
|
11
11
|
export {
|
|
12
12
|
BitfabError,
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
parseRetryAfterMs,
|
|
18
18
|
serializePayloadBody
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=http-
|
|
20
|
+
//# sourceMappingURL=http-RXH2N5BB.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.
|
|
54
|
+
__version__ = "0.54.0";
|
|
55
55
|
__packageName__ = "bitfab";
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -4071,6 +4071,7 @@ var init_replay = __esm({
|
|
|
4071
4071
|
// src/index.ts
|
|
4072
4072
|
var index_exports = {};
|
|
4073
4073
|
__export(index_exports, {
|
|
4074
|
+
AssertionCategoriesClient: () => AssertionCategoriesClient,
|
|
4074
4075
|
BITFAB_PROGRESS_PREFIX: () => BITFAB_PROGRESS_PREFIX,
|
|
4075
4076
|
Bitfab: () => Bitfab,
|
|
4076
4077
|
BitfabClaudeAgentHandler: () => BitfabClaudeAgentHandler,
|
|
@@ -4107,6 +4108,36 @@ __export(index_exports, {
|
|
|
4107
4108
|
});
|
|
4108
4109
|
module.exports = __toCommonJS(index_exports);
|
|
4109
4110
|
|
|
4111
|
+
// src/assertionCategories.ts
|
|
4112
|
+
var CATEGORIES_PATH = "/api/sdk/assertionCategories";
|
|
4113
|
+
var AssertionCategoriesClient = class {
|
|
4114
|
+
constructor(httpClient) {
|
|
4115
|
+
this.httpClient = httpClient;
|
|
4116
|
+
}
|
|
4117
|
+
/** Create a category, or update it by ID. Omitted descriptions are preserved. */
|
|
4118
|
+
async save(params) {
|
|
4119
|
+
const response = await this.httpClient.request(CATEGORIES_PATH, params);
|
|
4120
|
+
return response.category;
|
|
4121
|
+
}
|
|
4122
|
+
/** Read one category in the API key's organization. */
|
|
4123
|
+
async get(id) {
|
|
4124
|
+
const response = await this.httpClient.get(
|
|
4125
|
+
`${CATEGORIES_PATH}/${encodeURIComponent(id)}`
|
|
4126
|
+
);
|
|
4127
|
+
return response.category;
|
|
4128
|
+
}
|
|
4129
|
+
/** List the organization's categories ordered by title. */
|
|
4130
|
+
async list() {
|
|
4131
|
+
const response = await this.httpClient.get(CATEGORIES_PATH);
|
|
4132
|
+
return response.categories;
|
|
4133
|
+
}
|
|
4134
|
+
/** Delete a category and clear its assignments, preserving assertions and verdicts. */
|
|
4135
|
+
async delete(id) {
|
|
4136
|
+
const response = await this.httpClient.request(`${CATEGORIES_PATH}/${encodeURIComponent(id)}`, {}, { method: "DELETE" });
|
|
4137
|
+
return response.category;
|
|
4138
|
+
}
|
|
4139
|
+
};
|
|
4140
|
+
|
|
4110
4141
|
// src/assertions.ts
|
|
4111
4142
|
var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
|
|
4112
4143
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
@@ -5534,14 +5565,24 @@ var DatasetsClient = class {
|
|
|
5534
5565
|
}
|
|
5535
5566
|
/**
|
|
5536
5567
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
5537
|
-
* given and organization-wide otherwise.
|
|
5568
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
5538
5569
|
*/
|
|
5539
5570
|
async list(params = {}) {
|
|
5540
|
-
const
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5571
|
+
const datasets = [];
|
|
5572
|
+
let cursor;
|
|
5573
|
+
do {
|
|
5574
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
5575
|
+
if (params.traceFunctionKey !== void 0) {
|
|
5576
|
+
query.set("traceFunctionKey", params.traceFunctionKey);
|
|
5577
|
+
}
|
|
5578
|
+
if (cursor !== void 0) {
|
|
5579
|
+
query.set("cursor", cursor);
|
|
5580
|
+
}
|
|
5581
|
+
const response = await this.httpClient.get(`/api/sdk/datasets?${query}`);
|
|
5582
|
+
datasets.push(...response.datasets);
|
|
5583
|
+
cursor = response.nextCursor ?? void 0;
|
|
5584
|
+
} while (cursor !== void 0);
|
|
5585
|
+
return datasets;
|
|
5545
5586
|
}
|
|
5546
5587
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
5547
5588
|
async get(datasetId) {
|
|
@@ -5550,11 +5591,18 @@ var DatasetsClient = class {
|
|
|
5550
5591
|
);
|
|
5551
5592
|
return response.dataset;
|
|
5552
5593
|
}
|
|
5553
|
-
/**
|
|
5594
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
5554
5595
|
async listTraces(datasetId) {
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
)
|
|
5596
|
+
const traceIds = [];
|
|
5597
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
5598
|
+
for (; ; ) {
|
|
5599
|
+
const page = await this.httpClient.get(`${datasetPath(datasetId, "/traces")}?${query}`);
|
|
5600
|
+
traceIds.push(...page.traceIds);
|
|
5601
|
+
if (page.nextCursor === void 0 || page.nextCursor === null) {
|
|
5602
|
+
return { datasetId: page.datasetId, traceIds };
|
|
5603
|
+
}
|
|
5604
|
+
query.set("cursor", page.nextCursor);
|
|
5605
|
+
}
|
|
5558
5606
|
}
|
|
5559
5607
|
/**
|
|
5560
5608
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -7641,6 +7689,7 @@ var Bitfab = class {
|
|
|
7641
7689
|
this.httpClient.releaseHeldExternalSpans = (timeoutMs) => this.simulationPlan.release(timeoutMs);
|
|
7642
7690
|
this.httpClient.stopSimulationPlan = () => this.simulationPlan.stop();
|
|
7643
7691
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
7692
|
+
this.assertionCategories = new AssertionCategoriesClient(this.httpClient);
|
|
7644
7693
|
this.traces = new TracesClient(this.httpClient);
|
|
7645
7694
|
this.labels = new LabelsClient(this.httpClient);
|
|
7646
7695
|
this.graders = new GradersClient(this.httpClient);
|
|
@@ -9712,6 +9761,7 @@ function resolveTraceFunctionKey(registration) {
|
|
|
9712
9761
|
}
|
|
9713
9762
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9714
9763
|
0 && (module.exports = {
|
|
9764
|
+
AssertionCategoriesClient,
|
|
9715
9765
|
BITFAB_PROGRESS_PREFIX,
|
|
9716
9766
|
Bitfab,
|
|
9717
9767
|
BitfabClaudeAgentHandler,
|