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.
Files changed (36) hide show
  1. package/dist/autoTrace.cjs +0 -19
  2. package/dist/autoTrace.cjs.map +1 -1
  3. package/dist/autoTrace.d.cts +1 -3
  4. package/dist/autoTrace.d.ts +1 -3
  5. package/dist/autoTrace.js +1 -5
  6. package/dist/{chunk-ZR4HGK6G.js → chunk-FZNRSEMN.js} +2 -2
  7. package/dist/{chunk-RDSNJFWY.js → chunk-KPALXSAF.js} +3 -3
  8. package/dist/{chunk-YY5BB2YS.js → chunk-Q7HDNYYY.js} +11 -50
  9. package/dist/chunk-Q7HDNYYY.js.map +1 -0
  10. package/dist/{chunk-EGWJYCNT.js → chunk-RCHSYWKI.js} +2 -19
  11. package/dist/chunk-RCHSYWKI.js.map +1 -0
  12. package/dist/{chunk-VTFBDA3O.js → chunk-VW7MA7DS.js} +2 -8
  13. package/dist/{chunk-VTFBDA3O.js.map → chunk-VW7MA7DS.js.map} +1 -1
  14. package/dist/{chunk-WKXLCFLT.js → chunk-YKOD4GWI.js} +2 -9
  15. package/dist/{chunk-WKXLCFLT.js.map → chunk-YKOD4GWI.js.map} +1 -1
  16. package/dist/{http-NWSSB5FA.js → http-42KAFBUN.js} +2 -2
  17. package/dist/{http-RJH6VYAM.js → http-7PF6XCJR.js} +2 -2
  18. package/dist/index.cjs +5 -63
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +8 -11
  21. package/dist/index.d.ts +8 -11
  22. package/dist/index.js +4 -4
  23. package/dist/node.cjs +5 -63
  24. package/dist/node.cjs.map +1 -1
  25. package/dist/node.js +4 -4
  26. package/dist/{replay-WB5NQNQS.js → replay-5RHBDIEK.js} +3 -3
  27. package/dist/replayCli.js +2 -2
  28. package/dist/seedCli.js +2 -2
  29. package/package.json +1 -1
  30. package/dist/chunk-EGWJYCNT.js.map +0 -1
  31. package/dist/chunk-YY5BB2YS.js.map +0 -1
  32. /package/dist/{chunk-ZR4HGK6G.js.map → chunk-FZNRSEMN.js.map} +0 -0
  33. /package/dist/{chunk-RDSNJFWY.js.map → chunk-KPALXSAF.js.map} +0 -0
  34. /package/dist/{http-NWSSB5FA.js.map → http-42KAFBUN.js.map} +0 -0
  35. /package/dist/{http-RJH6VYAM.js.map → http-7PF6XCJR.js.map} +0 -0
  36. /package/dist/{replay-WB5NQNQS.js.map → replay-5RHBDIEK.js.map} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  flushTraces,
7
7
  parseRetryAfterMs,
8
8
  serializePayloadBody
9
- } from "./chunk-WKXLCFLT.js";
9
+ } from "./chunk-YKOD4GWI.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-NWSSB5FA.js.map
20
+ //# sourceMappingURL=http-42KAFBUN.js.map
@@ -6,7 +6,7 @@ import {
6
6
  flushTraces,
7
7
  parseRetryAfterMs,
8
8
  serializePayloadBody
9
- } from "./chunk-VTFBDA3O.js";
9
+ } from "./chunk-VW7MA7DS.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-RJH6VYAM.js.map
19
+ //# sourceMappingURL=http-7PF6XCJR.js.map
package/dist/index.cjs CHANGED
@@ -51,7 +51,7 @@ var __version__, __packageName__;
51
51
  var init_version_generated = __esm({
52
52
  "src/version.generated.ts"() {
53
53
  "use strict";
54
- __version__ = "0.54.12";
54
+ __version__ = "0.54.13";
55
55
  __packageName__ = "bitfab";
56
56
  }
57
57
  });
@@ -2666,12 +2666,6 @@ var init_http = __esm({
2666
2666
  async lookupFunction(name) {
2667
2667
  return this.request("/api/sdk/functions/lookup", { name });
2668
2668
  }
2669
- async getAutoTracePolicy(traceFunctionKey, protocol) {
2670
- return this.request("/api/sdk/auto-trace/policy", {
2671
- traceFunctionKey,
2672
- protocol
2673
- });
2674
- }
2675
2669
  async getSimulationPlan() {
2676
2670
  return this.get(
2677
2671
  "/api/sdk/sim-plan",
@@ -5195,21 +5189,6 @@ function currentAutoTraceScope() {
5195
5189
  initializeAutoTraceStorage();
5196
5190
  return autoTraceState.storage?.getStore() ?? autoTraceState.browserScope;
5197
5191
  }
5198
- function __setBitfabAutoTraceCapturePolicy(client, traceFunctionKey, functionIds) {
5199
- const policies = autoTraceState.capturePolicies.get(client) ?? /* @__PURE__ */ new Map();
5200
- if (functionIds === void 0) {
5201
- policies.delete(traceFunctionKey);
5202
- if (policies.size === 0) {
5203
- autoTraceState.capturePolicies.delete(client);
5204
- }
5205
- return;
5206
- }
5207
- policies.set(traceFunctionKey, new Set(functionIds));
5208
- autoTraceState.capturePolicies.set(client, policies);
5209
- }
5210
- function getAutoTraceCapturePolicy(client, traceFunctionKey) {
5211
- return autoTraceState.capturePolicies.get(client)?.get(traceFunctionKey);
5212
- }
5213
5192
 
5214
5193
  // src/optionalPeer.ts
5215
5194
  function importOptionalPeer(specifierParts) {
@@ -7058,7 +7037,6 @@ function openAiAgentsParentSpanId(bitfabTraceId, enclosingSpanIds) {
7058
7037
  }
7059
7038
 
7060
7039
  // src/client.ts
7061
- init_policyRefresh();
7062
7040
  init_randomUuid();
7063
7041
  init_replay();
7064
7042
 
@@ -8642,8 +8620,6 @@ function readBooleanEnv(name) {
8642
8620
  var DEFAULT_AUTO_TRACE_MAX_DEPTH = 30;
8643
8621
  var DEFAULT_AUTO_TRACE_MAX_SPANS = 500;
8644
8622
  var AUTO_TRACE_PROTOCOL = "ts-auto-v1";
8645
- var AUTO_TRACE_POLICY_REFRESH_MS = 6e4;
8646
- var AUTO_TRACE_POLICY_RETRY_MS = 1e4;
8647
8623
  function spanOwnerName(receiver) {
8648
8624
  if (typeof receiver === "function") {
8649
8625
  return receiver.name !== "" ? receiver.name : void 0;
@@ -8676,7 +8652,6 @@ var Bitfab = class {
8676
8652
  constructor(config) {
8677
8653
  /** Gate the empty-key warning to fire at most once. */
8678
8654
  this.apiKeyWarned = false;
8679
- this.autoTracePolicyRefreshes = /* @__PURE__ */ new Map();
8680
8655
  /**
8681
8656
  * Mock overrides registered via {@link Bitfab.registerMockOverride}, applied
8682
8657
  * to every `replay` on this client (after any per-call `mockOverride`). In
@@ -8725,12 +8700,12 @@ var Bitfab = class {
8725
8700
  *
8726
8701
  * Build instrumentation turns repository functions called beneath this
8727
8702
  * method into nested spans that capture inputs, outputs, and errors by
8728
- * default. A confirmed capture policy can narrow rich capture to selected
8729
- * function IDs.
8703
+ * default. Source exclusions and sim-plan capture-off decisions are explicit
8704
+ * opt-outs from that default.
8730
8705
  * Without a compatible build transform, this still records the decorated
8731
8706
  * method as a normal rich root span but cannot discover child calls.
8732
8707
  *
8733
- * @param traceFunctionKey - Groups traces and their capture policy.
8708
+ * @param traceFunctionKey - Groups traces and their capture controls.
8734
8709
  * @param options - Root presentation, subtree bounds, and exclusions.
8735
8710
  * @experimental Automatic child-call instrumentation is experimental.
8736
8711
  */
@@ -8888,11 +8863,6 @@ var Bitfab = class {
8888
8863
  traceFunctionKey,
8889
8864
  spanOptions,
8890
8865
  function(...args) {
8891
- const capturePolicy = getAutoTraceCapturePolicy(
8892
- self,
8893
- traceFunctionKey
8894
- );
8895
- self.refreshAutoTraceCapturePolicy(traceFunctionKey);
8896
8866
  self.simulationPlan.refresh();
8897
8867
  let spansUsed = 0;
8898
8868
  let truncated = false;
@@ -8972,7 +8942,7 @@ var Bitfab = class {
8972
8942
  surface: "opt-out",
8973
8943
  instrumentation: "trace",
8974
8944
  functionId: definition.id,
8975
- captureContent: nodeConfiguration !== void 0 || capturePolicy === void 0 || capturePolicy.has(definition.id),
8945
+ captureContent: true,
8976
8946
  autoTraceDefinition: definition,
8977
8947
  ...nodeConfiguration?.testRunId !== void 0 && {
8978
8948
  testRunId: nodeConfiguration.testRunId
@@ -9071,34 +9041,6 @@ var Bitfab = class {
9071
9041
  applySimulationPlan(payload, submit) {
9072
9042
  this.simulationPlan.send(payload, rootTraceFunctionKeyOf(payload), submit);
9073
9043
  }
9074
- refreshAutoTraceCapturePolicy(traceFunctionKey) {
9075
- const state2 = this.autoTracePolicyRefreshes.get(traceFunctionKey) ?? new PolicyRefresh();
9076
- this.autoTracePolicyRefreshes.set(traceFunctionKey, state2);
9077
- state2.run(
9078
- () => this.httpClient.getAutoTracePolicy(
9079
- traceFunctionKey,
9080
- AUTO_TRACE_PROTOCOL
9081
- ),
9082
- (policy) => {
9083
- if (policy.protocol !== AUTO_TRACE_PROTOCOL) {
9084
- state2.hold(AUTO_TRACE_POLICY_RETRY_MS);
9085
- return;
9086
- }
9087
- const functionIds = Array.isArray(policy.functionIds) ? policy.functionIds.filter(
9088
- (id) => typeof id === "string" && id.startsWith(`${AUTO_TRACE_PROTOCOL}:`)
9089
- ).slice(0, DEFAULT_AUTO_TRACE_MAX_SPANS) : [];
9090
- __setBitfabAutoTraceCapturePolicy(
9091
- this,
9092
- traceFunctionKey,
9093
- policy.revision === null ? void 0 : functionIds
9094
- );
9095
- state2.hold(AUTO_TRACE_POLICY_REFRESH_MS);
9096
- },
9097
- () => {
9098
- state2.hold(AUTO_TRACE_POLICY_RETRY_MS);
9099
- }
9100
- );
9101
- }
9102
9044
  /**
9103
9045
  * Flush and permanently close this client's tracing resources: its pending
9104
9046
  * requests and the single span-transport worker shared by its decorators and