Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/adr/0026-client-ui-plugin-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ A UI plugin is an `.osplugin` with:
> `ManifestSchema` and `PluginSchema` refuse `ui-plugin`; the example above and
> §3.7 use `ui`.

> **Note (2026-09-23, #16140) — the example above is the proposed shape.** It
> is kept as this ADR proposes it, and the current `ManifestSchema`
> (`packages/spec/src/kernel/manifest.zod.ts#ManifestSchema`) refuses it as
> written. What it proposes beyond that schema: `runtime: "ui"` (the
> `PluginRuntimeSchema` enum is `node` / `sandbox` / `worker`);
> `engines.objectui` and `engines.react`; the top-level `ui` block; and
> `permissions.data` and `permissions.navigation`. It also omits `name`, which
> `ManifestSchema` requires. The rule for pasteable ADR examples is read this
> way: an example validates against the current schema, or carries a caption
> that names the keys it proposes beyond it.

`extends` reuses the existing `capabilities.extensionPoints`/`extensions` seam;
`ui.shared` lists singletons the host injects (never bundled — same externalize
rule as ADR-0025 §3.3, applied to browser deps).
Expand Down
10 changes: 8 additions & 2 deletions docs/design/plugin-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,17 @@ Compiled manifest adds four blocks to the existing `ObjectStackManifest`:

### 4.2 UI plugin (`runtime: 'ui'` — ADR-0026 §3.1)

Same `.osplugin` envelope, but `type: ui-plugin`, `dist` is a **browser ESM
Same `.osplugin` envelope, but `type: ui`, `dist` is a **browser ESM
bundle** default-exporting a `register(host)` function, and the manifest carries a
`ui` block (`entry`, `shared` singletons, `extends` extension points) plus
client-scoped `permissions` (data read/write via SDK, network → CSP, navigation).

> **Note (2026-09-23, #16140).** This document originally spelled the UI plugin
> package type `ui-plugin`. The closed set of plugin types (`CORE_PLUGIN_TYPES`,
> `packages/spec/src/kernel/plugin.zod.ts`) adopted `ui`, and both
> `ManifestSchema` and `PluginSchema` refuse `ui-plugin`; this section and
> worked example C in §10 use `ui`.

### 4.3 Packaging strategies (default: bundled)

- **Bundled (default).** `tsup --noExternal` bundles third-party JS into `dist`;
Expand Down Expand Up @@ -274,7 +280,7 @@ the **App**; the connector rides inside it. Stripe API key → KV secret-ref at
install.

**C. Community "fancy gauge" widget (UI, U1 default).**
`type: ui-plugin`, `runtime: ui`, unverified publisher → **U1 iframe** only, CSP
`type: ui`, `runtime: ui`, unverified publisher → **U1 iframe** only, CSP
`connect-src` empty, data via scoped SDK (RLS-gated). Bundled into whatever App's
dashboard uses it, or operator-enabled org-wide.

Expand Down
Loading