bitfab 0.13.0 → 0.13.1
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-QLVXAFGP.js → chunk-3JCQD7E5.js} +32 -3
- package/dist/{chunk-QLVXAFGP.js.map → chunk-3JCQD7E5.js.map} +1 -1
- package/dist/{chunk-62NGOY7Q.js → chunk-HIDM5UYA.js} +3 -3
- package/dist/index.cjs +32 -3
- 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 +32 -3
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-SIWSK66F.js → replay-NTGRDVES.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-62NGOY7Q.js.map → chunk-HIDM5UYA.js.map} +0 -0
- /package/dist/{replay-SIWSK66F.js.map → replay-NTGRDVES.js.map} +0 -0
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
BitfabOpenAITracingProcessor,
|
|
7
7
|
getCurrentSpan,
|
|
8
8
|
getCurrentTrace
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HIDM5UYA.js";
|
|
10
10
|
import {
|
|
11
11
|
BitfabError,
|
|
12
12
|
DEFAULT_SERVICE_URL,
|
|
13
13
|
__version__,
|
|
14
14
|
flushTraces
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3JCQD7E5.js";
|
|
16
16
|
export {
|
|
17
17
|
Bitfab,
|
|
18
18
|
BitfabClaudeAgentHandler,
|
package/dist/node.cjs
CHANGED
|
@@ -81,7 +81,7 @@ var __version__;
|
|
|
81
81
|
var init_version_generated = __esm({
|
|
82
82
|
"src/version.generated.ts"() {
|
|
83
83
|
"use strict";
|
|
84
|
-
__version__ = "0.13.
|
|
84
|
+
__version__ = "0.13.1";
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -428,15 +428,43 @@ var init_replayContext = __esm({
|
|
|
428
428
|
});
|
|
429
429
|
|
|
430
430
|
// src/serialize.ts
|
|
431
|
+
function describeValue(value) {
|
|
432
|
+
try {
|
|
433
|
+
const ctorName = value?.constructor?.name;
|
|
434
|
+
if (ctorName && ctorName !== "Object") {
|
|
435
|
+
return ctorName;
|
|
436
|
+
}
|
|
437
|
+
} catch {
|
|
438
|
+
}
|
|
439
|
+
return typeof value;
|
|
440
|
+
}
|
|
441
|
+
function unserializableStub(value, reason) {
|
|
442
|
+
let summary;
|
|
443
|
+
try {
|
|
444
|
+
summary = `<unserializable: ${describeValue(value)} (${reason})>`;
|
|
445
|
+
} catch {
|
|
446
|
+
summary = `<unserializable (${reason})>`;
|
|
447
|
+
}
|
|
448
|
+
return { json: summary };
|
|
449
|
+
}
|
|
431
450
|
function serializeValue(value) {
|
|
432
451
|
try {
|
|
433
452
|
const { json, meta } = import_superjson.default.serialize(value);
|
|
453
|
+
let size;
|
|
454
|
+
try {
|
|
455
|
+
size = JSON.stringify(json).length;
|
|
456
|
+
} catch {
|
|
457
|
+
return unserializableStub(value, "stringify_failed_after_superjson");
|
|
458
|
+
}
|
|
459
|
+
if (size > MAX_SERIALIZED_BYTES) {
|
|
460
|
+
return unserializableStub(value, `too_large_${size}_bytes`);
|
|
461
|
+
}
|
|
434
462
|
return meta ? { json, meta } : { json };
|
|
435
463
|
} catch {
|
|
436
464
|
try {
|
|
437
465
|
return { json: JSON.parse(JSON.stringify(value)) };
|
|
438
466
|
} catch {
|
|
439
|
-
return
|
|
467
|
+
return unserializableStub(value, "json_stringify_failed");
|
|
440
468
|
}
|
|
441
469
|
}
|
|
442
470
|
}
|
|
@@ -449,11 +477,12 @@ function deserializeValue(serialized) {
|
|
|
449
477
|
meta: serialized.meta
|
|
450
478
|
});
|
|
451
479
|
}
|
|
452
|
-
var import_superjson;
|
|
480
|
+
var import_superjson, MAX_SERIALIZED_BYTES;
|
|
453
481
|
var init_serialize = __esm({
|
|
454
482
|
"src/serialize.ts"() {
|
|
455
483
|
"use strict";
|
|
456
484
|
import_superjson = __toESM(require("superjson"), 1);
|
|
485
|
+
MAX_SERIALIZED_BYTES = 512e3;
|
|
457
486
|
}
|
|
458
487
|
});
|
|
459
488
|
|