/**
 * Baseline-schema vertical metadata.
 *
 * `src/services/schema_definitions.ts` ships ~65 baseline entity schemas that
 * pre-date the `VerticalPack` system. Rather than rewriting each schema's
 * inline `metadata` block to declare `verticals` / `primary_vertical` /
 * `example_use_case` (a 65-touch refactor with high merge-conflict risk),
 * this module owns the mapping in one place. It is merged into the schema
 * registry's view of metadata at the boundary points that need it:
 *
 *   - the records index/guide pages (P2 frontend)
 *   - the `GET /api/registry/entity-types` payload (P2 API)
 *   - the `frontend/src/data/entity_types.generated.ts` generator (P2 generator)
 *
 * Vertical-specific schemas defined in `src/services/verticals/schemas/<slug>.json`
 * already declare `verticals` and `primary_vertical` inline; they take
 * precedence over this baseline table when both are present.
 *
 * Mapping rules:
 *   1. Use the same href base as `EntityTypeGuidePage.tsx`'s legacy
 *      `verticalHref` mapping for the seven types it covered (contacts,
 *      tasks, transactions, contracts, etc.).
 *   2. For everything else, pick the vertical where the type is "natural" —
 *      where an operator working in that vertical would expect to find it.
 *      Multi-vertical types list secondary verticals after the primary.
 *   3. Personal-life rolls up health/habit/goal types; personal-agent rolls
 *      up agent_* runtime types.
 */
export const BASELINE_VERTICAL_METADATA = {
    // ---- CRM ---------------------------------------------------------------
    contact: {
        verticals: ["crm", "customer-development", "meetings"],
        primary_vertical: "crm",
        example_use_case: "Anchor every email, meeting, and task to the same person across tools — even when the email changes.",
    },
    person: {
        verticals: ["crm", "customer-development", "meetings"],
        primary_vertical: "crm",
        example_use_case: "Versioned identity record for evaluators, customers, and prospects across every interaction.",
    },
    company: {
        verticals: ["crm", "diligence", "portfolio", "procurement"],
        primary_vertical: "crm",
        example_use_case: "Track relationships, deals, and obligations against a stable company entity that survives renames and acquisitions.",
    },
    account: {
        verticals: ["crm", "financial-ops"],
        primary_vertical: "crm",
        example_use_case: "Group multiple contacts, deals, and engagements under a single customer account with versioned metadata.",
    },
    address: {
        verticals: ["crm", "logistics", "personal-data"],
        primary_vertical: "crm",
        example_use_case: "Reference shipping, billing, and home addresses without overwriting prior values when one moves.",
    },
    location: {
        verticals: ["crm", "logistics", "personal-data"],
        primary_vertical: "crm",
        example_use_case: "Geographic anchor for events, properties, and shipments with versioned coordinate updates.",
    },
    // ---- Productivity / personal-agent -------------------------------------
    task: {
        verticals: ["personal-agent", "personal-data", "engineering", "meetings"],
        primary_vertical: "personal-agent",
        example_use_case: "Track every commitment, deadline, and follow-up across the agents that pick them up.",
    },
    task_attachment: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Files, screenshots, and links anchored to a specific task.",
    },
    task_comment: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Threaded discussion attached to a versioned task.",
    },
    task_dependency: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Encode 'X blocks Y' relationships between tasks for deterministic scheduling.",
    },
    task_story: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "engineering",
        example_use_case: "Higher-level work item that bundles related tasks under one outcome.",
    },
    project: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Multi-task initiative with shared scope, status, and deadline lineage.",
    },
    goal: {
        verticals: ["personal-data", "personal-agent"],
        primary_vertical: "personal-data",
        example_use_case: "Personal objective tracked across habits, milestones, and outcomes.",
    },
    // ---- Financial-ops / trading / personal life ---------------------------
    transaction: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Versioned ledger entry that survives reclassification, refund, and reconciliation.",
    },
    invoice: {
        verticals: ["financial-ops"],
        primary_vertical: "financial-ops",
        example_use_case: "Track issued and received invoices through every status transition.",
    },
    receipt: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Capture the supporting document for a transaction with extracted line items.",
    },
    purchase: {
        verticals: ["financial-ops", "personal-data", "procurement"],
        primary_vertical: "personal-data",
        example_use_case: "Personal or organizational buy with merchant, line items, and category.",
    },
    transfer: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Money movement between accounts, including in-flight and settled states.",
    },
    fixed_cost: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Recurring obligation (rent, subscription, salary) with cadence metadata.",
    },
    flow: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Cashflow entry with category, source, and direction — the unit underlying budgets.",
    },
    income: {
        verticals: ["personal-data", "financial-ops"],
        primary_vertical: "personal-data",
        example_use_case: "Income stream with source, cadence, and tax treatment metadata.",
    },
    liability: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Outstanding obligation (loan, credit line) with rate and balance lineage.",
    },
    balance: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Account balance snapshot — the source of truth at a specific timestamp.",
    },
    insurance_policy: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Coverage details with versioned premiums, deductibles, and renewal dates.",
    },
    tax_event: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Taxable disposal, dividend, or income event tied to source transactions.",
    },
    tax_filing: {
        verticals: ["financial-ops", "personal-data"],
        primary_vertical: "financial-ops",
        example_use_case: "Filed return with status, amount, and supporting-event provenance.",
    },
    order: {
        verticals: ["financial-ops", "trading"],
        primary_vertical: "financial-ops",
        example_use_case: "Trade or purchase order with execution status and fill lineage.",
    },
    property: {
        verticals: ["personal-data", "financial-ops"],
        primary_vertical: "personal-data",
        example_use_case: "Real estate or vehicle asset with valuation, ownership, and document trail.",
    },
    holding: {
        verticals: ["trading", "financial-ops", "personal-data"],
        primary_vertical: "trading",
        example_use_case: "Position snapshot for the current asset weight and basis.",
    },
    wallet: {
        verticals: ["trading", "financial-ops"],
        primary_vertical: "trading",
        example_use_case: "On-chain or custodial wallet with provider, network, and policy metadata.",
    },
    crypto_transaction: {
        verticals: ["trading", "financial-ops"],
        primary_vertical: "trading",
        example_use_case: "Tx-hash-resolved on-chain movement with cost basis and tax classification.",
    },
    // ---- Contracts ---------------------------------------------------------
    contract: {
        verticals: ["contracts"],
        primary_vertical: "contracts",
        example_use_case: "Versioned contract with every clause, amendment, and obligation reconstructable in place.",
    },
    // ---- Personal life / health -------------------------------------------
    habit: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Recurring practice with cadence, streak, and historical observance.",
    },
    habit_completion: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "One observed instance of a habit with timestamp and metric attached.",
    },
    habit_objective: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Target attached to a habit (e.g. 5 sessions/week) with progress lineage.",
    },
    workout: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Logged training session with exercises, volume, and progression.",
    },
    exercise: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Library entry for a movement (squat, run interval) referenced by workouts.",
    },
    meal: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Logged meal with macros, ingredients, and time-of-day patterns.",
    },
    emotion: {
        verticals: ["personal-data"],
        primary_vertical: "personal-data",
        example_use_case: "Mood/affect observation tied to context for retrospective pattern analysis.",
    },
    // ---- Knowledge / research ---------------------------------------------
    belief: {
        verticals: ["customer-development", "personal-data"],
        primary_vertical: "customer-development",
        example_use_case: "Versioned position an evaluator holds, with source observations as evidence.",
    },
    argument: {
        verticals: ["customer-development", "content-ops"],
        primary_vertical: "customer-development",
        example_use_case: "Reasoning step with premises and conclusion, useful for objection clustering.",
    },
    strategy: {
        verticals: ["trading", "customer-development", "engineering"],
        primary_vertical: "trading",
        example_use_case: "Documented playbook with versioned rules and outcome attribution.",
    },
    process: {
        verticals: ["engineering", "customer-ops"],
        primary_vertical: "engineering",
        example_use_case: "Repeatable workflow with steps, owners, and status lineage.",
    },
    outcome: {
        verticals: ["personal-agent", "engineering", "trading"],
        primary_vertical: "personal-agent",
        example_use_case: "Result emitted by an agent or workflow, attached to its originating decision.",
    },
    research: {
        verticals: ["customer-development", "diligence"],
        primary_vertical: "customer-development",
        example_use_case: "Synthesized investigation note with sources, conclusion, and caveats.",
    },
    domain: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Operator-tracked area of expertise or responsibility (e.g. neotoma.io DNS).",
    },
    // ---- Communication / meetings -----------------------------------------
    email: {
        verticals: ["meetings", "crm", "customer-development"],
        primary_vertical: "crm",
        example_use_case: "Inbound or outbound message with extracted entities and follow-ups.",
    },
    message: {
        verticals: ["meetings", "crm", "customer-development"],
        primary_vertical: "crm",
        example_use_case: "Cross-channel message (DM, SMS, chat) tied to its participants.",
    },
    note: {
        verticals: ["meetings", "personal-agent", "customer-development"],
        primary_vertical: "personal-agent",
        example_use_case: "Free-form note with optional structured fields and entity references.",
    },
    conversation: {
        verticals: ["meetings", "personal-agent", "customer-development"],
        primary_vertical: "personal-agent",
        example_use_case: "Container for an agent or human-agent thread with linked turns and outcomes.",
    },
    conversation_turn: {
        verticals: ["personal-agent", "meetings"],
        primary_vertical: "personal-agent",
        example_use_case: "Single user/assistant turn with provenance of model, tools, and tokens.",
    },
    conversation_message: {
        verticals: ["personal-agent", "meetings"],
        primary_vertical: "personal-agent",
        example_use_case: "Atomic message in a conversation — preferred over the legacy agent_message alias.",
    },
    event: {
        verticals: ["meetings", "personal-data"],
        primary_vertical: "meetings",
        example_use_case: "Calendar event with attendees, location, and meeting-link provenance.",
    },
    // ---- Datasets / generic relationships ---------------------------------
    dataset: {
        verticals: ["engineering", "customer-development"],
        primary_vertical: "engineering",
        example_use_case: "Versioned dataset reference with rowset and source manifest.",
    },
    dataset_row: {
        verticals: ["engineering", "customer-development"],
        primary_vertical: "engineering",
        example_use_case: "Single record inside a dataset with field-level provenance.",
    },
    relationship: {
        verticals: ["personal-agent", "crm"],
        primary_vertical: "personal-agent",
        example_use_case: "Stand-alone edge entity for cases where a relationship needs its own metadata.",
    },
    // ---- Agent runtime (personal-agent / engineering) ---------------------
    agent_task: {
        verticals: ["personal-agent", "engineering", "crypto-engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Atomic unit of work an agent picks up, executes, and reports against.",
    },
    agent_attempt: {
        verticals: ["personal-agent", "engineering", "crypto-engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "One execution attempt for an agent_task, including failures.",
    },
    agent_outcome: {
        verticals: ["personal-agent", "engineering", "crypto-engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Final or interim result of an agent_attempt with classification and notes.",
    },
    agent_artifact: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "File or asset an agent produced, attached to its originating task.",
    },
    agent_sensor_signal: {
        verticals: ["personal-agent"],
        primary_vertical: "personal-agent",
        example_use_case: "Deterministic ground-truth observation from a tool/integration.",
    },
    agent_cycle_summary: {
        verticals: ["personal-agent"],
        primary_vertical: "personal-agent",
        example_use_case: "Roll-up of one agent execution loop with metrics and lessons learned.",
    },
    tool_invocation: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Recorded tool call with arguments, response, and elapsed-time provenance.",
    },
    tool_invocation_failure: {
        verticals: ["personal-agent", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Failed tool call with classification and recovery hint.",
    },
    context_event: {
        verticals: ["personal-agent"],
        primary_vertical: "personal-agent",
        example_use_case: "Environmental change (file edit, IDE event) linked to a session.",
    },
    // ---- Asset types (cross-vertical) -------------------------------------
    file_asset: {
        verticals: ["personal-agent", "meetings", "engineering"],
        primary_vertical: "personal-agent",
        example_use_case: "Stored file (PDF, transcript, doc) with hash and source provenance.",
    },
    image_asset: {
        verticals: ["personal-agent", "meetings", "content-ops"],
        primary_vertical: "personal-agent",
        example_use_case: "Image with caption, source, and embedding provenance for visual recall.",
    },
    audio_asset: {
        verticals: ["personal-agent", "meetings"],
        primary_vertical: "meetings",
        example_use_case: "Audio recording (call, voice note) with transcript and speaker provenance.",
    },
    video_asset: {
        verticals: ["personal-agent", "meetings", "content-ops"],
        primary_vertical: "meetings",
        example_use_case: "Video recording (meeting, demo) with transcript and chapter provenance.",
    },
};
/** Snake-case entity types covered by the baseline vertical map. */
export function listBaselineEntityTypes() {
    return Object.keys(BASELINE_VERTICAL_METADATA).sort();
}
/** Lookup with `null` fallback for types not yet mapped. */
export function getBaselineVerticalMetadata(entity_type) {
    return BASELINE_VERTICAL_METADATA[entity_type] ?? null;
}
//# sourceMappingURL=baseline_metadata.js.map