@oomkapwn/enquire-mcp 3.5.14 → 3.6.0-rc.2
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 +124 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +498 -0
- package/dist/cli.js.map +1 -0
- package/dist/eval.js +1 -1
- package/dist/eval.js.map +1 -1
- package/dist/index.d.ts +11 -149
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -2797
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts +3 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +677 -0
- package/dist/prompts.js.map +1 -0
- package/dist/server.d.ts +190 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +701 -0
- package/dist/server.js.map +1 -0
- package/dist/tool-manifest.d.ts +34 -0
- package/dist/tool-manifest.d.ts.map +1 -0
- package/dist/tool-manifest.js +278 -0
- package/dist/tool-manifest.js.map +1 -0
- package/dist/tool-registry.d.ts +43 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tool-registry.js +940 -0
- package/dist/tool-registry.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/media.d.ts +182 -0
- package/dist/tools/media.d.ts.map +1 -0
- package/dist/tools/media.js +304 -0
- package/dist/tools/media.js.map +1 -0
- package/dist/tools/meta.d.ts +201 -0
- package/dist/tools/meta.d.ts.map +1 -0
- package/dist/tools/meta.js +752 -0
- package/dist/tools/meta.js.map +1 -0
- package/dist/tools/read.d.ts +251 -0
- package/dist/tools/read.d.ts.map +1 -0
- package/dist/tools/read.js +643 -0
- package/dist/tools/read.js.map +1 -0
- package/dist/tools/search.d.ts +279 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +891 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/write.d.ts +145 -0
- package/dist/tools/write.d.ts.map +1 -0
- package/dist/tools/write.js +560 -0
- package/dist/tools/write.js.map +1 -0
- package/package.json +1 -1
- package/dist/tools.d.ts +0 -980
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -3132
- package/dist/tools.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,130 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [3.6.0-rc.2] — 2026-05-15
|
|
6
|
+
|
|
7
|
+
> **TL;DR:** v3.6.0 Phase 2 of 4 — `src/index.ts` (3665 lines) split into 5 domain modules (`cli.ts` 702 + `server.ts` 877 + `tool-registry.ts` 1300 + `prompts.ts` 790) plus a slim 84-line entry point. NEW `src/tool-manifest.ts` (318 lines, 44 machine-readable tool entries) becomes the single source of truth — `tests/docs-consistency.test.ts` pivoted off regex-parsing source code and reads the manifest directly. Pure refactor: same CLI surface, same registered tools, same 712 tests pass. Published under npm dist-tag `rc`.
|
|
8
|
+
|
|
9
|
+
**Pre-release — v3.6.0 sprint Phase 2.**
|
|
10
|
+
|
|
11
|
+
### Changed — `src/index.ts` (3665 lines) → domain modules
|
|
12
|
+
|
|
13
|
+
Phase 1 (rc.1) split `tools.ts`. This RC does the same for `index.ts`. The pre-refactor file packed CLI definition, MCP server construction, tool registration, prompt definitions, sync routines, and utility helpers into a single 3665-line monolith. After rc.2:
|
|
14
|
+
|
|
15
|
+
| File | Lines | Purpose |
|
|
16
|
+
|---|---:|---|
|
|
17
|
+
| `src/index.ts` (slim) | 84 | `VERSION` literal (kept here so `scripts/check-version-consistency.mjs` regex still finds it) + CLI-entry guard + re-exports (`main`, `parsePositiveInt`, `parseQuantizationMode`, `startServer`, `buildMcpServer`, `buildEmbedText`, `formatReadyBanner`, `prepareServerDeps`, types `ServeOptions` / `ServerDeps`) |
|
|
18
|
+
| `src/cli.ts` | 702 | `main()` + commander program definition (all 12 subcommands) |
|
|
19
|
+
| `src/server.ts` | 877 | MCP server construction: `ServeOptions`, `ServerDeps`, `prepareServerDeps`, `buildMcpServer`, `startServer`, `formatReadyBanner`, `buildEmbedText`, `syncEmbedDb` / `syncFtsIndex` / `syncPdfFtsIndex` / `syncPdfEmbedDb` |
|
|
20
|
+
| `src/tool-registry.ts` | 1300 | `registerFtsTools` + `registerReadTools` + `registerWriteTools` + `registerResources` + `registerChunkResource` + helpers (`embedDbPath`, `parsePositiveInt`, `parseQuantizationMode`, `encodeNotePath`, `decodeNotePath`, `textResult`) |
|
|
21
|
+
| `src/prompts.ts` | 790 | `registerPrompts` with all 19 MCP prompt definitions |
|
|
22
|
+
|
|
23
|
+
The slim `index.ts` keeps the v3.5.x re-export surface so `src/http-transport.ts` + tests + external consumers don't need to know about the new layout. Module dependency graph is cycle-safe (the `cli.ts` ↔ `index.ts` VERSION cycle is a literal-value cycle, evaluated at module-init time; runtime-only, no TDZ surprises).
|
|
24
|
+
|
|
25
|
+
### Added — `src/tool-manifest.ts` (318 lines, 44 entries)
|
|
26
|
+
|
|
27
|
+
Machine-readable manifest of every MCP tool: `name`, `kind` (`read` | `fts` | `write` | `diagnostic`), `gating` (the `--persistent-index` / `--enable-write` / etc. clause), and a 1-line `summary`. Entries:
|
|
28
|
+
|
|
29
|
+
| Kind | Count | Gating |
|
|
30
|
+
|---|---:|---|
|
|
31
|
+
| `read` | 33 | always-on |
|
|
32
|
+
| `fts` | 1 | `--persistent-index + --diagnostic-search-tools` |
|
|
33
|
+
| `diagnostic` | 3 | `--diagnostic-search-tools` |
|
|
34
|
+
| `write` | 7 | `--enable-write` |
|
|
35
|
+
| **Total** | **44** | (matches the count math invariant in `tests/docs-consistency.test.ts`) |
|
|
36
|
+
|
|
37
|
+
The full `registerTool()` description argument stays at the registration site so MCP clients still see verbatim what they did pre-refactor. The manifest's `summary` is a 1-line distillation for docs / future auto-generation use cases.
|
|
38
|
+
|
|
39
|
+
### Changed — `tests/docs-consistency.test.ts` pivots to TOOL_MANIFEST
|
|
40
|
+
|
|
41
|
+
Pre-v3.6.0-rc.2, this file regex-parsed `src/index.ts` for `registerTool(` patterns + `function registerWriteTools(` markers + `if (diagnosticSearchTools) server.registerTool(` gating syntax. After the rc.2 monolith split, those patterns moved to `tool-registry.ts` — but rather than chase the regex paths, we **pivoted the entire tool-count invariants to read `TOOL_MANIFEST` directly**. Type-safe, no regex brittleness, single source of truth.
|
|
42
|
+
|
|
43
|
+
Surfaces still parsed by regex (no manifest yet):
|
|
44
|
+
- `src/prompts.ts` — registerPrompt() names (possible v3.6.0-rc.3: introduce `PROMPT_MANIFEST`)
|
|
45
|
+
- `src/cli.ts` — `.command()` subcommand names + the `serve` / `serve-http` flag blocks (for the shared-help-strings invariant)
|
|
46
|
+
|
|
47
|
+
### Validation
|
|
48
|
+
|
|
49
|
+
712 unit tests pass · 31 test files · branches 75.29% · lines 89.54% · statements 86.06% · functions 82.15% · lint clean (1 pre-existing info note about biome schema 2.4.15 vs locally-cached 2.4.14 CLI — resolves on CI which installs 2.4.15 fresh) · `tsc` strict + `noUncheckedIndexedAccess` clean · smoke pass · version-consistency green at `3.6.0-rc.2` (5 surfaces).
|
|
50
|
+
|
|
51
|
+
### Migration
|
|
52
|
+
|
|
53
|
+
**No-op for consumers.** Public npm package surface (44 tools, 19 prompts, CLI flags, `package.json` `exports` sub-paths) is identical. The refactor is internal file structure + new `tool-manifest.ts` as a documentation source-of-truth.
|
|
54
|
+
|
|
55
|
+
For contributors:
|
|
56
|
+
- `import { TOOL_MANIFEST } from "@oomkapwn/enquire-mcp/dist/tool-manifest.js"` — programmatically iterate tools by kind / gating / summary.
|
|
57
|
+
- `src/index.ts` re-exports the v3.5.x surface unchanged. Imports from `./index.js` continue to work.
|
|
58
|
+
|
|
59
|
+
### Method note
|
|
60
|
+
|
|
61
|
+
This RC removed an entire **class of brittleness** (regex-parsing source code to extract structured data). Replaced with type-safe, IDE-completable iteration over a typed const array. The methodology: when refactor causes drift in tests, don't chase the regex — pivot the test to a machine-readable structure that survives future refactors.
|
|
62
|
+
|
|
63
|
+
### npm dist-tag
|
|
64
|
+
|
|
65
|
+
Published under **`rc`** dist-tag. Users on `latest` stay on v3.5.14. To try: `npm install @oomkapwn/enquire-mcp@rc`.
|
|
66
|
+
|
|
67
|
+
### Next RC
|
|
68
|
+
|
|
69
|
+
`v3.6.0-rc.3`: Full TSDoc (`@param` / `@returns` / `@example`) on 44 tools + 19 prompts + 20 `src/` modules (~1300+ lines of doc-comments). Setup for `v3.6.0-rc.4` TypeDoc auto-generation.
|
|
70
|
+
|
|
71
|
+
## [3.6.0-rc.1] — 2026-05-15
|
|
72
|
+
|
|
73
|
+
> **TL;DR:** v3.6.0 Phase 1 of 4 — `src/tools.ts` (4252 lines) split into 5 domain modules under `src/tools/` with a barrel re-export. Pure refactor: same exported surface, same signatures, all 712 tests pass. Published to npm under dist-tag `rc` (NOT `latest`); install with `npm i @oomkapwn/enquire-mcp@rc` to try.
|
|
74
|
+
|
|
75
|
+
**Pre-release — v3.6.0 sprint Phase 1.** First RC of the v3.6.0 minor release. The sprint goal (`CLAUDE.md` in repo root) is split into 4 phased RCs + stable promotion; each RC is independently testable on the `rc` dist-tag before the final `latest` promotion.
|
|
76
|
+
|
|
77
|
+
### Changed — `src/tools.ts` (4252 lines) → `src/tools/` (5 domain files + barrel)
|
|
78
|
+
|
|
79
|
+
The monolith `tools.ts` was the **#1 finding across 3 independent external audits** (Mavis ×2, MiniMax) — every audit flagged it as the only blocker between the project and a clean top-tier rating. This RC closes it.
|
|
80
|
+
|
|
81
|
+
| Domain | File | Lines | Exports | What's inside |
|
|
82
|
+
|---|---|---|---|---|
|
|
83
|
+
| Search | `src/tools/search.ts` | 1224 | 19 | `searchText`, `semanticSearch`, `embeddingsSearch`, `searchHybrid`, `findSimilar`, `pickEmbedTextForHyde` + TF-IDF helpers (`tokenizeForTfidf`, `buildTfidfIndex`, `sliceSnippet`) + types (`SearchMode`, `SearchHit`, `SearchResponse`, `SemanticHit`, `EmbedHit`, `EmbedSearchResponse`, `HnswSearchContext`, `SimilarNote`, `SearchHybridHit`, `SearchHybridResponse`) |
|
|
84
|
+
| Write | `src/tools/write.ts` | 682 | 21 | `createNote`, `appendToNote`, `renameNote`, `archiveNote`, `replaceInNotes`, `frontmatterSet` + helpers (`rewriteRawTarget`, `rewriteOutsideCodeFences`, `replaceStringOutsideCodeFences`, `composeNote`, `suggestSimilar`, `resolveTarget`, `extractFrontmatterTagsLower`, `resolvePeriodicAlias`) + types |
|
|
85
|
+
| Read | `src/tools/read.ts` | 864 | 28 | `listNotes`, `readNote`, `getRecentEdits`, `listTags`, `getVaultStats`, `resolveWikilink`, `getBacklinks`, `getUnresolvedWikilinks`, `getOutboundLinks`, `getNoteNeighbors`, `frontmatterGet`, `frontmatterSearch`, `dataviewQuery`, `chatThreadRead`, `chatThreadAppend` + helpers (`extractHeadings`) + types |
|
|
86
|
+
| Media | `src/tools/media.ts` | 516 | 16 | `listPdfs`, `readPdf`, `ocrPdf`, `listCanvases`, `readCanvas` + types |
|
|
87
|
+
| Meta | `src/tools/meta.ts` | 984 | 26 | `contextPack`, `validateNoteProposal`, `lintWiki`, `getOpenQuestions`, `paperAudit`, `findPath`, `openInUi` + helpers (`jaccard`, `intersectionSize`, `ngrams`, `indexFor`, `findBestMatch`, `stripMd`, `normalizeTag`) + types |
|
|
88
|
+
| Barrel | `src/tools/index.ts` | 5 | re-export | `export * from "./search.js"; ...` |
|
|
89
|
+
| **Total** | **6 files** | **4275** | **110** | (+23 lines: previously-private helpers became `export` for cross-domain use) |
|
|
90
|
+
|
|
91
|
+
### Changed — import paths
|
|
92
|
+
|
|
93
|
+
- `src/index.ts`: `from "./tools.js"` → `from "./tools/index.js"`
|
|
94
|
+
- `src/eval.ts`: same
|
|
95
|
+
- 15 test files updated identically. Pure path swap, no API changes.
|
|
96
|
+
|
|
97
|
+
### Helper visibility — what changed and why
|
|
98
|
+
|
|
99
|
+
A handful of previously-private helpers became exported so cross-domain functions can share them via ES module imports. Each is benign (used only inside async function bodies, no runtime cycles). The barrel re-exports them transparently. List in commit message + below for traceability:
|
|
100
|
+
|
|
101
|
+
- `meta.ts` exports (new): `jaccard`, `intersectionSize`, `ngrams`, `indexFor`, `findBestMatch`, `stripMd`, `normalizeTag`
|
|
102
|
+
- `search.ts` exports (new): `sliceSnippet`, `tokenizeForTfidf`, `buildTfidfIndex`
|
|
103
|
+
- `write.ts` exports (new): `composeNote`, `extractFrontmatterTagsLower`, `resolvePeriodicAlias`, `suggestSimilar`, `resolveTarget`, `rewriteRawTarget`, `rewriteOutsideCodeFences`, `replaceStringOutsideCodeFences`
|
|
104
|
+
|
|
105
|
+
These now appear in the public barrel surface. They are NOT part of `package.json` `exports` (which only re-exports `embed-db`, `fts5`, `vault`, `hnsw`, `bases`, `communities`) — so no SemVer contract change. STABILITY.md surface unaffected.
|
|
106
|
+
|
|
107
|
+
### Migration
|
|
108
|
+
|
|
109
|
+
**No-op for consumers.** The npm package's public API surface (44 MCP tools, CLI flags, exported sub-paths) is identical. The refactor is purely internal file structure.
|
|
110
|
+
|
|
111
|
+
For contributors who imported from `src/tools.ts` directly:
|
|
112
|
+
- Old: `import { createNote } from "@oomkapwn/enquire-mcp/dist/tools.js"`
|
|
113
|
+
- New: `import { createNote } from "@oomkapwn/enquire-mcp/dist/tools/index.js"`
|
|
114
|
+
|
|
115
|
+
But `src/tools.ts` was never in `package.json` `exports`, so this import path was never officially supported. No breakage on supported paths.
|
|
116
|
+
|
|
117
|
+
### Tests
|
|
118
|
+
|
|
119
|
+
712 unit tests pass · 31 test files · branches 75.29% · lines 89.54% · statements 86.06% · functions 82.15% · lint clean · `tsc` strict clean · smoke pass (synthetic vault scan + FTS5 path + bearer auth).
|
|
120
|
+
|
|
121
|
+
### npm dist-tag
|
|
122
|
+
|
|
123
|
+
Published under **`rc`** dist-tag, NOT `latest`. Users on `latest` stay on v3.5.14. To try this RC: `npm install @oomkapwn/enquire-mcp@rc`.
|
|
124
|
+
|
|
125
|
+
### Next RC
|
|
126
|
+
|
|
127
|
+
`v3.6.0-rc.2`: split `src/index.ts` (3665 lines) → `src/cli/*` + `src/server.ts` + `src/prompts.ts` + `src/tool-registry.ts` + machine-readable `src/tool-manifest.ts`.
|
|
128
|
+
|
|
5
129
|
## [3.5.14] — 2026-05-14
|
|
6
130
|
|
|
7
131
|
> **TL;DR:** External audit #5 (MiniMax, 4.7/5.0). Surface-only cleanup: added TL;DR headers to v3.5.9..v3.5.13 entries for skimability + documented the rejected L-2 finding (deps dual-listing is needed, not cosmetic). No code changes.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAiCA,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA4pB1C"}
|