diff --git a/Cargo.lock b/Cargo.lock index 7390439e2a..360167fcb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4120,7 +4120,7 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "ide-agent" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "blake3", @@ -4151,7 +4151,7 @@ dependencies = [ [[package]] name = "ide-analysis" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ast-grep-core", "ide-core", @@ -4163,7 +4163,7 @@ dependencies = [ [[package]] name = "ide-android" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "serde", @@ -4175,7 +4175,7 @@ dependencies = [ [[package]] name = "ide-build" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "chardetng", @@ -4193,7 +4193,7 @@ dependencies = [ [[package]] name = "ide-cli" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "dirs 6.0.0", "serde", @@ -4207,7 +4207,7 @@ dependencies = [ [[package]] name = "ide-clipboard" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "gtk", "objc2 0.6.5", @@ -4218,7 +4218,7 @@ dependencies = [ [[package]] name = "ide-command" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "heck", "proc-macro2", @@ -4229,7 +4229,7 @@ dependencies = [ [[package]] name = "ide-core" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "dirs 6.0.0", @@ -4251,7 +4251,7 @@ dependencies = [ [[package]] name = "ide-coverage" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "dunce", "ide-core", @@ -4265,7 +4265,7 @@ dependencies = [ [[package]] name = "ide-dap" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "futures", @@ -4295,7 +4295,7 @@ dependencies = [ [[package]] name = "ide-db" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "bb8", @@ -4334,7 +4334,7 @@ dependencies = [ [[package]] name = "ide-docker" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "serde", @@ -4347,7 +4347,7 @@ dependencies = [ [[package]] name = "ide-drag-out" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "gtk", "objc2 0.6.5", @@ -4361,7 +4361,7 @@ dependencies = [ [[package]] name = "ide-extension" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "blake3", @@ -4381,7 +4381,7 @@ dependencies = [ [[package]] name = "ide-flutter" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-android", "ide-core", @@ -4392,7 +4392,7 @@ dependencies = [ [[package]] name = "ide-fonts" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "objc2-core-foundation", "objc2-core-text", @@ -4404,7 +4404,7 @@ dependencies = [ [[package]] name = "ide-github" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "ide-vcs", @@ -4416,7 +4416,7 @@ dependencies = [ [[package]] name = "ide-heap" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "criterion", "ide-core", @@ -4435,7 +4435,7 @@ dependencies = [ [[package]] name = "ide-host" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "blake3", @@ -4519,7 +4519,7 @@ dependencies = [ [[package]] name = "ide-http" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "encoding_rs", @@ -4543,7 +4543,7 @@ dependencies = [ [[package]] name = "ide-index" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "criterion", @@ -4566,7 +4566,7 @@ dependencies = [ [[package]] name = "ide-jdwp" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-jvm-inspect", "proptest", @@ -4578,7 +4578,7 @@ dependencies = [ [[package]] name = "ide-jsonrpc" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "encoding_rs", "ide-core", @@ -4594,7 +4594,7 @@ dependencies = [ [[package]] name = "ide-jvm-attach" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "libc", "tempfile", @@ -4603,7 +4603,7 @@ dependencies = [ [[package]] name = "ide-jvm-inspect" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "futures", "serde", @@ -4614,7 +4614,7 @@ dependencies = [ [[package]] name = "ide-language" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "criterion", @@ -4676,7 +4676,7 @@ dependencies = [ [[package]] name = "ide-lsp" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "criterion", "dunce", @@ -4707,7 +4707,7 @@ dependencies = [ [[package]] name = "ide-mcp" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "bytes", "dunce", @@ -4726,7 +4726,7 @@ dependencies = [ [[package]] name = "ide-notebook" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "futures", "ide-core", @@ -4751,7 +4751,7 @@ dependencies = [ [[package]] name = "ide-plugin" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "dunce", @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "ide-profiler" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "ide-jvm-attach", @@ -4787,7 +4787,7 @@ dependencies = [ [[package]] name = "ide-remote" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "dunce", "futures", @@ -4807,7 +4807,7 @@ dependencies = [ [[package]] name = "ide-run" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "dunce", @@ -4834,7 +4834,7 @@ dependencies = [ [[package]] name = "ide-scaffold" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "ide-tools", @@ -4850,7 +4850,7 @@ dependencies = [ [[package]] name = "ide-sdk" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "dirs 6.0.0", @@ -4876,7 +4876,7 @@ dependencies = [ [[package]] name = "ide-search" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "criterion", "encoding_rs", @@ -4897,7 +4897,7 @@ dependencies = [ [[package]] name = "ide-spell" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "parking_lot 0.12.5", @@ -4910,7 +4910,7 @@ dependencies = [ [[package]] name = "ide-ssh" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "dirs 6.0.0", "flate2", @@ -4935,7 +4935,7 @@ dependencies = [ [[package]] name = "ide-streams" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "ide-language", @@ -4948,7 +4948,7 @@ dependencies = [ [[package]] name = "ide-svn" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "dunce", "encoding_rs", @@ -4963,7 +4963,7 @@ dependencies = [ [[package]] name = "ide-syntax" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "ide-language", @@ -4978,7 +4978,7 @@ dependencies = [ [[package]] name = "ide-terminal" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "ide-core", "libc", @@ -4992,7 +4992,7 @@ dependencies = [ [[package]] name = "ide-text" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "criterion", "ide-core", @@ -5005,7 +5005,7 @@ dependencies = [ [[package]] name = "ide-tools" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "blake3", @@ -5032,7 +5032,7 @@ dependencies = [ [[package]] name = "ide-vcs" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "dunce", @@ -5054,7 +5054,7 @@ dependencies = [ [[package]] name = "ide-vfs" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "chardetng", "dunce", @@ -5081,7 +5081,7 @@ dependencies = [ [[package]] name = "ide-web" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "dirs 6.0.0", "ide-core", @@ -5097,7 +5097,7 @@ dependencies = [ [[package]] name = "ide-workspace" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "blake3", "dunce", @@ -6724,7 +6724,7 @@ dependencies = [ [[package]] name = "openidea" -version = "0.1.57" +version = "0.1.58-nightly.20261205" dependencies = [ "base64 0.22.1", "blake3", diff --git a/Cargo.toml b/Cargo.toml index 0d5741eb92..7942a48b0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["crates/*", "src-tauri"] exclude = ["sdk", "plugins", "vendor"] [workspace.package] -version = "0.1.57" +version = "0.1.58-nightly.20261205" edition = "2024" rust-version = "1.96" license = "Apache-2.0" diff --git a/package.json b/package.json index 63f1c2a093..0f29135914 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.57", + "version": "0.1.58-nightly.20261205", "license": "Apache-2.0", "type": "module", "scripts": { diff --git a/sdk/rust/openidea-plugin/tests/api/released/agents.wit b/sdk/rust/openidea-plugin/tests/api/released/agents.wit index d5b0b101a4..86684d3f78 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/agents.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/agents.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.20.0; +package openidea:plugin@1.21.0; /// Forking recorded native agent sessions into new tasks (API 1.18). Requires /// the `agents` capability. The session must belong to the invoking window's @@ -11,4 +11,28 @@ interface agents { /// new task id. `cwd` must be where the session was recorded. The first /// turn continues the recording as the agent's own fork. fork-session: func(agent: string, session-id: string, cwd: string) -> result; + /// A recorded native session to continue as a fork (API 1.21). The host validates + /// it and builds the fork invocation itself, like `fork-session`; a plugin never + /// puts tokens on an agent's command line. + record recorded-session { + /// The recorded session's id; the task's provider must be the agent that recorded it. + session-id: string, + /// Where it was recorded (same rule as fork-session). + cwd: string, + } + /// A new task a plugin starts (API 1.21). The host does NOT send the prompt: the + /// task opens in the Agents window with the provider selected and the prompt in + /// its message field, focused, for the user to review and send. + record new-task { + provider: string, + /// Without `fork`, must be non-empty; the host rejects an empty prompt. + prompt: string, + /// Continue a recorded native session as a fork, like fork-session. + fork: option, + } + /// Start a new task in the invoking window's project and return its id (API 1.21). + /// Requires the `agents` capability. The task is created unsent; the user reviews + /// the prompt in the Agents window and sends it. With `fork`, the recorded session + /// is validated and continued exactly as `fork-session` does. + start-task: func(task: new-task) -> result; } \ No newline at end of file diff --git a/sdk/rust/openidea-plugin/tests/api/released/commit.wit b/sdk/rust/openidea-plugin/tests/api/released/commit.wit index 94a1c2882b..20426a680d 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.20.0; +package openidea:plugin@1.21.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/completion-list.wit b/sdk/rust/openidea-plugin/tests/api/released/completion-list.wit index 34d283648d..e6bba755cb 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/completion-list.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/completion-list.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.20.0; +package openidea:plugin@1.21.0; /// Optional export (API 1.16, world `plugin-completion-list`): completion that /// can say its list is incomplete. A plugin exporting it is called instead of diff --git a/sdk/rust/openidea-plugin/tests/api/released/completion-resolve.wit b/sdk/rust/openidea-plugin/tests/api/released/completion-resolve.wit new file mode 100644 index 0000000000..c1201d37ec --- /dev/null +++ b/sdk/rust/openidea-plugin/tests/api/released/completion-resolve.wit @@ -0,0 +1,55 @@ +package openidea:plugin@1.21.0; + +/// Optional export (API 1.21, world `plugin-completion-resolve`): completion items +/// carrying an opaque `data` token resolved lazily via `resolve` on selection. +interface completion-resolve-provider { + use types.{error, position, range, text-edit}; + + /// The document a request is about (matching `providers.document`). + record document { + path: string, + language: string, + version: u64, + text: string, + } + + /// A completion item (matching `providers.completion-item`). + record completion-item { + label: string, + detail: option, + kind: option, + insert-text: string, + snippet: bool, + replace: option, + sort-text: option, + filter-text: option, + documentation: option, + additional-edits: list, + } + + record completion-item-ref { + item: completion-item, + /// Opaque reference passed back to `resolve` once this item is focused. + data: option, + } + + record resolvable-completion-list { + items: list, + /// Same semantics as `completion-list-provider.completion-list.incomplete`. + incomplete: bool, + } + + completion: func(doc: document, at: position, trigger: option) -> resolvable-completion-list; + resolve: func(doc: document, item: completion-item-ref) -> result; +} + +/// The optional export-only world the SDK merges with `plugin`. +world completion-resolve-exports { + export completion-resolve-provider; +} + +/// The host-side world used to instantiate a component that exports it. +world plugin-completion-resolve { + include plugin; + export completion-resolve-provider; +} diff --git a/sdk/rust/openidea-plugin/tests/api/released/database.wit b/sdk/rust/openidea-plugin/tests/api/released/database.wit index 0284b0e9da..d81f760b98 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.20.0; +package openidea:plugin@1.21.0; /// Plugin-owned project data sources. Requires database.sources and project trust. /// Runs on the Database subsystem's host, including on remote project servers. @@ -69,4 +69,64 @@ interface database { /// sources. Requires the separate database.schema grant and a trusted project. /// Never connects a source, returns credentials/rows, or executes caller SQL. describe-table: func(project: borrow, table: table-ref) -> result; + + /// Non-secret identity of an already connected project data source (API 1.21). + record connected-source { + source-id: string, + name: string, + driver: string, + database: option, + } + /// A table or view summary in a connected schema (API 1.21). + record table-summary { + name: string, + kind: string, + comment: option, + } + /// Column metadata of a query result (API 1.21). + record query-column { + name: string, + type-name: string, + } + /// Bounded result of executing a SQL statement on a connected source (API 1.21). + record query-result { + columns: list, + rows: list>>, + affected: option, + has-more: bool, + elapsed-ms: u64, + } + /// Lists already connected project sources (non-secret identity only, API 1.21). + /// Requires database.schema and a trusted project; never connects sources or returns credentials. + connected-sources: func(project: borrow) -> result, error>; + /// Lists schemas of an already connected project source (API 1.21). + /// Requires database.schema and a trusted project; never connects sources or returns credentials. + list-schemas: func(project: borrow, source-id: string) -> result, error>; + /// Lists tables and views in a schema of an already connected project source (API 1.21). + /// Requires database.schema and a trusted project; never connects sources or returns credentials. + list-tables: func(project: borrow, source-id: string, schema: string) -> result, error>; + /// Executes a SQL statement on an already connected project source (API 1.21). + /// Requires the separate high-risk database.query grant and a trusted project. + /// Never connects a disconnected source or returns credentials; max-rows is clamped to 1..=1000. + execute-query: func( + project: borrow, + source-id: string, + sql: string, + max-rows: option, + ) -> result; + /// Opens the IDE's native Query Console for `source-id` in the invoking window, + /// optionally prefilling `sql` and switching to `schema` (API 1.21). + /// Requires `database.schema`, a trusted project, and an interactive window call. + open-console: func( + project: borrow, + source-id: string, + sql: option, + schema: option, + ) -> result<_, error>; + /// Opens the IDE's native table data grid for `table` in the invoking window (API 1.21). + /// Requires `database.query`, a trusted project, and an interactive window call. + open-table-data: func( + project: borrow, + table: table-ref, + ) -> result<_, error>; } diff --git a/sdk/rust/openidea-plugin/tests/api/released/decorations.wit b/sdk/rust/openidea-plugin/tests/api/released/decorations.wit index d7bc073934..419331a878 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.20.0; +package openidea:plugin@1.21.0; /// Editor and project-tree decorations (API 1.4). Requires project.read. An editor set /// follows its file: the file's own project, or the nearest one when it is outside them all. @@ -7,7 +7,7 @@ package openidea:plugin@1.20.0; /// typo, weak, underline, strikethrough, muted. Unknown styles are ignored. Theme tokens only, /// except for the colors a `set-styled` item gives (API 1.17). interface decorations { - use types.{error, range}; + use types.{error, range, card-action}; /// An editor annotation; after is plain text shown after the range. record decoration { range: range, style: string, hover: option, after: option } /// An editor annotation whose hover is rendered as Markdown (API 1.16). @@ -37,6 +37,18 @@ interface decorations { markdown-hover: option, colors: option, } + /// An editor annotation with its own colors and hover-card actions (API 1.21). + /// Like `styled-decoration`, with buttons on the Markdown hover card. + record actionable-decoration { + range: range, + style: string, + hover: option, + after: option, + markdown-hover: option, + colors: option, + /// At most 4 actions; each command must be one this plugin declares. + actions: list, + } /// A project-tree annotation; badge is at most two Unicode characters. record file-decoration { badge: option, style: string, tooltip: option } /// Replace this set for a file. At most 10,000 items/file and 50 editor sets/plugin. @@ -50,6 +62,10 @@ interface decorations { /// assigns, such as one color per marked variable. Colors apply only to the item's range /// and after label; an invalid color fails the call. Same limits and set-id rules as `set`. set-styled: func(path: string, set-id: string, items: list) -> result<_, error>; + /// Like `set-styled`, with each item's hover-card actions (API 1.21). An action + /// runs this plugin's declared command as if from Find Action and closes the + /// card; an undeclared command fails the call. Same limits and set-id rules as `set`. + set-actionable: func(path: string, set-id: string, items: list) -> result<_, error>; /// Remove this editor set from every file/project. clear: func(set-id: string) -> result<_, error>; /// Replace this set's tree annotation for a file; at most 50 tree sets/plugin. diff --git a/sdk/rust/openidea-plugin/tests/api/released/details.wit b/sdk/rust/openidea-plugin/tests/api/released/details.wit index ec0948bc00..1bedc44ba0 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.20.0; +package openidea:plugin@1.21.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 9f4d97d979..ee9d420d83 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.20.0; +package openidea:plugin@1.21.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 b10ed5d8cd..ebf7647e01 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.20.0; +package openidea:plugin@1.21.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 740294de6e..87097f2191 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.20.0; +package openidea:plugin@1.21.0; /// Workbench events, delivered in batches to `event-handler.handle`. interface events { @@ -41,13 +41,22 @@ interface events { /// work waits for it; it requires `events`) through `other`. /// API 1.18 also delivers `project-closed` (JSON project root string) and /// `watched-files-changed` (see `watch-paths`) through `other`. + /// API 1.21 also delivers `run-started` (JSON {id, config, debug}) through `other` + /// whenever one of this plugin's configurations starts (whether launched by the plugin + /// or by the user), `run-exited` for user-launched plugin configurations, and `run-output` + /// (JSON {runId, configId, stream, text}) when subscribing with `run.output` in a trusted project. + /// `project-tree-expanded` (API 1.21) is also delivered through `other`: a JSON array of the + /// absolute paths of Project tree folders the user newly expanded (one batch per expand, + /// multi-level expands included), and once with the folders already expanded when a plugin + /// subscribes; it requires `events`. /// Kinds: `file-opened`, `file-saved`, `document-changed` (versioned UTF-16 /// replacements from explicit path subscriptions), `websocket-ready` /// (a host-owned connection has messages to drain), `caret-moved`, `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, /// checkout, fetch…), `action-performed` (an IDE action ran), - /// `project-closed` (a project closed) and + /// `project-closed` (a project closed), `project-tree-expanded` (Project tree folders expanded), + /// `run-started`, `run-exited`, and /// `scheduled` (the `on-schedule` period elapsed); later IDEs add more, /// and an IDE that doesn't know one fails with `invalid`. /// Requires `events` (`events.input` for `action-performed`). @@ -86,6 +95,17 @@ interface events { /// that serves a window's project (a command or event). watch-paths: func(paths: list) -> result<_, error>; unsubscribe: func(kind: string); + /// Wakes this plugin once, `after-ms` milliseconds from now (API 1.21), for retries, + /// backoff and polling the plugin paces itself: a `timer` event (JSON string: `id`) + /// arrives through `other`, in the window of the call that scheduled it. Scheduling an + /// `id` again replaces it, so the next delay is the plugin's own choice. An idle plugin + /// is activated for it. `after-ms` is 250 ms to 24 h; `id` is 1-128 bytes; at most 16 + /// timers are pending per plugin. They end when they fire, on `cancel-schedule`, when + /// the window closes, or when the plugin stops (disabled, updated, uninstalled); idle + /// reclaim keeps them. No capability: a plugin only wakes itself. + schedule: func(id: string, after-ms: u32) -> result<_, error>; + /// Cancels the pending `schedule` with this `id` (API 1.21); an unknown id does nothing. + cancel-schedule: func(id: string); } /// Long-running work with a progress indicator. While a task is open, the diff --git a/sdk/rust/openidea-plugin/tests/api/released/exports.wit b/sdk/rust/openidea-plugin/tests/api/released/exports.wit index 96592f8003..d352203adc 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.20.0; +package openidea:plugin@1.21.0; interface lifecycle { use types.{context, error}; diff --git a/sdk/rust/openidea-plugin/tests/api/released/extensions.wit b/sdk/rust/openidea-plugin/tests/api/released/extensions.wit index f5e081470e..3492888e1c 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/extensions.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/extensions.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.20.0; +package openidea:plugin@1.21.0; /// What other plugins contributed to the extension points this plugin declares /// (`[[extension-points]]` in `plugin.toml`; the contributors list this plugin 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 0a0f66690c..d386fe7bb7 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.20.0; +package openidea:plugin@1.21.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 5eb436bd81..ecd6cb9411 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.20.0; +package openidea:plugin@1.21.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 1e131c6372..98b9f5665e 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.20.0; +package openidea:plugin@1.21.0; /// Writes to the IDE log, tagged with the plugin id. interface log { @@ -80,6 +80,20 @@ interface ui { enabled: bool, } + /// A clickable link rule for Run and Debug console output (API 1.21): matches + /// trigger one of the plugin's declared commands with `{ text, line, argument }`. + record console-link-rule { + pattern: string, + ignore-case: bool, + /// The id of a command the plugin declares under `[[contributes.commands]]`. + command: string, + argument: option, + tooltip: option, + foreground: option, + styles: list, + enabled: bool, + } + /// A notification button that runs one of the plugin's commands. record notification-action { /// Up to 256 bytes, one line. @@ -130,6 +144,9 @@ interface ui { /// invalid one fails the call and keeps the previous rules. They go /// away when the plugin stops. Needs no capability. set-console-rules: func(rules: list) -> result<_, error>; + /// Replaces the plugin's clickable console link rules (API 1.21); an empty + /// list removes them. Each enabled rule must name a command the plugin declares. + set-console-links: func(rules: list) -> result<_, error>; /// Sets the plugin's context key `key`, which `when` clauses test as /// `plugin..`, in the window the current command or event came /// from (every window when there is none). A window's value takes @@ -218,10 +235,10 @@ interface command-runner { execute: func(id: string, arg: option) -> result, error>; } -/// Requests to the language servers the IDE runs (API 1.9). +/// Requests and read-only semantic queries against running IDE language servers (API 1.9; semantic queries API 1.21). interface language-servers { - use types.{error}; - use workspace.{project}; + use types.{error, location, position}; + use workspace.{project, symbol-info}; /// Sends `method` to the server named `server` (the `name` of its /// `[[language-servers]]` entry in the language definition, e.g. `phoxite`) @@ -243,6 +260,24 @@ interface language-servers { /// The same for a notification: no answer is awaited. notify: func(project: borrow, server: string, method: string, params: option) -> result<_, error>; + + /// Resolves declaration targets at `at` through running language servers (`code.semantics`, API 1.21). + definition: func(project: borrow, path: string, at: position) -> result, error>; + + /// Resolves type definition targets at `at` through running language servers (`code.semantics`, API 1.21). + type-definition: func(project: borrow, path: string, at: position) -> result, error>; + + /// Resolves implementation targets at `at` through running language servers (`code.semantics`, API 1.21). + implementations: func(project: borrow, path: string, at: position) -> result, error>; + + /// Finds references at `at`, capped at `limit` (`code.semantics`, API 1.21). + references: func(project: borrow, path: string, at: position, limit: u32) -> result, error>; + + /// Reads resolved hover / type signature Markdown at `at` (`code.semantics`, API 1.21). + hover-info: func(project: borrow, path: string, at: position) -> result, error>; + + /// Reads document outline symbols for a project path or read-only `jdt://` URI (`code.semantics`, API 1.21). + document-symbols: func(project: borrow, path: string) -> result, error>; } /// Per-plugin named, read-only Output tabs (API 1.4), with a 1 MiB UTF-8 ring buffer. diff --git a/sdk/rust/openidea-plugin/tests/api/released/hover-actions.wit b/sdk/rust/openidea-plugin/tests/api/released/hover-actions.wit index 070c66a2bc..b7f3fa778e 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/hover-actions.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/hover-actions.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.20.0; +package openidea:plugin@1.21.0; /// Optional export (world `plugin-hover-actions`): clickable actions rendered /// at the left edge of a line and revealed while the pointer is in the leftmost diff --git a/sdk/rust/openidea-plugin/tests/api/released/hover.wit b/sdk/rust/openidea-plugin/tests/api/released/hover.wit index c9be10359f..726313f77c 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.20.0; +package openidea:plugin@1.21.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 7453f3ffe3..1c1bfe960b 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.20.0; +package openidea:plugin@1.21.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 10608d5f6c..e2c79c58b1 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.20.0; +package openidea:plugin@1.21.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 b6d1498e65..78e483cd33 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.20.0; +package openidea:plugin@1.21.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 d9f3354a47..77f41019cf 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.20.0; +package openidea:plugin@1.21.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 1a6a722d4b..9abd049e42 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.20.0; +package openidea:plugin@1.21.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 c1de914ec7..e2a6f0d65d 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.20.0; +package openidea:plugin@1.21.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 e802e21e13..69ae30a676 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.20.0; +package openidea:plugin@1.21.0; world plugin { import log; @@ -34,6 +34,8 @@ world plugin { import command-runner; import language-servers; import views; + import project-view-types; + import project-view; import run; import run-targets; import database; @@ -235,5 +237,10 @@ world search { export search-provider; } /// A plugin that paints theme-token foreground marks from a syntax snapshot (API 1.20). world plugin-syntax-decorations { include plugin; export syntax-decorations-provider; } + +/// A native Project tool window pane (API 1.21). +world plugin-project-view { include plugin; export project-view-provider; } + +world project-view-exports { export project-view-provider; } /// Export-only syntax decorations, composed with the base plugin world. world syntax-decorations { export syntax-decorations-provider; } diff --git a/sdk/rust/openidea-plugin/tests/api/released/project-view.wit b/sdk/rust/openidea-plugin/tests/api/released/project-view.wit new file mode 100644 index 0000000000..8725958963 --- /dev/null +++ b/sdk/rust/openidea-plugin/tests/api/released/project-view.wit @@ -0,0 +1,55 @@ +package openidea:plugin@1.21.0; + +/// Nodes of the native Project tree (API 1.21). +interface project-view-types { + enum node-kind { file, directory } + record native-node { + id: string, + path: string, + label: string, + kind: node-kind, + } + record folder-details { + label: string, + /// An IDE icon name. The host uses its folder icon when absent or unknown. + icon: option, + } + variant projection-kind { + existing-node, + virtual-folder(folder-details), + } + record projection-node { + /// Existing nodes use an id from the input. A virtual folder uses a + /// stable plugin-chosen id scoped to this native parent. + id: string, + /// The virtual folder id to group under, or none for a direct child. + parent: option, + kind: projection-kind, + } +} + +interface project-view { + use types.{error}; + + /// Recompute the plugin's pane, or one project-relative or absolute + /// directory. Without an invoking window, invalidate the pane in every window. + refresh: func(view-id: string, directory: option) -> result<_, error>; + + /// Select a real file or directory in an owned pane or the built-in `project` + /// pane of the invoking window. `focus` defaults to true. + select-in: func(view-id: string, path: string, focus: option) -> result<_, error>; +} + +/// Optional export for `[[contributes.projectViewPanes]]`. It runs while the +/// plugin's pane is visible, on the project's native direct children. Return +/// none to leave those children unchanged. Order is preserved among siblings; +/// parent ids designate virtual folders in the same result. Omitted native +/// children stay in the pane in native order. Unknown ids, duplicate references +/// and invalid virtual trees discard the result. +interface project-view-provider { + use project-view-types.{native-node, projection-node}; + use invocation.{invocation}; + + /// `settings` is the current view options as a JSON object. + modify-children: func(view-id: string, parent: native-node, children: list, settings: string, ctx: borrow) -> option>; +} diff --git a/sdk/rust/openidea-plugin/tests/api/released/providers.wit b/sdk/rust/openidea-plugin/tests/api/released/providers.wit index 2fb49ff34c..245f2c6d51 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.20.0; +package openidea:plugin@1.21.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/rename.wit b/sdk/rust/openidea-plugin/tests/api/released/rename.wit new file mode 100644 index 0000000000..20b807032a --- /dev/null +++ b/sdk/rust/openidea-plugin/tests/api/released/rename.wit @@ -0,0 +1,46 @@ +package openidea:plugin@1.21.0; + +/// Optional export (world `plugin-rename`, API 1.21): prepare-rename and +/// cross-file workspace rename edits alongside native language servers. +interface rename-provider { + use types.{error, position, range, text-edit}; + + /// The document the rename is in (matching `providers.document`). + record document { + path: string, + language: string, + version: u64, + text: string, + } + + /// Text edits to one file (matching `providers.file-edit`). + record file-edit { + path: string, + edits: list, + } + + /// Editable target range and optional prefilled text for inline/dialog rename. + record prepare-rename-result { + range: range, + placeholder: option, + } + + /// Checks whether `at` names a symbol this plugin can rename, under the + /// editing-path budget. Returning `none` lets other providers or LSP answer. + prepare-rename: func(doc: document, at: position) -> option; + + /// Computes cross-file edits to rename the symbol at `at` to `new-name` + /// (command budget; runs alongside any native language server). + rename: func(doc: document, at: position, new-name: string) -> result, error>; +} + +/// The optional export-only world the SDK merges with `plugin`. +world rename-exports { + export rename-provider; +} + +/// The host-side world used to instantiate a component that exports it. +world plugin-rename { + include plugin; + export rename-provider; +} 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 2495bc1ce4..1b51595a55 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.20.0; +package openidea:plugin@1.21.0; /// Project-scoped targets owned by the registering plugin (API 1.4). interface run-targets { diff --git a/sdk/rust/openidea-plugin/tests/api/released/run.wit b/sdk/rust/openidea-plugin/tests/api/released/run.wit index 6bfb18b74d..33f1dc3b35 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.20.0; +package openidea:plugin@1.21.0; /// Launches this plugin's configurations in the invoking window's Run tool window. interface run { @@ -24,6 +24,30 @@ interface run { start: func(config: string, args: list, debug: bool) -> result; /// Starts an owned configuration with launch options, appending args (API 1.18). start-with-options: func(config: string, args: list, options: start-options) -> result; + /// Stops an active run started from one of this plugin's configurations (API 1.21). + /// Only from a window command/event. + stop: func(id: string) -> result<_, error>; + /// Payload for `upsert-configuration` (API 1.21). + record run-config-draft { + /// Existing saved config id to update (`none` creates a new configuration). + id: option, + /// Id from one of this plugin's own `[[contributes.runConfigTypes]]`. + type-id: string, + name: string, + command: option, + args: list, + cwd: option, + env: list>, + params: list>, + allow-parallel: bool, + } + /// Creates or updates a saved run configuration of one of this plugin's own + /// `contributes.runConfigTypes` in the invoking window's project (API 1.21). + /// Returns the saved configuration id. + upsert-configuration: func(draft: run-config-draft) -> result; + /// Opens the Run/Debug Configurations dialog in the invoking window, optionally + /// selecting `config-id` (API 1.21). + open-edit-configurations: func(config-id: option) -> result<_, error>; } /// Optional dynamic configurations, refreshed alongside run detectors. diff --git a/sdk/rust/openidea-plugin/tests/api/released/search.wit b/sdk/rust/openidea-plugin/tests/api/released/search.wit index 775cc03415..f5148ed49f 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/search.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/search.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.20.0; +package openidea:plugin@1.21.0; /// On-demand results for `[[contributes.searchCategories]]`. Optional, API 1.13. interface search-provider { diff --git a/sdk/rust/openidea-plugin/tests/api/released/semantic.wit b/sdk/rust/openidea-plugin/tests/api/released/semantic.wit index 551db318d7..3829da74b1 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.20.0; +package openidea:plugin@1.21.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/syntax-decorations.wit b/sdk/rust/openidea-plugin/tests/api/released/syntax-decorations.wit index 3c5bdb4c32..84018b27a7 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/syntax-decorations.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/syntax-decorations.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.20.0; +package openidea:plugin@1.21.0; /// Optional export (world `plugin-syntax-decorations`): foreground marks for /// documents of the languages declared with the `syntax-decorations` provider diff --git a/sdk/rust/openidea-plugin/tests/api/released/types.wit b/sdk/rust/openidea-plugin/tests/api/released/types.wit index d28702152d..285966098d 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.20.0; +package openidea:plugin@1.21.0; /// Shared types. Positions are 0-based lines and UTF-16 code unit columns, /// as in the editor and LSP. @@ -52,6 +52,24 @@ interface types { range: range, } + /// An action button on a plugin's hover card (API 1.21). It runs one of the + /// plugin's declared commands exactly as if the user ran it from Find Action: + /// the same budget and already-granted capabilities, no new capability. The + /// card closes when the action runs; an action whose document, project or + /// plugin snapshot changed since the card was placed (or last republished) + /// does not run. + record card-action { + /// Optional icon: a registered icon name or a declared manifest SVG path. + icon: option, + /// Text shown when no icon resolves; an icon makes the button icon-only, + /// with this as its accessible name and fallback tooltip. + label: string, + tooltip: option, + /// This plugin's declared command. + command: string, + argument: option, + } + /// A case added after 1.0, carried by the `other` case of a variant that /// grows (events, view bodies, view events, form fields): its kind and its /// data as JSON. Whoever doesn't know the kind ignores it or shows a diff --git a/sdk/rust/openidea-plugin/tests/api/released/views.wit b/sdk/rust/openidea-plugin/tests/api/released/views.wit index 9733418473..30f100b988 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.20.0; +package openidea:plugin@1.21.0; /// Declarative views: tool windows declared /// under `[[contributes.views]]` and custom editors under @@ -126,6 +126,15 @@ interface views { use detail-types.{process-log}; use process.{command}; + /// A repository-wide comparison of two full commit object IDs. + record revision-comparison { + repository: string, + left: string, + right: string, + left-label: option, + right-label: option, + } + /// An editor toolbar action; at most one action is the Save handler. record content-action { id: string, label: string, icon: option, primary: bool, save: bool } /// A plugin-owned content editor, scoped by key to the invoking window. @@ -171,6 +180,11 @@ interface views { /// and deleted files, instead of next to an empty text. Both sides none is /// `invalid`. open-file-diff: func(diff: file-diff, file-name: option) -> result<_, error>; + /// Opens the IDE's comparison of two commits (API 1.21): a tab of the Compare + /// tool window with the changed-file tree, as Compare Versions in the Git Log. + /// From a command or event of a trusted project window; requires `vcs.read`. + /// The repository must be a mapped Git root of the invoking project. + open-revision-comparison: func(comparison: revision-comparison) -> result<_, error>; /// The view (or every custom editor of that id) shows outdated content: /// the IDE renders it again. @@ -178,6 +192,8 @@ interface views { /// Brings one of the plugin's own views to the front in the window the /// current command or event came from; `invalid` outside one. reveal: func(view: string) -> result<_, error>; + /// Sets or clears the stripe badge of this plugin's view `view` in the invoking window (API 1.21). + set-badge: func(view: string, badge: option) -> result<_, error>; /// Sends a message to the script of a view's `html` body. post-message: func(view: string, message: string) -> result<_, error>; /// Opens a terminal tab in the window the call came from, running diff --git a/sdk/rust/openidea-plugin/tests/api/released/workspace.wit b/sdk/rust/openidea-plugin/tests/api/released/workspace.wit index d96234945a..04e9527de1 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.20.0; +package openidea:plugin@1.21.0; interface workspace { use types.{error, location}; @@ -172,6 +172,10 @@ interface editor { /// Selections when the command was invoked (a cursor is an empty /// range). Requires `editor.read`. selections: func() -> result, error>; + /// First and last document line (0-based, inclusive) on screen in this + /// editor when the command or event was invoked; `none` when the editor + /// is not shown. Requires `editor.read` (API 1.21). + visible-lines: func() -> result>, error>; /// Applies `edits` as one undoable change, only if the document is /// still at `version` (else `stale`, and nothing changes). Ranges are /// in that version and must not overlap. Returns the new version. @@ -185,6 +189,9 @@ interface invocation { use workspace.{project}; use editor.{text-editor}; + record git-action-branch { name: string, full-ref: string, remote: bool } + record git-action-context { repositories: list, branch: option } + resource invocation { /// The window's project. project: func() -> option; @@ -195,6 +202,10 @@ interface invocation { /// Empty when it was not run on any, or when the menu was for a tab /// without a file (a virtual document). selected-paths: func() -> list; + /// Git branch-menu selection at invocation time (API 1.21). Requires + /// `vcs.read`. In the branches popup, `branch` is absent and `repositories` + /// contains the candidate Git roots. A branch row supplies its own roots. + git-action-context: func() -> option; } } @@ -318,4 +329,62 @@ interface build { /// At most 100,000 nodes (else `failed`: ask for one module). Trusted /// projects only; requires `build.read`. dependencies: func(project: borrow, module: option) -> result, error>; + + /// One installed interpreter, JDK, or toolchain visible to the IDE (API 1.21). + record sdk-info { + /// SDK kind (`jdk`, `maven`, `python`, `node`, `php`, `package-manager`, + /// `rust`, `go`, `typescript`, `ruby`, `zig`, `dotnet`, `flutter`, `xcode`). + kind: string, + name: string, + /// Executable or home directory path. + path: string, + version: option, + /// Origin (`system`, `venv`, `pyenv`, `mise`, `homebrew`, `user`, …). + source: string, + home: option, + /// True when currently selected for the open project. + active: bool, + } + + /// Origin of an artifact returned by `build.artifacts` (API 1.21). + enum artifact-origin { + /// WAR module discovered from a Maven or Gradle build model (`id` is + /// `maven:` or `gradle:`). + build-model, + /// Entry configured in **Project Structure › Artifacts** (`id` is + /// `project:`). + project-structure, + } + + /// Packaging kind of an artifact (API 1.21). + enum artifact-kind { + jar, + war, + war-exploded, + } + + /// One deployable WAR module or Project Structure › Artifacts definition (API 1.21). + record artifact-info { + /// Run-configuration artifact identifier (`maven:`, `gradle:`, + /// or `project:`). + id: string, + origin: artifact-origin, + /// Source build tool (`maven`, `gradle`, or `project`). + tool: string, + name: string, + kind: artifact-kind, + /// Module path relative to project root (`"."` or `""` for root module). + module: string, + output-directory: string, + main-class: string, + include-libraries: list, + } + + /// Installed SDKs / toolchains relevant to this project, optionally narrowed by + /// `kind` (API 1.21). Trusted projects only; requires `build.read`. + sdks: func(project: borrow, kind: option) -> result, error>; + + /// Deployable WAR modules from the build model and Project Structure › Artifacts + /// definitions of this project (API 1.21). Trusted projects only; requires `build.read`. + artifacts: func(project: borrow) -> result, error>; } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d07f08aac4..bb19091b5f 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.57", + "version": "0.1.58-nightly.20261205", "identifier": "ai.l0ng.openidea", "build": { "beforeDevCommand": "pnpm dev", @@ -31,9 +31,22 @@ }, "bundle": { "active": true, - "targets": "all", + "targets": [ + "app", + "dmg", + "appimage", + "deb", + "msi", + "nsis" + ], "createUpdaterArtifacts": true, - "icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"], + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], "category": "DeveloperTool", "copyright": "Copyright © 2026 OpenIDEA contributors", "license": "Apache-2.0", @@ -42,13 +55,20 @@ "macOS": { "entitlements": "./Entitlements.plist", "minimumSystemVersion": "11.0" + }, + "windows": { + "wix": { + "version": "0.1.57.21" + } } }, "mainBinaryName": "openidea", "plugins": { "updater": { "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDFCOUU0MUFFOUY4NzZCNkQKUldSdGE0ZWZya0dlRzNnRFJUR2loUVdNZ1BmamxkNzFoaWNPUTBsRmI0cjhxZFRqQURybkMwakEK", - "endpoints": ["https://github.com/l0ng-ai/openidea/releases/latest/download/latest.json"] + "endpoints": [ + "https://github.com/l0ng-ai/openidea/releases/download/nightly/latest.json" + ] } } }