ai-hats-observe
A standalone session-logging engine: open a session on a bare directory,
append trace entries, write an incremental audit, and finalize a versioned
metrics.json — with no configuration, no worktree engine, and no
ai-hats.yaml.
ai-hats-observe is the observability core extracted from the
ai-hats framework (ADR-0014 Phase 1, T15).
It has no dependency on the ai-hats integrator: everything below runs against a
plain directory. Its only runtime dependency is
ai-hats-core (dependency-free
filesystem primitives + the migration seam).
What it owns
- Session lifecycle —
SessionManager/Session: allocate a session directory, resolve its artifact paths, list/filter past sessions. - Trace + audit writer —
log_trace,init_audit,append_audit,finalize_audit; the enrichedAuditWriterthat turns a transcript intoaudit.md+ a versionedmetrics.json. - Versioned trace/audit schema — a
schema_versionon the metrics surface, with a wired (initially empty) migration seam. - Surface-agnostic parsing — a
TranscriptParseradapter: theAuditWriterholds no provider-specific parsing; the concreteClaudeParser(structured JSONL + trace-chrome fallback) is one implementation. A new surface (Gemini, or a future CLI) plugs in its own parser — the writer never changes.
Extending to a new surface
The parser is carried by the session's provider, not a central registry: a
Provider yields its TranscriptParser, and the integrator injects it into the
AuditWriter. Adding a surface means shipping a parser that satisfies the
TranscriptParser protocol and a provider that names it — no edit to
ai-hats-observe internals.
Dependency direction
ai-hats-observe imports only ai-hats-core and the standard library. It
never imports the ai-hats integrator; ai-hats imports from here. The boundary
is enforced by an AST import-lint (test_observe_boundary.py).
Release files for ai-hats-observe 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ai_hats_observe-0.4.0.tar.gz | 41.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_hats_observe-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.7 kB
Release files / ai_hats_observe-0.4.0.tar.gz
| Download URL | ai_hats_observe-0.4.0.tar.gz |
|---|---|
| Size | 41.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a1f7e0657a4b7233f264f6f40ea4ff35a1935ee516de49111755f77cf526a8c
|
|
BLAKE2b-256 checksum How to use checksums |
bdb17fdb57b080e038cd49cbccca3c50ea4d8b18c570a86e51e3bfd6b4340f6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logRelease files / ai_hats_observe-0.4.0-py3-none-any.whl
| Download URL | ai_hats_observe-0.4.0-py3-none-any.whl |
|---|---|
| Size | 34.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e126ea52fcdf0db704d01c30f4a0c83c0cd9aee459a40658ed24b351403d947d
|
|
BLAKE2b-256 checksum How to use checksums |
40c476d45e5abd57ce3bf1e4c185b4a45016c3ecaca5b3f2c9cb338d40e4870f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency log