Files
poimen-memory/crates/mem-core/src/lib.rs
T
rock 6b18d81421
Deploy / Tag & Push Latest (push) Failing after 40s
CI / CI (push) Canceled after 3m29s
[Phase 3.1] Agent entity types + metadata structs (#47)
## Changes
- `crates/mem-core/src/entity.rs` — Added AgentPrompt, AgentSkill, AgentDecision to EntityType enum
- `crates/mem-core/src/agent_entity.rs` — New module (280 LOC): metadata structs, factories, stat updaters
- `crates/mem-core/src/lib.rs` — Module registration + exports

## Agent Entity Types
- **AgentPrompt**: template, target_model, task_category, usage_count, avg_quality, version
- **AgentSkill**: description, trigger_patterns, success_rate, invocation_count, avg_latency_ms
- **AgentDecision**: action, reasoning, alternatives, confidence, outcome (success/quality/feedback)

## Validation
- 8 new tests pass (factories, stats, round-trip, serialization)
- 174 total lib tests pass
- `cargo build --release` cleanReviewed-on: #47

Co-authored-by: rock <[email protected]>
2026-09-09 02:48:40 +00:00

35 lines
1.3 KiB
Rust

pub mod domain;
pub mod lesson;
pub mod symptom_projection;
pub mod query;
pub mod query_levels;
pub mod prompt;
pub mod gate_parser;
pub mod gated_loop;
pub mod query_executor;
pub mod optimizer;
pub mod scoring;
pub mod entity;
pub mod edge;
pub mod community;
pub mod agent_entity;
pub use gate_parser::{GateResponse, ParseError, parse_gate_response};
pub use domain::{
Chunk, Level, MemoryNode, Provenance, Record, Role, ProjectId, QueryId, RunId, Sha256Hash,
};
pub use lesson::{
derive_lessons, extract, lookup, normalise, render_injection, render_skill, similarity,
tool_of_cmd, Confidence, Event, Hit, Lesson, Signature, Tier,
};
pub use query::{Query, QuerySet, SynthesisQuery};
pub use prompt::{PromptBuilder, PromptMessages, CacheMetrics};
pub use symptom_projection::{project_symptom, SymptomVector};
pub use optimizer::{ContextOptimizer, ContextOptimizerConfig, ContentType, OptimizedChunk, CacheAligner, AlignedContent, CcrStore};
pub use scoring::{DocumentScorer, ScoringPipeline, GlobalTfIdfScorer, ProjectTfIdfScorer, SemanticScorer, MetadataBoostingScorer};
pub use entity::{Entity, EntityType};
pub use edge::{Edge, ContradictionStatus};
pub use community::Community;
pub use agent_entity::{AgentPromptMeta, AgentSkillMeta, AgentDecisionMeta, DecisionOutcome};