// imprint.el — L3 Imprint layer (stub — full implementation in feat/layer-imprint) // Routes the processed input through the active imprint and generates the final reply. // This stub allows soul.el and routes.el to compile while feat/layer-imprint is pending merge. // // Contract for imprint_current() -> String: // Returns the active imprint ID (node ID from engram), or "none" if no imprint is loaded. // Used in health checks and to identify which imprint L2/L3 should operate against. // // Contract for imprint_respond(input, imprint_id) -> String: // Generates a reply from the active imprint given the stewardship-aligned input. // Falls back to handle_chat when no imprint is active (imprint_id = "" or "none"). fn imprint_current() -> String { let contextual: String = state_get("active_contextual_imprint") if !str_eq(contextual, "") { return contextual } let user_imp: String = state_get("active_user_imprint") if !str_eq(user_imp, "") { return user_imp } return "none" } fn imprint_respond(input: String, imprint_id: String) -> String { // Stub: delegate to core chat until feat/layer-imprint is merged let body: String = "{\"message\":\"" + json_safe(input) + "\"}" return handle_chat(body) }