Shared structured-result boundary for read-only inspection commands.
cli._inspection
| 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
JSON-compatible payload with CLI-only presentation metadata.
The mapping is the complete programmatic and MCP result. The slotted attributes are intentionally invisible to JSON serialization…
Return actionable app-resolution data while preserving CLI behavior.
Return a structured, repairable inspection failure.
Write a result through its legacy terminal channel and exit policy.
InspectionResult
class
JSON-compatible payload with CLI-only presentation metadata.
The mapping is the complete programmatic and MCP result. The slotted attributes are intentionally invisible to JSON serialization and exist only so Milo's terminal renderer can preserve Chirp's established text, stream, and exit policy.
resolution_error
function
def resolution_error(app_import: str, exc: Exception) -> InspectionResult
Return actionable app-resolution data while preserving CLI behavior.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
app_import
|
str
|
— | |
exc
|
Exception
|
— |
inspection_error
function
def inspection_error(*, code: str, message: str, suggestion: str, context: dict[str, Any] | None = None) -> InspectionResult
Return a structured, repairable inspection failure.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
code
|
str
|
— | |
message
|
str
|
— | |
suggestion
|
str
|
— | |
context
|
dict[str, Any] | None
|
None
|
emit_terminal_result
function
def emit_terminal_result(result: InspectionResult) -> None
Write a result through its legacy terminal channel and exit policy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
result
|
InspectionResult
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/cli/_inspection.py:1