app.state

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

Application setup/runtime state containers.

Application setup/runtime state containers.

app.state

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

PendingRoute
class

A route waiting to be compiled.

PendingTool
class

A tool waiting to be compiled.

MountAppSkip
class

One entry dropped duringApp.mount_appmerge (parent-wins).

Recorded on the parent's mutable state so a contract check can surface it as an INFO issue in categorymount_app_merge— users see what their sub-app tried to register but was overridden.

PluginQuarantine
class

One plugin whoseregister() raised during App.mount.

Mounting wraps the loneplugin.register(app, prefix)call so a single broken plugin is quarantined (skipped) instead of aborting boot. The quarantine is recorded on the app's mutable state and surfaced as an ERROR issue in categoryplugin_quarantineby a contract check — mirroring the MountAppSkip -> mount_app_mergeprecedent. A non-fatal WARNING is also logged atmounttime so the signal exists even when contract checks are skipped (honors root AGENTS.md "no silent except").

Partial registration is a known limitation: a plugin that registers some routes before raising leaves that partial state behind; quarantine does not roll it back (full transactional mount is out of scope).

InternalRouteSpec
class

Framework-owned URL surface published at freeze time.

DebugInjectionSpec
class

One debug runtime browser bootstrap resource.

InternalFeatureSpec
class

A native internal/debug feature and the routes/resources it owns.

RuntimeDebugWiring
class

Frozen debug/internal wiring descriptor published with runtime state.

MutableAppState
class

Mutable setup-time state.

RuntimeAppState
class

Compiled runtime state populated during freeze.

ContractCheckSnapshot
class

Stable read model for contract checks.

Third-party contract checks receive this snapshot alongside a CheckResult to append issues to. The template_sourcesdict contains{template_name: source_text}for every loaded template, andextrascarries arbitrary data registered via app.set_contract_check_data().

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