Skip to main content

Crate tokencompact_core

Crate tokencompact_core 

Source
Expand description

Provider-neutral, deterministic, bounded log-reduction state machine.

This crate owns only the execution-independent mechanics: input framing, scopes, parser lifecycle, provenance, output transformation, arbitration, exact deduplication, ranking, and serialized byte budgets. Parser packs and provider adapters live in downstream crates.

Structs§

Budget
Combined item and serialized-finding byte limits.
Diagnostic
One normalized and redacted diagnostic.
Emitter
Bounded parser output sink. Contextual provenance is supplied by the engine.
GenericRanker
Generic ranking prefers compiler, test, lint, infrastructure, then tool diagnostics and uses parser-emitted evidence quality instead of message substring heuristics.
Limits
Hard bounds for incremental input and candidate retention.
Location
Optional source coordinate extracted from diagnostic text.
LogLine
One normalized input line delivered to an immutable parser plan.
NoPathMapping
Identity path policy used by generic CLI and CI consumers.
NoRedaction
Explicit identity redactor for already-sanitized or non-sensitive inputs.
OutputPolicy
Output transformations and ranking shared by batch and streaming callers.
ParserPlan
Immutable ordered set of trusted native parsers.
Provenance
Caller and state-machine provenance for one returned finding.
RankKey
Stable typed rank key; lower values are retained first.
Reduction
Bounded result and explicit truncation accounting.
ReductionOptions
Stable options for one synchronous batch reduction call.
ReductionSession
Incremental, chunk-invariant reduction session.
ReductionStats
Accounting that never contains raw input text.
Scope
Caller-owned identity for one independently bounded parser scope.
SessionOptions
Options for an incremental reduction session.
TestFailure
Structured failed-test evidence independent of a particular test provider.
TextInput
Borrowed text plus optional owned output provenance.

Enums§

DiagnosticClass
Provider-neutral diagnostic family used by presentation adapters.
EndReason
Why a parser scope ended.
EvidenceQuality
How directly a finding is supported by the observed evidence.
FallbackPolicy
Controls whether unclaimed actionable lines may become tool diagnostics.
ParserPlanError
Invalid immutable parser-plan construction.
ScopeBoundary
Parser lifecycle notification for a caller-owned scope.
ScopeKind
Provider-neutral unit that owns a related log stream.
Severity
Severity assigned by a parser or structured-input adapter.
Stream
Input channel within a scope.

Traits§

Parser
Deterministic, synchronous parser contract.
PathMapper
Pure provider-supplied path normalization performed before redaction.
Ranker
Provider-selectable ranking policy that never inspects raw log state.
Redactor
Infallible transformation applied to every untrusted returned string.

Functions§

deduplicate_lines
Exact line deduplication that preserves first-seen order.
finalize_findings
Applies output policy, exact deduplication, typed ranking, and byte budgets.
normalize_terminal_text
Removes terminal control sequences and normalizes progress redraws to lines.