On this page
The generated validator for one session lifecycle line: the format_version marker, the kind arm set, every field type and the rejection of unknown keys.
#claudewheel.strictspec_gen.lifecycle_event_validator
#claudewheel.strictspec_gen.lifecycle_event_validator
#validate_bytes
def validate_bytes(input: bytes, syntax: str) -> tuple[Value | None, tuple[Diagnostic, ...]]RAW-BYTES entry point: lossless parse of input in the given syntax ("json" | "toml" | "jsonl"), then validate. Returns the typed root value (None when any diagnostic fired) and the ordered diagnostics.
#validate_bytes_with_evidence
def validate_bytes_with_evidence(input: bytes, syntax: str, evidence: dict | None) -> tuple[Value | None, tuple[Diagnostic, ...]]validate_bytes plus cross-document resolver evidence for the phase-2 constraint vocabulary.
#validate_value
def validate_value(v: Value) -> tuple[Value | None, tuple[Diagnostic, ...]]TAGGED-VALUE entry point: validate an already-parsed tagged document value (from strictspec.load_value or a typed constructor). Raw untagged dicts are never accepted.
#StartedEvent
Frozen typed binding of the "StartedEvent" record. Immutable; use with_* for copy-on-write.
#with_format_version
def with_format_version(self, v: int) -> StartedEvent#with_id
def with_id(self, v: str) -> StartedEvent#with_at
def with_at(self, v: str) -> StartedEvent#with_session
def with_session(self, v: str) -> StartedEvent#with_source
def with_source(self, v: str) -> StartedEvent#with_kind
def with_kind(self, v: str) -> StartedEvent#with_cwd
def with_cwd(self, v: str) -> StartedEvent#with_config_dir
def with_config_dir(self, v: str) -> StartedEvent#with_profile
def with_profile(self, v: str | None) -> StartedEvent#with_claude_version
def with_claude_version(self, v: str | None) -> StartedEvent#with_model
def with_model(self, v: str | None) -> StartedEvent#with_permissions
def with_permissions(self, v: str | None) -> StartedEvent#with_entry
def with_entry(self, v: str) -> StartedEvent#with_transcript
def with_transcript(self, v: str | None) -> StartedEvent#with_pid
def with_pid(self, v: int | None) -> StartedEvent#EndedEvent
Frozen typed binding of the "EndedEvent" record. Immutable; use with_* for copy-on-write.
#with_format_version
def with_format_version(self, v: int) -> EndedEvent#with_id
def with_id(self, v: str) -> EndedEvent#with_at
def with_at(self, v: str) -> EndedEvent#with_session
def with_session(self, v: str) -> EndedEvent#with_source
def with_source(self, v: str) -> EndedEvent#with_kind
def with_kind(self, v: str) -> EndedEvent#with_outcome
def with_outcome(self, v: str) -> EndedEvent#with_reason
def with_reason(self, v: str | None) -> EndedEvent#with_detail
def with_detail(self, v: str | None) -> EndedEvent#NamedEvent
Frozen typed binding of the "NamedEvent" record. Immutable; use with_* for copy-on-write.
#with_format_version
def with_format_version(self, v: int) -> NamedEvent#with_id
def with_id(self, v: str) -> NamedEvent#with_at
def with_at(self, v: str) -> NamedEvent#with_session
def with_session(self, v: str) -> NamedEvent#with_source
def with_source(self, v: str) -> NamedEvent#with_kind
def with_kind(self, v: str) -> NamedEvent#with_name
def with_name(self, v: str) -> NamedEvent#with_name_source
def with_name_source(self, v: str | None) -> NamedEvent#MarkEvent
Frozen typed binding of the "MarkEvent" record. Immutable; use with_* for copy-on-write.
#with_format_version
def with_format_version(self, v: int) -> MarkEvent#with_id
def with_id(self, v: str) -> MarkEvent#with_at
def with_at(self, v: str) -> MarkEvent#with_session
def with_session(self, v: str) -> MarkEvent#with_source
def with_source(self, v: str) -> MarkEvent#with_kind
def with_kind(self, v: str) -> MarkEvent#with_state
def with_state(self, v: str | None) -> MarkEvent#with_note
def with_note(self, v: str | None) -> MarkEvent