@eigenpal/sdk 0.6.16 → 0.6.17
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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/client.ts +4 -4
- package/src/errors.ts +1 -1
- package/src/generated/client.gen.ts +1 -1
- package/src/generated/types.gen.ts +1 -1
- package/src/runtime-config.ts +1 -1
- package/src/telemetry.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ npm i @eigenpal/sdk
|
|
|
15
15
|
|
|
16
16
|
Requires a TypeScript-aware runtime: Bun, Deno, Node 22+ (native TS), `tsx`, Next.js, Vite, or any modern bundler. Plain `node script.js` won't work — see [Configuration](./docs/configuration.md#typescript-runtime).
|
|
17
17
|
|
|
18
|
-
Get an API key at **
|
|
18
|
+
Get an API key at **studio.eigenpal.com → Settings → API Keys**.
|
|
19
19
|
|
|
20
20
|
## Quick start
|
|
21
21
|
|
|
@@ -53,7 +53,7 @@ const client = new EigenpalClient({
|
|
|
53
53
|
});
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
`baseUrl` likewise wins over the `EIGENPAL_BASE_URL` env fallback. Defaults to `https://
|
|
56
|
+
`baseUrl` likewise wins over the `EIGENPAL_BASE_URL` env fallback. Defaults to `https://studio.eigenpal.com` (the hosted cloud).
|
|
57
57
|
|
|
58
58
|
## Starting runs
|
|
59
59
|
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface EigenpalOptions {
|
|
|
21
21
|
/**
|
|
22
22
|
* Override the API base URL.
|
|
23
23
|
*
|
|
24
|
-
* Defaults to `EIGENPAL_BASE_URL` if set, otherwise `https://
|
|
24
|
+
* Defaults to `EIGENPAL_BASE_URL` if set, otherwise `https://studio.eigenpal.com`.
|
|
25
25
|
*/
|
|
26
26
|
baseUrl?: string;
|
|
27
27
|
/** Per-request timeout in milliseconds. Defaults to 60_000. */
|
|
@@ -34,7 +34,7 @@ export interface EigenpalOptions {
|
|
|
34
34
|
defaultHeaders?: Record<string, string>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
const DEFAULT_BASE_URL = 'https://
|
|
37
|
+
const DEFAULT_BASE_URL = 'https://studio.eigenpal.com';
|
|
38
38
|
const DEFAULT_TIMEOUT_MS = 60_000;
|
|
39
39
|
const DEFAULT_MAX_RETRIES = 3;
|
|
40
40
|
|
|
@@ -266,7 +266,7 @@ export class EigenpalClient {
|
|
|
266
266
|
const response = result.response;
|
|
267
267
|
const status = response?.status ?? 0;
|
|
268
268
|
// Guard against misconfigured `baseUrl` pointed at an HTML host
|
|
269
|
-
// (e.g. `https://eigenpal.com` instead of `https://
|
|
269
|
+
// (e.g. `https://eigenpal.com` instead of `https://studio.eigenpal.com`).
|
|
270
270
|
// Fires for both 2xx and non-2xx so a 4xx with HTML surfaces a typed
|
|
271
271
|
// baseUrl-pointing error instead of a misleading NotFoundError or a
|
|
272
272
|
// downstream JSON-parse crash. 0.4.10 shipped with this footgun.
|
|
@@ -368,7 +368,7 @@ function assertJsonResponse(response: Response): void {
|
|
|
368
368
|
`Expected a JSON response from the API but got Content-Type "${contentType}". ` +
|
|
369
369
|
`This usually means \`baseUrl\` points at a non-API host (e.g. the marketing site or ` +
|
|
370
370
|
`a misconfigured proxy). Set \`baseUrl\` to your EigenPal instance root, ` +
|
|
371
|
-
`e.g. "https://
|
|
371
|
+
`e.g. "https://studio.eigenpal.com".`,
|
|
372
372
|
{ status: response.status }
|
|
373
373
|
);
|
|
374
374
|
}
|
package/src/errors.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class EigenpalAuthError extends EigenpalError {
|
|
|
27
27
|
constructor(envelope?: ApiErrorEnvelope) {
|
|
28
28
|
super(
|
|
29
29
|
envelope?.issues?.[0]?.message ??
|
|
30
|
-
'Invalid or missing API key. Generate one at
|
|
30
|
+
'Invalid or missing API key. Generate one at studio.eigenpal.com → Settings → API Keys; ' +
|
|
31
31
|
'pass it as `new EigenpalClient({ apiKey })` or set EIGENPAL_API_KEY.',
|
|
32
32
|
{ status: 401, envelope }
|
|
33
33
|
);
|
|
@@ -18,5 +18,5 @@ export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
|
|
|
18
18
|
) => Config<Required<ClientOptions> & T>;
|
|
19
19
|
|
|
20
20
|
export const client = createClient(
|
|
21
|
-
createClientConfig(createConfig<ClientOptions2>({ baseUrl: 'https://
|
|
21
|
+
createClientConfig(createConfig<ClientOptions2>({ baseUrl: 'https://studio.eigenpal.com' }))
|
|
22
22
|
);
|
package/src/runtime-config.ts
CHANGED
|
@@ -11,5 +11,5 @@ import type { CreateClientConfig } from './generated/client.gen';
|
|
|
11
11
|
*/
|
|
12
12
|
export const createClientConfig: CreateClientConfig = (config) => ({
|
|
13
13
|
...config,
|
|
14
|
-
baseUrl: config?.baseUrl ?? 'https://
|
|
14
|
+
baseUrl: config?.baseUrl ?? 'https://studio.eigenpal.com',
|
|
15
15
|
});
|
package/src/telemetry.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
export const SDK_LANGUAGE = 'typescript';
|
|
20
20
|
// Rewritten at publish time by scripts/render-sdk-versions.sh.
|
|
21
21
|
// Keep this string literal exactly stable — sed matches on it.
|
|
22
|
-
export const SDK_VERSION = '0.6.
|
|
22
|
+
export const SDK_VERSION = '0.6.17';
|
|
23
23
|
|
|
24
24
|
function detectRuntime(): string {
|
|
25
25
|
const g = globalThis as unknown as {
|