anti-hallucination-mcp 0.7.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/CHANGELOG.md +92 -0
- package/LICENSE +21 -0
- package/README.md +617 -0
- package/hooks/post-command-compress.js +45 -0
- package/hooks/post-write-symbol-check.sh +84 -0
- package/hooks/symbol-check.mjs +405 -0
- package/package.json +58 -0
- package/scripts/setup.js +639 -0
- package/src/mcp-server/index.js +210 -0
- package/src/mcp-server/lib/indexer.js +923 -0
- package/src/mcp-server/lib/wisdom.js +324 -0
- package/src/mcp-server/tools/check-symbols.js +86 -0
- package/src/mcp-server/tools/compress-output.js +100 -0
- package/src/mcp-server/tools/detect-environment.js +554 -0
- package/src/mcp-server/tools/get-project-overview.js +57 -0
- package/src/mcp-server/tools/refresh-symbols.js +14 -0
- package/src/mcp-server/tools/reindex-project.js +91 -0
- package/src/mcp-server/tools/strategies/file-filter.js +183 -0
- package/src/mcp-server/tools/strategies/generic-filter.js +101 -0
- package/src/mcp-server/tools/strategies/git-filter.js +205 -0
- package/src/mcp-server/tools/strategies/json-filter.js +89 -0
- package/src/mcp-server/tools/strategies/lint-filter.js +123 -0
- package/src/mcp-server/tools/strategies/log-filter.js +79 -0
- package/src/mcp-server/tools/strategies/test-filter.js +173 -0
- package/src/mcp-server/tools/token-compressor.js +141 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.7.1] - 2026-06-02
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Bumped MCP server and package version to 0.7.1 for npm publication after the 0.7.0 release version was already consumed.
|
|
12
|
+
- Updated the npm publish workflow to support manual reruns with current Node/npm Trusted Publishing requirements.
|
|
13
|
+
|
|
14
|
+
## [0.7.0] - 2026-06-02
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Deep Windows shell diagnostics for `detect_environment`, including WSL distro parsing, Git Bash detection, plain `bash` target detection, and native Windows toolchain checks.
|
|
18
|
+
- Actionable shell recommendations that explain whether to use WSL, Git Bash, or native Windows commands, with copyable `rtk` command examples.
|
|
19
|
+
- Tests covering `detect_environment` MCP output and Windows-specific diagnostics.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- `detect_environment` now uses `spawnSync` argument arrays instead of shell-string execution for environment checks, reducing quoting-related false results.
|
|
23
|
+
- Windows `.cmd` tools such as `npm.cmd` are resolved and executed correctly during native toolchain detection.
|
|
24
|
+
- Standalone `node src/mcp-server/tools/detect-environment.js` execution now works on Windows paths.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Bumped MCP server and package version to 0.7.0.
|
|
28
|
+
|
|
29
|
+
### Release Operations
|
|
30
|
+
- Published GitHub release `v0.7.0`: https://github.com/Akunimal/Anti-Hallucination-MCP/releases/tag/v0.7.0
|
|
31
|
+
- CI and CodeQL passed for the release commit.
|
|
32
|
+
- npm publication from GitHub Actions is blocked until the repository has a valid `NPM_TOKEN` secret or trusted publishing is configured; the current publish workflow fails with `ENEEDAUTH` when `NODE_AUTH_TOKEN` is empty.
|
|
33
|
+
|
|
34
|
+
## [0.6.0] - 2026-06-01
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- **Token Compressor Engine**: Native Node.js implementation of RTK (Rust Token Killer) filtering strategies
|
|
38
|
+
- `compress_output` MCP tool to execute commands and get token-optimized output
|
|
39
|
+
- 12 intelligent filtering strategies (stats extraction, error focus, grouping, deduplication, JSON structure, etc.)
|
|
40
|
+
- Transparent `hooks/post-command-compress.js` for automatic Claude Code output compression
|
|
41
|
+
- Cross-platform support (Windows natively supported without shell script dependencies)
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
- Token compressor generic truncation aggressively stripping `git diff` output. It now completely preserves actual code changes (RTK philosophy) while stripping index noise.
|
|
45
|
+
- AST Javascript/Typescript indexer failing to extract destructured variables (`const { x } = obj;`).
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
- **Polyglot AST Extraction**: Removed fragile Regex fallbacks for Python, Go, and Rust. They now use exact Abstract Syntax Tree parsing via `tree-sitter` bindings (`tree-sitter-python`, `tree-sitter-go`, `tree-sitter-rust`).
|
|
49
|
+
- Implemented lazy loading for dynamic languages via `@ast-grep/napi`'s `registerDynamicLanguage` so the C++ grammar binaries are loaded natively without requiring manual compilation.
|
|
50
|
+
- Added `tree-sitter-*` grammars as `optionalDependencies` so installation never blocks on Windows systems missing build tools (gracefully falls back to Regex if unavailable).
|
|
51
|
+
## [0.5.0] - 2026-06-01
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
- `detect_environment` tool for cross-platform command safety (OS, shell, package manager detection)
|
|
55
|
+
- Automated setup script (`scripts/setup.js`) for Claude Code and Codex onboarding
|
|
56
|
+
- MCP compatibility mode: setup auto-disables redundant tools when equivalent MCP servers (Serena, Graphify) are detected
|
|
57
|
+
- Multi-language symbol extraction: Bash/Shell, SQL, YAML via regex
|
|
58
|
+
- Codex MCP configuration support in `~/.codex/config.toml`
|
|
59
|
+
- Repo-level MCP cleanup: removes redundant server entries in `.mcp.json`, `.claude/settings.json`, `.codex/config.toml`
|
|
60
|
+
- Compatibility checks across global and repo-level MCP configs with duplicate capability reporting
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
- MCP stdio startup failure by converting `detect-environment.js` to proper ESM exports
|
|
64
|
+
- Removed `jq` dependency from `hooks/post-write-symbol-check.sh` — now parses JSON with Node.js
|
|
65
|
+
- Post-write hook false positives for imported external bindings (e.g., `fileURLToPath`, `path.basename`)
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
- Setup hardened for commercial project installation with `--project` flag, backups before config writes, safer Codex TOML cleanup
|
|
69
|
+
|
|
70
|
+
## [0.1.0] - 2024-12-01
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
- Core anti-hallucination system: `check_symbols` with fuzzy matching, `refresh_symbols`, `reindex_project`, `get_project_overview`
|
|
74
|
+
- AST-based symbol extraction via `@ast-grep/napi` (tree-sitter) for JavaScript/TypeScript/TSX
|
|
75
|
+
- Regex fallback extractors for Python, Go, Rust
|
|
76
|
+
- Post-write hook (`hooks/post-write-symbol-check.sh`) for automatic hallucination detection after Write/Edit
|
|
77
|
+
- Standalone symbol checker (`hooks/symbol-check.mjs`)
|
|
78
|
+
- Compatible with Claude Code (`PostToolUse` hooks) and Codex (`post_write` hooks)
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
- **Fork from InfiniQuest-App/wisdom-store**: Reduced from 24 tools to 4 essential tools (-83%)
|
|
82
|
+
- Removed ~12,000 lines of redundant code (-94% reduction)
|
|
83
|
+
- Eliminated 9 internal libraries overlapping with Serena MCP and GSD Skills
|
|
84
|
+
- Removed all context manipulation tools (Linux-only, replaced by Claude Code's native auto-compact)
|
|
85
|
+
- Removed all wisdom/memory management tools (replaced by Serena MCP's `write_memory`/`read_memory`)
|
|
86
|
+
- Removed all archive/condense tools (niche functionality)
|
|
87
|
+
|
|
88
|
+
[0.7.1]: https://github.com/Akunimal/Anti-Hallucination-MCP/compare/v0.7.0...v0.7.1
|
|
89
|
+
[0.7.0]: https://github.com/Akunimal/Anti-Hallucination-MCP/compare/v0.6.0...v0.7.0
|
|
90
|
+
[0.6.0]: https://github.com/Akunimal/Anti-Hallucination-MCP/compare/v0.5.0...v0.6.0
|
|
91
|
+
[0.5.0]: https://github.com/Akunimal/Anti-Hallucination-MCP/compare/v0.1.0...v0.5.0
|
|
92
|
+
[0.1.0]: https://github.com/Akunimal/Anti-Hallucination-MCP/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michael Johnson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|