@vectrion/shared
v0.1.1
Published
Shared utilities, error hierarchy, and helpers for the Vectrion AI runtime SDK
Maintainers
Readme
@vectrion/shared
Shared utilities, custom error hierarchy, and helpers used across all Vectrion packages.
š Part of the Vectrion SDK. View the live documentation and architectural specifications at vectrion.vercel.app.
Installation
npm install @vectrion/sharedError Hierarchy
import {
VectrionError,
VectrionProviderError,
VectrionRouterError,
VectrionValidationError,
} from "@vectrion/shared";
// Base error
throw new VectrionError("Something went wrong");
// Provider-specific error
throw new VectrionProviderError("API rate limited", "google");
// Router error with attempted providers
throw new VectrionRouterError("All providers failed", ["google", "ollama"]);
// Validation error with Zod issues
throw new VectrionValidationError("Schema mismatch", zodIssues);Utilities
JsonlWriterā Async JSONL file writer for observability traces