perspt-core¶
The foundation crate providing all canonical types, configuration, LLM provider integration, event system, and language plugins.
Modules¶
Module |
Description |
|---|---|
|
Core shared types: NodeClass, ModelTier, EnergyComponents, TaskPlan, PlannedTask, PlannedContract, PlannedTest, TaskType, CommandContract, SensorStatus, StageOutcome, VerifierStrictness, StructuralDigest, SummaryDigest, ArtifactKind, ContextBudget, RestrictionMap, ContextPackage, ContextProvenance |
|
|
|
|
|
|
|
|
|
|
|
Model and provider name normalization |
|
|
|
|
|
|
|
|
|
Canonical path resolution for artifact paths |
|
Centralized platform-aware path helpers (config/data/project tiers) |
Key Types¶
Config - The main configuration struct (excerpt):
pub struct Config {
pub provider: Option<String>,
pub model: Option<String>,
pub api_key: Option<String>,
pub base_url: Option<String>,
// ... per-tier model overrides, plus the [providers], [models],
// [external_tools], [verification], [exploration], [prompts],
// and [context] tables
}
EnergyComponents - Lyapunov energy decomposition:
pub struct EnergyComponents {
pub v_syn: f32, // LSP diagnostics
pub v_str: f32, // Contract compliance
pub v_log: f32, // Test results
pub v_boot: f32, // Bootstrap commands
pub v_sheaf: f32, // Cross-node validation
}
AgentEvent - 33 lifecycle events:
TaskStatusChanged, PlanGenerated, EnergyUpdated, Log,
NodeCompleted, ApprovalRequest, Complete, Error,
PlanReady, NodeSelected, FallbackPlanner,
VerificationComplete, BundleApplied, SensorFallback,
DegradedVerification, EscalationClassified,
SheafValidationComplete, GraphRewriteApplied, BranchCreated,
InterfaceSealed, BranchFlushed, DependentUnblocked,
BranchMerged, ContextDegraded, ContextBlocked,
StructuralDependencyMissing, ModelFallback, ProvenanceDrift,
ToolReadiness, BudgetUpdated, PlanRevised, FileDeleted,
FileMoved
See Architecture for the complete type inventory.