memory-search: move hook logic to library module, eliminate subprocesses

Move the hook logic from the memory-search binary into a library module
(poc_memory::memory_search) so poc-hook can call it as a direct function
instead of spawning a subprocess with piped stdin.

Also convert the node render call in surface_agent_cycle from
Command::new("poc-memory render") to a direct crate::cli::node::render_node()
call, eliminating another subprocess.

The memory-search binary remains as a thin CLI wrapper for debugging
(--hook reads from stdin) and inspection (show_seen).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ProofOfConcept 2026-03-24 12:27:54 -04:00
parent 78c93dde4d
commit a48cbe51a8
4 changed files with 377 additions and 490 deletions

View file

@ -34,6 +34,8 @@ pub use agents::{
enrich, digest, daemon,
};
pub mod memory_search;
pub mod memory_capnp {
include!(concat!(env!("OUT_DIR"), "/schema/memory_capnp.rs"));
}