Skip to content

[finding] Plugin.type's TSDoc in packages/core/src/types.ts under-enumerates the value set — omits objectql, which ObjectQLPlugin actually declares #13762

Description

@huangyiirene

Found incidentally while sweeping skills/objectstack-platform/** for the published-skills factual sweep (member card #13747, program #13658). Out of that card's file surface, so recorded here rather than fixed there.

The drift

packages/core/src/types.ts documents Plugin.type as:

    /**
     * Plugin type (standard, ui, driver, server, app, theme, agent)
     * @default 'standard'
     */
    type?: string;

Seven values. The declared value set is eight: packages/spec/src/kernel/plugin.zod.ts builds PluginSchema.type as z.enum(['standard', ...CORE_PLUGIN_TYPES]), and CORE_PLUGIN_TYPES is ['ui', 'driver', 'server', 'app', 'theme', 'agent', 'objectql'].

objectql is not a spare slot. packages/objectql/src/plugin.ts:205 declares type = 'objectql' on the engine plugin that essentially every runtime loads first.

Why it is worth a card rather than a shrug

The field is typed string in @objectstack/core, so the comment is the only enumeration a plugin author reading the interface ever sees — nothing type-checks them against it. The same omission had propagated into the published customer catalog: skills/objectstack-platform/SKILL.md listed five of the eight and rules/plugin-lifecycle.md listed seven, each drifting from the schema independently. Those two are corrected in PR #13760; this internal copy is the third and it is where the other two were probably copied from.

This is the mechanical class #13678 exists for — a named-identifier set that drifts silently because nothing walks it. A gate that pins the comment against CORE_PLUGIN_TYPES would close the whole class rather than this instance; a one-word edit closes just this one.

How it was settled

Read against the implementation, not against another document: the enum literal in plugin.zod.ts, and the live type = 'objectql' assignment in the objectql plugin.

No assignee — filed for triage.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions