The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
feat(plugins): open plugin API 1.2 (#1654)
l0ng-aia6987b3eaa6c
diff --git a/crates/ide-extension/src/manifest.rs b/crates/ide-extension/src/manifest.rsindex aaeeabf67..5f96ae648 100644--- a/crates/ide-extension/src/manifest.rs+++ b/crates/ide-extension/src/manifest.rs@@ -32,7 +32,7 @@ use std::path::{Component, Path, PathBuf};pub const MANIFEST_FILE: &str = "plugin.toml";/// The plugin API (engine) version this host implements.-pub const ENGINE_VERSION: &str = "1.1.0";+pub const ENGINE_VERSION: &str = "1.2.0";/// The 0.1 API, still accepted for contribution-only packages and 0.1 components.pub const LEGACY_API: &str = "0.1";/// Marketplace categories, in the order they are shown.diff --git a/crates/ide-plugin/src/runtime.rs b/crates/ide-plugin/src/runtime.rsindex e7fe25558..6253c3710 100644--- a/crates/ide-plugin/src/runtime.rs+++ b/crates/ide-plugin/src/runtime.rs@@ -33,7 +33,7 @@ use views_bindings::exports::openidea::plugin::view_provider as wit_view;use views_bindings::openidea::plugin::view_types as wit_vt;/// The API version of the world above, `major.minor` of [`host_api`].-pub const API_VERSION: &str = "1.1";+pub const API_VERSION: &str = "1.2";const EPOCH_TICK: Duration = Duration::from_millis(10);pub(crate) const MAX_TEXT: usize = 1 << 20;pub(crate) const MAX_TITLE: usize = 256;diff --git a/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm b/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasmindex 22be24d04..1efc352b6 100644Binary files a/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm and b/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm differdiff --git a/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm.sources b/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm.sourcesindex a78a811bf..e22d1ea8f 100644--- a/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm.sources+++ b/crates/ide-plugin/tests/fixtures/hello/dist/plugin.wasm.sources@@ -1 +1 @@-455d848dd27f242bb3e9bf420558cbc8c200853f51ada3d481635ac9771803f3+60d67ab91d3c42127500481510c43d829e07babcab872f94a6189d27c901234adiff --git a/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm b/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasmindex 6cc5e751a..58f3525f0 100644Binary files a/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm and b/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm differdiff --git a/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm.sources b/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm.sourcesindex 30532e592..325eec7a1 100644--- a/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm.sources+++ b/crates/ide-plugin/tests/fixtures/jobs/dist/plugin.wasm.sources@@ -1 +1 @@-f7e1ae06a90460ed1d2319bfc51f848654df145fa451f3d959b32776b2b25ce3+6e9aab775c231987a73d2e424f8cd389e429f525327fac4f5aba550ebc53afe6diff --git a/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm b/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasmindex 70f536a98..eda37275d 100644Binary files a/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm and b/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm differdiff --git a/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm.sources b/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm.sourcesindex d08b0b0e8..c6ce9c5a7 100644--- a/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm.sources+++ b/crates/ide-plugin/tests/fixtures/misbehave/dist/plugin.wasm.sources@@ -1 +1 @@-12973c7ca7330fc50eb16718fd769d412401b5a92bd014f4804659e4a272122f+ab066ebab16ba774c2f649a72469bcd25aaa1ffaee77f70ea67395ea26ddee02diff --git a/crates/ide-plugin/tests/fixtures/misbehave/src/lib.rs b/crates/ide-plugin/tests/fixtures/misbehave/src/lib.rsindex 35be7a7a0..6bff08707 100644--- a/crates/ide-plugin/tests/fixtures/misbehave/src/lib.rs+++ b/crates/ide-plugin/tests/fixtures/misbehave/src/lib.rs@@ -5,8 +5,8 @@ wit_bindgen::generate!({inline: "package fixture:misbehave;world misbehave {- include openidea:plugin/[email protected];- export openidea:plugin/[email protected];+ include openidea:plugin/[email protected];+ export openidea:plugin/[email protected];}",path: "../../../../../wit",diff --git a/plugins/README.md b/plugins/README.mdindex 5d5af6511..ed26a2a44 100644--- a/plugins/README.md+++ b/plugins/README.md@@ -37,7 +37,7 @@ sdk/rust/openidea-plugin/ # the Rust SDK (host API, Plugin trait, mock host)crates/ide-plugin/tests/fixtures/ # test plugins: hello, jobs, language-toy, misbehave```-The plugin API is defined in [`wit/`](../wit/) (`openidea:[email protected]`, world+The plugin API is defined in [`wit/`](../wit/) (`openidea:[email protected]`, world`plugin`).## 1. Quick startdiff --git a/plugins/official/ai-completion/dist/plugin.wasm b/plugins/official/ai-completion/dist/plugin.wasmindex dd6b1b115..d6d6e8109 100644Binary files a/plugins/official/ai-completion/dist/plugin.wasm and b/plugins/official/ai-completion/dist/plugin.wasm differdiff --git a/plugins/official/ai-completion/dist/plugin.wasm.sources b/plugins/official/ai-completion/dist/plugin.wasm.sourcesindex 5cd3a6b0d..c52832903 100644--- a/plugins/official/ai-completion/dist/plugin.wasm.sources+++ b/plugins/official/ai-completion/dist/plugin.wasm.sources@@ -1 +1 @@-12c9f58ab05321fa3966a0179c085e2972db278adf20b917b50f30ce048aa67d+f884ceac7f40567a2e817d3b40830a7b0da2f9d5ffa519bf67d4ff667c0f7da0diff --git a/plugins/official/checkstyle/dist/plugin.wasm b/plugins/official/checkstyle/dist/plugin.wasmindex 0c5b399d7..13755f300 100644Binary files a/plugins/official/checkstyle/dist/plugin.wasm and b/plugins/official/checkstyle/dist/plugin.wasm differdiff --git a/plugins/official/checkstyle/dist/plugin.wasm.sources b/plugins/official/checkstyle/dist/plugin.wasm.sourcesindex d07b95aa6..2f0c2d75f 100644--- a/plugins/official/checkstyle/dist/plugin.wasm.sources+++ b/plugins/official/checkstyle/dist/plugin.wasm.sources@@ -1 +1 @@-69273e1ddfd2fff9f49c11d4fbdc60a771f8e3befe440e1623c2ab97469aa250+4c81f468df030724df26a6b57370d8ea4958a3cf8d3a40b23458ed3b2dd32505diff --git a/plugins/official/csv-editor/dist/plugin.wasm b/plugins/official/csv-editor/dist/plugin.wasmindex 2b7172c52..2f19e9b85 100644Binary files a/plugins/official/csv-editor/dist/plugin.wasm and b/plugins/official/csv-editor/dist/plugin.wasm differdiff --git a/plugins/official/csv-editor/dist/plugin.wasm.sources b/plugins/official/csv-editor/dist/plugin.wasm.sourcesindex 25087c64f..6cae26b4b 100644--- a/plugins/official/csv-editor/dist/plugin.wasm.sources+++ b/plugins/official/csv-editor/dist/plugin.wasm.sources@@ -1 +1 @@-74167252b0e306f94eb00ac9b467a5f30c373b9f15e223b21afa71c67c1dec0b+266430921ca7b2271f452c2e8bc4893bd5c1d1516f8081a4ab09950ede9a586bdiff --git a/plugins/official/git-toolbox/dist/plugin.wasm b/plugins/official/git-toolbox/dist/plugin.wasmindex c00455582..5ec79db63 100644Binary files a/plugins/official/git-toolbox/dist/plugin.wasm and b/plugins/official/git-toolbox/dist/plugin.wasm differdiff --git a/plugins/official/git-toolbox/dist/plugin.wasm.sources b/plugins/official/git-toolbox/dist/plugin.wasm.sourcesindex b2bdee8e8..8b8b88c5e 100644--- a/plugins/official/git-toolbox/dist/plugin.wasm.sources+++ b/plugins/official/git-toolbox/dist/plugin.wasm.sources@@ -1 +1 @@-66e7f43eaf7bbadf1c5c817c6ce8da3adca0543ce5e12550440b4039b235581d+91f3f03a81acd298b26c539003a96d0e87a88139a2ec6b9ade85e9ca2e89d1a1diff --git a/plugins/official/graphviz/dist/plugin.wasm b/plugins/official/graphviz/dist/plugin.wasmindex d74e615fe..2ab1612de 100644Binary files a/plugins/official/graphviz/dist/plugin.wasm and b/plugins/official/graphviz/dist/plugin.wasm differdiff --git a/plugins/official/graphviz/dist/plugin.wasm.sources b/plugins/official/graphviz/dist/plugin.wasm.sourcesindex 5c61c4c01..3cc505611 100644--- a/plugins/official/graphviz/dist/plugin.wasm.sources+++ b/plugins/official/graphviz/dist/plugin.wasm.sources@@ -1 +1 @@-04cd70714c6bac560783492b3bd31d22f7056b9d8809df14163be935785dd114+e7cdaeb4f482f698026542c1545f3a1f4734f78f7e9ca0a83cdbc805669c2c7cdiff --git a/plugins/official/key-promoter/dist/plugin.wasm b/plugins/official/key-promoter/dist/plugin.wasmindex 8d431a4f7..3ae5c4261 100644Binary files a/plugins/official/key-promoter/dist/plugin.wasm and b/plugins/official/key-promoter/dist/plugin.wasm differdiff --git a/plugins/official/key-promoter/dist/plugin.wasm.sources b/plugins/official/key-promoter/dist/plugin.wasm.sourcesindex a824dc2ab..13f5a9704 100644--- a/plugins/official/key-promoter/dist/plugin.wasm.sources+++ b/plugins/official/key-promoter/dist/plugin.wasm.sources@@ -1 +1 @@-674f439626f08e931842c0c108a57c899ea38d2b5b2de38debd3b4b46feb5777+ebdcbc36896ab0d545946a95befbc5aeb2b127d615c4754b0077975c53ee0286diff --git a/plugins/official/license-header/dist/plugin.wasm b/plugins/official/license-header/dist/plugin.wasmindex ecdc7cca6..6f41e7414 100644Binary files a/plugins/official/license-header/dist/plugin.wasm and b/plugins/official/license-header/dist/plugin.wasm differdiff --git a/plugins/official/license-header/dist/plugin.wasm.sources b/plugins/official/license-header/dist/plugin.wasm.sourcesindex b89a5e83f..d73677800 100644--- a/plugins/official/license-header/dist/plugin.wasm.sources+++ b/plugins/official/license-header/dist/plugin.wasm.sources@@ -1 +1 @@-ee40771fe778d4af1f762c1512155ea375ee3ed238390c65a5461b077fed6f8b+786fd1808d786dd6abd2671b567db1e37075c08610ac4715c93c0624dbe396d6diff --git a/plugins/official/mybatis/dist/plugin.wasm b/plugins/official/mybatis/dist/plugin.wasmindex 5a9d2d01d..6b0c733a4 100644Binary files a/plugins/official/mybatis/dist/plugin.wasm and b/plugins/official/mybatis/dist/plugin.wasm differdiff --git a/plugins/official/mybatis/dist/plugin.wasm.sources b/plugins/official/mybatis/dist/plugin.wasm.sourcesindex 0d4ec6985..cb12a22ee 100644--- a/plugins/official/mybatis/dist/plugin.wasm.sources+++ b/plugins/official/mybatis/dist/plugin.wasm.sources@@ -1 +1 @@-b9cc6408738acd7a89ff76632d91ec49680c7a5ff6bee292efa77d182003ec25+500b934eafbe02493b8d2b42f779281edd00b899f70ed8732de3edc377ceca63diff --git a/plugins/official/regex-tester/dist/plugin.wasm b/plugins/official/regex-tester/dist/plugin.wasmindex e9cec69d8..b49a3b605 100644Binary files a/plugins/official/regex-tester/dist/plugin.wasm and b/plugins/official/regex-tester/dist/plugin.wasm differdiff --git a/plugins/official/regex-tester/dist/plugin.wasm.sources b/plugins/official/regex-tester/dist/plugin.wasm.sourcesindex a727fdce8..914149fed 100644--- a/plugins/official/regex-tester/dist/plugin.wasm.sources+++ b/plugins/official/regex-tester/dist/plugin.wasm.sources@@ -1 +1 @@-6c9c35547a7ce1c240be83bbb30418a28ab8e2e4034401205e35ec2dee87abbf+2ab43c67c74bd9f8d8ef788b8dca2f6f7288e79ad53663dc51624f36730e52f7diff --git a/plugins/official/solidity/dist/plugin.wasm b/plugins/official/solidity/dist/plugin.wasmindex 7a36721c8..06d84ab25 100644Binary files a/plugins/official/solidity/dist/plugin.wasm and b/plugins/official/solidity/dist/plugin.wasm differdiff --git a/plugins/official/solidity/dist/plugin.wasm.sources b/plugins/official/solidity/dist/plugin.wasm.sourcesindex 937d87db1..65e44bd13 100644--- a/plugins/official/solidity/dist/plugin.wasm.sources+++ b/plugins/official/solidity/dist/plugin.wasm.sources@@ -1 +1 @@-56af2a764333e739d53fb5c8346835b4796cf76611c36b4685a428b49cc4eae2+db60e5fccb72de283a772176052bf659a4ebff11bfb93f634dd513ec878837a7diff --git a/plugins/official/string-tools/dist/plugin.wasm b/plugins/official/string-tools/dist/plugin.wasmindex 204171108..46412ea4c 100644Binary files a/plugins/official/string-tools/dist/plugin.wasm and b/plugins/official/string-tools/dist/plugin.wasm differdiff --git a/plugins/official/string-tools/dist/plugin.wasm.sources b/plugins/official/string-tools/dist/plugin.wasm.sourcesindex a934a4a48..ff540a74c 100644--- a/plugins/official/string-tools/dist/plugin.wasm.sources+++ b/plugins/official/string-tools/dist/plugin.wasm.sources@@ -1 +1 @@-ac745c20866ed959252778116af068d7264187a53df64e2de090522b7ba5b722+fa82a8596bd6505c769c0125ea26cef9af08535b36f650ddc4a353eb50866ceadiff --git a/sdk/rust/openidea-plugin/src/lib.rs b/sdk/rust/openidea-plugin/src/lib.rsindex 1172d78f5..ee9686957 100644--- a/sdk/rust/openidea-plugin/src/lib.rs+++ b/sdk/rust/openidea-plugin/src/lib.rs@@ -89,7 +89,7 @@ pub mod providers_bindings {export_macro_name: "__export_editor_providers_world",default_bindings_module: "openidea_plugin::providers_bindings",with: {- "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::types,+ "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::types,},});}@@ -106,16 +106,16 @@ pub mod views_bindings {export_macro_name: "__export_views_world",default_bindings_module: "openidea_plugin::views_bindings",with: {- "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::types,- "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::workspace,- "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::editor,- "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::invocation,+ "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::types,+ "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::workspace,+ "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::editor,+ "openidea:plugin/[email protected]": crate::bindings::openidea::plugin::invocation,},});}/// The plugin API version this SDK targets.-pub const API_VERSION: &str = "1.1";+pub const API_VERSION: &str = "1.2";/// A plugin. One instance lives as long as the plugin's Wasm instance (until/// it is disabled, crashes or is reclaimed when idle).diff --git a/sdk/rust/openidea-plugin/wit/events.wit b/sdk/rust/openidea-plugin/wit/events.witindex 7da95eac5..0685cdf6f 100644--- a/sdk/rust/openidea-plugin/wit/events.wit+++ b/sdk/rust/openidea-plugin/wit/events.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Workbench events, delivered in batches to `event-handler.handle`.interface events {diff --git a/sdk/rust/openidea-plugin/wit/exports.wit b/sdk/rust/openidea-plugin/wit/exports.witindex 808377432..311a61196 100644--- a/sdk/rust/openidea-plugin/wit/exports.wit+++ b/sdk/rust/openidea-plugin/wit/exports.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];interface lifecycle {use types.{context, error};diff --git a/sdk/rust/openidea-plugin/wit/host.wit b/sdk/rust/openidea-plugin/wit/host.witindex c7ac7f916..484e6c309 100644--- a/sdk/rust/openidea-plugin/wit/host.wit+++ b/sdk/rust/openidea-plugin/wit/host.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Writes to the IDE log, tagged with the plugin id.interface log {diff --git a/sdk/rust/openidea-plugin/wit/io.wit b/sdk/rust/openidea-plugin/wit/io.witindex b93ea079e..89bbaadbf 100644--- a/sdk/rust/openidea-plugin/wit/io.wit+++ b/sdk/rust/openidea-plugin/wit/io.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Problems in files, shown in the editor and the Problems view.interface diagnostics {diff --git a/sdk/rust/openidea-plugin/wit/plugin.wit b/sdk/rust/openidea-plugin/wit/plugin.witindex e9fc0ac85..35e154de1 100644--- a/sdk/rust/openidea-plugin/wit/plugin.wit+++ b/sdk/rust/openidea-plugin/wit/plugin.wit@@ -7,7 +7,7 @@/// 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];+package openidea:[email protected];world plugin {import log;diff --git a/sdk/rust/openidea-plugin/wit/providers.wit b/sdk/rust/openidea-plugin/wit/providers.witindex 17c1123a8..00cb62a73 100644--- a/sdk/rust/openidea-plugin/wit/providers.wit+++ b/sdk/rust/openidea-plugin/wit/providers.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Editor features a plugin provides for the languages it declares under/// `[[contributes.providers]]` (the host calls only declared kinds). They rundiff --git a/sdk/rust/openidea-plugin/wit/types.wit b/sdk/rust/openidea-plugin/wit/types.witindex de35cadf6..9a59769a8 100644--- a/sdk/rust/openidea-plugin/wit/types.wit+++ b/sdk/rust/openidea-plugin/wit/types.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// 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/wit/views.wit b/sdk/rust/openidea-plugin/wit/views.witindex 8a67e222e..74fe9b505 100644--- a/sdk/rust/openidea-plugin/wit/views.wit+++ b/sdk/rust/openidea-plugin/wit/views.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Declarative views: tool windows declared/// under `[[contributes.views]]` and custom editors underdiff --git a/sdk/rust/openidea-plugin/wit/workspace.wit b/sdk/rust/openidea-plugin/wit/workspace.witindex 180040471..4563344d9 100644--- a/sdk/rust/openidea-plugin/wit/workspace.wit+++ b/sdk/rust/openidea-plugin/wit/workspace.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];interface workspace {use types.{error};diff --git a/wit/events.wit b/wit/events.witindex 7da95eac5..0685cdf6f 100644--- a/wit/events.wit+++ b/wit/events.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Workbench events, delivered in batches to `event-handler.handle`.interface events {diff --git a/wit/exports.wit b/wit/exports.witindex 808377432..311a61196 100644--- a/wit/exports.wit+++ b/wit/exports.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];interface lifecycle {use types.{context, error};diff --git a/wit/host.wit b/wit/host.witindex c7ac7f916..484e6c309 100644--- a/wit/host.wit+++ b/wit/host.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Writes to the IDE log, tagged with the plugin id.interface log {diff --git a/wit/io.wit b/wit/io.witindex b93ea079e..89bbaadbf 100644--- a/wit/io.wit+++ b/wit/io.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Problems in files, shown in the editor and the Problems view.interface diagnostics {diff --git a/wit/plugin.wit b/wit/plugin.witindex e9fc0ac85..35e154de1 100644--- a/wit/plugin.wit+++ b/wit/plugin.wit@@ -7,7 +7,7 @@/// 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];+package openidea:[email protected];world plugin {import log;diff --git a/wit/providers.wit b/wit/providers.witindex 17c1123a8..00cb62a73 100644--- a/wit/providers.wit+++ b/wit/providers.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Editor features a plugin provides for the languages it declares under/// `[[contributes.providers]]` (the host calls only declared kinds). They rundiff --git a/wit/types.wit b/wit/types.witindex de35cadf6..9a59769a8 100644--- a/wit/types.wit+++ b/wit/types.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Shared types. Positions are 0-based lines and UTF-16 code unit columns,/// as in the editor and LSP.diff --git a/wit/views.wit b/wit/views.witindex 8a67e222e..74fe9b505 100644--- a/wit/views.wit+++ b/wit/views.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];/// Declarative views: tool windows declared/// under `[[contributes.views]]` and custom editors underdiff --git a/wit/workspace.wit b/wit/workspace.witindex 180040471..4563344d9 100644--- a/wit/workspace.wit+++ b/wit/workspace.wit@@ -1,4 +1,4 @@-package openidea:[email protected];+package openidea:[email protected];interface workspace {use types.{error};