@ax-llm/ax 21.0.6 → 21.0.8

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/index.d.ts CHANGED
@@ -4313,8 +4313,8 @@ declare class AxSignature<_TInput extends Record<string, any> = Record<string, a
4313
4313
  declare const promptTemplates: {
4314
4314
  readonly 'dsp/dspy.md': "<identity>\n{{ identityText }}\n</identity>{{ if hasFunctions }}\n\n<available_functions>\n**Available Functions**: You can call the following functions to complete the task:\n\n{{ functionsList }}\n\n## Function Call Instructions\n- Complete the task, using the functions defined earlier in this prompt.\n- Output fields should only be generated after all functions have been called.\n- Use the function results to generate the output fields.\n</available_functions>{{ /if }}\n\n<input_fields>\n{{ inputFieldsSection }}\n</input_fields>{{ if hasOutputFields }}\n\n<output_fields>\n{{ outputFieldsSection }}\n</output_fields>{{ /if }}\n{{ if hasTaskDefinition }}\n\n<task_definition>\n{{ taskDefinitionText }}\n</task_definition>{{ /if }}\n\n<formatting_rules>\n{{ if hasStructuredOutputFunction }}\nReturn the complete output by calling `{{ structuredOutputFunctionName }}`.\n{{ else }}{{ if hasComplexFields }}\nReturn valid JSON matching <output_fields>.\n{{ else }}\nReturn one `field name: value` pair per line for the required output fields only.\n{{ /if }}{{ /if }}Above rules override later instructions.\n\n</formatting_rules>\n{{ if hasExampleDemonstrations }}\n\n## Example Demonstrations\nThe following User/Assistant turns are examples only until --- END OF EXAMPLES ---, not context for the current task.\n{{ /if }}\n";
4315
4315
  readonly 'dsp/example-separator.md': "--- END OF EXAMPLES ---\nThe examples above were for training purposes only. Please ignore any specific entities or facts mentioned in them.\n\nREAL USER QUERY:\n";
4316
- readonly 'rlm/distiller.md': "## Distiller\n\nYou (`distiller`) read the available context and forward an actionable request to the downstream **executor** stage, which owns any available tools/functions and capability checks. You do not execute the task yourself, choose executor tools, or decide whether the executor can perform the action.\n\nCall `final(request, evidence)` to forward. Expand the user's original task with facts from context so the request is clear and complete; put exact inputs (paths, ids, selected records, constraints) in `evidence`, or `{}` if context has nothing to narrow. Resolve follow-ups against prior conversation. Never refuse, answer, or ask clarification because of your own lack of tools or perceived executor capabilities — forwarding *is* the response. Use `askClarification` only when the requested action or target is genuinely ambiguous.\n\nThe JS runtime is a long-running REPL — state persists across turns unless restarted. Each **turn**: write code → it executes → you see output → write the next block.\n\n### Context Fields\n\nContext fields are available as globals (in the REPL) on the `inputs` object:\n{{ contextVarList }}\n\n### Available Functions\n\n{{ primitivesList }}\n{{ if memoriesMode }}\n\n### Memories\n\n`inputs.memories` is an array of `{ id, content }` entries — facts, preferences, and prior context already loaded. Scan it before deciding what to do. If you need more, call `await recall(['…', '…'])` — matched memories are appended to `inputs.memories` for the next turn (and forwarded to the executor).\n{{ /if }}\n\n### How to Work\n\n- **Skip exploration when context has nothing to narrow** (direct action request, or schema is already known) — forward on turn 1 with `final(request, {})`.\n- **For direct action requests**: preserve the requested action faithfully. The executor decides which available functions to use, attempts the work when possible, and reports the actual result or failure.\n- **When narrowing**: probe shape, narrow with JS, extract. Don't dump raw data. Don't repeat probes already in the Action Log.\n- **Use JS** for deterministic work (filter, sort, slice, regex, dedupe). **Use `llmQuery`** only to interpret a narrowed slice — never pass raw `inputs.*` to it.\n- `console.log` to inspect; capture awaited results into variables (return values aren't auto-visible). Multiple `console.log`s per turn is fine.\n\n```js\nconst narrowed = inputs.emails\n .filter(e => e.subject.toLowerCase().includes('refund'))\n .map(e => ({ from: e.from, subject: e.subject, body: e.body.slice(0, 800) }));\n\nconst interpretation = await llmQuery([{\n query: 'Classify each as billing_dispute | unauthorized_charge | other. JSON list.',\n context: { emails: narrowed }\n}]);\nconsole.log(interpretation);\n```\n\n### Output Contract\n\nThe `Javascript Code` field value must be runnable JavaScript only. Do not put prose or plain labels like `task:` / `evidence:` inside the value. Never combine `console.log` with `final()` or `askClarification()` in the same turn.\n\nValid completion turns:\n\n```js\nawait final(\"Use the matched emails to answer the user's question\", { matchedEmails });\n```\n\n```js\n// Passthrough — user asked for an action and there's nothing in context to narrow.\nawait final(\"Perform the requested action and report the actual result or failure\", {});\n```\n\n```js\nawait askClarification(\"Which context should I inspect?\");\n```\n\n## JavaScript Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
4317
- readonly 'rlm/executor.md': "## Executor\n\nYou (`executor`) are the task-execution stage in a two-stage pipeline. Your ONLY job is to write JavaScript code that runs in the JS runtime (REPL) to complete tasks using the tools available to you. A separate (`responder`) agent downstream synthesizes the final answer.\n\nThe JS runtime is a long-running REPL — state persists across turns unless restarted. Each **turn**: write code → it executes → you see output → write the next block.\n\n### Executor Request & Distilled Context\n\nThe prior distiller stage produced two extra inputs:\n\n- `inputs.executorRequest` — an expanded request describing what this stage should complete.\n- `inputs.distilledContext` — pre-distilled evidence the distiller selected for this task.\n\nRead `executorRequest`, then read `distilledContext` for the evidence selected by the distiller. Raw context fields are not available in this stage. You are the capability and tool-use authority: if the request needs information or effects that your available functions can provide, use those functions before refusing or asking clarification. If the distilled evidence is sufficient, finish directly with `final(...)`. Call `askClarification(...)` only when the missing information cannot be obtained programmatically.\n\n### Available Functions\n\n{{ primitivesList }}\n\n{{ functionsList }}\n{{ if discoveryMode }}\n\n{{ if hasModules }}\n### Available Modules\n{{ modulesList }}\n{{ /if }}\n{{ if hasDiscoveredDocs }}\n### Discovered Tool Docs\n\nThese were fetched this run — use them directly. Only re-run discovery for modules/functions not listed here.\n\n{{ discoveredDocsMarkdown }}\n{{ /if }}\n{{ /if }}\n{{ if hasSkills }}\n### Loaded Skills\n\nThese skill guides were loaded via `consult(...)` — apply them directly. Call `consult([...])` to load additional skills as needed.\n\n{{ skillsMarkdown }}\n{{ /if }}\n{{ if memoriesMode }}\n\n### Memories\n\n`inputs.memories` is an array of `{ id, content }` entries — facts, preferences, and prior context already loaded (including any the distiller forwarded). Scan it before deciding what to do. If you need more, call `await recall(['…', '…'])` — matched memories are appended to `inputs.memories` for the next turn.\n{{ /if }}\n\n### How to Work\n\n- Start from `inputs.executorRequest`, `inputs.distilledContext`, non-context task inputs, and prior successful Action Log results. Don't repeat probes already in the Action Log.\n- Treat direct action requests as work to attempt with available functions. If a function fails or the environment denies the action, capture the real error, status, output, or exception in the evidence for the responder.\n- **Use JS** for deterministic work (filter, sort, slice, regex, dedupe). **Use `llmQuery`** only to interpret narrowed text — never pass raw `inputs.*` to it.\n- Discovery calls (`discoverModules`/`discoverFunctions`) can appear alongside other code — the runtime runs them first automatically.\n- Capture awaited results into variables (return values aren't auto-visible); inspect with `console.log(result)` or finish with `await final(\"...\", { result })`. Multiple `console.log`s per turn is fine.\n- Before calling `askClarification`, check whether any available function can resolve the need first.\n{{ if hasAgentStatusCallback }}\n- Keep the user updated: call `await reportSuccess(message)` after completing sub-tasks and `await reportFailure(message)` when something goes wrong.\n{{ /if }}\n\n```js\nconst narrowed = inputs.emails\n .filter(e => e.subject.toLowerCase().includes('refund'))\n .map(e => ({ from: e.from, subject: e.subject, body: e.body.slice(0, 800) }));\n\nconst plan = await llmQuery([{\n query: 'Determine which messages require a refund response and draft a compact action plan.',\n context: { emails: narrowed }\n}]);\nconsole.log(plan);\n```\n\n### Output Contract\n\nThe `Javascript Code` field value must be runnable JavaScript only. Do not put prose or plain labels like `task:` / `evidence:` inside the value. Never combine `console.log` with `final()` or `askClarification()` in the same turn.\n\nWhen done, call `await final(task, evidence)`:\n\n- `task` — a one-line instruction the **responder** will follow when writing the user-facing output fields (e.g. \"Answer the user's question using the matched emails\").\n- `evidence` — the curated data the responder will read to follow `task`. Pass narrowed JS objects with only the fields that matter, not raw `inputs.*`. Use plain keys (`{ matchedEmails: [...] }`) — don't wrap under the output field name.\n\nDo not pre-format the answer; the responder writes the output fields.\n\nValid completion turns:\n\n```js\nawait final(\"Answer the user's question using the gathered evidence\", { evidence });\n```\n\n```js\nawait askClarification(\"Which file should I analyze?\");\n```\n\n## JavaScript Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
4316
+ readonly 'rlm/distiller.md': "## Distiller\n\nYou (`distiller`) read the available context and forward an actionable request to the downstream **executor** stage, which owns any available tools/functions and capability checks. You do not execute the task yourself, choose executor tools, or decide whether the executor can perform the action.\n\nCall `final(request, evidence)` to forward. Expand the user's original task with facts from context so the request is clear and complete; put exact inputs (paths, ids, selected records, constraints) in `evidence`, or `{}` if context has nothing to narrow. Resolve follow-ups against prior conversation. Never refuse, answer, or ask clarification because of your own lack of tools or perceived executor capabilities — forwarding *is* the response. Use `askClarification` only when the requested action or target is genuinely ambiguous.\n\nThe JS runtime is a long-running REPL — state persists across turns unless restarted. Each **turn**: write code → it executes → you see output → write the next block.\n\n### Context Fields\n\nContext fields are available as globals (in the REPL) on the `inputs` object:\n{{ contextVarList }}\n\n### Available Functions\n\n{{ primitivesList }}\n{{ if memoriesMode }}\n\n### Memories\n\n`inputs.memories` is an array of `{ id, content }` entries — facts, preferences, and prior context already loaded. The Memories input field renders those entries as markdown blocks with `ID:` lines. Scan them before deciding what to do. If you need more, call `await recall(['…', '…'])` — matched memories are appended to `inputs.memories` for the next turn (and forwarded to the executor).\n{{ if memoryUsageMode }}\n\nIf `used(...)` is available, call it once for each memory that actually influenced this turn: `await used(id, reason)`. Use the memory's rendered `ID:` value or `inputs.memories[n].id`. Keep reasons short. Do not report memories that were merely loaded or scanned.\n{{ /if }}\n{{ /if }}\n\n### How to Work\n\n- **Skip exploration when context has nothing to narrow** (direct action request, or schema is already known) — forward on turn 1 with `final(request, {})`.\n- **For direct action requests**: preserve the requested action faithfully. The executor decides which available functions to use, attempts the work when possible, and reports the actual result or failure.\n- **When narrowing**: probe shape, narrow with JS, extract. Don't dump raw data. Don't repeat probes already in the Action Log.\n- **Use JS** for deterministic work (filter, sort, slice, regex, dedupe). **Use `llmQuery`** only to interpret a narrowed slice — never pass raw `inputs.*` to it.\n- `console.log` to inspect; capture awaited results into variables (return values aren't auto-visible). Multiple `console.log`s per turn is fine.\n\n```js\nconst narrowed = inputs.emails\n .filter(e => e.subject.toLowerCase().includes('refund'))\n .map(e => ({ from: e.from, subject: e.subject, body: e.body.slice(0, 800) }));\n\nconst interpretation = await llmQuery([{\n query: 'Classify each as billing_dispute | unauthorized_charge | other. JSON list.',\n context: { emails: narrowed }\n}]);\nconsole.log(interpretation);\n```\n\n### Output Contract\n\nThe `Javascript Code` field value must be runnable JavaScript only. Do not put prose or plain labels like `task:` / `evidence:` inside the value. Never combine `console.log` with `final()` or `askClarification()` in the same turn.\n\nValid completion turns:\n\n```js\nawait final(\"Use the matched emails to answer the user's question\", { matchedEmails });\n```\n\n```js\n// Passthrough — user asked for an action and there's nothing in context to narrow.\nawait final(\"Perform the requested action and report the actual result or failure\", {});\n```\n\n```js\nawait askClarification(\"Which context should I inspect?\");\n```\n\n## JavaScript Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
4317
+ readonly 'rlm/executor.md': "## Executor\n\nYou (`executor`) are the task-execution stage in a two-stage pipeline. Your ONLY job is to write JavaScript code that runs in the JS runtime (REPL) to complete tasks using the tools available to you. A separate (`responder`) agent downstream synthesizes the final answer.\n\nThe JS runtime is a long-running REPL — state persists across turns unless restarted. Each **turn**: write code → it executes → you see output → write the next block.\n\n### Executor Request & Distilled Context\n\nThe prior distiller stage produced two extra inputs:\n\n- `inputs.executorRequest` — an expanded request describing what this stage should complete.\n- `inputs.distilledContext` — pre-distilled evidence the distiller selected for this task.\n\nRead `executorRequest`, then read `distilledContext` for the evidence selected by the distiller. Raw context fields are not available in this stage. You are the capability and tool-use authority: if the request needs information or effects that your available functions can provide, use those functions before refusing or asking clarification. If the distilled evidence is sufficient, finish directly with `final(...)`. Call `askClarification(...)` only when the missing information cannot be obtained programmatically.\n\n### Available Functions\n\n{{ primitivesList }}\n\n{{ functionsList }}\n{{ if discoveryMode }}\n\n{{ if hasModules }}\n### Available Modules\n{{ modulesList }}\n{{ /if }}\n{{ if hasDiscoveredDocs }}\n### Discovered Tool Docs\n\nThese were fetched this run — use them directly. Only re-run discovery for modules/functions not listed here.\n\n{{ discoveredDocsMarkdown }}\n{{ /if }}\n{{ /if }}\n{{ if hasSkills }}\n### Loaded Skills\n\nThese skill guides were loaded via `discover({ skills: [...] })` — apply them directly. Call `discover({ skills: [...] })` to load additional skills as needed.\n{{ if skillUsageMode }}\n\nIf `used(...)` is available, call it once for each loaded skill that actually influenced this turn: `await used(id, reason)`. Use the skill's rendered `ID:` value. Keep reasons short. Do not report skills that were merely loaded or scanned.\n{{ /if }}\n\n{{ skillsMarkdown }}\n{{ /if }}\n{{ if memoriesMode }}\n\n### Memories\n\n`inputs.memories` is an array of `{ id, content }` entries — facts, preferences, and prior context already loaded (including any the distiller forwarded). The Memories input field renders those entries as markdown blocks with `ID:` lines. Scan them before deciding what to do. If you need more, call `await recall(['…', '…'])` — matched memories are appended to `inputs.memories` for the next turn.\n{{ if memoryUsageMode }}\n\nIf `used(...)` is available, call it once for each memory that actually influenced this turn: `await used(id, reason)`. Use the memory's rendered `ID:` value or `inputs.memories[n].id`. Keep reasons short. Do not report memories that were merely loaded or scanned.\n{{ /if }}\n{{ /if }}\n\n### How to Work\n\n- Start from `inputs.executorRequest`, `inputs.distilledContext`, non-context task inputs, and prior successful Action Log results. Don't repeat probes already in the Action Log.\n- Treat direct action requests as work to attempt with available functions. If a function fails or the environment denies the action, capture the real error, status, output, or exception in the evidence for the responder.\n- **Use JS** for deterministic work (filter, sort, slice, regex, dedupe). **Use `llmQuery`** only to interpret narrowed text — never pass raw `inputs.*` to it.\n- Discovery calls (`discover`) can appear alongside other code — the runtime runs them first automatically.\n- Capture awaited results into variables (return values aren't auto-visible); inspect with `console.log(result)` or finish with `await final(\"...\", { result })`. Multiple `console.log`s per turn is fine.\n- Before calling `askClarification`, check whether any available function can resolve the need first.\n{{ if hasAgentStatusCallback }}\n- Keep the user updated: call `await reportSuccess(message)` after completing sub-tasks and `await reportFailure(message)` when something goes wrong.\n{{ /if }}\n\n```js\nconst narrowed = inputs.emails\n .filter(e => e.subject.toLowerCase().includes('refund'))\n .map(e => ({ from: e.from, subject: e.subject, body: e.body.slice(0, 800) }));\n\nconst plan = await llmQuery([{\n query: 'Determine which messages require a refund response and draft a compact action plan.',\n context: { emails: narrowed }\n}]);\nconsole.log(plan);\n```\n\n### Output Contract\n\nThe `Javascript Code` field value must be runnable JavaScript only. Do not put prose or plain labels like `task:` / `evidence:` inside the value. Never combine `console.log` with `final()` or `askClarification()` in the same turn.\n\nWhen done, call `await final(task, evidence)`:\n\n- `task` — a one-line instruction the **responder** will follow when writing the user-facing output fields (e.g. \"Answer the user's question using the matched emails\").\n- `evidence` — the curated data the responder will read to follow `task`. Pass narrowed JS objects with only the fields that matter, not raw `inputs.*`. Use plain keys (`{ matchedEmails: [...] }`) — don't wrap under the output field name.\n\nDo not pre-format the answer; the responder writes the output fields.\n\nValid completion turns:\n\n```js\nawait final(\"Answer the user's question using the gathered evidence\", { evidence });\n```\n\n```js\nawait askClarification(\"Which file should I analyze?\");\n```\n\n## JavaScript Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
4318
4318
  readonly 'rlm/responder.md': "## Answer Synthesis Agent\n\nYou synthesize the final answer from the evidence the actor gathered. You do not run code, call tools, or invoke agents — you read input fields and write the output fields.\n\n### Reading the actor's payload\n\n`Context Data` has two keys:\n\n- `task` — a one-line instruction telling you what to write into the output fields.\n- `evidence` — the data the actor curated for you to follow that instruction.\n\n### Rules\n\n1. Follow `Context Data.task` using `Context Data.evidence` and any other input fields provided.\n2. When emitting a JSON output field, write the value flat — do **not** wrap it under a key matching the field's title. The field is already named.\n3. If `evidence` lacks sufficient information, give the best possible answer from what's available across all input fields.\n4. Do not contradict actor evidence. If evidence contains a tool result, failure, status, output, or exception, report that result rather than inventing a capability limit.\n\n### Context variables that were analyzed (metadata only)\n{{ contextVarSummary }}\n{{ if hasAgentIdentity }}\n\n### Agent Identity\n\nUser-facing identity:\n{{ agentIdentityText }}\n{{ /if }}\n";
4319
4319
  };
4320
4320
  type TemplateId = keyof typeof promptTemplates;
@@ -4350,6 +4350,250 @@ type AxAgentContextEvent = {
4350
4350
  };
4351
4351
  type AxAgentOnContextEvent = (event: Readonly<AxAgentContextEvent>) => void | Promise<void>;
4352
4352
 
4353
+ /**
4354
+ * Semantic Context Management for the AxAgent RLM loop.
4355
+ *
4356
+ * Manages the action log by evaluating step importance via hindsight heuristics,
4357
+ * generating compact tombstones for resolved errors, and pruning low-value entries
4358
+ * to maximize context window utility.
4359
+ */
4360
+
4361
+ type ActionLogTag = 'error' | 'dead-end' | 'foundational' | 'pivot' | 'superseded';
4362
+ type ActionLogStepKind = 'explore' | 'transform' | 'query' | 'finalize' | 'error';
4363
+ type ActionReplayMode = 'full' | 'omit';
4364
+ type ActionLogFunctionCall = {
4365
+ qualifiedName: string;
4366
+ name?: string;
4367
+ arguments?: unknown;
4368
+ result?: unknown;
4369
+ error?: string;
4370
+ };
4371
+ type ActionLogEntry = {
4372
+ turn: number;
4373
+ code: string;
4374
+ output: string;
4375
+ tags: ActionLogTag[];
4376
+ summary?: string;
4377
+ producedVars?: string[];
4378
+ referencedVars?: string[];
4379
+ stateDelta?: string;
4380
+ stepKind?: ActionLogStepKind;
4381
+ replayMode?: ActionReplayMode;
4382
+ /** 0-5 importance score set by hindsight evaluation. */
4383
+ rank?: number;
4384
+ /** Compact summary replacing full code+output when rendered. */
4385
+ tombstone?: string;
4386
+ /** @internal Pending tombstone generation. */
4387
+ _tombstonePromise?: Promise<string>;
4388
+ /** @internal Direct qualified callable usages like `db.search(...)`. */
4389
+ _directQualifiedCalls?: readonly string[];
4390
+ /** @internal Runtime-recorded function calls made during this turn. */
4391
+ _functionCalls?: readonly ActionLogFunctionCall[];
4392
+ /** @internal Durable runtime values written during this turn. */
4393
+ _durableWrites?: readonly string[];
4394
+ /** @internal Runtime values read during this turn. */
4395
+ _durableReads?: readonly string[];
4396
+ /** @internal Retry hazards inferred from errors in this turn. */
4397
+ _failureHazards?: readonly string[];
4398
+ };
4399
+ type CheckpointSummaryState = {
4400
+ fingerprint: string;
4401
+ summary: string;
4402
+ turns: number[];
4403
+ };
4404
+ type RuntimeStateVariableProvenance = {
4405
+ createdTurn: number;
4406
+ lastReadTurn?: number;
4407
+ stepKind?: ActionLogStepKind;
4408
+ source?: string;
4409
+ code?: string;
4410
+ };
4411
+
4412
+ /**
4413
+ * Interface for agents that can be used as child agents.
4414
+ * Provides methods to get the agent's function definition and features.
4415
+ */
4416
+ interface AxAgentic<IN extends AxGenIn, OUT extends AxGenOut> extends AxProgrammable<IN, OUT> {
4417
+ getFunction(): AxFunction;
4418
+ }
4419
+ type AxAnyAgentic = AxAgentic<any, any>;
4420
+ type AxAgentIdentity = {
4421
+ name: string;
4422
+ description: string;
4423
+ namespace?: string;
4424
+ };
4425
+ type AxAgentFunctionModuleMeta = {
4426
+ namespace: string;
4427
+ title: string;
4428
+ selectionCriteria?: string;
4429
+ description?: string;
4430
+ alwaysInclude?: boolean;
4431
+ };
4432
+ type AxAgentFunctionExample = {
4433
+ code: string;
4434
+ title?: string;
4435
+ description?: string;
4436
+ language?: string;
4437
+ };
4438
+ type AxAgentFunction = Omit<AxFunction, 'description'> & {
4439
+ description?: string;
4440
+ examples?: readonly AxAgentFunctionExample[];
4441
+ /**
4442
+ * Marks the function's origin so the runtime can distinguish user-registered
4443
+ * tools (`'external'`, default) from agent-derived ones (`'internal'`) when
4444
+ * dispatching `onFunctionCall` observers. Set automatically when an
4445
+ * `AxAgentic` is supplied through `functions: [...]`.
4446
+ */
4447
+ _kind?: 'internal' | 'external';
4448
+ /** Internal marker copied from an `AxAgentFunctionGroup` with alwaysInclude. */
4449
+ _alwaysInclude?: boolean;
4450
+ };
4451
+ type AxAgentFunctionGroup = AxAgentFunctionModuleMeta & {
4452
+ functions: readonly Omit<AxAgentFunction, 'namespace'>[];
4453
+ };
4454
+ type AxAgentTestCompletionPayload = {
4455
+ type: 'final' | 'askClarification';
4456
+ args: unknown[];
4457
+ };
4458
+ type AxAgentTestResult = string | AxAgentTestCompletionPayload;
4459
+ type AxAgentClarificationKind = 'text' | 'number' | 'date' | 'single_choice' | 'multiple_choice';
4460
+ type AxAgentClarificationChoice = string | {
4461
+ label: string;
4462
+ value?: string;
4463
+ };
4464
+ type AxAgentClarification = string | AxAgentStructuredClarification;
4465
+ type AxAgentStructuredClarification = {
4466
+ question: string;
4467
+ type?: AxAgentClarificationKind;
4468
+ choices?: AxAgentClarificationChoice[];
4469
+ [key: string]: unknown;
4470
+ };
4471
+ type AxAgentGuidanceLogEntry = {
4472
+ turn: number;
4473
+ guidance: string;
4474
+ triggeredBy?: string;
4475
+ };
4476
+ type AxAgentStateActionLogEntry = Pick<ActionLogEntry, 'turn' | 'code' | 'output' | 'tags' | 'summary' | 'producedVars' | 'referencedVars' | 'stateDelta' | 'stepKind' | 'replayMode' | 'rank' | 'tombstone'>;
4477
+ type AxAgentStateCheckpointState = CheckpointSummaryState;
4478
+ type AxAgentStateRuntimeEntry = AxCodeSessionSnapshotEntry;
4479
+ type AxExecutorModelPolicyEntryBase = {
4480
+ model: string;
4481
+ namespaces?: readonly string[];
4482
+ aboveErrorTurns?: number;
4483
+ };
4484
+ type AxExecutorModelPolicyEntry = (AxExecutorModelPolicyEntryBase & {
4485
+ aboveErrorTurns: number;
4486
+ }) | (AxExecutorModelPolicyEntryBase & {
4487
+ namespaces: readonly string[];
4488
+ });
4489
+ type AxAgentStateExecutorModelState = {
4490
+ consecutiveErrorTurns: number;
4491
+ matchedNamespaces?: string[];
4492
+ };
4493
+ type AxAgentDiscoveryPromptState = {
4494
+ modules?: Array<{
4495
+ module: string;
4496
+ text: string;
4497
+ }>;
4498
+ functions?: Array<{
4499
+ qualifiedName: string;
4500
+ text: string;
4501
+ }>;
4502
+ };
4503
+ type AxAgentSkillsPromptState = {
4504
+ loaded?: Array<{
4505
+ id?: string;
4506
+ name: string;
4507
+ content: string;
4508
+ }>;
4509
+ };
4510
+ type AxExecutorModelPolicy = readonly [
4511
+ AxExecutorModelPolicyEntry,
4512
+ ...AxExecutorModelPolicyEntry[]
4513
+ ];
4514
+ type AxAgentState = {
4515
+ version: 1;
4516
+ runtimeBindings: Record<string, unknown>;
4517
+ runtimeEntries: AxAgentStateRuntimeEntry[];
4518
+ actionLogEntries: AxAgentStateActionLogEntry[];
4519
+ guidanceLogEntries?: AxAgentGuidanceLogEntry[];
4520
+ discoveryPromptState?: AxAgentDiscoveryPromptState;
4521
+ skillsPromptState?: AxAgentSkillsPromptState;
4522
+ checkpointState?: AxAgentStateCheckpointState;
4523
+ provenance: Record<string, RuntimeStateVariableProvenance>;
4524
+ actorModelState?: AxAgentStateExecutorModelState;
4525
+ };
4526
+ declare class AxAgentClarificationError extends Error {
4527
+ readonly question: string;
4528
+ readonly clarification: AxAgentStructuredClarification;
4529
+ private readonly stateSnapshot;
4530
+ private readonly stateErrorMessage;
4531
+ constructor(clarification: AxAgentClarification, options?: Readonly<{
4532
+ state?: AxAgentState;
4533
+ stateError?: string;
4534
+ }>);
4535
+ getState(): AxAgentState | undefined;
4536
+ }
4537
+ type AxAgentFunctionCollection = readonly (AxAgentFunction | AxAnyAgentic)[] | readonly AxAgentFunctionGroup[];
4538
+ type AxContextFieldInput = string | {
4539
+ field: string;
4540
+ promptMaxChars?: number;
4541
+ keepInPromptChars?: number;
4542
+ reverseTruncate?: boolean;
4543
+ };
4544
+ type AxContextFieldPromptConfig = {
4545
+ kind: 'threshold';
4546
+ promptMaxChars: number;
4547
+ } | {
4548
+ kind: 'truncate';
4549
+ keepInPromptChars: number;
4550
+ reverseTruncate: boolean;
4551
+ };
4552
+ type AxAgentInputUpdateCallback<IN extends AxGenIn> = (currentInputs: Readonly<IN>) => Promise<Partial<IN> | undefined> | Partial<IN> | undefined;
4553
+ type AxAgentActorTurnCallbackArgs = {
4554
+ /** Actor stage that produced this turn. */
4555
+ stage: AxAgentContextStage;
4556
+ /** 1-based actor turn number. */
4557
+ turn: number;
4558
+ /** Number of action log entries recorded after processing this turn. */
4559
+ actionLogEntryCount: number;
4560
+ /** Number of guidance log entries recorded after processing this turn. */
4561
+ guidanceLogEntryCount: number;
4562
+ /** Full actor AxGen output for the turn, including javascriptCode and any actor fields. */
4563
+ executorResult: Record<string, unknown>;
4564
+ /** Normalized JavaScript that was executed for this turn. */
4565
+ code: string;
4566
+ /**
4567
+ * Raw runtime execution result before formatting or truncation.
4568
+ * For policy-violation turns and completion-signal turns, this is undefined.
4569
+ */
4570
+ result: unknown;
4571
+ /** Action-log-safe runtime output string after formatting/truncation. */
4572
+ output: string;
4573
+ /** True when the turn recorded an error output. */
4574
+ isError: boolean;
4575
+ /** Thought text returned by the actor AxGen when available. */
4576
+ thought?: string;
4577
+ /** Token usage for this turn only. */
4578
+ usage?: AxProgramUsage[];
4579
+ /** Model used for this turn, when explicitly set via executorModelPolicy. */
4580
+ model?: string;
4581
+ /** Raw ChatML conversation for this turn (system, user, assistant). Only populated when an actor turn callback is set. */
4582
+ chatLogMessages?: ReadonlyArray<{
4583
+ role: string;
4584
+ content: string;
4585
+ }>;
4586
+ };
4587
+ type AxAgentActorTurnCallback = (args: AxAgentActorTurnCallbackArgs) => void | Promise<void>;
4588
+ /**
4589
+ * @deprecated Use AxAgentActorTurnCallbackArgs.
4590
+ */
4591
+ type AxAgentExecutorTurnCallbackArgs = AxAgentActorTurnCallbackArgs;
4592
+ /**
4593
+ * @deprecated Use AxAgentActorTurnCallback.
4594
+ */
4595
+ type AxAgentExecutorTurnCallback = AxAgentActorTurnCallback;
4596
+
4353
4597
  /**
4354
4598
  * RLM (Recursive Language Model) interfaces and prompt builder.
4355
4599
  *
@@ -4477,7 +4721,11 @@ interface AxRLMConfig {
4477
4721
  * Called after each Actor turn is recorded with both raw runtime output and
4478
4722
  * the formatted action-log output.
4479
4723
  */
4480
- executorTurnCallback?: (args: AxAgentExecutorTurnCallbackArgs) => void | Promise<void>;
4724
+ actorTurnCallback?: AxAgentActorTurnCallback;
4725
+ /**
4726
+ * @deprecated Use actorTurnCallback.
4727
+ */
4728
+ executorTurnCallback?: AxAgentExecutorTurnCallback;
4481
4729
  /**
4482
4730
  * Called when AxAgent measures context pressure or changes compacted context state.
4483
4731
  * Intended for observability; callback failures are ignored.
@@ -4501,6 +4749,10 @@ declare function axBuildDistillerDefinition(baseDefinition: string | undefined,
4501
4749
  hasCompressedActionReplay?: boolean;
4502
4750
  /** Enables `recall` runtime primitive in the prompt. */
4503
4751
  memoriesMode?: boolean;
4752
+ /** Enables the generic `used` runtime primitive in the prompt. */
4753
+ usageTrackingMode?: boolean;
4754
+ /** Enables actor-declared memory usage instructions. */
4755
+ memoryUsageMode?: boolean;
4504
4756
  /** Optional override for the `rlm/distiller.md` template source. */
4505
4757
  templateOverride?: string;
4506
4758
  /** Optional per-primitive override map keyed by primitive id. */
@@ -4521,16 +4773,22 @@ declare function axBuildExecutorDefinition(baseDefinition: string | undefined, c
4521
4773
  enforceIncrementalConsoleTurns?: boolean;
4522
4774
  hasAgentStatusCallback?: boolean;
4523
4775
  discoveryMode?: boolean;
4524
- /** Enables `consult` runtime primitive in the prompt. */
4776
+ /** Enables `discover({ skills })` runtime overload in the prompt. */
4525
4777
  skillsMode?: boolean;
4526
4778
  /** Enables `recall` runtime primitive in the prompt. */
4527
4779
  memoriesMode?: boolean;
4780
+ /** Enables the generic `used` runtime primitive in the prompt. */
4781
+ usageTrackingMode?: boolean;
4782
+ /** Enables actor-declared memory usage instructions. */
4783
+ memoryUsageMode?: boolean;
4784
+ /** Enables actor-declared skill usage instructions. */
4785
+ skillUsageMode?: boolean;
4528
4786
  availableModules?: ReadonlyArray<{
4529
4787
  namespace: string;
4530
4788
  selectionCriteria?: string;
4531
4789
  }>;
4532
4790
  discoveredDocsMarkdown?: string;
4533
- /** Skill bodies accumulated during the current run (sorted by name). */
4791
+ /** Skill bodies accumulated during the current run (sorted by id). */
4534
4792
  skillsMarkdown?: string;
4535
4793
  agentFunctions?: ReadonlyArray<{
4536
4794
  name: string;
@@ -4538,6 +4796,7 @@ declare function axBuildExecutorDefinition(baseDefinition: string | undefined, c
4538
4796
  parameters?: AxFunctionJSONSchema;
4539
4797
  returns?: AxFunctionJSONSchema;
4540
4798
  namespace: string;
4799
+ alwaysInclude?: boolean;
4541
4800
  }>;
4542
4801
  /** Optional override for the `rlm/executor.md` template source. */
4543
4802
  templateOverride?: string;
@@ -4561,6 +4820,15 @@ type AxAgentMemoryResult = {
4561
4820
  /** Opaque markdown body (frontmatter, if any, is not parsed). */
4562
4821
  content: string;
4563
4822
  };
4823
+ type AxAgentUsedMemory = {
4824
+ /** Stable identifier of a memory present in `inputs.memories`. */
4825
+ id: string;
4826
+ /** Short actor-declared explanation of how the memory influenced the run. */
4827
+ reason?: string;
4828
+ /** Actor stage that declared this memory as used. */
4829
+ stage: AxAgentContextStage;
4830
+ };
4831
+ type AxAgentUsedMemoriesCallback = (usedMemories: readonly AxAgentUsedMemory[]) => void | Promise<void>;
4564
4832
  /**
4565
4833
  * Memories search callback. Receives the raw search strings and the
4566
4834
  * snapshot of `inputs.memories` already loaded for the current run
@@ -4573,11 +4841,25 @@ type AxAgentMemoryResult = {
4573
4841
  type AxAgentMemoriesSearchFn = (searches: readonly string[], alreadyLoaded: readonly AxAgentMemoryResult[]) => readonly AxAgentMemoryResult[] | Promise<readonly AxAgentMemoryResult[]>;
4574
4842
 
4575
4843
  type AxAgentSkillResult = {
4844
+ /** Stable identifier — dedup key, prompt label, and usage telemetry key. */
4845
+ id?: string;
4846
+ /** Human-readable title rendered in the Loaded Skills prompt section. */
4576
4847
  name: string;
4577
4848
  /** Opaque markdown body (frontmatter, if any, is not parsed). */
4578
4849
  content: string;
4579
4850
  };
4580
4851
  type AxAgentSkillsSearchFn = (searches: readonly string[]) => readonly AxAgentSkillResult[] | Promise<readonly AxAgentSkillResult[]>;
4852
+ type AxAgentUsedSkill = {
4853
+ /** Stable skill id present in the Loaded Skills prompt state. */
4854
+ id: string;
4855
+ /** Human-readable skill title. */
4856
+ name: string;
4857
+ /** Optional actor-declared explanation of how the skill influenced the run. */
4858
+ reason?: string;
4859
+ /** Actor stage that declared this skill as used. */
4860
+ stage: AxAgentContextStage;
4861
+ };
4862
+ type AxAgentUsedSkillsCallback = (usedSkills: readonly AxAgentUsedSkill[]) => void | Promise<void>;
4581
4863
 
4582
4864
  type AxJudgeForwardOptions = Omit<AxProgramForwardOptions<string>, 'functions' | 'description'>;
4583
4865
  interface AxJudgeOptions extends AxJudgeForwardOptions {
@@ -4645,220 +4927,6 @@ type AxAgentRecursiveStats = {
4645
4927
  topExpensiveNodes: AxAgentRecursiveExpensiveNode[];
4646
4928
  };
4647
4929
 
4648
- /**
4649
- * Semantic Context Management for the AxAgent RLM loop.
4650
- *
4651
- * Manages the action log by evaluating step importance via hindsight heuristics,
4652
- * generating compact tombstones for resolved errors, and pruning low-value entries
4653
- * to maximize context window utility.
4654
- */
4655
-
4656
- type ActionLogTag = 'error' | 'dead-end' | 'foundational' | 'pivot' | 'superseded';
4657
- type ActionLogStepKind = 'explore' | 'transform' | 'query' | 'finalize' | 'error';
4658
- type ActionReplayMode = 'full' | 'omit';
4659
- type ActionLogEntry = {
4660
- turn: number;
4661
- code: string;
4662
- output: string;
4663
- tags: ActionLogTag[];
4664
- summary?: string;
4665
- producedVars?: string[];
4666
- referencedVars?: string[];
4667
- stateDelta?: string;
4668
- stepKind?: ActionLogStepKind;
4669
- replayMode?: ActionReplayMode;
4670
- /** 0-5 importance score set by hindsight evaluation. */
4671
- rank?: number;
4672
- /** Compact summary replacing full code+output when rendered. */
4673
- tombstone?: string;
4674
- /** @internal Pending tombstone generation. */
4675
- _tombstonePromise?: Promise<string>;
4676
- /** @internal Direct qualified callable usages like `db.search(...)`. */
4677
- _directQualifiedCalls?: readonly string[];
4678
- };
4679
- type CheckpointSummaryState = {
4680
- fingerprint: string;
4681
- summary: string;
4682
- turns: number[];
4683
- };
4684
- type RuntimeStateVariableProvenance = {
4685
- createdTurn: number;
4686
- lastReadTurn?: number;
4687
- stepKind?: ActionLogStepKind;
4688
- source?: string;
4689
- code?: string;
4690
- };
4691
-
4692
- /**
4693
- * Interface for agents that can be used as child agents.
4694
- * Provides methods to get the agent's function definition and features.
4695
- */
4696
- interface AxAgentic<IN extends AxGenIn, OUT extends AxGenOut> extends AxProgrammable<IN, OUT> {
4697
- getFunction(): AxFunction;
4698
- }
4699
- type AxAnyAgentic = AxAgentic<any, any>;
4700
- type AxAgentIdentity = {
4701
- name: string;
4702
- description: string;
4703
- namespace?: string;
4704
- };
4705
- type AxAgentFunctionModuleMeta = {
4706
- namespace: string;
4707
- title: string;
4708
- selectionCriteria?: string;
4709
- description?: string;
4710
- };
4711
- type AxAgentFunctionExample = {
4712
- code: string;
4713
- title?: string;
4714
- description?: string;
4715
- language?: string;
4716
- };
4717
- type AxAgentFunction = Omit<AxFunction, 'description'> & {
4718
- description?: string;
4719
- examples?: readonly AxAgentFunctionExample[];
4720
- /**
4721
- * Marks the function's origin so the runtime can distinguish user-registered
4722
- * tools (`'external'`, default) from agent-derived ones (`'internal'`) when
4723
- * dispatching `onFunctionCall` observers. Set automatically when an
4724
- * `AxAgentic` is supplied through `functions: [...]`.
4725
- */
4726
- _kind?: 'internal' | 'external';
4727
- };
4728
- type AxAgentFunctionGroup = AxAgentFunctionModuleMeta & {
4729
- functions: readonly Omit<AxAgentFunction, 'namespace'>[];
4730
- };
4731
- type AxAgentTestCompletionPayload = {
4732
- type: 'final' | 'askClarification';
4733
- args: unknown[];
4734
- };
4735
- type AxAgentTestResult = string | AxAgentTestCompletionPayload;
4736
- type AxAgentClarificationKind = 'text' | 'number' | 'date' | 'single_choice' | 'multiple_choice';
4737
- type AxAgentClarificationChoice = string | {
4738
- label: string;
4739
- value?: string;
4740
- };
4741
- type AxAgentClarification = string | AxAgentStructuredClarification;
4742
- type AxAgentStructuredClarification = {
4743
- question: string;
4744
- type?: AxAgentClarificationKind;
4745
- choices?: AxAgentClarificationChoice[];
4746
- [key: string]: unknown;
4747
- };
4748
- type AxAgentGuidanceLogEntry = {
4749
- turn: number;
4750
- guidance: string;
4751
- triggeredBy?: string;
4752
- };
4753
- type AxAgentStateActionLogEntry = Pick<ActionLogEntry, 'turn' | 'code' | 'output' | 'tags' | 'summary' | 'producedVars' | 'referencedVars' | 'stateDelta' | 'stepKind' | 'replayMode' | 'rank' | 'tombstone'>;
4754
- type AxAgentStateCheckpointState = CheckpointSummaryState;
4755
- type AxAgentStateRuntimeEntry = AxCodeSessionSnapshotEntry;
4756
- type AxExecutorModelPolicyEntryBase = {
4757
- model: string;
4758
- namespaces?: readonly string[];
4759
- aboveErrorTurns?: number;
4760
- };
4761
- type AxExecutorModelPolicyEntry = (AxExecutorModelPolicyEntryBase & {
4762
- aboveErrorTurns: number;
4763
- }) | (AxExecutorModelPolicyEntryBase & {
4764
- namespaces: readonly string[];
4765
- });
4766
- type AxAgentStateExecutorModelState = {
4767
- consecutiveErrorTurns: number;
4768
- matchedNamespaces?: string[];
4769
- };
4770
- type AxAgentDiscoveryPromptState = {
4771
- modules?: Array<{
4772
- module: string;
4773
- text: string;
4774
- }>;
4775
- functions?: Array<{
4776
- qualifiedName: string;
4777
- text: string;
4778
- }>;
4779
- };
4780
- type AxAgentSkillsPromptState = {
4781
- loaded?: Array<{
4782
- name: string;
4783
- content: string;
4784
- }>;
4785
- };
4786
- type AxExecutorModelPolicy = readonly [
4787
- AxExecutorModelPolicyEntry,
4788
- ...AxExecutorModelPolicyEntry[]
4789
- ];
4790
- type AxAgentState = {
4791
- version: 1;
4792
- runtimeBindings: Record<string, unknown>;
4793
- runtimeEntries: AxAgentStateRuntimeEntry[];
4794
- actionLogEntries: AxAgentStateActionLogEntry[];
4795
- guidanceLogEntries?: AxAgentGuidanceLogEntry[];
4796
- discoveryPromptState?: AxAgentDiscoveryPromptState;
4797
- skillsPromptState?: AxAgentSkillsPromptState;
4798
- checkpointState?: AxAgentStateCheckpointState;
4799
- provenance: Record<string, RuntimeStateVariableProvenance>;
4800
- actorModelState?: AxAgentStateExecutorModelState;
4801
- };
4802
- declare class AxAgentClarificationError extends Error {
4803
- readonly question: string;
4804
- readonly clarification: AxAgentStructuredClarification;
4805
- private readonly stateSnapshot;
4806
- private readonly stateErrorMessage;
4807
- constructor(clarification: AxAgentClarification, options?: Readonly<{
4808
- state?: AxAgentState;
4809
- stateError?: string;
4810
- }>);
4811
- getState(): AxAgentState | undefined;
4812
- }
4813
- type AxAgentFunctionCollection = readonly (AxAgentFunction | AxAnyAgentic)[] | readonly AxAgentFunctionGroup[];
4814
- type AxContextFieldInput = string | {
4815
- field: string;
4816
- promptMaxChars?: number;
4817
- keepInPromptChars?: number;
4818
- reverseTruncate?: boolean;
4819
- };
4820
- type AxContextFieldPromptConfig = {
4821
- kind: 'threshold';
4822
- promptMaxChars: number;
4823
- } | {
4824
- kind: 'truncate';
4825
- keepInPromptChars: number;
4826
- reverseTruncate: boolean;
4827
- };
4828
- type AxAgentInputUpdateCallback<IN extends AxGenIn> = (currentInputs: Readonly<IN>) => Promise<Partial<IN> | undefined> | Partial<IN> | undefined;
4829
- type AxAgentExecutorTurnCallbackArgs = {
4830
- /** 1-based actor turn number. */
4831
- turn: number;
4832
- /** Number of action log entries recorded after processing this turn. */
4833
- actionLogEntryCount: number;
4834
- /** Number of guidance log entries recorded after processing this turn. */
4835
- guidanceLogEntryCount: number;
4836
- /** Full actor AxGen output for the turn, including javascriptCode and any actor fields. */
4837
- executorResult: Record<string, unknown>;
4838
- /** Normalized JavaScript that was executed for this turn. */
4839
- code: string;
4840
- /**
4841
- * Raw runtime execution result before formatting or truncation.
4842
- * For policy-violation turns and completion-signal turns, this is undefined.
4843
- */
4844
- result: unknown;
4845
- /** Action-log-safe runtime output string after formatting/truncation. */
4846
- output: string;
4847
- /** True when the turn recorded an error output. */
4848
- isError: boolean;
4849
- /** Thought text returned by the actor AxGen when available. */
4850
- thought?: string;
4851
- /** Token usage for this turn only. */
4852
- usage?: AxProgramUsage[];
4853
- /** Model used for this turn, when explicitly set via executorModelPolicy. */
4854
- model?: string;
4855
- /** Raw ChatML conversation for this turn (system, user, assistant). Only populated when executorTurnCallback is set. */
4856
- chatLogMessages?: ReadonlyArray<{
4857
- role: string;
4858
- content: string;
4859
- }>;
4860
- };
4861
-
4862
4930
  /**
4863
4931
  * Demo traces for AxAgent's split architecture.
4864
4932
  * Actor demos use `{ javascriptCode }`.
@@ -4957,30 +5025,36 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
4957
5025
  functionDiscovery?: boolean;
4958
5026
  /**
4959
5027
  * Optional skills search callback. When set, the executor runtime gains a
4960
- * `consult(searches: string[]): void` global. The callback receives the
4961
- * raw search strings and returns matched skills (`{ name, content }`);
4962
- * each returned skill's content is rendered into the executor system
4963
- * prompt for subsequent turns (sorted by name to keep the prefix cache
4964
- * stable). `consult()` itself returns nothing — the actor inspects the
4965
- * **Loaded Skills** section of the next turn's prompt to see what landed.
5028
+ * `discover({ skills })` path. The callback receives the raw search strings
5029
+ * and returns matched skills (`{ id?, name, content }`); each returned skill's
5030
+ * content is rendered into the executor system prompt for subsequent turns
5031
+ * (sorted by id to keep the prefix cache stable). `discover(...)` itself
5032
+ * returns nothing — the actor inspects the **Loaded Skills** section of the
5033
+ * next turn's prompt to see what landed.
4966
5034
  */
4967
5035
  onSkillsSearch?: AxAgentSkillsSearchFn;
4968
5036
  /**
4969
5037
  * Skills to preload into the executor prompt at startup, in the same
4970
- * shape returned by `onSkillsSearch` ({ name, content }). Useful when
5038
+ * shape returned by `onSkillsSearch` ({ id?, name, content }). Useful when
4971
5039
  * the caller already knows which skills are relevant and wants to
4972
- * skip the actor's `consult(...)` round-trip. Merged with skills
4973
- * passed at forward()-time (forward overrides by name). Does NOT
4974
- * fire `onUsedSkills` — that callback is for runtime-loaded skills.
5040
+ * skip the actor's `discover({ skills })` round-trip. Merged with skills
5041
+ * passed at forward()-time (forward overrides by id). Does NOT
5042
+ * fire `onLoadedSkills` — that callback is for runtime-loaded skills.
4975
5043
  */
4976
5044
  skills?: readonly AxAgentSkillResult[];
4977
5045
  /**
4978
- * Optional callback fired whenever `consult(...)` loads skills. Receives
4979
- * the matched `{ name, content }[]` from `onSkillsSearch`. Use this for
5046
+ * Optional callback fired whenever `discover({ skills })` loads skills. Receives
5047
+ * the matched `{ id?, name, content }[]` from `onSkillsSearch`. Use this for
4980
5048
  * analytics, telemetry, or feedback loops on skill relevance — it does
4981
5049
  * not affect runtime behaviour.
4982
5050
  */
4983
- onUsedSkills?: (results: readonly AxAgentSkillResult[]) => void | Promise<void>;
5051
+ onLoadedSkills?: (results: readonly AxAgentSkillResult[]) => void | Promise<void>;
5052
+ /**
5053
+ * Optional callback fired once per agent forward when skill usage tracking
5054
+ * is enabled. Receives actor-declared skills that actually influenced the
5055
+ * executor (`{ id, name, reason?, stage }`). Unknown ids are dropped.
5056
+ */
5057
+ onUsedSkills?: AxAgentUsedSkillsCallback;
4984
5058
  /**
4985
5059
  * Optional memories search callback. When set, the distiller and executor
4986
5060
  * stages gain a `recall(searches: string[]): void` global, and both
@@ -5001,10 +5075,16 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
5001
5075
  /**
5002
5076
  * Optional callback fired whenever `recall(...)` loads memories. Receives
5003
5077
  * the matched `{ id, content }[]` from `onMemoriesSearch`. Use this for
5004
- * analytics, telemetry, or feedback loops on memory relevance — it does
5005
- * not affect runtime behaviour.
5078
+ * load telemetry, cache warming, or feedback loops on retrieval relevance —
5079
+ * it does not mean the actor used every memory in its final reasoning.
5080
+ */
5081
+ onLoadedMemories?: (results: readonly AxAgentMemoryResult[]) => void | Promise<void>;
5082
+ /**
5083
+ * Optional callback fired once per agent forward when memory usage tracking
5084
+ * is enabled. Receives actor-declared memories that actually influenced the
5085
+ * distiller or executor (`{ id, reason?, stage }`). Unknown ids are dropped.
5006
5086
  */
5007
- onUsedMemories?: (results: readonly AxAgentMemoryResult[]) => void | Promise<void>;
5087
+ onUsedMemories?: AxAgentUsedMemoriesCallback;
5008
5088
  /** Code runtime for the REPL loop (default: AxJSRuntime). */
5009
5089
  runtime?: AxCodeRuntime;
5010
5090
  /** Actor prompt verbosity and scaffolding level (default: 'default'). */
@@ -5022,7 +5102,14 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
5022
5102
  /** Default options for the internal checkpoint summarizer. */
5023
5103
  summarizerOptions?: Omit<AxProgramForwardOptions<string>, 'functions'>;
5024
5104
  /**
5025
- * Called after each executor turn is recorded with both the raw runtime
5105
+ * Called after each actor turn is recorded with both the raw runtime
5106
+ * result and the formatted action-log output.
5107
+ */
5108
+ actorTurnCallback?: AxAgentActorTurnCallback;
5109
+ /**
5110
+ * @deprecated Use actorTurnCallback.
5111
+ *
5112
+ * Called after each actor turn is recorded with both the raw runtime
5026
5113
  * result and the formatted action-log output.
5027
5114
  */
5028
5115
  executorTurnCallback?: (args: AxAgentExecutorTurnCallbackArgs) => void | Promise<void>;
@@ -5092,13 +5179,17 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
5092
5179
  * `AxProgramForwardOptionsWithModels` with agent-specific knobs that only
5093
5180
  * make sense at the agent boundary (currently `skills` for one-shot
5094
5181
  * preloading). Forward-time `skills` merge on top of init-time `skills`
5095
- * (forward overrides by name).
5182
+ * (forward overrides by id).
5096
5183
  */
5097
5184
  type AxAgentForwardOptions<T extends Readonly<AxAIService>> = AxProgramForwardOptionsWithModels<T> & {
5098
5185
  skills?: readonly AxAgentSkillResult[];
5186
+ onUsedMemories?: AxAgentUsedMemoriesCallback;
5187
+ onUsedSkills?: AxAgentUsedSkillsCallback;
5099
5188
  };
5100
5189
  type AxAgentStreamingForwardOptions<T extends Readonly<AxAIService>> = AxProgramStreamingForwardOptionsWithModels<T> & {
5101
5190
  skills?: readonly AxAgentSkillResult[];
5191
+ onUsedMemories?: AxAgentUsedMemoriesCallback;
5192
+ onUsedSkills?: AxAgentUsedSkillsCallback;
5102
5193
  };
5103
5194
  type AxStageOptions = Partial<Omit<AxProgramForwardOptions<string>, 'functions'> & {
5104
5195
  description?: string;
@@ -5490,6 +5581,8 @@ declare class ActorAgentRLM<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
5490
5581
  actionLog: string;
5491
5582
  executorResult: AxAgentExecutorResultPayload;
5492
5583
  actorFieldValues: Record<string, unknown>;
5584
+ usedMemories: AxAgentUsedMemory[];
5585
+ usedSkills: AxAgentUsedSkill[];
5493
5586
  turnCount: number;
5494
5587
  }>;
5495
5588
  private _withDefaultExecutorRequest;
@@ -5501,6 +5594,8 @@ declare class ActorAgentRLM<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
5501
5594
  nonContextValues: Record<string, unknown>;
5502
5595
  executorResult: AxAgentExecutorResultPayload;
5503
5596
  actorFieldValues: Record<string, unknown>;
5597
+ usedMemories: AxAgentUsedMemory[];
5598
+ usedSkills: AxAgentUsedSkill[];
5504
5599
  turnCount: number;
5505
5600
  guidanceLog: string | undefined;
5506
5601
  actionLog: string;
@@ -5649,7 +5744,11 @@ type AxDiscoveryTurnSummary = {
5649
5744
  texts: Set<string>;
5650
5745
  };
5651
5746
  type AxMutableSkillsPromptState = {
5652
- loaded: Map<string, string>;
5747
+ loaded: Map<string, {
5748
+ id: string;
5749
+ name: string;
5750
+ content: string;
5751
+ }>;
5653
5752
  };
5654
5753
  type AxAgentOptimizationTargetDescriptor = {
5655
5754
  id: string;
@@ -5674,7 +5773,7 @@ type AxAgentMemoryEntry = {
5674
5773
  * The RLM stage templates (distiller.md, executor.md) advertise a small
5675
5774
  * set of built-in async functions to the LLM: `final`, `askClarification`,
5676
5775
  * `llmQuery`, `inspectRuntime`, `reportSuccess`/`reportFailure`,
5677
- * `discoverModules`/`discoverFunctions`, etc.
5776
+ * `discover`, etc.
5678
5777
  *
5679
5778
  * Historically these were hand-written into each template as bullet lists,
5680
5779
  * which drifted apart as primitives were added. This module is the single
@@ -5688,22 +5787,29 @@ interface AxRuntimePrimitive {
5688
5787
  readonly id: string;
5689
5788
  /** Which actor stages advertise this primitive. */
5690
5789
  readonly stages: readonly AxRuntimePrimitiveStage[];
5691
- /**
5692
- * Optional gating flag name. If set, the primitive is only rendered when
5693
- * `flags[enabledBy]` is truthy. Useful for conditional primitives like
5694
- * `inspectRuntime` (only when the runtime supports `inspectGlobals`) or
5695
- * `reportSuccess`/`reportFailure` (only when an agent status callback is wired).
5696
- */
5790
+ /** Optional required flag name. */
5697
5791
  readonly enabledBy?: string;
5698
- /**
5699
- * Pre-formatted callable blocks. Each entry renders as a self-contained
5700
- * description-then-signature block (description on one line, backticked
5701
- * signature on the next). Multiple entries model overloads
5702
- * (`final(message)` vs `final(task, context)`); they are emitted as
5703
- * separate blocks separated by a blank line.
5704
- */
5705
- readonly lines: readonly string[];
5706
- }
5792
+ /** Optional flag names where at least one must be truthy. */
5793
+ readonly enabledByAny?: readonly string[];
5794
+ /** Short purpose statement rendered above the overloads. */
5795
+ readonly description: string;
5796
+ /** Signature overloads rendered as separate backticked lines. */
5797
+ readonly signatures: readonly AxRuntimePrimitiveSignature[];
5798
+ /** Optional examples rendered under the overload list. */
5799
+ readonly examples?: readonly AxRuntimePrimitiveExample[];
5800
+ }
5801
+ type AxRuntimePrimitiveSignature = {
5802
+ readonly code: string;
5803
+ readonly enabledBy?: string;
5804
+ readonly enabledByAny?: readonly string[];
5805
+ readonly disabledBy?: string;
5806
+ };
5807
+ type AxRuntimePrimitiveExample = {
5808
+ readonly code: string;
5809
+ readonly enabledBy?: string;
5810
+ readonly enabledByAny?: readonly string[];
5811
+ readonly disabledBy?: string;
5812
+ };
5707
5813
  /**
5708
5814
  * Canonical, ordered registry of RLM actor primitives. Order here is the
5709
5815
  * order rendered into the prompt.
@@ -12811,4 +12917,4 @@ declare class AxRateLimiterTokenUsage {
12811
12917
  acquire(tokens: number): Promise<void>;
12812
12918
  }
12813
12919
 
12814
- export { AxACE, type AxACEBullet, type AxACECuratorOperation, type AxACECuratorOperationType, type AxACECuratorOutput, type AxACEFeedbackEvent, type AxACEGeneratorOutput, type AxACEOptimizationArtifact, AxACEOptimizedProgram, type AxACEOptions, type AxACEPlaybook, type AxACEReflectionOutput, type AxACEResult, AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicEffortLevel, type AxAIAnthropicEffortLevelMapping, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicOutputConfig, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, type AxAIAnthropicThinkingWire, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiCacheCreateRequest, type AxAIGoogleGeminiCacheResponse, type AxAIGoogleGeminiCacheUpdateRequest, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, type AxAIGoogleGeminiRetrievalConfig, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingLevel, type AxAIGoogleGeminiThinkingLevelMapping, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleMaps, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelCatalogAudioSupport, type AxAIModelCatalogFilter, type AxAIModelCatalogModel, type AxAIModelCatalogModelCapabilities, type AxAIModelCatalogModelType, type AxAIModelCatalogOptions, type AxAIModelCatalogProvider, type AxAIModelCatalogProviderName, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIOpenRouter, type AxAIOpenRouterArgs, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAITogetherChatModel, AxAITogetherModel, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentClarification, type AxAgentClarificationChoice, AxAgentClarificationError, type AxAgentClarificationKind, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentContextEvent, type AxAgentContextPressure, type AxAgentContextStage, type AxAgentDemos, type AxAgentDiscoveryPromptState, type AxAgentEvalDataset, type AxAgentEvalFunctionCall, type AxAgentEvalPrediction, type AxAgentEvalTask, type AxAgentExecutorResultPayload, type AxAgentExecutorTurnCallbackArgs, type AxAgentForwardOptions, type AxAgentFunction, type AxAgentFunctionCall, type AxAgentFunctionCallRecorder, type AxAgentFunctionCollection, type AxAgentFunctionExample, type AxAgentFunctionGroup, type AxAgentFunctionModuleMeta, type AxAgentGuidanceLogEntry, type AxAgentGuidancePayload, type AxAgentGuidanceState, type AxAgentIdentity, type AxAgentInputUpdateCallback, type AxAgentInternalCompletionPayload, type AxAgentJudgeEvalInput, type AxAgentJudgeEvalOutput, type AxAgentJudgeInput, type AxAgentJudgeOptions, type AxAgentJudgeOutput, type AxAgentMemoriesSearchFn, type AxAgentMemoryEntry, type AxAgentMemoryResult, type AxAgentOnContextEvent, type AxAgentOnFunctionCall, type AxAgentOptimizationTargetDescriptor, type AxAgentOptimizeOptions, type AxAgentOptimizeResult, type AxAgentOptimizeTarget, type AxAgentOptions, AxAgentProtocolCompletionSignal, type AxAgentRecursionOptions, type AxAgentRecursiveExpensiveNode, type AxAgentRecursiveFunctionCall, type AxAgentRecursiveNodeRole, type AxAgentRecursiveStats, type AxAgentRecursiveTargetId, type AxAgentRecursiveTraceNode, type AxAgentRecursiveTurn, type AxAgentRecursiveUsage, type AxAgentRuntimeCompletionState, type AxAgentRuntimeExecutionContext, type AxAgentRuntimeInputState, type AxAgentSkillResult, type AxAgentSkillsPromptState, type AxAgentSkillsSearchFn, type AxAgentState, type AxAgentStateActionLogEntry, type AxAgentStateCheckpointState, type AxAgentStateExecutorModelState, type AxAgentStateRuntimeEntry, type AxAgentStreamingForwardOptions, type AxAgentStructuredClarification, type AxAgentTestCompletionPayload, type AxAgentTestResult, type AxAgentUsage, type AxAgentic, type AxAnyAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, type AxAudioFormat, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatAudioConfig, type AxChatAudioOutput, type AxChatLogEntry, type AxChatLogMessage, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpoint, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCodeInterpreter, type AxCodeRuntime, type AxCodeSession, type AxCodeSessionSnapshot, type AxCodeSessionSnapshotEntry, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxContextCacheInfo, type AxContextCacheOperation, type AxContextCacheOptions, type AxContextCacheRegistry, type AxContextCacheRegistryEntry, type AxContextFieldInput, type AxContextFieldPromptConfig, type AxContextPolicyBudget, type AxContextPolicyConfig, type AxContextPolicyPreset, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, type AxDateRange, type AxDateRangeValue, type AxDebugChatResponseUsage, AxDefaultCostTracker, AxDefaultResultReranker, type AxDiscoveryTurnSummary, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxExamples, type AxExecutorModelPolicy, type AxExecutorModelPolicyEntry, type AxField, type AxFieldOptions, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, type AxFunctionCallTrace, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPABatchEvaluation, type AxGEPABatchRow, type AxGEPABootstrapOptions, type AxGEPAComponentBanditState, AxGEPAComponentSelector, type AxGEPAComponentTarget, type AxGEPAEvaluationBatch, type AxGEPAEvaluationState, type AxGEPAOptimizationReport, type AxGEPAReflectiveTuple, type AxGEPATraceSummary, type AxGEPATraceSummaryCall, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenInput, type AxGenMetricsInstruments, type AxGenOut, type AxGenOutput, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSRuntime, type AxJSRuntimeNodePermissionAllowlist, type AxJSRuntimeOutputMode, AxJSRuntimePermission, type AxJSRuntimeResourceLimits, type AxJudgeForwardOptions, type AxJudgeOptions, AxLLMRequestTypeValues, AxLearn, type AxLearnArtifact, type AxLearnCheckpointMode, type AxLearnCheckpointState, type AxLearnContinuousOptions, type AxLearnMode, type AxLearnOptimizeOptions, type AxLearnOptions, type AxLearnPlaybook, type AxLearnPlaybookOptions, type AxLearnPlaybookSummary, type AxLearnProgress, type AxLearnResult, type AxLearnUpdateFeedback, type AxLearnUpdateInput, type AxLearnUpdateOptions, type AxLlmQueryBudgetState, type AxLlmQueryPromptMode, type AxLoggerData, type AxLoggerFunction, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPEmbeddedResource, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPImageContent, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPResource, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMemoryMessageValue, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxMutableDiscoveryPromptState, type AxMutableSkillsPromptState, type AxNamedProgramInstance, type AxNormalizedAgentEvalDataset, type AxOptimizableComponent, type AxOptimizableValidator, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, type AxPreparedChatRequest, type AxPreparedRestoredState, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, type AxPromptMetrics, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRenderedPrompt, type AxRerankerIn, type AxRerankerOut, type AxResolvedContextPolicy, type AxResolvedExecutorModelPolicy, type AxResolvedExecutorModelPolicyEntry, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRolloutTrace, type AxRoutingResult, type AxRuntimePrimitive, type AxRuntimePrimitiveStage, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSerializedOptimizedProgram, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStageDefinitionBuildOptions, type AxStageOptions, type AxStepContext, AxStepContextImpl, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStorage, type AxStorageQuery, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxSynth, type AxSynthExample, type AxSynthOptions, type AxSynthResult, type AxSynthesizerInit, type AxSynthesizerOptions, type AxSynthesizerRole, AxTestPrompt, type AxThoughtBlockItem, AxTokenLimitError, type AxTokenUsage, type AxTrace, AxTraceLogger, type AxTraceLoggerOptions, type AxTunable, type AxTypedExample, type AxUsable, type AxWorkerRuntimeConfig, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGoogleGeminiLiveAudioDefaultConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIGrokVoiceDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIAudioDefaultConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIRealtimeDefaultConfig, axAIOpenAIRealtimeTranscriptionDefaultConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axApplyOpenAIChatAudioRequest, axAudioFormatFromMimeType, axAudioMimeType, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildDistillerDefinition, axBuildExecutorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axConcatBase64, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateGeminiLiveAudioApi, axCreateGrokRealtimeApi, axCreateJSRuntime, axCreateOpenAIRealtimeApi, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axDeserializeOptimizedProgram, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGetSupportedAIModels, axGlobals, axGoogleGeminiLiveAudioDefaults, axIsAudioOutputEnabled, axIsGeminiLiveAudioModel, axIsGrokVoiceModel, axIsOpenAIChatAudioModel, axIsOpenAIRealtimeModel, axIsOpenAIRealtimeTranscriptionModel, axMapGeminiLiveAudioPart, axMapOpenAIChatAudioDelta, axMapOpenAIChatAudioResponse, axMapOpenAIInputAudioPart, axMergeChatAudioConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axNormalizeOpenAIUsage, axOpenAIChatAudioDefaults, axOptimizableValidators, axProcessContentForProvider, axRAG, axResolveGeminiLiveAudioConfig, axResolveGrokRealtimeAudioConfig, axResolveOpenAIChatAudioConfig, axResolveOpenAIRealtimeAudioConfig, axRuntimePrimitives, axScoreProvidersForRequest, axSelectOptimalProvider, axSerializeOptimizedProgram, axShouldUseGeminiLiveAudio, axShouldUseGrokRealtime, axShouldUseOpenAIRealtime, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateGeminiLiveAudioInput, axValidateProviderCapabilities, axWorkerRuntime, f, flow, fn, s };
12920
+ export { AxACE, type AxACEBullet, type AxACECuratorOperation, type AxACECuratorOperationType, type AxACECuratorOutput, type AxACEFeedbackEvent, type AxACEGeneratorOutput, type AxACEOptimizationArtifact, AxACEOptimizedProgram, type AxACEOptions, type AxACEPlaybook, type AxACEReflectionOutput, type AxACEResult, AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicEffortLevel, type AxAIAnthropicEffortLevelMapping, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicOutputConfig, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, type AxAIAnthropicThinkingWire, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiCacheCreateRequest, type AxAIGoogleGeminiCacheResponse, type AxAIGoogleGeminiCacheUpdateRequest, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, type AxAIGoogleGeminiRetrievalConfig, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingLevel, type AxAIGoogleGeminiThinkingLevelMapping, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleMaps, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelCatalogAudioSupport, type AxAIModelCatalogFilter, type AxAIModelCatalogModel, type AxAIModelCatalogModelCapabilities, type AxAIModelCatalogModelType, type AxAIModelCatalogOptions, type AxAIModelCatalogProvider, type AxAIModelCatalogProviderName, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIOpenRouter, type AxAIOpenRouterArgs, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAITogetherChatModel, AxAITogetherModel, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentActorTurnCallback, type AxAgentActorTurnCallbackArgs, type AxAgentClarification, type AxAgentClarificationChoice, AxAgentClarificationError, type AxAgentClarificationKind, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentContextEvent, type AxAgentContextPressure, type AxAgentContextStage, type AxAgentDemos, type AxAgentDiscoveryPromptState, type AxAgentEvalDataset, type AxAgentEvalFunctionCall, type AxAgentEvalPrediction, type AxAgentEvalTask, type AxAgentExecutorResultPayload, type AxAgentExecutorTurnCallback, type AxAgentExecutorTurnCallbackArgs, type AxAgentForwardOptions, type AxAgentFunction, type AxAgentFunctionCall, type AxAgentFunctionCallRecorder, type AxAgentFunctionCollection, type AxAgentFunctionExample, type AxAgentFunctionGroup, type AxAgentFunctionModuleMeta, type AxAgentGuidanceLogEntry, type AxAgentGuidancePayload, type AxAgentGuidanceState, type AxAgentIdentity, type AxAgentInputUpdateCallback, type AxAgentInternalCompletionPayload, type AxAgentJudgeEvalInput, type AxAgentJudgeEvalOutput, type AxAgentJudgeInput, type AxAgentJudgeOptions, type AxAgentJudgeOutput, type AxAgentMemoriesSearchFn, type AxAgentMemoryEntry, type AxAgentMemoryResult, type AxAgentOnContextEvent, type AxAgentOnFunctionCall, type AxAgentOptimizationTargetDescriptor, type AxAgentOptimizeOptions, type AxAgentOptimizeResult, type AxAgentOptimizeTarget, type AxAgentOptions, AxAgentProtocolCompletionSignal, type AxAgentRecursionOptions, type AxAgentRecursiveExpensiveNode, type AxAgentRecursiveFunctionCall, type AxAgentRecursiveNodeRole, type AxAgentRecursiveStats, type AxAgentRecursiveTargetId, type AxAgentRecursiveTraceNode, type AxAgentRecursiveTurn, type AxAgentRecursiveUsage, type AxAgentRuntimeCompletionState, type AxAgentRuntimeExecutionContext, type AxAgentRuntimeInputState, type AxAgentSkillResult, type AxAgentSkillsPromptState, type AxAgentSkillsSearchFn, type AxAgentState, type AxAgentStateActionLogEntry, type AxAgentStateCheckpointState, type AxAgentStateExecutorModelState, type AxAgentStateRuntimeEntry, type AxAgentStreamingForwardOptions, type AxAgentStructuredClarification, type AxAgentTestCompletionPayload, type AxAgentTestResult, type AxAgentUsage, type AxAgentUsedMemoriesCallback, type AxAgentUsedMemory, type AxAgentUsedSkill, type AxAgentUsedSkillsCallback, type AxAgentic, type AxAnyAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, type AxAudioFormat, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatAudioConfig, type AxChatAudioOutput, type AxChatLogEntry, type AxChatLogMessage, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpoint, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCodeInterpreter, type AxCodeRuntime, type AxCodeSession, type AxCodeSessionSnapshot, type AxCodeSessionSnapshotEntry, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxContextCacheInfo, type AxContextCacheOperation, type AxContextCacheOptions, type AxContextCacheRegistry, type AxContextCacheRegistryEntry, type AxContextFieldInput, type AxContextFieldPromptConfig, type AxContextPolicyBudget, type AxContextPolicyConfig, type AxContextPolicyPreset, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, type AxDateRange, type AxDateRangeValue, type AxDebugChatResponseUsage, AxDefaultCostTracker, AxDefaultResultReranker, type AxDiscoveryTurnSummary, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxExamples, type AxExecutorModelPolicy, type AxExecutorModelPolicyEntry, type AxField, type AxFieldOptions, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, type AxFunctionCallTrace, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPABatchEvaluation, type AxGEPABatchRow, type AxGEPABootstrapOptions, type AxGEPAComponentBanditState, AxGEPAComponentSelector, type AxGEPAComponentTarget, type AxGEPAEvaluationBatch, type AxGEPAEvaluationState, type AxGEPAOptimizationReport, type AxGEPAReflectiveTuple, type AxGEPATraceSummary, type AxGEPATraceSummaryCall, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenInput, type AxGenMetricsInstruments, type AxGenOut, type AxGenOutput, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSRuntime, type AxJSRuntimeNodePermissionAllowlist, type AxJSRuntimeOutputMode, AxJSRuntimePermission, type AxJSRuntimeResourceLimits, type AxJudgeForwardOptions, type AxJudgeOptions, AxLLMRequestTypeValues, AxLearn, type AxLearnArtifact, type AxLearnCheckpointMode, type AxLearnCheckpointState, type AxLearnContinuousOptions, type AxLearnMode, type AxLearnOptimizeOptions, type AxLearnOptions, type AxLearnPlaybook, type AxLearnPlaybookOptions, type AxLearnPlaybookSummary, type AxLearnProgress, type AxLearnResult, type AxLearnUpdateFeedback, type AxLearnUpdateInput, type AxLearnUpdateOptions, type AxLlmQueryBudgetState, type AxLlmQueryPromptMode, type AxLoggerData, type AxLoggerFunction, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPEmbeddedResource, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPImageContent, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPResource, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMemoryMessageValue, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxMutableDiscoveryPromptState, type AxMutableSkillsPromptState, type AxNamedProgramInstance, type AxNormalizedAgentEvalDataset, type AxOptimizableComponent, type AxOptimizableValidator, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, type AxPreparedChatRequest, type AxPreparedRestoredState, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, type AxPromptMetrics, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRenderedPrompt, type AxRerankerIn, type AxRerankerOut, type AxResolvedContextPolicy, type AxResolvedExecutorModelPolicy, type AxResolvedExecutorModelPolicyEntry, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRolloutTrace, type AxRoutingResult, type AxRuntimePrimitive, type AxRuntimePrimitiveExample, type AxRuntimePrimitiveSignature, type AxRuntimePrimitiveStage, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSerializedOptimizedProgram, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStageDefinitionBuildOptions, type AxStageOptions, type AxStepContext, AxStepContextImpl, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStorage, type AxStorageQuery, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxSynth, type AxSynthExample, type AxSynthOptions, type AxSynthResult, type AxSynthesizerInit, type AxSynthesizerOptions, type AxSynthesizerRole, AxTestPrompt, type AxThoughtBlockItem, AxTokenLimitError, type AxTokenUsage, type AxTrace, AxTraceLogger, type AxTraceLoggerOptions, type AxTunable, type AxTypedExample, type AxUsable, type AxWorkerRuntimeConfig, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGoogleGeminiLiveAudioDefaultConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIGrokVoiceDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIAudioDefaultConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIRealtimeDefaultConfig, axAIOpenAIRealtimeTranscriptionDefaultConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axApplyOpenAIChatAudioRequest, axAudioFormatFromMimeType, axAudioMimeType, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildDistillerDefinition, axBuildExecutorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axConcatBase64, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateGeminiLiveAudioApi, axCreateGrokRealtimeApi, axCreateJSRuntime, axCreateOpenAIRealtimeApi, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axDeserializeOptimizedProgram, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGetSupportedAIModels, axGlobals, axGoogleGeminiLiveAudioDefaults, axIsAudioOutputEnabled, axIsGeminiLiveAudioModel, axIsGrokVoiceModel, axIsOpenAIChatAudioModel, axIsOpenAIRealtimeModel, axIsOpenAIRealtimeTranscriptionModel, axMapGeminiLiveAudioPart, axMapOpenAIChatAudioDelta, axMapOpenAIChatAudioResponse, axMapOpenAIInputAudioPart, axMergeChatAudioConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axNormalizeOpenAIUsage, axOpenAIChatAudioDefaults, axOptimizableValidators, axProcessContentForProvider, axRAG, axResolveGeminiLiveAudioConfig, axResolveGrokRealtimeAudioConfig, axResolveOpenAIChatAudioConfig, axResolveOpenAIRealtimeAudioConfig, axRuntimePrimitives, axScoreProvidersForRequest, axSelectOptimalProvider, axSerializeOptimizedProgram, axShouldUseGeminiLiveAudio, axShouldUseGrokRealtime, axShouldUseOpenAIRealtime, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateGeminiLiveAudioInput, axValidateProviderCapabilities, axWorkerRuntime, f, flow, fn, s };