fetch and globalThis.
Status (2026-09-06): implemented and typechecks in the platform repo, currently at
0.0.1. Publishing to a public npm scope is in progress — until then, install from the internal registry (or vendor the packages/nora-agents source if you have platform repo access). The API is stable — swap the install URL when the public publish lands without changes.Install
Import
createClient(opts)— factory that returns aNoraClient.NoraClient— the class itself, if you’d rathernewit up.- Types:
ClientOptions,RunResult,Improvement,Change,Logger,LogEvent. - Error classes:
NoraError,NoraAuthError,NoraRequestError,NoraAccessError,NoraProviderError,NoraPlatformError— see Errors. - Trace helpers:
traceRef,withTrace,currentTrace,injectHeaders,extractTrace,TRACE_HEADER.
Prerequisites
- Node 18+ (or a runtime with global
fetch). No polyfill needed. - ESM only — the package ships
"type": "module". If your project is CommonJS, use dynamicimport()or convert your entrypoint to ESM. - Server-side only — the client refuses to initialise in the browser (PAT / trigger-secret leakage guard). See Overview · server-side only.
Version pinning
Pin an exact version in production so a re-install doesn’t drift:Next
- Auth — set up your PAT and trigger secret, and pick the right scopes.
- Client options — the full
ClientOptionsreference (base URL, retries, logging, custom fetch, …).