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.
Source Adapters
An MView always starts from the original source file. A Source Adapter is the component that interprets its bytes and produces the normalized input consumed by the parser. It may be written in any language, as long as the runtime can invoke it through the protocol that runtime documents.
source.adapters declares adapter identifiers in preference order. For a directory source, each
source.files item may declare its own adapters. The runtime must select a compatible adapter
before executing the parser and must retain the original-byte contentHash in the execution
context.
The adapter must not produce a MView's visual data model directly: it produces a normalized shape
defined by a capability such as table, markdown, or structured. The parser turns that general
shape into the view-specific model consumed by the component.
Normalized output may be cached temporarily, but it is never the source of truth and must be invalidated when the bytes, configuration, or adapter version changes. When the view opens or is regenerated, the runtime reads the original source again and repeats adaptation.
Full enum (V1)
text document markdown html table tree graph timeseries
image binary structured key-value filesystem code log
dataset geo audio video customMinimum 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
}filesystem
For a source with source.kind: "directory". It does not provide filesystem access: it represents only the files enumerated in source.files, already read and normalized by the runtime.
{
path: string,
files: Array<{
path: string,
capability: string,
input: unknown,
contentHash: string
}>
}pathidentifies the declared source directory.filesis sorted lexicographically by the UTF-8 bytes ofpath, using the same rule as the canonical directory hash. The order ofsource.filesin the manifest does not affect the input.- Each file's
pathis relative to the source directory. capabilityis the first supported capability fromsource.files[].acceptsthat the adapter used to normalize the file.inputhas the normalized shape defined by that capability.contentHashis the SHA-256 hash calculated by the runtime over the original bytes, even if it was not persisted in the manifest.
The runtime MUST fail before executing the parser if it cannot read a selected file or does not support any of its declared capabilities. It must not silently omit files.
Choosing capabilities
| Source type | accepts |
|---|---|
| CSV / XLSX / any tabular data | ["table"] |
| Markdown | ["markdown", "document"] |
| JSON / YAML / XML | ["tree", "structured"] |
| Logs | ["log", "text"] |
| Source code | ["code", "text"] |
| Explicit selection of files in a directory | ["filesystem"] |
A capability is a claim about the information the parser will receive, not about whether the source can be read that way. Many sources can be decoded under a capability without carrying their information in it — bytes that read as text are not necessarily the source's text. Before declaring a capability, confirm against the real source that normalizing it under that capability yields the information the user asked to view. If no supported capability does, do not declare the one that merely loads without error: the information must first exist in a representation whose normalization carries it, or the MView cannot be created for that source.
Capabilities beyond the minimum set
graph, timeseries, image, geo, audio, video, dataset, key-value, 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.
