@bitfab/sdk 0.54.4 → 0.54.5

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.
@@ -6,7 +6,7 @@ import {
6
6
  replayContextReady,
7
7
  runWithReplayContext,
8
8
  warnOnce
9
- } from "./chunk-GMUC6A7M.js";
9
+ } from "./chunk-PIF5HH3Z.js";
10
10
  import {
11
11
  runWithCaptureSuppressed
12
12
  } from "./chunk-VCRFFCLY.js";
@@ -1212,4 +1212,4 @@ export {
1212
1212
  sleepForReplayPersistence,
1213
1213
  replay
1214
1214
  };
1215
- //# sourceMappingURL=chunk-NFJ6ZZWY.js.map
1215
+ //# sourceMappingURL=chunk-YH6YO2WS.js.map
@@ -6,7 +6,7 @@ import {
6
6
  flushTraces,
7
7
  parseRetryAfterMs,
8
8
  serializePayloadBody
9
- } from "./chunk-MEUBRQCE.js";
9
+ } from "./chunk-3STIE5QL.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-V6EX62Q5.js.map
19
+ //# sourceMappingURL=http-36EP65LE.js.map
@@ -6,7 +6,7 @@ import {
6
6
  flushTraces,
7
7
  parseRetryAfterMs,
8
8
  serializePayloadBody
9
- } from "./chunk-GMUC6A7M.js";
9
+ } from "./chunk-PIF5HH3Z.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-BJR5H66S.js.map
20
+ //# sourceMappingURL=http-JQ4RXRWH.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.4";
45
+ __version__ = "0.54.5";
46
46
  __packageName__ = "@bitfab/sdk";
47
47
  }
48
48
  });
@@ -4342,45 +4342,6 @@ var AssertionCategoriesClient = class {
4342
4342
  }
4343
4343
  };
4344
4344
 
4345
- // src/assertions.ts
4346
- var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
4347
- function traceAssertionsPath(traceId, suffix = "") {
4348
- return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
4349
- }
4350
- var TracesClient = class {
4351
- constructor(httpClient) {
4352
- this.httpClient = httpClient;
4353
- }
4354
- async getAssertions(traceId) {
4355
- return this.httpClient.get(
4356
- traceAssertionsPath(traceId)
4357
- );
4358
- }
4359
- async saveAssertions(params) {
4360
- return this.saveAssertionsAll({
4361
- updates: [{ traceId: params.traceId, assertions: params.assertions }],
4362
- source: params.source
4363
- });
4364
- }
4365
- async saveAssertionsAll(params) {
4366
- if (params.updates.length === 0) {
4367
- return [];
4368
- }
4369
- const response = await this.httpClient.request(ASSERTIONS_PATH, {
4370
- updates: params.updates,
4371
- source: params.source ?? "agent"
4372
- });
4373
- return response.assertions;
4374
- }
4375
- async archiveAssertions(params) {
4376
- const response = await this.httpClient.request(
4377
- traceAssertionsPath(params.traceId, "/archive"),
4378
- { assertionIds: params.assertionIds }
4379
- );
4380
- return response.archived;
4381
- }
4382
- };
4383
-
4384
4345
  // src/claudeAgentSdk.ts
4385
4346
  init_constants();
4386
4347
  init_http();
@@ -7029,6 +6990,55 @@ var StreamFinalizationError = class extends Error {
7029
6990
  // src/client.ts
7030
6991
  init_traceMetadata();
7031
6992
 
6993
+ // src/traces.ts
6994
+ var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
6995
+ var SEARCH_PATH = "/api/sdk/traces/search";
6996
+ function traceAssertionsPath(traceId, suffix = "") {
6997
+ return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
6998
+ }
6999
+ var TracesClient = class {
7000
+ constructor(httpClient) {
7001
+ this.httpClient = httpClient;
7002
+ }
7003
+ /**
7004
+ * Search traces by exact caller metadata.
7005
+ *
7006
+ * Keys and values are matched case-insensitively. Up to 10 supplied pairs
7007
+ * must match. Use `nextCursor` from the result to fetch another page.
7008
+ */
7009
+ async search(params) {
7010
+ return this.httpClient.request(SEARCH_PATH, params);
7011
+ }
7012
+ async getAssertions(traceId) {
7013
+ return this.httpClient.get(
7014
+ traceAssertionsPath(traceId)
7015
+ );
7016
+ }
7017
+ async saveAssertions(params) {
7018
+ return this.saveAssertionsAll({
7019
+ updates: [{ traceId: params.traceId, assertions: params.assertions }],
7020
+ source: params.source
7021
+ });
7022
+ }
7023
+ async saveAssertionsAll(params) {
7024
+ if (params.updates.length === 0) {
7025
+ return [];
7026
+ }
7027
+ const response = await this.httpClient.request(ASSERTIONS_PATH, {
7028
+ updates: params.updates,
7029
+ source: params.source ?? "agent"
7030
+ });
7031
+ return response.assertions;
7032
+ }
7033
+ async archiveAssertions(params) {
7034
+ const response = await this.httpClient.request(
7035
+ traceAssertionsPath(params.traceId, "/archive"),
7036
+ { assertionIds: params.assertionIds }
7037
+ );
7038
+ return response.archived;
7039
+ }
7040
+ };
7041
+
7032
7042
  // src/tracing.ts
7033
7043
  init_constants();
7034
7044
  init_http();