@@ -6,8 +6,10 @@ import {
66 DEFAULT_TARGET ,
77 SkillArchitecture ,
88 TARGETS ,
9+ buildTargetFor ,
910 defineArchitectures ,
1011 enabledArchitectureLabels ,
12+ requireTargetPlacement ,
1113} from "./architecture-registry" ;
1214import type {
1315 ArchitectureDefinition ,
@@ -49,11 +51,28 @@ test("the manifest derives architecture validation and target availability", ()
4951 ) ;
5052 assert . equal ( DEFAULT_TARGET . architecture , "scout" ) ;
5153 assert . equal ( DEFAULT_TARGET . kind , "skill" ) ;
54+ assert . equal (
55+ buildTargetFor ( DEFAULT_TARGET . architecture , "automation" ) . installTargetLabel ,
56+ "Scout" ,
57+ ) ;
5258
5359 assert . deepEqual ( enabledArchitectureLabels ( "skill" ) , [ "Scout" , "Cowork" ] ) ;
5460 assert . deepEqual ( enabledArchitectureLabels ( "automation" ) , [ "Scout" ] ) ;
5561} ) ;
5662
63+ test ( "target placements are enforced from the manifest" , ( ) => {
64+ assert . equal ( requireTargetPlacement ( "scout" , "skill" , "install" ) . architecture , "scout" ) ;
65+ assert . equal ( requireTargetPlacement ( "cowork" , "skill" , "export" ) . architecture , "cowork" ) ;
66+ assert . throws (
67+ ( ) => requireTargetPlacement ( "cowork" , "skill" , "install" ) ,
68+ / A r c h i t e c t u r e " c o w o r k " t a r g e t " s k i l l " d o e s n o t s u p p o r t " i n s t a l l " p l a c e m e n t / ,
69+ ) ;
70+ assert . throws (
71+ ( ) => requireTargetPlacement ( "copilot-studio" , "skill" , "export" ) ,
72+ / A r c h i t e c t u r e " c o p i l o t - s t u d i o " t a r g e t " s k i l l " i s n o t e n a b l e d / ,
73+ ) ;
74+ } ) ;
75+
5776test ( "architecture definitions reject invalid registry shapes" , ( ) => {
5877 const skill = {
5978 kind : "skill" as const ,
0 commit comments