@bitfab/sdk 0.64.29 → 0.65.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/cloudReplay.py +3 -5
- package/dist/{chunk-2YYVO4RI.js → chunk-3W6RLPGK.js} +4 -4
- package/dist/chunk-3W6RLPGK.js.map +1 -0
- package/dist/{chunk-UIDS5FUO.js → chunk-JIGT4NC5.js} +2 -2
- package/dist/{chunk-KDYML76E.js → chunk-JXIW4FOF.js} +2 -2
- package/dist/{chunk-BDPDIXLA.js → chunk-SUXEIG4U.js} +42 -14
- package/dist/chunk-SUXEIG4U.js.map +1 -0
- package/dist/{chunk-CBF3YILJ.js → chunk-TNIJXUGC.js} +2 -2
- package/dist/chunk-TNIJXUGC.js.map +1 -0
- package/dist/{chunk-Q74E5WXG.js → chunk-WW2RMMTA.js} +2 -2
- package/dist/chunk-WW2RMMTA.js.map +1 -0
- package/dist/{http-CTG3RWQO.js → http-7LTYEMJO.js} +2 -2
- package/dist/{http-7AS2BELK.js → http-NNVOMI63.js} +2 -2
- package/dist/index.cjs +38 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -43
- package/dist/index.d.ts +76 -43
- package/dist/index.js +5 -3
- package/dist/node.cjs +38 -9
- 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-JV22WC77.js → replay-D7AN6O25.js} +3 -3
- package/dist/{replay-FSWT222C.js → replay-L56SESG7.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-2YYVO4RI.js.map +0 -1
- package/dist/chunk-BDPDIXLA.js.map +0 -1
- package/dist/chunk-CBF3YILJ.js.map +0 -1
- package/dist/chunk-Q74E5WXG.js.map +0 -1
- /package/dist/{chunk-UIDS5FUO.js.map → chunk-JIGT4NC5.js.map} +0 -0
- /package/dist/{chunk-KDYML76E.js.map → chunk-JXIW4FOF.js.map} +0 -0
- /package/dist/{http-7AS2BELK.js.map → http-7LTYEMJO.js.map} +0 -0
- /package/dist/{http-CTG3RWQO.js.map → http-NNVOMI63.js.map} +0 -0
- /package/dist/{replay-FSWT222C.js.map → replay-D7AN6O25.js.map} +0 -0
- /package/dist/{replay-JV22WC77.js.map → replay-L56SESG7.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var __version__, __packageName__;
|
|
|
42
42
|
var init_version_generated = __esm({
|
|
43
43
|
"src/version.generated.ts"() {
|
|
44
44
|
"use strict";
|
|
45
|
-
__version__ = "0.
|
|
45
|
+
__version__ = "0.65.0";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -5367,6 +5367,7 @@ __export(index_exports, {
|
|
|
5367
5367
|
BitfabOpenAITracingProcessor: () => BitfabOpenAITracingProcessor,
|
|
5368
5368
|
BitfabRivetIntegration: () => BitfabRivetIntegration,
|
|
5369
5369
|
BitfabVercelAiHandler: () => BitfabVercelAiHandler,
|
|
5370
|
+
CategoriesClient: () => CategoriesClient,
|
|
5370
5371
|
DEFAULT_SERVICE_URL: () => DEFAULT_SERVICE_URL,
|
|
5371
5372
|
DatasetsClient: () => DatasetsClient,
|
|
5372
5373
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
@@ -5397,9 +5398,9 @@ __export(index_exports, {
|
|
|
5397
5398
|
});
|
|
5398
5399
|
module.exports = __toCommonJS(index_exports);
|
|
5399
5400
|
|
|
5400
|
-
// src/
|
|
5401
|
-
var CATEGORIES_PATH = "/api/sdk/
|
|
5402
|
-
var
|
|
5401
|
+
// src/categories.ts
|
|
5402
|
+
var CATEGORIES_PATH = "/api/sdk/categories";
|
|
5403
|
+
var CategoriesClient = class {
|
|
5403
5404
|
constructor(httpClient) {
|
|
5404
5405
|
this.httpClient = httpClient;
|
|
5405
5406
|
}
|
|
@@ -5426,6 +5427,7 @@ var AssertionCategoriesClient = class {
|
|
|
5426
5427
|
return response.category;
|
|
5427
5428
|
}
|
|
5428
5429
|
};
|
|
5430
|
+
var AssertionCategoriesClient = CategoriesClient;
|
|
5429
5431
|
|
|
5430
5432
|
// src/claudeAgentSdk.ts
|
|
5431
5433
|
init_constants();
|
|
@@ -9025,6 +9027,27 @@ function draftsInGenerationOrder(assertions, assertionIds) {
|
|
|
9025
9027
|
return assertion === void 0 ? [] : [assertion];
|
|
9026
9028
|
});
|
|
9027
9029
|
}
|
|
9030
|
+
function withCategoryId(assertion) {
|
|
9031
|
+
const categoryId = assertion.category_id ?? assertion.category_assertion_id ?? null;
|
|
9032
|
+
return {
|
|
9033
|
+
...assertion,
|
|
9034
|
+
category_id: categoryId,
|
|
9035
|
+
category_assertion_id: categoryId
|
|
9036
|
+
};
|
|
9037
|
+
}
|
|
9038
|
+
function withCategoryIds(assertions) {
|
|
9039
|
+
return assertions.map(withCategoryId);
|
|
9040
|
+
}
|
|
9041
|
+
function toWireAssertion({
|
|
9042
|
+
category_assertion_id,
|
|
9043
|
+
...assertion
|
|
9044
|
+
}) {
|
|
9045
|
+
const categoryId = assertion.category_id === void 0 ? category_assertion_id : assertion.category_id;
|
|
9046
|
+
if (categoryId === void 0) {
|
|
9047
|
+
return assertion;
|
|
9048
|
+
}
|
|
9049
|
+
return { ...assertion, category_id: categoryId };
|
|
9050
|
+
}
|
|
9028
9051
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
9029
9052
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
9030
9053
|
}
|
|
@@ -9039,9 +9062,10 @@ var TracesClient = class {
|
|
|
9039
9062
|
return this.httpClient.request(SEARCH_PATH, params);
|
|
9040
9063
|
}
|
|
9041
9064
|
async getAssertions(traceId) {
|
|
9042
|
-
|
|
9065
|
+
const result = await this.httpClient.get(
|
|
9043
9066
|
traceAssertionsPath(traceId)
|
|
9044
9067
|
);
|
|
9068
|
+
return { ...result, assertions: withCategoryIds(result.assertions) };
|
|
9045
9069
|
}
|
|
9046
9070
|
async saveAssertions(params) {
|
|
9047
9071
|
return this.saveAssertionsAll({
|
|
@@ -9054,10 +9078,13 @@ var TracesClient = class {
|
|
|
9054
9078
|
return [];
|
|
9055
9079
|
}
|
|
9056
9080
|
const response = await this.httpClient.request(ASSERTIONS_PATH, {
|
|
9057
|
-
updates: params.updates
|
|
9081
|
+
updates: params.updates.map((update) => ({
|
|
9082
|
+
...update,
|
|
9083
|
+
assertions: update.assertions.map(toWireAssertion)
|
|
9084
|
+
})),
|
|
9058
9085
|
source: params.source ?? "agent"
|
|
9059
9086
|
});
|
|
9060
|
-
return response.assertions;
|
|
9087
|
+
return withCategoryIds(response.assertions);
|
|
9061
9088
|
}
|
|
9062
9089
|
async generateAssertions(traceId, options = {}) {
|
|
9063
9090
|
const started = await this.httpClient.request(
|
|
@@ -9069,7 +9096,7 @@ var TracesClient = class {
|
|
|
9069
9096
|
}
|
|
9070
9097
|
);
|
|
9071
9098
|
if (isGenerationFinished(traceId, started.generation)) {
|
|
9072
|
-
return started.assertions;
|
|
9099
|
+
return withCategoryIds(started.assertions);
|
|
9073
9100
|
}
|
|
9074
9101
|
const timeoutMs = options.timeoutMs ?? DEFAULT_GENERATION_TIMEOUT_MS;
|
|
9075
9102
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -10092,7 +10119,8 @@ var Bitfab = class {
|
|
|
10092
10119
|
this.simulationPlan.refresh();
|
|
10093
10120
|
}
|
|
10094
10121
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
10095
|
-
this.
|
|
10122
|
+
this.categories = new CategoriesClient(this.httpClient);
|
|
10123
|
+
this.assertionCategories = this.categories;
|
|
10096
10124
|
this.organizationMembers = new OrganizationMembersClient(this.httpClient);
|
|
10097
10125
|
this.traces = new TracesClient(this.httpClient);
|
|
10098
10126
|
this.spans = new SpansClient(this.httpClient);
|
|
@@ -12411,6 +12439,7 @@ function resolveTraceFunctionKey(registration) {
|
|
|
12411
12439
|
BitfabOpenAITracingProcessor,
|
|
12412
12440
|
BitfabRivetIntegration,
|
|
12413
12441
|
BitfabVercelAiHandler,
|
|
12442
|
+
CategoriesClient,
|
|
12414
12443
|
DEFAULT_SERVICE_URL,
|
|
12415
12444
|
DatasetsClient,
|
|
12416
12445
|
DbBranchReplayError,
|