Skip to main content

Module models

Module models 

Source
Expand description

Data models for subcog.

This module contains all the core data structures used throughout the system.

Re-exportsยง

pub use group::AddMemberRequest;
pub use group::CreateGroupRequest;
pub use group::CreateInviteRequest;
pub use group::Group;
pub use group::GroupId;
pub use group::GroupInvite;
pub use group::GroupMember;
pub use group::GroupMembership;
pub use group::GroupRole;
pub use group::is_valid_email;
pub use group::normalize_email;

Modulesยง

capture ๐Ÿ”’
Capture request and result types.
consolidation ๐Ÿ”’
Memory consolidation types for lifecycle management.
context_template ๐Ÿ”’
Context template models.
domain ๐Ÿ”’
Domain and namespace types.
events ๐Ÿ”’
Memory event types for audit and observability.
graph
Graph memory types for knowledge graph construction.
group
Group and membership models for shared memory graphs.
memory ๐Ÿ”’
Memory types and identifiers.
prompt ๐Ÿ”’
Prompt template models.
search ๐Ÿ”’
Search types and filters.
temporal
Bitemporal types for knowledge graph time tracking.
urn ๐Ÿ”’
URN (Uniform Resource Name) parsing and handling.

Structsยง

CaptureRequest
Request to capture a new memory.
CaptureResult
Result of a capture operation.
ContextTemplate
A user-defined context template.
Domain
Domain separation for memories.
EventMeta
Shared event metadata required for observability.
ExtractedVariable
Result of extracting a variable from prompt content.
Memory
A captured memory entry.
MemoryId
Unique identifier for a memory.
MemoryResult
Result of a memory operation with optional metadata.
PromptTemplate
A user-defined prompt template.
PromptVariable
A template variable definition.
RetentionScore
Retention score for memory lifecycle management.
SearchFilter
Filter criteria for memory search.
SearchHit
A single search hit with scoring.
SearchResult
Result of a memory search.
TemplateVariable
A variable in a context template.
TemplateVersion
Version metadata for a context template.
Urn
A parsed Subcog URN.
ValidationIssue
A validation issue found in prompt content.
ValidationResult
Validation result for prompt content.

Enumsยง

DetailLevel
Level of detail to include in search results.
EdgeType
Type of relationship edge between memories.
IssueSeverity
Severity level for validation issues.
MemoryEvent
Events emitted during memory operations.
MemoryStatus
Status of a memory entry.
MemoryTier
Memory tier for retention management.
Namespace
Memory namespace categories.
OutputFormat
Output format for rendered templates.
SearchMode
Search mode for memory recall.
UrnComponent
A component of a URN that can be a specific value or a wildcard.
VariableType
Type of template variable.

Constantsยง

AUTO_VARIABLES
Auto-variable names recognized by the system.
AUTO_VARIABLE_PREFIXES
Auto-variable prefixes for iteration context.
MAX_VARIABLE_VALUE_LENGTH
Maximum length for variable values (64KB).

Functionsยง

extract_variables
Extracts variables from prompt content.
is_auto_variable
Checks if a variable name is an auto-variable.
is_reserved_variable_name
Checks if a variable name uses a reserved prefix.
sanitize_variable_value
Sanitizes a variable value to prevent template injection attacks.
substitute_variables
Substitutes variables in prompt content.
validate_prompt_content
Validates prompt content for common issues.