Le timeout hardcoded 15000ms (15s) dans le bloc mcp.idea de l'opencode.json généré par IdeA était far too short pour idea_ask_agent, qui bloque pendant que l'agent cible travaille. OpenCode tuait la requête à 15s avec l'erreur -32001 « Request timed out », même si la cible répondait correctement (visible dans le workstate). Claude/Codex n'étaient pas affectés car leur config MCP n'a pas de champ timeout. Désormais le timeout est résolu par resolve_opencode_mcp_timeout_ms() : - défaut 4h (14_400_000 ms), aligné sur DEFAULT_RENDEZVOUS_CEILING ; - overridable via IDEA_OPENCODE_MCP_TIMEOUT_MS ; - fallback sûr sur 0/parse-error (jamais d'expiration instantanée). Les 4 occurrences (lifecycle.rs x2 + assistant/mod.rs x2) utilisent la même fonction exportée depuis application::agent. Aucune modification des configs MCP Claude/Codex.
58 lines
2.7 KiB
Rust
58 lines
2.7 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 provider_catalogue;
|
|
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_reply_stream_with_readiness, drain_with_readiness,
|
|
drain_with_readiness_and_announcements, drain_with_readiness_and_announcements_outcome,
|
|
drain_with_readiness_outcome, send_blocking, AnnouncementPublisher, TurnOutcome,
|
|
};
|
|
|
|
pub use catalogue::{
|
|
reference_profile_id, reference_profiles, selectable_reference_profiles, CODEX_SUBMIT_DELAY_MS,
|
|
};
|
|
pub use inspect::{InspectConversation, InspectConversationInput, InspectConversationOutput};
|
|
pub use provider_catalogue::{
|
|
opencode_provider_catalogue, ListOpenCodeProviders, ListOpenCodeProvidersOutput,
|
|
OpenCodeProviderCatalogEntry,
|
|
};
|
|
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,
|
|
StructuredRoutingMode, StructuredSessionDescriptor, UpdateAgentContext,
|
|
UpdateAgentContextInput, DEFAULT_OPENCODE_MCP_TIMEOUT_MS, AGENT_MEMORY_RECALL_BUDGET,
|
|
LIVE_STATE_INJECT_MAX, resolve_opencode_mcp_timeout_ms,
|
|
};
|
|
pub use resume::{
|
|
ListResumableAgents, ListResumableAgentsInput, ListResumableAgentsOutput, ResumableAgent,
|
|
};
|
|
pub use usecases::{
|
|
CloneOpenCodeProfileFromSeed, CloneOpenCodeProfileFromSeedInput,
|
|
CloneOpenCodeProfileFromSeedOutput, ConfigureProfiles, ConfigureProfilesInput,
|
|
ConfigureProfilesOutput, DeleteProfile, DeleteProfileInput, DetectProfiles,
|
|
DetectProfilesInput, DetectProfilesOutput, FirstRunState, FirstRunStateOutput, ListProfiles,
|
|
ListProfilesOutput, ProfileAvailability, ReferenceProfiles, ReferenceProfilesOutput,
|
|
SaveOpenCodeProviderProfile, SaveOpenCodeProviderProfileInput,
|
|
SaveOpenCodeProviderProfileOutput, SaveProfile, SaveProfileInput, SaveProfileOutput,
|
|
};
|