bitfab 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-ZR4HGK6G.js → chunk-FZNRSEMN.js} +2 -2
- package/dist/{chunk-RDSNJFWY.js → chunk-KPALXSAF.js} +3 -3
- package/dist/{chunk-YY5BB2YS.js → chunk-Q7HDNYYY.js} +11 -50
- package/dist/chunk-Q7HDNYYY.js.map +1 -0
- package/dist/{chunk-EGWJYCNT.js → chunk-RCHSYWKI.js} +2 -19
- package/dist/chunk-RCHSYWKI.js.map +1 -0
- package/dist/{chunk-VTFBDA3O.js → chunk-VW7MA7DS.js} +2 -8
- package/dist/{chunk-VTFBDA3O.js.map → chunk-VW7MA7DS.js.map} +1 -1
- package/dist/{chunk-WKXLCFLT.js → chunk-YKOD4GWI.js} +2 -9
- package/dist/{chunk-WKXLCFLT.js.map → chunk-YKOD4GWI.js.map} +1 -1
- package/dist/{http-NWSSB5FA.js → http-42KAFBUN.js} +2 -2
- package/dist/{http-RJH6VYAM.js → http-7PF6XCJR.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-WB5NQNQS.js → replay-5RHBDIEK.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-YY5BB2YS.js.map +0 -1
- /package/dist/{chunk-ZR4HGK6G.js.map → chunk-FZNRSEMN.js.map} +0 -0
- /package/dist/{chunk-RDSNJFWY.js.map → chunk-KPALXSAF.js.map} +0 -0
- /package/dist/{http-NWSSB5FA.js.map → http-42KAFBUN.js.map} +0 -0
- /package/dist/{http-RJH6VYAM.js.map → http-7PF6XCJR.js.map} +0 -0
- /package/dist/{replay-WB5NQNQS.js.map → replay-5RHBDIEK.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -557,7 +557,6 @@ declare class HttpClient {
|
|
|
557
557
|
* Blocks until complete - needed for function execution.
|
|
558
558
|
*/
|
|
559
559
|
lookupFunction<T>(name: string): Promise<T>;
|
|
560
|
-
getAutoTracePolicy<T>(traceFunctionKey: string, protocol: string): Promise<T>;
|
|
561
560
|
getSimulationPlan(): Promise<SimulationPlanResponse>;
|
|
562
561
|
getTraceSpan(traceId: string, lookup: SpanLookup): Promise<CapturedSpan | null>;
|
|
563
562
|
/**
|
|
@@ -2904,7 +2903,6 @@ declare class Bitfab {
|
|
|
2904
2903
|
readonly graders: GradersClient;
|
|
2905
2904
|
private readonly bamlClient;
|
|
2906
2905
|
private readonly dbSnapshot;
|
|
2907
|
-
private readonly autoTracePolicyRefreshes;
|
|
2908
2906
|
private readonly simulationPlan;
|
|
2909
2907
|
/**
|
|
2910
2908
|
* Mock overrides registered via {@link Bitfab.registerMockOverride}, applied
|
|
@@ -2923,12 +2921,12 @@ declare class Bitfab {
|
|
|
2923
2921
|
*
|
|
2924
2922
|
* Build instrumentation turns repository functions called beneath this
|
|
2925
2923
|
* method into nested spans that capture inputs, outputs, and errors by
|
|
2926
|
-
* default.
|
|
2927
|
-
*
|
|
2924
|
+
* default. Source exclusions and sim-plan capture-off decisions are explicit
|
|
2925
|
+
* opt-outs from that default.
|
|
2928
2926
|
* Without a compatible build transform, this still records the decorated
|
|
2929
2927
|
* method as a normal rich root span but cannot discover child calls.
|
|
2930
2928
|
*
|
|
2931
|
-
* @param traceFunctionKey - Groups traces and their capture
|
|
2929
|
+
* @param traceFunctionKey - Groups traces and their capture controls.
|
|
2932
2930
|
* @param options - Root presentation, subtree bounds, and exclusions.
|
|
2933
2931
|
* @experimental Automatic child-call instrumentation is experimental.
|
|
2934
2932
|
*/
|
|
@@ -2939,11 +2937,11 @@ declare class Bitfab {
|
|
|
2939
2937
|
* This is the function-oriented equivalent of {@link Bitfab.trace}. Build
|
|
2940
2938
|
* instrumentation turns repository functions called beneath the wrapped
|
|
2941
2939
|
* function into nested spans that capture inputs, outputs, and errors by
|
|
2942
|
-
* default.
|
|
2943
|
-
*
|
|
2944
|
-
* normal rich root span and runs the function unchanged.
|
|
2940
|
+
* default. Source exclusions and sim-plan capture-off decisions are explicit
|
|
2941
|
+
* opt-outs from that default. Without a compatible transform, this still
|
|
2942
|
+
* records one normal rich root span and runs the function unchanged.
|
|
2945
2943
|
*
|
|
2946
|
-
* @param traceFunctionKey - Groups traces and their capture
|
|
2944
|
+
* @param traceFunctionKey - Groups traces and their capture controls.
|
|
2947
2945
|
* @param optionsOrFn - Options or the workflow entrypoint to wrap.
|
|
2948
2946
|
* @param maybeFn - Workflow entrypoint when options are provided.
|
|
2949
2947
|
* @experimental Automatic child-call instrumentation is experimental.
|
|
@@ -2982,7 +2980,6 @@ declare class Bitfab {
|
|
|
2982
2980
|
private createAutoTraceNode;
|
|
2983
2981
|
private createAutoTraceRoot;
|
|
2984
2982
|
private applySimulationPlan;
|
|
2985
|
-
private refreshAutoTraceCapturePolicy;
|
|
2986
2983
|
/**
|
|
2987
2984
|
* Flush and permanently close this client's tracing resources: its pending
|
|
2988
2985
|
* requests and the single span-transport worker shared by its decorators and
|
|
@@ -3604,7 +3601,7 @@ interface CommitRef {
|
|
|
3604
3601
|
/**
|
|
3605
3602
|
* SDK version from package.json (injected at build time)
|
|
3606
3603
|
*/
|
|
3607
|
-
declare const __version__ = "0.54.
|
|
3604
|
+
declare const __version__ = "0.54.13";
|
|
3608
3605
|
|
|
3609
3606
|
/**
|
|
3610
3607
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -557,7 +557,6 @@ declare class HttpClient {
|
|
|
557
557
|
* Blocks until complete - needed for function execution.
|
|
558
558
|
*/
|
|
559
559
|
lookupFunction<T>(name: string): Promise<T>;
|
|
560
|
-
getAutoTracePolicy<T>(traceFunctionKey: string, protocol: string): Promise<T>;
|
|
561
560
|
getSimulationPlan(): Promise<SimulationPlanResponse>;
|
|
562
561
|
getTraceSpan(traceId: string, lookup: SpanLookup): Promise<CapturedSpan | null>;
|
|
563
562
|
/**
|
|
@@ -2904,7 +2903,6 @@ declare class Bitfab {
|
|
|
2904
2903
|
readonly graders: GradersClient;
|
|
2905
2904
|
private readonly bamlClient;
|
|
2906
2905
|
private readonly dbSnapshot;
|
|
2907
|
-
private readonly autoTracePolicyRefreshes;
|
|
2908
2906
|
private readonly simulationPlan;
|
|
2909
2907
|
/**
|
|
2910
2908
|
* Mock overrides registered via {@link Bitfab.registerMockOverride}, applied
|
|
@@ -2923,12 +2921,12 @@ declare class Bitfab {
|
|
|
2923
2921
|
*
|
|
2924
2922
|
* Build instrumentation turns repository functions called beneath this
|
|
2925
2923
|
* method into nested spans that capture inputs, outputs, and errors by
|
|
2926
|
-
* default.
|
|
2927
|
-
*
|
|
2924
|
+
* default. Source exclusions and sim-plan capture-off decisions are explicit
|
|
2925
|
+
* opt-outs from that default.
|
|
2928
2926
|
* Without a compatible build transform, this still records the decorated
|
|
2929
2927
|
* method as a normal rich root span but cannot discover child calls.
|
|
2930
2928
|
*
|
|
2931
|
-
* @param traceFunctionKey - Groups traces and their capture
|
|
2929
|
+
* @param traceFunctionKey - Groups traces and their capture controls.
|
|
2932
2930
|
* @param options - Root presentation, subtree bounds, and exclusions.
|
|
2933
2931
|
* @experimental Automatic child-call instrumentation is experimental.
|
|
2934
2932
|
*/
|
|
@@ -2939,11 +2937,11 @@ declare class Bitfab {
|
|
|
2939
2937
|
* This is the function-oriented equivalent of {@link Bitfab.trace}. Build
|
|
2940
2938
|
* instrumentation turns repository functions called beneath the wrapped
|
|
2941
2939
|
* function into nested spans that capture inputs, outputs, and errors by
|
|
2942
|
-
* default.
|
|
2943
|
-
*
|
|
2944
|
-
* normal rich root span and runs the function unchanged.
|
|
2940
|
+
* default. Source exclusions and sim-plan capture-off decisions are explicit
|
|
2941
|
+
* opt-outs from that default. Without a compatible transform, this still
|
|
2942
|
+
* records one normal rich root span and runs the function unchanged.
|
|
2945
2943
|
*
|
|
2946
|
-
* @param traceFunctionKey - Groups traces and their capture
|
|
2944
|
+
* @param traceFunctionKey - Groups traces and their capture controls.
|
|
2947
2945
|
* @param optionsOrFn - Options or the workflow entrypoint to wrap.
|
|
2948
2946
|
* @param maybeFn - Workflow entrypoint when options are provided.
|
|
2949
2947
|
* @experimental Automatic child-call instrumentation is experimental.
|
|
@@ -2982,7 +2980,6 @@ declare class Bitfab {
|
|
|
2982
2980
|
private createAutoTraceNode;
|
|
2983
2981
|
private createAutoTraceRoot;
|
|
2984
2982
|
private applySimulationPlan;
|
|
2985
|
-
private refreshAutoTraceCapturePolicy;
|
|
2986
2983
|
/**
|
|
2987
2984
|
* Flush and permanently close this client's tracing resources: its pending
|
|
2988
2985
|
* requests and the single span-transport worker shared by its decorators and
|
|
@@ -3604,7 +3601,7 @@ interface CommitRef {
|
|
|
3604
3601
|
/**
|
|
3605
3602
|
* SDK version from package.json (injected at build time)
|
|
3606
3603
|
*/
|
|
3607
|
-
declare const __version__ = "0.54.
|
|
3604
|
+
declare const __version__ = "0.54.13";
|
|
3608
3605
|
|
|
3609
3606
|
/**
|
|
3610
3607
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
getCurrentTrace,
|
|
31
31
|
reseedFromRegistry,
|
|
32
32
|
seedFromRegistry
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-Q7HDNYYY.js";
|
|
34
|
+
import "./chunk-RCHSYWKI.js";
|
|
35
35
|
import {
|
|
36
36
|
BITFAB_PROGRESS_PREFIX,
|
|
37
37
|
DbBranchReplayError,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
ReplayError,
|
|
40
40
|
reportReplayProgress,
|
|
41
41
|
serializeReplayResult
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FZNRSEMN.js";
|
|
43
43
|
import {
|
|
44
44
|
BitfabError,
|
|
45
45
|
DEFAULT_SERVICE_URL,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
MixedTracingError,
|
|
48
48
|
__version__,
|
|
49
49
|
flushTraces
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-YKOD4GWI.js";
|
|
51
51
|
import "./chunk-VCRFFCLY.js";
|
|
52
52
|
export {
|
|
53
53
|
AssertionCategoriesClient,
|
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.54.
|
|
100
|
+
__version__ = "0.54.13";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -2673,12 +2673,6 @@ var init_http = __esm({
|
|
|
2673
2673
|
async lookupFunction(name) {
|
|
2674
2674
|
return this.request("/api/sdk/functions/lookup", { name });
|
|
2675
2675
|
}
|
|
2676
|
-
async getAutoTracePolicy(traceFunctionKey, protocol) {
|
|
2677
|
-
return this.request("/api/sdk/auto-trace/policy", {
|
|
2678
|
-
traceFunctionKey,
|
|
2679
|
-
protocol
|
|
2680
|
-
});
|
|
2681
|
-
}
|
|
2682
2676
|
async getSimulationPlan() {
|
|
2683
2677
|
return this.get(
|
|
2684
2678
|
"/api/sdk/sim-plan",
|
|
@@ -5209,21 +5203,6 @@ function currentAutoTraceScope() {
|
|
|
5209
5203
|
initializeAutoTraceStorage();
|
|
5210
5204
|
return autoTraceState.storage?.getStore() ?? autoTraceState.browserScope;
|
|
5211
5205
|
}
|
|
5212
|
-
function __setBitfabAutoTraceCapturePolicy(client, traceFunctionKey, functionIds) {
|
|
5213
|
-
const policies = autoTraceState.capturePolicies.get(client) ?? /* @__PURE__ */ new Map();
|
|
5214
|
-
if (functionIds === void 0) {
|
|
5215
|
-
policies.delete(traceFunctionKey);
|
|
5216
|
-
if (policies.size === 0) {
|
|
5217
|
-
autoTraceState.capturePolicies.delete(client);
|
|
5218
|
-
}
|
|
5219
|
-
return;
|
|
5220
|
-
}
|
|
5221
|
-
policies.set(traceFunctionKey, new Set(functionIds));
|
|
5222
|
-
autoTraceState.capturePolicies.set(client, policies);
|
|
5223
|
-
}
|
|
5224
|
-
function getAutoTraceCapturePolicy(client, traceFunctionKey) {
|
|
5225
|
-
return autoTraceState.capturePolicies.get(client)?.get(traceFunctionKey);
|
|
5226
|
-
}
|
|
5227
5206
|
|
|
5228
5207
|
// src/optionalPeer.ts
|
|
5229
5208
|
function importOptionalPeer(specifierParts) {
|
|
@@ -7072,7 +7051,6 @@ function openAiAgentsParentSpanId(bitfabTraceId, enclosingSpanIds) {
|
|
|
7072
7051
|
}
|
|
7073
7052
|
|
|
7074
7053
|
// src/client.ts
|
|
7075
|
-
init_policyRefresh();
|
|
7076
7054
|
init_randomUuid();
|
|
7077
7055
|
init_replay();
|
|
7078
7056
|
|
|
@@ -8656,8 +8634,6 @@ function readBooleanEnv(name) {
|
|
|
8656
8634
|
var DEFAULT_AUTO_TRACE_MAX_DEPTH = 30;
|
|
8657
8635
|
var DEFAULT_AUTO_TRACE_MAX_SPANS = 500;
|
|
8658
8636
|
var AUTO_TRACE_PROTOCOL = "ts-auto-v1";
|
|
8659
|
-
var AUTO_TRACE_POLICY_REFRESH_MS = 6e4;
|
|
8660
|
-
var AUTO_TRACE_POLICY_RETRY_MS = 1e4;
|
|
8661
8637
|
function spanOwnerName(receiver) {
|
|
8662
8638
|
if (typeof receiver === "function") {
|
|
8663
8639
|
return receiver.name !== "" ? receiver.name : void 0;
|
|
@@ -8690,7 +8666,6 @@ var Bitfab = class {
|
|
|
8690
8666
|
constructor(config) {
|
|
8691
8667
|
/** Gate the empty-key warning to fire at most once. */
|
|
8692
8668
|
this.apiKeyWarned = false;
|
|
8693
|
-
this.autoTracePolicyRefreshes = /* @__PURE__ */ new Map();
|
|
8694
8669
|
/**
|
|
8695
8670
|
* Mock overrides registered via {@link Bitfab.registerMockOverride}, applied
|
|
8696
8671
|
* to every `replay` on this client (after any per-call `mockOverride`). In
|
|
@@ -8739,12 +8714,12 @@ var Bitfab = class {
|
|
|
8739
8714
|
*
|
|
8740
8715
|
* Build instrumentation turns repository functions called beneath this
|
|
8741
8716
|
* method into nested spans that capture inputs, outputs, and errors by
|
|
8742
|
-
* default.
|
|
8743
|
-
*
|
|
8717
|
+
* default. Source exclusions and sim-plan capture-off decisions are explicit
|
|
8718
|
+
* opt-outs from that default.
|
|
8744
8719
|
* Without a compatible build transform, this still records the decorated
|
|
8745
8720
|
* method as a normal rich root span but cannot discover child calls.
|
|
8746
8721
|
*
|
|
8747
|
-
* @param traceFunctionKey - Groups traces and their capture
|
|
8722
|
+
* @param traceFunctionKey - Groups traces and their capture controls.
|
|
8748
8723
|
* @param options - Root presentation, subtree bounds, and exclusions.
|
|
8749
8724
|
* @experimental Automatic child-call instrumentation is experimental.
|
|
8750
8725
|
*/
|
|
@@ -8902,11 +8877,6 @@ var Bitfab = class {
|
|
|
8902
8877
|
traceFunctionKey,
|
|
8903
8878
|
spanOptions,
|
|
8904
8879
|
function(...args) {
|
|
8905
|
-
const capturePolicy = getAutoTraceCapturePolicy(
|
|
8906
|
-
self,
|
|
8907
|
-
traceFunctionKey
|
|
8908
|
-
);
|
|
8909
|
-
self.refreshAutoTraceCapturePolicy(traceFunctionKey);
|
|
8910
8880
|
self.simulationPlan.refresh();
|
|
8911
8881
|
let spansUsed = 0;
|
|
8912
8882
|
let truncated = false;
|
|
@@ -8986,7 +8956,7 @@ var Bitfab = class {
|
|
|
8986
8956
|
surface: "opt-out",
|
|
8987
8957
|
instrumentation: "trace",
|
|
8988
8958
|
functionId: definition.id,
|
|
8989
|
-
captureContent:
|
|
8959
|
+
captureContent: true,
|
|
8990
8960
|
autoTraceDefinition: definition,
|
|
8991
8961
|
...nodeConfiguration?.testRunId !== void 0 && {
|
|
8992
8962
|
testRunId: nodeConfiguration.testRunId
|
|
@@ -9085,34 +9055,6 @@ var Bitfab = class {
|
|
|
9085
9055
|
applySimulationPlan(payload, submit) {
|
|
9086
9056
|
this.simulationPlan.send(payload, rootTraceFunctionKeyOf(payload), submit);
|
|
9087
9057
|
}
|
|
9088
|
-
refreshAutoTraceCapturePolicy(traceFunctionKey) {
|
|
9089
|
-
const state2 = this.autoTracePolicyRefreshes.get(traceFunctionKey) ?? new PolicyRefresh();
|
|
9090
|
-
this.autoTracePolicyRefreshes.set(traceFunctionKey, state2);
|
|
9091
|
-
state2.run(
|
|
9092
|
-
() => this.httpClient.getAutoTracePolicy(
|
|
9093
|
-
traceFunctionKey,
|
|
9094
|
-
AUTO_TRACE_PROTOCOL
|
|
9095
|
-
),
|
|
9096
|
-
(policy) => {
|
|
9097
|
-
if (policy.protocol !== AUTO_TRACE_PROTOCOL) {
|
|
9098
|
-
state2.hold(AUTO_TRACE_POLICY_RETRY_MS);
|
|
9099
|
-
return;
|
|
9100
|
-
}
|
|
9101
|
-
const functionIds = Array.isArray(policy.functionIds) ? policy.functionIds.filter(
|
|
9102
|
-
(id) => typeof id === "string" && id.startsWith(`${AUTO_TRACE_PROTOCOL}:`)
|
|
9103
|
-
).slice(0, DEFAULT_AUTO_TRACE_MAX_SPANS) : [];
|
|
9104
|
-
__setBitfabAutoTraceCapturePolicy(
|
|
9105
|
-
this,
|
|
9106
|
-
traceFunctionKey,
|
|
9107
|
-
policy.revision === null ? void 0 : functionIds
|
|
9108
|
-
);
|
|
9109
|
-
state2.hold(AUTO_TRACE_POLICY_REFRESH_MS);
|
|
9110
|
-
},
|
|
9111
|
-
() => {
|
|
9112
|
-
state2.hold(AUTO_TRACE_POLICY_RETRY_MS);
|
|
9113
|
-
}
|
|
9114
|
-
);
|
|
9115
|
-
}
|
|
9116
9058
|
/**
|
|
9117
9059
|
* Flush and permanently close this client's tracing resources: its pending
|
|
9118
9060
|
* requests and the single span-transport worker shared by its decorators and
|