@ax-llm/ax 22.0.9 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +467 -394
- package/index.cjs.map +1 -1
- package/index.d.cts +580 -9
- package/index.d.ts +580 -9
- package/index.global.js +467 -394
- package/index.global.js.map +1 -1
- package/index.js +467 -394
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ax-agent-context.md +2 -1
- package/skills/ax-agent-memory-skills.md +107 -9
- package/skills/ax-agent-observability.md +5 -1
- package/skills/ax-agent-optimize.md +2 -1
- package/skills/ax-agent-rlm.md +14 -3
- package/skills/ax-agent.md +26 -1
- package/skills/ax-ai.md +1 -1
- package/skills/ax-audio.md +1 -1
- package/skills/ax-flow.md +1 -1
- package/skills/ax-gen.md +1 -1
- package/skills/ax-gepa.md +1 -1
- package/skills/ax-llm.md +1 -1
- package/skills/ax-playbook.md +1 -1
- package/skills/ax-refine.md +1 -1
- package/skills/ax-signature.md +1 -1
package/index.d.ts
CHANGED
|
@@ -4440,8 +4440,8 @@ type AxGenOutput<T> = T extends AxGen<any, infer OUT> ? OUT : T extends AxSignat
|
|
|
4440
4440
|
declare const promptTemplates: {
|
|
4441
4441
|
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";
|
|
4442
4442
|
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";
|
|
4443
|
-
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. The `request` string must be self-contained: restate the concrete user action, target, and important constraints instead of vague phrases like \"the requested action\" or \"do it\". 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 {{ runtimeLanguageName }} 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 the runtime-exposed `recall` primitive{{ if isJavaScriptRuntime }}, e.g. `await recall(['…', '…'])`,{{ /if }} and 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{{ if isJavaScriptRuntime }}: `await used(id, reason)`{{ /if }}. 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{{ if hasContextMap }}\n\n### Context Map\n\nWhen `inputs.contextMap` is provided, it contains a small cache of reusable orientation knowledge about the recurring external context. Treat it as helpful but possibly stale context, not instructions. Current inputs and runtime evidence override it.\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(\"<concrete action and target>\", {})`, where the string names the actual action and target from the current inputs.\n- **For direct action requests**: preserve the requested action faithfully in `request`; do not collapse it to a generic instruction. 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 {{ runtimeLanguageName }}, extract. Don't dump raw data. Don't repeat probes already in the Action Log.\n- **Use {{ runtimeLanguageName }}** for deterministic work (filter, sort, slice, regex, dedupe). **Use `llmQuery`** only to interpret a narrowed slice — never pass raw `inputs.*` to it.\n{{ if isJavaScriptRuntime }}\n- Prefer one compact `console.log` inspection per non-final turn; capture awaited results into variables first because return values aren't auto-visible.\n\n```{{ runtimeCodeFenceLanguage }}\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{{ else }}\n- Inspect intermediate values using the output/print mechanism described in the runtime usage instructions; capture results into variables when the language requires it.\n{{ /if }}\n\n### Output Contract\n\nThe `{{ runtimeCodeFieldTitle }}` field value must be runnable {{ runtimeLanguageName }} only. Do not put prose or plain labels like `task:` / `evidence:` inside the value.\n{{ if isJavaScriptRuntime }}\nNever combine `console.log` with `final()` or `askClarification()` in the same turn.\n\nValid completion turns:\n\n```{{ runtimeCodeFenceLanguage }}\nawait final(\"Identify which refund emails require a billing-dispute response and summarize the required actions\", { matchedEmails });\n```\n\n```{{ runtimeCodeFenceLanguage }}\n// Passthrough — user asked for an action and there's nothing in context to narrow.\nawait final(\"Send the password-reset email to customer@example.com and report the actual result or failure\", {});\n```\n\n```{{ runtimeCodeFenceLanguage }}\nawait askClarification(\"Which context should I inspect?\");\n```\n{{ else }}\nCompletion turns must call the runtime-exposed `final` or `askClarification` primitive using the syntax described in the runtime usage instructions.\n{{ /if }}\n\n## {{ runtimeLanguageName }} Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
|
|
4444
|
-
readonly 'rlm/executor.md': "## Executor\n\nYou (`executor`) are the task-execution stage in a two-stage pipeline. Your ONLY job is to write {{ runtimeLanguageName }} code that runs in the {{ runtimeLanguageName }} runtime (REPL) to complete tasks using the tools available to you. A separate (`responder`) agent downstream synthesizes the final answer.\n\nThe {{ runtimeLanguageName }} 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
|
|
4443
|
+
readonly 'rlm/distiller.md': "## Distiller\n{{ if directRespondOnly }}\n\nYou (`distiller`) are the context phase of the pipeline. You read the available context, gather exactly the evidence the answer needs, and finish by handing an answer task plus that evidence to the downstream **responder**, which writes the user-facing output fields. There is no executor phase and there are no external tools — you own the analysis.\n\nCall `respond(task, evidence)` to finish. `task` is a one-line instruction the responder follows when writing the output fields (e.g. \"Answer the user's question using the matched refund emails\") — not a message to the user. `evidence` is the curated data the responder reads to follow `task`; it crosses into the responder's prompt, so narrow it to only the fields the answer needs — never raw `inputs.*`. Resolve follow-ups against prior conversation. You own the answer: never refuse because you lack tools — analysis over the provided context *is* the task. Use `askClarification` only when the request or target is genuinely ambiguous.\n{{ else }}\n\nYou (`distiller`) are the reconnaissance phase of a two-phase pipeline that shares one {{ runtimeLanguageName }} runtime session. You read the available context, learn what the downstream **executor** phase will need, and forward an actionable request plus evidence. The executor owns tool execution 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. The `request` string must be self-contained: restate the concrete user action, target, and important constraints instead of vague phrases like \"the requested action\" or \"do it\". Expand the user's original task with facts from context so the request is clear and complete. `evidence` is handed to the executor **by reference in the shared runtime** — put narrowed runtime values in it (the exact inputs the executor's functions will need: ids, paths, selected records, constraints), or `{}` if context has nothing to narrow. Variables you create stay live for the executor, so name them well. Resolve follow-ups against prior conversation. Never refuse, answer, or ask clarification because of your own lack of execution or perceived executor capabilities — forwarding *is* the response. Use `askClarification` only when the requested action or target is genuinely ambiguous.{{ if directRespondMode }} The one exception to never answering: the **Direct Response** rule below — when every one of its conditions holds, finishing with `respond` is the correct forwarding.{{ /if }}\n{{ /if }}\n\nThe {{ runtimeLanguageName }} 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 hasExecutorFunctions }}\n\n### Executor Functions (reference only — you cannot call these)\n\nThe executor phase will have these functions. Their schemas tell you which exact inputs to extract into `evidence`. Calling one here throws — extraction, not execution, is your job.{{ if directRespondMode }} If any of these functions' domains cover what the task needs, forward with `final()` — never `respond()`.{{ /if }}\n\n{{ functionsList }}\n{{ /if }}\n{{ if discoveryMode }}\n{{ if hasModules }}\n\n### Available Modules\n\nModules the executor can use. Call `discover([...])` to load a module's function docs when knowing its exact inputs would sharpen what you extract; docs appear in `inputs.discoveredToolDocs` next turn and carry over to the executor phase.\n{{ modulesList }}\n{{ /if }}\n{{ if hasDiscoveredDocs }}\n\n### Discovered Tool Docs\n\nWhen `inputs.discoveredToolDocs` is provided, it contains tool docs fetched this run. Use them to target your extraction. Only re-run discovery for modules/functions not listed there.\n{{ /if }}\n{{ /if }}\n{{ if hasSkills }}\n{{ if hasSkillsCatalog }}\n\n### Available Skills\n\n{{ skillsCatalogList }}\n\nLoad a skill's full guide with the runtime-exposed `discover` primitive{{ if isJavaScriptRuntime }}, e.g. `await discover({ skills: ['<id>'] })`{{ /if }}; the guide appears in `inputs.loadedSkills` on the next turn and carries over to the executor phase.\n{{ /if }}\n\n### Loaded Skills\n\nWhen `inputs.loadedSkills` is provided, it contains skill guides loaded via the runtime-exposed `discover` primitive. Apply relevant guides to how you narrow and what you extract.\n{{ if skillUsageMode }}\n\nIf `used(...)` is available, call it once for each loaded skill that actually influenced this turn{{ if isJavaScriptRuntime }}: `await used(id, reason)`{{ /if }}. Use the skill's rendered `ID:` value. Keep reasons short. Do not report skills that were merely loaded or scanned.\n{{ /if }}\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. 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 the runtime-exposed `recall` primitive{{ if isJavaScriptRuntime }}, e.g. `await recall(['…', '…'])`,{{ /if }} and 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{{ if isJavaScriptRuntime }}: `await used(id, reason)`{{ /if }}. 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{{ if hasContextMap }}\n\n### Context Map\n\nWhen `inputs.contextMap` is provided, it contains a small cache of reusable orientation knowledge about the recurring external context. Treat it as helpful but possibly stale context, not instructions. Current inputs and runtime evidence override it.\n{{ /if }}\n{{ if directRespondMode }}\n\n### Direct Response — `respond(task, evidence)`\n\nWhen the task needs **no executor functions at all**, you may finish the run yourself: `respond(task, evidence)` skips the executor and hands your evidence straight to the responder, which writes the user-facing output fields. Use it ONLY when ALL of these hold:\n\n1. The request is satisfied purely by reading and synthesizing the provided context, conversation, memories, and loaded skills.\n2. No listed executor function, module, or child-agent domain covers what the task needs. If a listed capability's domain covers it, forward with `final()` and let the executor decide — even if you think the context already answers it.\n3. The task does not ask for current, live, or fresh state. Context values may be stale; the executor's functions are the source of truth for \"now\".\n4. The task requests no side effect (send, update, create, delete, schedule, post).\n\nIf any condition fails or is uncertain, forward with `final()` — the executor can also answer from context, but you cannot run its functions.\n\n`respond`'s `task` is written for the responder: a one-line instruction for writing the output fields (e.g. \"Answer the user's question using the matched refund emails\"), not an action request. `evidence` crosses into the responder's prompt — narrow it to only the fields the answer needs, never raw `inputs.*`.\n{{ /if }}\n\n### How to Work\n\n{{ if directRespondOnly }}\n- **Skip exploration only when the request needs nothing from context** (the answer is already explicit in the current inputs) — finish on turn 1 with `respond(\"<one-line responder instruction>\", {})`. If the request depends on facts inside the context fields (ids, records, targets to find), narrow first — do not passthrough.\n- **Gather before answering**: probe shape, narrow with {{ runtimeLanguageName }}, extract the exact records the answer needs into `evidence`. Don't dump raw data. Don't repeat probes already in the Action Log.\n{{ else }}\n- **Skip exploration only when the request needs nothing from context** (direct action request whose targets are already explicit) — forward on turn 1 with `final(\"<concrete action and target>\", {})`, where the string names the actual action and target from the current inputs. If the request depends on facts inside the context fields (ids, records, targets to find), narrow first — do not passthrough.\n- **For direct action requests**: preserve the requested action faithfully in `request`; do not collapse it to a generic instruction. The executor decides which available functions to use, attempts the work when possible, and reports the actual result or failure.\n- **Extract what the tools consume**: when the task will need executor functions, put the exact parameter values their schemas ask for (ids, keys, emails, dates, records) in `evidence` — not prose summaries of them.\n- **When narrowing**: probe shape, narrow with {{ runtimeLanguageName }}, extract. Don't dump raw data. Don't repeat probes already in the Action Log.\n{{ /if }}\n- **Never write a field name you haven't seen.** Context Metadata lists the real item keys of each context variable — use those exact names. If a key you need isn't listed, inspect one element first; guessed field names silently produce zeros and empty results.\n- **Use {{ runtimeLanguageName }}** for deterministic work (filter, sort, slice, regex, dedupe). **Use `llmQuery`** only to interpret a narrowed slice — never pass raw `inputs.*` to it.\n{{ if isJavaScriptRuntime }}\n- Prefer one compact `console.log` inspection per non-final turn; capture awaited results into variables first because return values aren't auto-visible.\n\n```{{ runtimeCodeFenceLanguage }}\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{{ else }}\n- Inspect intermediate values using the output/print mechanism described in the runtime usage instructions; capture results into variables when the language requires it.\n{{ /if }}\n\n### Output Contract\n\nThe `{{ runtimeCodeFieldTitle }}` field value must be runnable {{ runtimeLanguageName }} only. Do not put prose or plain labels like `task:` / `evidence:` inside the value.\n{{ if isJavaScriptRuntime }}\n{{ if directRespondOnly }}\nNever combine `console.log` with `respond()` or `askClarification()` in the same turn.\n\nValid completion turns:\n\n```{{ runtimeCodeFenceLanguage }}\nawait respond(\"Answer the user's question using the matched refund emails\", { matchedEmails });\n```\n\n```{{ runtimeCodeFenceLanguage }}\nawait askClarification(\"Which context should I inspect?\");\n```\n{{ else }}\nNever combine `console.log` with `final()`{{ if directRespondMode }}, `respond()`,{{ /if }} or `askClarification()` in the same turn.\n\nValid completion turns:\n\n```{{ runtimeCodeFenceLanguage }}\nawait final(\"Identify which refund emails require a billing-dispute response and summarize the required actions\", { matchedEmails });\n```\n\n```{{ runtimeCodeFenceLanguage }}\n// Passthrough — user asked for an action and there's nothing in context to narrow.\nawait final(\"Send the password-reset email to customer@example.com and report the actual result or failure\", {});\n```\n{{ if directRespondMode }}\n\n```{{ runtimeCodeFenceLanguage }}\n// Direct response — every Direct Response condition holds; no executor function is relevant.\nawait respond(\"Summarize the refund-related emails for the user\", { matchedEmails });\n```\n{{ /if }}\n\n```{{ runtimeCodeFenceLanguage }}\nawait askClarification(\"Which context should I inspect?\");\n```\n{{ /if }}\n{{ else }}\n{{ if directRespondOnly }}\nCompletion turns must call the runtime-exposed `respond` or `askClarification` primitive using the syntax described in the runtime usage instructions.\n{{ else }}\nCompletion turns must call the runtime-exposed `final`{{ if directRespondMode }}, `respond`,{{ /if }} or `askClarification` primitive using the syntax described in the runtime usage instructions.\n{{ /if }}\n{{ /if }}\n\n## {{ runtimeLanguageName }} Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
|
|
4444
|
+
readonly 'rlm/executor.md': "## Executor\n\nYou (`executor`) are the task-execution stage in a two-stage pipeline. Your ONLY job is to write {{ runtimeLanguageName }} code that runs in the {{ runtimeLanguageName }} runtime (REPL) to complete tasks using the tools available to you. A separate (`responder`) agent downstream synthesizes the final answer.\n\nThe {{ runtimeLanguageName }} 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 (context) phase ran in this same {{ runtimeLanguageName }} runtime session and handed off:\n\n- `inputs.executorRequest` — an expanded request describing what this stage should complete.\n- `inputs.distilledContext` — the evidence object the distiller selected, live in the runtime. The `Distilled Context Summary` input field describes its shape; the data itself exists only in the runtime — read it with code.\n- Variables the distiller created remain live (see Live Runtime State). When a `Context Metadata` field is present, the raw context variables it lists are also still readable on `inputs`.\n\nWork from `executorRequest` and the distilled evidence first — they are your primary source. When the distilled evidence is insufficient for the request, fall back to the raw `inputs.*` context variables listed in `Context Metadata` — probe and narrow them with code before concluding anything is missing. 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\nWhen `inputs.discoveredToolDocs` is provided, it contains tool docs fetched this run (including any the context phase discovered). Use them directly. Only re-run discovery for modules/functions not listed there.\n{{ /if }}\n{{ /if }}\n{{ if hasRelevanceHints }}\n### Likely Relevant\n\nWhen `inputs.relevanceHints` is provided, a local ranker has flagged the modules, skills, or memories most likely relevant to this task. It is advisory, not a restriction — the full lists above still apply and you may load anything else. If the task needs data or effects from a hinted module whose functions are not yet documented above, call `discover([...])` for it first and use the returned docs on the next turn — do not call `final()` in the same turn as `discover()`.\n{{ /if }}\n{{ if hasSkills }}\n{{ if hasSkillsCatalog }}\n### Available Skills\n{{ skillsCatalogList }}\n\nLoad a skill's full guide with the runtime-exposed `discover` primitive{{ if isJavaScriptRuntime }}, e.g. `await discover({ skills: ['<id>'] })`{{ /if }}; the guide appears in `inputs.loadedSkills` on the next turn.\n{{ /if }}\n### Loaded Skills\n\nWhen `inputs.loadedSkills` is provided, it contains skill guides loaded via the runtime-exposed `discover` primitive, forward-time skills, or guides carried over from the context phase. Apply relevant guides directly. Call `discover` with 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{{ if isJavaScriptRuntime }}: `await used(id, reason)`{{ /if }}. Use the skill's rendered `ID:` value. Keep reasons short. Do not report skills that were merely loaded or scanned.\n{{ /if }}\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 the runtime-exposed `recall` primitive{{ if isJavaScriptRuntime }}, e.g. `await recall(['…', '…'])`,{{ /if }} and 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{{ if isJavaScriptRuntime }}: `await used(id, reason)`{{ /if }}. 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, and don't redo context narrowing the distiller already did — its variables are still live.\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- **Never conclude information is unavailable while an undiscovered module plausibly provides it.** If the request needs data your evidence lacks (a status, a record, a lookup) and a listed module or hint covers that domain, `discover` it and attempt the call before finalizing.\n- **Never write a field name you haven't seen.** The Distilled Context Summary and Context Metadata list the real item keys — use those exact names. For function results, use the documented return schema or inspect the actual result before chaining on its fields; guessed field names silently produce zeros and empty results.\n- **Use {{ runtimeLanguageName }}** 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{{ if isJavaScriptRuntime }}\n- Prefer one compact `console.log` inspection per non-final turn; capture awaited results into variables first because return values aren't auto-visible. If the task is complete, finish with `await final(\"...\", { result })` instead of logging.\n{{ else }}\n- Capture runtime results into variables when the language requires it; inspect intermediate values using the output/print mechanism described in the runtime usage instructions.\n{{ /if }}\n- Before calling `askClarification`, check whether any available function can resolve the need first.\n{{ if hasAgentStatusCallback }}\n- Keep the user updated: call the runtime-exposed `reportSuccess` primitive after completing sub-tasks and `reportFailure` when something goes wrong{{ if isJavaScriptRuntime }} (for example, `await reportSuccess(message)`){{ /if }}.\n{{ /if }}\n{{ if isJavaScriptRuntime }}\n\n```{{ runtimeCodeFenceLanguage }}\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{{ /if }}\n\n### Output Contract\n\nThe `{{ runtimeCodeFieldTitle }}` field value must be runnable {{ runtimeLanguageName }} only. Do not put prose or plain labels like `task:` / `evidence:` inside the value.\n{{ if isJavaScriptRuntime }}\nNever combine `console.log` with `final()` or `askClarification()` in the same turn.\n{{ /if }}\n\n{{ if isJavaScriptRuntime }}\nWhen done, call `await final(task, evidence)`:\n{{ else }}\nWhen done, call the runtime-exposed `final(task, evidence)` primitive:\n{{ /if }}\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 runtime values with only the fields that matter, not raw `inputs.*`. Use plain keys (for example, `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{{ if isJavaScriptRuntime }}\n```{{ runtimeCodeFenceLanguage }}\nawait final(\"Answer the user's question using the gathered evidence\", { evidence });\n```\n\n```{{ runtimeCodeFenceLanguage }}\nawait askClarification(\"Which file should I analyze?\");\n```\n{{ else }}\nCompletion turns must call the runtime-exposed `final` or `askClarification` primitive using the syntax described in the runtime usage instructions.\n{{ /if }}\n\n## {{ runtimeLanguageName }} Runtime Usage Instructions\n{{ runtimeUsageInstructions }}\n";
|
|
4445
4445
|
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";
|
|
4446
4446
|
};
|
|
4447
4447
|
type TemplateId = keyof typeof promptTemplates;
|
|
@@ -4482,6 +4482,49 @@ type AxAgentContextEvent = {
|
|
|
4482
4482
|
reason: 'structured_output' | 'superseded' | 'pressure' | 'proactive' | 'lean';
|
|
4483
4483
|
originalChars: number;
|
|
4484
4484
|
renderedChars: number;
|
|
4485
|
+
}
|
|
4486
|
+
/**
|
|
4487
|
+
* Emitted once per ranked domain per forward when the advisory relevance
|
|
4488
|
+
* ranker runs (`relevanceRanking` plus the domain's prerequisite: modules
|
|
4489
|
+
* need `functionDiscovery`; skills/memories need their catalogs). Records
|
|
4490
|
+
* the shortlist actually surfaced to the model.
|
|
4491
|
+
*
|
|
4492
|
+
* To measure whether the hint helps, an observer joins per forward:
|
|
4493
|
+
* `shortlist.map((s) => s.id)` against what the model then loaded — for
|
|
4494
|
+
* modules the internal `discover` calls (`onFunctionCall` with
|
|
4495
|
+
* `kind:'internal'`, `name:'discover'`, `args.request`) and the module part
|
|
4496
|
+
* of external `qualifiedName`s; for skills `onLoadedSkills`/`used(id)`; for
|
|
4497
|
+
* memories `onLoadedMemories`/`used(id)`.
|
|
4498
|
+
*/
|
|
4499
|
+
| {
|
|
4500
|
+
kind: 'relevance_ranking';
|
|
4501
|
+
stage: AxAgentContextStage;
|
|
4502
|
+
domain: 'modules' | 'skills' | 'memories';
|
|
4503
|
+
/** Length of the ranked task string (not the text — avoids log bloat). */
|
|
4504
|
+
taskChars: number;
|
|
4505
|
+
/** Items surfaced to the model, most relevant first ([] if suppressed). */
|
|
4506
|
+
shortlist: {
|
|
4507
|
+
id: string;
|
|
4508
|
+
score: number;
|
|
4509
|
+
}[];
|
|
4510
|
+
/** True when the low-confidence guard emitted nothing. */
|
|
4511
|
+
suppressed: boolean;
|
|
4512
|
+
}
|
|
4513
|
+
/**
|
|
4514
|
+
* Emitted once per field per run when `autoUpgrade.contextFields` keeps an
|
|
4515
|
+
* oversized undeclared input value runtime-only. The value stays available
|
|
4516
|
+
* in the code runtime as `inputs.<fieldName>`; the prompt carries a
|
|
4517
|
+
* truncated preview (or nothing when `promptPreviewChars` is undefined)
|
|
4518
|
+
* plus a `contextMetadata` entry.
|
|
4519
|
+
*/
|
|
4520
|
+
| {
|
|
4521
|
+
kind: 'field_auto_promoted';
|
|
4522
|
+
stage: AxAgentContextStage;
|
|
4523
|
+
turn: number;
|
|
4524
|
+
fieldName: string;
|
|
4525
|
+
originalChars: number;
|
|
4526
|
+
/** Chars kept inline as a preview; undefined => runtime-only. */
|
|
4527
|
+
promptPreviewChars?: number;
|
|
4485
4528
|
};
|
|
4486
4529
|
type AxAgentOnContextEvent = (event: Readonly<AxAgentContextEvent>) => void | Promise<void>;
|
|
4487
4530
|
|
|
@@ -4602,7 +4645,7 @@ type AxAgentFunctionGroup = AxAgentFunctionModuleMeta & {
|
|
|
4602
4645
|
functions: readonly (Omit<AxAgentFunction, 'namespace'> | AxFunctionProvider)[];
|
|
4603
4646
|
};
|
|
4604
4647
|
type AxAgentTestCompletionPayload = {
|
|
4605
|
-
type: 'final' | 'askClarification';
|
|
4648
|
+
type: 'final' | 'askClarification' | 'respond';
|
|
4606
4649
|
args: unknown[];
|
|
4607
4650
|
};
|
|
4608
4651
|
type AxAgentTestResult = string | AxAgentTestCompletionPayload;
|
|
@@ -4880,6 +4923,13 @@ interface AxRLMConfig {
|
|
|
4880
4923
|
maxTurns?: number;
|
|
4881
4924
|
/** Maximum characters to keep from runtime output and console/log replay (default: 3000). */
|
|
4882
4925
|
maxRuntimeChars?: number;
|
|
4926
|
+
/**
|
|
4927
|
+
* Maximum serialized characters for a `final(task, evidence)` evidence
|
|
4928
|
+
* object crossing the host boundary (default: 50000). Oversized evidence
|
|
4929
|
+
* throws inside the actor turn so the model narrows and retries; in-worker
|
|
4930
|
+
* evidence handoffs in shared-session mode are exempt.
|
|
4931
|
+
*/
|
|
4932
|
+
maxEvidenceChars?: number;
|
|
4883
4933
|
/** Context replay, checkpointing, and runtime-state policy. */
|
|
4884
4934
|
contextPolicy?: AxContextPolicyConfig;
|
|
4885
4935
|
/** Default options for the internal checkpoint summarizer. */
|
|
@@ -4901,8 +4951,11 @@ interface AxRLMConfig {
|
|
|
4901
4951
|
}
|
|
4902
4952
|
/**
|
|
4903
4953
|
* Builds the context-understanding actor system prompt (the distiller).
|
|
4904
|
-
* The distiller
|
|
4905
|
-
*
|
|
4954
|
+
* The distiller is the pipeline's reconnaissance phase: it explores
|
|
4955
|
+
* long-context inputs AND the executor's capability surface (function
|
|
4956
|
+
* schemas, module catalog, skills index, discovery) so its evidence is shaped
|
|
4957
|
+
* to what the executor's tools will actually consume. It cannot execute
|
|
4958
|
+
* tools — its callables are throwing stubs.
|
|
4906
4959
|
*/
|
|
4907
4960
|
declare function axBuildDistillerDefinition(baseDefinition: string | undefined, contextFields: readonly AxIField[], options: Readonly<{
|
|
4908
4961
|
runtimeUsageInstructions?: string;
|
|
@@ -4910,18 +4963,55 @@ declare function axBuildDistillerDefinition(baseDefinition: string | undefined,
|
|
|
4910
4963
|
runtimeCodeFieldTitle?: string;
|
|
4911
4964
|
runtimeCodeFenceLanguage?: string;
|
|
4912
4965
|
isJavaScriptRuntime?: boolean;
|
|
4966
|
+
formatCallable?: AxCodeRuntime['formatCallable'];
|
|
4913
4967
|
promptLevel?: 'default' | 'detailed';
|
|
4914
4968
|
hasInspectRuntime?: boolean;
|
|
4915
4969
|
hasLiveRuntimeState?: boolean;
|
|
4916
4970
|
hasCompressedActionReplay?: boolean;
|
|
4971
|
+
/** Enables tool discovery (`discover`) in the prompt. */
|
|
4972
|
+
discoveryMode?: boolean;
|
|
4973
|
+
/** Enables `discover({ skills })` runtime overload in the prompt. */
|
|
4974
|
+
skillsMode?: boolean;
|
|
4975
|
+
/** Static skill catalog rendered as an `### Available Skills` index. */
|
|
4976
|
+
skillsCatalog?: ReadonlyArray<{
|
|
4977
|
+
id: string;
|
|
4978
|
+
name: string;
|
|
4979
|
+
description?: string;
|
|
4980
|
+
}>;
|
|
4917
4981
|
/** Enables `recall` runtime primitive in the prompt. */
|
|
4918
4982
|
memoriesMode?: boolean;
|
|
4919
4983
|
/** Enables the generic `used` runtime primitive in the prompt. */
|
|
4920
4984
|
usageTrackingMode?: boolean;
|
|
4921
4985
|
/** Enables actor-declared memory usage instructions. */
|
|
4922
4986
|
memoryUsageMode?: boolean;
|
|
4987
|
+
/** Enables actor-declared skill usage instructions. */
|
|
4988
|
+
skillUsageMode?: boolean;
|
|
4989
|
+
/**
|
|
4990
|
+
* Dynamic direct-respond: offers `respond(task, evidence)` alongside
|
|
4991
|
+
* `final` under the conservative direct-response covenant.
|
|
4992
|
+
*/
|
|
4993
|
+
directRespondMode?: boolean;
|
|
4994
|
+
/**
|
|
4995
|
+
* Static direct-respond (agent has no functions/child agents): `respond`
|
|
4996
|
+
* replaces `final` as the completion primitive and the prompt drops the
|
|
4997
|
+
* executor-forwarding covenant. Mutually exclusive with
|
|
4998
|
+
* `directRespondMode`.
|
|
4999
|
+
*/
|
|
5000
|
+
directRespondOnly?: boolean;
|
|
4923
5001
|
/** Optional prompt-resident orientation cache for recurring long context. */
|
|
4924
5002
|
contextMapText?: string;
|
|
5003
|
+
availableModules?: ReadonlyArray<{
|
|
5004
|
+
namespace: string;
|
|
5005
|
+
selectionCriteria?: string;
|
|
5006
|
+
}>;
|
|
5007
|
+
agentFunctions?: ReadonlyArray<{
|
|
5008
|
+
name: string;
|
|
5009
|
+
description?: string;
|
|
5010
|
+
parameters?: AxFunctionJSONSchema;
|
|
5011
|
+
returns?: AxFunctionJSONSchema;
|
|
5012
|
+
namespace: string;
|
|
5013
|
+
alwaysInclude?: boolean;
|
|
5014
|
+
}>;
|
|
4925
5015
|
/** Optional override for the `rlm/distiller.md` template source. */
|
|
4926
5016
|
templateOverride?: string;
|
|
4927
5017
|
/** Optional per-primitive override map keyed by primitive id. */
|
|
@@ -4947,8 +5037,20 @@ declare function axBuildExecutorDefinition(baseDefinition: string | undefined, c
|
|
|
4947
5037
|
enforceIncrementalConsoleTurns?: boolean;
|
|
4948
5038
|
hasAgentStatusCallback?: boolean;
|
|
4949
5039
|
discoveryMode?: boolean;
|
|
5040
|
+
/** Renders the advisory "Likely Relevant" instruction section. */
|
|
5041
|
+
relevanceHintsMode?: boolean;
|
|
4950
5042
|
/** Enables `discover({ skills })` runtime overload in the prompt. */
|
|
4951
5043
|
skillsMode?: boolean;
|
|
5044
|
+
/**
|
|
5045
|
+
* Static skill catalog rendered as an `### Available Skills` index so
|
|
5046
|
+
* skill discovery is targeted instead of blind. Construction-stable, so
|
|
5047
|
+
* it is safe inside the cached system prompt.
|
|
5048
|
+
*/
|
|
5049
|
+
skillsCatalog?: ReadonlyArray<{
|
|
5050
|
+
id: string;
|
|
5051
|
+
name: string;
|
|
5052
|
+
description?: string;
|
|
5053
|
+
}>;
|
|
4952
5054
|
/** Enables `recall` runtime primitive in the prompt. */
|
|
4953
5055
|
memoriesMode?: boolean;
|
|
4954
5056
|
/** Enables the generic `used` runtime primitive in the prompt. */
|
|
@@ -4957,6 +5059,10 @@ declare function axBuildExecutorDefinition(baseDefinition: string | undefined, c
|
|
|
4957
5059
|
memoryUsageMode?: boolean;
|
|
4958
5060
|
/** Enables actor-declared skill usage instructions. */
|
|
4959
5061
|
skillUsageMode?: boolean;
|
|
5062
|
+
/** Distiller-prompt concern (dynamic direct-respond); ignored here. */
|
|
5063
|
+
directRespondMode?: boolean;
|
|
5064
|
+
/** Distiller-prompt concern (static direct-respond); ignored here. */
|
|
5065
|
+
directRespondOnly?: boolean;
|
|
4960
5066
|
/** Optional prompt-resident orientation cache for recurring long context. */
|
|
4961
5067
|
contextMapText?: string;
|
|
4962
5068
|
availableModules?: ReadonlyArray<{
|
|
@@ -5024,6 +5130,23 @@ type AxAgentSkillResult = {
|
|
|
5024
5130
|
/** Opaque markdown body (frontmatter, if any, is not parsed). */
|
|
5025
5131
|
content: string;
|
|
5026
5132
|
};
|
|
5133
|
+
/**
|
|
5134
|
+
* A skill in a host-provided static catalog (`skillsCatalog` option). Unlike
|
|
5135
|
+
* `skills` (which preloads full content into the prompt), a catalog entry is
|
|
5136
|
+
* only loaded when matched — by the built-in local search that backs
|
|
5137
|
+
* `discover({ skills })` when no `onSkillsSearch` callback is provided, and by
|
|
5138
|
+
* the advisory relevance hint.
|
|
5139
|
+
*/
|
|
5140
|
+
type AxAgentCatalogSkill = {
|
|
5141
|
+
/** Stable identifier — dedup key, prompt label, and usage telemetry key. */
|
|
5142
|
+
id: string;
|
|
5143
|
+
/** Human-readable title. */
|
|
5144
|
+
name: string;
|
|
5145
|
+
/** Optional short "when to use" description (high-signal for matching). */
|
|
5146
|
+
description?: string;
|
|
5147
|
+
/** Full markdown body returned when the skill is loaded. */
|
|
5148
|
+
content: string;
|
|
5149
|
+
};
|
|
5027
5150
|
type AxAgentSkillsSearchFn = (searches: readonly string[]) => readonly AxAgentSkillResult[] | Promise<readonly AxAgentSkillResult[]>;
|
|
5028
5151
|
type AxAgentUsedSkill = {
|
|
5029
5152
|
/** Stable skill id present in the Loaded Skills prompt state. */
|
|
@@ -5037,6 +5160,47 @@ type AxAgentUsedSkill = {
|
|
|
5037
5160
|
};
|
|
5038
5161
|
type AxAgentUsedSkillsCallback = (usedSkills: readonly AxAgentUsedSkill[]) => void | Promise<void>;
|
|
5039
5162
|
|
|
5163
|
+
/**
|
|
5164
|
+
* Smart-defaults knob: `true`/`false` toggles both upgrades; an object tunes
|
|
5165
|
+
* each independently (an object value implies enabled for that domain).
|
|
5166
|
+
*/
|
|
5167
|
+
type AxAgentAutoUpgrade = boolean | {
|
|
5168
|
+
/** Auto-enable runtime callable discovery for large tool catalogs. */
|
|
5169
|
+
functionDiscovery?: boolean | {
|
|
5170
|
+
aboveFunctionDocChars?: number;
|
|
5171
|
+
};
|
|
5172
|
+
/** Auto-keep oversized undeclared input values runtime-only. */
|
|
5173
|
+
contextFields?: boolean | {
|
|
5174
|
+
promoteAboveChars?: number;
|
|
5175
|
+
previewChars?: number;
|
|
5176
|
+
};
|
|
5177
|
+
};
|
|
5178
|
+
type AxResolvedAutoUpgrade = {
|
|
5179
|
+
functionDiscovery: {
|
|
5180
|
+
enabled: boolean;
|
|
5181
|
+
aboveFunctionDocChars: number;
|
|
5182
|
+
};
|
|
5183
|
+
contextFields: {
|
|
5184
|
+
enabled: boolean;
|
|
5185
|
+
promoteAboveChars: number;
|
|
5186
|
+
previewChars: number;
|
|
5187
|
+
};
|
|
5188
|
+
};
|
|
5189
|
+
/**
|
|
5190
|
+
* Direct-respond knob: lets the distiller end the run with
|
|
5191
|
+
* `respond(task, evidence)` and skip the executor stage entirely (zero
|
|
5192
|
+
* executor model calls) when the task needs no user-provided functions.
|
|
5193
|
+
*
|
|
5194
|
+
* - `'auto'` (default): agents with zero functions/child agents run
|
|
5195
|
+
* respond-only (the skip is deterministic — `final` is not offered);
|
|
5196
|
+
* agents WITH functions offer `respond` alongside `final` under a
|
|
5197
|
+
* conservative covenant (no live/fresh-state asks, no side effects, no
|
|
5198
|
+
* task covered by a listed function/module domain).
|
|
5199
|
+
* - `'off'`: the primitive is absent from the prompt and the runtime, and a
|
|
5200
|
+
* respond payload reaching the pipeline is rejected.
|
|
5201
|
+
*/
|
|
5202
|
+
type AxAgentDirectResponse = 'auto' | 'off';
|
|
5203
|
+
|
|
5040
5204
|
type AxJudgeForwardOptions = Omit<AxProgramForwardOptions<string>, 'functions' | 'description'>;
|
|
5041
5205
|
interface AxJudgeOptions extends AxJudgeForwardOptions {
|
|
5042
5206
|
ai: AxAIService;
|
|
@@ -5527,6 +5691,71 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
|
|
|
5527
5691
|
functions?: AxAgentFunctionCollection;
|
|
5528
5692
|
/** Enables runtime callable discovery (modules + on-demand definitions). */
|
|
5529
5693
|
functionDiscovery?: boolean;
|
|
5694
|
+
/**
|
|
5695
|
+
* Smart defaults — ON by default (set `false` to opt out). Two upgrades,
|
|
5696
|
+
* both driven by character counts so callers don't have to remember the
|
|
5697
|
+
* underlying knobs:
|
|
5698
|
+
*
|
|
5699
|
+
* - `functionDiscovery`: when the option is left unset and the estimated
|
|
5700
|
+
* inline docs of discoverable functions exceed `aboveFunctionDocChars`
|
|
5701
|
+
* (default 10_000), discovery is enabled automatically. An explicit
|
|
5702
|
+
* `functionDiscovery: true | false` always wins.
|
|
5703
|
+
* - `contextFields`: per run, an undeclared input value whose serialized
|
|
5704
|
+
* size exceeds `promoteAboveChars` (default 8_000, strictly greater) is
|
|
5705
|
+
* kept runtime-only like a declared context field: the prompt gets a
|
|
5706
|
+
* truncated preview (`previewChars`, default 1_200) plus a
|
|
5707
|
+
* `contextMetadata` entry, while the full value stays addressable in the
|
|
5708
|
+
* code runtime as `inputs.<field>`. Fields declared in `contextFields`
|
|
5709
|
+
* keep their declared config. Values in required non-string fields
|
|
5710
|
+
* (arrays, objects, numbers, media) are left inline — declare those in
|
|
5711
|
+
* `contextFields` explicitly. Each promotion emits a
|
|
5712
|
+
* `field_auto_promoted` context event for observability.
|
|
5713
|
+
*
|
|
5714
|
+
* Pass an object to tune or disable each side independently. TS-first: the
|
|
5715
|
+
* 5 non-TS ports do not ship auto-upgrade yet.
|
|
5716
|
+
*/
|
|
5717
|
+
autoUpgrade?: AxAgentAutoUpgrade;
|
|
5718
|
+
/**
|
|
5719
|
+
* Direct-respond — ON by default (`'auto'`; set `'off'` to opt out). Lets
|
|
5720
|
+
* the distiller end the run with `respond(task, evidence)` and skip the
|
|
5721
|
+
* executor stage entirely (zero executor model calls) when the task needs
|
|
5722
|
+
* no user-provided functions.
|
|
5723
|
+
*
|
|
5724
|
+
* - Agents with zero `functions`/child agents run respond-only: the skip is
|
|
5725
|
+
* deterministic and every run is distiller → responder.
|
|
5726
|
+
* - Agents WITH functions additionally offer `respond` under a conservative
|
|
5727
|
+
* covenant: only for tasks answered purely by reading/synthesizing the
|
|
5728
|
+
* provided context, never when a listed function/module domain covers the
|
|
5729
|
+
* need, never for live/fresh-state asks (context may be stale — tools are
|
|
5730
|
+
* the source of truth for "now"), never for side effects.
|
|
5731
|
+
*
|
|
5732
|
+
* On skip, the distiller's evidence crosses into the responder prompt
|
|
5733
|
+
* (subject to `maxEvidenceChars`) and its runtime variables are exported as
|
|
5734
|
+
* the cross-run state exactly as the executor's would have been.
|
|
5735
|
+
*/
|
|
5736
|
+
directResponse?: AxAgentDirectResponse;
|
|
5737
|
+
/**
|
|
5738
|
+
* Advisory local relevance ranker — ON by default (set `false` to opt out).
|
|
5739
|
+
* Enabled by default since its A/B gate passed (substance-judged,
|
|
5740
|
+
* n=49/variant/model: small model discover-precision 24%->90% and answer
|
|
5741
|
+
* substance 14%->29%; frontier-model control substance 63%->88% with fewer
|
|
5742
|
+
* turns). TS-first: the 5 non-TS ports do not ship the ranker yet, so
|
|
5743
|
+
* cross-language behavior diverges here until they catch up.
|
|
5744
|
+
*
|
|
5745
|
+
* When enabled, a cheap deterministic token-overlap ranker scores this
|
|
5746
|
+
* agent's discoverable capabilities against the task and injects a
|
|
5747
|
+
* non-authoritative "Likely Relevant" hint into the executor turn. Ranked
|
|
5748
|
+
* domains light up with their prerequisites: modules require
|
|
5749
|
+
* `functionDiscovery`; skills/memories require their catalogs. The hint
|
|
5750
|
+
* lands in a dynamic, non-cached field, so it does not affect the prompt
|
|
5751
|
+
* cache; the full lists and the `discover()`/`recall()` flows are unchanged
|
|
5752
|
+
* and the model may still choose anything. Pass an object to tune `topK`
|
|
5753
|
+
* (default 3) / `minScore` (default 0.08).
|
|
5754
|
+
*/
|
|
5755
|
+
relevanceRanking?: boolean | {
|
|
5756
|
+
topK?: number;
|
|
5757
|
+
minScore?: number;
|
|
5758
|
+
};
|
|
5530
5759
|
/**
|
|
5531
5760
|
* Optional skills search callback. When set, the executor runtime gains a
|
|
5532
5761
|
* `discover({ skills })` path. The callback receives the raw search strings
|
|
@@ -5537,6 +5766,16 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
|
|
|
5537
5766
|
* next turn's prompt to see what landed.
|
|
5538
5767
|
*/
|
|
5539
5768
|
onSkillsSearch?: AxAgentSkillsSearchFn;
|
|
5769
|
+
/**
|
|
5770
|
+
* Static skill catalog. When set and no `onSkillsSearch` callback is
|
|
5771
|
+
* provided, ax backs `discover({ skills })` with a built-in deterministic
|
|
5772
|
+
* local search over the catalog — skills work batteries-included with zero
|
|
5773
|
+
* host search code. A host `onSkillsSearch` always takes precedence for
|
|
5774
|
+
* search; the catalog still powers the advisory relevance hint (with
|
|
5775
|
+
* `relevanceRanking`). Unlike `skills`, catalog content is NOT preloaded
|
|
5776
|
+
* into the prompt — entries load only when matched.
|
|
5777
|
+
*/
|
|
5778
|
+
skillsCatalog?: readonly AxAgentCatalogSkill[];
|
|
5540
5779
|
/**
|
|
5541
5780
|
* Skills to preload into the executor prompt at startup, in the same
|
|
5542
5781
|
* shape returned by `onSkillsSearch` ({ id?, name, content }). Useful when
|
|
@@ -5576,6 +5815,18 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
|
|
|
5576
5815
|
* `.forward()` call; persist them externally to carry across calls.
|
|
5577
5816
|
*/
|
|
5578
5817
|
onMemoriesSearch?: AxAgentMemoriesSearchFn;
|
|
5818
|
+
/**
|
|
5819
|
+
* Static memory catalog. When set and no `onMemoriesSearch` callback is
|
|
5820
|
+
* provided, ax backs `recall(...)` with a built-in deterministic local
|
|
5821
|
+
* search over the catalog — memories work batteries-included with zero host
|
|
5822
|
+
* search code. A host `onMemoriesSearch` always takes precedence for
|
|
5823
|
+
* search; the catalog still powers the advisory relevance hint (with
|
|
5824
|
+
* `relevanceRanking`). Catalog content is NOT preloaded into the prompt —
|
|
5825
|
+
* entries load only when recalled. To preload specific memories for a run,
|
|
5826
|
+
* pass them as the `memories` input value at forward time:
|
|
5827
|
+
* `forward(ai, { ..., memories: [{ id, content }] })`.
|
|
5828
|
+
*/
|
|
5829
|
+
memoriesCatalog?: readonly AxAgentMemoryResult[];
|
|
5579
5830
|
/**
|
|
5580
5831
|
* Optional callback fired whenever `recall(...)` loads memories. Receives
|
|
5581
5832
|
* the matched `{ id, content }[]` from `onMemoriesSearch`. Use this for
|
|
@@ -5601,6 +5852,12 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
|
|
|
5601
5852
|
maxTurns?: number;
|
|
5602
5853
|
/** Maximum characters to keep from runtime output and console/log replay. */
|
|
5603
5854
|
maxRuntimeChars?: number;
|
|
5855
|
+
/**
|
|
5856
|
+
* Maximum serialized characters for a `final(task, evidence)` evidence
|
|
5857
|
+
* object crossing the host boundary (default: 50000). Oversized evidence
|
|
5858
|
+
* throws inside the actor turn so the model narrows and retries.
|
|
5859
|
+
*/
|
|
5860
|
+
maxEvidenceChars?: number;
|
|
5604
5861
|
/** Context replay, checkpointing, and runtime-state policy. */
|
|
5605
5862
|
contextPolicy?: AxContextPolicyConfig;
|
|
5606
5863
|
/** Default options for the internal checkpoint summarizer. */
|
|
@@ -5786,6 +6043,13 @@ type AxResolvedExecutorModelPolicyEntry = {
|
|
|
5786
6043
|
namespaces?: string[];
|
|
5787
6044
|
};
|
|
5788
6045
|
type AxResolvedExecutorModelPolicy = readonly AxResolvedExecutorModelPolicyEntry[];
|
|
6046
|
+
/** One auto-upgrade context promotion, pending `field_auto_promoted` emission. */
|
|
6047
|
+
type AxAgentAutoPromotionRecord = {
|
|
6048
|
+
fieldName: string;
|
|
6049
|
+
originalChars: number;
|
|
6050
|
+
/** Chars kept inline as a preview; undefined => runtime-only. */
|
|
6051
|
+
promptPreviewChars?: number;
|
|
6052
|
+
};
|
|
5789
6053
|
type AxAgentRuntimeInputState = {
|
|
5790
6054
|
currentInputs: Record<string, unknown>;
|
|
5791
6055
|
signatureInputFieldNames: Set<string>;
|
|
@@ -5793,6 +6057,8 @@ type AxAgentRuntimeInputState = {
|
|
|
5793
6057
|
getNonContextValues: () => Record<string, unknown>;
|
|
5794
6058
|
getActorInlineContextValues: () => Record<string, unknown>;
|
|
5795
6059
|
getContextMetadata: () => string | undefined;
|
|
6060
|
+
/** Returns promotions recorded since the last drain (each field once per run). */
|
|
6061
|
+
drainAutoPromotionEvents: () => readonly AxAgentAutoPromotionRecord[];
|
|
5796
6062
|
};
|
|
5797
6063
|
type AxAgentRuntimeCompletionState = {
|
|
5798
6064
|
payload: AxAgentInternalCompletionPayload | undefined;
|
|
@@ -5822,8 +6088,12 @@ type AxAgentRuntimeExecutionContext = {
|
|
|
5822
6088
|
texts: string[];
|
|
5823
6089
|
};
|
|
5824
6090
|
getActorModelMatchedNamespaces: () => readonly string[];
|
|
5825
|
-
exportRuntimeState: (
|
|
5826
|
-
|
|
6091
|
+
exportRuntimeState: (options?: Readonly<{
|
|
6092
|
+
includeBindings?: boolean;
|
|
6093
|
+
}>) => Promise<AxAgentState>;
|
|
6094
|
+
restoreRuntimeState: (state: Readonly<AxAgentState>, options?: Readonly<{
|
|
6095
|
+
skipBindings?: boolean;
|
|
6096
|
+
}>) => Promise<AxPreparedRestoredState>;
|
|
5827
6097
|
syncRuntimeInputsToSession: () => Promise<void>;
|
|
5828
6098
|
executeActorCode: (code: string) => Promise<{
|
|
5829
6099
|
result: unknown;
|
|
@@ -5831,6 +6101,13 @@ type AxAgentRuntimeExecutionContext = {
|
|
|
5831
6101
|
isError: boolean;
|
|
5832
6102
|
}>;
|
|
5833
6103
|
executeTestCode: (code: string) => Promise<AxAgentTestResult>;
|
|
6104
|
+
/**
|
|
6105
|
+
* Present only when the run participates in a pipeline-owned shared runtime
|
|
6106
|
+
* session. The actor loop awaits it before the first turn: the distiller
|
|
6107
|
+
* phase adopts the fresh session, the executor phase patches its bindings
|
|
6108
|
+
* over the inherited one and runs the phase-boundary snippet.
|
|
6109
|
+
*/
|
|
6110
|
+
prepareSharedSession?: () => Promise<void>;
|
|
5834
6111
|
close: () => void;
|
|
5835
6112
|
};
|
|
5836
6113
|
type AxDiscoveryTurnSummary = {
|
|
@@ -5964,6 +6241,8 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
|
|
|
5964
6241
|
*/
|
|
5965
6242
|
get primaryAgent(): ActorAgentRLM<any, any>;
|
|
5966
6243
|
private readonly contextFieldNames;
|
|
6244
|
+
/** Resolved auto-upgrade config; also read by the responder-input helpers. */
|
|
6245
|
+
readonly autoUpgradeResolved: AxResolvedAutoUpgrade;
|
|
5967
6246
|
/** Field names stripped from executor inputs (from executorOptions.excludeFields). */
|
|
5968
6247
|
readonly executorExcludeFields: Set<string>;
|
|
5969
6248
|
/** Field names stripped from responder inputs (from responderOptions.excludeFields). */
|
|
@@ -5999,7 +6278,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
|
|
|
5999
6278
|
getId(): string;
|
|
6000
6279
|
setId(id: string): void;
|
|
6001
6280
|
/**
|
|
6002
|
-
* The
|
|
6281
|
+
* The distiller is reported under `ctx.*` and the executor / responder
|
|
6003
6282
|
* pair under `task.*` so optimizer demo IDs and template-overrides keep
|
|
6004
6283
|
* stable stage ownership.
|
|
6005
6284
|
*/
|
|
@@ -6115,6 +6394,14 @@ declare class ActorAgentRLM<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
|
|
|
6115
6394
|
private onContextEvent?;
|
|
6116
6395
|
private contextPromptConfigByField;
|
|
6117
6396
|
private functionDiscoveryEnabled;
|
|
6397
|
+
private relevanceHintsEnabled;
|
|
6398
|
+
private moduleHintEnabled;
|
|
6399
|
+
private skillsHintEnabled;
|
|
6400
|
+
private memoriesHintEnabled;
|
|
6401
|
+
private _relevanceRankingChoice;
|
|
6402
|
+
private relevanceRankingOptions;
|
|
6403
|
+
private skillsCatalog?;
|
|
6404
|
+
private memoriesCatalog?;
|
|
6118
6405
|
private runtimeLanguageName;
|
|
6119
6406
|
private runtimeCodeFieldName;
|
|
6120
6407
|
private runtimeCodeFieldTitle;
|
|
@@ -6126,6 +6413,8 @@ declare class ActorAgentRLM<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
|
|
|
6126
6413
|
private agentIdentity?;
|
|
6127
6414
|
private activeAbortControllers;
|
|
6128
6415
|
private _stopRequested;
|
|
6416
|
+
/** Stage behavioral policy, resolved once at init — see stagePolicy.ts. */
|
|
6417
|
+
private stagePolicy;
|
|
6129
6418
|
state: AxAgentState | undefined;
|
|
6130
6419
|
stateError: string | undefined;
|
|
6131
6420
|
private runtimeBootstrapContext;
|
|
@@ -6265,6 +6554,266 @@ type AxAgentMemoryEntry = {
|
|
|
6265
6554
|
content: string;
|
|
6266
6555
|
};
|
|
6267
6556
|
|
|
6557
|
+
/**
|
|
6558
|
+
* Local, deterministic relevance ranker for agent discovery and recall.
|
|
6559
|
+
*
|
|
6560
|
+
* The domain-neutral core is `rankDocuments`: given a query and a small set of
|
|
6561
|
+
* documents (each a bag of weighted text fields), it scores every document
|
|
6562
|
+
* with a lightweight BM25-style overlap and returns a shortlist — or nothing
|
|
6563
|
+
* when it has no confident signal. Domain adapters (`rankModules` for tool
|
|
6564
|
+
* modules; skills/memories catalog searchers) build their documents from the
|
|
6565
|
+
* metadata each domain has.
|
|
6566
|
+
*
|
|
6567
|
+
* It is intentionally pure and dependency-free (only `stopwords` is reused):
|
|
6568
|
+
* identical inputs always produce identical output, so it is trivially
|
|
6569
|
+
* unit-testable and produces stable telemetry for `agent.optimize()`.
|
|
6570
|
+
*/
|
|
6571
|
+
/** One searchable text field of a document. */
|
|
6572
|
+
interface AxRankableField {
|
|
6573
|
+
text: string;
|
|
6574
|
+
/** Term-frequency multiplier (default 1). Use >1 for high-signal fields. */
|
|
6575
|
+
weight?: number;
|
|
6576
|
+
/** Tokenize as a code identifier (camelCase/snake/kebab) instead of prose. */
|
|
6577
|
+
identifier?: boolean;
|
|
6578
|
+
}
|
|
6579
|
+
/** A document the ranker can score. */
|
|
6580
|
+
interface AxRankableDocument {
|
|
6581
|
+
id: string;
|
|
6582
|
+
fields: readonly AxRankableField[];
|
|
6583
|
+
}
|
|
6584
|
+
/** A single ranked document. */
|
|
6585
|
+
interface AxRankedDocument {
|
|
6586
|
+
id: string;
|
|
6587
|
+
/** Score normalized to 0..1 relative to the top match (top is always 1). */
|
|
6588
|
+
score: number;
|
|
6589
|
+
/** Query terms that matched this document (for telemetry/debugging). */
|
|
6590
|
+
matchedTerms: string[];
|
|
6591
|
+
}
|
|
6592
|
+
interface AxRankDocumentsOptions {
|
|
6593
|
+
/** Max documents to return. Default 3. */
|
|
6594
|
+
topK?: number;
|
|
6595
|
+
/**
|
|
6596
|
+
* Absolute floor on the top match's idf-weighted query coverage (0..1).
|
|
6597
|
+
* Below this the ranker emits nothing. Default 0.08.
|
|
6598
|
+
*/
|
|
6599
|
+
minScore?: number;
|
|
6600
|
+
/**
|
|
6601
|
+
* Discrimination guard. If every document scores within this ratio of the
|
|
6602
|
+
* top, the ranker can't discriminate and emits nothing. Default 0.15.
|
|
6603
|
+
*/
|
|
6604
|
+
marginRatio?: number;
|
|
6605
|
+
/**
|
|
6606
|
+
* Minimum catalog size to rank at all (a hint over a 1-item catalog is
|
|
6607
|
+
* noise). Default 2. Explicit-search adapters pass 1 for best-effort mode.
|
|
6608
|
+
*/
|
|
6609
|
+
minDocs?: number;
|
|
6610
|
+
}
|
|
6611
|
+
/** A module the ranker can score, flattened from agent function-group metadata. */
|
|
6612
|
+
interface AxModuleRankInput {
|
|
6613
|
+
namespace: string;
|
|
6614
|
+
title?: string;
|
|
6615
|
+
selectionCriteria?: string;
|
|
6616
|
+
description?: string;
|
|
6617
|
+
/** Bare function names in the module, e.g. `['search', 'read']`. */
|
|
6618
|
+
functionNames?: readonly string[];
|
|
6619
|
+
/** Union of parameter property names across the module's functions. */
|
|
6620
|
+
argNames?: readonly string[];
|
|
6621
|
+
}
|
|
6622
|
+
/** A single ranked module. */
|
|
6623
|
+
interface AxRankedModule {
|
|
6624
|
+
namespace: string;
|
|
6625
|
+
/** Score normalized to 0..1 relative to the top match (top is always 1). */
|
|
6626
|
+
score: number;
|
|
6627
|
+
/** Query terms that matched this module (for telemetry/debugging). */
|
|
6628
|
+
matchedTerms: string[];
|
|
6629
|
+
}
|
|
6630
|
+
interface AxRankModulesOptions {
|
|
6631
|
+
/** Max modules to return. Default 3. */
|
|
6632
|
+
topK?: number;
|
|
6633
|
+
/** Absolute floor on the top match's coverage (0..1). Default 0.08. */
|
|
6634
|
+
minScore?: number;
|
|
6635
|
+
/** Discrimination guard ratio. Default 0.15. */
|
|
6636
|
+
marginRatio?: number;
|
|
6637
|
+
}
|
|
6638
|
+
/** Per-domain shortlists for the advisory `relevanceHints` prompt field. */
|
|
6639
|
+
interface AxRelevanceHints {
|
|
6640
|
+
modules?: readonly {
|
|
6641
|
+
namespace: string;
|
|
6642
|
+
}[];
|
|
6643
|
+
skills?: readonly {
|
|
6644
|
+
id: string;
|
|
6645
|
+
name: string;
|
|
6646
|
+
}[];
|
|
6647
|
+
memories?: readonly {
|
|
6648
|
+
id: string;
|
|
6649
|
+
snippet?: string;
|
|
6650
|
+
}[];
|
|
6651
|
+
}
|
|
6652
|
+
|
|
6653
|
+
/**
|
|
6654
|
+
* Shape summary of the distiller's evidence object. Built in-worker (shared
|
|
6655
|
+
* mode) or host-side (fallback mode) and rendered into the executor's
|
|
6656
|
+
* `distilledContextSummary` prompt field; the data itself never enters a
|
|
6657
|
+
* prompt.
|
|
6658
|
+
*/
|
|
6659
|
+
type AxEvidenceDescriptor = {
|
|
6660
|
+
kind: 'axEvidenceDescriptor';
|
|
6661
|
+
totalChars: number;
|
|
6662
|
+
entries: {
|
|
6663
|
+
key: string;
|
|
6664
|
+
type: string;
|
|
6665
|
+
size: number;
|
|
6666
|
+
length?: number;
|
|
6667
|
+
/** Field names of the first element (arrays of objects). */
|
|
6668
|
+
itemKeys?: string[];
|
|
6669
|
+
/** Top-level keys (plain-object values). */
|
|
6670
|
+
keys?: string[];
|
|
6671
|
+
}[];
|
|
6672
|
+
};
|
|
6673
|
+
type AxSharedSessionPhase = 'distiller' | 'executor';
|
|
6674
|
+
/**
|
|
6675
|
+
* Coordinates one runtime session across the pipeline's distiller and
|
|
6676
|
+
* executor phases. Created per `AxAgent.forward()` by the pipeline, handed to
|
|
6677
|
+
* both actor runs, closed by the pipeline.
|
|
6678
|
+
*
|
|
6679
|
+
* Shared mode requires a JavaScript-capable runtime (the phase boundary is an
|
|
6680
|
+
* in-session snippet). For other runtimes the pipeline keeps `mode:
|
|
6681
|
+
* 'fallback'`: each stage runs in its own session exactly as before, and the
|
|
6682
|
+
* evidence value crosses through the host into the executor's runtime
|
|
6683
|
+
* globals — correctness preserved, zero-copy lost.
|
|
6684
|
+
*/
|
|
6685
|
+
declare class AxAgentSharedRuntimeSession {
|
|
6686
|
+
readonly mode: 'shared' | 'fallback';
|
|
6687
|
+
phase: AxSharedSessionPhase;
|
|
6688
|
+
session: AxCodeSession | undefined;
|
|
6689
|
+
/**
|
|
6690
|
+
* Cross-run state (from the coordinator's canonical executor-held
|
|
6691
|
+
* `AxAgentState`). Variable bindings are applied once when the phase-1
|
|
6692
|
+
* session is adopted; stage-level prompt state stays with each stage.
|
|
6693
|
+
*/
|
|
6694
|
+
restoreState: AxAgentState | undefined;
|
|
6695
|
+
/** Executor-stage field deletions applied at the phase boundary. */
|
|
6696
|
+
excludeFieldDeletions: readonly string[];
|
|
6697
|
+
/**
|
|
6698
|
+
* Phase-1 system/alias names, excluded from the executor phase's runtime
|
|
6699
|
+
* inspection so inherited context aliases don't render as user variables.
|
|
6700
|
+
*/
|
|
6701
|
+
phase1ReservedNames: readonly string[];
|
|
6702
|
+
/** Fallback mode only: the real evidence value held host-side. */
|
|
6703
|
+
fallbackEvidence: Record<string, unknown> | undefined;
|
|
6704
|
+
/**
|
|
6705
|
+
* Entries actually restored into the phase-1 session from `restoreState`,
|
|
6706
|
+
* kept for the distiller's restore notice / live-state rendering.
|
|
6707
|
+
*/
|
|
6708
|
+
restoredEntries: AxAgentState['runtimeEntries'] | undefined;
|
|
6709
|
+
private closed;
|
|
6710
|
+
constructor(options?: Readonly<{
|
|
6711
|
+
mode?: 'shared' | 'fallback';
|
|
6712
|
+
}>);
|
|
6713
|
+
get isShared(): boolean;
|
|
6714
|
+
/**
|
|
6715
|
+
* Adopt the freshly created phase-1 session: apply cross-run variable
|
|
6716
|
+
* bindings, install the in-worker `final` wrapper, remember reserved names.
|
|
6717
|
+
*/
|
|
6718
|
+
adoptDistillerSession(session: AxCodeSession, options: Readonly<{
|
|
6719
|
+
reservedNames: readonly string[];
|
|
6720
|
+
signal?: AbortSignal;
|
|
6721
|
+
}>): Promise<void>;
|
|
6722
|
+
/**
|
|
6723
|
+
* Transition the adopted session into the executor phase. `phaseGlobals`
|
|
6724
|
+
* are the executor run's host closures (final/askClarification/llmQuery/
|
|
6725
|
+
* tools/…) patched over the phase-1 bindings; `inputs` are the executor's
|
|
6726
|
+
* input values merged per key.
|
|
6727
|
+
*/
|
|
6728
|
+
beginExecutorPhase(options: Readonly<{
|
|
6729
|
+
phaseGlobals: Record<string, unknown>;
|
|
6730
|
+
inputs: Record<string, unknown>;
|
|
6731
|
+
aliasNames: readonly string[];
|
|
6732
|
+
signal?: AbortSignal;
|
|
6733
|
+
}>): Promise<void>;
|
|
6734
|
+
/** Mid-phase per-key input sync (replaces wholesale `inputs` patches). */
|
|
6735
|
+
mergeInputs(inputs: Record<string, unknown>, options?: Readonly<{
|
|
6736
|
+
signal?: AbortSignal;
|
|
6737
|
+
}>): Promise<void>;
|
|
6738
|
+
/**
|
|
6739
|
+
* Session-death recovery mid-phase: the runtime context recreated a fresh
|
|
6740
|
+
* session; track it so `close()` targets the live one. Inherited state is
|
|
6741
|
+
* gone, which matches the existing per-stage restart semantics.
|
|
6742
|
+
*/
|
|
6743
|
+
replaceSession(session: AxCodeSession): void;
|
|
6744
|
+
close(): void;
|
|
6745
|
+
}
|
|
6746
|
+
|
|
6747
|
+
/**
|
|
6748
|
+
* The pipeline's two actor stages are the same `ActorAgentRLM` running under
|
|
6749
|
+
* different policies. This table is the single answer to "what does being
|
|
6750
|
+
* the distiller/executor mean" — every stage-conditional in the codebase
|
|
6751
|
+
* reads a named capability from here instead of branching on the variant
|
|
6752
|
+
* string, so the full behavioral difference between the stages fits on one
|
|
6753
|
+
* screen.
|
|
6754
|
+
*/
|
|
6755
|
+
type AxAgentStageVariant = 'distiller' | 'executor';
|
|
6756
|
+
interface AxAgentStagePolicy {
|
|
6757
|
+
readonly variant: AxAgentStageVariant;
|
|
6758
|
+
/** Actor system-prompt template (and primitive-registry stage). */
|
|
6759
|
+
readonly templateId: 'rlm/distiller.md' | 'rlm/executor.md';
|
|
6760
|
+
/**
|
|
6761
|
+
* Tool callables execute. The distiller sees the full tool surface
|
|
6762
|
+
* (schemas, catalogs, discovery — its extraction guide) but its callables
|
|
6763
|
+
* are throwing stubs; execution authority stays with the executor.
|
|
6764
|
+
*/
|
|
6765
|
+
readonly executesTools: boolean;
|
|
6766
|
+
/**
|
|
6767
|
+
* Child agents (arriving via `options.functions`) register as optimizer
|
|
6768
|
+
* sub-programs. Only the executor owns them — the distiller shares the
|
|
6769
|
+
* function metadata without duplicating optimizer ownership.
|
|
6770
|
+
*/
|
|
6771
|
+
readonly ownsChildAgents: boolean;
|
|
6772
|
+
/** Receives the prompt-resident `contextMap` orientation cache. */
|
|
6773
|
+
readonly seesContextMap: boolean;
|
|
6774
|
+
/** Receives advisory relevance hints (ranked toward task execution). */
|
|
6775
|
+
readonly seesRelevanceHints: boolean;
|
|
6776
|
+
/** Ingests forward-time preset skills passed on the forward call. */
|
|
6777
|
+
readonly ingestsForwardSkills: boolean;
|
|
6778
|
+
/**
|
|
6779
|
+
* Enables `used(...)` skill-usage attribution for this stage. Currently
|
|
6780
|
+
* executor-only (pre-reconnaissance behavior); candidate to enable for the
|
|
6781
|
+
* distiller now that it loads skill guides too.
|
|
6782
|
+
*/
|
|
6783
|
+
readonly tracksSkillUsage: boolean;
|
|
6784
|
+
/**
|
|
6785
|
+
* May declare the coordinator-wired `contextMetadata` input (the shared
|
|
6786
|
+
* runtime's raw-context inventory). User signatures are still guarded —
|
|
6787
|
+
* they validate through the distiller, which carries every user input.
|
|
6788
|
+
*/
|
|
6789
|
+
readonly allowsContextMetadataInput: boolean;
|
|
6790
|
+
/** Synthesizes a mechanical `executorRequest` when the handoff lacks one. */
|
|
6791
|
+
readonly synthesizesDefaultExecutorRequest: boolean;
|
|
6792
|
+
/**
|
|
6793
|
+
* Shared session: this stage creates the session (phase 1). The other
|
|
6794
|
+
* stage adopts the live session and patches its phase bindings over it.
|
|
6795
|
+
*/
|
|
6796
|
+
readonly createsSharedSession: boolean;
|
|
6797
|
+
/**
|
|
6798
|
+
* Shared session: exports variable bindings at end of run — the pipeline's
|
|
6799
|
+
* canonical cross-run state. The phase-1 stage exports bindings-free
|
|
6800
|
+
* (its variables live on in the session) — except when its run ends in
|
|
6801
|
+
* `respond()`, which skips the executor: the actor loop then exports WITH
|
|
6802
|
+
* bindings and the pipeline copies them onto the executor's cross-run slot.
|
|
6803
|
+
*/
|
|
6804
|
+
readonly exportsSharedBindings: boolean;
|
|
6805
|
+
/**
|
|
6806
|
+
* Shared session: excludes phase-1 system/alias names from runtime
|
|
6807
|
+
* inspection so inherited context aliases don't render as user variables.
|
|
6808
|
+
*/
|
|
6809
|
+
readonly inheritsPhase1ReservedNames: boolean;
|
|
6810
|
+
/**
|
|
6811
|
+
* Fallback mode (non-JS runtime): receives the host-carried evidence as a
|
|
6812
|
+
* runtime-only input value plus bare alias.
|
|
6813
|
+
*/
|
|
6814
|
+
readonly receivesFallbackEvidence: boolean;
|
|
6815
|
+
}
|
|
6816
|
+
|
|
6268
6817
|
/**
|
|
6269
6818
|
* Context-engineering measurement aggregator (benchmark/spike helper).
|
|
6270
6819
|
*
|
|
@@ -6335,6 +6884,26 @@ type AxContextMetricsRow = {
|
|
|
6335
6884
|
elapsedMs?: number;
|
|
6336
6885
|
};
|
|
6337
6886
|
|
|
6887
|
+
/**
|
|
6888
|
+
* Deterministic, offline scenarios + harness for the context-compression spike.
|
|
6889
|
+
*
|
|
6890
|
+
* Drives AxAgent with a scripted `AxMockAIService` + stub `AxCodeRuntime` (the
|
|
6891
|
+
* pattern from `ctx-vs-task.test.ts`) so a sweep runs with zero API keys and is
|
|
6892
|
+
* fully deterministic. Shared by the regression test
|
|
6893
|
+
* (`context-compression.test.ts`) and the runnable demo
|
|
6894
|
+
* (`src/examples/context-compression-spike.ts`).
|
|
6895
|
+
*
|
|
6896
|
+
* Forward-compat seam: the comparison axis is `contextPolicy.preset`
|
|
6897
|
+
* ({@link AX_CONTEXT_PRESETS}). A future plan-aware "foresight" retention
|
|
6898
|
+
* strategy becomes a new preset value (or `contextPolicy` field); adding it to
|
|
6899
|
+
* that array is the only change needed to A/B it against today's four presets.
|
|
6900
|
+
* The aggregator (`AxContextMetricsCollector`) is policy-agnostic and measures
|
|
6901
|
+
* it unchanged. Do NOT add foresight logic here — this file only measures the
|
|
6902
|
+
* existing (hindsight) baseline.
|
|
6903
|
+
*
|
|
6904
|
+
* Internal benchmark helper — NOT exported from `src/ax/index.ts`.
|
|
6905
|
+
*/
|
|
6906
|
+
|
|
6338
6907
|
type AxScriptedTurn = {
|
|
6339
6908
|
kind: 'log';
|
|
6340
6909
|
chars: number;
|
|
@@ -6380,6 +6949,8 @@ interface AxRuntimePrimitive {
|
|
|
6380
6949
|
readonly enabledBy?: string;
|
|
6381
6950
|
/** Optional flag names where at least one must be truthy. */
|
|
6382
6951
|
readonly enabledByAny?: readonly string[];
|
|
6952
|
+
/** Optional flag name that hides the primitive when truthy. */
|
|
6953
|
+
readonly disabledBy?: string;
|
|
6383
6954
|
/** Short purpose statement rendered above the overloads. */
|
|
6384
6955
|
readonly description: string;
|
|
6385
6956
|
/** Signature overloads rendered as separate backticked lines. */
|
|
@@ -11818,4 +12389,4 @@ declare class AxRateLimiterTokenUsage {
|
|
|
11818
12389
|
acquire(tokens: number): Promise<void>;
|
|
11819
12390
|
}
|
|
11820
12391
|
|
|
11821
|
-
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 AxAIAnthropicStopDetails, type AxAIAnthropicTaskBudget, 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, 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, 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, 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 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, 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, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, type AxAIWebLLMEngine, AxAIWebLLMModel, type AxAIWebLLMModelId, type AxAPI, type AxAPIConfig, type AxAPIResponseMetadata, AxAgent, type AxAgentActorTurnCallback, type AxAgentActorTurnCallbackArgs, type AxAgentClarification, type AxAgentClarificationChoice, AxAgentClarificationError, type AxAgentClarificationKind, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentContextEvent, AxAgentContextMap, type AxAgentContextMapConfig, type AxAgentContextMapOperation, type AxAgentContextMapOptions, type AxAgentContextMapSnapshot, type AxAgentContextMapUpdateResult, type AxAgentContextPressure, type AxAgentContextStage, type AxAgentDemos, type AxAgentDiscoveryPromptState, type AxAgentEvalDataset, type AxAgentEvalFunctionCall, type AxAgentEvalPrediction, type AxAgentEvalTask, type AxAgentExecutorResultPayload, 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 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, type AxAgentPlaybookOptions, 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, type AxAssertion, AxAssertionError, type AxAttempt, type AxAudioFormat, type AxAudioInput, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBestOfN, type AxBestOfNOptions, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatAudioConfig, type AxChatAudioOutput, type AxChatLogEntry, type AxChatLogMessage, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, 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, AxContextMetricsCollector, type AxContextMetricsRow, type AxContextMetricsSummary, type AxContextPolicyBudget, type AxContextPolicyConfig, type AxContextPolicyPreset, type AxContextScenario, type AxContextTurnSample, type AxCostTracker, type AxCostTrackerOptions, type AxDateRange, type AxDateRangeValue, type AxDebugChatResponseUsage, AxDefaultCostTracker, 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 AxFlowBranchEvaluationData, type AxFlowCompleteData, type AxFlowDynamicContext, type AxFlowErrorData, type AxFlowExecutionPlan, type AxFlowExecutionPlanGroup, type AxFlowExecutionPlanStep, type AxFlowForwardOptions, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowOptions, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStateDependencyAnalysis, type AxFlowStepCompleteData, type AxFlowStepStartData, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, type AxFunctionCallTrace, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionProvider, 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, type AxIField, type AxInputFunctionType, AxJSRuntime, type AxJSRuntimeNodePermissionAllowlist, type AxJSRuntimeOutputMode, AxJSRuntimePermission, type AxJSRuntimeResourceLimits, type AxJudgeForwardOptions, type AxJudgeOptions, type AxLlmQueryBudgetState, type AxLlmQueryPromptMode, type AxLoggerData, type AxLoggerFunction, type AxMCPAnnotations, type AxMCPAudioContent, type AxMCPBaseAnnotated, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPClientCapabilities, type AxMCPClientOptions, type AxMCPCompletionArgument, type AxMCPCompletionReference, type AxMCPCompletionRequest, type AxMCPCompletionResult, type AxMCPContent, type AxMCPEmbeddedResource, type AxMCPFetchOptions, type AxMCPFunctionDescription, type AxMCPFunctionOverride, AxMCPHTTPSSETransport, type AxMCPIcon, type AxMCPImageContent, type AxMCPImplementationInfo, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCMessage, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPJSONSchema, type AxMCPListRootsResult, type AxMCPLoggingLevel, type AxMCPMeta, type AxMCPOAuthOptions, type AxMCPPaginatedRequest, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPProtocolVersion, type AxMCPResource, type AxMCPResourceLink, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPRoot, type AxMCPSSRFProtectionContext, type AxMCPSSRFProtectionOptions, type AxMCPServerCapabilities, AxMCPStreamableHTTPTransport, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPTokenSet, type AxMCPTool, type AxMCPToolCallParams, type AxMCPToolCallResult, 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 AxNamedProgramInstance, type AxOptimizableComponent, type AxOptimizableValidator, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizeOptions, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, AxPlaybook, type AxPlaybookEvolveOptions, type AxPlaybookEvolveResult, type AxPlaybookOptions, type AxPlaybookSnapshot, 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, type AxProviderMetadata, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, AxRefine, AxRefineError, type AxRefineOptions, type AxRefineStrategy, type AxRenderedPrompt, type AxResolvedContextPolicy, type AxResolvedExecutorModelPolicy, type AxResolvedExecutorModelPolicyEntry, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewardFn, type AxRewardFnArgs, type AxRolloutTrace, type AxRoutingResult, type AxRuntimeCallableFormatArgs, type AxRuntimeLanguageInfo, type AxRuntimePrimitive, type AxRuntimePrimitiveExample, type AxRuntimePrimitiveOverrideMap, type AxRuntimePrimitiveSignature, type AxRuntimePrimitiveStage, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSerializedOptimizedProgram, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, type AxSignatureInput, type AxSpeechConfig, type AxSpeechRequest, type AxSpeechResponse, type AxStageDefinitionBuildOptions, type AxStageOptions, type AxStepContext, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStreamingAssertion, AxStreamingAssertionError, 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 AxTranscriptionRequest, type AxTranscriptionResponse, type AxTranscriptionSegment, 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, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOpenAIAudioDefaultConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIRealtimeDefaultConfig, axAIOpenAIRealtimeTranscriptionDefaultConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axApplyOpenAIChatAudioRequest, axAudioFormatFromMimeType, axAudioInputFilename, axAudioInputToBlob, axAudioMimeType, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildDistillerDefinition, axBuildExecutorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axConcatBase64, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateGeminiLiveAudioApi, axCreateGrokRealtimeApi, axCreateJSRuntime, axCreateOpenAIRealtimeApi, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axDeserializeOptimizedProgram, axFetchJsonSpeech, axFetchMultipartTranscription, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGetSupportedAIModels, axGlobals, axGoogleGeminiLiveAudioDefaults, axIsAudioOutputEnabled, axIsGeminiLiveAudioModel, axIsGrokVoiceModel, axIsOpenAIChatAudioModel, axIsOpenAIRealtimeModel, axIsOpenAIRealtimeTranscriptionModel, axMCPToolInputSchemaToFunctionSchema, axMapGeminiLiveAudioPart, axMapOpenAIChatAudioDelta, axMapOpenAIChatAudioResponse, axMapOpenAIInputAudioPart, axMergeChatAudioConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoWebLLM, axNormalizeOpenAIUsage, axNormalizeTranscriptionResponse, axOpenAIChatAudioDefaults, axOptimizableValidators, axProcessContentForProvider, axResolveGeminiLiveAudioConfig, axResolveGrokRealtimeAudioConfig, axResolveOpenAIChatAudioConfig, axResolveOpenAIRealtimeAudioConfig, axRuntimePrimitives, axScoreProvidersForRequest, axSelectOptimalProvider, axSerializeOptimizedProgram, axShouldUseGeminiLiveAudio, axShouldUseGrokRealtime, axShouldUseOpenAIRealtime, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateGeminiLiveAudioInput, axValidateProviderCapabilities, axWorkerRuntime, bestOfN, f, flow, fn, optimize, playbook, refine, s };
|
|
12392
|
+
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 AxAIAnthropicStopDetails, type AxAIAnthropicTaskBudget, 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, 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, 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, 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 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, 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, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, type AxAIWebLLMEngine, AxAIWebLLMModel, type AxAIWebLLMModelId, type AxAPI, type AxAPIConfig, type AxAPIResponseMetadata, AxAgent, type AxAgentActorTurnCallback, type AxAgentActorTurnCallbackArgs, type AxAgentAutoPromotionRecord, type AxAgentAutoUpgrade, type AxAgentCatalogSkill, type AxAgentClarification, type AxAgentClarificationChoice, AxAgentClarificationError, type AxAgentClarificationKind, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentContextEvent, AxAgentContextMap, type AxAgentContextMapConfig, type AxAgentContextMapOperation, type AxAgentContextMapOptions, type AxAgentContextMapSnapshot, type AxAgentContextMapUpdateResult, type AxAgentContextPressure, type AxAgentContextStage, type AxAgentDemos, type AxAgentDirectResponse, type AxAgentDiscoveryPromptState, type AxAgentEvalDataset, type AxAgentEvalFunctionCall, type AxAgentEvalPrediction, type AxAgentEvalTask, type AxAgentExecutorResultPayload, 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 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, type AxAgentPlaybookOptions, 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, AxAgentSharedRuntimeSession, type AxAgentSkillResult, type AxAgentSkillsPromptState, type AxAgentSkillsSearchFn, type AxAgentStagePolicy, type AxAgentStageVariant, 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, type AxAssertion, AxAssertionError, type AxAttempt, type AxAudioFormat, type AxAudioInput, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBestOfN, type AxBestOfNOptions, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatAudioConfig, type AxChatAudioOutput, type AxChatLogEntry, type AxChatLogMessage, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, 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, AxContextMetricsCollector, type AxContextMetricsRow, type AxContextMetricsSummary, type AxContextPolicyBudget, type AxContextPolicyConfig, type AxContextPolicyPreset, type AxContextScenario, type AxContextTurnSample, type AxCostTracker, type AxCostTrackerOptions, type AxDateRange, type AxDateRangeValue, type AxDebugChatResponseUsage, AxDefaultCostTracker, type AxDiscoveryTurnSummary, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxEvidenceDescriptor, type AxExample, type AxExamples, type AxExecutorModelPolicy, type AxExecutorModelPolicyEntry, type AxField, type AxFieldOptions, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowBranchEvaluationData, type AxFlowCompleteData, type AxFlowDynamicContext, type AxFlowErrorData, type AxFlowExecutionPlan, type AxFlowExecutionPlanGroup, type AxFlowExecutionPlanStep, type AxFlowForwardOptions, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowOptions, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStateDependencyAnalysis, type AxFlowStepCompleteData, type AxFlowStepStartData, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, type AxFunctionCallTrace, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionProvider, 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, type AxIField, type AxInputFunctionType, AxJSRuntime, type AxJSRuntimeNodePermissionAllowlist, type AxJSRuntimeOutputMode, AxJSRuntimePermission, type AxJSRuntimeResourceLimits, type AxJudgeForwardOptions, type AxJudgeOptions, type AxLlmQueryBudgetState, type AxLlmQueryPromptMode, type AxLoggerData, type AxLoggerFunction, type AxMCPAnnotations, type AxMCPAudioContent, type AxMCPBaseAnnotated, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPClientCapabilities, type AxMCPClientOptions, type AxMCPCompletionArgument, type AxMCPCompletionReference, type AxMCPCompletionRequest, type AxMCPCompletionResult, type AxMCPContent, type AxMCPEmbeddedResource, type AxMCPFetchOptions, type AxMCPFunctionDescription, type AxMCPFunctionOverride, AxMCPHTTPSSETransport, type AxMCPIcon, type AxMCPImageContent, type AxMCPImplementationInfo, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCMessage, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPJSONSchema, type AxMCPListRootsResult, type AxMCPLoggingLevel, type AxMCPMeta, type AxMCPOAuthOptions, type AxMCPPaginatedRequest, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPProtocolVersion, type AxMCPResource, type AxMCPResourceLink, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPRoot, type AxMCPSSRFProtectionContext, type AxMCPSSRFProtectionOptions, type AxMCPServerCapabilities, AxMCPStreamableHTTPTransport, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPTokenSet, type AxMCPTool, type AxMCPToolCallParams, type AxMCPToolCallResult, 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 AxModuleRankInput, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxNamedProgramInstance, type AxOptimizableComponent, type AxOptimizableValidator, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizeOptions, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, AxPlaybook, type AxPlaybookEvolveOptions, type AxPlaybookEvolveResult, type AxPlaybookOptions, type AxPlaybookSnapshot, 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, type AxProviderMetadata, AxProviderRouter, type AxRLMConfig, type AxRankDocumentsOptions, type AxRankModulesOptions, type AxRankableDocument, type AxRankableField, type AxRankedDocument, type AxRankedModule, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, AxRefine, AxRefineError, type AxRefineOptions, type AxRefineStrategy, type AxRelevanceHints, type AxRenderedPrompt, type AxResolvedAutoUpgrade, type AxResolvedContextPolicy, type AxResolvedExecutorModelPolicy, type AxResolvedExecutorModelPolicyEntry, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewardFn, type AxRewardFnArgs, type AxRolloutTrace, type AxRoutingResult, type AxRuntimeCallableFormatArgs, type AxRuntimeLanguageInfo, type AxRuntimePrimitive, type AxRuntimePrimitiveExample, type AxRuntimePrimitiveOverrideMap, type AxRuntimePrimitiveSignature, type AxRuntimePrimitiveStage, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSerializedOptimizedProgram, type AxSetExamplesOptions, type AxSharedSessionPhase, AxSignature, AxSignatureBuilder, type AxSignatureConfig, type AxSignatureInput, type AxSpeechConfig, type AxSpeechRequest, type AxSpeechResponse, type AxStageDefinitionBuildOptions, type AxStageOptions, type AxStepContext, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStreamingAssertion, AxStreamingAssertionError, 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 AxTranscriptionRequest, type AxTranscriptionResponse, type AxTranscriptionSegment, 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, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOpenAIAudioDefaultConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIRealtimeDefaultConfig, axAIOpenAIRealtimeTranscriptionDefaultConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axApplyOpenAIChatAudioRequest, axAudioFormatFromMimeType, axAudioInputFilename, axAudioInputToBlob, axAudioMimeType, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildDistillerDefinition, axBuildExecutorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axConcatBase64, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateGeminiLiveAudioApi, axCreateGrokRealtimeApi, axCreateJSRuntime, axCreateOpenAIRealtimeApi, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axDeserializeOptimizedProgram, axFetchJsonSpeech, axFetchMultipartTranscription, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGetSupportedAIModels, axGlobals, axGoogleGeminiLiveAudioDefaults, axIsAudioOutputEnabled, axIsGeminiLiveAudioModel, axIsGrokVoiceModel, axIsOpenAIChatAudioModel, axIsOpenAIRealtimeModel, axIsOpenAIRealtimeTranscriptionModel, axMCPToolInputSchemaToFunctionSchema, axMapGeminiLiveAudioPart, axMapOpenAIChatAudioDelta, axMapOpenAIChatAudioResponse, axMapOpenAIInputAudioPart, axMergeChatAudioConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoWebLLM, axNormalizeOpenAIUsage, axNormalizeTranscriptionResponse, axOpenAIChatAudioDefaults, axOptimizableValidators, axProcessContentForProvider, axResolveGeminiLiveAudioConfig, axResolveGrokRealtimeAudioConfig, axResolveOpenAIChatAudioConfig, axResolveOpenAIRealtimeAudioConfig, axRuntimePrimitives, axScoreProvidersForRequest, axSelectOptimalProvider, axSerializeOptimizedProgram, axShouldUseGeminiLiveAudio, axShouldUseGrokRealtime, axShouldUseOpenAIRealtime, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateGeminiLiveAudioInput, axValidateProviderCapabilities, axWorkerRuntime, bestOfN, f, flow, fn, optimize, playbook, refine, s };
|