MCPcopy Create free account
hub / github.com/CheMiguel23/MemoryMesh / SearchOperations

Class SearchOperations

src/application/operations/SearchOperations.ts:8–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import type {Graph} from '@core/index.js';
7
8export class SearchOperations extends EventEmitter {
9 constructor(private searchManager: ISearchManager) {
10 super();
11 }
12
13 async searchNodes(query: string): Promise<OpenNodesResult> {
14 this.emit('beforeSearch', {query});
15 const result = await this.searchManager.searchNodes(query);
16 this.emit('afterSearch', result);
17 return result;
18 }
19
20 async openNodes(names: string[]): Promise<OpenNodesResult> {
21 this.emit('beforeOpenNodes', {names});
22 const result = await this.searchManager.openNodes(names);
23 this.emit('afterOpenNodes', result);
24 return result;
25 }
26
27 async readGraph(): Promise<Graph> {
28 this.emit('beforeReadGraph', {});
29 const result = await this.searchManager.readGraph();
30 this.emit('afterReadGraph', result);
31 return result;
32 }
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected