feat: Implement GenAgent trait framework (unblock terraphim_kg_agents)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start by reading crates/terraphim_kg_agents/src/lib.rs and the commented worker.rs, planning.rs, and coordination.rs modules, then inspect crates/terraphim_agent_supervisor/ for the proposed integration point. Define the trait and lifecycle types only after understanding those consumers. Done means all three modules compile, an integration test covers init → handle_call → terminate, and the existing terraphim_kg_agents tests pass.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
UPLIFT-2: Implement GenAgent trait framework
Source: medgemma-competition multi-agent integration plan
Priority: High (unblocks ~2,500 lines of disabled agent code)
Problem
terraphim_kg_agents has ~2,500 lines of agent code (worker, planning, coordination) that is ALL commented out in lib.rs because it references a non-existent terraphim_gen_agent crate and GenAgent<S> trait. The trait is conceptually similar to Erlang's gen_server but with typed state and async lifecycle hooks.
Proposed Change
Define GenAgent<S> trait in a new terraphim_gen_agent crate (or inside terraphim_agent_supervisor).
Minimum viable trait:
#[async_trait]
pub trait GenAgent<S: Send + Sync + 'static>: Send + Sync {
async fn init(&self) -> Result<S>;
async fn handle_call(&self, state: &mut S, msg: Box<dyn Any + Send>) -> Result<Box<dyn Any + Send>>;
async fn handle_cast(&self, state: &mut S, msg: Box<dyn Any + Send>) -> Result<()>;
async fn handle_info(&self, state: &mut S, info: SystemInfo) -> Result<()>;
async fn terminate(&self, state: &mut S, reason: ExitReason) -> Result<()>;
}
Then uncomment and fix the three agent modules in terraphim_kg_agents.
Files to Change
- New crate or addition to
crates/terraphim_agent_supervisor/ crates/terraphim_kg_agents/src/lib.rs(uncomment modules)crates/terraphim_kg_agents/src/worker.rscrates/terraphim_kg_agents/src/planning.rscrates/terraphim_kg_agents/src/coordination.rs
Acceptance Criteria
-
GenAgent<S>trait defined with async lifecycle hooks - All three agent modules in
terraphim_kg_agentsuncommented and compiling - At least one integration test demonstrating a GenAgent lifecycle (init -> handle_call -> terminate)
- Existing tests in
terraphim_kg_agentspass
- Vorherrschende Sprache
- Rust
- Sterne
- 62
- Forks
- 5
- Ø Merge
- 2 Std. 27 Min.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus terraphim/terraphim-ai
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
terraphim/terraphim-ai#885 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
terraphim/terraphim-ai#871 ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
terraphim/terraphim-ai#810 · 2 Kommentare ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
terraphim/terraphim-ai#729 ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
terraphim/terraphim-ai#728 ·
Alle Issues in terraphim/terraphim-ai
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100