@bitfab/sdk 0.74.3 → 0.74.4

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.
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { C as BitfabError, E as __version__, S as gitRunner, T as readEnv$1, _ as MAX_SPAN_CARRIER_BYTES, b as replayContextReady, 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 byteLength, w as MixedTracingError, x as runWithReplayContext, y as getReplayContext } from "./http-Dd0XLEqA.js";
2
+ import { C as BitfabError, E as __version__, S as gitRunner, T as readEnv$1, _ as MAX_SPAN_CARRIER_BYTES, b as replayContextReady, 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 byteLength, w as MixedTracingError, x as runWithReplayContext, y as getReplayContext } from "./http-BM1TSXDd.js";
3
3
  import { A as unmapOpenAiAgentsTrace, B as asyncStorageReady, C as recordAutoTracedClientCall, D as mapOpenAiAgentsTrace, E as endOpenAiAgentsSpan, F as warnOnce, H as isAsyncStorageInitDone, I as writeOnce, L as isCaptureSuppressed, M as installLangChainRunScopes, N as markLangChainRunRecorded, O as openAiAgentsParentSpanId, R as runWithCaptureSuppressed, S as frameworkRecordsClientCall, T as watchClientCall, V as createAsyncLocalStorage, _ as runWithAutoTraceRootContext, b as OPENROUTER, f as invokeThroughAutoTraceEntries, g as runWithAutoTraceNodeConfiguration, h as runWithAutoTraceFramesAt, j as forgetLangChainRun, k as openAiAgentsSpanChain, l as clearAutoTraceNodeConfiguration, m as runWithAutoTraceEntry, o as __bitfabAutoTraceActive, p as runAsAutoTraceRootFunction, u as currentAutoTraceEntries, v as ANTHROPIC, w as recordWatchedClientCall, x as clientCallProvider, y as OPENAI_RESPONSES } from "./autoTrace-kHOBg49M.js";
4
4
  import { t as importOptionalPeer } from "./optionalPeer-CczrzrXx.js";
5
5
  import { t as loadBamlModule } from "./bamlPeer-Dyeb3e5o.js";
@@ -3735,6 +3735,7 @@ const RESUME_CONFLICTING_OPTIONS = [
3735
3735
  "attempts",
3736
3736
  "graderIds",
3737
3737
  "onlyWithAssertions",
3738
+ "categoryIds",
3738
3739
  "dryRun",
3739
3740
  "experimentalSelectiveReplay"
3740
3741
  ];
@@ -3842,6 +3843,7 @@ const REPLAY_OPTION_NAMES = [
3842
3843
  "datasetIds",
3843
3844
  "graderIds",
3844
3845
  "onlyWithAssertions",
3846
+ "categoryIds",
3845
3847
  "skipAssertionJudging",
3846
3848
  "judgeAssertions",
3847
3849
  "adaptInputs",
@@ -4212,6 +4214,10 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4212
4214
  if (options.traceIds.length > 100) throw new BitfabError(`traceIds supports at most 100 trace IDs per replay (got ${options.traceIds.length}).`);
4213
4215
  }
4214
4216
  const datasetIds = resolveDatasetIds(options);
4217
+ if (options?.categoryIds !== void 0) {
4218
+ if (options.categoryIds.length === 0) throw new BitfabError("categoryIds must contain at least one category ID.");
4219
+ if (options.traceIds === void 0 && datasetIds === void 0) throw new BitfabError("categoryIds narrows a trace ID or dataset selection. Pass it with traceIds, datasetId or datasetIds.");
4220
+ }
4215
4221
  if (options?.limit !== void 0 && options?.traceIds !== void 0) try {
4216
4222
  console.warn("Bitfab: limit is ignored when traceIds is passed: the explicit trace ID list already determines how many traces replay.");
4217
4223
  } catch {}
@@ -4223,7 +4229,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4223
4229
  const includeDbBranchLease = dbBranchEnabled(options?.dbBranch) && options?.dryRun !== true;
4224
4230
  let session;
4225
4231
  if (options?.resume === void 0) {
4226
- const started = await httpClient.startReplay(traceFunctionKey, options?.traceIds ? void 0 : options?.limit ?? 5, options?.traceIds, options?.name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, options?.experimentGroupId, datasetIds, options?.graderIds, resolveDbBranchSettings(options?.dbBranch), requestedAttempts, options?.adaptInputs !== void 0, options?.onlyWithAssertions, options?.skipAssertionJudging === true || options?.judgeAssertions === false, options?.experimentalSelectiveReplay, options?.notes, options?.metadata, options?.dryRun === true, options?.experimentGroupName, safeReplayInvocation(() => buildReplayInvocation(Object.entries(cliFlags(options) ?? explicitReplayOptions(options)))), codeChangeType);
4232
+ const started = await httpClient.startReplay(traceFunctionKey, options?.traceIds ? void 0 : options?.limit ?? 5, options?.traceIds, options?.name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, options?.experimentGroupId, datasetIds, options?.graderIds, resolveDbBranchSettings(options?.dbBranch), requestedAttempts, options?.adaptInputs !== void 0, options?.onlyWithAssertions, options?.skipAssertionJudging === true || options?.judgeAssertions === false, options?.experimentalSelectiveReplay, options?.notes, options?.metadata, options?.dryRun === true, options?.experimentGroupName, safeReplayInvocation(() => buildReplayInvocation(Object.entries(cliFlags(options) ?? explicitReplayOptions(options)))), codeChangeType, options?.categoryIds);
4227
4233
  if (started.items.length === 0) try {
4228
4234
  console.warn(`Bitfab: no traces matched "${traceFunctionKey}", so this replay ran nothing. Capture a trace, or seed one with seedTrace, before replaying.`);
4229
4235
  } catch {}
@@ -7073,7 +7079,7 @@ var Bitfab = class {
7073
7079
  await runWithSeedContext({ traceId }, async () => target(...args));
7074
7080
  } finally {
7075
7081
  try {
7076
- const { flushTraces } = await import("./http-Dd0XLEqA.js").then((n) => n.a);
7082
+ const { flushTraces } = await import("./http-BM1TSXDd.js").then((n) => n.a);
7077
7083
  await flushTraces(3e4);
7078
7084
  } finally {
7079
7085
  unrecorded = activeTraceStates.delete(traceId);
@@ -7279,7 +7285,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
7279
7285
  metadata: seedCase.metadata,
7280
7286
  sessionId: seedCase.sessionId
7281
7287
  }));
7282
- const { flushTraces } = await import("./http-Dd0XLEqA.js").then((n) => n.a);
7288
+ const { flushTraces } = await import("./http-BM1TSXDd.js").then((n) => n.a);
7283
7289
  await flushTraces(3e4);
7284
7290
  return {
7285
7291
  pipeline,
@@ -7296,4 +7302,4 @@ function resolveTraceFunctionKey(registration) {
7296
7302
  //#endregion
7297
7303
  export { VerdictsClient as A, OrganizationMembersClient as C, BitfabLangGraphCallbackHandler as D, BitfabLangGraphIntegration as E, GraderRerunTimeoutError as F, BitfabClaudeAgentHandler as I, DEFAULT_SERVICE_URL as L, SUPPORTED_PROVIDERS as M, DatasetsClient as N, GradersClient as O, GraderRerunError as P, AssertionCategoriesClient as R, BitfabPiIntegration as S, NO_MOCK_OVERRIDE 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, ExperimentsClient as j, LabelsClient 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, BitfabOpenAIAgentHandler as w, serializeReplayResult as x, ReplayError as y, CategoriesClient as z };
7298
7304
 
7299
- //# sourceMappingURL=src-v9Cp4amm.js.map
7305
+ //# sourceMappingURL=src-Dp8OX46R.js.map