Skip to content

API Reference parrot.outputs.a2ui.renderers.degrade

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

parrot.outputs.a2ui.renderers.degrade

View source

Renderer degradation helper (Module 7, core side, FEAT-470 TASK-2543).

A static renderer must NEVER raise for a component it merely doesn't natively support (spec §7 Known Risks: "degradación registrada, nunca excepción silenciosa"). :func:degrade builds the visible placeholder; the CALLING renderer is responsible for collecting one record per degradation into a list it dumps into RenderedArtifact.metadata["degraded"] (this module holds no state of its own — recording is the renderer's job, since only the renderer knows the full set of degradations for one render pass).

One-way import rule (G8): this module MUST NEVER import from parrot.bots, parrot.clients, agents, or DatasetManager.

Function degrade

Replace an unsupported node with a visible Text placeholder.

degrade(node: BasicNode, reason: str) -> BasicNode

Parameter Type Default Description
node BasicNode The original (unsupported, on THIS renderer) BasicNode. Its id is preserved so the placeholder can still be located by anything that referenced the original node's id.
reason str Human-readable reason for the degradation (e.g. the renderer name and the missing capability).

Returns: BasicNode — A Text BasicNode (metadata.extensions.parrot_role="notice") standing in for node.

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