bitfab 0.38.8 → 0.38.9
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-U44TJWVV.js → chunk-EPU5AUT4.js} +18 -8
- package/dist/chunk-EPU5AUT4.js.map +1 -0
- package/dist/{chunk-TBA67Q3N.js → chunk-J73FXDFA.js} +2 -2
- package/dist/{chunk-TBA67Q3N.js.map → chunk-J73FXDFA.js.map} +1 -1
- package/dist/index.cjs +18 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/node.cjs +18 -6
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-KLGTICN2.js → replay-OFQPJZZD.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-U44TJWVV.js.map +0 -1
- /package/dist/{replay-KLGTICN2.js.map → replay-OFQPJZZD.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -2885,7 +2885,7 @@ declare class BitfabFunction {
|
|
|
2885
2885
|
/**
|
|
2886
2886
|
* SDK version from package.json (injected at build time)
|
|
2887
2887
|
*/
|
|
2888
|
-
declare const __version__ = "0.38.
|
|
2888
|
+
declare const __version__ = "0.38.9";
|
|
2889
2889
|
|
|
2890
2890
|
/**
|
|
2891
2891
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -2885,7 +2885,7 @@ declare class BitfabFunction {
|
|
|
2885
2885
|
/**
|
|
2886
2886
|
* SDK version from package.json (injected at build time)
|
|
2887
2887
|
*/
|
|
2888
|
-
declare const __version__ = "0.38.
|
|
2888
|
+
declare const __version__ = "0.38.9";
|
|
2889
2889
|
|
|
2890
2890
|
/**
|
|
2891
2891
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
getCurrentReplayBranch,
|
|
23
23
|
getCurrentSpan,
|
|
24
24
|
getCurrentTrace
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EPU5AUT4.js";
|
|
26
26
|
import "./chunk-ZUD7OFYB.js";
|
|
27
27
|
import {
|
|
28
28
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
flushTraces,
|
|
37
37
|
reportReplayProgress,
|
|
38
38
|
serializeReplayResult
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-J73FXDFA.js";
|
|
40
40
|
import "./chunk-H6LZRFMN.js";
|
|
41
41
|
export {
|
|
42
42
|
BITFAB_PROGRESS_PREFIX,
|
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.38.
|
|
100
|
+
__version__ = "0.38.9";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -3240,8 +3240,20 @@ function finalizeTracePayload(payload) {
|
|
|
3240
3240
|
// src/claudeAgentSdk.ts
|
|
3241
3241
|
init_randomUuid();
|
|
3242
3242
|
init_serialize();
|
|
3243
|
+
|
|
3244
|
+
// src/timestamp.ts
|
|
3245
|
+
var lastTimestampMicros = 0;
|
|
3246
|
+
function nowIsoTimestamp() {
|
|
3247
|
+
const wallClockMicros = Date.now() * 1e3;
|
|
3248
|
+
lastTimestampMicros = Math.max(wallClockMicros, lastTimestampMicros + 1);
|
|
3249
|
+
const milliseconds = Math.floor(lastTimestampMicros / 1e3);
|
|
3250
|
+
const remainingMicros = lastTimestampMicros % 1e3;
|
|
3251
|
+
return new Date(milliseconds).toISOString().replace("Z", `${remainingMicros.toString().padStart(3, "0")}Z`);
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3254
|
+
// src/claudeAgentSdk.ts
|
|
3243
3255
|
function nowIso() {
|
|
3244
|
-
return (
|
|
3256
|
+
return nowIsoTimestamp();
|
|
3245
3257
|
}
|
|
3246
3258
|
var safeSerialize = toJsonSafe;
|
|
3247
3259
|
function extractContentBlocks(content) {
|
|
@@ -4261,7 +4273,7 @@ var LANGGRAPH_METADATA_KEYS = [
|
|
|
4261
4273
|
"langgraph_checkpoint_ns"
|
|
4262
4274
|
];
|
|
4263
4275
|
function nowIso2() {
|
|
4264
|
-
return (
|
|
4276
|
+
return nowIsoTimestamp();
|
|
4265
4277
|
}
|
|
4266
4278
|
function normalizeChainStartArgs(parentRunIdOrRunType, runTypeOrRunName, runNameOrParentRunId) {
|
|
4267
4279
|
if (parentRunIdOrRunType && CHAIN_RUN_TYPES.has(parentRunIdOrRunType)) {
|
|
@@ -5872,7 +5884,7 @@ function getCurrentTrace() {
|
|
|
5872
5884
|
if (!traceState) {
|
|
5873
5885
|
traceState = {
|
|
5874
5886
|
traceId,
|
|
5875
|
-
startedAt: (
|
|
5887
|
+
startedAt: nowIsoTimestamp(),
|
|
5876
5888
|
contexts: []
|
|
5877
5889
|
};
|
|
5878
5890
|
activeTraceStates.set(traceId, traceState);
|
|
@@ -6806,7 +6818,7 @@ var Bitfab = class {
|
|
|
6806
6818
|
const newContext = { traceId, spanId, contexts: [] };
|
|
6807
6819
|
newStack = [...currentStack, newContext];
|
|
6808
6820
|
const inputs = args;
|
|
6809
|
-
const startedAt = (
|
|
6821
|
+
const startedAt = nowIsoTimestamp();
|
|
6810
6822
|
const replayCtxAtStart = getReplayContext();
|
|
6811
6823
|
const testRunId = replayCtxAtStart?.testRunId ?? options.testRunId;
|
|
6812
6824
|
if (isRootSpan && !activeTraceStates.has(traceId)) {
|
|
@@ -6841,7 +6853,7 @@ var Bitfab = class {
|
|
|
6841
6853
|
const sendSpan = async (params) => {
|
|
6842
6854
|
const replayCtx = getReplayContext();
|
|
6843
6855
|
try {
|
|
6844
|
-
const endedAt = (
|
|
6856
|
+
const endedAt = nowIsoTimestamp();
|
|
6845
6857
|
const traceDropped = activeTraceStates.get(traceId)?.dropped === true;
|
|
6846
6858
|
if (!traceDropped) {
|
|
6847
6859
|
self.sendWrapperSpan({
|