Skip to main content

gemini_live_harness/
lib.rs

1//! Durable harness state that sits above `gemini-live-runtime` and below a
2//! concrete host application.
3//!
4//! `gemini-live-runtime` already owns hot-session orchestration, tool-call
5//! request fanout, and short-lived in-process conversation continuity. This
6//! crate is the next layer up:
7//!
8//! - tasks are durable filesystem records under one harness root
9//! - notifications are durable queue items, not ephemeral callbacks
10//! - memory is stored on disk and may be inspected directly by other agents
11//! - shared host-tool execution contracts live next to harness policy
12//! - harness-owned wrappers may keep blocking host tools within an inline
13//!   latency budget and spill eligible calls into durable background tasks
14//! - `HarnessController` is the preferred host-facing boundary for combining
15//!   tool execution and passive notification delivery
16//!
17//! The default root is `~/.gemini-live/harness`, but callers may supply any
18//! alternative path for testing or custom deployments.
19
20mod adapter;
21mod bridge;
22mod controller;
23mod delivery;
24mod error;
25mod executor;
26mod fs;
27mod memory;
28mod notification;
29mod profile;
30mod registry;
31mod store;
32mod task;
33
34pub use adapter::{
35    NoopToolSource, ToolCapability, ToolDescriptor, ToolExecutionError, ToolExecutor, ToolKind,
36    ToolProvider, ToolSpecification,
37};
38pub use bridge::{HarnessRuntimeBridge, HarnessToolForwardFailure, HarnessToolForwardOutcome};
39pub use controller::{HarnessController, HarnessToolCompletion, HarnessToolCompletionDisposition};
40pub use delivery::{
41    PassiveNotificationDelivery, PassiveNotificationPump, format_passive_notification_prompt,
42};
43pub use error::HarnessError;
44pub use executor::{HarnessToolBudget, HarnessToolRuntime};
45pub use memory::{MemoryRecord, MemoryWrite};
46pub use notification::{
47    HarnessNotification, NewNotification, NotificationKind, NotificationStatus,
48};
49pub use profile::HarnessProfileStore;
50pub use registry::{HarnessToolRegistry, RegisteredTool};
51pub use store::{Harness, HarnessPaths};
52pub use task::{
53    HarnessTask, NewRunningTask, TaskDetail, TaskEvent, TaskEventKind, TaskResult,
54    TaskRuntimeInstance, TaskStatus,
55};