@fengrru/healix
v0.1.1
Published
Self-healing error classifier with dual hash matching, Hamming distance fuzzy matching, and self-learning repair rules
Maintainers
Readme
@fengrru/healix
Self-healing error classifier with dual hash matching and Hamming distance fuzzy matching.
Install
npm install @fengrru/healixQuick Start
import { ErrorClassifier, RepairMemoryEngine } from "@fengrru/healix"
// Classify errors
const classifier = new ErrorClassifier()
const category = classifier.classify("ENOENT: no such file or directory") // "not_found"
// Learn repair rules
const engine = new RepairMemoryEngine()
engine.addRule({
id: "r1",
category: "not_found",
exact_hash: "...",
fuzzy_hash: "...",
conditions: [{ type: "file_pattern", value: "*.ts" }],
action: { type: "create_file", params: {} },
success_rate: 0.9,
occurrence_count: 10,
})
// Match rules
const match = engine.matchRules(errorInfo)Error Categories
not_found— file/directory not foundpermission— access deniedtimeout— operation timed outsyntax— parse/compile errorsresource— memory/disk limitsnetwork— connection failuresresearch_failed— LLM/tool failuresunknown— unrecognized errors
Features
- Dual hash matching: exact + fuzzy (Hamming distance)
- Specificity scoring: AND conditions weighted higher
- Self-learning: success_rate tracks rule effectiveness
- Time decay: retention decays over time
Documentation
- API Reference — TypeDoc-generated API docs
- Source Code
- Examples
License
MIT
