bitfab 0.64.26 → 0.64.28

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.
Files changed (34) hide show
  1. package/dist/{chunk-ASTEBDSS.js → chunk-5XISBPYE.js} +6 -3
  2. package/dist/{chunk-ASTEBDSS.js.map → chunk-5XISBPYE.js.map} +1 -1
  3. package/dist/{chunk-VD6MDXZW.js → chunk-6LDCF6CT.js} +9 -2
  4. package/dist/chunk-6LDCF6CT.js.map +1 -0
  5. package/dist/{chunk-VO53KBVA.js → chunk-AKEMXWCU.js} +6 -3
  6. package/dist/{chunk-VO53KBVA.js.map → chunk-AKEMXWCU.js.map} +1 -1
  7. package/dist/{chunk-TY2KDCRL.js → chunk-B6MEDBL5.js} +6 -6
  8. package/dist/chunk-B6MEDBL5.js.map +1 -0
  9. package/dist/{chunk-LH5VU43B.js → chunk-C4LDBXZU.js} +9 -2
  10. package/dist/chunk-C4LDBXZU.js.map +1 -0
  11. package/dist/{chunk-MTIBQLYF.js → chunk-WBCKZ2NA.js} +11 -5
  12. package/dist/{chunk-MTIBQLYF.js.map → chunk-WBCKZ2NA.js.map} +1 -1
  13. package/dist/{http-LANLQNQ3.js → http-ATKNNYT2.js} +2 -2
  14. package/dist/{http-CXHTC4WS.js → http-LO4LVZXI.js} +2 -2
  15. package/dist/index.cjs +12 -2
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +22 -3
  18. package/dist/index.d.ts +22 -3
  19. package/dist/index.js +3 -3
  20. package/dist/node.cjs +12 -2
  21. package/dist/node.cjs.map +1 -1
  22. package/dist/node.js +3 -3
  23. package/dist/{replay-2YS2BPDW.js → replay-NDQA27IL.js} +3 -3
  24. package/dist/{replay-DFRQF5TU.js → replay-NWZAOS5L.js} +3 -3
  25. package/dist/replayCli.js +3 -3
  26. package/dist/seedCli.js +3 -3
  27. package/package.json +1 -1
  28. package/dist/chunk-LH5VU43B.js.map +0 -1
  29. package/dist/chunk-TY2KDCRL.js.map +0 -1
  30. package/dist/chunk-VD6MDXZW.js.map +0 -1
  31. /package/dist/{http-CXHTC4WS.js.map → http-ATKNNYT2.js.map} +0 -0
  32. /package/dist/{http-LANLQNQ3.js.map → http-LO4LVZXI.js.map} +0 -0
  33. /package/dist/{replay-2YS2BPDW.js.map → replay-NDQA27IL.js.map} +0 -0
  34. /package/dist/{replay-DFRQF5TU.js.map → replay-NWZAOS5L.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -733,7 +733,7 @@ declare class HttpClient {
733
733
  * Start a replay session by fetching historical traces.
734
734
  * Blocking call - creates an experiment and returns lightweight item references.
735
735
  */
736
- startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
736
+ startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, experimentGroupName?: string, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
737
737
  resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
738
738
  /**
739
739
  * Fetch an external span by ID.
@@ -1569,6 +1569,8 @@ type TraceSearchFilters = {
1569
1569
  callerMetadata?: Record<string, string>;
1570
1570
  name?: string;
1571
1571
  nameContains?: string;
1572
+ /** Only the replay traces this experiment produced. */
1573
+ experimentId?: string;
1572
1574
  };
1573
1575
  type TraceSearchParams = TraceSearchFilters & ({
1574
1576
  callerMetadata: Record<string, string>;
@@ -1576,6 +1578,8 @@ type TraceSearchParams = TraceSearchFilters & ({
1576
1578
  name: string;
1577
1579
  } | {
1578
1580
  nameContains: string;
1581
+ } | {
1582
+ experimentId: string;
1579
1583
  }) & {
1580
1584
  traceFunctionKey?: string;
1581
1585
  cursor?: string | null;
@@ -1589,6 +1593,12 @@ type TraceSearchResult = {
1589
1593
  status: "pending" | "completed" | "failed" | "dropped";
1590
1594
  createdAt: string;
1591
1595
  callerMetadata: Record<string, string>;
1596
+ /** The experiment that produced this trace, or null for a captured trace. */
1597
+ experimentId: string | null;
1598
+ /** Wall-clock time of the whole trace, or null when it has no end time. */
1599
+ durationMs: number | null;
1600
+ /** Token usage summed across the trace, or null when none was recorded. */
1601
+ tokens: TokenUsage | null;
1592
1602
  }>;
1593
1603
  nextCursor: string | null;
1594
1604
  hasMore: boolean;
@@ -2383,8 +2393,17 @@ interface ReplayOptions {
2383
2393
  * not use the historical data you asked for.
2384
2394
  */
2385
2395
  dbBranch?: DbBranchOptions | boolean;
2386
- /** Group ID to associate this replay with an experiment group for live streaming on the experiments page. */
2396
+ /**
2397
+ * Experiment group this replay joins, shown together on the experiments
2398
+ * page. An ID with no group yet creates the group.
2399
+ */
2387
2400
  experimentGroupId?: string;
2401
+ /**
2402
+ * Name for the experiment group in `experimentGroupId`. Applied when this
2403
+ * replay creates the group, or when the group exists without a name. A group
2404
+ * that already has a name keeps it. Requires `experimentGroupId`.
2405
+ */
2406
+ experimentGroupName?: string;
2388
2407
  /**
2389
2408
  * Dataset this replay runs against. Mutually exclusive with `datasetIds`.
2390
2409
  * Alone it replays the dataset's full membership, and with `traceIds` it
@@ -4212,7 +4231,7 @@ interface CommitRef {
4212
4231
  /**
4213
4232
  * SDK version from package.json (injected at build time)
4214
4233
  */
4215
- declare const __version__ = "0.64.26";
4234
+ declare const __version__ = "0.64.28";
4216
4235
 
4217
4236
  /**
4218
4237
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -733,7 +733,7 @@ declare class HttpClient {
733
733
  * Start a replay session by fetching historical traces.
734
734
  * Blocking call - creates an experiment and returns lightweight item references.
735
735
  */
736
- startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
736
+ startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, experimentGroupName?: string, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
737
737
  resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
738
738
  /**
739
739
  * Fetch an external span by ID.
@@ -1569,6 +1569,8 @@ type TraceSearchFilters = {
1569
1569
  callerMetadata?: Record<string, string>;
1570
1570
  name?: string;
1571
1571
  nameContains?: string;
1572
+ /** Only the replay traces this experiment produced. */
1573
+ experimentId?: string;
1572
1574
  };
1573
1575
  type TraceSearchParams = TraceSearchFilters & ({
1574
1576
  callerMetadata: Record<string, string>;
@@ -1576,6 +1578,8 @@ type TraceSearchParams = TraceSearchFilters & ({
1576
1578
  name: string;
1577
1579
  } | {
1578
1580
  nameContains: string;
1581
+ } | {
1582
+ experimentId: string;
1579
1583
  }) & {
1580
1584
  traceFunctionKey?: string;
1581
1585
  cursor?: string | null;
@@ -1589,6 +1593,12 @@ type TraceSearchResult = {
1589
1593
  status: "pending" | "completed" | "failed" | "dropped";
1590
1594
  createdAt: string;
1591
1595
  callerMetadata: Record<string, string>;
1596
+ /** The experiment that produced this trace, or null for a captured trace. */
1597
+ experimentId: string | null;
1598
+ /** Wall-clock time of the whole trace, or null when it has no end time. */
1599
+ durationMs: number | null;
1600
+ /** Token usage summed across the trace, or null when none was recorded. */
1601
+ tokens: TokenUsage | null;
1592
1602
  }>;
1593
1603
  nextCursor: string | null;
1594
1604
  hasMore: boolean;
@@ -2383,8 +2393,17 @@ interface ReplayOptions {
2383
2393
  * not use the historical data you asked for.
2384
2394
  */
2385
2395
  dbBranch?: DbBranchOptions | boolean;
2386
- /** Group ID to associate this replay with an experiment group for live streaming on the experiments page. */
2396
+ /**
2397
+ * Experiment group this replay joins, shown together on the experiments
2398
+ * page. An ID with no group yet creates the group.
2399
+ */
2387
2400
  experimentGroupId?: string;
2401
+ /**
2402
+ * Name for the experiment group in `experimentGroupId`. Applied when this
2403
+ * replay creates the group, or when the group exists without a name. A group
2404
+ * that already has a name keeps it. Requires `experimentGroupId`.
2405
+ */
2406
+ experimentGroupName?: string;
2388
2407
  /**
2389
2408
  * Dataset this replay runs against. Mutually exclusive with `datasetIds`.
2390
2409
  * Alone it replays the dataset's full membership, and with `traceIds` it
@@ -4212,7 +4231,7 @@ interface CommitRef {
4212
4231
  /**
4213
4232
  * SDK version from package.json (injected at build time)
4214
4233
  */
4215
- declare const __version__ = "0.64.26";
4234
+ declare const __version__ = "0.64.28";
4216
4235
 
4217
4236
  /**
4218
4237
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  getCurrentTrace,
38
38
  reseedFromRegistry,
39
39
  seedFromRegistry
40
- } from "./chunk-TY2KDCRL.js";
40
+ } from "./chunk-B6MEDBL5.js";
41
41
  import "./chunk-YWXQM6J3.js";
42
42
  import {
43
43
  BITFAB_PROGRESS_PREFIX,
@@ -46,7 +46,7 @@ import {
46
46
  ReplayError,
47
47
  reportReplayProgress,
48
48
  serializeReplayResult
49
- } from "./chunk-VD6MDXZW.js";
49
+ } from "./chunk-6LDCF6CT.js";
50
50
  import {
51
51
  BitfabError,
52
52
  DEFAULT_SERVICE_URL,
@@ -54,7 +54,7 @@ import {
54
54
  MixedTracingError,
55
55
  __version__,
56
56
  flushTraces
57
- } from "./chunk-VO53KBVA.js";
57
+ } from "./chunk-AKEMXWCU.js";
58
58
  import "./chunk-MT36GJMW.js";
59
59
  export {
60
60
  AssertionCategoriesClient,
package/dist/node.cjs CHANGED
@@ -97,7 +97,7 @@ var __version__, __packageName__;
97
97
  var init_version_generated = __esm({
98
98
  "src/version.generated.ts"() {
99
99
  "use strict";
100
- __version__ = "0.64.26";
100
+ __version__ = "0.64.28";
101
101
  __packageName__ = "bitfab";
102
102
  }
103
103
  });
@@ -2935,7 +2935,7 @@ var init_http = __esm({
2935
2935
  * Start a replay session by fetching historical traces.
2936
2936
  * Blocking call - creates an experiment and returns lightweight item references.
2937
2937
  */
2938
- async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, invocation) {
2938
+ async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, experimentGroupName, invocation) {
2939
2939
  const payload = { traceFunctionKey };
2940
2940
  if (experimentalSelectiveReplay !== void 0) {
2941
2941
  payload.experimentalSelectiveReplay = experimentalSelectiveReplay;
@@ -2968,6 +2968,9 @@ var init_http = __esm({
2968
2968
  if (experimentGroupId !== void 0) {
2969
2969
  payload.experimentGroupId = experimentGroupId;
2970
2970
  }
2971
+ if (experimentGroupName !== void 0) {
2972
+ payload.experimentGroupName = experimentGroupName;
2973
+ }
2971
2974
  if (datasetIds !== void 0) {
2972
2975
  if (datasetIds.length === 1) {
2973
2976
  payload.datasetId = datasetIds[0];
@@ -4787,6 +4790,11 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4787
4790
  "force only applies when resuming an experiment. Pass it together with resume."
4788
4791
  );
4789
4792
  }
4793
+ if (options?.experimentGroupName !== void 0 && options.experimentGroupId === void 0) {
4794
+ throw new BitfabError(
4795
+ "experimentGroupName only applies with experimentGroupId. Pass it together with experimentGroupId."
4796
+ );
4797
+ }
4790
4798
  if (options?.experimentalSelectiveReplay !== void 0) {
4791
4799
  validateSelectiveReplayOptions(options.experimentalSelectiveReplay);
4792
4800
  if ((options.mock ?? "marked") !== "marked" || normalizeMockOverrides(options.mockOverride).length > 0 || registeredOverrides.length > 0) {
@@ -4861,6 +4869,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4861
4869
  options?.notes,
4862
4870
  options?.metadata,
4863
4871
  options?.dryRun === true,
4872
+ options?.experimentGroupName,
4864
4873
  safeReplayInvocation(
4865
4874
  () => buildReplayInvocation(
4866
4875
  Object.entries(cliFlags(options) ?? explicitReplayOptions(options))
@@ -5313,6 +5322,7 @@ var init_replay = __esm({
5313
5322
  "mockOverride",
5314
5323
  "dbBranch",
5315
5324
  "experimentGroupId",
5325
+ "experimentGroupName",
5316
5326
  "datasetId",
5317
5327
  "datasetIds",
5318
5328
  "graderIds",