claude-brain 0.9.2 → 0.9.3

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 CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-brain",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Local development assistant bridging Obsidian vaults with Claude Code via MCP",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -3,7 +3,7 @@ import type { PartialConfig } from './schema'
3
3
  /** Default configuration values for Claude Brain */
4
4
  export const defaultConfig: PartialConfig = {
5
5
  serverName: 'claude-brain',
6
- serverVersion: '0.9.2',
6
+ serverVersion: '0.9.3',
7
7
  logLevel: 'info',
8
8
  logFilePath: './logs/claude-brain.log',
9
9
  dbPath: './data/memory.db',
@@ -270,7 +270,7 @@ export const ConfigSchema = z.object({
270
270
  serverName: z.string().default('claude-brain'),
271
271
 
272
272
  /** Server version in semver format */
273
- serverVersion: z.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be semver format').default('0.9.2'),
273
+ serverVersion: z.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be semver format').default('0.9.3'),
274
274
 
275
275
  /** Logging level */
276
276
  logLevel: LogLevelSchema.default('info'),
@@ -389,7 +389,8 @@ export class MemoryManager {
389
389
  async fetchAllDecisions(project?: string): Promise<any[]> {
390
390
  if (this.useChromaDB) {
391
391
  try {
392
- const results = await this.chroma.collections.decisions.get({
392
+ const collection = await this.chroma.collections.getDecisions()
393
+ const results = await collection.get({
393
394
  where: project ? { project } : undefined
394
395
  })
395
396
  if (results && results.ids) {
@@ -419,7 +420,8 @@ export class MemoryManager {
419
420
  async fetchAllPatterns(project?: string): Promise<any[]> {
420
421
  if (this.useChromaDB) {
421
422
  try {
422
- const results = await this.chroma.collections.patterns.get({
423
+ const collection = await this.chroma.collections.getPatterns()
424
+ const results = await collection.get({
423
425
  where: project ? { project } : undefined
424
426
  })
425
427
  if (results && results.ids) {
@@ -449,7 +451,8 @@ export class MemoryManager {
449
451
  async fetchAllCorrections(project?: string): Promise<any[]> {
450
452
  if (this.useChromaDB) {
451
453
  try {
452
- const results = await this.chroma.collections.corrections.get({
454
+ const collection = await this.chroma.collections.getCorrections()
455
+ const results = await collection.get({
453
456
  where: project ? { project } : undefined
454
457
  })
455
458
  if (results && results.ids) {
@@ -592,8 +592,9 @@ export class BrainRouter {
592
592
  minSimilarity: 0.3
593
593
  })
594
594
 
595
- if (results.length > 0 && results[0].id) {
596
- const oldId = results[0].id
595
+ const matchId = results[0]?.memory?.id || results[0]?.decision?.id
596
+ if (results.length > 0 && matchId) {
597
+ const oldId = matchId
597
598
  const newId = await memory.updateDecision(
598
599
  oldId,
599
600
  effectiveProject,
@@ -606,7 +607,7 @@ export class BrainRouter {
606
607
  this.lastStoredId = newId
607
608
  this.lastStoredProject = effectiveProject
608
609
 
609
- const oldContent = results[0].decision?.decision || results[0].content?.slice(0, 100) || ''
610
+ const oldContent = results[0].decision?.decision || results[0].memory?.content?.slice(0, 100) || ''
610
611
  return {
611
612
  action: 'stored',
612
613
  summary: `Updated decision`,
@@ -692,9 +693,10 @@ export class BrainRouter {
692
693
  minSimilarity: 0.3
693
694
  })
694
695
 
695
- if (results.length > 0 && results[0].id) {
696
- const targetId = results[0].id
697
- const content = results[0].decision?.decision || results[0].content?.slice(0, 100) || ''
696
+ const matchId = results[0]?.memory?.id || results[0]?.decision?.id
697
+ if (results.length > 0 && matchId) {
698
+ const targetId = matchId
699
+ const content = results[0].decision?.decision || results[0].memory?.content?.slice(0, 100) || ''
698
700
 
699
701
  await memory.deleteDecision(targetId)
700
702
  if (this.lastStoredId === targetId) this.lastStoredId = null