feat: align browser callback runtime and export flows
Consolidate the browser task runtime around the callback path, add safer artifact opening for Zhihu exports, and cover the new service/browser flows with focused tests and supporting docs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ use common::MockTransport;
|
||||
use serde_json::{json, Value};
|
||||
use sgclaw::security::MacPolicy;
|
||||
use sgclaw::{
|
||||
browser::{BrowserBackend, PipeBrowserBackend},
|
||||
compat::browser_tool_adapter::ZeroClawBrowserTool,
|
||||
pipe::{Action, AgentMessage, BrowserMessage, BrowserPipeTool, ExecutionSurfaceKind, Timing},
|
||||
};
|
||||
@@ -28,7 +29,7 @@ fn test_policy() -> MacPolicy {
|
||||
|
||||
fn build_adapter(
|
||||
messages: Vec<BrowserMessage>,
|
||||
) -> (Arc<MockTransport>, ZeroClawBrowserTool<MockTransport>) {
|
||||
) -> (Arc<MockTransport>, ZeroClawBrowserTool) {
|
||||
let transport = Arc::new(MockTransport::new(messages));
|
||||
let browser_tool = BrowserPipeTool::new(
|
||||
transport.clone(),
|
||||
@@ -36,8 +37,9 @@ fn build_adapter(
|
||||
vec![1, 2, 3, 4, 5, 6, 7, 8],
|
||||
)
|
||||
.with_response_timeout(Duration::from_secs(1));
|
||||
let backend: Arc<dyn BrowserBackend> = Arc::new(PipeBrowserBackend::from_inner(browser_tool));
|
||||
|
||||
(transport, ZeroClawBrowserTool::new(browser_tool))
|
||||
(transport, ZeroClawBrowserTool::new(backend))
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user