feat(types): semilla con fields para 11 tipos + CLI --test-types-yaml
- examples/types.yaml: principal_field + fields para Person, Email,
Domain, Phone, Org, IBAN, Account, Document, Address, Url, Table.
44 fields totales. Documentacion del formato en cabecera.
- project_manager.cpp: seed con fields para los tipos basicos (fallback
cuando no se encuentra examples/types.yaml).
- main.cpp:
- Log de carga incluye conteo de schemas y total de fields.
- --test-types-yaml <path>: smoke test que carga, serializa a temp y
recarga. Compara entidades/relaciones/fields field-a-field. Salida
PASS/FAIL con exit code 0/1. Permite verificar round-trip sin
framework de tests.
Verificado: examples/types.yaml round-trip estable (11 entities, 44
fields, 6 relations).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+74
-5
@@ -1,57 +1,126 @@
|
||||
# Ejemplo OSINT — tipos comunes en investigacion de entidades.
|
||||
# Color como "#RRGGBB" (con o sin alpha "#RRGGBBAA").
|
||||
# Shapes: el campo `shape` se ignora — todos los nodos son circulo, salvo
|
||||
# el tipo "Table" que es cuadrado (regla de forma aplicada en
|
||||
# types_registry.cpp::apply_types_yaml).
|
||||
# Iconos: nombres ti-* mapeados en types_registry.cpp::tabler_codepoint_by_name
|
||||
# Estilos de relacion: solid | dashed | dotted
|
||||
# Shapes: campo `shape` ignorado — todos los nodos son circulo, salvo
|
||||
# el tipo "Table" que es cuadrado (regla en types_registry.cpp::apply_types_yaml).
|
||||
# Iconos: nombres ti-* mapeados en tabler_codepoint_by_name.
|
||||
# Fields: schema por tipo, formato inline-map.
|
||||
# tipos: string | int | float | bool | date | url | enum
|
||||
# enum requiere `values: [...]`
|
||||
# `principal_field` (opcional) es el nombre del field que sirve de label
|
||||
# visible en el grafo; default = "name".
|
||||
|
||||
entities:
|
||||
- name: Person
|
||||
color: "#5B8DEF"
|
||||
icon: ti-user
|
||||
principal_field: name
|
||||
fields:
|
||||
- { name: name, type: string, required: true }
|
||||
- { name: first_name, type: string }
|
||||
- { name: last_name, type: string }
|
||||
- { name: age, type: int }
|
||||
- { name: nationality, type: string }
|
||||
- { name: birth_date, type: date }
|
||||
- { name: gender, type: enum, values: [male, female, other] }
|
||||
- { name: occupation, type: string }
|
||||
|
||||
- name: Email
|
||||
color: "#58CA8C"
|
||||
icon: ti-mail
|
||||
principal_field: address
|
||||
fields:
|
||||
- { name: address, type: string, required: true }
|
||||
- { name: provider, type: string }
|
||||
- { name: verified, type: bool }
|
||||
|
||||
- name: Domain
|
||||
color: "#F4B860"
|
||||
icon: ti-world
|
||||
principal_field: name
|
||||
fields:
|
||||
- { name: name, type: string, required: true }
|
||||
- { name: registrar, type: string }
|
||||
- { name: created_at, type: date }
|
||||
- { name: expires_at, type: date }
|
||||
|
||||
- name: Phone
|
||||
color: "#E36AC0"
|
||||
icon: ti-phone
|
||||
principal_field: number
|
||||
fields:
|
||||
- { name: number, type: string, required: true }
|
||||
- { name: country_code, type: string }
|
||||
- { name: kind, type: enum, values: [mobile, landline, voip] }
|
||||
|
||||
- name: Org
|
||||
color: "#C780E8"
|
||||
icon: ti-building
|
||||
principal_field: name
|
||||
fields:
|
||||
- { name: name, type: string, required: true }
|
||||
- { name: country, type: string }
|
||||
- { name: kind, type: enum, values: [company, ngo, gov, other] }
|
||||
- { name: website, type: url }
|
||||
|
||||
- name: IBAN
|
||||
color: "#52CDF2"
|
||||
icon: ti-building-bank
|
||||
principal_field: iban
|
||||
fields:
|
||||
- { name: iban, type: string, required: true }
|
||||
- { name: country, type: string }
|
||||
- { name: bank_name, type: string }
|
||||
|
||||
- name: Account
|
||||
color: "#7FD3A0"
|
||||
icon: ti-id
|
||||
principal_field: handle
|
||||
fields:
|
||||
- { name: handle, type: string, required: true }
|
||||
- { name: platform, type: string }
|
||||
- { name: url, type: url }
|
||||
- { name: verified, type: bool }
|
||||
|
||||
- name: Document
|
||||
color: "#C9C9C9"
|
||||
icon: ti-file
|
||||
principal_field: title
|
||||
fields:
|
||||
- { name: title, type: string, required: true }
|
||||
- { name: url, type: url }
|
||||
- { name: kind, type: string }
|
||||
- { name: created, type: date }
|
||||
|
||||
- name: Address
|
||||
color: "#FFB870"
|
||||
icon: ti-map-pin
|
||||
principal_field: line1
|
||||
fields:
|
||||
- { name: line1, type: string, required: true }
|
||||
- { name: city, type: string }
|
||||
- { name: country, type: string }
|
||||
- { name: postcode, type: string }
|
||||
|
||||
- name: Url
|
||||
color: "#89E0FC"
|
||||
icon: ti-link
|
||||
principal_field: url
|
||||
fields:
|
||||
- { name: url, type: url, required: true }
|
||||
- { name: title, type: string }
|
||||
- { name: domain, type: string }
|
||||
|
||||
# Nodo tabla — cuadrado (regla de forma). Issue 0010: contenedor con
|
||||
# filas que son nodos del grafo.
|
||||
- name: Table
|
||||
color: "#0EA5E9"
|
||||
icon: ti-database
|
||||
principal_field: name
|
||||
fields:
|
||||
- { name: name, type: string, required: true }
|
||||
- { name: row_type, type: string }
|
||||
- { name: columns, type: string }
|
||||
- { name: expanded, type: bool }
|
||||
|
||||
relations:
|
||||
- name: owns
|
||||
|
||||
Reference in New Issue
Block a user