@ax-llm/ax 21.0.10 → 21.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/index.cjs +261 -259
- package/index.cjs.map +1 -1
- package/index.d.cts +26 -25
- package/index.d.ts +26 -25
- package/index.global.js +256 -254
- package/index.global.js.map +1 -1
- package/index.js +267 -265
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ax-agent-memory-skills.md +1 -1
- package/skills/ax-agent-observability.md +1 -1
- package/skills/ax-agent-optimize.md +1 -1
- package/skills/ax-agent-rlm.md +1 -1
- package/skills/ax-agent.md +1 -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-learn.md +1 -1
- package/skills/ax-llm.md +1 -1
- package/skills/ax-signature.md +1 -1
package/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Histogram, Counter, Gauge,
|
|
1
|
+
import { Histogram, Counter, Gauge, Context, Tracer, Span, Meter } from '@opentelemetry/api';
|
|
2
2
|
|
|
3
3
|
type AxMemoryMessageValue = Omit<AxChatRequest['chatPrompt'][number], 'role'> | Omit<AxChatResponseResult, 'index'>;
|
|
4
4
|
type AxMemoryData = {
|
|
@@ -1224,9 +1224,27 @@ declare class AxProgram<IN = any, OUT = any> implements AxUsable, AxTunable<IN,
|
|
|
1224
1224
|
protected applyLocalOptimizedComponents(updates: Readonly<Record<string, string>>): void;
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
|
-
type
|
|
1228
|
-
|
|
1229
|
-
|
|
1227
|
+
type AxFieldProcessorProcess = (value: AxFieldValue, context?: Readonly<{
|
|
1228
|
+
values?: AxGenOut;
|
|
1229
|
+
sessionId?: string;
|
|
1230
|
+
done?: boolean;
|
|
1231
|
+
}>) => unknown | Promise<unknown>;
|
|
1232
|
+
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
|
|
1233
|
+
values?: AxGenOut;
|
|
1234
|
+
sessionId?: string;
|
|
1235
|
+
done?: boolean;
|
|
1236
|
+
}>) => unknown | Promise<unknown>;
|
|
1237
|
+
interface AxFieldProcessor {
|
|
1238
|
+
field: Readonly<AxField>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Process the field value and return a new value (or undefined if no update is needed).
|
|
1241
|
+
* The returned value may be merged back into memory.
|
|
1242
|
+
* @param value - The current field value.
|
|
1243
|
+
* @param context - Additional context (e.g. memory and session id).
|
|
1244
|
+
*/
|
|
1245
|
+
process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1230
1248
|
interface AxResponseHandlerArgs<T> {
|
|
1231
1249
|
ai: Readonly<AxAIService>;
|
|
1232
1250
|
model?: string;
|
|
@@ -1243,6 +1261,10 @@ interface AxResponseHandlerArgs<T> {
|
|
|
1243
1261
|
debugPromptMetrics?: Readonly<AxPromptMetrics>;
|
|
1244
1262
|
onFunctionCall?: (call: Readonly<AxFunctionCallTrace>) => void | Promise<void>;
|
|
1245
1263
|
}
|
|
1264
|
+
|
|
1265
|
+
type AxGenerateResult<OUT> = OUT & {
|
|
1266
|
+
thought?: string;
|
|
1267
|
+
};
|
|
1246
1268
|
interface AxStreamingEvent<T> {
|
|
1247
1269
|
event: 'delta' | 'done' | 'error';
|
|
1248
1270
|
data: {
|
|
@@ -9620,27 +9642,6 @@ declare class AxTestPrompt<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
|
|
|
9620
9642
|
run(metricFn: AxMetricFn): Promise<void>;
|
|
9621
9643
|
}
|
|
9622
9644
|
|
|
9623
|
-
type AxFieldProcessorProcess = (value: AxFieldValue, context?: Readonly<{
|
|
9624
|
-
values?: AxGenOut;
|
|
9625
|
-
sessionId?: string;
|
|
9626
|
-
done?: boolean;
|
|
9627
|
-
}>) => unknown | Promise<unknown>;
|
|
9628
|
-
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
|
|
9629
|
-
values?: AxGenOut;
|
|
9630
|
-
sessionId?: string;
|
|
9631
|
-
done?: boolean;
|
|
9632
|
-
}>) => unknown | Promise<unknown>;
|
|
9633
|
-
interface AxFieldProcessor {
|
|
9634
|
-
field: Readonly<AxField>;
|
|
9635
|
-
/**
|
|
9636
|
-
* Process the field value and return a new value (or undefined if no update is needed).
|
|
9637
|
-
* The returned value may be merged back into memory.
|
|
9638
|
-
* @param value - The current field value.
|
|
9639
|
-
* @param context - Additional context (e.g. memory and session id).
|
|
9640
|
-
*/
|
|
9641
|
-
process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess;
|
|
9642
|
-
}
|
|
9643
|
-
|
|
9644
9645
|
type AxFunctionResultFormatter = (result: unknown) => string;
|
|
9645
9646
|
declare const axGlobals: {
|
|
9646
9647
|
signatureStrict: boolean;
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Histogram, Counter, Gauge,
|
|
1
|
+
import { Histogram, Counter, Gauge, Context, Tracer, Span, Meter } from '@opentelemetry/api';
|
|
2
2
|
|
|
3
3
|
type AxMemoryMessageValue = Omit<AxChatRequest['chatPrompt'][number], 'role'> | Omit<AxChatResponseResult, 'index'>;
|
|
4
4
|
type AxMemoryData = {
|
|
@@ -1224,9 +1224,27 @@ declare class AxProgram<IN = any, OUT = any> implements AxUsable, AxTunable<IN,
|
|
|
1224
1224
|
protected applyLocalOptimizedComponents(updates: Readonly<Record<string, string>>): void;
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
|
-
type
|
|
1228
|
-
|
|
1229
|
-
|
|
1227
|
+
type AxFieldProcessorProcess = (value: AxFieldValue, context?: Readonly<{
|
|
1228
|
+
values?: AxGenOut;
|
|
1229
|
+
sessionId?: string;
|
|
1230
|
+
done?: boolean;
|
|
1231
|
+
}>) => unknown | Promise<unknown>;
|
|
1232
|
+
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
|
|
1233
|
+
values?: AxGenOut;
|
|
1234
|
+
sessionId?: string;
|
|
1235
|
+
done?: boolean;
|
|
1236
|
+
}>) => unknown | Promise<unknown>;
|
|
1237
|
+
interface AxFieldProcessor {
|
|
1238
|
+
field: Readonly<AxField>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Process the field value and return a new value (or undefined if no update is needed).
|
|
1241
|
+
* The returned value may be merged back into memory.
|
|
1242
|
+
* @param value - The current field value.
|
|
1243
|
+
* @param context - Additional context (e.g. memory and session id).
|
|
1244
|
+
*/
|
|
1245
|
+
process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1230
1248
|
interface AxResponseHandlerArgs<T> {
|
|
1231
1249
|
ai: Readonly<AxAIService>;
|
|
1232
1250
|
model?: string;
|
|
@@ -1243,6 +1261,10 @@ interface AxResponseHandlerArgs<T> {
|
|
|
1243
1261
|
debugPromptMetrics?: Readonly<AxPromptMetrics>;
|
|
1244
1262
|
onFunctionCall?: (call: Readonly<AxFunctionCallTrace>) => void | Promise<void>;
|
|
1245
1263
|
}
|
|
1264
|
+
|
|
1265
|
+
type AxGenerateResult<OUT> = OUT & {
|
|
1266
|
+
thought?: string;
|
|
1267
|
+
};
|
|
1246
1268
|
interface AxStreamingEvent<T> {
|
|
1247
1269
|
event: 'delta' | 'done' | 'error';
|
|
1248
1270
|
data: {
|
|
@@ -9620,27 +9642,6 @@ declare class AxTestPrompt<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
|
|
|
9620
9642
|
run(metricFn: AxMetricFn): Promise<void>;
|
|
9621
9643
|
}
|
|
9622
9644
|
|
|
9623
|
-
type AxFieldProcessorProcess = (value: AxFieldValue, context?: Readonly<{
|
|
9624
|
-
values?: AxGenOut;
|
|
9625
|
-
sessionId?: string;
|
|
9626
|
-
done?: boolean;
|
|
9627
|
-
}>) => unknown | Promise<unknown>;
|
|
9628
|
-
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
|
|
9629
|
-
values?: AxGenOut;
|
|
9630
|
-
sessionId?: string;
|
|
9631
|
-
done?: boolean;
|
|
9632
|
-
}>) => unknown | Promise<unknown>;
|
|
9633
|
-
interface AxFieldProcessor {
|
|
9634
|
-
field: Readonly<AxField>;
|
|
9635
|
-
/**
|
|
9636
|
-
* Process the field value and return a new value (or undefined if no update is needed).
|
|
9637
|
-
* The returned value may be merged back into memory.
|
|
9638
|
-
* @param value - The current field value.
|
|
9639
|
-
* @param context - Additional context (e.g. memory and session id).
|
|
9640
|
-
*/
|
|
9641
|
-
process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess;
|
|
9642
|
-
}
|
|
9643
|
-
|
|
9644
9645
|
type AxFunctionResultFormatter = (result: unknown) => string;
|
|
9645
9646
|
declare const axGlobals: {
|
|
9646
9647
|
signatureStrict: boolean;
|