@soulcraft/brainy 3.19.0 → 3.20.0

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.
@@ -69,7 +69,7 @@ export declare class DataAPI {
69
69
  private getEntity;
70
70
  private getRelation?;
71
71
  private brain;
72
- constructor(storage: StorageAdapter, getEntity: (id: string) => Promise<Entity | null>, getRelation?: ((id: string) => Promise<Relation | null>) | undefined, brain?: any);
72
+ constructor(storage: StorageAdapter, getEntity: (id: string) => Promise<Entity | null>, getRelation?: (id: string) => Promise<Relation | null>, brain?: any);
73
73
  /**
74
74
  * Create a backup of all data
75
75
  */
@@ -98,7 +98,7 @@ export declare class CacheAugmentation extends BaseAugmentation {
98
98
  /**
99
99
  * Get the underlying SearchCache instance (for compatibility)
100
100
  */
101
- getSearchCache(): SearchCache<GraphNoun> | null;
101
+ getSearchCache(): SearchCache<GraphNoun>;
102
102
  /**
103
103
  * Get memory usage
104
104
  */
@@ -100,13 +100,13 @@ export declare class MetricsAugmentation extends BaseAugmentation {
100
100
  p99Latency: number;
101
101
  };
102
102
  } | {
103
- nounCount?: Record<string, number> | undefined;
104
- verbCount?: Record<string, number> | undefined;
105
- metadataCount?: Record<string, number> | undefined;
106
- hnswIndexSize?: number | undefined;
107
- totalNodes?: number | undefined;
108
- totalEdges?: number | undefined;
109
- totalMetadata?: number | undefined;
103
+ nounCount?: Record<string, number>;
104
+ verbCount?: Record<string, number>;
105
+ metadataCount?: Record<string, number>;
106
+ hnswIndexSize?: number;
107
+ totalNodes?: number;
108
+ totalEdges?: number;
109
+ totalMetadata?: number;
110
110
  operations?: {
111
111
  add: number;
112
112
  search: number;
@@ -114,10 +114,10 @@ export declare class MetricsAugmentation extends BaseAugmentation {
114
114
  update: number;
115
115
  relate: number;
116
116
  total: number;
117
- } | undefined;
118
- fieldNames?: Record<string, string[]> | undefined;
119
- standardFieldMappings?: Record<string, Record<string, string[]>> | undefined;
120
- contentTypes?: Record<string, number> | undefined;
117
+ };
118
+ fieldNames?: Record<string, string[]>;
119
+ standardFieldMappings?: Record<string, Record<string, string[]>>;
120
+ contentTypes?: Record<string, number>;
121
121
  dataFreshness?: {
122
122
  oldestEntry: string;
123
123
  newestEntry: string;
@@ -129,32 +129,32 @@ export declare class MetricsAugmentation extends BaseAugmentation {
129
129
  last30d: number;
130
130
  older: number;
131
131
  };
132
- } | undefined;
132
+ };
133
133
  storageMetrics?: {
134
134
  totalSizeBytes: number;
135
135
  nounsSizeBytes: number;
136
136
  verbsSizeBytes: number;
137
137
  metadataSizeBytes: number;
138
138
  indexSizeBytes: number;
139
- } | undefined;
139
+ };
140
140
  searchMetrics?: {
141
141
  totalSearches: number;
142
142
  averageSearchTimeMs: number;
143
143
  searchesLastHour: number;
144
144
  searchesLastDay: number;
145
145
  topSearchTerms?: string[];
146
- } | undefined;
146
+ };
147
147
  verbStatistics?: {
148
148
  totalVerbs: number;
149
149
  verbTypes: Record<string, number>;
150
150
  averageConnectionsPerVerb: number;
151
- } | undefined;
151
+ };
152
152
  serviceActivity?: Record<string, {
153
153
  firstActivity: string;
154
154
  lastActivity: string;
155
155
  totalOperations: number;
156
- }> | undefined;
157
- services?: import("../coreTypes.js").ServiceStatistics[] | undefined;
156
+ }>;
157
+ services?: import("../coreTypes.js").ServiceStatistics[];
158
158
  throttlingMetrics?: {
159
159
  storage?: {
160
160
  currentlyThrottled: boolean;
@@ -177,9 +177,9 @@ export declare class MetricsAugmentation extends BaseAugmentation {
177
177
  lastThrottle: string;
178
178
  status: "normal" | "throttled" | "recovering";
179
179
  }>;
180
- } | undefined;
181
- lastUpdated?: string | undefined;
182
- distributedConfig?: import("../types/distributedTypes.js").SharedConfig | undefined;
180
+ };
181
+ lastUpdated?: string;
182
+ distributedConfig?: import("../types/distributedTypes.js").SharedConfig;
183
183
  enabled: boolean;
184
184
  note: string;
185
185
  totalSearches?: undefined;
package/dist/brainy.d.ts CHANGED
@@ -824,7 +824,7 @@ export declare class Brainy<T = any> implements BrainyInterface<T> {
824
824
  */
825
825
  get augmentations(): {
826
826
  list: () => string[];
827
- get: (name: string) => import("./augmentations/brainyAugmentation.js").BrainyAugmentation | undefined;
827
+ get: (name: string) => import("./augmentations/brainyAugmentation.js").BrainyAugmentation;
828
828
  has: (name: string) => boolean;
829
829
  };
830
830
  /**
@@ -20,7 +20,6 @@ import { DistributedConfigManager, HashPartitioner, OperationalModeFactory, Doma
20
20
  import { CacheAutoConfigurator } from './utils/cacheAutoConfig.js';
21
21
  import { RequestDeduplicator } from './utils/requestDeduplicator.js';
22
22
  import { AugmentationRegistry } from './augmentations/brainyAugmentation.js';
23
- import { WALAugmentation } from './augmentations/walAugmentation.js';
24
23
  import { RequestDeduplicatorAugmentation } from './augmentations/requestDeduplicatorAugmentation.js';
25
24
  import { ConnectionPoolAugmentation } from './augmentations/connectionPoolAugmentation.js';
26
25
  import { BatchProcessingAugmentation } from './augmentations/batchProcessingAugmentation.js';
@@ -310,7 +309,7 @@ export class BrainyData {
310
309
  // Priority 100: Critical system operations
311
310
  // Disable WAL in test environments to avoid directory creation issues
312
311
  const isTestEnvironment = process.env.NODE_ENV === 'test' || process.env.VITEST === 'true';
313
- this.augmentations.register(new WALAugmentation({ enabled: !isTestEnvironment }));
312
+ // this.augmentations.register(new WALAugmentation({ enabled: !isTestEnvironment }));
314
313
  this.augmentations.register(new ConnectionPoolAugmentation());
315
314
  // Priority 95: Entity registry for fast external-ID to UUID mapping
316
315
  this.augmentations.register(new EntityRegistryAugmentation({
@@ -5,9 +5,9 @@
5
5
  * Local catalog with caching support
6
6
  */
7
7
  import chalk from 'chalk';
8
- import { readFileSync, writeFileSync, existsSync } from 'fs';
9
- import { join } from 'path';
10
- import { homedir } from 'os';
8
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
9
+ import { join } from 'node:path';
10
+ import { homedir } from 'node:os';
11
11
  const CATALOG_API = process.env.BRAINY_CATALOG_URL || null;
12
12
  const CACHE_PATH = join(homedir(), '.brainy', 'catalog-cache.json');
13
13
  const CACHE_TTL = 24 * 60 * 60 * 1000; // 24 hours
@@ -237,7 +237,7 @@ function saveCache(catalog) {
237
237
  try {
238
238
  const dir = join(homedir(), '.brainy');
239
239
  if (!existsSync(dir)) {
240
- require('fs').mkdirSync(dir, { recursive: true });
240
+ mkdirSync(dir, { recursive: true });
241
241
  }
242
242
  writeFileSync(CACHE_PATH, JSON.stringify({
243
243
  catalog,
@@ -293,7 +293,10 @@ function readLicenseFile() {
293
293
  return readFileSync(licensePath, 'utf8').trim();
294
294
  }
295
295
  }
296
- catch { }
296
+ catch (error) {
297
+ // License file read failed, return null
298
+ console.debug('Failed to read license file:', error);
299
+ }
297
300
  return null;
298
301
  }
299
302
  function getDefaultCatalog() {
@@ -330,13 +333,6 @@ function getDefaultCatalog() {
330
333
  description: 'Smart relationship scoring with taxonomy understanding',
331
334
  status: 'available'
332
335
  },
333
- {
334
- id: 'wal-augmentation',
335
- name: 'WAL-based Augmentation',
336
- category: 'enterprise',
337
- description: 'Write-ahead log for reliable augmentation processing',
338
- status: 'available'
339
- },
340
336
  {
341
337
  id: 'connection-pooling',
342
338
  name: 'Connection Pooling',
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 💬 Conversation CLI Commands
3
+ *
4
+ * CLI interface for infinite agent memory and conversation management
5
+ */
6
+ interface CommandArguments {
7
+ action?: string;
8
+ conversationId?: string;
9
+ query?: string;
10
+ role?: string;
11
+ limit?: number;
12
+ format?: string;
13
+ output?: string;
14
+ _: string[];
15
+ }
16
+ export declare const conversationCommand: {
17
+ command: string;
18
+ describe: string;
19
+ builder: (yargs: any) => any;
20
+ handler: (argv: CommandArguments) => Promise<void>;
21
+ };
22
+ export default conversationCommand;