/**
 * Entity validation schemas for Studiograph
 *
 * 20 canonical entity types post-redesign:
 * - CRM (4): person, organization, position, deal
 * - PM (4): project, event, task, deliverable
 * - KM authored (7): document, deck, artifact, publication, case-study, service, skill
 * - Capture (4): note, reference, dataset, material
 * - System (1): comment
 *
 * The `asset` entity type was retired (asset-as-embed / Phase F); its name is
 * reserved (see RESERVED_ENTITY_TYPES) so it can never be re-created.
 *
 * "An object earns first-class entity status only if it earns its own view
 * behavior across the six primary views (List, Gallery, Kanban, Calendar,
 * Timeline, Graph). Objects that are mostly useful because they're attached
 * to something else become categories, fields, or inline blocks — not types."
 *
 * Workspaces can define additional custom types via schema_extensions.
 */
import { z } from 'zod';
/**
 * The entity date vocabulary — exactly two fields, product-wide:
 *
 *   `date`        the one salient date an entity carries. Universal (base),
 *                 so every type can have it. Its *meaning* is type-specific
 *                 (a task's due date, a deal's close, a project's end) and is
 *                 expressed only through the per-type `label` below — the
 *                 field name and storage stay generic. When a range is
 *                 present, this is its end / anchor.
 *   `start_date`  optional earlier bound, declared only on the five duration
 *                 types (project, event, task, deliverable, deal). The range
 *                 is [start_date, date].
 *
 * Both validate as YYYY-MM-DD. `created_at` / `updated_at` are ISO system
 * timestamps and are deliberately NOT part of this vocabulary.
 *
 * `role` + `label` ride on the schema via `.meta()` and surface through
 * `describeZodObject` → `get_entity_schema` + `/api/schema`, so the agent,
 * the property panel, and every date-aware view read them from one place.
 */
export type DateRole = 'primary' | 'start';
/**
 * Base entity schema - all entities have these fields
 */
export declare const EntityBaseSchema: z.ZodObject<{
    entity_type: z.ZodString;
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
export type EntityBase = z.infer<typeof EntityBaseSchema>;
/**
 * Person — team members, client contacts, any individual.
 *
 * `category` and `status` are split: category is the relationship type
 * (employee/contractor/client/partner) and status is whether that
 * relationship is current or historical. Mirrors organization.
 */
export declare const PersonSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"person">;
    name: z.ZodString;
    role: z.ZodOptional<z.ZodString>;
    category: z.ZodOptional<z.ZodEnum<{
        employee: "employee";
        contractor: "contractor";
        client: "client";
        partner: "partner";
        other: "other";
    }>>;
    status: z.ZodOptional<z.ZodEnum<{
        current: "current";
        former: "former";
    }>>;
    email: z.ZodOptional<z.ZodString>;
    location: z.ZodOptional<z.ZodString>;
    organization: z.ZodOptional<z.ZodString>;
    user_handle: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Person = z.infer<typeof PersonSchema>;
/**
 * Organization — clients, vendors, partners, prospects, professional
 * associations.
 */
export declare const OrganizationSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"organization">;
    name: z.ZodString;
    category: z.ZodOptional<z.ZodEnum<{
        client: "client";
        partner: "partner";
        other: "other";
        vendor: "vendor";
        prospect: "prospect";
        "professional-association": "professional-association";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        former: "former";
        active: "active";
        dormant: "dormant";
    }>>;
    industry: z.ZodOptional<z.ZodString>;
    website: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Organization = z.infer<typeof OrganizationSchema>;
/**
 * Position — a position spec or open job. Renamed from `role` to avoid
 * collision with `person.role` (the free-text title field). Reframes from
 * "the person's seat" to "the spec for a position."
 */
export declare const PositionSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"position">;
    name: z.ZodString;
    department: z.ZodOptional<z.ZodString>;
    category: z.ZodOptional<z.ZodEnum<{
        contractor: "contractor";
        staff: "staff";
        intern: "intern";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        draft: "draft";
        open: "open";
        filled: "filled";
        closed: "closed";
    }>>;
}, z.core.$loose>;
export type Position = z.infer<typeof PositionSchema>;
/**
 * Deal — pre-project opportunity in the sales pipeline.
 */
export declare const DealSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"deal">;
    name: z.ZodString;
    client: z.ZodOptional<z.ZodString>;
    contact: z.ZodOptional<z.ZodString>;
    stage: z.ZodDefault<z.ZodEnum<{
        qualification: "qualification";
        scoping: "scoping";
        proposal: "proposal";
        negotiation: "negotiation";
        "pending-signature": "pending-signature";
        won: "won";
        lost: "lost";
    }>>;
    deal_value: z.ZodOptional<z.ZodNumber>;
    start_date: z.ZodOptional<z.ZodString>;
    date: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Deal = z.infer<typeof DealSchema>;
/**
 * Project — a client engagement or internal initiative.
 *
 * `services` is a wikilink array to `service` entities the project includes
 * (replaces the previous `practice_area` concept).
 */
export declare const ProjectSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"project">;
    name: z.ZodString;
    category: z.ZodOptional<z.ZodEnum<{
        client: "client";
        internal: "internal";
    }>>;
    project_type: z.ZodOptional<z.ZodString>;
    client: z.ZodOptional<z.ZodString>;
    services: z.ZodOptional<z.ZodArray<z.ZodString>>;
    status: z.ZodOptional<z.ZodEnum<{
        planning: "planning";
        "in-progress": "in-progress";
        paused: "paused";
        complete: "complete";
        archived: "archived";
    }>>;
    start_date: z.ZodOptional<z.ZodString>;
    date: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Project = z.infer<typeof ProjectSchema>;
/**
 * Event — any scheduled gathering (meeting, call, workshop, review, etc.).
 * `type` discriminates the kind of gathering for grouping/filtering. The
 * default `meeting` preserves semantics for legacy meeting captures.
 *
 * Note: `deadline` is intentionally NOT a `type` value — deadlines are
 * `task` entries with a `date` (the due date). Events are things you attend.
 */
export declare const EVENT_TYPES: readonly ["meeting", "call", "review", "workshop", "presentation", "conference", "other"];
export type EventType = (typeof EVENT_TYPES)[number];
export declare const EventSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"event">;
    name: z.ZodString;
    type: z.ZodDefault<z.ZodEnum<{
        other: "other";
        meeting: "meeting";
        call: "call";
        review: "review";
        workshop: "workshop";
        presentation: "presentation";
        conference: "conference";
    }>>;
    attendees: z.ZodOptional<z.ZodArray<z.ZodString>>;
    location: z.ZodOptional<z.ZodString>;
    start_date: z.ZodOptional<z.ZodString>;
    date: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Event = z.infer<typeof EventSchema>;
/**
 * Task — lightweight action items and to-dos.
 *
 * `phase` is intentionally free-text (not a separate entity type or workspace
 * config list). Phases vary widely across project types; the Timeline view
 * auto-discovers distinct values per-project for grouping.
 */
export declare const TaskSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"task">;
    name: z.ZodString;
    status: z.ZodDefault<z.ZodEnum<{
        "in-progress": "in-progress";
        backlog: "backlog";
        todo: "todo";
        "in-review": "in-review";
        done: "done";
        cancelled: "cancelled";
    }>>;
    priority: z.ZodOptional<z.ZodEnum<{
        low: "low";
        medium: "medium";
        high: "high";
        urgent: "urgent";
    }>>;
    assignee: z.ZodOptional<z.ZodString>;
    phase: z.ZodOptional<z.ZodString>;
    start_date: z.ZodOptional<z.ZodString>;
    date: z.ZodOptional<z.ZodString>;
    completed_at: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Task = z.infer<typeof TaskSchema>;
/**
 * Deliverable — a scoped output promised to a client.
 */
export declare const DeliverableSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"deliverable">;
    name: z.ZodString;
    project: z.ZodOptional<z.ZodString>;
    status: z.ZodDefault<z.ZodEnum<{
        "in-progress": "in-progress";
        planned: "planned";
        delivered: "delivered";
        accepted: "accepted";
        rejected: "rejected";
    }>>;
    phase: z.ZodOptional<z.ZodString>;
    start_date: z.ZodOptional<z.ZodString>;
    date: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Deliverable = z.infer<typeof DeliverableSchema>;
/**
 * Document — any authored document. The `guideline` category absorbs the
 * former standalone `guideline` entity type.
 */
export declare const DocumentSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"document">;
    name: z.ZodString;
    category: z.ZodOptional<z.ZodEnum<{
        other: "other";
        proposal: "proposal";
        contract: "contract";
        brief: "brief";
        memo: "memo";
        report: "report";
        template: "template";
        guideline: "guideline";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        draft: "draft";
        archived: "archived";
        review: "review";
        final: "final";
    }>>;
}, z.core.$loose>;
export type Document = z.infer<typeof DocumentSchema>;
/**
 * Deck — a slide deck or presentation. Stays its own type alongside
 * `document` because of the dedicated slides renderer + agent skills that
 * pattern-match on `entity_type === 'deck'`.
 */
export declare const DeckSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"deck">;
    name: z.ZodString;
    audience: z.ZodOptional<z.ZodEnum<{
        external: "external";
        client: "client";
        other: "other";
        team: "team";
        board: "board";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        draft: "draft";
        archived: "archived";
        review: "review";
        final: "final";
    }>>;
}, z.core.$loose>;
export type Deck = z.infer<typeof DeckSchema>;
/**
 * Artifact — a persisted Artifact Canvas bundle. The markdown body stores the
 * serialized ArtifactBundle JSON; frontmatter carries scannable metadata for
 * lists, filters, and the property panel.
 */
export declare const ArtifactSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"artifact">;
    name: z.ZodString;
    kind: z.ZodDefault<z.ZodEnum<{
        custom: "custom";
        html: "html";
        document: "document";
        slides: "slides";
        social: "social";
        app: "app";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        draft: "draft";
        archived: "archived";
        review: "review";
        final: "final";
    }>>;
    viewport_width: z.ZodOptional<z.ZodNumber>;
    viewport_height: z.ZodOptional<z.ZodNumber>;
    viewport_mode: z.ZodOptional<z.ZodEnum<{
        fixed: "fixed";
        responsive: "responsive";
        paged: "paged";
    }>>;
}, z.core.$loose>;
export type Artifact = z.infer<typeof ArtifactSchema>;
/**
 * Publication — authored content published externally.
 */
export declare const PublicationSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"publication">;
    name: z.ZodString;
    platform: z.ZodOptional<z.ZodString>;
    status: z.ZodDefault<z.ZodEnum<{
        draft: "draft";
        review: "review";
        scheduled: "scheduled";
        published: "published";
    }>>;
    url: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Publication = z.infer<typeof PublicationSchema>;
/**
 * Case Study — portfolio narratives for completed projects.
 */
export declare const CaseStudySchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"case-study">;
    name: z.ZodString;
    client: z.ZodOptional<z.ZodString>;
    services: z.ZodOptional<z.ZodArray<z.ZodString>>;
    date_range: z.ZodOptional<z.ZodString>;
    status: z.ZodDefault<z.ZodEnum<{
        draft: "draft";
        review: "review";
        final: "final";
        published: "published";
    }>>;
}, z.core.$loose>;
export type CaseStudy = z.infer<typeof CaseStudySchema>;
/**
 * Service — the firm's offerings + methodologies. Replaces the old
 * `process` type and absorbs `practice-area` (top-level services replace
 * what practice-area was trying to be).
 *
 * `sprint` links a granular service to its parent service (top-level
 * services have none). `depends_on` / `enables` form a directed graph
 * across the service set — the Graph view's most valuable use case.
 */
export declare const ServiceSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"service">;
    name: z.ZodString;
    service_id: z.ZodOptional<z.ZodString>;
    sprint: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    enables: z.ZodOptional<z.ZodArray<z.ZodString>>;
    deliverables: z.ZodOptional<z.ZodArray<z.ZodString>>;
    status: z.ZodDefault<z.ZodEnum<{
        offered: "offered";
        "in-development": "in-development";
        retired: "retired";
    }>>;
}, z.core.$loose>;
export type Service = z.infer<typeof ServiceSchema>;
/**
 * Skill — prompt-level instructions the agent can load to teach it how to
 * do a specific job. The entity id is the skill name used by `load_skill`.
 * The body markdown is the instruction content.
 *
 * `applies_to` lets the agent load deck-skills when working on a deck,
 * proposal-skills when on a `document.category=proposal`, etc. Empty /
 * unset = generally applicable.
 *
 * The previous `loading: eager | on-demand` field is gone for graph-authored
 * skills. Filesystem skills (shipped with the product in `src/agent/skills/`)
 * keep their own loading mechanism via skill-loader.ts and orchestrator.ts.
 *
 * `name` and `description` are optional at creation so the sidebar new-entry
 * flow works — the user fills them in afterward via the property panel.
 */
export declare const SkillSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"skill">;
    name: z.ZodOptional<z.ZodString>;
    description: z.ZodOptional<z.ZodString>;
    applies_to: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
export type Skill = z.infer<typeof SkillSchema>;
/**
 * Note — freeform thinking, research, daily notes.
 *
 * Decisions migrated from the cut `decision` type land here as plain
 * notes; operators may manually convert specific entries to `task` if they
 * read better as work items.
 */
export declare const NoteSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"note">;
    name: z.ZodString;
    source_file: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Note = z.infer<typeof NoteSchema>;
/**
 * Reference — external resources and inspiration.
 */
export declare const ReferenceSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"reference">;
    name: z.ZodString;
    source: z.ZodOptional<z.ZodString>;
    link: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Reference = z.infer<typeof ReferenceSchema>;
/**
 * Dataset — a CSV the workspace owns, edited in a grid.
 *
 * Conventional CSV: the markdown body IS the data, and the header row IS the
 * column list — there's no separate typed column schema. The grid editor
 * (web CsvEditor) and the agent's `query_dataset` / `append_rows` tools read
 * the body through CSVService (src/services/csv-service.ts), deriving columns
 * from the header. Distinct from an uploaded `asset` with
 * `asset_kind: 'spreadsheet'`, which is an opaque binary — a dataset is
 * in-graph, queryable, and row-appendable.
 */
export declare const DatasetSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"dataset">;
    name: z.ZodString;
    source_file: z.ZodOptional<z.ZodString>;
    source_sheet: z.ZodOptional<z.ZodString>;
    asset_ref: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
export type Dataset = z.infer<typeof DatasetSchema>;
/** One parsed CSV row: every cell is a string (columns come from the header). */
export type DatasetRow = Record<string, string>;
/**
 * Material — a first-class graph entry that wraps a free-standing binary
 * asset (image or opaque file: photo, logo, psd/ai/sketch/fig, video, audio,
 * archive) when no better type fits. The asset-as-embed catch-all: import
 * routes docx/pdf → `document`, xlsx → `dataset`, and everything else (image +
 * opaque) → `material`.
 *
 * Distinct from `asset` (the stored bytes + `assets.db` row) and from
 * `reference` (a pointer to an EXTERNAL source the workspace doesn't own).
 * Under the body-embed model a material's body IS the asset: import seeds an
 * inline `![name](url)` image embed (images) or a `[name](url)` download link
 * (opaque binaries). No `asset_ref` frontmatter — the reference lives in the
 * markdown. A hand-created material (New Entry / agent) is a notes/catalog
 * entry whose body the user writes themselves.
 */
export declare const MaterialSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"material">;
    name: z.ZodString;
    category: z.ZodOptional<z.ZodEnum<{
        other: "other";
        design: "design";
        brand: "brand";
        media: "media";
        archive: "archive";
    }>>;
}, z.core.$loose>;
export type Material = z.infer<typeof MaterialSchema>;
/**
 * High-level kinds for stored binaries — assets.db media metadata + per-kind
 * UI (icon/viewer/thumbnail). Drives `detectAssetKind` in
 * src/services/assets/base.ts and the asset STORE, NOT any entity schema.
 *
 * The `asset` ENTITY type was retired (asset-as-embed §6 / Phase F): an
 * imported binary now becomes a typed entry (material/document/dataset) that
 * embeds a free-standing, folder-owned asset. The store (assets.db +
 * immutable-key blobs + serving routes) stays.
 */
export declare const ASSET_KINDS: readonly ["image", "video", "audio", "pdf", "spreadsheet", "other"];
export type AssetKind = (typeof ASSET_KINDS)[number];
/**
 * Comment — a threaded comment anchored to another entry. Unlike every other
 * entity type, comments are NOT stored as markdown files; they live in
 * `comments.db` (see `src/services/comment-service.ts`) for throughput.
 * Agents see them as first-class typed entities through the virtual-entity
 * adapter (`src/services/comment-virtual-entity.ts`), shared by the MCP and
 * in-app agent surfaces, which is why the schema
 * lives here alongside the file-backed types.
 *
 * The shape documents what fields the MCP envelope exposes; runtime
 * validation happens inside CommentService itself.
 */
export declare const CommentSchema: z.ZodObject<{
    entity_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    created_by: z.ZodString;
    updated_by: z.ZodString;
    date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    entity_type: z.ZodLiteral<"comment">;
    repo: z.ZodString;
    entry_type: z.ZodString;
    entry_id: z.ZodString;
    thread_id: z.ZodString;
    parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    author_user_id: z.ZodNumber;
    author_role: z.ZodEnum<{
        user: "user";
        agent: "agent";
    }>;
    anchor_quote: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    resolved_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    resolved_by_user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    edited: z.ZodOptional<z.ZodBoolean>;
    mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
export type Comment = z.infer<typeof CommentSchema>;
/**
 * Maps entity types to their Zod schemas. 20 canonical built-in types
 * (19 user-facing + 1 system). Workspaces can register additional custom
 * types via SchemaRegistry (schema_extensions).
 */
export declare const ENTITY_SCHEMAS: {
    readonly person: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"person">;
        name: z.ZodString;
        role: z.ZodOptional<z.ZodString>;
        category: z.ZodOptional<z.ZodEnum<{
            employee: "employee";
            contractor: "contractor";
            client: "client";
            partner: "partner";
            other: "other";
        }>>;
        status: z.ZodOptional<z.ZodEnum<{
            current: "current";
            former: "former";
        }>>;
        email: z.ZodOptional<z.ZodString>;
        location: z.ZodOptional<z.ZodString>;
        organization: z.ZodOptional<z.ZodString>;
        user_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly organization: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"organization">;
        name: z.ZodString;
        category: z.ZodOptional<z.ZodEnum<{
            client: "client";
            partner: "partner";
            other: "other";
            vendor: "vendor";
            prospect: "prospect";
            "professional-association": "professional-association";
        }>>;
        status: z.ZodDefault<z.ZodEnum<{
            former: "former";
            active: "active";
            dormant: "dormant";
        }>>;
        industry: z.ZodOptional<z.ZodString>;
        website: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly position: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"position">;
        name: z.ZodString;
        department: z.ZodOptional<z.ZodString>;
        category: z.ZodOptional<z.ZodEnum<{
            contractor: "contractor";
            staff: "staff";
            intern: "intern";
        }>>;
        status: z.ZodDefault<z.ZodEnum<{
            draft: "draft";
            open: "open";
            filled: "filled";
            closed: "closed";
        }>>;
    }, z.core.$loose>;
    readonly deal: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"deal">;
        name: z.ZodString;
        client: z.ZodOptional<z.ZodString>;
        contact: z.ZodOptional<z.ZodString>;
        stage: z.ZodDefault<z.ZodEnum<{
            qualification: "qualification";
            scoping: "scoping";
            proposal: "proposal";
            negotiation: "negotiation";
            "pending-signature": "pending-signature";
            won: "won";
            lost: "lost";
        }>>;
        deal_value: z.ZodOptional<z.ZodNumber>;
        start_date: z.ZodOptional<z.ZodString>;
        date: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly project: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"project">;
        name: z.ZodString;
        category: z.ZodOptional<z.ZodEnum<{
            client: "client";
            internal: "internal";
        }>>;
        project_type: z.ZodOptional<z.ZodString>;
        client: z.ZodOptional<z.ZodString>;
        services: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodOptional<z.ZodEnum<{
            planning: "planning";
            "in-progress": "in-progress";
            paused: "paused";
            complete: "complete";
            archived: "archived";
        }>>;
        start_date: z.ZodOptional<z.ZodString>;
        date: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly event: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"event">;
        name: z.ZodString;
        type: z.ZodDefault<z.ZodEnum<{
            other: "other";
            meeting: "meeting";
            call: "call";
            review: "review";
            workshop: "workshop";
            presentation: "presentation";
            conference: "conference";
        }>>;
        attendees: z.ZodOptional<z.ZodArray<z.ZodString>>;
        location: z.ZodOptional<z.ZodString>;
        start_date: z.ZodOptional<z.ZodString>;
        date: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly task: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"task">;
        name: z.ZodString;
        status: z.ZodDefault<z.ZodEnum<{
            "in-progress": "in-progress";
            backlog: "backlog";
            todo: "todo";
            "in-review": "in-review";
            done: "done";
            cancelled: "cancelled";
        }>>;
        priority: z.ZodOptional<z.ZodEnum<{
            low: "low";
            medium: "medium";
            high: "high";
            urgent: "urgent";
        }>>;
        assignee: z.ZodOptional<z.ZodString>;
        phase: z.ZodOptional<z.ZodString>;
        start_date: z.ZodOptional<z.ZodString>;
        date: z.ZodOptional<z.ZodString>;
        completed_at: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly deliverable: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"deliverable">;
        name: z.ZodString;
        project: z.ZodOptional<z.ZodString>;
        status: z.ZodDefault<z.ZodEnum<{
            "in-progress": "in-progress";
            planned: "planned";
            delivered: "delivered";
            accepted: "accepted";
            rejected: "rejected";
        }>>;
        phase: z.ZodOptional<z.ZodString>;
        start_date: z.ZodOptional<z.ZodString>;
        date: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly document: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"document">;
        name: z.ZodString;
        category: z.ZodOptional<z.ZodEnum<{
            other: "other";
            proposal: "proposal";
            contract: "contract";
            brief: "brief";
            memo: "memo";
            report: "report";
            template: "template";
            guideline: "guideline";
        }>>;
        status: z.ZodDefault<z.ZodEnum<{
            draft: "draft";
            archived: "archived";
            review: "review";
            final: "final";
        }>>;
    }, z.core.$loose>;
    readonly deck: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"deck">;
        name: z.ZodString;
        audience: z.ZodOptional<z.ZodEnum<{
            external: "external";
            client: "client";
            other: "other";
            team: "team";
            board: "board";
        }>>;
        status: z.ZodDefault<z.ZodEnum<{
            draft: "draft";
            archived: "archived";
            review: "review";
            final: "final";
        }>>;
    }, z.core.$loose>;
    readonly artifact: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"artifact">;
        name: z.ZodString;
        kind: z.ZodDefault<z.ZodEnum<{
            custom: "custom";
            html: "html";
            document: "document";
            slides: "slides";
            social: "social";
            app: "app";
        }>>;
        status: z.ZodDefault<z.ZodEnum<{
            draft: "draft";
            archived: "archived";
            review: "review";
            final: "final";
        }>>;
        viewport_width: z.ZodOptional<z.ZodNumber>;
        viewport_height: z.ZodOptional<z.ZodNumber>;
        viewport_mode: z.ZodOptional<z.ZodEnum<{
            fixed: "fixed";
            responsive: "responsive";
            paged: "paged";
        }>>;
    }, z.core.$loose>;
    readonly publication: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"publication">;
        name: z.ZodString;
        platform: z.ZodOptional<z.ZodString>;
        status: z.ZodDefault<z.ZodEnum<{
            draft: "draft";
            review: "review";
            scheduled: "scheduled";
            published: "published";
        }>>;
        url: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly 'case-study': z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"case-study">;
        name: z.ZodString;
        client: z.ZodOptional<z.ZodString>;
        services: z.ZodOptional<z.ZodArray<z.ZodString>>;
        date_range: z.ZodOptional<z.ZodString>;
        status: z.ZodDefault<z.ZodEnum<{
            draft: "draft";
            review: "review";
            final: "final";
            published: "published";
        }>>;
    }, z.core.$loose>;
    readonly service: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"service">;
        name: z.ZodString;
        service_id: z.ZodOptional<z.ZodString>;
        sprint: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        enables: z.ZodOptional<z.ZodArray<z.ZodString>>;
        deliverables: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodDefault<z.ZodEnum<{
            offered: "offered";
            "in-development": "in-development";
            retired: "retired";
        }>>;
    }, z.core.$loose>;
    readonly skill: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"skill">;
        name: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodString>;
        applies_to: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>;
    readonly note: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"note">;
        name: z.ZodString;
        source_file: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly reference: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"reference">;
        name: z.ZodString;
        source: z.ZodOptional<z.ZodString>;
        link: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly dataset: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"dataset">;
        name: z.ZodString;
        source_file: z.ZodOptional<z.ZodString>;
        source_sheet: z.ZodOptional<z.ZodString>;
        asset_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    readonly material: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"material">;
        name: z.ZodString;
        category: z.ZodOptional<z.ZodEnum<{
            other: "other";
            design: "design";
            brand: "brand";
            media: "media";
            archive: "archive";
        }>>;
    }, z.core.$loose>;
    readonly comment: z.ZodObject<{
        entity_id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        created_by: z.ZodString;
        updated_by: z.ZodString;
        date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        entity_type: z.ZodLiteral<"comment">;
        repo: z.ZodString;
        entry_type: z.ZodString;
        entry_id: z.ZodString;
        thread_id: z.ZodString;
        parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        author_user_id: z.ZodNumber;
        author_role: z.ZodEnum<{
            user: "user";
            agent: "agent";
        }>;
        anchor_quote: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        resolved_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        resolved_by_user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        edited: z.ZodOptional<z.ZodBoolean>;
        mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>;
};
/**
 * Retired entity-type names that must never be (re-)created, even if a legacy
 * workspace still carries a `schema_extensions.<name>` for them. `asset` was
 * retired in Phase F (asset-as-embed): binaries are now free-standing in
 * assets.db and embedded by typed entries (material/document/dataset), so a
 * file-backed `asset` entity would be an unvalidatable base-only stub. Enforced
 * at the entity-creation entry points (graph.changeType, the web create route,
 * and getAgentAllowedEntityTypes).
 */
export declare const RESERVED_ENTITY_TYPES: ReadonlySet<string>;
/**
 * Plural subfolder name → singular entity_type mapping
 */
export declare const PLURAL_TO_SINGULAR: Record<string, string>;
/**
 * Singular entity_type → plural subfolder name mapping
 */
export declare const SINGULAR_TO_PLURAL: Record<string, string>;
export type EntityType = keyof typeof ENTITY_SCHEMAS;
export type Entity = z.infer<typeof ENTITY_SCHEMAS[EntityType]>;
export type EntityData = Entity;
/**
 * Cross-field task rule: a task's start date must not fall after its due date.
 *
 * This lives OUTSIDE the Zod schema on purpose. Expressing it as a
 * `TaskSchema.refine(...)` would turn the ZodObject into a ZodEffects, which
 * breaks shape introspection in schema-registry (`describeZodObject` and the
 * schema_extensions `.extend()` path both rely on `instanceof z.ZodObject`) —
 * and that powers the metadata field panel. So both validation entry points
 * (this module's `validateEntity` and `graph.ts`'s private one) call this
 * helper after a successful parse instead.
 *
 * `dateField` stores ISO 'YYYY-MM-DD' strings, so a lexicographic comparison
 * is a correct date comparison.
 */
export declare function assertValidTaskDates(data: {
    start_date?: string;
    date?: string;
}): void;
/**
 * Validation helper with helpful error messages
 */
export declare function validateEntity<T extends EntityType>(entityType: T, data: unknown): z.infer<typeof ENTITY_SCHEMAS[T]>;
/**
 * Validate custom entity type (no schema, just base fields)
 */
export declare function validateCustomEntity(data: unknown): EntityBase;
/**
 * Check if a type is a known built-in entity type
 */
export declare function isKnownEntityType(type: string): type is EntityType;
