@bitfab/sdk 0.65.7 → 0.65.8
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/baml.cjs +12 -0
- package/dist/baml.cjs.map +1 -0
- package/dist/baml.d.cts +1 -0
- package/dist/baml.d.ts +1 -0
- package/dist/baml.js +8 -0
- package/dist/baml.js.map +1 -0
- package/dist/bamlPeer-BUoZgNxZ.cjs +88 -0
- package/dist/bamlPeer-BUoZgNxZ.cjs.map +1 -0
- package/dist/bamlPeer-CIVwS68E.js +28 -0
- package/dist/bamlPeer-CIVwS68E.js.map +1 -0
- package/dist/{http-BaLzqv9W.js → http-C9d2uNjI.js} +2 -2
- package/dist/{http-BaLzqv9W.js.map → http-C9d2uNjI.js.map} +1 -1
- package/dist/http-Cy8I9KDT.cjs +2306 -0
- package/dist/http-Cy8I9KDT.cjs.map +1 -0
- package/dist/{index-qVS-HeqB.d.cts → index-w-vRmDmF.d.cts} +1 -1
- package/dist/{index-qVS-HeqB.d.ts → index-w-vRmDmF.d.ts} +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/node.cjs +7 -6
- 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 +2 -2
- package/dist/registryCommand-Di8x0YoJ.js.map +1 -1
- package/dist/{src-BblbvWfU.js → src-D1RisoK8.js} +13 -28
- package/dist/src-D1RisoK8.js.map +1 -0
- package/dist/{src-DgkDt32g.cjs → src-gxbiiKid.cjs} +190 -2416
- package/dist/src-gxbiiKid.cjs.map +1 -0
- package/package.json +11 -1
- package/dist/src-BblbvWfU.js.map +0 -1
- package/dist/src-DgkDt32g.cjs.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { C as readEnv$1, S as MixedTracingError, _ as getReplayContext, b as gitRunner, c as recordCallerTraceMetadata, f as ROOT_TRACE_FUNCTION_KEY_FIELD, g as MAX_COMPRESSIBLE_SPAN_CARRIER_BYTES, h as makeSpanOrigin, i as flushTraces, l as retireTraceMetadata, m as isFrameworkInstrumentation, n as SPAN_TYPES, o as unrefTimer, p as SimulationPlan, r as experimentIdWireFields, s as callerTraceMetadata, t as HttpClient, v as replayContextReady, w as __version__, x as BitfabError, y as runWithReplayContext } from "./http-
|
|
2
|
+
import { C as readEnv$1, S as MixedTracingError, _ as getReplayContext, b as gitRunner, c as recordCallerTraceMetadata, f as ROOT_TRACE_FUNCTION_KEY_FIELD, g as MAX_COMPRESSIBLE_SPAN_CARRIER_BYTES, h as makeSpanOrigin, i as flushTraces, l as retireTraceMetadata, m as isFrameworkInstrumentation, n as SPAN_TYPES, o as unrefTimer, p as SimulationPlan, r as experimentIdWireFields, s as callerTraceMetadata, t as HttpClient, v as replayContextReady, w as __version__, x as BitfabError, y as runWithReplayContext } from "./http-C9d2uNjI.js";
|
|
3
3
|
import { a as clearAutoTraceNodeConfiguration, b as isAsyncStorageInitDone, c as runAsAutoTraceRootFunction, d as runWithAutoTraceRootContext, g as runWithCaptureSuppressed, h as isCaptureSuppressed, l as runWithAutoTraceEntry, m as writeOnce, n as __bitfabAutoTraceActive, o as currentAutoTraceEntries, p as warnOnce, s as invokeThroughAutoTraceEntries, u as runWithAutoTraceNodeConfiguration, v as asyncStorageReady, y as createAsyncLocalStorage } from "./autoTrace-O40k8f5M.js";
|
|
4
|
+
import { r as importOptionalPeer, t as loadBamlModule } from "./bamlPeer-CIVwS68E.js";
|
|
4
5
|
import superjson from "superjson";
|
|
5
6
|
//#region src/categories.ts
|
|
6
7
|
const CATEGORIES_PATH = "/api/sdk/categories";
|
|
@@ -617,25 +618,11 @@ var BitfabClaudeAgentHandler = class {
|
|
|
617
618
|
}
|
|
618
619
|
};
|
|
619
620
|
//#endregion
|
|
620
|
-
//#region src/optionalPeer.ts
|
|
621
|
-
function importOptionalPeer(specifierParts) {
|
|
622
|
-
return import(
|
|
623
|
-
/* webpackIgnore: true */
|
|
624
|
-
/* @vite-ignore */
|
|
625
|
-
specifierParts.join("/")
|
|
626
|
-
);
|
|
627
|
-
}
|
|
628
|
-
//#endregion
|
|
629
621
|
//#region src/baml.ts
|
|
630
|
-
let cachedBaml = null;
|
|
631
622
|
async function loadBaml() {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
return cachedBaml;
|
|
636
|
-
} catch {
|
|
637
|
-
throw new Error("@boundaryml/baml is required for Bitfab.call(). Install it with: npm install @boundaryml/baml");
|
|
638
|
-
}
|
|
623
|
+
const baml = await loadBamlModule();
|
|
624
|
+
if (!baml) throw new Error("@boundaryml/baml is required for Bitfab.call(). Install it with: npm install @boundaryml/baml. If it is installed and your app is bundled (Next.js with Turbopack, for example), add `import \"@bitfab/sdk/baml\"` once in your server code.");
|
|
625
|
+
return baml;
|
|
639
626
|
}
|
|
640
627
|
function capitalize(str) {
|
|
641
628
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -4495,13 +4482,10 @@ function wrapAsyncGenerator(source, spanStack, sendSpan) {
|
|
|
4495
4482
|
let cachedCollectorClass;
|
|
4496
4483
|
async function loadCollectorClass() {
|
|
4497
4484
|
if (cachedCollectorClass !== void 0) return cachedCollectorClass;
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
cachedCollectorClass = null;
|
|
4503
|
-
return null;
|
|
4504
|
-
}
|
|
4485
|
+
const baml = await loadBamlModule();
|
|
4486
|
+
if (!baml) return null;
|
|
4487
|
+
cachedCollectorClass = baml.Collector;
|
|
4488
|
+
return cachedCollectorClass;
|
|
4505
4489
|
}
|
|
4506
4490
|
function extractPromptFromCollector(collector) {
|
|
4507
4491
|
try {
|
|
@@ -5145,6 +5129,7 @@ var Bitfab = class {
|
|
|
5145
5129
|
const wrappedFn = async (...args) => {
|
|
5146
5130
|
const CollectorClass = await loadCollectorClass();
|
|
5147
5131
|
if (!CollectorClass) {
|
|
5132
|
+
warnOnce("wrapBAML-collector-unavailable", `@boundaryml/baml could not be loaded, so "${methodName}" and every other wrapBAML call run untraced: no prompt, model, or token usage is recorded and onCollector is not called. If @boundaryml/baml is installed and your app is bundled (Next.js with Turbopack, for example), add \`import "@bitfab/sdk/baml"\` once in your server code.`);
|
|
5148
5133
|
wrappedFn.collector = null;
|
|
5149
5134
|
return await bamlClient[methodName](...args);
|
|
5150
5135
|
}
|
|
@@ -5813,7 +5798,7 @@ var Bitfab = class {
|
|
|
5813
5798
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
5814
5799
|
} finally {
|
|
5815
5800
|
try {
|
|
5816
|
-
const { flushTraces } = await import("./http-
|
|
5801
|
+
const { flushTraces } = await import("./http-C9d2uNjI.js").then((n) => n.a);
|
|
5817
5802
|
await flushTraces(3e4);
|
|
5818
5803
|
} finally {
|
|
5819
5804
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -6001,7 +5986,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
6001
5986
|
metadata: seedCase.metadata,
|
|
6002
5987
|
sessionId: seedCase.sessionId
|
|
6003
5988
|
}));
|
|
6004
|
-
const { flushTraces } = await import("./http-
|
|
5989
|
+
const { flushTraces } = await import("./http-C9d2uNjI.js").then((n) => n.a);
|
|
6005
5990
|
await flushTraces(3e4);
|
|
6006
5991
|
return {
|
|
6007
5992
|
pipeline,
|
|
@@ -6018,4 +6003,4 @@ function resolveTraceFunctionKey(registration) {
|
|
|
6018
6003
|
//#endregion
|
|
6019
6004
|
export { SUPPORTED_PROVIDERS as A, BitfabOpenAIAgentHandler as C, LabelsClient as D, BitfabLangGraphCallbackHandler as E, DEFAULT_SERVICE_URL as F, AssertionCategoriesClient as I, CategoriesClient as L, GraderRerunError as M, GraderRerunTimeoutError as N, GradersClient as O, BitfabClaudeAgentHandler as P, OrganizationMembersClient as S, BitfabLangGraphIntegration as T, BITFAB_PROGRESS_PREFIX as _, Bitfab as a, reportReplayProgress as b, getCurrentSpan as c, BitfabOpenAITracingProcessor as d, AssertionGenerationError as f, BitfabRivetIntegration as g, SpansClient as h, finalizers as i, DatasetsClient as j, ExperimentsClient as k, getCurrentTrace as l, TracesClient as m, reseedFromRegistry as n, BitfabFunction as o, AssertionGenerationTimeoutError as p, seedFromRegistry as r, getCurrentReplayBranch as s, defineReplayRegistry as t, BitfabVercelAiHandler as u, DbBranchReplayError as v, NO_MOCK_OVERRIDE as w, serializeReplayResult as x, ReplayError as y };
|
|
6020
6005
|
|
|
6021
|
-
//# sourceMappingURL=src-
|
|
6006
|
+
//# sourceMappingURL=src-D1RisoK8.js.map
|