app.hypermedia_program_compiler

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Compiler for the internal immutable hypermedia application model.

Compiler for the internal immutable hypermedia application model.

app.hypermedia_program_compiler

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

_normalize_declarations
function
def _normalize_declarations(declarations: list[TemplateDeclaration]) -> tuple[TemplateDeclaration, ...]

Return exact declarations once in deterministic semantic order.

Parameters

Name Type Default Description
declarations list[TemplateDeclaration]
_reachable_template_names
function
def _reachable_template_names(router: Any, page_templates: set[str], declarations: tuple[TemplateDeclaration, ...]) -> tuple[str, ...]

Collect templates proven reachable from registration and route contracts.

Loader-wide inventory remains in the dead-template checker until that rule migrates. Eagerly parsing every bundled template would penalize apps that do not render templates and would make this graph a second source of truth.

Parameters

Name Type Default Description
router Any
page_templates set[str]
declarations tuple[TemplateDeclaration, ...]
compile_hypermedia_program
function
def compile_hypermedia_program(*, router: Any, kida_env: Any, page_templates: set[str], page_leaf_templates: set[str], fragment_target_registry: Any, template_declarations: list[TemplateDeclaration]) -> HypermediaProgram

Compile existing runtime inputs into one immutable internal model.

Parameters

Name Type Default Description
router Any
kida_env Any
page_templates set[str]
page_leaf_templates set[str]
fragment_target_registry Any
template_declarations list[TemplateDeclaration]

View source · /home/runner/work/chirp/chirp/site/../src/chirp/app/hypermedia_program_compiler.py:1