@axlsdk/axl 0.10.1 → 0.10.2
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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1296,7 +1296,7 @@ declare class AxlRuntime extends EventEmitter {
|
|
|
1296
1296
|
* An optional `executeWorkflow` function can override the default behavior
|
|
1297
1297
|
* of calling `runtime.execute()`.
|
|
1298
1298
|
*/
|
|
1299
|
-
registerEval(name: string, config: unknown, executeWorkflow?: (input: unknown) => Promise<{
|
|
1299
|
+
registerEval(name: string, config: unknown, executeWorkflow?: (input: unknown, runtime?: AxlRuntime) => Promise<{
|
|
1300
1300
|
output: unknown;
|
|
1301
1301
|
cost?: number;
|
|
1302
1302
|
}>): void;
|
|
@@ -1310,7 +1310,7 @@ declare class AxlRuntime extends EventEmitter {
|
|
|
1310
1310
|
/** Get a registered eval config by name. */
|
|
1311
1311
|
getRegisteredEval(name: string): {
|
|
1312
1312
|
config: unknown;
|
|
1313
|
-
executeWorkflow?: (input: unknown) => Promise<{
|
|
1313
|
+
executeWorkflow?: (input: unknown, runtime?: AxlRuntime) => Promise<{
|
|
1314
1314
|
output: unknown;
|
|
1315
1315
|
cost?: number;
|
|
1316
1316
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1296,7 +1296,7 @@ declare class AxlRuntime extends EventEmitter {
|
|
|
1296
1296
|
* An optional `executeWorkflow` function can override the default behavior
|
|
1297
1297
|
* of calling `runtime.execute()`.
|
|
1298
1298
|
*/
|
|
1299
|
-
registerEval(name: string, config: unknown, executeWorkflow?: (input: unknown) => Promise<{
|
|
1299
|
+
registerEval(name: string, config: unknown, executeWorkflow?: (input: unknown, runtime?: AxlRuntime) => Promise<{
|
|
1300
1300
|
output: unknown;
|
|
1301
1301
|
cost?: number;
|
|
1302
1302
|
}>): void;
|
|
@@ -1310,7 +1310,7 @@ declare class AxlRuntime extends EventEmitter {
|
|
|
1310
1310
|
/** Get a registered eval config by name. */
|
|
1311
1311
|
getRegisteredEval(name: string): {
|
|
1312
1312
|
config: unknown;
|
|
1313
|
-
executeWorkflow?: (input: unknown) => Promise<{
|
|
1313
|
+
executeWorkflow?: (input: unknown, runtime?: AxlRuntime) => Promise<{
|
|
1314
1314
|
output: unknown;
|
|
1315
1315
|
cost?: number;
|
|
1316
1316
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -5240,7 +5240,8 @@ var AxlRuntime = class extends EventEmitter2 {
|
|
|
5240
5240
|
"axl-eval is required for AxlRuntime.runRegisteredEval(). Install it with: npm install @axlsdk/eval"
|
|
5241
5241
|
);
|
|
5242
5242
|
}
|
|
5243
|
-
|
|
5243
|
+
const executeFn = entry.executeWorkflow;
|
|
5244
|
+
return runEvalFn(entry.config, executeFn, void 0, this);
|
|
5244
5245
|
}
|
|
5245
5246
|
return this.eval(
|
|
5246
5247
|
entry.config
|
|
@@ -5666,7 +5667,7 @@ var AxlRuntime = class extends EventEmitter2 {
|
|
|
5666
5667
|
this.off("trace", costListener);
|
|
5667
5668
|
}
|
|
5668
5669
|
};
|
|
5669
|
-
return runEval(config, executeWorkflow);
|
|
5670
|
+
return runEval(config, executeWorkflow, void 0, this);
|
|
5670
5671
|
}
|
|
5671
5672
|
/**
|
|
5672
5673
|
* Compare two evaluation results to detect regressions and improvements.
|