@axlsdk/axl 0.12.0 → 0.13.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/dist/index.d.cts CHANGED
@@ -1377,6 +1377,11 @@ declare class AxlRuntime extends EventEmitter {
1377
1377
  createContext(options?: CreateContextOptions): WorkflowContext;
1378
1378
  /** Register a custom provider instance. */
1379
1379
  registerProvider(name: string, provider: Provider): void;
1380
+ /** Resolve a provider:model URI to a Provider instance and model name. */
1381
+ resolveProvider(uri: string): {
1382
+ provider: Provider;
1383
+ model: string;
1384
+ };
1380
1385
  /** Execute a workflow and return the result. */
1381
1386
  execute(name: string, input: unknown, options?: ExecuteOptions): Promise<unknown>;
1382
1387
  /** Execute a workflow and return a stream. */
package/dist/index.d.ts CHANGED
@@ -1377,6 +1377,11 @@ declare class AxlRuntime extends EventEmitter {
1377
1377
  createContext(options?: CreateContextOptions): WorkflowContext;
1378
1378
  /** Register a custom provider instance. */
1379
1379
  registerProvider(name: string, provider: Provider): void;
1380
+ /** Resolve a provider:model URI to a Provider instance and model name. */
1381
+ resolveProvider(uri: string): {
1382
+ provider: Provider;
1383
+ model: string;
1384
+ };
1380
1385
  /** Execute a workflow and return the result. */
1381
1386
  execute(name: string, input: unknown, options?: ExecuteOptions): Promise<unknown>;
1382
1387
  /** Execute a workflow and return a stream. */
package/dist/index.js CHANGED
@@ -5389,7 +5389,7 @@ var AxlRuntime = class extends EventEmitter2 {
5389
5389
  });
5390
5390
  return { output: result2.output, cost: result2.cost ?? trackedCost };
5391
5391
  };
5392
- result = await runEvalFn(entry.config, wrappedExecuteFn, void 0, this);
5392
+ result = await runEvalFn(entry.config, wrappedExecuteFn, this);
5393
5393
  } else {
5394
5394
  result = await this.eval(
5395
5395
  entry.config
@@ -5468,6 +5468,10 @@ var AxlRuntime = class extends EventEmitter2 {
5468
5468
  registerProvider(name, provider) {
5469
5469
  this.providerRegistry.registerInstance(name, provider);
5470
5470
  }
5471
+ /** Resolve a provider:model URI to a Provider instance and model name. */
5472
+ resolveProvider(uri) {
5473
+ return this.providerRegistry.resolve(uri, this.config);
5474
+ }
5471
5475
  /** Execute a workflow and return the result. */
5472
5476
  async execute(name, input, options) {
5473
5477
  const workflow2 = this.workflows.get(name);
@@ -5924,7 +5928,7 @@ var AxlRuntime = class extends EventEmitter2 {
5924
5928
  });
5925
5929
  return { output: result, cost };
5926
5930
  };
5927
- return runEvalFn(config, executeWorkflow, void 0, this);
5931
+ return runEvalFn(config, executeWorkflow, this);
5928
5932
  }
5929
5933
  /**
5930
5934
  * Compare two evaluation results to detect regressions and improvements.