claude-brain 0.30.3 → 0.31.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/package.json +1 -1
- package/src/config/home.ts +3 -0
- package/src/config/loader.ts +3 -0
package/package.json
CHANGED
package/src/config/home.ts
CHANGED
|
@@ -21,6 +21,9 @@ export function getClaudeBrainHome(): string {
|
|
|
21
21
|
* Absolute paths pass through unchanged.
|
|
22
22
|
*/
|
|
23
23
|
export function resolveHomePath(rel: string): string {
|
|
24
|
+
if (rel.startsWith('~')) {
|
|
25
|
+
return resolve(homedir(), rel.slice(rel.startsWith('~/') || rel.startsWith('~\\') ? 2 : 1))
|
|
26
|
+
}
|
|
24
27
|
if (isAbsolute(rel)) {
|
|
25
28
|
return rel
|
|
26
29
|
}
|
package/src/config/loader.ts
CHANGED
|
@@ -163,6 +163,9 @@ export async function loadConfig(basePath: string = process.cwd()): Promise<Conf
|
|
|
163
163
|
const data = result.data
|
|
164
164
|
data.logFilePath = resolveHomePath(data.logFilePath)
|
|
165
165
|
data.dbPath = resolveHomePath(data.dbPath)
|
|
166
|
+
if (data.vaultPath) {
|
|
167
|
+
data.vaultPath = resolveHomePath(data.vaultPath)
|
|
168
|
+
}
|
|
166
169
|
|
|
167
170
|
// Always resolve knowledge graph path to absolute
|
|
168
171
|
// Zod .default({}) on nested objects means graph/persistPath may not exist
|