Skip to main content

Crate wenlan_types

Crate wenlan_types 

Source
Expand description

Shared types for the Wenlan memory system.

This crate provides lightweight type definitions shared across wenlan-core, wenlan-server, and the Tauri app. Dependencies are limited to serde and serde_json – no heavy runtime deps.

Re-exports§

pub use briefing::BriefingResponse;
pub use briefing::ContradictionItem;
pub use entities::Entity;
pub use entities::EntityDetail;
pub use entities::EntitySearchResult;
pub use entities::EntitySuggestion;
pub use entities::Observation;
pub use entities::RecentRelation;
pub use entities::Relation;
pub use entities::RelationWithEntity;
pub use lint::LintCheckResult;
pub use lint::LintQuery;
pub use lint::LintReport;
pub use memory::ActivityBadge;
pub use memory::ActivityKind;
pub use memory::AgentActivityRow;
pub use memory::AgentConnection;
pub use memory::DomainInfo;
pub use memory::EnrichmentStatusResponse;
pub use memory::EnrichmentStepStatus;
pub use memory::HomeStats;
pub use memory::IndexedFileInfo;
pub use memory::MemoryItem;
pub use memory::MemoryStats;
pub use memory::MemoryVersionItem;
pub use memory::PageChange;
pub use memory::PageChangeKind;
pub use memory::Profile;
pub use memory::RecentActivityItem;
pub use memory::RejectionRecord;
pub use memory::RetrievalEvent;
pub use memory::SearchResult;
pub use memory::SessionSnapshot;
pub use memory::SnapshotCapture;
pub use memory::SnapshotCaptureWithContent;
pub use memory::Space;
pub use memory::TopMemory;
pub use memory::TypeBreakdown;
pub use memory_type::MEMORY_TYPE_CAPTURE_DESCRIPTION;
pub use memory_type::MEMORY_TYPE_FILTER_DESCRIPTION;
pub use narrative::NarrativeResponse;
pub use pages::Page;
pub use pages::PageEvidence;
pub use requests::AcceptRefinementRequest;
pub use requests::CreatePageDraftRequest;
pub use requests::PageDraftVersionRequest;
pub use requests::UpdatePageDraftRequest;
pub use responses::ContradictionDismissResponse;
pub use responses::ExportStats;
pub use responses::ListMemoryRevisionsResponse;
pub use responses::ListPageRevisionsResponse;
pub use responses::ListRefinementsResponse;
pub use responses::MemoryDetail;
pub use responses::MemoryRevisionEntry;
pub use responses::OnDeviceModelEntry;
pub use responses::OnDeviceModelResponse;
pub use responses::OrphanLinksResponse;
pub use responses::PageChangelogEntry;
pub use responses::PageDraftResponse;
pub use responses::PageWriteResponse;
pub use responses::PendingRevision;
pub use responses::PendingRevisionItem;
pub use responses::ProposalAction;
pub use responses::RefinementCardAction;
pub use responses::RefinementPayload;
pub use responses::RefinementProposalSummary;
pub use responses::RejectRefinementResponse;
pub use responses::RevisionAcceptResponse;
pub use responses::RevisionDismissResponse;
pub use sources::MemoryType;
pub use sources::RawDocument;
pub use sources::SourceType;
pub use sources::StabilityTier;
pub use sources::SyncStatus;
pub use repair::*;
pub use repair_plan::*;

Modules§

brand
Single source of truth for the user-facing product name.
briefing
Wire types for daily briefing and contradiction responses.
entities
Knowledge graph types – entities, observations, relations.
events
Event emission trait — shared by daemon (NoopEmitter) and Tauri app (TauriEmitter).
import
Types for the chat-export import endpoint.
lint
memory
Core memory data types — search results, items, stats, profiles, agents, spaces.
memory_type
JSON Schema description strings for the memory_type parameter.
narrative
Wire types for profile narrative responses.
onboarding
Onboarding milestone wire types. Shared with wenlan-mcp + wenlan-app.
page_map
Wire types for the Page Map API (stage 2). See docs/superpowers/plans/2026-07-18-page-map-api-spec.md for the full contract. Mirrors the row shapes in crates/wenlan-core/src/db/page_map.rs, adding the read-time computed ref_state field the daemon derives at GET time (never stored).
pages
Wire types for compiled knowledge pages.
repair
Approval-gated repair contracts shared by the daemon and local clients.
repair_plan
Total lint-repair resolution contracts shared by the daemon and local clients.
requests
API request types for all HTTP endpoints.
responses
API response types for all HTTP endpoints.
sources
Document source types – MemoryType enum, RawDocument, SourceType, SyncStatus.
system_info
System info wire type. Reported by daemon + sometimes detected client-side.
working_memory
Working memory wire types — rolling buffer of recent captures for zero-query Spotlight.

Structs§

ChangelogEntry
A single revision entry in a memory’s changelog (topic-key upsert history).
PageSource
A link between a page and one of its source memories. (Backed by the concept_sources SQL table; rename deferred for back-compat.)
PageSourceWithMemory
Page source enriched with the memory’s metadata (for the API response).

Functions§

version
Crate version.