Crate cellstate_pcp

Crate cellstate_pcp 

Source
Expand description

CELLSTATE PCP - Persistent Context Protocol

Provides validation, checkpointing, and harm reduction for AI agent memory. Implements the PCP protocol for context integrity, contradiction detection, and recovery mechanisms.

Structs§

AntiSprawlConfig
Configuration for anti-sprawl measures.
CheckpointState
State captured in a checkpoint.
ContextDagConfig
Configuration for context DAG management.
Contradiction
Detected contradiction between artifacts.
DecisionRecall
Recall of a decision from past interactions.
DosageConfig
Configuration for dosage limits (harm reduction).
DosageResult
Result of applying dosage limits.
GroundingConfig
Configuration for grounding and fact-checking.
LintIssue
A lint issue found during artifact linting.
LintResult
Result of artifact linting.
LintingConfig
Configuration for artifact linting.
MarkdownSemanticIssue
Semantic lint issue for markdown/text content.
MemoryCommit
Memory commit - versioned record of an interaction. Enables: “Last time we decided X because Y” Every interaction creates a versioned commit for recall, rollback, audit, and rehydration.
MemoryStats
Memory statistics for analytics.
PCPCheckpoint
A PCP checkpoint for recovery.
PCPConfig
Master PCP configuration.
PCPRuntime
PCP Runtime - the main validation and checkpoint engine.
RecallService
Service for recalling past interactions and decisions. Provides query methods for memory commits.
RecoveryConfig
Configuration for recovery and checkpointing.
RecoveryResult
Result of recovery operation.
ScopeHistory
History of a scope’s interactions.
StalenessConfig
Configuration for staleness detection.
ValidationIssue
A validation issue found during context validation.
ValidationResult
Result of context validation.

Enums§

IssueType
Type of validation issue.
LintIssueType
Type of lint issue for artifacts.
PruneStrategy
Strategy for pruning context DAG.
RecoveryFrequency
Frequency for recovery checkpoints.
Severity
Severity of a validation issue.

Constants§

DECISION_KEYWORDS 🔒
Decision keywords to look for in responses.

Functions§

contains_decision_keywords 🔒
Check if a response contains decision keywords.
extract_decision
Extract decision summary from response. Looks for recommendation patterns.
extract_first_sentence 🔒
Extract the first sentence from text (Unicode-safe).
is_markdown_separator_row 🔒
lint_markdown_semantics
Lint markdown/text for semantic hazards that commonly break context tooling.
markdown_table_column_count 🔒
markdown_table_separator_regex 🔒
reserved_at_regex 🔒