refactor(core): wire zeph-core to zeph-agent-persistence and zeph-agent-tools (#3515, #3516)#3519
Merged
refactor(core): wire zeph-core to zeph-agent-persistence and zeph-agent-tools (#3515, #3516)#3519
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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 tozeph-agent-persistence::PersistenceServicevia borrow-lens adapters (MemoryPersistenceView,SecurityView,MetricsView).doom_loop_hashand helpers fromtool_execution/mod.rs; callzeph_agent_tools::doom_loop_hashdirectly innative.rs.AgentChannelView<'a, C>adapter inchannel_impl.rsimplementingAgentChannel+Sealedfor anyC: Channel(orphan-safe local wrapper).persistence.rsshrinks by ~640 lines;tool_execution/mod.rsdrops ~50 lines.Test plan
cargo +nightly fmt --checkpassescargo clippy --workspace -- -D warningspassescargo nextest run --workspace --lib --bins— 8644 tests passed, 21 skippedcargo tree -p zeph-agent-persistence | grep zeph-corereturns emptycargo tree -p zeph-agent-tools | grep zeph-corereturns emptyCloses #3515
Closes #3516