@bitfab/sdk 0.64.30 → 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/dist/{chunk-GLBBZLG2.js → chunk-3W6RLPGK.js} +4 -4
- package/dist/chunk-3W6RLPGK.js.map +1 -0
- package/dist/{chunk-PIMCRSR2.js → chunk-JIGT4NC5.js} +2 -2
- package/dist/{chunk-N3CG4AHU.js → chunk-JXIW4FOF.js} +2 -2
- package/dist/{chunk-BTCJ5XGH.js → chunk-SUXEIG4U.js} +42 -14
- package/dist/chunk-SUXEIG4U.js.map +1 -0
- package/dist/{chunk-DARYURT3.js → chunk-TNIJXUGC.js} +2 -2
- package/dist/chunk-TNIJXUGC.js.map +1 -0
- package/dist/{chunk-5H2UZ2LR.js → chunk-WW2RMMTA.js} +2 -2
- package/dist/chunk-WW2RMMTA.js.map +1 -0
- package/dist/{http-5HVQJKA7.js → http-7LTYEMJO.js} +2 -2
- package/dist/{http-JI7TADRE.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-FRGREQBV.js → replay-D7AN6O25.js} +3 -3
- package/dist/{replay-WL7ZJP3A.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-5H2UZ2LR.js.map +0 -1
- package/dist/chunk-BTCJ5XGH.js.map +0 -1
- package/dist/chunk-DARYURT3.js.map +0 -1
- package/dist/chunk-GLBBZLG2.js.map +0 -1
- /package/dist/{chunk-PIMCRSR2.js.map → chunk-JIGT4NC5.js.map} +0 -0
- /package/dist/{chunk-N3CG4AHU.js.map → chunk-JXIW4FOF.js.map} +0 -0
- /package/dist/{http-5HVQJKA7.js.map → http-7LTYEMJO.js.map} +0 -0
- /package/dist/{http-JI7TADRE.js.map → http-NNVOMI63.js.map} +0 -0
- /package/dist/{replay-FRGREQBV.js.map → replay-D7AN6O25.js.map} +0 -0
- /package/dist/{replay-WL7ZJP3A.js.map → replay-L56SESG7.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
replayContextReady,
|
|
9
9
|
runWithReplayContext,
|
|
10
10
|
unrefTimer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TNIJXUGC.js";
|
|
12
12
|
import {
|
|
13
13
|
runWithCaptureSuppressed,
|
|
14
14
|
warnOnce,
|
|
@@ -2057,4 +2057,4 @@ export {
|
|
|
2057
2057
|
warnJudgeAssertionsDeprecated,
|
|
2058
2058
|
replay
|
|
2059
2059
|
};
|
|
2060
|
-
//# sourceMappingURL=chunk-
|
|
2060
|
+
//# sourceMappingURL=chunk-JIGT4NC5.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
unrefTimer,
|
|
10
10
|
warnOnce,
|
|
11
11
|
writeOnce
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WW2RMMTA.js";
|
|
13
13
|
|
|
14
14
|
// src/codeChange.ts
|
|
15
15
|
var MAX_FILES = 60;
|
|
@@ -1909,4 +1909,4 @@ export {
|
|
|
1909
1909
|
warnJudgeAssertionsDeprecated,
|
|
1910
1910
|
replay
|
|
1911
1911
|
};
|
|
1912
|
-
//# sourceMappingURL=chunk-
|
|
1912
|
+
//# sourceMappingURL=chunk-JXIW4FOF.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
serializeValue,
|
|
18
18
|
toJsonSafe,
|
|
19
19
|
toJsonSafeReport
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JIGT4NC5.js";
|
|
21
21
|
import {
|
|
22
22
|
BitfabError,
|
|
23
23
|
CONTENT_OFF_KEY,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
readEnv,
|
|
38
38
|
recordCallerTraceMetadata,
|
|
39
39
|
retireTraceMetadata
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-TNIJXUGC.js";
|
|
41
41
|
import {
|
|
42
42
|
__privateAdd,
|
|
43
43
|
__privateGet,
|
|
@@ -49,9 +49,9 @@ import {
|
|
|
49
49
|
warnOnce
|
|
50
50
|
} from "./chunk-MT36GJMW.js";
|
|
51
51
|
|
|
52
|
-
// src/
|
|
53
|
-
var CATEGORIES_PATH = "/api/sdk/
|
|
54
|
-
var
|
|
52
|
+
// src/categories.ts
|
|
53
|
+
var CATEGORIES_PATH = "/api/sdk/categories";
|
|
54
|
+
var CategoriesClient = class {
|
|
55
55
|
constructor(httpClient) {
|
|
56
56
|
this.httpClient = httpClient;
|
|
57
57
|
}
|
|
@@ -78,6 +78,7 @@ var AssertionCategoriesClient = class {
|
|
|
78
78
|
return response.category;
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
+
var AssertionCategoriesClient = CategoriesClient;
|
|
81
82
|
|
|
82
83
|
// src/processorPayload.ts
|
|
83
84
|
var SERIALIZATION_DEGRADED_STEP = "serialization_degraded";
|
|
@@ -3444,6 +3445,27 @@ function draftsInGenerationOrder(assertions, assertionIds) {
|
|
|
3444
3445
|
return assertion === void 0 ? [] : [assertion];
|
|
3445
3446
|
});
|
|
3446
3447
|
}
|
|
3448
|
+
function withCategoryId(assertion) {
|
|
3449
|
+
const categoryId = assertion.category_id ?? assertion.category_assertion_id ?? null;
|
|
3450
|
+
return {
|
|
3451
|
+
...assertion,
|
|
3452
|
+
category_id: categoryId,
|
|
3453
|
+
category_assertion_id: categoryId
|
|
3454
|
+
};
|
|
3455
|
+
}
|
|
3456
|
+
function withCategoryIds(assertions) {
|
|
3457
|
+
return assertions.map(withCategoryId);
|
|
3458
|
+
}
|
|
3459
|
+
function toWireAssertion({
|
|
3460
|
+
category_assertion_id,
|
|
3461
|
+
...assertion
|
|
3462
|
+
}) {
|
|
3463
|
+
const categoryId = assertion.category_id === void 0 ? category_assertion_id : assertion.category_id;
|
|
3464
|
+
if (categoryId === void 0) {
|
|
3465
|
+
return assertion;
|
|
3466
|
+
}
|
|
3467
|
+
return { ...assertion, category_id: categoryId };
|
|
3468
|
+
}
|
|
3447
3469
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
3448
3470
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
3449
3471
|
}
|
|
@@ -3458,9 +3480,10 @@ var TracesClient = class {
|
|
|
3458
3480
|
return this.httpClient.request(SEARCH_PATH, params);
|
|
3459
3481
|
}
|
|
3460
3482
|
async getAssertions(traceId) {
|
|
3461
|
-
|
|
3483
|
+
const result = await this.httpClient.get(
|
|
3462
3484
|
traceAssertionsPath(traceId)
|
|
3463
3485
|
);
|
|
3486
|
+
return { ...result, assertions: withCategoryIds(result.assertions) };
|
|
3464
3487
|
}
|
|
3465
3488
|
async saveAssertions(params) {
|
|
3466
3489
|
return this.saveAssertionsAll({
|
|
@@ -3473,10 +3496,13 @@ var TracesClient = class {
|
|
|
3473
3496
|
return [];
|
|
3474
3497
|
}
|
|
3475
3498
|
const response = await this.httpClient.request(ASSERTIONS_PATH, {
|
|
3476
|
-
updates: params.updates
|
|
3499
|
+
updates: params.updates.map((update) => ({
|
|
3500
|
+
...update,
|
|
3501
|
+
assertions: update.assertions.map(toWireAssertion)
|
|
3502
|
+
})),
|
|
3477
3503
|
source: params.source ?? "agent"
|
|
3478
3504
|
});
|
|
3479
|
-
return response.assertions;
|
|
3505
|
+
return withCategoryIds(response.assertions);
|
|
3480
3506
|
}
|
|
3481
3507
|
async generateAssertions(traceId, options = {}) {
|
|
3482
3508
|
const started = await this.httpClient.request(
|
|
@@ -3488,7 +3514,7 @@ var TracesClient = class {
|
|
|
3488
3514
|
}
|
|
3489
3515
|
);
|
|
3490
3516
|
if (isGenerationFinished(traceId, started.generation)) {
|
|
3491
|
-
return started.assertions;
|
|
3517
|
+
return withCategoryIds(started.assertions);
|
|
3492
3518
|
}
|
|
3493
3519
|
const timeoutMs = options.timeoutMs ?? DEFAULT_GENERATION_TIMEOUT_MS;
|
|
3494
3520
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -4506,7 +4532,8 @@ var Bitfab = class {
|
|
|
4506
4532
|
this.simulationPlan.refresh();
|
|
4507
4533
|
}
|
|
4508
4534
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
4509
|
-
this.
|
|
4535
|
+
this.categories = new CategoriesClient(this.httpClient);
|
|
4536
|
+
this.assertionCategories = this.categories;
|
|
4510
4537
|
this.organizationMembers = new OrganizationMembersClient(this.httpClient);
|
|
4511
4538
|
this.traces = new TracesClient(this.httpClient);
|
|
4512
4539
|
this.spans = new SpansClient(this.httpClient);
|
|
@@ -6376,7 +6403,7 @@ var Bitfab = class {
|
|
|
6376
6403
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
6377
6404
|
} finally {
|
|
6378
6405
|
try {
|
|
6379
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
6406
|
+
const { flushTraces: flushTraces2 } = await import("./http-7LTYEMJO.js");
|
|
6380
6407
|
await flushTraces2(3e4);
|
|
6381
6408
|
} finally {
|
|
6382
6409
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -6435,7 +6462,7 @@ var Bitfab = class {
|
|
|
6435
6462
|
`Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
|
|
6436
6463
|
);
|
|
6437
6464
|
}
|
|
6438
|
-
const { replay: doReplay } = await import("./replay-
|
|
6465
|
+
const { replay: doReplay } = await import("./replay-L56SESG7.js");
|
|
6439
6466
|
return doReplay(
|
|
6440
6467
|
this.httpClient,
|
|
6441
6468
|
this.serviceUrl,
|
|
@@ -6781,7 +6808,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
6781
6808
|
sessionId: seedCase.sessionId
|
|
6782
6809
|
})
|
|
6783
6810
|
);
|
|
6784
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
6811
|
+
const { flushTraces: flushTraces2 } = await import("./http-7LTYEMJO.js");
|
|
6785
6812
|
await flushTraces2(3e4);
|
|
6786
6813
|
return { pipeline, traceFunctionKey, traceIds };
|
|
6787
6814
|
}
|
|
@@ -6797,6 +6824,7 @@ function resolveTraceFunctionKey(registration) {
|
|
|
6797
6824
|
}
|
|
6798
6825
|
|
|
6799
6826
|
export {
|
|
6827
|
+
CategoriesClient,
|
|
6800
6828
|
AssertionCategoriesClient,
|
|
6801
6829
|
BitfabClaudeAgentHandler,
|
|
6802
6830
|
GraderRerunError,
|
|
@@ -6827,4 +6855,4 @@ export {
|
|
|
6827
6855
|
reseedFromRegistry,
|
|
6828
6856
|
seedFromRegistry
|
|
6829
6857
|
};
|
|
6830
|
-
//# sourceMappingURL=chunk-
|
|
6858
|
+
//# sourceMappingURL=chunk-SUXEIG4U.js.map
|