Skip to main content

Module chat_capture

Module chat_capture 

Source
Expand description

Typed, terminal-only continuous-memory chat capture (task C1).

The builder accepts TerminalTurnHistory, not streaming state. It rejects foreign-project provenance before inspecting content, filters forbidden classes, bounds every retained body, and derives a deterministic source digest / capture id from canonical source data.

Structs§

CanonicalCaptureItem
One item from canonical completed history, already classified by the host.
CaptureDisclosure
Exact disclosure classes present after filtering, in deterministic order.
CaptureId
CaptureSegment
ChatTurnCapture
CompactionSource
First-class provenance for a compaction summary linked to this turn.
ConversationSummaryCapture
First-class compaction memory. It links to (and never substitutes for) the source range whose full provenance remains on the compacted session.
MessageRangeDigest
PromptStackDigest
TerminalTurnHistory
Canonical history after the engine has produced exactly one terminal TurnOutcome. Partial stream accumulators are a different type and cannot be passed to build_chat_turn_capture.
ToolCaptureSummary

Enums§

CaptureBuildError
CaptureContentClass
Host classification of one canonical history item. Only the first three variants can produce captured content; all other variants are forbidden.
CaptureSchemaVersion
CompactionSchemaVersion
CompactionSummaryOrigin
RedactionPolicy
Sensitivity
SummaryCaptureBuildError

Constants§

CAPTURE_SEGMENT_MAX_BYTES
MAX_TOOL_SUMMARIES
SUMMARY_CAPTURE_MAX_BYTES
TOOL_NAME_MAX_BYTES
TOOL_SUMMARY_MAX_BYTES

Functions§

build_chat_turn_capture
Build one bounded capture from a typed terminal history snapshot.
build_conversation_summary_capture
Build the bounded first-class memory emitted after a persisted compaction transition. The source digest and session are copied from the transition’s typed provenance rather than recomputed from the post-compaction history.