bitfab 0.57.6 → 0.57.7
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-IF7GVAWV.js → chunk-IYGYSMSD.js} +3 -3
- package/dist/{chunk-EC7EZXDV.js → chunk-NRUFN7RZ.js} +26 -13
- package/dist/chunk-NRUFN7RZ.js.map +1 -0
- package/dist/{chunk-UTBA3ASY.js → chunk-P4R3NY2U.js} +36 -16
- package/dist/chunk-P4R3NY2U.js.map +1 -0
- package/dist/{chunk-GT4IDECP.js → chunk-VPU6U4WM.js} +2 -2
- package/dist/{chunk-ICL6RSND.js → chunk-W3HLGZBO.js} +129 -52
- package/dist/chunk-W3HLGZBO.js.map +1 -0
- package/dist/{http-U3V6WNLO.js → http-AFLRC33F.js} +2 -2
- package/dist/{http-EYKH2EPD.js → http-ODKUB6M4.js} +2 -2
- package/dist/index.cjs +158 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +3 -3
- package/dist/node.cjs +158 -61
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-W2KNVMMJ.js → replay-2VGODDLA.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-EC7EZXDV.js.map +0 -1
- package/dist/chunk-ICL6RSND.js.map +0 -1
- package/dist/chunk-UTBA3ASY.js.map +0 -1
- /package/dist/{chunk-IF7GVAWV.js.map → chunk-IYGYSMSD.js.map} +0 -0
- /package/dist/{chunk-GT4IDECP.js.map → chunk-VPU6U4WM.js.map} +0 -0
- /package/dist/{http-EYKH2EPD.js.map → http-AFLRC33F.js.map} +0 -0
- /package/dist/{http-U3V6WNLO.js.map → http-ODKUB6M4.js.map} +0 -0
- /package/dist/{replay-W2KNVMMJ.js.map → replay-2VGODDLA.js.map} +0 -0
|
@@ -187,7 +187,7 @@ function encodeRequestBody(body) {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// src/version.generated.ts
|
|
190
|
-
var __version__ = "0.57.
|
|
190
|
+
var __version__ = "0.57.7";
|
|
191
191
|
var __packageName__ = "bitfab";
|
|
192
192
|
|
|
193
193
|
// src/constants.ts
|
|
@@ -788,7 +788,13 @@ var SIMULATION_PLAN_MAX_HELD = 1e3;
|
|
|
788
788
|
var DISABLE_SIMULATION_PLAN_ENV = "BITFAB_DISABLE_SIM_PLAN";
|
|
789
789
|
var ROOT_TRACE_FUNCTION_KEY_FIELD = "rootTraceFunctionKey";
|
|
790
790
|
var CONTENT_OFF_KEY = "content_off_by_simulation_plan";
|
|
791
|
-
var CONTENT_KEYS = [
|
|
791
|
+
var CONTENT_KEYS = [
|
|
792
|
+
"input",
|
|
793
|
+
"input_meta",
|
|
794
|
+
"output",
|
|
795
|
+
"output_meta",
|
|
796
|
+
"prompt"
|
|
797
|
+
];
|
|
792
798
|
function planWaitSliceMs(timeoutMs) {
|
|
793
799
|
return Math.min(SIMULATION_PLAN_READ_TIMEOUT_MS, Math.max(timeoutMs, 0) / 2);
|
|
794
800
|
}
|
|
@@ -982,13 +988,13 @@ var SimulationPlan = class {
|
|
|
982
988
|
}
|
|
983
989
|
return this.loaded;
|
|
984
990
|
}
|
|
985
|
-
send(payload, traceFunctionKey, submit) {
|
|
991
|
+
send(payload, traceFunctionKey, submit, drop) {
|
|
986
992
|
this.refresh();
|
|
987
993
|
if (this.disabled() || traceFunctionKey === void 0 || spanNameOf(payload) === void 0 || recordedByFramework(payload)) {
|
|
988
994
|
submit(payload);
|
|
989
995
|
return;
|
|
990
996
|
}
|
|
991
|
-
const entry = { payload, traceFunctionKey, submit };
|
|
997
|
+
const entry = { payload, traceFunctionKey, submit, drop };
|
|
992
998
|
if (this.holdingForFirstRead()) {
|
|
993
999
|
this.hold(entry);
|
|
994
1000
|
return;
|
|
@@ -1042,6 +1048,7 @@ var SimulationPlan = class {
|
|
|
1042
1048
|
try {
|
|
1043
1049
|
entry.submit(this.payloadToSend(entry));
|
|
1044
1050
|
} catch (error) {
|
|
1051
|
+
entry.drop?.();
|
|
1045
1052
|
warnOnce(
|
|
1046
1053
|
"sim-plan-held-span-dropped",
|
|
1047
1054
|
`a span held for the sim plan was dropped when released: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -2312,23 +2319,21 @@ var HttpClient = class {
|
|
|
2312
2319
|
}
|
|
2313
2320
|
const deadline = Date.now() + Math.max(timeoutMs, 0);
|
|
2314
2321
|
this.closing = (async () => {
|
|
2315
|
-
|
|
2316
|
-
|
|
2322
|
+
liveHttpClients.delete(this);
|
|
2323
|
+
const settled = await this.settleDeferredWork(
|
|
2324
|
+
Math.max(0, deadline - Date.now())
|
|
2317
2325
|
);
|
|
2318
2326
|
this.stopSimulationPlan?.();
|
|
2327
|
+
this.closed = true;
|
|
2319
2328
|
this.externalSpanTransform = void 0;
|
|
2320
2329
|
this.externalTraceTransform = void 0;
|
|
2330
|
+
this.frameworkSpanStart = void 0;
|
|
2321
2331
|
this.releaseHeldExternalSpans = void 0;
|
|
2322
2332
|
this.stopSimulationPlan = void 0;
|
|
2323
|
-
liveHttpClients.delete(this);
|
|
2324
|
-
const settled = await this.settleDeferredWork(
|
|
2325
|
-
Math.max(0, deadline - Date.now())
|
|
2326
|
-
);
|
|
2327
|
-
this.closed = true;
|
|
2328
2333
|
const transport = this.traceTransport;
|
|
2329
2334
|
this.traceTransport = void 0;
|
|
2330
2335
|
const shutdownOk = await transport?.shutdown(Math.max(0, deadline - Date.now())) ?? true;
|
|
2331
|
-
return
|
|
2336
|
+
return settled && shutdownOk;
|
|
2332
2337
|
})();
|
|
2333
2338
|
return this.closing;
|
|
2334
2339
|
}
|
|
@@ -2429,8 +2434,7 @@ var HttpClient = class {
|
|
|
2429
2434
|
async getSimulationPlan() {
|
|
2430
2435
|
return this.get(
|
|
2431
2436
|
"/api/sdk/sim-plan",
|
|
2432
|
-
SIMULATION_PLAN_READ_TIMEOUT_MS
|
|
2433
|
-
{ Connection: "close" }
|
|
2437
|
+
SIMULATION_PLAN_READ_TIMEOUT_MS
|
|
2434
2438
|
);
|
|
2435
2439
|
}
|
|
2436
2440
|
async getTraceSpan(traceId, lookup) {
|
|
@@ -2506,19 +2510,35 @@ var HttpClient = class {
|
|
|
2506
2510
|
carrierMeta("internal_trace", body, void 0)
|
|
2507
2511
|
);
|
|
2508
2512
|
}
|
|
2513
|
+
reserveFrameworkSpan(traceId, spanId, parentSpanId) {
|
|
2514
|
+
try {
|
|
2515
|
+
this.frameworkSpanStart?.(traceId, spanId, parentSpanId ?? null);
|
|
2516
|
+
} catch (error) {
|
|
2517
|
+
warnOnce(
|
|
2518
|
+
"framework-span-reservation-failed",
|
|
2519
|
+
`a framework span could not be counted toward its trace's span limit: ${describeError(error)}`
|
|
2520
|
+
);
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2509
2523
|
sendExternalSpan(payload) {
|
|
2510
2524
|
const ref = carrierRef(payload);
|
|
2511
2525
|
if (ref?.spanId !== void 0) {
|
|
2512
2526
|
this.traceCompletion.record(ref.traceId, ref.spanId);
|
|
2513
2527
|
}
|
|
2528
|
+
const drop = () => {
|
|
2529
|
+
if (ref?.spanId !== void 0) {
|
|
2530
|
+
this.traceCompletion.abort(ref.traceId, ref.spanId);
|
|
2531
|
+
}
|
|
2532
|
+
};
|
|
2514
2533
|
const gate = this.externalSpanTransform;
|
|
2515
2534
|
if (gate === void 0) {
|
|
2516
2535
|
this.submitExternalSpan(payload);
|
|
2517
2536
|
return;
|
|
2518
2537
|
}
|
|
2519
2538
|
try {
|
|
2520
|
-
gate(payload, (ready) => this.submitExternalSpan(ready));
|
|
2539
|
+
gate(payload, (ready) => this.submitExternalSpan(ready), drop);
|
|
2521
2540
|
} catch (error) {
|
|
2541
|
+
drop();
|
|
2522
2542
|
warnDroppedExternalSpan(error);
|
|
2523
2543
|
}
|
|
2524
2544
|
}
|
|
@@ -2837,4 +2857,4 @@ export {
|
|
|
2837
2857
|
parseRetryAfterMs,
|
|
2838
2858
|
HttpClient
|
|
2839
2859
|
};
|
|
2840
|
-
//# sourceMappingURL=chunk-
|
|
2860
|
+
//# sourceMappingURL=chunk-P4R3NY2U.js.map
|