Commit 43fc039
domains/ui.ts serves GET /ui/view/:object off the `protocol` service and 503s
without it; the `ui` core-service slot never enters that decision, and nothing
in the platform registers a `ui` service — plugin-dev's shapeless placeholder
was its only occupant ever, and ADR-0115 (#4137) retired it. Gating routes.ui
on slot presence was therefore wrong in both directions: a dev boot with the
placeholder but no protocol advertised a route that could only 503, and every
boot without a placeholder — production always, and all dev boots post-
ADR-0115 — hid a route that serves fine.
routes.ui and services.ui now gate on `typeof protocol?.getUiView ===
'function'` — the domain handler's own guard, byte for byte, the same rule the
mcp advertisement follows (same predicate ⇒ same answer). services.ui reports
the serving implementation (provider metadata-protocol, honoring any
__serviceInfo it declares), and the unavailable message names the actual
remedy — register MetadataPlugin (@objectstack/metadata-protocol) — instead of
svcUnavailable's "install a ui plugin", which names a plugin that does not
exist.
This PR originally also carried plugin-dev's incremental data/ui stub
retirements; ADR-0115 (#4137) retired the whole stub table while the branch
was open, so that half resolved to main's state and the ADR-0076 annotation
now closes out pointing at ADR-0115. The changeset is a runtime-only patch.
The one surviving fabricator is outside plugin-dev: the dispatcher's /auth
mock fallback, #4113.
Tests: with a protocol, /ui is advertised and really serves (getUiView called
with the parsed object/type); without one it is not advertised and the remedy
is named; a ui-slot occupant with no protocol — the old dev-boot shape — stays
un-advertised AND 503s (the slot buys no route); a wrong-shaped protocol
mirrors the domain. runtime 936 / plugin-dev 10 / metadata-protocol 110 pass;
build 71/71; eslint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent b4be309 commit 43fc039
4 files changed
Lines changed: 113 additions & 5 deletions
File tree
- .changeset
- docs/adr
- packages/runtime/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2715 | 2715 | | |
2716 | 2716 | | |
2717 | 2717 | | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
2718 | 2792 | | |
2719 | 2793 | | |
2720 | 2794 | | |
| |||
0 commit comments