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ยง
- Capture
Request - Request to capture a new memory.
- Capture
Result - Result of a capture operation.
- Context
Template - A user-defined context template.
- Domain
- Domain separation for memories.
- Event
Meta - Shared event metadata required for observability.
- Extracted
Variable - Result of extracting a variable from prompt content.
- Memory
- A captured memory entry.
- Memory
Id - Unique identifier for a memory.
- Memory
Result - Result of a memory operation with optional metadata.
- Prompt
Template - A user-defined prompt template.
- Prompt
Variable - A template variable definition.
- Retention
Score - Retention score for memory lifecycle management.
- Search
Filter - Filter criteria for memory search.
- Search
Hit - A single search hit with scoring.
- Search
Result - Result of a memory search.
- Template
Variable - A variable in a context template.
- Template
Version - Version metadata for a context template.
- Urn
- A parsed Subcog URN.
- Validation
Issue - A validation issue found in prompt content.
- Validation
Result - Validation result for prompt content.
Enumsยง
- Detail
Level - Level of detail to include in search results.
- Edge
Type - Type of relationship edge between memories.
- Issue
Severity - Severity level for validation issues.
- Memory
Event - Events emitted during memory operations.
- Memory
Status - Status of a memory entry.
- Memory
Tier - Memory tier for retention management.
- Namespace
- Memory namespace categories.
- Output
Format - Output format for rendered templates.
- Search
Mode - Search mode for memory recall.
- UrnComponent
- A component of a URN that can be a specific value or a wildcard.
- Variable
Type - 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.