document-ast

BadgeA small styled annotation rendered next to its surrounding inline content — the natural shape for "this resource is of type X" tags next to a heading, status…Badge LabelRequired visible text for the badge. Backends render it inside the chip / link. Badge TargetOptional clickable target — the resource the badge links to. Same shape as `ResourceLink.target`: backends serialize this as the target's canonical URI. When…Badge TooltipOptional hover-text for the badge. HTML backends emit as `title=` on the chip; Markdown backends emit as the link-title slot. Conventionally populated with the…BlockAbstract marker class for block-level content in a narrative document. Subclassed by Heading, Paragraph, and (in future revisions) CodeBlock, BulletList,…ChildrenThe document's narrative block list, in render order. Backends that support narrative content (Markdown, HTML, plain-text) walk this channel. Structured-only…CSSA stylesheet (Cascading Style Sheets) source. Used by the stylesheet backend to pass CSS through verbatim, and by HTML backends that wrap RawBlock(text/css) in…DocumentRoot of a document AST. Carries two parallel channels: `metadata` (structured key-value data, used by frontmatter/TOML/JSON backends) and `children` (a block…DynamoDB BooleanEmit as a DynamoDB `BOOL` attribute value. The hinted value must be a StringScalar holding exactly "true" or "false"; the backend emits `{ "BOOL": true }` / `{…DynamoDB NullEmit as a DynamoDB `NULL` attribute value. The hinted value is a StringScalar (its string content is ignored); the backend emits `{ "NULL": true }`. DynamoDB NumberEmit as a DynamoDB `N` attribute value. The hinted value must be a StringScalar holding a numeric literal; the backend emits `{ "N": "<value>" }` (DynamoDB…EntriesThe ordered list of key-value pairs inside a StructuredMap. Order is significant and preserved through serialization. Escape HintPer-StructuredEntry policy that tells each format backend how to serialize the entry's value. Lives on StructuredEntry rather than on the StructuredScalar…Escape HintOptional. Serialization hint consulted by backends when emitting a value. If omitted, the backend applies its default escaping for the value's type. As of…Escape-HintableAbstract marker class for AST nodes that may carry an `escapeHint` (added in 1.3.0). Two things are EscapeHintable: a StructuredEntry (the hint applies to the…HeadingA section heading, numbered by `level` (1 = H1, 2 = H2, ...). Contains inline content in `inlines`. In Markdown backends this becomes `# text`, `## text`, etc;…HTMLAn HTML fragment, already rendered. HTML backends emit it unescaped (trusted passthrough). Non-HTML backends typically fall back to escaped-text behavior or…InlineAbstract marker class for inline (intra-paragraph) content: runs of text, emphasis, links, and so on. Inline instances live inside Block.inlines slots. v1.0.0…InlinesThe ordered inline content of a block (Heading, Paragraph). Integer ScalarAn integer leaf value. Serialized as a bare numeric literal by all backends (no quoting). Used for fields like an agent's `maxTurns`. Integer ValueThe numeric value of an IntegerScalar. ItemsThe ordered elements of a StructuredList. JSONA JSON value (serialized as text). Backends may pretty-print or pass through depending on target format. JSON-encodedEmit as a JSON string literal. Produces a double-quoted, fully escaped value suitable for any JSON backend. KeyThe string key of a StructuredEntry. LevelHeading depth, starting at 1. Markdown `# H1` is level 1, `## H2` is level 2, and so on. Link LabelOptional display text for the link. When absent, backends fall back to a label derived from the target's `rdfs.label`, `rdfs.comment`, or local name —…Link TooltipOptional hover-text for the link. HTML backends emit this as the anchor's `title=` attribute; Markdown backends emit it as the optional title slot of the link…MarkdownCommonMark-flavored markdown. HTML backends run this content through a markdown renderer; Markdown backends emit it verbatim. Media TypeA named IANA media type (MIME type). Used on RawBlock instances to tell backends how to interpret the raw content. Modeled as a named-instance vocabulary…Media TypeThe media type of the sibling `rawContent`. Backends dispatch on this URI: HTML backend runs `text/markdown` content through a markdown renderer, passes…MetadataThe document's structured metadata channel. Backends that support key-value output (YAML frontmatter, TOML, JSON) serialize this channel. Narrative-only…MIME TypeThe canonical IANA MIME type string for this MediaType instance (e.g. "text/markdown", "text/html", "application/json"). Useful for interop with systems that…ParagraphA block of flowing text. Contains inline content in `inlines`. Markdown backends emit the inlines as a line followed by a blank line; HTML backends wrap in…Plain TextUnformatted text. Backends should emit without interpretation (but with format-appropriate escaping, e.g., HTML entity encoding). Property EntriesThe ordered list of (key, value) rows in this PropertyList. Order is significant and preserved through serialization. Property EntryOne row in a PropertyList: a `propertyKey` (the row's label) and a `propertyValue` (the row's content, which is itself a list of Inline and/or Block nodes —…Property KeyThe string key (label) of a PropertyEntry. Rendered as `<dt>` in HTML, bold prefix in Markdown. Property ListA block-level definition-list: an ordered sequence of (key, value) rows where each value can mix inline content (text, ResourceLinks) and nested blocks…Property TooltipOptional hover-text for the property key — displayed on the `<dt>` in HTML backends. Conventionally populated by the universal renderer with the predicate's…Property ValueThe value of a PropertyEntry. List-valued — accepts a sequence of Inline nodes (Text, ResourceLink) and/or Block nodes (nested PropertyList, RawBlock, etc.).…RawEmit the value verbatim, with no escaping. Unsafe if the value contains format-significant characters. Used today by SkillTransformer for the `description`…Raw BlockA block of pre-formatted content in a declared media type. Borrowed from Pandoc's AST. Use for content that is already in a specific format (e.g., a…Raw ContentThe raw, pre-formatted content string of a RawBlock. Interpreted by backends according to the sibling `mediaType` property. Resource LinkA clickable link to another Kanonak resource. `target` carries the resource being linked to (an ObjectProperty value at the transformation level resolves to a…String ScalarA string leaf value. Carries the raw unescaped string in `stringValue`. The containing StructuredEntry's `escapeHint` controls how backends serialize it. String ValueThe raw unescaped characters of a StringScalar. Backends apply per-EscapeHint escaping at serialization time. Structured EntryOne key-value pair inside a StructuredMap. The optional `escapeHint` property tells each backend how to serialize the value — raw, YAML-safe scalar, TOML…Structured ListAn ordered collection of StructuredValues. Used for array-valued metadata fields (e.g., an agent's `tools` list). Backends serialize this as a YAML flow…Structured MapAn ordered key-value collection. Entry order is significant and is preserved from the author's specification through to the output file. Backends that produce…Structured ValueAbstract marker class for key-value / list / scalar data. Subclassed by StructuredMap, StructuredList, StringScalar, and IntegerScalar. Used for…SVGAn SVG (Scalable Vector Graphics) fragment. Because SVG is valid inline HTML5, the HTML backend embeds it verbatim (trusted passthrough, same policy as…TableTabular layout. `tableColumnLabels` is the ordered list of column header strings (the first label is conventionally an empty string when the leftmost column…Table CellsOrdered list of cell contents. List-valued; range is `rdfs.Resource` to permit the polymorphic Inline/Block mix (same convention as…Table Column LabelsOrdered list of column header strings. The number of entries sets the table's column count. Table RowOne row in a Table. `tableCells` is the ordered list of cell contents — each cell may be any Inline (Text, ResourceLink) or Block (nested PropertyList,…Table RowsOrdered list of TableRow entries. TargetThe resource being linked to. Backends serialize this as the target's canonical URI (publisher/package@version/name). Required. TextA run of plain text. Carries no formatting of its own. Backends may apply format-specific escaping (HTML entity encoding, etc.) when serializing. TextThe raw character data of a Text inline. TOML Multiline StringEmit as a TOML multiline basic string: triple-double-quoted, with embedded `"""` sequences escaped. Used today for the agent `developer_instructions` TOML key,…TOML Single-line StringEmit as a TOML basic string: double-quoted with backslash escaping for quotes, backslashes, and newlines. Used today for TOML keys like `name`, `description`,…ValueThe value of a StructuredEntry. May be a scalar, list, or nested map. YAMLA YAML document. Useful for embedding configuration snippets inside generated documentation. YAML-safe ScalarEmit as a YAML scalar, double-quoting and escaping if the value contains any YAML flow indicators (colon, hash, brackets, quotes, etc.), or as a block literal…