@@ -445,7 +445,7 @@ or removing a command fails until the table changes in the same commit.
445445| `ai.inlineEdit.plan` | Plan a credential-free inline edit request |
446446| `ai.inlineEdit.decode` | Decode the replacement text of an inline edit response |
447447| `plugins.declarative.validate` | Validate and normalize a declarative plugin manifest |
448- | `plugins.nativeUI.validateData ` | Validate native plugin UI data with declaration identity and node budgets |
448+ | `plugins.ui.applyResult ` | Check a backend result for a plugin view and return the whole view to draw |
449449| `plugins.web.open` | Register a plugin page for a web tool window |
450450| `plugins.web.close` | Forget a plugin page and lists its calls to cancel |
451451| `plugins.web.resource` | Decide how a plugin page request is served |
@@ -4953,6 +4953,12 @@ Success returns `{ status: "ok", state }`. The state contains:
49534953 the manifest's section title (the empty heading first), so a translation
49544954 changes only the shown `title`. References are zero-based indices
49554955 into `rows` and `actions`; declaration order is retained within each section.
4956+ - `region`: present when the plugin placed a settings region on its own
4957+ Settings tab: `{ id, keywords, view? }`. `keywords` are the manifest
4958+ keywords followed by the translated ones that differ, so both languages
4959+ find the page. `view` is `{ function }`; the host calls it and draws each
4960+ result through `plugins.ui.applyResult`. Each entry of `pages` carries the
4961+ region placed on that page in the same shape.
49564962- `editors`: `{ global, project }`, each an array in exactly `rows` order.
49574963 Every entry contains `value`, `resetValue`, `source`, `editable`, `overridden`
49584964 and `invalidStored`, plus `input`/`resetInput` native-control projections.
@@ -6224,21 +6230,33 @@ registered in Core for their lifetime:
62246230 `build.runChanged` and returns `{ message }`, `null` when the page is
62256231 closed or the progress is for a call that ended or has no page ID.
62266232
6227- ### Native plugin UI data
6228-
6229- `plugins.nativeUI.validateData` accepts `{ ui, data }`, where `ui` is the
6230- validated native declaration (`schemaVersion` 0) and `data` is a provider's `{ nodes }`
6231- reply. It returns `{ status: "ok", nodes }` or
6232- `{ status: "rejected", error: { code: "plugin.ui.invalidData", message } }`.
6233- Malformed envelopes remain Core `invalid_request` failures. The operation uses
6234- the same identity, literal label, nesting and node budgets as manifest validation
6235- and rejects data above 1 MiB. Form declarations validate bounded input/select/checkbox
6236- controls (including search/editor/segmented/stepper), typed scalar defaults, choices,
6237- info, button action references/width policies and onCommit references; form source replies
6238- require empty nodes. Hosts inject this typed operation into their
6239- presentation feature; views never call the C ABI. Windows can reuse validation
6240- when it later adds a native renderer; Core support does not make Windows
6241- advertise native plugin content.
6233+ ### Plugin views
6234+
6235+ `plugins.ui.applyResult` accepts `{ manifest, surface, view?, result }`.
6236+ `surface` names exactly one declared place that draws a view:
6237+ `{ toolWindowID }` for a tool window whose body is `view`, or
6238+ `{ settingRegionID }` for a settings region with a `view`. `view` is the
6239+ view the host drew last and is absent before the first result. `result` is
6240+ what the plugin's view function returned: `{ view }` (a whole view),
6241+ `{ patches }` (edits to `view`) or `{}` (nothing changed).
6242+
6243+ It returns `{ status: "ok", view: { view, changed } }`, where `view` is the
6244+ complete checked view to draw and `changed` tells whether it differs from
6245+ the one drawn, or `{ status: "rejected", error: { code:
6246+ "plugin.ui.invalidView", message, field } }`, where `field` is the JSON path
6247+ of the first problem (`result.view[0].type`, `result.patches[1].id`, or
6248+ `view[...]` for a patched view). After a refusal the host keeps drawing the
6249+ previous view. Malformed envelopes remain Core `invalid_request` failures.
6250+
6251+ Core checks the node vocabulary, the budgets, which nodes each surface
6252+ allows, and every reference to the manifest: bound controls and setting rows
6253+ name declared settings of a type the control edits, setting-action buttons
6254+ name declared setting actions, and tool rows name tools the plugin defines
6255+ or requires. Patches apply in order to a copy of `view`; a patch whose target
6256+ is missing refuses the whole result. Hosts call this operation for every
6257+ result and only render; they keep no second validator or patch engine. The
6258+ vocabulary and budgets are in the plugin contract README and
6259+ `plugin-ui.schema.json`.
62426260
62436261### Workspace indexing policy
62446262
@@ -7186,16 +7204,23 @@ This is an internal desktop command, not a new public plugin host method.
71867204
71877205Internal desktop commands reuse the validated settings manifest. They do not
71887206add plugin RPCs or admit capabilities. `plugins.settings.catalog` accepts up to
7189- 64 `{manifest, owner: {pluginID, version}, enabled}` records. It validates all
7207+ 64 `{manifest, owner: {pluginID, version}, enabled, localizations?}` records
7208+ and an optional `language`. It validates all
71907209identities, rejects duplicates and returns deterministic `pages` (up to 512),
7191- with stable `key`, `kind` (`language` or `buildSystem`), opaque `id`, display
7192- `title`, and plugin-ID ordered `contributors` (`pluginID`, `version`, `title`,
7193- `sections`). Sections reference indices in the complete settingsState rows and
7194- actions. Only enabled contributors create pages; action-only pages are valid.
7210+ with stable `key`, `kind` (`language`, `buildSystem` or `compiler`), opaque
7211+ `id`, display `title`, and plugin-ID ordered `contributors` (`pluginID`,
7212+ `version`, `title`, `sections`, `region?`, `localization?`). Sections reference
7213+ indices in the complete settingsState rows and actions. Only enabled
7214+ contributors create pages; action-only and region-only pages are valid.
71957215Names come from enabled language/build declarations, with opaque ID fallback.
7196- `settingsState.pages` supplies the same per-plugin placement projections, with
7197- section titles translated when the state is. Catalog contributor sections keep
7198- the manifest headings.
7216+ `settingsState.pages` supplies the same per-plugin placement projections.
7217+ `region` is the settings region the contributor placed on the page
7218+ (`{ id, keywords, view? }`, as in settingsState); hosts add its keywords to
7219+ the page's search terms. With `language`, each record's `localizations`
7220+ follows the settingsState rules: section titles are translated, translated
7221+ region keywords are appended, and `localization` is that plugin's report.
7222+ Without `language`, sections keep the manifest headings and no report is
7223+ returned.
71997224
72007225`plugins.settings.navigation` accepts at most 576 `items` (512 contributed pages plus 64 host entries), up to three levels
72017226deep, with stable `id`, `title`, nullable `parent`, `group`, `expanded` and optional `keywords`, plus `query` (at
0 commit comments