From 3eb14059c9b55bdd48a6ddc7b0f0a6df8279ad4b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 16:30:25 +0000 Subject: [PATCH] docs(core): list objectql in Plugin.type's TSDoc enumeration (#13762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plugin.type is typed `string`, so the TSDoc is the only enumeration a plugin author reading the interface ever sees. It listed seven values; the declared set in @objectstack/spec is eight — CORE_PLUGIN_TYPES carries `objectql`, the type packages/objectql/src/plugin.ts declares on the engine plugin. Also corrects the same omission in the hand-written transcription of this interface in content/docs/plugins/anatomy.mdx. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01F3jdziLbAPGeceVNmSox5L --- .changeset/plugin-type-tsdoc-objectql.md | 18 ++++++++++++++++++ content/docs/plugins/anatomy.mdx | 2 +- packages/core/src/types.ts | 8 +++++++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .changeset/plugin-type-tsdoc-objectql.md diff --git a/.changeset/plugin-type-tsdoc-objectql.md b/.changeset/plugin-type-tsdoc-objectql.md new file mode 100644 index 0000000000..07ec42fac1 --- /dev/null +++ b/.changeset/plugin-type-tsdoc-objectql.md @@ -0,0 +1,18 @@ +--- +"@objectstack/core": patch +--- + +docs(core): correct `Plugin.type`'s TSDoc enumeration — it omitted `objectql` (#13762) + +`Plugin.type` is typed `string` in `@objectstack/core`, so its TSDoc is the only +enumeration a plugin author reading the interface ever sees; nothing type-checks +them against it. That comment listed seven values while the declared set is +eight: `PluginSchema.type` in `@objectstack/spec` is +`z.enum(['standard', ...CORE_PLUGIN_TYPES])`, and `CORE_PLUGIN_TYPES` carries +`objectql` — the type `packages/objectql/src/plugin.ts` declares on the engine +plugin essentially every runtime loads first. + +The comment now lists all eight and names `CORE_PLUGIN_TYPES` as the +authoritative set. The same omission in the hand-written +`content/docs/plugins/anatomy.mdx` transcription of this interface is corrected +in the same change. diff --git a/content/docs/plugins/anatomy.mdx b/content/docs/plugins/anatomy.mdx index 5dd05e46c0..3a63c34a47 100644 --- a/content/docs/plugins/anatomy.mdx +++ b/content/docs/plugins/anatomy.mdx @@ -119,7 +119,7 @@ export interface Plugin { /** * Plugin Type (Optional) - * One of: standard, ui, driver, server, app, theme, agent. + * One of: standard, ui, driver, server, app, theme, agent, objectql. * @default 'standard' */ type?: string; diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 68238876fd..bff73a9ee5 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -108,7 +108,13 @@ export interface Plugin { version?: string; /** - * Plugin type (standard, ui, driver, server, app, theme, agent) + * Plugin type (standard, ui, driver, server, app, theme, agent, objectql) + * + * Authoritative set: `CORE_PLUGIN_TYPES` in `@objectstack/spec` + * (`kernel/plugin.zod.ts`), which `PluginSchema.type` enumerates as + * `z.enum(['standard', ...CORE_PLUGIN_TYPES])`. This field is typed + * `string`, so nothing type-checks an author against the list above — + * keep the two in step when the declared set changes. * @default 'standard' */ type?: string;