Skip to content

Commit 5eb24f8

Browse files
claude[bot]claude
andauthored
spec: name the live ui plugin type in the PluginSchema describe strings (#15639)
* spec: name the live `ui` plugin type in the plugin describe strings `PluginSchema.type` is `z.enum(['standard', ...CORE_PLUGIN_TYPES])` and `CORE_PLUGIN_TYPES` spells the frontend member `ui`. The `staticPath`, `slug` and `default` describe strings still named `ui-plugin`, a value the same schema refuses two lines above — and they read as instructions ("Required for type=..."), so an author or agent following them writes a value that is rejected. Also updates the two `content/docs/plugins/anatomy.mdx` prose sites that used the retired spelling; the page's own section heading already reads `### 2. UI Plugin (\`ui\`)`. No accept/reject behaviour changes: `type: 'ui-plugin'` is refused before and after, `type: 'ui'` accepted before and after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4138K1EG7kQ81FNba5Kp4 * spec: regenerate the kernel/plugin reference page + changeset `content/docs/references/kernel/plugin.mdx` is auto-generated from `packages/spec/src/kernel/plugin.zod.ts` (banner: "AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate"), so the three table rows follow the describe strings. Regenerated with `pnpm --filter @objectstack/spec gen:schema && gen:docs` — never hand-edited. `authorable-surface.base.json` was deliberately NOT re-anchored: the build prints re-anchoring as its own reviewed act (`gen:authorable-surface-base`), not a side effect of this run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4138K1EG7kQ81FNba5Kp4 --------- Co-authored-by: claude[bot] <claude[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent fa125f3 commit 5eb24f8

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
The `PluginSchema` describe strings for `staticPath`, `slug` and `default` now name `ui`, the plugin type the enum actually accepts.
6+
7+
`PluginSchema.type` is `z.enum(['standard', ...CORE_PLUGIN_TYPES])`, and `CORE_PLUGIN_TYPES` spells the frontend member `ui`. The three describe strings beside it still named `ui-plugin` — a value the same schema refuses two lines above. They are not merely stale: they read as instructions ("Required for `type="ui-plugin"`"), so an author or an agent following the field's own documentation writes a value that is then rejected, with the correct spelling nowhere in the sentence that sent them there.
8+
9+
The strings now read `(Required for type="ui")`, `(Required for type="ui")` and `(Only one "ui" plugin can be default)`. Because these describes compile into the published JSON Schema and into the generated reference page, the correction reaches every consumer that reads field documentation out of the spec rather than out of the source file — the generated `content/docs/references/kernel/plugin.mdx` table now agrees with the `type` row printed directly above it, which previously listed `'ui'` among the accepted members while the three rows underneath told the reader to write `ui-plugin`.
10+
11+
No accept/reject behaviour moves: `type: 'ui-plugin'` is refused before and after, `type: 'ui'` is accepted before and after, and no key is added, renamed or removed. The closed-set pin tests that name `ui-plugin` as a non-member are deliberately unchanged — they are the reason this correction is provable.

content/docs/plugins/anatomy.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ObjectStack uses `type` discrimination to optimize runtime behavior, allowing th
7777
* **Use Cases:** CRM, Project Management, ERP modules.
7878
* **Behavior:**
7979
* Contains rich metadata (Objects, Flows, Reports).
80-
* May bundle `ui-plugin` references for custom widgets.
80+
* May bundle `ui` plugin references for custom widgets.
8181
* Focuses on business logic rather than infrastructure.
8282

8383
### 4. Driver Plugin (`driver`)
@@ -93,7 +93,7 @@ ObjectStack uses `type` discrimination to optimize runtime behavior, allowing th
9393
### 6. Theme Plugin (`theme`)
9494
* **Role:** UI Appearance.
9595
* **Use Cases:** Dark Mode, Enterprise Branding.
96-
* **Behavior:** Provides CSS tokens and asset overrides to `ui-plugin`s.
96+
* **Behavior:** Provides CSS tokens and asset overrides to `ui` plugins.
9797

9898
### 7. Agent Plugin (`agent`)
9999
* **Role:** AI Capability.

content/docs/references/kernel/plugin.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const result = PluginSchema.parse(data);
2828
| :--- | :--- | :--- | :--- |
2929
| **id** | `string` | optional | Unique Plugin ID (e.g. com.example.crm) |
3030
| **type** | `Enum<'standard' \| 'ui' \| 'driver' \| 'server' \| 'app' \| 'theme' \| 'agent' \| 'objectql'>` | optional (default: `"standard"`) | Plugin Type categorization for runtime behavior |
31-
| **staticPath** | `string` | optional | Absolute path to static assets (Required for type="ui-plugin") |
32-
| **slug** | `string` | optional | URL path segment (Required for type="ui-plugin") |
33-
| **default** | `boolean` | optional | Serve at root path (Only one "ui-plugin" can be default) |
31+
| **staticPath** | `string` | optional | Absolute path to static assets (Required for type="ui") |
32+
| **slug** | `string` | optional | URL path segment (Required for type="ui") |
33+
| **default** | `boolean` | optional | Serve at root path (Only one "ui" plugin can be default) |
3434
| **version** | `string` | optional | Semantic Version |
3535
| **description** | `string` | optional | |
3636
| **author** | `string` | optional | |

packages/spec/src/kernel/plugin.zod.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ export const PluginSchema = lazySchema(() => z.object({
123123
...CORE_PLUGIN_TYPES
124124
]).default('standard').optional().describe('Plugin Type categorization for runtime behavior'),
125125

126-
staticPath: z.string().optional().describe('Absolute path to static assets (Required for type="ui-plugin")'),
127-
slug: z.string().regex(/^[a-z0-9-_]+$/).optional().describe('URL path segment (Required for type="ui-plugin")'),
128-
default: z.boolean().optional().describe('Serve at root path (Only one "ui-plugin" can be default)'),
126+
staticPath: z.string().optional().describe('Absolute path to static assets (Required for type="ui")'),
127+
slug: z.string().regex(/^[a-z0-9-_]+$/).optional().describe('URL path segment (Required for type="ui")'),
128+
default: z.boolean().optional().describe('Serve at root path (Only one "ui" plugin can be default)'),
129129

130130
version: z.string().regex(/^\d+\.\d+\.\d+$/).optional().describe('Semantic Version'),
131131
description: z.string().optional(),

0 commit comments

Comments
 (0)