API key
apiKey always wins. If omitted, the SDK reads EIGENPAL_API_KEY from the environment. If neither is set, the constructor throws.
Issue keys from the dashboard under Settings → API Keys. Keep them in env vars or a secret manager; never check them into git.
Self-hosted
Point at your own deployment viabaseUrl:
baseUrl overrides EIGENPAL_BASE_URL. Defaults to https://app.eigenpal.com.
Timeouts
timeoutMs applies per-request. The per-call signal (an AbortSignal) wins if you pass one.
For workflow runs longer than timeoutMs, prefer workflows.executions.runAndWait (client-side polling) over client.run(..., { waitForCompletion }) (server-side hold).
Custom headers
defaultHeaders is merged into every outgoing request. Useful for tracing, custom user-agent suffixes, or anything else your infrastructure needs:
Custom fetch
Inject a mock or alternative HTTP client for testing:TypeScript runtime
The package ships TypeScript source (./src/index.ts is the entry point). You’ll need a TypeScript-aware runtime: Bun, Deno, Node + ts-node / tsx, Next.js, Vite, Webpack with ts-loader, or any modern bundler. Plain node ./script.js won’t load it. That’s intentional: shipping TS-first keeps the source debuggable end-to-end.