claude-brain 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/package.json +1 -1
- package/src/cli/commands/serve.ts +13 -8
- package/src/cli/commands/start.ts +5 -7
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.22.
|
|
1
|
+
0.22.1
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import { ClaudeBrainMCPServer } from '@/server'
|
|
|
5
5
|
import { initializeServices, shutdownServices, getVaultService, getMemoryService } from '@/server/services'
|
|
6
6
|
import { createOrchestrator, type Orchestrator } from '@/orchestrator'
|
|
7
7
|
import { ensureHomeDirectory } from '@/cli/auto-setup'
|
|
8
|
-
import { ensureChromaRunning } from '@/cli/commands/chroma'
|
|
9
8
|
|
|
10
9
|
const BANNER = `
|
|
11
10
|
╔═══════════════════════════════════════════════════════╗
|
|
@@ -29,12 +28,12 @@ export async function runServe() {
|
|
|
29
28
|
console.error(`[claude-brain] Hook auto-install skipped: ${error instanceof Error ? error.message : 'unknown error'}`)
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
const config = await loadConfig()
|
|
32
|
+
|
|
33
|
+
if (config.logLevel === 'debug' || config.logLevel === 'info') {
|
|
33
34
|
console.error(BANNER)
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
const config = await loadConfig()
|
|
37
|
-
|
|
38
37
|
const logger = createLogger(config.logLevel, config.logFilePath)
|
|
39
38
|
const mainLogger = createComponentLogger(logger, 'main')
|
|
40
39
|
|
|
@@ -54,10 +53,16 @@ export async function runServe() {
|
|
|
54
53
|
cacheSize: config.cacheSize
|
|
55
54
|
}, 'Configuration loaded')
|
|
56
55
|
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
// Only start ChromaDB if explicitly enabled in config
|
|
57
|
+
let chromaReady = false
|
|
58
|
+
if (config.chromadb?.enabled) {
|
|
59
|
+
mainLogger.info('ChromaDB enabled, ensuring it is available...')
|
|
60
|
+
const { ensureChromaRunning } = await import('@/cli/commands/chroma')
|
|
61
|
+
chromaReady = await ensureChromaRunning({ silent: process.env.NODE_ENV === 'production' })
|
|
62
|
+
mainLogger.info({ chromaReady }, chromaReady ? 'ChromaDB is ready' : 'ChromaDB not available, using SQLite fallback')
|
|
63
|
+
} else {
|
|
64
|
+
mainLogger.info('Using SQLite FTS5 storage (ChromaDB disabled)')
|
|
65
|
+
}
|
|
61
66
|
|
|
62
67
|
mainLogger.info('Initializing services...')
|
|
63
68
|
await initializeServices(config, logger)
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Start Command
|
|
3
|
-
* Starts
|
|
3
|
+
* Starts the Claude Brain server (MCP + HTTP)
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* claude-brain start Start
|
|
7
|
-
* claude-brain start --chroma-only Start only ChromaDB server
|
|
6
|
+
* claude-brain start Start server
|
|
7
|
+
* claude-brain start --chroma-only Start only ChromaDB server (if enabled)
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { parseArgs } from 'citty'
|
|
11
11
|
import {
|
|
12
12
|
heading, successText, warningText, dimText,
|
|
13
13
|
} from '@/cli/ui/index.js'
|
|
14
|
-
import { ensureChromaRunning } from '@/cli/commands/chroma'
|
|
15
14
|
|
|
16
15
|
export async function runStart(): Promise<void> {
|
|
17
16
|
const args = parseArgs(process.argv.slice(3), {
|
|
@@ -20,6 +19,7 @@ export async function runStart(): Promise<void> {
|
|
|
20
19
|
const chromaOnly = args['chroma-only']
|
|
21
20
|
|
|
22
21
|
if (chromaOnly) {
|
|
22
|
+
const { ensureChromaRunning } = await import('@/cli/commands/chroma')
|
|
23
23
|
console.log()
|
|
24
24
|
console.log(heading('Starting ChromaDB'))
|
|
25
25
|
console.log()
|
|
@@ -36,9 +36,7 @@ export async function runStart(): Promise<void> {
|
|
|
36
36
|
return
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
// serve.ts already calls ensureChromaRunning(), so just delegate
|
|
41
|
-
console.error(dimText('Starting ChromaDB + MCP server...'))
|
|
39
|
+
console.error(dimText('Starting Claude Brain server...'))
|
|
42
40
|
console.error()
|
|
43
41
|
|
|
44
42
|
const { runServe } = await import('./serve')
|