@@ -95,6 +95,15 @@ describe("plugin shape compatibility matrix", () => {
9595 } ,
9696 } ) ;
9797
98+ registerVirtualTestPlugin ( {
99+ registry,
100+ config,
101+ id : "document-extract-test" ,
102+ name : "Document Extract Test" ,
103+ contracts : { documentExtractors : [ "pdf" ] } ,
104+ register ( ) { } ,
105+ } ) ;
106+
98107 const report = {
99108 workspaceDir : "/virtual-workspace" ,
100109 ...registry . registry ,
@@ -130,40 +139,22 @@ describe("plugin shape compatibility matrix", () => {
130139 shape : "plain-capability" ,
131140 capabilityMode : "plain" ,
132141 } ,
142+ {
143+ id : "document-extract-test" ,
144+ shape : "plain-capability" ,
145+ capabilityMode : "plain" ,
146+ } ,
133147 ] ) ;
134148
135149 expect ( inspect [ 0 ] ?. usesLegacyBeforeAgentStart ) . toBe ( true ) ;
136150 expect ( inspect . map ( ( entry ) => entry . capabilities . map ( ( capability ) => capability . kind ) ) ) . toEqual (
137- [ [ ] , [ "text-inference" ] , [ "text-inference" , "web-search" ] , [ "channel" ] ] ,
151+ [
152+ [ ] ,
153+ [ "text-inference" ] ,
154+ [ "text-inference" , "web-search" ] ,
155+ [ "channel" ] ,
156+ [ "document-extractors" ] ,
157+ ] ,
138158 ) ;
139159 } ) ;
140-
141- it ( "recognizes document-extractors contract as a capability kind" , ( ) => {
142- const { config, registry } = createPluginRegistryFixture ( ) ;
143-
144- registerVirtualTestPlugin ( {
145- registry,
146- config,
147- id : "document-extract-test" ,
148- name : "Document Extract Test" ,
149- contracts : {
150- documentExtractors : [ "pdf" , "docx" ] ,
151- } ,
152- register ( ) { } ,
153- } ) ;
154-
155- const report = {
156- workspaceDir : "/virtual-workspace" ,
157- ...registry . registry ,
158- } ;
159- const plugin = report . plugins . find ( ( p ) => p . id === "document-extract-test" ) ! ;
160- const summary = buildPluginShapeSummary ( { plugin, report } ) ;
161-
162- expect ( summary . shape ) . toBe ( "plain-capability" ) ;
163- expect ( summary . capabilityMode ) . toBe ( "plain" ) ;
164- expect ( summary . capabilityCount ) . toBe ( 1 ) ;
165- expect ( summary . capabilities ) . toEqual ( [
166- { kind : "document-extractors" , ids : [ "pdf" , "docx" ] } ,
167- ] ) ;
168- } ) ;
169160} ) ;
0 commit comments