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>
48 lines
2.2 KiB
Rust
48 lines
2.2 KiB
Rust
//! Agent-profile use cases & reference catalogue (ARCHITECTURE §6, L5).
|
|
//!
|
|
//! This module owns the *profile* side of the AI runtime: detecting which CLIs
|
|
//! are installed, persisting the chosen/edited/custom profiles, and exposing the
|
|
//! pre-filled reference catalogue that seeds the first-run wizard. It talks only
|
|
//! to the [`domain::ports::AgentRuntime`] and [`domain::ports::ProfileStore`]
|
|
//! ports. Launching an agent (PTY + injection) is L6.
|
|
|
|
mod catalogue;
|
|
mod inspect;
|
|
mod lifecycle;
|
|
mod resume;
|
|
mod session_limit;
|
|
mod structured;
|
|
mod usecases;
|
|
|
|
pub(crate) use lifecycle::unique_md_path;
|
|
pub(crate) use lifecycle::ReattachDecision;
|
|
|
|
pub use session_limit::{AgentResumer, SessionLimitService, RESUME_PROMPT};
|
|
pub use structured::{
|
|
drain_with_readiness, drain_with_readiness_outcome, send_blocking, TurnOutcome,
|
|
};
|
|
|
|
pub use catalogue::{
|
|
overlay_reference_defaults, reference_profile_id, reference_profiles,
|
|
selectable_reference_profiles, CODEX_SUBMIT_DELAY_MS,
|
|
};
|
|
pub use inspect::{InspectConversation, InspectConversationInput, InspectConversationOutput};
|
|
pub use lifecycle::{
|
|
ChangeAgentProfile, ChangeAgentProfileInput, ChangeAgentProfileOutput, CreateAgentFromScratch,
|
|
CreateAgentInput, CreateAgentOutput, DeleteAgent, DeleteAgentInput, HandoffProvider,
|
|
InjectedLiveRow, LaunchAgent, LaunchAgentInput, LaunchAgentOutput, ListAgents, ListAgentsInput,
|
|
ListAgentsOutput, LiveStateLeanProvider, McpRuntime, PermissionProjectorRegistry,
|
|
ProviderSessionProvider, ReadAgentContext, ReadAgentContextInput, ReadAgentContextOutput,
|
|
StructuredSessionDescriptor, UpdateAgentContext, UpdateAgentContextInput,
|
|
AGENT_MEMORY_RECALL_BUDGET, LIVE_STATE_INJECT_MAX,
|
|
};
|
|
pub use resume::{
|
|
ListResumableAgents, ListResumableAgentsInput, ListResumableAgentsOutput, ResumableAgent,
|
|
};
|
|
pub use usecases::{
|
|
ConfigureProfiles, ConfigureProfilesInput, ConfigureProfilesOutput, DeleteProfile,
|
|
DeleteProfileInput, DetectProfiles, DetectProfilesInput, DetectProfilesOutput, FirstRunState,
|
|
FirstRunStateOutput, ListProfiles, ListProfilesOutput, ProfileAvailability, ReferenceProfiles,
|
|
ReferenceProfilesOutput, SaveProfile, SaveProfileInput, SaveProfileOutput,
|
|
};
|