---
title: "@elevasis/core"
description: The shared Zod contract layer for the Elevasis platform — organization model, entity schemas, knowledge graph, auth types, and test utilities. Used by both @elevasis/sdk and @elevasis/ui.
---

`@elevasis/core` is the shared contract layer for the Elevasis platform. It exports Zod schemas and TypeScript types that are used by `@elevasis/sdk`, `@elevasis/ui`, and the platform API itself. Installing it gives you the typed contracts without pulling in the full SDK runtime or React dependencies.

## Install

```bash
pnpm add @elevasis/core
```

The default export and most subpaths are browser-safe. No Node.js-specific runtime is required for the schema and type contracts.

## Published Subpaths

`@elevasis/core` ships six published subpaths:

- **`.`** (default) -- base schemas, shared utilities, and the root contract surface. Browser-safe.
- **`./auth`** -- auth contract types: session shapes, membership, role definitions, and WorkOS integration contracts.
- **`./organization-model`** -- the organization model (OM) schema: system definitions, resource metadata, and the org-model graph types used by the platform's AI routing layer.
- **`./entities`** -- entity schemas: typed definitions for leads, clients, deals, contacts, and other CRM-adjacent records.
- **`./knowledge`** -- knowledge graph schemas: document types, embedding metadata, and retrieval contract types.
- **`./test-utils`** -- Zod-based test fixtures and factory helpers. Not for production use.

Import a subpath directly:

```ts
import { orgModelSchema } from "@elevasis/core/organization-model";
import { entitySchema } from "@elevasis/core/entities";
import { knowledgeDocSchema } from "@elevasis/core/knowledge";
```

## Browser / Server Split

The default export and all named subpaths above are browser-safe -- they contain only Zod schemas, TypeScript types, and pure utility functions. There are no Node.js-specific APIs, filesystem access, or server-side dependencies in the published surface.

The broader workspace `exports` (~40 paths in `packages/core`) are internal to the monorepo and not part of the published surface. Only the six subpaths listed above are available to tenant projects.

## When To Use @elevasis/core Directly

Most tenant projects install `@elevasis/sdk`, which includes `@elevasis/core` as a dependency. You need `@elevasis/core` directly when:

- You are building a shared library or utility layer that needs the Elevasis types but not the SDK runtime.
- You are writing a server-side API that validates Elevasis contracts (entity schemas, org model, auth types) without deploying workflows.
- You are building a custom UI that needs the typed contracts alongside `@elevasis/ui` without the CLI or worker adapter surface.
- You need `./test-utils` for fixture generation in tests outside an SDK project.

## How It Composes With @elevasis/sdk

`@elevasis/sdk` re-exports the core contracts you need for day-to-day workflow and agent development. When you import step types, entity schemas, or org-model references from `@elevasis/sdk`, those types are sourced from `@elevasis/core` internally.

For advanced use cases -- writing custom validators, extending the org model, or building a server that enforces the same contracts the platform uses -- import from `@elevasis/core` subpaths directly rather than going through the SDK layer.

## Export Catalog

See [Export Catalog](exports.mdx) for a generated table of all published subpath exports derived from the reference manifest.
