Skip to content

API Reference parrot.outputs.a2ui.catalog.viz_core.graph

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.outputs.a2ui.catalog.viz_core.graph

View source

The Graph viz-core catalog component (FEAT-529 Module 2).

Follows the Chart composite pattern exactly (catalog/parrot/chart.py): GRAPH_SCHEMA is derived from :class:~parrot.outputs.a2ui.graph.models. GraphSpec (schema parity by construction, FEAT-473 G2) via :func:~parrot.outputs.a2ui.catalog.parrot._derive.derive_schema, plus ONE post-derivation merge: action is not a GraphSpec field (it's the Component-level prop; the official common_types.json#/$defs/ ComponentCommon does not define it either — FEAT-754 spec, Overview), so it is declared explicitly as a $ref to the vendored common_types.json#/ $defs/Action. lower() never hand-edits GRAPH_SCHEMA further.

Graph registers under :data:~parrot.outputs.a2ui.catalog.viz_core. VIZ_CORE_CATALOG_ID, NOT the Parrot catalog — this is the first component to actually populate the viz-core catalog (Module 0 only carried its identity/instructions, no registration).

Alias BasicNode

Re-exported from parrot.outputs.a2ui.catalog.base.BasicNode.

Alias BasicTree

Re-exported from parrot.outputs.a2ui.catalog.base.BasicTree.

Alias Component

Re-exported from parrot.outputs.a2ui.models.Component.

Attribute GRAPH_C4_AUTHORING_NOTES

Type: Final[str]

Attribute GRAPH_C4_UTTERANCES

Type: Final[tuple[str, ...]]

Attribute GRAPH_INSTRUCTIONS

Attribute GRAPH_SCHEMA

Type: dict[str, Any]

Class GraphComponent

The Graph viz-core catalog component.

Display-only by default (requires_actions=False) — a component-level action MAY be attached by a deterministic TOOL producer (rejected for ProducerOrigin.LLM by the existing ACTION_NOT_ALLOWED_FOR_LLM gate, spec G3 — no new gate is introduced here).

Method GraphComponent.lower

Lower a Graph to a Basic Catalog Card{Column[...]} tree.

A graph without a native drawing surface degrades to its accessible description, a caption, an edge list, and its mermaid source (FEAT-754 spec, "Lowered tree") — every renderer without viz-core support (or without a graph engine) still shows something readable and copyable. Any data binding passes through UNRESOLVED under metadata.extensions.parrot_graph_data (same convention as Chart's parrot_series_data) — resolution happens in the bake pass, never here.

lower(component: Component, data_model: dict[str, Any]) -> BasicTree

Parameter Type Default Description
component Component
data_model dict[str, Any]

Returns: BasicTree

Alias GraphEdge

Re-exported from parrot.outputs.a2ui.graph.GraphEdge.

Alias GraphSpec

Re-exported from parrot.outputs.a2ui.graph.GraphSpec.

Alias VIZ_CORE_CATALOG_ID

Re-exported from parrot.outputs.a2ui.catalog.viz_core.VIZ_CORE_CATALOG_ID.

Alias derive_schema

Re-exported from parrot.outputs.a2ui.catalog.parrot._derive.derive_schema.

Alias register_component

Re-exported from parrot.outputs.a2ui.catalog.register_component.

Alias to_mermaid

Re-exported from parrot.outputs.a2ui.graph.to_mermaid.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally