braintrust 3.30.0 → 3.31.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/dev/dist/index.d.mts +4 -1
- package/dev/dist/index.d.ts +4 -1
- package/dev/dist/index.js +28 -7
- package/dev/dist/index.mjs +28 -7
- package/dist/apply-auto-instrumentation.js +216 -216
- package/dist/apply-auto-instrumentation.mjs +1 -1
- package/dist/auto-instrumentations/bundler/next.cjs +9 -3
- package/dist/auto-instrumentations/bundler/next.mjs +9 -3
- package/dist/auto-instrumentations/hook.mjs +3 -1
- package/dist/browser.d.mts +481 -478
- package/dist/browser.d.ts +481 -478
- package/dist/browser.js +30 -9
- package/dist/browser.mjs +30 -9
- package/dist/{chunk-2XDW3UCG.js → chunk-4AQGZS6X.js} +1 -1
- package/dist/{chunk-BU6SM54N.mjs → chunk-AJT4FR25.mjs} +17 -6
- package/dist/{chunk-N3JKQ3D3.mjs → chunk-CE3BLB2L.mjs} +1 -1
- package/dist/{chunk-TWCDSYJN.js → chunk-V32LW47Z.js} +535 -524
- package/dist/cli.js +29 -8
- package/dist/edge-light.js +30 -9
- package/dist/edge-light.mjs +30 -9
- package/dist/index.d.mts +481 -478
- package/dist/index.d.ts +481 -478
- package/dist/index.js +460 -450
- package/dist/index.mjs +15 -5
- package/dist/instrumentation/index.js +17 -6
- package/dist/instrumentation/index.mjs +17 -6
- package/dist/vitest-evals-reporter.js +16 -16
- package/dist/vitest-evals-reporter.mjs +2 -2
- package/dist/workerd.js +30 -9
- package/dist/workerd.mjs +30 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
var
|
|
146
|
+
var _chunkV32LW47Zjs = require('./chunk-V32LW47Z.js');
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
@@ -177,160 +177,160 @@ var _chunkTWCDSYJNjs = require('./chunk-TWCDSYJN.js');
|
|
|
177
177
|
|
|
178
178
|
|
|
179
179
|
|
|
180
|
-
var
|
|
180
|
+
var _chunk4AQGZS6Xjs = require('./chunk-4AQGZS6X.js');
|
|
181
181
|
|
|
182
182
|
// src/exports.ts
|
|
183
183
|
var exports_exports = {};
|
|
184
|
-
|
|
185
|
-
Attachment: () =>
|
|
186
|
-
AttachmentReference: () =>
|
|
187
|
-
BAGGAGE_HEADER: () =>
|
|
188
|
-
BRAINTRUST_CURRENT_SPAN_STORE: () =>
|
|
189
|
-
BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME: () =>
|
|
190
|
-
BRAINTRUST_PARENT_KEY: () =>
|
|
191
|
-
BaseAttachment: () =>
|
|
184
|
+
_chunk4AQGZS6Xjs.__export.call(void 0, exports_exports, {
|
|
185
|
+
Attachment: () => _chunkV32LW47Zjs.Attachment,
|
|
186
|
+
AttachmentReference: () => _chunkV32LW47Zjs.AttachmentReference,
|
|
187
|
+
BAGGAGE_HEADER: () => _chunkV32LW47Zjs.BAGGAGE_HEADER,
|
|
188
|
+
BRAINTRUST_CURRENT_SPAN_STORE: () => _chunkV32LW47Zjs.BRAINTRUST_CURRENT_SPAN_STORE,
|
|
189
|
+
BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME: () => _chunkV32LW47Zjs.BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME,
|
|
190
|
+
BRAINTRUST_PARENT_KEY: () => _chunkV32LW47Zjs.BRAINTRUST_PARENT_KEY,
|
|
191
|
+
BaseAttachment: () => _chunkV32LW47Zjs.BaseAttachment,
|
|
192
192
|
BaseExperiment: () => BaseExperiment,
|
|
193
193
|
BatchScorer: () => BatchScorer,
|
|
194
194
|
BatchTask: () => BatchTask,
|
|
195
|
-
BraintrustLangChainCallbackHandler: () =>
|
|
195
|
+
BraintrustLangChainCallbackHandler: () => _chunkV32LW47Zjs.BraintrustLangChainCallbackHandler,
|
|
196
196
|
BraintrustMiddleware: () => BraintrustMiddleware,
|
|
197
|
-
BraintrustObservabilityExporter: () =>
|
|
198
|
-
BraintrustState: () =>
|
|
199
|
-
BraintrustStream: () =>
|
|
197
|
+
BraintrustObservabilityExporter: () => _chunkV32LW47Zjs.BraintrustObservabilityExporter,
|
|
198
|
+
BraintrustState: () => _chunkV32LW47Zjs.BraintrustState,
|
|
199
|
+
BraintrustStream: () => _chunkV32LW47Zjs.BraintrustStream,
|
|
200
200
|
CachedSpanFetcher: () => CachedSpanFetcher,
|
|
201
201
|
CodeFunction: () => CodeFunction,
|
|
202
202
|
CodePrompt: () => CodePrompt,
|
|
203
|
-
ContextManager: () =>
|
|
204
|
-
DEFAULT_FETCH_BATCH_SIZE: () =>
|
|
205
|
-
DEFAULT_MAX_REQUEST_SIZE: () =>
|
|
206
|
-
Dataset: () =>
|
|
203
|
+
ContextManager: () => _chunkV32LW47Zjs.ContextManager,
|
|
204
|
+
DEFAULT_FETCH_BATCH_SIZE: () => _chunkV32LW47Zjs.DEFAULT_FETCH_BATCH_SIZE,
|
|
205
|
+
DEFAULT_MAX_REQUEST_SIZE: () => _chunkV32LW47Zjs.DEFAULT_MAX_REQUEST_SIZE,
|
|
206
|
+
Dataset: () => _chunkV32LW47Zjs.Dataset,
|
|
207
207
|
DatasetPipeline: () => DatasetPipeline,
|
|
208
208
|
DurableEvalMemoryStore: () => DurableEvalMemoryStore,
|
|
209
209
|
DurableEvalRedisStore: () => DurableEvalRedisStore,
|
|
210
|
-
ERR_PERMALINK: () =>
|
|
210
|
+
ERR_PERMALINK: () => _chunkV32LW47Zjs.ERR_PERMALINK,
|
|
211
211
|
Eval: () => Eval,
|
|
212
212
|
EvalResultWithSummary: () => EvalResultWithSummary,
|
|
213
|
-
Experiment: () =>
|
|
214
|
-
ExternalAttachment: () =>
|
|
215
|
-
FailedHTTPResponse: () =>
|
|
216
|
-
IDGenerator: () =>
|
|
217
|
-
JSONAttachment: () =>
|
|
218
|
-
LEGACY_CACHED_HEADER: () =>
|
|
219
|
-
LOGS3_OVERFLOW_REFERENCE_TYPE: () =>
|
|
220
|
-
LazyValue: () =>
|
|
213
|
+
Experiment: () => _chunkV32LW47Zjs.Experiment,
|
|
214
|
+
ExternalAttachment: () => _chunkV32LW47Zjs.ExternalAttachment,
|
|
215
|
+
FailedHTTPResponse: () => _chunkV32LW47Zjs.FailedHTTPResponse,
|
|
216
|
+
IDGenerator: () => _chunkV32LW47Zjs.IDGenerator,
|
|
217
|
+
JSONAttachment: () => _chunkV32LW47Zjs.JSONAttachment,
|
|
218
|
+
LEGACY_CACHED_HEADER: () => _chunkV32LW47Zjs.LEGACY_CACHED_HEADER,
|
|
219
|
+
LOGS3_OVERFLOW_REFERENCE_TYPE: () => _chunkV32LW47Zjs.LOGS3_OVERFLOW_REFERENCE_TYPE,
|
|
220
|
+
LazyValue: () => _chunkV32LW47Zjs.LazyValue,
|
|
221
221
|
LocalTrace: () => LocalTrace,
|
|
222
|
-
Logger: () =>
|
|
223
|
-
LoginInvalidOrgError: () =>
|
|
224
|
-
NOOP_SPAN: () =>
|
|
225
|
-
NOOP_SPAN_PERMALINK: () =>
|
|
226
|
-
NoopSpan: () =>
|
|
227
|
-
OTELIDGenerator: () =>
|
|
228
|
-
ObjectFetcher: () =>
|
|
222
|
+
Logger: () => _chunkV32LW47Zjs.Logger,
|
|
223
|
+
LoginInvalidOrgError: () => _chunkV32LW47Zjs.LoginInvalidOrgError,
|
|
224
|
+
NOOP_SPAN: () => _chunkV32LW47Zjs.NOOP_SPAN,
|
|
225
|
+
NOOP_SPAN_PERMALINK: () => _chunkV32LW47Zjs.NOOP_SPAN_PERMALINK,
|
|
226
|
+
NoopSpan: () => _chunkV32LW47Zjs.NoopSpan,
|
|
227
|
+
OTELIDGenerator: () => _chunkV32LW47Zjs.OTELIDGenerator,
|
|
228
|
+
ObjectFetcher: () => _chunkV32LW47Zjs.ObjectFetcher,
|
|
229
229
|
Project: () => Project2,
|
|
230
230
|
ProjectNameIdMap: () => ProjectNameIdMap,
|
|
231
|
-
Prompt: () =>
|
|
231
|
+
Prompt: () => _chunkV32LW47Zjs.Prompt,
|
|
232
232
|
PromptBuilder: () => PromptBuilder,
|
|
233
|
-
ReadonlyAttachment: () =>
|
|
234
|
-
ReadonlyExperiment: () =>
|
|
233
|
+
ReadonlyAttachment: () => _chunkV32LW47Zjs.ReadonlyAttachment,
|
|
234
|
+
ReadonlyExperiment: () => _chunkV32LW47Zjs.ReadonlyExperiment,
|
|
235
235
|
Reporter: () => Reporter,
|
|
236
236
|
ScorerBuilder: () => ScorerBuilder,
|
|
237
237
|
SpanFetcher: () => SpanFetcher,
|
|
238
|
-
SpanImpl: () =>
|
|
239
|
-
TRACEPARENT_HEADER: () =>
|
|
240
|
-
TRACESTATE_HEADER: () =>
|
|
241
|
-
TestBackgroundLogger: () =>
|
|
238
|
+
SpanImpl: () => _chunkV32LW47Zjs.SpanImpl,
|
|
239
|
+
TRACEPARENT_HEADER: () => _chunkV32LW47Zjs.TRACEPARENT_HEADER,
|
|
240
|
+
TRACESTATE_HEADER: () => _chunkV32LW47Zjs.TRACESTATE_HEADER,
|
|
241
|
+
TestBackgroundLogger: () => _chunkV32LW47Zjs.TestBackgroundLogger,
|
|
242
242
|
ToolBuilder: () => ToolBuilder,
|
|
243
|
-
UUIDGenerator: () =>
|
|
244
|
-
X_CACHED_HEADER: () =>
|
|
245
|
-
_exportsForTestingOnly: () =>
|
|
246
|
-
_internalGetGlobalState: () =>
|
|
247
|
-
_internalIso: () =>
|
|
248
|
-
_internalSetInitialState: () =>
|
|
249
|
-
addAzureBlobHeaders: () =>
|
|
243
|
+
UUIDGenerator: () => _chunkV32LW47Zjs.UUIDGenerator,
|
|
244
|
+
X_CACHED_HEADER: () => _chunkV32LW47Zjs.X_CACHED_HEADER,
|
|
245
|
+
_exportsForTestingOnly: () => _chunkV32LW47Zjs._exportsForTestingOnly,
|
|
246
|
+
_internalGetGlobalState: () => _chunkV32LW47Zjs._internalGetGlobalState,
|
|
247
|
+
_internalIso: () => _chunk4AQGZS6Xjs.isomorph_default,
|
|
248
|
+
_internalSetInitialState: () => _chunkV32LW47Zjs._internalSetInitialState,
|
|
249
|
+
addAzureBlobHeaders: () => _chunkV32LW47Zjs.addAzureBlobHeaders,
|
|
250
250
|
agentAssertionScorer: () => agentAssertionScorer,
|
|
251
|
-
braintrustAISDKTelemetry: () =>
|
|
251
|
+
braintrustAISDKTelemetry: () => _chunkV32LW47Zjs.braintrustAISDKTelemetry,
|
|
252
252
|
braintrustEveHook: () => braintrustEveHook,
|
|
253
253
|
braintrustEveInstrumentation: () => braintrustEveInstrumentation,
|
|
254
|
-
braintrustFlueInstrumentation: () =>
|
|
255
|
-
braintrustFlueObserver: () =>
|
|
256
|
-
braintrustStreamChunkSchema: () =>
|
|
254
|
+
braintrustFlueInstrumentation: () => _chunkV32LW47Zjs.braintrustFlueInstrumentation,
|
|
255
|
+
braintrustFlueObserver: () => _chunkV32LW47Zjs.braintrustFlueObserver,
|
|
256
|
+
braintrustStreamChunkSchema: () => _chunkV32LW47Zjs.braintrustStreamChunkSchema,
|
|
257
257
|
buildLocalSummary: () => buildLocalSummary,
|
|
258
|
-
collectAnthropicSession: () =>
|
|
258
|
+
collectAnthropicSession: () => _chunkV32LW47Zjs.collectAnthropicSession,
|
|
259
259
|
completeOpenAIBatchTrace: () => completeOpenAIBatchTrace,
|
|
260
|
-
configureInstrumentation: () =>
|
|
261
|
-
constructLogs3OverflowRequest: () =>
|
|
262
|
-
createFinalValuePassThroughStream: () =>
|
|
263
|
-
currentExperiment: () =>
|
|
264
|
-
currentLogger: () =>
|
|
265
|
-
currentSpan: () =>
|
|
266
|
-
deepCopyEvent: () =>
|
|
260
|
+
configureInstrumentation: () => _chunkV32LW47Zjs.configureInstrumentation,
|
|
261
|
+
constructLogs3OverflowRequest: () => _chunkV32LW47Zjs.constructLogs3OverflowRequest,
|
|
262
|
+
createFinalValuePassThroughStream: () => _chunkV32LW47Zjs.createFinalValuePassThroughStream,
|
|
263
|
+
currentExperiment: () => _chunkV32LW47Zjs.currentExperiment,
|
|
264
|
+
currentLogger: () => _chunkV32LW47Zjs.currentLogger,
|
|
265
|
+
currentSpan: () => _chunkV32LW47Zjs.currentSpan,
|
|
266
|
+
deepCopyEvent: () => _chunkV32LW47Zjs.deepCopyEvent,
|
|
267
267
|
defaultErrorScoreHandler: () => defaultErrorScoreHandler,
|
|
268
268
|
defineDurableEval: () => defineDurableEval,
|
|
269
|
-
deserializePlainStringAsJSON: () =>
|
|
270
|
-
devNullWritableStream: () =>
|
|
269
|
+
deserializePlainStringAsJSON: () => _chunkV32LW47Zjs.deserializePlainStringAsJSON,
|
|
270
|
+
devNullWritableStream: () => _chunkV32LW47Zjs.devNullWritableStream,
|
|
271
271
|
evaluatorDefinitionSchema: () => evaluatorDefinitionSchema,
|
|
272
272
|
evaluatorDefinitionsSchema: () => evaluatorDefinitionsSchema,
|
|
273
|
-
extractTraceContextFromHeaders: () =>
|
|
274
|
-
flush: () =>
|
|
275
|
-
getContextManager: () =>
|
|
276
|
-
getIdGenerator: () =>
|
|
277
|
-
getPromptVersions: () =>
|
|
278
|
-
getSpanParentObject: () =>
|
|
279
|
-
getTemplateRenderer: () =>
|
|
273
|
+
extractTraceContextFromHeaders: () => _chunkV32LW47Zjs.extractTraceContextFromHeaders,
|
|
274
|
+
flush: () => _chunkV32LW47Zjs.flush,
|
|
275
|
+
getContextManager: () => _chunkV32LW47Zjs.getContextManager,
|
|
276
|
+
getIdGenerator: () => _chunkV32LW47Zjs.getIdGenerator,
|
|
277
|
+
getPromptVersions: () => _chunkV32LW47Zjs.getPromptVersions,
|
|
278
|
+
getSpanParentObject: () => _chunkV32LW47Zjs.getSpanParentObject,
|
|
279
|
+
getTemplateRenderer: () => _chunkV32LW47Zjs.getTemplateRenderer,
|
|
280
280
|
graph: () => graph_framework_exports,
|
|
281
|
-
init: () =>
|
|
282
|
-
initDataset: () =>
|
|
283
|
-
initExperiment: () =>
|
|
281
|
+
init: () => _chunkV32LW47Zjs.init,
|
|
282
|
+
initDataset: () => _chunkV32LW47Zjs.initDataset,
|
|
283
|
+
initExperiment: () => _chunkV32LW47Zjs.initExperiment,
|
|
284
284
|
initFunction: () => initFunction,
|
|
285
|
-
initLogger: () =>
|
|
285
|
+
initLogger: () => _chunkV32LW47Zjs.initLogger,
|
|
286
286
|
initNodeTestSuite: () => initNodeTestSuite,
|
|
287
|
-
injectTraceContext: () =>
|
|
287
|
+
injectTraceContext: () => _chunkV32LW47Zjs.injectTraceContext,
|
|
288
288
|
invoke: () => invoke,
|
|
289
|
-
isTemplateFormat: () =>
|
|
290
|
-
loadParameters: () =>
|
|
291
|
-
loadPrompt: () =>
|
|
292
|
-
log: () =>
|
|
293
|
-
logError: () =>
|
|
294
|
-
login: () =>
|
|
295
|
-
loginToState: () =>
|
|
296
|
-
logs3OverflowUploadSchema: () =>
|
|
297
|
-
newId: () =>
|
|
289
|
+
isTemplateFormat: () => _chunkV32LW47Zjs.isTemplateFormat,
|
|
290
|
+
loadParameters: () => _chunkV32LW47Zjs.loadParameters,
|
|
291
|
+
loadPrompt: () => _chunkV32LW47Zjs.loadPrompt,
|
|
292
|
+
log: () => _chunkV32LW47Zjs.log,
|
|
293
|
+
logError: () => _chunkV32LW47Zjs.logError,
|
|
294
|
+
login: () => _chunkV32LW47Zjs.login,
|
|
295
|
+
loginToState: () => _chunkV32LW47Zjs.loginToState,
|
|
296
|
+
logs3OverflowUploadSchema: () => _chunkV32LW47Zjs.logs3OverflowUploadSchema,
|
|
297
|
+
newId: () => _chunkV32LW47Zjs.newId,
|
|
298
298
|
openaiBatchesRetrieveTraced: () => openaiBatchesRetrieveTraced,
|
|
299
299
|
openaiFilesCreateTraced: () => openaiFilesCreateTraced,
|
|
300
|
-
parseCachedHeader: () =>
|
|
301
|
-
parseTemplateFormat: () =>
|
|
302
|
-
permalink: () =>
|
|
303
|
-
pickLogs3OverflowObjectIds: () =>
|
|
300
|
+
parseCachedHeader: () => _chunkV32LW47Zjs.parseCachedHeader,
|
|
301
|
+
parseTemplateFormat: () => _chunkV32LW47Zjs.parseTemplateFormat,
|
|
302
|
+
permalink: () => _chunkV32LW47Zjs.permalink,
|
|
303
|
+
pickLogs3OverflowObjectIds: () => _chunkV32LW47Zjs.pickLogs3OverflowObjectIds,
|
|
304
304
|
projects: () => projects,
|
|
305
305
|
promptContentsSchema: () => promptContentsSchema,
|
|
306
306
|
promptDefinitionSchema: () => promptDefinitionSchema,
|
|
307
307
|
promptDefinitionToPromptData: () => promptDefinitionToPromptData,
|
|
308
308
|
promptDefinitionWithToolsSchema: () => promptDefinitionWithToolsSchema,
|
|
309
|
-
registerOtelFlush: () =>
|
|
309
|
+
registerOtelFlush: () => _chunkV32LW47Zjs.registerOtelFlush,
|
|
310
310
|
registerSandbox: () => registerSandbox,
|
|
311
|
-
registerTemplatePlugin: () =>
|
|
312
|
-
renderMessage: () =>
|
|
313
|
-
renderPromptParams: () =>
|
|
314
|
-
renderTemplateContent: () =>
|
|
311
|
+
registerTemplatePlugin: () => _chunkV32LW47Zjs.registerTemplatePlugin,
|
|
312
|
+
renderMessage: () => _chunkV32LW47Zjs.renderMessage,
|
|
313
|
+
renderPromptParams: () => _chunkV32LW47Zjs.renderPromptParams,
|
|
314
|
+
renderTemplateContent: () => _chunkV32LW47Zjs.renderTemplateContent,
|
|
315
315
|
reportFailures: () => reportFailures,
|
|
316
316
|
runEvaluator: () => runEvaluator,
|
|
317
|
-
setFetch: () =>
|
|
318
|
-
setMaskingFunction: () =>
|
|
319
|
-
spanComponentsToObjectId: () =>
|
|
320
|
-
startSpan: () =>
|
|
321
|
-
summarize: () =>
|
|
322
|
-
templateRegistry: () =>
|
|
323
|
-
toolFunctionDefinitionSchema: () =>
|
|
324
|
-
traceable: () =>
|
|
325
|
-
traced: () =>
|
|
326
|
-
updateSpan: () =>
|
|
327
|
-
uploadLogs3OverflowPayload: () =>
|
|
328
|
-
utf8ByteLength: () =>
|
|
329
|
-
withCurrent: () =>
|
|
330
|
-
withDataset: () =>
|
|
331
|
-
withExperiment: () =>
|
|
332
|
-
withLogger: () =>
|
|
333
|
-
withParent: () =>
|
|
317
|
+
setFetch: () => _chunkV32LW47Zjs.setFetch,
|
|
318
|
+
setMaskingFunction: () => _chunkV32LW47Zjs.setMaskingFunction,
|
|
319
|
+
spanComponentsToObjectId: () => _chunkV32LW47Zjs.spanComponentsToObjectId,
|
|
320
|
+
startSpan: () => _chunkV32LW47Zjs.startSpan,
|
|
321
|
+
summarize: () => _chunkV32LW47Zjs.summarize,
|
|
322
|
+
templateRegistry: () => _chunkV32LW47Zjs.templateRegistry,
|
|
323
|
+
toolFunctionDefinitionSchema: () => _chunkV32LW47Zjs.ToolFunctionDefinition,
|
|
324
|
+
traceable: () => _chunkV32LW47Zjs.traceable,
|
|
325
|
+
traced: () => _chunkV32LW47Zjs.traced,
|
|
326
|
+
updateSpan: () => _chunkV32LW47Zjs.updateSpan,
|
|
327
|
+
uploadLogs3OverflowPayload: () => _chunkV32LW47Zjs.uploadLogs3OverflowPayload,
|
|
328
|
+
utf8ByteLength: () => _chunkV32LW47Zjs.utf8ByteLength,
|
|
329
|
+
withCurrent: () => _chunkV32LW47Zjs.withCurrent,
|
|
330
|
+
withDataset: () => _chunkV32LW47Zjs.withDataset,
|
|
331
|
+
withExperiment: () => _chunkV32LW47Zjs.withExperiment,
|
|
332
|
+
withLogger: () => _chunkV32LW47Zjs.withLogger,
|
|
333
|
+
withParent: () => _chunkV32LW47Zjs.withParent,
|
|
334
334
|
wrapAISDK: () => wrapAISDK,
|
|
335
335
|
wrapAISDKModel: () => wrapAISDKModel,
|
|
336
336
|
wrapAgentClass: () => wrapAgentClass,
|
|
@@ -352,7 +352,7 @@ _chunk2XDW3UCGjs.__export.call(void 0, exports_exports, {
|
|
|
352
352
|
wrapLangSmithClient: () => wrapLangSmithClient,
|
|
353
353
|
wrapLangSmithRunTrees: () => wrapLangSmithRunTrees,
|
|
354
354
|
wrapLangSmithTraceable: () => wrapLangSmithTraceable,
|
|
355
|
-
wrapMastraAgent: () =>
|
|
355
|
+
wrapMastraAgent: () => _chunkV32LW47Zjs.wrapMastraAgent,
|
|
356
356
|
wrapMistral: () => wrapMistral,
|
|
357
357
|
wrapOllama: () => wrapOllama,
|
|
358
358
|
wrapOpenAI: () => wrapOpenAI,
|
|
@@ -362,7 +362,7 @@ _chunk2XDW3UCGjs.__export.call(void 0, exports_exports, {
|
|
|
362
362
|
wrapOpenRouterAgent: () => wrapOpenRouterAgent,
|
|
363
363
|
wrapPiCodingAgentSDK: () => wrapPiCodingAgentSDK,
|
|
364
364
|
wrapStrandsAgentSDK: () => wrapStrandsAgentSDK,
|
|
365
|
-
wrapTraced: () =>
|
|
365
|
+
wrapTraced: () => _chunkV32LW47Zjs.wrapTraced,
|
|
366
366
|
wrapVitest: () => wrapVitest,
|
|
367
367
|
wrapVoyageAI: () => wrapVoyageAI
|
|
368
368
|
});
|
|
@@ -371,7 +371,7 @@ _chunk2XDW3UCGjs.__export.call(void 0, exports_exports, {
|
|
|
371
371
|
var _v3 = require('zod/v3');
|
|
372
372
|
var SANDBOX_GROUP_NAME_METADATA_KEY = "_bt_sandbox_group_name";
|
|
373
373
|
async function registerSandbox(options) {
|
|
374
|
-
const state = _nullishCoalesce(options.state, () => (
|
|
374
|
+
const state = _nullishCoalesce(options.state, () => ( _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, )));
|
|
375
375
|
await state.login({
|
|
376
376
|
apiKey: options.apiKey,
|
|
377
377
|
appUrl: options.appUrl,
|
|
@@ -412,7 +412,7 @@ async function registerSandbox(options) {
|
|
|
412
412
|
evaluatorDefinitions
|
|
413
413
|
)) {
|
|
414
414
|
const functionName = evalName;
|
|
415
|
-
const functionSlug =
|
|
415
|
+
const functionSlug = _chunkV32LW47Zjs.slugify.call(void 0, evalName, { lower: true, strict: true });
|
|
416
416
|
const functionDef = {
|
|
417
417
|
project_id: projectId,
|
|
418
418
|
org_name: state.orgName,
|
|
@@ -622,7 +622,7 @@ function teeUpload(upload) {
|
|
|
622
622
|
}
|
|
623
623
|
function openaiFilesCreateTraced(files) {
|
|
624
624
|
return (params, options) => {
|
|
625
|
-
const parent =
|
|
625
|
+
const parent = _chunkV32LW47Zjs.getSpanParentObject.call(void 0, );
|
|
626
626
|
const purpose = read(params, "purpose");
|
|
627
627
|
const file = read(params, "file");
|
|
628
628
|
if (purpose !== "batch") {
|
|
@@ -643,7 +643,7 @@ function openaiFilesCreateTraced(files) {
|
|
|
643
643
|
};
|
|
644
644
|
const apiPromise = files.create(tracedParams, options);
|
|
645
645
|
let enhancedResponse;
|
|
646
|
-
const tracedResponse =
|
|
646
|
+
const tracedResponse = _chunk4AQGZS6Xjs.openAIChannels.filesCreateTraced.invoke(
|
|
647
647
|
async () => {
|
|
648
648
|
enhancedResponse = await apiPromise.withResponse();
|
|
649
649
|
return enhancedResponse.data;
|
|
@@ -670,7 +670,7 @@ function openaiBatchesRetrieveTraced(batches) {
|
|
|
670
670
|
return (batchId, options) => {
|
|
671
671
|
const apiPromise = batches.retrieve(batchId, options);
|
|
672
672
|
let enhancedResponse;
|
|
673
|
-
const tracedResponse =
|
|
673
|
+
const tracedResponse = _chunk4AQGZS6Xjs.openAIChannels.batchesRetrieveTraced.invoke(
|
|
674
674
|
async () => {
|
|
675
675
|
enhancedResponse = await apiPromise.withResponse();
|
|
676
676
|
return enhancedResponse.data;
|
|
@@ -700,7 +700,7 @@ async function completeOpenAIBatchTrace(args) {
|
|
|
700
700
|
void inputFileContent.catch(() => void 0);
|
|
701
701
|
void _optionalChain([outputFileContent, 'optionalAccess', _4 => _4.catch, 'call', _5 => _5(() => void 0)]);
|
|
702
702
|
void _optionalChain([errorFileContent, 'optionalAccess', _6 => _6.catch, 'call', _7 => _7(() => void 0)]);
|
|
703
|
-
await
|
|
703
|
+
await _chunk4AQGZS6Xjs.openAIChannels.batchesCompleteTrace.invoke(
|
|
704
704
|
async () => void 0,
|
|
705
705
|
void 0,
|
|
706
706
|
[
|
|
@@ -737,7 +737,7 @@ async function invoke(args) {
|
|
|
737
737
|
projectId,
|
|
738
738
|
...functionIdArgs
|
|
739
739
|
} = args;
|
|
740
|
-
const state = _nullishCoalesce(stateArg, () => (
|
|
740
|
+
const state = _nullishCoalesce(stateArg, () => ( _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, )));
|
|
741
741
|
await state.login({
|
|
742
742
|
orgName,
|
|
743
743
|
apiKey,
|
|
@@ -745,8 +745,8 @@ async function invoke(args) {
|
|
|
745
745
|
forceLogin,
|
|
746
746
|
fetch
|
|
747
747
|
});
|
|
748
|
-
const parent = parentArg ? typeof parentArg === "string" ? parentArg : await parentArg.export() : await
|
|
749
|
-
const functionId =
|
|
748
|
+
const parent = parentArg ? typeof parentArg === "string" ? parentArg : await parentArg.export() : await _chunkV32LW47Zjs.getSpanParentObject.call(void 0, ).export();
|
|
749
|
+
const functionId = _chunkV32LW47Zjs.FunctionId.safeParse({
|
|
750
750
|
function_id: functionIdArgs.function_id,
|
|
751
751
|
project_name: functionIdArgs.projectName,
|
|
752
752
|
slug: functionIdArgs.slug,
|
|
@@ -789,7 +789,7 @@ async function invoke(args) {
|
|
|
789
789
|
if (!resp.body) {
|
|
790
790
|
throw new Error("Received empty stream body");
|
|
791
791
|
}
|
|
792
|
-
return new (0,
|
|
792
|
+
return new (0, _chunkV32LW47Zjs.BraintrustStream)(resp.body);
|
|
793
793
|
} else {
|
|
794
794
|
const data = await resp.json();
|
|
795
795
|
return schema ? schema.parse(data) : data;
|
|
@@ -801,7 +801,7 @@ function initFunction({
|
|
|
801
801
|
version,
|
|
802
802
|
state
|
|
803
803
|
}) {
|
|
804
|
-
const s = _nullishCoalesce(state, () => (
|
|
804
|
+
const s = _nullishCoalesce(state, () => ( _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, )));
|
|
805
805
|
_optionalChain([s, 'optionalAccess', _8 => _8.spanCache, 'optionalAccess', _9 => _9.disable, 'call', _10 => _10()]);
|
|
806
806
|
const f = async (input) => {
|
|
807
807
|
return await invoke({
|
|
@@ -827,22 +827,22 @@ function responsesProxy(openai) {
|
|
|
827
827
|
if (name === "create" && typeof target.create === "function") {
|
|
828
828
|
return wrapResponsesAsync(
|
|
829
829
|
target.create.bind(target),
|
|
830
|
-
|
|
830
|
+
_chunk4AQGZS6Xjs.openAIChannels.responsesCreate
|
|
831
831
|
);
|
|
832
832
|
} else if (name === "stream" && typeof target.stream === "function") {
|
|
833
833
|
return wrapResponsesSyncStream(
|
|
834
834
|
target.stream.bind(target),
|
|
835
|
-
|
|
835
|
+
_chunk4AQGZS6Xjs.openAIChannels.responsesStream
|
|
836
836
|
);
|
|
837
837
|
} else if (name === "parse" && typeof target.parse === "function") {
|
|
838
838
|
return wrapResponsesAsync(
|
|
839
839
|
target.parse.bind(target),
|
|
840
|
-
|
|
840
|
+
_chunk4AQGZS6Xjs.openAIChannels.responsesParse
|
|
841
841
|
);
|
|
842
842
|
} else if (name === "compact" && typeof target.compact === "function") {
|
|
843
843
|
return wrapResponsesAsync(
|
|
844
844
|
target.compact.bind(target),
|
|
845
|
-
|
|
845
|
+
_chunk4AQGZS6Xjs.openAIChannels.responsesCompact
|
|
846
846
|
);
|
|
847
847
|
}
|
|
848
848
|
return Reflect.get(target, name, receiver);
|
|
@@ -1002,7 +1002,7 @@ function wrapBetaChatCompletionParse(completion) {
|
|
|
1002
1002
|
const { span_info, params } = splitSpanInfo(
|
|
1003
1003
|
allParams
|
|
1004
1004
|
);
|
|
1005
|
-
return
|
|
1005
|
+
return _chunk4AQGZS6Xjs.openAIChannels.betaChatCompletionsParse.tracePromise(
|
|
1006
1006
|
async () => await completion(params),
|
|
1007
1007
|
{ arguments: [params], span_info }
|
|
1008
1008
|
);
|
|
@@ -1013,7 +1013,7 @@ function wrapBetaChatCompletionStream(completion) {
|
|
|
1013
1013
|
const { span_info, params } = splitSpanInfo(
|
|
1014
1014
|
allParams
|
|
1015
1015
|
);
|
|
1016
|
-
return
|
|
1016
|
+
return _chunk4AQGZS6Xjs.openAIChannels.betaChatCompletionsStream.traceSync(
|
|
1017
1017
|
() => completion(params),
|
|
1018
1018
|
{ arguments: [params], span_info }
|
|
1019
1019
|
);
|
|
@@ -1034,7 +1034,7 @@ function wrapChatCompletion(completion) {
|
|
|
1034
1034
|
if (!executionPromise) {
|
|
1035
1035
|
executionPromise = (async () => {
|
|
1036
1036
|
const traceContext = createChannelContext(
|
|
1037
|
-
|
|
1037
|
+
_chunk4AQGZS6Xjs.openAIChannels.chatCompletionsCreate,
|
|
1038
1038
|
params,
|
|
1039
1039
|
span_info
|
|
1040
1040
|
);
|
|
@@ -1044,7 +1044,7 @@ function wrapChatCompletion(completion) {
|
|
|
1044
1044
|
getAPIPromise()
|
|
1045
1045
|
);
|
|
1046
1046
|
const { data: data2, response: response2, request_id: request_id2 } = await tracePromiseWithResponse(
|
|
1047
|
-
|
|
1047
|
+
_chunk4AQGZS6Xjs.openAIChannels.chatCompletionsCreate,
|
|
1048
1048
|
traceContext,
|
|
1049
1049
|
completionPromise
|
|
1050
1050
|
);
|
|
@@ -1055,7 +1055,7 @@ function wrapChatCompletion(completion) {
|
|
|
1055
1055
|
getAPIPromise()
|
|
1056
1056
|
);
|
|
1057
1057
|
const { data, response, request_id } = await tracePromiseWithResponse(
|
|
1058
|
-
|
|
1058
|
+
_chunk4AQGZS6Xjs.openAIChannels.chatCompletionsCreate,
|
|
1059
1059
|
traceContext,
|
|
1060
1060
|
completionResponse
|
|
1061
1061
|
);
|
|
@@ -1067,9 +1067,9 @@ function wrapChatCompletion(completion) {
|
|
|
1067
1067
|
return createLazyAPIPromise(
|
|
1068
1068
|
ensureExecuted,
|
|
1069
1069
|
() => tracePromiseAsResponse(
|
|
1070
|
-
|
|
1070
|
+
_chunk4AQGZS6Xjs.openAIChannels.chatCompletionsCreate,
|
|
1071
1071
|
createChannelContext(
|
|
1072
|
-
|
|
1072
|
+
_chunk4AQGZS6Xjs.openAIChannels.chatCompletionsCreate,
|
|
1073
1073
|
params,
|
|
1074
1074
|
span_info
|
|
1075
1075
|
),
|
|
@@ -1123,8 +1123,8 @@ function wrapApiCreateWithChannel(create, channel) {
|
|
|
1123
1123
|
);
|
|
1124
1124
|
};
|
|
1125
1125
|
}
|
|
1126
|
-
var wrapEmbeddings = (create) => wrapApiCreateWithChannel(create,
|
|
1127
|
-
var wrapModerations = (create) => wrapApiCreateWithChannel(create,
|
|
1126
|
+
var wrapEmbeddings = (create) => wrapApiCreateWithChannel(create, _chunk4AQGZS6Xjs.openAIChannels.embeddingsCreate);
|
|
1127
|
+
var wrapModerations = (create) => wrapApiCreateWithChannel(create, _chunk4AQGZS6Xjs.openAIChannels.moderationsCreate);
|
|
1128
1128
|
|
|
1129
1129
|
// src/wrappers/ai-sdk/ai-sdk.ts
|
|
1130
1130
|
function isModuleNamespace(obj) {
|
|
@@ -1234,7 +1234,7 @@ var wrapAgentClass = (AgentClass, options = {}) => {
|
|
|
1234
1234
|
return wrapHarnessAgentGenerate(
|
|
1235
1235
|
original,
|
|
1236
1236
|
harnessAgent,
|
|
1237
|
-
|
|
1237
|
+
_chunk4AQGZS6Xjs.harnessAgentChannels.generate,
|
|
1238
1238
|
"HarnessAgent.generate",
|
|
1239
1239
|
options
|
|
1240
1240
|
);
|
|
@@ -1242,7 +1242,7 @@ var wrapAgentClass = (AgentClass, options = {}) => {
|
|
|
1242
1242
|
return wrapHarnessAgentStream(
|
|
1243
1243
|
original,
|
|
1244
1244
|
harnessAgent,
|
|
1245
|
-
|
|
1245
|
+
_chunk4AQGZS6Xjs.harnessAgentChannels.stream,
|
|
1246
1246
|
"HarnessAgent.stream",
|
|
1247
1247
|
options
|
|
1248
1248
|
);
|
|
@@ -1250,7 +1250,7 @@ var wrapAgentClass = (AgentClass, options = {}) => {
|
|
|
1250
1250
|
return wrapHarnessAgentGenerate(
|
|
1251
1251
|
original,
|
|
1252
1252
|
harnessAgent,
|
|
1253
|
-
|
|
1253
|
+
_chunk4AQGZS6Xjs.harnessAgentChannels.continueGenerate,
|
|
1254
1254
|
"HarnessAgent.continueGenerate",
|
|
1255
1255
|
options
|
|
1256
1256
|
);
|
|
@@ -1258,7 +1258,7 @@ var wrapAgentClass = (AgentClass, options = {}) => {
|
|
|
1258
1258
|
return wrapHarnessAgentStream(
|
|
1259
1259
|
original,
|
|
1260
1260
|
harnessAgent,
|
|
1261
|
-
|
|
1261
|
+
_chunk4AQGZS6Xjs.harnessAgentChannels.continueStream,
|
|
1262
1262
|
"HarnessAgent.continueStream",
|
|
1263
1263
|
options
|
|
1264
1264
|
);
|
|
@@ -1281,7 +1281,7 @@ var wrapAgentClass = (AgentClass, options = {}) => {
|
|
|
1281
1281
|
};
|
|
1282
1282
|
var wrapHarnessAgentCreateSession = (createSession, instance) => {
|
|
1283
1283
|
const wrapper = function(params) {
|
|
1284
|
-
return
|
|
1284
|
+
return _chunk4AQGZS6Xjs.harnessAgentChannels.createSession.tracePromise(
|
|
1285
1285
|
() => params === void 0 ? createSession.call(instance) : createSession.call(instance, params),
|
|
1286
1286
|
createAISDKChannelContext(_nullishCoalesce(params, () => ( {})), { self: instance })
|
|
1287
1287
|
);
|
|
@@ -1327,15 +1327,15 @@ var wrapAgentGenerate = (generate, instance, options = {}) => {
|
|
|
1327
1327
|
};
|
|
1328
1328
|
function generateChannelForAgent(agentName) {
|
|
1329
1329
|
if (agentName === "ToolLoopAgent") {
|
|
1330
|
-
return
|
|
1330
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.toolLoopAgentGenerate;
|
|
1331
1331
|
}
|
|
1332
|
-
return
|
|
1332
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.agentGenerate;
|
|
1333
1333
|
}
|
|
1334
1334
|
var wrapAgentStream = (stream, instance, options = {}) => {
|
|
1335
1335
|
const defaultName = `${instance.constructor.name}.stream`;
|
|
1336
1336
|
return (params) => {
|
|
1337
1337
|
const workflowAgent = instance.constructor.name === "WorkflowAgent";
|
|
1338
|
-
if (workflowAgent &&
|
|
1338
|
+
if (workflowAgent && _chunkV32LW47Zjs.currentWorkflowAgentWrapperSpan.call(void 0, )) {
|
|
1339
1339
|
const { span_info: _spanInfo, ...cleanParams } = params;
|
|
1340
1340
|
return stream.call(instance, { ...instance.settings, ...cleanParams });
|
|
1341
1341
|
}
|
|
@@ -1354,12 +1354,12 @@ var wrapAgentStream = (stream, instance, options = {}) => {
|
|
|
1354
1354
|
};
|
|
1355
1355
|
function streamChannelForAgent(agentName) {
|
|
1356
1356
|
if (agentName === "ToolLoopAgent") {
|
|
1357
|
-
return
|
|
1357
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.toolLoopAgentStream;
|
|
1358
1358
|
}
|
|
1359
1359
|
if (agentName === "WorkflowAgent") {
|
|
1360
|
-
return
|
|
1360
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.workflowAgentStream;
|
|
1361
1361
|
}
|
|
1362
|
-
return
|
|
1362
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.agentStream;
|
|
1363
1363
|
}
|
|
1364
1364
|
var makeGenerateTextWrapper = (channel, name, generateText, contextOptions = {}, options = {}) => {
|
|
1365
1365
|
const wrapper = async function(allParams) {
|
|
@@ -1383,7 +1383,7 @@ var makeGenerateTextWrapper = (channel, name, generateText, contextOptions = {},
|
|
|
1383
1383
|
};
|
|
1384
1384
|
var wrapGenerateText = (generateText, options = {}, aiSDK) => {
|
|
1385
1385
|
return makeGenerateTextWrapper(
|
|
1386
|
-
|
|
1386
|
+
_chunk4AQGZS6Xjs.aiSDKChannels.generateText,
|
|
1387
1387
|
"generateText",
|
|
1388
1388
|
generateText,
|
|
1389
1389
|
{ aiSDK },
|
|
@@ -1392,7 +1392,7 @@ var wrapGenerateText = (generateText, options = {}, aiSDK) => {
|
|
|
1392
1392
|
};
|
|
1393
1393
|
var wrapGenerateObject = (generateObject, options = {}, aiSDK) => {
|
|
1394
1394
|
return makeGenerateTextWrapper(
|
|
1395
|
-
|
|
1395
|
+
_chunk4AQGZS6Xjs.aiSDKChannels.generateObject,
|
|
1396
1396
|
"generateObject",
|
|
1397
1397
|
generateObject,
|
|
1398
1398
|
{ aiSDK },
|
|
@@ -1406,7 +1406,7 @@ var makeGenerateImageWrapper = (generateImage, contextOptions = {}, options = {}
|
|
|
1406
1406
|
const wrapper = async function(allParams) {
|
|
1407
1407
|
const { span_info, ...params } = allParams;
|
|
1408
1408
|
const tracedParams = { ...params };
|
|
1409
|
-
return
|
|
1409
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.generateImage.tracePromise(
|
|
1410
1410
|
() => generateImage(tracedParams),
|
|
1411
1411
|
createAISDKChannelContext(tracedParams, {
|
|
1412
1412
|
aiSDK: contextOptions.aiSDK,
|
|
@@ -1447,7 +1447,7 @@ var makeEmbedWrapper = (channel, name, embed, contextOptions = {}, options = {})
|
|
|
1447
1447
|
};
|
|
1448
1448
|
var wrapEmbed = (embed, options = {}, aiSDK) => {
|
|
1449
1449
|
return makeEmbedWrapper(
|
|
1450
|
-
|
|
1450
|
+
_chunk4AQGZS6Xjs.aiSDKChannels.embed,
|
|
1451
1451
|
"embed",
|
|
1452
1452
|
embed,
|
|
1453
1453
|
{ aiSDK },
|
|
@@ -1456,7 +1456,7 @@ var wrapEmbed = (embed, options = {}, aiSDK) => {
|
|
|
1456
1456
|
};
|
|
1457
1457
|
var wrapEmbedMany = (embedMany, options = {}, aiSDK) => {
|
|
1458
1458
|
return makeEmbedWrapper(
|
|
1459
|
-
|
|
1459
|
+
_chunk4AQGZS6Xjs.aiSDKChannels.embedMany,
|
|
1460
1460
|
"embedMany",
|
|
1461
1461
|
embedMany,
|
|
1462
1462
|
{ aiSDK },
|
|
@@ -1467,7 +1467,7 @@ var makeRerankWrapper = (rerank, contextOptions = {}, options = {}) => {
|
|
|
1467
1467
|
const wrapper = async function(allParams) {
|
|
1468
1468
|
const { span_info, ...params } = allParams;
|
|
1469
1469
|
const tracedParams = { ...params };
|
|
1470
|
-
return
|
|
1470
|
+
return _chunk4AQGZS6Xjs.aiSDKChannels.rerank.tracePromise(
|
|
1471
1471
|
() => rerank(tracedParams),
|
|
1472
1472
|
createAISDKChannelContext(tracedParams, {
|
|
1473
1473
|
aiSDK: contextOptions.aiSDK,
|
|
@@ -1506,7 +1506,7 @@ var makeStreamWrapper = (channel, name, streamText, contextOptions = {}, options
|
|
|
1506
1506
|
};
|
|
1507
1507
|
var wrapStreamText = (streamText, options = {}, aiSDK) => {
|
|
1508
1508
|
return makeStreamWrapper(
|
|
1509
|
-
|
|
1509
|
+
_chunk4AQGZS6Xjs.aiSDKChannels.streamText,
|
|
1510
1510
|
"streamText",
|
|
1511
1511
|
streamText,
|
|
1512
1512
|
{ aiSDK },
|
|
@@ -1515,7 +1515,7 @@ var wrapStreamText = (streamText, options = {}, aiSDK) => {
|
|
|
1515
1515
|
};
|
|
1516
1516
|
var wrapStreamObject = (streamObject, options = {}, aiSDK) => {
|
|
1517
1517
|
return makeStreamWrapper(
|
|
1518
|
-
|
|
1518
|
+
_chunk4AQGZS6Xjs.aiSDKChannels.streamObject,
|
|
1519
1519
|
"streamObject",
|
|
1520
1520
|
streamObject,
|
|
1521
1521
|
{ aiSDK },
|
|
@@ -1587,19 +1587,19 @@ var BraintrustLanguageModelWrapper = class {
|
|
|
1587
1587
|
// For the first cut, do not support custom span_info arguments. We can
|
|
1588
1588
|
// propagate those via async local storage
|
|
1589
1589
|
async doGenerate(options) {
|
|
1590
|
-
const span =
|
|
1591
|
-
|
|
1590
|
+
const span = _chunkV32LW47Zjs.startSpan.call(void 0,
|
|
1591
|
+
_chunk4AQGZS6Xjs.withSpanInstrumentationName.call(void 0,
|
|
1592
1592
|
{
|
|
1593
1593
|
name: "Chat Completion",
|
|
1594
1594
|
spanAttributes: {
|
|
1595
1595
|
type: "llm"
|
|
1596
1596
|
}
|
|
1597
1597
|
},
|
|
1598
|
-
|
|
1598
|
+
_chunk4AQGZS6Xjs.INSTRUMENTATION_NAMES.AI_SDK
|
|
1599
1599
|
)
|
|
1600
1600
|
);
|
|
1601
1601
|
const { prompt, mode, ...rest } = options;
|
|
1602
|
-
const startTime =
|
|
1602
|
+
const startTime = _chunkV32LW47Zjs.getCurrentUnixTimestamp.call(void 0, );
|
|
1603
1603
|
try {
|
|
1604
1604
|
const ret = await this.model.doGenerate(options);
|
|
1605
1605
|
span.log({
|
|
@@ -1611,12 +1611,12 @@ var BraintrustLanguageModelWrapper = class {
|
|
|
1611
1611
|
},
|
|
1612
1612
|
output: postProcessOutput(ret.text, ret.toolCalls, ret.finishReason),
|
|
1613
1613
|
metrics: {
|
|
1614
|
-
time_to_first_token:
|
|
1615
|
-
tokens: !
|
|
1614
|
+
time_to_first_token: _chunkV32LW47Zjs.getCurrentUnixTimestamp.call(void 0, ) - startTime,
|
|
1615
|
+
tokens: !_chunkV32LW47Zjs.isEmpty.call(void 0, ret.usage) ? ret.usage.promptTokens + ret.usage.completionTokens : void 0,
|
|
1616
1616
|
prompt_tokens: _optionalChain([ret, 'access', _32 => _32.usage, 'optionalAccess', _33 => _33.promptTokens]),
|
|
1617
1617
|
completion_tokens: _optionalChain([ret, 'access', _34 => _34.usage, 'optionalAccess', _35 => _35.completionTokens]),
|
|
1618
|
-
cached:
|
|
1619
|
-
_nullishCoalesce(_optionalChain([ret, 'access', _36 => _36.rawResponse, 'optionalAccess', _37 => _37.headers, 'optionalAccess', _38 => _38[
|
|
1618
|
+
cached: _chunkV32LW47Zjs.parseCachedHeader.call(void 0,
|
|
1619
|
+
_nullishCoalesce(_optionalChain([ret, 'access', _36 => _36.rawResponse, 'optionalAccess', _37 => _37.headers, 'optionalAccess', _38 => _38[_chunkV32LW47Zjs.X_CACHED_HEADER]]), () => ( _optionalChain([ret, 'access', _39 => _39.rawResponse, 'optionalAccess', _40 => _40.headers, 'optionalAccess', _41 => _41[_chunkV32LW47Zjs.LEGACY_CACHED_HEADER]])))
|
|
1620
1620
|
)
|
|
1621
1621
|
}
|
|
1622
1622
|
});
|
|
@@ -1627,16 +1627,16 @@ var BraintrustLanguageModelWrapper = class {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
async doStream(options) {
|
|
1629
1629
|
const { prompt, mode, ...rest } = options;
|
|
1630
|
-
const startTime =
|
|
1631
|
-
const span =
|
|
1632
|
-
|
|
1630
|
+
const startTime = _chunkV32LW47Zjs.getCurrentUnixTimestamp.call(void 0, );
|
|
1631
|
+
const span = _chunkV32LW47Zjs.startSpan.call(void 0,
|
|
1632
|
+
_chunk4AQGZS6Xjs.withSpanInstrumentationName.call(void 0,
|
|
1633
1633
|
{
|
|
1634
1634
|
name: "Chat Completion",
|
|
1635
1635
|
spanAttributes: {
|
|
1636
1636
|
type: "llm"
|
|
1637
1637
|
}
|
|
1638
1638
|
},
|
|
1639
|
-
|
|
1639
|
+
_chunk4AQGZS6Xjs.INSTRUMENTATION_NAMES.AI_SDK
|
|
1640
1640
|
)
|
|
1641
1641
|
);
|
|
1642
1642
|
span.log({
|
|
@@ -1667,7 +1667,7 @@ var BraintrustLanguageModelWrapper = class {
|
|
|
1667
1667
|
new TransformStream({
|
|
1668
1668
|
transform(chunk, controller) {
|
|
1669
1669
|
if (time_to_first_token === void 0) {
|
|
1670
|
-
time_to_first_token =
|
|
1670
|
+
time_to_first_token = _chunkV32LW47Zjs.getCurrentUnixTimestamp.call(void 0, ) - startTime;
|
|
1671
1671
|
span.log({ metrics: { time_to_first_token } });
|
|
1672
1672
|
}
|
|
1673
1673
|
switch (chunk.type) {
|
|
@@ -1712,11 +1712,11 @@ var BraintrustLanguageModelWrapper = class {
|
|
|
1712
1712
|
),
|
|
1713
1713
|
metrics: {
|
|
1714
1714
|
time_to_first_token,
|
|
1715
|
-
tokens: !
|
|
1715
|
+
tokens: !_chunkV32LW47Zjs.isEmpty.call(void 0, usage) ? usage.promptTokens + usage.completionTokens : void 0,
|
|
1716
1716
|
prompt_tokens: _optionalChain([usage, 'optionalAccess', _42 => _42.promptTokens]),
|
|
1717
1717
|
completion_tokens: _optionalChain([usage, 'optionalAccess', _43 => _43.completionTokens]),
|
|
1718
|
-
cached:
|
|
1719
|
-
_nullishCoalesce(_optionalChain([ret, 'access', _44 => _44.rawResponse, 'optionalAccess', _45 => _45.headers, 'optionalAccess', _46 => _46[
|
|
1718
|
+
cached: _chunkV32LW47Zjs.parseCachedHeader.call(void 0,
|
|
1719
|
+
_nullishCoalesce(_optionalChain([ret, 'access', _44 => _44.rawResponse, 'optionalAccess', _45 => _45.headers, 'optionalAccess', _46 => _46[_chunkV32LW47Zjs.X_CACHED_HEADER]]), () => ( _optionalChain([ret, 'access', _47 => _47.rawResponse, 'optionalAccess', _48 => _48.headers, 'optionalAccess', _49 => _49[_chunkV32LW47Zjs.LEGACY_CACHED_HEADER]])))
|
|
1720
1720
|
)
|
|
1721
1721
|
}
|
|
1722
1722
|
});
|
|
@@ -1901,12 +1901,12 @@ function normalizeUsageMetrics(usage, provider, providerMetadata) {
|
|
|
1901
1901
|
anthropicMetadata.usage,
|
|
1902
1902
|
"cache_creation_input_tokens"
|
|
1903
1903
|
) || 0;
|
|
1904
|
-
const cacheTokens =
|
|
1904
|
+
const cacheTokens = _chunkV32LW47Zjs.extractAnthropicCacheTokens.call(void 0,
|
|
1905
1905
|
cacheReadTokens,
|
|
1906
1906
|
cacheCreationTokens
|
|
1907
1907
|
);
|
|
1908
1908
|
Object.assign(metrics, cacheTokens);
|
|
1909
|
-
return
|
|
1909
|
+
return _chunkV32LW47Zjs.toNumericMetrics.call(void 0, _chunkV32LW47Zjs.finalizeAnthropicTokens.call(void 0, metrics));
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
return metrics;
|
|
@@ -1978,7 +1978,7 @@ function BraintrustMiddleware(config = {}) {
|
|
|
1978
1978
|
model: modelFromWrapGenerate
|
|
1979
1979
|
}) => {
|
|
1980
1980
|
const rawInput = extractInput(params);
|
|
1981
|
-
const processedInput =
|
|
1981
|
+
const processedInput = _chunkV32LW47Zjs.processInputAttachments.call(void 0, rawInput);
|
|
1982
1982
|
const spanArgs = {
|
|
1983
1983
|
name: _optionalChain([config, 'access', _66 => _66.spanInfo, 'optionalAccess', _67 => _67.name]) || "ai-sdk.doGenerate",
|
|
1984
1984
|
spanAttributes: {
|
|
@@ -1993,8 +1993,8 @@ function BraintrustMiddleware(config = {}) {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
1995
|
};
|
|
1996
|
-
const span =
|
|
1997
|
-
|
|
1996
|
+
const span = _chunkV32LW47Zjs.startSpan.call(void 0,
|
|
1997
|
+
_chunk4AQGZS6Xjs.withSpanInstrumentationName.call(void 0, spanArgs, _chunk4AQGZS6Xjs.INSTRUMENTATION_NAMES.AI_SDK)
|
|
1998
1998
|
);
|
|
1999
1999
|
try {
|
|
2000
2000
|
const result = await doGenerate();
|
|
@@ -2042,7 +2042,7 @@ function BraintrustMiddleware(config = {}) {
|
|
|
2042
2042
|
},
|
|
2043
2043
|
wrapStream: async ({ doStream, params }) => {
|
|
2044
2044
|
const rawInput = extractInput(params);
|
|
2045
|
-
const processedInput =
|
|
2045
|
+
const processedInput = _chunkV32LW47Zjs.processInputAttachments.call(void 0, rawInput);
|
|
2046
2046
|
const spanArgs = {
|
|
2047
2047
|
name: _optionalChain([config, 'access', _75 => _75.spanInfo, 'optionalAccess', _76 => _76.name]) || "ai-sdk.doStream",
|
|
2048
2048
|
spanAttributes: {
|
|
@@ -2057,8 +2057,8 @@ function BraintrustMiddleware(config = {}) {
|
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
2059
|
};
|
|
2060
|
-
const span =
|
|
2061
|
-
|
|
2060
|
+
const span = _chunkV32LW47Zjs.startSpan.call(void 0,
|
|
2061
|
+
_chunk4AQGZS6Xjs.withSpanInstrumentationName.call(void 0, spanArgs, _chunk4AQGZS6Xjs.INSTRUMENTATION_NAMES.AI_SDK)
|
|
2062
2062
|
);
|
|
2063
2063
|
try {
|
|
2064
2064
|
const { stream, ...rest } = await doStream();
|
|
@@ -2183,7 +2183,7 @@ function createLegacyEveInstrumentation(options) {
|
|
|
2183
2183
|
try {
|
|
2184
2184
|
captureEveModelInput(state, input);
|
|
2185
2185
|
} catch (error) {
|
|
2186
|
-
|
|
2186
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Error in Eve LLM input capture:", error);
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
2189
|
},
|
|
@@ -2193,7 +2193,7 @@ function createLegacyEveInstrumentation(options) {
|
|
|
2193
2193
|
};
|
|
2194
2194
|
}
|
|
2195
2195
|
function isEveHandleMessageStreamEvent(event) {
|
|
2196
|
-
return
|
|
2196
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, event) && typeof event["type"] === "string";
|
|
2197
2197
|
}
|
|
2198
2198
|
var ResumedEveSpan = class {
|
|
2199
2199
|
constructor(reference) {
|
|
@@ -2214,7 +2214,7 @@ var ResumedEveSpan = class {
|
|
|
2214
2214
|
...this.endTime === void 0 ? {} : { end: this.endTime },
|
|
2215
2215
|
...event.metrics
|
|
2216
2216
|
};
|
|
2217
|
-
|
|
2217
|
+
_chunkV32LW47Zjs.updateSpan.call(void 0, {
|
|
2218
2218
|
exported: this.reference.exported,
|
|
2219
2219
|
...this.reference.startEvent,
|
|
2220
2220
|
...event,
|
|
@@ -2223,7 +2223,7 @@ var ResumedEveSpan = class {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
end(args) {
|
|
2225
2225
|
if (this.endTime === void 0) {
|
|
2226
|
-
this.endTime = _nullishCoalesce(_optionalChain([args, 'optionalAccess', _84 => _84.endTime]), () => (
|
|
2226
|
+
this.endTime = _nullishCoalesce(_optionalChain([args, 'optionalAccess', _84 => _84.endTime]), () => ( _chunkV32LW47Zjs.getCurrentUnixTimestamp.call(void 0, )));
|
|
2227
2227
|
this.log({ metrics: { end: this.endTime } });
|
|
2228
2228
|
}
|
|
2229
2229
|
return this.endTime;
|
|
@@ -2235,13 +2235,13 @@ var EveBridge = (_class = class {
|
|
|
2235
2235
|
}
|
|
2236
2236
|
|
|
2237
2237
|
__init() {this.eventQueuesBySession = /* @__PURE__ */ new Map()}
|
|
2238
|
-
__init2() {this.completedToolKeys = new (0,
|
|
2238
|
+
__init2() {this.completedToolKeys = new (0, _chunkV32LW47Zjs.LRUCache)({
|
|
2239
2239
|
max: MAX_EVE_CACHE_ENTRIES
|
|
2240
2240
|
})}
|
|
2241
|
-
__init3() {this.toolsByCallKey = new (0,
|
|
2241
|
+
__init3() {this.toolsByCallKey = new (0, _chunkV32LW47Zjs.LRUCache)({
|
|
2242
2242
|
max: MAX_EVE_CACHE_ENTRIES
|
|
2243
2243
|
})}
|
|
2244
|
-
__init4() {this.turnsByKey = new (0,
|
|
2244
|
+
__init4() {this.turnsByKey = new (0, _chunkV32LW47Zjs.LRUCache)({
|
|
2245
2245
|
max: MAX_EVE_CACHE_ENTRIES
|
|
2246
2246
|
})}
|
|
2247
2247
|
async startEveSpan(args) {
|
|
@@ -2252,7 +2252,7 @@ var EveBridge = (_class = class {
|
|
|
2252
2252
|
if (reference) {
|
|
2253
2253
|
return new ResumedEveSpan(reference);
|
|
2254
2254
|
}
|
|
2255
|
-
const startTime = _nullishCoalesce(_optionalChain([args, 'optionalAccess', _87 => _87.startTime]), () => (
|
|
2255
|
+
const startTime = _nullishCoalesce(_optionalChain([args, 'optionalAccess', _87 => _87.startTime]), () => ( _chunkV32LW47Zjs.getCurrentUnixTimestamp.call(void 0, )));
|
|
2256
2256
|
const parentSpanIds = _optionalChain([args, 'optionalAccess', _88 => _88.parentSpanIds]);
|
|
2257
2257
|
const startEvent = {
|
|
2258
2258
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -2264,12 +2264,12 @@ var EveBridge = (_class = class {
|
|
|
2264
2264
|
},
|
|
2265
2265
|
span_parents: parentSpanIds ? "spanId" in parentSpanIds ? [parentSpanIds.spanId] : parentSpanIds.parentSpanIds : []
|
|
2266
2266
|
};
|
|
2267
|
-
const span =
|
|
2268
|
-
|
|
2269
|
-
() =>
|
|
2270
|
-
|
|
2267
|
+
const span = _chunkV32LW47Zjs.withCurrent.call(void 0,
|
|
2268
|
+
_chunkV32LW47Zjs.NOOP_SPAN,
|
|
2269
|
+
() => _chunkV32LW47Zjs._internalStartSpanWithInitialMerge.call(void 0,
|
|
2270
|
+
_chunk4AQGZS6Xjs.withSpanInstrumentationName.call(void 0,
|
|
2271
2271
|
{ ...args, startTime },
|
|
2272
|
-
|
|
2272
|
+
_chunk4AQGZS6Xjs.INSTRUMENTATION_NAMES.EVE
|
|
2273
2273
|
)
|
|
2274
2274
|
)
|
|
2275
2275
|
);
|
|
@@ -2297,7 +2297,7 @@ var EveBridge = (_class = class {
|
|
|
2297
2297
|
};
|
|
2298
2298
|
});
|
|
2299
2299
|
} catch (error) {
|
|
2300
|
-
|
|
2300
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Error exporting Eve span for resumption:", error);
|
|
2301
2301
|
}
|
|
2302
2302
|
return span;
|
|
2303
2303
|
}
|
|
@@ -2384,7 +2384,7 @@ var EveBridge = (_class = class {
|
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
2386
2386
|
} catch (error) {
|
|
2387
|
-
|
|
2387
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Error in Eve hook instrumentation:", error);
|
|
2388
2388
|
}
|
|
2389
2389
|
};
|
|
2390
2390
|
const sessionId = event.type === "session.failed" ? event.data.sessionId || sessionIdFromContext(ctx) : sessionIdFromContext(ctx);
|
|
@@ -2612,7 +2612,7 @@ var EveBridge = (_class = class {
|
|
|
2612
2612
|
return;
|
|
2613
2613
|
}
|
|
2614
2614
|
const existingMessage = eveOutputMessage(step.output);
|
|
2615
|
-
const existingToolCalls =
|
|
2615
|
+
const existingToolCalls = _chunkV32LW47Zjs.isObject.call(void 0, existingMessage) ? existingMessage.tool_calls : void 0;
|
|
2616
2616
|
step.output = mergeEveReasoning(
|
|
2617
2617
|
[
|
|
2618
2618
|
{
|
|
@@ -2676,11 +2676,11 @@ var EveBridge = (_class = class {
|
|
|
2676
2676
|
return;
|
|
2677
2677
|
}
|
|
2678
2678
|
const toolCallsById = /* @__PURE__ */ new Map();
|
|
2679
|
-
if (Array.isArray(step.output) &&
|
|
2679
|
+
if (Array.isArray(step.output) && _chunkV32LW47Zjs.isObject.call(void 0, step.output[0])) {
|
|
2680
2680
|
const message = step.output[0]["message"];
|
|
2681
|
-
if (
|
|
2681
|
+
if (_chunkV32LW47Zjs.isObject.call(void 0, message) && Array.isArray(message["tool_calls"])) {
|
|
2682
2682
|
for (const toolCall of message["tool_calls"]) {
|
|
2683
|
-
if (
|
|
2683
|
+
if (_chunkV32LW47Zjs.isObject.call(void 0, toolCall) && typeof toolCall["id"] === "string") {
|
|
2684
2684
|
toolCallsById.set(toolCall["id"], toolCall);
|
|
2685
2685
|
}
|
|
2686
2686
|
}
|
|
@@ -2889,7 +2889,7 @@ var EveBridge = (_class = class {
|
|
|
2889
2889
|
};
|
|
2890
2890
|
step.metrics = { ...step.metrics, ...metrics };
|
|
2891
2891
|
const sessionId = sessionIdFromContext(ctx);
|
|
2892
|
-
if (Array.isArray(step.output) &&
|
|
2892
|
+
if (Array.isArray(step.output) && _chunkV32LW47Zjs.isObject.call(void 0, step.output[0])) {
|
|
2893
2893
|
const finishReason = step.output[0].finish_reason;
|
|
2894
2894
|
if (typeof finishReason !== "string") {
|
|
2895
2895
|
step.output[0].finish_reason = normalizedFinishReason(
|
|
@@ -3227,10 +3227,10 @@ var EveBridge = (_class = class {
|
|
|
3227
3227
|
return state;
|
|
3228
3228
|
}
|
|
3229
3229
|
async startTurnSpan(sessionId, event, ctx, metadata) {
|
|
3230
|
-
const session =
|
|
3231
|
-
const parent =
|
|
3232
|
-
const parentTurn =
|
|
3233
|
-
const parentLineage =
|
|
3230
|
+
const session = _chunkV32LW47Zjs.isObject.call(void 0, ctx) ? ctx["session"] : void 0;
|
|
3231
|
+
const parent = _chunkV32LW47Zjs.isObject.call(void 0, session) ? session["parent"] : void 0;
|
|
3232
|
+
const parentTurn = _chunkV32LW47Zjs.isObject.call(void 0, parent) ? parent["turn"] : void 0;
|
|
3233
|
+
const parentLineage = _chunkV32LW47Zjs.isObject.call(void 0, parent) && typeof parent["callId"] === "string" && typeof parent["sessionId"] === "string" && _chunkV32LW47Zjs.isObject.call(void 0, parentTurn) && typeof parentTurn["id"] === "string" ? {
|
|
3234
3234
|
callId: parent["callId"],
|
|
3235
3235
|
sessionId: parent["sessionId"],
|
|
3236
3236
|
turnId: parentTurn["id"]
|
|
@@ -3337,10 +3337,10 @@ var EveBridge = (_class = class {
|
|
|
3337
3337
|
}
|
|
3338
3338
|
async flushInstrumentation() {
|
|
3339
3339
|
try {
|
|
3340
|
-
await
|
|
3340
|
+
await _chunkV32LW47Zjs.flush.call(void 0, );
|
|
3341
3341
|
return true;
|
|
3342
3342
|
} catch (error) {
|
|
3343
|
-
|
|
3343
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Error in Eve flush instrumentation:", error);
|
|
3344
3344
|
return false;
|
|
3345
3345
|
}
|
|
3346
3346
|
}
|
|
@@ -3355,12 +3355,12 @@ function emptyEveTraceState() {
|
|
|
3355
3355
|
};
|
|
3356
3356
|
}
|
|
3357
3357
|
function normalizeEveTraceState(state) {
|
|
3358
|
-
if (!
|
|
3358
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, state)) {
|
|
3359
3359
|
return emptyEveTraceState();
|
|
3360
3360
|
}
|
|
3361
|
-
const metadata =
|
|
3361
|
+
const metadata = _chunkV32LW47Zjs.isObject.call(void 0, state["metadata"]) ? state["metadata"] : {};
|
|
3362
3362
|
const spanReferences = Array.isArray(state["spanReferences"]) ? state["spanReferences"].flatMap((entry) => {
|
|
3363
|
-
if (!
|
|
3363
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, entry)) {
|
|
3364
3364
|
return [];
|
|
3365
3365
|
}
|
|
3366
3366
|
const exported = entry["exported"];
|
|
@@ -3369,11 +3369,11 @@ function normalizeEveTraceState(state) {
|
|
|
3369
3369
|
const rowId = entry["rowId"];
|
|
3370
3370
|
const spanId = entry["spanId"];
|
|
3371
3371
|
const startEvent = entry["startEvent"];
|
|
3372
|
-
const startEventCreated =
|
|
3373
|
-
const startEventMetrics =
|
|
3374
|
-
const startEventSpanAttributes =
|
|
3375
|
-
const startEventSpanParents =
|
|
3376
|
-
const normalizedStartEvent = typeof startEventCreated === "string" &&
|
|
3372
|
+
const startEventCreated = _chunkV32LW47Zjs.isObject.call(void 0, startEvent) ? startEvent["created"] : void 0;
|
|
3373
|
+
const startEventMetrics = _chunkV32LW47Zjs.isObject.call(void 0, startEvent) ? startEvent["metrics"] : void 0;
|
|
3374
|
+
const startEventSpanAttributes = _chunkV32LW47Zjs.isObject.call(void 0, startEvent) ? startEvent["span_attributes"] : void 0;
|
|
3375
|
+
const startEventSpanParents = _chunkV32LW47Zjs.isObject.call(void 0, startEvent) ? startEvent["span_parents"] : void 0;
|
|
3376
|
+
const normalizedStartEvent = typeof startEventCreated === "string" && _chunkV32LW47Zjs.isObject.call(void 0, startEventMetrics) && typeof startEventMetrics["start"] === "number" && Number.isFinite(startEventMetrics["start"]) && _chunkV32LW47Zjs.isObject.call(void 0, startEventSpanAttributes) && Array.isArray(startEventSpanParents) && startEventSpanParents.every(
|
|
3377
3377
|
(parent) => typeof parent === "string"
|
|
3378
3378
|
) ? {
|
|
3379
3379
|
created: startEventCreated,
|
|
@@ -3393,7 +3393,7 @@ function normalizeEveTraceState(state) {
|
|
|
3393
3393
|
] : [];
|
|
3394
3394
|
}).slice(-MAX_STORED_SPAN_REFERENCES) : [];
|
|
3395
3395
|
const llmInputs = Array.isArray(state["llmInputs"]) ? state["llmInputs"].flatMap((entry) => {
|
|
3396
|
-
if (!
|
|
3396
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, entry)) {
|
|
3397
3397
|
return [];
|
|
3398
3398
|
}
|
|
3399
3399
|
const key = entry["key"];
|
|
@@ -3401,7 +3401,7 @@ function normalizeEveTraceState(state) {
|
|
|
3401
3401
|
return typeof key === "string" && isCapturedModelInput(input) ? [{ input, key }] : [];
|
|
3402
3402
|
}).slice(-MAX_STORED_LLM_INPUTS) : [];
|
|
3403
3403
|
const reasoningBlocks = Array.isArray(state["reasoningBlocks"]) ? state["reasoningBlocks"].flatMap((entry) => {
|
|
3404
|
-
if (!
|
|
3404
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, entry)) {
|
|
3405
3405
|
return [];
|
|
3406
3406
|
}
|
|
3407
3407
|
const content = entry["content"];
|
|
@@ -3416,7 +3416,7 @@ function normalizeEveTraceState(state) {
|
|
|
3416
3416
|
] : [];
|
|
3417
3417
|
}).slice(-MAX_STORED_REASONING_BLOCKS) : [];
|
|
3418
3418
|
const stepStarts = Array.isArray(state["stepStarts"]) ? state["stepStarts"].flatMap((entry) => {
|
|
3419
|
-
if (!
|
|
3419
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, entry)) {
|
|
3420
3420
|
return [];
|
|
3421
3421
|
}
|
|
3422
3422
|
const ordinal = entry["ordinal"];
|
|
@@ -3493,14 +3493,14 @@ function clearStoredEveReasoning(state, sessionId, turnId, stepIndex) {
|
|
|
3493
3493
|
});
|
|
3494
3494
|
}
|
|
3495
3495
|
function eveOutputMessage(output) {
|
|
3496
|
-
return Array.isArray(output) &&
|
|
3496
|
+
return Array.isArray(output) && _chunkV32LW47Zjs.isObject.call(void 0, output[0]) ? output[0]["message"] : void 0;
|
|
3497
3497
|
}
|
|
3498
3498
|
function mergeEveReasoning(output, reasoning) {
|
|
3499
3499
|
if (reasoning.length === 0) {
|
|
3500
3500
|
return output;
|
|
3501
3501
|
}
|
|
3502
|
-
const choice = Array.isArray(output) &&
|
|
3503
|
-
const message =
|
|
3502
|
+
const choice = Array.isArray(output) && _chunkV32LW47Zjs.isObject.call(void 0, output[0]) ? output[0] : {};
|
|
3503
|
+
const message = _chunkV32LW47Zjs.isObject.call(void 0, choice["message"]) ? choice["message"] : {};
|
|
3504
3504
|
return [
|
|
3505
3505
|
{
|
|
3506
3506
|
...choice,
|
|
@@ -3554,7 +3554,7 @@ function consumeCapturedEveModelInput(state, sessionId, turnId, stepIndex) {
|
|
|
3554
3554
|
});
|
|
3555
3555
|
return input;
|
|
3556
3556
|
} catch (error) {
|
|
3557
|
-
|
|
3557
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Error in Eve LLM input consumption:", error);
|
|
3558
3558
|
return void 0;
|
|
3559
3559
|
}
|
|
3560
3560
|
}
|
|
@@ -3694,14 +3694,14 @@ function capturedEveModelContentPart(part) {
|
|
|
3694
3694
|
}
|
|
3695
3695
|
function isCapturedModelInput(input) {
|
|
3696
3696
|
return Array.isArray(input) && input.every(
|
|
3697
|
-
(message) =>
|
|
3697
|
+
(message) => _chunkV32LW47Zjs.isObject.call(void 0, message) && (message["role"] === "system" || message["role"] === "user" || message["role"] === "assistant" || message["role"] === "tool") && (typeof message["content"] === "string" || Array.isArray(message["content"]) && message["content"].every(_chunkV32LW47Zjs.isObject))
|
|
3698
3698
|
);
|
|
3699
3699
|
}
|
|
3700
3700
|
function llmInputKey(sessionId, turnId, stepIndex) {
|
|
3701
3701
|
return `${sessionId}\0${turnId}\0${stepIndex}`;
|
|
3702
3702
|
}
|
|
3703
3703
|
function modelMetadataFromRuntime(runtime) {
|
|
3704
|
-
if (!
|
|
3704
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, runtime)) {
|
|
3705
3705
|
return {};
|
|
3706
3706
|
}
|
|
3707
3707
|
const modelId = runtime["modelId"];
|
|
@@ -3724,11 +3724,11 @@ function modelMetadataFromModelId(modelId) {
|
|
|
3724
3724
|
};
|
|
3725
3725
|
}
|
|
3726
3726
|
function sessionIdFromContext(ctx) {
|
|
3727
|
-
if (!
|
|
3727
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, ctx)) {
|
|
3728
3728
|
return void 0;
|
|
3729
3729
|
}
|
|
3730
3730
|
const session = ctx["session"];
|
|
3731
|
-
if (!
|
|
3731
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, session)) {
|
|
3732
3732
|
return void 0;
|
|
3733
3733
|
}
|
|
3734
3734
|
const id = session["id"];
|
|
@@ -3739,19 +3739,19 @@ function toolMetadataFromTurn(turn) {
|
|
|
3739
3739
|
return metadata;
|
|
3740
3740
|
}
|
|
3741
3741
|
function isToolCallAction(action) {
|
|
3742
|
-
return
|
|
3742
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, action) && action["kind"] === "tool-call" && typeof action["callId"] === "string" && typeof action["toolName"] === "string" && _chunkV32LW47Zjs.isObject.call(void 0, action["input"]);
|
|
3743
3743
|
}
|
|
3744
3744
|
function isLocalSubagentCallAction(action) {
|
|
3745
|
-
return
|
|
3745
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, action) && action["kind"] === "subagent-call" && typeof action["callId"] === "string" && _chunkV32LW47Zjs.isObject.call(void 0, action["input"]);
|
|
3746
3746
|
}
|
|
3747
3747
|
function isTraceableActionRequest(action) {
|
|
3748
3748
|
return isToolCallAction(action) || isLocalSubagentCallAction(action);
|
|
3749
3749
|
}
|
|
3750
3750
|
function isToolResult(result) {
|
|
3751
|
-
return
|
|
3751
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, result) && result["kind"] === "tool-result" && typeof result["callId"] === "string" && typeof result["toolName"] === "string";
|
|
3752
3752
|
}
|
|
3753
3753
|
function isSubagentResult(result) {
|
|
3754
|
-
return
|
|
3754
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, result) && result["kind"] === "subagent-result" && typeof result["callId"] === "string" && typeof result["subagentName"] === "string";
|
|
3755
3755
|
}
|
|
3756
3756
|
function normalizedFinishReason(finishReason) {
|
|
3757
3757
|
switch (finishReason) {
|
|
@@ -3838,7 +3838,7 @@ function createEveInstrumentationProvider(options = {}) {
|
|
|
3838
3838
|
"turn.failed": (event, context) => bridge.handleTurnTerminal(event, context),
|
|
3839
3839
|
"turn.started": (event, context) => bridge.handleTurnStarted(event, context)
|
|
3840
3840
|
},
|
|
3841
|
-
flush:
|
|
3841
|
+
flush: _chunkV32LW47Zjs.flush,
|
|
3842
3842
|
setup: options.setup
|
|
3843
3843
|
};
|
|
3844
3844
|
}
|
|
@@ -3850,10 +3850,10 @@ var EveProviderBridge = (_class2 = class {
|
|
|
3850
3850
|
__init5() {this.activeActions = /* @__PURE__ */ new Map()}
|
|
3851
3851
|
__init6() {this.activeModels = /* @__PURE__ */ new Map()}
|
|
3852
3852
|
__init7() {this.modelsByAttempt = /* @__PURE__ */ new Map()}
|
|
3853
|
-
__init8() {this.settledOperations = new (0,
|
|
3853
|
+
__init8() {this.settledOperations = new (0, _chunkV32LW47Zjs.LRUCache)({
|
|
3854
3854
|
max: MAX_EVE_PROVIDER_CACHE_ENTRIES
|
|
3855
3855
|
})}
|
|
3856
|
-
__init9() {this.turns = new (0,
|
|
3856
|
+
__init9() {this.turns = new (0, _chunkV32LW47Zjs.LRUCache)({
|
|
3857
3857
|
max: MAX_EVE_PROVIDER_CACHE_ENTRIES
|
|
3858
3858
|
})}
|
|
3859
3859
|
async handleTurnStarted(event, context) {
|
|
@@ -3928,7 +3928,7 @@ var EveProviderBridge = (_class2 = class {
|
|
|
3928
3928
|
this.drainActionsForTurn(event.sessionId, event.turnId, error);
|
|
3929
3929
|
const stored = storedSpan(context);
|
|
3930
3930
|
if (stored && "exported" in stored) {
|
|
3931
|
-
|
|
3931
|
+
_chunkV32LW47Zjs.updateSpan.call(void 0, {
|
|
3932
3932
|
exported: stored.exported,
|
|
3933
3933
|
...error !== void 0 ? { error } : {},
|
|
3934
3934
|
metrics: { end: Date.now() / 1e3 }
|
|
@@ -3999,7 +3999,7 @@ var EveProviderBridge = (_class2 = class {
|
|
|
3999
3999
|
} else {
|
|
4000
4000
|
const stored = storedSpan(context);
|
|
4001
4001
|
if (stored && "exported" in stored) {
|
|
4002
|
-
|
|
4002
|
+
_chunkV32LW47Zjs.updateSpan.call(void 0, {
|
|
4003
4003
|
exported: stored.exported,
|
|
4004
4004
|
...event.type === "model.call.failed" ? event.error !== void 0 ? { error: event.error } : {} : { output: modelOutput(event) },
|
|
4005
4005
|
metrics: {
|
|
@@ -4081,7 +4081,7 @@ var EveProviderBridge = (_class2 = class {
|
|
|
4081
4081
|
} else {
|
|
4082
4082
|
const stored2 = storedSpan(context);
|
|
4083
4083
|
if (stored2 && "exported" in stored2) {
|
|
4084
|
-
|
|
4084
|
+
_chunkV32LW47Zjs.updateSpan.call(void 0, {
|
|
4085
4085
|
exported: stored2.exported,
|
|
4086
4086
|
...event.type === "action.failed" ? {
|
|
4087
4087
|
error: _nullishCoalesce(event.error, () => ( new Error(_nullishCoalesce(event.errorCode, () => ( `Eve action ${event.outcome}`)))))
|
|
@@ -4132,10 +4132,10 @@ var EveProviderBridge = (_class2 = class {
|
|
|
4132
4132
|
return { rootSpanId, spanId };
|
|
4133
4133
|
}
|
|
4134
4134
|
async startSpan(context, args, rootSpanId) {
|
|
4135
|
-
const span =
|
|
4136
|
-
|
|
4137
|
-
() =>
|
|
4138
|
-
|
|
4135
|
+
const span = _chunkV32LW47Zjs.withCurrent.call(void 0,
|
|
4136
|
+
_chunkV32LW47Zjs.NOOP_SPAN,
|
|
4137
|
+
() => _chunkV32LW47Zjs._internalStartSpanWithInitialMerge.call(void 0,
|
|
4138
|
+
_chunk4AQGZS6Xjs.withSpanInstrumentationName.call(void 0, _nullishCoalesce(args, () => ( {})), _chunk4AQGZS6Xjs.INSTRUMENTATION_NAMES.EVE)
|
|
4139
4139
|
)
|
|
4140
4140
|
);
|
|
4141
4141
|
try {
|
|
@@ -4144,7 +4144,7 @@ var EveProviderBridge = (_class2 = class {
|
|
|
4144
4144
|
...rootSpanId ? { rootSpanId } : {}
|
|
4145
4145
|
});
|
|
4146
4146
|
} catch (error) {
|
|
4147
|
-
|
|
4147
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Error exporting Eve provider span:", error);
|
|
4148
4148
|
}
|
|
4149
4149
|
return span;
|
|
4150
4150
|
}
|
|
@@ -4173,13 +4173,13 @@ var EveProviderBridge = (_class2 = class {
|
|
|
4173
4173
|
try {
|
|
4174
4174
|
await fn();
|
|
4175
4175
|
} catch (error) {
|
|
4176
|
-
|
|
4176
|
+
_chunk4AQGZS6Xjs.debugLogger.warn(`Error in Eve provider ${operation}:`, error);
|
|
4177
4177
|
}
|
|
4178
4178
|
}
|
|
4179
4179
|
}, _class2);
|
|
4180
4180
|
function storedSpan(context) {
|
|
4181
4181
|
const value = context.state.get();
|
|
4182
|
-
if (!
|
|
4182
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, value)) return void 0;
|
|
4183
4183
|
if (value["skip"] === true) return { skip: true };
|
|
4184
4184
|
return typeof value["exported"] === "string" ? {
|
|
4185
4185
|
exported: value["exported"],
|
|
@@ -4335,7 +4335,7 @@ function betaSessionEventsProxy(events) {
|
|
|
4335
4335
|
if (prop === "stream") {
|
|
4336
4336
|
return new TypedApplyProxy(target.stream, {
|
|
4337
4337
|
apply(stream, thisArg, argArray) {
|
|
4338
|
-
return
|
|
4338
|
+
return _chunk4AQGZS6Xjs.anthropicChannels.betaSessionsEventsStream.tracePromise(
|
|
4339
4339
|
() => Reflect.apply(stream, thisArg, argArray),
|
|
4340
4340
|
{ arguments: argArray }
|
|
4341
4341
|
);
|
|
@@ -4362,7 +4362,7 @@ function betaSessionThreadEventsProxy(events) {
|
|
|
4362
4362
|
if (prop === "stream") {
|
|
4363
4363
|
return new TypedApplyProxy(target.stream, {
|
|
4364
4364
|
apply(stream, thisArg, argArray) {
|
|
4365
|
-
return
|
|
4365
|
+
return _chunk4AQGZS6Xjs.anthropicChannels.betaSessionsThreadsEventsStream.tracePromise(
|
|
4366
4366
|
() => Reflect.apply(stream, thisArg, argArray),
|
|
4367
4367
|
{ arguments: argArray }
|
|
4368
4368
|
);
|
|
@@ -4377,7 +4377,7 @@ function messagesProxy(messages) {
|
|
|
4377
4377
|
return new Proxy(messages, {
|
|
4378
4378
|
get(target, prop, receiver) {
|
|
4379
4379
|
if (prop === "create") {
|
|
4380
|
-
return createProxy(target.create,
|
|
4380
|
+
return createProxy(target.create, _chunk4AQGZS6Xjs.anthropicChannels.messagesCreate);
|
|
4381
4381
|
}
|
|
4382
4382
|
return Reflect.get(target, prop, receiver);
|
|
4383
4383
|
}
|
|
@@ -4387,7 +4387,7 @@ function betaMessagesProxy(messages, anthropic) {
|
|
|
4387
4387
|
return new Proxy(messages, {
|
|
4388
4388
|
get(target, prop, receiver) {
|
|
4389
4389
|
if (prop === "create") {
|
|
4390
|
-
return createProxy(target.create,
|
|
4390
|
+
return createProxy(target.create, _chunk4AQGZS6Xjs.anthropicChannels.betaMessagesCreate);
|
|
4391
4391
|
}
|
|
4392
4392
|
if (prop === "toolRunner") {
|
|
4393
4393
|
if (typeof target.toolRunner !== "function") {
|
|
@@ -4396,7 +4396,7 @@ function betaMessagesProxy(messages, anthropic) {
|
|
|
4396
4396
|
return toolRunnerProxy(
|
|
4397
4397
|
target.toolRunner,
|
|
4398
4398
|
anthropic,
|
|
4399
|
-
|
|
4399
|
+
_chunk4AQGZS6Xjs.anthropicChannels.betaMessagesToolRunner
|
|
4400
4400
|
);
|
|
4401
4401
|
}
|
|
4402
4402
|
return Reflect.get(target, prop, receiver);
|
|
@@ -4453,11 +4453,11 @@ function wrapClaudeAgentQuery(queryFn, defaultThis) {
|
|
|
4453
4453
|
...params,
|
|
4454
4454
|
options: {
|
|
4455
4455
|
..._nullishCoalesce(params.options, () => ( {})),
|
|
4456
|
-
[
|
|
4456
|
+
[_chunkV32LW47Zjs.CLAUDE_AGENT_SDK_SKIP_LOCAL_TOOL_HOOKS_OPTION]: true
|
|
4457
4457
|
}
|
|
4458
4458
|
};
|
|
4459
4459
|
const invocationTarget = thisArg === proxy || thisArg === void 0 ? _nullishCoalesce(defaultThis, () => ( thisArg)) : thisArg;
|
|
4460
|
-
return
|
|
4460
|
+
return _chunk4AQGZS6Xjs.claudeAgentSDKChannels.query.invoke(
|
|
4461
4461
|
target,
|
|
4462
4462
|
invocationTarget,
|
|
4463
4463
|
[wrappedParams],
|
|
@@ -4485,7 +4485,7 @@ function wrapClaudeAgentTool(toolFn, localToolMetadataByTool, defaultThis) {
|
|
|
4485
4485
|
}
|
|
4486
4486
|
const localToolMetadata = { toolName };
|
|
4487
4487
|
const originalHandler = wrappedArgs[handlerIndex];
|
|
4488
|
-
wrappedArgs[handlerIndex] =
|
|
4488
|
+
wrappedArgs[handlerIndex] = _chunkV32LW47Zjs.wrapLocalClaudeToolHandler.call(void 0,
|
|
4489
4489
|
originalHandler,
|
|
4490
4490
|
() => localToolMetadata
|
|
4491
4491
|
);
|
|
@@ -4592,7 +4592,7 @@ function patchThinkClass(Think) {
|
|
|
4592
4592
|
...descriptor,
|
|
4593
4593
|
value: function wrappedCloudflareThinkRunInferenceLoop(input) {
|
|
4594
4594
|
const args = [input];
|
|
4595
|
-
return
|
|
4595
|
+
return _chunk4AQGZS6Xjs.cloudflareThinkChannels.runInferenceLoop.tracePromise(
|
|
4596
4596
|
() => Reflect.apply(original, this, args),
|
|
4597
4597
|
{
|
|
4598
4598
|
arguments: args,
|
|
@@ -4714,7 +4714,7 @@ function wrapCodexThread(thread) {
|
|
|
4714
4714
|
if (prop === "run" && typeof value === "function") {
|
|
4715
4715
|
return function(input, turnOptions) {
|
|
4716
4716
|
const args = [input, turnOptions];
|
|
4717
|
-
return
|
|
4717
|
+
return _chunk4AQGZS6Xjs.openAICodexChannels.run.tracePromise(
|
|
4718
4718
|
() => Reflect.apply(value, target, args),
|
|
4719
4719
|
{
|
|
4720
4720
|
arguments: args,
|
|
@@ -4727,7 +4727,7 @@ function wrapCodexThread(thread) {
|
|
|
4727
4727
|
if (prop === "runStreamed" && typeof value === "function") {
|
|
4728
4728
|
return function(input, turnOptions) {
|
|
4729
4729
|
const args = [input, turnOptions];
|
|
4730
|
-
return
|
|
4730
|
+
return _chunk4AQGZS6Xjs.openAICodexChannels.runStreamed.tracePromise(
|
|
4731
4731
|
() => Reflect.apply(value, target, args),
|
|
4732
4732
|
{
|
|
4733
4733
|
arguments: args,
|
|
@@ -4795,7 +4795,7 @@ function wrapCursorAgentClass(Agent) {
|
|
|
4795
4795
|
if (prop === "create" && typeof value === "function") {
|
|
4796
4796
|
const wrapped = async function(options) {
|
|
4797
4797
|
const args = [options];
|
|
4798
|
-
return
|
|
4798
|
+
return _chunk4AQGZS6Xjs.cursorSDKChannels.create.tracePromise(
|
|
4799
4799
|
async () => wrapCursorAgent(await Reflect.apply(value, target, args)),
|
|
4800
4800
|
{ arguments: args }
|
|
4801
4801
|
);
|
|
@@ -4806,7 +4806,7 @@ function wrapCursorAgentClass(Agent) {
|
|
|
4806
4806
|
if (prop === "resume" && typeof value === "function") {
|
|
4807
4807
|
const wrapped = async function(agentId, options) {
|
|
4808
4808
|
const args = [agentId, options];
|
|
4809
|
-
return
|
|
4809
|
+
return _chunk4AQGZS6Xjs.cursorSDKChannels.resume.tracePromise(
|
|
4810
4810
|
async () => wrapCursorAgent(await Reflect.apply(value, target, args)),
|
|
4811
4811
|
{ arguments: args }
|
|
4812
4812
|
);
|
|
@@ -4817,7 +4817,7 @@ function wrapCursorAgentClass(Agent) {
|
|
|
4817
4817
|
if (prop === "prompt" && typeof value === "function") {
|
|
4818
4818
|
const wrapped = async function(message, options) {
|
|
4819
4819
|
const args = [message, options];
|
|
4820
|
-
return
|
|
4820
|
+
return _chunk4AQGZS6Xjs.cursorSDKChannels.prompt.tracePromise(
|
|
4821
4821
|
() => Reflect.apply(value, target, args),
|
|
4822
4822
|
{ arguments: args }
|
|
4823
4823
|
);
|
|
@@ -4850,7 +4850,7 @@ function wrapCursorAgent(agent) {
|
|
|
4850
4850
|
if (prop === "send" && typeof value === "function") {
|
|
4851
4851
|
return function(message, options) {
|
|
4852
4852
|
const args = [message, options];
|
|
4853
|
-
return
|
|
4853
|
+
return _chunk4AQGZS6Xjs.cursorSDKChannels.send.tracePromise(
|
|
4854
4854
|
() => Reflect.apply(value, target, args),
|
|
4855
4855
|
{
|
|
4856
4856
|
agent: target,
|
|
@@ -4900,7 +4900,7 @@ function patchAgentSessionClass(AgentSession) {
|
|
|
4900
4900
|
...descriptor,
|
|
4901
4901
|
value: function wrappedPiCodingAgentPrompt(text, options) {
|
|
4902
4902
|
const args = [text, options];
|
|
4903
|
-
return
|
|
4903
|
+
return _chunk4AQGZS6Xjs.piCodingAgentChannels.prompt.invoke(originalPrompt, this, args, {
|
|
4904
4904
|
session: this
|
|
4905
4905
|
});
|
|
4906
4906
|
}
|
|
@@ -4946,7 +4946,7 @@ function wrapCloudflareAgent(Agent) {
|
|
|
4946
4946
|
if (ownValue(options, "detached")) {
|
|
4947
4947
|
return Reflect.apply(originalRunAgentTool, this, args);
|
|
4948
4948
|
}
|
|
4949
|
-
return
|
|
4949
|
+
return _chunk4AQGZS6Xjs.cloudflareAgentsChannels.runAgentTool.tracePromise(
|
|
4950
4950
|
() => Reflect.apply(originalRunAgentTool, this, args),
|
|
4951
4951
|
{ arguments: args, self: this }
|
|
4952
4952
|
);
|
|
@@ -4970,7 +4970,7 @@ function isObjectLike(value) {
|
|
|
4970
4970
|
return typeof value === "object" && value !== null || typeof value === "function";
|
|
4971
4971
|
}
|
|
4972
4972
|
function warnUnsupportedAgent() {
|
|
4973
|
-
|
|
4973
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Unsupported Cloudflare Agents Agent class. Not wrapping.");
|
|
4974
4974
|
}
|
|
4975
4975
|
|
|
4976
4976
|
// src/wrappers/strands-agent-sdk.ts
|
|
@@ -5076,7 +5076,7 @@ function wrapAgentInstance(agent) {
|
|
|
5076
5076
|
if (prop === "stream" && typeof value === "function") {
|
|
5077
5077
|
return function(args, options) {
|
|
5078
5078
|
const callArgs = [args, options];
|
|
5079
|
-
return
|
|
5079
|
+
return _chunk4AQGZS6Xjs.strandsAgentSDKChannels.agentStream.invoke(
|
|
5080
5080
|
value,
|
|
5081
5081
|
target,
|
|
5082
5082
|
callArgs,
|
|
@@ -5110,7 +5110,7 @@ function wrapMultiAgentInstance(orchestrator, kind) {
|
|
|
5110
5110
|
if (prop === "stream" && typeof value === "function") {
|
|
5111
5111
|
return function(input, options) {
|
|
5112
5112
|
const callArgs = [input, options];
|
|
5113
|
-
const channel = kind === "graph" ?
|
|
5113
|
+
const channel = kind === "graph" ? _chunk4AQGZS6Xjs.strandsAgentSDKChannels.graphStream : _chunk4AQGZS6Xjs.strandsAgentSDKChannels.swarmStream;
|
|
5114
5114
|
return channel.invoke(
|
|
5115
5115
|
value,
|
|
5116
5116
|
target,
|
|
@@ -5150,11 +5150,11 @@ function wrapCloudflareAIChat(module) {
|
|
|
5150
5150
|
try {
|
|
5151
5151
|
AIChatAgent = Reflect.get(candidate, "AIChatAgent");
|
|
5152
5152
|
} catch (error) {
|
|
5153
|
-
|
|
5153
|
+
_chunk4AQGZS6Xjs.debugLogger.debug("Failed to inspect @cloudflare/ai-chat module:", error);
|
|
5154
5154
|
return module;
|
|
5155
5155
|
}
|
|
5156
5156
|
if (typeof AIChatAgent !== "function") {
|
|
5157
|
-
|
|
5157
|
+
_chunk4AQGZS6Xjs.debugLogger.warn(
|
|
5158
5158
|
"Unsupported @cloudflare/ai-chat module. AIChatAgent was not found; not wrapping."
|
|
5159
5159
|
);
|
|
5160
5160
|
return module;
|
|
@@ -5188,7 +5188,7 @@ function wrapAIChatAgentClass(AgentClass) {
|
|
|
5188
5188
|
args,
|
|
5189
5189
|
newTarget
|
|
5190
5190
|
);
|
|
5191
|
-
return
|
|
5191
|
+
return _chunkV32LW47Zjs.instrumentCloudflareAIChatAgent.call(void 0, instance);
|
|
5192
5192
|
}
|
|
5193
5193
|
});
|
|
5194
5194
|
wrappedClasses.set(AgentClass, wrapped);
|
|
@@ -5260,7 +5260,7 @@ function wrapGoogleGenAIInstance(instance) {
|
|
|
5260
5260
|
}
|
|
5261
5261
|
if (prop === "interactions") {
|
|
5262
5262
|
const interactions = Reflect.get(target, prop, receiver);
|
|
5263
|
-
if (!
|
|
5263
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, interactions) || typeof interactions.create !== "function") {
|
|
5264
5264
|
return interactions;
|
|
5265
5265
|
}
|
|
5266
5266
|
if (interactions !== originalInteractions) {
|
|
@@ -5274,7 +5274,7 @@ function wrapGoogleGenAIInstance(instance) {
|
|
|
5274
5274
|
});
|
|
5275
5275
|
}
|
|
5276
5276
|
function patchGoogleGenAIChats(instance, wrappedModels) {
|
|
5277
|
-
if (!
|
|
5277
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, instance.chats) || !("modelsModule" in instance.chats)) {
|
|
5278
5278
|
return;
|
|
5279
5279
|
}
|
|
5280
5280
|
Reflect.set(instance.chats, "modelsModule", wrappedModels);
|
|
@@ -5307,7 +5307,7 @@ function wrapInteractions(interactions) {
|
|
|
5307
5307
|
}
|
|
5308
5308
|
function wrapGenerateContent(original) {
|
|
5309
5309
|
return function(params) {
|
|
5310
|
-
return
|
|
5310
|
+
return _chunk4AQGZS6Xjs.googleGenAIChannels.generateContent.tracePromise(
|
|
5311
5311
|
() => original(params),
|
|
5312
5312
|
{ arguments: [params] }
|
|
5313
5313
|
);
|
|
@@ -5315,7 +5315,7 @@ function wrapGenerateContent(original) {
|
|
|
5315
5315
|
}
|
|
5316
5316
|
function wrapGenerateContentStream(original) {
|
|
5317
5317
|
return function(params) {
|
|
5318
|
-
return
|
|
5318
|
+
return _chunk4AQGZS6Xjs.googleGenAIChannels.generateContentStream.tracePromise(
|
|
5319
5319
|
() => original(params),
|
|
5320
5320
|
{ arguments: [params] }
|
|
5321
5321
|
);
|
|
@@ -5323,7 +5323,7 @@ function wrapGenerateContentStream(original) {
|
|
|
5323
5323
|
}
|
|
5324
5324
|
function wrapEmbedContent(original) {
|
|
5325
5325
|
return function(params) {
|
|
5326
|
-
return
|
|
5326
|
+
return _chunk4AQGZS6Xjs.googleGenAIChannels.embedContent.tracePromise(
|
|
5327
5327
|
() => original(params),
|
|
5328
5328
|
{ arguments: [params] }
|
|
5329
5329
|
);
|
|
@@ -5335,7 +5335,7 @@ function wrapInteractionCreate(original) {
|
|
|
5335
5335
|
return options === void 0 ? original(params) : original(params, options);
|
|
5336
5336
|
}
|
|
5337
5337
|
const traceContext = options === void 0 ? { arguments: [params] } : { arguments: [params, options] };
|
|
5338
|
-
return
|
|
5338
|
+
return _chunk4AQGZS6Xjs.googleGenAIChannels.interactionsCreate.tracePromise(
|
|
5339
5339
|
() => options === void 0 ? original(params) : original(params, options),
|
|
5340
5340
|
traceContext
|
|
5341
5341
|
);
|
|
@@ -5396,7 +5396,7 @@ function wrapRunnerInstance(runner) {
|
|
|
5396
5396
|
function wrapRunnerRunAsync(runner) {
|
|
5397
5397
|
const original = runner.runAsync.bind(runner);
|
|
5398
5398
|
return function(params) {
|
|
5399
|
-
return
|
|
5399
|
+
return _chunk4AQGZS6Xjs.googleADKChannels.runnerRunAsync.traceSync(() => original(params), {
|
|
5400
5400
|
arguments: [params],
|
|
5401
5401
|
self: runner
|
|
5402
5402
|
});
|
|
@@ -5423,7 +5423,7 @@ function wrapAgentInstance2(agent) {
|
|
|
5423
5423
|
function wrapAgentRunAsync(agent) {
|
|
5424
5424
|
const original = agent.runAsync.bind(agent);
|
|
5425
5425
|
return function(parentContext) {
|
|
5426
|
-
return
|
|
5426
|
+
return _chunk4AQGZS6Xjs.googleADKChannels.agentRunAsync.traceSync(
|
|
5427
5427
|
() => original(parentContext),
|
|
5428
5428
|
{ arguments: [parentContext], self: agent }
|
|
5429
5429
|
);
|
|
@@ -5450,7 +5450,7 @@ function wrapToolInstance(tool) {
|
|
|
5450
5450
|
function wrapToolRunAsync(tool) {
|
|
5451
5451
|
const original = tool.runAsync.bind(tool);
|
|
5452
5452
|
return function(req) {
|
|
5453
|
-
return
|
|
5453
|
+
return _chunk4AQGZS6Xjs.googleADKChannels.toolRunAsync.tracePromise(() => original(req), {
|
|
5454
5454
|
arguments: [req],
|
|
5455
5455
|
self: tool
|
|
5456
5456
|
});
|
|
@@ -5597,27 +5597,27 @@ function patchGenkitRegistryConstructor(registry) {
|
|
|
5597
5597
|
}
|
|
5598
5598
|
}
|
|
5599
5599
|
function wrapGenerate(generate) {
|
|
5600
|
-
return (input) =>
|
|
5600
|
+
return (input) => _chunk4AQGZS6Xjs.genkitChannels.generate.tracePromise(() => generate(input), {
|
|
5601
5601
|
arguments: [input]
|
|
5602
5602
|
});
|
|
5603
5603
|
}
|
|
5604
5604
|
function wrapGenerateStream(generateStream) {
|
|
5605
|
-
return (input) =>
|
|
5605
|
+
return (input) => _chunk4AQGZS6Xjs.genkitChannels.generateStream.traceSync(() => generateStream(input), {
|
|
5606
5606
|
arguments: [input]
|
|
5607
5607
|
});
|
|
5608
5608
|
}
|
|
5609
5609
|
function wrapEmbed2(embed) {
|
|
5610
|
-
return (params) =>
|
|
5610
|
+
return (params) => _chunk4AQGZS6Xjs.genkitChannels.embed.tracePromise(() => embed(params), {
|
|
5611
5611
|
arguments: [params]
|
|
5612
5612
|
});
|
|
5613
5613
|
}
|
|
5614
5614
|
function wrapEmbedMany2(embedMany) {
|
|
5615
|
-
return (params) =>
|
|
5615
|
+
return (params) => _chunk4AQGZS6Xjs.genkitChannels.embedMany.tracePromise(() => embedMany(params), {
|
|
5616
5616
|
arguments: [params]
|
|
5617
5617
|
});
|
|
5618
5618
|
}
|
|
5619
5619
|
function wrapRun(run) {
|
|
5620
|
-
return (name, inputOrFn, maybeFn) =>
|
|
5620
|
+
return (name, inputOrFn, maybeFn) => _chunk4AQGZS6Xjs.genkitChannels.actionRun.tracePromise(() => run(name, inputOrFn, maybeFn), {
|
|
5621
5621
|
arguments: [name, inputOrFn, maybeFn]
|
|
5622
5622
|
});
|
|
5623
5623
|
}
|
|
@@ -5656,13 +5656,13 @@ function isGenkitAction(value) {
|
|
|
5656
5656
|
return typeof value === "function" && "__action" in value;
|
|
5657
5657
|
}
|
|
5658
5658
|
function traceActionRun(action, run) {
|
|
5659
|
-
return (input, options) =>
|
|
5659
|
+
return (input, options) => _chunk4AQGZS6Xjs.genkitChannels.actionRun.tracePromise(() => run(input, options), {
|
|
5660
5660
|
arguments: [input, options],
|
|
5661
5661
|
self: action
|
|
5662
5662
|
});
|
|
5663
5663
|
}
|
|
5664
5664
|
function traceActionStream(action, stream) {
|
|
5665
|
-
return (input, options) =>
|
|
5665
|
+
return (input, options) => _chunk4AQGZS6Xjs.genkitChannels.actionStream.traceSync(() => stream(input, options), {
|
|
5666
5666
|
arguments: [input, options],
|
|
5667
5667
|
self: action
|
|
5668
5668
|
});
|
|
@@ -5708,10 +5708,10 @@ function isHuggingFaceConstructorKey(value) {
|
|
|
5708
5708
|
return HUGGINGFACE_CONSTRUCTOR_KEY_SET.has(value);
|
|
5709
5709
|
}
|
|
5710
5710
|
function hasFunction2(value, methodName) {
|
|
5711
|
-
return
|
|
5711
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, value) && methodName in value && typeof value[methodName] === "function";
|
|
5712
5712
|
}
|
|
5713
5713
|
function isSupportedHuggingFaceModule(value) {
|
|
5714
|
-
if (!
|
|
5714
|
+
if (!_chunkV32LW47Zjs.isObject.call(void 0, value)) {
|
|
5715
5715
|
return false;
|
|
5716
5716
|
}
|
|
5717
5717
|
return HUGGINGFACE_CONSTRUCTOR_KEYS.some(
|
|
@@ -5819,14 +5819,14 @@ function wrapChatCompletion2(original, endpointUrl) {
|
|
|
5819
5819
|
const context = {
|
|
5820
5820
|
arguments: [traceParams]
|
|
5821
5821
|
};
|
|
5822
|
-
return
|
|
5822
|
+
return _chunk4AQGZS6Xjs.huggingFaceChannels.chatCompletion.tracePromise(
|
|
5823
5823
|
() => original(params, options),
|
|
5824
5824
|
context
|
|
5825
5825
|
);
|
|
5826
5826
|
};
|
|
5827
5827
|
}
|
|
5828
5828
|
function wrapChatCompletionStream(original, endpointUrl) {
|
|
5829
|
-
return (params, options) =>
|
|
5829
|
+
return (params, options) => _chunk4AQGZS6Xjs.huggingFaceChannels.chatCompletionStream.traceSync(
|
|
5830
5830
|
() => original(params, options),
|
|
5831
5831
|
{
|
|
5832
5832
|
arguments: [withEndpointUrl(params, endpointUrl)]
|
|
@@ -5839,14 +5839,14 @@ function wrapTextGeneration(original, endpointUrl) {
|
|
|
5839
5839
|
const context = {
|
|
5840
5840
|
arguments: [traceParams]
|
|
5841
5841
|
};
|
|
5842
|
-
return
|
|
5842
|
+
return _chunk4AQGZS6Xjs.huggingFaceChannels.textGeneration.tracePromise(
|
|
5843
5843
|
() => original(params, options),
|
|
5844
5844
|
context
|
|
5845
5845
|
);
|
|
5846
5846
|
};
|
|
5847
5847
|
}
|
|
5848
5848
|
function wrapTextGenerationStream(original, endpointUrl) {
|
|
5849
|
-
return (params, options) =>
|
|
5849
|
+
return (params, options) => _chunk4AQGZS6Xjs.huggingFaceChannels.textGenerationStream.traceSync(
|
|
5850
5850
|
() => original(params, options),
|
|
5851
5851
|
{
|
|
5852
5852
|
arguments: [withEndpointUrl(params, endpointUrl)]
|
|
@@ -5859,7 +5859,7 @@ function wrapFeatureExtraction(original, endpointUrl) {
|
|
|
5859
5859
|
const context = {
|
|
5860
5860
|
arguments: [traceParams]
|
|
5861
5861
|
};
|
|
5862
|
-
return
|
|
5862
|
+
return _chunk4AQGZS6Xjs.huggingFaceChannels.featureExtraction.tracePromise(
|
|
5863
5863
|
() => original(params, options),
|
|
5864
5864
|
context
|
|
5865
5865
|
);
|
|
@@ -5877,7 +5877,7 @@ var PIPELINE_CONSTRUCTOR_KEYS = /* @__PURE__ */ new Set([
|
|
|
5877
5877
|
var wrappedValues = /* @__PURE__ */ new WeakMap();
|
|
5878
5878
|
function wrapHuggingFaceTransformers(transformers) {
|
|
5879
5879
|
const pipelineTask = _optionalChain([transformers, 'optionalAccess', _141 => _141.task]);
|
|
5880
|
-
if (typeof transformers === "function" &&
|
|
5880
|
+
if (typeof transformers === "function" && _chunk4AQGZS6Xjs.isSupportedHuggingFaceTransformersTask.call(void 0, pipelineTask)) {
|
|
5881
5881
|
return wrapPipeline(transformers);
|
|
5882
5882
|
}
|
|
5883
5883
|
if (!isSupportedModule(transformers)) {
|
|
@@ -5929,8 +5929,8 @@ function wrapPipelineFactory(factory) {
|
|
|
5929
5929
|
const context = {
|
|
5930
5930
|
arguments: args
|
|
5931
5931
|
};
|
|
5932
|
-
return
|
|
5933
|
-
if (
|
|
5932
|
+
return _chunk4AQGZS6Xjs.huggingFaceTransformersChannels.pipeline.tracePromise(() => Reflect.apply(factory, this, args), context).then((pipeline) => {
|
|
5933
|
+
if (_chunk4AQGZS6Xjs.isSupportedHuggingFaceTransformersTask.call(void 0, _nullishCoalesce(pipeline.task, () => ( task)))) {
|
|
5934
5934
|
return wrapPipeline(pipeline);
|
|
5935
5935
|
}
|
|
5936
5936
|
return pipeline;
|
|
@@ -5948,7 +5948,7 @@ function wrapPipelineConstructor(constructor) {
|
|
|
5948
5948
|
const proxy = new Proxy(constructor, {
|
|
5949
5949
|
construct(target, args, newTarget) {
|
|
5950
5950
|
const pipeline = Reflect.construct(target, args, newTarget);
|
|
5951
|
-
if (
|
|
5951
|
+
if (_chunk4AQGZS6Xjs.isSupportedHuggingFaceTransformersTask.call(void 0, pipeline.task)) {
|
|
5952
5952
|
return wrapPipeline(pipeline);
|
|
5953
5953
|
}
|
|
5954
5954
|
return pipeline;
|
|
@@ -5969,7 +5969,7 @@ function wrapPipeline(pipeline) {
|
|
|
5969
5969
|
arguments: args,
|
|
5970
5970
|
self: target
|
|
5971
5971
|
};
|
|
5972
|
-
return
|
|
5972
|
+
return _chunk4AQGZS6Xjs.huggingFaceTransformersChannels.pipelineCall.tracePromise(
|
|
5973
5973
|
() => Reflect.apply(target, thisArg, args),
|
|
5974
5974
|
context
|
|
5975
5975
|
);
|
|
@@ -6020,7 +6020,7 @@ function wrapCallModel(callModelFn, defaultThis) {
|
|
|
6020
6020
|
const request = cloneCallModelRequest(argArray[0]);
|
|
6021
6021
|
const options = argArray[1];
|
|
6022
6022
|
const invocationTarget = thisArg === void 0 ? _nullishCoalesce(defaultThis, () => ( thisArg)) : thisArg;
|
|
6023
|
-
return
|
|
6023
|
+
return _chunk4AQGZS6Xjs.openRouterAgentChannels.callModel.traceSync(
|
|
6024
6024
|
() => Reflect.apply(target, invocationTarget, [request, options]),
|
|
6025
6025
|
{
|
|
6026
6026
|
arguments: [request]
|
|
@@ -6116,24 +6116,24 @@ function rerankProxy(rerank) {
|
|
|
6116
6116
|
});
|
|
6117
6117
|
}
|
|
6118
6118
|
function wrapChatSend(send) {
|
|
6119
|
-
return (request, options) =>
|
|
6119
|
+
return (request, options) => _chunk4AQGZS6Xjs.openRouterChannels.chatSend.tracePromise(() => send(request, options), {
|
|
6120
6120
|
arguments: [request]
|
|
6121
6121
|
});
|
|
6122
6122
|
}
|
|
6123
6123
|
function wrapEmbeddingsGenerate(generate) {
|
|
6124
|
-
return (request, options) =>
|
|
6124
|
+
return (request, options) => _chunk4AQGZS6Xjs.openRouterChannels.embeddingsGenerate.tracePromise(
|
|
6125
6125
|
() => generate(request, options),
|
|
6126
6126
|
{ arguments: [request] }
|
|
6127
6127
|
);
|
|
6128
6128
|
}
|
|
6129
6129
|
function wrapResponsesSend(send) {
|
|
6130
|
-
return (request, options) =>
|
|
6130
|
+
return (request, options) => _chunk4AQGZS6Xjs.openRouterChannels.betaResponsesSend.tracePromise(
|
|
6131
6131
|
() => send(request, options),
|
|
6132
6132
|
{ arguments: [request] }
|
|
6133
6133
|
);
|
|
6134
6134
|
}
|
|
6135
6135
|
function wrapRerank2(rerank) {
|
|
6136
|
-
return (request, options) =>
|
|
6136
|
+
return (request, options) => _chunk4AQGZS6Xjs.openRouterChannels.rerankRerank.tracePromise(
|
|
6137
6137
|
() => rerank(request, options),
|
|
6138
6138
|
{ arguments: [request] }
|
|
6139
6139
|
);
|
|
@@ -6141,7 +6141,7 @@ function wrapRerank2(rerank) {
|
|
|
6141
6141
|
function wrapCallModel2(callModel) {
|
|
6142
6142
|
return (request, options) => {
|
|
6143
6143
|
const tracedRequest = { ...request };
|
|
6144
|
-
return
|
|
6144
|
+
return _chunk4AQGZS6Xjs.openRouterChannels.callModel.traceSync(
|
|
6145
6145
|
() => callModel(tracedRequest, options),
|
|
6146
6146
|
{
|
|
6147
6147
|
arguments: [tracedRequest]
|
|
@@ -6274,7 +6274,7 @@ function classifiersProxy(classifiers) {
|
|
|
6274
6274
|
});
|
|
6275
6275
|
}
|
|
6276
6276
|
function wrapChatComplete(complete) {
|
|
6277
|
-
return (request, options) =>
|
|
6277
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.chatComplete.tracePromise(
|
|
6278
6278
|
() => complete(request, options),
|
|
6279
6279
|
{
|
|
6280
6280
|
arguments: [request]
|
|
@@ -6282,52 +6282,52 @@ function wrapChatComplete(complete) {
|
|
|
6282
6282
|
);
|
|
6283
6283
|
}
|
|
6284
6284
|
function wrapChatStream(stream) {
|
|
6285
|
-
return (request, options) =>
|
|
6285
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.chatStream.tracePromise(() => stream(request, options), {
|
|
6286
6286
|
arguments: [request]
|
|
6287
6287
|
});
|
|
6288
6288
|
}
|
|
6289
6289
|
function wrapEmbeddingsCreate(create) {
|
|
6290
|
-
return (request, options) =>
|
|
6290
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.embeddingsCreate.tracePromise(
|
|
6291
6291
|
() => create(request, options),
|
|
6292
6292
|
{ arguments: [request] }
|
|
6293
6293
|
);
|
|
6294
6294
|
}
|
|
6295
6295
|
function wrapClassifiersModerate(moderate) {
|
|
6296
|
-
return (request, options) =>
|
|
6296
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.classifiersModerate.tracePromise(
|
|
6297
6297
|
() => moderate(request, options),
|
|
6298
6298
|
{ arguments: [request] }
|
|
6299
6299
|
);
|
|
6300
6300
|
}
|
|
6301
6301
|
function wrapClassifiersModerateChat(moderateChat) {
|
|
6302
|
-
return (request, options) =>
|
|
6302
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.classifiersModerateChat.tracePromise(
|
|
6303
6303
|
() => moderateChat(request, options),
|
|
6304
6304
|
{ arguments: [request] }
|
|
6305
6305
|
);
|
|
6306
6306
|
}
|
|
6307
6307
|
function wrapClassifiersClassify(classify) {
|
|
6308
|
-
return (request, options) =>
|
|
6308
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.classifiersClassify.tracePromise(
|
|
6309
6309
|
() => classify(request, options),
|
|
6310
6310
|
{ arguments: [request] }
|
|
6311
6311
|
);
|
|
6312
6312
|
}
|
|
6313
6313
|
function wrapClassifiersClassifyChat(classifyChat) {
|
|
6314
|
-
return (request, options) =>
|
|
6314
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.classifiersClassifyChat.tracePromise(
|
|
6315
6315
|
() => classifyChat(request, options),
|
|
6316
6316
|
{ arguments: [request] }
|
|
6317
6317
|
);
|
|
6318
6318
|
}
|
|
6319
6319
|
function wrapFimComplete(complete) {
|
|
6320
|
-
return (request, options) =>
|
|
6320
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.fimComplete.tracePromise(() => complete(request, options), {
|
|
6321
6321
|
arguments: [request]
|
|
6322
6322
|
});
|
|
6323
6323
|
}
|
|
6324
6324
|
function wrapFimStream(stream) {
|
|
6325
|
-
return (request, options) =>
|
|
6325
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.fimStream.tracePromise(() => stream(request, options), {
|
|
6326
6326
|
arguments: [request]
|
|
6327
6327
|
});
|
|
6328
6328
|
}
|
|
6329
6329
|
function wrapAgentsComplete(complete) {
|
|
6330
|
-
return (request, options) =>
|
|
6330
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.agentsComplete.tracePromise(
|
|
6331
6331
|
() => complete(request, options),
|
|
6332
6332
|
{
|
|
6333
6333
|
arguments: [request]
|
|
@@ -6335,7 +6335,7 @@ function wrapAgentsComplete(complete) {
|
|
|
6335
6335
|
);
|
|
6336
6336
|
}
|
|
6337
6337
|
function wrapAgentsStream(stream) {
|
|
6338
|
-
return (request, options) =>
|
|
6338
|
+
return (request, options) => _chunk4AQGZS6Xjs.mistralChannels.agentsStream.tracePromise(() => stream(request, options), {
|
|
6339
6339
|
arguments: [request]
|
|
6340
6340
|
});
|
|
6341
6341
|
}
|
|
@@ -6345,12 +6345,12 @@ function wrapOllama(ollama) {
|
|
|
6345
6345
|
if (isSupportedOllamaClient(ollama)) {
|
|
6346
6346
|
return ollamaProxy(ollama);
|
|
6347
6347
|
}
|
|
6348
|
-
|
|
6348
|
+
_chunk4AQGZS6Xjs.debugLogger.warn("Unsupported Ollama library. Not wrapping.");
|
|
6349
6349
|
return ollama;
|
|
6350
6350
|
}
|
|
6351
6351
|
var ollamaProxyCache = /* @__PURE__ */ new WeakMap();
|
|
6352
6352
|
function isSupportedOllamaClient(value) {
|
|
6353
|
-
return
|
|
6353
|
+
return _chunkV32LW47Zjs.isObject.call(void 0, value) && ["chat", "generate", "embed"].some(
|
|
6354
6354
|
(name) => typeof value[name] === "function"
|
|
6355
6355
|
);
|
|
6356
6356
|
}
|
|
@@ -6402,17 +6402,17 @@ function ollamaProxy(ollama) {
|
|
|
6402
6402
|
return proxy;
|
|
6403
6403
|
}
|
|
6404
6404
|
function wrapChat(chat) {
|
|
6405
|
-
return (request) =>
|
|
6405
|
+
return (request) => _chunk4AQGZS6Xjs.ollamaChannels.chat.tracePromise(() => chat(request), {
|
|
6406
6406
|
arguments: [request]
|
|
6407
6407
|
});
|
|
6408
6408
|
}
|
|
6409
6409
|
function wrapGenerate2(generate) {
|
|
6410
|
-
return (request) =>
|
|
6410
|
+
return (request) => _chunk4AQGZS6Xjs.ollamaChannels.generate.tracePromise(() => generate(request), {
|
|
6411
6411
|
arguments: [request]
|
|
6412
6412
|
});
|
|
6413
6413
|
}
|
|
6414
6414
|
function wrapEmbed3(embed) {
|
|
6415
|
-
return (request) =>
|
|
6415
|
+
return (request) => _chunk4AQGZS6Xjs.ollamaChannels.embed.tracePromise(() => embed(request), {
|
|
6416
6416
|
arguments: [request]
|
|
6417
6417
|
});
|
|
6418
6418
|
}
|
|
@@ -6465,22 +6465,22 @@ function cohereProxy(cohere) {
|
|
|
6465
6465
|
return proxy;
|
|
6466
6466
|
}
|
|
6467
6467
|
function wrapChat2(chat) {
|
|
6468
|
-
return (request, options) =>
|
|
6468
|
+
return (request, options) => _chunk4AQGZS6Xjs.cohereChannels.chat.tracePromise(() => chat(request, options), {
|
|
6469
6469
|
arguments: [request]
|
|
6470
6470
|
});
|
|
6471
6471
|
}
|
|
6472
6472
|
function wrapChatStream2(chatStream) {
|
|
6473
|
-
return (request, options) =>
|
|
6473
|
+
return (request, options) => _chunk4AQGZS6Xjs.cohereChannels.chatStream.tracePromise(() => chatStream(request, options), {
|
|
6474
6474
|
arguments: [request]
|
|
6475
6475
|
});
|
|
6476
6476
|
}
|
|
6477
6477
|
function wrapEmbed4(embed) {
|
|
6478
|
-
return (request, options) =>
|
|
6478
|
+
return (request, options) => _chunk4AQGZS6Xjs.cohereChannels.embed.tracePromise(() => embed(request, options), {
|
|
6479
6479
|
arguments: [request]
|
|
6480
6480
|
});
|
|
6481
6481
|
}
|
|
6482
6482
|
function wrapRerank3(rerank) {
|
|
6483
|
-
return (request, options) =>
|
|
6483
|
+
return (request, options) => _chunk4AQGZS6Xjs.cohereChannels.rerank.tracePromise(() => rerank(request, options), {
|
|
6484
6484
|
arguments: [request]
|
|
6485
6485
|
});
|
|
6486
6486
|
}
|
|
@@ -6518,7 +6518,7 @@ function voyageAIProxy(client) {
|
|
|
6518
6518
|
if (typeof target.embed !== "function") {
|
|
6519
6519
|
return target.embed;
|
|
6520
6520
|
}
|
|
6521
|
-
return (request, options) =>
|
|
6521
|
+
return (request, options) => _chunk4AQGZS6Xjs.voyageAIChannels.embed.invoke(
|
|
6522
6522
|
target.embed,
|
|
6523
6523
|
target,
|
|
6524
6524
|
[request, options],
|
|
@@ -6528,7 +6528,7 @@ function voyageAIProxy(client) {
|
|
|
6528
6528
|
if (typeof target.multimodalEmbed !== "function") {
|
|
6529
6529
|
return target.multimodalEmbed;
|
|
6530
6530
|
}
|
|
6531
|
-
return (request, options) =>
|
|
6531
|
+
return (request, options) => _chunk4AQGZS6Xjs.voyageAIChannels.multimodalEmbed.invoke(
|
|
6532
6532
|
target.multimodalEmbed,
|
|
6533
6533
|
target,
|
|
6534
6534
|
[request, options],
|
|
@@ -6538,7 +6538,7 @@ function voyageAIProxy(client) {
|
|
|
6538
6538
|
if (typeof target.rerank !== "function") {
|
|
6539
6539
|
return target.rerank;
|
|
6540
6540
|
}
|
|
6541
|
-
return (request, options) =>
|
|
6541
|
+
return (request, options) => _chunk4AQGZS6Xjs.voyageAIChannels.rerank.invoke(
|
|
6542
6542
|
target.rerank,
|
|
6543
6543
|
target,
|
|
6544
6544
|
[request, options],
|
|
@@ -6548,7 +6548,7 @@ function voyageAIProxy(client) {
|
|
|
6548
6548
|
if (typeof target.contextualizedEmbed !== "function") {
|
|
6549
6549
|
return target.contextualizedEmbed;
|
|
6550
6550
|
}
|
|
6551
|
-
return (request, options) =>
|
|
6551
|
+
return (request, options) => _chunk4AQGZS6Xjs.voyageAIChannels.contextualizedEmbed.invoke(
|
|
6552
6552
|
target.contextualizedEmbed,
|
|
6553
6553
|
target,
|
|
6554
6554
|
[request, options],
|
|
@@ -6640,13 +6640,13 @@ function groqProxy(groq) {
|
|
|
6640
6640
|
return topLevelProxy;
|
|
6641
6641
|
}
|
|
6642
6642
|
function wrapChatCompletionsCreate(create) {
|
|
6643
|
-
return (request, options) =>
|
|
6643
|
+
return (request, options) => _chunk4AQGZS6Xjs.groqChannels.chatCompletionsCreate.tracePromise(
|
|
6644
6644
|
() => create(request, options),
|
|
6645
6645
|
{ arguments: [request] }
|
|
6646
6646
|
);
|
|
6647
6647
|
}
|
|
6648
6648
|
function wrapEmbeddingsCreate2(create) {
|
|
6649
|
-
return (request, options) =>
|
|
6649
|
+
return (request, options) => _chunk4AQGZS6Xjs.groqChannels.embeddingsCreate.tracePromise(() => create(request, options), {
|
|
6650
6650
|
arguments: [request]
|
|
6651
6651
|
});
|
|
6652
6652
|
}
|
|
@@ -6720,16 +6720,16 @@ function bedrockRuntimeProxy(client) {
|
|
|
6720
6720
|
}
|
|
6721
6721
|
function wrapSend(send) {
|
|
6722
6722
|
return (command, optionsOrCb, cb) => {
|
|
6723
|
-
if (
|
|
6723
|
+
if (_chunkV32LW47Zjs.getBedrockRuntimeOperation.call(void 0, command) === void 0 || typeof optionsOrCb === "function" || typeof cb === "function") {
|
|
6724
6724
|
return send(command, optionsOrCb, cb);
|
|
6725
6725
|
}
|
|
6726
|
-
return
|
|
6727
|
-
() =>
|
|
6726
|
+
return _chunk4AQGZS6Xjs.bedrockRuntimeChannels.clientSend.tracePromise(
|
|
6727
|
+
() => _chunkV32LW47Zjs.runWithAutoInstrumentationSuppressed.call(void 0,
|
|
6728
6728
|
() => send(command, optionsOrCb)
|
|
6729
6729
|
),
|
|
6730
6730
|
{
|
|
6731
6731
|
arguments: [command, optionsOrCb],
|
|
6732
|
-
span_info:
|
|
6732
|
+
span_info: _chunkV32LW47Zjs.buildBedrockRuntimeSpanInfo.call(void 0, command)
|
|
6733
6733
|
}
|
|
6734
6734
|
);
|
|
6735
6735
|
};
|
|
@@ -6778,13 +6778,13 @@ function copilotClientProxy(client) {
|
|
|
6778
6778
|
return proxy;
|
|
6779
6779
|
}
|
|
6780
6780
|
function wrappedCreateSession(client) {
|
|
6781
|
-
return (config) =>
|
|
6781
|
+
return (config) => _chunk4AQGZS6Xjs.gitHubCopilotChannels.createSession.tracePromise(
|
|
6782
6782
|
() => client.createSession(config),
|
|
6783
6783
|
{ arguments: [config] }
|
|
6784
6784
|
);
|
|
6785
6785
|
}
|
|
6786
6786
|
function wrappedResumeSession(client) {
|
|
6787
|
-
return (sessionId, config) =>
|
|
6787
|
+
return (sessionId, config) => _chunk4AQGZS6Xjs.gitHubCopilotChannels.resumeSession.tracePromise(
|
|
6788
6788
|
() => client.resumeSession(sessionId, config),
|
|
6789
6789
|
{ arguments: [sessionId, config] }
|
|
6790
6790
|
);
|
|
@@ -6962,13 +6962,13 @@ function wrapRunTreeInstance(runTree) {
|
|
|
6962
6962
|
wrapped = (...args) => wrapRunTreeInstance(Reflect.apply(value, target, args));
|
|
6963
6963
|
} else if (prop === "postRun") {
|
|
6964
6964
|
const method = value;
|
|
6965
|
-
wrapped = (...args) =>
|
|
6965
|
+
wrapped = (...args) => _chunk4AQGZS6Xjs.langSmithChannels.createRun.tracePromise(
|
|
6966
6966
|
() => Reflect.apply(method, target, args),
|
|
6967
6967
|
{ arguments: [target] }
|
|
6968
6968
|
);
|
|
6969
6969
|
} else if (prop === "patchRun") {
|
|
6970
6970
|
const method = value;
|
|
6971
|
-
wrapped = (...args) =>
|
|
6971
|
+
wrapped = (...args) => _chunk4AQGZS6Xjs.langSmithChannels.updateRun.tracePromise(
|
|
6972
6972
|
() => Reflect.apply(method, target, args),
|
|
6973
6973
|
{
|
|
6974
6974
|
arguments: [
|
|
@@ -7017,19 +7017,19 @@ function wrapClientInstance(client) {
|
|
|
7017
7017
|
let wrapped;
|
|
7018
7018
|
if (prop === "createRun") {
|
|
7019
7019
|
const method = value;
|
|
7020
|
-
wrapped = (...args) =>
|
|
7020
|
+
wrapped = (...args) => _chunk4AQGZS6Xjs.langSmithChannels.createRun.tracePromise(
|
|
7021
7021
|
() => Reflect.apply(method, target, args),
|
|
7022
7022
|
{ arguments: args }
|
|
7023
7023
|
);
|
|
7024
7024
|
} else if (prop === "updateRun") {
|
|
7025
7025
|
const method = value;
|
|
7026
|
-
wrapped = (...args) =>
|
|
7026
|
+
wrapped = (...args) => _chunk4AQGZS6Xjs.langSmithChannels.updateRun.tracePromise(
|
|
7027
7027
|
() => Reflect.apply(method, target, args),
|
|
7028
7028
|
{ arguments: args }
|
|
7029
7029
|
);
|
|
7030
7030
|
} else if (prop === "batchIngestRuns") {
|
|
7031
7031
|
const method = value;
|
|
7032
|
-
wrapped = (...args) =>
|
|
7032
|
+
wrapped = (...args) => _chunk4AQGZS6Xjs.langSmithChannels.batchIngestRuns.tracePromise(
|
|
7033
7033
|
() => Reflect.apply(method, target, args),
|
|
7034
7034
|
{ arguments: args }
|
|
7035
7035
|
);
|
|
@@ -7045,13 +7045,13 @@ function publishRunUpdate(runTree) {
|
|
|
7045
7045
|
return;
|
|
7046
7046
|
}
|
|
7047
7047
|
try {
|
|
7048
|
-
void
|
|
7048
|
+
void _chunk4AQGZS6Xjs.langSmithChannels.updateRun.tracePromise(() => Promise.resolve(void 0), {
|
|
7049
7049
|
arguments: [runTree.id, runTree]
|
|
7050
7050
|
}).catch((error) => {
|
|
7051
|
-
|
|
7051
|
+
_chunk4AQGZS6Xjs.debugLogger.error("LangSmith traceable instrumentation failed:", error);
|
|
7052
7052
|
});
|
|
7053
7053
|
} catch (error) {
|
|
7054
|
-
|
|
7054
|
+
_chunk4AQGZS6Xjs.debugLogger.error("LangSmith traceable instrumentation failed:", error);
|
|
7055
7055
|
}
|
|
7056
7056
|
}
|
|
7057
7057
|
|
|
@@ -7063,7 +7063,7 @@ var VitestContextManager = class {
|
|
|
7063
7063
|
*/
|
|
7064
7064
|
|
|
7065
7065
|
constructor() {
|
|
7066
|
-
this.contextStorage =
|
|
7066
|
+
this.contextStorage = _chunk4AQGZS6Xjs.isomorph_default.newAsyncLocalStorage();
|
|
7067
7067
|
}
|
|
7068
7068
|
getCurrentContext() {
|
|
7069
7069
|
return this.contextStorage.getStore();
|
|
@@ -7101,7 +7101,7 @@ var FlushCoordinator = (_class3 = class {constructor() { _class3.prototype.__ini
|
|
|
7101
7101
|
if (this.activeFlushes.has(experimentId)) {
|
|
7102
7102
|
return this.activeFlushes.get(experimentId);
|
|
7103
7103
|
}
|
|
7104
|
-
const flushPromise =
|
|
7104
|
+
const flushPromise = _chunkV32LW47Zjs.summarizeAndFlush.call(void 0, context.experiment, {
|
|
7105
7105
|
displaySummary: config.displaySummary
|
|
7106
7106
|
});
|
|
7107
7107
|
this.activeFlushes.set(experimentId, flushPromise);
|
|
@@ -7170,8 +7170,8 @@ function normalizeScores(result) {
|
|
|
7170
7170
|
(s) => s !== null && s !== void 0 && typeof s === "object" && isScore(s)
|
|
7171
7171
|
);
|
|
7172
7172
|
}
|
|
7173
|
-
if (typeof result === "object" && result !== null &&
|
|
7174
|
-
return [result];
|
|
7173
|
+
if (typeof result === "object" && result !== null && "score" in result) {
|
|
7174
|
+
return [{ ...result, name: _nullishCoalesce(result.name, () => ( "score")) }];
|
|
7175
7175
|
}
|
|
7176
7176
|
return [];
|
|
7177
7177
|
}
|
|
@@ -7199,7 +7199,7 @@ async function runTracedEval(args) {
|
|
|
7199
7199
|
}
|
|
7200
7200
|
if (testError) {
|
|
7201
7201
|
span.log({ scores: { pass: 0 } });
|
|
7202
|
-
|
|
7202
|
+
_chunkV32LW47Zjs.logError.call(void 0, span, testError);
|
|
7203
7203
|
throw testError;
|
|
7204
7204
|
}
|
|
7205
7205
|
span.log({
|
|
@@ -7373,10 +7373,10 @@ function wrapDescribe(originalDescribe, config, afterAll) {
|
|
|
7373
7373
|
const getOrCreateContext = () => {
|
|
7374
7374
|
if (!context) {
|
|
7375
7375
|
const experimentName = `${suiteName}-${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
7376
|
-
const experiment = config.projectId ?
|
|
7376
|
+
const experiment = config.projectId ? _chunkV32LW47Zjs.initExperiment.call(void 0, {
|
|
7377
7377
|
projectId: config.projectId,
|
|
7378
7378
|
experiment: experimentName
|
|
7379
|
-
}) :
|
|
7379
|
+
}) : _chunkV32LW47Zjs.initExperiment.call(void 0, config.projectName || suiteName, {
|
|
7380
7380
|
experiment: experimentName
|
|
7381
7381
|
});
|
|
7382
7382
|
context = contextManager.createChildContext(void 0, experiment);
|
|
@@ -7483,7 +7483,7 @@ function wrapExpect(originalExpect) {
|
|
|
7483
7483
|
return originalExpect(value);
|
|
7484
7484
|
}
|
|
7485
7485
|
const assertion = originalExpect(value, message);
|
|
7486
|
-
const span =
|
|
7486
|
+
const span = _chunkV32LW47Zjs.currentSpan.call(void 0, );
|
|
7487
7487
|
if (!span) {
|
|
7488
7488
|
return assertion;
|
|
7489
7489
|
}
|
|
@@ -7495,16 +7495,16 @@ function wrapExpect(originalExpect) {
|
|
|
7495
7495
|
|
|
7496
7496
|
// src/wrappers/shared/logging.ts
|
|
7497
7497
|
function logOutputs(outputs) {
|
|
7498
|
-
|
|
7498
|
+
_chunkV32LW47Zjs.currentSpan.call(void 0, ).log({ output: outputs });
|
|
7499
7499
|
}
|
|
7500
7500
|
function logFeedback(feedback) {
|
|
7501
|
-
|
|
7501
|
+
_chunkV32LW47Zjs.currentSpan.call(void 0, ).log({
|
|
7502
7502
|
scores: { [feedback.name]: feedback.score },
|
|
7503
7503
|
metadata: feedback.metadata
|
|
7504
7504
|
});
|
|
7505
7505
|
}
|
|
7506
7506
|
function getCurrentSpan() {
|
|
7507
|
-
return
|
|
7507
|
+
return _chunkV32LW47Zjs.currentSpan.call(void 0, );
|
|
7508
7508
|
}
|
|
7509
7509
|
|
|
7510
7510
|
// src/wrappers/vitest/index.ts
|
|
@@ -7552,7 +7552,7 @@ function wrapVitest(vitestMethods, config = {}) {
|
|
|
7552
7552
|
);
|
|
7553
7553
|
return;
|
|
7554
7554
|
}
|
|
7555
|
-
await
|
|
7555
|
+
await _chunkV32LW47Zjs.summarizeAndFlush.call(void 0, ctx.experiment, {
|
|
7556
7556
|
displaySummary: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _156 => _156.displaySummary]), () => ( config.displaySummary))
|
|
7557
7557
|
});
|
|
7558
7558
|
}
|
|
@@ -7567,7 +7567,7 @@ function initNodeTestSuite(config) {
|
|
|
7567
7567
|
return experiment;
|
|
7568
7568
|
}
|
|
7569
7569
|
const experimentName = config.experimentName || `${config.projectName}-${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
7570
|
-
experiment =
|
|
7570
|
+
experiment = _chunkV32LW47Zjs.initExperiment.call(void 0, config.projectName, {
|
|
7571
7571
|
experiment: experimentName
|
|
7572
7572
|
});
|
|
7573
7573
|
return experiment;
|
|
@@ -7616,7 +7616,7 @@ function initNodeTestSuite(config) {
|
|
|
7616
7616
|
if (!experiment) {
|
|
7617
7617
|
return;
|
|
7618
7618
|
}
|
|
7619
|
-
await
|
|
7619
|
+
await _chunkV32LW47Zjs.summarizeAndFlush.call(void 0, experiment, {
|
|
7620
7620
|
displaySummary: config.displaySummary
|
|
7621
7621
|
});
|
|
7622
7622
|
experiment = void 0;
|
|
@@ -7633,7 +7633,7 @@ function initNodeTestSuite(config) {
|
|
|
7633
7633
|
|
|
7634
7634
|
// src/graph-framework.ts
|
|
7635
7635
|
var graph_framework_exports = {};
|
|
7636
|
-
|
|
7636
|
+
_chunk4AQGZS6Xjs.__export.call(void 0, graph_framework_exports, {
|
|
7637
7637
|
AggregatorNode: () => AggregatorNode,
|
|
7638
7638
|
GateNode: () => GateNode,
|
|
7639
7639
|
GraphBuilder: () => GraphBuilder,
|
|
@@ -7707,7 +7707,7 @@ var GraphBuilder = (_class4 = class {
|
|
|
7707
7707
|
};
|
|
7708
7708
|
}
|
|
7709
7709
|
resolveNode(node) {
|
|
7710
|
-
if (node instanceof
|
|
7710
|
+
if (node instanceof _chunkV32LW47Zjs.Prompt) {
|
|
7711
7711
|
const cached = this.nodeLikeNodes.get(node);
|
|
7712
7712
|
if (cached) {
|
|
7713
7713
|
return [cached, []];
|
|
@@ -7757,7 +7757,7 @@ var GraphBuilder = (_class4 = class {
|
|
|
7757
7757
|
// }
|
|
7758
7758
|
// Helper to generate node IDs
|
|
7759
7759
|
generateId(name) {
|
|
7760
|
-
const uuid =
|
|
7760
|
+
const uuid = _chunkV32LW47Zjs.newId.call(void 0, );
|
|
7761
7761
|
if (name) {
|
|
7762
7762
|
return `${name}-${uuid.slice(0, 8)}`;
|
|
7763
7763
|
} else {
|
|
@@ -8957,7 +8957,7 @@ function waterfall(tasks, callback) {
|
|
|
8957
8957
|
var waterfall$1 = awaitify(waterfall);
|
|
8958
8958
|
|
|
8959
8959
|
// src/trace.ts
|
|
8960
|
-
var SpanFetcher = class _SpanFetcher extends
|
|
8960
|
+
var SpanFetcher = class _SpanFetcher extends _chunkV32LW47Zjs.ObjectFetcher {
|
|
8961
8961
|
constructor(objectType, _objectId, rootSpanId, _state, spanTypeFilter, includeScorers = false, brainstoreRealtime = true) {
|
|
8962
8962
|
const filterExpr = _SpanFetcher.buildFilter(
|
|
8963
8963
|
rootSpanId,
|
|
@@ -9274,20 +9274,20 @@ var promptContentsSchema = _v3.z.union([
|
|
|
9274
9274
|
prompt: _v3.z.string()
|
|
9275
9275
|
}),
|
|
9276
9276
|
_v3.z.object({
|
|
9277
|
-
messages: _v3.z.array(
|
|
9277
|
+
messages: _v3.z.array(_chunkV32LW47Zjs.ChatCompletionMessageParam)
|
|
9278
9278
|
})
|
|
9279
9279
|
]);
|
|
9280
9280
|
var promptDefinitionSchema = promptContentsSchema.and(
|
|
9281
9281
|
_v3.z.object({
|
|
9282
9282
|
model: _v3.z.string(),
|
|
9283
|
-
params:
|
|
9283
|
+
params: _chunkV32LW47Zjs.ModelParams.optional(),
|
|
9284
9284
|
templateFormat: _v3.z.enum(["mustache", "nunjucks", "none"]).optional(),
|
|
9285
9285
|
environments: _v3.z.array(_v3.z.string()).optional()
|
|
9286
9286
|
})
|
|
9287
9287
|
);
|
|
9288
9288
|
var promptDefinitionWithToolsSchema = promptDefinitionSchema.and(
|
|
9289
9289
|
_v3.z.object({
|
|
9290
|
-
tools: _v3.z.array(
|
|
9290
|
+
tools: _v3.z.array(_chunkV32LW47Zjs.ToolFunctionDefinition).optional()
|
|
9291
9291
|
})
|
|
9292
9292
|
);
|
|
9293
9293
|
function promptDefinitionToPromptData(promptDefinition, rawTools) {
|
|
@@ -9335,7 +9335,7 @@ async function validateParameters(parameters, parameterSchema) {
|
|
|
9335
9335
|
if (resolvedSchema === void 0 || resolvedSchema === null) {
|
|
9336
9336
|
return parameters;
|
|
9337
9337
|
}
|
|
9338
|
-
if (
|
|
9338
|
+
if (_chunkV32LW47Zjs.RemoteEvalParameters.isParameters(resolvedSchema)) {
|
|
9339
9339
|
const mergedParameters = parameters && Object.keys(parameters).length > 0 ? {
|
|
9340
9340
|
...resolvedSchema.data,
|
|
9341
9341
|
...parameters
|
|
@@ -9357,14 +9357,14 @@ function validateParametersWithZod(parameters, parameterSchema) {
|
|
|
9357
9357
|
const value = parameters[name];
|
|
9358
9358
|
try {
|
|
9359
9359
|
if ("type" in schema && schema.type === "prompt") {
|
|
9360
|
-
const promptData = value ?
|
|
9360
|
+
const promptData = value ? _chunkV32LW47Zjs.PromptData.parse(value) : schema.default ? promptDefinitionToPromptData(
|
|
9361
9361
|
schema.default,
|
|
9362
9362
|
schema.default.tools
|
|
9363
9363
|
) : void 0;
|
|
9364
9364
|
if (!promptData) {
|
|
9365
9365
|
throw new Error(`Parameter '${name}' is required`);
|
|
9366
9366
|
}
|
|
9367
|
-
return [name,
|
|
9367
|
+
return [name, _chunkV32LW47Zjs.Prompt.fromPromptData(name, promptData)];
|
|
9368
9368
|
} else if ("type" in schema && schema.type === "model") {
|
|
9369
9369
|
const model = _nullishCoalesce(value, () => ( schema.default));
|
|
9370
9370
|
if (model === void 0) {
|
|
@@ -9415,7 +9415,7 @@ function rehydrateRemoteParameters(parameters, schema) {
|
|
|
9415
9415
|
if (Reflect.get(propertySchema, "x-bt-type") === "prompt") {
|
|
9416
9416
|
return [
|
|
9417
9417
|
name,
|
|
9418
|
-
|
|
9418
|
+
_chunkV32LW47Zjs.Prompt.fromPromptData(name, _chunkV32LW47Zjs.PromptData.parse(value))
|
|
9419
9419
|
];
|
|
9420
9420
|
}
|
|
9421
9421
|
return [name, value];
|
|
@@ -9465,7 +9465,7 @@ function makeEvalName(projectName, experimentName) {
|
|
|
9465
9465
|
return out;
|
|
9466
9466
|
}
|
|
9467
9467
|
function initExperiment2(state, options = {}) {
|
|
9468
|
-
return
|
|
9468
|
+
return _chunkV32LW47Zjs.init.call(void 0, {
|
|
9469
9469
|
state,
|
|
9470
9470
|
...options,
|
|
9471
9471
|
setCurrent: false
|
|
@@ -9476,7 +9476,7 @@ async function getExperimentParametersRef(parameters) {
|
|
|
9476
9476
|
return void 0;
|
|
9477
9477
|
}
|
|
9478
9478
|
const resolvedParameters = parameters instanceof Promise ? await parameters : parameters;
|
|
9479
|
-
if (!
|
|
9479
|
+
if (!_chunkV32LW47Zjs.RemoteEvalParameters.isParameters(resolvedParameters)) {
|
|
9480
9480
|
return void 0;
|
|
9481
9481
|
}
|
|
9482
9482
|
if (resolvedParameters.id === void 0) {
|
|
@@ -9503,7 +9503,7 @@ async function _internalInitEvaluatorExperiment(projectName, evaluator, data, op
|
|
|
9503
9503
|
baseExperimentId: evaluator.baseExperimentId,
|
|
9504
9504
|
gitMetadataSettings: evaluator.gitMetadataSettings,
|
|
9505
9505
|
repoInfo: evaluator.repoInfo,
|
|
9506
|
-
dataset:
|
|
9506
|
+
dataset: _chunkV32LW47Zjs.Dataset.isDataset(data) ? data : void 0,
|
|
9507
9507
|
parameters
|
|
9508
9508
|
});
|
|
9509
9509
|
}
|
|
@@ -9539,7 +9539,7 @@ async function _internalResolveEvaluatorData(evaluator, experiment) {
|
|
|
9539
9539
|
);
|
|
9540
9540
|
}
|
|
9541
9541
|
let name = dataResult.name;
|
|
9542
|
-
if (
|
|
9542
|
+
if (_chunkV32LW47Zjs.isEmpty.call(void 0, name)) {
|
|
9543
9543
|
const baseExperiment = await experiment.fetchBaseExperiment();
|
|
9544
9544
|
if (!baseExperiment) {
|
|
9545
9545
|
throw new Error("BaseExperiment() failed to fetch base experiment");
|
|
@@ -9574,10 +9574,10 @@ globalThis._evals = {
|
|
|
9574
9574
|
reporters: {}
|
|
9575
9575
|
};
|
|
9576
9576
|
function _initializeSpanContext() {
|
|
9577
|
-
globalThis._spanContext = { currentSpan:
|
|
9577
|
+
globalThis._spanContext = { currentSpan: _chunkV32LW47Zjs.currentSpan, withCurrent: _chunkV32LW47Zjs.withCurrent, startSpan: _chunkV32LW47Zjs.startSpan, NOOP_SPAN: _chunkV32LW47Zjs.NOOP_SPAN };
|
|
9578
9578
|
}
|
|
9579
9579
|
async function Eval(name, evaluator, reporterOrOpts) {
|
|
9580
|
-
const options =
|
|
9580
|
+
const options = _chunkV32LW47Zjs.isEmpty.call(void 0, reporterOrOpts) ? {} : typeof reporterOrOpts === "string" ? { reporter: reporterOrOpts } : "name" in reporterOrOpts ? { reporter: reporterOrOpts } : reporterOrOpts;
|
|
9581
9581
|
let evalName = makeEvalName(name, evaluator.experimentName);
|
|
9582
9582
|
if (globalThis._evals.evaluators[evalName]) {
|
|
9583
9583
|
evalName = `${evalName}_${Object.keys(_evals).length}`;
|
|
@@ -9636,7 +9636,7 @@ async function Eval(name, evaluator, reporterOrOpts) {
|
|
|
9636
9636
|
const enableCache = _nullishCoalesce(options.enableCache, () => ( true));
|
|
9637
9637
|
let ret;
|
|
9638
9638
|
if (options.parent) {
|
|
9639
|
-
ret = await
|
|
9639
|
+
ret = await _chunkV32LW47Zjs.withParent.call(void 0,
|
|
9640
9640
|
options.parent,
|
|
9641
9641
|
() => runEvaluator(
|
|
9642
9642
|
null,
|
|
@@ -9672,7 +9672,7 @@ async function Eval(name, evaluator, reporterOrOpts) {
|
|
|
9672
9672
|
if (experiment) {
|
|
9673
9673
|
await experiment.flush().catch(console.error);
|
|
9674
9674
|
} else if (options.parent) {
|
|
9675
|
-
await
|
|
9675
|
+
await _chunkV32LW47Zjs.flush.call(void 0, { state: evaluator.state }).catch(console.error);
|
|
9676
9676
|
}
|
|
9677
9677
|
}
|
|
9678
9678
|
} finally {
|
|
@@ -9754,19 +9754,29 @@ function buildSpanScores(results) {
|
|
|
9754
9754
|
function _internalPrepareEvaluatorScore(scoreValue, name) {
|
|
9755
9755
|
if (scoreValue === null) return { results: null };
|
|
9756
9756
|
if (Array.isArray(scoreValue)) {
|
|
9757
|
+
const names = /* @__PURE__ */ new Set();
|
|
9757
9758
|
for (const score of scoreValue) {
|
|
9758
|
-
if (!(typeof score === "object" && !
|
|
9759
|
+
if (!(typeof score === "object" && !_chunkV32LW47Zjs.isEmpty.call(void 0, score))) {
|
|
9759
9760
|
throw new Error(
|
|
9760
9761
|
`When returning an array of scores, each score must be a non-empty object. Got: ${JSON.stringify(score)}`
|
|
9761
9762
|
);
|
|
9762
9763
|
}
|
|
9764
|
+
if (typeof score.name !== "string") {
|
|
9765
|
+
throw new Error(
|
|
9766
|
+
`When returning an array of scores, each score must have a name. Got: ${JSON.stringify(score)}`
|
|
9767
|
+
);
|
|
9768
|
+
}
|
|
9769
|
+
if (names.has(score.name)) {
|
|
9770
|
+
throw new Error(`Duplicate score name '${score.name}' in score array`);
|
|
9771
|
+
}
|
|
9772
|
+
names.add(score.name);
|
|
9763
9773
|
}
|
|
9764
9774
|
}
|
|
9765
9775
|
let results;
|
|
9766
9776
|
if (Array.isArray(scoreValue)) {
|
|
9767
9777
|
results = scoreValue;
|
|
9768
|
-
} else if (typeof scoreValue === "object" && !
|
|
9769
|
-
results = [scoreValue];
|
|
9778
|
+
} else if (typeof scoreValue === "object" && !_chunkV32LW47Zjs.isEmpty.call(void 0, scoreValue)) {
|
|
9779
|
+
results = [{ ...scoreValue, name: _nullishCoalesce(scoreValue.name, () => ( name)) }];
|
|
9770
9780
|
} else {
|
|
9771
9781
|
results = [{ name, score: scoreValue }];
|
|
9772
9782
|
}
|
|
@@ -9809,7 +9819,7 @@ function collectScoringResults(runResults, names, onResult) {
|
|
|
9809
9819
|
return failing;
|
|
9810
9820
|
}
|
|
9811
9821
|
function validateClassificationResult(value, scorerName2) {
|
|
9812
|
-
if (!(typeof value === "object" && value !== null && !
|
|
9822
|
+
if (!(typeof value === "object" && value !== null && !_chunkV32LW47Zjs.isEmpty.call(void 0, value))) {
|
|
9813
9823
|
throw new Error(
|
|
9814
9824
|
`When returning structured classifier results, each classification must be a non-empty object. Got: ${JSON.stringify(value)}`
|
|
9815
9825
|
);
|
|
@@ -9859,7 +9869,7 @@ function logScoringFailures(kind, failures, metadata, rootSpan, state) {
|
|
|
9859
9869
|
);
|
|
9860
9870
|
metadata[`${kind}_errors`] = errorMap;
|
|
9861
9871
|
rootSpan.log({ metadata: { [`${kind}_errors`]: errorMap } });
|
|
9862
|
-
|
|
9872
|
+
_chunk4AQGZS6Xjs.debugLogger.forState(state).warn(
|
|
9863
9873
|
`Found exceptions for the following ${kind}s: ${Object.keys(errorMap).join(", ")}`,
|
|
9864
9874
|
failures.map((f) => f.error)
|
|
9865
9875
|
);
|
|
@@ -9893,7 +9903,7 @@ var defaultErrorScoreHandler = ({
|
|
|
9893
9903
|
};
|
|
9894
9904
|
async function runEvaluatorInternal(experiment, evaluator, progressReporter, filters, stream, parameters, collectResults, enableCache) {
|
|
9895
9905
|
if (enableCache) {
|
|
9896
|
-
_optionalChain([(_nullishCoalesce(evaluator.state, () => (
|
|
9906
|
+
_optionalChain([(_nullishCoalesce(evaluator.state, () => ( _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, )))), 'optionalAccess', _170 => _170.spanCache, 'optionalAccess', _171 => _171.start, 'call', _172 => _172()]);
|
|
9897
9907
|
}
|
|
9898
9908
|
try {
|
|
9899
9909
|
parameters = await validateParameters(
|
|
@@ -9924,7 +9934,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
9924
9934
|
if (cancelled) {
|
|
9925
9935
|
return;
|
|
9926
9936
|
}
|
|
9927
|
-
const eventDataset = experiment ? experiment.dataset :
|
|
9937
|
+
const eventDataset = experiment ? experiment.dataset : _chunkV32LW47Zjs.Dataset.isDataset(evaluator.data) ? evaluator.data : void 0;
|
|
9928
9938
|
const inlineDatasetOrigin = eventDataset && datum.id && datum._xact_id ? {
|
|
9929
9939
|
object_type: "dataset",
|
|
9930
9940
|
object_id: await eventDataset.id,
|
|
@@ -9932,7 +9942,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
9932
9942
|
created: datum.created,
|
|
9933
9943
|
_xact_id: datum._xact_id
|
|
9934
9944
|
} : void 0;
|
|
9935
|
-
const parsedDatumOrigin =
|
|
9945
|
+
const parsedDatumOrigin = _chunkV32LW47Zjs.ObjectReference.safeParse(datum.origin);
|
|
9936
9946
|
const origin = _nullishCoalesce(inlineDatasetOrigin, () => ( (_optionalChain([parsedDatumOrigin, 'optionalAccess', _173 => _173.success]) ? parsedDatumOrigin.data : void 0)));
|
|
9937
9947
|
const baseEvent = {
|
|
9938
9948
|
name: "eval",
|
|
@@ -9948,23 +9958,23 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
9948
9958
|
}
|
|
9949
9959
|
};
|
|
9950
9960
|
const callback = async (rootSpan) => {
|
|
9951
|
-
const state = _nullishCoalesce(evaluator.state, () => (
|
|
9961
|
+
const state = _nullishCoalesce(evaluator.state, () => ( _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, )));
|
|
9952
9962
|
const ensureSpansFlushed = async () => {
|
|
9953
9963
|
if (experiment) {
|
|
9954
|
-
await
|
|
9964
|
+
await _chunkV32LW47Zjs.flush.call(void 0, { state: experiment.loggingState });
|
|
9955
9965
|
} else if (state) {
|
|
9956
|
-
await
|
|
9966
|
+
await _chunkV32LW47Zjs.flush.call(void 0, { state });
|
|
9957
9967
|
} else {
|
|
9958
|
-
await
|
|
9968
|
+
await _chunkV32LW47Zjs.flush.call(void 0, );
|
|
9959
9969
|
}
|
|
9960
9970
|
if (state) {
|
|
9961
9971
|
await state.flushOtel();
|
|
9962
9972
|
}
|
|
9963
9973
|
};
|
|
9964
9974
|
const parentStr = state.currentParent.getStore();
|
|
9965
|
-
const parentComponents = typeof parentStr === "string" ?
|
|
9975
|
+
const parentComponents = typeof parentStr === "string" ? _chunkV32LW47Zjs.SpanComponentsV4.fromStr(parentStr) : null;
|
|
9966
9976
|
const trace = state ? new LocalTrace({
|
|
9967
|
-
objectType: parentComponents ?
|
|
9977
|
+
objectType: parentComponents ? _chunkV32LW47Zjs.spanObjectTypeV3ToTypedString.call(void 0,
|
|
9968
9978
|
parentComponents.data.object_type
|
|
9969
9979
|
) : "experiment",
|
|
9970
9980
|
objectId: await _asyncNullishCoalesce(await _asyncOptionalChain([parentComponents, 'optionalAccess', async _174 => _174.data, 'access', async _175 => _175.object_id]), async () => ( (experimentIdPromise ? await _asyncNullishCoalesce(await experimentIdPromise, async () => ( "")) : ""))),
|
|
@@ -10029,7 +10039,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10029
10039
|
trace
|
|
10030
10040
|
};
|
|
10031
10041
|
const { trace: _trace, ...scoringArgsForLogging } = scoringArgs;
|
|
10032
|
-
const propagatedEvent =
|
|
10042
|
+
const propagatedEvent = _chunkV32LW47Zjs.makeScorerPropagatedEvent.call(void 0,
|
|
10033
10043
|
await rootSpan.export()
|
|
10034
10044
|
);
|
|
10035
10045
|
const [scoreResults, classificationResults] = await Promise.all([
|
|
@@ -10124,7 +10134,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10124
10134
|
evaluator.state
|
|
10125
10135
|
);
|
|
10126
10136
|
} catch (e) {
|
|
10127
|
-
|
|
10137
|
+
_chunkV32LW47Zjs.logError.call(void 0, rootSpan, e);
|
|
10128
10138
|
error = e;
|
|
10129
10139
|
} finally {
|
|
10130
10140
|
progressReporter.increment(evaluator.evalName);
|
|
@@ -10158,7 +10168,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10158
10168
|
}
|
|
10159
10169
|
};
|
|
10160
10170
|
if (!experiment) {
|
|
10161
|
-
return await
|
|
10171
|
+
return await _chunkV32LW47Zjs.traced.call(void 0, callback, {
|
|
10162
10172
|
...baseEvent,
|
|
10163
10173
|
state: evaluator.state
|
|
10164
10174
|
});
|
|
@@ -10212,7 +10222,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10212
10222
|
const cancel = async () => {
|
|
10213
10223
|
await new Promise((_, reject2) => {
|
|
10214
10224
|
if (cancelled) {
|
|
10215
|
-
reject2(new (0,
|
|
10225
|
+
reject2(new (0, _chunkV32LW47Zjs.InternalAbortError)("Evaluator already cancelled"));
|
|
10216
10226
|
return;
|
|
10217
10227
|
}
|
|
10218
10228
|
const rejectOnce = (error) => {
|
|
@@ -10225,12 +10235,12 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10225
10235
|
};
|
|
10226
10236
|
if (evaluator.timeout) {
|
|
10227
10237
|
timeoutId = setTimeout(() => {
|
|
10228
|
-
rejectOnce(new (0,
|
|
10238
|
+
rejectOnce(new (0, _chunkV32LW47Zjs.InternalAbortError)("Evaluator timed out"));
|
|
10229
10239
|
}, evaluator.timeout);
|
|
10230
10240
|
}
|
|
10231
10241
|
if (evaluator.signal) {
|
|
10232
10242
|
abortHandler = () => {
|
|
10233
|
-
rejectOnce(new (0,
|
|
10243
|
+
rejectOnce(new (0, _chunkV32LW47Zjs.InternalAbortError)("Evaluator aborted"));
|
|
10234
10244
|
};
|
|
10235
10245
|
evaluator.signal.addEventListener("abort", abortHandler);
|
|
10236
10246
|
}
|
|
@@ -10253,9 +10263,9 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10253
10263
|
}
|
|
10254
10264
|
} catch (e) {
|
|
10255
10265
|
q.kill();
|
|
10256
|
-
if (e instanceof
|
|
10257
|
-
if (
|
|
10258
|
-
|
|
10266
|
+
if (e instanceof _chunkV32LW47Zjs.InternalAbortError) {
|
|
10267
|
+
if (_chunk4AQGZS6Xjs.isomorph_default.getEnv("BRAINTRUST_VERBOSE")) {
|
|
10268
|
+
_chunk4AQGZS6Xjs.debugLogger.forState(evaluator.state).warn("Evaluator cancelled:", e.message);
|
|
10259
10269
|
}
|
|
10260
10270
|
}
|
|
10261
10271
|
throw e;
|
|
@@ -10280,7 +10290,7 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
10280
10290
|
);
|
|
10281
10291
|
} finally {
|
|
10282
10292
|
if (enableCache) {
|
|
10283
|
-
const spanCache = _optionalChain([(_nullishCoalesce(evaluator.state, () => (
|
|
10293
|
+
const spanCache = _optionalChain([(_nullishCoalesce(evaluator.state, () => ( _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, )))), 'optionalAccess', _183 => _183.spanCache]);
|
|
10284
10294
|
_optionalChain([spanCache, 'optionalAccess', _184 => _184.dispose, 'call', _185 => _185()]);
|
|
10285
10295
|
_optionalChain([spanCache, 'optionalAccess', _186 => _186.stop, 'call', _187 => _187()]);
|
|
10286
10296
|
}
|
|
@@ -10375,25 +10385,25 @@ var defaultReporter = {
|
|
|
10375
10385
|
reportFailures(evaluator, failingResults, { verbose, jsonl });
|
|
10376
10386
|
}
|
|
10377
10387
|
if (jsonl) {
|
|
10378
|
-
|
|
10388
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(JSON.stringify(summary));
|
|
10379
10389
|
} else {
|
|
10380
|
-
|
|
10381
|
-
|
|
10390
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln("Experiment summary");
|
|
10391
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln("==================");
|
|
10382
10392
|
if (summary.comparisonExperimentName) {
|
|
10383
|
-
|
|
10393
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(
|
|
10384
10394
|
`${summary.comparisonExperimentName} (baseline) <- ${summary.experimentName} (comparison)`
|
|
10385
10395
|
);
|
|
10386
|
-
|
|
10396
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln("");
|
|
10387
10397
|
}
|
|
10388
10398
|
const hasScores = Object.keys(summary.scores).length > 0;
|
|
10389
10399
|
const hasMetrics = Object.keys(_nullishCoalesce(summary.metrics, () => ( {}))).length > 0;
|
|
10390
10400
|
const hasComparison = !!summary.comparisonExperimentName;
|
|
10391
10401
|
if (hasScores || hasMetrics) {
|
|
10392
10402
|
if (hasComparison) {
|
|
10393
|
-
|
|
10403
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(
|
|
10394
10404
|
"Name Value Change Improvements Regressions"
|
|
10395
10405
|
);
|
|
10396
|
-
|
|
10406
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(
|
|
10397
10407
|
"----------------------------------------------------------------"
|
|
10398
10408
|
);
|
|
10399
10409
|
}
|
|
@@ -10402,18 +10412,18 @@ var defaultReporter = {
|
|
|
10402
10412
|
const scoreValue = `${scorePercent}%`;
|
|
10403
10413
|
if (hasComparison) {
|
|
10404
10414
|
let diffString = "-";
|
|
10405
|
-
if (!
|
|
10415
|
+
if (!_chunkV32LW47Zjs.isEmpty.call(void 0, score.diff)) {
|
|
10406
10416
|
const diffPercent = (score.diff * 100).toFixed(2);
|
|
10407
10417
|
const diffSign = score.diff > 0 ? "+" : "";
|
|
10408
10418
|
diffString = `${diffSign}${diffPercent}%`;
|
|
10409
10419
|
}
|
|
10410
10420
|
const improvements = score.improvements > 0 ? score.improvements.toString() : "-";
|
|
10411
10421
|
const regressions = score.regressions > 0 ? score.regressions.toString() : "-";
|
|
10412
|
-
|
|
10422
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(
|
|
10413
10423
|
`${score.name.padEnd(18)} ${scoreValue.padStart(10)} ${diffString.padStart(10)} ${improvements.padStart(12)} ${regressions.padStart(11)}`
|
|
10414
10424
|
);
|
|
10415
10425
|
} else {
|
|
10416
|
-
|
|
10426
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(`${score.name.padEnd(20)} ${scoreValue.padStart(15)}`);
|
|
10417
10427
|
}
|
|
10418
10428
|
}
|
|
10419
10429
|
for (const metric of Object.values(_nullishCoalesce(summary.metrics, () => ( {})))) {
|
|
@@ -10422,30 +10432,30 @@ var defaultReporter = {
|
|
|
10422
10432
|
const metricValue = metric.unit === "$" ? `${metric.unit}${formattedValue}` : `${formattedValue}${metric.unit}`;
|
|
10423
10433
|
if (hasComparison) {
|
|
10424
10434
|
let diffString = "-";
|
|
10425
|
-
if (!
|
|
10435
|
+
if (!_chunkV32LW47Zjs.isEmpty.call(void 0, metric.diff)) {
|
|
10426
10436
|
const diffPercent = (metric.diff * 100).toFixed(2);
|
|
10427
10437
|
const diffSign = metric.diff > 0 ? "+" : "";
|
|
10428
10438
|
diffString = `${diffSign}${diffPercent}%`;
|
|
10429
10439
|
}
|
|
10430
10440
|
const improvements = metric.improvements > 0 ? metric.improvements.toString() : "-";
|
|
10431
10441
|
const regressions = metric.regressions > 0 ? metric.regressions.toString() : "-";
|
|
10432
|
-
|
|
10442
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(
|
|
10433
10443
|
`${metric.name.padEnd(18)} ${metricValue.padStart(10)} ${diffString.padStart(10)} ${improvements.padStart(12)} ${regressions.padStart(11)}`
|
|
10434
10444
|
);
|
|
10435
10445
|
} else {
|
|
10436
|
-
|
|
10446
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(
|
|
10437
10447
|
`${metric.name.padEnd(20)} ${metricValue.padStart(15)}`
|
|
10438
10448
|
);
|
|
10439
10449
|
}
|
|
10440
10450
|
}
|
|
10441
10451
|
}
|
|
10442
10452
|
if (summary.experimentUrl) {
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10453
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln("");
|
|
10454
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(`View results for ${summary.experimentName}`);
|
|
10455
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln(`See results at ${summary.experimentUrl}`);
|
|
10446
10456
|
}
|
|
10447
10457
|
}
|
|
10448
|
-
|
|
10458
|
+
_chunk4AQGZS6Xjs.isomorph_default.writeln("");
|
|
10449
10459
|
return failingResults.length === 0;
|
|
10450
10460
|
},
|
|
10451
10461
|
async reportRun(evalReports) {
|
|
@@ -10492,13 +10502,13 @@ var DurableEvalRedisStore = class {
|
|
|
10492
10502
|
if (typeof value !== "string") {
|
|
10493
10503
|
throw new Error("DurableEvalRedisStore expected GET to return a string");
|
|
10494
10504
|
}
|
|
10495
|
-
return
|
|
10505
|
+
return _chunkV32LW47Zjs.base64ToUint8Array.call(void 0, value);
|
|
10496
10506
|
}
|
|
10497
10507
|
async write(key, value) {
|
|
10498
10508
|
const client = this.client;
|
|
10499
10509
|
const set = client.set;
|
|
10500
10510
|
const redisKey = `${this.keyPrefix}${key}`;
|
|
10501
|
-
const encoded =
|
|
10511
|
+
const encoded = _chunkV32LW47Zjs.uint8ArrayToBase64.call(void 0, value);
|
|
10502
10512
|
if (typeof client.defineCommand === "function") {
|
|
10503
10513
|
await set.call(client, redisKey, encoded, "PX", this.ttlMs);
|
|
10504
10514
|
} else if (typeof client.sendCommand === "function") {
|
|
@@ -10513,7 +10523,7 @@ var DurableEvalRedisStore = class {
|
|
|
10513
10523
|
}
|
|
10514
10524
|
async getOrSet(key, value) {
|
|
10515
10525
|
const redisKey = `${this.keyPrefix}${key}`;
|
|
10516
|
-
const encoded =
|
|
10526
|
+
const encoded = _chunkV32LW47Zjs.uint8ArrayToBase64.call(void 0, value);
|
|
10517
10527
|
const client = this.client;
|
|
10518
10528
|
const set = client.set;
|
|
10519
10529
|
let setOptions;
|
|
@@ -10535,7 +10545,7 @@ var DurableEvalRedisStore = class {
|
|
|
10535
10545
|
"DurableEvalRedisStore expected atomic SET to return a string or null"
|
|
10536
10546
|
);
|
|
10537
10547
|
}
|
|
10538
|
-
return { value:
|
|
10548
|
+
return { value: _chunkV32LW47Zjs.base64ToUint8Array.call(void 0, existing), created: false };
|
|
10539
10549
|
}
|
|
10540
10550
|
};
|
|
10541
10551
|
var BatchTask = (_class9 = class {
|
|
@@ -10569,7 +10579,7 @@ function defineDurableEval(projectName, evaluator) {
|
|
|
10569
10579
|
}
|
|
10570
10580
|
async function startDurableEval(definition, options) {
|
|
10571
10581
|
const store = definition.evaluator.store;
|
|
10572
|
-
const runId =
|
|
10582
|
+
const runId = _chunkV32LW47Zjs.newId.call(void 0, );
|
|
10573
10583
|
const key = runKey(definition.projectName, definition.evalName, runId);
|
|
10574
10584
|
const { data } = callEvaluatorData(definition.evaluator.data);
|
|
10575
10585
|
const parameters = await validateParameters(
|
|
@@ -10782,9 +10792,9 @@ function currentStatus(definition, state) {
|
|
|
10782
10792
|
return { status: "waiting", runId: state.runId, pending };
|
|
10783
10793
|
}
|
|
10784
10794
|
async function startCaseRoot(definition, state, record, experiment) {
|
|
10785
|
-
if (!experiment) return
|
|
10795
|
+
if (!experiment) return _chunkV32LW47Zjs.NOOP_SPAN;
|
|
10786
10796
|
const datum = record.datum;
|
|
10787
|
-
return
|
|
10797
|
+
return _chunkV32LW47Zjs._internalStartSpanWithInitialMerge.call(void 0, {
|
|
10788
10798
|
...definition.evaluator.state ? { state: definition.evaluator.state } : {},
|
|
10789
10799
|
parent: await experiment.export(),
|
|
10790
10800
|
name: "eval",
|
|
@@ -10850,7 +10860,7 @@ async function logTaskResult(definition, state, record, experiment, task) {
|
|
|
10850
10860
|
record.rootSpan = await root.export();
|
|
10851
10861
|
record.taskLogged = true;
|
|
10852
10862
|
} catch (error) {
|
|
10853
|
-
|
|
10863
|
+
_chunkV32LW47Zjs.logError.call(void 0, root, error);
|
|
10854
10864
|
throw error;
|
|
10855
10865
|
} finally {
|
|
10856
10866
|
root.end();
|
|
@@ -10960,11 +10970,11 @@ function scorerArgs(record) {
|
|
|
10960
10970
|
};
|
|
10961
10971
|
}
|
|
10962
10972
|
function resumeCaseRoot(definition, record, experiment) {
|
|
10963
|
-
if (!experiment) return
|
|
10973
|
+
if (!experiment) return _chunkV32LW47Zjs.NOOP_SPAN;
|
|
10964
10974
|
if (!record.rootSpan) {
|
|
10965
10975
|
throw new Error(`Durable eval case ${record.caseId} has no root span`);
|
|
10966
10976
|
}
|
|
10967
|
-
return
|
|
10977
|
+
return _chunkV32LW47Zjs._internalResumeSpan.call(void 0, {
|
|
10968
10978
|
exported: record.rootSpan,
|
|
10969
10979
|
state: definition.evaluator.state
|
|
10970
10980
|
});
|
|
@@ -10996,14 +11006,14 @@ async function evaluateAndLogScore(definition, state, record, name, experiment,
|
|
|
10996
11006
|
type: "score" /* SCORE */,
|
|
10997
11007
|
purpose: "scorer"
|
|
10998
11008
|
},
|
|
10999
|
-
propagatedEvent:
|
|
11009
|
+
propagatedEvent: _chunkV32LW47Zjs.makeScorerPropagatedEvent.call(void 0, rootExport || void 0),
|
|
11000
11010
|
event: { input: scorerArgs(record) }
|
|
11001
11011
|
}
|
|
11002
11012
|
);
|
|
11003
11013
|
if (prepared.scores) root.log({ scores: prepared.scores });
|
|
11004
11014
|
record.loggedScores[name] = true;
|
|
11005
11015
|
} catch (error) {
|
|
11006
|
-
|
|
11016
|
+
_chunkV32LW47Zjs.logError.call(void 0, root, error);
|
|
11007
11017
|
throw error;
|
|
11008
11018
|
} finally {
|
|
11009
11019
|
root.end();
|
|
@@ -11035,7 +11045,7 @@ async function evaluateAndLogClassification(definition, state, record, name, cla
|
|
|
11035
11045
|
type: "classifier" /* CLASSIFIER */,
|
|
11036
11046
|
purpose: "scorer"
|
|
11037
11047
|
},
|
|
11038
|
-
propagatedEvent:
|
|
11048
|
+
propagatedEvent: _chunkV32LW47Zjs.makeScorerPropagatedEvent.call(void 0, rootExport || void 0),
|
|
11039
11049
|
event: { input: scorerArgs(record) }
|
|
11040
11050
|
}
|
|
11041
11051
|
);
|
|
@@ -11044,7 +11054,7 @@ async function evaluateAndLogClassification(definition, state, record, name, cla
|
|
|
11044
11054
|
}
|
|
11045
11055
|
record.loggedClassifications[name] = true;
|
|
11046
11056
|
} catch (error) {
|
|
11047
|
-
|
|
11057
|
+
_chunkV32LW47Zjs.logError.call(void 0, root, error);
|
|
11048
11058
|
throw error;
|
|
11049
11059
|
} finally {
|
|
11050
11060
|
root.end();
|
|
@@ -11305,7 +11315,7 @@ function runKey(projectName, evalName, runId) {
|
|
|
11305
11315
|
return `durable-eval/v1/runs/${contentVersion(encoder.encode(`${projectName}\0${evalName}\0${runId}`))}`;
|
|
11306
11316
|
}
|
|
11307
11317
|
function encodedKeyPart(value) {
|
|
11308
|
-
return
|
|
11318
|
+
return _chunkV32LW47Zjs.uint8ArrayToBase64.call(void 0, encoder.encode(value)).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "");
|
|
11309
11319
|
}
|
|
11310
11320
|
function caseRecordKey(key, caseId, kind, ...names) {
|
|
11311
11321
|
const suffix = names.map(encodedKeyPart).join("/");
|
|
@@ -11550,7 +11560,7 @@ function deterministicId(value) {
|
|
|
11550
11560
|
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-5${hex.slice(13, 16)}-a${hex.slice(17, 20)}-${hex.slice(20, 32)}`;
|
|
11551
11561
|
}
|
|
11552
11562
|
function contentVersion(value) {
|
|
11553
|
-
if (
|
|
11563
|
+
if (_chunk4AQGZS6Xjs.isomorph_default.hash) return _chunk4AQGZS6Xjs.isomorph_default.hash(decoder.decode(value));
|
|
11554
11564
|
let hash = 2166136261;
|
|
11555
11565
|
for (const byte of value) {
|
|
11556
11566
|
hash ^= byte;
|
|
@@ -12030,7 +12040,7 @@ var Project2 = (_class11 = class {
|
|
|
12030
12040
|
console.warn("publish() is a no-op when running `braintrust push`.");
|
|
12031
12041
|
return;
|
|
12032
12042
|
}
|
|
12033
|
-
await
|
|
12043
|
+
await _chunkV32LW47Zjs.login.call(void 0, );
|
|
12034
12044
|
const projectMap = new ProjectNameIdMap();
|
|
12035
12045
|
const functionDefinitions = [];
|
|
12036
12046
|
if (this._publishableCodeFunctions.length > 0) {
|
|
@@ -12044,7 +12054,7 @@ var Project2 = (_class11 = class {
|
|
|
12044
12054
|
functionDefinitions.push(functionDefinition);
|
|
12045
12055
|
}
|
|
12046
12056
|
}
|
|
12047
|
-
await
|
|
12057
|
+
await _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, ).apiConn().post_json("insert-functions", {
|
|
12048
12058
|
functions: functionDefinitions
|
|
12049
12059
|
});
|
|
12050
12060
|
}
|
|
@@ -12063,12 +12073,12 @@ var ToolBuilder = (_class12 = class {
|
|
|
12063
12073
|
const { handler, name, slug, parameters, returns, ...rest } = opts;
|
|
12064
12074
|
let resolvedName = _nullishCoalesce(name, () => ( handler.name));
|
|
12065
12075
|
if (resolvedName.trim().length === 0) {
|
|
12066
|
-
resolvedName = `Tool ${
|
|
12076
|
+
resolvedName = `Tool ${_chunk4AQGZS6Xjs.isomorph_default.basename(currentFilename)} ${this.taskCounter}`;
|
|
12067
12077
|
}
|
|
12068
12078
|
const tool = new CodeFunction(this.project, {
|
|
12069
12079
|
handler,
|
|
12070
12080
|
name: resolvedName,
|
|
12071
|
-
slug: _nullishCoalesce(slug, () => (
|
|
12081
|
+
slug: _nullishCoalesce(slug, () => ( _chunkV32LW47Zjs.slugify.call(void 0, resolvedName, { lower: true, strict: true }))),
|
|
12072
12082
|
type: "tool",
|
|
12073
12083
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/consistent-type-assertions
|
|
12074
12084
|
parameters,
|
|
@@ -12093,9 +12103,9 @@ var ScorerBuilder = (_class13 = class {
|
|
|
12093
12103
|
resolvedName = opts.handler.name;
|
|
12094
12104
|
}
|
|
12095
12105
|
if (!resolvedName || resolvedName.trim().length === 0) {
|
|
12096
|
-
resolvedName = `Scorer ${
|
|
12106
|
+
resolvedName = `Scorer ${_chunk4AQGZS6Xjs.isomorph_default.basename(currentFilename)} ${this.taskCounter}`;
|
|
12097
12107
|
}
|
|
12098
|
-
const slug = _nullishCoalesce(opts.slug, () => (
|
|
12108
|
+
const slug = _nullishCoalesce(opts.slug, () => ( _chunkV32LW47Zjs.slugify.call(void 0, resolvedName, { lower: true, strict: true })));
|
|
12099
12109
|
if ("handler" in opts) {
|
|
12100
12110
|
const scorer = new CodeFunction(this.project, {
|
|
12101
12111
|
...opts,
|
|
@@ -12150,9 +12160,9 @@ var ClassifierBuilder = (_class14 = class {
|
|
|
12150
12160
|
this.taskCounter++;
|
|
12151
12161
|
let resolvedName = _nullishCoalesce(opts.name, () => ( opts.handler.name));
|
|
12152
12162
|
if (!resolvedName || resolvedName.trim().length === 0) {
|
|
12153
|
-
resolvedName = `Classifier ${
|
|
12163
|
+
resolvedName = `Classifier ${_chunk4AQGZS6Xjs.isomorph_default.basename(currentFilename)} ${this.taskCounter}`;
|
|
12154
12164
|
}
|
|
12155
|
-
const slug = _nullishCoalesce(opts.slug, () => (
|
|
12165
|
+
const slug = _nullishCoalesce(opts.slug, () => ( _chunkV32LW47Zjs.slugify.call(void 0, resolvedName, { lower: true, strict: true })));
|
|
12156
12166
|
const classifier = new CodeFunction(this.project, {
|
|
12157
12167
|
...opts,
|
|
12158
12168
|
name: resolvedName,
|
|
@@ -12281,18 +12291,18 @@ var PromptBuilder = class {
|
|
|
12281
12291
|
rawTools.push(tool);
|
|
12282
12292
|
}
|
|
12283
12293
|
}
|
|
12284
|
-
const slug = _nullishCoalesce(opts.slug, () => (
|
|
12294
|
+
const slug = _nullishCoalesce(opts.slug, () => ( _chunkV32LW47Zjs.slugify.call(void 0, opts.name, { lower: true, strict: true })));
|
|
12285
12295
|
const promptData = promptDefinitionToPromptData(opts, rawTools);
|
|
12286
12296
|
const promptRow = {
|
|
12287
12297
|
id: opts.id,
|
|
12288
|
-
_xact_id: opts.version ?
|
|
12298
|
+
_xact_id: opts.version ? _chunkV32LW47Zjs.loadPrettyXact.call(void 0, opts.version) : void 0,
|
|
12289
12299
|
name: opts.name,
|
|
12290
12300
|
slug,
|
|
12291
12301
|
prompt_data: promptData,
|
|
12292
12302
|
tags: opts.tags,
|
|
12293
12303
|
...this.project.id !== void 0 ? { project_id: this.project.id } : {}
|
|
12294
12304
|
};
|
|
12295
|
-
const prompt = new (0,
|
|
12305
|
+
const prompt = new (0, _chunkV32LW47Zjs.Prompt)(
|
|
12296
12306
|
promptRow,
|
|
12297
12307
|
{},
|
|
12298
12308
|
// It doesn't make sense to specify defaults here.
|
|
@@ -12347,7 +12357,7 @@ var ParametersBuilder = class {
|
|
|
12347
12357
|
}
|
|
12348
12358
|
|
|
12349
12359
|
create(opts) {
|
|
12350
|
-
const slug = _nullishCoalesce(opts.slug, () => (
|
|
12360
|
+
const slug = _nullishCoalesce(opts.slug, () => ( _chunkV32LW47Zjs.slugify.call(void 0, opts.name, { lower: true, strict: true })));
|
|
12351
12361
|
const codeParameters = new CodeParameters(this.project, {
|
|
12352
12362
|
name: opts.name,
|
|
12353
12363
|
slug,
|
|
@@ -12386,7 +12396,7 @@ function serializeEvalParameterstoParametersSchema(parameters) {
|
|
|
12386
12396
|
required.push(name);
|
|
12387
12397
|
}
|
|
12388
12398
|
} else {
|
|
12389
|
-
const schemaObj =
|
|
12399
|
+
const schemaObj = _chunkV32LW47Zjs.zodToJsonSchema.call(void 0, value);
|
|
12390
12400
|
properties[name] = schemaObj;
|
|
12391
12401
|
if (!("default" in schemaObj)) {
|
|
12392
12402
|
required.push(name);
|
|
@@ -12415,11 +12425,11 @@ var ProjectNameIdMap = (_class15 = class {constructor() { _class15.prototype.__i
|
|
|
12415
12425
|
__init31() {this.idToName = {}}
|
|
12416
12426
|
async getId(projectName) {
|
|
12417
12427
|
if (!(projectName in this.nameToId)) {
|
|
12418
|
-
const response = await
|
|
12428
|
+
const response = await _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, ).appConn().post_json("api/project/register", {
|
|
12419
12429
|
project_name: projectName
|
|
12420
12430
|
});
|
|
12421
12431
|
const result = _v3.z.object({
|
|
12422
|
-
project:
|
|
12432
|
+
project: _chunkV32LW47Zjs.Project
|
|
12423
12433
|
}).parse(response);
|
|
12424
12434
|
const projectId = result.project.id;
|
|
12425
12435
|
this.nameToId[projectName] = projectId;
|
|
@@ -12429,10 +12439,10 @@ var ProjectNameIdMap = (_class15 = class {constructor() { _class15.prototype.__i
|
|
|
12429
12439
|
}
|
|
12430
12440
|
async getName(projectId) {
|
|
12431
12441
|
if (!(projectId in this.idToName)) {
|
|
12432
|
-
const response = await
|
|
12442
|
+
const response = await _chunkV32LW47Zjs._internalGetGlobalState.call(void 0, ).appConn().post_json("api/project/get", {
|
|
12433
12443
|
id: projectId
|
|
12434
12444
|
});
|
|
12435
|
-
const result = _v3.z.array(
|
|
12445
|
+
const result = _v3.z.array(_chunkV32LW47Zjs.Project).nonempty().parse(response);
|
|
12436
12446
|
const projectName = result[0].name;
|
|
12437
12447
|
this.idToName[projectId] = projectName;
|
|
12438
12448
|
this.nameToId[projectName] = projectId;
|
|
@@ -12452,16 +12462,16 @@ var ProjectNameIdMap = (_class15 = class {constructor() { _class15.prototype.__i
|
|
|
12452
12462
|
var evalBodySchema = _v3.z.object({
|
|
12453
12463
|
name: _v3.z.string(),
|
|
12454
12464
|
parameters: _v3.z.record(_v3.z.string(), _v3.z.unknown()).nullish(),
|
|
12455
|
-
data:
|
|
12465
|
+
data: _chunkV32LW47Zjs.RunEval.shape.data,
|
|
12456
12466
|
scores: _v3.z.array(
|
|
12457
12467
|
_v3.z.object({
|
|
12458
|
-
function_id:
|
|
12468
|
+
function_id: _chunkV32LW47Zjs.FunctionId,
|
|
12459
12469
|
name: _v3.z.string()
|
|
12460
12470
|
})
|
|
12461
12471
|
).nullish(),
|
|
12462
12472
|
experiment_name: _v3.z.string().nullish(),
|
|
12463
12473
|
project_id: _v3.z.string().nullish(),
|
|
12464
|
-
parent:
|
|
12474
|
+
parent: _chunkV32LW47Zjs.InvokeParent.optional(),
|
|
12465
12475
|
stream: _v3.z.boolean().optional()
|
|
12466
12476
|
});
|
|
12467
12477
|
var staticParametersSchema = _v3.z.record(
|
|
@@ -12469,7 +12479,7 @@ var staticParametersSchema = _v3.z.record(
|
|
|
12469
12479
|
_v3.z.union([
|
|
12470
12480
|
_v3.z.object({
|
|
12471
12481
|
type: _v3.z.literal("prompt"),
|
|
12472
|
-
default:
|
|
12482
|
+
default: _chunkV32LW47Zjs.PromptData.optional(),
|
|
12473
12483
|
description: _v3.z.string().optional()
|
|
12474
12484
|
}),
|
|
12475
12485
|
_v3.z.object({
|
|
@@ -12525,7 +12535,7 @@ var evaluatorDefinitionsSchema = _v3.z.record(
|
|
|
12525
12535
|
);
|
|
12526
12536
|
|
|
12527
12537
|
// src/node/index.ts
|
|
12528
|
-
|
|
12538
|
+
_chunkV32LW47Zjs.configureNode.call(void 0, );
|
|
12529
12539
|
|
|
12530
12540
|
|
|
12531
12541
|
|
|
@@ -12711,4 +12721,4 @@ _chunkTWCDSYJNjs.configureNode.call(void 0, );
|
|
|
12711
12721
|
|
|
12712
12722
|
|
|
12713
12723
|
|
|
12714
|
-
exports.Attachment = _chunkTWCDSYJNjs.Attachment; exports.AttachmentReference = _chunkTWCDSYJNjs.AttachmentReference; exports.BAGGAGE_HEADER = _chunkTWCDSYJNjs.BAGGAGE_HEADER; exports.BRAINTRUST_CURRENT_SPAN_STORE = _chunkTWCDSYJNjs.BRAINTRUST_CURRENT_SPAN_STORE; exports.BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME = _chunkTWCDSYJNjs.BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME; exports.BRAINTRUST_PARENT_KEY = _chunkTWCDSYJNjs.BRAINTRUST_PARENT_KEY; exports.BaseAttachment = _chunkTWCDSYJNjs.BaseAttachment; exports.BaseExperiment = BaseExperiment; exports.BatchScorer = BatchScorer; exports.BatchTask = BatchTask; exports.BraintrustLangChainCallbackHandler = _chunkTWCDSYJNjs.BraintrustLangChainCallbackHandler; exports.BraintrustMiddleware = BraintrustMiddleware; exports.BraintrustObservabilityExporter = _chunkTWCDSYJNjs.BraintrustObservabilityExporter; exports.BraintrustState = _chunkTWCDSYJNjs.BraintrustState; exports.BraintrustStream = _chunkTWCDSYJNjs.BraintrustStream; exports.CachedSpanFetcher = CachedSpanFetcher; exports.CodeFunction = CodeFunction; exports.CodePrompt = CodePrompt; exports.ContextManager = _chunkTWCDSYJNjs.ContextManager; exports.DEFAULT_FETCH_BATCH_SIZE = _chunkTWCDSYJNjs.DEFAULT_FETCH_BATCH_SIZE; exports.DEFAULT_MAX_REQUEST_SIZE = _chunkTWCDSYJNjs.DEFAULT_MAX_REQUEST_SIZE; exports.Dataset = _chunkTWCDSYJNjs.Dataset; exports.DatasetPipeline = DatasetPipeline; exports.DurableEvalMemoryStore = DurableEvalMemoryStore; exports.DurableEvalRedisStore = DurableEvalRedisStore; exports.ERR_PERMALINK = _chunkTWCDSYJNjs.ERR_PERMALINK; exports.Eval = Eval; exports.EvalResultWithSummary = EvalResultWithSummary; exports.Experiment = _chunkTWCDSYJNjs.Experiment; exports.ExternalAttachment = _chunkTWCDSYJNjs.ExternalAttachment; exports.FailedHTTPResponse = _chunkTWCDSYJNjs.FailedHTTPResponse; exports.IDGenerator = _chunkTWCDSYJNjs.IDGenerator; exports.JSONAttachment = _chunkTWCDSYJNjs.JSONAttachment; exports.LEGACY_CACHED_HEADER = _chunkTWCDSYJNjs.LEGACY_CACHED_HEADER; exports.LOGS3_OVERFLOW_REFERENCE_TYPE = _chunkTWCDSYJNjs.LOGS3_OVERFLOW_REFERENCE_TYPE; exports.LazyValue = _chunkTWCDSYJNjs.LazyValue; exports.LocalTrace = LocalTrace; exports.Logger = _chunkTWCDSYJNjs.Logger; exports.LoginInvalidOrgError = _chunkTWCDSYJNjs.LoginInvalidOrgError; exports.NOOP_SPAN = _chunkTWCDSYJNjs.NOOP_SPAN; exports.NOOP_SPAN_PERMALINK = _chunkTWCDSYJNjs.NOOP_SPAN_PERMALINK; exports.NoopSpan = _chunkTWCDSYJNjs.NoopSpan; exports.OTELIDGenerator = _chunkTWCDSYJNjs.OTELIDGenerator; exports.ObjectFetcher = _chunkTWCDSYJNjs.ObjectFetcher; exports.Project = Project2; exports.ProjectNameIdMap = ProjectNameIdMap; exports.Prompt = _chunkTWCDSYJNjs.Prompt; exports.PromptBuilder = PromptBuilder; exports.ReadonlyAttachment = _chunkTWCDSYJNjs.ReadonlyAttachment; exports.ReadonlyExperiment = _chunkTWCDSYJNjs.ReadonlyExperiment; exports.Reporter = Reporter; exports.ScorerBuilder = ScorerBuilder; exports.SpanFetcher = SpanFetcher; exports.SpanImpl = _chunkTWCDSYJNjs.SpanImpl; exports.TRACEPARENT_HEADER = _chunkTWCDSYJNjs.TRACEPARENT_HEADER; exports.TRACESTATE_HEADER = _chunkTWCDSYJNjs.TRACESTATE_HEADER; exports.TestBackgroundLogger = _chunkTWCDSYJNjs.TestBackgroundLogger; exports.ToolBuilder = ToolBuilder; exports.UUIDGenerator = _chunkTWCDSYJNjs.UUIDGenerator; exports.X_CACHED_HEADER = _chunkTWCDSYJNjs.X_CACHED_HEADER; exports._exportsForTestingOnly = _chunkTWCDSYJNjs._exportsForTestingOnly; exports._internalGetGlobalState = _chunkTWCDSYJNjs._internalGetGlobalState; exports._internalIso = _chunk2XDW3UCGjs.isomorph_default; exports._internalSetInitialState = _chunkTWCDSYJNjs._internalSetInitialState; exports.addAzureBlobHeaders = _chunkTWCDSYJNjs.addAzureBlobHeaders; exports.agentAssertionScorer = agentAssertionScorer; exports.braintrustAISDKTelemetry = _chunkTWCDSYJNjs.braintrustAISDKTelemetry; exports.braintrustEveHook = braintrustEveHook; exports.braintrustEveInstrumentation = braintrustEveInstrumentation; exports.braintrustFlueInstrumentation = _chunkTWCDSYJNjs.braintrustFlueInstrumentation; exports.braintrustFlueObserver = _chunkTWCDSYJNjs.braintrustFlueObserver; exports.braintrustStreamChunkSchema = _chunkTWCDSYJNjs.braintrustStreamChunkSchema; exports.buildLocalSummary = buildLocalSummary; exports.collectAnthropicSession = _chunkTWCDSYJNjs.collectAnthropicSession; exports.completeOpenAIBatchTrace = completeOpenAIBatchTrace; exports.configureInstrumentation = _chunkTWCDSYJNjs.configureInstrumentation; exports.constructLogs3OverflowRequest = _chunkTWCDSYJNjs.constructLogs3OverflowRequest; exports.createFinalValuePassThroughStream = _chunkTWCDSYJNjs.createFinalValuePassThroughStream; exports.currentExperiment = _chunkTWCDSYJNjs.currentExperiment; exports.currentLogger = _chunkTWCDSYJNjs.currentLogger; exports.currentSpan = _chunkTWCDSYJNjs.currentSpan; exports.deepCopyEvent = _chunkTWCDSYJNjs.deepCopyEvent; exports.default = exports_exports; exports.defaultErrorScoreHandler = defaultErrorScoreHandler; exports.defineDurableEval = defineDurableEval; exports.deserializePlainStringAsJSON = _chunkTWCDSYJNjs.deserializePlainStringAsJSON; exports.devNullWritableStream = _chunkTWCDSYJNjs.devNullWritableStream; exports.evaluatorDefinitionSchema = evaluatorDefinitionSchema; exports.evaluatorDefinitionsSchema = evaluatorDefinitionsSchema; exports.extractTraceContextFromHeaders = _chunkTWCDSYJNjs.extractTraceContextFromHeaders; exports.flush = _chunkTWCDSYJNjs.flush; exports.getContextManager = _chunkTWCDSYJNjs.getContextManager; exports.getIdGenerator = _chunkTWCDSYJNjs.getIdGenerator; exports.getPromptVersions = _chunkTWCDSYJNjs.getPromptVersions; exports.getSpanParentObject = _chunkTWCDSYJNjs.getSpanParentObject; exports.getTemplateRenderer = _chunkTWCDSYJNjs.getTemplateRenderer; exports.graph = graph_framework_exports; exports.init = _chunkTWCDSYJNjs.init; exports.initDataset = _chunkTWCDSYJNjs.initDataset; exports.initExperiment = _chunkTWCDSYJNjs.initExperiment; exports.initFunction = initFunction; exports.initLogger = _chunkTWCDSYJNjs.initLogger; exports.initNodeTestSuite = initNodeTestSuite; exports.injectTraceContext = _chunkTWCDSYJNjs.injectTraceContext; exports.invoke = invoke; exports.isTemplateFormat = _chunkTWCDSYJNjs.isTemplateFormat; exports.loadParameters = _chunkTWCDSYJNjs.loadParameters; exports.loadPrompt = _chunkTWCDSYJNjs.loadPrompt; exports.log = _chunkTWCDSYJNjs.log; exports.logError = _chunkTWCDSYJNjs.logError; exports.login = _chunkTWCDSYJNjs.login; exports.loginToState = _chunkTWCDSYJNjs.loginToState; exports.logs3OverflowUploadSchema = _chunkTWCDSYJNjs.logs3OverflowUploadSchema; exports.newId = _chunkTWCDSYJNjs.newId; exports.openaiBatchesRetrieveTraced = openaiBatchesRetrieveTraced; exports.openaiFilesCreateTraced = openaiFilesCreateTraced; exports.parseCachedHeader = _chunkTWCDSYJNjs.parseCachedHeader; exports.parseTemplateFormat = _chunkTWCDSYJNjs.parseTemplateFormat; exports.permalink = _chunkTWCDSYJNjs.permalink; exports.pickLogs3OverflowObjectIds = _chunkTWCDSYJNjs.pickLogs3OverflowObjectIds; exports.projects = projects; exports.promptContentsSchema = promptContentsSchema; exports.promptDefinitionSchema = promptDefinitionSchema; exports.promptDefinitionToPromptData = promptDefinitionToPromptData; exports.promptDefinitionWithToolsSchema = promptDefinitionWithToolsSchema; exports.registerOtelFlush = _chunkTWCDSYJNjs.registerOtelFlush; exports.registerSandbox = registerSandbox; exports.registerTemplatePlugin = _chunkTWCDSYJNjs.registerTemplatePlugin; exports.renderMessage = _chunkTWCDSYJNjs.renderMessage; exports.renderPromptParams = _chunkTWCDSYJNjs.renderPromptParams; exports.renderTemplateContent = _chunkTWCDSYJNjs.renderTemplateContent; exports.reportFailures = reportFailures; exports.runEvaluator = runEvaluator; exports.setFetch = _chunkTWCDSYJNjs.setFetch; exports.setMaskingFunction = _chunkTWCDSYJNjs.setMaskingFunction; exports.spanComponentsToObjectId = _chunkTWCDSYJNjs.spanComponentsToObjectId; exports.startSpan = _chunkTWCDSYJNjs.startSpan; exports.summarize = _chunkTWCDSYJNjs.summarize; exports.templateRegistry = _chunkTWCDSYJNjs.templateRegistry; exports.toolFunctionDefinitionSchema = _chunkTWCDSYJNjs.ToolFunctionDefinition; exports.traceable = _chunkTWCDSYJNjs.traceable; exports.traced = _chunkTWCDSYJNjs.traced; exports.updateSpan = _chunkTWCDSYJNjs.updateSpan; exports.uploadLogs3OverflowPayload = _chunkTWCDSYJNjs.uploadLogs3OverflowPayload; exports.utf8ByteLength = _chunkTWCDSYJNjs.utf8ByteLength; exports.withCurrent = _chunkTWCDSYJNjs.withCurrent; exports.withDataset = _chunkTWCDSYJNjs.withDataset; exports.withExperiment = _chunkTWCDSYJNjs.withExperiment; exports.withLogger = _chunkTWCDSYJNjs.withLogger; exports.withParent = _chunkTWCDSYJNjs.withParent; exports.wrapAISDK = wrapAISDK; exports.wrapAISDKModel = wrapAISDKModel; exports.wrapAgentClass = wrapAgentClass; exports.wrapAnthropic = wrapAnthropic; exports.wrapBedrockRuntime = wrapBedrockRuntime; exports.wrapClaudeAgentSDK = wrapClaudeAgentSDK; exports.wrapCloudflareAIChat = wrapCloudflareAIChat; exports.wrapCloudflareAgent = wrapCloudflareAgent; exports.wrapCloudflareThink = wrapCloudflareThink; exports.wrapCohere = wrapCohere; exports.wrapCopilotClient = wrapCopilotClient; exports.wrapCursorSDK = wrapCursorSDK; exports.wrapGenkit = wrapGenkit; exports.wrapGoogleADK = wrapGoogleADK; exports.wrapGoogleGenAI = wrapGoogleGenAI; exports.wrapGroq = wrapGroq; exports.wrapHuggingFace = wrapHuggingFace; exports.wrapHuggingFaceTransformers = wrapHuggingFaceTransformers; exports.wrapLangSmithClient = wrapLangSmithClient; exports.wrapLangSmithRunTrees = wrapLangSmithRunTrees; exports.wrapLangSmithTraceable = wrapLangSmithTraceable; exports.wrapMastraAgent = _chunkTWCDSYJNjs.wrapMastraAgent; exports.wrapMistral = wrapMistral; exports.wrapOllama = wrapOllama; exports.wrapOpenAI = wrapOpenAI; exports.wrapOpenAICodexSDK = wrapOpenAICodexSDK; exports.wrapOpenAIv4 = wrapOpenAIv4; exports.wrapOpenRouter = wrapOpenRouter; exports.wrapOpenRouterAgent = wrapOpenRouterAgent; exports.wrapPiCodingAgentSDK = wrapPiCodingAgentSDK; exports.wrapStrandsAgentSDK = wrapStrandsAgentSDK; exports.wrapTraced = _chunkTWCDSYJNjs.wrapTraced; exports.wrapVitest = wrapVitest; exports.wrapVoyageAI = wrapVoyageAI;
|
|
12724
|
+
exports.Attachment = _chunkV32LW47Zjs.Attachment; exports.AttachmentReference = _chunkV32LW47Zjs.AttachmentReference; exports.BAGGAGE_HEADER = _chunkV32LW47Zjs.BAGGAGE_HEADER; exports.BRAINTRUST_CURRENT_SPAN_STORE = _chunkV32LW47Zjs.BRAINTRUST_CURRENT_SPAN_STORE; exports.BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME = _chunkV32LW47Zjs.BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME; exports.BRAINTRUST_PARENT_KEY = _chunkV32LW47Zjs.BRAINTRUST_PARENT_KEY; exports.BaseAttachment = _chunkV32LW47Zjs.BaseAttachment; exports.BaseExperiment = BaseExperiment; exports.BatchScorer = BatchScorer; exports.BatchTask = BatchTask; exports.BraintrustLangChainCallbackHandler = _chunkV32LW47Zjs.BraintrustLangChainCallbackHandler; exports.BraintrustMiddleware = BraintrustMiddleware; exports.BraintrustObservabilityExporter = _chunkV32LW47Zjs.BraintrustObservabilityExporter; exports.BraintrustState = _chunkV32LW47Zjs.BraintrustState; exports.BraintrustStream = _chunkV32LW47Zjs.BraintrustStream; exports.CachedSpanFetcher = CachedSpanFetcher; exports.CodeFunction = CodeFunction; exports.CodePrompt = CodePrompt; exports.ContextManager = _chunkV32LW47Zjs.ContextManager; exports.DEFAULT_FETCH_BATCH_SIZE = _chunkV32LW47Zjs.DEFAULT_FETCH_BATCH_SIZE; exports.DEFAULT_MAX_REQUEST_SIZE = _chunkV32LW47Zjs.DEFAULT_MAX_REQUEST_SIZE; exports.Dataset = _chunkV32LW47Zjs.Dataset; exports.DatasetPipeline = DatasetPipeline; exports.DurableEvalMemoryStore = DurableEvalMemoryStore; exports.DurableEvalRedisStore = DurableEvalRedisStore; exports.ERR_PERMALINK = _chunkV32LW47Zjs.ERR_PERMALINK; exports.Eval = Eval; exports.EvalResultWithSummary = EvalResultWithSummary; exports.Experiment = _chunkV32LW47Zjs.Experiment; exports.ExternalAttachment = _chunkV32LW47Zjs.ExternalAttachment; exports.FailedHTTPResponse = _chunkV32LW47Zjs.FailedHTTPResponse; exports.IDGenerator = _chunkV32LW47Zjs.IDGenerator; exports.JSONAttachment = _chunkV32LW47Zjs.JSONAttachment; exports.LEGACY_CACHED_HEADER = _chunkV32LW47Zjs.LEGACY_CACHED_HEADER; exports.LOGS3_OVERFLOW_REFERENCE_TYPE = _chunkV32LW47Zjs.LOGS3_OVERFLOW_REFERENCE_TYPE; exports.LazyValue = _chunkV32LW47Zjs.LazyValue; exports.LocalTrace = LocalTrace; exports.Logger = _chunkV32LW47Zjs.Logger; exports.LoginInvalidOrgError = _chunkV32LW47Zjs.LoginInvalidOrgError; exports.NOOP_SPAN = _chunkV32LW47Zjs.NOOP_SPAN; exports.NOOP_SPAN_PERMALINK = _chunkV32LW47Zjs.NOOP_SPAN_PERMALINK; exports.NoopSpan = _chunkV32LW47Zjs.NoopSpan; exports.OTELIDGenerator = _chunkV32LW47Zjs.OTELIDGenerator; exports.ObjectFetcher = _chunkV32LW47Zjs.ObjectFetcher; exports.Project = Project2; exports.ProjectNameIdMap = ProjectNameIdMap; exports.Prompt = _chunkV32LW47Zjs.Prompt; exports.PromptBuilder = PromptBuilder; exports.ReadonlyAttachment = _chunkV32LW47Zjs.ReadonlyAttachment; exports.ReadonlyExperiment = _chunkV32LW47Zjs.ReadonlyExperiment; exports.Reporter = Reporter; exports.ScorerBuilder = ScorerBuilder; exports.SpanFetcher = SpanFetcher; exports.SpanImpl = _chunkV32LW47Zjs.SpanImpl; exports.TRACEPARENT_HEADER = _chunkV32LW47Zjs.TRACEPARENT_HEADER; exports.TRACESTATE_HEADER = _chunkV32LW47Zjs.TRACESTATE_HEADER; exports.TestBackgroundLogger = _chunkV32LW47Zjs.TestBackgroundLogger; exports.ToolBuilder = ToolBuilder; exports.UUIDGenerator = _chunkV32LW47Zjs.UUIDGenerator; exports.X_CACHED_HEADER = _chunkV32LW47Zjs.X_CACHED_HEADER; exports._exportsForTestingOnly = _chunkV32LW47Zjs._exportsForTestingOnly; exports._internalGetGlobalState = _chunkV32LW47Zjs._internalGetGlobalState; exports._internalIso = _chunk4AQGZS6Xjs.isomorph_default; exports._internalSetInitialState = _chunkV32LW47Zjs._internalSetInitialState; exports.addAzureBlobHeaders = _chunkV32LW47Zjs.addAzureBlobHeaders; exports.agentAssertionScorer = agentAssertionScorer; exports.braintrustAISDKTelemetry = _chunkV32LW47Zjs.braintrustAISDKTelemetry; exports.braintrustEveHook = braintrustEveHook; exports.braintrustEveInstrumentation = braintrustEveInstrumentation; exports.braintrustFlueInstrumentation = _chunkV32LW47Zjs.braintrustFlueInstrumentation; exports.braintrustFlueObserver = _chunkV32LW47Zjs.braintrustFlueObserver; exports.braintrustStreamChunkSchema = _chunkV32LW47Zjs.braintrustStreamChunkSchema; exports.buildLocalSummary = buildLocalSummary; exports.collectAnthropicSession = _chunkV32LW47Zjs.collectAnthropicSession; exports.completeOpenAIBatchTrace = completeOpenAIBatchTrace; exports.configureInstrumentation = _chunkV32LW47Zjs.configureInstrumentation; exports.constructLogs3OverflowRequest = _chunkV32LW47Zjs.constructLogs3OverflowRequest; exports.createFinalValuePassThroughStream = _chunkV32LW47Zjs.createFinalValuePassThroughStream; exports.currentExperiment = _chunkV32LW47Zjs.currentExperiment; exports.currentLogger = _chunkV32LW47Zjs.currentLogger; exports.currentSpan = _chunkV32LW47Zjs.currentSpan; exports.deepCopyEvent = _chunkV32LW47Zjs.deepCopyEvent; exports.default = exports_exports; exports.defaultErrorScoreHandler = defaultErrorScoreHandler; exports.defineDurableEval = defineDurableEval; exports.deserializePlainStringAsJSON = _chunkV32LW47Zjs.deserializePlainStringAsJSON; exports.devNullWritableStream = _chunkV32LW47Zjs.devNullWritableStream; exports.evaluatorDefinitionSchema = evaluatorDefinitionSchema; exports.evaluatorDefinitionsSchema = evaluatorDefinitionsSchema; exports.extractTraceContextFromHeaders = _chunkV32LW47Zjs.extractTraceContextFromHeaders; exports.flush = _chunkV32LW47Zjs.flush; exports.getContextManager = _chunkV32LW47Zjs.getContextManager; exports.getIdGenerator = _chunkV32LW47Zjs.getIdGenerator; exports.getPromptVersions = _chunkV32LW47Zjs.getPromptVersions; exports.getSpanParentObject = _chunkV32LW47Zjs.getSpanParentObject; exports.getTemplateRenderer = _chunkV32LW47Zjs.getTemplateRenderer; exports.graph = graph_framework_exports; exports.init = _chunkV32LW47Zjs.init; exports.initDataset = _chunkV32LW47Zjs.initDataset; exports.initExperiment = _chunkV32LW47Zjs.initExperiment; exports.initFunction = initFunction; exports.initLogger = _chunkV32LW47Zjs.initLogger; exports.initNodeTestSuite = initNodeTestSuite; exports.injectTraceContext = _chunkV32LW47Zjs.injectTraceContext; exports.invoke = invoke; exports.isTemplateFormat = _chunkV32LW47Zjs.isTemplateFormat; exports.loadParameters = _chunkV32LW47Zjs.loadParameters; exports.loadPrompt = _chunkV32LW47Zjs.loadPrompt; exports.log = _chunkV32LW47Zjs.log; exports.logError = _chunkV32LW47Zjs.logError; exports.login = _chunkV32LW47Zjs.login; exports.loginToState = _chunkV32LW47Zjs.loginToState; exports.logs3OverflowUploadSchema = _chunkV32LW47Zjs.logs3OverflowUploadSchema; exports.newId = _chunkV32LW47Zjs.newId; exports.openaiBatchesRetrieveTraced = openaiBatchesRetrieveTraced; exports.openaiFilesCreateTraced = openaiFilesCreateTraced; exports.parseCachedHeader = _chunkV32LW47Zjs.parseCachedHeader; exports.parseTemplateFormat = _chunkV32LW47Zjs.parseTemplateFormat; exports.permalink = _chunkV32LW47Zjs.permalink; exports.pickLogs3OverflowObjectIds = _chunkV32LW47Zjs.pickLogs3OverflowObjectIds; exports.projects = projects; exports.promptContentsSchema = promptContentsSchema; exports.promptDefinitionSchema = promptDefinitionSchema; exports.promptDefinitionToPromptData = promptDefinitionToPromptData; exports.promptDefinitionWithToolsSchema = promptDefinitionWithToolsSchema; exports.registerOtelFlush = _chunkV32LW47Zjs.registerOtelFlush; exports.registerSandbox = registerSandbox; exports.registerTemplatePlugin = _chunkV32LW47Zjs.registerTemplatePlugin; exports.renderMessage = _chunkV32LW47Zjs.renderMessage; exports.renderPromptParams = _chunkV32LW47Zjs.renderPromptParams; exports.renderTemplateContent = _chunkV32LW47Zjs.renderTemplateContent; exports.reportFailures = reportFailures; exports.runEvaluator = runEvaluator; exports.setFetch = _chunkV32LW47Zjs.setFetch; exports.setMaskingFunction = _chunkV32LW47Zjs.setMaskingFunction; exports.spanComponentsToObjectId = _chunkV32LW47Zjs.spanComponentsToObjectId; exports.startSpan = _chunkV32LW47Zjs.startSpan; exports.summarize = _chunkV32LW47Zjs.summarize; exports.templateRegistry = _chunkV32LW47Zjs.templateRegistry; exports.toolFunctionDefinitionSchema = _chunkV32LW47Zjs.ToolFunctionDefinition; exports.traceable = _chunkV32LW47Zjs.traceable; exports.traced = _chunkV32LW47Zjs.traced; exports.updateSpan = _chunkV32LW47Zjs.updateSpan; exports.uploadLogs3OverflowPayload = _chunkV32LW47Zjs.uploadLogs3OverflowPayload; exports.utf8ByteLength = _chunkV32LW47Zjs.utf8ByteLength; exports.withCurrent = _chunkV32LW47Zjs.withCurrent; exports.withDataset = _chunkV32LW47Zjs.withDataset; exports.withExperiment = _chunkV32LW47Zjs.withExperiment; exports.withLogger = _chunkV32LW47Zjs.withLogger; exports.withParent = _chunkV32LW47Zjs.withParent; exports.wrapAISDK = wrapAISDK; exports.wrapAISDKModel = wrapAISDKModel; exports.wrapAgentClass = wrapAgentClass; exports.wrapAnthropic = wrapAnthropic; exports.wrapBedrockRuntime = wrapBedrockRuntime; exports.wrapClaudeAgentSDK = wrapClaudeAgentSDK; exports.wrapCloudflareAIChat = wrapCloudflareAIChat; exports.wrapCloudflareAgent = wrapCloudflareAgent; exports.wrapCloudflareThink = wrapCloudflareThink; exports.wrapCohere = wrapCohere; exports.wrapCopilotClient = wrapCopilotClient; exports.wrapCursorSDK = wrapCursorSDK; exports.wrapGenkit = wrapGenkit; exports.wrapGoogleADK = wrapGoogleADK; exports.wrapGoogleGenAI = wrapGoogleGenAI; exports.wrapGroq = wrapGroq; exports.wrapHuggingFace = wrapHuggingFace; exports.wrapHuggingFaceTransformers = wrapHuggingFaceTransformers; exports.wrapLangSmithClient = wrapLangSmithClient; exports.wrapLangSmithRunTrees = wrapLangSmithRunTrees; exports.wrapLangSmithTraceable = wrapLangSmithTraceable; exports.wrapMastraAgent = _chunkV32LW47Zjs.wrapMastraAgent; exports.wrapMistral = wrapMistral; exports.wrapOllama = wrapOllama; exports.wrapOpenAI = wrapOpenAI; exports.wrapOpenAICodexSDK = wrapOpenAICodexSDK; exports.wrapOpenAIv4 = wrapOpenAIv4; exports.wrapOpenRouter = wrapOpenRouter; exports.wrapOpenRouterAgent = wrapOpenRouterAgent; exports.wrapPiCodingAgentSDK = wrapPiCodingAgentSDK; exports.wrapStrandsAgentSDK = wrapStrandsAgentSDK; exports.wrapTraced = _chunkV32LW47Zjs.wrapTraced; exports.wrapVitest = wrapVitest; exports.wrapVoyageAI = wrapVoyageAI;
|