@@ -52,7 +52,15 @@ type StoredRow = {
5252 readonly id : string ;
5353 readonly name : string ;
5454 readonly providerId : string ;
55- readonly metadata : { readonly mcp : { readonly handle : string ; readonly name : string ; readonly url : string ; readonly auth : string ; readonly tools : readonly never [ ] } } ;
55+ readonly metadata : {
56+ readonly mcp : {
57+ readonly handle : string ;
58+ readonly name : string ;
59+ readonly url : string ;
60+ readonly auth : string ;
61+ readonly tools : readonly never [ ] ;
62+ } ;
63+ } ;
5664} ;
5765
5866function exaRow ( credentialId : string , providerId : string ) : StoredRow {
@@ -116,7 +124,8 @@ function workspaceCatalogFetch(opts: {
116124 const method = init ?. method ?? "GET" ;
117125 calls . push ( { method, path } ) ;
118126
119- if ( path === `/api/tenants/${ WORKBENCH_ID } ` ) return tenantDetailResponse ( WORKBENCH_ID , WORKSPACE_ID ) ;
127+ if ( path === `/api/tenants/${ WORKBENCH_ID } ` )
128+ return tenantDetailResponse ( WORKBENCH_ID , WORKSPACE_ID ) ;
120129 if ( path === `/api/tenants/${ WORKSPACE_ID } ` ) return tenantDetailResponse ( WORKSPACE_ID , null ) ;
121130 if ( path === `/api/tenants/${ WORKBENCH_ID } /providers` && method === "GET" ) {
122131 return Response . json ( {
@@ -188,7 +197,10 @@ function workspaceCatalogFetch(opts: {
188197 try {
189198 const parsed = JSON . parse ( patchText ) as { metadata ?: StoredRow [ "metadata" ] } ;
190199 if ( parsed . metadata !== undefined ) {
191- workspaceCredentials . splice ( workspaceCredentials . indexOf ( row ) , 1 , { ...row , metadata : parsed . metadata } ) ;
200+ workspaceCredentials . splice ( workspaceCredentials . indexOf ( row ) , 1 , {
201+ ...row ,
202+ metadata : parsed . metadata ,
203+ } ) ;
192204 }
193205 } catch {
194206 // Keep the placeholder row; discovery recorded nothing new.
@@ -253,9 +265,9 @@ describe("ensureBuiltInMcpServers", () => {
253265 expect ( servers . map ( ( server ) => server . handle ) ) . toContain ( EXA_MCP_SERVER . handle ) ;
254266 // No re-add: the workspace already carries Exa, so the workbench twin is
255267 // just dropped.
256- expect (
257- calls . some ( ( call ) => call . method === "POST" && call . path . endsWith ( "/credentials" ) ) ,
258- ) . toBe ( false ) ;
268+ expect ( calls . some ( ( call ) => call . method === "POST" && call . path . endsWith ( "/credentials" ) ) ) . toBe (
269+ false ,
270+ ) ;
259271 expect (
260272 calls . some (
261273 ( call ) =>
@@ -272,9 +284,7 @@ describe("ensureBuiltInMcpServers", () => {
272284 } ) ;
273285 await ensureBuiltInMcpServers ( WORKBENCH_ID , fetchImpl ) ;
274286 expect (
275- calls . some (
276- ( call ) => call . method === "DELETE" && call . path . includes ( "/credentials/c-linear" ) ,
277- ) ,
287+ calls . some ( ( call ) => call . method === "DELETE" && call . path . includes ( "/credentials/c-linear" ) ) ,
278288 ) . toBe ( false ) ;
279289 } ) ;
280290
@@ -301,7 +311,8 @@ describe("ensureBuiltInMcpServers", () => {
301311 expect ( second . map ( ( server ) => server . handle ) ) . toContain ( EXA_MCP_SERVER . handle ) ;
302312 expect (
303313 calls . filter (
304- ( call ) => call . method === "POST" && call . path === `/api/tenants/${ WORKSPACE_ID } /credentials` ,
314+ ( call ) =>
315+ call . method === "POST" && call . path === `/api/tenants/${ WORKSPACE_ID } /credentials` ,
305316 ) ,
306317 ) . toHaveLength ( 1 ) ;
307318 } ) ;
0 commit comments