Remplace le README monolithique par un point d'entrée vers des pages dédiées (manifest, activation/contexte, menus, commandes/feedback, layouts React, fenêtres, services, packaging/distribution) pour couvrir #142-#144 et faciliter la navigation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
69 lines
1.9 KiB
Markdown
69 lines
1.9 KiB
Markdown
# Manifest
|
|
|
|
Every plugin package has an `idea-plugin.json` file at the archive root.
|
|
|
|
```json
|
|
{
|
|
"ideaPluginManifestVersion": 1,
|
|
"id": "com.example.hello-plugin",
|
|
"displayName": "Hello Plugin",
|
|
"publisher": "Example",
|
|
"version": "0.1.0",
|
|
"description": "Example IdeA plugin.",
|
|
"main": "dist/index.js",
|
|
"engines": {
|
|
"idea": ">=0.1.0"
|
|
},
|
|
"trustLevel": "full",
|
|
"capabilities": ["ui", "tooling"],
|
|
"activationScope": "app",
|
|
"contributes": {
|
|
"menus": [],
|
|
"menuItems": [],
|
|
"layouts": [],
|
|
"mcpServers": []
|
|
}
|
|
}
|
|
```
|
|
|
|
## Required Fields
|
|
|
|
- `ideaPluginManifestVersion`: currently `1`.
|
|
- `id`: stable lowercase id using letters, digits, dots and dashes. It must start
|
|
and end with an alphanumeric character.
|
|
- `displayName`: human-readable plugin name.
|
|
- `version`: semver version.
|
|
- `main`: package-relative ESM entrypoint loaded by IdeA.
|
|
- `trustLevel`: currently `"full"`.
|
|
|
|
## Optional Fields
|
|
|
|
- `description`, `publisher`.
|
|
- `engines.idea`: host compatibility hint.
|
|
- `activationScope`: `"app"` by default, or `"project"` when activation needs a
|
|
focused project immediately.
|
|
- `capabilities`: `"ui"`, `"tooling"` and/or `"mcp"`.
|
|
|
|
## Contributions
|
|
|
|
`contributes.layouts` is the only surface for plugin layouts. The same layout
|
|
contribution can be mounted inside an IdeA layout cell or opened in a detached OS
|
|
window. Do not add a separate manifest contribution type for windows.
|
|
|
|
Contribution ids are part of the runtime contract:
|
|
|
|
- commands can only register ids declared by `contributes.menuItems[*].command`;
|
|
- layouts can only register `type` values declared by `contributes.layouts`;
|
|
- `services.windows.open({ layoutType })` only accepts a layout type declared by
|
|
the calling plugin.
|
|
|
|
## Validation
|
|
|
|
Use the SDK validator in tests or build tooling:
|
|
|
|
```ts
|
|
import { assertPluginManifest } from "@idea/plugin-sdk";
|
|
|
|
assertPluginManifest(JSON.parse(manifestText));
|
|
```
|