Skip to content

Commit 1dad310

Browse files
committed
refactor: simplify store type to IndexStoreReader (MCP only reads)
Agent-Id: agent-43a3a808-8546-4c5d-a8f9-4bae040e5ab1
1 parent 73096b1 commit 1dad310

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/clients/mcp-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
CallToolRequestSchema,
3838
ListToolsRequestSchema,
3939
} from "@modelcontextprotocol/sdk/types.js";
40-
import type { IndexStoreReader, IndexStore } from "../stores/types.js";
40+
import type { IndexStoreReader } from "../stores/types.js";
4141
import type { Source } from "../sources/types.js";
4242
import { MultiIndexRunner } from "./multi-index-runner.js";
4343
import { buildClientUserAgent, type MCPClientInfo } from "../core/utils.js";
@@ -53,7 +53,7 @@ import {
5353
*/
5454
export interface MCPServerConfig {
5555
/** Store to load indexes from (accepts both reader-only and full store) */
56-
store: IndexStoreReader | IndexStore;
56+
store: IndexStoreReader;
5757
/**
5858
* Index names to expose. If undefined, all indexes in the store are exposed.
5959
*/

src/clients/multi-index-runner.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @module clients/multi-index-runner
88
*/
99

10-
import type { IndexStoreReader, IndexStore } from "../stores/types.js";
10+
import type { IndexStoreReader } from "../stores/types.js";
1111
import type { Source } from "../sources/types.js";
1212
import type { IndexStateSearchOnly } from "../core/types.js";
1313
import { getSourceIdentifier, getResolvedRef } from "../core/types.js";
@@ -26,7 +26,7 @@ export interface IndexInfo {
2626
/** Configuration for MultiIndexRunner */
2727
export interface MultiIndexRunnerConfig {
2828
/** Store to load indexes from */
29-
store: IndexStoreReader | IndexStore;
29+
store: IndexStoreReader;
3030
/**
3131
* Index names to expose. If undefined, all indexes in the store are exposed.
3232
*/
@@ -95,7 +95,7 @@ export async function createSourceFromState(state: IndexStateSearchOnly): Promis
9595
* Lazily initializes SearchClient instances as needed and caches them.
9696
*/
9797
export class MultiIndexRunner {
98-
private readonly store: IndexStoreReader | IndexStore;
98+
private readonly store: IndexStoreReader;
9999
private readonly searchOnly: boolean;
100100
private clientUserAgent?: string;
101101
private readonly clientCache = new Map<string, SearchClient>();
@@ -108,7 +108,7 @@ export class MultiIndexRunner {
108108
indexes: IndexInfo[];
109109

110110
private constructor(
111-
store: IndexStoreReader | IndexStore,
111+
store: IndexStoreReader,
112112
indexNames: string[],
113113
indexes: IndexInfo[],
114114
searchOnly: boolean,

0 commit comments

Comments
 (0)