bitfab 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-E2N56K23.js → chunk-2A4MMF2B.js} +2 -2
- package/dist/{chunk-LOR3CWDQ.js → chunk-6FFC55V5.js} +4 -4
- package/dist/chunk-6FFC55V5.js.map +1 -0
- package/dist/{chunk-W2AQ56UP.js → chunk-BTCULORS.js} +42 -14
- package/dist/chunk-BTCULORS.js.map +1 -0
- package/dist/{chunk-W5DDLKC5.js → chunk-CYF5LGHB.js} +2 -2
- package/dist/{chunk-24JBL2FV.js → chunk-UKQOBPTJ.js} +2 -2
- package/dist/chunk-UKQOBPTJ.js.map +1 -0
- package/dist/{chunk-RC6IC2EL.js → chunk-YXRWWUSR.js} +2 -2
- package/dist/chunk-YXRWWUSR.js.map +1 -0
- package/dist/{http-S33OM4NK.js → http-EIX65EBE.js} +2 -2
- package/dist/{http-6UJ47MDP.js → http-UAXBI747.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-MBMPKUFX.js → replay-EVDUMCAS.js} +3 -3
- package/dist/{replay-RSAJN6YA.js → replay-U65EXYUR.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-24JBL2FV.js.map +0 -1
- package/dist/chunk-LOR3CWDQ.js.map +0 -1
- package/dist/chunk-RC6IC2EL.js.map +0 -1
- package/dist/chunk-W2AQ56UP.js.map +0 -1
- /package/dist/{chunk-E2N56K23.js.map → chunk-2A4MMF2B.js.map} +0 -0
- /package/dist/{chunk-W5DDLKC5.js.map → chunk-CYF5LGHB.js.map} +0 -0
- /package/dist/{http-6UJ47MDP.js.map → http-EIX65EBE.js.map} +0 -0
- /package/dist/{http-S33OM4NK.js.map → http-UAXBI747.js.map} +0 -0
- /package/dist/{replay-MBMPKUFX.js.map → replay-EVDUMCAS.js.map} +0 -0
- /package/dist/{replay-RSAJN6YA.js.map → replay-U65EXYUR.js.map} +0 -0
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.65.0";
|
|
55
55
|
__packageName__ = "bitfab";
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -5376,6 +5376,7 @@ __export(index_exports, {
|
|
|
5376
5376
|
BitfabOpenAITracingProcessor: () => BitfabOpenAITracingProcessor,
|
|
5377
5377
|
BitfabRivetIntegration: () => BitfabRivetIntegration,
|
|
5378
5378
|
BitfabVercelAiHandler: () => BitfabVercelAiHandler,
|
|
5379
|
+
CategoriesClient: () => CategoriesClient,
|
|
5379
5380
|
DEFAULT_SERVICE_URL: () => DEFAULT_SERVICE_URL,
|
|
5380
5381
|
DatasetsClient: () => DatasetsClient,
|
|
5381
5382
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
@@ -5406,9 +5407,9 @@ __export(index_exports, {
|
|
|
5406
5407
|
});
|
|
5407
5408
|
module.exports = __toCommonJS(index_exports);
|
|
5408
5409
|
|
|
5409
|
-
// src/
|
|
5410
|
-
var CATEGORIES_PATH = "/api/sdk/
|
|
5411
|
-
var
|
|
5410
|
+
// src/categories.ts
|
|
5411
|
+
var CATEGORIES_PATH = "/api/sdk/categories";
|
|
5412
|
+
var CategoriesClient = class {
|
|
5412
5413
|
constructor(httpClient) {
|
|
5413
5414
|
this.httpClient = httpClient;
|
|
5414
5415
|
}
|
|
@@ -5435,6 +5436,7 @@ var AssertionCategoriesClient = class {
|
|
|
5435
5436
|
return response.category;
|
|
5436
5437
|
}
|
|
5437
5438
|
};
|
|
5439
|
+
var AssertionCategoriesClient = CategoriesClient;
|
|
5438
5440
|
|
|
5439
5441
|
// src/claudeAgentSdk.ts
|
|
5440
5442
|
init_constants();
|
|
@@ -9034,6 +9036,27 @@ function draftsInGenerationOrder(assertions, assertionIds) {
|
|
|
9034
9036
|
return assertion === void 0 ? [] : [assertion];
|
|
9035
9037
|
});
|
|
9036
9038
|
}
|
|
9039
|
+
function withCategoryId(assertion) {
|
|
9040
|
+
const categoryId = assertion.category_id ?? assertion.category_assertion_id ?? null;
|
|
9041
|
+
return {
|
|
9042
|
+
...assertion,
|
|
9043
|
+
category_id: categoryId,
|
|
9044
|
+
category_assertion_id: categoryId
|
|
9045
|
+
};
|
|
9046
|
+
}
|
|
9047
|
+
function withCategoryIds(assertions) {
|
|
9048
|
+
return assertions.map(withCategoryId);
|
|
9049
|
+
}
|
|
9050
|
+
function toWireAssertion({
|
|
9051
|
+
category_assertion_id,
|
|
9052
|
+
...assertion
|
|
9053
|
+
}) {
|
|
9054
|
+
const categoryId = assertion.category_id === void 0 ? category_assertion_id : assertion.category_id;
|
|
9055
|
+
if (categoryId === void 0) {
|
|
9056
|
+
return assertion;
|
|
9057
|
+
}
|
|
9058
|
+
return { ...assertion, category_id: categoryId };
|
|
9059
|
+
}
|
|
9037
9060
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
9038
9061
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
9039
9062
|
}
|
|
@@ -9048,9 +9071,10 @@ var TracesClient = class {
|
|
|
9048
9071
|
return this.httpClient.request(SEARCH_PATH, params);
|
|
9049
9072
|
}
|
|
9050
9073
|
async getAssertions(traceId) {
|
|
9051
|
-
|
|
9074
|
+
const result = await this.httpClient.get(
|
|
9052
9075
|
traceAssertionsPath(traceId)
|
|
9053
9076
|
);
|
|
9077
|
+
return { ...result, assertions: withCategoryIds(result.assertions) };
|
|
9054
9078
|
}
|
|
9055
9079
|
async saveAssertions(params) {
|
|
9056
9080
|
return this.saveAssertionsAll({
|
|
@@ -9063,10 +9087,13 @@ var TracesClient = class {
|
|
|
9063
9087
|
return [];
|
|
9064
9088
|
}
|
|
9065
9089
|
const response = await this.httpClient.request(ASSERTIONS_PATH, {
|
|
9066
|
-
updates: params.updates
|
|
9090
|
+
updates: params.updates.map((update) => ({
|
|
9091
|
+
...update,
|
|
9092
|
+
assertions: update.assertions.map(toWireAssertion)
|
|
9093
|
+
})),
|
|
9067
9094
|
source: params.source ?? "agent"
|
|
9068
9095
|
});
|
|
9069
|
-
return response.assertions;
|
|
9096
|
+
return withCategoryIds(response.assertions);
|
|
9070
9097
|
}
|
|
9071
9098
|
async generateAssertions(traceId, options = {}) {
|
|
9072
9099
|
const started = await this.httpClient.request(
|
|
@@ -9078,7 +9105,7 @@ var TracesClient = class {
|
|
|
9078
9105
|
}
|
|
9079
9106
|
);
|
|
9080
9107
|
if (isGenerationFinished(traceId, started.generation)) {
|
|
9081
|
-
return started.assertions;
|
|
9108
|
+
return withCategoryIds(started.assertions);
|
|
9082
9109
|
}
|
|
9083
9110
|
const timeoutMs = options.timeoutMs ?? DEFAULT_GENERATION_TIMEOUT_MS;
|
|
9084
9111
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -10101,7 +10128,8 @@ var Bitfab = class {
|
|
|
10101
10128
|
this.simulationPlan.refresh();
|
|
10102
10129
|
}
|
|
10103
10130
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
10104
|
-
this.
|
|
10131
|
+
this.categories = new CategoriesClient(this.httpClient);
|
|
10132
|
+
this.assertionCategories = this.categories;
|
|
10105
10133
|
this.organizationMembers = new OrganizationMembersClient(this.httpClient);
|
|
10106
10134
|
this.traces = new TracesClient(this.httpClient);
|
|
10107
10135
|
this.spans = new SpansClient(this.httpClient);
|
|
@@ -12420,6 +12448,7 @@ function resolveTraceFunctionKey(registration) {
|
|
|
12420
12448
|
BitfabOpenAITracingProcessor,
|
|
12421
12449
|
BitfabRivetIntegration,
|
|
12422
12450
|
BitfabVercelAiHandler,
|
|
12451
|
+
CategoriesClient,
|
|
12423
12452
|
DEFAULT_SERVICE_URL,
|
|
12424
12453
|
DatasetsClient,
|
|
12425
12454
|
DbBranchReplayError,
|