Session logging engine for the ai-hats framework — session lifecycle, versioned trace/audit schema, and a surface-agnostic transcript-parser adapter.
Project description
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_hats_observe-0.3.0.tar.gz.
File metadata
- Download URL: ai_hats_observe-0.3.0.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69f71263695a9d2e7f2bcfbcec243227734e7e71184add362de64f6b1cbf4967
|
|
| MD5 |
bb46c991ef9f2f56884fb8151d952418
|
|
| BLAKE2b-256 |
355f9b4e154bd53711f2a819851368681c1edaccf53f5a9ac6d4d835ff3b3dff
|
Provenance
The following attestation bundles were made for ai_hats_observe-0.3.0.tar.gz:
Publisher:
release-packages.yml on muratovv/ai-hats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_hats_observe-0.3.0.tar.gz -
Subject digest:
69f71263695a9d2e7f2bcfbcec243227734e7e71184add362de64f6b1cbf4967 - Sigstore transparency entry: 2132154583
- Sigstore integration time:
-
Permalink:
muratovv/ai-hats@dd96e795e1465682660022ec07c2fbdb2805f373 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/muratovv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-packages.yml@dd96e795e1465682660022ec07c2fbdb2805f373 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ai_hats_observe-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ai_hats_observe-0.3.0-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3f11778bd815a46eab1d37580feef9f99daed95fadcc0418955c77cbcec804
|
|
| MD5 |
31c32acc212207c276adccceb51645e6
|
|
| BLAKE2b-256 |
51ed58e2fa4c441514d546551bf30cec776f231c80f3e1b33de42c68623a8b96
|
Provenance
The following attestation bundles were made for ai_hats_observe-0.3.0-py3-none-any.whl:
Publisher:
release-packages.yml on muratovv/ai-hats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_hats_observe-0.3.0-py3-none-any.whl -
Subject digest:
3c3f11778bd815a46eab1d37580feef9f99daed95fadcc0418955c77cbcec804 - Sigstore transparency entry: 2132154698
- Sigstore integration time:
-
Permalink:
muratovv/ai-hats@dd96e795e1465682660022ec07c2fbdb2805f373 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/muratovv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-packages.yml@dd96e795e1465682660022ec07c2fbdb2805f373 -
Trigger Event:
push
-
Statement type: