@@ -16,6 +16,7 @@ import type { NodeDriverServiceProvider } from "@mongosh/service-provider-node-d
1616import { ErrorCodes , MongoDBError } from "./errors.js" ;
1717import type { ExportsManager } from "./exportsManager.js" ;
1818import type { Keychain } from "./keychain.js" ;
19+ import type { VectorSearchEmbeddings } from "./search/vectorSearchEmbeddings.js" ;
1920
2021export interface SessionOptions {
2122 apiBaseUrl : string ;
@@ -25,6 +26,7 @@ export interface SessionOptions {
2526 exportsManager : ExportsManager ;
2627 connectionManager : ConnectionManager ;
2728 keychain : Keychain ;
29+ vectorSearchEmbeddings : VectorSearchEmbeddings ;
2830}
2931
3032export type SessionEvents = {
@@ -40,6 +42,7 @@ export class Session extends EventEmitter<SessionEvents> {
4042 readonly connectionManager : ConnectionManager ;
4143 readonly apiClient : ApiClient ;
4244 readonly keychain : Keychain ;
45+ readonly vectorSearchEmbeddings : VectorSearchEmbeddings ;
4346
4447 mcpClient ?: {
4548 name ?: string ;
@@ -57,6 +60,7 @@ export class Session extends EventEmitter<SessionEvents> {
5760 connectionManager,
5861 exportsManager,
5962 keychain,
63+ vectorSearchEmbeddings,
6064 } : SessionOptions ) {
6165 super ( ) ;
6266
@@ -73,6 +77,7 @@ export class Session extends EventEmitter<SessionEvents> {
7377 this . apiClient = new ApiClient ( { baseUrl : apiBaseUrl , credentials } , logger ) ;
7478 this . exportsManager = exportsManager ;
7579 this . connectionManager = connectionManager ;
80+ this . vectorSearchEmbeddings = vectorSearchEmbeddings ;
7681 this . connectionManager . events . on ( "connection-success" , ( ) => this . emit ( "connect" ) ) ;
7782 this . connectionManager . events . on ( "connection-time-out" , ( error ) => this . emit ( "connection-error" , error ) ) ;
7883 this . connectionManager . events . on ( "connection-close" , ( ) => this . emit ( "disconnect" ) ) ;
0 commit comments