bitfab 0.57.5 → 0.57.6
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-WYNN6NY2.js → chunk-EC7EZXDV.js} +2 -2
- package/dist/{chunk-WYNN6NY2.js.map → chunk-EC7EZXDV.js.map} +1 -1
- package/dist/{chunk-VPZ2LTU6.js → chunk-GT4IDECP.js} +2 -2
- package/dist/{chunk-YO3HKQX6.js → chunk-ICL6RSND.js} +14 -21
- package/dist/chunk-ICL6RSND.js.map +1 -0
- package/dist/{chunk-I5EG523G.js → chunk-IF7GVAWV.js} +3 -3
- package/dist/{chunk-255I4PN4.js → chunk-UTBA3ASY.js} +2 -2
- package/dist/{chunk-255I4PN4.js.map → chunk-UTBA3ASY.js.map} +1 -1
- package/dist/{http-CHXMOVLK.js → http-EYKH2EPD.js} +2 -2
- package/dist/{http-FQ76VRFF.js → http-U3V6WNLO.js} +2 -2
- package/dist/index.cjs +9 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +121 -126
- package/dist/index.d.ts +121 -126
- package/dist/index.js +3 -5
- package/dist/node.cjs +9 -17
- 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 +3 -5
- package/dist/node.js.map +1 -1
- package/dist/{replay-CHM7OQ25.js → replay-W2KNVMMJ.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-YO3HKQX6.js.map +0 -1
- /package/dist/{chunk-VPZ2LTU6.js.map → chunk-GT4IDECP.js.map} +0 -0
- /package/dist/{chunk-I5EG523G.js.map → chunk-IF7GVAWV.js.map} +0 -0
- /package/dist/{http-CHXMOVLK.js.map → http-EYKH2EPD.js.map} +0 -0
- /package/dist/{http-FQ76VRFF.js.map → http-U3V6WNLO.js.map} +0 -0
- /package/dist/{replay-CHM7OQ25.js.map → replay-W2KNVMMJ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1303,6 +1303,123 @@ declare class DatasetsClient {
|
|
|
1303
1303
|
getGraderRerun(datasetId: string, runId?: string): Promise<GraderRerun | null>;
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
|
+
type TraceTargetOccurrence = "first" | "last" | number;
|
|
1307
|
+
type TraceTarget = {
|
|
1308
|
+
kind: "output";
|
|
1309
|
+
} | {
|
|
1310
|
+
kind: "span";
|
|
1311
|
+
name: string;
|
|
1312
|
+
occurrence?: TraceTargetOccurrence;
|
|
1313
|
+
};
|
|
1314
|
+
type TraceAssertionSource = "human" | "agent";
|
|
1315
|
+
type TraceSearchFilters = {
|
|
1316
|
+
callerMetadata?: Record<string, string>;
|
|
1317
|
+
name?: string;
|
|
1318
|
+
nameContains?: string;
|
|
1319
|
+
};
|
|
1320
|
+
type TraceSearchParams = TraceSearchFilters & ({
|
|
1321
|
+
callerMetadata: Record<string, string>;
|
|
1322
|
+
} | {
|
|
1323
|
+
name: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
nameContains: string;
|
|
1326
|
+
}) & {
|
|
1327
|
+
traceFunctionKey?: string;
|
|
1328
|
+
cursor?: string | null;
|
|
1329
|
+
limit?: number;
|
|
1330
|
+
};
|
|
1331
|
+
type TraceSearchResult = {
|
|
1332
|
+
traces: Array<{
|
|
1333
|
+
id: string;
|
|
1334
|
+
traceFunctionKey: string | null;
|
|
1335
|
+
name: string | null;
|
|
1336
|
+
status: "pending" | "completed" | "failed" | "dropped";
|
|
1337
|
+
createdAt: string;
|
|
1338
|
+
callerMetadata: Record<string, string>;
|
|
1339
|
+
}>;
|
|
1340
|
+
nextCursor: string | null;
|
|
1341
|
+
hasMore: boolean;
|
|
1342
|
+
};
|
|
1343
|
+
type TraceAssertion = {
|
|
1344
|
+
id: string;
|
|
1345
|
+
traceId: string;
|
|
1346
|
+
assertion: string;
|
|
1347
|
+
humanNote: string | null;
|
|
1348
|
+
category_assertion_id: string | null;
|
|
1349
|
+
category: AssertionCategorySummary | null;
|
|
1350
|
+
passCriteria: string | null;
|
|
1351
|
+
failCriteria: string | null;
|
|
1352
|
+
targetOnEvaluatedTrace: TraceTarget | null;
|
|
1353
|
+
source: TraceAssertionSource;
|
|
1354
|
+
/** Why this assertion is right for its trace, span by span. */
|
|
1355
|
+
justification: Justification | null;
|
|
1356
|
+
/** Why its assigned category is the right one, span by span. */
|
|
1357
|
+
categoryJustification: Justification | null;
|
|
1358
|
+
createdAt: string;
|
|
1359
|
+
updatedAt: string;
|
|
1360
|
+
} & ApprovalFields;
|
|
1361
|
+
type AssertionEvidenceParameter = {
|
|
1362
|
+
name: string;
|
|
1363
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "null" | "unknown";
|
|
1364
|
+
};
|
|
1365
|
+
type PotentialAssertionEvidence = {
|
|
1366
|
+
spanId: string;
|
|
1367
|
+
text: string;
|
|
1368
|
+
spanName: string | null;
|
|
1369
|
+
parameters: AssertionEvidenceParameter[];
|
|
1370
|
+
spanType: "llm" | "agent" | "function" | "guardrail" | "handoff" | "custom";
|
|
1371
|
+
isMocked: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
type SaveAssertion = {
|
|
1374
|
+
/** Omit to preserve the category, or pass null to clear it. */
|
|
1375
|
+
category_assertion_id?: string | null;
|
|
1376
|
+
id?: string;
|
|
1377
|
+
assertion: string;
|
|
1378
|
+
passCriteria?: string | null;
|
|
1379
|
+
failCriteria?: string | null;
|
|
1380
|
+
targetOnEvaluatedTrace?: TraceTarget | null;
|
|
1381
|
+
/**
|
|
1382
|
+
* Why this assertion is right for this trace, one entry per span it rests on.
|
|
1383
|
+
* Cite spans on this trace only. Omit on an edit to preserve it.
|
|
1384
|
+
*/
|
|
1385
|
+
justification?: Justification | null;
|
|
1386
|
+
/**
|
|
1387
|
+
* Why `category_assertion_id` is the right category. Changing the category
|
|
1388
|
+
* clears it. Omit on an edit to preserve it.
|
|
1389
|
+
*/
|
|
1390
|
+
categoryJustification?: Justification | null;
|
|
1391
|
+
};
|
|
1392
|
+
type TraceAssertionsResult = {
|
|
1393
|
+
assertions: TraceAssertion[];
|
|
1394
|
+
inheritedFrom: string | null;
|
|
1395
|
+
};
|
|
1396
|
+
type TraceAssertionsUpdate = {
|
|
1397
|
+
traceId: string;
|
|
1398
|
+
assertions: SaveAssertion[];
|
|
1399
|
+
};
|
|
1400
|
+
type SaveAssertionsParams = {
|
|
1401
|
+
traceId: string;
|
|
1402
|
+
assertions: SaveAssertion[];
|
|
1403
|
+
source?: TraceAssertionSource;
|
|
1404
|
+
};
|
|
1405
|
+
type SaveAssertionsAllParams = {
|
|
1406
|
+
updates: TraceAssertionsUpdate[];
|
|
1407
|
+
source?: TraceAssertionSource;
|
|
1408
|
+
};
|
|
1409
|
+
type ArchiveAssertionsParams = {
|
|
1410
|
+
traceId: string;
|
|
1411
|
+
assertionIds: string[];
|
|
1412
|
+
};
|
|
1413
|
+
declare class TracesClient {
|
|
1414
|
+
private readonly httpClient;
|
|
1415
|
+
constructor(httpClient: HttpClient);
|
|
1416
|
+
search(params: TraceSearchParams): Promise<TraceSearchResult>;
|
|
1417
|
+
getAssertions(traceId: string): Promise<TraceAssertionsResult>;
|
|
1418
|
+
saveAssertions(params: SaveAssertionsParams): Promise<TraceAssertion[]>;
|
|
1419
|
+
saveAssertionsAll(params: SaveAssertionsAllParams): Promise<TraceAssertion[]>;
|
|
1420
|
+
archiveAssertions(params: ArchiveAssertionsParams): Promise<string[]>;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1306
1423
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
1307
1424
|
type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
|
|
1308
1425
|
type LabelStatus = "labeled" | "skipped" | "unlabeled";
|
|
@@ -1383,6 +1500,8 @@ declare class LabelsClient {
|
|
|
1383
1500
|
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
1384
1501
|
get(traceId: string): Promise<TraceLabels | null>;
|
|
1385
1502
|
getAll(traceIds: string[]): Promise<TraceLabels[]>;
|
|
1503
|
+
/** Generate suggested evidence for an assertion on an original or replay trace. */
|
|
1504
|
+
generateLabelEvidence(traceId: string, assertionId: string): Promise<PotentialAssertionEvidence[]>;
|
|
1386
1505
|
}
|
|
1387
1506
|
|
|
1388
1507
|
type GraderLabelSource = "human" | "live_grader";
|
|
@@ -2294,130 +2413,6 @@ declare class BitfabRivetIntegration<TContext extends object = RivetContextLike>
|
|
|
2294
2413
|
private createQueueIterator;
|
|
2295
2414
|
}
|
|
2296
2415
|
|
|
2297
|
-
type TraceTargetOccurrence = "first" | "last" | number;
|
|
2298
|
-
type TraceTarget = {
|
|
2299
|
-
kind: "output";
|
|
2300
|
-
} | {
|
|
2301
|
-
kind: "span";
|
|
2302
|
-
name: string;
|
|
2303
|
-
occurrence?: TraceTargetOccurrence;
|
|
2304
|
-
};
|
|
2305
|
-
type TraceAssertionSource = "human" | "agent";
|
|
2306
|
-
type TraceSearchFilters = {
|
|
2307
|
-
callerMetadata?: Record<string, string>;
|
|
2308
|
-
name?: string;
|
|
2309
|
-
nameContains?: string;
|
|
2310
|
-
};
|
|
2311
|
-
type TraceSearchParams = TraceSearchFilters & ({
|
|
2312
|
-
callerMetadata: Record<string, string>;
|
|
2313
|
-
} | {
|
|
2314
|
-
name: string;
|
|
2315
|
-
} | {
|
|
2316
|
-
nameContains: string;
|
|
2317
|
-
}) & {
|
|
2318
|
-
traceFunctionKey?: string;
|
|
2319
|
-
cursor?: string | null;
|
|
2320
|
-
limit?: number;
|
|
2321
|
-
};
|
|
2322
|
-
type TraceSearchResult = {
|
|
2323
|
-
traces: Array<{
|
|
2324
|
-
id: string;
|
|
2325
|
-
traceFunctionKey: string | null;
|
|
2326
|
-
name: string | null;
|
|
2327
|
-
status: "pending" | "completed" | "failed" | "dropped";
|
|
2328
|
-
createdAt: string;
|
|
2329
|
-
callerMetadata: Record<string, string>;
|
|
2330
|
-
}>;
|
|
2331
|
-
nextCursor: string | null;
|
|
2332
|
-
hasMore: boolean;
|
|
2333
|
-
};
|
|
2334
|
-
type TraceAssertion = {
|
|
2335
|
-
id: string;
|
|
2336
|
-
traceId: string;
|
|
2337
|
-
assertion: string;
|
|
2338
|
-
humanNote: string | null;
|
|
2339
|
-
category_assertion_id: string | null;
|
|
2340
|
-
category: AssertionCategorySummary | null;
|
|
2341
|
-
passCriteria: string | null;
|
|
2342
|
-
failCriteria: string | null;
|
|
2343
|
-
targetOnEvaluatedTrace: TraceTarget | null;
|
|
2344
|
-
source: TraceAssertionSource;
|
|
2345
|
-
/** Why this assertion is right for its trace, span by span. */
|
|
2346
|
-
justification: Justification | null;
|
|
2347
|
-
/** Why its assigned category is the right one, span by span. */
|
|
2348
|
-
categoryJustification: Justification | null;
|
|
2349
|
-
createdAt: string;
|
|
2350
|
-
updatedAt: string;
|
|
2351
|
-
} & ApprovalFields;
|
|
2352
|
-
type AssertionEvidenceParameter = {
|
|
2353
|
-
name: string;
|
|
2354
|
-
type: "string" | "number" | "boolean" | "object" | "array" | "null" | "unknown";
|
|
2355
|
-
};
|
|
2356
|
-
type PotentialAssertionEvidence = {
|
|
2357
|
-
spanId: string;
|
|
2358
|
-
text: string;
|
|
2359
|
-
spanName: string | null;
|
|
2360
|
-
parameters: AssertionEvidenceParameter[];
|
|
2361
|
-
spanType: "llm" | "agent" | "function" | "guardrail" | "handoff" | "custom";
|
|
2362
|
-
isMocked: boolean;
|
|
2363
|
-
};
|
|
2364
|
-
type SaveAssertion = {
|
|
2365
|
-
/** Omit to preserve the category, or pass null to clear it. */
|
|
2366
|
-
category_assertion_id?: string | null;
|
|
2367
|
-
id?: string;
|
|
2368
|
-
assertion: string;
|
|
2369
|
-
passCriteria?: string | null;
|
|
2370
|
-
failCriteria?: string | null;
|
|
2371
|
-
targetOnEvaluatedTrace?: TraceTarget | null;
|
|
2372
|
-
/**
|
|
2373
|
-
* Why this assertion is right for this trace, one entry per span it rests on.
|
|
2374
|
-
* Cite spans on this trace only. Omit on an edit to preserve it.
|
|
2375
|
-
*/
|
|
2376
|
-
justification?: Justification | null;
|
|
2377
|
-
/**
|
|
2378
|
-
* Why `category_assertion_id` is the right category. Changing the category
|
|
2379
|
-
* clears it. Omit on an edit to preserve it.
|
|
2380
|
-
*/
|
|
2381
|
-
categoryJustification?: Justification | null;
|
|
2382
|
-
};
|
|
2383
|
-
type TraceAssertionsResult = {
|
|
2384
|
-
assertions: TraceAssertion[];
|
|
2385
|
-
inheritedFrom: string | null;
|
|
2386
|
-
};
|
|
2387
|
-
type TraceAssertionsUpdate = {
|
|
2388
|
-
traceId: string;
|
|
2389
|
-
assertions: SaveAssertion[];
|
|
2390
|
-
};
|
|
2391
|
-
type SaveAssertionsParams = {
|
|
2392
|
-
traceId: string;
|
|
2393
|
-
assertions: SaveAssertion[];
|
|
2394
|
-
source?: TraceAssertionSource;
|
|
2395
|
-
};
|
|
2396
|
-
type SaveAssertionsAllParams = {
|
|
2397
|
-
updates: TraceAssertionsUpdate[];
|
|
2398
|
-
source?: TraceAssertionSource;
|
|
2399
|
-
};
|
|
2400
|
-
type ArchiveAssertionsParams = {
|
|
2401
|
-
traceId: string;
|
|
2402
|
-
assertionIds: string[];
|
|
2403
|
-
};
|
|
2404
|
-
declare class TraceAssertionsClient {
|
|
2405
|
-
private readonly httpClient;
|
|
2406
|
-
constructor(httpClient: HttpClient);
|
|
2407
|
-
/** Suggest evidence for an assertion, enriched with its span context. */
|
|
2408
|
-
getAssertionEvidence(assertionId: string): Promise<PotentialAssertionEvidence[]>;
|
|
2409
|
-
}
|
|
2410
|
-
declare class TracesClient {
|
|
2411
|
-
private readonly httpClient;
|
|
2412
|
-
readonly assertions: TraceAssertionsClient;
|
|
2413
|
-
constructor(httpClient: HttpClient);
|
|
2414
|
-
search(params: TraceSearchParams): Promise<TraceSearchResult>;
|
|
2415
|
-
getAssertions(traceId: string): Promise<TraceAssertionsResult>;
|
|
2416
|
-
saveAssertions(params: SaveAssertionsParams): Promise<TraceAssertion[]>;
|
|
2417
|
-
saveAssertionsAll(params: SaveAssertionsAllParams): Promise<TraceAssertion[]>;
|
|
2418
|
-
archiveAssertions(params: ArchiveAssertionsParams): Promise<string[]>;
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
2416
|
/**
|
|
2422
2417
|
* Tracing utilities for external trace submission to Bitfab.
|
|
2423
2418
|
*
|
|
@@ -3627,7 +3622,7 @@ interface CommitRef {
|
|
|
3627
3622
|
/**
|
|
3628
3623
|
* SDK version from package.json (injected at build time)
|
|
3629
3624
|
*/
|
|
3630
|
-
declare const __version__ = "0.57.
|
|
3625
|
+
declare const __version__ = "0.57.6";
|
|
3631
3626
|
|
|
3632
3627
|
/**
|
|
3633
3628
|
* Constants for the Bitfab SDK.
|
|
@@ -3766,4 +3761,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3766
3761
|
run?: boolean;
|
|
3767
3762
|
}): Promise<SeedResult>;
|
|
3768
3763
|
|
|
3769
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionVerdict, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, 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 Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, 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 PotentialAssertionEvidence, 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, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, 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,
|
|
3764
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionVerdict, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, 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 Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, 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 PotentialAssertionEvidence, 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, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, 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 TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, 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
|
@@ -1303,6 +1303,123 @@ declare class DatasetsClient {
|
|
|
1303
1303
|
getGraderRerun(datasetId: string, runId?: string): Promise<GraderRerun | null>;
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
|
+
type TraceTargetOccurrence = "first" | "last" | number;
|
|
1307
|
+
type TraceTarget = {
|
|
1308
|
+
kind: "output";
|
|
1309
|
+
} | {
|
|
1310
|
+
kind: "span";
|
|
1311
|
+
name: string;
|
|
1312
|
+
occurrence?: TraceTargetOccurrence;
|
|
1313
|
+
};
|
|
1314
|
+
type TraceAssertionSource = "human" | "agent";
|
|
1315
|
+
type TraceSearchFilters = {
|
|
1316
|
+
callerMetadata?: Record<string, string>;
|
|
1317
|
+
name?: string;
|
|
1318
|
+
nameContains?: string;
|
|
1319
|
+
};
|
|
1320
|
+
type TraceSearchParams = TraceSearchFilters & ({
|
|
1321
|
+
callerMetadata: Record<string, string>;
|
|
1322
|
+
} | {
|
|
1323
|
+
name: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
nameContains: string;
|
|
1326
|
+
}) & {
|
|
1327
|
+
traceFunctionKey?: string;
|
|
1328
|
+
cursor?: string | null;
|
|
1329
|
+
limit?: number;
|
|
1330
|
+
};
|
|
1331
|
+
type TraceSearchResult = {
|
|
1332
|
+
traces: Array<{
|
|
1333
|
+
id: string;
|
|
1334
|
+
traceFunctionKey: string | null;
|
|
1335
|
+
name: string | null;
|
|
1336
|
+
status: "pending" | "completed" | "failed" | "dropped";
|
|
1337
|
+
createdAt: string;
|
|
1338
|
+
callerMetadata: Record<string, string>;
|
|
1339
|
+
}>;
|
|
1340
|
+
nextCursor: string | null;
|
|
1341
|
+
hasMore: boolean;
|
|
1342
|
+
};
|
|
1343
|
+
type TraceAssertion = {
|
|
1344
|
+
id: string;
|
|
1345
|
+
traceId: string;
|
|
1346
|
+
assertion: string;
|
|
1347
|
+
humanNote: string | null;
|
|
1348
|
+
category_assertion_id: string | null;
|
|
1349
|
+
category: AssertionCategorySummary | null;
|
|
1350
|
+
passCriteria: string | null;
|
|
1351
|
+
failCriteria: string | null;
|
|
1352
|
+
targetOnEvaluatedTrace: TraceTarget | null;
|
|
1353
|
+
source: TraceAssertionSource;
|
|
1354
|
+
/** Why this assertion is right for its trace, span by span. */
|
|
1355
|
+
justification: Justification | null;
|
|
1356
|
+
/** Why its assigned category is the right one, span by span. */
|
|
1357
|
+
categoryJustification: Justification | null;
|
|
1358
|
+
createdAt: string;
|
|
1359
|
+
updatedAt: string;
|
|
1360
|
+
} & ApprovalFields;
|
|
1361
|
+
type AssertionEvidenceParameter = {
|
|
1362
|
+
name: string;
|
|
1363
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "null" | "unknown";
|
|
1364
|
+
};
|
|
1365
|
+
type PotentialAssertionEvidence = {
|
|
1366
|
+
spanId: string;
|
|
1367
|
+
text: string;
|
|
1368
|
+
spanName: string | null;
|
|
1369
|
+
parameters: AssertionEvidenceParameter[];
|
|
1370
|
+
spanType: "llm" | "agent" | "function" | "guardrail" | "handoff" | "custom";
|
|
1371
|
+
isMocked: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
type SaveAssertion = {
|
|
1374
|
+
/** Omit to preserve the category, or pass null to clear it. */
|
|
1375
|
+
category_assertion_id?: string | null;
|
|
1376
|
+
id?: string;
|
|
1377
|
+
assertion: string;
|
|
1378
|
+
passCriteria?: string | null;
|
|
1379
|
+
failCriteria?: string | null;
|
|
1380
|
+
targetOnEvaluatedTrace?: TraceTarget | null;
|
|
1381
|
+
/**
|
|
1382
|
+
* Why this assertion is right for this trace, one entry per span it rests on.
|
|
1383
|
+
* Cite spans on this trace only. Omit on an edit to preserve it.
|
|
1384
|
+
*/
|
|
1385
|
+
justification?: Justification | null;
|
|
1386
|
+
/**
|
|
1387
|
+
* Why `category_assertion_id` is the right category. Changing the category
|
|
1388
|
+
* clears it. Omit on an edit to preserve it.
|
|
1389
|
+
*/
|
|
1390
|
+
categoryJustification?: Justification | null;
|
|
1391
|
+
};
|
|
1392
|
+
type TraceAssertionsResult = {
|
|
1393
|
+
assertions: TraceAssertion[];
|
|
1394
|
+
inheritedFrom: string | null;
|
|
1395
|
+
};
|
|
1396
|
+
type TraceAssertionsUpdate = {
|
|
1397
|
+
traceId: string;
|
|
1398
|
+
assertions: SaveAssertion[];
|
|
1399
|
+
};
|
|
1400
|
+
type SaveAssertionsParams = {
|
|
1401
|
+
traceId: string;
|
|
1402
|
+
assertions: SaveAssertion[];
|
|
1403
|
+
source?: TraceAssertionSource;
|
|
1404
|
+
};
|
|
1405
|
+
type SaveAssertionsAllParams = {
|
|
1406
|
+
updates: TraceAssertionsUpdate[];
|
|
1407
|
+
source?: TraceAssertionSource;
|
|
1408
|
+
};
|
|
1409
|
+
type ArchiveAssertionsParams = {
|
|
1410
|
+
traceId: string;
|
|
1411
|
+
assertionIds: string[];
|
|
1412
|
+
};
|
|
1413
|
+
declare class TracesClient {
|
|
1414
|
+
private readonly httpClient;
|
|
1415
|
+
constructor(httpClient: HttpClient);
|
|
1416
|
+
search(params: TraceSearchParams): Promise<TraceSearchResult>;
|
|
1417
|
+
getAssertions(traceId: string): Promise<TraceAssertionsResult>;
|
|
1418
|
+
saveAssertions(params: SaveAssertionsParams): Promise<TraceAssertion[]>;
|
|
1419
|
+
saveAssertionsAll(params: SaveAssertionsAllParams): Promise<TraceAssertion[]>;
|
|
1420
|
+
archiveAssertions(params: ArchiveAssertionsParams): Promise<string[]>;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1306
1423
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
1307
1424
|
type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
|
|
1308
1425
|
type LabelStatus = "labeled" | "skipped" | "unlabeled";
|
|
@@ -1383,6 +1500,8 @@ declare class LabelsClient {
|
|
|
1383
1500
|
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
1384
1501
|
get(traceId: string): Promise<TraceLabels | null>;
|
|
1385
1502
|
getAll(traceIds: string[]): Promise<TraceLabels[]>;
|
|
1503
|
+
/** Generate suggested evidence for an assertion on an original or replay trace. */
|
|
1504
|
+
generateLabelEvidence(traceId: string, assertionId: string): Promise<PotentialAssertionEvidence[]>;
|
|
1386
1505
|
}
|
|
1387
1506
|
|
|
1388
1507
|
type GraderLabelSource = "human" | "live_grader";
|
|
@@ -2294,130 +2413,6 @@ declare class BitfabRivetIntegration<TContext extends object = RivetContextLike>
|
|
|
2294
2413
|
private createQueueIterator;
|
|
2295
2414
|
}
|
|
2296
2415
|
|
|
2297
|
-
type TraceTargetOccurrence = "first" | "last" | number;
|
|
2298
|
-
type TraceTarget = {
|
|
2299
|
-
kind: "output";
|
|
2300
|
-
} | {
|
|
2301
|
-
kind: "span";
|
|
2302
|
-
name: string;
|
|
2303
|
-
occurrence?: TraceTargetOccurrence;
|
|
2304
|
-
};
|
|
2305
|
-
type TraceAssertionSource = "human" | "agent";
|
|
2306
|
-
type TraceSearchFilters = {
|
|
2307
|
-
callerMetadata?: Record<string, string>;
|
|
2308
|
-
name?: string;
|
|
2309
|
-
nameContains?: string;
|
|
2310
|
-
};
|
|
2311
|
-
type TraceSearchParams = TraceSearchFilters & ({
|
|
2312
|
-
callerMetadata: Record<string, string>;
|
|
2313
|
-
} | {
|
|
2314
|
-
name: string;
|
|
2315
|
-
} | {
|
|
2316
|
-
nameContains: string;
|
|
2317
|
-
}) & {
|
|
2318
|
-
traceFunctionKey?: string;
|
|
2319
|
-
cursor?: string | null;
|
|
2320
|
-
limit?: number;
|
|
2321
|
-
};
|
|
2322
|
-
type TraceSearchResult = {
|
|
2323
|
-
traces: Array<{
|
|
2324
|
-
id: string;
|
|
2325
|
-
traceFunctionKey: string | null;
|
|
2326
|
-
name: string | null;
|
|
2327
|
-
status: "pending" | "completed" | "failed" | "dropped";
|
|
2328
|
-
createdAt: string;
|
|
2329
|
-
callerMetadata: Record<string, string>;
|
|
2330
|
-
}>;
|
|
2331
|
-
nextCursor: string | null;
|
|
2332
|
-
hasMore: boolean;
|
|
2333
|
-
};
|
|
2334
|
-
type TraceAssertion = {
|
|
2335
|
-
id: string;
|
|
2336
|
-
traceId: string;
|
|
2337
|
-
assertion: string;
|
|
2338
|
-
humanNote: string | null;
|
|
2339
|
-
category_assertion_id: string | null;
|
|
2340
|
-
category: AssertionCategorySummary | null;
|
|
2341
|
-
passCriteria: string | null;
|
|
2342
|
-
failCriteria: string | null;
|
|
2343
|
-
targetOnEvaluatedTrace: TraceTarget | null;
|
|
2344
|
-
source: TraceAssertionSource;
|
|
2345
|
-
/** Why this assertion is right for its trace, span by span. */
|
|
2346
|
-
justification: Justification | null;
|
|
2347
|
-
/** Why its assigned category is the right one, span by span. */
|
|
2348
|
-
categoryJustification: Justification | null;
|
|
2349
|
-
createdAt: string;
|
|
2350
|
-
updatedAt: string;
|
|
2351
|
-
} & ApprovalFields;
|
|
2352
|
-
type AssertionEvidenceParameter = {
|
|
2353
|
-
name: string;
|
|
2354
|
-
type: "string" | "number" | "boolean" | "object" | "array" | "null" | "unknown";
|
|
2355
|
-
};
|
|
2356
|
-
type PotentialAssertionEvidence = {
|
|
2357
|
-
spanId: string;
|
|
2358
|
-
text: string;
|
|
2359
|
-
spanName: string | null;
|
|
2360
|
-
parameters: AssertionEvidenceParameter[];
|
|
2361
|
-
spanType: "llm" | "agent" | "function" | "guardrail" | "handoff" | "custom";
|
|
2362
|
-
isMocked: boolean;
|
|
2363
|
-
};
|
|
2364
|
-
type SaveAssertion = {
|
|
2365
|
-
/** Omit to preserve the category, or pass null to clear it. */
|
|
2366
|
-
category_assertion_id?: string | null;
|
|
2367
|
-
id?: string;
|
|
2368
|
-
assertion: string;
|
|
2369
|
-
passCriteria?: string | null;
|
|
2370
|
-
failCriteria?: string | null;
|
|
2371
|
-
targetOnEvaluatedTrace?: TraceTarget | null;
|
|
2372
|
-
/**
|
|
2373
|
-
* Why this assertion is right for this trace, one entry per span it rests on.
|
|
2374
|
-
* Cite spans on this trace only. Omit on an edit to preserve it.
|
|
2375
|
-
*/
|
|
2376
|
-
justification?: Justification | null;
|
|
2377
|
-
/**
|
|
2378
|
-
* Why `category_assertion_id` is the right category. Changing the category
|
|
2379
|
-
* clears it. Omit on an edit to preserve it.
|
|
2380
|
-
*/
|
|
2381
|
-
categoryJustification?: Justification | null;
|
|
2382
|
-
};
|
|
2383
|
-
type TraceAssertionsResult = {
|
|
2384
|
-
assertions: TraceAssertion[];
|
|
2385
|
-
inheritedFrom: string | null;
|
|
2386
|
-
};
|
|
2387
|
-
type TraceAssertionsUpdate = {
|
|
2388
|
-
traceId: string;
|
|
2389
|
-
assertions: SaveAssertion[];
|
|
2390
|
-
};
|
|
2391
|
-
type SaveAssertionsParams = {
|
|
2392
|
-
traceId: string;
|
|
2393
|
-
assertions: SaveAssertion[];
|
|
2394
|
-
source?: TraceAssertionSource;
|
|
2395
|
-
};
|
|
2396
|
-
type SaveAssertionsAllParams = {
|
|
2397
|
-
updates: TraceAssertionsUpdate[];
|
|
2398
|
-
source?: TraceAssertionSource;
|
|
2399
|
-
};
|
|
2400
|
-
type ArchiveAssertionsParams = {
|
|
2401
|
-
traceId: string;
|
|
2402
|
-
assertionIds: string[];
|
|
2403
|
-
};
|
|
2404
|
-
declare class TraceAssertionsClient {
|
|
2405
|
-
private readonly httpClient;
|
|
2406
|
-
constructor(httpClient: HttpClient);
|
|
2407
|
-
/** Suggest evidence for an assertion, enriched with its span context. */
|
|
2408
|
-
getAssertionEvidence(assertionId: string): Promise<PotentialAssertionEvidence[]>;
|
|
2409
|
-
}
|
|
2410
|
-
declare class TracesClient {
|
|
2411
|
-
private readonly httpClient;
|
|
2412
|
-
readonly assertions: TraceAssertionsClient;
|
|
2413
|
-
constructor(httpClient: HttpClient);
|
|
2414
|
-
search(params: TraceSearchParams): Promise<TraceSearchResult>;
|
|
2415
|
-
getAssertions(traceId: string): Promise<TraceAssertionsResult>;
|
|
2416
|
-
saveAssertions(params: SaveAssertionsParams): Promise<TraceAssertion[]>;
|
|
2417
|
-
saveAssertionsAll(params: SaveAssertionsAllParams): Promise<TraceAssertion[]>;
|
|
2418
|
-
archiveAssertions(params: ArchiveAssertionsParams): Promise<string[]>;
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
2416
|
/**
|
|
2422
2417
|
* Tracing utilities for external trace submission to Bitfab.
|
|
2423
2418
|
*
|
|
@@ -3627,7 +3622,7 @@ interface CommitRef {
|
|
|
3627
3622
|
/**
|
|
3628
3623
|
* SDK version from package.json (injected at build time)
|
|
3629
3624
|
*/
|
|
3630
|
-
declare const __version__ = "0.57.
|
|
3625
|
+
declare const __version__ = "0.57.6";
|
|
3631
3626
|
|
|
3632
3627
|
/**
|
|
3633
3628
|
* Constants for the Bitfab SDK.
|
|
@@ -3766,4 +3761,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3766
3761
|
run?: boolean;
|
|
3767
3762
|
}): Promise<SeedResult>;
|
|
3768
3763
|
|
|
3769
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionVerdict, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, 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 Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, 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 PotentialAssertionEvidence, 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, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, 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,
|
|
3764
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionVerdict, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, 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 Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, 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 PotentialAssertionEvidence, 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, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, 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 TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, 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
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
GradersClient,
|
|
23
23
|
LabelsClient,
|
|
24
24
|
SUPPORTED_PROVIDERS,
|
|
25
|
-
TraceAssertionsClient,
|
|
26
25
|
TracesClient,
|
|
27
26
|
defineReplayRegistry,
|
|
28
27
|
finalizers,
|
|
@@ -31,7 +30,7 @@ import {
|
|
|
31
30
|
getCurrentTrace,
|
|
32
31
|
reseedFromRegistry,
|
|
33
32
|
seedFromRegistry
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ICL6RSND.js";
|
|
35
34
|
import "./chunk-RCHSYWKI.js";
|
|
36
35
|
import {
|
|
37
36
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -40,7 +39,7 @@ import {
|
|
|
40
39
|
ReplayError,
|
|
41
40
|
reportReplayProgress,
|
|
42
41
|
serializeReplayResult
|
|
43
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GT4IDECP.js";
|
|
44
43
|
import {
|
|
45
44
|
BitfabError,
|
|
46
45
|
DEFAULT_SERVICE_URL,
|
|
@@ -48,7 +47,7 @@ import {
|
|
|
48
47
|
MixedTracingError,
|
|
49
48
|
__version__,
|
|
50
49
|
flushTraces
|
|
51
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-UTBA3ASY.js";
|
|
52
51
|
import "./chunk-VCRFFCLY.js";
|
|
53
52
|
export {
|
|
54
53
|
AssertionCategoriesClient,
|
|
@@ -74,7 +73,6 @@ export {
|
|
|
74
73
|
NO_MOCK_OVERRIDE,
|
|
75
74
|
ReplayError,
|
|
76
75
|
SUPPORTED_PROVIDERS,
|
|
77
|
-
TraceAssertionsClient,
|
|
78
76
|
TracesClient,
|
|
79
77
|
__version__,
|
|
80
78
|
defineReplayRegistry,
|
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.57.
|
|
100
|
+
__version__ = "0.57.6";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -4398,7 +4398,6 @@ __export(node_exports, {
|
|
|
4398
4398
|
NO_MOCK_OVERRIDE: () => NO_MOCK_OVERRIDE,
|
|
4399
4399
|
ReplayError: () => ReplayError,
|
|
4400
4400
|
SUPPORTED_PROVIDERS: () => SUPPORTED_PROVIDERS,
|
|
4401
|
-
TraceAssertionsClient: () => TraceAssertionsClient,
|
|
4402
4401
|
TracesClient: () => TracesClient,
|
|
4403
4402
|
__version__: () => __version__,
|
|
4404
4403
|
defineReplayRegistry: () => defineReplayRegistry,
|
|
@@ -6002,6 +6001,9 @@ init_http();
|
|
|
6002
6001
|
// src/labels.ts
|
|
6003
6002
|
var LABELS_PATH = "/api/sdk/traces/labels";
|
|
6004
6003
|
var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
|
|
6004
|
+
function labelEvidencePath(traceId, assertionId) {
|
|
6005
|
+
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions/${encodeURIComponent(assertionId)}/evidence`;
|
|
6006
|
+
}
|
|
6005
6007
|
var LabelsClient = class {
|
|
6006
6008
|
constructor(httpClient) {
|
|
6007
6009
|
this.httpClient = httpClient;
|
|
@@ -6050,6 +6052,11 @@ var LabelsClient = class {
|
|
|
6050
6052
|
);
|
|
6051
6053
|
return response.labels;
|
|
6052
6054
|
}
|
|
6055
|
+
/** Generate suggested evidence for an assertion on an original or replay trace. */
|
|
6056
|
+
async generateLabelEvidence(traceId, assertionId) {
|
|
6057
|
+
const response = await this.httpClient.get(labelEvidencePath(traceId, assertionId));
|
|
6058
|
+
return response.evidence;
|
|
6059
|
+
}
|
|
6053
6060
|
};
|
|
6054
6061
|
|
|
6055
6062
|
// src/langgraph.ts
|
|
@@ -7764,23 +7771,9 @@ var SEARCH_PATH = "/api/sdk/traces/search";
|
|
|
7764
7771
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
7765
7772
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
7766
7773
|
}
|
|
7767
|
-
function assertionEvidencePath(assertionId) {
|
|
7768
|
-
return `/api/sdk/traces/assertions/${encodeURIComponent(assertionId)}/evidence`;
|
|
7769
|
-
}
|
|
7770
|
-
var TraceAssertionsClient = class {
|
|
7771
|
-
constructor(httpClient) {
|
|
7772
|
-
this.httpClient = httpClient;
|
|
7773
|
-
}
|
|
7774
|
-
/** Suggest evidence for an assertion, enriched with its span context. */
|
|
7775
|
-
async getAssertionEvidence(assertionId) {
|
|
7776
|
-
const response = await this.httpClient.get(assertionEvidencePath(assertionId));
|
|
7777
|
-
return response.evidence;
|
|
7778
|
-
}
|
|
7779
|
-
};
|
|
7780
7774
|
var TracesClient = class {
|
|
7781
7775
|
constructor(httpClient) {
|
|
7782
7776
|
this.httpClient = httpClient;
|
|
7783
|
-
this.assertions = new TraceAssertionsClient(httpClient);
|
|
7784
7777
|
}
|
|
7785
7778
|
async search(params) {
|
|
7786
7779
|
return this.httpClient.request(SEARCH_PATH, params);
|
|
@@ -11038,7 +11031,6 @@ assertAsyncStorageRegistered();
|
|
|
11038
11031
|
NO_MOCK_OVERRIDE,
|
|
11039
11032
|
ReplayError,
|
|
11040
11033
|
SUPPORTED_PROVIDERS,
|
|
11041
|
-
TraceAssertionsClient,
|
|
11042
11034
|
TracesClient,
|
|
11043
11035
|
__version__,
|
|
11044
11036
|
defineReplayRegistry,
|