bitfab 0.44.0 → 0.45.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-UUH6NLPT.js → chunk-4XURJZ42.js} +2 -2
- package/dist/{chunk-UUH6NLPT.js.map → chunk-4XURJZ42.js.map} +1 -1
- package/dist/{chunk-WKGQM7HI.js → chunk-GYDK6ZDN.js} +59 -6
- package/dist/chunk-GYDK6ZDN.js.map +1 -0
- package/dist/{chunk-J25AP452.js → chunk-W77NNSNX.js} +13 -5
- package/dist/chunk-W77NNSNX.js.map +1 -0
- package/dist/{chunk-DCF7NJK7.js → chunk-YDPSSWNF.js} +2 -2
- package/dist/{chunk-DCF7NJK7.js.map → chunk-YDPSSWNF.js.map} +1 -1
- package/dist/{http-TG6US6A2.js → http-GLHHPTVC.js} +2 -2
- package/dist/{http-N6ZAG2II.js → http-MIPKYJZK.js} +2 -2
- package/dist/index.cjs +67 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -34
- package/dist/index.d.ts +153 -34
- package/dist/index.js +7 -3
- package/dist/node.cjs +67 -4
- 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-APEO4CAZ.js → replay-LBLBA2CZ.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/replayCli.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-J25AP452.js.map +0 -1
- package/dist/chunk-WKGQM7HI.js.map +0 -1
- /package/dist/{http-N6ZAG2II.js.map → http-GLHHPTVC.js.map} +0 -0
- /package/dist/{http-TG6US6A2.js.map → http-MIPKYJZK.js.map} +0 -0
- /package/dist/{replay-APEO4CAZ.js.map → replay-LBLBA2CZ.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YDPSSWNF.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-GLHHPTVC.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4XURJZ42.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-MIPKYJZK.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
|
+
__version__ = "0.45.0";
|
|
55
55
|
__packageName__ = "bitfab";
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -2728,7 +2728,9 @@ async function processItem(httpClient, serverItem, fn, testRunId, mockStrategy,
|
|
|
2728
2728
|
tokens: null,
|
|
2729
2729
|
model: serverItem.originalModel ?? serverItem.model ?? null,
|
|
2730
2730
|
dbSnapshotRef: dbSnapshotRef ?? null,
|
|
2731
|
-
dbBranchTimings: dbBranchTimings ?? null
|
|
2731
|
+
dbBranchTimings: dbBranchTimings ?? null,
|
|
2732
|
+
traceOutline: null,
|
|
2733
|
+
originalTraceOutline: null
|
|
2732
2734
|
};
|
|
2733
2735
|
}
|
|
2734
2736
|
try {
|
|
@@ -2812,7 +2814,9 @@ async function processItem(httpClient, serverItem, fn, testRunId, mockStrategy,
|
|
|
2812
2814
|
tokens: null,
|
|
2813
2815
|
model: originalModel,
|
|
2814
2816
|
dbSnapshotRef: dbSnapshotRef ?? null,
|
|
2815
|
-
dbBranchTimings: dbBranchTimings ?? null
|
|
2817
|
+
dbBranchTimings: dbBranchTimings ?? null,
|
|
2818
|
+
traceOutline: null,
|
|
2819
|
+
originalTraceOutline: null
|
|
2816
2820
|
};
|
|
2817
2821
|
}
|
|
2818
2822
|
async function waitForReplayPersistence(httpClient, testRunId, replayedTraceIds) {
|
|
@@ -3067,7 +3071,9 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
3067
3071
|
tokens: item.tokens,
|
|
3068
3072
|
model: item.model,
|
|
3069
3073
|
dbSnapshotRef: item.dbSnapshotRef,
|
|
3070
|
-
dbBranchTimings: item.dbBranchTimings
|
|
3074
|
+
dbBranchTimings: item.dbBranchTimings,
|
|
3075
|
+
traceOutline: item.traceOutline,
|
|
3076
|
+
originalTraceOutline: item.originalTraceOutline
|
|
3071
3077
|
}
|
|
3072
3078
|
});
|
|
3073
3079
|
} catch {
|
|
@@ -3147,7 +3153,9 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
3147
3153
|
}
|
|
3148
3154
|
if (mapped !== void 0) {
|
|
3149
3155
|
item.tokens = replayTokens?.[mapped] ?? null;
|
|
3156
|
+
item.traceOutline = completeResult.traceOutlines?.[mapped] ?? null;
|
|
3150
3157
|
}
|
|
3158
|
+
item.originalTraceOutline = completeResult.originalTraceOutlines?.[item.originalTraceId] ?? null;
|
|
3151
3159
|
}
|
|
3152
3160
|
if (completedCount > 0 && missing.length === completedCount) {
|
|
3153
3161
|
const serverCount = completeResult.traceCount !== void 0 ? ` The server persisted ${completeResult.traceCount} trace(s) for this run.` : "";
|
|
@@ -3270,10 +3278,12 @@ __export(index_exports, {
|
|
|
3270
3278
|
DatasetsClient: () => DatasetsClient,
|
|
3271
3279
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
3272
3280
|
HttpClient: () => HttpClient,
|
|
3281
|
+
LabelsClient: () => LabelsClient,
|
|
3273
3282
|
MixedTracingError: () => MixedTracingError,
|
|
3274
3283
|
NO_MOCK_OVERRIDE: () => NO_MOCK_OVERRIDE,
|
|
3275
3284
|
ReplayError: () => ReplayError,
|
|
3276
3285
|
SUPPORTED_PROVIDERS: () => SUPPORTED_PROVIDERS,
|
|
3286
|
+
TracesClient: () => TracesClient,
|
|
3277
3287
|
__version__: () => __version__,
|
|
3278
3288
|
defineReplayRegistry: () => defineReplayRegistry,
|
|
3279
3289
|
finalizers: () => finalizers,
|
|
@@ -3287,6 +3297,33 @@ __export(index_exports, {
|
|
|
3287
3297
|
});
|
|
3288
3298
|
module.exports = __toCommonJS(index_exports);
|
|
3289
3299
|
|
|
3300
|
+
// src/assertions.ts
|
|
3301
|
+
function expectationsPath(traceId, suffix = "") {
|
|
3302
|
+
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
3303
|
+
}
|
|
3304
|
+
var TracesClient = class {
|
|
3305
|
+
constructor(httpClient) {
|
|
3306
|
+
this.httpClient = httpClient;
|
|
3307
|
+
}
|
|
3308
|
+
async getAssertions(traceId) {
|
|
3309
|
+
return this.httpClient.get(expectationsPath(traceId));
|
|
3310
|
+
}
|
|
3311
|
+
async saveAssertions(params) {
|
|
3312
|
+
const response = await this.httpClient.request(expectationsPath(params.traceId), {
|
|
3313
|
+
assertions: params.assertions,
|
|
3314
|
+
source: params.source ?? "agent"
|
|
3315
|
+
});
|
|
3316
|
+
return response.assertions;
|
|
3317
|
+
}
|
|
3318
|
+
async archiveAssertions(params) {
|
|
3319
|
+
const response = await this.httpClient.request(
|
|
3320
|
+
expectationsPath(params.traceId, "/archive"),
|
|
3321
|
+
{ assertionIds: params.assertionIds }
|
|
3322
|
+
);
|
|
3323
|
+
return response.archived;
|
|
3324
|
+
}
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3290
3327
|
// src/claudeAgentSdk.ts
|
|
3291
3328
|
init_constants();
|
|
3292
3329
|
init_http();
|
|
@@ -4537,6 +4574,28 @@ function buildSnapshotRef(config, sdkWallClockBeforeFn) {
|
|
|
4537
4574
|
init_errors();
|
|
4538
4575
|
init_http();
|
|
4539
4576
|
|
|
4577
|
+
// src/labels.ts
|
|
4578
|
+
var LABELS_PATH = "/api/sdk/traces/labels";
|
|
4579
|
+
var LabelsClient = class {
|
|
4580
|
+
constructor(httpClient) {
|
|
4581
|
+
this.httpClient = httpClient;
|
|
4582
|
+
}
|
|
4583
|
+
async save(params) {
|
|
4584
|
+
const response = await this.httpClient.request(
|
|
4585
|
+
LABELS_PATH,
|
|
4586
|
+
{
|
|
4587
|
+
labels: params.labels,
|
|
4588
|
+
...params.testRunId === void 0 ? {} : { testRunId: params.testRunId }
|
|
4589
|
+
}
|
|
4590
|
+
);
|
|
4591
|
+
return response.labels;
|
|
4592
|
+
}
|
|
4593
|
+
async saveOne(update, testRunId) {
|
|
4594
|
+
const [outcome] = await this.save({ labels: [update], testRunId });
|
|
4595
|
+
return outcome;
|
|
4596
|
+
}
|
|
4597
|
+
};
|
|
4598
|
+
|
|
4540
4599
|
// src/langgraph.ts
|
|
4541
4600
|
init_constants();
|
|
4542
4601
|
init_http();
|
|
@@ -6310,6 +6369,8 @@ var Bitfab = class {
|
|
|
6310
6369
|
timeout: this.timeout
|
|
6311
6370
|
});
|
|
6312
6371
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
6372
|
+
this.traces = new TracesClient(this.httpClient);
|
|
6373
|
+
this.labels = new LabelsClient(this.httpClient);
|
|
6313
6374
|
}
|
|
6314
6375
|
/**
|
|
6315
6376
|
* Decorate a class method as an automatically expanded trace root.
|
|
@@ -8211,10 +8272,12 @@ function resolveTraceFunctionKey(registration) {
|
|
|
8211
8272
|
DatasetsClient,
|
|
8212
8273
|
DbBranchReplayError,
|
|
8213
8274
|
HttpClient,
|
|
8275
|
+
LabelsClient,
|
|
8214
8276
|
MixedTracingError,
|
|
8215
8277
|
NO_MOCK_OVERRIDE,
|
|
8216
8278
|
ReplayError,
|
|
8217
8279
|
SUPPORTED_PROVIDERS,
|
|
8280
|
+
TracesClient,
|
|
8218
8281
|
__version__,
|
|
8219
8282
|
defineReplayRegistry,
|
|
8220
8283
|
finalizers,
|