@bitfab/sdk 0.54.12 → 0.54.13
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/autoTrace.cjs +0 -19
- package/dist/autoTrace.cjs.map +1 -1
- package/dist/autoTrace.d.cts +1 -3
- package/dist/autoTrace.d.ts +1 -3
- package/dist/autoTrace.js +1 -5
- package/dist/{chunk-Q3X54UPA.js → chunk-BUGCOUK6.js} +3 -3
- package/dist/{chunk-JEFU6FTD.js → chunk-IOLVW3PT.js} +11 -50
- package/dist/chunk-IOLVW3PT.js.map +1 -0
- package/dist/{chunk-XTUINMAL.js → chunk-M7HWCJVO.js} +2 -2
- package/dist/{chunk-GZI455WP.js → chunk-N5T6NDR3.js} +2 -8
- package/dist/{chunk-GZI455WP.js.map → chunk-N5T6NDR3.js.map} +1 -1
- package/dist/{chunk-EGWJYCNT.js → chunk-RCHSYWKI.js} +2 -19
- package/dist/chunk-RCHSYWKI.js.map +1 -0
- package/dist/{chunk-I5NJU64I.js → chunk-WDSOB57F.js} +2 -9
- package/dist/{chunk-I5NJU64I.js.map → chunk-WDSOB57F.js.map} +1 -1
- package/dist/{http-X4YOOM54.js → http-4W2BM7GE.js} +2 -2
- package/dist/{http-FJVBYZES.js → http-Y6UGNXSO.js} +2 -2
- package/dist/index.cjs +5 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -11
- package/dist/index.d.ts +8 -11
- package/dist/index.js +4 -4
- package/dist/node.cjs +5 -63
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +4 -4
- package/dist/{replay-IA5VRWHD.js → replay-YJBLRMQD.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-EGWJYCNT.js.map +0 -1
- package/dist/chunk-JEFU6FTD.js.map +0 -1
- /package/dist/{chunk-Q3X54UPA.js.map → chunk-BUGCOUK6.js.map} +0 -0
- /package/dist/{chunk-XTUINMAL.js.map → chunk-M7HWCJVO.js.map} +0 -0
- /package/dist/{http-FJVBYZES.js.map → http-4W2BM7GE.js.map} +0 -0
- /package/dist/{http-X4YOOM54.js.map → http-Y6UGNXSO.js.map} +0 -0
- /package/dist/{replay-IA5VRWHD.js.map → replay-YJBLRMQD.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WDSOB57F.js";
|
|
10
10
|
import "./chunk-VCRFFCLY.js";
|
|
11
11
|
export {
|
|
12
12
|
BitfabError,
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
parseRetryAfterMs,
|
|
18
18
|
serializePayloadBody
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=http-
|
|
20
|
+
//# sourceMappingURL=http-4W2BM7GE.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N5T6NDR3.js";
|
|
10
10
|
export {
|
|
11
11
|
BitfabError,
|
|
12
12
|
HttpClient,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
parseRetryAfterMs,
|
|
17
17
|
serializePayloadBody
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=http-
|
|
19
|
+
//# sourceMappingURL=http-Y6UGNXSO.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var __version__, __packageName__;
|
|
|
42
42
|
var init_version_generated = __esm({
|
|
43
43
|
"src/version.generated.ts"() {
|
|
44
44
|
"use strict";
|
|
45
|
-
__version__ = "0.54.
|
|
45
|
+
__version__ = "0.54.13";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -2657,12 +2657,6 @@ var init_http = __esm({
|
|
|
2657
2657
|
async lookupFunction(name) {
|
|
2658
2658
|
return this.request("/api/sdk/functions/lookup", { name });
|
|
2659
2659
|
}
|
|
2660
|
-
async getAutoTracePolicy(traceFunctionKey, protocol) {
|
|
2661
|
-
return this.request("/api/sdk/auto-trace/policy", {
|
|
2662
|
-
traceFunctionKey,
|
|
2663
|
-
protocol
|
|
2664
|
-
});
|
|
2665
|
-
}
|
|
2666
2660
|
async getSimulationPlan() {
|
|
2667
2661
|
return this.get(
|
|
2668
2662
|
"/api/sdk/sim-plan",
|
|
@@ -5186,21 +5180,6 @@ function currentAutoTraceScope() {
|
|
|
5186
5180
|
initializeAutoTraceStorage();
|
|
5187
5181
|
return autoTraceState.storage?.getStore() ?? autoTraceState.browserScope;
|
|
5188
5182
|
}
|
|
5189
|
-
function __setBitfabAutoTraceCapturePolicy(client, traceFunctionKey, functionIds) {
|
|
5190
|
-
const policies = autoTraceState.capturePolicies.get(client) ?? /* @__PURE__ */ new Map();
|
|
5191
|
-
if (functionIds === void 0) {
|
|
5192
|
-
policies.delete(traceFunctionKey);
|
|
5193
|
-
if (policies.size === 0) {
|
|
5194
|
-
autoTraceState.capturePolicies.delete(client);
|
|
5195
|
-
}
|
|
5196
|
-
return;
|
|
5197
|
-
}
|
|
5198
|
-
policies.set(traceFunctionKey, new Set(functionIds));
|
|
5199
|
-
autoTraceState.capturePolicies.set(client, policies);
|
|
5200
|
-
}
|
|
5201
|
-
function getAutoTraceCapturePolicy(client, traceFunctionKey) {
|
|
5202
|
-
return autoTraceState.capturePolicies.get(client)?.get(traceFunctionKey);
|
|
5203
|
-
}
|
|
5204
5183
|
|
|
5205
5184
|
// src/optionalPeer.ts
|
|
5206
5185
|
function importOptionalPeer(specifierParts) {
|
|
@@ -7049,7 +7028,6 @@ function openAiAgentsParentSpanId(bitfabTraceId, enclosingSpanIds) {
|
|
|
7049
7028
|
}
|
|
7050
7029
|
|
|
7051
7030
|
// src/client.ts
|
|
7052
|
-
init_policyRefresh();
|
|
7053
7031
|
init_randomUuid();
|
|
7054
7032
|
init_replay();
|
|
7055
7033
|
|
|
@@ -8633,8 +8611,6 @@ function readBooleanEnv(name) {
|
|
|
8633
8611
|
var DEFAULT_AUTO_TRACE_MAX_DEPTH = 30;
|
|
8634
8612
|
var DEFAULT_AUTO_TRACE_MAX_SPANS = 500;
|
|
8635
8613
|
var AUTO_TRACE_PROTOCOL = "ts-auto-v1";
|
|
8636
|
-
var AUTO_TRACE_POLICY_REFRESH_MS = 6e4;
|
|
8637
|
-
var AUTO_TRACE_POLICY_RETRY_MS = 1e4;
|
|
8638
8614
|
function spanOwnerName(receiver) {
|
|
8639
8615
|
if (typeof receiver === "function") {
|
|
8640
8616
|
return receiver.name !== "" ? receiver.name : void 0;
|
|
@@ -8667,7 +8643,6 @@ var Bitfab = class {
|
|
|
8667
8643
|
constructor(config) {
|
|
8668
8644
|
/** Gate the empty-key warning to fire at most once. */
|
|
8669
8645
|
this.apiKeyWarned = false;
|
|
8670
|
-
this.autoTracePolicyRefreshes = /* @__PURE__ */ new Map();
|
|
8671
8646
|
/**
|
|
8672
8647
|
* Mock overrides registered via {@link Bitfab.registerMockOverride}, applied
|
|
8673
8648
|
* to every `replay` on this client (after any per-call `mockOverride`). In
|
|
@@ -8716,12 +8691,12 @@ var Bitfab = class {
|
|
|
8716
8691
|
*
|
|
8717
8692
|
* Build instrumentation turns repository functions called beneath this
|
|
8718
8693
|
* method into nested spans that capture inputs, outputs, and errors by
|
|
8719
|
-
* default.
|
|
8720
|
-
*
|
|
8694
|
+
* default. Source exclusions and sim-plan capture-off decisions are explicit
|
|
8695
|
+
* opt-outs from that default.
|
|
8721
8696
|
* Without a compatible build transform, this still records the decorated
|
|
8722
8697
|
* method as a normal rich root span but cannot discover child calls.
|
|
8723
8698
|
*
|
|
8724
|
-
* @param traceFunctionKey - Groups traces and their capture
|
|
8699
|
+
* @param traceFunctionKey - Groups traces and their capture controls.
|
|
8725
8700
|
* @param options - Root presentation, subtree bounds, and exclusions.
|
|
8726
8701
|
* @experimental Automatic child-call instrumentation is experimental.
|
|
8727
8702
|
*/
|
|
@@ -8879,11 +8854,6 @@ var Bitfab = class {
|
|
|
8879
8854
|
traceFunctionKey,
|
|
8880
8855
|
spanOptions,
|
|
8881
8856
|
function(...args) {
|
|
8882
|
-
const capturePolicy = getAutoTraceCapturePolicy(
|
|
8883
|
-
self,
|
|
8884
|
-
traceFunctionKey
|
|
8885
|
-
);
|
|
8886
|
-
self.refreshAutoTraceCapturePolicy(traceFunctionKey);
|
|
8887
8857
|
self.simulationPlan.refresh();
|
|
8888
8858
|
let spansUsed = 0;
|
|
8889
8859
|
let truncated = false;
|
|
@@ -8963,7 +8933,7 @@ var Bitfab = class {
|
|
|
8963
8933
|
surface: "opt-out",
|
|
8964
8934
|
instrumentation: "trace",
|
|
8965
8935
|
functionId: definition.id,
|
|
8966
|
-
captureContent:
|
|
8936
|
+
captureContent: true,
|
|
8967
8937
|
autoTraceDefinition: definition,
|
|
8968
8938
|
...nodeConfiguration?.testRunId !== void 0 && {
|
|
8969
8939
|
testRunId: nodeConfiguration.testRunId
|
|
@@ -9062,34 +9032,6 @@ var Bitfab = class {
|
|
|
9062
9032
|
applySimulationPlan(payload, submit) {
|
|
9063
9033
|
this.simulationPlan.send(payload, rootTraceFunctionKeyOf(payload), submit);
|
|
9064
9034
|
}
|
|
9065
|
-
refreshAutoTraceCapturePolicy(traceFunctionKey) {
|
|
9066
|
-
const state2 = this.autoTracePolicyRefreshes.get(traceFunctionKey) ?? new PolicyRefresh();
|
|
9067
|
-
this.autoTracePolicyRefreshes.set(traceFunctionKey, state2);
|
|
9068
|
-
state2.run(
|
|
9069
|
-
() => this.httpClient.getAutoTracePolicy(
|
|
9070
|
-
traceFunctionKey,
|
|
9071
|
-
AUTO_TRACE_PROTOCOL
|
|
9072
|
-
),
|
|
9073
|
-
(policy) => {
|
|
9074
|
-
if (policy.protocol !== AUTO_TRACE_PROTOCOL) {
|
|
9075
|
-
state2.hold(AUTO_TRACE_POLICY_RETRY_MS);
|
|
9076
|
-
return;
|
|
9077
|
-
}
|
|
9078
|
-
const functionIds = Array.isArray(policy.functionIds) ? policy.functionIds.filter(
|
|
9079
|
-
(id) => typeof id === "string" && id.startsWith(`${AUTO_TRACE_PROTOCOL}:`)
|
|
9080
|
-
).slice(0, DEFAULT_AUTO_TRACE_MAX_SPANS) : [];
|
|
9081
|
-
__setBitfabAutoTraceCapturePolicy(
|
|
9082
|
-
this,
|
|
9083
|
-
traceFunctionKey,
|
|
9084
|
-
policy.revision === null ? void 0 : functionIds
|
|
9085
|
-
);
|
|
9086
|
-
state2.hold(AUTO_TRACE_POLICY_REFRESH_MS);
|
|
9087
|
-
},
|
|
9088
|
-
() => {
|
|
9089
|
-
state2.hold(AUTO_TRACE_POLICY_RETRY_MS);
|
|
9090
|
-
}
|
|
9091
|
-
);
|
|
9092
|
-
}
|
|
9093
9035
|
/**
|
|
9094
9036
|
* Flush and permanently close this client's tracing resources: its pending
|
|
9095
9037
|
* requests and the single span-transport worker shared by its decorators and
|