# @elevasis/core

Published browser-safe shared contracts for the Elevasis platform.

This package is the source of truth for shared types, schemas, and contract helpers that are safe to consume from apps and other packages. In this repo the source package is named `@repo/core`, but these docs describe the published `@elevasis/core` surface.

## Import Rules

- Use `@elevasis/core` (root export) for browser-safe shared types and schemas.
- Use `@elevasis/core/organization-model` for the semantic contract layer.
- Use `@elevasis/core/entities` for the published base entity contracts.
- Use `@elevasis/core/test-utils` for shared test fixtures, mocks, and test helpers.
- Paths like `@elevasis/core/server` and `@elevasis/core/platform` are internal monorepo paths (`@repo/core/...`) and are NOT available to external consumers.

## Published Surface Groups

The published `@elevasis/core` npm package exposes these subpaths:

- `.` (`@elevasis/core`) - browser-safe shared types, schemas, and constants.
- `./organization-model` (`@elevasis/core/organization-model`) - the semantic contract layer for CRM, lead gen, delivery, features, branding, and navigation.
- `./entities` (`@elevasis/core/entities`) - published base entity contracts generic over project metadata extensions.
- `./test-utils` (`@elevasis/core/test-utils`) - test fixtures, mocks, and helpers for downstream automated tests.

Within the monorepo, the internal `@repo/core` package exposes additional subpaths for use by `apps/` and other packages:

- `@repo/core/server` - Node.js-only helpers and services.
- `@repo/core/platform` - shared constants, utilities, registry, SSE, and API types.
- `@repo/core/auth` - multi-tenancy types for organizations, users, memberships, invitations, and credentials.
- `@repo/core/execution` - workflow, agent, scheduler, and execution-interface contracts.
- `@repo/core/commands` - command queue types and schemas.
- `@repo/core/operations` - sessions, notifications, observability, activities, triggers, and debug logs.
- `@repo/core/supabase` - generated database types and helpers.
- `@repo/core/integrations/...` - OAuth and credential contracts.
- `@repo/core/projects/api-schemas` - project management request and response schemas.
- `@repo/core/content` - published content metadata types.
- `@repo/core/test-utils` - source of the published test fixtures and mocks surface.

Other `@repo/core/*` subpaths remain monorepo-only unless they are explicitly listed above in the published `@elevasis/core` surface.

## When To Read Deeper

- For the organization model contract, start with [organization-model/README.md](./organization-model/README.md).
- For test utilities, read [test-utils/README.md](./test-utils/README.md).
- For credentials, read [auth/multi-tenancy/credentials/README.md](./auth/multi-tenancy/credentials/README.md) if you are working in source. The runtime helpers are server-only.
