bitfab 0.48.0 → 0.50.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-JXDMOPST.js → chunk-NHT7BLPJ.js} +62 -6
- package/dist/chunk-NHT7BLPJ.js.map +1 -0
- package/dist/{chunk-I6SVO5KX.js → chunk-SXHG2H6U.js} +2 -2
- package/dist/{chunk-CPMT6Y43.js → chunk-VC3CVN2P.js} +2 -2
- package/dist/{chunk-CPMT6Y43.js.map → chunk-VC3CVN2P.js.map} +1 -1
- package/dist/{chunk-3VHHLXEJ.js → chunk-WKSZSBRQ.js} +2 -2
- package/dist/{chunk-3VHHLXEJ.js.map → chunk-WKSZSBRQ.js.map} +1 -1
- package/dist/{http-YN67UB3K.js → http-UI4FW2QI.js} +2 -2
- package/dist/{http-42E3SI2N.js → http-W7XZFZN3.js} +2 -2
- package/dist/index.cjs +61 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -2
- package/dist/index.d.ts +66 -2
- package/dist/index.js +5 -3
- package/dist/node.cjs +61 -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 +5 -3
- package/dist/node.js.map +1 -1
- package/dist/{replay-QMTLYKMX.js → replay-G3E5VTPT.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-JXDMOPST.js.map +0 -1
- /package/dist/{chunk-I6SVO5KX.js.map → chunk-SXHG2H6U.js.map} +0 -0
- /package/dist/{http-42E3SI2N.js.map → http-UI4FW2QI.js.map} +0 -0
- /package/dist/{http-YN67UB3K.js.map → http-W7XZFZN3.js.map} +0 -0
- /package/dist/{replay-QMTLYKMX.js.map → replay-G3E5VTPT.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1259,6 +1259,8 @@ declare class DatasetsClient {
|
|
|
1259
1259
|
|
|
1260
1260
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
1261
1261
|
type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
|
|
1262
|
+
type LabelStatus = "labeled" | "skipped" | "unlabeled";
|
|
1263
|
+
type LabelSource = "human" | "agent";
|
|
1262
1264
|
type LabelTarget = ({
|
|
1263
1265
|
traceId: string;
|
|
1264
1266
|
originalTraceId?: never;
|
|
@@ -1285,11 +1287,72 @@ type LabelOutcome = {
|
|
|
1285
1287
|
traceId: string;
|
|
1286
1288
|
action: LabelAction;
|
|
1287
1289
|
};
|
|
1290
|
+
type HumanLabelUpdate = {
|
|
1291
|
+
traceId: string;
|
|
1292
|
+
assertionId?: string;
|
|
1293
|
+
label: boolean;
|
|
1294
|
+
annotation: string;
|
|
1295
|
+
confidence?: LabelConfidence;
|
|
1296
|
+
};
|
|
1297
|
+
type HumanLabelOutcome = {
|
|
1298
|
+
traceId: string;
|
|
1299
|
+
assertionId: string | null;
|
|
1300
|
+
label: boolean;
|
|
1301
|
+
action: "set";
|
|
1302
|
+
};
|
|
1303
|
+
type AssertionVerdict = {
|
|
1304
|
+
assertionId: string;
|
|
1305
|
+
assertion: string | null;
|
|
1306
|
+
labelStatus: LabelStatus;
|
|
1307
|
+
label: boolean | null;
|
|
1308
|
+
annotation: string | null;
|
|
1309
|
+
confidence: LabelConfidence | null;
|
|
1310
|
+
labelSource: LabelSource;
|
|
1311
|
+
approved: boolean;
|
|
1312
|
+
};
|
|
1313
|
+
type TraceLabels = {
|
|
1314
|
+
traceId: string;
|
|
1315
|
+
labelStatus: LabelStatus;
|
|
1316
|
+
label: boolean | null;
|
|
1317
|
+
annotation: string | null;
|
|
1318
|
+
approved: boolean;
|
|
1319
|
+
passed: number;
|
|
1320
|
+
failed: number;
|
|
1321
|
+
assertions: AssertionVerdict[];
|
|
1322
|
+
};
|
|
1288
1323
|
declare class LabelsClient {
|
|
1289
1324
|
private readonly httpClient;
|
|
1290
1325
|
constructor(httpClient: HttpClient);
|
|
1291
1326
|
save(update: LabelUpdate, testRunId?: string): Promise<LabelOutcome>;
|
|
1292
1327
|
saveAll(updates: LabelUpdate[], testRunId?: string): Promise<LabelOutcome[]>;
|
|
1328
|
+
saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
|
|
1329
|
+
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
1330
|
+
get(traceId: string): Promise<TraceLabels | null>;
|
|
1331
|
+
getAll(traceIds: string[]): Promise<TraceLabels[]>;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
type GraderLabelSource = "human" | "live_grader";
|
|
1335
|
+
type GraderLabel = {
|
|
1336
|
+
traceId: string;
|
|
1337
|
+
graderId: string;
|
|
1338
|
+
graderName: string | null;
|
|
1339
|
+
graderStatus: string;
|
|
1340
|
+
label: boolean | null;
|
|
1341
|
+
labelReason: string | null;
|
|
1342
|
+
failureDiagnostic: string | null;
|
|
1343
|
+
labelConfidence: LabelConfidence | null;
|
|
1344
|
+
source: GraderLabelSource;
|
|
1345
|
+
evaluatedAt: string | null;
|
|
1346
|
+
};
|
|
1347
|
+
type GetGraderLabelsParams = {
|
|
1348
|
+
traceIds?: string[];
|
|
1349
|
+
graderId?: string;
|
|
1350
|
+
limit?: number;
|
|
1351
|
+
};
|
|
1352
|
+
declare class GradersClient {
|
|
1353
|
+
private readonly httpClient;
|
|
1354
|
+
constructor(httpClient: HttpClient);
|
|
1355
|
+
getLabels(params: GetGraderLabelsParams): Promise<GraderLabel[]>;
|
|
1293
1356
|
}
|
|
1294
1357
|
|
|
1295
1358
|
/**
|
|
@@ -2566,6 +2629,7 @@ declare class Bitfab {
|
|
|
2566
2629
|
readonly datasets: DatasetsClient;
|
|
2567
2630
|
readonly traces: TracesClient;
|
|
2568
2631
|
readonly labels: LabelsClient;
|
|
2632
|
+
readonly graders: GradersClient;
|
|
2569
2633
|
private readonly bamlClient;
|
|
2570
2634
|
private readonly dbSnapshot;
|
|
2571
2635
|
private readonly autoTracePolicyRefreshes;
|
|
@@ -3211,7 +3275,7 @@ declare class BitfabFunction {
|
|
|
3211
3275
|
/**
|
|
3212
3276
|
* SDK version from package.json (injected at build time)
|
|
3213
3277
|
*/
|
|
3214
|
-
declare const __version__ = "0.
|
|
3278
|
+
declare const __version__ = "0.50.0";
|
|
3215
3279
|
|
|
3216
3280
|
/**
|
|
3217
3281
|
* Constants for the Bitfab SDK.
|
|
@@ -3341,4 +3405,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3341
3405
|
run?: boolean;
|
|
3342
3406
|
}): Promise<SeedResult>;
|
|
3343
3407
|
|
|
3344
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ArchiveAssertionsParams, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, HttpClient, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceIngestionType, type TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, type TraceResponse, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
|
|
3408
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ArchiveAssertionsParams, type AssertionVerdict, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceIngestionType, type TraceLabels, type TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, type TraceResponse, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -1259,6 +1259,8 @@ declare class DatasetsClient {
|
|
|
1259
1259
|
|
|
1260
1260
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
1261
1261
|
type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
|
|
1262
|
+
type LabelStatus = "labeled" | "skipped" | "unlabeled";
|
|
1263
|
+
type LabelSource = "human" | "agent";
|
|
1262
1264
|
type LabelTarget = ({
|
|
1263
1265
|
traceId: string;
|
|
1264
1266
|
originalTraceId?: never;
|
|
@@ -1285,11 +1287,72 @@ type LabelOutcome = {
|
|
|
1285
1287
|
traceId: string;
|
|
1286
1288
|
action: LabelAction;
|
|
1287
1289
|
};
|
|
1290
|
+
type HumanLabelUpdate = {
|
|
1291
|
+
traceId: string;
|
|
1292
|
+
assertionId?: string;
|
|
1293
|
+
label: boolean;
|
|
1294
|
+
annotation: string;
|
|
1295
|
+
confidence?: LabelConfidence;
|
|
1296
|
+
};
|
|
1297
|
+
type HumanLabelOutcome = {
|
|
1298
|
+
traceId: string;
|
|
1299
|
+
assertionId: string | null;
|
|
1300
|
+
label: boolean;
|
|
1301
|
+
action: "set";
|
|
1302
|
+
};
|
|
1303
|
+
type AssertionVerdict = {
|
|
1304
|
+
assertionId: string;
|
|
1305
|
+
assertion: string | null;
|
|
1306
|
+
labelStatus: LabelStatus;
|
|
1307
|
+
label: boolean | null;
|
|
1308
|
+
annotation: string | null;
|
|
1309
|
+
confidence: LabelConfidence | null;
|
|
1310
|
+
labelSource: LabelSource;
|
|
1311
|
+
approved: boolean;
|
|
1312
|
+
};
|
|
1313
|
+
type TraceLabels = {
|
|
1314
|
+
traceId: string;
|
|
1315
|
+
labelStatus: LabelStatus;
|
|
1316
|
+
label: boolean | null;
|
|
1317
|
+
annotation: string | null;
|
|
1318
|
+
approved: boolean;
|
|
1319
|
+
passed: number;
|
|
1320
|
+
failed: number;
|
|
1321
|
+
assertions: AssertionVerdict[];
|
|
1322
|
+
};
|
|
1288
1323
|
declare class LabelsClient {
|
|
1289
1324
|
private readonly httpClient;
|
|
1290
1325
|
constructor(httpClient: HttpClient);
|
|
1291
1326
|
save(update: LabelUpdate, testRunId?: string): Promise<LabelOutcome>;
|
|
1292
1327
|
saveAll(updates: LabelUpdate[], testRunId?: string): Promise<LabelOutcome[]>;
|
|
1328
|
+
saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
|
|
1329
|
+
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
1330
|
+
get(traceId: string): Promise<TraceLabels | null>;
|
|
1331
|
+
getAll(traceIds: string[]): Promise<TraceLabels[]>;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
type GraderLabelSource = "human" | "live_grader";
|
|
1335
|
+
type GraderLabel = {
|
|
1336
|
+
traceId: string;
|
|
1337
|
+
graderId: string;
|
|
1338
|
+
graderName: string | null;
|
|
1339
|
+
graderStatus: string;
|
|
1340
|
+
label: boolean | null;
|
|
1341
|
+
labelReason: string | null;
|
|
1342
|
+
failureDiagnostic: string | null;
|
|
1343
|
+
labelConfidence: LabelConfidence | null;
|
|
1344
|
+
source: GraderLabelSource;
|
|
1345
|
+
evaluatedAt: string | null;
|
|
1346
|
+
};
|
|
1347
|
+
type GetGraderLabelsParams = {
|
|
1348
|
+
traceIds?: string[];
|
|
1349
|
+
graderId?: string;
|
|
1350
|
+
limit?: number;
|
|
1351
|
+
};
|
|
1352
|
+
declare class GradersClient {
|
|
1353
|
+
private readonly httpClient;
|
|
1354
|
+
constructor(httpClient: HttpClient);
|
|
1355
|
+
getLabels(params: GetGraderLabelsParams): Promise<GraderLabel[]>;
|
|
1293
1356
|
}
|
|
1294
1357
|
|
|
1295
1358
|
/**
|
|
@@ -2566,6 +2629,7 @@ declare class Bitfab {
|
|
|
2566
2629
|
readonly datasets: DatasetsClient;
|
|
2567
2630
|
readonly traces: TracesClient;
|
|
2568
2631
|
readonly labels: LabelsClient;
|
|
2632
|
+
readonly graders: GradersClient;
|
|
2569
2633
|
private readonly bamlClient;
|
|
2570
2634
|
private readonly dbSnapshot;
|
|
2571
2635
|
private readonly autoTracePolicyRefreshes;
|
|
@@ -3211,7 +3275,7 @@ declare class BitfabFunction {
|
|
|
3211
3275
|
/**
|
|
3212
3276
|
* SDK version from package.json (injected at build time)
|
|
3213
3277
|
*/
|
|
3214
|
-
declare const __version__ = "0.
|
|
3278
|
+
declare const __version__ = "0.50.0";
|
|
3215
3279
|
|
|
3216
3280
|
/**
|
|
3217
3281
|
* Constants for the Bitfab SDK.
|
|
@@ -3341,4 +3405,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3341
3405
|
run?: boolean;
|
|
3342
3406
|
}): Promise<SeedResult>;
|
|
3343
3407
|
|
|
3344
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ArchiveAssertionsParams, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, HttpClient, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceIngestionType, type TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, type TraceResponse, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
|
|
3408
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ArchiveAssertionsParams, type AssertionVerdict, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceIngestionType, type TraceLabels, type TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, type TraceResponse, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
BitfabOpenAITracingProcessor,
|
|
18
18
|
BitfabVercelAiHandler,
|
|
19
19
|
DatasetsClient,
|
|
20
|
+
GradersClient,
|
|
20
21
|
LabelsClient,
|
|
21
22
|
SUPPORTED_PROVIDERS,
|
|
22
23
|
TracesClient,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
getCurrentSpan,
|
|
27
28
|
getCurrentTrace,
|
|
28
29
|
seedFromRegistry
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NHT7BLPJ.js";
|
|
30
31
|
import "./chunk-ZUD7OFYB.js";
|
|
31
32
|
import {
|
|
32
33
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -35,7 +36,7 @@ import {
|
|
|
35
36
|
ReplayError,
|
|
36
37
|
reportReplayProgress,
|
|
37
38
|
serializeReplayResult
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SXHG2H6U.js";
|
|
39
40
|
import {
|
|
40
41
|
BitfabError,
|
|
41
42
|
DEFAULT_SERVICE_URL,
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
MixedTracingError,
|
|
44
45
|
__version__,
|
|
45
46
|
flushTraces
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-WKSZSBRQ.js";
|
|
47
48
|
import "./chunk-H6LZRFMN.js";
|
|
48
49
|
export {
|
|
49
50
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -60,6 +61,7 @@ export {
|
|
|
60
61
|
DEFAULT_SERVICE_URL,
|
|
61
62
|
DatasetsClient,
|
|
62
63
|
DbBranchReplayError,
|
|
64
|
+
GradersClient,
|
|
63
65
|
HttpClient,
|
|
64
66
|
LabelsClient,
|
|
65
67
|
MixedTracingError,
|
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.
|
|
100
|
+
__version__ = "0.50.0";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -3288,6 +3288,7 @@ __export(node_exports, {
|
|
|
3288
3288
|
DEFAULT_SERVICE_URL: () => DEFAULT_SERVICE_URL,
|
|
3289
3289
|
DatasetsClient: () => DatasetsClient,
|
|
3290
3290
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
3291
|
+
GradersClient: () => GradersClient,
|
|
3291
3292
|
HttpClient: () => HttpClient,
|
|
3292
3293
|
LabelsClient: () => LabelsClient,
|
|
3293
3294
|
MixedTracingError: () => MixedTracingError,
|
|
@@ -4590,10 +4591,45 @@ function buildSnapshotRef(config, sdkWallClockBeforeFn) {
|
|
|
4590
4591
|
|
|
4591
4592
|
// src/client.ts
|
|
4592
4593
|
init_errors();
|
|
4594
|
+
|
|
4595
|
+
// src/graders.ts
|
|
4596
|
+
init_errors();
|
|
4597
|
+
var GRADER_LABELS_PATH = "/api/sdk/graderLabels";
|
|
4598
|
+
var GradersClient = class {
|
|
4599
|
+
constructor(httpClient) {
|
|
4600
|
+
this.httpClient = httpClient;
|
|
4601
|
+
}
|
|
4602
|
+
async getLabels(params) {
|
|
4603
|
+
const hasTraceIds = params.traceIds !== void 0 && params.traceIds.length > 0;
|
|
4604
|
+
const hasGraderId = params.graderId !== void 0;
|
|
4605
|
+
if (!hasTraceIds && !hasGraderId) {
|
|
4606
|
+
throw new BitfabError(
|
|
4607
|
+
"Pass traceIds, graderId, or both: there is nothing to read otherwise."
|
|
4608
|
+
);
|
|
4609
|
+
}
|
|
4610
|
+
const query = new URLSearchParams();
|
|
4611
|
+
if (params.traceIds !== void 0 && params.traceIds.length > 0) {
|
|
4612
|
+
query.set("traceIds", params.traceIds.join(","));
|
|
4613
|
+
}
|
|
4614
|
+
if (params.graderId !== void 0) {
|
|
4615
|
+
query.set("graderId", params.graderId);
|
|
4616
|
+
}
|
|
4617
|
+
if (params.limit !== void 0) {
|
|
4618
|
+
query.set("limit", String(params.limit));
|
|
4619
|
+
}
|
|
4620
|
+
const response = await this.httpClient.get(
|
|
4621
|
+
`${GRADER_LABELS_PATH}?${query.toString()}`
|
|
4622
|
+
);
|
|
4623
|
+
return response.labels;
|
|
4624
|
+
}
|
|
4625
|
+
};
|
|
4626
|
+
|
|
4627
|
+
// src/client.ts
|
|
4593
4628
|
init_http();
|
|
4594
4629
|
|
|
4595
4630
|
// src/labels.ts
|
|
4596
4631
|
var LABELS_PATH = "/api/sdk/traces/labels";
|
|
4632
|
+
var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
|
|
4597
4633
|
var LabelsClient = class {
|
|
4598
4634
|
constructor(httpClient) {
|
|
4599
4635
|
this.httpClient = httpClient;
|
|
@@ -4612,6 +4648,28 @@ var LabelsClient = class {
|
|
|
4612
4648
|
);
|
|
4613
4649
|
return response.labels;
|
|
4614
4650
|
}
|
|
4651
|
+
async saveHuman(update) {
|
|
4652
|
+
const [outcome] = await this.saveHumanAll([update]);
|
|
4653
|
+
return outcome;
|
|
4654
|
+
}
|
|
4655
|
+
async saveHumanAll(updates) {
|
|
4656
|
+
const response = await this.httpClient.request(HUMAN_LABELS_PATH, { labels: updates });
|
|
4657
|
+
return response.labels;
|
|
4658
|
+
}
|
|
4659
|
+
async get(traceId) {
|
|
4660
|
+
const [labels] = await this.getAll([traceId]);
|
|
4661
|
+
return labels ?? null;
|
|
4662
|
+
}
|
|
4663
|
+
async getAll(traceIds) {
|
|
4664
|
+
if (traceIds.length === 0) {
|
|
4665
|
+
return [];
|
|
4666
|
+
}
|
|
4667
|
+
const query = new URLSearchParams({ traceIds: traceIds.join(",") });
|
|
4668
|
+
const response = await this.httpClient.get(
|
|
4669
|
+
`${LABELS_PATH}?${query.toString()}`
|
|
4670
|
+
);
|
|
4671
|
+
return response.labels;
|
|
4672
|
+
}
|
|
4615
4673
|
};
|
|
4616
4674
|
|
|
4617
4675
|
// src/langgraph.ts
|
|
@@ -6389,6 +6447,7 @@ var Bitfab = class {
|
|
|
6389
6447
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
6390
6448
|
this.traces = new TracesClient(this.httpClient);
|
|
6391
6449
|
this.labels = new LabelsClient(this.httpClient);
|
|
6450
|
+
this.graders = new GradersClient(this.httpClient);
|
|
6392
6451
|
}
|
|
6393
6452
|
/**
|
|
6394
6453
|
* Decorate a class method as an automatically expanded trace root.
|
|
@@ -8293,6 +8352,7 @@ assertAsyncStorageRegistered();
|
|
|
8293
8352
|
DEFAULT_SERVICE_URL,
|
|
8294
8353
|
DatasetsClient,
|
|
8295
8354
|
DbBranchReplayError,
|
|
8355
|
+
GradersClient,
|
|
8296
8356
|
HttpClient,
|
|
8297
8357
|
LabelsClient,
|
|
8298
8358
|
MixedTracingError,
|