@volatodev/core
v0.1.0-beta.0
Published
Wire format schemas and DSN parser shared between Volato SDKs and ingestion.
Downloads
42
Maintainers
Readme
@volatodev/core
Wire-format schemas and DSN parser for Volato — agent-native error tracking.
This is the contract layer shared between the Volato SDKs and the ingestion backend: the zod schemas that define the event payload, the DSN parser, and the source-map key derivation. It is byte-identical on both ends of the pipe, so an SDK never sends a shape the ingest can't validate.
Most people don't install this directly. It comes in as a dependency of
@volatodev/nextjs. Install it on its own only if you're building a custom integration against the Volato wire format.
Install
npm install @volatodev/coreWhat's in it
ErrorEventSchema/ErrorEvent— the event payload zod schema and its inferred type. Request bodies are never part of the schema by design.parseDSN(dsn)/ParsedDSN— parse a Volato DSN (https://<public_key>@<host>/<project_id>) into its parts; throwsInvalidDSNErroron a malformed value.dsnToIngestUrl(dsn)— derive the ingest endpoint from a DSN.- source-map key helpers — map a runtime stack frame to the key under which its sourcemap is stored.
import { parseDSN, ErrorEventSchema } from "@volatodev/core";
const dsn = parseDSN("https://[email protected]/proj_123");
const event = ErrorEventSchema.parse(payload);License
MIT © Wrenchy SASU
