@bivelio/savings-layer 0.4.26 → 0.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -311,7 +311,7 @@ declare function precioDeLista(model: string, at?: Date | number): CostModel | u
311
311
  * on the customer's machine. `test/version-declarada.test.ts` ties this
312
312
  * constant to package.json so the two can never drift.
313
313
  */
314
- declare const BV_SALA_VERSION = "0.4.26";
314
+ declare const BV_SALA_VERSION = "0.4.28";
315
315
 
316
316
  /**
317
317
  * Environment-agnostic UUID generation.
@@ -457,16 +457,30 @@ interface ChatMessage {
457
457
  * The provider tool loop needs it: OpenAI's Chat Completions rejects a
458
458
  * `role: "tool"` message that does not carry `tool_call_id` and does not follow
459
459
  * an assistant turn with `tool_calls` (a 400). Pass the `id` from the
460
- * {@link ToolCallRequest} the model asked for. Ignored by providers that model
461
- * tool results differently.
460
+ * {@link ToolCallRequest} the model asked for.
461
+ *
462
+ * Anthropic's Messages API needs it too: with it, the Anthropic adapter sends
463
+ * the result as a `tool_result` block paired with the call's `tool_use` block.
464
+ * Without it (or without the ids in the assistant turn's `toolCalls`), the
465
+ * exchange is sent as plain text and the adapter warns once.
462
466
  */
463
467
  toolCallId?: string;
468
+ /**
469
+ * For `role: "tool"`: the tool failed, and `content` says how.
470
+ *
471
+ * The Anthropic adapter sends it as `is_error: true` on the `tool_result`, so
472
+ * the model reads the content as an error rather than as data. Providers
473
+ * without such a flag (OpenAI's Chat Completions) send the content unchanged,
474
+ * so write the error into `content` either way.
475
+ */
476
+ isError?: boolean;
464
477
  /**
465
478
  * For `role: "assistant"`: the tool calls the model requested on that turn.
466
479
  *
467
480
  * Send it back with the assistant turn when you continue a tool conversation,
468
481
  * so the following `role: "tool"` messages are valid. These are the same
469
- * {@link ToolCallRequest}s that came back in {@link SavingsResult.toolCalls}.
482
+ * {@link ToolCallRequest}s that came back in {@link SavingsResult.toolCalls},
483
+ * ids included.
470
484
  */
471
485
  toolCalls?: ToolCallRequest[];
472
486
  /** Opaque provider metadata; never used for the exact-cache key. */
@@ -1281,8 +1295,11 @@ interface QualityRepairCheck {
1281
1295
  * sending the request without the layer (opt-in, `skipRepairAboveBaseline`).
1282
1296
  * - `decode_time_constraint`: generation was already constrained, so a retry
1283
1297
  * would not change the outcome.
1298
+ * - `provider_refusal`: the provider refused the request (`finishReason:
1299
+ * "content_filter"`, Anthropic's `stop_reason: "refusal"`); a repair on the
1300
+ * same model would be refused, and may be billed, again.
1284
1301
  */
1285
- skipReason?: "output_truncated" | "schema_defect" | "would_cost_more_than_no_layer" | "decode_time_constraint";
1302
+ skipReason?: "output_truncated" | "schema_defect" | "would_cost_more_than_no_layer" | "decode_time_constraint" | "provider_refusal";
1286
1303
  }
1287
1304
  /** Whether the provider stopped because it reached the output limit. */
1288
1305
  interface QualityTruncationCheck {
@@ -1878,6 +1895,15 @@ declare function stableStringify(value: unknown): string;
1878
1895
  declare function modelFamilyOf(model: string): string;
1879
1896
  declare function canonicalize(request: SavingsRequest): CanonicalRequest;
1880
1897
 
1898
+ /**
1899
+ * Thrown by `importCalibration` / `exportCalibration` when a calibration state
1900
+ * cannot be used as-is: another embedder, verifier, judge or configuration, a
1901
+ * newer format, or numbers that do not add up.
1902
+ */
1903
+ declare class CalibrationStateError extends Error {
1904
+ constructor(message: string);
1905
+ }
1906
+
1881
1907
  /**
1882
1908
  * Decides whether a stored answer would have been right for a new request,
1883
1909
  * given the answer your provider just produced for it. `true` = the stored
@@ -1929,6 +1955,70 @@ interface SemanticCalibrationOptions {
1929
1955
  perRecordFloors?: boolean;
1930
1956
  /** Source of randomness for audits, in [0, 1). Default `Math.random`. */
1931
1957
  random?: () => number;
1958
+ /**
1959
+ * Names your `judge` (e.g. `"support-answers-v2"`), so that a saved
1960
+ * calibration is only ever restored under the same definition of a wrong
1961
+ * reuse. Required to export a calibration when you pass your own judge.
1962
+ */
1963
+ judgeId?: string;
1964
+ }
1965
+
1966
+ /**
1967
+ * A calibration saved with `exportCalibration`, to be restored with
1968
+ * `importCalibration` after a restart. Plain JSON: store it as is.
1969
+ *
1970
+ * It carries the whole experiment, not a summary: both halves of the labels
1971
+ * (the half that proposes floors and the half kept apart to test them), how
1972
+ * many tests have already spent the confidence budget, and the floor in force.
1973
+ * Restoring it continues the same calibration, so the bound keeps holding
1974
+ * across restarts; it never starts the budget over.
1975
+ *
1976
+ * It describes itself: who scored the requests (`embedder`, `verifier`), who
1977
+ * judged the answers (`judge`) and the numbers of the test (`config`). A cache
1978
+ * with any of them different refuses it.
1979
+ */
1980
+ interface SemanticCalibrationState {
1981
+ format: "bvsala.semantic-calibration";
1982
+ /** Format and method version. A newer SDK may read an older state; never the other way round. */
1983
+ version: 1;
1984
+ /** `built_in:<version>` for the embedder shipped with the SDK, `custom:<embedderId>` for yours. */
1985
+ embedder: string;
1986
+ /** `null` without a verifier, `custom:<verifierId>` with yours. */
1987
+ verifier: string | null;
1988
+ /** `built_in:<version>` for {@link sameAnswer}, `custom:<judgeId>` for yours. */
1989
+ judge: string;
1990
+ config: {
1991
+ maxErrorRate: number;
1992
+ confidence: number;
1993
+ /** Only candidates at or above it are labeled, so it is part of what the labels mean. */
1994
+ similarityThreshold: number;
1995
+ /** Candidate floors are tested on a fixed grid of `grid + 1` values in [0, 1]. */
1996
+ grid: number;
1997
+ };
1998
+ /** One calibration per traffic segment; a segment with no state yet is absent. */
1999
+ segments: {
2000
+ single_shot?: SemanticCalibrationSegmentState;
2001
+ agentic?: SemanticCalibrationSegmentState;
2002
+ };
2003
+ }
2004
+ /** The calibration of one traffic segment. Grid indices are scores times `grid`. */
2005
+ interface SemanticCalibrationSegmentState {
2006
+ /** Labels recorded. They alternate by arrival between the two halves below. */
2007
+ labeled: number;
2008
+ /** Tests already run. It follows from `labeled`, and a state where it does not is refused. */
2009
+ looks: number;
2010
+ /** The floor the next test starts from (a grid index), or null. */
2011
+ previousCandidate: number | null;
2012
+ /** The floor in force and the held-out labels that certified it, or null. */
2013
+ certified: {
2014
+ floorIndex: number;
2015
+ heldOut: number;
2016
+ wrong: number;
2017
+ } | null;
2018
+ /** The half that proposes floors: `[gridIndex, labels, wrong]` where there are labels. */
2019
+ selection: [number, number, number][];
2020
+ /** The half kept apart to test them, in the same shape. */
2021
+ heldOut: [number, number, number][];
1932
2022
  }
1933
2023
  /** One labeled reuse decision: the score the cache would have served on, and whether the stored answer was right. */
1934
2024
  interface CalibrationObservation {
@@ -2100,7 +2190,16 @@ interface SemanticCacheOptions {
2100
2190
  * cache miss — never a wrong answer.
2101
2191
  */
2102
2192
  embed?: EmbeddingFn;
2193
+ /**
2194
+ * Names your `embed` function: model and version, e.g.
2195
+ * `"text-embedding-3-small@1536"`. A saved calibration carries it, and one
2196
+ * recorded under another embedder is refused on import. Required to export a
2197
+ * calibration when you pass your own `embed`.
2198
+ */
2199
+ embedderId?: string;
2103
2200
  verify?: SemanticVerifier;
2201
+ /** Names your `verify` function, like {@link embedderId}. Required to export a calibration when you pass one. */
2202
+ verifierId?: string;
2104
2203
  /** Cosine similarity floor for a candidate to be considered at all. */
2105
2204
  similarityThreshold?: number;
2106
2205
  /** Verifier score floor for acceptance. */
@@ -2140,6 +2239,7 @@ declare class InMemorySemanticCache {
2140
2239
  private readonly embebedorPropio;
2141
2240
  private readonly calibracion;
2142
2241
  private readonly estados;
2242
+ private readonly nombres;
2143
2243
  private readonly pendientes;
2144
2244
  private readonly aceptacionExplicita;
2145
2245
  constructor(opts?: SemanticCacheOptions);
@@ -2184,6 +2284,38 @@ declare class InMemorySemanticCache {
2184
2284
  settled(): Promise<void>;
2185
2285
  /** Where the calibration of a traffic segment stands, or null without calibration. */
2186
2286
  calibrationStatus(segment?: SemanticProbe["segment"]): SemanticCalibrationStatus | null;
2287
+ /**
2288
+ * The calibration's full state, to restore it with {@link importCalibration}
2289
+ * in a later process: after a deploy, or in the next serverless invocation.
2290
+ * Plain JSON. Call it after `await cache.settled()` so labels still being
2291
+ * judged are included.
2292
+ *
2293
+ * The bound holds along one line of history: restore the latest state you
2294
+ * saved and keep saving from where it went. Processes that continue the same
2295
+ * state at the same time each spend its remaining confidence again. Each one
2296
+ * keeps its own bound, but the chance that some process certifies a wrong
2297
+ * floor grows with how many do it, and whichever saves last overwrites the
2298
+ * labels of the others.
2299
+ *
2300
+ * Throws {@link CalibrationStateError} without calibration, and when you
2301
+ * passed your own `embed`, `verify` or `judge` without naming it
2302
+ * (`embedderId`, `verifierId`, `calibration.judgeId`).
2303
+ */
2304
+ exportCalibration(): SemanticCalibrationState;
2305
+ /**
2306
+ * Restore a state saved with {@link exportCalibration} (the object, or its
2307
+ * JSON text), right after constructing the cache. The calibration continues
2308
+ * exactly where it was: the same labels in the same two halves, the same
2309
+ * tests already run and the same floor in force.
2310
+ *
2311
+ * All or nothing. Throws {@link CalibrationStateError}, and changes nothing,
2312
+ * when the state comes from another embedder, verifier, judge or
2313
+ * configuration, from a newer SDK, when its numbers do not add up, or when
2314
+ * this cache has already recorded labels in a segment the state carries
2315
+ * (merging two histories would count some labels twice).
2316
+ */
2317
+ importCalibration(state: SemanticCalibrationState | string | unknown): void;
2318
+ private identidad;
2187
2319
  private estadoDe;
2188
2320
  store(c: CanonicalRequest, answer: CachedAnswer): Promise<void>;
2189
2321
  /** Drop every record for a knowledge epoch (invalidation on re-index). */
@@ -2191,6 +2323,55 @@ declare class InMemorySemanticCache {
2191
2323
  get size(): number;
2192
2324
  }
2193
2325
 
2326
+ /**
2327
+ * Where the layer keeps what it learned about your prompt-cache reuse
2328
+ * (`cacheBreakpoints: "auto"`), when it must outlive a single instance.
2329
+ *
2330
+ * By default that measurement lives in the layer's memory, which is enough for
2331
+ * a long-running server. On serverless platforms, where an instance serves one
2332
+ * request or lives a few minutes, memory is gone before the measurement means
2333
+ * anything, so the layer never gets past its fixed placement. Pass a store
2334
+ * shared by your instances (Redis, a KV) and every instance reads and extends
2335
+ * the same measurement.
2336
+ *
2337
+ * What is stored, per traffic class (model, tools, output contract and system
2338
+ * header): prompt-prefix fingerprints, the times they were sent, reuse counts
2339
+ * and how many predicted cache reads the provider confirmed (with
2340
+ * `cacheMissDiagnostics`, also the provider's response ids). Never prompt text
2341
+ * or any other content. Values are opaque JSON strings, one key per traffic
2342
+ * class, rewritten after each request of that class. A client that hands them
2343
+ * back already parsed (as some Redis and KV clients do) works as well.
2344
+ *
2345
+ * The interface is deliberately minimal so any key-value store can back it.
2346
+ * The layer awaits `get` before placing breakpoints and `get` + `set` after the
2347
+ * provider answers, so a slow store adds its latency to those requests. A store
2348
+ * that fails is treated as empty for that request, and nothing is written
2349
+ * back: the placement falls back to what a fresh process would do.
2350
+ */
2351
+ interface CacheBreakpointStore {
2352
+ /** The value last `set` for `key` (the string, or the same JSON already parsed), or null/undefined when there is none. */
2353
+ get(key: string): Promise<unknown>;
2354
+ /** `ttlMs`: drop the value if no request of its traffic class rewrites it for this long. What it resolves to is ignored. */
2355
+ set(key: string, value: string, ttlMs: number): Promise<unknown>;
2356
+ }
2357
+ /**
2358
+ * In-memory {@link CacheBreakpointStore}, with TTL and a size bound. Useful for
2359
+ * tests and for several layers in one process; across processes, back the
2360
+ * interface with a shared store.
2361
+ */
2362
+ declare class InMemoryCacheBreakpointStore implements CacheBreakpointStore {
2363
+ private readonly entradas;
2364
+ private readonly maxEntries;
2365
+ private readonly now;
2366
+ constructor(opts?: {
2367
+ maxEntries?: number;
2368
+ now?: () => number;
2369
+ });
2370
+ get(key: string): Promise<string | null>;
2371
+ set(key: string, value: string, ttlMs: number): Promise<void>;
2372
+ get size(): number;
2373
+ }
2374
+
2194
2375
  /**
2195
2376
  * Singleflight (in-flight coalescing).
2196
2377
  *
@@ -2834,6 +3015,16 @@ interface ProviderRequest {
2834
3015
  * Absent: the adapter's fixed placement.
2835
3016
  */
2836
3017
  cachePlacement?: CachePlacement;
3018
+ /**
3019
+ * Ask the provider to compare this request's prompt prefix with the one of
3020
+ * an earlier response and report where they diverged (Anthropic cache
3021
+ * diagnostics, Claude API only). `previousMessageId: null` opts in without a
3022
+ * comparison, so that a later request can be compared with this one.
3023
+ * Adapters without the feature, or talking to another host, ignore it.
3024
+ */
3025
+ cacheDiagnostics?: {
3026
+ previousMessageId: string | null;
3027
+ };
2837
3028
  }
2838
3029
  /** See {@link ProviderRequest.toolSearch}. */
2839
3030
  interface ProviderToolSearch {
@@ -2850,6 +3041,15 @@ interface ProviderToolSearchUsage {
2850
3041
  loaded: string[];
2851
3042
  /** Searches that came back as an error result instead of references. */
2852
3043
  errors: number;
3044
+ /**
3045
+ * Search results from earlier turns that the adapter sent back in this request's history,
3046
+ * so the model could call the tools they loaded without searching again: how many results,
3047
+ * and which tools. Absent when none were sent back.
3048
+ */
3049
+ resent?: {
3050
+ results: number;
3051
+ tools: string[];
3052
+ };
2853
3053
  }
2854
3054
  /**
2855
3055
  * Breakpoint placement decided by the layer from the reuse it measured on your
@@ -2986,6 +3186,22 @@ interface ProviderResponse {
2986
3186
  * read what the search did. The layer only reports it; it credits nothing for it.
2987
3187
  */
2988
3188
  toolSearch?: ProviderToolSearchUsage;
3189
+ /** The provider's own id for this response (Anthropic `id`), when it gave one. */
3190
+ providerMessageId?: string;
3191
+ /**
3192
+ * The provider's answer to {@link ProviderRequest.cacheDiagnostics}, when the
3193
+ * request asked for a comparison. `missReason` is the provider's
3194
+ * `cache_miss_reason.type` (`model_changed`, `system_changed`,
3195
+ * `tools_changed`, `messages_changed`, `previous_message_not_found`,
3196
+ * `unavailable`), `"none"` when it compared and found no divergence, or
3197
+ * `"pending"` when the comparison had not finished. `missedInputTokens` is the
3198
+ * provider's estimate of the input after the divergence: a magnitude, not a
3199
+ * billing number.
3200
+ */
3201
+ cacheDiagnostics?: {
3202
+ missReason: string;
3203
+ missedInputTokens?: number;
3204
+ };
2989
3205
  raw?: unknown;
2990
3206
  }
2991
3207
  /** One event of a provider-level stream. */
@@ -3277,6 +3493,35 @@ interface SavingsLayerConfig {
3277
3493
  * causes, one-hour writes at 2x included, is charged to `cost.actual`.
3278
3494
  */
3279
3495
  cacheBreakpoints?: "fixed" | "auto";
3496
+ /**
3497
+ * Where `cacheBreakpoints: "auto"` keeps its reuse measurement when it must
3498
+ * outlive a single instance. Optional: without it the measurement lives in this
3499
+ * layer's memory, exactly as before.
3500
+ *
3501
+ * On serverless platforms (one instance per request, or instances that live
3502
+ * a few minutes) memory never gathers enough samples, so `"auto"` stays on
3503
+ * the fixed placement. Pass a store your instances share and each one reads
3504
+ * and extends the same measurement: what one instance learned, the next one
3505
+ * uses. Only prompt-prefix fingerprints, timestamps and counts are stored,
3506
+ * never content. See {@link CacheBreakpointStore}.
3507
+ */
3508
+ cacheBreakpointStore?: CacheBreakpointStore;
3509
+ /**
3510
+ * With `cacheBreakpoints: "auto"` on Anthropic's own API: when the layer
3511
+ * expects a request to read the cache entry an earlier response wrote, ask
3512
+ * Anthropic to compare the two requests (cache diagnostics), and when that
3513
+ * read does not arrive, publish the provider's `cache_miss_reason` in the
3514
+ * `prefix-cache-placement` trace (`system_changed`, `tools_changed`,
3515
+ * `messages_changed`…, or `none` when the requests matched and the entry was
3516
+ * simply gone). Off by default.
3517
+ *
3518
+ * Each request that opts in makes Anthropic keep a fingerprint of it for a
3519
+ * short time (hashes and token-count estimates, never prompt text), scoped to
3520
+ * your organization and workspace; check it against your data-retention
3521
+ * terms before switching this on. Not sent through Bedrock, Vertex or any
3522
+ * other host. It costs nothing and changes no bill.
3523
+ */
3524
+ cacheMissDiagnostics?: boolean;
3280
3525
  /**
3281
3526
  * Signed BiVelio license token (from your paid subscription). This is the
3282
3527
  * primary way to license the SDK: `createSavingsLayer` verifies it offline
@@ -4395,6 +4640,7 @@ declare class AnthropicProvider implements Provider {
4395
4640
  readonly id: string;
4396
4641
  private readonly opts;
4397
4642
  private readonly fetchImpl;
4643
+ private readonly busquedas;
4398
4644
  constructor(opts?: AnthropicOptions);
4399
4645
  /** The id Anthropic's API sees: bare at `api.anthropic.com`, as written elsewhere. */
4400
4646
  private modeloEnElCable;
@@ -4411,8 +4657,12 @@ declare class AnthropicProvider implements Provider {
4411
4657
  generateStream(req: ProviderRequest, options?: ProviderStreamOptions): AsyncGenerator<ProviderStreamEvent, void, undefined>;
4412
4658
  private enviar;
4413
4659
  private construirCuerpo;
4660
+ private reenvioDeBusquedas;
4661
+ private recordarBusquedas;
4662
+ private avisar;
4414
4663
  private marcarCache;
4415
4664
  private leer;
4665
+ private diagnosticoDe;
4416
4666
  private leerMensaje;
4417
4667
  }
4418
4668
 
@@ -5290,4 +5540,4 @@ declare function toCsv(rows: readonly Readonly<Record<string, CsvValue>>[], opti
5290
5540
  columns?: readonly string[];
5291
5541
  }): string;
5292
5542
 
5293
- export { type AnswerJudge, type AnswerSource, type AnthropicOptions, AnthropicProvider, BV_SALA_VERSION, type BatchCounts, type BatchItemResult, type BatchJob, type BatchJobStatus, type BatchRequest, type BatchResults, BatchSubmitError, type BatchSubmitOptions, type BatchSummary, type BivelioHandoff, CATALOGO, COMPACTION_TRANSFORMS, COMPACT_ROWS_INSTRUCTION, type CacheOutcome, type CachePlacement, type CacheTier, type CacheWriteReport, type CachedAnswer, type CalibrationObservation, type CanonicalRequest, type ChatMessage, type CompactRowsDecodeOptions, type CompactRowsOptions, type CompactVerification, type CompactionTransform, type CompressionEconomics, type CompressionPolicyInput, type CompressionRequest, type CompressionResult, type Compressor, type ConstraintBackend, type ConstraintBackendId, type ConstraintPlan, type ConversationState, type CostBasis, type CostModel, type CsvValue, DEFAULT_COST_MODEL, DEFAULT_MAX_STALENESS_SECONDS, DEFAULT_MIN_SAVED_CHARS, type DeferredExecutionReport, type DeterministicResolver, EMBEDDED_PUBLIC_KEY, type EmbeddingFn, type EvidenceDoc, type ExactCache, ExactTokenizer, type ExecutionClass, ExecutionRouter, type FocusExportOptions, type FocusRow, type FormatChoice, FormatSelector, type FormatSelectorOptions, type HandoffFact, HeuristicEstimator, InMemoryExactCache, InMemorySemanticCache, InMemoryToolSetFreezer, type JsonSchema, type LangfuseGenerationUpdate, LicenseError, type LicenseGate, type LicenseKeyShape, type LicenseKeyset, type LicenseStatus, type LicenseTokenPayload, type LocalClassifier, MODELOS_POR_CODIFICACION, MODELS_BY_ENCODING, type MemoryDelta, type MessageRole, MockProvider, type MockProviderOptions, type ModelCascadeMode, type ModelCascadeReport, type ModelCascadeSettings, type OpenAICompatibleOptions, OpenAICompatibleProvider, type OutputContract, PRECIOS_AL_DIA, type Policy, type PriceLeverSaving, type PriceLeverSettings, type ProtectedSpan, type Provider, type ProviderRequest, type ProviderResponse, type ProviderStreamEvent, type ProviderStreamOptions, type ProviderToolSearch, type ProviderToolSearchUsage, type ProviderUsage, QUALITY_STATUSES, type QualityCacheMatch, type QualityCascadeCheck, type QualityLedger, type QualityRepairCheck, type QualitySchemaCheck, type QualityStatus, type QualityTruncationCheck, REFERENCE_MAX_AGE_MS, REFERENCE_MESSAGE_ALLOWANCE, REFERENCE_OUTPUT_SHARE, type ReferenceCredit, type ReferenceRejection, type RequestContext, type Reranker, type ResolvedDeps, type ResolvedGate, type ResolvedLicense, ResolverRegistry, type ResolverResult, type RetrievalOptions, type RetrievalOutcome, type RetrievalPlan, type Retriever, type RevocationListBody, type RevocationListVerification, type RevocationPollEvent, RevocationPoller, type RevocationPollerOptions, RevocationSnapshot, type RouteDecision, type SavingsAdapterLevers, type SavingsAdapterOptions, type SavingsAttributeOptions, type SavingsBatches, type SavingsCallOptions, type SavingsLayer, type SavingsLayerConfig, SavingsLedger, type SavingsRecord, type SavingsReport, type SavingsReportForExport, type SavingsRequest, type SavingsResult, type SavingsSeriesOptions, type SavingsSeriesRow, type SavingsSpanAttributes, type SavingsSpanOptions, type SavingsStream, type SavingsStreamEvent, type SavingsStreamOptions, type SavingsToggles, type SavingsTracingOptions, SchemaRegistry, type SemanticCacheOptions, type SemanticCalibrationBound, type SemanticCalibrationOptions, type SemanticCalibrationStatus, type SemanticHit, type SemanticLookup, type SemanticProbe, type SemanticRecord, type SemanticVerifier, type SerializationFormat, type Serializer, Singleflight, type SpanAttributeValue, type SpanLike, type SpanStartOptionsLike, StreamAbortedError, type StreamingReport, type TokenEstimator, TokenizerRegistry, type ToolCallRequest, type ToolDescriptor, type ToolOutputCompaction, type ToolOutputCompactionSettings, type ToolRisk, type ToolSearchMode, type ToolSearchOptions, type ToolSelection, ToolSelector, type ToolSelectorOptions, type ToolSetFreezer, TraceCollector, type TraceEvent, type TracerLike, type TracerProviderLike, UMBRAL_LOCAL, UsageEmitter, type UsageEmitterOptions, type ValidationError, type ValidationResult, type VerificationCheck, type VerificationExclusion, type VerificationOutcome, type VerificationReport, type VerificationSettings, type VerificationSide, type VerificationStratum, adaptiveK, arithmeticResolver, buildExactKey, buildInflightKey, calibrateSemanticFloor, canonicalize, compactRowsSerializer, compactToolOutput, compresionFiel, computeNextDelay, cosine, createCompactRowsSerializer, createDefaultResolvers, createHandoff, createMockProvider, createSavingsLayer, csvSerializer, decodeCompactRows, dedupe, defaultTokenizerRegistry, deriveSeatId, deriveStatus, detectCi, embebedorLocal, emptyState, encodeCompactRows, evalArithmetic, evaluatePolicy, executeRetrievalPlan, gateFromKey, heuristicEstimator, instrumentSavingsLayer, isKeyset, isStrictCompatible, jsonCompactSerializer, keyTokensMatch, licenseKeyShape, liveGateFromKey, mergeDelta, modelFamilyOf, multisetEqual, negationCount, noopCompressor, normalizeLicenseKey, normalizeText, numericTokens, precioDeLista, projectContext, providerNativeBackend, quitarPrefijoDeProveedor, randomId, recordSavingsOnSpan, registerExactTokenizer, registrarTokenizadorExacto, renderState, resolveConstraintBackend, resolveDependencies, resolveLicense, sameAnswer, savingsSpanAttributes, sha256, shouldCompress, stableStringify, toCsv, toFocusRows, toLangfuseGeneration, toSavingsSeries, uniformColumns, validateAgainstSchema, vectorLocal, verifyCompactSignature, verifyLicenseToken, verifyRevocationList, withProtectedSpans, words };
5543
+ export { type AnswerJudge, type AnswerSource, type AnthropicOptions, AnthropicProvider, BV_SALA_VERSION, type BatchCounts, type BatchItemResult, type BatchJob, type BatchJobStatus, type BatchRequest, type BatchResults, BatchSubmitError, type BatchSubmitOptions, type BatchSummary, type BivelioHandoff, CATALOGO, COMPACTION_TRANSFORMS, COMPACT_ROWS_INSTRUCTION, type CacheBreakpointStore, type CacheOutcome, type CachePlacement, type CacheTier, type CacheWriteReport, type CachedAnswer, type CalibrationObservation, CalibrationStateError, type CanonicalRequest, type ChatMessage, type CompactRowsDecodeOptions, type CompactRowsOptions, type CompactVerification, type CompactionTransform, type CompressionEconomics, type CompressionPolicyInput, type CompressionRequest, type CompressionResult, type Compressor, type ConstraintBackend, type ConstraintBackendId, type ConstraintPlan, type ConversationState, type CostBasis, type CostModel, type CsvValue, DEFAULT_COST_MODEL, DEFAULT_MAX_STALENESS_SECONDS, DEFAULT_MIN_SAVED_CHARS, type DeferredExecutionReport, type DeterministicResolver, EMBEDDED_PUBLIC_KEY, type EmbeddingFn, type EvidenceDoc, type ExactCache, ExactTokenizer, type ExecutionClass, ExecutionRouter, type FocusExportOptions, type FocusRow, type FormatChoice, FormatSelector, type FormatSelectorOptions, type HandoffFact, HeuristicEstimator, InMemoryCacheBreakpointStore, InMemoryExactCache, InMemorySemanticCache, InMemoryToolSetFreezer, type JsonSchema, type LangfuseGenerationUpdate, LicenseError, type LicenseGate, type LicenseKeyShape, type LicenseKeyset, type LicenseStatus, type LicenseTokenPayload, type LocalClassifier, MODELOS_POR_CODIFICACION, MODELS_BY_ENCODING, type MemoryDelta, type MessageRole, MockProvider, type MockProviderOptions, type ModelCascadeMode, type ModelCascadeReport, type ModelCascadeSettings, type OpenAICompatibleOptions, OpenAICompatibleProvider, type OutputContract, PRECIOS_AL_DIA, type Policy, type PriceLeverSaving, type PriceLeverSettings, type ProtectedSpan, type Provider, type ProviderRequest, type ProviderResponse, type ProviderStreamEvent, type ProviderStreamOptions, type ProviderToolSearch, type ProviderToolSearchUsage, type ProviderUsage, QUALITY_STATUSES, type QualityCacheMatch, type QualityCascadeCheck, type QualityLedger, type QualityRepairCheck, type QualitySchemaCheck, type QualityStatus, type QualityTruncationCheck, REFERENCE_MAX_AGE_MS, REFERENCE_MESSAGE_ALLOWANCE, REFERENCE_OUTPUT_SHARE, type ReferenceCredit, type ReferenceRejection, type RequestContext, type Reranker, type ResolvedDeps, type ResolvedGate, type ResolvedLicense, ResolverRegistry, type ResolverResult, type RetrievalOptions, type RetrievalOutcome, type RetrievalPlan, type Retriever, type RevocationListBody, type RevocationListVerification, type RevocationPollEvent, RevocationPoller, type RevocationPollerOptions, RevocationSnapshot, type RouteDecision, type SavingsAdapterLevers, type SavingsAdapterOptions, type SavingsAttributeOptions, type SavingsBatches, type SavingsCallOptions, type SavingsLayer, type SavingsLayerConfig, SavingsLedger, type SavingsRecord, type SavingsReport, type SavingsReportForExport, type SavingsRequest, type SavingsResult, type SavingsSeriesOptions, type SavingsSeriesRow, type SavingsSpanAttributes, type SavingsSpanOptions, type SavingsStream, type SavingsStreamEvent, type SavingsStreamOptions, type SavingsToggles, type SavingsTracingOptions, SchemaRegistry, type SemanticCacheOptions, type SemanticCalibrationBound, type SemanticCalibrationOptions, type SemanticCalibrationSegmentState, type SemanticCalibrationState, type SemanticCalibrationStatus, type SemanticHit, type SemanticLookup, type SemanticProbe, type SemanticRecord, type SemanticVerifier, type SerializationFormat, type Serializer, Singleflight, type SpanAttributeValue, type SpanLike, type SpanStartOptionsLike, StreamAbortedError, type StreamingReport, type TokenEstimator, TokenizerRegistry, type ToolCallRequest, type ToolDescriptor, type ToolOutputCompaction, type ToolOutputCompactionSettings, type ToolRisk, type ToolSearchMode, type ToolSearchOptions, type ToolSelection, ToolSelector, type ToolSelectorOptions, type ToolSetFreezer, TraceCollector, type TraceEvent, type TracerLike, type TracerProviderLike, UMBRAL_LOCAL, UsageEmitter, type UsageEmitterOptions, type ValidationError, type ValidationResult, type VerificationCheck, type VerificationExclusion, type VerificationOutcome, type VerificationReport, type VerificationSettings, type VerificationSide, type VerificationStratum, adaptiveK, arithmeticResolver, buildExactKey, buildInflightKey, calibrateSemanticFloor, canonicalize, compactRowsSerializer, compactToolOutput, compresionFiel, computeNextDelay, cosine, createCompactRowsSerializer, createDefaultResolvers, createHandoff, createMockProvider, createSavingsLayer, csvSerializer, decodeCompactRows, dedupe, defaultTokenizerRegistry, deriveSeatId, deriveStatus, detectCi, embebedorLocal, emptyState, encodeCompactRows, evalArithmetic, evaluatePolicy, executeRetrievalPlan, gateFromKey, heuristicEstimator, instrumentSavingsLayer, isKeyset, isStrictCompatible, jsonCompactSerializer, keyTokensMatch, licenseKeyShape, liveGateFromKey, mergeDelta, modelFamilyOf, multisetEqual, negationCount, noopCompressor, normalizeLicenseKey, normalizeText, numericTokens, precioDeLista, projectContext, providerNativeBackend, quitarPrefijoDeProveedor, randomId, recordSavingsOnSpan, registerExactTokenizer, registrarTokenizadorExacto, renderState, resolveConstraintBackend, resolveDependencies, resolveLicense, sameAnswer, savingsSpanAttributes, sha256, shouldCompress, stableStringify, toCsv, toFocusRows, toLangfuseGeneration, toSavingsSeries, uniformColumns, validateAgainstSchema, vectorLocal, verifyCompactSignature, verifyLicenseToken, verifyRevocationList, withProtectedSpans, words };