bitfab 0.28.0 → 0.28.2
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-MD4XQGAF.js → chunk-3PCOUZZP.js} +11 -3
- package/dist/chunk-3PCOUZZP.js.map +1 -0
- package/dist/{chunk-RS5Z6YXY.js → chunk-NZFPJRD3.js} +4 -4
- package/dist/{chunk-RS5Z6YXY.js.map → chunk-NZFPJRD3.js.map} +1 -1
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +2 -2
- package/dist/node.cjs +11 -3
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-J3YTYE7V.js → replay-PZKPWKMV.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-MD4XQGAF.js.map +0 -1
- /package/dist/{replay-J3YTYE7V.js.map → replay-PZKPWKMV.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -680,6 +680,8 @@ interface ReplayOptions {
|
|
|
680
680
|
}
|
|
681
681
|
/** Running totals reported to {@link ReplayOptions.onProgress} as replay proceeds. */
|
|
682
682
|
interface ReplayProgress {
|
|
683
|
+
/** Test run ID created for this replay. */
|
|
684
|
+
testRunId?: string;
|
|
683
685
|
/** Items that have finished so far, whether they succeeded or errored. */
|
|
684
686
|
completed: number;
|
|
685
687
|
/** Total number of items in this replay run. */
|
|
@@ -697,9 +699,21 @@ interface ReplayProgress {
|
|
|
697
699
|
* {@link ReplayResult}.
|
|
698
700
|
*/
|
|
699
701
|
item?: {
|
|
702
|
+
/** Source (historical) trace ID being replayed. */
|
|
700
703
|
traceId: string | null;
|
|
704
|
+
/** Local SDK replay trace ID, before the server maps it to a row ID. */
|
|
705
|
+
replayTraceId?: string | null;
|
|
706
|
+
/** Deserialized inputs from the original trace. */
|
|
707
|
+
input?: unknown[];
|
|
708
|
+
/** The result returned by the replayed function, or undefined on error. */
|
|
709
|
+
result?: unknown;
|
|
710
|
+
/** The original output from the historical trace. */
|
|
711
|
+
originalOutput?: unknown;
|
|
701
712
|
error: string | null;
|
|
702
713
|
durationMs: number | null;
|
|
714
|
+
tokens?: TokenUsage | null;
|
|
715
|
+
model?: string | null;
|
|
716
|
+
dbSnapshotRef?: DbSnapshotRef | null;
|
|
703
717
|
};
|
|
704
718
|
}
|
|
705
719
|
/**
|
|
@@ -1589,7 +1603,7 @@ declare class BitfabFunction {
|
|
|
1589
1603
|
/**
|
|
1590
1604
|
* SDK version from package.json (injected at build time)
|
|
1591
1605
|
*/
|
|
1592
|
-
declare const __version__ = "0.28.
|
|
1606
|
+
declare const __version__ = "0.28.2";
|
|
1593
1607
|
|
|
1594
1608
|
/**
|
|
1595
1609
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -680,6 +680,8 @@ interface ReplayOptions {
|
|
|
680
680
|
}
|
|
681
681
|
/** Running totals reported to {@link ReplayOptions.onProgress} as replay proceeds. */
|
|
682
682
|
interface ReplayProgress {
|
|
683
|
+
/** Test run ID created for this replay. */
|
|
684
|
+
testRunId?: string;
|
|
683
685
|
/** Items that have finished so far, whether they succeeded or errored. */
|
|
684
686
|
completed: number;
|
|
685
687
|
/** Total number of items in this replay run. */
|
|
@@ -697,9 +699,21 @@ interface ReplayProgress {
|
|
|
697
699
|
* {@link ReplayResult}.
|
|
698
700
|
*/
|
|
699
701
|
item?: {
|
|
702
|
+
/** Source (historical) trace ID being replayed. */
|
|
700
703
|
traceId: string | null;
|
|
704
|
+
/** Local SDK replay trace ID, before the server maps it to a row ID. */
|
|
705
|
+
replayTraceId?: string | null;
|
|
706
|
+
/** Deserialized inputs from the original trace. */
|
|
707
|
+
input?: unknown[];
|
|
708
|
+
/** The result returned by the replayed function, or undefined on error. */
|
|
709
|
+
result?: unknown;
|
|
710
|
+
/** The original output from the historical trace. */
|
|
711
|
+
originalOutput?: unknown;
|
|
701
712
|
error: string | null;
|
|
702
713
|
durationMs: number | null;
|
|
714
|
+
tokens?: TokenUsage | null;
|
|
715
|
+
model?: string | null;
|
|
716
|
+
dbSnapshotRef?: DbSnapshotRef | null;
|
|
703
717
|
};
|
|
704
718
|
}
|
|
705
719
|
/**
|
|
@@ -1589,7 +1603,7 @@ declare class BitfabFunction {
|
|
|
1589
1603
|
/**
|
|
1590
1604
|
* SDK version from package.json (injected at build time)
|
|
1591
1605
|
*/
|
|
1592
|
-
declare const __version__ = "0.28.
|
|
1606
|
+
declare const __version__ = "0.28.2";
|
|
1593
1607
|
|
|
1594
1608
|
/**
|
|
1595
1609
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
flushTraces,
|
|
24
24
|
getCurrentSpan,
|
|
25
25
|
getCurrentTrace
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NZFPJRD3.js";
|
|
27
27
|
import {
|
|
28
28
|
BITFAB_PROGRESS_PREFIX,
|
|
29
29
|
BitfabError,
|
|
30
30
|
reportReplayProgress
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3PCOUZZP.js";
|
|
32
32
|
export {
|
|
33
33
|
BITFAB_PROGRESS_PREFIX,
|
|
34
34
|
Bitfab,
|
package/dist/node.cjs
CHANGED
|
@@ -367,7 +367,7 @@ function buildMockTree(rootNode) {
|
|
|
367
367
|
function walk(node) {
|
|
368
368
|
const key = node.traceFunctionKey;
|
|
369
369
|
if (key) {
|
|
370
|
-
const name = node.spanName;
|
|
370
|
+
const name = node.spanName || key;
|
|
371
371
|
const counterKey = `${key}:${name}`;
|
|
372
372
|
const index = counters.get(counterKey) ?? 0;
|
|
373
373
|
counters.set(counterKey, index + 1);
|
|
@@ -545,6 +545,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
|
|
|
545
545
|
}
|
|
546
546
|
try {
|
|
547
547
|
options?.onProgress?.({
|
|
548
|
+
testRunId,
|
|
548
549
|
completed,
|
|
549
550
|
total,
|
|
550
551
|
succeeded,
|
|
@@ -554,8 +555,15 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
|
|
|
554
555
|
// that just settled. The item's own traceId is the new replay
|
|
555
556
|
// trace and is assigned later (below), so use the server item.
|
|
556
557
|
traceId: serverItems[index]?.traceId ?? null,
|
|
558
|
+
replayTraceId: item.traceId,
|
|
559
|
+
input: item.input,
|
|
560
|
+
result: item.result,
|
|
561
|
+
originalOutput: item.originalOutput,
|
|
557
562
|
error: item.error,
|
|
558
|
-
durationMs: item.durationMs
|
|
563
|
+
durationMs: item.durationMs,
|
|
564
|
+
tokens: item.tokens,
|
|
565
|
+
model: item.model,
|
|
566
|
+
dbSnapshotRef: item.dbSnapshotRef
|
|
559
567
|
}
|
|
560
568
|
});
|
|
561
569
|
} catch {
|
|
@@ -659,7 +667,7 @@ registerAsyncLocalStorageClass(
|
|
|
659
667
|
);
|
|
660
668
|
|
|
661
669
|
// src/version.generated.ts
|
|
662
|
-
var __version__ = "0.28.
|
|
670
|
+
var __version__ = "0.28.2";
|
|
663
671
|
|
|
664
672
|
// src/constants.ts
|
|
665
673
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|