bitfab 0.53.4 → 0.54.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-DIYUW2KO.js → chunk-CLYCJGJE.js} +2 -2
- package/dist/{chunk-DIYUW2KO.js.map → chunk-CLYCJGJE.js.map} +1 -1
- package/dist/{chunk-53RMN23L.js → chunk-JAXMD6AP.js} +65 -16
- package/dist/chunk-JAXMD6AP.js.map +1 -0
- package/dist/{chunk-JKVR5436.js → chunk-O2OJIGL3.js} +2 -2
- package/dist/{chunk-RZC7MYVZ.js → chunk-SEHWHFUY.js} +2 -2
- package/dist/{chunk-RZC7MYVZ.js.map → chunk-SEHWHFUY.js.map} +1 -1
- package/dist/{chunk-YD5XI5YH.js → chunk-VQB5RCFD.js} +3 -3
- package/dist/{http-VRS3FQU3.js → http-G43RIR7E.js} +2 -2
- package/dist/{http-7WGJNBGI.js → http-RXH2N5BB.js} +2 -2
- package/dist/index.cjs +61 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -6
- package/dist/index.d.ts +40 -6
- package/dist/index.js +5 -3
- package/dist/node.cjs +61 -11
- 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-LRCSZ7IX.js → replay-XQITDIRJ.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-53RMN23L.js.map +0 -1
- /package/dist/{chunk-JKVR5436.js.map → chunk-O2OJIGL3.js.map} +0 -0
- /package/dist/{chunk-YD5XI5YH.js.map → chunk-VQB5RCFD.js.map} +0 -0
- /package/dist/{http-7WGJNBGI.js.map → http-G43RIR7E.js.map} +0 -0
- /package/dist/{http-VRS3FQU3.js.map → http-RXH2N5BB.js.map} +0 -0
- /package/dist/{replay-LRCSZ7IX.js.map → replay-XQITDIRJ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -507,7 +507,7 @@ declare class HttpClient {
|
|
|
507
507
|
*/
|
|
508
508
|
request<T>(endpoint: string, payload: Record<string, unknown>, options?: {
|
|
509
509
|
timeout?: number;
|
|
510
|
-
method?: "POST" | "PATCH" | "PUT";
|
|
510
|
+
method?: "POST" | "PATCH" | "PUT" | "DELETE";
|
|
511
511
|
}): Promise<T>;
|
|
512
512
|
/**
|
|
513
513
|
* POST an already-encoded body. The span transport encodes its own batches,
|
|
@@ -516,7 +516,7 @@ declare class HttpClient {
|
|
|
516
516
|
*/
|
|
517
517
|
sendEncoded<T>(endpoint: string, body: string, options?: {
|
|
518
518
|
timeout?: number;
|
|
519
|
-
method?: "POST" | "PATCH" | "PUT";
|
|
519
|
+
method?: "POST" | "PATCH" | "PUT" | "DELETE";
|
|
520
520
|
}): Promise<T>;
|
|
521
521
|
private sendPrepared;
|
|
522
522
|
/**
|
|
@@ -799,6 +799,35 @@ interface SpanTreeResponse {
|
|
|
799
799
|
root: SpanTreeNode;
|
|
800
800
|
}
|
|
801
801
|
|
|
802
|
+
type AssertionCategorySummary = {
|
|
803
|
+
id: string;
|
|
804
|
+
title: string;
|
|
805
|
+
description: string;
|
|
806
|
+
};
|
|
807
|
+
type AssertionCategory = AssertionCategorySummary & {
|
|
808
|
+
organizationId: string;
|
|
809
|
+
createdAt: string;
|
|
810
|
+
updatedAt: string;
|
|
811
|
+
};
|
|
812
|
+
type SaveAssertionCategoryParams = {
|
|
813
|
+
id?: string;
|
|
814
|
+
title: string;
|
|
815
|
+
description?: string;
|
|
816
|
+
};
|
|
817
|
+
/** Organization-scoped groupings for assertions. */
|
|
818
|
+
declare class AssertionCategoriesClient {
|
|
819
|
+
private readonly httpClient;
|
|
820
|
+
constructor(httpClient: HttpClient);
|
|
821
|
+
/** Create a category, or update it by ID. Omitted descriptions are preserved. */
|
|
822
|
+
save(params: SaveAssertionCategoryParams): Promise<AssertionCategory>;
|
|
823
|
+
/** Read one category in the API key's organization. */
|
|
824
|
+
get(id: string): Promise<AssertionCategory>;
|
|
825
|
+
/** List the organization's categories ordered by title. */
|
|
826
|
+
list(): Promise<AssertionCategory[]>;
|
|
827
|
+
/** Delete a category and clear its assignments, preserving assertions and verdicts. */
|
|
828
|
+
delete(id: string): Promise<AssertionCategory>;
|
|
829
|
+
}
|
|
830
|
+
|
|
802
831
|
type TraceTargetOccurrence = "first" | "last" | number;
|
|
803
832
|
type TraceTarget = {
|
|
804
833
|
kind: "output";
|
|
@@ -812,6 +841,8 @@ type TraceAssertion = {
|
|
|
812
841
|
id: string;
|
|
813
842
|
traceId: string;
|
|
814
843
|
assertion: string;
|
|
844
|
+
category_assertion_id: string | null;
|
|
845
|
+
category: AssertionCategorySummary | null;
|
|
815
846
|
passCriteria: string | null;
|
|
816
847
|
failCriteria: string | null;
|
|
817
848
|
targetOnEvaluatedTrace: TraceTarget | null;
|
|
@@ -820,6 +851,8 @@ type TraceAssertion = {
|
|
|
820
851
|
updatedAt: string;
|
|
821
852
|
};
|
|
822
853
|
type SaveAssertion = {
|
|
854
|
+
/** Omit to preserve the category, or pass null to clear it. */
|
|
855
|
+
category_assertion_id?: string | null;
|
|
823
856
|
id?: string;
|
|
824
857
|
assertion: string;
|
|
825
858
|
passCriteria?: string | null;
|
|
@@ -1259,12 +1292,12 @@ declare class DatasetsClient {
|
|
|
1259
1292
|
save(params: SaveDatasetParams): Promise<SaveDatasetResult>;
|
|
1260
1293
|
/**
|
|
1261
1294
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
1262
|
-
* given and organization-wide otherwise.
|
|
1295
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
1263
1296
|
*/
|
|
1264
1297
|
list(params?: ListDatasetsParams): Promise<Dataset[]>;
|
|
1265
1298
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
1266
1299
|
get(datasetId: string): Promise<Dataset>;
|
|
1267
|
-
/**
|
|
1300
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
1268
1301
|
listTraces(datasetId: string): Promise<DatasetTraceIds>;
|
|
1269
1302
|
/**
|
|
1270
1303
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -2685,6 +2718,7 @@ declare class Bitfab {
|
|
|
2685
2718
|
private readonly httpClient;
|
|
2686
2719
|
/** Dataset operations for the authenticated organization. */
|
|
2687
2720
|
readonly datasets: DatasetsClient;
|
|
2721
|
+
readonly assertionCategories: AssertionCategoriesClient;
|
|
2688
2722
|
readonly traces: TracesClient;
|
|
2689
2723
|
readonly labels: LabelsClient;
|
|
2690
2724
|
readonly graders: GradersClient;
|
|
@@ -3344,7 +3378,7 @@ interface CommitRef {
|
|
|
3344
3378
|
/**
|
|
3345
3379
|
* SDK version from package.json (injected at build time)
|
|
3346
3380
|
*/
|
|
3347
|
-
declare const __version__ = "0.
|
|
3381
|
+
declare const __version__ = "0.54.0";
|
|
3348
3382
|
|
|
3349
3383
|
/**
|
|
3350
3384
|
* Constants for the Bitfab SDK.
|
|
@@ -3483,4 +3517,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3483
3517
|
run?: boolean;
|
|
3484
3518
|
}): Promise<SeedResult>;
|
|
3485
3519
|
|
|
3486
|
-
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 CommitRef, 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, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionsAllParams, 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 TraceAssertionsUpdate, 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, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
|
3520
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, 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 CommitRef, 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, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, 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 TraceAssertionsUpdate, 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, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ declare class HttpClient {
|
|
|
507
507
|
*/
|
|
508
508
|
request<T>(endpoint: string, payload: Record<string, unknown>, options?: {
|
|
509
509
|
timeout?: number;
|
|
510
|
-
method?: "POST" | "PATCH" | "PUT";
|
|
510
|
+
method?: "POST" | "PATCH" | "PUT" | "DELETE";
|
|
511
511
|
}): Promise<T>;
|
|
512
512
|
/**
|
|
513
513
|
* POST an already-encoded body. The span transport encodes its own batches,
|
|
@@ -516,7 +516,7 @@ declare class HttpClient {
|
|
|
516
516
|
*/
|
|
517
517
|
sendEncoded<T>(endpoint: string, body: string, options?: {
|
|
518
518
|
timeout?: number;
|
|
519
|
-
method?: "POST" | "PATCH" | "PUT";
|
|
519
|
+
method?: "POST" | "PATCH" | "PUT" | "DELETE";
|
|
520
520
|
}): Promise<T>;
|
|
521
521
|
private sendPrepared;
|
|
522
522
|
/**
|
|
@@ -799,6 +799,35 @@ interface SpanTreeResponse {
|
|
|
799
799
|
root: SpanTreeNode;
|
|
800
800
|
}
|
|
801
801
|
|
|
802
|
+
type AssertionCategorySummary = {
|
|
803
|
+
id: string;
|
|
804
|
+
title: string;
|
|
805
|
+
description: string;
|
|
806
|
+
};
|
|
807
|
+
type AssertionCategory = AssertionCategorySummary & {
|
|
808
|
+
organizationId: string;
|
|
809
|
+
createdAt: string;
|
|
810
|
+
updatedAt: string;
|
|
811
|
+
};
|
|
812
|
+
type SaveAssertionCategoryParams = {
|
|
813
|
+
id?: string;
|
|
814
|
+
title: string;
|
|
815
|
+
description?: string;
|
|
816
|
+
};
|
|
817
|
+
/** Organization-scoped groupings for assertions. */
|
|
818
|
+
declare class AssertionCategoriesClient {
|
|
819
|
+
private readonly httpClient;
|
|
820
|
+
constructor(httpClient: HttpClient);
|
|
821
|
+
/** Create a category, or update it by ID. Omitted descriptions are preserved. */
|
|
822
|
+
save(params: SaveAssertionCategoryParams): Promise<AssertionCategory>;
|
|
823
|
+
/** Read one category in the API key's organization. */
|
|
824
|
+
get(id: string): Promise<AssertionCategory>;
|
|
825
|
+
/** List the organization's categories ordered by title. */
|
|
826
|
+
list(): Promise<AssertionCategory[]>;
|
|
827
|
+
/** Delete a category and clear its assignments, preserving assertions and verdicts. */
|
|
828
|
+
delete(id: string): Promise<AssertionCategory>;
|
|
829
|
+
}
|
|
830
|
+
|
|
802
831
|
type TraceTargetOccurrence = "first" | "last" | number;
|
|
803
832
|
type TraceTarget = {
|
|
804
833
|
kind: "output";
|
|
@@ -812,6 +841,8 @@ type TraceAssertion = {
|
|
|
812
841
|
id: string;
|
|
813
842
|
traceId: string;
|
|
814
843
|
assertion: string;
|
|
844
|
+
category_assertion_id: string | null;
|
|
845
|
+
category: AssertionCategorySummary | null;
|
|
815
846
|
passCriteria: string | null;
|
|
816
847
|
failCriteria: string | null;
|
|
817
848
|
targetOnEvaluatedTrace: TraceTarget | null;
|
|
@@ -820,6 +851,8 @@ type TraceAssertion = {
|
|
|
820
851
|
updatedAt: string;
|
|
821
852
|
};
|
|
822
853
|
type SaveAssertion = {
|
|
854
|
+
/** Omit to preserve the category, or pass null to clear it. */
|
|
855
|
+
category_assertion_id?: string | null;
|
|
823
856
|
id?: string;
|
|
824
857
|
assertion: string;
|
|
825
858
|
passCriteria?: string | null;
|
|
@@ -1259,12 +1292,12 @@ declare class DatasetsClient {
|
|
|
1259
1292
|
save(params: SaveDatasetParams): Promise<SaveDatasetResult>;
|
|
1260
1293
|
/**
|
|
1261
1294
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
1262
|
-
* given and organization-wide otherwise.
|
|
1295
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
1263
1296
|
*/
|
|
1264
1297
|
list(params?: ListDatasetsParams): Promise<Dataset[]>;
|
|
1265
1298
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
1266
1299
|
get(datasetId: string): Promise<Dataset>;
|
|
1267
|
-
/**
|
|
1300
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
1268
1301
|
listTraces(datasetId: string): Promise<DatasetTraceIds>;
|
|
1269
1302
|
/**
|
|
1270
1303
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -2685,6 +2718,7 @@ declare class Bitfab {
|
|
|
2685
2718
|
private readonly httpClient;
|
|
2686
2719
|
/** Dataset operations for the authenticated organization. */
|
|
2687
2720
|
readonly datasets: DatasetsClient;
|
|
2721
|
+
readonly assertionCategories: AssertionCategoriesClient;
|
|
2688
2722
|
readonly traces: TracesClient;
|
|
2689
2723
|
readonly labels: LabelsClient;
|
|
2690
2724
|
readonly graders: GradersClient;
|
|
@@ -3344,7 +3378,7 @@ interface CommitRef {
|
|
|
3344
3378
|
/**
|
|
3345
3379
|
* SDK version from package.json (injected at build time)
|
|
3346
3380
|
*/
|
|
3347
|
-
declare const __version__ = "0.
|
|
3381
|
+
declare const __version__ = "0.54.0";
|
|
3348
3382
|
|
|
3349
3383
|
/**
|
|
3350
3384
|
* Constants for the Bitfab SDK.
|
|
@@ -3483,4 +3517,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3483
3517
|
run?: boolean;
|
|
3484
3518
|
}): Promise<SeedResult>;
|
|
3485
3519
|
|
|
3486
|
-
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 CommitRef, 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, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionsAllParams, 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 TraceAssertionsUpdate, 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, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
|
3520
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, 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 CommitRef, 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, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, 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 TraceAssertionsUpdate, 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, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ if (typeof globalThis.__bitfab_deprecation_warned === "undefined") {
|
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
10
|
import {
|
|
11
|
+
AssertionCategoriesClient,
|
|
11
12
|
Bitfab,
|
|
12
13
|
BitfabClaudeAgentHandler,
|
|
13
14
|
BitfabFunction,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
getCurrentTrace,
|
|
29
30
|
reseedFromRegistry,
|
|
30
31
|
seedFromRegistry
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JAXMD6AP.js";
|
|
32
33
|
import "./chunk-EGWJYCNT.js";
|
|
33
34
|
import {
|
|
34
35
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
ReplayError,
|
|
38
39
|
reportReplayProgress,
|
|
39
40
|
serializeReplayResult
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-O2OJIGL3.js";
|
|
41
42
|
import {
|
|
42
43
|
BitfabError,
|
|
43
44
|
DEFAULT_SERVICE_URL,
|
|
@@ -45,9 +46,10 @@ import {
|
|
|
45
46
|
MixedTracingError,
|
|
46
47
|
__version__,
|
|
47
48
|
flushTraces
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-SEHWHFUY.js";
|
|
49
50
|
import "./chunk-VCRFFCLY.js";
|
|
50
51
|
export {
|
|
52
|
+
AssertionCategoriesClient,
|
|
51
53
|
BITFAB_PROGRESS_PREFIX,
|
|
52
54
|
Bitfab,
|
|
53
55
|
BitfabClaudeAgentHandler,
|
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.54.0";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -4078,6 +4078,7 @@ var init_replay = __esm({
|
|
|
4078
4078
|
// src/node.ts
|
|
4079
4079
|
var node_exports = {};
|
|
4080
4080
|
__export(node_exports, {
|
|
4081
|
+
AssertionCategoriesClient: () => AssertionCategoriesClient,
|
|
4081
4082
|
BITFAB_PROGRESS_PREFIX: () => BITFAB_PROGRESS_PREFIX,
|
|
4082
4083
|
Bitfab: () => Bitfab,
|
|
4083
4084
|
BitfabClaudeAgentHandler: () => BitfabClaudeAgentHandler,
|
|
@@ -4121,6 +4122,36 @@ registerAsyncLocalStorageClass(
|
|
|
4121
4122
|
import_node_async_hooks.AsyncLocalStorage
|
|
4122
4123
|
);
|
|
4123
4124
|
|
|
4125
|
+
// src/assertionCategories.ts
|
|
4126
|
+
var CATEGORIES_PATH = "/api/sdk/assertionCategories";
|
|
4127
|
+
var AssertionCategoriesClient = class {
|
|
4128
|
+
constructor(httpClient) {
|
|
4129
|
+
this.httpClient = httpClient;
|
|
4130
|
+
}
|
|
4131
|
+
/** Create a category, or update it by ID. Omitted descriptions are preserved. */
|
|
4132
|
+
async save(params) {
|
|
4133
|
+
const response = await this.httpClient.request(CATEGORIES_PATH, params);
|
|
4134
|
+
return response.category;
|
|
4135
|
+
}
|
|
4136
|
+
/** Read one category in the API key's organization. */
|
|
4137
|
+
async get(id) {
|
|
4138
|
+
const response = await this.httpClient.get(
|
|
4139
|
+
`${CATEGORIES_PATH}/${encodeURIComponent(id)}`
|
|
4140
|
+
);
|
|
4141
|
+
return response.category;
|
|
4142
|
+
}
|
|
4143
|
+
/** List the organization's categories ordered by title. */
|
|
4144
|
+
async list() {
|
|
4145
|
+
const response = await this.httpClient.get(CATEGORIES_PATH);
|
|
4146
|
+
return response.categories;
|
|
4147
|
+
}
|
|
4148
|
+
/** Delete a category and clear its assignments, preserving assertions and verdicts. */
|
|
4149
|
+
async delete(id) {
|
|
4150
|
+
const response = await this.httpClient.request(`${CATEGORIES_PATH}/${encodeURIComponent(id)}`, {}, { method: "DELETE" });
|
|
4151
|
+
return response.category;
|
|
4152
|
+
}
|
|
4153
|
+
};
|
|
4154
|
+
|
|
4124
4155
|
// src/assertions.ts
|
|
4125
4156
|
var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
|
|
4126
4157
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
@@ -5548,14 +5579,24 @@ var DatasetsClient = class {
|
|
|
5548
5579
|
}
|
|
5549
5580
|
/**
|
|
5550
5581
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
5551
|
-
* given and organization-wide otherwise.
|
|
5582
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
5552
5583
|
*/
|
|
5553
5584
|
async list(params = {}) {
|
|
5554
|
-
const
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5585
|
+
const datasets = [];
|
|
5586
|
+
let cursor;
|
|
5587
|
+
do {
|
|
5588
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
5589
|
+
if (params.traceFunctionKey !== void 0) {
|
|
5590
|
+
query.set("traceFunctionKey", params.traceFunctionKey);
|
|
5591
|
+
}
|
|
5592
|
+
if (cursor !== void 0) {
|
|
5593
|
+
query.set("cursor", cursor);
|
|
5594
|
+
}
|
|
5595
|
+
const response = await this.httpClient.get(`/api/sdk/datasets?${query}`);
|
|
5596
|
+
datasets.push(...response.datasets);
|
|
5597
|
+
cursor = response.nextCursor ?? void 0;
|
|
5598
|
+
} while (cursor !== void 0);
|
|
5599
|
+
return datasets;
|
|
5559
5600
|
}
|
|
5560
5601
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
5561
5602
|
async get(datasetId) {
|
|
@@ -5564,11 +5605,18 @@ var DatasetsClient = class {
|
|
|
5564
5605
|
);
|
|
5565
5606
|
return response.dataset;
|
|
5566
5607
|
}
|
|
5567
|
-
/**
|
|
5608
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
5568
5609
|
async listTraces(datasetId) {
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
)
|
|
5610
|
+
const traceIds = [];
|
|
5611
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
5612
|
+
for (; ; ) {
|
|
5613
|
+
const page = await this.httpClient.get(`${datasetPath(datasetId, "/traces")}?${query}`);
|
|
5614
|
+
traceIds.push(...page.traceIds);
|
|
5615
|
+
if (page.nextCursor === void 0 || page.nextCursor === null) {
|
|
5616
|
+
return { datasetId: page.datasetId, traceIds };
|
|
5617
|
+
}
|
|
5618
|
+
query.set("cursor", page.nextCursor);
|
|
5619
|
+
}
|
|
5572
5620
|
}
|
|
5573
5621
|
/**
|
|
5574
5622
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -7655,6 +7703,7 @@ var Bitfab = class {
|
|
|
7655
7703
|
this.httpClient.releaseHeldExternalSpans = (timeoutMs) => this.simulationPlan.release(timeoutMs);
|
|
7656
7704
|
this.httpClient.stopSimulationPlan = () => this.simulationPlan.stop();
|
|
7657
7705
|
this.datasets = new DatasetsClient(this.httpClient);
|
|
7706
|
+
this.assertionCategories = new AssertionCategoriesClient(this.httpClient);
|
|
7658
7707
|
this.traces = new TracesClient(this.httpClient);
|
|
7659
7708
|
this.labels = new LabelsClient(this.httpClient);
|
|
7660
7709
|
this.graders = new GradersClient(this.httpClient);
|
|
@@ -9730,6 +9779,7 @@ init_asyncStorage();
|
|
|
9730
9779
|
assertAsyncStorageRegistered();
|
|
9731
9780
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9732
9781
|
0 && (module.exports = {
|
|
9782
|
+
AssertionCategoriesClient,
|
|
9733
9783
|
BITFAB_PROGRESS_PREFIX,
|
|
9734
9784
|
Bitfab,
|
|
9735
9785
|
BitfabClaudeAgentHandler,
|