@ax-llm/ax 21.0.3 → 21.0.4
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 +7 -4
- package/index.cjs.map +1 -1
- package/index.d.cts +3 -3
- package/index.d.ts +3 -3
- package/index.global.js +7 -4
- package/index.global.js.map +1 -1
- package/index.js +7 -4
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ax-agent-optimize.md +1 -1
- package/skills/ax-agent.md +4 -4
- 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-learn.md +1 -1
- package/skills/ax-llm.md +1 -1
- package/skills/ax-signature.md +1 -1
package/index.cjs
CHANGED
|
@@ -52,9 +52,9 @@ The examples above were for training purposes only. Please ignore any specific e
|
|
|
52
52
|
REAL USER QUERY:
|
|
53
53
|
`,"rlm/distiller.md":`## Distiller
|
|
54
54
|
|
|
55
|
-
You (\`distiller\`) read the available context and forward an actionable request to the downstream **executor** stage
|
|
55
|
+
You (\`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.
|
|
56
56
|
|
|
57
|
-
Call \`final(request, evidence)\` to forward. Expand the user's original task with facts from context so the request is clear and complete; put exact inputs (paths, ids, selected records, constraints) in \`evidence\`, or \`{}\` if context has nothing to narrow. Resolve follow-ups against prior conversation. Never refuse
|
|
57
|
+
Call \`final(request, evidence)\` to forward. Expand the user's original task with facts from context so the request is clear and complete; put exact inputs (paths, ids, selected records, constraints) in \`evidence\`, or \`{}\` if context has nothing to narrow. Resolve follow-ups against prior conversation. Never refuse, answer, or ask clarification because of your own lack of tools or perceived executor capabilities \u2014 forwarding *is* the response. Use \`askClarification\` only when the requested action or target is genuinely ambiguous.
|
|
58
58
|
|
|
59
59
|
The JS runtime is a long-running REPL \u2014 state persists across turns unless restarted. Each **turn**: write code \u2192 it executes \u2192 you see output \u2192 write the next block.
|
|
60
60
|
|
|
@@ -76,6 +76,7 @@ Context fields are available as globals (in the REPL) on the \`inputs\` object:
|
|
|
76
76
|
### How to Work
|
|
77
77
|
|
|
78
78
|
- **Skip exploration when context has nothing to narrow** (direct action request, or schema is already known) \u2014 forward on turn 1 with \`final(request, {})\`.
|
|
79
|
+
- **For direct action requests**: preserve the requested action faithfully. The executor decides which available functions to use, attempts the work when possible, and reports the actual result or failure.
|
|
79
80
|
- **When narrowing**: probe shape, narrow with JS, extract. Don't dump raw data. Don't repeat probes already in the Action Log.
|
|
80
81
|
- **Use JS** for deterministic work (filter, sort, slice, regex, dedupe). **Use \`llmQuery\`** only to interpret a narrowed slice \u2014 never pass raw \`inputs.*\` to it.
|
|
81
82
|
- \`console.log\` to inspect; capture awaited results into variables (return values aren't auto-visible). Multiple \`console.log\`s per turn is fine.
|
|
@@ -104,7 +105,7 @@ await final("Use the matched emails to answer the user's question", { matchedEma
|
|
|
104
105
|
|
|
105
106
|
\`\`\`js
|
|
106
107
|
// Passthrough \u2014 user asked for an action and there's nothing in context to narrow.
|
|
107
|
-
await final("
|
|
108
|
+
await final("Perform the requested action and report the actual result or failure", {});
|
|
108
109
|
\`\`\`
|
|
109
110
|
|
|
110
111
|
\`\`\`js
|
|
@@ -126,7 +127,7 @@ The prior distiller stage produced two extra inputs:
|
|
|
126
127
|
- \`inputs.executorRequest\` \u2014 an expanded request describing what this stage should complete.
|
|
127
128
|
- \`inputs.distilledContext\` \u2014 pre-distilled evidence the distiller selected for this task.
|
|
128
129
|
|
|
129
|
-
Read \`executorRequest\`, then read \`distilledContext\` for the evidence selected by the distiller. Raw context fields are not available in this stage.
|
|
130
|
+
Read \`executorRequest\`, then read \`distilledContext\` for the evidence selected by the distiller. Raw context fields are not available in this stage. You are the capability and tool-use authority: if the request needs information or effects that your available functions can provide, use those functions before refusing or asking clarification. If the distilled evidence is sufficient, finish directly with \`final(...)\`. Call \`askClarification(...)\` only when the missing information cannot be obtained programmatically.
|
|
130
131
|
|
|
131
132
|
### Available Functions
|
|
132
133
|
|
|
@@ -164,6 +165,7 @@ These skill guides were loaded via \`consult(...)\` \u2014 apply them directly.
|
|
|
164
165
|
### How to Work
|
|
165
166
|
|
|
166
167
|
- 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.
|
|
168
|
+
- 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.
|
|
167
169
|
- **Use JS** for deterministic work (filter, sort, slice, regex, dedupe). **Use \`llmQuery\`** only to interpret narrowed text \u2014 never pass raw \`inputs.*\` to it.
|
|
168
170
|
- Discovery calls (\`discoverModules\`/\`discoverFunctions\`) can appear alongside other code \u2014 the runtime runs them first automatically.
|
|
169
171
|
- Capture awaited results into variables (return values aren't auto-visible); inspect with \`console.log(result)\` or finish with \`await final("...", { result })\`. Multiple \`console.log\`s per turn is fine.
|
|
@@ -223,6 +225,7 @@ You synthesize the final answer from the evidence the actor gathered. You do not
|
|
|
223
225
|
1. Follow \`Context Data.task\` using \`Context Data.evidence\` and any other input fields provided.
|
|
224
226
|
2. When emitting a JSON output field, write the value flat \u2014 do **not** wrap it under a key matching the field's title. The field is already named.
|
|
225
227
|
3. If \`evidence\` lacks sufficient information, give the best possible answer from what's available across all input fields.
|
|
228
|
+
4. 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.
|
|
226
229
|
|
|
227
230
|
### Context variables that were analyzed (metadata only)
|
|
228
231
|
{{ contextVarSummary }}
|