Changes: - Stop hooks for session lifecycle - Add x.ai/session/state and x.ai/session/import ACP methods - Deny-and-continue for auto-mode classifier blocks with denial limits - Drop codebase-upload from dhat soak test - scheduler_create upsert via task_id; retire one-shot tasks - Clipboard: copy file fallback + honest toasts for SSH/Apple Terminal - Polarity-safe syntax colors in minimal mode - Auto mode classifies unvetted env prefixes instead of hard-prompting - Add GROK_CLIPBOARD_NO_OSC52 kill switch to force OSC 52 off
45 lines
1.8 KiB
Rust
45 lines
1.8 KiB
Rust
#![allow(
|
|
unused_imports,
|
|
unused_variables,
|
|
unused_mut,
|
|
unreachable_code,
|
|
dead_code
|
|
)]
|
|
//! Shared test utilities for grok-build crates: mock inference server, SSE
|
|
//! generators, ACP stdio client, headless runner, env sandbox.
|
|
//!
|
|
//! Provides:
|
|
//! - [`MockInferenceServer`] — Mock /v1/chat/completions + /v1/responses with request logging
|
|
//! - [`GrokStdioClient`] — ACP client that drives `grok agent stdio` as a subprocess
|
|
//! - [`RawStdioClient`] — raw-wire ACP driver for bytes the typed client can't
|
|
//! produce (Foundation `\/` methods, string UUID ids)
|
|
//! - [`leader::LeaderStdioClient`] — ACP client that drives `grok agent --leader stdio` (unix)
|
|
//! - [`run_headless`] — Run `grok -p` against the mock server and capture output
|
|
//! - [`git_workdir`] — Create a temp directory with git repo (forces libgit2 init)
|
|
//! - [`grok_binary`] — Resolve the grok binary path (GROK_BINARY env or cargo_bin)
|
|
//! - [`spawn_counting_server`] — Connection-counting HTTP/1.1 server for wire/pooling tests
|
|
//! - [`uds_proxy::UdsProxy`] — Frame-aware fault-injection proxy for leader IPC sockets (unix)
|
|
pub mod acp_client;
|
|
pub mod counting_server;
|
|
pub mod env;
|
|
pub mod headless;
|
|
mod inference_override;
|
|
#[cfg(unix)]
|
|
pub mod leader;
|
|
pub mod mock_server;
|
|
mod process;
|
|
pub mod scripted;
|
|
pub mod sse;
|
|
#[cfg(unix)]
|
|
pub mod uds_proxy;
|
|
pub use acp_client::{GrokStdioClient, RawStdioClient};
|
|
pub use counting_server::spawn_counting_server;
|
|
pub use env::{EnvGuard, git_workdir, grok_binary};
|
|
pub use headless::{
|
|
HeadlessResult, assert_headless_success, assert_no_crashes, run_headless,
|
|
run_headless_with_cmd, run_headless_with_env, stderr_tail,
|
|
};
|
|
pub use inference_override::{InferenceEndpoint, InferenceExpectation, InferenceRequestMatcher};
|
|
pub use mock_server::{
|
|
MockInferenceServer, MockModelEntry, ScriptedResponse, SseEvent, StorageUpload,
|
|
};
|