@bitfab/sdk 0.44.1 → 0.46.0
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-XTX66R4I.js → chunk-HSLKCBA3.js} +2 -2
- package/dist/{chunk-XTX66R4I.js.map → chunk-HSLKCBA3.js.map} +1 -1
- package/dist/{chunk-RZF5XSM6.js → chunk-OS62EZ6Y.js} +59 -6
- package/dist/chunk-OS62EZ6Y.js.map +1 -0
- package/dist/{chunk-AYEJRU7Z.js → chunk-RIMNDJP3.js} +2 -2
- package/dist/{chunk-AYEJRU7Z.js.map → chunk-RIMNDJP3.js.map} +1 -1
- package/dist/{chunk-SMWYCJH6.js → chunk-WVGPOCCT.js} +2 -2
- package/dist/{http-GHKRM3L7.js → http-LVSVWTKO.js} +2 -2
- package/dist/{http-CL4DNNRP.js → http-RKVEWOUX.js} +2 -2
- package/dist/index.cjs +56 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +117 -34
- package/dist/index.d.ts +117 -34
- package/dist/index.js +7 -3
- package/dist/node.cjs +56 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +7 -3
- package/dist/node.js.map +1 -1
- package/dist/{replay-IPATGCIY.js → replay-Q2YYL5HB.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-RZF5XSM6.js.map +0 -1
- /package/dist/{chunk-SMWYCJH6.js.map → chunk-WVGPOCCT.js.map} +0 -0
- /package/dist/{http-CL4DNNRP.js.map → http-LVSVWTKO.js.map} +0 -0
- /package/dist/{http-GHKRM3L7.js.map → http-RKVEWOUX.js.map} +0 -0
- /package/dist/{replay-IPATGCIY.js.map → replay-Q2YYL5HB.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
replayContextReady,
|
|
6
6
|
runWithReplayContext,
|
|
7
7
|
warnOnce
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HSLKCBA3.js";
|
|
9
9
|
|
|
10
10
|
// src/codeChange.ts
|
|
11
11
|
var MAX_FILES = 60;
|
|
@@ -1191,4 +1191,4 @@ export {
|
|
|
1191
1191
|
sleepForReplayPersistence,
|
|
1192
1192
|
replay
|
|
1193
1193
|
};
|
|
1194
|
-
//# sourceMappingURL=chunk-
|
|
1194
|
+
//# sourceMappingURL=chunk-WVGPOCCT.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HSLKCBA3.js";
|
|
10
10
|
import "./chunk-H6LZRFMN.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-LVSVWTKO.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RIMNDJP3.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-RKVEWOUX.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.
|
|
45
|
+
__version__ = "0.46.0";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -3269,10 +3269,12 @@ __export(index_exports, {
|
|
|
3269
3269
|
DatasetsClient: () => DatasetsClient,
|
|
3270
3270
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
3271
3271
|
HttpClient: () => HttpClient,
|
|
3272
|
+
LabelsClient: () => LabelsClient,
|
|
3272
3273
|
MixedTracingError: () => MixedTracingError,
|
|
3273
3274
|
NO_MOCK_OVERRIDE: () => NO_MOCK_OVERRIDE,
|
|
3274
3275
|
ReplayError: () => ReplayError,
|
|
3275
3276
|
SUPPORTED_PROVIDERS: () => SUPPORTED_PROVIDERS,
|
|
3277
|
+
TracesClient: () => TracesClient,
|
|
3276
3278
|
__version__: () => __version__,
|
|
3277
3279
|
defineReplayRegistry: () => defineReplayRegistry,
|
|
3278
3280
|
finalizers: () => finalizers,
|
|
@@ -3286,6 +3288,33 @@ __export(index_exports, {
|
|
|
3286
3288
|
});
|
|
3287
3289
|
module.exports = __toCommonJS(index_exports);
|
|
3288
3290
|
|
|
3291
|
+
// src/assertions.ts
|
|
3292
|
+
function expectationsPath(traceId, suffix = "") {
|
|
3293
|
+
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
3294
|
+
}
|
|
3295
|
+
var TracesClient = class {
|
|
3296
|
+
constructor(httpClient) {
|
|
3297
|
+
this.httpClient = httpClient;
|
|
3298
|
+
}
|
|
3299
|
+
async getAssertions(traceId) {
|
|
3300
|
+
return this.httpClient.get(expectationsPath(traceId));
|
|
3301
|
+
}
|
|
3302
|
+
async saveAssertions(params) {
|
|
3303
|
+
const response = await this.httpClient.request(expectationsPath(params.traceId), {
|
|
3304
|
+
assertions: params.assertions,
|
|
3305
|
+
source: params.source ?? "agent"
|
|
3306
|
+
});
|
|
3307
|
+
return response.assertions;
|
|
3308
|
+
}
|
|
3309
|
+
async archiveAssertions(params) {
|
|
3310
|
+
const response = await this.httpClient.request(
|
|
3311
|
+
expectationsPath(params.traceId, "/archive"),
|
|
3312
|
+
{ assertionIds: params.assertionIds }
|
|
3313
|
+
);
|
|
3314
|
+
return response.archived;
|
|
3315
|
+
}
|
|
3316
|
+
};
|
|
3317
|
+
|
|
3289
3318
|
// src/claudeAgentSdk.ts
|
|
3290
3319
|
init_constants();
|
|
3291
3320
|
init_http();
|
|
@@ -4536,6 +4565,28 @@ function buildSnapshotRef(config, sdkWallClockBeforeFn) {
|
|
|
4536
4565
|
init_errors();
|
|
4537
4566
|
init_http();
|
|
4538
4567
|
|
|
4568
|
+
// src/labels.ts
|
|
4569
|
+
var LABELS_PATH = "/api/sdk/traces/labels";
|
|
4570
|
+
var LabelsClient = class {
|
|
4571
|
+
constructor(httpClient) {
|
|
4572
|
+
this.httpClient = httpClient;
|
|
4573
|
+
}
|
|
4574
|
+
async save(update, testRunId) {
|
|
4575
|
+
const [outcome] = await this.saveAll([update], testRunId);
|
|
4576
|
+
return outcome;
|
|
4577
|
+
}
|
|
4578
|
+
async saveAll(updates, testRunId) {
|
|
4579
|
+
const response = await this.httpClient.request(
|
|
4580
|
+
LABELS_PATH,
|
|
4581
|
+
{
|
|
4582
|
+
labels: updates,
|
|
4583
|
+
...testRunId === void 0 ? {} : { testRunId }
|
|
4584
|
+
}
|
|
4585
|
+
);
|
|
4586
|
+
return response.labels;
|
|
4587
|
+
}
|
|
4588
|
+
};
|
|
4589
|
+
|
|
4539
4590
|
// src/langgraph.ts
|
|
4540
4591
|
init_constants();
|
|
4541
4592
|
init_http();
|
|
@@ -6309,6 +6360,8 @@ var Bitfab = class {
|
|
|
6309
6360
|
timeout: this.timeout
|
|
6310
6361
|
});
|
|
6311
6362
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
6363
|
+
this.traces = new TracesClient(this.httpClient);
|
|
6364
|
+
this.labels = new LabelsClient(this.httpClient);
|
|
6312
6365
|
}
|
|
6313
6366
|
/**
|
|
6314
6367
|
* Decorate a class method as an automatically expanded trace root.
|
|
@@ -8210,10 +8263,12 @@ function resolveTraceFunctionKey(registration) {
|
|
|
8210
8263
|
DatasetsClient,
|
|
8211
8264
|
DbBranchReplayError,
|
|
8212
8265
|
HttpClient,
|
|
8266
|
+
LabelsClient,
|
|
8213
8267
|
MixedTracingError,
|
|
8214
8268
|
NO_MOCK_OVERRIDE,
|
|
8215
8269
|
ReplayError,
|
|
8216
8270
|
SUPPORTED_PROVIDERS,
|
|
8271
|
+
TracesClient,
|
|
8217
8272
|
__version__,
|
|
8218
8273
|
defineReplayRegistry,
|
|
8219
8274
|
finalizers,
|