1/** 2 * @factory/shared — the shared domain layer for AI Software Factory. 3 * 4 * Source-first package: `main`/`types` point at `src/index.ts` so apps can 5 * import without a build step (a build is added at Phase 0 completion). 6 * 7 * Contents: 8 * - {@link ./errors} — canonical ApiError model + error codes 9 * - {@link ./env} — zod env schemas + loader (no dotenv dependency) 10 * - {@link ./positions} — fractional (LexoRank-style) position engine 11 * - {@link ./dto} — FE/BE shared zod schemas (auth, page, block, database, …) 12 * - {@link ./events} — domain event catalog + envelope + id generator 13 * - {@link ./constants} — limits, token lifetimes, rate limits, color palette 14 * - {@link ./mentions} — TASK-0094 mention-token parsing (shared wire format) 15 * - {@link ./automation} — Phase-11 automation contracts (schemas, metadata, 16 * cron, status machine, loop guard, webhook signature, interpolation) 17 * - {@link ./realtime/notification-policy} — notification types + policy 18 * - {@link ./realtime/notification-prefs} — per-user notification prefs 19 * 20 * Node10 consumers (the API): the API resolves `@factory/shared` under `node10` 21 * module resolution, which ignores the package.json `exports` map and can only 22 * reach the package ROOT (`main` → `src/index.ts`). The TASK-0094 contracts 23 * below are therefore re-exported at the root so the API can import them; 24 * NodeNext/bundler consumers (realtime, web, worker) may import the same 25 * modules either via the root or their canonical `./realtime/…` subpaths. 26 */ 27 28export * from "./errors.js"; 29export * from "./env.js"; 30export * from "./forms.js"; 31export * from "./positions.js"; 32export * from "./presence.js"; 33export * from "./events.js"; 34export * from "./events/catalog.js"; 35// TASK-0133: the org audit surface — the catalog (20 canonical events), the 36// org-scope where-builder (shared by the API viewer AND the worker), and the 37// RFC-4180 CSV renderer. Node10 consumers (the API) resolve only the root 38// barrel, so these are re-exported here (subpath exports stay canonical for 39// NodeNext consumers — the worker). 40export * from "./events/audit-catalog.js"; 41export * from "./events/audit-scope.js"; 42export * from "./events/audit-csv.js"; 43export * from "./crypto.js"; 44export * from "./webhook-delivery.js"; 45export * from "./constants.js"; 46export * from "./dto/index.js"; 47export * from "./mentions.js"; 48export * from "./automation.js"; 49export * from "./net.js"; 50export * from "./markdown.js"; 51export * from "./template-vars.js"; 52export * from "./builtin-templates.js"; 53export * from "./version-diff.js"; 54export * from "./version-retention.js"; 55export * from "./security-headers.js"; 56export * from "./realtime/notification-policy.js"; 57export * from "./realtime/notification-prefs.js"; 58