@bitfab/sdk 0.62.8 → 0.63.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.
Files changed (36) hide show
  1. package/dist/autoTrace.cjs.map +1 -1
  2. package/dist/autoTrace.js +2 -2
  3. package/dist/{chunk-BAOIRE5T.js → chunk-MT36GJMW.js} +13 -2
  4. package/dist/{chunk-BAOIRE5T.js.map → chunk-MT36GJMW.js.map} +1 -1
  5. package/dist/{chunk-EIYFITIN.js → chunk-MV4RDU2G.js} +15 -4
  6. package/dist/chunk-MV4RDU2G.js.map +1 -0
  7. package/dist/{chunk-PMJB43RG.js → chunk-P5NCLTE4.js} +8 -8
  8. package/dist/{chunk-PMJB43RG.js.map → chunk-P5NCLTE4.js.map} +1 -1
  9. package/dist/{chunk-CFCJQJ6X.js → chunk-SXAL4FQV.js} +19 -5
  10. package/dist/chunk-SXAL4FQV.js.map +1 -0
  11. package/dist/{chunk-HOAPC5CK.js → chunk-TSP6722V.js} +5 -5
  12. package/dist/{chunk-HOAPC5CK.js.map → chunk-TSP6722V.js.map} +1 -1
  13. package/dist/{chunk-BIFLKRPT.js → chunk-WGQIBPZP.js} +24 -7
  14. package/dist/chunk-WGQIBPZP.js.map +1 -0
  15. package/dist/{chunk-K4XCWQBC.js → chunk-YWXQM6J3.js} +2 -2
  16. package/dist/{http-523END2I.js → http-7N55SPQM.js} +2 -2
  17. package/dist/{http-Q5ENQTX4.js → http-FYNNU6X7.js} +3 -3
  18. package/dist/index.cjs +30 -6
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +3 -7
  21. package/dist/index.d.ts +3 -7
  22. package/dist/index.js +5 -5
  23. package/dist/node.cjs +30 -6
  24. package/dist/node.cjs.map +1 -1
  25. package/dist/node.js +5 -5
  26. package/dist/{replay-6M4EUBNG.js → replay-LZXSZXTQ.js} +10 -6
  27. package/dist/replayCli.js +2 -2
  28. package/dist/seedCli.js +2 -2
  29. package/package.json +1 -1
  30. package/dist/chunk-BIFLKRPT.js.map +0 -1
  31. package/dist/chunk-CFCJQJ6X.js.map +0 -1
  32. package/dist/chunk-EIYFITIN.js.map +0 -1
  33. /package/dist/{chunk-K4XCWQBC.js.map → chunk-YWXQM6J3.js.map} +0 -0
  34. /package/dist/{http-523END2I.js.map → http-7N55SPQM.js.map} +0 -0
  35. /package/dist/{http-Q5ENQTX4.js.map → http-FYNNU6X7.js.map} +0 -0
  36. /package/dist/{replay-6M4EUBNG.js.map → replay-LZXSZXTQ.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -697,7 +697,7 @@ declare class HttpClient {
697
697
  * Start a replay session by fetching historical traces.
698
698
  * Blocking call - creates an experiment and returns lightweight item references.
699
699
  */
700
- 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, judgeAssertions?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>): Promise<StartReplayResponse>;
700
+ 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>): Promise<StartReplayResponse>;
701
701
  resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
702
702
  /**
703
703
  * Fetch an external span by ID.
@@ -2223,11 +2223,7 @@ interface ReplayOptions {
2223
2223
  * replays nothing.
2224
2224
  */
2225
2225
  onlyWithAssertions?: boolean;
2226
- /**
2227
- * Judge every approved assertion on each replay as it finishes and save the
2228
- * verdict as that assertion's agent label. Off unless asked: each judgement
2229
- * costs model calls.
2230
- */
2226
+ skipAssertionJudging?: boolean;
2231
2227
  judgeAssertions?: boolean;
2232
2228
  /**
2233
2229
  * Reshape recorded inputs before they are spread into `fn`.
@@ -3977,7 +3973,7 @@ interface CommitRef {
3977
3973
  /**
3978
3974
  * SDK version from package.json (injected at build time)
3979
3975
  */
3980
- declare const __version__ = "0.62.8";
3976
+ declare const __version__ = "0.63.0";
3981
3977
 
3982
3978
  /**
3983
3979
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -697,7 +697,7 @@ declare class HttpClient {
697
697
  * Start a replay session by fetching historical traces.
698
698
  * Blocking call - creates an experiment and returns lightweight item references.
699
699
  */
700
- 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, judgeAssertions?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>): Promise<StartReplayResponse>;
700
+ 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>): Promise<StartReplayResponse>;
701
701
  resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
702
702
  /**
703
703
  * Fetch an external span by ID.
@@ -2223,11 +2223,7 @@ interface ReplayOptions {
2223
2223
  * replays nothing.
2224
2224
  */
2225
2225
  onlyWithAssertions?: boolean;
2226
- /**
2227
- * Judge every approved assertion on each replay as it finishes and save the
2228
- * verdict as that assertion's agent label. Off unless asked: each judgement
2229
- * costs model calls.
2230
- */
2226
+ skipAssertionJudging?: boolean;
2231
2227
  judgeAssertions?: boolean;
2232
2228
  /**
2233
2229
  * Reshape recorded inputs before they are spread into `fn`.
@@ -3977,7 +3973,7 @@ interface CommitRef {
3977
3973
  /**
3978
3974
  * SDK version from package.json (injected at build time)
3979
3975
  */
3980
- declare const __version__ = "0.62.8";
3976
+ declare const __version__ = "0.63.0";
3981
3977
 
3982
3978
  /**
3983
3979
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -27,8 +27,8 @@ import {
27
27
  getCurrentTrace,
28
28
  reseedFromRegistry,
29
29
  seedFromRegistry
30
- } from "./chunk-PMJB43RG.js";
31
- import "./chunk-K4XCWQBC.js";
30
+ } from "./chunk-P5NCLTE4.js";
31
+ import "./chunk-YWXQM6J3.js";
32
32
  import {
33
33
  BITFAB_PROGRESS_PREFIX,
34
34
  DbBranchReplayError,
@@ -36,7 +36,7 @@ import {
36
36
  ReplayError,
37
37
  reportReplayProgress,
38
38
  serializeReplayResult
39
- } from "./chunk-CFCJQJ6X.js";
39
+ } from "./chunk-SXAL4FQV.js";
40
40
  import {
41
41
  BitfabError,
42
42
  DEFAULT_SERVICE_URL,
@@ -44,8 +44,8 @@ import {
44
44
  MixedTracingError,
45
45
  __version__,
46
46
  flushTraces
47
- } from "./chunk-HOAPC5CK.js";
48
- import "./chunk-BAOIRE5T.js";
47
+ } from "./chunk-TSP6722V.js";
48
+ import "./chunk-MT36GJMW.js";
49
49
  export {
50
50
  AssertionCategoriesClient,
51
51
  AssertionGenerationError,
package/dist/node.cjs CHANGED
@@ -88,7 +88,7 @@ var __version__, __packageName__;
88
88
  var init_version_generated = __esm({
89
89
  "src/version.generated.ts"() {
90
90
  "use strict";
91
- __version__ = "0.62.8";
91
+ __version__ = "0.63.0";
92
92
  __packageName__ = "@bitfab/sdk";
93
93
  }
94
94
  });
@@ -720,6 +720,16 @@ function warnOnce(key, message) {
720
720
  warned.add(key);
721
721
  warn(message);
722
722
  }
723
+ function writeOnce(key, line, write = console.warn) {
724
+ if (warned.has(key)) {
725
+ return;
726
+ }
727
+ warned.add(key);
728
+ try {
729
+ write(line);
730
+ } catch {
731
+ }
732
+ }
723
733
  var warned;
724
734
  var init_warnOnce = __esm({
725
735
  "src/warnOnce.ts"() {
@@ -2892,7 +2902,7 @@ var init_http = __esm({
2892
2902
  * Start a replay session by fetching historical traces.
2893
2903
  * Blocking call - creates an experiment and returns lightweight item references.
2894
2904
  */
2895
- async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, judgeAssertions, experimentalSelectiveReplay, notes, metadata) {
2905
+ async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata) {
2896
2906
  const payload = { traceFunctionKey };
2897
2907
  if (experimentalSelectiveReplay !== void 0) {
2898
2908
  payload.experimentalSelectiveReplay = experimentalSelectiveReplay;
@@ -2947,7 +2957,7 @@ var init_http = __esm({
2947
2957
  if (onlyWithAssertions) {
2948
2958
  payload.onlyWithAssertions = true;
2949
2959
  }
2950
- if (judgeAssertions) {
2960
+ if (skipAssertionJudging !== true) {
2951
2961
  payload.judgeAssertions = true;
2952
2962
  }
2953
2963
  const git = await resolvedGitState();
@@ -4032,13 +4042,15 @@ var replay_exports = {};
4032
4042
  __export(replay_exports, {
4033
4043
  BITFAB_PROGRESS_PREFIX: () => BITFAB_PROGRESS_PREFIX,
4034
4044
  DbBranchReplayError: () => DbBranchReplayError,
4045
+ JUDGE_ASSERTIONS_DEPRECATION_WARNING: () => JUDGE_ASSERTIONS_DEPRECATION_WARNING,
4035
4046
  ReplayError: () => ReplayError,
4036
4047
  deserializeInputs: () => deserializeInputs,
4037
4048
  replay: () => replay,
4038
4049
  reportReplayProgress: () => reportReplayProgress,
4039
4050
  serializeReplayResult: () => serializeReplayResult,
4040
4051
  sleepForReplayPersistence: () => sleepForReplayPersistence,
4041
- waitForReplayPersistence: () => waitForReplayPersistence
4052
+ waitForReplayPersistence: () => waitForReplayPersistence,
4053
+ warnJudgeAssertionsDeprecated: () => warnJudgeAssertionsDeprecated
4042
4054
  });
4043
4055
  function expandReplayWork(serverItems, attempts) {
4044
4056
  return Array.from(
@@ -4589,7 +4601,17 @@ async function mapWithConcurrency2(tasks, maxConcurrency, onSettled, onStarted,
4589
4601
  await Promise.all(workers);
4590
4602
  return results.slice(0, nextIndex);
4591
4603
  }
4604
+ function warnJudgeAssertionsDeprecated(write = console.warn) {
4605
+ writeOnce(
4606
+ "judgeAssertions-deprecated",
4607
+ JUDGE_ASSERTIONS_DEPRECATION_WARNING,
4608
+ write
4609
+ );
4610
+ }
4592
4611
  async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, registeredOverrides = []) {
4612
+ if (options?.judgeAssertions !== void 0) {
4613
+ warnJudgeAssertionsDeprecated();
4614
+ }
4593
4615
  if (options?.resume !== void 0) {
4594
4616
  validateResume(options.resume, options);
4595
4617
  } else if (options?.force === true) {
@@ -4666,7 +4688,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4666
4688
  requestedAttempts,
4667
4689
  options?.adaptInputs !== void 0,
4668
4690
  options?.onlyWithAssertions,
4669
- options?.judgeAssertions,
4691
+ options?.skipAssertionJudging === true || options?.judgeAssertions === false,
4670
4692
  options?.experimentalSelectiveReplay,
4671
4693
  options?.notes,
4672
4694
  options?.metadata
@@ -5041,7 +5063,7 @@ async function writeReplayResultFile(result) {
5041
5063
  }
5042
5064
  }
5043
5065
  }
5044
- var REPLAY_PERSISTENCE_TIMEOUT_MS, MAX_REPLAY_ATTEMPTS, RESUME_CONFLICTING_OPTIONS, CARRIED_OVER_ERROR, BITFAB_PROGRESS_PREFIX, ReplayError, DbBranchReplayError;
5066
+ var REPLAY_PERSISTENCE_TIMEOUT_MS, MAX_REPLAY_ATTEMPTS, RESUME_CONFLICTING_OPTIONS, CARRIED_OVER_ERROR, BITFAB_PROGRESS_PREFIX, ReplayError, DbBranchReplayError, JUDGE_ASSERTIONS_DEPRECATION_WARNING;
5045
5067
  var init_replay = __esm({
5046
5068
  "src/replay.ts"() {
5047
5069
  "use strict";
@@ -5056,6 +5078,7 @@ var init_replay = __esm({
5056
5078
  init_replayInterrupt();
5057
5079
  init_selectiveReplayRuntime();
5058
5080
  init_serialize();
5081
+ init_warnOnce();
5059
5082
  REPLAY_PERSISTENCE_TIMEOUT_MS = 3e4;
5060
5083
  MAX_REPLAY_ATTEMPTS = 100;
5061
5084
  RESUME_CONFLICTING_OPTIONS = [
@@ -5092,6 +5115,7 @@ var init_replay = __esm({
5092
5115
  this.name = "DbBranchReplayError";
5093
5116
  }
5094
5117
  };
5118
+ JUDGE_ASSERTIONS_DEPRECATION_WARNING = "Bitfab: judgeAssertions is deprecated. Assertion judging is on by default; pass skipAssertionJudging: true (--skip-assertion-judging) to turn it off.";
5095
5119
  }
5096
5120
  });
5097
5121