Redessine la borne de fin de tour du rendez-vous `idea_ask_agent` ⇄ `idea_reply` : au lieu d'un timeout plat (qui coupait à 600 s un seul long tour de la cible, cf. T7), la borne devient une **fenêtre d'inactivité réarmée** à chaque progrès observé de la cible, sous un **plafond absolu** (défaut 4 h, réglable via `IDEA_ASK_RENDEZVOUS_CEILING_MS`). - Sonde d'activité (`transcript_activity_token`, inspector) : jeton monotone = octets cumulés des `.jsonl` de la cible. Croît même pendant un seul long tour sans `turn_duration` ⇒ détecte « vivant et au travail » mi-tour. Best-effort, sans effet de bord ; folder absent/illisible ⇒ « pas de progrès ». - Watchdog (`run_inactivity_watchdog`, nouveau module `orchestrator/rendezvous`) : fenêtre réarmable + plafond, fallback timeout plat si aucune sonde (zéro régression). - Issue typée distincte `TargetCeilingActive` (code `RENDEZVOUS_CEILING_ACTIVE`) : une cible **active** stoppée au plafond n'est jamais confondue avec un `TargetReturnedNoReply` (silence) ; le message guide « ne pas retenter à l'aveugle ». - Câblage composition-root (`state.rs`) : sonde résolue nom→AgentId→run-dir transcript, branchée sur le service et sur l'McpServer (`AskActivityProbe`, `with_ask_ceiling`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
85 lines
3.0 KiB
Rust
85 lines
3.0 KiB
Rust
//! # IdeA — Infrastructure layer
|
|
//!
|
|
//! Concrete **adapters** implementing the domain ports (ARCHITECTURE §5). All
|
|
//! real-world I/O (`tokio::fs`, broadcast channels, system clock, UUIDs) lives
|
|
//! here, never in `domain` or `application`.
|
|
//!
|
|
//! L1 shipped the DI/event-relay adapters: [`LocalFileSystem`],
|
|
//! [`TokioBroadcastEventBus`], [`SystemClock`], [`UuidGenerator`]. L2 adds the
|
|
//! project persistence adapter [`FsProjectStore`]. L3 adds the local PTY adapter
|
|
//! [`PortablePtyAdapter`]. Git/remote/template adapters arrive in later lots.
|
|
|
|
#![forbid(unsafe_code)]
|
|
#![warn(missing_docs)]
|
|
|
|
pub mod clock;
|
|
pub mod conversation;
|
|
pub mod conversation_log;
|
|
pub mod eventbus;
|
|
pub mod fileguard;
|
|
pub mod fs;
|
|
pub mod git;
|
|
pub mod id;
|
|
pub mod input;
|
|
pub mod inspector;
|
|
pub mod mailbox;
|
|
pub mod orchestrator;
|
|
pub mod permission;
|
|
pub mod process;
|
|
pub mod pty;
|
|
pub mod ratelimit;
|
|
pub mod remote;
|
|
pub mod runtime;
|
|
pub mod sandbox;
|
|
pub mod scheduler;
|
|
pub mod session;
|
|
pub mod store;
|
|
pub mod timeparse;
|
|
|
|
pub use clock::SystemClock;
|
|
pub use conversation::InMemoryConversationRegistry;
|
|
pub use conversation_log::{
|
|
FsConversationLog, FsHandoffStore, FsProviderSessionStore, HeuristicHandoffSummarizer,
|
|
TURN_LINE_MAX_CHARS, WINDOW,
|
|
};
|
|
pub use eventbus::TokioBroadcastEventBus;
|
|
pub use fileguard::RwFileGuard;
|
|
pub use fs::LocalFileSystem;
|
|
pub use git::Git2Repository;
|
|
pub use id::UuidGenerator;
|
|
pub use input::{MediatedInbox, MillisClock, SystemMillisClock};
|
|
pub use inspector::{transcript_activity_token, ClaudeTranscriptInspector, ClaudeTranscriptTurnWatcher};
|
|
pub use mailbox::InMemoryMailbox;
|
|
pub use orchestrator::mcp::{
|
|
resolve_ask_rendezvous_ceiling, resolve_ask_rendezvous_timeout, AskActivityProbe, McpServer,
|
|
MemoryTransport, StdioTransport,
|
|
};
|
|
pub use orchestrator::{
|
|
process_request_file, FsOrchestratorWatcher, OrchestratorResponse, OrchestratorWatchHandle,
|
|
REQUESTS_SUBDIR,
|
|
};
|
|
pub use permission::{ClaudePermissionProjector, CodexPermissionProjector};
|
|
pub use process::LocalProcessSpawner;
|
|
pub use pty::PortablePtyAdapter;
|
|
pub use ratelimit::RateLimitParser;
|
|
pub use remote::{remote_host, LocalHost};
|
|
pub use runtime::CliAgentRuntime;
|
|
#[cfg(target_os = "linux")]
|
|
pub use sandbox::LandlockSandbox;
|
|
pub use sandbox::{default_enforcer, NoopSandbox};
|
|
pub use scheduler::TokioScheduler;
|
|
pub use session::{ClaudeSdkSession, CodexExecSession, FakeCli, StructuredSessionFactory};
|
|
#[cfg(feature = "vector-onnx")]
|
|
pub use store::OnnxEmbedder;
|
|
#[cfg(feature = "vector-http")]
|
|
pub use store::{detect_ollama, HttpEmbedder, DEFAULT_LOCAL_EMBED_ENDPOINT};
|
|
pub use store::{
|
|
embedder_from_profile, index_token_size, onnx_model_is_cached, should_use_vector,
|
|
AdaptiveMemoryRecall, EmbedderEnvProbe, FsEmbedderProfileStore, FsEmbedderPromptStore,
|
|
FsLiveStateStore, FsMemoryStore, FsPermissionStore, FsProfileStore, FsProjectStore,
|
|
FsSkillStore, FsTemplateStore, HashEmbedder, IdeaiContextStore, NaiveMemoryRecall,
|
|
OnnxModelInfo, StubEmbedder, VectorMemoryRecall,
|
|
DEFAULT_OLLAMA_BASE_URL, ONNX_CACHE_SUBDIR,
|
|
RECOMMENDED_ONNX_MODELS, VECTOR_HTTP_ENABLED, VECTOR_ONNX_ENABLED,
|
|
};
|