feat(sdk,plugins): ajoute capability tooling et services runtime publics (workspace/terminal/tasks)
- capability manifeste tooling supportée backend + transport runtime catalog - ctx.services publique côté SDK/runtime, gated par tooling - surface honnête: workspace, terminal, et tasks en observation/contrôle uniquement - docs/exemple/tests mis à jour - QA PASS sur feature/sdk-plugin-tooling-build-debug-surface
This commit is contained in:
@ -8,6 +8,7 @@ It exercises the current plugin primitives end to end:
|
||||
- menu entry: `hello-plugin`;
|
||||
- command: `hello-plugin`, returning `hello-world`;
|
||||
- layout contribution: `hello-plugin.hello-world`, rendered as `hello-world`.
|
||||
- tooling capability: logs the focused workspace project when `ctx.services` is available.
|
||||
|
||||
```sh
|
||||
npm run typecheck:examples
|
||||
@ -25,6 +26,7 @@ During activation the plugin logs:
|
||||
- whether the command and layout runtime registries are available;
|
||||
- successful registration of the `hello-plugin` command;
|
||||
- successful registration of the `hello-plugin.hello-world` layout;
|
||||
- availability of the workspace service from the `tooling` runtime capability;
|
||||
- the first layout render, including project/node identifiers.
|
||||
|
||||
These messages are intentionally small and stable so installation, bundle import, activation and
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
},
|
||||
"trustLevel": "full",
|
||||
"capabilities": [
|
||||
"ui"
|
||||
"ui",
|
||||
"tooling"
|
||||
],
|
||||
"contributes": {
|
||||
"menus": [
|
||||
|
||||
@ -71,6 +71,13 @@ export function activate(ctx: ActivateContext): void {
|
||||
} else {
|
||||
ctx.logger.warn("layout registry unavailable", { layoutType: LAYOUT_TYPE });
|
||||
}
|
||||
|
||||
void ctx.services?.workspace.getCurrentProject().then((project) => {
|
||||
ctx.logger.info("workspace service available", {
|
||||
projectId: project?.id ?? null,
|
||||
hasProjectRoot: Boolean(project?.root)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const plugin: IdeAPluginModule = {
|
||||
|
||||
Reference in New Issue
Block a user