MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / initStandaloneMcpRuntime

Function initStandaloneMcpRuntime

packages/mcp-server/src/standalone-runtime.ts:8–18  ·  view source on GitHub ↗
(
  version: string,
  userDataDir?: string
)

Source from the content-addressed store, hash-verified

6} from '@openchatlab/node-runtime'
7
8export function initStandaloneMcpRuntime(
9 version: string,
10 userDataDir?: string
11): { dbManager: DatabaseManager; pathProvider: NodePathProvider; runtime: RuntimeIdentity } {
12 const pathProvider = new NodePathProvider(userDataDir)
13 pathProvider.ensureAllDirs()
14 const runtime: RuntimeIdentity = { version, kind: 'mcp' }
15 assertDataDirCompatible(pathProvider, runtime)
16 const dbManager = new DatabaseManager(pathProvider, { runtime })
17 return { dbManager, pathProvider, runtime }
18}

Callers 2

mainFunction · 0.90
bin.test.tsFile · 0.90

Calls 2

ensureAllDirsMethod · 0.95
assertDataDirCompatibleFunction · 0.90

Tested by

no test coverage detected