@4players/odin-common
v12.0.0
Published
Commonly used type definitions and utility functions across ODIN web projects
Readme
@4players/odin-common
A collection of commonly used type definitions and schemas across ODIN web projects.
Entrypoints
The package is split into three entrypoints:
@4players/odin-common
Lightweight utilities with no heavy dependencies. Includes logging, a Result type, video
codec helpers, async primitives (sleep, task queues, promise racing), base64/byte array encoding,
UUID generation, environment detection, type guards, URL helpers and the backend plugin API types.
import { Logger, LogFilter } from '@4players/odin-common';@4players/odin-common/api
Zod-based schemas for the ODIN Voice protocol (rooms, peers, media, tokens, channels) and RPC command/notification definitions. Importing from this entrypoint will pull in Zod.
import { TokenClaims, TokenClaimsSchema } from '@4players/odin-common/api';@4players/odin-common/zod
Re-exports the Zod library for consumers that need to create their own schemas without adding a separate Zod dependency.
import { z } from '@4players/odin-common/zod';Troubleshooting
Contact us through the listed methods below to receive answers to your questions and learn more about ODIN.
Discord
Join our official Discord server to chat with us directly and become a part of the 4Players ODIN community.
Have a quick question? Tweet us at @ODIN4Players and we’ll help you resolve any issues.
Don’t use Discord or Twitter? Send us an email and we’ll get back to you as soon as possible.
Dependency maintenance
Use npm 12 or newer when updating dependencies so both the ten-day release
age and the @4players/* exception are enforced. Check npm --version and
npm config get min-release-age before installing. Keep registry credentials
in your user configuration or CI secrets, outside tracked policy files.
Select stable releases at least ten days old, including transitive dependencies.
First-party @4players/* packages are exempt; their third-party dependencies
are not. Keep TypeScript on 6.x and align shared versions across the ODIN
repositories where peer requirements permit. Preserve and review lockfiles;
existing locked versions are not evidence of release-age eligibility.
Install with npm install --min-release-age=10 --min-release-age-exclude='@4players/*'.
Use npm ci for reproducible installs from the reviewed lockfile.
Use Deno 2.9.7 or newer; minimumDependencyAge in deno.json applies the
ten-day policy to npm and JSR dependencies across the workspace. Preserve
deno.lock; use --frozen-lockfile in reproducible builds. The npm artifact
build also enforces the npm policy explicitly.

