@bitfab/sdk 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.
- package/dist/{chunk-FSVGIKQT.js → chunk-45NVW5X6.js} +9 -2
- package/dist/chunk-45NVW5X6.js.map +1 -0
- package/dist/{chunk-26WDOYFS.js → chunk-76JZFING.js} +6 -6
- package/dist/chunk-76JZFING.js.map +1 -0
- package/dist/{chunk-PPNFMVOH.js → chunk-DMELEG6J.js} +9 -2
- package/dist/chunk-DMELEG6J.js.map +1 -0
- package/dist/{chunk-NK5RZ3UH.js → chunk-JQAWBK2H.js} +6 -3
- package/dist/{chunk-NK5RZ3UH.js.map → chunk-JQAWBK2H.js.map} +1 -1
- package/dist/{chunk-IHQKJWNN.js → chunk-PRL7RHVH.js} +6 -3
- package/dist/{chunk-IHQKJWNN.js.map → chunk-PRL7RHVH.js.map} +1 -1
- package/dist/{chunk-W6I5QA62.js → chunk-YHOEROQD.js} +11 -5
- package/dist/{chunk-W6I5QA62.js.map → chunk-YHOEROQD.js.map} +1 -1
- package/dist/{http-BK6UJNXI.js → http-5HDU4GXW.js} +2 -2
- package/dist/{http-3WBKIQI4.js → http-BLY35UVE.js} +2 -2
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +3 -3
- package/dist/node.cjs +12 -2
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-ZTEDZUSG.js → replay-CLERHFPY.js} +3 -3
- package/dist/{replay-OEANLAUE.js → replay-HSY2CUX5.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-26WDOYFS.js.map +0 -1
- package/dist/chunk-FSVGIKQT.js.map +0 -1
- package/dist/chunk-PPNFMVOH.js.map +0 -1
- /package/dist/{http-3WBKIQI4.js.map → http-5HDU4GXW.js.map} +0 -0
- /package/dist/{http-BK6UJNXI.js.map → http-BLY35UVE.js.map} +0 -0
- /package/dist/{replay-OEANLAUE.js.map → replay-CLERHFPY.js.map} +0 -0
- /package/dist/{replay-ZTEDZUSG.js.map → replay-HSY2CUX5.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
|
-
/**
|
|
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.
|
|
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
|
-
/**
|
|
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.
|
|
4234
|
+
declare const __version__ = "0.64.28";
|
|
4216
4235
|
|
|
4217
4236
|
/**
|
|
4218
4237
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getCurrentTrace,
|
|
29
29
|
reseedFromRegistry,
|
|
30
30
|
seedFromRegistry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-76JZFING.js";
|
|
32
32
|
import "./chunk-YWXQM6J3.js";
|
|
33
33
|
import {
|
|
34
34
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
ReplayError,
|
|
38
38
|
reportReplayProgress,
|
|
39
39
|
serializeReplayResult
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-45NVW5X6.js";
|
|
41
41
|
import {
|
|
42
42
|
BitfabError,
|
|
43
43
|
DEFAULT_SERVICE_URL,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
MixedTracingError,
|
|
46
46
|
__version__,
|
|
47
47
|
flushTraces
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-PRL7RHVH.js";
|
|
49
49
|
import "./chunk-MT36GJMW.js";
|
|
50
50
|
export {
|
|
51
51
|
AssertionCategoriesClient,
|
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.64.
|
|
91
|
+
__version__ = "0.64.28";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -2926,7 +2926,7 @@ var init_http = __esm({
|
|
|
2926
2926
|
* Start a replay session by fetching historical traces.
|
|
2927
2927
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
2928
2928
|
*/
|
|
2929
|
-
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, invocation) {
|
|
2929
|
+
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, experimentGroupName, invocation) {
|
|
2930
2930
|
const payload = { traceFunctionKey };
|
|
2931
2931
|
if (experimentalSelectiveReplay !== void 0) {
|
|
2932
2932
|
payload.experimentalSelectiveReplay = experimentalSelectiveReplay;
|
|
@@ -2959,6 +2959,9 @@ var init_http = __esm({
|
|
|
2959
2959
|
if (experimentGroupId !== void 0) {
|
|
2960
2960
|
payload.experimentGroupId = experimentGroupId;
|
|
2961
2961
|
}
|
|
2962
|
+
if (experimentGroupName !== void 0) {
|
|
2963
|
+
payload.experimentGroupName = experimentGroupName;
|
|
2964
|
+
}
|
|
2962
2965
|
if (datasetIds !== void 0) {
|
|
2963
2966
|
if (datasetIds.length === 1) {
|
|
2964
2967
|
payload.datasetId = datasetIds[0];
|
|
@@ -4778,6 +4781,11 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4778
4781
|
"force only applies when resuming an experiment. Pass it together with resume."
|
|
4779
4782
|
);
|
|
4780
4783
|
}
|
|
4784
|
+
if (options?.experimentGroupName !== void 0 && options.experimentGroupId === void 0) {
|
|
4785
|
+
throw new BitfabError(
|
|
4786
|
+
"experimentGroupName only applies with experimentGroupId. Pass it together with experimentGroupId."
|
|
4787
|
+
);
|
|
4788
|
+
}
|
|
4781
4789
|
if (options?.experimentalSelectiveReplay !== void 0) {
|
|
4782
4790
|
validateSelectiveReplayOptions(options.experimentalSelectiveReplay);
|
|
4783
4791
|
if ((options.mock ?? "marked") !== "marked" || normalizeMockOverrides(options.mockOverride).length > 0 || registeredOverrides.length > 0) {
|
|
@@ -4852,6 +4860,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4852
4860
|
options?.notes,
|
|
4853
4861
|
options?.metadata,
|
|
4854
4862
|
options?.dryRun === true,
|
|
4863
|
+
options?.experimentGroupName,
|
|
4855
4864
|
safeReplayInvocation(
|
|
4856
4865
|
() => buildReplayInvocation(
|
|
4857
4866
|
Object.entries(cliFlags(options) ?? explicitReplayOptions(options))
|
|
@@ -5304,6 +5313,7 @@ var init_replay = __esm({
|
|
|
5304
5313
|
"mockOverride",
|
|
5305
5314
|
"dbBranch",
|
|
5306
5315
|
"experimentGroupId",
|
|
5316
|
+
"experimentGroupName",
|
|
5307
5317
|
"datasetId",
|
|
5308
5318
|
"datasetIds",
|
|
5309
5319
|
"graderIds",
|