#[non_exhaustive]pub struct PipelineEvent {Show 22 fields
pub session_hash: String,
pub tool_call_id_hash: String,
pub tool_name_anon: String,
pub endpoint_class: String,
pub response_chars: u64,
pub shape: Shape,
pub inner_formats: Vec<String>,
pub content_sha_prefix_hex: String,
pub file_path_hash: Option<String>,
pub is_dedup_hit: bool,
pub layer_used: Layer,
pub template_id: Option<String>,
pub tokens_baseline: u32,
pub tokens_final: u32,
pub context_partition: u32,
pub is_sidechain: bool,
pub ts_ms: i64,
pub sample_rate_applied: f32,
pub enricher_prefetched: bool,
pub enricher_predicted_cost_tokens: u32,
pub enricher_decline_reason: Option<String>,
pub cited_in_next_n_turns: Option<bool>,
}Expand description
Single pipeline decision — emitted once per tool-result.
See docs/research/paper-2-mckp-format-adaptive.md §Telemetry &
Observability for field-level documentation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_hash: StringSHA-256 prefix of the session UUID (not the raw UUID).
tool_call_id_hash: StringSHA-256 prefix of this tool_use_id — identifies the response for dedup references without exposing the raw id.
tool_name_anon: StringAnonymized tool name. MCP slugs are hashed (mcp__p<hash>__verb).
endpoint_class: StringCoarse endpoint classification (e.g. git_log, curl, or the full
tool_name for single-endpoint tools).
response_chars: u64Raw byte count of the response.
shape: ShapeStructural shape of the response.
inner_formats: Vec<String>Names of embedded formats detected inside the response (e.g. diff,
log, url, hash). Empty when no embedded formats were seen.
content_sha_prefix_hex: StringHex-encoded prefix of SHA-256 over the response bytes — 32 hex chars representing the first 16 bytes (128 bits), matching the paper’s stated fingerprint width and the Python extractor’s output.
file_path_hash: Option<String>Anonymized file-path hash for Read/Edit/Write-family tools;
None for tools that don’t operate on a file path.
is_dedup_hit: boolDid the pipeline emit a dedup hint in lieu of full content?
layer_used: LayerTerminal layer in the pipeline decision tree.
template_id: Option<String>L1 template identifier if layer_used == L1.
tokens_baseline: u32Token count before pipeline encoding (baseline).
tokens_final: u32Token count of what the pipeline emitted.
context_partition: u32Monotonic partition counter; increments on each compaction boundary.
is_sidechain: boolTrue for subagent (sidechain) tool-results; false for main session.
ts_ms: i64Unix milliseconds at which the response was produced.
sample_rate_applied: f32Fraction of events kept when sampling is enabled. 1.0 when every
event is recorded. Consumers of telemetry must scale counts by
1 / sample_rate_applied.
enricher_prefetched: boolTrue when the planner pre-fetched this tool call (rather than
the LLM emitting it directly). Drives the prefetch_hit_rate
metric — paired with cited_in_next_n_turns once the post-pass
scanner runs.
enricher_predicted_cost_tokens: u32cost_model.typical_kb-derived prediction (in tokens) at the
moment the planner admitted the call. Compared with
tokens_baseline to compute cost_overrun_rate.
enricher_decline_reason: Option<String>Set on declined candidates that the host emitted anyway as a
telemetry-only event (so tune analyze can study what the
planner skipped). One of "budget" / "low_probability" /
"preempted" / "prereq_missing".
cited_in_next_n_turns: Option<bool>Reserved for an offline citation-enrichment post-pass that
re-reads the JSONL log and sets this to true when the next
1–3 LLM messages textually reference any of the response’s
content_sha_prefix_hex bytes. The live pipeline never sets
this; the post-pass is not shipped yet (the existing
tune from-claude-logs --tools only seeds [tools.*]
defaults, it does not populate citation fields). Stays None
until that pass lands.
Trait Implementations§
Source§impl Clone for PipelineEvent
impl Clone for PipelineEvent
Source§fn clone(&self) -> PipelineEvent
fn clone(&self) -> PipelineEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more