feat(plugins): paramètres projet plugins + attribution skills/tools aux agents — #282 (manifeste accepte contributes.skills IdeA-native multi-harness; store .ideai/project-plugins.json v1: enable plugin par projet + assignments skills/tools par agent; refs + use cases settings/assign/unassign; resolver skills pour idea_skill_read et injection catalogue lancement agent; permissions MCP dynamiques projetées par harness Claude Code/Codex/OpenCode; tombstones uninstall, hot reload recalcule catalogue et marque assignments cassés; frontend: Settings projet Plugins, détail capabilities, attribution agent, catalogue permissions; bump pointeur IdeaSDK 6eb8db3; QA verte: cargo test -p application, project_plugin_settings 3/3, dto_plugins 2/2, structured_launch_d3 26/26, catalogue mcp 7/7, frontend 5 tests ProjectPluginSettings/plugin, npm build frontend)

This commit is contained in:
2026-09-08 15:48:57 +02:00
parent bdc20a134a
commit 86ed0aa00b
38 changed files with 2127 additions and 89 deletions

View File

@ -2191,7 +2191,8 @@ async fn two_agents_same_root_get_distinct_run_dirs_no_collision() {
#[tokio::test]
async fn launch_conventionfile_injects_assigned_skills_in_order() {
// An agent with two assigned global skills; the generated convention file must
// carry both skill bodies, after the persona, in assignment order (§14.2).
// advertise both capabilities before the persona, in assignment order. With no
// explicit descriptions, the first body line is the documented fallback.
let skill_id = |n: u128| SkillId::from_uuid(Uuid::from_u128(n));
let skill = |n: u128, name: &str, body: &str| {
Skill::new(
@ -2244,14 +2245,20 @@ async fn launch_conventionfile_injects_assigned_skills_in_order() {
assert_eq!(writes.len(), 1);
let doc = String::from_utf8(writes[0].1.clone()).unwrap();
assert!(doc.contains("# persona"), "persona present: {doc}");
assert!(doc.contains("REFAC_BODY"), "first skill body present");
assert!(doc.contains("REVIEW_BODY"), "second skill body present");
// Deterministic order: persona before skills, skill 1 before skill 2.
assert!(
doc.contains("**refactor** — REFAC_BODY"),
"first skill affordance present"
);
assert!(
doc.contains("**review** — REVIEW_BODY"),
"second skill affordance present"
);
// Durable capability-first order: skills before persona, assignments stable.
let persona_at = doc.find("# persona").unwrap();
let refac_at = doc.find("REFAC_BODY").unwrap();
let review_at = doc.find("REVIEW_BODY").unwrap();
assert!(
persona_at < refac_at && refac_at < review_at,
refac_at < review_at && review_at < persona_at,
"ordering: {doc}"
);
}

View File

@ -1216,7 +1216,12 @@ fn swap_fixture(agent: &Agent, target_structured: bool, factory: FakeFactory) ->
Arc::new(FakeRecall),
None,
)
.with_structured(Arc::new(factory.clone()), Arc::clone(&structured));
.with_structured(Arc::new(factory.clone()), Arc::clone(&structured))
.with_structured_routing_mode(if target_structured {
StructuredRoutingMode::RequireStructured
} else {
StructuredRoutingMode::HumanPtyFallback
});
let swap = ChangeAgentProfile::new(
Arc::new(contexts.clone()),
@ -1582,7 +1587,8 @@ fn launch_fixture_p8b(
Arc::new(FakeRecall),
None,
)
.with_structured(Arc::new(factory), Arc::clone(&structured));
.with_structured(Arc::new(factory), Arc::clone(&structured))
.with_structured_routing_mode(StructuredRoutingMode::RequireStructured);
if let Some(store) = store {
let provider =
Arc::new(FakeProviderSessionProvider(store)) as Arc<dyn ProviderSessionProvider>;
@ -1798,6 +1804,7 @@ fn launch_fixture_with_provider(
None,
)
.with_structured(Arc::new(factory), Arc::clone(&structured))
.with_structured_routing_mode(StructuredRoutingMode::RequireStructured)
.with_provider_session_provider(provider);
(Arc::new(launch), agent, observed)
}