vibeview.renderer_plugins

Third-party section renderers for vibe-view (extension API v1).

A renderer package registers one object in the vibeview.renderers entry point group, named after the section kind it renders. The object is a RendererSpec or a zero-argument factory returning one. The kind then classifies as rendered everywhere vibe-view reports a section: the browser lists it with the plugin’s title and icon and shows the plugin’s HTML in the details panel, vibe-view info and the startup banner count it as rendered, a critical section of that kind no longer blocks the open, and the terminal shows its generic section pane.

Like vibeview.importers, this module is the whole contract and imports nothing heavy: discovery reads entry-point metadata and loads the plugin objects, never the viewer stack.

Contract, version 1 (RENDERER_API_VERSION); vibe-view 3.x keeps it compatible:

  • RendererSpec fields as declared here. New fields are added only with defaults.

  • The renderer class is constructed as renderer(section, reader) with the Section and the QVFReader that owns it. load() returns the section’s data, and render_to_html(), called with no arguments, returns the HTML document the details panel shows. Subclassing vibeview.renderers.BaseRenderer is optional.

  • A renderer reads its section through section.id, section.kind, section.members, section.model_extra and the reader’s verified member methods read_json_member, read_text_member and read_binary_member.

Everything else in vibe-view, vibeview.app included, stays internal. Representations and 3D actors are not part of version 1.

Module Attributes

DEFAULT_PLUGIN_ICON

The sidebar icon a spec gets when it names none.

PLUGIN_DETAIL

classify_section's detail for a kind an installed plugin renders.

Functions

available_renderers()

Return successfully loaded renderer specs in deterministic order.

clear_renderer_cache()

Clear discovery state after installing a plugin in this process.

discover_renderers()

Load installed renderer plugins, isolating failures per plugin.

get_renderer_plugin(kind)

Return the installed renderer for kind, or None.

plugin_kinds()

The section kinds installed plugins render.

plugin_report()

One row per discovered entry point, for vibe-view doctor.

Classes

RendererSpec(kind, title, renderer[, icon, ...])

Versioned contract implemented by a third-party section renderer.

RendererStatus(entry_point, distribution, spec)

One discovered entry point, including isolated load failures.

Exceptions

RendererPluginError

A renderer plugin could not be loaded or does not meet the contract.

vibeview.renderer_plugins.DEFAULT_PLUGIN_ICON = 'mdi-puzzle-outline'

The sidebar icon a spec gets when it names none.

vibeview.renderer_plugins.PLUGIN_DETAIL = 'via plugin'

classify_section’s detail for a kind an installed plugin renders.

exception vibeview.renderer_plugins.RendererPluginError[source]

Bases: ValueError

A renderer plugin could not be loaded or does not meet the contract.

class vibeview.renderer_plugins.RendererSpec(kind, title, renderer, icon='mdi-puzzle-outline', description='', api_version=1)[source]

Bases: object

Versioned contract implemented by a third-party section renderer.

kind is the QVF section kind rendered, and must equal the entry point’s name. A vendor kind (x_<vendor>.<name>) is the usual choice; a kind vibe-view renders itself cannot be claimed. title is the sidebar and panel title and icon a Material Design Icons name (mdi-...). renderer is the class described in the module docstring.

Parameters:
kind: str
title: str
renderer: type
icon: str = 'mdi-puzzle-outline'
description: str = ''
api_version: int = 1
class vibeview.renderer_plugins.RendererStatus(entry_point, distribution, spec, error=None)[source]

Bases: object

One discovered entry point, including isolated load failures.

Parameters:
entry_point: str
distribution: str | None
spec: RendererSpec | None
error: str | None = None
property available: bool
vibeview.renderer_plugins.discover_renderers()[source]

Load installed renderer plugins, isolating failures per plugin.

Return type:

tuple[RendererStatus, …]

vibeview.renderer_plugins.clear_renderer_cache()[source]

Clear discovery state after installing a plugin in this process.

Return type:

None

vibeview.renderer_plugins.available_renderers()[source]

Return successfully loaded renderer specs in deterministic order.

Return type:

tuple[RendererSpec, …]

vibeview.renderer_plugins.get_renderer_plugin(kind)[source]

Return the installed renderer for kind, or None.

Parameters:

kind (str)

Return type:

RendererSpec | None

vibeview.renderer_plugins.plugin_kinds()[source]

The section kinds installed plugins render.

Never raises: discovery isolates each plugin, and a failure of discovery itself leaves the built-in kinds as they are.

Return type:

frozenset[str]

vibeview.renderer_plugins.plugin_report()[source]

One row per discovered entry point, for vibe-view doctor.

Return type:

list[dict[str, object]]