@axlsdk/axl 0.22.2 → 0.23.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/README.md +1 -1
- package/dist/index.cjs +795 -204
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +365 -10
- package/dist/index.d.ts +365 -10
- package/dist/index.js +795 -204
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,12 @@ type ChatOptions = {
|
|
|
128
128
|
* 'none' disables thinking/reasoning (Gemini 3.x: maps to minimal).
|
|
129
129
|
* Omit to use provider defaults. */
|
|
130
130
|
effort?: Effort;
|
|
131
|
+
/** Opt in to provider prompt caching of the stable request prefix (system
|
|
132
|
+
* prompt + tool definitions). Anthropic requires an explicit `cache_control`
|
|
133
|
+
* breakpoint; OpenAI and Gemini cache automatically, so this is a no-op
|
|
134
|
+
* there. Off by default: a prefix that changes every call (a system prompt
|
|
135
|
+
* built from `ctx.metadata`) pays the cache-write premium with no reads. */
|
|
136
|
+
promptCache?: boolean;
|
|
131
137
|
/** Precise thinking token budget (advanced). When set alongside `effort`, overrides the
|
|
132
138
|
* thinking/reasoning allocation. On Anthropic 4.6, `effort` still controls output quality
|
|
133
139
|
* independently. On all other providers, `thinkingBudget` fully overrides `effort` for
|
|
@@ -187,6 +193,12 @@ type StreamChunk = {
|
|
|
187
193
|
cost?: number;
|
|
188
194
|
/** Provider-specific opaque metadata (e.g. raw Gemini parts with thought signatures). */
|
|
189
195
|
providerMetadata?: Record<string, unknown>;
|
|
196
|
+
/**
|
|
197
|
+
* Per-call latency breakdown. The `done` chunk is the only channel a
|
|
198
|
+
* stream has back to the runtime, so every terminal `done` must carry it
|
|
199
|
+
* — including the usage-less fallbacks, or a $0 stream loses its timing.
|
|
200
|
+
*/
|
|
201
|
+
timing?: CallTiming;
|
|
190
202
|
};
|
|
191
203
|
/**
|
|
192
204
|
* Core provider interface. Every LLM adapter must implement this.
|
|
@@ -228,7 +240,56 @@ interface Provider {
|
|
|
228
240
|
* JSON instruction instead (e.g. Anthropic).
|
|
229
241
|
*/
|
|
230
242
|
nativeStructuredOutputSupport?(model: string): 'schema' | 'downgraded' | 'lossy' | 'unsupported';
|
|
243
|
+
/**
|
|
244
|
+
* Whether this adapter realizes `ChatOptions.promptCache` for this model --
|
|
245
|
+
* i.e. actually places a cache breakpoint on the request. The runtime only
|
|
246
|
+
* emits the promptCache diagnostics (cold writes with no reads; no cache
|
|
247
|
+
* activity at all) for adapters that declare this, because on providers
|
|
248
|
+
* that cache automatically the absence of cache fields is not a signal.
|
|
249
|
+
* Adapters that omit this method opt out; the built-in Anthropic adapter is
|
|
250
|
+
* the only one that declares it today.
|
|
251
|
+
*/
|
|
252
|
+
realizesPromptCache?(model: string): boolean;
|
|
253
|
+
/**
|
|
254
|
+
* How this provider resolved the unified `effort` knob for this request.
|
|
255
|
+
*
|
|
256
|
+
* Adapters clamp `effort` to what each model actually accepts (Gemini 3.x
|
|
257
|
+
* cannot disable thinking; OpenAI Chat Completions caps `'max'` at `'xhigh'`;
|
|
258
|
+
* Anthropic models that always think fall back to adaptive `'low'`). That
|
|
259
|
+
* clamp used to be invisible to run provenance. The runtime calls this once
|
|
260
|
+
* per ask, right after provider resolution, and emits a
|
|
261
|
+
* `provider_diagnostic { kind: 'effort_clamped' }` event plus a deduped
|
|
262
|
+
* `console.warn` when `clamped` is true — the adapter only *reports*, the
|
|
263
|
+
* runtime decides how to surface it (only the runtime can see
|
|
264
|
+
* `AxlConfig.diagnostics.silent`).
|
|
265
|
+
*
|
|
266
|
+
* The adapter applies its own `providerOptions.model` override before
|
|
267
|
+
* resolving, so the report describes the model actually sent.
|
|
268
|
+
*
|
|
269
|
+
* Optional, and optional to answer: return `undefined` when there is nothing
|
|
270
|
+
* to report (no effort requested, the model is unknown, or the effort is
|
|
271
|
+
* honored verbatim). An adapter MAY also report an honored resolution with
|
|
272
|
+
* `clamped: false`; the runtime stays silent for those.
|
|
273
|
+
*/
|
|
274
|
+
effortResolution?(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
|
|
231
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* An adapter's report of how it resolved the unified `effort` for one request.
|
|
278
|
+
*
|
|
279
|
+
* `effective` is a provider-NATIVE level string rather than an `Effort` because
|
|
280
|
+
* not every effective value maps back onto the unified union (Gemini's
|
|
281
|
+
* `'minimal'`, OpenAI's `'minimal'`, Anthropic's adaptive `'low'`).
|
|
282
|
+
*/
|
|
283
|
+
type EffortResolution = {
|
|
284
|
+
/** The unified effort the caller asked for. */
|
|
285
|
+
requested: Effort;
|
|
286
|
+
/** The provider-native level actually sent (e.g. `'minimal'`, `'xhigh'`, `'low'`). */
|
|
287
|
+
effective: string;
|
|
288
|
+
/** True when `effective` is not what `requested` asked for. */
|
|
289
|
+
clamped: boolean;
|
|
290
|
+
/** Human-readable reason, surfaced verbatim on the diagnostic event. */
|
|
291
|
+
cause?: string;
|
|
292
|
+
};
|
|
232
293
|
/**
|
|
233
294
|
* Alias for Provider. Used for backward compatibility with index.ts exports.
|
|
234
295
|
*/
|
|
@@ -374,6 +435,10 @@ type AskOptions<T = unknown> = {
|
|
|
374
435
|
validate?: OutputValidator<T>;
|
|
375
436
|
/** Maximum retries for validate failures (default: 2). */
|
|
376
437
|
validateRetries?: number;
|
|
438
|
+
/** Rewrite the corrective feedback the model sees when the guardrail, schema, or validate
|
|
439
|
+
* gate rejects an attempt — or abort the retry with `{ retry: false }`. See
|
|
440
|
+
* `RetryFeedbackHook`. */
|
|
441
|
+
retryFeedback?: RetryFeedbackHook<T>;
|
|
377
442
|
/** Per-call metadata passed to dynamic model/system selector functions. */
|
|
378
443
|
metadata?: Record<string, unknown>;
|
|
379
444
|
/** Override temperature for this call. */
|
|
@@ -386,6 +451,8 @@ type AskOptions<T = unknown> = {
|
|
|
386
451
|
thinkingBudget?: number;
|
|
387
452
|
/** Show reasoning summaries in responses. */
|
|
388
453
|
includeThoughts?: boolean;
|
|
454
|
+
/** Override prompt caching of the stable prefix for this call. */
|
|
455
|
+
promptCache?: boolean;
|
|
389
456
|
/** Tool choice strategy for this call. */
|
|
390
457
|
toolChoice?: ToolChoice;
|
|
391
458
|
/** Stop sequences for this call. */
|
|
@@ -415,6 +482,9 @@ type DelegateOptions<T = unknown> = {
|
|
|
415
482
|
validate?: OutputValidator<T>;
|
|
416
483
|
/** Maximum retries for validate failures (default: 2). Passed through to the final `ctx.ask()` call. */
|
|
417
484
|
validateRetries?: number;
|
|
485
|
+
/** Custom gate-retry feedback. Passed through to the final `ctx.ask()` call on both the
|
|
486
|
+
* single-candidate and the routed path. See `RetryFeedbackHook`. */
|
|
487
|
+
retryFeedback?: RetryFeedbackHook<T>;
|
|
418
488
|
};
|
|
419
489
|
/** Race options */
|
|
420
490
|
type RaceOptions<T = unknown> = {
|
|
@@ -430,11 +500,11 @@ type ExecutionStatus = 'running' | 'completed' | 'failed' | 'waiting';
|
|
|
430
500
|
* derive `AxlEventType` from this tuple and use it to validate stream filters,
|
|
431
501
|
* redaction tables, and exhaustiveness assertions.
|
|
432
502
|
*/
|
|
433
|
-
declare const AXL_EVENT_TYPES: readonly ["workflow_start", "workflow_end", "transcription_start", "transcription_end", "ask_start", "ask_end", "agent_call_start", "agent_call_end", "token", "tool_call_start", "tool_call_end", "tool_call_rejected", "tool_approval", "delegate", "handoff_start", "handoff_return", "pipeline", "partial_object", "string_delta", "verify", "schema_diagnostic", "log", "memory_remember", "memory_recall", "memory_forget", "checkpoint_save", "checkpoint_replay", "await_human", "await_human_resolved", "guardrail", "schema_check", "validate", "done", "error"];
|
|
503
|
+
declare const AXL_EVENT_TYPES: readonly ["workflow_start", "workflow_end", "transcription_start", "transcription_end", "ask_start", "ask_end", "agent_call_start", "agent_call_end", "token", "tool_call_start", "tool_call_end", "tool_call_rejected", "tool_approval", "delegate", "handoff_start", "handoff_return", "pipeline", "partial_object", "string_delta", "verify", "schema_diagnostic", "provider_diagnostic", "log", "memory_remember", "memory_recall", "memory_forget", "checkpoint_save", "checkpoint_replay", "await_human", "await_human_resolved", "guardrail", "schema_check", "validate", "done", "error"];
|
|
434
504
|
/** Discriminator union derived from `AXL_EVENT_TYPES`. */
|
|
435
505
|
type AxlEventType = (typeof AXL_EVENT_TYPES)[number];
|
|
436
506
|
/** Backward-compatible name for the canonical v2 writer discriminator list. */
|
|
437
|
-
declare const AXL_EVENT_TYPES_V2: readonly ["workflow_start", "workflow_end", "transcription_start", "transcription_end", "ask_start", "ask_end", "agent_call_start", "agent_call_end", "token", "tool_call_start", "tool_call_end", "tool_call_rejected", "tool_approval", "delegate", "handoff_start", "handoff_return", "pipeline", "partial_object", "string_delta", "verify", "schema_diagnostic", "log", "memory_remember", "memory_recall", "memory_forget", "checkpoint_save", "checkpoint_replay", "await_human", "await_human_resolved", "guardrail", "schema_check", "validate", "done", "error"];
|
|
507
|
+
declare const AXL_EVENT_TYPES_V2: readonly ["workflow_start", "workflow_end", "transcription_start", "transcription_end", "ask_start", "ask_end", "agent_call_start", "agent_call_end", "token", "tool_call_start", "tool_call_end", "tool_call_rejected", "tool_approval", "delegate", "handoff_start", "handoff_return", "pipeline", "partial_object", "string_delta", "verify", "schema_diagnostic", "provider_diagnostic", "log", "memory_remember", "memory_recall", "memory_forget", "checkpoint_save", "checkpoint_replay", "await_human", "await_human_resolved", "guardrail", "schema_check", "validate", "done", "error"];
|
|
438
508
|
/** Accepted/rejected tool lifecycle discriminators in event schema v2. */
|
|
439
509
|
declare const AXL_TOOL_LIFECYCLE_TYPES_V2: readonly ["tool_call_start", "tool_call_end", "tool_call_rejected"];
|
|
440
510
|
/** Resolved model parameters sent to the provider for an LLM call. */
|
|
@@ -779,6 +849,34 @@ type SchemaDiagnosticData = {
|
|
|
779
849
|
provider?: string;
|
|
780
850
|
support: 'downgraded' | 'lossy' | 'unsupported';
|
|
781
851
|
};
|
|
852
|
+
/**
|
|
853
|
+
* Data for the `provider_diagnostic` event — a `kind`-discriminated payload
|
|
854
|
+
* (like `SchemaDiagnosticData`) reporting that the resolved provider could not
|
|
855
|
+
* honor a portable request knob verbatim.
|
|
856
|
+
*
|
|
857
|
+
* - `effort_clamped` — the adapter clamped the unified `effort` to what the
|
|
858
|
+
* model actually accepts (Gemini 3.x cannot disable thinking; OpenAI Chat
|
|
859
|
+
* Completions caps `'max'` at `'xhigh'`; Anthropic models that always think
|
|
860
|
+
* fall back to adaptive `'low'`). `requested` is the unified value the caller
|
|
861
|
+
* asked for; `effective` is the provider-native level actually sent, which is
|
|
862
|
+
* deliberately a free string because not every native level maps back onto
|
|
863
|
+
* `Effort`. One per ask, emitted before the first `agent_call_start` — join it
|
|
864
|
+
* to `agent_call_start` (which keeps reporting the *requested* effort) by
|
|
865
|
+
* `askId` for full provenance.
|
|
866
|
+
*
|
|
867
|
+
* The union is `kind`-discriminated so later provider cliffs can join without a
|
|
868
|
+
* new event type.
|
|
869
|
+
*/
|
|
870
|
+
type ProviderDiagnosticData = {
|
|
871
|
+
kind: 'effort_clamped';
|
|
872
|
+
/** Provider name (`provider.name`), when the adapter exposes one. */
|
|
873
|
+
provider?: string;
|
|
874
|
+
/** The model the request is actually sent to (after any `providerOptions.model`). */
|
|
875
|
+
model: string;
|
|
876
|
+
requested: Effort;
|
|
877
|
+
effective: string;
|
|
878
|
+
cause: string;
|
|
879
|
+
};
|
|
782
880
|
/** Data shape for legacy `guardrail` events. Replaced by `pipeline` in PR 2. */
|
|
783
881
|
type GuardrailData = {
|
|
784
882
|
guardrailType: 'input' | 'output';
|
|
@@ -1045,6 +1143,12 @@ type LegacyAxlEventPayloadV1 = (AxlEventBase & {
|
|
|
1045
1143
|
cached?: number;
|
|
1046
1144
|
cacheWrite?: number;
|
|
1047
1145
|
};
|
|
1146
|
+
/** Per-call latency breakdown when the provider reported one. Additive
|
|
1147
|
+
* beside `duration`, which keeps its turn-wall-clock meaning (queue,
|
|
1148
|
+
* retries, gates and all). Present on the error path too when the
|
|
1149
|
+
* provider returned a response (any non-2xx); absent when the call
|
|
1150
|
+
* never reached one (network failure, abort, non-provider throw). */
|
|
1151
|
+
timing?: CallTiming;
|
|
1048
1152
|
/** Response-side payload — response text, thinking. */
|
|
1049
1153
|
data: AgentCallEndData;
|
|
1050
1154
|
}) | (AxlEventBase & AskScoped & {
|
|
@@ -1132,6 +1236,9 @@ type LegacyAxlEventPayloadV1 = (AxlEventBase & {
|
|
|
1132
1236
|
}) | (AxlEventBase & AskScoped & {
|
|
1133
1237
|
type: 'schema_diagnostic';
|
|
1134
1238
|
data: SchemaDiagnosticData;
|
|
1239
|
+
}) | (AxlEventBase & AskScoped & {
|
|
1240
|
+
type: 'provider_diagnostic';
|
|
1241
|
+
data: ProviderDiagnosticData;
|
|
1135
1242
|
}) | (AxlEventBase & Partial<AskScoped> & {
|
|
1136
1243
|
type: 'guardrail';
|
|
1137
1244
|
data?: GuardrailData;
|
|
@@ -1319,6 +1426,43 @@ type ValidateResult = {
|
|
|
1319
1426
|
type OutputValidator<T = unknown> = (output: T, ctx: {
|
|
1320
1427
|
metadata: Record<string, unknown>;
|
|
1321
1428
|
}) => ValidateResult | Promise<ValidateResult>;
|
|
1429
|
+
/** What a rejecting output gate tells a `retryFeedback` hook about the attempt it is
|
|
1430
|
+
* about to retry. One shape for all three gates — `stage` discriminates. */
|
|
1431
|
+
type RetryFeedbackInfo<T = unknown> = {
|
|
1432
|
+
/** Which gate rejected: JSON/Zod parse, post-schema `validate`, or output guardrail. */
|
|
1433
|
+
stage: 'schema' | 'validate' | 'guardrail';
|
|
1434
|
+
/** 1-based index of the attempt that was just rejected. */
|
|
1435
|
+
attempt: number;
|
|
1436
|
+
/** Total attempts this gate allows (`retries` + 1). */
|
|
1437
|
+
maxAttempts: number;
|
|
1438
|
+
/** Raw model output that was rejected. */
|
|
1439
|
+
output: string;
|
|
1440
|
+
/** The parsed, schema-valid object, typed by the ask's `schema`. Present only for
|
|
1441
|
+
* `stage: 'validate'` — the other gates run before or without a parsed value. */
|
|
1442
|
+
parsed?: T;
|
|
1443
|
+
/** The gate's own reason (Zod message, `ValidateResult.reason`, guardrail reason). */
|
|
1444
|
+
reason: string;
|
|
1445
|
+
/** The `ZodError` (or non-Zod parse error) for `schema`; the validator's thrown error for
|
|
1446
|
+
* `validate` when it threw. Absent for `guardrail` and for a clean `validate` rejection. */
|
|
1447
|
+
error?: unknown;
|
|
1448
|
+
/** The feedback text the runtime would send if the hook did not intervene. */
|
|
1449
|
+
defaultMessage: string;
|
|
1450
|
+
};
|
|
1451
|
+
/** A non-empty string replaces `defaultMessage` verbatim; `undefined` (or `''`) keeps it;
|
|
1452
|
+
* `{ retry: false }` stops retrying and makes the gate throw its typed terminal error. */
|
|
1453
|
+
type RetryFeedbackResult = string | undefined | {
|
|
1454
|
+
retry: false;
|
|
1455
|
+
};
|
|
1456
|
+
/** Rewrites (or aborts) the corrective turn the model sees after an output gate rejects an
|
|
1457
|
+
* attempt. Runs only while a retry is still permitted — never on the exhausting attempt —
|
|
1458
|
+
* and after the gate's own event is emitted. Exceptions propagate to the caller.
|
|
1459
|
+
*
|
|
1460
|
+
* `void` is accepted alongside `RetryFeedbackResult` so a hook used purely for logging or
|
|
1461
|
+
* inspection — a block body that never returns — type-checks; it keeps the default text.
|
|
1462
|
+
* Any other return value is a contract violation and throws a `TypeError`. */
|
|
1463
|
+
type RetryFeedbackHook<T = unknown> = (info: RetryFeedbackInfo<T>, ctx: {
|
|
1464
|
+
metadata: Record<string, unknown>;
|
|
1465
|
+
}) => RetryFeedbackResult | void | Promise<RetryFeedbackResult | void>;
|
|
1322
1466
|
/** Execution info */
|
|
1323
1467
|
type ExecutionInfoV1 = {
|
|
1324
1468
|
executionId: string;
|
|
@@ -1434,6 +1578,13 @@ type ChatMessage = {
|
|
|
1434
1578
|
* (the option name and shape are not yet stable); today it is purely
|
|
1435
1579
|
* informational. */
|
|
1436
1580
|
agent?: string;
|
|
1581
|
+
/** Provenance of a message the Axl runtime synthesized rather than the caller
|
|
1582
|
+
* authored: the rolling conversation summary and the handoff header. Like
|
|
1583
|
+
* `agent`, never sent on the wire. Adapters use it to avoid treating
|
|
1584
|
+
* runtime-injected text as the caller's stable prompt -- the Anthropic
|
|
1585
|
+
* adapter will not place its prompt-cache breakpoint on a system message
|
|
1586
|
+
* with `origin: 'runtime'`. */
|
|
1587
|
+
origin?: 'runtime';
|
|
1437
1588
|
};
|
|
1438
1589
|
type ToolCallMessage = {
|
|
1439
1590
|
id: string;
|
|
@@ -1443,6 +1594,51 @@ type ToolCallMessage = {
|
|
|
1443
1594
|
arguments: string;
|
|
1444
1595
|
};
|
|
1445
1596
|
};
|
|
1597
|
+
/**
|
|
1598
|
+
* Per-call latency breakdown, reported by adapters that route through
|
|
1599
|
+
* `fetchWithRetry`. Every figure is a non-negative integer count of
|
|
1600
|
+
* milliseconds derived from `Date.now()` deltas — the same clock
|
|
1601
|
+
* `agent_call_end.duration` uses.
|
|
1602
|
+
*
|
|
1603
|
+
* Entirely optional and additive: a custom `Provider` that omits `timing` stays
|
|
1604
|
+
* valid, and consumers must treat every field as possibly absent.
|
|
1605
|
+
*
|
|
1606
|
+
* The buckets separate the three things that `duration` conflates — the SDK's
|
|
1607
|
+
* own pacing, the provider's throttling, and the model's actual latency:
|
|
1608
|
+
*/
|
|
1609
|
+
type CallTiming = {
|
|
1610
|
+
/**
|
|
1611
|
+
* Time parked in Axl's own opt-in `RateLimiter` (concurrency cap plus
|
|
1612
|
+
* `minIntervalMs` spacing) before the request was allowed out. `0` when the
|
|
1613
|
+
* provider has no `rateLimit` configured. This is self-imposed wait, not
|
|
1614
|
+
* provider latency.
|
|
1615
|
+
*/
|
|
1616
|
+
queuedMs: number;
|
|
1617
|
+
/** `fetch` attempts made for this call, including the final one (≥ 1). */
|
|
1618
|
+
attempts: number;
|
|
1619
|
+
/**
|
|
1620
|
+
* First attempt's dispatch → final attempt's dispatch, i.e. everything spent
|
|
1621
|
+
* on failed attempts and their backoff sleeps. `0` for a single attempt.
|
|
1622
|
+
*/
|
|
1623
|
+
retryMs: number;
|
|
1624
|
+
/** Final dispatch → response headers. Time to first byte. */
|
|
1625
|
+
ttfbMs: number;
|
|
1626
|
+
/**
|
|
1627
|
+
* Final dispatch → first `text_delta`/`thinking_delta`. Streaming only, and
|
|
1628
|
+
* absent on a stream that ends without any content delta. This is the
|
|
1629
|
+
* model-discriminating figure: headers arrive at roughly one round trip
|
|
1630
|
+
* regardless of model, first token does not.
|
|
1631
|
+
*/
|
|
1632
|
+
firstTokenMs?: number;
|
|
1633
|
+
/**
|
|
1634
|
+
* Time attributable to the provider. For `chat()`, final dispatch → response
|
|
1635
|
+
* body parsed. For `stream()`, `ttfbMs` plus the cumulative time spent
|
|
1636
|
+
* *awaiting* body reads — time the runtime spends between reads (event
|
|
1637
|
+
* fan-out, tool-call buffering, a slow `ctx.events` consumer) is excluded by
|
|
1638
|
+
* construction, so two models stay comparable under different listener loads.
|
|
1639
|
+
*/
|
|
1640
|
+
wireMs: number;
|
|
1641
|
+
};
|
|
1446
1642
|
/** Provider response */
|
|
1447
1643
|
type ProviderResponse = {
|
|
1448
1644
|
content: string;
|
|
@@ -1460,6 +1656,8 @@ type ProviderResponse = {
|
|
|
1460
1656
|
cost?: number;
|
|
1461
1657
|
/** Provider-specific opaque metadata that needs to round-trip through conversation history. */
|
|
1462
1658
|
providerMetadata?: Record<string, unknown>;
|
|
1659
|
+
/** Per-call latency breakdown. Absent on providers that don't instrument it. */
|
|
1660
|
+
timing?: CallTiming;
|
|
1463
1661
|
};
|
|
1464
1662
|
|
|
1465
1663
|
/** Base error class for all Axl errors */
|
|
@@ -1580,9 +1778,29 @@ declare class QuorumNotMet extends AxlError {
|
|
|
1580
1778
|
declare class NoConsensus extends AxlError {
|
|
1581
1779
|
constructor(reason: string);
|
|
1582
1780
|
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Where a timed-out ask's elapsed budget went, summed over the turns that
|
|
1783
|
+
* completed before the timeout fired. Present only when at least one of those
|
|
1784
|
+
* turns reported provider `timing` — an all-zero breakdown on an uninstrumented
|
|
1785
|
+
* provider would falsely blame tools and gates.
|
|
1786
|
+
*/
|
|
1787
|
+
type TimeoutBreakdown = {
|
|
1788
|
+
/** Wall clock consumed by the operation when it timed out. */
|
|
1789
|
+
elapsedMs: number;
|
|
1790
|
+
/** Sum of `CallTiming.queuedMs` — self-imposed rate-limiter wait. */
|
|
1791
|
+
queuedMs: number;
|
|
1792
|
+
/** Sum of `CallTiming.retryMs` — failed provider attempts and their backoff. */
|
|
1793
|
+
retryMs: number;
|
|
1794
|
+
/** Sum of `CallTiming.wireMs` — provider time. */
|
|
1795
|
+
wireMs: number;
|
|
1796
|
+
/** `elapsedMs` minus the three sums: tools, gates, and runtime work. */
|
|
1797
|
+
otherMs: number;
|
|
1798
|
+
};
|
|
1583
1799
|
/** Thrown when an operation exceeds its timeout */
|
|
1584
1800
|
declare class TimeoutError extends AxlError {
|
|
1585
|
-
|
|
1801
|
+
/** Latency attribution for the timed-out operation, when measurable. */
|
|
1802
|
+
readonly breakdown?: TimeoutBreakdown;
|
|
1803
|
+
constructor(operation: string, timeoutMs: number, breakdown?: TimeoutBreakdown);
|
|
1586
1804
|
}
|
|
1587
1805
|
/** Thrown when a budget limit is exceeded */
|
|
1588
1806
|
declare class BudgetExceededError extends AxlError {
|
|
@@ -1639,6 +1857,9 @@ type AgentConfig = {
|
|
|
1639
1857
|
includeThoughts?: boolean;
|
|
1640
1858
|
toolChoice?: ToolChoice;
|
|
1641
1859
|
stop?: string[];
|
|
1860
|
+
/** Opt in to prompt caching of this agent's stable prefix (system prompt +
|
|
1861
|
+
* tools). Only Anthropic needs it; off by default. See `docs/providers.md`. */
|
|
1862
|
+
promptCache?: boolean;
|
|
1642
1863
|
/** Provider-specific options merged into API requests. Not portable across providers. */
|
|
1643
1864
|
providerOptions?: Record<string, unknown>;
|
|
1644
1865
|
/** Default rendering of a `ctx.ask` output schema into this agent's prompt.
|
|
@@ -2069,11 +2290,14 @@ declare class AxlEventBus implements AsyncIterable<AxlEvent> {
|
|
|
2069
2290
|
* shared API key can storm a provider's rate limit; a governor smooths that.
|
|
2070
2291
|
*
|
|
2071
2292
|
* ## Scope & caveats (v1)
|
|
2072
|
-
* - **Caps request concurrency, not token throughput (TPM).**
|
|
2073
|
-
*
|
|
2074
|
-
*
|
|
2075
|
-
*
|
|
2076
|
-
*
|
|
2293
|
+
* - **Caps request concurrency, not token throughput (TPM).** The permit is
|
|
2294
|
+
* released at response *headers* on BOTH transports: `fetchWithRetry`
|
|
2295
|
+
* releases in its `finally` as it returns the `Response`, and every adapter
|
|
2296
|
+
* reads the body only afterwards — so `res.json()` and stream iteration alike
|
|
2297
|
+
* run outside the permit. A slow stream therefore does not hold a permit for
|
|
2298
|
+
* its whole lifetime. Non-streaming calls still hold it across generation in
|
|
2299
|
+
* practice, because a provider sends no headers until the completion is
|
|
2300
|
+
* finished. Neither bounds tokens/min.
|
|
2077
2301
|
* - **Per provider instance.** Providers are singletons per (runtime, provider
|
|
2078
2302
|
* type), so one governor governs all calls through that adapter — but NOT
|
|
2079
2303
|
* embedder calls (the embedder is constructed outside the registry) and NOT
|
|
@@ -2403,7 +2627,21 @@ declare class OpenAICompatibleProvider implements Provider {
|
|
|
2403
2627
|
}): number | undefined;
|
|
2404
2628
|
protected parseResponse(json: OpenAIChatResponse, model: string, request?: Record<string, unknown>): ProviderResponse;
|
|
2405
2629
|
private roundTripMetadata;
|
|
2406
|
-
|
|
2630
|
+
/**
|
|
2631
|
+
* PRIVATE, and deliberately not an extension point. It was `protected`, but
|
|
2632
|
+
* nothing in or out of this repo overrides it, and `protected` could not
|
|
2633
|
+
* carry the guarantee it appeared to: TypeScript checks an override for
|
|
2634
|
+
* assignability, and a function type with fewer parameters is assignable to
|
|
2635
|
+
* one with more — so an override that simply dropped the recorder still
|
|
2636
|
+
* compiled and then reported `wireMs === ttfbMs` for the whole subclass. Its
|
|
2637
|
+
* type is not exported from the barrel either, so a subclass author could not
|
|
2638
|
+
* name what they were required to accept.
|
|
2639
|
+
*
|
|
2640
|
+
* A provider with a different wire format implements `Provider` (see
|
|
2641
|
+
* docs/providers.md); an OpenAI-compatible one adds a `ProviderProfile`.
|
|
2642
|
+
* Neither needs to reach in here.
|
|
2643
|
+
*/
|
|
2644
|
+
private parseSSEStream;
|
|
2407
2645
|
}
|
|
2408
2646
|
type OpenAIUsage = {
|
|
2409
2647
|
prompt_tokens: number;
|
|
@@ -3408,6 +3646,13 @@ declare class WorkflowContext<TInput = unknown> {
|
|
|
3408
3646
|
private readonly workflowLifecycleState;
|
|
3409
3647
|
private signal?;
|
|
3410
3648
|
private summaryCache?;
|
|
3649
|
+
/** Consecutive provider calls with promptCache on that wrote to the cache
|
|
3650
|
+
* without reading from it (prefix changes per call), and consecutive calls
|
|
3651
|
+
* with no cache activity at all (prefix below the model's minimum, which
|
|
3652
|
+
* Anthropic silently ignores). Either reports once per context. */
|
|
3653
|
+
private promptCacheColdWrites;
|
|
3654
|
+
private promptCacheInactive;
|
|
3655
|
+
private promptCacheWarned;
|
|
3411
3656
|
private workflowName?;
|
|
3412
3657
|
private mcpManager?;
|
|
3413
3658
|
private spanManager?;
|
|
@@ -3534,6 +3779,20 @@ declare class WorkflowContext<TInput = unknown> {
|
|
|
3534
3779
|
private observeToolInvocation;
|
|
3535
3780
|
ask<T = string>(agent: Agent, prompt: ModelInput, options?: AskOptions<T>): Promise<T>;
|
|
3536
3781
|
private executeAgentCall;
|
|
3782
|
+
/**
|
|
3783
|
+
* Resolve the corrective feedback text for one rejected attempt, giving an optional
|
|
3784
|
+
* caller-supplied `retryFeedback` hook the chance to replace it or to stop retrying.
|
|
3785
|
+
*
|
|
3786
|
+
* Called by all three output gates, only while a retry is still permitted (never on the
|
|
3787
|
+
* exhausting attempt) and only after the gate's own event has been emitted, so a hook that
|
|
3788
|
+
* throws or aborts can never erase the evidence that the gate rejected. A non-empty string
|
|
3789
|
+
* replaces `defaultMessage` verbatim; `undefined` / `''` keeps it; `{ retry: false }` asks
|
|
3790
|
+
* the gate to throw its typed terminal error. Hook exceptions propagate — a bug in caller
|
|
3791
|
+
* code is not a model failure and must not be retried into silence, and neither is a
|
|
3792
|
+
* return value outside the contract: an unrecognized shape throws instead of silently
|
|
3793
|
+
* degrading to the default text, which would hide the defect behind extra token spend.
|
|
3794
|
+
*/
|
|
3795
|
+
private resolveRetryFeedback;
|
|
3537
3796
|
/**
|
|
3538
3797
|
* Push the final assistant message into session history, preserving providerMetadata
|
|
3539
3798
|
* (e.g., Gemini thought signatures needed for multi-turn reasoning context) and
|
|
@@ -3557,6 +3816,20 @@ declare class WorkflowContext<TInput = unknown> {
|
|
|
3557
3816
|
* (expected behavior for any tool-using agent, not a surprise).
|
|
3558
3817
|
*/
|
|
3559
3818
|
private emitSchemaDiagnostics;
|
|
3819
|
+
/**
|
|
3820
|
+
* Emit a `provider_diagnostic` when the resolved provider reports that it
|
|
3821
|
+
* could not honor the unified `effort` verbatim (P3/R6/R7).
|
|
3822
|
+
*
|
|
3823
|
+
* The adapter only *resolves* — it returns the requested and effective levels
|
|
3824
|
+
* from the same pure resolver its request builder uses. The runtime decides
|
|
3825
|
+
* how to surface that, because only the runtime can see the event bus and
|
|
3826
|
+
* `AxlConfig.diagnostics.silent` (adapters receive `ProviderConfig` only).
|
|
3827
|
+
*
|
|
3828
|
+
* Called once per ask, so a tool loop with N provider round trips still emits
|
|
3829
|
+
* one event; the `console.warn` dedupes once per process per distinct clamp.
|
|
3830
|
+
* A throwing `effortResolution` is a provider bug and propagates.
|
|
3831
|
+
*/
|
|
3832
|
+
private emitProviderDiagnostics;
|
|
3560
3833
|
private buildToolDefs;
|
|
3561
3834
|
/**
|
|
3562
3835
|
* Summarize old messages to fit within context window.
|
|
@@ -4504,12 +4777,62 @@ declare class AxlRuntime extends EventEmitter {
|
|
|
4504
4777
|
*/
|
|
4505
4778
|
trackExecution<T>(fn: () => Promise<T>, options?: {
|
|
4506
4779
|
captureTraces?: boolean;
|
|
4780
|
+
captureTimingSamples?: boolean;
|
|
4507
4781
|
}): Promise<{
|
|
4508
4782
|
result: T;
|
|
4509
4783
|
cost: number;
|
|
4510
4784
|
/** True when any tracked call was unpriced — `cost` is then a LOWER BOUND.
|
|
4511
4785
|
* Aggregate counterpart of `ExecutionInfo.unpriced`, via `isUnpricedLeaf`. */
|
|
4512
4786
|
unpriced: boolean;
|
|
4787
|
+
/**
|
|
4788
|
+
* Per-model sums of `agent_call_end.timing`, keyed by the same effective
|
|
4789
|
+
* model URI as `metadata.modelCallCounts`. Present only when at least one
|
|
4790
|
+
* tracked call reported timing, so absence means "nothing was instrumented"
|
|
4791
|
+
* rather than "everything took zero ms".
|
|
4792
|
+
*
|
|
4793
|
+
* `calls` counts the SUCCESSFUL timed calls only — it can be lower than the
|
|
4794
|
+
* same model's `modelCallCounts` entry when a provider omits `timing` or a
|
|
4795
|
+
* call failed. Divide a sum by `calls`, never by `modelCallCounts`.
|
|
4796
|
+
*
|
|
4797
|
+
* Failed calls are excluded even though they now report timing: a non-2xx
|
|
4798
|
+
* response is a measured round trip, but a rollup blending answers with
|
|
4799
|
+
* failures describes neither, and a fast 429 would improve a model's
|
|
4800
|
+
* apparent latency. The failures stay on the events themselves.
|
|
4801
|
+
*
|
|
4802
|
+
* `firstTokenMs` is streaming-only and is summed across the calls that
|
|
4803
|
+
* reported it; it is omitted entirely when no call did, so a non-streaming
|
|
4804
|
+
* model never reports a misleading `0`. Its denominator is `firstTokenCalls`,
|
|
4805
|
+
* NOT `calls` — the two travel together and are present or absent together,
|
|
4806
|
+
* so a mixed streaming/non-streaming model still yields an exact mean.
|
|
4807
|
+
*
|
|
4808
|
+
* Sums are per-call totals, so `wireMs` across concurrent calls can exceed
|
|
4809
|
+
* the wall clock of `fn` — that is expected under fan-out and is why
|
|
4810
|
+
* nothing in the core sums timing at the ask level.
|
|
4811
|
+
*
|
|
4812
|
+
* `samples` carries the raw per-call `CallTiming` blocks behind the sums, in
|
|
4813
|
+
* `agent_call_end` order, so a caller that needs a DISTRIBUTION (percentiles,
|
|
4814
|
+
* min/max) rather than a mean can compute one over real per-call values. It
|
|
4815
|
+
* is the same data the sums were built from — `samples.length === calls` —
|
|
4816
|
+
* and is deliberately not something callers should persist per item: the
|
|
4817
|
+
* sums are the compact form, `samples` is the working form.
|
|
4818
|
+
*
|
|
4819
|
+
* It is **opt-in** via `captureTimingSamples` and the key is absent
|
|
4820
|
+
* otherwise. Retaining it is O(calls) in memory for the lifetime of `fn`,
|
|
4821
|
+
* which no caller should pay for a figure it never reads — the sums alone
|
|
4822
|
+
* are O(models).
|
|
4823
|
+
*/
|
|
4824
|
+
modelTiming?: Record<string, {
|
|
4825
|
+
calls: number;
|
|
4826
|
+
queuedMs: number;
|
|
4827
|
+
retryMs: number;
|
|
4828
|
+
wireMs: number;
|
|
4829
|
+
firstTokenMs?: number;
|
|
4830
|
+
/** Timed calls that reported a `firstTokenMs` — the denominator for it. */
|
|
4831
|
+
firstTokenCalls?: number;
|
|
4832
|
+
/** The per-call blocks the sums were built from, in event order.
|
|
4833
|
+
* `length === calls`. Present only under `captureTimingSamples`. */
|
|
4834
|
+
samples?: CallTiming[];
|
|
4835
|
+
}>;
|
|
4513
4836
|
traces?: AxlEvent[];
|
|
4514
4837
|
metadata: {
|
|
4515
4838
|
models: string[];
|
|
@@ -5145,6 +5468,7 @@ declare const REDACTION_RULES: {
|
|
|
5145
5468
|
string_delta: RuleFor<"string_delta">;
|
|
5146
5469
|
verify: RuleFor<"verify">;
|
|
5147
5470
|
schema_diagnostic: RuleFor<"schema_diagnostic">;
|
|
5471
|
+
provider_diagnostic: RuleFor<"provider_diagnostic">;
|
|
5148
5472
|
log: RuleFor<"log">;
|
|
5149
5473
|
memory_remember: RuleFor<"memory_remember">;
|
|
5150
5474
|
memory_recall: RuleFor<"memory_recall">;
|
|
@@ -5211,6 +5535,16 @@ declare class ProviderError extends AxlError {
|
|
|
5211
5535
|
* and is redaction-eligible). See `docs/security.md`.
|
|
5212
5536
|
*/
|
|
5213
5537
|
readonly body?: string;
|
|
5538
|
+
/**
|
|
5539
|
+
* Per-call latency breakdown for the failed call, when the transport reached
|
|
5540
|
+
* the provider and a `Response` came back (any non-2xx, streamed or not).
|
|
5541
|
+
* Absent — the KEY itself, not `undefined` — when there is nothing to
|
|
5542
|
+
* report: a network-level failure (`status: 0`) never got a response, and a
|
|
5543
|
+
* custom transport may not instrument timing at all. `declare` keeps the
|
|
5544
|
+
* property from being defined as `undefined` under `useDefineForClassFields`,
|
|
5545
|
+
* so `'timing' in err` distinguishes "not measured" from "measured as zero".
|
|
5546
|
+
*/
|
|
5547
|
+
readonly timing?: CallTiming;
|
|
5214
5548
|
constructor(args: {
|
|
5215
5549
|
provider: string;
|
|
5216
5550
|
status: number;
|
|
@@ -5219,6 +5553,7 @@ declare class ProviderError extends AxlError {
|
|
|
5219
5553
|
retryAfterMs?: number;
|
|
5220
5554
|
requestId?: string;
|
|
5221
5555
|
body?: string;
|
|
5556
|
+
timing?: CallTiming;
|
|
5222
5557
|
});
|
|
5223
5558
|
}
|
|
5224
5559
|
/**
|
|
@@ -5272,6 +5607,9 @@ declare class OpenAIProvider extends OpenAICompatibleProvider {
|
|
|
5272
5607
|
dangerouslyAllowInsecureHttp?: boolean;
|
|
5273
5608
|
rateLimit?: RateLimitConfig;
|
|
5274
5609
|
});
|
|
5610
|
+
/** Report a clamped `effort` — Chat Completions caps `'max'` at `'xhigh'` and
|
|
5611
|
+
* rejects `'none'` before gpt-5.1 (clamped to `'minimal'`). */
|
|
5612
|
+
effortResolution(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
|
|
5275
5613
|
protected computeCost(model: string, usage: ProviderResponse['usage'], _reportedCost: number | undefined, context?: DirectOpenAIPricingContext): number | undefined;
|
|
5276
5614
|
}
|
|
5277
5615
|
|
|
@@ -5289,6 +5627,10 @@ declare class OpenAIResponsesProvider implements Provider {
|
|
|
5289
5627
|
sources: readonly InputMediaSource['type'][];
|
|
5290
5628
|
};
|
|
5291
5629
|
};
|
|
5630
|
+
/** Report a clamped `effort`. Responses accepts the native `'max'` tier that
|
|
5631
|
+
* Chat Completions caps, but still clamps `'none'` before gpt-5.1, `'xhigh'`
|
|
5632
|
+
* below gpt-5.2, and everything to `'high'` on gpt-5-pro. */
|
|
5633
|
+
effortResolution(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
|
|
5292
5634
|
validateInput(request: ProviderInputValidationRequest): ProviderInputValidationResult;
|
|
5293
5635
|
/** The Responses API honors `json_schema` (structured outputs) natively. */
|
|
5294
5636
|
nativeStructuredOutputSupport(): 'schema';
|
|
@@ -5342,6 +5684,12 @@ declare class OpenAIResponsesProvider implements Provider {
|
|
|
5342
5684
|
*/
|
|
5343
5685
|
declare class AnthropicProvider implements Provider {
|
|
5344
5686
|
readonly name = "anthropic";
|
|
5687
|
+
/** Report a clamped `effort`. Anthropic clamps to each model's supported
|
|
5688
|
+
* `output_config.effort` levels, and models that always think fall back to
|
|
5689
|
+
* adaptive `'low'` when asked to disable thinking. Only reported when the
|
|
5690
|
+
* effective level is what the request body actually carries; an explicit
|
|
5691
|
+
* `thinkingBudget` is documented to override `effort`, so it is not a clamp. */
|
|
5692
|
+
effortResolution(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
|
|
5345
5693
|
inputCapabilities(model: string): {
|
|
5346
5694
|
image?: {
|
|
5347
5695
|
sources: readonly InputMediaSource['type'][];
|
|
@@ -5350,6 +5698,8 @@ declare class AnthropicProvider implements Provider {
|
|
|
5350
5698
|
validateInput(request: ProviderInputValidationRequest): ProviderInputValidationResult;
|
|
5351
5699
|
/** Anthropic ignores native `json_schema` structurally — Axl uses a system
|
|
5352
5700
|
* prompt JSON instruction + client-side Zod validation (see buildRequest). */
|
|
5701
|
+
/** The only built-in adapter that honors `promptCache` (see buildBody). */
|
|
5702
|
+
realizesPromptCache(): boolean;
|
|
5353
5703
|
nativeStructuredOutputSupport(): 'unsupported';
|
|
5354
5704
|
private baseUrl;
|
|
5355
5705
|
private apiKeySource;
|
|
@@ -5428,6 +5778,11 @@ declare class GeminiProvider implements Provider {
|
|
|
5428
5778
|
* keywords it doesn't support (`$ref`/`$defs`/`additionalProperties`/…), so a
|
|
5429
5779
|
* derived schema can lose constraints — lossy, not faithful. */
|
|
5430
5780
|
nativeStructuredOutputSupport(): 'lossy';
|
|
5781
|
+
/** Report a clamped `effort` (R7a). Gemini 3.x cannot disable thinking and
|
|
5782
|
+
* caps at `'high'`, so `'none'`, `'xhigh'` and `'max'` are not honored
|
|
5783
|
+
* verbatim there. Everything else — including 2.x disabled thinking — is
|
|
5784
|
+
* sent as asked, so there is nothing to report. */
|
|
5785
|
+
effortResolution(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
|
|
5431
5786
|
private baseUrl;
|
|
5432
5787
|
private apiKeySource;
|
|
5433
5788
|
private callCounter;
|
|
@@ -6109,4 +6464,4 @@ declare class NoopSpanManager implements SpanManager {
|
|
|
6109
6464
|
*/
|
|
6110
6465
|
declare function createSpanManager(config?: TelemetryConfig): Promise<SpanManager>;
|
|
6111
6466
|
|
|
6112
|
-
export { AXL_EVENT_TYPES, AXL_EVENT_TYPES_V2, AXL_TOOL_LIFECYCLE_TYPES_V2, AZURE_PROFILE, type Agent, type AgentCallEndData, type AgentCallInfo, type AgentCallParams, type AgentCallStartData, type AgentConfig, AnthropicProvider, type AnyWorkflow, type ApiKeySource, type AskOptions, type AskScoped, type AuthHeader, type AwaitHumanData, type AwaitHumanOptions, type AwaitHumanResolvedData, type AxlConfig, AxlError, type AxlEvent, type AxlEventBase, AxlEventBus, type AxlEventOf, type AxlEventType, type AxlEventV2, type AxlEventV2Of, AxlRuntime, AxlStream, BEDROCK_PROFILE, BUILTIN_PROFILES, BudgetExceededError, type BudgetOptions, type BudgetResult, CONFIG_CANDIDATES, COST_BEARING_LEAF_TYPES, type CapabilityFlags, type ChatMessage, type ChatOptions, type CheckpointEventData, type CoalescedPartialObject, type CreateContextOptions, DEEPSEEK_PROFILE, type DecisionCleanupFailedEvent, type DelegateData, type DelegateOptions, type Effort, type EmbedResult, type EmbedUsage, type Embedder, type EvalExecuteWorkflow, type EvalHistoryEntry, type EventStreamOptions, EventStreamOverflowError, type ExecuteOptions, type ExecutionInfo, type ExecutionInfoV1, type ExecutionInfoV2, type ExecutionState, GROQ_PROFILE, GeminiProvider, GeminiTranscriptionProvider, type GuardrailBlockHandler, type GuardrailData, GuardrailError, type GuardrailResult, type GuardrailsConfig, type HandoffDescriptor, type HandoffRecord, type HandoffReturnData, type HandoffStartData, type HistoricalAxlEvent, type HistoricalExecutionInfo, type HumanDecision, InMemoryVectorStore, type InputContentPart, type InputGuardrail, type InputImagePart, type InputMediaSource, type InputModalitySupport, type InputTextPart, InvalidModelInputError, InvalidTranscriptionInputError, LLAMACPP_PROFILE, LMSTUDIO_PROFILE, type LegacyAxlEventV1, type LegacyExecutionInfoV1, MAX_INLINE_MODEL_INPUT_BYTES, MAX_INLINE_TRANSCRIPTION_BYTES, MISTRAL_PROFILE, type MapOptions, MaxTurnsError, McpManager, type McpServer, type McpServerConfig, type McpToolDefinition, type McpToolResult, type MemoryConfig, type MemoryEventData, MemoryManager, MemoryStore, type ModelInput, type ModelInputDescriptor, NoConsensus, NoopSpanManager, OLLAMA_PROFILE, OPENAI_PRICING, OPENAI_PROFILE, OPENROUTER_PROFILE, type ObservationStatus, type OpenAICompatibleOptions, OpenAICompatibleProvider, OpenAIEmbedder, OpenAIProvider, OpenAIResponsesProvider, OpenAITranscriptionProvider, OpenRouterTranscriptionProvider, type OutputGuardrail, type OutputValidator, type PendingDecision, type PerModel, type PricingSource, type PricingTable, type Provider, type ProviderAdapter, ProviderError, type ProviderInputValidationRequest, type ProviderInputValidationResult, type ProviderProfile, ProviderRegistry, type ProviderResponse, QuorumNotMet, REDACTED, REDACTION_RULES, type RaceOptions, type RateLimitConfig, RateLimiter, type ReasoningCapture, type ReasoningEmit, type ReasoningProfile, type ReasoningRoundTrip, type RecallOptions, type RecallResult, type RecordedAudioSource, RedisStore, type RememberOptions, type RememberResult, type ResolvedThinkingOptions, type Result, type RetryPolicy, SGLANG_PROFILE, SQLiteStore, type SchemaCheckData, type SchemaDiagnosticData, type SchemaPromptOption, Session, type SessionOptions, type SpanHandle, type SpanManager, type SpawnOptions, SqliteVectorStore, type StateStore, type StreamChunk, type StringDeltaData, type StringStreamEvent, type StringStreamFilter, type TelemetryConfig, ThinkTagScanner, TimeoutError, type Tool, type ToolApprovalData, type ToolArgumentIssue, type ToolCallCancellation, type ToolCallData, type ToolCallEndData, type ToolCallFailure, type ToolCallMessage, type ToolCallOutcome, type ToolCallRejectedData, type ToolCallRejectedEvent, type ToolCallStartData, type ToolCallStartDataV2, type ToolChoice, type ToolConfig, type ToolDeniedData, type ToolEventError, ToolFailure, type ToolFailureConstructor, type ToolFailureOptions, type ToolHooks, type ToolLifecycleEventV2, type ToolModelOutput, ToolModelOutputError, type Transcript, type TranscriptionCapabilities, TranscriptionOperationError, type TranscriptionProvider, TranscriptionProviderRegistry, type TranscriptionProviderRequest, type TranscriptionProviderResult, type TranscriptionRequest, UnsupportedEventSchemaVersionError, UnsupportedModelInputError, UnsupportedTranscriptionInputError, VLLM_PROFILE, type ValidateData, type ValidateResult, ValidationError, type VectorEntry, type VectorResult, type VectorStore, type VerifyData, VerifyError, type VerifyOptions, type VerifyRetry, type VoteOptions, type Workflow, type WorkflowConfig, WorkflowContext, type WorkflowContextInit, type WorkflowEndData, type WorkflowStartData, XAI_PROFILE, agent, createSpanManager, defineConfig, estimateOpenAICost, eventCostContribution, expandGlob, extractJson, extractThinkTags, findConfig, getEventSchemaVersion, getExecutionEventSchemaVersion, hasPositiveBillableWork, hasPositiveTokens, importModule, inputText, isCostBearingLeaf, isRetryableStatus, isRootLevel, isUnpricedLeaf, isUsableCost, needsTsxLoader, normalizeStoredExecution, openaiReasoningEmit, parsePartialJson, pickDefault, pickExport, priceFromTable, reasoningEffortEmit, reasoningObjectEmit, redactEvent, redactHistoricalEvent, registerConditions, resolveApiKey, resolvePerModel, resolveRuntime, resolveThinkingOptions, stringStreamFromEvents, tool, workflow, zodToJsonSchema };
|
|
6467
|
+
export { AXL_EVENT_TYPES, AXL_EVENT_TYPES_V2, AXL_TOOL_LIFECYCLE_TYPES_V2, AZURE_PROFILE, type Agent, type AgentCallEndData, type AgentCallInfo, type AgentCallParams, type AgentCallStartData, type AgentConfig, AnthropicProvider, type AnyWorkflow, type ApiKeySource, type AskOptions, type AskScoped, type AuthHeader, type AwaitHumanData, type AwaitHumanOptions, type AwaitHumanResolvedData, type AxlConfig, AxlError, type AxlEvent, type AxlEventBase, AxlEventBus, type AxlEventOf, type AxlEventType, type AxlEventV2, type AxlEventV2Of, AxlRuntime, AxlStream, BEDROCK_PROFILE, BUILTIN_PROFILES, BudgetExceededError, type BudgetOptions, type BudgetResult, CONFIG_CANDIDATES, COST_BEARING_LEAF_TYPES, type CallTiming, type CapabilityFlags, type ChatMessage, type ChatOptions, type CheckpointEventData, type CoalescedPartialObject, type CreateContextOptions, DEEPSEEK_PROFILE, type DecisionCleanupFailedEvent, type DelegateData, type DelegateOptions, type Effort, type EffortResolution, type EmbedResult, type EmbedUsage, type Embedder, type EvalExecuteWorkflow, type EvalHistoryEntry, type EventStreamOptions, EventStreamOverflowError, type ExecuteOptions, type ExecutionInfo, type ExecutionInfoV1, type ExecutionInfoV2, type ExecutionState, GROQ_PROFILE, GeminiProvider, GeminiTranscriptionProvider, type GuardrailBlockHandler, type GuardrailData, GuardrailError, type GuardrailResult, type GuardrailsConfig, type HandoffDescriptor, type HandoffRecord, type HandoffReturnData, type HandoffStartData, type HistoricalAxlEvent, type HistoricalExecutionInfo, type HumanDecision, InMemoryVectorStore, type InputContentPart, type InputGuardrail, type InputImagePart, type InputMediaSource, type InputModalitySupport, type InputTextPart, InvalidModelInputError, InvalidTranscriptionInputError, LLAMACPP_PROFILE, LMSTUDIO_PROFILE, type LegacyAxlEventV1, type LegacyExecutionInfoV1, MAX_INLINE_MODEL_INPUT_BYTES, MAX_INLINE_TRANSCRIPTION_BYTES, MISTRAL_PROFILE, type MapOptions, MaxTurnsError, McpManager, type McpServer, type McpServerConfig, type McpToolDefinition, type McpToolResult, type MemoryConfig, type MemoryEventData, MemoryManager, MemoryStore, type ModelInput, type ModelInputDescriptor, NoConsensus, NoopSpanManager, OLLAMA_PROFILE, OPENAI_PRICING, OPENAI_PROFILE, OPENROUTER_PROFILE, type ObservationStatus, type OpenAICompatibleOptions, OpenAICompatibleProvider, OpenAIEmbedder, OpenAIProvider, OpenAIResponsesProvider, OpenAITranscriptionProvider, OpenRouterTranscriptionProvider, type OutputGuardrail, type OutputValidator, type PendingDecision, type PerModel, type PricingSource, type PricingTable, type Provider, type ProviderAdapter, type ProviderDiagnosticData, ProviderError, type ProviderInputValidationRequest, type ProviderInputValidationResult, type ProviderProfile, ProviderRegistry, type ProviderResponse, QuorumNotMet, REDACTED, REDACTION_RULES, type RaceOptions, type RateLimitConfig, RateLimiter, type ReasoningCapture, type ReasoningEmit, type ReasoningProfile, type ReasoningRoundTrip, type RecallOptions, type RecallResult, type RecordedAudioSource, RedisStore, type RememberOptions, type RememberResult, type ResolvedThinkingOptions, type Result, type RetryFeedbackHook, type RetryFeedbackInfo, type RetryFeedbackResult, type RetryPolicy, SGLANG_PROFILE, SQLiteStore, type SchemaCheckData, type SchemaDiagnosticData, type SchemaPromptOption, Session, type SessionOptions, type SpanHandle, type SpanManager, type SpawnOptions, SqliteVectorStore, type StateStore, type StreamChunk, type StringDeltaData, type StringStreamEvent, type StringStreamFilter, type TelemetryConfig, ThinkTagScanner, type TimeoutBreakdown, TimeoutError, type Tool, type ToolApprovalData, type ToolArgumentIssue, type ToolCallCancellation, type ToolCallData, type ToolCallEndData, type ToolCallFailure, type ToolCallMessage, type ToolCallOutcome, type ToolCallRejectedData, type ToolCallRejectedEvent, type ToolCallStartData, type ToolCallStartDataV2, type ToolChoice, type ToolConfig, type ToolDeniedData, type ToolEventError, ToolFailure, type ToolFailureConstructor, type ToolFailureOptions, type ToolHooks, type ToolLifecycleEventV2, type ToolModelOutput, ToolModelOutputError, type Transcript, type TranscriptionCapabilities, TranscriptionOperationError, type TranscriptionProvider, TranscriptionProviderRegistry, type TranscriptionProviderRequest, type TranscriptionProviderResult, type TranscriptionRequest, UnsupportedEventSchemaVersionError, UnsupportedModelInputError, UnsupportedTranscriptionInputError, VLLM_PROFILE, type ValidateData, type ValidateResult, ValidationError, type VectorEntry, type VectorResult, type VectorStore, type VerifyData, VerifyError, type VerifyOptions, type VerifyRetry, type VoteOptions, type Workflow, type WorkflowConfig, WorkflowContext, type WorkflowContextInit, type WorkflowEndData, type WorkflowStartData, XAI_PROFILE, agent, createSpanManager, defineConfig, estimateOpenAICost, eventCostContribution, expandGlob, extractJson, extractThinkTags, findConfig, getEventSchemaVersion, getExecutionEventSchemaVersion, hasPositiveBillableWork, hasPositiveTokens, importModule, inputText, isCostBearingLeaf, isRetryableStatus, isRootLevel, isUnpricedLeaf, isUsableCost, needsTsxLoader, normalizeStoredExecution, openaiReasoningEmit, parsePartialJson, pickDefault, pickExport, priceFromTable, reasoningEffortEmit, reasoningObjectEmit, redactEvent, redactHistoricalEvent, registerConditions, resolveApiKey, resolvePerModel, resolveRuntime, resolveThinkingOptions, stringStreamFromEvents, tool, workflow, zodToJsonSchema };
|