@bitfab/sdk 0.74.4 → 0.74.5
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/{http-BM1TSXDd.js → http-C_t7m9b_.js} +2 -2
- package/dist/{http-BM1TSXDd.js.map → http-C_t7m9b_.js.map} +1 -1
- package/dist/{http-VtGRzeNI.cjs → http-DNmzk2gf.cjs} +2 -2
- package/dist/{http-VtGRzeNI.cjs.map → http-DNmzk2gf.cjs.map} +1 -1
- package/dist/{index-BiSZ0rGD.d.cts → index-PwbvfBty.d.cts} +40 -8
- package/dist/{index-BiSZ0rGD.d.ts → index-PwbvfBty.d.ts} +40 -8
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node.cjs +2 -2
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -2
- package/dist/{src-Cr4ZJLeB.cjs → src-B7Xv4aR2.cjs} +11 -6
- package/dist/{src-Cr4ZJLeB.cjs.map → src-B7Xv4aR2.cjs.map} +1 -1
- package/dist/{src-Dp8OX46R.js → src-Ch86hs9i.js} +11 -6
- package/dist/{src-Dp8OX46R.js.map → src-Ch86hs9i.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_bamlPeer = require("./bamlPeer-5Ohpq8q9.cjs");
|
|
2
|
-
const require_http = require("./http-
|
|
2
|
+
const require_http = require("./http-DNmzk2gf.cjs");
|
|
3
3
|
const require_autoTrace = require("./autoTrace-DPWV1Xzr.cjs");
|
|
4
4
|
const require_optionalPeer = require("./optionalPeer-CUH756lt.cjs");
|
|
5
5
|
let superjson = require("superjson");
|
|
@@ -4958,6 +4958,7 @@ var SpansClient = class {
|
|
|
4958
4958
|
//#region src/traces.ts
|
|
4959
4959
|
const ASSERTIONS_PATH = "/api/sdk/traces/assertions";
|
|
4960
4960
|
const SEARCH_PATH = "/api/sdk/traces/search";
|
|
4961
|
+
const CODE_DRAFT_SAVE_TIMEOUT_MS = 3e5;
|
|
4961
4962
|
const DEFAULT_GENERATION_TIMEOUT_MS = 6e5;
|
|
4962
4963
|
const GENERATION_POLL_INTERVAL_MS = 2e3;
|
|
4963
4964
|
var AssertionGenerationError = class extends Error {
|
|
@@ -5007,6 +5008,9 @@ function toWireAssertion({ category_assertion_id, ...assertion }) {
|
|
|
5007
5008
|
category_id: categoryId
|
|
5008
5009
|
};
|
|
5009
5010
|
}
|
|
5011
|
+
function asksBitfabToWriteCode(assertion) {
|
|
5012
|
+
return (assertion.kind === "code" || assertion.kind === "hybrid") && assertion.code === void 0;
|
|
5013
|
+
}
|
|
5010
5014
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
5011
5015
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
5012
5016
|
}
|
|
@@ -5039,14 +5043,15 @@ var TracesClient = class {
|
|
|
5039
5043
|
}
|
|
5040
5044
|
async saveAssertionsAll(params) {
|
|
5041
5045
|
if (params.updates.length === 0) return [];
|
|
5042
|
-
|
|
5046
|
+
const body = {
|
|
5043
5047
|
updates: params.updates.map((update) => ({
|
|
5044
5048
|
...update,
|
|
5045
5049
|
assertions: update.assertions.map(toWireAssertion)
|
|
5046
5050
|
})),
|
|
5047
5051
|
source: params.source ?? "agent",
|
|
5048
5052
|
guidedRewrite: params.skipGuidedRewrite !== true
|
|
5049
|
-
}
|
|
5053
|
+
};
|
|
5054
|
+
return withCategoryIds((params.updates.some((update) => update.assertions.some(asksBitfabToWriteCode)) ? await this.httpClient.request(ASSERTIONS_PATH, body, { timeout: CODE_DRAFT_SAVE_TIMEOUT_MS }) : await this.httpClient.request(ASSERTIONS_PATH, body)).assertions);
|
|
5050
5055
|
}
|
|
5051
5056
|
async generateAssertions(traceId, options = {}) {
|
|
5052
5057
|
const started = await this.httpClient.request(traceAssertionsPath(traceId, "/generate"), {
|
|
@@ -7079,7 +7084,7 @@ var Bitfab = class {
|
|
|
7079
7084
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
7080
7085
|
} finally {
|
|
7081
7086
|
try {
|
|
7082
|
-
const { flushTraces } = await Promise.resolve().then(() => require("./http-
|
|
7087
|
+
const { flushTraces } = await Promise.resolve().then(() => require("./http-DNmzk2gf.cjs")).then((n) => n.http_exports);
|
|
7083
7088
|
await flushTraces(3e4);
|
|
7084
7089
|
} finally {
|
|
7085
7090
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -7285,7 +7290,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
7285
7290
|
metadata: seedCase.metadata,
|
|
7286
7291
|
sessionId: seedCase.sessionId
|
|
7287
7292
|
}));
|
|
7288
|
-
const { flushTraces } = await Promise.resolve().then(() => require("./http-
|
|
7293
|
+
const { flushTraces } = await Promise.resolve().then(() => require("./http-DNmzk2gf.cjs")).then((n) => n.http_exports);
|
|
7289
7294
|
await flushTraces(3e4);
|
|
7290
7295
|
return {
|
|
7291
7296
|
pipeline,
|
|
@@ -7535,4 +7540,4 @@ Object.defineProperty(exports, "serializeReplayResult", {
|
|
|
7535
7540
|
}
|
|
7536
7541
|
});
|
|
7537
7542
|
|
|
7538
|
-
//# sourceMappingURL=src-
|
|
7543
|
+
//# sourceMappingURL=src-B7Xv4aR2.cjs.map
|