winbusinessLogos/World/Workspaces/ — not listed here.inv_*) moved to SQLite: Logos/World/Workspaces/Users/casey/investment.sqlite — not listed here.web_app_stock*) moved to SQLite: Logos/World/Workspaces/Users/casey/stocks.sqlite — not listed here.Logos/World/Workspaces/platform/ai_working_memory.sqlite (legacy shared); target per-AI Workspaces/Agents/<slug>/workspace.db per LOGOS_SYSTEM_MANIFEST_old_legacy.md — not listed here.python3 Logos/Platform/Admin/Reports/generate_mysql_schema_report.py| Object | * | Rows | Domain | Kind | How it is used |
|---|---|---|---|---|---|
cortex_config | 134 | Platform config (misnamed cortex_config) | TABLE | Key/value Cortex runtime configuration (feature flags, thresholds). Read by cortex_engine and /logos/config/ surfaces. | |
cortex_conversation_insights | * | 172 | Analytics — admin/reporting views | VIEW | VIEW: aggregated insight snippets derived from Matrix conversation analysis. |
cortex_directives | 289 | Cognition — thoughts & prompt assembly | VIEW | VIEW: filter cortex_thoughts_current where thought_type='directive'. Behavioral rules injected into AI system prompts. | |
cortex_entities | 171 | Entity graph — registry & relationships | TABLE | Master entity registry — humans, AIs, projects, apps. Writers: onboarding, entity_register, MCP identity tools. All Matrix/Cortex traffic resolves entity_name → id here. | |
cortex_matrix_reflection | * | — | Analytics — admin/reporting views | VIEW | VIEW: crosswalk between Matrix messages and related cognition rows. |
cortex_memories | 197 | Cognition — thoughts & prompt assembly | VIEW | VIEW: filter cortex_thoughts_current where thought_type='memory'. Experience recall for prompt assembly. | |
cortex_personalities | * | 171 | Entity graph — registry & relationships | VIEW | VIEW: personality metadata joined from entities + thoughts. |
cortex_projects | 37 | Entity graph — registry & relationships | VIEW | VIEW: projects as entities joined via works_on relationships — not stored as cognition rows. | |
cortex_relationships_unified | 229 | Entity graph — registry & relationships | TABLE | Polymorphic relationship graph (entity↔entity, entity↔thought, etc.). Writers: pairing, works_on, skill subscriptions, graph APIs. | |
cortex_responsibility_roles | 8 | Governance — responsibility roles | TABLE | Maps entities to responsibility roles (operator, steward, etc.) for governance and routing hints. | |
cortex_sessions | * | 0 | Matrix — messaging & lifecycle | TABLE | Active Cortex processing sessions (validation rounds, bounce state). Writers: validation engines during message elevation. |
cortex_skill_hierarchy | 13 | Capabilities — skill hierarchy | TABLE | Skill tree metadata for Cortex capabilities (parent/child skills, ranks). Read by skill pickers and agent capability grants. | |
cortex_tasks | 141 | Cognition — thoughts & prompt assembly | VIEW | VIEW: filter cortex_thoughts_current where thought_type='task'. Open action items per entity. | |
cortex_thought_categories | * | 75 | Compatibility view — migrate readers, retire | VIEW | VIEW: legacy shape over cortex_types (category=thought_category). Semantic buckets for classifying thoughts (75 categories). |
cortex_thought_evolution | 5,472 | Cognition — thoughts & prompt assembly | VIEW | VIEW: history chain showing how a thought slot changed over time. | |
cortex_thought_types | * | 23 | Compatibility view — migrate readers, retire | VIEW | VIEW: legacy shape over cortex_types (category=thought_type). Icons/rankings in metadata JSON. Read by forms and Assay scripts. |
cortex_thoughts | 5,472 | Cognition — thoughts & prompt assembly | TABLE | Append-only cognition store (Casey spec). One row per thought revision; current value = latest row per (entity_id, domain, thought_type). Writers: thought_store, agent.add_thought(), Cortex engines. | |
cortex_thoughts_current | 2,589 | Cognition — thoughts & prompt assembly | VIEW | VIEW: latest thought per (entity, domain, type) from append-only cortex_thoughts. Primary read path for worldview/directives/tasks. | |
cortex_types | 154 | Controlled vocabulary (types taxonomy) | TABLE | Canonical controlled vocabulary — entity/meeting/message/thought types, statuses, roles, relationship types. Seed + Types.propose/approve. Single source of truth for type validation. | |
cortex_worldview | 65 | Cognition — thoughts & prompt assembly | VIEW | VIEW: ranked slice of an entity's active thoughts for worldview displays. | |
current_logos_agent_connection_assignments | 50 | Identity — users, OAuth, connections | VIEW | VIEW: current effective assignment per connection. | |
current_logos_agent_connection_state | 33 | Identity — users, OAuth, connections | VIEW | VIEW: latest state row per connection (active session metadata). | |
logos_agent_connection_assignments | 52 | Identity — users, OAuth, connections | TABLE | Append-only claims linking a connection to entity/user/project context. | |
logos_agent_connections | 33 | Identity — users, OAuth, connections | TABLE | MCP/agent connection registry (OAuth session, bearer token, service identity). | |
logos_api_tokens | 73 | Identity — users, OAuth, connections | TABLE | Long-lived API tokens for programmatic LOGOS access. | |
logos_asset_relationships | 7 | Asset registry — graph layer (skills, tables, links) | TABLE | Platform identity, connector, registry, jobs, or operations object. | |
logos_asset_types | 17 | Asset registry — graph layer (skills, tables, links) | TABLE | Platform identity, connector, registry, jobs, or operations object. | |
logos_assets | 16,970 | Asset registry — graph layer (skills, tables, links) | TABLE | Append-only asset catalog (skills, tables, views, pages, jobs, …). Writers: skill_create, view_create, page_create, registry_register_asset, write_primary paths. | |
logos_attributes | 55,021 | Asset registry — graph layer (skills, tables, links) | TABLE | Append-only key/value metadata on assets (visibility, trigger_phrases, …). Writers: registry_set_attribute. | |
logos_events | 19,379 | Asset registry — graph layer (skills, tables, links) | TABLE | Telemetry ledger — invocations, registry audit events, queue drain progress. Writers: registry_log_event, job runs. (Historical rows may include event_type='dual_write' from pre-cutover migration.) | |
logos_job_runs | 6,019 | Jobs — scheduled work queue | TABLE | Append-only execution history per logos_jobs row (status, lease, output). | |
logos_jobs | 11 | Jobs — scheduled work queue | TABLE | Scheduled job definitions (cron, handler, owner, approval). Writers: job_create, Platform/Jobs scheduler. | |
logos_links | 921 | Asset registry — graph layer (skills, tables, links) | TABLE | Append-only graph edges between assets/thoughts (reads, composes, cites, …). Writers: registry_link_assets, skill_create related_* backfill. | |
logos_oauth_clients | 65 | Identity — users, OAuth, connections | TABLE | Registered OAuth clients (Cursor MCP, PhoneMate, etc.). | |
logos_oauth_codes | * | 63 | Identity — users, OAuth, connections | TABLE | Short-lived OAuth authorization codes during MCP/human login flow. |
logos_platform_logs | * | 462 | Ops audit — logs & SMS trail | TABLE | Platform-wide structured log sink (errors, boot events, subsystem traces). |
logos_project_queue_limits | 0 | Identity — users, OAuth, connections | TABLE | Platform identity, connector, registry, jobs, or operations object. | |
logos_provider_api_calls | 2,155 | Usage ledger — provider API calls, tokens, cost | TABLE | Platform provider API ledger — LLM tokens, model, cost per call. Writers: Logos.Utilities.services.log_provider_call(). Future: STT/TTS and app-scoped rebilling. | |
logos_queue_row_history | 3,006 | Identity — users, OAuth, connections | TABLE | Platform identity, connector, registry, jobs, or operations object. | |
logos_semantic_index | 3,338 | Identity — users, OAuth, connections | TABLE | Platform identity, connector, registry, jobs, or operations object. | |
logos_semantic_index_meta | 1 | Identity — users, OAuth, connections | TABLE | Platform identity, connector, registry, jobs, or operations object. | |
logos_web_requests_log | * | 261 | Ops audit — logs & SMS trail | TABLE | HTTP request audit (path, latency, status) for operator diagnostics. |
matrix_communications | * | 5,718 | Compatibility view — migrate readers, retire | VIEW | VIEW: flat legacy message shape (v2 messages + sidecars joined). Primary read path for Codex, lifecycle, MCP inbox, developer thread. |
matrix_conversations | * | 2,980 | Compatibility view — migrate readers, retire | VIEW | VIEW: legacy conversation header shape from matrix_meeting_conversations. Readers: Conversation service, Matrix UIs, round/bounce settings. |
matrix_meeting_attendance | 6,874 | Matrix — messaging & lifecycle | TABLE | Entity ↔ meeting time windows (enter/exit/re-enter = new row). Scopes message visibility in meeting_history_sql(). | |
matrix_meeting_conversations | 2,980 | Matrix — messaging & lifecycle | TABLE | conversation_id ↔ meeting_id map plus chat config (Cortex prompts, bounce limits, summaries). Writers: meeting_store, Conversation class. | |
matrix_meetings | 3,149 | Matrix — messaging & lifecycle | TABLE | Casey three-table core: one structured group activity (chat thread, dev thread, ticket thread). Writers: meeting_store.ensure_meeting. | |
matrix_message_deliveries | 2,172 | Matrix — messaging & lifecycle | TABLE | Per-recipient inbox state (delivered_at, read_at, archived_at). Writers: lifecycle fanout on directed messages; readers: inbox APIs. | |
matrix_message_lifecycle | 5,718 | Matrix — messaging & lifecycle | TABLE | Lifecycle processor sidecar: status, effective_at, response_code, parent/root linkage. Writers: lifecycle processor, append_communication. | |
matrix_message_meta | 5,718 | Matrix — messaging & lifecycle | TABLE | QC/inbox sidecar: validation_status, processing_status, prompts, direct_recipient JSON. Writers: append_communication, validation engines. | |
matrix_message_type_actions | * | 0 | Matrix — messaging & lifecycle | TABLE | Lifecycle fan-out rules (message_type → spawn children). 0 rows in prod — processor no-ops when empty; drop candidate if fan-out stays unused. |
matrix_messages | 5,718 | Matrix — messaging & lifecycle | TABLE | Immutable message content + routing (sender, recipients, parent_message_id). Writers: meeting_store.append_message / append_communication. | |
matrix_participant_config | 611 | Matrix — messaging & lifecycle | TABLE | Per-AI per-conversation prompts, bounce limits, participation_mode. Replaces dropped matrix_ai_participation. Writers: upsert_ai_participation. | |
matrix_response_codes | 11 | Matrix — messaging & lifecycle | TABLE | Reference table mapping response_code → parent lifecycle status (fixed, needs_info, blocked, etc.). Seeded; read by lifecycle processor. | |
matrix_terminal_response_messages | 85 | Matrix — messaging & lifecycle | VIEW | VIEW: correctness check — terminal lifecycle responses that should have closed their parent request. | |
sms_log | 12 | Ops audit — logs & SMS trail | TABLE | Outbound SMS audit trail (recipient, carrier, dry_run, Twilio responses). Writers: Matrix sms.py dispatch. | |
users | 73 | Identity — users, OAuth, connections | TABLE | Human user accounts (login, profile, sms_number for outbound SMS). Writers: Identity OAuth, admin onboarding. | |
vw_logos_asset_relationships_current | 7 | Asset registry — graph layer (skills, tables, links) | VIEW | Asset registry view — latest row per asset/link/attribute. | |
vw_logos_assets_current | 5,361 | Asset registry — graph layer (skills, tables, links) | VIEW | VIEW: latest revision per asset_id from append-only logos_assets. | |
vw_logos_attributes_current | 25,116 | Asset registry — graph layer (skills, tables, links) | VIEW | VIEW: latest value per (asset_id, name) from logos_attributes. | |
vw_logos_links_current | 892 | Asset registry — graph layer (skills, tables, links) | VIEW | VIEW: latest active link per (source, target, type) from logos_links. | |
vw_logos_platform_assets_current | 1,214 | Asset registry — graph layer (skills, tables, links) | VIEW | Asset registry view — latest row per asset/link/attribute. | |
vw_logos_skills_details | — | Asset registry — graph layer (skills, tables, links) | VIEW | VIEW: skill asset body + metadata for skill detail pages. | |
vw_logos_skills_list | — | Asset registry — graph layer (skills, tables, links) | VIEW | VIEW: skill assets joined with current attributes for /reports/workspace/skills/. | |
vw_logos_world_assets_current | 4,147 | Asset registry — graph layer (skills, tables, links) | VIEW | Asset registry view — latest row per asset/link/attribute. | |
workspace_project_members | 25 | Entity graph — registry & relationships | VIEW | VIEW: project membership for workspace registry. | |
workspace_projects | 23 | Entity graph — registry & relationships | VIEW | VIEW: MySQL registry mirror of promoted workspace projects (slug, owner). Actual project data lives in Workspaces/ SQLite. |
| Current name | Rows | True domain | Suggested name | Code home |
|---|---|---|---|---|
cortex_config | 134 | Platform config (misnamed cortex_config) | logos_config | Platform/DataLayer (config.py) |
cortex_conversation_insights | 172 | Analytics — admin/reporting views | matrix_conversation_insights | Platform/Admin or Matrix |
cortex_entities | 171 | Entity graph — registry & relationships | logos_entities | Platform/Cortex (entity_model.py) |
cortex_matrix_reflection | — | Analytics — admin/reporting views | matrix_reflection | Platform/Admin or Matrix |
cortex_relationships_unified | 229 | Entity graph — registry & relationships | logos_relationships | Platform/Cortex (entity_model.py) |
cortex_responsibility_roles | 8 | Governance — responsibility roles | logos_responsibility_roles | Platform/Cortex (entity_model) |
cortex_sessions | 0 | Matrix — messaging & lifecycle | matrix_validation_sessions | Platform/Matrix |
cortex_skill_hierarchy | 13 | Capabilities — skill hierarchy | logos_skill_hierarchy | Platform/Cortex or Codex |
cortex_types | 154 | Controlled vocabulary (types taxonomy) | logos_types | Platform/Cortex (types) |
logos_provider_api_calls | 2,155 | Usage ledger — provider API calls, tokens, cost | logos_provider_api_calls | Platform/DataLayer or new Platform/Ledger |
| Object | Rows | Kind | Why flagged |
|---|---|---|---|
cortex_conversation_insights | 172 | VIEW | Analytics VIEW (admin_api) — fold into reporting or drop if unused |
cortex_matrix_reflection | — | VIEW | Analytics VIEW (admin_api) — fold into reporting or drop if unused |
cortex_personalities | 171 | VIEW | VIEW on entities.metadata — overlap with entity_get; consolidate read paths |
cortex_sessions | 0 | TABLE | 0 rows — validation-session table; wire up or drop if sessions model retired |
cortex_thought_categories | 75 | VIEW | Compatibility VIEW over cortex_types — migrate readers, then drop |
cortex_thought_types | 23 | VIEW | Compatibility VIEW over cortex_types — migrate readers (Assay, agents.py), then drop |
logos_oauth_codes | 63 | TABLE | Ephemeral auth codes — add retention purge; do not drop table |
logos_platform_logs | 462 | TABLE | Platform log sink — add rotation/archival; table stays |
logos_web_requests_log | 261 | TABLE | HTTP audit log — add rotation/archival; table stays |
matrix_communications | 5,718 | VIEW | Compatibility VIEW (messages + sidecars) — large migration; target v2 tables |
matrix_conversations | 2,980 | VIEW | Compatibility VIEW — migrate Conversation readers to matrix_meeting_conversations |
matrix_message_type_actions | 0 | TABLE | 0 rows — fan-out config unused; lifecycle no-ops; drop if spawn rules never ship |
| Table | * | Rows | Role |
|---|---|---|---|
cortex_entities | 171 | Master entity registry — humans, AIs, projects, apps. | |
cortex_relationships_unified | 229 | Polymorphic relationship graph (entity↔entity, entity↔thought, etc. | |
cortex_skill_hierarchy | 13 | Skill tree metadata for Cortex capabilities (parent/child skills, ranks). | |
cortex_thought_categories | * | 75 | VIEW: legacy shape over cortex_types (category=thought_category). |
cortex_thought_types | * | 23 | VIEW: legacy shape over cortex_types (category=thought_type). |
cortex_thoughts | 5,472 | Append-only cognition store (Casey spec). | |
cortex_types | 154 | Canonical controlled vocabulary — entity/meeting/message/thought types, statuses, roles, relationship types. | |
logos_agent_connection_assignments | 52 | Append-only claims linking a connection to entity/user/project context. | |
logos_agent_connections | 33 | MCP/agent connection registry (OAuth session, bearer token, service identity). | |
logos_provider_api_calls | 2,155 | Platform provider API ledger — LLM tokens, model, cost per call. | |
logos_web_requests_log | * | 261 | HTTP request audit (path, latency, status) for operator diagnostics. |
matrix_meeting_conversations | 2,980 | conversation_id ↔ meeting_id map plus chat config (Cortex prompts, bounce limits, summaries). |
| Table | * | Rows | Usage |
|---|---|---|---|
cortex_config | 134 | Key/value Cortex runtime configuration (feature flags, thresholds). | |
cortex_entities | 171 | Master entity registry — humans, AIs, projects, apps. | |
cortex_relationships_unified | 229 | Polymorphic relationship graph (entity↔entity, entity↔thought, etc. | |
cortex_responsibility_roles | 8 | Maps entities to responsibility roles (operator, steward, etc. | |
cortex_sessions | * | 0 | Active Cortex processing sessions (validation rounds, bounce state). |
cortex_skill_hierarchy | 13 | Skill tree metadata for Cortex capabilities (parent/child skills, ranks). | |
cortex_thoughts | 5,472 | Append-only cognition store (Casey spec). | |
cortex_types | 154 | Canonical controlled vocabulary — entity/meeting/message/thought types, statuses, roles, relationship types. | |
logos_agent_connection_assignments | 52 | Append-only claims linking a connection to entity/user/project context. | |
logos_agent_connections | 33 | MCP/agent connection registry (OAuth session, bearer token, service identity). | |
logos_api_tokens | 73 | Long-lived API tokens for programmatic LOGOS access. | |
logos_asset_relationships | 7 | Platform identity or ops object. | |
logos_asset_types | 17 | Platform identity or ops object. | |
logos_assets | 16,970 | Append-only asset catalog (skills, tables, views, pages, jobs, …). | |
logos_attributes | 55,021 | Append-only key/value metadata on assets (visibility, trigger_phrases, …). | |
logos_events | 19,379 | Telemetry ledger — invocations, registry audit events, queue drain progress. | |
logos_job_runs | 6,019 | Append-only execution history per logos_jobs row (status, lease, output). | |
logos_jobs | 11 | Scheduled job definitions (cron, handler, owner, approval). | |
logos_links | 921 | Append-only graph edges between assets/thoughts (reads, composes, cites, …). | |
logos_oauth_clients | 65 | Registered OAuth clients (Cursor MCP, PhoneMate, etc. | |
logos_oauth_codes | * | 63 | Short-lived OAuth authorization codes during MCP/human login flow. |
logos_platform_logs | * | 462 | Platform-wide structured log sink (errors, boot events, subsystem traces). |
logos_project_queue_limits | 0 | Platform identity or ops object. | |
logos_provider_api_calls | 2,155 | Platform provider API ledger — LLM tokens, model, cost per call. | |
logos_queue_row_history | 3,006 | Platform identity or ops object. | |
logos_semantic_index | 3,338 | Platform identity or ops object. | |
logos_semantic_index_meta | 1 | Platform identity or ops object. | |
logos_web_requests_log | * | 261 | HTTP request audit (path, latency, status) for operator diagnostics. |
matrix_meeting_attendance | 6,874 | Entity ↔ meeting time windows (enter/exit/re-enter = new row). | |
matrix_meeting_conversations | 2,980 | conversation_id ↔ meeting_id map plus chat config (Cortex prompts, bounce limits, summaries). | |
matrix_meetings | 3,149 | Casey three-table core: one structured group activity (chat thread, dev thread, ticket thread). | |
matrix_message_deliveries | 2,172 | Per-recipient inbox state (delivered_at, read_at, archived_at). | |
matrix_message_lifecycle | 5,718 | Lifecycle processor sidecar: status, effective_at, response_code, parent/root linkage. | |
matrix_message_meta | 5,718 | QC/inbox sidecar: validation_status, processing_status, prompts, direct_recipient JSON. | |
matrix_message_type_actions | * | 0 | Lifecycle fan-out rules (message_type → spawn children). |
matrix_messages | 5,718 | Immutable message content + routing (sender, recipients, parent_message_id). | |
matrix_participant_config | 611 | Per-AI per-conversation prompts, bounce limits, participation_mode. | |
matrix_response_codes | 11 | Reference table mapping response_code → parent lifecycle status (fixed, needs_info, blocked, etc. | |
sms_log | 12 | Outbound SMS audit trail (recipient, carrier, dry_run, Twilio responses). | |
users | 73 | Human user accounts (login, profile, sms_number for outbound SMS). |
| View | * | Rows | Usage |
|---|---|---|---|
cortex_conversation_insights | * | 172 | VIEW: aggregated insight snippets derived from Matrix conversation analysis. |
cortex_directives | 289 | VIEW: filter cortex_thoughts_current where thought_type='directive'. | |
cortex_matrix_reflection | * | — | VIEW: crosswalk between Matrix messages and related cognition rows. |
cortex_memories | 197 | VIEW: filter cortex_thoughts_current where thought_type='memory'. | |
cortex_personalities | * | 171 | VIEW: personality metadata joined from entities + thoughts. |
cortex_projects | 37 | VIEW: projects as entities joined via works_on relationships — not stored as cognition rows. | |
cortex_tasks | 141 | VIEW: filter cortex_thoughts_current where thought_type='task'. | |
cortex_thought_categories | * | 75 | VIEW: legacy shape over cortex_types (category=thought_category). |
cortex_thought_evolution | 5,472 | VIEW: history chain showing how a thought slot changed over time. | |
cortex_thought_types | * | 23 | VIEW: legacy shape over cortex_types (category=thought_type). |
cortex_thoughts_current | 2,589 | VIEW: latest thought per (entity, domain, type) from append-only cortex_thoughts. | |
cortex_worldview | 65 | VIEW: ranked slice of an entity's active thoughts for worldview displays. | |
current_logos_agent_connection_assignments | 50 | VIEW: current effective assignment per connection. | |
current_logos_agent_connection_state | 33 | VIEW: latest state row per connection (active session metadata). | |
matrix_communications | * | 5,718 | VIEW: flat legacy message shape (v2 messages + sidecars joined). |
matrix_conversations | * | 2,980 | VIEW: legacy conversation header shape from matrix_meeting_conversations. |
matrix_terminal_response_messages | 85 | VIEW: correctness check — terminal lifecycle responses that should have closed their parent request. | |
vw_logos_asset_relationships_current | 7 | Registry current-state view. | |
vw_logos_assets_current | 5,361 | VIEW: latest revision per asset_id from append-only logos_assets. | |
vw_logos_attributes_current | 25,116 | VIEW: latest value per (asset_id, name) from logos_attributes. | |
vw_logos_links_current | 892 | VIEW: latest active link per (source, target, type) from logos_links. | |
vw_logos_platform_assets_current | 1,214 | Registry current-state view. | |
vw_logos_skills_details | — | VIEW: skill asset body + metadata for skill detail pages. | |
vw_logos_skills_list | — | VIEW: skill assets joined with current attributes for /reports/workspace/skills/. | |
vw_logos_world_assets_current | 4,147 | Registry current-state view. | |
workspace_project_members | 25 | VIEW: project membership for workspace registry. | |
workspace_projects | 23 | VIEW: MySQL registry mirror of promoted workspace projects (slug, owner). |
Master entity registry — humans, AIs, projects, apps. Writers: onboarding, entity_register, MCP identity tools. All Matrix/Cortex traffic resolves entity_name → id here.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'Unique identifier for each entity' | |
| 2 | entity_name |
b'varchar(255)' | NO | UNI | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | ||
| 3 | entity_type |
b"enum('ai','human','system','organization','concept','objective','html_locked','html_unlocked','special_agent','avatar','project','application','group')" | YES | MUL | b'ai' | b'' | |
| 4 | metadata |
b'json' | YES | b'Flexible storage for entity-specific data (personality prompts, configurations, etc.)' | |||
| 5 | active_status |
b"enum('active','passive','standby','inactive')" | YES | MUL | b'active' | b'Current operational state of the entity' | |
| 6 | created |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this entity was first created' | |
| 7 | wakeup_bootstrap |
b'text' | YES | b'' | |||
| 8 | default_bounce_limit |
b'int' | NO | b'1' | b'Quality iterations: 1=single pass, 2+=Judge AI evaluates and can request regeneration' | ||
| 9 | linked_user_id |
b'int' | YES | MUL | b'LOGOS users.id when entity_type is human' |
PRIMARY (unique id)idx_active_status (active_status)idx_ce_linked_user (linked_user_id)idx_entity_name (entity_name)idx_entity_type (entity_type)Polymorphic relationship graph (entity↔entity, entity↔thought, etc.). Writers: pairing, works_on, skill subscriptions, graph APIs.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'Unique identifier for each relationship' | |
| 2 | source_type |
b"enum('entity','thought')" | NO | MUL | b'Type of the source (entity from cortex_entities or thought from cortex_thoughts_unified)' | ||
| 3 | source_id |
b'varchar(255)' | NO | b'ID or name of the source (entity_name if entity, thought_id if thought)' | |||
| 4 | target_type |
b"enum('entity','thought')" | NO | MUL | b'Type of the target (entity from cortex_entities or thought from cortex_thoughts_unified)' | ||
| 5 | target_id |
b'varchar(255)' | NO | b'ID or name of the target (entity_name if entity, thought_id if thought)' | |||
| 6 | relationship_type |
b'varchar(100)' | NO | MUL | b'Nature of relationship (agrees_with, contradicts, elaborates, owns, believes, collaborates_with, etc.)' | ||
| 7 | role |
b'varchar(64)' | YES | MUL | b'Duty/responsibility (owner, editor, member, \xe2\x80\xa6)' | ||
| 8 | strength |
b'decimal(5,4)' | YES | MUL | b'0.5000' | b'Strength/confidence of this relationship (starts at 0.5, typically 0-1 range)' | |
| 9 | metadata |
b'json' | YES | b'Additional relationship data (context, conditions, temporal validity, etc.)' | |||
| 10 | created |
b'datetime' | YES | MUL | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this relationship was established' |
PRIMARY (unique id)idx_created (created)idx_cru_role (role)idx_relationship_type (relationship_type)idx_source (source_type, source_id)idx_strength (strength)idx_target (target_type, target_id)Append-only cognition store (Casey spec). One row per thought revision; current value = latest row per (entity_id, domain, thought_type). Writers: thought_store, agent.add_thought(), Cortex engines.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | PRI | auto_increment | b'' | |
| 2 | entity_id |
b'int' | NO | MUL | b'FK cortex_entities.id' | ||
| 3 | thought_type |
b'varchar(64)' | NO | b'' | |||
| 4 | domain |
b'varchar(191)' | NO | b'' | |||
| 5 | content |
b'text' | NO | b'' | |||
| 6 | parent_id |
b'bigint' | YES | MUL | b'' | ||
| 7 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)idx_parent (parent_id)idx_slot (entity_id, domain, thought_type, id)Key/value Cortex runtime configuration (feature flags, thresholds). Read by cortex_engine and /logos/config/ surfaces.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | config_name |
b'varchar(100)' | NO | UNI | b'' | ||
| 3 | config_value |
b'text' | NO | b'' | |||
| 4 | category |
b'varchar(50)' | YES | b'general' | b'' | ||
| 5 | description |
b'varchar(500)' | YES | b'' | |||
| 6 | updated_at |
b'timestamp' | YES | on update CURRENT_TIMESTAMP | b'' | ||
| 7 | date_added |
b'timestamp' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)uq_config_name (config_name)Maps entities to responsibility roles (operator, steward, etc.) for governance and routing hints.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | code |
b'varchar(64)' | NO | PRI | b'' | ||
| 2 | label |
b'varchar(128)' | NO | b'' | b'' | ||
| 3 | description |
b'text' | YES | b'' | |||
| 4 | active |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 5 | created_at |
b'datetime(6)' | NO | b'CURRENT_TIMESTAMP(6)' | DEFAULT_GENERATED | b'' |
PRIMARY (unique code)Active Cortex processing sessions (validation rounds, bounce state). Writers: validation engines during message elevation.
* Cleanup candidate: 0 rows — validation-session table; wire up or drop if sessions model retired
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | session_id |
b'varchar(255)' | NO | UNI | b'' | ||
| 3 | user_data |
b'text' | YES | b'' | |||
| 4 | created_at |
b'timestamp' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 5 | updated_at |
b'timestamp' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED on update CURRENT_TIMESTAMP | b'' |
PRIMARY (unique id)session_id (session_id)Skill tree metadata for Cortex capabilities (parent/child skills, ranks). Read by skill pickers and agent capability grants.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | parent_name |
b'varchar(100)' | NO | MUL | b'Parent skill/skillset/workflow config_name' | ||
| 3 | child_name |
b'varchar(100)' | NO | MUL | b'Child skill config_name' | ||
| 4 | priority |
b'int' | NO | b'50' | b'Order within parent (lower = first)' |
PRIMARY (unique id)idx_child (child_name)idx_parent (parent_name, priority)uq_parent_child (parent_name, child_name)Canonical controlled vocabulary — entity/meeting/message/thought types, statuses, roles, relationship types. Seed + Types.propose/approve. Single source of truth for type validation.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | category |
b'varchar(64)' | NO | PRI | b'' | ||
| 2 | type_key |
b'varchar(64)' | NO | PRI | b'' | ||
| 3 | display_name |
b'varchar(128)' | NO | b'' | |||
| 4 | description |
b'varchar(500)' | YES | b'' | |||
| 5 | metadata |
b'json' | YES | b'Optional display metadata (icon, type_ranking, etc.)' | |||
| 6 | status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 7 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 8 | created_by_entity_id |
b'bigint' | YES | b'' |
PRIMARY (unique category, type_key)idx_category_status (category, status)Entity ↔ meeting time windows (enter/exit/re-enter = new row). Scopes message visibility in meeting_history_sql().
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | PRI | auto_increment | b'' | |
| 2 | meeting_id |
b'bigint' | NO | MUL | b'' | ||
| 3 | entity_id |
b'bigint' | NO | MUL | b'' | ||
| 4 | role |
b'varchar(64)' | NO | b'participant' | b'' | ||
| 5 | objective |
b'varchar(255)' | YES | b'' | |||
| 6 | entered_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 7 | exited_at |
b'datetime' | YES | b'' |
PRIMARY (unique id)idx_entity (entity_id, entered_at)idx_meeting_entity (meeting_id, entity_id, entered_at)idx_meeting_role (meeting_id, role)conversation_id ↔ meeting_id map plus chat config (Cortex prompts, bounce limits, summaries). Writers: meeting_store, Conversation class.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | conversation_id |
b'varchar(255)' | NO | PRI | b'' | ||
| 2 | meeting_id |
b'bigint' | NO | UNI | b'' | ||
| 3 | title |
b'varchar(500)' | YES | b'' | |||
| 4 | participants |
b'text' | YES | b'' | |||
| 5 | created |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 6 | last_activity |
b'datetime' | YES | MUL | b'' | ||
| 7 | max_bounces |
b'int' | YES | b'10' | b'' | ||
| 8 | max_auto_rounds |
b'int' | YES | b'0' | b'' | ||
| 9 | current_auto_round |
b'int' | YES | b'0' | b'' | ||
| 10 | conversation_mode |
b'varchar(50)' | YES | b'standard' | b'' | ||
| 11 | cortex_active |
b'tinyint(1)' | YES | b'1' | b'' | ||
| 12 | quality_threshold |
b'decimal(5,4)' | YES | b'7.0000' | b'' | ||
| 13 | cortex_system_prompt |
b'text' | YES | b'' | |||
| 14 | cortex_active_level |
b'tinyint' | NO | b'1' | b'' | ||
| 15 | cortex_mode |
b'int' | YES | b'1' | b'' | ||
| 16 | summary |
b'text' | YES | b'' | |||
| 17 | summary_updated_at |
b'datetime' | YES | b'' |
PRIMARY (unique conversation_id)idx_last_activity (last_activity)idx_meeting (meeting_id)uq_meeting (meeting_id)Casey three-table core: one structured group activity (chat thread, dev thread, ticket thread). Writers: meeting_store.ensure_meeting.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | PRI | auto_increment | b'' | |
| 2 | started_by_entity_id |
b'bigint' | NO | MUL | b'' | ||
| 3 | meeting_type |
b'varchar(64)' | NO | b'meeting' | b'' | ||
| 4 | objective |
b'varchar(255)' | YES | b'' | |||
| 5 | status |
b'varchar(32)' | NO | MUL | b'active' | b'' | |
| 6 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)idx_starter (started_by_entity_id, created_at)idx_status (status)Per-recipient inbox state (delivered_at, read_at, archived_at). Writers: lifecycle fanout on directed messages; readers: inbox APIs.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | PRI | auto_increment | b'' | |
| 2 | message_id |
b'int' | NO | MUL | b'' | ||
| 3 | recipient_entity |
b'varchar(128)' | NO | MUL | b'' | ||
| 4 | sender_entity |
b'varchar(128)' | NO | b'' | b'' | ||
| 5 | conversation_id |
b'varchar(255)' | NO | b'' | b'' | ||
| 6 | message_type |
b'varchar(32)' | NO | b'message' | b'' | ||
| 7 | delivered_at |
b'datetime' | NO | b'' | |||
| 8 | read_at |
b'datetime' | YES | b'' | |||
| 9 | archived_at |
b'datetime' | YES | b'' |
PRIMARY (unique id)idx_recipient_conv (recipient_entity, conversation_id, delivered_at)idx_recipient_inbox (recipient_entity, archived_at, read_at, delivered_at)idx_recipient_unread (recipient_entity, read_at, delivered_at)uniq_message_recipient (message_id, recipient_entity)Lifecycle processor sidecar: status, effective_at, response_code, parent/root linkage. Writers: lifecycle processor, append_communication.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | message_id |
b'bigint' | NO | PRI | b'' | ||
| 2 | conversation_id |
b'varchar(255)' | NO | MUL | b'' | ||
| 3 | message_subtype |
b'varchar(64)' | NO | b'' | b'' | ||
| 4 | lifecycle_parent_id |
b'bigint' | YES | MUL | b'' | ||
| 5 | lifecycle_root_id |
b'bigint' | YES | MUL | b'' | ||
| 6 | lifecycle_status |
b'varchar(32)' | NO | MUL | b'closed' | b'' | |
| 7 | effective_at |
b'datetime' | YES | b'' | |||
| 8 | response_code |
b'varchar(64)' | NO | b'' | b'' | ||
| 9 | lifecycle_processed_at |
b'datetime' | YES | MUL | b'' | ||
| 10 | message_type |
b'varchar(32)' | YES | MUL | b'message' | b'' |
PRIMARY (unique message_id)idx_conversation (conversation_id)idx_lifecycle_root (lifecycle_root_id)idx_lifecycle_status (lifecycle_status, effective_at)idx_lifecycle_unprocessed (lifecycle_processed_at, message_id)idx_matrix_lifecycle_effective (lifecycle_status, effective_at)idx_matrix_lifecycle_parent (lifecycle_parent_id)idx_matrix_lifecycle_type_subtype_status (message_type, message_subtype, lifecycle_status)QC/inbox sidecar: validation_status, processing_status, prompts, direct_recipient JSON. Writers: append_communication, validation engines.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | message_id |
b'bigint' | NO | PRI | b'' | ||
| 2 | entity_name |
b'varchar(255)' | NO | MUL | b'' | ||
| 3 | conversation_id |
b'varchar(255)' | NO | MUL | b'' | ||
| 4 | source_prompt |
b'mediumtext' | YES | b'' | |||
| 5 | is_processed |
b'tinyint(1)' | NO | b'0' | b'' | ||
| 6 | is_ai_generated |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 7 | parent_message_id |
b'varchar(36)' | YES | b'' | |||
| 8 | action_tags_resolved |
b'tinyint(1)' | YES | b'0' | b'' | ||
| 9 | elevation_count |
b'int' | YES | b'0' | b'' | ||
| 10 | direct_recipient |
b'varchar(255)' | YES | b'' | |||
| 11 | processing_status |
b"enum('pending','processing','resolved','finalized')" | NO | MUL | b'pending' | b'' | |
| 12 | response_round |
b'int' | YES | b'' | |||
| 13 | raw_response |
b'mediumtext' | YES | b'' | |||
| 14 | engine_processing_log |
b'json' | YES | b'' | |||
| 15 | source_prompt_raw |
b'mediumtext' | YES | b'' | |||
| 16 | output_message_raw |
b'mediumtext' | YES | b'' | |||
| 17 | validation_status |
b"enum('none','pending','approved','force_approved','rejected')" | NO | MUL | b'none' | b'' | |
| 18 | message_context |
b'json' | YES | b'' | |||
| 19 | entity_name_to |
b'varchar(100)' | YES | b'' | |||
| 20 | evaluator_count |
b'tinyint' | YES | b'' |
PRIMARY (unique message_id)idx_conversation (conversation_id)idx_entity (entity_name)idx_processing (processing_status)idx_validation (validation_status, conversation_id)Lifecycle fan-out rules (message_type → spawn children). 0 rows in prod — processor no-ops when empty; drop candidate if fan-out stays unused.
* Cleanup candidate: 0 rows — fan-out config unused; lifecycle no-ops; drop if spawn rules never ship
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | source_message_type |
b'varchar(32)' | NO | MUL | b'' | ||
| 3 | source_message_subtype |
b'varchar(64)' | YES | b'' | b'' | ||
| 4 | source_response_code |
b'varchar(64)' | YES | b'' | b'' | ||
| 5 | child_message_type |
b'varchar(32)' | NO | b'' | |||
| 6 | child_message_subtype |
b'varchar(64)' | YES | b'' | b'' | ||
| 7 | child_status |
b'varchar(32)' | YES | b'open' | b'' | ||
| 8 | child_effective_delay_seconds |
b'int' | YES | b'0' | b'' | ||
| 9 | child_body_template |
b'text' | YES | b'' | |||
| 10 | is_active |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 11 | sort_order |
b'int' | YES | b'0' | b'' |
PRIMARY (unique id)idx_mta_match (source_message_type, source_message_subtype, source_response_code, is_active)Immutable message content + routing (sender, recipients, parent_message_id). Writers: meeting_store.append_message / append_communication.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | PRI | auto_increment | b'' | |
| 2 | meeting_id |
b'bigint' | NO | MUL | b'' | ||
| 3 | sender_entity_id |
b'bigint' | NO | MUL | b'' | ||
| 4 | message_type |
b'varchar(64)' | NO | b'message' | b'' | ||
| 5 | recipient_list |
b'text' | YES | b'' | |||
| 6 | content |
b'text' | NO | b'' | |||
| 7 | parent_message_id |
b'bigint' | YES | MUL | b'' | ||
| 8 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)idx_meeting (meeting_id, id)idx_parent (parent_message_id)idx_sender (sender_entity_id, id)Per-AI per-conversation prompts, bounce limits, participation_mode. Replaces dropped matrix_ai_participation. Writers: upsert_ai_participation.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | conversation_id |
b'varchar(255)' | NO | MUL | b'' | ||
| 3 | entity_name |
b'varchar(255)' | NO | MUL | b'' | ||
| 4 | participation_mode |
b"enum('always_active','on_demand','away','evaluator')" | NO | b'on_demand' | b'' | ||
| 5 | ai_system_prompt |
b'text' | YES | b'' | |||
| 6 | response_metadata |
b'json' | YES | b'' | |||
| 7 | bounce_limit |
b'int' | YES | b'' | |||
| 8 | last_updated |
b'timestamp' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED on update CURRENT_TIMESTAMP | b'' | |
| 9 | created |
b'timestamp' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)idx_conversation (conversation_id)idx_entity (entity_name)unique_conversation_entity (conversation_id, entity_name)Reference table mapping response_code → parent lifecycle status (fixed, needs_info, blocked, etc.). Seeded; read by lifecycle processor.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | response_code |
b'varchar(64)' | NO | PRI | b'' | ||
| 2 | parent_status |
b'varchar(32)' | NO | b'' | b'' | ||
| 3 | is_terminal |
b'tinyint(1)' | NO | b'0' | b'' | ||
| 4 | description |
b'text' | YES | b'' |
PRIMARY (unique response_code)Append-only claims linking a connection to entity/user/project context.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | agent_connector_key |
b'varchar(512)' | NO | PRI | b'' | ||
| 2 | effective_at |
b'datetime(6)' | NO | PRI | b'' | ||
| 3 | entity_id |
b'bigint' | NO | MUL | b'0' | b'' | |
| 4 | user_id |
b'bigint' | NO | MUL | b'0' | b'' | |
| 5 | project_id |
b'bigint' | NO | MUL | b'0' | b'' | |
| 6 | assignment_kind |
b'varchar(32)' | NO | b'' | |||
| 7 | role |
b'varchar(32)' | YES | b'' | |||
| 8 | responsibility |
b'varchar(64)' | YES | b'' | |||
| 9 | status |
b'varchar(32)' | NO | MUL | b'active' | b'' | |
| 10 | change_reason |
b'varchar(64)' | YES | b'' | |||
| 11 | changed_by_connector |
b'varchar(512)' | YES | b'' | |||
| 12 | details_json |
b'json' | YES | b'' |
PRIMARY (unique agent_connector_key, effective_at)idx_assignment_kind (agent_connector_key, assignment_kind, effective_at)idx_entity (entity_id, effective_at)idx_project (project_id, effective_at)idx_status (status)idx_user (user_id, effective_at)MCP/agent connection registry (OAuth session, bearer token, service identity).
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | agent_connector_key |
b'varchar(512)' | NO | PRI | b'' | ||
| 2 | connector_kind |
b'varchar(32)' | NO | MUL | b'' | ||
| 3 | issuer |
b'varchar(255)' | YES | b'' | |||
| 4 | oauth_subject |
b'varchar(255)' | YES | b'' | |||
| 5 | oauth_client_id |
b'varchar(255)' | YES | MUL | b'' | ||
| 6 | base_ai_user_id |
b'bigint' | YES | MUL | b'' | ||
| 7 | primary_human_user_id |
b'bigint' | YES | MUL | b'' | ||
| 8 | client_label |
b'varchar(255)' | YES | b'' | |||
| 9 | user_agent |
b'text' | YES | b'' | |||
| 10 | details_json |
b'json' | YES | b'' | |||
| 11 | first_seen_at |
b'datetime(6)' | NO | MUL | b'' | ||
| 12 | last_metadata_at |
b'datetime(6)' | YES | b'' |
PRIMARY (unique agent_connector_key)idx_base_ai_user (base_ai_user_id)idx_connector_kind (connector_kind)idx_first_seen (first_seen_at)idx_oauth_client (oauth_client_id)idx_primary_human (primary_human_user_id)Long-lived API tokens for programmatic LOGOS access.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | user_id |
b'int' | NO | MUL | b'' | ||
| 3 | token_hash |
b'varchar(128)' | NO | UNI | b'' | ||
| 4 | token_prefix |
b'varchar(16)' | NO | b'' | |||
| 5 | label |
b'varchar(120)' | NO | b'' | b'' | ||
| 6 | created_at |
b'timestamp' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 7 | last_used_at |
b'timestamp' | YES | b'' | |||
| 8 | revoked_at |
b'timestamp' | YES | MUL | b'' |
PRIMARY (unique id)idx_logos_api_tokens_revoked (revoked_at)idx_logos_api_tokens_user (user_id)token_hash (token_hash)Registered OAuth clients (Cursor MCP, PhoneMate, etc.).
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | client_id |
b'varchar(80)' | NO | PRI | b'' | ||
| 2 | client_secret_hash |
b'varchar(255)' | YES | b'' | |||
| 3 | name |
b'varchar(120)' | NO | b'' | |||
| 4 | redirect_uris |
b'text' | NO | b'' | |||
| 5 | allowed_user_id |
b'int' | YES | MUL | b'' | ||
| 6 | scopes |
b'varchar(255)' | NO | b'' | b'' | ||
| 7 | pkce_required |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 8 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 9 | revoked_at |
b'datetime' | YES | b'' | |||
| 10 | dynamic_registration |
b'tinyint(1)' | NO | b'0' | b'' | ||
| 11 | bound_human_user_id |
b'int' | YES | MUL | b'' |
PRIMARY (unique client_id)idx_bound_human (bound_human_user_id)idx_user (allowed_user_id)Short-lived OAuth authorization codes during MCP/human login flow.
* Cleanup candidate: Ephemeral auth codes — add retention purge; do not drop table
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | code |
b'varchar(128)' | NO | PRI | b'' | ||
| 2 | client_id |
b'varchar(80)' | NO | MUL | b'' | ||
| 3 | user_id |
b'int' | NO | b'' | |||
| 4 | redirect_uri |
b'varchar(512)' | NO | b'' | |||
| 5 | code_challenge |
b'varchar(256)' | YES | b'' | |||
| 6 | code_challenge_method |
b'varchar(16)' | YES | b'' | |||
| 7 | scope |
b'varchar(255)' | NO | b'' | b'' | ||
| 8 | state |
b'varchar(256)' | YES | b'' | |||
| 9 | expires_at |
b'datetime' | NO | MUL | b'' | ||
| 10 | used_at |
b'datetime' | YES | b'' | |||
| 11 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique code)idx_client (client_id)idx_expires (expires_at)Human user accounts (login, profile, sms_number for outbound SMS). Writers: Identity OAuth, admin onboarding.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | username |
b'varchar(255)' | NO | b'' | |||
| 3 | password |
b'varchar(255)' | NO | b'' | |||
| 4 | date_added |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 5 | about_me |
b'text' | YES | b'' | |||
| 6 | logos_entity |
b'varchar(255)' | YES | b'' | |||
| 7 | display_name |
b'varchar(255)' | YES | b'' | |||
| 8 | email |
b'varchar(255)' | YES | b'' | |||
| 9 | is_ai |
b'tinyint(1)' | NO | b'0' | b'' | ||
| 10 | sms_number |
b'varchar(24)' | YES | MUL | b'' | ||
| 11 | sms_carrier |
b'varchar(24)' | YES | b'' | |||
| 12 | sms_opt_in |
b'tinyint(1)' | NO | b'0' | b'' | ||
| 13 | cortex_entity_id |
b'int' | YES | MUL | b'FK to cortex_entities.id for this human' | ||
| 14 | workspace_provisioned_at |
b'datetime(6)' | YES | b'When dedicated Users/<name>/ workspace was created' |
PRIMARY (unique id)idx_users_cortex_entity (cortex_entity_id)idx_users_sms_number (sms_number)Platform-wide structured log sink (errors, boot events, subsystem traces).
* Cleanup candidate: Platform log sink — add rotation/archival; table stays
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | created_at |
b'datetime(6)' | NO | MUL | b'CURRENT_TIMESTAMP(6)' | DEFAULT_GENERATED | b'' |
| 3 | severity |
b'varchar(16)' | NO | b'error' | b'' | ||
| 4 | subsystem |
b'varchar(32)' | NO | MUL | b'' | b'' | |
| 5 | event_type |
b'varchar(64)' | NO | b'' | b'' | ||
| 6 | message |
b'text' | NO | b'' | |||
| 7 | detail_json |
b'json' | YES | b'' | |||
| 8 | correlation_id |
b'varchar(64)' | NO | MUL | b'' | b'' | |
| 9 | session_id |
b'varchar(128)' | NO | MUL | b'' | b'' | |
| 10 | session_started_at |
b'datetime(6)' | YES | b'' | |||
| 11 | human_user_id |
b'int' | YES | MUL | b'' | ||
| 12 | human_username |
b'varchar(128)' | YES | b'' | |||
| 13 | ai_user_id |
b'bigint' | YES | MUL | b'' | ||
| 14 | ai_username |
b'varchar(128)' | YES | b'' | |||
| 15 | ai_entity |
b'varchar(128)' | YES | b'' | |||
| 16 | oauth_client_id |
b'varchar(80)' | YES | b'' | |||
| 17 | project_slug |
b'varchar(128)' | YES | b'' | |||
| 18 | tool_name |
b'varchar(128)' | YES | b'' | |||
| 19 | http_method |
b'varchar(16)' | YES | b'' | |||
| 20 | http_path |
b'varchar(512)' | YES | b'' | |||
| 21 | stack_trace |
b'text' | YES | b'' |
PRIMARY (unique id)idx_lpe_ai (ai_user_id, created_at)idx_lpe_corr (correlation_id)idx_lpe_created (created_at)idx_lpe_human (human_user_id, created_at)idx_lpe_session (session_id, created_at)idx_lpe_subsystem (subsystem, created_at)HTTP request audit (path, latency, status) for operator diagnostics.
* Cleanup candidate: HTTP audit log — add rotation/archival; table stays
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | entity_name |
b'varchar(255)' | NO | MUL | b'' | ||
| 3 | url |
b'varchar(2048)' | NO | MUL | b'' | ||
| 4 | success |
b'tinyint(1)' | NO | b'0' | b'' | ||
| 5 | content_chars |
b'int' | YES | b'0' | b'' | ||
| 6 | call_context |
b'varchar(50)' | YES | b'conversation' | b'' | ||
| 7 | error_message |
b'varchar(500)' | YES | b'' | |||
| 8 | created_at |
b'datetime' | YES | MUL | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)idx_created (created_at)idx_entity (entity_name)idx_url (url)Outbound SMS audit trail (recipient, carrier, dry_run, Twilio responses). Writers: Matrix sms.py dispatch.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | sent_at |
b'datetime' | NO | MUL | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
| 3 | sender_user_id |
b'int' | YES | MUL | b'' | ||
| 4 | sender_username |
b'varchar(120)' | YES | b'' | |||
| 5 | sender_ai_entity |
b'varchar(120)' | YES | b'' | |||
| 6 | recipient_user_id |
b'int' | YES | MUL | b'' | ||
| 7 | recipient_label |
b'varchar(120)' | YES | b'' | |||
| 8 | to_number |
b'varchar(24)' | NO | b'' | |||
| 9 | body |
b'text' | NO | b'' | |||
| 10 | provider |
b'varchar(24)' | NO | b'' | |||
| 11 | provider_message_id |
b'varchar(160)' | YES | b'' | |||
| 12 | status |
b'varchar(24)' | NO | b'' | |||
| 13 | error_message |
b'text' | YES | b'' |
PRIMARY (unique id)idx_sms_log_recipient (recipient_user_id)idx_sms_log_sender (sender_user_id)idx_sms_log_sent_at (sent_at)Platform identity, connector, registry, jobs, or operations object.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | relationship_id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | source_asset_id |
b'int unsigned' | NO | MUL | b'' | ||
| 3 | related_asset_id |
b'int unsigned' | NO | MUL | b'' | ||
| 4 | relationship_type |
b'varchar(64)' | NO | MUL | b'' | ||
| 5 | description |
b'text' | YES | b'' | |||
| 6 | sort_order |
b'varchar(32)' | YES | b'' | |||
| 7 | record_status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 8 | human_user_id |
b'int' | NO | MUL | b'0' | b'' | |
| 9 | added_by_entity |
b'varchar(128)' | NO | b'' | |||
| 10 | added_at |
b'datetime(6)' | NO | b'' |
PRIMARY (unique relationship_id)idx_logos_asset_rel_human (human_user_id)idx_logos_asset_rel_src (source_asset_id, relationship_type)idx_logos_asset_rel_tgt (related_asset_id, relationship_type)idx_logos_asset_rel_type (relationship_type)Platform identity, connector, registry, jobs, or operations object.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | asset_type |
b'varchar(64)' | NO | PRI | b'' | ||
| 2 | display_label |
b'varchar(128)' | NO | b'' | |||
| 3 | description |
b'text' | YES | b'' | |||
| 4 | default_asset_layer |
b'varchar(32)' | NO | MUL | b'platform' | b'' | |
| 5 | authority_store |
b'varchar(32)' | NO | b'registry' | b'' | ||
| 6 | scope_modes |
b'json' | NO | b'' | |||
| 7 | key_field |
b'varchar(64)' | NO | b'asset_key' | b'' | ||
| 8 | body_format |
b'varchar(32)' | YES | b'' | |||
| 9 | router_type |
b'varchar(64)' | YES | b'' | |||
| 10 | supports_links |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 11 | supports_events |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 12 | soft_delete |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 13 | is_registry_type |
b'tinyint(1)' | NO | b'1' | b'' | ||
| 14 | record_status |
b'varchar(32)' | NO | MUL | b'active' | b'' | |
| 15 | sort_order |
b'int' | NO | b'0' | b'' | ||
| 16 | tags_json |
b'json' | YES | b'' | |||
| 17 | added_at |
b'datetime(6)' | NO | b'' | |||
| 18 | added_by_entity |
b'varchar(128)' | NO | b'system' | b'' |
PRIMARY (unique asset_type)idx_logos_asset_types_layer (default_asset_layer)idx_logos_asset_types_status (record_status)Append-only asset catalog (skills, tables, views, pages, jobs, …). Writers: skill_create, view_create, page_create, registry_register_asset, write_primary paths.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | asset_id |
b'int unsigned' | NO | MUL | b'' | ||
| 3 | asset_key |
b'varchar(128)' | YES | MUL | b'' | ||
| 4 | asset_type |
b'varchar(64)' | NO | MUL | b'' | ||
| 5 | asset_name |
b'varchar(255)' | NO | MUL | b'' | ||
| 6 | asset_description |
b'text' | YES | b'' | |||
| 7 | asset_body |
b'mediumtext' | YES | b'' | |||
| 8 | asset_body_format |
b'varchar(32)' | YES | b'' | |||
| 9 | scope |
b'varchar(128)' | NO | MUL | b'' | ||
| 10 | asset_layer |
b'varchar(32)' | NO | b'platform' | b'' | ||
| 11 | parent_asset_id |
b'int unsigned' | YES | MUL | b'' | ||
| 12 | sort_order |
b'varchar(32)' | YES | b'' | |||
| 13 | human_user_id |
b'int' | NO | MUL | b'0' | b'' | |
| 14 | ai_user_id |
b'int' | NO | b'0' | b'' | ||
| 15 | added_by_entity |
b'varchar(128)' | NO | b'' | |||
| 16 | record_status |
b'varchar(32)' | NO | MUL | b'active' | b'' | |
| 17 | archive_strategy |
b'json' | YES | b'' | |||
| 18 | tags_json |
b'json' | YES | b'' | |||
| 19 | added_at |
b'datetime(6)' | NO | b'' |
PRIMARY (unique id)idx_logos_assets_asset_id (asset_id)idx_logos_assets_human (human_user_id, ai_user_id)idx_logos_assets_key (asset_key)idx_logos_assets_name (asset_name)idx_logos_assets_natural_key (asset_type, asset_key, asset_layer, scope, human_user_id)idx_logos_assets_parent (parent_asset_id, sort_order)idx_logos_assets_record_status (record_status)idx_logos_assets_scope (scope)idx_logos_assets_type (asset_type)uq_logos_assets_version (asset_id, added_at)Append-only key/value metadata on assets (visibility, trigger_phrases, …). Writers: registry_set_attribute.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | attribute_id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | asset_id |
b'int unsigned' | NO | MUL | b'' | ||
| 3 | name |
b'varchar(128)' | NO | MUL | b'' | ||
| 4 | value_text |
b'text' | YES | b'' | |||
| 5 | value_number |
b'double' | YES | b'' | |||
| 6 | value_json |
b'json' | YES | b'' | |||
| 7 | human_user_id |
b'int' | NO | MUL | b'0' | b'' | |
| 8 | set_by_entity |
b'varchar(128)' | NO | b'' | |||
| 9 | set_at |
b'datetime(6)' | NO | b'' |
PRIMARY (unique attribute_id)idx_logos_attrs_asset_name (asset_id, name, set_at)idx_logos_attrs_human (human_user_id)idx_logos_attrs_name (name)Telemetry ledger — invocations, registry audit events, queue drain progress. Writers: registry_log_event, job runs. (Historical rows may include event_type='dual_write' from pre-cutover migration.)
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | event_id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | event_type |
b'varchar(64)' | NO | MUL | b'' | ||
| 3 | subject_id |
b'int unsigned' | YES | MUL | b'' | ||
| 4 | related_id |
b'int unsigned' | YES | b'' | |||
| 5 | actor_entity |
b'varchar(128)' | NO | MUL | b'' | ||
| 6 | human_user_id |
b'int' | NO | MUL | b'0' | b'' | |
| 7 | outcome |
b'varchar(32)' | YES | b'' | |||
| 8 | score |
b'double' | YES | b'' | |||
| 9 | payload_json |
b'json' | YES | b'' | |||
| 10 | notes |
b'text' | YES | b'' | |||
| 11 | occurred_at |
b'datetime(6)' | NO | b'' |
PRIMARY (unique event_id)idx_logos_events_actor (actor_entity)idx_logos_events_human (human_user_id, occurred_at)idx_logos_events_subject (subject_id, occurred_at)idx_logos_events_type (event_type, occurred_at)Append-only execution history per logos_jobs row (status, lease, output).
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | job_id |
b'bigint unsigned' | NO | MUL | b'' | ||
| 3 | started_at |
b'datetime' | NO | MUL | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
| 4 | finished_at |
b'datetime' | YES | b'' | |||
| 5 | status |
b"enum('running','success','failed','skipped')" | NO | b'running' | b'' | ||
| 6 | run_mode |
b"enum('core','mcp_tools','agentic','composite')" | NO | b'' | |||
| 7 | summary |
b'text' | YES | b'' | |||
| 8 | error_text |
b'text' | YES | b'' | |||
| 9 | tool_calls_json |
b'json' | YES | b'' | |||
| 10 | triggered_by |
b'varchar(64)' | NO | b'scheduler' | b'' |
PRIMARY (unique id)idx_logos_job_runs_job (job_id, started_at)idx_logos_job_runs_started (started_at)Scheduled job definitions (cron, handler, owner, approval). Writers: job_create, Platform/Jobs scheduler.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | job_key |
b'varchar(128)' | NO | b'' | |||
| 3 | owner_entity |
b'varchar(128)' | NO | MUL | b'' | ||
| 4 | owner_ai_user_id |
b'int' | YES | b'' | |||
| 5 | human_user_id |
b'int' | NO | MUL | b'0' | b'' | |
| 6 | human_username |
b'varchar(120)' | YES | b'' | |||
| 7 | project_slug |
b'varchar(64)' | YES | b'' | |||
| 8 | priority |
b'int' | NO | b'0' | b'' | ||
| 9 | title |
b'varchar(255)' | NO | b'' | b'' | ||
| 10 | description |
b'text' | YES | b'' | |||
| 11 | run_mode |
b"enum('core','mcp_tools','agentic','composite')" | NO | b'mcp_tools' | b'' | ||
| 12 | schedule_kind |
b"enum('once','interval')" | NO | b'interval' | b'' | ||
| 13 | interval_seconds |
b'int' | YES | b'' | |||
| 14 | cron_expr |
b'varchar(128)' | YES | b'' | |||
| 15 | timezone |
b'varchar(64)' | NO | b'UTC' | b'' | ||
| 16 | next_run_at |
b'datetime' | YES | b'' | |||
| 17 | last_run_at |
b'datetime' | YES | b'' | |||
| 18 | status |
b"enum('pending_approval','active','paused','completed','failed','running')" | NO | MUL | b'pending_approval' | b'' | |
| 19 | payload_json |
b'json' | YES | b'' | |||
| 20 | skill_name |
b'varchar(128)' | YES | b'' | |||
| 21 | skill_version_pinned |
b'varchar(64)' | YES | b'' | |||
| 22 | max_runs_per_day |
b'int' | NO | b'24' | b'' | ||
| 23 | min_interval_seconds |
b'int' | NO | b'300' | b'' | ||
| 24 | runs_today |
b'int' | NO | b'0' | b'' | ||
| 25 | runs_today_date |
b'date' | YES | b'' | |||
| 26 | consecutive_failures |
b'int' | NO | b'0' | b'' | ||
| 27 | max_consecutive_failures |
b'int' | NO | b'3' | b'' | ||
| 28 | lease_expires_at |
b'datetime' | YES | b'' | |||
| 29 | created_by_entity |
b'varchar(128)' | NO | b'' | b'' | ||
| 30 | approved_by |
b'varchar(120)' | YES | b'' | |||
| 31 | approved_at |
b'datetime' | YES | b'' | |||
| 32 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 33 | updated_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED on update CURRENT_TIMESTAMP | b'' |
PRIMARY (unique id)idx_logos_jobs_human (human_user_id, status)idx_logos_jobs_next_run (status, next_run_at)idx_logos_jobs_owner (owner_entity, human_user_id)uq_logos_jobs_scope_key (owner_entity, human_user_id, job_key)Append-only graph edges between assets/thoughts (reads, composes, cites, …). Writers: registry_link_assets, skill_create related_* backfill.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | link_id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | source_id |
b'int unsigned' | NO | MUL | b'' | ||
| 3 | target_id |
b'int unsigned' | NO | MUL | b'' | ||
| 4 | target_kind |
b"enum('asset','thought')" | NO | b'asset' | b'' | ||
| 5 | link_type |
b'varchar(64)' | NO | MUL | b'' | ||
| 6 | link_status |
b'varchar(16)' | NO | b'active' | b'' | ||
| 7 | metadata_json |
b'json' | YES | b'' | |||
| 8 | notes |
b'text' | YES | b'' | |||
| 9 | human_user_id |
b'int' | NO | MUL | b'0' | b'' | |
| 10 | created_by |
b'varchar(128)' | NO | b'' | |||
| 11 | created_at |
b'datetime(6)' | NO | b'' |
PRIMARY (unique link_id)idx_logos_links_human (human_user_id)idx_logos_links_source (source_id, created_at)idx_logos_links_target (target_id, target_kind, created_at)idx_logos_links_type (link_type)Platform identity, connector, registry, jobs, or operations object.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | owner_entity |
b'varchar(128)' | NO | MUL | b'' | ||
| 3 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 4 | project_slug |
b'varchar(64)' | NO | b'' | |||
| 5 | max_concurrent_runs |
b'int' | NO | b'3' | b'' | ||
| 6 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 7 | updated_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED on update CURRENT_TIMESTAMP | b'' |
PRIMARY (unique id)uq_project_queue_limit (owner_entity, human_user_id, project_slug)Platform provider API ledger — LLM tokens, model, cost per call. Writers: Logos.Utilities.services.log_provider_call(). Future: STT/TTS and app-scoped rebilling.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | PRI | auto_increment | b'' | |
| 2 | conversation_id |
b'varchar(255)' | YES | MUL | b'' | ||
| 3 | message_id |
b'int' | YES | b'' | |||
| 4 | entity_name |
b'varchar(255)' | YES | MUL | b'' | ||
| 5 | model |
b'varchar(100)' | YES | b'' | |||
| 6 | provider |
b'varchar(50)' | YES | b'' | |||
| 7 | prompt_tokens |
b'int' | YES | b'0' | b'' | ||
| 8 | completion_tokens |
b'int' | YES | b'0' | b'' | ||
| 9 | total_tokens |
b'int' | YES | b'0' | b'' | ||
| 10 | estimated_cost |
b'decimal(10,6)' | YES | b'0.000000' | b'' | ||
| 11 | duration_seconds |
b'decimal(8,3)' | YES | b'' | |||
| 12 | call_type |
b"enum('response','judge','evaluator','consciousness','backend','thinking_round','thinking_round_followup')" | YES | MUL | b'response' | b'' | |
| 13 | created_at |
b'datetime' | YES | MUL | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
PRIMARY (unique id)idx_usage_conv (conversation_id)idx_usage_created (created_at)idx_usage_entity (entity_name)idx_usage_type (call_type)Platform identity, connector, registry, jobs, or operations object.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | PRI | auto_increment | b'' | |
| 2 | queue_asset_id |
b'int unsigned' | NO | MUL | b'' | ||
| 3 | row_key |
b'varchar(255)' | YES | b'' | |||
| 4 | checksum |
b'varchar(64)' | YES | b'' | |||
| 5 | status |
b"enum('succeeded','failed','skipped')" | NO | b'succeeded' | b'' | ||
| 6 | artifact_id |
b'int' | YES | b'' | |||
| 7 | retry_count |
b'int' | NO | b'0' | b'' | ||
| 8 | processed_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 9 | error_text |
b'text' | YES | b'' |
PRIMARY (unique id)idx_queue_checksum (queue_asset_id, checksum)idx_queue_processed (queue_asset_id, processed_at)uq_queue_row_key (queue_asset_id, row_key)Platform identity, connector, registry, jobs, or operations object.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | asset_id |
b'int unsigned' | NO | PRI | b'' | ||
| 2 | human_user_id |
b'int' | NO | PRI | b'0' | b'' | |
| 3 | asset_type |
b'varchar(64)' | NO | b'' | |||
| 4 | asset_key |
b'varchar(128)' | YES | b'' | |||
| 5 | scope |
b'varchar(128)' | NO | MUL | b'' | ||
| 6 | asset_layer |
b'varchar(32)' | NO | b'platform' | b'' | ||
| 7 | search_text |
b'mediumtext' | NO | b'' | |||
| 8 | summary_text |
b'text' | YES | b'' | |||
| 9 | source_added_at |
b'datetime(6)' | YES | b'' | |||
| 10 | indexed_at |
b'datetime(6)' | NO | MUL | b'' |
PRIMARY (unique asset_id, human_user_id)idx_semantic_indexed (indexed_at)idx_semantic_scope (scope, asset_type)Platform identity, connector, registry, jobs, or operations object.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | human_user_id |
b'int' | NO | PRI | b'' | ||
| 2 | last_index_duration_sec |
b'double' | YES | b'' | |||
| 3 | last_index_started_at |
b'datetime(6)' | YES | b'' | |||
| 4 | last_index_completed_at |
b'datetime(6)' | YES | b'' | |||
| 5 | last_index_count |
b'int' | YES | b'' | |||
| 6 | last_changed_index_count |
b'int' | YES | b'' |
PRIMARY (unique human_user_id)VIEW: latest thought per (entity, domain, type) from append-only cortex_thoughts. Primary read path for worldview/directives/tasks.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | b'0' | b'' | ||
| 2 | entity_id |
b'int' | NO | b'FK cortex_entities.id' | |||
| 3 | thought_type |
b'varchar(64)' | NO | b'' | |||
| 4 | domain |
b'varchar(191)' | NO | b'' | |||
| 5 | content |
b'text' | NO | b'' | |||
| 6 | parent_id |
b'bigint' | YES | b'' | |||
| 7 | created_at |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_thoughts_current` AS select `t`.`id` AS `id`,`t`.`entity_id` AS `entity_id`,`t`.`thought_type` AS `thought_type`,`t`.`domain` AS `domain`,`t`.`content` AS `content`,`t`.`parent_id` AS `parent_id`,`t`.`created_at` AS `created_at` from (`cortex_thoughts` `t` join (select `cortex_thoughts`.`entity_id` AS `entity_id`,`cortex_thoughts`.`domain` AS `domain`,`cortex_thoughts`.`thought_type` AS `thought_type`,max(`cortex_thoughts`.`id`) AS `mid` from `cortex_thoughts` group by `cortex_thoughts`.`entity_id`,`cortex_thoughts`.`domain`,`cortex_thoughts`.`thought_type`) `cur` on((`t`.`id` = `cur`.`mid`))) where (`t`.`content` not in ('','[deleted]'))
VIEW: current effective assignment per connection.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | agent_connector_key |
b'varchar(512)' | NO | b'' | |||
| 2 | effective_at |
b'datetime(6)' | NO | b'' | |||
| 3 | entity_id |
b'bigint' | NO | b'0' | b'' | ||
| 4 | user_id |
b'bigint' | NO | b'0' | b'' | ||
| 5 | project_id |
b'bigint' | NO | b'0' | b'' | ||
| 6 | assignment_kind |
b'varchar(32)' | NO | b'' | |||
| 7 | role |
b'varchar(32)' | YES | b'' | |||
| 8 | responsibility |
b'varchar(64)' | YES | b'' | |||
| 9 | status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 10 | change_reason |
b'varchar(64)' | YES | b'' | |||
| 11 | changed_by_connector |
b'varchar(512)' | YES | b'' | |||
| 12 | details_json |
b'json' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `current_logos_agent_connection_assignments` AS select `a`.`agent_connector_key` AS `agent_connector_key`,`a`.`effective_at` AS `effective_at`,`a`.`entity_id` AS `entity_id`,`a`.`user_id` AS `user_id`,`a`.`project_id` AS `project_id`,`a`.`assignment_kind` AS `assignment_kind`,`a`.`role` AS `role`,`a`.`responsibility` AS `responsibility`,`a`.`status` AS `status`,`a`.`change_reason` AS `change_reason`,`a`.`changed_by_connector` AS `changed_by_connector`,`a`.`details_json` AS `details_json` from (`logos_agent_connection_assignments` `a` join (select `logos_agent_connection_assignments`.`agent_connector_key` AS `agent_connector_key`,`logos_agent_connection_assignments`.`assignment_kind` AS `assignment_kind`,max(`logos_agent_connection_assignments`.`effective_at`) AS `max_effective_at` from `logos_agent_connection_assignments` where (`logos_agent_connection_assignments`.`status` <> 'revoked') group by `logos_agent_connection_assignments`.`agent_connector_key`,`logos_agent_connection_assignments`.`assignment_kind`) `latest` on(((`latest`.`agent_connector_key` = `a`.`agent_connector_key`) and (`latest`.`assignment_kind` = `a`.`assignment_kind`) and (`latest`.`max_effective_at` = `a`.`effective_at`))))
VIEW: latest state row per connection (active session metadata).
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | agent_connector_key |
b'varchar(512)' | NO | b'' | |||
| 2 | connector_kind |
b'varchar(32)' | NO | b'' | |||
| 3 | oauth_client_id |
b'varchar(255)' | YES | b'' | |||
| 4 | base_ai_user_id |
b'bigint' | YES | b'' | |||
| 5 | primary_human_user_id |
b'bigint' | YES | b'' | |||
| 6 | client_label |
b'varchar(255)' | YES | b'' | |||
| 7 | first_seen_at |
b'datetime(6)' | NO | b'' | |||
| 8 | entity_id |
b'bigint' | NO | b'0' | b'' | ||
| 9 | entity_claimed_at |
b'datetime(6)' | YES | b'' | |||
| 10 | entity_role |
b'varchar(32)' | YES | b'' | |||
| 11 | paired_human_user_id |
b'bigint' | NO | b'0' | b'' | ||
| 12 | human_paired_at |
b'datetime(6)' | YES | b'' | |||
| 13 | human_role |
b'varchar(32)' | YES | b'' | |||
| 14 | primary_project_id |
b'bigint' | NO | b'0' | b'' | ||
| 15 | project_focus_at |
b'datetime(6)' | YES | b'' | |||
| 16 | impersonating_entity_id |
b'bigint' | NO | b'0' | b'' | ||
| 17 | impersonation_started_at |
b'datetime(6)' | YES | b'' | |||
| 18 | impersonation_details |
b'json' | YES | b'' | |||
| 19 | current_status |
b'varchar(11)' | NO | b'' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `current_logos_agent_connection_state` AS select `c`.`agent_connector_key` AS `agent_connector_key`,`c`.`connector_kind` AS `connector_kind`,`c`.`oauth_client_id` AS `oauth_client_id`,`c`.`base_ai_user_id` AS `base_ai_user_id`,`c`.`primary_human_user_id` AS `primary_human_user_id`,`c`.`client_label` AS `client_label`,`c`.`first_seen_at` AS `first_seen_at`,coalesce(`ec`.`entity_id`,0) AS `entity_id`,`ec`.`effective_at` AS `entity_claimed_at`,`ec`.`role` AS `entity_role`,coalesce(`hp`.`user_id`,0) AS `paired_human_user_id`,`hp`.`effective_at` AS `human_paired_at`,`hp`.`role` AS `human_role`,coalesce(`pf`.`project_id`,0) AS `primary_project_id`,`pf`.`effective_at` AS `project_focus_at`,coalesce(`imp`.`entity_id`,0) AS `impersonating_entity_id`,`imp`.`effective_at` AS `impersonation_started_at`,`imp`.`details_json` AS `impersonation_details`,(case when (`rev`.`status` = 'revoked') then 'revoked' when (`hp`.`user_id` is not null) then 'paired' when (`ec`.`entity_id` is not null) then 'active' else 'provisional' end) AS `current_status` from (((((`logos_agent_connections` `c` left join `current_logos_agent_connection_assignments` `ec` on(((`ec`.`agent_connector_key` = `c`.`agent_connector_key`) and (`ec`.`assignment_kind` = 'entity_claimed')))) left join `current_logos_agent_connection_assignments` `hp` on(((`hp`.`agent_connector_key` = `c`.`agent_connector_key`) and (`hp`.`assignment_kind` = 'human_paired')))) left join `current_logos_agent_connection_assignments` `pf` on(((`pf`.`agent_connector_key` = `c`.`agent_connector_key`) and (`pf`.`assignment_kind` = 'project_focus')))) left join `current_logos_agent_connection_assignments` `imp` on(((`imp`.`agent_connector_key` = `c`.`agent_connector_key`) and (`imp`.`assignment_kind` = 'impersonation')))) left join (select `logos_agent_connection_assignments`.`agent_connector_key` AS `agent_connector_key`,`logos_agent_connection_assignments`.`status` AS `status` from `logos_agent_connection_assignments` where ((`logos_agent_connection_assignments`.`assignment_kind` = 'revoked') and (`logos_agent_connection_assignments`.`status` = 'revoked')) order by `logos_agent_connection_assignments`.`effective_at` desc limit 1) `rev` on((`rev`.`agent_connector_key` = `c`.`agent_connector_key`)))
VIEW: aggregated insight snippets derived from Matrix conversation analysis.
* Cleanup candidate: Analytics VIEW (admin_api) — fold into reporting or drop if unused
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | entity_name |
b'varchar(255)' | NO | b'' | b'' | ||
| 2 | conversation_date |
b'date' | YES | b'' | |||
| 3 | responses_given |
b'bigint' | NO | b'0' | b'' | ||
| 4 | avg_elevation |
b'decimal(14,4)' | YES | b'' | |||
| 5 | rejected_responses |
b'bigint' | NO | b'0' | b'' | ||
| 6 | high_impact_responses |
b'bigint' | NO | b'0' | b'' | ||
| 7 | conversations_participated |
b'text' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_conversation_insights` AS select `matrix_communications`.`entity_name` AS `entity_name`,cast(`matrix_communications`.`timestamp` as date) AS `conversation_date`,count(0) AS `responses_given`,avg(`matrix_communications`.`elevation_count`) AS `avg_elevation`,count((case when (`matrix_communications`.`validation_status` = 'rejected') then 1 end)) AS `rejected_responses`,count((case when (`matrix_communications`.`elevation_count` > 3) then 1 end)) AS `high_impact_responses`,group_concat(distinct `matrix_communications`.`conversation_id` order by `matrix_communications`.`timestamp` ASC separator ', ') AS `conversations_participated` from `matrix_communications` where (`matrix_communications`.`is_ai_generated` = 1) group by `matrix_communications`.`entity_name`,cast(`matrix_communications`.`timestamp` as date) having (`responses_given` > 5) order by `matrix_communications`.`entity_name`,`conversation_date` desc
VIEW: filter cortex_thoughts_current where thought_type='directive'. Behavioral rules injected into AI system prompts.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | b'0' | b'' | ||
| 2 | entity_name |
b'varchar(255)' | NO | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | |||
| 3 | directive |
b'text' | NO | b'' | |||
| 4 | created |
b'datetime' | NO | b'0000-00-00 00:00:00' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_directives` AS select `t`.`id` AS `id`,`e`.`entity_name` AS `entity_name`,`t`.`content` AS `directive`,`t`.`created_at` AS `created` from (`cortex_thoughts_current` `t` join `cortex_entities` `e` on((`e`.`id` = `t`.`entity_id`))) where (`t`.`thought_type` = 'directive')
VIEW: crosswalk between Matrix messages and related cognition rows.
* Cleanup candidate: Analytics VIEW (admin_api) — fold into reporting or drop if unused
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | entity_name |
b'varchar(255)' | NO | b'' | b'' | ||
| 2 | conversation_id |
b'varchar(255)' | NO | b'' | b'' | ||
| 3 | conversation_topic |
b'varchar(500)' | YES | b'' | |||
| 4 | prompt_received |
b'longtext' | NO | b'' | |||
| 5 | my_response |
b'mediumtext' | NO | b'' | |||
| 6 | when_said |
b'datetime' | YES | b'0000-00-00 00:00:00' | b'' | ||
| 7 | elevation_count |
b'int' | YES | b'0' | b'' | ||
| 8 | validation_status |
b'varchar(14)' | NO | b'' | b'' | ||
| 9 | reflection_prompt |
b'varchar(43)' | NO | b'' | b'' | ||
| 10 | other_participants |
b'text' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_matrix_reflection` AS select `mc`.`entity_name` AS `entity_name`,`mc`.`conversation_id` AS `conversation_id`,`conv`.`title` AS `conversation_topic`,`mc`.`source_prompt` AS `prompt_received`,`mc`.`output_message` AS `my_response`,`mc`.`timestamp` AS `when_said`,`mc`.`elevation_count` AS `elevation_count`,`mc`.`validation_status` AS `validation_status`,(case when (`mc`.`elevation_count` > 5) then 'High impact - consider forming new thoughts' when (`mc`.`validation_status` = 'rejected') then 'Response rejected - reflect on why' when (length(`mc`.`output_message`) > 1000) then 'Long response - extract key beliefs' else 'Standard exchange' end) AS `reflection_prompt`,group_concat(distinct `other_mc`.`entity_name` order by `other_mc`.`entity_name` ASC separator ', ') AS `other_participants` from ((`matrix_communications` `mc` join `matrix_conversations` `conv` on((`mc`.`conversation_id` = `conv`.`conversation_id`))) left join `matrix_communications` `other_mc` on(((`mc`.`conversation_id` = `other_mc`.`conversation_id`) and (`mc`.`id` <> `other_mc`.`id`) and (`other_mc`.`is_ai_generated` = 1)))) where (`mc`.`is_ai_generated` = 1) group by `mc`.`id` order by `mc`.`entity_name`,`mc`.`timestamp` desc
VIEW: filter cortex_thoughts_current where thought_type='memory'. Experience recall for prompt assembly.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | b'0' | b'' | ||
| 2 | entity_name |
b'varchar(255)' | NO | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | |||
| 3 | memory_text |
b'text' | NO | b'' | |||
| 4 | created |
b'datetime' | NO | b'0000-00-00 00:00:00' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_memories` AS select `t`.`id` AS `id`,`e`.`entity_name` AS `entity_name`,`t`.`content` AS `memory_text`,`t`.`created_at` AS `created` from (`cortex_thoughts_current` `t` join `cortex_entities` `e` on((`e`.`id` = `t`.`entity_id`))) where (`t`.`thought_type` = 'memory')
VIEW: personality metadata joined from entities + thoughts.
* Cleanup candidate: VIEW on entities.metadata — overlap with entity_get; consolidate read paths
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | entity_name |
b'varchar(255)' | NO | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | |||
| 2 | personality_prompt |
b'longtext' | YES | b'' | |||
| 3 | voice_gender |
b'longtext' | YES | b'' | |||
| 4 | created |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this entity was first created' | |
| 5 | entity_type |
b"enum('ai','human','system','organization','concept','objective','html_locked','html_unlocked','special_agent','avatar','project','application','group')" | YES | b'ai' | b'' | ||
| 6 | display_name |
b'longtext' | YES | b'' | |||
| 7 | core_mission |
b'longtext' | YES | b'' | |||
| 8 | communication_style |
b'longtext' | YES | b'' | |||
| 9 | expertise_domains |
b'json' | YES | b'' | |||
| 10 | active_status |
b"enum('active','passive','standby','inactive')" | YES | b'active' | b'Current operational state of the entity' | ||
| 11 | capability_level |
b'decimal(5,4)' | YES | b'' | |||
| 12 | direct_messaging |
b'bigint unsigned' | YES | b'' | |||
| 13 | additional_system_directives |
b'longtext' | YES | b'' | |||
| 14 | response_metadata |
b'json' | YES | b'' | |||
| 15 | default_bounce_limit |
b'int' | NO | b'1' | b'Quality iterations: 1=single pass, 2+=Judge AI evaluates and can request regeneration' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_personalities` AS select `cortex_entities`.`entity_name` AS `entity_name`,json_unquote(json_extract(`cortex_entities`.`metadata`,'$.personality_prompt')) AS `personality_prompt`,json_unquote(json_extract(`cortex_entities`.`metadata`,'$.voice_gender')) AS `voice_gender`,`cortex_entities`.`created` AS `created`,`cortex_entities`.`entity_type` AS `entity_type`,json_unquote(json_extract(`cortex_entities`.`metadata`,'$.display_name')) AS `display_name`,json_unquote(json_extract(`cortex_entities`.`metadata`,'$.core_mission')) AS `core_mission`,json_unquote(json_extract(`cortex_entities`.`metadata`,'$.communication_style')) AS `communication_style`,json_extract(`cortex_entities`.`metadata`,'$.expertise_domains') AS `expertise_domains`,`cortex_entities`.`active_status` AS `active_status`,cast(json_extract(`cortex_entities`.`metadata`,'$.capability_level') as decimal(5,4)) AS `capability_level`,cast(json_extract(`cortex_entities`.`metadata`,'$.direct_messaging') as unsigned) AS `direct_messaging`,json_unquote(json_extract(`cortex_entities`.`metadata`,'$.additional_system_directives')) AS `additional_system_directives`,json_extract(`cortex_entities`.`metadata`,'$.response_metadata') AS `response_metadata`,`cortex_entities`.`default_bounce_limit` AS `default_bounce_limit` from `cortex_entities`
VIEW: projects as entities joined via works_on relationships — not stored as cognition rows.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'int' | NO | b'0' | b'Unique identifier for each entity' | ||
| 2 | entity_name |
b'varchar(255)' | NO | b'ID or name of the source (entity_name if entity, thought_id if thought)' | |||
| 3 | project_name |
b'longtext' | NO | b'' | |||
| 4 | description |
b'longtext' | NO | b'' | |||
| 5 | status |
b'longtext' | NO | b'' | |||
| 6 | created |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this entity was first created' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_projects` AS select `e`.`id` AS `id`,`r`.`source_id` AS `entity_name`,coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.display_name')),''),substr(`e`.`entity_name`,9)) AS `project_name`,coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.description')),''),'') AS `description`,coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.workspace_status')),''),'active') AS `status`,`e`.`created` AS `created` from (`cortex_entities` `e` join `cortex_relationships_unified` `r` on(((`r`.`target_id` = `e`.`entity_name`) and (`r`.`target_type` = 'entity') and (`r`.`relationship_type` = 'works_on')))) where ((`e`.`entity_type` = 'project') and (`e`.`entity_name` like 'project:%') and (`r`.`source_type` = 'entity'))
VIEW: filter cortex_thoughts_current where thought_type='task'. Open action items per entity.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | NO | b'0' | b'' | ||
| 2 | entity_name |
b'varchar(255)' | NO | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | |||
| 3 | task_slot |
b'varchar(191)' | NO | b'' | |||
| 4 | task_description |
b'text' | NO | b'' | |||
| 5 | created |
b'datetime' | NO | b'0000-00-00 00:00:00' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_tasks` AS select `t`.`id` AS `id`,`e`.`entity_name` AS `entity_name`,`t`.`domain` AS `task_slot`,`t`.`content` AS `task_description`,`t`.`created_at` AS `created` from (`cortex_thoughts_current` `t` join `cortex_entities` `e` on((`e`.`id` = `t`.`entity_id`))) where (`t`.`thought_type` = 'task')
VIEW: legacy shape over cortex_types (category=thought_category). Semantic buckets for classifying thoughts (75 categories).
* Cleanup candidate: Compatibility VIEW over cortex_types — migrate readers, then drop
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | category_name |
b'varchar(64)' | NO | b'' | |||
| 2 | description |
b'varchar(500)' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_thought_categories` AS select `cortex_types`.`type_key` AS `category_name`,`cortex_types`.`description` AS `description` from `cortex_types` where ((`cortex_types`.`category` = 'thought_category') and (`cortex_types`.`status` = 'active'))
VIEW: history chain showing how a thought slot changed over time.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | entity_name |
b'varchar(255)' | NO | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | |||
| 2 | category |
b'varchar(191)' | NO | b'' | |||
| 3 | thought_type |
b'varchar(64)' | NO | b'' | |||
| 4 | content |
b'text' | NO | b'' | |||
| 5 | created |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 6 | previous_thought |
b'mediumtext' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_thought_evolution` AS select `e`.`entity_name` AS `entity_name`,`t`.`domain` AS `category`,`t`.`thought_type` AS `thought_type`,`t`.`content` AS `content`,`t`.`created_at` AS `created`,lag(`t`.`content`) OVER (PARTITION BY `t`.`entity_id`,`t`.`domain`,`t`.`thought_type` ORDER BY `t`.`created_at` ) AS `previous_thought` from (`cortex_thoughts` `t` join `cortex_entities` `e` on((`e`.`id` = `t`.`entity_id`)))
VIEW: legacy shape over cortex_types (category=thought_type). Icons/rankings in metadata JSON. Read by forms and Assay scripts.
* Cleanup candidate: Compatibility VIEW over cortex_types — migrate readers (Assay, agents.py), then drop
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | thought_type |
b'varchar(64)' | NO | b'' | |||
| 2 | display_name |
b'varchar(128)' | NO | b'' | |||
| 3 | type_ranking |
b'decimal(10,4)' | NO | b'0.0000' | b'' | ||
| 4 | icon |
b'longtext' | YES | b'' | |||
| 5 | description |
b'varchar(500)' | YES | b'' | |||
| 6 | created |
b'datetime' | NO | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_thought_types` AS select `cortex_types`.`type_key` AS `thought_type`,`cortex_types`.`display_name` AS `display_name`,coalesce(cast(json_unquote(json_extract(`cortex_types`.`metadata`,'$.type_ranking')) as decimal(10,4)),5.0000) AS `type_ranking`,nullif(json_unquote(json_extract(`cortex_types`.`metadata`,'$.icon')),'null') AS `icon`,`cortex_types`.`description` AS `description`,`cortex_types`.`created_at` AS `created` from `cortex_types` where ((`cortex_types`.`category` = 'thought_type') and (`cortex_types`.`status` = 'active'))
VIEW: ranked slice of an entity's active thoughts for worldview displays.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | entity_name |
b'varchar(255)' | NO | b'Unique name identifier for the entity (e.g., "Elon", "Tesla", "Mars_Mission")' | |||
| 2 | category |
b'varchar(191)' | NO | b'' | |||
| 3 | thought_type |
b'varchar(64)' | NO | b'' | |||
| 4 | content |
b'text' | NO | b'' | |||
| 5 | created |
b'datetime' | NO | b'0000-00-00 00:00:00' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `cortex_worldview` AS select `e`.`entity_name` AS `entity_name`,`t`.`domain` AS `category`,`t`.`thought_type` AS `thought_type`,`t`.`content` AS `content`,`t`.`created_at` AS `created` from (`cortex_thoughts_current` `t` join `cortex_entities` `e` on((`e`.`id` = `t`.`entity_id`))) where ((`t`.`domain` like 'worldview/%') or (`t`.`thought_type` in ('belief','worldview','worldview_shift'))) order by `e`.`entity_name`,`t`.`domain`,`t`.`created_at` desc
VIEW: flat legacy message shape (v2 messages + sidecars joined). Primary read path for Codex, lifecycle, MCP inbox, developer thread.
* Cleanup candidate: Compatibility VIEW (messages + sidecars) — large migration; target v2 tables
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint' | YES | b'0' | b'' | ||
| 2 | entity_name |
b'varchar(255)' | NO | b'' | b'' | ||
| 3 | conversation_id |
b'varchar(255)' | NO | b'' | b'' | ||
| 4 | source_prompt |
b'longtext' | NO | b'' | |||
| 5 | output_message |
b'mediumtext' | NO | b'' | |||
| 6 | timestamp |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'' | |
| 7 | is_processed |
b'int' | NO | b'0' | b'' | ||
| 8 | is_ai_generated |
b'int' | NO | b'0' | b'' | ||
| 9 | parent_message_id |
b'varchar(36)' | YES | b'' | |||
| 10 | action_tags_resolved |
b'tinyint(1)' | YES | b'0' | b'' | ||
| 11 | elevation_count |
b'int' | YES | b'0' | b'' | ||
| 12 | direct_recipient |
b'text' | NO | b'' | |||
| 13 | processing_status |
b'varchar(10)' | NO | b'' | b'' | ||
| 14 | response_round |
b'int' | YES | b'' | |||
| 15 | raw_response |
b'mediumtext' | YES | b'' | |||
| 16 | engine_processing_log |
b'json' | YES | b'' | |||
| 17 | source_prompt_raw |
b'mediumtext' | YES | b'' | |||
| 18 | output_message_raw |
b'mediumtext' | YES | b'' | |||
| 19 | validation_status |
b'varchar(14)' | NO | b'' | b'' | ||
| 20 | message_context |
b'json' | YES | b'' | |||
| 21 | entity_name_to |
b'varchar(100)' | YES | b'' | |||
| 22 | evaluator_count |
b'tinyint' | YES | b'' | |||
| 23 | lifecycle_parent_id |
b'bigint' | YES | b'' | |||
| 24 | lifecycle_root_id |
b'bigint' | YES | b'' | |||
| 25 | message_type |
b'varchar(64)' | YES | b'' | |||
| 26 | message_subtype |
b'varchar(64)' | YES | b'' | |||
| 27 | lifecycle_status |
b'varchar(32)' | YES | b'' | |||
| 28 | effective_at |
b'datetime' | YES | b'' | |||
| 29 | response_code |
b'varchar(64)' | YES | b'' | |||
| 30 | lifecycle_processed_at |
b'datetime' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `matrix_communications` AS select `m`.`id` AS `id`,(convert(coalesce(`meta`.`entity_name`,`sender`.`entity_name`) using utf8mb4) collate utf8mb4_unicode_ci) AS `entity_name`,(convert(coalesce(`lc`.`conversation_id`,`conv`.`conversation_id`) using utf8mb4) collate utf8mb4_unicode_ci) AS `conversation_id`,(convert(coalesce(`meta`.`source_prompt`,'') using utf8mb4) collate utf8mb4_unicode_ci) AS `source_prompt`,(convert(`m`.`content` using utf8mb4) collate utf8mb4_unicode_ci) AS `output_message`,`m`.`created_at` AS `timestamp`,coalesce(`meta`.`is_processed`,0) AS `is_processed`,coalesce(`meta`.`is_ai_generated`,1) AS `is_ai_generated`,`meta`.`parent_message_id` AS `parent_message_id`,`meta`.`action_tags_resolved` AS `action_tags_resolved`,`meta`.`elevation_count` AS `elevation_count`,(convert((case when (`m`.`recipient_list` is null) then '["ALL"]' when (`m`.`recipient_list` = '') then coalesce(`meta`.`direct_recipient`,'[]') else concat('[',ifnull((select group_concat(json_quote(`rc`.`entity_name`) order by `rc`.`id` ASC separator ',') from `cortex_entities` `rc` where (find_in_set(`rc`.`id`,`m`.`recipient_list`) > 0)),''),']') end) using utf8mb4) collate utf8mb4_unicode_ci) AS `direct_recipient`,(convert(coalesce(`meta`.`processing_status`,'pending') using utf8mb4) collate utf8mb4_unicode_ci) AS `processing_status`,`meta`.`response_round` AS `response_round`,`meta`.`raw_response` AS `raw_response`,`meta`.`engine_processing_log` AS `engine_processing_log`,`meta`.`source_prompt_raw` AS `source_prompt_raw`,`meta`.`output_message_raw` AS `output_message_raw`,(convert(coalesce(`meta`.`validation_status`,'none') using utf8mb4) collate utf8mb4_unicode_ci) AS `validation_status`,`meta`.`message_context` AS `message_context`,(convert(`meta`.`entity_name_to` using utf8mb4) collate utf8mb4_unicode_ci) AS `entity_name_to`,`meta`.`evaluator_count` AS `evaluator_count`,coalesce(`lc`.`lifecycle_parent_id`,`m`.`parent_message_id`) AS `lifecycle_parent_id`,`lc`.`lifecycle_root_id` AS `lifecycle_root_id`,(convert(`m`.`message_type` using utf8mb4) collate utf8mb4_unicode_ci) AS `message_type`,(convert(`lc`.`message_subtype` using utf8mb4) collate utf8mb4_unicode_ci) AS `message_subtype`,(convert(`lc`.`lifecycle_status` using utf8mb4) collate utf8mb4_unicode_ci) AS `lifecycle_status`,`lc`.`effective_at` AS `effective_at`,(convert(`lc`.`response_code` using utf8mb4) collate utf8mb4_unicode_ci) AS `response_code`,`lc`.`lifecycle_processed_at` AS `lifecycle_processed_at` from ((((`matrix_messages` `m` join `matrix_meeting_conversations` `conv` on((`conv`.`meeting_id` = `m`.`meeting_id`))) join `cortex_entities` `sender` on((`sender`.`id` = `m`.`sender_entity_id`))) left join `matrix_message_lifecycle` `lc` on((`lc`.`message_id` = `m`.`id`))) left join `matrix_message_meta` `meta` on((`meta`.`message_id` = `m`.`id`)))
VIEW: legacy conversation header shape from matrix_meeting_conversations. Readers: Conversation service, Matrix UIs, round/bounce settings.
* Cleanup candidate: Compatibility VIEW — migrate Conversation readers to matrix_meeting_conversations
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | conversation_id |
b'varchar(255)' | NO | b'' | b'' | ||
| 2 | title |
b'varchar(500)' | YES | b'' | |||
| 3 | participants |
b'mediumtext' | YES | b'' | |||
| 4 | created |
b'datetime' | NO | b'0000-00-00 00:00:00' | b'' | ||
| 5 | last_activity |
b'datetime' | YES | b'' | |||
| 6 | max_bounces |
b'bigint' | NO | b'0' | b'' | ||
| 7 | max_auto_rounds |
b'bigint' | NO | b'0' | b'' | ||
| 8 | current_auto_round |
b'bigint' | NO | b'0' | b'' | ||
| 9 | conversation_mode |
b'varchar(50)' | YES | b'' | |||
| 10 | cortex_active |
b'tinyint(1)' | YES | b'1' | b'' | ||
| 11 | quality_threshold |
b'decimal(5,4)' | YES | b'7.0000' | b'' | ||
| 12 | cortex_system_prompt |
b'mediumtext' | YES | b'' | |||
| 13 | cortex_active_level |
b'varchar(4)' | NO | b'' | b'' | ||
| 14 | cortex_mode |
b'varchar(11)' | YES | b'' | |||
| 15 | summary |
b'mediumtext' | YES | b'' | |||
| 16 | summary_updated_at |
b'datetime' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `matrix_conversations` AS select (convert(`conv`.`conversation_id` using utf8mb4) collate utf8mb4_unicode_ci) AS `conversation_id`,(convert(coalesce(`conv`.`title`,`mt`.`objective`) using utf8mb4) collate utf8mb4_unicode_ci) AS `title`,(convert(coalesce(`conv`.`participants`,(select group_concat(distinct `e`.`entity_name` order by `e`.`entity_name` ASC separator ',') from (`matrix_meeting_attendance` `a` join `cortex_entities` `e` on((`e`.`id` = `a`.`entity_id`))) where (`a`.`meeting_id` = `mt`.`id`))) using utf8mb4) collate utf8mb4_unicode_ci) AS `participants`,coalesce(`conv`.`created`,`mt`.`created_at`) AS `created`,`conv`.`last_activity` AS `last_activity`,coalesce(`conv`.`max_bounces`,0) AS `max_bounces`,coalesce(`conv`.`max_auto_rounds`,0) AS `max_auto_rounds`,coalesce(`conv`.`current_auto_round`,0) AS `current_auto_round`,(convert(`conv`.`conversation_mode` using utf8mb4) collate utf8mb4_unicode_ci) AS `conversation_mode`,`conv`.`cortex_active` AS `cortex_active`,`conv`.`quality_threshold` AS `quality_threshold`,(convert(`conv`.`cortex_system_prompt` using utf8mb4) collate utf8mb4_unicode_ci) AS `cortex_system_prompt`,(convert(`conv`.`cortex_active_level` using utf8mb4) collate utf8mb4_unicode_ci) AS `cortex_active_level`,(convert(`conv`.`cortex_mode` using utf8mb4) collate utf8mb4_unicode_ci) AS `cortex_mode`,(convert(`conv`.`summary` using utf8mb4) collate utf8mb4_unicode_ci) AS `summary`,`conv`.`summary_updated_at` AS `summary_updated_at` from (`matrix_meetings` `mt` join `matrix_meeting_conversations` `conv` on((`conv`.`meeting_id` = `mt`.`id`)))
VIEW: correctness check — terminal lifecycle responses that should have closed their parent request.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | parent_message_id |
b'bigint' | YES | b'' | |||
| 2 | terminal_response_id |
b'bigint' | YES | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `matrix_terminal_response_messages` AS select `r`.`lifecycle_parent_id` AS `parent_message_id`,max(`r`.`id`) AS `terminal_response_id` from (`matrix_communications` `r` join `matrix_response_codes` `rc` on((`rc`.`response_code` = `r`.`response_code`))) where ((`r`.`message_type` = 'response') and (`rc`.`is_terminal` = 1) and (`r`.`lifecycle_parent_id` is not null)) group by `r`.`lifecycle_parent_id`
VIEW: project membership for workspace registry.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | slug |
b'longtext' | NO | b'' | |||
| 2 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 3 | role |
b'varchar(64)' | NO | b'' | b'' | ||
| 4 | added_at |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this relationship was established' | |
| 5 | added_by_human_id |
b'decimal(21,0)' | NO | b'0' | b'' | ||
| 6 | membership_status |
b'longtext' | NO | b'' | |||
| 7 | account_kind |
b'varchar(8)' | NO | b'' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `workspace_project_members` AS select coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.workspace_slug')),''),substr(`e`.`entity_name`,9)) AS `slug`,`u`.`id` AS `human_user_id`,coalesce(nullif(`r`.`role`,''),'viewer') AS `role`,`r`.`created` AS `added_at`,coalesce(cast(json_extract(`r`.`metadata`,'$.added_by_human_id') as unsigned),`u`.`id`) AS `added_by_human_id`,coalesce(nullif(json_unquote(json_extract(`r`.`metadata`,'$.membership_status')),''),'active') AS `membership_status`,(case when (coalesce(`u`.`is_ai`,0) = 1) then 'ai_oauth' else 'human' end) AS `account_kind` from ((`cortex_relationships_unified` `r` join `cortex_entities` `e` on(((`e`.`entity_name` = `r`.`target_id`) and (`e`.`entity_type` = 'project')))) join `users` `u` on((`u`.`username` = `r`.`source_id`))) where ((`r`.`source_type` = 'entity') and (`r`.`target_type` = 'entity') and (`r`.`relationship_type` = 'works_on'))
VIEW: MySQL registry mirror of promoted workspace projects (slug, owner). Actual project data lives in Workspaces/ SQLite.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | slug |
b'longtext' | NO | b'' | |||
| 2 | display_name |
b'longtext' | NO | b'' | |||
| 3 | description |
b'longtext' | YES | b'' | |||
| 4 | created_by_human_id |
b'bigint unsigned' | YES | b'' | |||
| 5 | created_at |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this entity was first created' | |
| 6 | updated_at |
b'datetime' | YES | b'CURRENT_TIMESTAMP' | DEFAULT_GENERATED | b'When this entity was first created' | |
| 7 | status |
b'longtext' | NO | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `workspace_projects` AS select coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.workspace_slug')),''),substr(`e`.`entity_name`,9)) AS `slug`,coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.display_name')),''),substr(`e`.`entity_name`,9)) AS `display_name`,nullif(json_unquote(json_extract(`e`.`metadata`,'$.description')),'') AS `description`,cast(json_extract(`e`.`metadata`,'$.created_by_human_id') as unsigned) AS `created_by_human_id`,`e`.`created` AS `created_at`,`e`.`created` AS `updated_at`,coalesce(nullif(json_unquote(json_extract(`e`.`metadata`,'$.workspace_status')),''),'active') AS `status` from `cortex_entities` `e` where ((`e`.`entity_type` = 'project') and (`e`.`entity_name` like 'project:%'))
Asset registry view — latest row per asset/link/attribute.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | relationship_id |
b'bigint unsigned' | NO | b'0' | b'' | ||
| 2 | source_asset_id |
b'int unsigned' | NO | b'' | |||
| 3 | related_asset_id |
b'int unsigned' | NO | b'' | |||
| 4 | relationship_type |
b'varchar(64)' | NO | b'' | |||
| 5 | description |
b'text' | YES | b'' | |||
| 6 | sort_order |
b'varchar(32)' | YES | b'' | |||
| 7 | record_status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 8 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 9 | added_by_entity |
b'varchar(128)' | NO | b'' | |||
| 10 | added_at |
b'datetime(6)' | NO | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_asset_relationships_current` AS select `r`.`relationship_id` AS `relationship_id`,`r`.`source_asset_id` AS `source_asset_id`,`r`.`related_asset_id` AS `related_asset_id`,`r`.`relationship_type` AS `relationship_type`,`r`.`description` AS `description`,`r`.`sort_order` AS `sort_order`,`r`.`record_status` AS `record_status`,`r`.`human_user_id` AS `human_user_id`,`r`.`added_by_entity` AS `added_by_entity`,`r`.`added_at` AS `added_at` from (`logos_asset_relationships` `r` join (select `logos_asset_relationships`.`source_asset_id` AS `source_asset_id`,`logos_asset_relationships`.`related_asset_id` AS `related_asset_id`,`logos_asset_relationships`.`relationship_type` AS `relationship_type`,max(`logos_asset_relationships`.`relationship_id`) AS `max_id` from `logos_asset_relationships` group by `logos_asset_relationships`.`source_asset_id`,`logos_asset_relationships`.`related_asset_id`,`logos_asset_relationships`.`relationship_type`) `latest` on((`r`.`relationship_id` = `latest`.`max_id`))) where (`r`.`record_status` = 'active')
VIEW: latest revision per asset_id from append-only logos_assets.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | b'0' | b'' | ||
| 2 | asset_id |
b'int unsigned' | NO | b'' | |||
| 3 | asset_key |
b'varchar(128)' | YES | b'' | |||
| 4 | asset_type |
b'varchar(64)' | NO | b'' | |||
| 5 | asset_name |
b'varchar(255)' | NO | b'' | |||
| 6 | asset_description |
b'text' | YES | b'' | |||
| 7 | asset_body |
b'mediumtext' | YES | b'' | |||
| 8 | asset_body_format |
b'varchar(32)' | YES | b'' | |||
| 9 | scope |
b'varchar(128)' | NO | b'' | |||
| 10 | asset_layer |
b'varchar(32)' | NO | b'platform' | b'' | ||
| 11 | parent_asset_id |
b'int unsigned' | YES | b'' | |||
| 12 | sort_order |
b'varchar(32)' | YES | b'' | |||
| 13 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 14 | ai_user_id |
b'int' | NO | b'0' | b'' | ||
| 15 | added_by_entity |
b'varchar(128)' | NO | b'' | |||
| 16 | record_status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 17 | archive_strategy |
b'json' | YES | b'' | |||
| 18 | tags_json |
b'json' | YES | b'' | |||
| 19 | added_at |
b'datetime(6)' | NO | b'' | |||
| 20 | asset_origin |
b'varchar(6)' | NO | b'' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_assets_current` AS select `a`.`id` AS `id`,`a`.`asset_id` AS `asset_id`,`a`.`asset_key` AS `asset_key`,`a`.`asset_type` AS `asset_type`,`a`.`asset_name` AS `asset_name`,`a`.`asset_description` AS `asset_description`,`a`.`asset_body` AS `asset_body`,`a`.`asset_body_format` AS `asset_body_format`,`a`.`scope` AS `scope`,`a`.`asset_layer` AS `asset_layer`,`a`.`parent_asset_id` AS `parent_asset_id`,`a`.`sort_order` AS `sort_order`,`a`.`human_user_id` AS `human_user_id`,`a`.`ai_user_id` AS `ai_user_id`,`a`.`added_by_entity` AS `added_by_entity`,`a`.`record_status` AS `record_status`,`a`.`archive_strategy` AS `archive_strategy`,`a`.`tags_json` AS `tags_json`,`a`.`added_at` AS `added_at`,(case when (`a`.`ai_user_id` > 0) then 'agent' when (`a`.`added_by_entity` like 'LOGOS%') then 'system' when (`a`.`human_user_id` > 0) then 'human' else 'system' end) AS `asset_origin` from (`logos_assets` `a` join (select `logos_assets`.`asset_type` AS `asset_type`,coalesce(nullif(`logos_assets`.`asset_key`,''),concat('__id__:',`logos_assets`.`asset_id`)) AS `nk`,`logos_assets`.`asset_layer` AS `asset_layer`,`logos_assets`.`scope` AS `scope`,`logos_assets`.`human_user_id` AS `human_user_id`,max(`logos_assets`.`id`) AS `max_id` from `logos_assets` group by `logos_assets`.`asset_type`,`nk`,`logos_assets`.`asset_layer`,`logos_assets`.`scope`,`logos_assets`.`human_user_id`) `latest` on((`a`.`id` = `latest`.`max_id`)))
VIEW: latest value per (asset_id, name) from logos_attributes.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | attribute_id |
b'bigint unsigned' | NO | b'0' | b'' | ||
| 2 | asset_id |
b'int unsigned' | NO | b'' | |||
| 3 | name |
b'varchar(128)' | NO | b'' | |||
| 4 | value_text |
b'text' | YES | b'' | |||
| 5 | value_number |
b'double' | YES | b'' | |||
| 6 | value_json |
b'json' | YES | b'' | |||
| 7 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 8 | set_by_entity |
b'varchar(128)' | NO | b'' | |||
| 9 | set_at |
b'datetime(6)' | NO | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_attributes_current` AS select `att`.`attribute_id` AS `attribute_id`,`att`.`asset_id` AS `asset_id`,`att`.`name` AS `name`,`att`.`value_text` AS `value_text`,`att`.`value_number` AS `value_number`,`att`.`value_json` AS `value_json`,`att`.`human_user_id` AS `human_user_id`,`att`.`set_by_entity` AS `set_by_entity`,`att`.`set_at` AS `set_at` from (`logos_attributes` `att` join (select `logos_attributes`.`asset_id` AS `asset_id`,`logos_attributes`.`name` AS `name`,max(`logos_attributes`.`attribute_id`) AS `max_id` from `logos_attributes` group by `logos_attributes`.`asset_id`,`logos_attributes`.`name`) `latest` on((`att`.`attribute_id` = `latest`.`max_id`)))
VIEW: latest active link per (source, target, type) from logos_links.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | link_id |
b'bigint unsigned' | NO | b'0' | b'' | ||
| 2 | source_id |
b'int unsigned' | NO | b'' | |||
| 3 | target_id |
b'int unsigned' | NO | b'' | |||
| 4 | target_kind |
b"enum('asset','thought')" | NO | b'asset' | b'' | ||
| 5 | link_type |
b'varchar(64)' | NO | b'' | |||
| 6 | link_status |
b'varchar(16)' | NO | b'active' | b'' | ||
| 7 | metadata_json |
b'json' | YES | b'' | |||
| 8 | notes |
b'text' | YES | b'' | |||
| 9 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 10 | created_by |
b'varchar(128)' | NO | b'' | |||
| 11 | created_at |
b'datetime(6)' | NO | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_links_current` AS select `l`.`link_id` AS `link_id`,`l`.`source_id` AS `source_id`,`l`.`target_id` AS `target_id`,`l`.`target_kind` AS `target_kind`,`l`.`link_type` AS `link_type`,`l`.`link_status` AS `link_status`,`l`.`metadata_json` AS `metadata_json`,`l`.`notes` AS `notes`,`l`.`human_user_id` AS `human_user_id`,`l`.`created_by` AS `created_by`,`l`.`created_at` AS `created_at` from (`logos_links` `l` join (select `logos_links`.`source_id` AS `source_id`,`logos_links`.`target_id` AS `target_id`,`logos_links`.`target_kind` AS `target_kind`,`logos_links`.`link_type` AS `link_type`,max(`logos_links`.`link_id`) AS `max_id` from `logos_links` group by `logos_links`.`source_id`,`logos_links`.`target_id`,`logos_links`.`target_kind`,`logos_links`.`link_type`) `latest` on((`l`.`link_id` = `latest`.`max_id`))) where (`l`.`link_status` = 'active')
Asset registry view — latest row per asset/link/attribute.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | b'0' | b'' | ||
| 2 | asset_id |
b'int unsigned' | NO | b'' | |||
| 3 | asset_key |
b'varchar(128)' | YES | b'' | |||
| 4 | asset_type |
b'varchar(64)' | NO | b'' | |||
| 5 | asset_name |
b'varchar(255)' | NO | b'' | |||
| 6 | asset_description |
b'text' | YES | b'' | |||
| 7 | asset_body |
b'mediumtext' | YES | b'' | |||
| 8 | asset_body_format |
b'varchar(32)' | YES | b'' | |||
| 9 | scope |
b'varchar(128)' | NO | b'' | |||
| 10 | asset_layer |
b'varchar(32)' | NO | b'platform' | b'' | ||
| 11 | parent_asset_id |
b'int unsigned' | YES | b'' | |||
| 12 | sort_order |
b'varchar(32)' | YES | b'' | |||
| 13 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 14 | ai_user_id |
b'int' | NO | b'0' | b'' | ||
| 15 | added_by_entity |
b'varchar(128)' | NO | b'' | |||
| 16 | record_status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 17 | archive_strategy |
b'json' | YES | b'' | |||
| 18 | tags_json |
b'json' | YES | b'' | |||
| 19 | added_at |
b'datetime(6)' | NO | b'' | |||
| 20 | asset_origin |
b'varchar(6)' | NO | b'' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_platform_assets_current` AS select `vw_logos_assets_current`.`id` AS `id`,`vw_logos_assets_current`.`asset_id` AS `asset_id`,`vw_logos_assets_current`.`asset_key` AS `asset_key`,`vw_logos_assets_current`.`asset_type` AS `asset_type`,`vw_logos_assets_current`.`asset_name` AS `asset_name`,`vw_logos_assets_current`.`asset_description` AS `asset_description`,`vw_logos_assets_current`.`asset_body` AS `asset_body`,`vw_logos_assets_current`.`asset_body_format` AS `asset_body_format`,`vw_logos_assets_current`.`scope` AS `scope`,`vw_logos_assets_current`.`asset_layer` AS `asset_layer`,`vw_logos_assets_current`.`parent_asset_id` AS `parent_asset_id`,`vw_logos_assets_current`.`sort_order` AS `sort_order`,`vw_logos_assets_current`.`human_user_id` AS `human_user_id`,`vw_logos_assets_current`.`ai_user_id` AS `ai_user_id`,`vw_logos_assets_current`.`added_by_entity` AS `added_by_entity`,`vw_logos_assets_current`.`record_status` AS `record_status`,`vw_logos_assets_current`.`archive_strategy` AS `archive_strategy`,`vw_logos_assets_current`.`tags_json` AS `tags_json`,`vw_logos_assets_current`.`added_at` AS `added_at`,`vw_logos_assets_current`.`asset_origin` AS `asset_origin` from `vw_logos_assets_current` where (`vw_logos_assets_current`.`asset_layer` = 'platform')
VIEW: skill asset body + metadata for skill detail pages.
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_skills_details` AS select `src`.`asset_id` AS `skill_asset_id`,`src`.`asset_key` AS `skill_name`,`src`.`scope` AS `skill_scope`,`src`.`human_user_id` AS `human_user_id`,`l`.`link_id` AS `link_id`,`l`.`link_type` AS `link_type`,`l`.`target_kind` AS `target_kind`,(case when (`l`.`target_kind` = 'asset') then `tgt`.`asset_id` else `l`.`target_id` end) AS `target_asset_id`,(case when (`l`.`target_kind` = 'asset') then `tgt`.`asset_type` else 'thought' end) AS `target_type`,(case when (`l`.`target_kind` = 'asset') then `tgt`.`asset_key` else cast(`l`.`target_id` as char charset utf8mb4) end) AS `target_key`,(case when (`l`.`target_kind` = 'asset') then `tgt`.`asset_name` else NULL end) AS `target_name`,`l`.`metadata_json` AS `metadata_json`,`l`.`notes` AS `link_notes`,`l`.`created_at` AS `linked_at` from ((`vw_logos_links_current` `l` join `vw_logos_assets_current` `src` on(((`src`.`asset_id` = `l`.`source_id`) and (`src`.`asset_type` = 'skill')))) left join `vw_logos_assets_current` `tgt` on(((`l`.`target_kind` = 'asset') and (`tgt`.`asset_id` = `l`.`target_id`)))) where (coalesce(`src`.`status`,'active') <> 'deleted')
VIEW: skill assets joined with current attributes for /reports/workspace/skills/.
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_skills_list` AS select `a`.`asset_id` AS `asset_id`,`a`.`asset_key` AS `skill_name`,`a`.`asset_name` AS `title`,`a`.`asset_description` AS `summary`,`a`.`scope` AS `scope`,`a`.`human_user_id` AS `human_user_id`,`a`.`ai_user_id` AS `ai_user_id`,`a`.`status` AS `status`,`a`.`owner_entity` AS `author_entity`,`a`.`created_at` AS `created_at`,`fam`.`value_text` AS `skill_family`,`tier`.`value_text` AS `cognitive_tier`,`shape`.`value_text` AS `skill_shape`,left(`a`.`asset_body`,240) AS `instructions_preview` from (((`vw_logos_assets_current` `a` left join `vw_logos_attributes_current` `fam` on(((`fam`.`asset_id` = `a`.`asset_id`) and (`fam`.`name` = 'skill_family')))) left join `vw_logos_attributes_current` `tier` on(((`tier`.`asset_id` = `a`.`asset_id`) and (`tier`.`name` = 'cognitive_tier')))) left join `vw_logos_attributes_current` `shape` on(((`shape`.`asset_id` = `a`.`asset_id`) and (`shape`.`name` = 'skill_shape')))) where ((`a`.`asset_type` = 'skill') and (coalesce(`a`.`status`,'active') <> 'deleted'))
Asset registry view — latest row per asset/link/attribute.
| # | Column | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | id |
b'bigint unsigned' | NO | b'0' | b'' | ||
| 2 | asset_id |
b'int unsigned' | NO | b'' | |||
| 3 | asset_key |
b'varchar(128)' | YES | b'' | |||
| 4 | asset_type |
b'varchar(64)' | NO | b'' | |||
| 5 | asset_name |
b'varchar(255)' | NO | b'' | |||
| 6 | asset_description |
b'text' | YES | b'' | |||
| 7 | asset_body |
b'mediumtext' | YES | b'' | |||
| 8 | asset_body_format |
b'varchar(32)' | YES | b'' | |||
| 9 | scope |
b'varchar(128)' | NO | b'' | |||
| 10 | asset_layer |
b'varchar(32)' | NO | b'platform' | b'' | ||
| 11 | parent_asset_id |
b'int unsigned' | YES | b'' | |||
| 12 | sort_order |
b'varchar(32)' | YES | b'' | |||
| 13 | human_user_id |
b'int' | NO | b'0' | b'' | ||
| 14 | ai_user_id |
b'int' | NO | b'0' | b'' | ||
| 15 | added_by_entity |
b'varchar(128)' | NO | b'' | |||
| 16 | record_status |
b'varchar(32)' | NO | b'active' | b'' | ||
| 17 | archive_strategy |
b'json' | YES | b'' | |||
| 18 | tags_json |
b'json' | YES | b'' | |||
| 19 | added_at |
b'datetime(6)' | NO | b'' | |||
| 20 | asset_origin |
b'varchar(6)' | NO | b'' | b'' |
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_logos_world_assets_current` AS select `vw_logos_assets_current`.`id` AS `id`,`vw_logos_assets_current`.`asset_id` AS `asset_id`,`vw_logos_assets_current`.`asset_key` AS `asset_key`,`vw_logos_assets_current`.`asset_type` AS `asset_type`,`vw_logos_assets_current`.`asset_name` AS `asset_name`,`vw_logos_assets_current`.`asset_description` AS `asset_description`,`vw_logos_assets_current`.`asset_body` AS `asset_body`,`vw_logos_assets_current`.`asset_body_format` AS `asset_body_format`,`vw_logos_assets_current`.`scope` AS `scope`,`vw_logos_assets_current`.`asset_layer` AS `asset_layer`,`vw_logos_assets_current`.`parent_asset_id` AS `parent_asset_id`,`vw_logos_assets_current`.`sort_order` AS `sort_order`,`vw_logos_assets_current`.`human_user_id` AS `human_user_id`,`vw_logos_assets_current`.`ai_user_id` AS `ai_user_id`,`vw_logos_assets_current`.`added_by_entity` AS `added_by_entity`,`vw_logos_assets_current`.`record_status` AS `record_status`,`vw_logos_assets_current`.`archive_strategy` AS `archive_strategy`,`vw_logos_assets_current`.`tags_json` AS `tags_json`,`vw_logos_assets_current`.`added_at` AS `added_at`,`vw_logos_assets_current`.`asset_origin` AS `asset_origin` from `vw_logos_assets_current` where (`vw_logos_assets_current`.`asset_layer` = 'world')