Skip to main content

cjm-harness-transcripts

Harness-transcript extraction library: reads Claude Code session transcripts (JSONL DAGs), walks the active path, and extracts the user-facing prose — assistant markdown bodies, cleaned user prompts, and curated tool-parameter prose (e.g. SendUserFile captions) — as ExtractedMessages ready to mint onto a context-graph session spine.

Modules

  • cjm_harness_transcripts — cjm-harness-transcripts: parse agent-harness session transcripts (Claude Code
  • cjm_harness_transcripts.extract — User-facing prose extraction — both sides, one truth.
  • cjm_harness_transcripts.mapping — Transcript ↔ session-key mapping, derived at pull time.
  • cjm_harness_transcripts.records — The transcript record layer: tolerant JSONL loading + the append-only DAG.

API

cjm_harness_transcripts.extract

  • ExtractedMessage class — One user-facing message off the active path, ready to become a Message node.
  • clean_user_text function — Strip harness wrapper blocks from a user prompt; collapse the scar tissue.
  • extract_messages function — The active path's user-facing messages, chronological.

cjm_harness_transcripts.mapping

  • BootInfo class — The first user prose of a transcript — the mapping's evidence.
  • TranscriptMatch class — One ranked candidate pairing for a session key.
  • find_transcripts_for_key function — All plausible transcripts for a session key, best first.
  • parse_record_timestamp function — A transcript record timestamp (ISO-8601, trailing Z) as an aware datetime.
  • parse_session_key function — A session key (local start timestamp, e.g. 2026-08-20_17-05-20) as an aware datetime.
  • read_boot_info function — The transcript's first user record bearing prose, or None (empty/tool-only file).

cjm_harness_transcripts.records

  • TranscriptDag class — The uuid-addressable view of a transcript: parent edges, forks, active path.
  • TranscriptRecord class — One JSONL record, uuid-addressable or not, with the raw dict preserved.
  • load_records function — Load a transcript JSONL tolerantly, in file order.

Dependencies

Used by: cjm-context-graph-projection

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cjm_harness_transcripts-0.0.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cjm_harness_transcripts-0.0.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file cjm_harness_transcripts-0.0.1.tar.gz.

File metadata

  • Download URL: cjm_harness_transcripts-0.0.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for cjm_harness_transcripts-0.0.1.tar.gz
Algorithm Hash digest
SHA256 78dfceef57130eaf29f873a049e99a386424df0d1c479803b4e63218c53a58da
MD5 ffa3e83e39ef9bff56ba5228b0d683ac
BLAKE2b-256 eae5c73774df8d2f14fe079c6a46af0aee71f3bbba7d82cd90ea889a9f3c74a6

See more details on using hashes here.

File details

Details for the file cjm_harness_transcripts-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cjm_harness_transcripts-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c76155c2c3decc4ae8d5b28024e5a12273a36c47cc77d43b738ca9fda733b06
MD5 aa521e24418638e0e673373919c25ab6
BLAKE2b-256 f260bff39bb0283c829e9ab459526a2e389205c1fc020760972d41ffddca58b9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page