@timmeck/brain 2.0.0 → 2.1.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/README.md +114 -170
- package/brain.log +3098 -0
- package/dashboard.html +7 -1
- package/dist/brain.d.ts +1 -0
- package/dist/brain.js +11 -5
- package/dist/brain.js.map +1 -1
- package/dist/cli/commands/dashboard.js +21 -2
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +2 -0
- package/dist/cli/commands/setup.js +279 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/status.js +0 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/config.js +2 -29
- package/dist/config.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/ipc/__tests__/protocol.test.js +1 -1
- package/dist/ipc/__tests__/protocol.test.js.map +1 -1
- package/dist/ipc/router.d.ts +2 -0
- package/dist/ipc/router.js +22 -0
- package/dist/ipc/router.js.map +1 -1
- package/dist/learning/confidence-scorer.d.ts +2 -5
- package/dist/learning/confidence-scorer.js +4 -19
- package/dist/learning/confidence-scorer.js.map +1 -1
- package/dist/learning/decay.js +2 -3
- package/dist/learning/decay.js.map +1 -1
- package/dist/learning/learning-engine.d.ts +2 -5
- package/dist/learning/learning-engine.js +3 -15
- package/dist/learning/learning-engine.js.map +1 -1
- package/dist/mcp/tools.js +36 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/parsing/parsers/compiler.js +1 -1
- package/dist/parsing/parsers/compiler.js.map +1 -1
- package/dist/research/research-engine.d.ts +2 -6
- package/dist/research/research-engine.js +3 -23
- package/dist/research/research-engine.js.map +1 -1
- package/dist/services/synapse.service.d.ts +3 -3
- package/dist/synapses/activation.d.ts +3 -13
- package/dist/synapses/activation.js +2 -49
- package/dist/synapses/activation.js.map +1 -1
- package/dist/synapses/decay.d.ts +2 -11
- package/dist/synapses/decay.js +2 -26
- package/dist/synapses/decay.js.map +1 -1
- package/dist/synapses/hebbian.d.ts +2 -13
- package/dist/synapses/hebbian.js +2 -35
- package/dist/synapses/hebbian.js.map +1 -1
- package/dist/synapses/pathfinder.d.ts +2 -14
- package/dist/synapses/pathfinder.js +2 -49
- package/dist/synapses/pathfinder.js.map +1 -1
- package/dist/synapses/synapse-manager.d.ts +7 -23
- package/dist/synapses/synapse-manager.js +6 -63
- package/dist/synapses/synapse-manager.js.map +1 -1
- package/eslint.config.js +14 -0
- package/package.json +61 -50
- package/smithery.yaml +10 -0
|
@@ -1,50 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
const results = [];
|
|
4
|
-
const queue = [{ node: startNode, depth: 0, pathWeight: 1.0, path: [] }];
|
|
5
|
-
while (queue.length > 0) {
|
|
6
|
-
const current = queue.shift();
|
|
7
|
-
const key = `${current.node.type}:${current.node.id}`;
|
|
8
|
-
if (visited.has(key))
|
|
9
|
-
continue;
|
|
10
|
-
if (current.depth > maxDepth)
|
|
11
|
-
continue;
|
|
12
|
-
if (current.pathWeight < minWeight)
|
|
13
|
-
continue;
|
|
14
|
-
visited.add(key);
|
|
15
|
-
if (current.depth > 0) {
|
|
16
|
-
results.push({
|
|
17
|
-
node: current.node,
|
|
18
|
-
activation: current.pathWeight,
|
|
19
|
-
depth: current.depth,
|
|
20
|
-
path: current.path,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
const outgoing = repo.getOutgoing(current.node.type, current.node.id);
|
|
24
|
-
const incoming = repo.getIncoming(current.node.type, current.node.id);
|
|
25
|
-
for (const synapse of outgoing) {
|
|
26
|
-
const nextWeight = current.pathWeight * synapse.weight;
|
|
27
|
-
if (nextWeight >= minWeight) {
|
|
28
|
-
queue.push({
|
|
29
|
-
node: { type: synapse.target_type, id: synapse.target_id },
|
|
30
|
-
depth: current.depth + 1,
|
|
31
|
-
pathWeight: nextWeight,
|
|
32
|
-
path: [...current.path, `--${synapse.synapse_type}-->`],
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
for (const synapse of incoming) {
|
|
37
|
-
const nextWeight = current.pathWeight * synapse.weight;
|
|
38
|
-
if (nextWeight >= minWeight) {
|
|
39
|
-
queue.push({
|
|
40
|
-
node: { type: synapse.source_type, id: synapse.source_id },
|
|
41
|
-
depth: current.depth + 1,
|
|
42
|
-
pathWeight: nextWeight,
|
|
43
|
-
path: [...current.path, `<--${synapse.synapse_type}--`],
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return results.sort((a, b) => b.activation - a.activation);
|
|
49
|
-
}
|
|
1
|
+
// Re-export from brain-core
|
|
2
|
+
export { spreadingActivation } from '@timmeck/brain-core';
|
|
50
3
|
//# sourceMappingURL=activation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activation.js","sourceRoot":"","sources":["../../src/synapses/activation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"activation.js","sourceRoot":"","sources":["../../src/synapses/activation.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/synapses/decay.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
decayHalfLifeDays: number;
|
|
4
|
-
decayAfterDays: number;
|
|
5
|
-
pruneThreshold: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function timeDecayFactor(lastActivatedAt: string, halfLifeDays: number): number;
|
|
8
|
-
export declare function decayAll(repo: SynapseRepository, config: DecayConfig): {
|
|
9
|
-
decayed: number;
|
|
10
|
-
pruned: number;
|
|
11
|
-
};
|
|
1
|
+
export { timeDecayFactor, decayAll } from '@timmeck/brain-core';
|
|
2
|
+
export type { DecayConfig } from '@timmeck/brain-core';
|
package/dist/synapses/decay.js
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
const activated = new Date(lastActivatedAt).getTime();
|
|
4
|
-
const ageDays = (now - activated) / (1000 * 60 * 60 * 24);
|
|
5
|
-
return Math.pow(0.5, ageDays / halfLifeDays);
|
|
6
|
-
}
|
|
7
|
-
export function decayAll(repo, config) {
|
|
8
|
-
const cutoff = new Date();
|
|
9
|
-
cutoff.setDate(cutoff.getDate() - config.decayAfterDays);
|
|
10
|
-
const stale = repo.findInactiveSince(cutoff.toISOString());
|
|
11
|
-
let pruned = 0;
|
|
12
|
-
let decayed = 0;
|
|
13
|
-
for (const synapse of stale) {
|
|
14
|
-
const factor = timeDecayFactor(synapse.last_activated_at, config.decayHalfLifeDays);
|
|
15
|
-
const newWeight = synapse.weight * factor;
|
|
16
|
-
if (newWeight < config.pruneThreshold) {
|
|
17
|
-
repo.delete(synapse.id);
|
|
18
|
-
pruned++;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
repo.update(synapse.id, { weight: newWeight });
|
|
22
|
-
decayed++;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return { decayed, pruned };
|
|
26
|
-
}
|
|
1
|
+
// Re-export from brain-core
|
|
2
|
+
export { timeDecayFactor, decayAll } from '@timmeck/brain-core';
|
|
27
3
|
//# sourceMappingURL=decay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decay.js","sourceRoot":"","sources":["../../src/synapses/decay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decay.js","sourceRoot":"","sources":["../../src/synapses/decay.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface HebbianConfig {
|
|
4
|
-
initialWeight: number;
|
|
5
|
-
learningRate: number;
|
|
6
|
-
pruneThreshold: number;
|
|
7
|
-
}
|
|
8
|
-
export interface NodeRef {
|
|
9
|
-
type: NodeType;
|
|
10
|
-
id: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function strengthen(repo: SynapseRepository, source: NodeRef, target: NodeRef, synapseType: SynapseType, config: HebbianConfig, context?: Record<string, unknown>): SynapseRecord;
|
|
13
|
-
export declare function weaken(repo: SynapseRepository, synapseId: number, config: HebbianConfig, factor?: number): void;
|
|
1
|
+
export { strengthen, weaken } from '@timmeck/brain-core';
|
|
2
|
+
export type { NodeRef, HebbianConfig } from '@timmeck/brain-core';
|
package/dist/synapses/hebbian.js
CHANGED
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
if (existing) {
|
|
4
|
-
// Hebbian: weight grows logarithmically, saturates at 1.0
|
|
5
|
-
const newWeight = Math.min(1.0, existing.weight + (1.0 - existing.weight) * config.learningRate);
|
|
6
|
-
repo.update(existing.id, {
|
|
7
|
-
weight: newWeight,
|
|
8
|
-
activation_count: existing.activation_count + 1,
|
|
9
|
-
last_activated_at: new Date().toISOString(),
|
|
10
|
-
});
|
|
11
|
-
return { ...existing, weight: newWeight, activation_count: existing.activation_count + 1 };
|
|
12
|
-
}
|
|
13
|
-
const id = repo.create({
|
|
14
|
-
source_type: source.type,
|
|
15
|
-
source_id: source.id,
|
|
16
|
-
target_type: target.type,
|
|
17
|
-
target_id: target.id,
|
|
18
|
-
synapse_type: synapseType,
|
|
19
|
-
weight: config.initialWeight,
|
|
20
|
-
metadata: context ? JSON.stringify(context) : null,
|
|
21
|
-
});
|
|
22
|
-
return repo.getById(id);
|
|
23
|
-
}
|
|
24
|
-
export function weaken(repo, synapseId, config, factor = 0.5) {
|
|
25
|
-
const synapse = repo.getById(synapseId);
|
|
26
|
-
if (!synapse)
|
|
27
|
-
return;
|
|
28
|
-
const newWeight = synapse.weight * factor;
|
|
29
|
-
if (newWeight < config.pruneThreshold) {
|
|
30
|
-
repo.delete(synapseId);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
repo.update(synapseId, { weight: newWeight });
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
// Re-export from brain-core
|
|
2
|
+
export { strengthen, weaken } from '@timmeck/brain-core';
|
|
36
3
|
//# sourceMappingURL=hebbian.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hebbian.js","sourceRoot":"","sources":["../../src/synapses/hebbian.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hebbian.js","sourceRoot":"","sources":["../../src/synapses/hebbian.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface PathNode {
|
|
4
|
-
type: NodeType;
|
|
5
|
-
id: number;
|
|
6
|
-
}
|
|
7
|
-
export interface SynapsePath {
|
|
8
|
-
from: PathNode;
|
|
9
|
-
to: PathNode;
|
|
10
|
-
synapses: SynapseRecord[];
|
|
11
|
-
totalWeight: number;
|
|
12
|
-
hops: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function findPath(repo: SynapseRepository, from: PathNode, to: PathNode, maxDepth?: number): SynapsePath | null;
|
|
1
|
+
export { findPath } from '@timmeck/brain-core';
|
|
2
|
+
export type { PathNode, SynapsePath } from '@timmeck/brain-core';
|
|
@@ -1,50 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
const queue = [{ node: from, path: [], totalWeight: 1.0 }];
|
|
4
|
-
let bestPath = null;
|
|
5
|
-
while (queue.length > 0) {
|
|
6
|
-
const current = queue.shift();
|
|
7
|
-
const key = `${current.node.type}:${current.node.id}`;
|
|
8
|
-
if (visited.has(key))
|
|
9
|
-
continue;
|
|
10
|
-
visited.add(key);
|
|
11
|
-
if (current.node.type === to.type && current.node.id === to.id) {
|
|
12
|
-
if (!bestPath || current.totalWeight > bestPath.totalWeight) {
|
|
13
|
-
bestPath = {
|
|
14
|
-
from,
|
|
15
|
-
to,
|
|
16
|
-
synapses: current.path,
|
|
17
|
-
totalWeight: current.totalWeight,
|
|
18
|
-
hops: current.path.length,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
if (current.path.length >= maxDepth)
|
|
24
|
-
continue;
|
|
25
|
-
const outgoing = repo.getOutgoing(current.node.type, current.node.id);
|
|
26
|
-
for (const synapse of outgoing) {
|
|
27
|
-
const targetKey = `${synapse.target_type}:${synapse.target_id}`;
|
|
28
|
-
if (!visited.has(targetKey)) {
|
|
29
|
-
queue.push({
|
|
30
|
-
node: { type: synapse.target_type, id: synapse.target_id },
|
|
31
|
-
path: [...current.path, synapse],
|
|
32
|
-
totalWeight: current.totalWeight * synapse.weight,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const incoming = repo.getIncoming(current.node.type, current.node.id);
|
|
37
|
-
for (const synapse of incoming) {
|
|
38
|
-
const sourceKey = `${synapse.source_type}:${synapse.source_id}`;
|
|
39
|
-
if (!visited.has(sourceKey)) {
|
|
40
|
-
queue.push({
|
|
41
|
-
node: { type: synapse.source_type, id: synapse.source_id },
|
|
42
|
-
path: [...current.path, synapse],
|
|
43
|
-
totalWeight: current.totalWeight * synapse.weight,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return bestPath;
|
|
49
|
-
}
|
|
1
|
+
// Re-export from brain-core
|
|
2
|
+
export { findPath } from '@timmeck/brain-core';
|
|
50
3
|
//# sourceMappingURL=pathfinder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathfinder.js","sourceRoot":"","sources":["../../src/synapses/pathfinder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pathfinder.js","sourceRoot":"","sources":["../../src/synapses/pathfinder.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare class SynapseManager {
|
|
8
|
-
private repo;
|
|
9
|
-
private config;
|
|
10
|
-
private logger;
|
|
11
|
-
constructor(repo: SynapseRepository, config: SynapsesConfig);
|
|
12
|
-
strengthen(source: NodeRef, target: NodeRef, synapseType: SynapseType, context?: Record<string, unknown>): SynapseRecord;
|
|
13
|
-
weaken(synapseId: number, factor?: number): void;
|
|
14
|
-
find(source: NodeRef, target: NodeRef, synapseType: SynapseType): SynapseRecord | undefined;
|
|
15
|
-
activate(startNode: NodeRef, maxDepth?: number, minWeight?: number): ActivationResult[];
|
|
16
|
-
findPath(from: NodeRef, to: NodeRef, maxDepth?: number): SynapsePath | null;
|
|
17
|
-
runDecay(): {
|
|
18
|
-
decayed: number;
|
|
19
|
-
pruned: number;
|
|
20
|
-
};
|
|
1
|
+
import { BaseSynapseManager } from '@timmeck/brain-core';
|
|
2
|
+
import type { ActivationResult } from '@timmeck/brain-core';
|
|
3
|
+
/**
|
|
4
|
+
* Brain-specific SynapseManager.
|
|
5
|
+
* Extends BaseSynapseManager with error-context domain methods.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SynapseManager extends BaseSynapseManager {
|
|
21
8
|
getErrorContext(errorId: number): {
|
|
22
9
|
solutions: ActivationResult[];
|
|
23
10
|
relatedErrors: ActivationResult[];
|
|
@@ -25,7 +12,4 @@ export declare class SynapseManager {
|
|
|
25
12
|
preventionRules: ActivationResult[];
|
|
26
13
|
insights: ActivationResult[];
|
|
27
14
|
};
|
|
28
|
-
getStrongestSynapses(limit?: number): SynapseRecord[];
|
|
29
|
-
getDiverseSynapses(perType?: number): SynapseRecord[];
|
|
30
|
-
getNetworkStats(): NetworkStats;
|
|
31
15
|
}
|
|
@@ -1,51 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export class SynapseManager {
|
|
7
|
-
repo;
|
|
8
|
-
config;
|
|
9
|
-
logger = getLogger();
|
|
10
|
-
constructor(repo, config) {
|
|
11
|
-
this.repo = repo;
|
|
12
|
-
this.config = config;
|
|
13
|
-
}
|
|
14
|
-
strengthen(source, target, synapseType, context) {
|
|
15
|
-
this.logger.debug(`Strengthening synapse ${source.type}:${source.id} --${synapseType}--> ${target.type}:${target.id}`);
|
|
16
|
-
return strengthen(this.repo, source, target, synapseType, {
|
|
17
|
-
initialWeight: this.config.initialWeight,
|
|
18
|
-
learningRate: this.config.learningRate,
|
|
19
|
-
pruneThreshold: this.config.pruneThreshold,
|
|
20
|
-
}, context);
|
|
21
|
-
}
|
|
22
|
-
weaken(synapseId, factor = 0.5) {
|
|
23
|
-
this.logger.debug(`Weakening synapse ${synapseId} by factor ${factor}`);
|
|
24
|
-
weaken(this.repo, synapseId, {
|
|
25
|
-
initialWeight: this.config.initialWeight,
|
|
26
|
-
learningRate: this.config.learningRate,
|
|
27
|
-
pruneThreshold: this.config.pruneThreshold,
|
|
28
|
-
}, factor);
|
|
29
|
-
}
|
|
30
|
-
find(source, target, synapseType) {
|
|
31
|
-
return this.repo.findBySourceTarget(source.type, source.id, target.type, target.id, synapseType);
|
|
32
|
-
}
|
|
33
|
-
activate(startNode, maxDepth, minWeight) {
|
|
34
|
-
return spreadingActivation(this.repo, startNode, maxDepth ?? this.config.maxDepth, minWeight ?? this.config.minActivationWeight);
|
|
35
|
-
}
|
|
36
|
-
findPath(from, to, maxDepth) {
|
|
37
|
-
return findPath(this.repo, from, to, maxDepth ?? this.config.maxDepth + 2);
|
|
38
|
-
}
|
|
39
|
-
runDecay() {
|
|
40
|
-
this.logger.info('Running synapse decay cycle');
|
|
41
|
-
const result = decayAll(this.repo, {
|
|
42
|
-
decayHalfLifeDays: this.config.decayHalfLifeDays,
|
|
43
|
-
decayAfterDays: this.config.decayAfterDays,
|
|
44
|
-
pruneThreshold: this.config.pruneThreshold,
|
|
45
|
-
});
|
|
46
|
-
this.logger.info(`Decay complete: ${result.decayed} decayed, ${result.pruned} pruned`);
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
1
|
+
import { BaseSynapseManager } from '@timmeck/brain-core';
|
|
2
|
+
/**
|
|
3
|
+
* Brain-specific SynapseManager.
|
|
4
|
+
* Extends BaseSynapseManager with error-context domain methods.
|
|
5
|
+
*/
|
|
6
|
+
export class SynapseManager extends BaseSynapseManager {
|
|
49
7
|
getErrorContext(errorId) {
|
|
50
8
|
const all = this.activate({ type: 'error', id: errorId });
|
|
51
9
|
return {
|
|
@@ -56,20 +14,5 @@ export class SynapseManager {
|
|
|
56
14
|
insights: all.filter(a => a.node.type === 'insight'),
|
|
57
15
|
};
|
|
58
16
|
}
|
|
59
|
-
getStrongestSynapses(limit = 20) {
|
|
60
|
-
return this.repo.topByWeight(limit);
|
|
61
|
-
}
|
|
62
|
-
getDiverseSynapses(perType = 25) {
|
|
63
|
-
return this.repo.topDiverse(perType);
|
|
64
|
-
}
|
|
65
|
-
getNetworkStats() {
|
|
66
|
-
return {
|
|
67
|
-
totalNodes: this.repo.countNodes(),
|
|
68
|
-
totalSynapses: this.repo.totalCount(),
|
|
69
|
-
avgWeight: this.repo.avgWeight(),
|
|
70
|
-
nodesByType: {},
|
|
71
|
-
synapsesByType: this.repo.countByType(),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
17
|
}
|
|
75
18
|
//# sourceMappingURL=synapse-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synapse-manager.js","sourceRoot":"","sources":["../../src/synapses/synapse-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"synapse-manager.js","sourceRoot":"","sources":["../../src/synapses/synapse-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IACpD,eAAe,CAAC,OAAe;QAO7B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAC1D,OAAO;YACL,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;YACtD,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC;YACvD,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;YAC/D,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;YACxD,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;SACrD,CAAC;IACJ,CAAC;CACF"}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint';
|
|
2
|
+
|
|
3
|
+
export default tseslint.config(
|
|
4
|
+
...tseslint.configs.recommended,
|
|
5
|
+
{
|
|
6
|
+
ignores: ['dist/', 'node_modules/', '**/*.js', '**/*.d.ts'],
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
rules: {
|
|
10
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
11
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
);
|
package/package.json
CHANGED
|
@@ -1,50 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@timmeck/brain",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Adaptive error memory and code intelligence system with Hebbian synapse network, hybrid search, and REST API",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"brain": "./dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"dev": "tsx src/index.ts",
|
|
13
|
-
"test": "vitest"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@timmeck/brain",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "Adaptive error memory and code intelligence system with Hebbian synapse network, hybrid search, and REST API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"brain": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsx src/index.ts",
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"lint": "eslint src/",
|
|
15
|
+
"lint:fix": "eslint src/ --fix",
|
|
16
|
+
"test:coverage": "vitest --coverage"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"mcp-server",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"claude",
|
|
23
|
+
"claude-code",
|
|
24
|
+
"cursor",
|
|
25
|
+
"windsurf",
|
|
26
|
+
"cline",
|
|
27
|
+
"ai-tools",
|
|
28
|
+
"error-memory",
|
|
29
|
+
"code-intelligence",
|
|
30
|
+
"developer-tools",
|
|
31
|
+
"hebbian-learning",
|
|
32
|
+
"synapse-network",
|
|
33
|
+
"adaptive-learning",
|
|
34
|
+
"vector-search"
|
|
35
|
+
],
|
|
36
|
+
"author": "Tim Mecklenburg",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/timmeck/brain"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@huggingface/transformers": "^3.8.1",
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
45
|
+
"@timmeck/brain-core": "^1.1.0",
|
|
46
|
+
"better-sqlite3": "^11.7.0",
|
|
47
|
+
"chalk": "^5.6.2",
|
|
48
|
+
"commander": "^13.0.0",
|
|
49
|
+
"winston": "^3.17.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
53
|
+
"@types/node": "^22.0.0",
|
|
54
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
55
|
+
"eslint": "^9.39.3",
|
|
56
|
+
"tsx": "^4.19.0",
|
|
57
|
+
"typescript": "^5.7.0",
|
|
58
|
+
"typescript-eslint": "^8.56.1",
|
|
59
|
+
"vitest": "^3.0.0"
|
|
60
|
+
}
|
|
61
|
+
}
|