claude-brain 0.24.0 → 0.24.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 +31 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.24.
|
|
1
|
+
0.24.1
|
package/package.json
CHANGED
|
@@ -41,6 +41,37 @@ export async function runServe() {
|
|
|
41
41
|
console.error(`[claude-brain] Hook auto-install skipped: ${error instanceof Error ? error.message : 'unknown error'}`)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
// Auto-install shell auto-start if not already present (handles bun blocking postinstall)
|
|
45
|
+
try {
|
|
46
|
+
const { isAutoStartInstalled, installAutoStart } = await import('@/cli/auto-start')
|
|
47
|
+
if (!isAutoStartInstalled()) {
|
|
48
|
+
const result = installAutoStart()
|
|
49
|
+
if (result.success && result.profilePath) {
|
|
50
|
+
console.error(`[claude-brain] Auto-start installed in ${result.profilePath}`)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
} catch (error) {
|
|
54
|
+
// Non-fatal — auto-start is a convenience feature
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Auto-install CLAUDE.md if not present (handles bun blocking postinstall)
|
|
58
|
+
try {
|
|
59
|
+
const { existsSync, readFileSync, writeFileSync, mkdirSync } = await import('node:fs')
|
|
60
|
+
const { join, resolve, dirname } = await import('node:path')
|
|
61
|
+
const { homedir } = await import('node:os')
|
|
62
|
+
const { fileURLToPath } = await import('node:url')
|
|
63
|
+
const claudeMdDest = join(homedir(), '.claude', 'CLAUDE.md')
|
|
64
|
+
const pkgRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..', '..')
|
|
65
|
+
const claudeMdSrc = join(pkgRoot, 'assets', 'CLAUDE.md')
|
|
66
|
+
if (existsSync(claudeMdSrc) && !existsSync(claudeMdDest)) {
|
|
67
|
+
mkdirSync(join(homedir(), '.claude'), { recursive: true })
|
|
68
|
+
writeFileSync(claudeMdDest, readFileSync(claudeMdSrc, 'utf-8'), 'utf-8')
|
|
69
|
+
console.error('[claude-brain] CLAUDE.md installed to ~/.claude/CLAUDE.md')
|
|
70
|
+
}
|
|
71
|
+
} catch {
|
|
72
|
+
// Non-fatal
|
|
73
|
+
}
|
|
74
|
+
|
|
44
75
|
const config = await loadConfig()
|
|
45
76
|
|
|
46
77
|
if (config.logLevel === 'debug' || config.logLevel === 'info') {
|