@bitfab/sdk 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-LUDC6WMA.js → chunk-6LG3OFIX.js} +2 -2
- package/dist/{chunk-ZIPITG22.js → chunk-BT4RNCQL.js} +62 -6
- package/dist/chunk-BT4RNCQL.js.map +1 -0
- package/dist/{chunk-I6MWT34L.js → chunk-W5P5JAH7.js} +2 -2
- package/dist/{chunk-I6MWT34L.js.map → chunk-W5P5JAH7.js.map} +1 -1
- package/dist/{chunk-OKSCUFJ6.js → chunk-XZDYNFI5.js} +2 -2
- package/dist/{chunk-OKSCUFJ6.js.map → chunk-XZDYNFI5.js.map} +1 -1
- package/dist/{http-MO5ZRPA6.js → http-PFP2EQVE.js} +2 -2
- package/dist/{http-CGTUTKK3.js → http-W2YPLY7H.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-QFH4XW4T.js → replay-AFX7ENZI.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ZIPITG22.js.map +0 -1
- /package/dist/{chunk-LUDC6WMA.js.map → chunk-6LG3OFIX.js.map} +0 -0
- /package/dist/{http-CGTUTKK3.js.map → http-PFP2EQVE.js.map} +0 -0
- /package/dist/{http-MO5ZRPA6.js.map → http-W2YPLY7H.js.map} +0 -0
- /package/dist/{replay-QFH4XW4T.js.map → replay-AFX7ENZI.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
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
BitfabOpenAITracingProcessor,
|
|
9
9
|
BitfabVercelAiHandler,
|
|
10
10
|
DatasetsClient,
|
|
11
|
+
GradersClient,
|
|
11
12
|
LabelsClient,
|
|
12
13
|
SUPPORTED_PROVIDERS,
|
|
13
14
|
TracesClient,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
getCurrentSpan,
|
|
18
19
|
getCurrentTrace,
|
|
19
20
|
seedFromRegistry
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BT4RNCQL.js";
|
|
21
22
|
import "./chunk-ZUD7OFYB.js";
|
|
22
23
|
import {
|
|
23
24
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
ReplayError,
|
|
27
28
|
reportReplayProgress,
|
|
28
29
|
serializeReplayResult
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6LG3OFIX.js";
|
|
30
31
|
import {
|
|
31
32
|
BitfabError,
|
|
32
33
|
DEFAULT_SERVICE_URL,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
MixedTracingError,
|
|
35
36
|
__version__,
|
|
36
37
|
flushTraces
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-XZDYNFI5.js";
|
|
38
39
|
import "./chunk-H6LZRFMN.js";
|
|
39
40
|
export {
|
|
40
41
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -51,6 +52,7 @@ export {
|
|
|
51
52
|
DEFAULT_SERVICE_URL,
|
|
52
53
|
DatasetsClient,
|
|
53
54
|
DbBranchReplayError,
|
|
55
|
+
GradersClient,
|
|
54
56
|
HttpClient,
|
|
55
57
|
LabelsClient,
|
|
56
58
|
MixedTracingError,
|
package/dist/node.cjs
CHANGED
|
@@ -88,7 +88,7 @@ var __version__, __packageName__;
|
|
|
88
88
|
var init_version_generated = __esm({
|
|
89
89
|
"src/version.generated.ts"() {
|
|
90
90
|
"use strict";
|
|
91
|
-
__version__ = "0.
|
|
91
|
+
__version__ = "0.50.0";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -3279,6 +3279,7 @@ __export(node_exports, {
|
|
|
3279
3279
|
DEFAULT_SERVICE_URL: () => DEFAULT_SERVICE_URL,
|
|
3280
3280
|
DatasetsClient: () => DatasetsClient,
|
|
3281
3281
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
3282
|
+
GradersClient: () => GradersClient,
|
|
3282
3283
|
HttpClient: () => HttpClient,
|
|
3283
3284
|
LabelsClient: () => LabelsClient,
|
|
3284
3285
|
MixedTracingError: () => MixedTracingError,
|
|
@@ -4581,10 +4582,45 @@ function buildSnapshotRef(config, sdkWallClockBeforeFn) {
|
|
|
4581
4582
|
|
|
4582
4583
|
// src/client.ts
|
|
4583
4584
|
init_errors();
|
|
4585
|
+
|
|
4586
|
+
// src/graders.ts
|
|
4587
|
+
init_errors();
|
|
4588
|
+
var GRADER_LABELS_PATH = "/api/sdk/graderLabels";
|
|
4589
|
+
var GradersClient = class {
|
|
4590
|
+
constructor(httpClient) {
|
|
4591
|
+
this.httpClient = httpClient;
|
|
4592
|
+
}
|
|
4593
|
+
async getLabels(params) {
|
|
4594
|
+
const hasTraceIds = params.traceIds !== void 0 && params.traceIds.length > 0;
|
|
4595
|
+
const hasGraderId = params.graderId !== void 0;
|
|
4596
|
+
if (!hasTraceIds && !hasGraderId) {
|
|
4597
|
+
throw new BitfabError(
|
|
4598
|
+
"Pass traceIds, graderId, or both: there is nothing to read otherwise."
|
|
4599
|
+
);
|
|
4600
|
+
}
|
|
4601
|
+
const query = new URLSearchParams();
|
|
4602
|
+
if (params.traceIds !== void 0 && params.traceIds.length > 0) {
|
|
4603
|
+
query.set("traceIds", params.traceIds.join(","));
|
|
4604
|
+
}
|
|
4605
|
+
if (params.graderId !== void 0) {
|
|
4606
|
+
query.set("graderId", params.graderId);
|
|
4607
|
+
}
|
|
4608
|
+
if (params.limit !== void 0) {
|
|
4609
|
+
query.set("limit", String(params.limit));
|
|
4610
|
+
}
|
|
4611
|
+
const response = await this.httpClient.get(
|
|
4612
|
+
`${GRADER_LABELS_PATH}?${query.toString()}`
|
|
4613
|
+
);
|
|
4614
|
+
return response.labels;
|
|
4615
|
+
}
|
|
4616
|
+
};
|
|
4617
|
+
|
|
4618
|
+
// src/client.ts
|
|
4584
4619
|
init_http();
|
|
4585
4620
|
|
|
4586
4621
|
// src/labels.ts
|
|
4587
4622
|
var LABELS_PATH = "/api/sdk/traces/labels";
|
|
4623
|
+
var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
|
|
4588
4624
|
var LabelsClient = class {
|
|
4589
4625
|
constructor(httpClient) {
|
|
4590
4626
|
this.httpClient = httpClient;
|
|
@@ -4603,6 +4639,28 @@ var LabelsClient = class {
|
|
|
4603
4639
|
);
|
|
4604
4640
|
return response.labels;
|
|
4605
4641
|
}
|
|
4642
|
+
async saveHuman(update) {
|
|
4643
|
+
const [outcome] = await this.saveHumanAll([update]);
|
|
4644
|
+
return outcome;
|
|
4645
|
+
}
|
|
4646
|
+
async saveHumanAll(updates) {
|
|
4647
|
+
const response = await this.httpClient.request(HUMAN_LABELS_PATH, { labels: updates });
|
|
4648
|
+
return response.labels;
|
|
4649
|
+
}
|
|
4650
|
+
async get(traceId) {
|
|
4651
|
+
const [labels] = await this.getAll([traceId]);
|
|
4652
|
+
return labels ?? null;
|
|
4653
|
+
}
|
|
4654
|
+
async getAll(traceIds) {
|
|
4655
|
+
if (traceIds.length === 0) {
|
|
4656
|
+
return [];
|
|
4657
|
+
}
|
|
4658
|
+
const query = new URLSearchParams({ traceIds: traceIds.join(",") });
|
|
4659
|
+
const response = await this.httpClient.get(
|
|
4660
|
+
`${LABELS_PATH}?${query.toString()}`
|
|
4661
|
+
);
|
|
4662
|
+
return response.labels;
|
|
4663
|
+
}
|
|
4606
4664
|
};
|
|
4607
4665
|
|
|
4608
4666
|
// src/langgraph.ts
|
|
@@ -6380,6 +6438,7 @@ var Bitfab = class {
|
|
|
6380
6438
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
6381
6439
|
this.traces = new TracesClient(this.httpClient);
|
|
6382
6440
|
this.labels = new LabelsClient(this.httpClient);
|
|
6441
|
+
this.graders = new GradersClient(this.httpClient);
|
|
6383
6442
|
}
|
|
6384
6443
|
/**
|
|
6385
6444
|
* Decorate a class method as an automatically expanded trace root.
|
|
@@ -8284,6 +8343,7 @@ assertAsyncStorageRegistered();
|
|
|
8284
8343
|
DEFAULT_SERVICE_URL,
|
|
8285
8344
|
DatasetsClient,
|
|
8286
8345
|
DbBranchReplayError,
|
|
8346
|
+
GradersClient,
|
|
8287
8347
|
HttpClient,
|
|
8288
8348
|
LabelsClient,
|
|
8289
8349
|
MixedTracingError,
|