verifiable-thinking-mcp 0.5.1 → 0.6.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.
Files changed (73) hide show
  1. package/README.md +5 -5
  2. package/dist/index.js +144 -144
  3. package/package.json +2 -2
  4. package/src/{lib/compute → compute}/context.ts +1 -1
  5. package/src/{lib/compute → compute}/filter.ts +1 -1
  6. package/src/{lib/compute → compute}/registry.ts +9 -17
  7. package/src/{lib/compute → compute}/solvers/derivation-core.ts +1 -1
  8. package/src/{lib/compute → compute}/solvers/derivation-mistakes.ts +1 -1
  9. package/src/{lib/compute → compute}/solvers/derivation-simplify.ts +2 -2
  10. package/src/{lib/compute → compute}/solvers/formula.ts +6 -1
  11. package/src/{lib/domain.ts → domain/detection.ts} +1 -1
  12. package/src/domain/index.ts +37 -0
  13. package/src/{lib → domain}/verification.ts +9 -10
  14. package/src/index.ts +5 -1
  15. package/src/{lib → infra}/cache.ts +1 -1
  16. package/src/infra/index.ts +2 -0
  17. package/src/{lib/judge.ts → judge/index.ts} +1 -1
  18. package/src/prompts/templates.ts +10 -12
  19. package/src/resources/sessions.ts +1 -1
  20. package/src/session/index.ts +2 -0
  21. package/src/{lib/session.ts → session/manager.ts} +1 -1
  22. package/src/text/compression.ts +1217 -0
  23. package/src/{lib → text}/extraction.ts +44 -44
  24. package/src/text/index.ts +4 -0
  25. package/src/text/tokens-fast.ts +181 -0
  26. package/src/{lib → text}/tokens.ts +1 -1
  27. package/src/{lib/think → think}/complexity.ts +3 -3
  28. package/src/{lib/think → think}/confidence-drift.ts +1 -1
  29. package/src/{lib/think → think}/guidance.ts +5 -20
  30. package/src/{lib/think → think}/helpers.ts +8 -4
  31. package/src/{lib/think → think}/index.ts +0 -1
  32. package/src/{lib/think → think}/route.ts +1 -1
  33. package/src/{lib/think → think}/scratchpad-schema.ts +24 -13
  34. package/src/tools/compress.ts +3 -3
  35. package/src/tools/index.ts +1 -1
  36. package/src/tools/scratchpad.ts +29 -29
  37. package/src/tools/sessions.ts +3 -3
  38. package/src/lib/compression.ts +0 -878
  39. package/src/lib/index.ts +0 -122
  40. /package/src/{lib/compute → compute}/cache.ts +0 -0
  41. /package/src/{lib/compute → compute}/classifier.ts +0 -0
  42. /package/src/{lib/compute → compute}/confidence.ts +0 -0
  43. /package/src/{lib/compute → compute}/extract.ts +0 -0
  44. /package/src/{lib/compute → compute}/index.ts +0 -0
  45. /package/src/{lib/compute → compute}/math.ts +0 -0
  46. /package/src/{lib/compute → compute}/patterns.ts +0 -0
  47. /package/src/{lib/compute → compute}/solvers/arithmetic.ts +0 -0
  48. /package/src/{lib/compute → compute}/solvers/calculus.ts +0 -0
  49. /package/src/{lib/compute → compute}/solvers/derivation-latex.ts +0 -0
  50. /package/src/{lib/compute → compute}/solvers/derivation-transform.ts +0 -0
  51. /package/src/{lib/compute → compute}/solvers/derivation.ts +0 -0
  52. /package/src/{lib/compute → compute}/solvers/facts.ts +0 -0
  53. /package/src/{lib/compute → compute}/solvers/index.ts +0 -0
  54. /package/src/{lib/compute → compute}/solvers/logic.ts +0 -0
  55. /package/src/{lib/compute → compute}/solvers/probability.ts +0 -0
  56. /package/src/{lib/compute → compute}/solvers/statistics.ts +0 -0
  57. /package/src/{lib/compute → compute}/solvers/word-problems.ts +0 -0
  58. /package/src/{lib/compute → compute}/types.ts +0 -0
  59. /package/src/{lib/LRUCache.ts → infra/lru-cache.ts} +0 -0
  60. /package/src/{lib/math → math}/ast.ts +0 -0
  61. /package/src/{lib/math → math}/index.ts +0 -0
  62. /package/src/{lib/math → math}/operators.ts +0 -0
  63. /package/src/{lib/math → math}/tokenizer.ts +0 -0
  64. /package/src/{lib → session}/concepts.ts +0 -0
  65. /package/src/{lib → text}/patterns.ts +0 -0
  66. /package/src/{lib/think → think}/challenge.ts +0 -0
  67. /package/src/{lib/think → think}/consistency.ts +0 -0
  68. /package/src/{lib/think → think}/hypothesis.ts +0 -0
  69. /package/src/{lib/think → think}/prompts.ts +0 -0
  70. /package/src/{lib/think → think}/schema.ts +0 -0
  71. /package/src/{lib/think → think}/spot-check.ts +0 -0
  72. /package/src/{lib/think → think}/types.ts +0 -0
  73. /package/src/{lib/think → think}/verification.ts +0 -0
package/README.md CHANGED
@@ -56,7 +56,7 @@ Add to Claude Desktop (`claude_desktop_config.json`):
56
56
  | 🔍 **Contradiction Detection** | Catches "Let x=5" then "Now x=10" across steps |
57
57
  | 🌿 **Hypothesis Branching** | Explore alternatives, auto-detects when branches confirm/refute |
58
58
  | 🔢 **Local Math** | Evaluates expressions without LLM round-trips |
59
- | 🗜️ **Smart Compression** | 56.8% token savings with query-aware CPC compression |
59
+ | 🗜️ **Smart Compression** | 49% token savings with telegraphic + sentence-level compression |
60
60
  | ⚡ **Real Token Counting** | Tiktoken integration—3,922× cache speedup, zero estimation error |
61
61
 
62
62
  ## Token Efficiency
@@ -65,7 +65,7 @@ Every operation counts. Verifiable Thinking uses **real token counting** (tiktok
65
65
 
66
66
  ```typescript
67
67
  // Traditional reasoning: ~1,350 tokens for 10-step chain
68
- // Verifiable Thinking: ~580 tokens (56.8% savings)
68
+ // Verifiable Thinking: ~580 tokens (49–57% savings)
69
69
 
70
70
  // Real token counting (not estimation)
71
71
  countTokens("What is 2+2?") // → 7 tokens (not 3)
@@ -187,9 +187,9 @@ scratchpad({ operation: "complete", final_answer: "$0.05" })
187
187
  | Local compute | ❌ | ✅ |
188
188
  | Token budgets | ❌ | Soft + hard limits |
189
189
  | Real token counting | ❌ | Tiktoken (3,922× cache speedup) |
190
- | Compression | ❌ | 56.8% token savings |
190
+ | Compression | ❌ | 49–57% token savings |
191
191
 
192
- Sequential Thinking is ~100 lines. This is 22,000+ with 1,831 tests.
192
+ Sequential Thinking is ~100 lines. This is 22,000+ with 1,967 tests.
193
193
 
194
194
  See [`docs/competitive-analysis.md`](docs/competitive-analysis.md) for full breakdown.
195
195
 
@@ -199,7 +199,7 @@ See [`docs/competitive-analysis.md`](docs/competitive-analysis.md) for full brea
199
199
  git clone https://github.com/CoderDayton/verifiable-thinking-mcp.git
200
200
  cd verifiable-thinking-mcp && bun install
201
201
  bun run dev # Interactive MCP Inspector
202
- bun test # 1,831 tests
202
+ bun test # 1,967 tests
203
203
  ```
204
204
 
205
205
  ## License