From 55bc093fe5fa1cb3e914371f62afd7edd09a70e9 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 11 Nov 2026 09:51:47 +0800 Subject: [PATCH] chore: v0.1.41 --- Cargo.lock | 78 +++++++++---------- Cargo.toml | 2 +- package.json | 2 +- .../tests/api/released/commit.wit | 2 +- .../tests/api/released/database.wit | 2 +- .../tests/api/released/decorations.wit | 2 +- .../tests/api/released/details.wit | 2 +- .../tests/api/released/diagnostics.wit | 2 +- .../tests/api/released/endpoints.wit | 2 +- .../tests/api/released/events.wit | 5 +- .../tests/api/released/exports.wit | 21 ++++- .../tests/api/released/extensions.wit | 21 +++++ .../tests/api/released/file-actions.wit | 2 +- .../openidea-plugin/tests/api/released/fs.wit | 2 +- .../tests/api/released/host.wit | 9 ++- .../tests/api/released/hover.wit | 2 +- .../tests/api/released/indexing.wit | 2 +- .../tests/api/released/injections.wit | 2 +- .../tests/api/released/inlay.wit | 2 +- .../openidea-plugin/tests/api/released/io.wit | 2 +- .../tests/api/released/language-features.wit | 2 +- .../tests/api/released/mcp.wit | 2 +- .../tests/api/released/plugin.wit | 8 +- .../tests/api/released/providers.wit | 2 +- .../tests/api/released/run-targets.wit | 30 +++++-- .../tests/api/released/run.wit | 2 +- .../tests/api/released/semantic.wit | 2 +- .../tests/api/released/types.wit | 2 +- .../tests/api/released/views.wit | 2 +- .../tests/api/released/workspace.wit | 8 +- src-tauri/tauri.conf.json | 2 +- 31 files changed, 154 insertions(+), 72 deletions(-) create mode 100644 sdk/rust/openidea-plugin/tests/api/released/extensions.wit diff --git a/Cargo.lock b/Cargo.lock index c12afdb9b..a3d6654e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4145,7 +4145,7 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "ide-agent" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dunce", "encoding_rs", @@ -4169,7 +4169,7 @@ dependencies = [ [[package]] name = "ide-analysis" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ast-grep-core", "ide-core", @@ -4183,7 +4183,7 @@ dependencies = [ [[package]] name = "ide-android" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "serde", @@ -4194,7 +4194,7 @@ dependencies = [ [[package]] name = "ide-build" -version = "0.1.40" +version = "0.1.41" dependencies = [ "blake3", "chardetng", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "ide-cli" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dirs 6.0.0", "serde", @@ -4226,7 +4226,7 @@ dependencies = [ [[package]] name = "ide-clipboard" -version = "0.1.40" +version = "0.1.41" dependencies = [ "gtk", "objc2 0.6.5", @@ -4236,7 +4236,7 @@ dependencies = [ [[package]] name = "ide-core" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dunce", "encoding_rs", @@ -4253,7 +4253,7 @@ dependencies = [ [[package]] name = "ide-coverage" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "ide-run", @@ -4267,7 +4267,7 @@ dependencies = [ [[package]] name = "ide-dap" -version = "0.1.40" +version = "0.1.41" dependencies = [ "futures", "ide-core", @@ -4288,7 +4288,7 @@ dependencies = [ [[package]] name = "ide-db" -version = "0.1.40" +version = "0.1.41" dependencies = [ "bb8", "blake3", @@ -4318,7 +4318,7 @@ dependencies = [ [[package]] name = "ide-docker" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "serde", @@ -4331,7 +4331,7 @@ dependencies = [ [[package]] name = "ide-extension" -version = "0.1.40" +version = "0.1.41" dependencies = [ "base64 0.22.1", "blake3", @@ -4352,7 +4352,7 @@ dependencies = [ [[package]] name = "ide-fonts" -version = "0.1.40" +version = "0.1.41" dependencies = [ "objc2-core-foundation", "objc2-core-text", @@ -4364,7 +4364,7 @@ dependencies = [ [[package]] name = "ide-github" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "ide-vcs", @@ -4377,7 +4377,7 @@ dependencies = [ [[package]] name = "ide-host" -version = "0.1.40" +version = "0.1.41" dependencies = [ "base64 0.22.1", "blake3", @@ -4443,7 +4443,7 @@ dependencies = [ [[package]] name = "ide-http" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "ide-vfs", @@ -4462,7 +4462,7 @@ dependencies = [ [[package]] name = "ide-index" -version = "0.1.40" +version = "0.1.41" dependencies = [ "blake3", "criterion", @@ -4484,7 +4484,7 @@ dependencies = [ [[package]] name = "ide-jsonrpc" -version = "0.1.40" +version = "0.1.41" dependencies = [ "encoding_rs", "futures", @@ -4501,7 +4501,7 @@ dependencies = [ [[package]] name = "ide-language" -version = "0.1.40" +version = "0.1.41" dependencies = [ "blake3", "criterion", @@ -4557,7 +4557,7 @@ dependencies = [ [[package]] name = "ide-lsp" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dunce", "futures", @@ -4583,7 +4583,7 @@ dependencies = [ [[package]] name = "ide-mcp" -version = "0.1.40" +version = "0.1.41" dependencies = [ "bytes", "dunce", @@ -4602,7 +4602,7 @@ dependencies = [ [[package]] name = "ide-notebook" -version = "0.1.40" +version = "0.1.41" dependencies = [ "futures", "ide-core", @@ -4625,7 +4625,7 @@ dependencies = [ [[package]] name = "ide-plugin" -version = "0.1.40" +version = "0.1.41" dependencies = [ "blake3", "dunce", @@ -4648,7 +4648,7 @@ dependencies = [ [[package]] name = "ide-profiler" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "ide-run", @@ -4661,7 +4661,7 @@ dependencies = [ [[package]] name = "ide-remote" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dunce", "globset", @@ -4680,7 +4680,7 @@ dependencies = [ [[package]] name = "ide-run" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dunce", "encoding_rs", @@ -4704,7 +4704,7 @@ dependencies = [ [[package]] name = "ide-sdk" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dunce", "ide-core", @@ -4724,7 +4724,7 @@ dependencies = [ [[package]] name = "ide-search" -version = "0.1.40" +version = "0.1.41" dependencies = [ "criterion", "globset", @@ -4744,7 +4744,7 @@ dependencies = [ [[package]] name = "ide-spell" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "parking_lot", @@ -4757,7 +4757,7 @@ dependencies = [ [[package]] name = "ide-ssh" -version = "0.1.40" +version = "0.1.41" dependencies = [ "dirs 6.0.0", "flate2", @@ -4778,7 +4778,7 @@ dependencies = [ [[package]] name = "ide-syntax" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "ide-language", @@ -4793,7 +4793,7 @@ dependencies = [ [[package]] name = "ide-terminal" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "libc", @@ -4806,7 +4806,7 @@ dependencies = [ [[package]] name = "ide-text" -version = "0.1.40" +version = "0.1.41" dependencies = [ "criterion", "ide-core", @@ -4819,7 +4819,7 @@ dependencies = [ [[package]] name = "ide-tools" -version = "0.1.40" +version = "0.1.41" dependencies = [ "flate2", "hex", @@ -4840,7 +4840,7 @@ dependencies = [ [[package]] name = "ide-vcs" -version = "0.1.40" +version = "0.1.41" dependencies = [ "blake3", "dunce", @@ -4861,7 +4861,7 @@ dependencies = [ [[package]] name = "ide-vfs" -version = "0.1.40" +version = "0.1.41" dependencies = [ "chardetng", "dunce", @@ -4885,7 +4885,7 @@ dependencies = [ [[package]] name = "ide-web" -version = "0.1.40" +version = "0.1.41" dependencies = [ "ide-core", "open", @@ -4901,7 +4901,7 @@ dependencies = [ [[package]] name = "ide-workspace" -version = "0.1.40" +version = "0.1.41" dependencies = [ "blake3", "dunce", @@ -6479,7 +6479,7 @@ dependencies = [ [[package]] name = "openidea" -version = "0.1.40" +version = "0.1.41" dependencies = [ "base64 0.22.1", "blake3", diff --git a/Cargo.toml b/Cargo.toml index e6514e296..c5638cc32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["crates/*", "src-tauri"] exclude = ["sdk", "plugins"] [workspace.package] -version = "0.1.40" +version = "0.1.41" edition = "2024" rust-version = "1.96" license = "Apache-2.0" diff --git a/package.json b/package.json index c1153df5b..8ab92e80a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "openidea", "private": true, "description": "An open-source IDE inspired by IntelliJ IDEA", - "version": "0.1.40", + "version": "0.1.41", "license": "Apache-2.0", "type": "module", "scripts": { diff --git a/sdk/rust/openidea-plugin/tests/api/released/commit.wit b/sdk/rust/openidea-plugin/tests/api/released/commit.wit index 91dbe0e28..b2b91a22a 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/commit.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/commit.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// The commit being prepared in the window the current command or event came /// from (the Commit tool window, or the Commit dialog while it is open): the diff --git a/sdk/rust/openidea-plugin/tests/api/released/database.wit b/sdk/rust/openidea-plugin/tests/api/released/database.wit index 4e77bd9c8..f5d820703 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/database.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/database.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Plugin-owned project data sources. Requires database.sources and project trust. /// Runs on the Database subsystem's host, including on remote project servers. diff --git a/sdk/rust/openidea-plugin/tests/api/released/decorations.wit b/sdk/rust/openidea-plugin/tests/api/released/decorations.wit index 1c5a033e6..d3d7e9bf6 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/decorations.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/decorations.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Project-scoped decorations (API 1.4). Requires project.read; paths must be inside /// an open project. Sets belong to the plugin and disappear when it stops. diff --git a/sdk/rust/openidea-plugin/tests/api/released/details.wit b/sdk/rust/openidea-plugin/tests/api/released/details.wit index f7342991d..6f1b4b2f5 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/details.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/details.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// What the pane beside the Services tree shows for a plugin's node. interface detail-types { diff --git a/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit b/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit index 499335fde..bb57fc6fb 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Optional export (world `plugin-diagnostics`): problems in the current, /// possibly unsaved document, for the languages declared with the diff --git a/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit b/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit index f4a446fe0..30b8a5c10 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// HTTP endpoints found in a project (`[[contributes.endpoints]]`). interface endpoints-provider { diff --git a/sdk/rust/openidea-plugin/tests/api/released/events.wit b/sdk/rust/openidea-plugin/tests/api/released/events.wit index f52030971..f8778a5f5 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/events.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/events.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Workbench events, delivered in batches to `event-handler.handle`. interface events { @@ -32,6 +32,9 @@ interface events { /// API 1.4 also delivers `file-closed` (JSON path string), `settings-changed` /// (JSON array of the plugin's changed setting keys), and `input-mode-changed` /// (JSON {path, mode, sub}) through `other`. The last needs `events.input`. + /// API 1.5 also delivers `extensions-changed` (JSON array of the extension + /// points this plugin declares whose contributions changed) through `other`, + /// to the declaring plugin only and without a capability. /// Kinds: `file-opened`, `file-saved`, `files-changed` (batched disk changes /// as `other`, with created/modified/removed path lists in JSON), `editor-focused` (the focused editor /// changed), `vcs-changed` (a repository's state changed: commit, diff --git a/sdk/rust/openidea-plugin/tests/api/released/exports.wit b/sdk/rust/openidea-plugin/tests/api/released/exports.wit index 434b29ceb..15dc20a66 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/exports.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/exports.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; interface lifecycle { use types.{context, error}; @@ -73,3 +73,22 @@ interface syntax-provider { outline: func(language: string, text: string) -> list; folding: func(language: string, text: string) -> list; } + +/// Optional pre-launch gate for targets owned by this plugin (API 1.5). +interface run-target-validation { + enum operation { run, test } + record launch-info { + operation: operation, + /// Bare program name before wrapping; no arguments or environment. + program: string, + /// Absolute working directory on the machine hosting the plugin. + cwd: string, + } + /// Called after trust, ownership, process grants and executable pin checks. + /// An error refuses the launch without changing the selected target. The + /// host prefixes and bounds the message. Missing exports allow the launch. + /// Calls wake reclaimed instances, use the host call timeout (5s by default), + /// and are cancelled with the launch. Traps/timeouts refuse the launch. + /// For remote projects this runs on the server, where the plugin lives. + validate: func(project: string, target-id: string, launch: launch-info) -> result<_, string>; +} diff --git a/sdk/rust/openidea-plugin/tests/api/released/extensions.wit b/sdk/rust/openidea-plugin/tests/api/released/extensions.wit new file mode 100644 index 000000000..3e7f82739 --- /dev/null +++ b/sdk/rust/openidea-plugin/tests/api/released/extensions.wit @@ -0,0 +1,21 @@ +package openidea:plugin@1.5.0; + +/// What other plugins contributed to the extension points this plugin declares +/// (`[[extension-points]]` in `plugin.toml`; the contributors list this plugin +/// in `[[depends]]`). A change is announced by the `extensions-changed` event. +interface extensions { + use types.{error}; + + record contribution { + /// The contributing plugin's id. + plugin: string, + /// Its `[[contributes.""]]` table as JSON, checked by the host + /// against the fields the point declares. + data: string, + } + + /// The contributions to `point`, in the order the plugins started. Only the + /// plugin that declares `point` may read it (`denied` otherwise); `not-found` + /// when no running plugin declares it. + contributions: func(point: string) -> result, error>; +} diff --git a/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit b/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit index 12b4aec17..ed5ddc9fd 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Optional export (world `plugin-file-actions`): quick fixes and /// refactorings that create, rename or delete files, next to the text edits diff --git a/sdk/rust/openidea-plugin/tests/api/released/fs.wit b/sdk/rust/openidea-plugin/tests/api/released/fs.wit index c1a96cf83..3acc44efe 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/fs.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/fs.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Files outside the open projects: the configuration of the program a /// plugin integrates with, a tool installed elsewhere, a licence file. diff --git a/sdk/rust/openidea-plugin/tests/api/released/host.wit b/sdk/rust/openidea-plugin/tests/api/released/host.wit index c5ce20fbe..f612a97f1 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/host.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/host.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Writes to the IDE log, tagged with the plugin id. interface log { @@ -9,6 +9,7 @@ interface log { interface ui { use types.{error, notification-level}; + use workspace.{project}; record status-item { text: string, @@ -50,6 +51,12 @@ interface ui { /// dismisses the balloon and runs the command in its window. An invalid /// action or an undeclared command fails the call and shows nothing. notify: func(level: notification-level, title: string, body: string, actions: list) -> result<_, error>; + /// `notify` in a window of `target` only (API 1.5), with or without an + /// invoking window: the most recently focused one when the project is open + /// in several. Actions run in that window. A project closed by the time of + /// the call fails it with `not-found` and shows nothing; there is no + /// fallback to another window. A shown balloon goes away with its window. + notify-project: func(target: borrow, level: notification-level, title: string, body: string, actions: list) -> result<_, error>; /// Shows or updates the plugin's status bar item `id` in every window. set-status-item: func(id: string, item: status-item); remove-status-item: func(id: string); diff --git a/sdk/rust/openidea-plugin/tests/api/released/hover.wit b/sdk/rust/openidea-plugin/tests/api/released/hover.wit index 5ddde792e..45d2409be 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/hover.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/hover.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Optional export (world `plugin-hover`): Markdown added to the hover of /// documents of the languages declared with the `hover` provider kind, diff --git a/sdk/rust/openidea-plugin/tests/api/released/indexing.wit b/sdk/rust/openidea-plugin/tests/api/released/indexing.wit index 227aab726..6efbc8eb1 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/indexing.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/indexing.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Cross-file associations a plugin publishes for the files it declares under /// `[[contributes.documentIndexers]]`. The host calls `index` in cancellable diff --git a/sdk/rust/openidea-plugin/tests/api/released/injections.wit b/sdk/rust/openidea-plugin/tests/api/released/injections.wit index 016e5b905..605f9c861 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/injections.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/injections.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Embedded languages. The host routes plugin providers and configured language /// servers inside these ranges, preserving host-document UTF-16 coordinates. diff --git a/sdk/rust/openidea-plugin/tests/api/released/inlay.wit b/sdk/rust/openidea-plugin/tests/api/released/inlay.wit index 1098869a5..aa96b69bf 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/inlay.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/inlay.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Optional export (world `plugin-inlay-hints`): inline hints in documents of /// the languages declared with the `inlay-hints` provider kind, including diff --git a/sdk/rust/openidea-plugin/tests/api/released/io.wit b/sdk/rust/openidea-plugin/tests/api/released/io.wit index b27e48d62..fae4e6620 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/io.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/io.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Problems in files, shown in the editor and the Problems view. interface diagnostics { diff --git a/sdk/rust/openidea-plugin/tests/api/released/language-features.wit b/sdk/rust/openidea-plugin/tests/api/released/language-features.wit index c47c4b621..a20253749 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/language-features.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/language-features.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Additional language features, called only for declared API 1.4 provider kinds. /// Editor calls have a 50 ms soft / 500 ms hard budget; formatting has 5 seconds. diff --git a/sdk/rust/openidea-plugin/tests/api/released/mcp.wit b/sdk/rust/openidea-plugin/tests/api/released/mcp.wit index e250f5496..8d2c811b5 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/mcp.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/mcp.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Discovery of the IDE's built-in MCP server; never exposes its URL or token. interface mcp { diff --git a/sdk/rust/openidea-plugin/tests/api/released/plugin.wit b/sdk/rust/openidea-plugin/tests/api/released/plugin.wit index 04c707d20..739cff517 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/plugin.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/plugin.wit @@ -8,7 +8,7 @@ /// `fs` and `workspace`, and everything else goes through the imports below, /// gated by the capabilities granted in `plugin.toml` (a missing one returns /// `error::denied`). -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; world plugin { import log; @@ -37,6 +37,7 @@ world plugin { import database; import mcp; import settings; + import extensions; export lifecycle; export commands; @@ -200,3 +201,8 @@ world language-injections { export injections; } world plugin-mcp { include plugin; export mcp-provider; } /// Export-only MCP tools, composed with the base plugin world. world mcp-tools { export mcp-provider; } + +/// A plugin that validates launches through its run targets (API 1.5). +world plugin-run-target-validation { include plugin; export run-target-validation; } +/// Export-only validation, composed with the base plugin world. +world run-target-validator { export run-target-validation; } diff --git a/sdk/rust/openidea-plugin/tests/api/released/providers.wit b/sdk/rust/openidea-plugin/tests/api/released/providers.wit index 8c0713ec6..870464617 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/providers.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/providers.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Editor features a plugin provides for the languages it declares under /// `[[contributes.providers]]` (the host calls only declared kinds). They run diff --git a/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit b/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit index ee436a9a5..ebd6ac3cc 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Project-scoped targets owned by the registering plugin (API 1.4). interface run-targets { @@ -16,10 +16,7 @@ interface run-targets { /// Without workdir-args the wrapper manages its container directory itself. /// The wrapper always starts in the configuration's LOCAL working directory. /// Environment reaches the wrapper; forwarding into a container depends on its conventions. - /// Registration never selects the target. Debugging requires container-root and an - /// explicitly supported language debugger placement. Connect-back adapters listen - /// on the host; the target must configure the debuggee to connect to that host. - /// Stdio adapters run inside the target and must be installed there. + /// Registration never selects the target. Debugging plugin targets is invalid. record run-target { id: string, name: string, @@ -34,6 +31,29 @@ interface run-targets { /// Targets survive idle reclamation, and disappear on unregister or plugin stop. /// Remote project registration and execution take place on the server. register: func(project: borrow, target: run-target) -> result<_, error>; + /// Per-command prefix and optional replacement working-directory arguments (API 1.5). + /// None inherits the target's workdir-args; some([]) omits them. + /// Replacement arguments use the same {cwd} substitution and path restrictions. + record command-override { + name: string, + args: list, + workdir-args: option>, + } + + /// Like run-target, with per-command working-directory argument control (API 1.5). + /// Matching commands use program + override args + selected workdir-args + command arguments. + record run-target-with-overrides { + id: string, + name: string, + program: string, + args: list, + workdir-args: list, + container-root: option, + commands: list, + } + + /// Same ownership, trust, process grant and pin checks as register (API 1.5). + register-with-overrides: func(project: borrow, target: run-target-with-overrides) -> result<_, error>; /// Removes only this plugin's target from the project; missing ids are harmless. unregister: func(project: borrow, id: string); } diff --git a/sdk/rust/openidea-plugin/tests/api/released/run.wit b/sdk/rust/openidea-plugin/tests/api/released/run.wit index 6c62534e2..357eaba72 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/run.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/run.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Launches this plugin's configurations in the invoking window's Run tool window. interface run { diff --git a/sdk/rust/openidea-plugin/tests/api/released/semantic.wit b/sdk/rust/openidea-plugin/tests/api/released/semantic.wit index 586c324e6..459a43117 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/semantic.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/semantic.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Optional export (world `plugin-semantic-tokens`): semantic colouring of /// documents of the languages declared with the `semantic-tokens` provider diff --git a/sdk/rust/openidea-plugin/tests/api/released/types.wit b/sdk/rust/openidea-plugin/tests/api/released/types.wit index 4192e783c..f151ca9a6 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/types.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/types.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Shared types. Positions are 0-based lines and UTF-16 code unit columns, /// as in the editor and LSP. diff --git a/sdk/rust/openidea-plugin/tests/api/released/views.wit b/sdk/rust/openidea-plugin/tests/api/released/views.wit index a34be2d46..288884d2e 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/views.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/views.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; /// Declarative views: tool windows declared /// under `[[contributes.views]]` and custom editors under diff --git a/sdk/rust/openidea-plugin/tests/api/released/workspace.wit b/sdk/rust/openidea-plugin/tests/api/released/workspace.wit index 7c1e9dd19..1a7ac9b59 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/workspace.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/workspace.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.4.0; +package openidea:plugin@1.5.0; interface workspace { use types.{error, location}; @@ -66,6 +66,12 @@ interface workspace { /// contents win over the disk. A missing path is `not-found`. /// Requires `project.read`. read-file: func(path: string) -> result; + /// Reads the bytes of a file inside the project (absolute, or + /// relative to the root) — images, archives, fonts — at most 16 MiB, + /// as `fs.read-bytes` allows; paths leaving the root are refused and + /// a missing path is `not-found`. The file on disk: unsaved editor + /// contents don't apply. Requires `project.read`. + read-bytes: func(path: string) -> result, error>; /// Replaces the text of a file inside the project (absolute, or /// relative to the root), or creates it with missing parent /// directories; paths leaving the root are refused. Written in one diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8ff6039de..01591a20b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "OpenIDEA", - "version": "0.1.40", + "version": "0.1.41", "identifier": "ai.l0ng.openidea", "build": { "beforeDevCommand": "pnpm dev",