Skip to content

refactor(core): wire zeph-core to zeph-agent-persistence and zeph-agent-tools (#3515, #3516)#3519

Merged
bug-ops merged 5 commits intomainfrom
3515-zeph-core-wiring
Apr 27, 2026
Merged

refactor(core): wire zeph-core to zeph-agent-persistence and zeph-agent-tools (#3515, #3516)#3519
bug-ops merged 5 commits intomainfrom
3515-zeph-core-wiring

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 27, 2026

Summary

  • Delete all inline persistence helpers from zeph-core/src/agent/persistence.rs (sanitize_tool_pairs, has_meaningful_content, should_embed_message, write_message_to_memory, build_graph_extraction_config, collect_context_messages) and delegate to zeph-agent-persistence::PersistenceService via borrow-lens adapters (MemoryPersistenceView, SecurityView, MetricsView).
  • Delete doom_loop_hash and helpers from tool_execution/mod.rs; call zeph_agent_tools::doom_loop_hash directly in native.rs.
  • Add AgentChannelView<'a, C> adapter in channel_impl.rs implementing AgentChannel + Sealed for any C: Channel (orphan-safe local wrapper).
  • persistence.rs shrinks by ~640 lines; tool_execution/mod.rs drops ~50 lines.

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace -- -D warnings passes
  • cargo nextest run --workspace --lib --bins — 8644 tests passed, 21 skipped
  • cargo tree -p zeph-agent-persistence | grep zeph-core returns empty
  • cargo tree -p zeph-agent-tools | grep zeph-core returns empty

Closes #3515
Closes #3516

…nt-tools (#3515, #3516)

Replace all inline persistence helpers and tool-dispatch utilities in zeph-core
with delegating calls to the new dedicated crates.

- Delete sanitize_tool_pairs, has_meaningful_content, should_embed_message,
  write_message_to_memory, build_graph_extraction_config, collect_context_messages
  from persistence.rs; delegate to zeph-agent-persistence::PersistenceService
  via MemoryPersistenceView / SecurityView / MetricsView borrow-lens adapters.
- Delete doom_loop_hash and its helpers from tool_execution/mod.rs;
  call zeph_agent_tools::doom_loop_hash at the use site in native.rs.
- Add AgentChannelView<'a, C> adapter in channel_impl.rs implementing
  AgentChannel + Sealed for any C: Channel (orphan-safe local wrapper).
- persistence.rs shrinks by ~640 lines; tool_execution/mod.rs drops ~50 lines.
- 8644 tests pass, cargo clippy -D warnings clean.

Closes #3515
Closes #3516
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate dependencies Dependency updates refactor Code refactoring without functional changes size/XL Extra large PR (500+ lines) labels Apr 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 27, 2026 12:15
@bug-ops bug-ops merged commit a0605fd into main Apr 27, 2026
36 checks passed
@bug-ops bug-ops deleted the 3515-zeph-core-wiring branch April 27, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation refactor Code refactoring without functional changes rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(core): extract zeph-agent-tools crate from zeph-core (Phase 2) feat(core): extract zeph-agent-persistence crate from zeph-core (Phase 2)

1 participant