Transcripts
register_transcript()
Register an external transcript against session_id so it folds into the deep view.
Usage
register_transcript(
session_id, *, provider="codex", thread_id=None, path=None, label=None
)Exactly one non-empty thread_id (resolved lazily against the codex sessions tree at dispatch) or path (a direct file path, normalized to an absolute path against the registration cwd so a relative locator still resolves once dispatch runs from the project root) locates the transcript. Registration is idempotent by (provider, thread_id, path) — re-registering the same transcript is a no-op. This is the one write codepath; the CLI and the capt-hook mcp server both delegate here.
Parameters
session_id: str-
The Claude Code session the transcript attaches to.
provider: str = "codex"-
The transcript’s source provider (default
"codex"). thread_id: str | None = None-
The provider thread/session id to resolve at dispatch.
path: str | None = None-
A path to the transcript file, stored absolute (a relative path anchors to the caller’s cwd).
label: str | None = None- An optional human label for the registration.
Returns
The: RegisteredTranscript-
class:
~captain_hook.state.RegisteredTranscriptrecorded for the request.
RegisteredTranscript
An external transcript folded into a session’s deep view — a codex thread id or a file path.
Usage
RegisteredTranscript()Exactly one non-empty thread_id or path locates the transcript: a thread id resolves lazily against the codex sessions tree at dispatch time, while a path points straight at the file.
Attributes
provider: str-
The transcript’s source, e.g.
"codex". thread_id: str | None-
The provider thread/session id, resolved to a rollout path at dispatch.
path: str | None-
An absolute path to the transcript file.
label: str | None-
An optional human label for the registration.
registered_at: float- The Unix timestamp the registration was recorded.
RegisteredTranscripts
The external transcripts registered against one session, in registration order.
Usage
RegisteredTranscripts()