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

Metadata

Release files for cjm-harness-transcripts 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjm-harness-transcripts 0.0.2
File Size Uploaded
cjm_harness_transcripts-0.0.2.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cjm-harness-transcripts 0.0.2
File Interpreter ABI Platform
cjm_harness_transcripts-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / cjm_harness_transcripts-0.0.2.tar.gz

Download URL cjm_harness_transcripts-0.0.2.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c961f42fee7ebc90c88290a40b7d466d00d09a79b8ff7b6e9ceeb16a67e2a0e6
BLAKE2b-256 checksum
How to use checksums
fefb33427181d55d84af304ead4b93045e7c863ab8495b9a9c9b92580bd9f781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / cjm_harness_transcripts-0.0.2-py3-none-any.whl

Download URL cjm_harness_transcripts-0.0.2-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5173f5b2d8d8ca5f3801a49f7c634e5acde0b03c19bee1ef56886ab71666876
BLAKE2b-256 checksum
How to use checksums
26c8ed5b1888f9b210027ede019e6c38b27a1490b4680a07b33bf6479f16142c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

0.0.3

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page