From 825b7d1a564c870868ce7cdca34513c060d39dfb Mon Sep 17 00:00:00 2001 From: Marcos Alberto Villegas Madrigal Date: Sun, 14 Jun 2026 09:36:28 -0700 Subject: [PATCH] Add query_hand_ephemeral one-shot hand query Introduce a new KernelHandle method query_hand_ephemeral for synchronous one-shot hand queries that return an LLM response wrapped as external untrusted content (hand://...). Implement the method on OpenFangKernel; it clones the agent manifest, applies a transient max_tokens override, disables tools, calls the resolved LLM driver with a wall-clock timeout, and guarantees no session or persistence side effects. Make default_driver test-swappable by changing it to RwLock> and add a #[cfg(test)] set_test_default_driver helper. Update resolve_driver fallback to read the locked default driver. Add extensive tests and test drivers (RecordingDriver, SleepDriver) to verify wrapping, timeout, max_tokens behavior, and zero-persistence guarantees. Add default trait impl in runtime that returns not supported for backwards compatibility. Signed-off-by: Marcos Alberto Villegas Madrigal