Carmen Labs

Capabilities

The accepts enum and the normalized shape the runtime guarantees for each capability.

Capabilities

accepts declares what kind of normalized data the parser expects — not a file extension. A .csv, a .xlsx, and a database export could all normalize to table.

Full enum (V1)

text  document  markdown  html  table  tree  graph  timeseries
image  binary  structured  key-value  filesystem  code  log
dataset  geo  audio  video  custom

Minimum viable normalizers

An implementation does not need to support every capability to be spec-conformant — but for the capabilities it does support, the normalized shape below is required so parsers are portable across runtimes.

table

For CSV, spreadsheets, and other tabular sources.

{
  columns: string[],
  rows: Record<string, string>[]
}

text

For plain text, logs, source code, or Markdown treated as raw text.

{
  text: string
}

markdown

{
  raw: string,
  headings: Array<{ level: number; text: string }>
}

tree / structured

For JSON, XML, YAML.

{
  value: unknown
}

Choosing capabilities

Source typeaccepts
CSV / XLSX / any tabular data["table"]
Markdown["markdown", "document"]
JSON / YAML / XML["tree", "structured"]
Logs["log", "text"]
Source code["code", "text"]

Capabilities beyond the minimum set

graph, timeseries, image, geo, audio, video, dataset, key-value, filesystem, binary, html, document, and custom are reserved in the enum for V1 so manifests can declare intent even where a given runtime doesn't yet ship a normalizer for them. A runtime that receives an accepts value it can't normalize should fail clearly at load time rather than silently passing through unnormalized data — see Security Model and Versioning for how new normalizers get added without breaking existing manifests.

Capacidades

El enum accepts y la forma normalizada que el runtime garantiza para cada capacidad.

Capacidades

accepts declara qué tipo de datos normalizados espera el parser, no una extensión de archivo. Un .csv, un .xlsx y una exportación de base de datos podrían normalizarse todos como table.

Enum completo (V1)

text  document  markdown  html  table  tree  graph  timeseries
image  binary  structured  key-value  filesystem  code  log
dataset  geo  audio  video  custom

Normalizadores mínimos viables

Una implementación no necesita soportar todas las capacidades para cumplir la especificación; pero para las capacidades que sí soporta, la forma normalizada siguiente es requerida para que los parsers sean portables entre runtimes.

table

Para CSV, planillas y otras fuentes tabulares.

{
  columns: string[],
  rows: Record<string, string>[]
}

text

Para texto plano, logs, código fuente o Markdown tratado como texto raw.

{
  text: string
}

markdown

{
  raw: string,
  headings: Array<{ level: number; text: string }>
}

tree / structured

Para JSON, XML, YAML.

{
  value: unknown
}

Elección de capacidades

Tipo de fuenteaccepts
CSV / XLSX / cualquier dato tabular["table"]
Markdown["markdown", "document"]
JSON / YAML / XML["tree", "structured"]
Logs["log", "text"]
Código fuente["code", "text"]

Capacidades fuera del conjunto mínimo

graph, timeseries, image, geo, audio, video, dataset, key-value, filesystem, binary, html, document y custom están reservadas en el enum para V1, de modo que los manifiestos puedan declarar intención incluso cuando un runtime dado todavía no incluya un normalizador para ellas. Un runtime que recibe un valor de accepts que no puede normalizar debe fallar claramente al cargar, en lugar de pasar datos sin normalizar silenciosamente. Ver Modelo de seguridad y Versionado para cómo se agregan nuevos normalizadores sin romper manifiestos existentes.