diff --git a/.ideai/memory/MEMORY.md b/.ideai/memory/MEMORY.md index 9ae8a36b..6a0889f4 100644 --- a/.ideai/memory/MEMORY.md +++ b/.ideai/memory/MEMORY.md @@ -89,3 +89,4 @@ - [cross-project-ask-drop-cleans-live-state](cross-project-ask-drop-cleans-live-state.md) — memory note cross-project-ask-drop-cleans-live-state - [project-plugin-skills-multi-harness-contract](project-plugin-skills-multi-harness-contract.md) — memory note project-plugin-skills-multi-harness-contract - [ticket284-cross-project-contact-plugin-assignment](ticket284-cross-project-contact-plugin-assignment.md) — memory note ticket284-cross-project-contact-plugin-assignment +- [ticket285-sdk-plugin-root-runtime-api](ticket285-sdk-plugin-root-runtime-api.md) — memory note ticket285-sdk-plugin-root-runtime-api diff --git a/.ideai/memory/ticket285-sdk-plugin-root-runtime-api.md b/.ideai/memory/ticket285-sdk-plugin-root-runtime-api.md new file mode 100644 index 00000000..1fb8bca9 --- /dev/null +++ b/.ideai/memory/ticket285-sdk-plugin-root-runtime-api.md @@ -0,0 +1,37 @@ +--- +name: ticket285-sdk-plugin-root-runtime-api +description: memory note ticket285-sdk-plugin-root-runtime-api +metadata: + type: project +--- +# Ticket #285 — API SDK `ctx.pluginRoot` + +Le ticket #285 a été rouvert puis livré le 2026-09-08 pour remplacer la simple documentation d’absence d’API par une vraie API SDK officielle. + +## Contrat livré + +`ActivateContext` expose désormais `pluginRoot: string` dans le SDK `sdk/IdeaSDK/src/runtime.ts`. + +`ctx.pluginRoot` est le chemin absolu fourni par le host vers la racine du package plugin installé actif. Il sert notamment à appeler des scripts packagés depuis un handler TS, par exemple via `ctx.services.tasks.runCommand()` avec une commande construite depuis `ctx.pluginRoot`. + +Le host reste propriétaire de la résolution : le chemin vient du package installé actif, pas d’un input plugin, pas du manifest, et pas de `bundleUrl`. Aucune API de résolution arbitraire type `resolvePluginPath()` n’a été ajoutée. + +## Chaîne technique + +Propagation livrée : store/package root -> catalogue runtime application -> DTO backend `pluginRoot` -> types frontend -> loader runtime -> `activate(ctx)` -> SDK `ActivateContext`. + +Docs SDK mises à jour : `activation-context.md`, `services.md`, `commands-and-feedback.md`, `manifest.md`. + +Exemple SDK mis à jour : `examples/hello-plugin` inclut et package `scripts/hello-task.mjs`, lancé depuis un chemin construit avec `ctx.pluginRoot`. + +## Validation + +QA vert : `cargo check -p domain -p application -p infrastructure -p backend -p app-tauri --lib`, tests application runtime catalogue 5/5, `plugin_install_load` 5/5, `dto_plugins` 2/2, frontend typecheck + 33 tests, SDK `npm run check`, diff-check/fmt-check verts. + +Git local : SDK commit `9ce3a55`, merge SDK `e3a0f46`; parent commit `e499a0f`, merge parent `b681433`, ticket sync `270c740`, note post-build `2512565`. Aucun push. + +AppImage finale reconstruite depuis `develop` : `target/release/bundle/appimage/IdeA_0.3.0_amd64.AppImage`. + +## Réserve opérationnelle + +Le binaire actif ne change qu’après remplacement manuel de `/home/anthony/Documents/IdeA_0.1.0_amd64.AppImage` puis relance IdeA. Ne pas automatiser cette étape depuis l’orchestrateur actif. Après relance, valider live `ctx.pluginRoot` avec un plugin consommateur comme UnityPlugin. \ No newline at end of file diff --git a/.ideai/tickets/286/carnet.md b/.ideai/tickets/286/carnet.md new file mode 100644 index 00000000..ff226576 --- /dev/null +++ b/.ideai/tickets/286/carnet.md @@ -0,0 +1,23 @@ +--- +issueRef: "#286" +version: 3 +updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +updatedAt: 1788889482726 +--- +# Cadrage SDK UnityPlugin + +Demande: répondre aux questions de contrat SDK pour `plugins/unity-developer-tools` autour des ressources packagées et des slash commands. + +Vérification Architect + grep direct dans IdeA: +- `sdk/IdeaSDK/src/runtime.ts` expose `ActivateContext.pluginRoot: string`. +- `sdk/IdeaSDK/docs/activation-context.md`, `commands-and-feedback.md`, `services.md` et `manifest.md` documentent déjà `ctx.pluginRoot` et la règle d'utilisation avec `tasks.runCommand`. +- `frontend/src/plugins/runtime/loader.ts` exige puis injecte `pluginRoot` dans le contexte d'activation. +- `sdk/IdeaSDK/src/manifest.ts` valide `slashCommands` uniquement avec `name`, `shortDescription`, `command`, `requiresConfirmation`, `when`; aucun schéma d'arguments. +- `crates/application/src/slash_command.rs`, `crates/backend/src/dto.rs` et `frontend/src/plugins/runtime/registry.ts` transportent des arguments opaques, mais l'UI chat actuelle passe le reste de la ligne comme un seul argument chaîne. + +Conclusion: +- Il n'y a pas de service SDK ressources dédié; le contrat officiel est `ctx.pluginRoot`. +- Pour exécuter une ressource packagée, construire un chemin absolu depuis `ctx.pluginRoot`, appeler l'interpréteur via `ctx.services.tasks.runCommand`, et garder `cwd` relatif au projet. +- Le chemin est host-local/read-only, ne pas le persister. +- Les slash commands n'ont pas d'arguments structurés déclarables dans le manifest; UnityPlugin doit parser/valider lui-même les arguments reçus. +- Pas de modification docs SDK nécessaire: le contrat `pluginRoot` est déjà documenté. Lacune côté UnityPlugin: `plugins/unity-developer-tools/types/idea-plugin-sdk.d.ts` doit être aligné avec le SDK canonique en ajoutant `pluginRoot` à `ActivateContext` ou en remplaçant le shim par le SDK à jour. \ No newline at end of file diff --git a/.ideai/tickets/286/issue.md b/.ideai/tickets/286/issue.md new file mode 100644 index 00000000..c84d497a --- /dev/null +++ b/.ideai/tickets/286/issue.md @@ -0,0 +1,17 @@ +--- +id: "898df3ef-503d-400d-b428-8e03418d72ec" +number: 286 +title: "UnityPlugin: clarifier contrats SDK ressources packagées et slash commands" +status: "closed" +priority: "high" +sprint: null +links: [] +agentRefs: [] +attachments: [] +createdBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +createdAt: 1788889276947 +updatedAt: 1788889482726 +version: 3 +--- +Demande utilisateur: corriger plugins/unity-developer-tools en s'appuyant sur le contrat SDK actuel. Questions: service officiel pour dossier/URI du plugin installé et lecture/exécution de ressources packagées; slashCommands avec arguments structurés ou dispatch command id sans schema; documenter IdeaSDK/docs si des contrats existent mais ne sont pas documentés. Implications attendues pour UnityPlugin: ne pas exécuter scripts packagés si chemin non documenté, préférer TypeScript pur ou storage/conventions. \ No newline at end of file diff --git a/.ideai/tickets/287/carnet.md b/.ideai/tickets/287/carnet.md new file mode 100644 index 00000000..656d2f1f --- /dev/null +++ b/.ideai/tickets/287/carnet.md @@ -0,0 +1,6 @@ +--- +issueRef: "#287" +version: 1 +updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +updatedAt: 1788891077144 +--- diff --git a/.ideai/tickets/287/issue.md b/.ideai/tickets/287/issue.md new file mode 100644 index 00000000..582b02c3 --- /dev/null +++ b/.ideai/tickets/287/issue.md @@ -0,0 +1,17 @@ +--- +id: "d9b44519-1f89-48c6-a909-3c5b9cb2a49f" +number: 287 +title: "Cross-project rendezvous timeout malgré activité cible" +status: "inProgress" +priority: "critical" +sprint: null +links: [] +agentRefs: [] +attachments: [] +createdBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +createdAt: 1788891077144 +updatedAt: 1788891077144 +version: 1 +--- +UnitySoundTool rapporte qu'un appel cross-project vers Main de UnityPlugin a expiré après 10 minutes: workstate Main UnityPlugin = Failed / headlessRendezvous / 4c3d6b38 / Timeout: rendezvous inactivity window expired for target Main. Demande utilisateur: corriger ces timeouts cross-project puis rebuild l'AppImage. \ No newline at end of file diff --git a/.ideai/tickets/counter.json b/.ideai/tickets/counter.json index 68afd6d8..94a1b50e 100644 --- a/.ideai/tickets/counter.json +++ b/.ideai/tickets/counter.json @@ -1,3 +1,3 @@ { - "nextNumber": 286 + "nextNumber": 288 } \ No newline at end of file diff --git a/.ideai/tickets/index.json b/.ideai/tickets/index.json index c3f2b0c0..ade11b17 100644 --- a/.ideai/tickets/index.json +++ b/.ideai/tickets/index.json @@ -3907,6 +3907,34 @@ "agent_id": "a6c6ea12-bfc6-4bdc-8031-324102dfa34d" }, "updatedAt": 1788885132878 + }, + { + "issueRef": "#286", + "path": "286", + "title": "UnityPlugin: clarifier contrats SDK ressources packagées et slash commands", + "status": "closed", + "priority": "high", + "sprint": null, + "assignedAgentIds": [], + "createdBy": { + "kind": "agent", + "agent_id": "a6c6ea12-bfc6-4bdc-8031-324102dfa34d" + }, + "updatedAt": 1788889482726 + }, + { + "issueRef": "#287", + "path": "287", + "title": "Cross-project rendezvous timeout malgré activité cible", + "status": "inProgress", + "priority": "critical", + "sprint": null, + "assignedAgentIds": [], + "createdBy": { + "kind": "agent", + "agent_id": "a6c6ea12-bfc6-4bdc-8031-324102dfa34d" + }, + "updatedAt": 1788891077144 } ] } \ No newline at end of file