Corrige le wedge survenant lorsqu'un agent délégué ne rappelle pas idea_reply :
le rendez-vous ask_agent ne reste plus bloqué indéfiniment.
Lot 1 — durcissement du préambule de délégation :
- input/mod.rs : delegation_preamble renforcé (obligation explicite idea_reply).
- agent/lifecycle.rs : préambule injecté conditionné à mcp_enabled.
Lot 2 — peuplement du prompt_ready_pattern :
- agent/catalogue.rs : .with_prompt_ready_pattern("? for shortcuts") sur le
profil Claude + tests de seed, pour calibrer la détection de grâce.
Lot 3 — backstop timeout serveur :
- mcp/jsonrpc.rs : code d'erreur typé RENDEZVOUS_NO_REPLY (-32001).
- mcp/server.rs : mapping timeout → erreur typée, with_ask_rendezvous_timeout
promu + resolve_ask_rendezvous_timeout (configurable).
- app-tauri/state.rs : lecture env IDEA_ASK_RENDEZVOUS_TIMEOUT_MS.
- tests/mcp_server.rs mis à jour, fix d'un test input flaky.
Propagation overlay (référence des profils) :
- agent/catalogue.rs : overlay_reference_defaults + reference_index + tests.
- store/profile.rs : ReferenceBackfillProfileStore + tests.
- app-tauri/state.rs : wrap au composition root.
- exports mod.rs / lib.rs (application + infrastructure).
Tests réels verts : application 494, app-tauri 235, infrastructure 248,
mcp_server 22/22, 0 échec. Validation e2e LIVE (rebuild AppImage) en attente
avant merge vers develop.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
84 lines
3.0 KiB
Rust
84 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::ClaudeTranscriptInspector;
|
|
pub use mailbox::InMemoryMailbox;
|
|
pub use orchestrator::mcp::{
|
|
resolve_ask_rendezvous_timeout, 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, ReferenceBackfillProfileStore, StubEmbedder, VectorMemoryRecall,
|
|
DEFAULT_OLLAMA_BASE_URL, ONNX_CACHE_SUBDIR,
|
|
RECOMMENDED_ONNX_MODELS, VECTOR_HTTP_ENABLED, VECTOR_ONNX_ENABLED,
|
|
};
|