дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
Rework the plugin system per docs/plugin_plan.md (P0–P8): - Extension-point registry (ide-extension) so new contribution types register without touching the kernel; languages, run detectors, providers, views and UI contributions go through it. - Per-plugin capability consent with a risk-graded ledger; process capabilities are pinned to resolved binary paths and hashes. - Async, actor-per-plugin Wasm runtime with lazy activation, cancellation, events, long-running tasks and idle reclamation. - Plugin host moved into ide-host, shared by local and remote projects. - Distribution: install/package tooling (openidea-plugin bin) and a static market index. - WIT frozen as openidea:[email protected]; Rust SDK with mock host. - Ten official validation plugins under plugins/official.
69 рядки
1.8 KiB
Plaintext
69 рядки
1.8 KiB
Plaintext
/// OpenIDEA plugin API, version 1.0 (docs/plugin_plan.md 4.3). Frozen: 1.x
|
|
/// only adds (new interfaces, new optional exports); a 2.0 keeps 1.0 running
|
|
/// through an adapter in the host.
|
|
///
|
|
/// A plugin is a WebAssembly component targeting the `plugin` world (or
|
|
/// `plugin-syntax`). It runs sandboxed: no filesystem, network, environment
|
|
/// or processes beyond WASI's clocks and randomness; everything else goes
|
|
/// through the imports below, gated by the capabilities granted in
|
|
/// `plugin.toml` (a missing one returns `error::denied`).
|
|
package openidea:[email protected];
|
|
|
|
world plugin {
|
|
import log;
|
|
import contributions;
|
|
import ui;
|
|
import storage;
|
|
import workspace;
|
|
import editor;
|
|
import invocation;
|
|
import vcs;
|
|
import events;
|
|
import tasks;
|
|
import diagnostics;
|
|
import net;
|
|
import secrets;
|
|
import process;
|
|
import views;
|
|
import settings;
|
|
|
|
export lifecycle;
|
|
export commands;
|
|
export event-handler;
|
|
}
|
|
|
|
/// A plugin that also provides syntax for its languages.
|
|
world plugin-syntax {
|
|
include plugin;
|
|
export syntax-provider;
|
|
}
|
|
|
|
/// A plugin with editor providers (`[[contributes.providers]]`).
|
|
world plugin-providers {
|
|
include plugin;
|
|
export providers;
|
|
}
|
|
|
|
/// A plugin with views or custom editors (`[[contributes.views]]`,
|
|
/// `[[contributes.custom-editors]]`).
|
|
world plugin-views {
|
|
include plugin;
|
|
export view-provider;
|
|
}
|
|
|
|
/// Only the `syntax-provider` export: guests generate it next to `plugin`
|
|
/// (the component tools merge both into one component).
|
|
world syntax {
|
|
export syntax-provider;
|
|
}
|
|
|
|
/// Only the `providers` export, generated next to `plugin` like `syntax`.
|
|
world editor-providers {
|
|
export providers;
|
|
}
|
|
|
|
/// Only the `view-provider` export, generated next to `plugin` like `syntax`.
|
|
world views-provider {
|
|
export view-provider;
|
|
}
|