Private ordered observations for debug and test capture.
This module deliberately has no public export. It stores only framework-owned, structural facts copied from typed traces; request/response bodies, headers, cookies, session data, rendered HTML, and template context never enter the capture model.
server.intent_timeline
| 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
Keep the media type while dropping header parameters such as boundaries.
Derive an opaque correlation ID without retaining a caller header value.
Structural request facts copied from a typed return trace.
One typed render decision without template context or rendered HTML.
Final response and compiled-transition facts.
Allowlisted SSE lifecycle metadata; event data and IDs are excluded.
Framework-owned diagnostic code with no arbitrary message payload.
Immutable structural facts awaiting sequence allocation.
One immutable observation in an authoritative capture order.
Explicit evidence that a capture contains only a retained suffix.
Stable read model for one capture lifecycle.
Locked, bounded, process-local capture for debug/test use only.
Return the canonical UTF-8 size used by the byte retention bound.
Build the existing debug-record shape plus ordered capture metadata.
Copy a typed trace into request, render, and response observations.
Copy only allowlisted structural SSE metadata into an observation.
Build a framework diagnostic without accepting arbitrary metadata.
_content_type_class
function
def _content_type_class(value: str | None) -> str | None
Keep the media type while dropping header parameters such as boundaries.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value
|
str | None
|
— |
_capture_request_id
function
def _capture_request_id(value: str | None) -> str | None
Derive an opaque correlation ID without retaining a caller header value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value
|
str | None
|
— |
_RequestObservation
class
Structural request facts copied from a typed return trace.
_RenderIntentObservation
class
One typed render decision without template context or rendered HTML.
_ResponseObservation
class
Final response and compiled-transition facts.
_SSEObservation
class
Allowlisted SSE lifecycle metadata; event data and IDs are excluded.
_DiagnosticObservation
class
Framework-owned diagnostic code with no arbitrary message payload.
_ObservationDraft
class
Immutable structural facts awaiting sequence allocation.
_IntentObservation
class
One immutable observation in an authoritative capture order.
_TruncationMarker
class
Explicit evidence that a capture contains only a retained suffix.
_CaptureSnapshot
class
Stable read model for one capture lifecycle.
_IntentCapture
class
Locked, bounded, process-local capture for debug/test use only.
_encoded_size
function
def _encoded_size(observation: _IntentObservation) -> int
Return the canonical UTF-8 size used by the byte retention bound.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
observation
|
_IntentObservation
|
— |
_observation_mapping
function
def _observation_mapping(observation: _IntentObservation) -> dict[str, Any]
Build the existing debug-record shape plus ordered capture metadata.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
observation
|
_IntentObservation
|
— |
_http_drafts
function
def _http_drafts(trace: ReturnTrace, *, request_id: str, internal: bool, owner: str) -> tuple[_ObservationDraft, _ObservationDraft, _ObservationDraft]
Copy a typed trace into request, render, and response observations.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
trace
|
ReturnTrace
|
— | |
request_id
|
str
|
— | |
internal
|
bool
|
— | |
owner
|
str
|
— |
_sse_draft
function
def _sse_draft(*, phase: str, route_pattern: str, request_id: str, parent_sequence: int | None, internal: bool, owner: str, data: dict[str, Any] | None) -> _ObservationDraft
Copy only allowlisted structural SSE metadata into an observation.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
phase
|
str
|
— | |
route_pattern
|
str
|
— | |
request_id
|
str
|
— | |
parent_sequence
|
int | None
|
— | |
internal
|
bool
|
— | |
owner
|
str
|
— | |
data
|
dict[str, Any] | None
|
— |
_diagnostic_draft
function
def _diagnostic_draft(code: str) -> _ObservationDraft
Build a framework diagnostic without accepting arbitrary metadata.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
code
|
str
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/server/intent_timeline.py:1