Skip to content
claudewheel.strictspec_gen.lifecycle_event_validator
Edit
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

python
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

python
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

python
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

python
def with_format_version(self, v: int) -> StartedEvent

#with_id

python
def with_id(self, v: str) -> StartedEvent

#with_at

python
def with_at(self, v: str) -> StartedEvent

#with_session

python
def with_session(self, v: str) -> StartedEvent

#with_source

python
def with_source(self, v: str) -> StartedEvent

#with_kind

python
def with_kind(self, v: str) -> StartedEvent

#with_cwd

python
def with_cwd(self, v: str) -> StartedEvent

#with_config_dir

python
def with_config_dir(self, v: str) -> StartedEvent

#with_profile

python
def with_profile(self, v: str | None) -> StartedEvent

#with_claude_version

python
def with_claude_version(self, v: str | None) -> StartedEvent

#with_model

python
def with_model(self, v: str | None) -> StartedEvent

#with_permissions

python
def with_permissions(self, v: str | None) -> StartedEvent

#with_entry

python
def with_entry(self, v: str) -> StartedEvent

#with_transcript

python
def with_transcript(self, v: str | None) -> StartedEvent

#with_pid

python
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

python
def with_format_version(self, v: int) -> EndedEvent

#with_id

python
def with_id(self, v: str) -> EndedEvent

#with_at

python
def with_at(self, v: str) -> EndedEvent

#with_session

python
def with_session(self, v: str) -> EndedEvent

#with_source

python
def with_source(self, v: str) -> EndedEvent

#with_kind

python
def with_kind(self, v: str) -> EndedEvent

#with_outcome

python
def with_outcome(self, v: str) -> EndedEvent

#with_reason

python
def with_reason(self, v: str | None) -> EndedEvent

#with_detail

python
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

python
def with_format_version(self, v: int) -> NamedEvent

#with_id

python
def with_id(self, v: str) -> NamedEvent

#with_at

python
def with_at(self, v: str) -> NamedEvent

#with_session

python
def with_session(self, v: str) -> NamedEvent

#with_source

python
def with_source(self, v: str) -> NamedEvent

#with_kind

python
def with_kind(self, v: str) -> NamedEvent

#with_name

python
def with_name(self, v: str) -> NamedEvent

#with_name_source

python
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

python
def with_format_version(self, v: int) -> MarkEvent

#with_id

python
def with_id(self, v: str) -> MarkEvent

#with_at

python
def with_at(self, v: str) -> MarkEvent

#with_session

python
def with_session(self, v: str) -> MarkEvent

#with_source

python
def with_source(self, v: str) -> MarkEvent

#with_kind

python
def with_kind(self, v: str) -> MarkEvent

#with_state

python
def with_state(self, v: str | None) -> MarkEvent

#with_note

python
def with_note(self, v: str | None) -> MarkEvent

More tools from this site

  • claudestream Drive Claude Code from Python: run it as a subprocess and read its output as typed events, with async and sync sessions, sandbox policies, and tools you define in Python
  • dirstat Fast, single-binary directory statistics CLI: every file under a tree grouped by format, with counts, sizes, and lines of code, as a colored terminal table or as JSON
  • fastware A batteries-included ASGI framework: msgspec JSON, a managed Granian server, dependency injection, SSE, WebSockets, auth, and a test client
  • go-toml-edit Zero-dep TOML editing library for Go with comment preservation
  • howmuchleft The fastest Claude Code statusline: context window, 5-hour, and weekly limit usage as three customizable gradient bars, rendering in about 6 ms
  • orxtra
  • pgdesign
  • predraw Declarative rendering pipeline: describe a scene in JSON and get SVG, PNG and WebP out, with light and dark style tokens, reusable components and text converted to path outlines
  • reposummary Turn a git repository's history into a Markdown journal: pick a time window or revision range and get a readable digest of what changed, optionally narrated by an LLM
  • rlsbl Release orchestration and project scaffolding CLI that bumps versions, validates a structured JSONL changelog, tags only the commit CI verified, and publishes to npm, PyPI, Go and more
  • safegit git wrapper CLI that gives each commit its own temporary index and retries ref updates on conflict, so concurrent agents share one repository
  • saferm Command-line replacement for rm that archives every deletion with a mandatory reason and the context it ran in, so deleted files can be listed, inspected and restored
  • selfdoc Static Site Generator that builds a project's documentation site directly from its source code, so the docs can never drift from the code they describe, with SEO/AEO, first-class blog, search, and cross-project linking built in
  • strictcli
  • stricttest An always-on test-isolation floor: a pytest plugin and a Go env-hygiene module that make a test suite structurally unable to reach real credentials, the real HOME, the network, or the development repository.
  • wesktop A Python framework that turns an ASGI web app into a desktop application, serving it from a local Granian server and displaying it in a native OS window via pywebview
Search