1616 * (`validateAuthoredDocument`, objectui#5250), whose root is the strict twin of
1717 * `AnyComponentSchema` — a union discriminated on `type`. A registered type
1818 * with no arm in that union is refused with one `invalid_union` issue at
19- * `['type']`, whatever else the document says: `ai-form-assist`, which
20- * `packages /plugin-ai/README.md` teaches , was one of them. The mirror-parity
19+ * `['type']`, whatever else the document says: `ai-form-assist`, which the
20+ * since-retired `@object-ui /plugin-ai` README taught , was one of them. The mirror-parity
2121 * ratchet in `@object-ui/types` counts declaration↔mirror PAIRS and the keys
2222 * inside them; a registered type with no mirror at all is in neither, so
2323 * nothing counted this family until this file.
@@ -379,7 +379,7 @@ describe('registered component types refused at `type` — a ratchet (objectui#1
379379 // was 200 until objectui#10859 batch 8 unregistered thirty bare keys.)
380380 expect ( BARE_KEYS . length ) . toBeGreaterThan ( 150 ) ;
381381 expect ( BARE_KEYS ) . toContain ( 'timeline' ) ;
382- expect ( BARE_KEYS ) . toContain ( 'ai-form-assist ' ) ;
382+ expect ( BARE_KEYS ) . toContain ( 'pivot ' ) ;
383383 } ) ;
384384
385385 it ( 'tells a claimed type from an unclaimed one — both instrument controls fire' , ( ) => {
@@ -392,11 +392,24 @@ describe('registered component types refused at `type` — a ratchet (objectui#1
392392 expect ( refusedAtType ( 'no-such-component-10859' ) ) . toBe ( true ) ;
393393 } ) ;
394394
395- it ( 'counts the three plugin-ai keys as armed (objectui#10859 batch 1)' , ( ) => {
395+ it ( 'refuses the three plugin-ai keys BY NAME at `type` — the package retired and their arms became refusals (objectstack#25921)' , ( ) => {
396+ // objectui#10859 batch 1 armed them; the registrations left with
397+ // `@object-ui/plugin-ai`, so registration and arm leaving in one change move
398+ // neither count. Each arm stays as `retiredNodeType()`'s refusal, the
399+ // `cloud:plan-status` shape below.
396400 for ( const key of [ 'ai-form-assist' , 'ai-recommendations' , 'nl-query' ] ) {
397- expect ( BARE_KEYS , key ) . toContain ( key ) ;
401+ expect ( BARE_KEYS , key ) . not . toContain ( key ) ;
402+ const result = validateAuthoredDocument ( { type : key } ) ;
403+ expect ( result . success , key ) . toBe ( false ) ;
404+ const named = ( result . success ? [ ] : result . error . issues ) . filter (
405+ ( issue ) => issue . code === 'custom' && issue . path . length === 1 && issue . path [ 0 ] === 'type' ,
406+ ) ;
407+ expect ( named , key ) . toHaveLength ( 1 ) ;
408+ expect ( named [ 0 ] ?. message , key ) . toContain ( '@object-ui/plugin-ai' ) ;
398409 expect ( refusedAtType ( key ) , key ) . toBe ( false ) ;
399410 }
411+ // Control: an unknown bare literal still takes the generic path.
412+ expect ( refusedAtType ( 'ai-no-such-node-25921' ) ) . toBe ( true ) ;
400413 } ) ;
401414
402415 it ( 'counts the three keys batch 2 armed (objectui#10859 batch 2)' , ( ) => {
@@ -712,7 +725,6 @@ describe('registered NAMESPACED component types refused at `type` — a ratchet
712725
713726/** Rooted on this file, never on `process.cwd()`. */
714727const HERE = dirname ( fileURLToPath ( import . meta. url ) ) ;
715- const PLUGIN_AI_README = join ( HERE , '..' , '..' , '..' , 'plugin-ai' , 'README.md' ) ;
716728const QUICK_START = join ( HERE , '..' , '..' , '..' , '..' , 'content' , 'docs' , 'guide' , 'quick-start.md' ) ;
717729
718730/** See `validate-root-path-line.test.ts` — the escape byte is never spelled. */
@@ -750,26 +762,6 @@ afterEach(() => {
750762 rmSync ( dir , { recursive : true , force : true } ) ;
751763} ) ;
752764
753- describe ( 'objectui validate — the plugin-ai README document (objectui#10859)' , ( ) => {
754- it ( 'validates the "Schema-Driven Usage" `ai-form-assist` document' , async ( ) => {
755- const readme = readFileSync ( PLUGIN_AI_README , 'utf8' ) ;
756- const section = readme . slice ( readme . indexOf ( '## Schema-Driven Usage' ) ) ;
757- const fence = / ` ` ` j s o n \n ( [ \s \S ] * ?) \n ` ` ` / . exec ( section ) ;
758- expect ( fence , 'no ```json fence under "## Schema-Driven Usage"' ) . not . toBeNull ( ) ;
759- const file = join ( dir , 'ai-form-assist.json' ) ;
760- writeFileSync ( file , ( fence as RegExpExecArray ) [ 1 ] , 'utf-8' ) ;
761- // Lit control on the extraction: it is the taught node.
762- expect ( JSON . parse ( ( fence as RegExpExecArray ) [ 1 ] ) . type ) . toBe ( 'ai-form-assist' ) ;
763-
764- await validate ( file ) ;
765-
766- const text = out . join ( '\n' ) . replace ( ANSI , '' ) ;
767- expect ( text ) . not . toContain ( 'Schema validation failed' ) ;
768- expect ( text ) . toContain ( 'Schema is valid' ) ;
769- expect ( exitCodes ) . toEqual ( [ 0 ] ) ;
770- } ) ;
771- } ) ;
772-
773765/* ── End to end: a page of public blocks through `objectui validate` ─────── */
774766
775767describe ( 'objectui validate — a page built from ADR-0080 public blocks (objectui#10872)' , ( ) => {
0 commit comments