@bitfab/sdk 0.74.7 → 0.76.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/{autoTrace-kHOBg49M.js → autoTrace-BgN0zCQf.js} +565 -69
- package/dist/autoTrace-BgN0zCQf.js.map +1 -0
- package/dist/{autoTrace-DPWV1Xzr.cjs → autoTrace-pZKu5Nk2.cjs} +612 -68
- package/dist/autoTrace-pZKu5Nk2.cjs.map +1 -0
- package/dist/autoTrace.cjs +2 -1
- package/dist/autoTrace.d.cts +20 -24
- package/dist/autoTrace.d.ts +20 -24
- package/dist/autoTrace.js +1 -1
- package/dist/{babelPlugin-C0Im6AZ2.cjs → babelPlugin-BpEeVvk4.cjs} +73 -25
- package/dist/babelPlugin-BpEeVvk4.cjs.map +1 -0
- package/dist/{babelPlugin-hS2Hb2vt.js → babelPlugin-PgjdBuQe.js} +73 -25
- package/dist/babelPlugin-PgjdBuQe.js.map +1 -0
- package/dist/{http-sX8XbCY8.cjs → http-CWOvmnGL.cjs} +3 -3
- package/dist/{http-sX8XbCY8.cjs.map → http-CWOvmnGL.cjs.map} +1 -1
- package/dist/{http-CDFhg9aQ.js → http-DeWpv44r.js} +3 -3
- package/dist/{http-CDFhg9aQ.js.map → http-DeWpv44r.js.map} +1 -1
- package/dist/{index-Dg04DT0z.d.cts → index-Dx3MwCB4.d.cts} +299 -19
- package/dist/{index-Dg04DT0z.d.ts → index-Dx3MwCB4.d.ts} +299 -19
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node.cjs +3 -3
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +3 -3
- package/dist/{registryCommand-DdE8cNOX.js → registryCommand-D1VgfJjC.js} +341 -46
- package/dist/registryCommand-D1VgfJjC.js.map +1 -0
- package/dist/replayCli.js +1 -1
- package/dist/seedCli.js +1 -1
- package/dist/{src-DXFs6T8_.js → src-CFD_cP43.js} +64 -34
- package/dist/src-CFD_cP43.js.map +1 -0
- package/dist/{src-CmcfwC6Z.cjs → src-CxsswRYd.cjs} +70 -40
- package/dist/src-CxsswRYd.cjs.map +1 -0
- package/dist/transform/babel.cjs +1 -1
- package/dist/transform/babel.d.cts +2 -9
- package/dist/transform/babel.d.ts +2 -9
- package/dist/transform/babel.js +1 -1
- package/dist/transform/loaderRuntime.cjs +2 -2
- package/dist/transform/loaderRuntime.js +2 -2
- package/dist/transform/nodeLoader.js +72 -24
- package/dist/transform/nodeLoader.js.map +1 -1
- package/dist/transform/swc.cjs +1 -1
- package/dist/transform/swc.js +1 -1
- package/dist/transform/unplugin.cjs +2 -2
- package/dist/transform/unplugin.js +2 -2
- package/dist/{transform-BL1fJW-C.js → transform-BhazCKOg.js} +2 -2
- package/dist/{transform-BL1fJW-C.js.map → transform-BhazCKOg.js.map} +1 -1
- package/dist/{transform-C4H7TKW-.cjs → transform-Cdg7CSbP.cjs} +2 -2
- package/dist/{transform-C4H7TKW-.cjs.map → transform-Cdg7CSbP.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/autoTrace-DPWV1Xzr.cjs.map +0 -1
- package/dist/autoTrace-kHOBg49M.js.map +0 -1
- package/dist/babelPlugin-C0Im6AZ2.cjs.map +0 -1
- package/dist/babelPlugin-hS2Hb2vt.js.map +0 -1
- package/dist/registryCommand-DdE8cNOX.js.map +0 -1
- package/dist/src-CmcfwC6Z.cjs.map +0 -1
- package/dist/src-DXFs6T8_.js.map +0 -1
|
@@ -2458,6 +2458,40 @@ type HumanVerdictOutcome = {
|
|
|
2458
2458
|
label: boolean;
|
|
2459
2459
|
action: "set";
|
|
2460
2460
|
};
|
|
2461
|
+
/**
|
|
2462
|
+
* One span a saved verdict cites. `spanId` and `text` are always present.
|
|
2463
|
+
* Evidence written by Bitfab's assertion judge also carries `field`, `ranges`,
|
|
2464
|
+
* and `spanChanged`, which point at the exact passages the judge read.
|
|
2465
|
+
*/
|
|
2466
|
+
type VerdictEvidenceItem = {
|
|
2467
|
+
spanId: string;
|
|
2468
|
+
/**
|
|
2469
|
+
* What the span shows. For a judge item whose span is unchanged, the full
|
|
2470
|
+
* text of `ranges` read from the span, joined by a newline, an ellipsis, and
|
|
2471
|
+
* a newline. When `spanChanged` is true, only a short preview saved with the
|
|
2472
|
+
* verdict.
|
|
2473
|
+
*/
|
|
2474
|
+
text: string;
|
|
2475
|
+
/**
|
|
2476
|
+
* The span field the judge read: `summary`, `input`, `output`, `reasoning`,
|
|
2477
|
+
* `content`, `metadata`, `errors`, `contexts`, or `llm_usage`.
|
|
2478
|
+
*/
|
|
2479
|
+
field?: string;
|
|
2480
|
+
/**
|
|
2481
|
+
* Character ranges `[start, end)` into the field's text as the judge saw it:
|
|
2482
|
+
* a string field as is, any other value as JSON indented by two spaces.
|
|
2483
|
+
* Indexes are JavaScript string indexes (UTF-16 code units). Use them to
|
|
2484
|
+
* highlight only when `spanChanged` is `false`.
|
|
2485
|
+
*/
|
|
2486
|
+
ranges?: Array<[number, number]>;
|
|
2487
|
+
/**
|
|
2488
|
+
* True when the span no longer matches what was judged: `text` is then only
|
|
2489
|
+
* a preview and `ranges` must not be used to highlight anything.
|
|
2490
|
+
*/
|
|
2491
|
+
spanChanged?: boolean;
|
|
2492
|
+
};
|
|
2493
|
+
/** The evidence on a saved verdict: one item per span cited. */
|
|
2494
|
+
type VerdictEvidence = VerdictEvidenceItem[];
|
|
2461
2495
|
/** One assertion's verdict on a trace. */
|
|
2462
2496
|
type AssertionVerdict = {
|
|
2463
2497
|
assertionId: string;
|
|
@@ -2467,7 +2501,7 @@ type AssertionVerdict = {
|
|
|
2467
2501
|
verdictStatus: VerdictStatus;
|
|
2468
2502
|
source: VerdictSource;
|
|
2469
2503
|
annotation: string | null;
|
|
2470
|
-
evidence:
|
|
2504
|
+
evidence: VerdictEvidence | null;
|
|
2471
2505
|
confidence: VerdictConfidence | null;
|
|
2472
2506
|
approved: boolean;
|
|
2473
2507
|
/** @deprecated Use {@link AssertionVerdict.verdictStatus}. */
|
|
@@ -2483,7 +2517,7 @@ type TraceVerdicts = {
|
|
|
2483
2517
|
verdict: Verdict | null;
|
|
2484
2518
|
verdictStatus: VerdictStatus;
|
|
2485
2519
|
annotation: string | null;
|
|
2486
|
-
evidence:
|
|
2520
|
+
evidence: VerdictEvidence | null;
|
|
2487
2521
|
approved: boolean;
|
|
2488
2522
|
passed: number;
|
|
2489
2523
|
failed: number;
|
|
@@ -4089,6 +4123,22 @@ interface WrapOpenAIResponsesOptions<TResponse> {
|
|
|
4089
4123
|
/** Called after each call with the OpenAI response, for the caller's own usage or cost reporting. */
|
|
4090
4124
|
onResponse?: (response: TResponse) => void;
|
|
4091
4125
|
}
|
|
4126
|
+
interface WrapOpenAIChatOptions<TResponse> {
|
|
4127
|
+
/** Called after each call with the chat completion, for the caller's own usage or cost reporting. */
|
|
4128
|
+
onResponse?: (response: TResponse) => void;
|
|
4129
|
+
}
|
|
4130
|
+
interface WrapOpenAIEmbeddingsOptions<TResponse> {
|
|
4131
|
+
/** Called after each call with the embedding list, for the caller's own usage or cost reporting. */
|
|
4132
|
+
onResponse?: (response: TResponse) => void;
|
|
4133
|
+
}
|
|
4134
|
+
interface WrapOpenAITranscriptionsOptions<TResponse> {
|
|
4135
|
+
/** Called after each call with the transcription, for the caller's own usage or cost reporting. */
|
|
4136
|
+
onResponse?: (response: TResponse) => void;
|
|
4137
|
+
}
|
|
4138
|
+
interface WrapGeminiOptions<TResponse> {
|
|
4139
|
+
/** Called after each call with the Gemini response, for the caller's own usage or cost reporting. */
|
|
4140
|
+
onResponse?: (response: TResponse) => void;
|
|
4141
|
+
}
|
|
4092
4142
|
interface WrapBAMLOptions {
|
|
4093
4143
|
/** Called after each BAML invocation with the Collector instance. */
|
|
4094
4144
|
onCollector?: (collector: unknown) => void;
|
|
@@ -4352,6 +4402,9 @@ interface SpanOptions {
|
|
|
4352
4402
|
* For an async-generator result, `finalize` receives the array of yielded
|
|
4353
4403
|
* values once iteration completes, and its return is recorded instead of
|
|
4354
4404
|
* the default `{ yielded, return }`.
|
|
4405
|
+
*
|
|
4406
|
+
* On a node placed directly on a streamed LLM client call, `finalize` is not
|
|
4407
|
+
* used: the span records the assembled stream and its usage instead.
|
|
4355
4408
|
*/
|
|
4356
4409
|
finalize?: (result: any) => unknown | Promise<unknown>;
|
|
4357
4410
|
}
|
|
@@ -4399,6 +4452,13 @@ interface TraceOptions {
|
|
|
4399
4452
|
mockOnReplayDefault?: boolean;
|
|
4400
4453
|
/** Maximum number of recorded descendant levels. Defaults to 30. */
|
|
4401
4454
|
maxDepth?: number;
|
|
4455
|
+
/**
|
|
4456
|
+
* Maximum number of automatically captured descendant spans. Defaults to
|
|
4457
|
+
* 500. Declared nodes and LLM calls (BAML, Jev, and the provider client
|
|
4458
|
+
* calls the build transform records) do not count toward it and are still
|
|
4459
|
+
* recorded past it, so the trace's token usage and cost stay complete;
|
|
4460
|
+
* `maxDepth` still applies to them.
|
|
4461
|
+
*/
|
|
4402
4462
|
maxCapturedSubtreeSpans?: number;
|
|
4403
4463
|
/** Qualified or simple function names to leave out of the subtree. */
|
|
4404
4464
|
exclude?: readonly string[] | ReadonlySet<string>;
|
|
@@ -4828,11 +4888,14 @@ declare class Bitfab {
|
|
|
4828
4888
|
* `cachedInputTokens`, `reasoningTokens`, `costUsd` (OpenRouter's
|
|
4829
4889
|
* `usage.cost`), and `durationMs`; fields the response omits are left out.
|
|
4830
4890
|
*
|
|
4831
|
-
* Beneath a `withTrace()` root, each `.chat.completions.create(...)`
|
|
4832
|
-
* code compiled by the build
|
|
4833
|
-
*
|
|
4834
|
-
*
|
|
4835
|
-
*
|
|
4891
|
+
* Beneath a `withTrace()` root, each `.chat.completions.create(...)` and
|
|
4892
|
+
* `.chat.completions.parse(...)` call in code compiled by the build
|
|
4893
|
+
* transform, on a client whose base URL is `openrouter.ai`, is recorded
|
|
4894
|
+
* without this wrapper as its own `llm` span, and a `wrapOpenRouter` around
|
|
4895
|
+
* such a call records nothing more. Beneath a root, streamed calls
|
|
4896
|
+
* (`stream: true` or `.chat.completions.stream(...)`) are recorded too, when
|
|
4897
|
+
* the stream finishes; the wrapper itself never records a stream. For a
|
|
4898
|
+
* client on any other base URL, use `wrapOpenAIChat`.
|
|
4836
4899
|
*
|
|
4837
4900
|
* ```typescript
|
|
4838
4901
|
* const openai = new OpenAI({ baseURL: "https://openrouter.ai/api/v1", apiKey })
|
|
@@ -4865,11 +4928,13 @@ declare class Bitfab {
|
|
|
4865
4928
|
* `outputTokens`, `cachedInputTokens` (cache reads), and `durationMs`;
|
|
4866
4929
|
* fields the response omits are left out.
|
|
4867
4930
|
*
|
|
4868
|
-
* Beneath a `withTrace()` root, each `.messages.create(...)`
|
|
4869
|
-
* `@anthropic-ai/sdk` client in code
|
|
4870
|
-
* recorded without this wrapper as its
|
|
4871
|
-
* `wrapAnthropic` around such a call records nothing
|
|
4872
|
-
* (`stream: true`
|
|
4931
|
+
* Beneath a `withTrace()` root, each `.messages.create(...)` and
|
|
4932
|
+
* `.messages.parse(...)` call on an `@anthropic-ai/sdk` client in code
|
|
4933
|
+
* compiled by the build transform is recorded without this wrapper as its
|
|
4934
|
+
* own `llm` span, and a `wrapAnthropic` around such a call records nothing
|
|
4935
|
+
* more. Beneath a root, streamed calls (`stream: true` or
|
|
4936
|
+
* `.messages.stream(...)`) are recorded too, when the stream finishes; the
|
|
4937
|
+
* wrapper itself never records a stream.
|
|
4873
4938
|
*
|
|
4874
4939
|
* ```typescript
|
|
4875
4940
|
* const anthropic = new Anthropic()
|
|
@@ -4903,11 +4968,13 @@ declare class Bitfab {
|
|
|
4903
4968
|
* when the response reports `usage.cost`), and `durationMs`; fields the
|
|
4904
4969
|
* response omits are left out.
|
|
4905
4970
|
*
|
|
4906
|
-
* Beneath a `withTrace()` root, each `.responses.create(...)`
|
|
4907
|
-
* `openai` client in code compiled by the
|
|
4908
|
-
* without this wrapper as its own `llm` span,
|
|
4909
|
-
* around such a call records nothing more.
|
|
4910
|
-
*
|
|
4971
|
+
* Beneath a `withTrace()` root, each `.responses.create(...)` and
|
|
4972
|
+
* `.responses.parse(...)` call on an `openai` client in code compiled by the
|
|
4973
|
+
* build transform is recorded without this wrapper as its own `llm` span,
|
|
4974
|
+
* and a `wrapOpenAIResponses` around such a call records nothing more.
|
|
4975
|
+
* Beneath a root, streamed calls (`stream: true` or
|
|
4976
|
+
* `.responses.stream(...)`) are recorded too, when the stream finishes; the
|
|
4977
|
+
* wrapper itself never records a stream.
|
|
4911
4978
|
*
|
|
4912
4979
|
* ```typescript
|
|
4913
4980
|
* const openai = new OpenAI()
|
|
@@ -4922,6 +4989,167 @@ declare class Bitfab {
|
|
|
4922
4989
|
* @returns An async function with the same signature that records each call
|
|
4923
4990
|
*/
|
|
4924
4991
|
wrapOpenAIResponses<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIResponsesOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
4992
|
+
/**
|
|
4993
|
+
* Wrap a function that sends a chat completion to the OpenAI API, or to any
|
|
4994
|
+
* OpenAI-compatible base URL other than OpenRouter, to record the call's
|
|
4995
|
+
* prompt, model, token usage, and duration. Bitfab works out the cost from
|
|
4996
|
+
* the model and token counts.
|
|
4997
|
+
*
|
|
4998
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
4999
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5000
|
+
* function. The wrapped function must return the chat completion, as
|
|
5001
|
+
* `openai.chat.completions.create` and `openai.chat.completions.parse` do.
|
|
5002
|
+
* When its first argument is the request, the request's messages become the
|
|
5003
|
+
* span's prompt. One context entry holds `provider` (`"openai"`), `model`,
|
|
5004
|
+
* `upstreamProvider`, `inputTokens`, `outputTokens`, `cachedInputTokens`,
|
|
5005
|
+
* `reasoningTokens`,
|
|
5006
|
+
* `costUsd` (only when the response reports `usage.cost`), and
|
|
5007
|
+
* `durationMs`; fields the response omits are left out.
|
|
5008
|
+
*
|
|
5009
|
+
* Beneath a `withTrace()` root, each `.chat.completions.create(...)` and
|
|
5010
|
+
* `.chat.completions.parse(...)` call on an `openai` client in code
|
|
5011
|
+
* compiled by the build transform is recorded without this wrapper as its
|
|
5012
|
+
* own `llm` span, and a `wrapOpenAIChat` around such a call records nothing
|
|
5013
|
+
* more. Beneath a root, streamed calls (`stream: true` or
|
|
5014
|
+
* `.chat.completions.stream(...)`) are recorded too, when the stream
|
|
5015
|
+
* finishes, and carry usage only when the request sets
|
|
5016
|
+
* `stream_options: { include_usage: true }`; the wrapper itself never
|
|
5017
|
+
* records a stream.
|
|
5018
|
+
*
|
|
5019
|
+
* ```typescript
|
|
5020
|
+
* const openai = new OpenAI()
|
|
5021
|
+
* const complete = client.wrapOpenAIChat(
|
|
5022
|
+
* openai.chat.completions.create.bind(openai.chat.completions),
|
|
5023
|
+
* )
|
|
5024
|
+
* const response = await complete({
|
|
5025
|
+
* model: "gpt-5-mini",
|
|
5026
|
+
* messages: [{ role: "user", content: text }],
|
|
5027
|
+
* })
|
|
5028
|
+
* ```
|
|
5029
|
+
*
|
|
5030
|
+
* @param method - A named function that sends the request and returns the chat completion
|
|
5031
|
+
* @param options - `onResponse` is called with each chat completion after it is recorded
|
|
5032
|
+
* @returns An async function with the same signature that records each call
|
|
5033
|
+
*/
|
|
5034
|
+
wrapOpenAIChat<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIChatOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5035
|
+
/**
|
|
5036
|
+
* Wrap a function that sends a request to the OpenAI Embeddings API to
|
|
5037
|
+
* record the call's input, model, token usage, and duration. Bitfab works
|
|
5038
|
+
* out the cost from the model and token counts.
|
|
5039
|
+
*
|
|
5040
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5041
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5042
|
+
* function. The wrapped function must return the embedding list, as
|
|
5043
|
+
* `openai.embeddings.create` does. When its first argument is the request,
|
|
5044
|
+
* the request's `input` becomes the span's prompt. One context entry holds
|
|
5045
|
+
* `provider` (`"openai"`), `model`, `upstreamProvider`, `inputTokens`,
|
|
5046
|
+
* `outputTokens` (always 0), `costUsd` (only when the response reports
|
|
5047
|
+
* `usage.cost`), and `durationMs`; fields the response omits are left out.
|
|
5048
|
+
* The wrapper cannot see the client's base URL, so `provider` is
|
|
5049
|
+
* `"openai"` even for an OpenRouter client.
|
|
5050
|
+
*
|
|
5051
|
+
* Beneath a `withTrace()` root, each `.embeddings.create(...)` call on an
|
|
5052
|
+
* `openai` client in code compiled by the build transform is recorded
|
|
5053
|
+
* without this wrapper as its own `llm` span (with `provider`
|
|
5054
|
+
* `"openrouter"` when the client's base URL is `openrouter.ai`), and a
|
|
5055
|
+
* `wrapOpenAIEmbeddings` around such a call records nothing more.
|
|
5056
|
+
*
|
|
5057
|
+
* ```typescript
|
|
5058
|
+
* const openai = new OpenAI()
|
|
5059
|
+
* const embed = client.wrapOpenAIEmbeddings(
|
|
5060
|
+
* openai.embeddings.create.bind(openai.embeddings),
|
|
5061
|
+
* )
|
|
5062
|
+
* const embeddings = await embed({
|
|
5063
|
+
* model: "text-embedding-3-small",
|
|
5064
|
+
* input: text,
|
|
5065
|
+
* })
|
|
5066
|
+
* ```
|
|
5067
|
+
*
|
|
5068
|
+
* @param method - A named function that sends the request and returns the embedding list
|
|
5069
|
+
* @param options - `onResponse` is called with each embedding list after it is recorded
|
|
5070
|
+
* @returns An async function with the same signature that records each call
|
|
5071
|
+
*/
|
|
5072
|
+
wrapOpenAIEmbeddings<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIEmbeddingsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5073
|
+
/**
|
|
5074
|
+
* Wrap a function that sends a request to the OpenAI audio transcription
|
|
5075
|
+
* API to record the call's model, usage, and duration. Bitfab works out the
|
|
5076
|
+
* cost from the model and token counts, so models billed by duration, such
|
|
5077
|
+
* as `whisper-1`, record no cost.
|
|
5078
|
+
*
|
|
5079
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5080
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5081
|
+
* function. The wrapped function must return the transcription, as
|
|
5082
|
+
* `openai.audio.transcriptions.create` does. When its first argument is the
|
|
5083
|
+
* request, the request's `prompt` becomes the span's prompt. One context
|
|
5084
|
+
* entry holds `provider` (`"openai"`), `model`, `inputTokens` and
|
|
5085
|
+
* `outputTokens` (for models billed by token, such as `gpt-4o-transcribe`),
|
|
5086
|
+
* `audioSeconds` (for models billed by duration, such as `whisper-1`), and
|
|
5087
|
+
* `durationMs`; fields the response omits are left out.
|
|
5088
|
+
*
|
|
5089
|
+
* Beneath a `withTrace()` root, each `.audio.transcriptions.create(...)`
|
|
5090
|
+
* call on an `openai` client in code compiled by the build transform is
|
|
5091
|
+
* recorded without this wrapper as its own `llm` span, and a
|
|
5092
|
+
* `wrapOpenAITranscriptions` around such a call records nothing more.
|
|
5093
|
+
* Beneath a root, streamed calls (`stream: true`) are recorded too, when
|
|
5094
|
+
* the stream finishes; the wrapper itself never records a stream.
|
|
5095
|
+
*
|
|
5096
|
+
* ```typescript
|
|
5097
|
+
* const openai = new OpenAI()
|
|
5098
|
+
* const transcribe = client.wrapOpenAITranscriptions(
|
|
5099
|
+
* openai.audio.transcriptions.create.bind(openai.audio.transcriptions),
|
|
5100
|
+
* )
|
|
5101
|
+
* const transcription = await transcribe({
|
|
5102
|
+
* model: "gpt-4o-transcribe",
|
|
5103
|
+
* file: fs.createReadStream("call.mp3"),
|
|
5104
|
+
* })
|
|
5105
|
+
* ```
|
|
5106
|
+
*
|
|
5107
|
+
* @param method - A named function that sends the request and returns the transcription
|
|
5108
|
+
* @param options - `onResponse` is called with each transcription after it is recorded
|
|
5109
|
+
* @returns An async function with the same signature that records each call
|
|
5110
|
+
*/
|
|
5111
|
+
wrapOpenAITranscriptions<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAITranscriptionsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5112
|
+
/**
|
|
5113
|
+
* Wrap a function that sends a request to the Gemini API through
|
|
5114
|
+
* `@google/genai` to record the call's prompt, model, token usage, and
|
|
5115
|
+
* duration. Bitfab works out the cost from the model and token counts.
|
|
5116
|
+
*
|
|
5117
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5118
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5119
|
+
* function. The wrapped function must return the response, as
|
|
5120
|
+
* `ai.models.generateContent` does. When its first argument is the request,
|
|
5121
|
+
* the request's `config.systemInstruction` and `contents` become the span's
|
|
5122
|
+
* prompt. One context entry holds `provider` (`"gemini"`), `model` (the
|
|
5123
|
+
* response's `modelVersion`, else the requested model), `inputTokens`
|
|
5124
|
+
* (prompt and tool-use prompt tokens), `outputTokens` (candidate and
|
|
5125
|
+
* thinking tokens), `cachedInputTokens`, `reasoningTokens` (thinking
|
|
5126
|
+
* tokens), and `durationMs`; fields the response omits are left out.
|
|
5127
|
+
*
|
|
5128
|
+
* Beneath a `withTrace()` root, each `.models.generateContent(...)` call on
|
|
5129
|
+
* an `@google/genai` client in code compiled by the build transform is
|
|
5130
|
+
* recorded without this wrapper as its own `llm` span, and a `wrapGemini`
|
|
5131
|
+
* around such a call records nothing more. Beneath a root,
|
|
5132
|
+
* `.models.generateContentStream(...)` calls are recorded too, when the
|
|
5133
|
+
* stream finishes; the wrapper itself never records a stream.
|
|
5134
|
+
*
|
|
5135
|
+
* `ai.models.generateContent` has no function name of its own, so a wrapper
|
|
5136
|
+
* around an unnamed function is named `generateContent`, which is the name
|
|
5137
|
+
* `withNode` targets.
|
|
5138
|
+
*
|
|
5139
|
+
* ```typescript
|
|
5140
|
+
* const ai = new GoogleGenAI({ apiKey })
|
|
5141
|
+
* const generate = client.wrapGemini(ai.models.generateContent)
|
|
5142
|
+
* const response = await generate({
|
|
5143
|
+
* model: "gemini-2.5-flash",
|
|
5144
|
+
* contents: text,
|
|
5145
|
+
* })
|
|
5146
|
+
* ```
|
|
5147
|
+
*
|
|
5148
|
+
* @param method - A named function that sends the request and returns the response
|
|
5149
|
+
* @param options - `onResponse` is called with each response after it is recorded
|
|
5150
|
+
* @returns An async function with the same signature that records each call
|
|
5151
|
+
*/
|
|
5152
|
+
wrapGemini<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapGeminiOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
4925
5153
|
private wrapClientCall;
|
|
4926
5154
|
/**
|
|
4927
5155
|
* Wrap a function to automatically create a span for its inputs and outputs.
|
|
@@ -5371,6 +5599,58 @@ declare class BitfabFunction {
|
|
|
5371
5599
|
* @returns An async function with the same signature that records each call
|
|
5372
5600
|
*/
|
|
5373
5601
|
wrapOpenAIResponses<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIResponsesOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5602
|
+
/**
|
|
5603
|
+
* Wrap a function that sends a chat completion to the OpenAI API to record
|
|
5604
|
+
* the call's prompt, model, token usage, and duration. Delegates to the
|
|
5605
|
+
* parent client's wrapOpenAIChat method.
|
|
5606
|
+
*
|
|
5607
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5608
|
+
* own: it writes into the span that is current when the call starts.
|
|
5609
|
+
*
|
|
5610
|
+
* @param method - A named function that sends the request and returns the chat completion
|
|
5611
|
+
* @param options - `onResponse` is called with each chat completion after it is recorded
|
|
5612
|
+
* @returns An async function with the same signature that records each call
|
|
5613
|
+
*/
|
|
5614
|
+
wrapOpenAIChat<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIChatOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5615
|
+
/**
|
|
5616
|
+
* Wrap a function that sends a request to the OpenAI Embeddings API to
|
|
5617
|
+
* record the call's input, model, token usage, and duration. Delegates to
|
|
5618
|
+
* the parent client's wrapOpenAIEmbeddings method.
|
|
5619
|
+
*
|
|
5620
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5621
|
+
* own: it writes into the span that is current when the call starts.
|
|
5622
|
+
*
|
|
5623
|
+
* @param method - A named function that sends the request and returns the embedding list
|
|
5624
|
+
* @param options - `onResponse` is called with each embedding list after it is recorded
|
|
5625
|
+
* @returns An async function with the same signature that records each call
|
|
5626
|
+
*/
|
|
5627
|
+
wrapOpenAIEmbeddings<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIEmbeddingsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5628
|
+
/**
|
|
5629
|
+
* Wrap a function that sends a request to the OpenAI audio transcription
|
|
5630
|
+
* API to record the call's model, usage, and duration. Delegates to the
|
|
5631
|
+
* parent client's wrapOpenAITranscriptions method.
|
|
5632
|
+
*
|
|
5633
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5634
|
+
* own: it writes into the span that is current when the call starts.
|
|
5635
|
+
*
|
|
5636
|
+
* @param method - A named function that sends the request and returns the transcription
|
|
5637
|
+
* @param options - `onResponse` is called with each transcription after it is recorded
|
|
5638
|
+
* @returns An async function with the same signature that records each call
|
|
5639
|
+
*/
|
|
5640
|
+
wrapOpenAITranscriptions<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAITranscriptionsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5641
|
+
/**
|
|
5642
|
+
* Wrap a function that sends a request to the Gemini API to record the
|
|
5643
|
+
* call's prompt, model, token usage, and duration. Delegates to the parent
|
|
5644
|
+
* client's wrapGemini method.
|
|
5645
|
+
*
|
|
5646
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5647
|
+
* own: it writes into the span that is current when the call starts.
|
|
5648
|
+
*
|
|
5649
|
+
* @param method - A named function that sends the request and returns the response
|
|
5650
|
+
* @param options - `onResponse` is called with each response after it is recorded
|
|
5651
|
+
* @returns An async function with the same signature that records each call
|
|
5652
|
+
*/
|
|
5653
|
+
wrapGemini<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapGeminiOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5374
5654
|
}
|
|
5375
5655
|
//#endregion
|
|
5376
5656
|
//#region src/commitRef.d.ts
|
|
@@ -5391,7 +5671,7 @@ interface CommitRef {
|
|
|
5391
5671
|
/**
|
|
5392
5672
|
* SDK version from package.json (injected at build time)
|
|
5393
5673
|
*/
|
|
5394
|
-
declare const __version__ = "0.
|
|
5674
|
+
declare const __version__ = "0.76.0";
|
|
5395
5675
|
//#endregion
|
|
5396
5676
|
//#region src/constants.d.ts
|
|
5397
5677
|
/**
|
|
@@ -5533,4 +5813,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
5533
5813
|
run?: boolean;
|
|
5534
5814
|
}): Promise<SeedResult>;
|
|
5535
5815
|
//#endregion
|
|
5536
|
-
export {
|
|
5816
|
+
export { SpanListResult as $, ScenarioGeneration as $n, BitfabLanguageModelMiddleware as $r, HumanVerdictUpdate as $t, SpanMethodDecoratorContext as A, BitfabError as Ai, AssertionKind as An, ExperimentTotals as Ar, BitfabOpenAIAgentHandler as At, WrapOpenRouterOptions as B, AllowedEnvVars as Bi, SaveScenarioActualOutcome as Bn, GraderRerunError as Br, GraderLabelSource as Bt, NodeMethodDecorator as C, MockOverrideCtx as Ci, AssertionCode as Cn, ExperimentStatus as Cr, serializeReplayResult as Ct, SeedCaseOptions as D, NO_MOCK_OVERRIDE as Di, AssertionGenerationError as Dn, ExperimentSummaryFacts as Dr, PiIntegrationOptions as Dt, ReseedResult as E, MockValue as Ei, AssertionGeneration as En, ExperimentSummaryExampleTrace as Er, BitfabPiIntegration as Et, WrapJevOptions as F, SUPPORTED_PROVIDERS as Fi, GenerateAssertionsOptions as Fn, Dataset as Fr, BitfabLangGraphCallbackHandler as Ft, CaptureSurface as G, Approver as Gi, Scenario as Gn, ListDatasetsParams as Gr, GraderVerdictUpdate as Gt, getCurrentReplayBranch as H, ProviderDefinition as Hi, SaveScenarioHistoryEntry as Hn, GraderRerunResult as Hr, GraderVerdict as Ht, WrapOpenAIChatOptions as I, ReplayNodeIdentity as Ii, GenerateScenarioOptions as In, DatasetGraderRef as Ir, GetGraderLabelsParams as It, TraceResponse as J, JustificationSpan as Ji, ScenarioCreationStatus as Jn, RerunGradersOptions as Jr, ArchiveVerdictTarget as Jt, ActiveSpanContext as K, Assignee as Ki, ScenarioAction as Kn, RemoveDatasetGradersResult as Kr, GradersClient as Kt, WrapOpenAIEmbeddingsOptions as L, SelectiveReplayDecision as Li, SaveAssertion as Ln, DatasetTraceIds as Lr, GetGraderVerdictsParams as Lt, WrapAnthropicOptions as M, DbSnapshotConfig as Mi, AssertionRewrite as Mn, ListExperimentsParams as Mr, BitfabLangGraphAgent as Mt, WrapBAMLOptions as N, DbSnapshotProvider as Ni, AssertionRewriteStatus as Nn, AddDatasetGradersResult as Nr, BitfabLangGraphIntegration as Nt, SeedRunOptions as O, NodeMatcher as Oi, AssertionGenerationStatus as On, ExperimentSummaryResult as Or, OrganizationMember as Ot, WrapGeminiOptions as P, DbSnapshotRef as Pi, AssertionVerdictEvidence as Pn, AddDatasetTracesResult as Pr, LangGraphIntegrationOptions as Pt, SpanListParams as Q, ScenarioDataSources as Qn, UpdateDatasetParams as Qr, HumanVerdictOutcome as Qt, WrapOpenAIResponsesOptions as R, SelectiveReplayOptions as Ri, SaveAssertionsAllParams as Rn, DatasetsClient as Rr, GraderLabel as Rt, DetachedTrace as S, MockOverride as Si, ArchiveAssertionsParams as Sn, ExperimentRunBy as Sr, reportReplayProgress as St, ReseedOptions as T, MockOverrideResolver as Ti, AssertionEvidenceParameter as Tn, ExperimentSummaryBeforeAfter as Tr, ReplayInterruptSignal as Tt, getCurrentSpan as U, ApprovalFields as Ui, SaveScenarioParams as Un, GraderRerunStatus as Ur, GraderVerdictOutcome as Ut, WrappedBamlFn as V, BamlExecutionResult as Vi, SaveScenarioData as Vn, GraderRerunProgress as Vr, GraderLabelUpdate as Vt, getCurrentTrace as W, ApprovalState as Wi, SavedTraceAssertion as Wn, GraderRerunTimeoutError as Wr, GraderVerdictSource as Wt, ListedSpan as X, ScenarioDataAppend as Xn, SaveDatasetParams as Xr, HumanLabelOutcome as Xt, TracingProcessor as Y, ScenarioData as Yn, RerunGradersResult as Yr, AssertionVerdict as Yt, SpanListField as Z, ScenarioDataOrigin as Zn, SaveDatasetResult as Zr, HumanLabelUpdate as Zt, BitfabConfig as _, SpanOccurrence as _i, VerdictSource as _n, ExperimentCodeChangeTotals as _r, ReplayOptions as _t, ReplayRegistryOptions as a, AssertionCategoriesClient as ai, LabelTarget as an, TraceAssertion as ar, ReplayBranch as at, CurrentSpan as b, flushTraces as bi, VerdictUpdate as bn, ExperimentRollup as br, ReplayResult as bt, SeedResult as c, CategoriesClient as ci, PassFailVerdict as cn, TraceAssertionsUpdate as cr, BITFAB_PROGRESS_PREFIX as ct, seedFromRegistry as d, SaveAssertionCategoryParams as di, Verdict as dn, TraceSearchResult as dr, MockStrategy as dt, BitfabVercelAiHandler as ei, LabelAction as en, ScenarioHistoryEntry as er, SpansClient as et, finalizers as f, SaveCategoryParams as fi, VerdictAction as fn, TraceTarget as fr, ReplayError as ft, Bitfab as g, SpanLookup as gi, VerdictOutcome as gn, ExperimentCategoryTally as gr, ReplayItemStartProgress as gt, CommitRef as h, HttpClient as hi, VerdictEvidenceItem as hn, Experiment as hr, ReplayItemFinishProgress as ht, ReplayRegistryContext as i, BitfabClaudeAgentHandler as ii, LabelStatus as in, ScenarioTrigger as ir, RivetIntegrationOptions as it, SpanOptions as j, MixedTracingError as ji, AssertionLabelEvidence as jn, ExperimentsClient as jr, BitfabAgentMiddleware as jt, SpanMethodDecorator as k, SpanNodeMeta as ki, AssertionGenerationTimeoutError as kn, ExperimentTally as kr, OrganizationMembersClient as kt, defineReplayRegistry as l, Category as li, TraceLabels as ln, TraceSearchFilters as lr, DbBranchOptions as lt, __version__ as m, CodeChangeFile as mi, VerdictEvidence as mn, TracesClient as mr, ReplayItem as mt, ReplayRegistration as n, VercelGenerateResult as ni, LabelOutcome as nn, ScenarioRecordInput as nr, RivetContextLike as nt, ReseedRegistryResult as o, AssertionCategory as oi, LabelUpdate as on, TraceAssertionSource as or, AdaptContext as ot, DEFAULT_SERVICE_URL as p, CapturedSpan as pi, VerdictConfidence as pn, TraceTargetOccurrence as pr, ReplayExperiment as pt, BitfabOpenAITracingProcessor as q, Justification as qi, ScenarioActualOutcome as qn, RemoveDatasetTracesResult as qr, ArchiveLabelTarget as qt, ReplayRegistry as r, VercelStreamResult as ri, LabelSource as rn, ScenarioSource as rr, RivetEffectType as rt, SeedCase as s, AssertionCategorySummary as si, LabelsClient as sn, TraceAssertionsResult as sr, AdaptInputsFn as st, ReplayOptionsFactory as t, VercelCallParams as ti, LabelConfidence as tn, ScenarioRecord as tr, BitfabRivetIntegration as tt, reseedFromRegistry as u, CategorySummary as ui, TraceVerdicts as un, TraceSearchParams as ur, DbBranchReplayError as ut, BitfabFunction as v, SpanType as vi, VerdictStatus as vn, ExperimentJitter as vr, ReplayProgress as vt, NodeOptions as w, MockOverrideInput as wi, AssertionCodeDraft as wn, ExperimentSummary as wr, ReplayInterrupt as wt, CurrentTrace as x, DbBranchTimings as xi, VerdictsClient as xn, ExperimentRollupResult as xr, TraceIngestionType as xt, CaptureWhen as y, TokenUsage as yi, VerdictTarget as yn, ExperimentPage as yr, ReplayProgressItem as yt, WrapOpenAITranscriptionsOptions as z, SelectiveReplayReport as zi, SaveAssertionsParams as zn, GraderRerun as zr, GraderLabelOutcome as zt };
|
package/dist/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_src = require("./src-
|
|
6
|
-
const require_http = require("./http-
|
|
5
|
+
const require_src = require("./src-CxsswRYd.cjs");
|
|
6
|
+
const require_http = require("./http-CWOvmnGL.cjs");
|
|
7
7
|
exports.AssertionCategoriesClient = require_src.AssertionCategoriesClient;
|
|
8
8
|
exports.AssertionGenerationError = require_src.AssertionGenerationError;
|
|
9
9
|
exports.AssertionGenerationTimeoutError = require_src.AssertionGenerationTimeoutError;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, type ArchiveVerdictTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionCode, type AssertionCodeDraft, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionKind, type AssertionLabelEvidence, type AssertionRewrite, type AssertionRewriteStatus, type AssertionVerdict, type AssertionVerdictEvidence, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, type BitfabAgentMiddleware, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, type BitfabLangGraphAgent, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabPiIntegration, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, CategoriesClient, type Category, type CategorySummary, 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 Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentSummary, type ExperimentSummaryBeforeAfter, type ExperimentSummaryExampleTrace, type ExperimentSummaryFacts, type ExperimentSummaryResult, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GenerateScenarioOptions, type GetGraderLabelsParams, type GetGraderVerdictsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, type GraderVerdict, type GraderVerdictOutcome, type GraderVerdictSource, type GraderVerdictUpdate, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type HumanVerdictOutcome, type HumanVerdictUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type PassFailVerdict, type PiIntegrationOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, type ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, 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 SaveCategoryParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type SavedTraceAssertion, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioCreationStatus, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioDataSources, type ScenarioGeneration, type ScenarioHistoryEntry, type ScenarioRecord, type ScenarioRecordInput, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, type TraceVerdicts, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type Verdict, type VerdictAction, type VerdictConfidence, type VerdictOutcome, type VerdictSource, type VerdictStatus, type VerdictTarget, type VerdictUpdate, VerdictsClient, type WrapAnthropicOptions, type WrapBAMLOptions, type WrapJevOptions, type WrapOpenAIResponsesOptions, type WrapOpenRouterOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
|
1
|
+
import { $ as SpanListResult, $n as ScenarioGeneration, $r as BitfabLanguageModelMiddleware, $t as HumanVerdictUpdate, A as SpanMethodDecoratorContext, Ai as BitfabError, An as AssertionKind, Ar as ExperimentTotals, At as BitfabOpenAIAgentHandler, B as WrapOpenRouterOptions, Bi as AllowedEnvVars, Bn as SaveScenarioActualOutcome, Br as GraderRerunError, Bt as GraderLabelSource, C as NodeMethodDecorator, Ci as MockOverrideCtx, Cn as AssertionCode, Cr as ExperimentStatus, Ct as serializeReplayResult, D as SeedCaseOptions, Di as NO_MOCK_OVERRIDE, Dn as AssertionGenerationError, Dr as ExperimentSummaryFacts, Dt as PiIntegrationOptions, E as ReseedResult, Ei as MockValue, En as AssertionGeneration, Er as ExperimentSummaryExampleTrace, Et as BitfabPiIntegration, F as WrapJevOptions, Fi as SUPPORTED_PROVIDERS, Fn as GenerateAssertionsOptions, Fr as Dataset, Ft as BitfabLangGraphCallbackHandler, G as CaptureSurface, Gi as Approver, Gn as Scenario, Gr as ListDatasetsParams, Gt as GraderVerdictUpdate, H as getCurrentReplayBranch, Hi as ProviderDefinition, Hn as SaveScenarioHistoryEntry, Hr as GraderRerunResult, Ht as GraderVerdict, I as WrapOpenAIChatOptions, Ii as ReplayNodeIdentity, In as GenerateScenarioOptions, Ir as DatasetGraderRef, It as GetGraderLabelsParams, J as TraceResponse, Ji as JustificationSpan, Jn as ScenarioCreationStatus, Jr as RerunGradersOptions, Jt as ArchiveVerdictTarget, K as ActiveSpanContext, Ki as Assignee, Kn as ScenarioAction, Kr as RemoveDatasetGradersResult, Kt as GradersClient, L as WrapOpenAIEmbeddingsOptions, Li as SelectiveReplayDecision, Ln as SaveAssertion, Lr as DatasetTraceIds, Lt as GetGraderVerdictsParams, M as WrapAnthropicOptions, Mi as DbSnapshotConfig, Mn as AssertionRewrite, Mr as ListExperimentsParams, Mt as BitfabLangGraphAgent, N as WrapBAMLOptions, Ni as DbSnapshotProvider, Nn as AssertionRewriteStatus, Nr as AddDatasetGradersResult, Nt as BitfabLangGraphIntegration, O as SeedRunOptions, Oi as NodeMatcher, On as AssertionGenerationStatus, Or as ExperimentSummaryResult, Ot as OrganizationMember, P as WrapGeminiOptions, Pi as DbSnapshotRef, Pn as AssertionVerdictEvidence, Pr as AddDatasetTracesResult, Pt as LangGraphIntegrationOptions, Q as SpanListParams, Qn as ScenarioDataSources, Qr as UpdateDatasetParams, Qt as HumanVerdictOutcome, R as WrapOpenAIResponsesOptions, Ri as SelectiveReplayOptions, Rn as SaveAssertionsAllParams, Rr as DatasetsClient, Rt as GraderLabel, S as DetachedTrace, Si as MockOverride, Sn as ArchiveAssertionsParams, Sr as ExperimentRunBy, St as reportReplayProgress, T as ReseedOptions, Ti as MockOverrideResolver, Tn as AssertionEvidenceParameter, Tr as ExperimentSummaryBeforeAfter, Tt as ReplayInterruptSignal, U as getCurrentSpan, Ui as ApprovalFields, Un as SaveScenarioParams, Ur as GraderRerunStatus, Ut as GraderVerdictOutcome, V as WrappedBamlFn, Vi as BamlExecutionResult, Vn as SaveScenarioData, Vr as GraderRerunProgress, Vt as GraderLabelUpdate, W as getCurrentTrace, Wi as ApprovalState, Wn as SavedTraceAssertion, Wr as GraderRerunTimeoutError, Wt as GraderVerdictSource, X as ListedSpan, Xn as ScenarioDataAppend, Xr as SaveDatasetParams, Xt as HumanLabelOutcome, Y as TracingProcessor, Yn as ScenarioData, Yr as RerunGradersResult, Yt as AssertionVerdict, Z as SpanListField, Zn as ScenarioDataOrigin, Zr as SaveDatasetResult, Zt as HumanLabelUpdate, _ as BitfabConfig, _i as SpanOccurrence, _n as VerdictSource, _r as ExperimentCodeChangeTotals, _t as ReplayOptions, a as ReplayRegistryOptions, ai as AssertionCategoriesClient, an as LabelTarget, ar as TraceAssertion, at as ReplayBranch, b as CurrentSpan, bi as flushTraces, bn as VerdictUpdate, br as ExperimentRollup, bt as ReplayResult, c as SeedResult, ci as CategoriesClient, cn as PassFailVerdict, cr as TraceAssertionsUpdate, ct as BITFAB_PROGRESS_PREFIX, d as seedFromRegistry, di as SaveAssertionCategoryParams, dn as Verdict, dr as TraceSearchResult, dt as MockStrategy, ei as BitfabVercelAiHandler, en as LabelAction, er as ScenarioHistoryEntry, et as SpansClient, f as finalizers, fi as SaveCategoryParams, fn as VerdictAction, fr as TraceTarget, ft as ReplayError, g as Bitfab, gi as SpanLookup, gn as VerdictOutcome, gr as ExperimentCategoryTally, gt as ReplayItemStartProgress, h as CommitRef, hi as HttpClient, hn as VerdictEvidenceItem, hr as Experiment, ht as ReplayItemFinishProgress, i as ReplayRegistryContext, ii as BitfabClaudeAgentHandler, in as LabelStatus, ir as ScenarioTrigger, it as RivetIntegrationOptions, j as SpanOptions, ji as MixedTracingError, jn as AssertionLabelEvidence, jr as ExperimentsClient, jt as BitfabAgentMiddleware, k as SpanMethodDecorator, ki as SpanNodeMeta, kn as AssertionGenerationTimeoutError, kr as ExperimentTally, kt as OrganizationMembersClient, l as defineReplayRegistry, li as Category, ln as TraceLabels, lr as TraceSearchFilters, lt as DbBranchOptions, m as __version__, mi as CodeChangeFile, mn as VerdictEvidence, mr as TracesClient, mt as ReplayItem, n as ReplayRegistration, ni as VercelGenerateResult, nn as LabelOutcome, nr as ScenarioRecordInput, nt as RivetContextLike, o as ReseedRegistryResult, oi as AssertionCategory, on as LabelUpdate, or as TraceAssertionSource, ot as AdaptContext, p as DEFAULT_SERVICE_URL, pi as CapturedSpan, pn as VerdictConfidence, pr as TraceTargetOccurrence, pt as ReplayExperiment, q as BitfabOpenAITracingProcessor, qi as Justification, qn as ScenarioActualOutcome, qr as RemoveDatasetTracesResult, qt as ArchiveLabelTarget, r as ReplayRegistry, ri as VercelStreamResult, rn as LabelSource, rr as ScenarioSource, rt as RivetEffectType, s as SeedCase, si as AssertionCategorySummary, sn as LabelsClient, sr as TraceAssertionsResult, st as AdaptInputsFn, t as ReplayOptionsFactory, ti as VercelCallParams, tn as LabelConfidence, tr as ScenarioRecord, tt as BitfabRivetIntegration, u as reseedFromRegistry, ui as CategorySummary, un as TraceVerdicts, ur as TraceSearchParams, ut as DbBranchReplayError, v as BitfabFunction, vi as SpanType, vn as VerdictStatus, vr as ExperimentJitter, vt as ReplayProgress, w as NodeOptions, wi as MockOverrideInput, wn as AssertionCodeDraft, wr as ExperimentSummary, wt as ReplayInterrupt, x as CurrentTrace, xi as DbBranchTimings, xn as VerdictsClient, xr as ExperimentRollupResult, xt as TraceIngestionType, y as CaptureWhen, yi as TokenUsage, yn as VerdictTarget, yr as ExperimentPage, yt as ReplayProgressItem, z as WrapOpenAITranscriptionsOptions, zi as SelectiveReplayReport, zn as SaveAssertionsParams, zr as GraderRerun, zt as GraderLabelOutcome } from "./index-Dx3MwCB4.cjs";
|
|
2
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, type ArchiveVerdictTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionCode, type AssertionCodeDraft, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionKind, type AssertionLabelEvidence, type AssertionRewrite, type AssertionRewriteStatus, type AssertionVerdict, type AssertionVerdictEvidence, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, type BitfabAgentMiddleware, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, type BitfabLangGraphAgent, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabPiIntegration, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, CategoriesClient, type Category, type CategorySummary, 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 Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentSummary, type ExperimentSummaryBeforeAfter, type ExperimentSummaryExampleTrace, type ExperimentSummaryFacts, type ExperimentSummaryResult, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GenerateScenarioOptions, type GetGraderLabelsParams, type GetGraderVerdictsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, type GraderVerdict, type GraderVerdictOutcome, type GraderVerdictSource, type GraderVerdictUpdate, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type HumanVerdictOutcome, type HumanVerdictUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type PassFailVerdict, type PiIntegrationOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, type ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, 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 SaveCategoryParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type SavedTraceAssertion, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioCreationStatus, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioDataSources, type ScenarioGeneration, type ScenarioHistoryEntry, type ScenarioRecord, type ScenarioRecordInput, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, type TraceVerdicts, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type Verdict, type VerdictAction, type VerdictConfidence, type VerdictEvidence, type VerdictEvidenceItem, type VerdictOutcome, type VerdictSource, type VerdictStatus, type VerdictTarget, type VerdictUpdate, VerdictsClient, type WrapAnthropicOptions, type WrapBAMLOptions, type WrapGeminiOptions, type WrapJevOptions, type WrapOpenAIChatOptions, type WrapOpenAIEmbeddingsOptions, type WrapOpenAIResponsesOptions, type WrapOpenAITranscriptionsOptions, type WrapOpenRouterOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, type ArchiveVerdictTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionCode, type AssertionCodeDraft, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionKind, type AssertionLabelEvidence, type AssertionRewrite, type AssertionRewriteStatus, type AssertionVerdict, type AssertionVerdictEvidence, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, type BitfabAgentMiddleware, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, type BitfabLangGraphAgent, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabPiIntegration, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, CategoriesClient, type Category, type CategorySummary, 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 Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentSummary, type ExperimentSummaryBeforeAfter, type ExperimentSummaryExampleTrace, type ExperimentSummaryFacts, type ExperimentSummaryResult, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GenerateScenarioOptions, type GetGraderLabelsParams, type GetGraderVerdictsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, type GraderVerdict, type GraderVerdictOutcome, type GraderVerdictSource, type GraderVerdictUpdate, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type HumanVerdictOutcome, type HumanVerdictUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type PassFailVerdict, type PiIntegrationOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, type ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, 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 SaveCategoryParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type SavedTraceAssertion, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioCreationStatus, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioDataSources, type ScenarioGeneration, type ScenarioHistoryEntry, type ScenarioRecord, type ScenarioRecordInput, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, type TraceVerdicts, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type Verdict, type VerdictAction, type VerdictConfidence, type VerdictOutcome, type VerdictSource, type VerdictStatus, type VerdictTarget, type VerdictUpdate, VerdictsClient, type WrapAnthropicOptions, type WrapBAMLOptions, type WrapJevOptions, type WrapOpenAIResponsesOptions, type WrapOpenRouterOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
|
1
|
+
import { $ as SpanListResult, $n as ScenarioGeneration, $r as BitfabLanguageModelMiddleware, $t as HumanVerdictUpdate, A as SpanMethodDecoratorContext, Ai as BitfabError, An as AssertionKind, Ar as ExperimentTotals, At as BitfabOpenAIAgentHandler, B as WrapOpenRouterOptions, Bi as AllowedEnvVars, Bn as SaveScenarioActualOutcome, Br as GraderRerunError, Bt as GraderLabelSource, C as NodeMethodDecorator, Ci as MockOverrideCtx, Cn as AssertionCode, Cr as ExperimentStatus, Ct as serializeReplayResult, D as SeedCaseOptions, Di as NO_MOCK_OVERRIDE, Dn as AssertionGenerationError, Dr as ExperimentSummaryFacts, Dt as PiIntegrationOptions, E as ReseedResult, Ei as MockValue, En as AssertionGeneration, Er as ExperimentSummaryExampleTrace, Et as BitfabPiIntegration, F as WrapJevOptions, Fi as SUPPORTED_PROVIDERS, Fn as GenerateAssertionsOptions, Fr as Dataset, Ft as BitfabLangGraphCallbackHandler, G as CaptureSurface, Gi as Approver, Gn as Scenario, Gr as ListDatasetsParams, Gt as GraderVerdictUpdate, H as getCurrentReplayBranch, Hi as ProviderDefinition, Hn as SaveScenarioHistoryEntry, Hr as GraderRerunResult, Ht as GraderVerdict, I as WrapOpenAIChatOptions, Ii as ReplayNodeIdentity, In as GenerateScenarioOptions, Ir as DatasetGraderRef, It as GetGraderLabelsParams, J as TraceResponse, Ji as JustificationSpan, Jn as ScenarioCreationStatus, Jr as RerunGradersOptions, Jt as ArchiveVerdictTarget, K as ActiveSpanContext, Ki as Assignee, Kn as ScenarioAction, Kr as RemoveDatasetGradersResult, Kt as GradersClient, L as WrapOpenAIEmbeddingsOptions, Li as SelectiveReplayDecision, Ln as SaveAssertion, Lr as DatasetTraceIds, Lt as GetGraderVerdictsParams, M as WrapAnthropicOptions, Mi as DbSnapshotConfig, Mn as AssertionRewrite, Mr as ListExperimentsParams, Mt as BitfabLangGraphAgent, N as WrapBAMLOptions, Ni as DbSnapshotProvider, Nn as AssertionRewriteStatus, Nr as AddDatasetGradersResult, Nt as BitfabLangGraphIntegration, O as SeedRunOptions, Oi as NodeMatcher, On as AssertionGenerationStatus, Or as ExperimentSummaryResult, Ot as OrganizationMember, P as WrapGeminiOptions, Pi as DbSnapshotRef, Pn as AssertionVerdictEvidence, Pr as AddDatasetTracesResult, Pt as LangGraphIntegrationOptions, Q as SpanListParams, Qn as ScenarioDataSources, Qr as UpdateDatasetParams, Qt as HumanVerdictOutcome, R as WrapOpenAIResponsesOptions, Ri as SelectiveReplayOptions, Rn as SaveAssertionsAllParams, Rr as DatasetsClient, Rt as GraderLabel, S as DetachedTrace, Si as MockOverride, Sn as ArchiveAssertionsParams, Sr as ExperimentRunBy, St as reportReplayProgress, T as ReseedOptions, Ti as MockOverrideResolver, Tn as AssertionEvidenceParameter, Tr as ExperimentSummaryBeforeAfter, Tt as ReplayInterruptSignal, U as getCurrentSpan, Ui as ApprovalFields, Un as SaveScenarioParams, Ur as GraderRerunStatus, Ut as GraderVerdictOutcome, V as WrappedBamlFn, Vi as BamlExecutionResult, Vn as SaveScenarioData, Vr as GraderRerunProgress, Vt as GraderLabelUpdate, W as getCurrentTrace, Wi as ApprovalState, Wn as SavedTraceAssertion, Wr as GraderRerunTimeoutError, Wt as GraderVerdictSource, X as ListedSpan, Xn as ScenarioDataAppend, Xr as SaveDatasetParams, Xt as HumanLabelOutcome, Y as TracingProcessor, Yn as ScenarioData, Yr as RerunGradersResult, Yt as AssertionVerdict, Z as SpanListField, Zn as ScenarioDataOrigin, Zr as SaveDatasetResult, Zt as HumanLabelUpdate, _ as BitfabConfig, _i as SpanOccurrence, _n as VerdictSource, _r as ExperimentCodeChangeTotals, _t as ReplayOptions, a as ReplayRegistryOptions, ai as AssertionCategoriesClient, an as LabelTarget, ar as TraceAssertion, at as ReplayBranch, b as CurrentSpan, bi as flushTraces, bn as VerdictUpdate, br as ExperimentRollup, bt as ReplayResult, c as SeedResult, ci as CategoriesClient, cn as PassFailVerdict, cr as TraceAssertionsUpdate, ct as BITFAB_PROGRESS_PREFIX, d as seedFromRegistry, di as SaveAssertionCategoryParams, dn as Verdict, dr as TraceSearchResult, dt as MockStrategy, ei as BitfabVercelAiHandler, en as LabelAction, er as ScenarioHistoryEntry, et as SpansClient, f as finalizers, fi as SaveCategoryParams, fn as VerdictAction, fr as TraceTarget, ft as ReplayError, g as Bitfab, gi as SpanLookup, gn as VerdictOutcome, gr as ExperimentCategoryTally, gt as ReplayItemStartProgress, h as CommitRef, hi as HttpClient, hn as VerdictEvidenceItem, hr as Experiment, ht as ReplayItemFinishProgress, i as ReplayRegistryContext, ii as BitfabClaudeAgentHandler, in as LabelStatus, ir as ScenarioTrigger, it as RivetIntegrationOptions, j as SpanOptions, ji as MixedTracingError, jn as AssertionLabelEvidence, jr as ExperimentsClient, jt as BitfabAgentMiddleware, k as SpanMethodDecorator, ki as SpanNodeMeta, kn as AssertionGenerationTimeoutError, kr as ExperimentTally, kt as OrganizationMembersClient, l as defineReplayRegistry, li as Category, ln as TraceLabels, lr as TraceSearchFilters, lt as DbBranchOptions, m as __version__, mi as CodeChangeFile, mn as VerdictEvidence, mr as TracesClient, mt as ReplayItem, n as ReplayRegistration, ni as VercelGenerateResult, nn as LabelOutcome, nr as ScenarioRecordInput, nt as RivetContextLike, o as ReseedRegistryResult, oi as AssertionCategory, on as LabelUpdate, or as TraceAssertionSource, ot as AdaptContext, p as DEFAULT_SERVICE_URL, pi as CapturedSpan, pn as VerdictConfidence, pr as TraceTargetOccurrence, pt as ReplayExperiment, q as BitfabOpenAITracingProcessor, qi as Justification, qn as ScenarioActualOutcome, qr as RemoveDatasetTracesResult, qt as ArchiveLabelTarget, r as ReplayRegistry, ri as VercelStreamResult, rn as LabelSource, rr as ScenarioSource, rt as RivetEffectType, s as SeedCase, si as AssertionCategorySummary, sn as LabelsClient, sr as TraceAssertionsResult, st as AdaptInputsFn, t as ReplayOptionsFactory, ti as VercelCallParams, tn as LabelConfidence, tr as ScenarioRecord, tt as BitfabRivetIntegration, u as reseedFromRegistry, ui as CategorySummary, un as TraceVerdicts, ur as TraceSearchParams, ut as DbBranchReplayError, v as BitfabFunction, vi as SpanType, vn as VerdictStatus, vr as ExperimentJitter, vt as ReplayProgress, w as NodeOptions, wi as MockOverrideInput, wn as AssertionCodeDraft, wr as ExperimentSummary, wt as ReplayInterrupt, x as CurrentTrace, xi as DbBranchTimings, xn as VerdictsClient, xr as ExperimentRollupResult, xt as TraceIngestionType, y as CaptureWhen, yi as TokenUsage, yn as VerdictTarget, yr as ExperimentPage, yt as ReplayProgressItem, z as WrapOpenAITranscriptionsOptions, zi as SelectiveReplayReport, zn as SaveAssertionsParams, zr as GraderRerun, zt as GraderLabelOutcome } from "./index-Dx3MwCB4.js";
|
|
2
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, type ArchiveVerdictTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionCode, type AssertionCodeDraft, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionKind, type AssertionLabelEvidence, type AssertionRewrite, type AssertionRewriteStatus, type AssertionVerdict, type AssertionVerdictEvidence, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, type BitfabAgentMiddleware, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, type BitfabLangGraphAgent, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabPiIntegration, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, CategoriesClient, type Category, type CategorySummary, 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 Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentSummary, type ExperimentSummaryBeforeAfter, type ExperimentSummaryExampleTrace, type ExperimentSummaryFacts, type ExperimentSummaryResult, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GenerateScenarioOptions, type GetGraderLabelsParams, type GetGraderVerdictsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, type GraderVerdict, type GraderVerdictOutcome, type GraderVerdictSource, type GraderVerdictUpdate, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type HumanVerdictOutcome, type HumanVerdictUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type PassFailVerdict, type PiIntegrationOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, type ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, 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 SaveCategoryParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type SavedTraceAssertion, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioCreationStatus, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioDataSources, type ScenarioGeneration, type ScenarioHistoryEntry, type ScenarioRecord, type ScenarioRecordInput, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, type TraceVerdicts, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type Verdict, type VerdictAction, type VerdictConfidence, type VerdictEvidence, type VerdictEvidenceItem, type VerdictOutcome, type VerdictSource, type VerdictStatus, type VerdictTarget, type VerdictUpdate, VerdictsClient, type WrapAnthropicOptions, type WrapBAMLOptions, type WrapGeminiOptions, type WrapJevOptions, type WrapOpenAIChatOptions, type WrapOpenAIEmbeddingsOptions, type WrapOpenAIResponsesOptions, type WrapOpenAITranscriptionsOptions, type WrapOpenRouterOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as VerdictsClient, C as OrganizationMembersClient, D as BitfabLangGraphCallbackHandler, E as BitfabLangGraphIntegration, F as GraderRerunTimeoutError, I as BitfabClaudeAgentHandler, L as DEFAULT_SERVICE_URL, M as SUPPORTED_PROVIDERS, N as DatasetsClient, O as GradersClient, P as GraderRerunError, R as AssertionCategoriesClient, S as BitfabPiIntegration, T as NO_MOCK_OVERRIDE, _ as BITFAB_PROGRESS_PREFIX, a as Bitfab, b as reportReplayProgress, c as getCurrentSpan, d as BitfabOpenAITracingProcessor, f as AssertionGenerationError, g as BitfabRivetIntegration, h as SpansClient, i as finalizers, j as ExperimentsClient, k as LabelsClient, l as getCurrentTrace, m as TracesClient, n as reseedFromRegistry, o as BitfabFunction, p as AssertionGenerationTimeoutError, r as seedFromRegistry, s as getCurrentReplayBranch, t as defineReplayRegistry, u as BitfabVercelAiHandler, v as DbBranchReplayError, w as BitfabOpenAIAgentHandler, x as serializeReplayResult, y as ReplayError, z as CategoriesClient } from "./src-
|
|
2
|
-
import { C as BitfabError, E as __version__, i as flushTraces, t as HttpClient, w as MixedTracingError } from "./http-
|
|
1
|
+
import { A as VerdictsClient, C as OrganizationMembersClient, D as BitfabLangGraphCallbackHandler, E as BitfabLangGraphIntegration, F as GraderRerunTimeoutError, I as BitfabClaudeAgentHandler, L as DEFAULT_SERVICE_URL, M as SUPPORTED_PROVIDERS, N as DatasetsClient, O as GradersClient, P as GraderRerunError, R as AssertionCategoriesClient, S as BitfabPiIntegration, T as NO_MOCK_OVERRIDE, _ as BITFAB_PROGRESS_PREFIX, a as Bitfab, b as reportReplayProgress, c as getCurrentSpan, d as BitfabOpenAITracingProcessor, f as AssertionGenerationError, g as BitfabRivetIntegration, h as SpansClient, i as finalizers, j as ExperimentsClient, k as LabelsClient, l as getCurrentTrace, m as TracesClient, n as reseedFromRegistry, o as BitfabFunction, p as AssertionGenerationTimeoutError, r as seedFromRegistry, s as getCurrentReplayBranch, t as defineReplayRegistry, u as BitfabVercelAiHandler, v as DbBranchReplayError, w as BitfabOpenAIAgentHandler, x as serializeReplayResult, y as ReplayError, z as CategoriesClient } from "./src-CFD_cP43.js";
|
|
2
|
+
import { C as BitfabError, E as __version__, i as flushTraces, t as HttpClient, w as MixedTracingError } from "./http-DeWpv44r.js";
|
|
3
3
|
export { AssertionCategoriesClient, AssertionGenerationError, AssertionGenerationTimeoutError, BITFAB_PROGRESS_PREFIX, Bitfab, BitfabClaudeAgentHandler, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabPiIntegration, BitfabRivetIntegration, BitfabVercelAiHandler, CategoriesClient, DEFAULT_SERVICE_URL, DatasetsClient, DbBranchReplayError, ExperimentsClient, GraderRerunError, GraderRerunTimeoutError, GradersClient, HttpClient, LabelsClient, MixedTracingError, NO_MOCK_OVERRIDE, OrganizationMembersClient, ReplayError, SUPPORTED_PROVIDERS, SpansClient, TracesClient, VerdictsClient, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/node.cjs
CHANGED
|
@@ -2,9 +2,9 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_src = require("./src-
|
|
6
|
-
const require_http = require("./http-
|
|
7
|
-
const require_autoTrace = require("./autoTrace-
|
|
5
|
+
const require_src = require("./src-CxsswRYd.cjs");
|
|
6
|
+
const require_http = require("./http-CWOvmnGL.cjs");
|
|
7
|
+
const require_autoTrace = require("./autoTrace-pZKu5Nk2.cjs");
|
|
8
8
|
let async_hooks = require("async_hooks");
|
|
9
9
|
//#region src/asyncStorageNode.ts
|
|
10
10
|
require_autoTrace.registerAsyncLocalStorageClass(async_hooks.AsyncLocalStorage);
|