@wix/evalforge-evaluator 0.179.0 → 0.180.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.
@@ -54,6 +54,26 @@ export interface ApiClientOptions {
54
54
  */
55
55
  httpClient?: IHttpClient;
56
56
  }
57
+ /**
58
+ * Resolve the `baseURL` for the ambassador `HttpClient` from the configured
59
+ * `serverUrl`.
60
+ *
61
+ * The ambassador request factories emit fully-qualified gateway paths that
62
+ * already include the `/_api/evalforge-backend` prefix (e.g.
63
+ * `/_api/evalforge-backend/v1/projects/{id}/eval-runs/{id}`). `serverUrl` also
64
+ * carries that prefix — it is the REST base used by `putJson`/trace-push — so
65
+ * using it directly as the HttpClient `baseURL` duplicates the prefix
66
+ * (`.../_api/evalforge-backend/_api/evalforge-backend/v1/...`) and every
67
+ * ambassador call 404s: the run starts but the evaluator can't fetch its data,
68
+ * so the eval fails with no results.
69
+ *
70
+ * Returning the origin only keeps the ambassador-emitted path intact while the
71
+ * REST writes keep using the full `serverUrl`. Origin-only inputs (the local
72
+ * in-cluster `http://host:port`) are returned unchanged.
73
+ *
74
+ * @param serverUrl - Base URL of the server (e.g., "https://bo.wix.com/_api/evalforge-backend")
75
+ */
76
+ export declare function resolveAmbassadorBaseUrl(serverUrl: string): string;
57
77
  /**
58
78
  * Create an API client for the eval server.
59
79
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/evalforge-evaluator",
3
- "version": "0.179.0",
3
+ "version": "0.180.0",
4
4
  "description": "EvalForge Evaluator",
5
5
  "bin": "./build/index.js",
6
6
  "files": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "evalforge-evaluator"
72
72
  }
73
73
  },
74
- "falconPackageHash": "ec6cd7242df122dacec1fb89f46734131adb2f8a98afb93362b7bef7"
74
+ "falconPackageHash": "5ce316680bd58179748e28f277b656cd718bb6b1e7272af06059a26d"
75
75
  }