@bitfab/sdk 0.75.0 → 0.76.1
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-Cotx6kLL.js → http-DS1QjBvx.js} +3 -3
- package/dist/{http-Cotx6kLL.js.map → http-DS1QjBvx.js.map} +1 -1
- package/dist/{http-BkL24D7v.cjs → http-ykHGNcju.cjs} +3 -3
- package/dist/{http-BkL24D7v.cjs.map → http-ykHGNcju.cjs.map} +1 -1
- package/dist/{index-V6ECPulQ.d.cts → index-BYv4DSsY.d.cts} +286 -17
- package/dist/{index-V6ECPulQ.d.ts → index-BYv4DSsY.d.ts} +286 -17
- 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-CrV0INwT.js → src-BJjbR3Nq.js} +72 -34
- package/dist/src-BJjbR3Nq.js.map +1 -0
- package/dist/{src-BJ5a-chk.cjs → src-CLkegn-P.cjs} +78 -40
- package/dist/src-CLkegn-P.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-BJ5a-chk.cjs.map +0 -1
- package/dist/src-CrV0INwT.js.map +0 -1
|
@@ -4123,6 +4123,22 @@ interface WrapOpenAIResponsesOptions<TResponse> {
|
|
|
4123
4123
|
/** Called after each call with the OpenAI response, for the caller's own usage or cost reporting. */
|
|
4124
4124
|
onResponse?: (response: TResponse) => void;
|
|
4125
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
|
+
}
|
|
4126
4142
|
interface WrapBAMLOptions {
|
|
4127
4143
|
/** Called after each BAML invocation with the Collector instance. */
|
|
4128
4144
|
onCollector?: (collector: unknown) => void;
|
|
@@ -4143,6 +4159,13 @@ interface CurrentSpan {
|
|
|
4143
4159
|
readonly id: string;
|
|
4144
4160
|
/** The trace ID for the current span. */
|
|
4145
4161
|
readonly traceId: string;
|
|
4162
|
+
/**
|
|
4163
|
+
* The keys of every trace function running at this point, outermost first,
|
|
4164
|
+
* each listed once. A trace function called inside another one comes after
|
|
4165
|
+
* it, including a `withTrace` root that started its own trace, so a cost
|
|
4166
|
+
* recorded here can be counted toward each of them. Empty outside a trace.
|
|
4167
|
+
*/
|
|
4168
|
+
readonly traceFunctionKeys: readonly string[];
|
|
4146
4169
|
/**
|
|
4147
4170
|
* Add a context entry to this span. Each call appends to the contexts array.
|
|
4148
4171
|
* Context entries are stored in span_data.contexts as [{key, value}, ...].
|
|
@@ -4194,6 +4217,14 @@ interface DetachedTrace {
|
|
|
4194
4217
|
* A handle to the current active trace, allowing trace-level context to be set.
|
|
4195
4218
|
*/
|
|
4196
4219
|
interface CurrentTrace {
|
|
4220
|
+
/**
|
|
4221
|
+
* The key of the trace function the current trace is stored under: the one
|
|
4222
|
+
* that started it. A `withSpan` or `getFunction` call inside another trace
|
|
4223
|
+
* function joins that trace, so it reports the outer key. A `withTrace` root
|
|
4224
|
+
* inside another root starts its own trace, so it reports its own key. Empty
|
|
4225
|
+
* string outside a trace.
|
|
4226
|
+
*/
|
|
4227
|
+
readonly traceFunctionKey: string;
|
|
4197
4228
|
/**
|
|
4198
4229
|
* Set the session ID for this trace. Stored in the database session_id column.
|
|
4199
4230
|
*/
|
|
@@ -4221,6 +4252,14 @@ interface CurrentTrace {
|
|
|
4221
4252
|
*/
|
|
4222
4253
|
drop(): void;
|
|
4223
4254
|
}
|
|
4255
|
+
/**
|
|
4256
|
+
* Get a handle to the current active span.
|
|
4257
|
+
*
|
|
4258
|
+
* Call this from inside a traced function (wrapped with `withSpan`) to get
|
|
4259
|
+
* a span handle that allows adding context at runtime.
|
|
4260
|
+
*
|
|
4261
|
+
* Returns a no-op object if called outside of a span context (methods do nothing).
|
|
4262
|
+
*/
|
|
4224
4263
|
declare function getCurrentSpan(): CurrentSpan;
|
|
4225
4264
|
/**
|
|
4226
4265
|
* Get the database branch the current replay item is running against.
|
|
@@ -4386,6 +4425,9 @@ interface SpanOptions {
|
|
|
4386
4425
|
* For an async-generator result, `finalize` receives the array of yielded
|
|
4387
4426
|
* values once iteration completes, and its return is recorded instead of
|
|
4388
4427
|
* the default `{ yielded, return }`.
|
|
4428
|
+
*
|
|
4429
|
+
* On a node placed directly on a streamed LLM client call, `finalize` is not
|
|
4430
|
+
* used: the span records the assembled stream and its usage instead.
|
|
4389
4431
|
*/
|
|
4390
4432
|
finalize?: (result: any) => unknown | Promise<unknown>;
|
|
4391
4433
|
}
|
|
@@ -4433,6 +4475,13 @@ interface TraceOptions {
|
|
|
4433
4475
|
mockOnReplayDefault?: boolean;
|
|
4434
4476
|
/** Maximum number of recorded descendant levels. Defaults to 30. */
|
|
4435
4477
|
maxDepth?: number;
|
|
4478
|
+
/**
|
|
4479
|
+
* Maximum number of automatically captured descendant spans. Defaults to
|
|
4480
|
+
* 500. Declared nodes and LLM calls (BAML, Jev, and the provider client
|
|
4481
|
+
* calls the build transform records) do not count toward it and are still
|
|
4482
|
+
* recorded past it, so the trace's token usage and cost stay complete;
|
|
4483
|
+
* `maxDepth` still applies to them.
|
|
4484
|
+
*/
|
|
4436
4485
|
maxCapturedSubtreeSpans?: number;
|
|
4437
4486
|
/** Qualified or simple function names to leave out of the subtree. */
|
|
4438
4487
|
exclude?: readonly string[] | ReadonlySet<string>;
|
|
@@ -4862,11 +4911,14 @@ declare class Bitfab {
|
|
|
4862
4911
|
* `cachedInputTokens`, `reasoningTokens`, `costUsd` (OpenRouter's
|
|
4863
4912
|
* `usage.cost`), and `durationMs`; fields the response omits are left out.
|
|
4864
4913
|
*
|
|
4865
|
-
* Beneath a `withTrace()` root, each `.chat.completions.create(...)`
|
|
4866
|
-
* code compiled by the build
|
|
4867
|
-
*
|
|
4868
|
-
*
|
|
4869
|
-
*
|
|
4914
|
+
* Beneath a `withTrace()` root, each `.chat.completions.create(...)` and
|
|
4915
|
+
* `.chat.completions.parse(...)` call in code compiled by the build
|
|
4916
|
+
* transform, on a client whose base URL is `openrouter.ai`, is recorded
|
|
4917
|
+
* without this wrapper as its own `llm` span, and a `wrapOpenRouter` around
|
|
4918
|
+
* such a call records nothing more. Beneath a root, streamed calls
|
|
4919
|
+
* (`stream: true` or `.chat.completions.stream(...)`) are recorded too, when
|
|
4920
|
+
* the stream finishes; the wrapper itself never records a stream. For a
|
|
4921
|
+
* client on any other base URL, use `wrapOpenAIChat`.
|
|
4870
4922
|
*
|
|
4871
4923
|
* ```typescript
|
|
4872
4924
|
* const openai = new OpenAI({ baseURL: "https://openrouter.ai/api/v1", apiKey })
|
|
@@ -4899,11 +4951,13 @@ declare class Bitfab {
|
|
|
4899
4951
|
* `outputTokens`, `cachedInputTokens` (cache reads), and `durationMs`;
|
|
4900
4952
|
* fields the response omits are left out.
|
|
4901
4953
|
*
|
|
4902
|
-
* Beneath a `withTrace()` root, each `.messages.create(...)`
|
|
4903
|
-
* `@anthropic-ai/sdk` client in code
|
|
4904
|
-
* recorded without this wrapper as its
|
|
4905
|
-
* `wrapAnthropic` around such a call records nothing
|
|
4906
|
-
* (`stream: true`
|
|
4954
|
+
* Beneath a `withTrace()` root, each `.messages.create(...)` and
|
|
4955
|
+
* `.messages.parse(...)` call on an `@anthropic-ai/sdk` client in code
|
|
4956
|
+
* compiled by the build transform is recorded without this wrapper as its
|
|
4957
|
+
* own `llm` span, and a `wrapAnthropic` around such a call records nothing
|
|
4958
|
+
* more. Beneath a root, streamed calls (`stream: true` or
|
|
4959
|
+
* `.messages.stream(...)`) are recorded too, when the stream finishes; the
|
|
4960
|
+
* wrapper itself never records a stream.
|
|
4907
4961
|
*
|
|
4908
4962
|
* ```typescript
|
|
4909
4963
|
* const anthropic = new Anthropic()
|
|
@@ -4937,11 +4991,13 @@ declare class Bitfab {
|
|
|
4937
4991
|
* when the response reports `usage.cost`), and `durationMs`; fields the
|
|
4938
4992
|
* response omits are left out.
|
|
4939
4993
|
*
|
|
4940
|
-
* Beneath a `withTrace()` root, each `.responses.create(...)`
|
|
4941
|
-
* `openai` client in code compiled by the
|
|
4942
|
-
* without this wrapper as its own `llm` span,
|
|
4943
|
-
* around such a call records nothing more.
|
|
4944
|
-
*
|
|
4994
|
+
* Beneath a `withTrace()` root, each `.responses.create(...)` and
|
|
4995
|
+
* `.responses.parse(...)` call on an `openai` client in code compiled by the
|
|
4996
|
+
* build transform is recorded without this wrapper as its own `llm` span,
|
|
4997
|
+
* and a `wrapOpenAIResponses` around such a call records nothing more.
|
|
4998
|
+
* Beneath a root, streamed calls (`stream: true` or
|
|
4999
|
+
* `.responses.stream(...)`) are recorded too, when the stream finishes; the
|
|
5000
|
+
* wrapper itself never records a stream.
|
|
4945
5001
|
*
|
|
4946
5002
|
* ```typescript
|
|
4947
5003
|
* const openai = new OpenAI()
|
|
@@ -4956,6 +5012,167 @@ declare class Bitfab {
|
|
|
4956
5012
|
* @returns An async function with the same signature that records each call
|
|
4957
5013
|
*/
|
|
4958
5014
|
wrapOpenAIResponses<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIResponsesOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5015
|
+
/**
|
|
5016
|
+
* Wrap a function that sends a chat completion to the OpenAI API, or to any
|
|
5017
|
+
* OpenAI-compatible base URL other than OpenRouter, to record the call's
|
|
5018
|
+
* prompt, model, token usage, and duration. Bitfab works out the cost from
|
|
5019
|
+
* the model and token counts.
|
|
5020
|
+
*
|
|
5021
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5022
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5023
|
+
* function. The wrapped function must return the chat completion, as
|
|
5024
|
+
* `openai.chat.completions.create` and `openai.chat.completions.parse` do.
|
|
5025
|
+
* When its first argument is the request, the request's messages become the
|
|
5026
|
+
* span's prompt. One context entry holds `provider` (`"openai"`), `model`,
|
|
5027
|
+
* `upstreamProvider`, `inputTokens`, `outputTokens`, `cachedInputTokens`,
|
|
5028
|
+
* `reasoningTokens`,
|
|
5029
|
+
* `costUsd` (only when the response reports `usage.cost`), and
|
|
5030
|
+
* `durationMs`; fields the response omits are left out.
|
|
5031
|
+
*
|
|
5032
|
+
* Beneath a `withTrace()` root, each `.chat.completions.create(...)` and
|
|
5033
|
+
* `.chat.completions.parse(...)` call on an `openai` client in code
|
|
5034
|
+
* compiled by the build transform is recorded without this wrapper as its
|
|
5035
|
+
* own `llm` span, and a `wrapOpenAIChat` around such a call records nothing
|
|
5036
|
+
* more. Beneath a root, streamed calls (`stream: true` or
|
|
5037
|
+
* `.chat.completions.stream(...)`) are recorded too, when the stream
|
|
5038
|
+
* finishes, and carry usage only when the request sets
|
|
5039
|
+
* `stream_options: { include_usage: true }`; the wrapper itself never
|
|
5040
|
+
* records a stream.
|
|
5041
|
+
*
|
|
5042
|
+
* ```typescript
|
|
5043
|
+
* const openai = new OpenAI()
|
|
5044
|
+
* const complete = client.wrapOpenAIChat(
|
|
5045
|
+
* openai.chat.completions.create.bind(openai.chat.completions),
|
|
5046
|
+
* )
|
|
5047
|
+
* const response = await complete({
|
|
5048
|
+
* model: "gpt-5-mini",
|
|
5049
|
+
* messages: [{ role: "user", content: text }],
|
|
5050
|
+
* })
|
|
5051
|
+
* ```
|
|
5052
|
+
*
|
|
5053
|
+
* @param method - A named function that sends the request and returns the chat completion
|
|
5054
|
+
* @param options - `onResponse` is called with each chat completion after it is recorded
|
|
5055
|
+
* @returns An async function with the same signature that records each call
|
|
5056
|
+
*/
|
|
5057
|
+
wrapOpenAIChat<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIChatOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5058
|
+
/**
|
|
5059
|
+
* Wrap a function that sends a request to the OpenAI Embeddings API to
|
|
5060
|
+
* record the call's input, model, token usage, and duration. Bitfab works
|
|
5061
|
+
* out the cost from the model and token counts.
|
|
5062
|
+
*
|
|
5063
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5064
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5065
|
+
* function. The wrapped function must return the embedding list, as
|
|
5066
|
+
* `openai.embeddings.create` does. When its first argument is the request,
|
|
5067
|
+
* the request's `input` becomes the span's prompt. One context entry holds
|
|
5068
|
+
* `provider` (`"openai"`), `model`, `upstreamProvider`, `inputTokens`,
|
|
5069
|
+
* `outputTokens` (always 0), `costUsd` (only when the response reports
|
|
5070
|
+
* `usage.cost`), and `durationMs`; fields the response omits are left out.
|
|
5071
|
+
* The wrapper cannot see the client's base URL, so `provider` is
|
|
5072
|
+
* `"openai"` even for an OpenRouter client.
|
|
5073
|
+
*
|
|
5074
|
+
* Beneath a `withTrace()` root, each `.embeddings.create(...)` call on an
|
|
5075
|
+
* `openai` client in code compiled by the build transform is recorded
|
|
5076
|
+
* without this wrapper as its own `llm` span (with `provider`
|
|
5077
|
+
* `"openrouter"` when the client's base URL is `openrouter.ai`), and a
|
|
5078
|
+
* `wrapOpenAIEmbeddings` around such a call records nothing more.
|
|
5079
|
+
*
|
|
5080
|
+
* ```typescript
|
|
5081
|
+
* const openai = new OpenAI()
|
|
5082
|
+
* const embed = client.wrapOpenAIEmbeddings(
|
|
5083
|
+
* openai.embeddings.create.bind(openai.embeddings),
|
|
5084
|
+
* )
|
|
5085
|
+
* const embeddings = await embed({
|
|
5086
|
+
* model: "text-embedding-3-small",
|
|
5087
|
+
* input: text,
|
|
5088
|
+
* })
|
|
5089
|
+
* ```
|
|
5090
|
+
*
|
|
5091
|
+
* @param method - A named function that sends the request and returns the embedding list
|
|
5092
|
+
* @param options - `onResponse` is called with each embedding list after it is recorded
|
|
5093
|
+
* @returns An async function with the same signature that records each call
|
|
5094
|
+
*/
|
|
5095
|
+
wrapOpenAIEmbeddings<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIEmbeddingsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5096
|
+
/**
|
|
5097
|
+
* Wrap a function that sends a request to the OpenAI audio transcription
|
|
5098
|
+
* API to record the call's model, usage, and duration. Bitfab works out the
|
|
5099
|
+
* cost from the model and token counts, so models billed by duration, such
|
|
5100
|
+
* as `whisper-1`, record no cost.
|
|
5101
|
+
*
|
|
5102
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5103
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5104
|
+
* function. The wrapped function must return the transcription, as
|
|
5105
|
+
* `openai.audio.transcriptions.create` does. When its first argument is the
|
|
5106
|
+
* request, the request's `prompt` becomes the span's prompt. One context
|
|
5107
|
+
* entry holds `provider` (`"openai"`), `model`, `inputTokens` and
|
|
5108
|
+
* `outputTokens` (for models billed by token, such as `gpt-4o-transcribe`),
|
|
5109
|
+
* `audioSeconds` (for models billed by duration, such as `whisper-1`), and
|
|
5110
|
+
* `durationMs`; fields the response omits are left out.
|
|
5111
|
+
*
|
|
5112
|
+
* Beneath a `withTrace()` root, each `.audio.transcriptions.create(...)`
|
|
5113
|
+
* call on an `openai` client in code compiled by the build transform is
|
|
5114
|
+
* recorded without this wrapper as its own `llm` span, and a
|
|
5115
|
+
* `wrapOpenAITranscriptions` around such a call records nothing more.
|
|
5116
|
+
* Beneath a root, streamed calls (`stream: true`) are recorded too, when
|
|
5117
|
+
* the stream finishes; the wrapper itself never records a stream.
|
|
5118
|
+
*
|
|
5119
|
+
* ```typescript
|
|
5120
|
+
* const openai = new OpenAI()
|
|
5121
|
+
* const transcribe = client.wrapOpenAITranscriptions(
|
|
5122
|
+
* openai.audio.transcriptions.create.bind(openai.audio.transcriptions),
|
|
5123
|
+
* )
|
|
5124
|
+
* const transcription = await transcribe({
|
|
5125
|
+
* model: "gpt-4o-transcribe",
|
|
5126
|
+
* file: fs.createReadStream("call.mp3"),
|
|
5127
|
+
* })
|
|
5128
|
+
* ```
|
|
5129
|
+
*
|
|
5130
|
+
* @param method - A named function that sends the request and returns the transcription
|
|
5131
|
+
* @param options - `onResponse` is called with each transcription after it is recorded
|
|
5132
|
+
* @returns An async function with the same signature that records each call
|
|
5133
|
+
*/
|
|
5134
|
+
wrapOpenAITranscriptions<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAITranscriptionsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5135
|
+
/**
|
|
5136
|
+
* Wrap a function that sends a request to the Gemini API through
|
|
5137
|
+
* `@google/genai` to record the call's prompt, model, token usage, and
|
|
5138
|
+
* duration. Bitfab works out the cost from the model and token counts.
|
|
5139
|
+
*
|
|
5140
|
+
* Like `wrapOpenRouter`, it opens no span of its own. It writes into the
|
|
5141
|
+
* span that is current when the call starts, so call it inside a traced
|
|
5142
|
+
* function. The wrapped function must return the response, as
|
|
5143
|
+
* `ai.models.generateContent` does. When its first argument is the request,
|
|
5144
|
+
* the request's `config.systemInstruction` and `contents` become the span's
|
|
5145
|
+
* prompt. One context entry holds `provider` (`"gemini"`), `model` (the
|
|
5146
|
+
* response's `modelVersion`, else the requested model), `inputTokens`
|
|
5147
|
+
* (prompt and tool-use prompt tokens), `outputTokens` (candidate and
|
|
5148
|
+
* thinking tokens), `cachedInputTokens`, `reasoningTokens` (thinking
|
|
5149
|
+
* tokens), and `durationMs`; fields the response omits are left out.
|
|
5150
|
+
*
|
|
5151
|
+
* Beneath a `withTrace()` root, each `.models.generateContent(...)` call on
|
|
5152
|
+
* an `@google/genai` client in code compiled by the build transform is
|
|
5153
|
+
* recorded without this wrapper as its own `llm` span, and a `wrapGemini`
|
|
5154
|
+
* around such a call records nothing more. Beneath a root,
|
|
5155
|
+
* `.models.generateContentStream(...)` calls are recorded too, when the
|
|
5156
|
+
* stream finishes; the wrapper itself never records a stream.
|
|
5157
|
+
*
|
|
5158
|
+
* `ai.models.generateContent` has no function name of its own, so a wrapper
|
|
5159
|
+
* around an unnamed function is named `generateContent`, which is the name
|
|
5160
|
+
* `withNode` targets.
|
|
5161
|
+
*
|
|
5162
|
+
* ```typescript
|
|
5163
|
+
* const ai = new GoogleGenAI({ apiKey })
|
|
5164
|
+
* const generate = client.wrapGemini(ai.models.generateContent)
|
|
5165
|
+
* const response = await generate({
|
|
5166
|
+
* model: "gemini-2.5-flash",
|
|
5167
|
+
* contents: text,
|
|
5168
|
+
* })
|
|
5169
|
+
* ```
|
|
5170
|
+
*
|
|
5171
|
+
* @param method - A named function that sends the request and returns the response
|
|
5172
|
+
* @param options - `onResponse` is called with each response after it is recorded
|
|
5173
|
+
* @returns An async function with the same signature that records each call
|
|
5174
|
+
*/
|
|
5175
|
+
wrapGemini<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapGeminiOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
4959
5176
|
private wrapClientCall;
|
|
4960
5177
|
/**
|
|
4961
5178
|
* Wrap a function to automatically create a span for its inputs and outputs.
|
|
@@ -5405,6 +5622,58 @@ declare class BitfabFunction {
|
|
|
5405
5622
|
* @returns An async function with the same signature that records each call
|
|
5406
5623
|
*/
|
|
5407
5624
|
wrapOpenAIResponses<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIResponsesOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5625
|
+
/**
|
|
5626
|
+
* Wrap a function that sends a chat completion to the OpenAI API to record
|
|
5627
|
+
* the call's prompt, model, token usage, and duration. Delegates to the
|
|
5628
|
+
* parent client's wrapOpenAIChat method.
|
|
5629
|
+
*
|
|
5630
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5631
|
+
* own: it writes into the span that is current when the call starts.
|
|
5632
|
+
*
|
|
5633
|
+
* @param method - A named function that sends the request and returns the chat completion
|
|
5634
|
+
* @param options - `onResponse` is called with each chat completion after it is recorded
|
|
5635
|
+
* @returns An async function with the same signature that records each call
|
|
5636
|
+
*/
|
|
5637
|
+
wrapOpenAIChat<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIChatOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5638
|
+
/**
|
|
5639
|
+
* Wrap a function that sends a request to the OpenAI Embeddings API to
|
|
5640
|
+
* record the call's input, model, token usage, and duration. Delegates to
|
|
5641
|
+
* the parent client's wrapOpenAIEmbeddings method.
|
|
5642
|
+
*
|
|
5643
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5644
|
+
* own: it writes into the span that is current when the call starts.
|
|
5645
|
+
*
|
|
5646
|
+
* @param method - A named function that sends the request and returns the embedding list
|
|
5647
|
+
* @param options - `onResponse` is called with each embedding list after it is recorded
|
|
5648
|
+
* @returns An async function with the same signature that records each call
|
|
5649
|
+
*/
|
|
5650
|
+
wrapOpenAIEmbeddings<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAIEmbeddingsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5651
|
+
/**
|
|
5652
|
+
* Wrap a function that sends a request to the OpenAI audio transcription
|
|
5653
|
+
* API to record the call's model, usage, and duration. Delegates to the
|
|
5654
|
+
* parent client's wrapOpenAITranscriptions method.
|
|
5655
|
+
*
|
|
5656
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5657
|
+
* own: it writes into the span that is current when the call starts.
|
|
5658
|
+
*
|
|
5659
|
+
* @param method - A named function that sends the request and returns the transcription
|
|
5660
|
+
* @param options - `onResponse` is called with each transcription after it is recorded
|
|
5661
|
+
* @returns An async function with the same signature that records each call
|
|
5662
|
+
*/
|
|
5663
|
+
wrapOpenAITranscriptions<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapOpenAITranscriptionsOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5664
|
+
/**
|
|
5665
|
+
* Wrap a function that sends a request to the Gemini API to record the
|
|
5666
|
+
* call's prompt, model, token usage, and duration. Delegates to the parent
|
|
5667
|
+
* client's wrapGemini method.
|
|
5668
|
+
*
|
|
5669
|
+
* Like `wrapJev`, it does not use the bound key and opens no span of its
|
|
5670
|
+
* own: it writes into the span that is current when the call starts.
|
|
5671
|
+
*
|
|
5672
|
+
* @param method - A named function that sends the request and returns the response
|
|
5673
|
+
* @param options - `onResponse` is called with each response after it is recorded
|
|
5674
|
+
* @returns An async function with the same signature that records each call
|
|
5675
|
+
*/
|
|
5676
|
+
wrapGemini<TArgs extends unknown[], TResponse>(method: (...args: TArgs) => TResponse | Promise<TResponse>, options?: WrapGeminiOptions<TResponse>): (...args: TArgs) => Promise<TResponse>;
|
|
5408
5677
|
}
|
|
5409
5678
|
//#endregion
|
|
5410
5679
|
//#region src/commitRef.d.ts
|
|
@@ -5425,7 +5694,7 @@ interface CommitRef {
|
|
|
5425
5694
|
/**
|
|
5426
5695
|
* SDK version from package.json (injected at build time)
|
|
5427
5696
|
*/
|
|
5428
|
-
declare const __version__ = "0.
|
|
5697
|
+
declare const __version__ = "0.76.1";
|
|
5429
5698
|
//#endregion
|
|
5430
5699
|
//#region src/constants.d.ts
|
|
5431
5700
|
/**
|
|
@@ -5567,4 +5836,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
5567
5836
|
run?: boolean;
|
|
5568
5837
|
}): Promise<SeedResult>;
|
|
5569
5838
|
//#endregion
|
|
5570
|
-
export {
|
|
5839
|
+
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-CLkegn-P.cjs");
|
|
6
|
+
const require_http = require("./http-ykHGNcju.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 VerdictEvidence, type VerdictEvidenceItem, 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-BYv4DSsY.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 VerdictEvidence, type VerdictEvidenceItem, 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-BYv4DSsY.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-BJjbR3Nq.js";
|
|
2
|
+
import { C as BitfabError, E as __version__, i as flushTraces, t as HttpClient, w as MixedTracingError } from "./http-DS1QjBvx.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-CLkegn-P.cjs");
|
|
6
|
+
const require_http = require("./http-ykHGNcju.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);
|