Skip to content

R2-2.1: deduplicate EmbedFuture, fix anyhow leak in embed closures #284

@bug-ops

Description

@bug-ops

Epic: #282 | Phase: 1 | Priority: P1 | Size: S

Problem

EmbedFuture type alias defined independently in zeph-skills/src/matcher.rs:8 and zeph-mcp/src/registry.rs:13, both using anyhow::Result instead of typed LlmError.

Solution

Define in zeph-llm/src/provider.rs:

pub type EmbedFuture = Pin<Box<dyn Future<Output = Result<Vec<f32>, LlmError>> + Send>>;
pub type EmbedFn = Box<dyn Fn(&str) -> EmbedFuture + Send + Sync>;

Update callers in zeph-skills, zeph-mcp, zeph-core/agent/mod.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions