@oomkapwn/enquire-mcp 3.7.11 → 3.7.12
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 +48 -0
- package/README.md +4 -4
- package/dist/bases.d.ts +14 -0
- package/dist/bases.d.ts.map +1 -1
- package/dist/bases.js +34 -4
- package/dist/bases.js.map +1 -1
- package/dist/http-transport.d.ts +18 -0
- package/dist/http-transport.d.ts.map +1 -1
- package/dist/http-transport.js +34 -1
- package/dist/http-transport.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/media.d.ts.map +1 -1
- package/dist/tools/media.js +5 -1
- package/dist/tools/media.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +12 -1
- package/dist/tools/search.js.map +1 -1
- package/dist/tools.d.ts +980 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +3132 -0
- package/dist/tools.js.map +1 -0
- package/docs/QUICKSTART.md +1 -1
- package/docs/api-reference/.nojekyll +1 -0
- package/docs/api-reference/assets/hierarchy.js +1 -0
- package/docs/api-reference/assets/highlight.css +71 -0
- package/docs/api-reference/assets/icons.js +18 -0
- package/docs/api-reference/assets/icons.svg +1 -0
- package/docs/api-reference/assets/main.js +60 -0
- package/docs/api-reference/assets/navigation.js +1 -0
- package/docs/api-reference/assets/search.js +1 -0
- package/docs/api-reference/assets/style.css +1633 -0
- package/docs/api-reference/functions/index.buildEmbedText.html +15 -0
- package/docs/api-reference/functions/index.buildMcpServer.html +4 -0
- package/docs/api-reference/functions/index.formatReadyBanner.html +4 -0
- package/docs/api-reference/functions/index.main.html +1 -0
- package/docs/api-reference/functions/index.parsePositiveInt.html +1 -0
- package/docs/api-reference/functions/index.parseQuantizationMode.html +5 -0
- package/docs/api-reference/functions/index.prepareServerDeps.html +5 -0
- package/docs/api-reference/functions/index.startServer.html +1 -0
- package/docs/api-reference/functions/tools.appendToNote.html +17 -0
- package/docs/api-reference/functions/tools.archiveNote.html +15 -0
- package/docs/api-reference/functions/tools.assertHnswModelMatchesEmbedder.html +13 -0
- package/docs/api-reference/functions/tools.chatThreadAppend.html +22 -0
- package/docs/api-reference/functions/tools.chatThreadRead.html +16 -0
- package/docs/api-reference/functions/tools.contextPack.html +21 -0
- package/docs/api-reference/functions/tools.createNote.html +19 -0
- package/docs/api-reference/functions/tools.dataviewQuery.html +16 -0
- package/docs/api-reference/functions/tools.embeddingsSearch.html +40 -0
- package/docs/api-reference/functions/tools.findPath.html +23 -0
- package/docs/api-reference/functions/tools.findSimilar.html +21 -0
- package/docs/api-reference/functions/tools.frontmatterGet.html +15 -0
- package/docs/api-reference/functions/tools.frontmatterSearch.html +16 -0
- package/docs/api-reference/functions/tools.frontmatterSet.html +19 -0
- package/docs/api-reference/functions/tools.getBacklinks.html +15 -0
- package/docs/api-reference/functions/tools.getNoteNeighbors.html +16 -0
- package/docs/api-reference/functions/tools.getOpenQuestions.html +19 -0
- package/docs/api-reference/functions/tools.getOutboundLinks.html +16 -0
- package/docs/api-reference/functions/tools.getRecentEdits.html +14 -0
- package/docs/api-reference/functions/tools.getUnresolvedWikilinks.html +14 -0
- package/docs/api-reference/functions/tools.getVaultStats.html +13 -0
- package/docs/api-reference/functions/tools.lintWiki.html +20 -0
- package/docs/api-reference/functions/tools.listCanvases.html +16 -0
- package/docs/api-reference/functions/tools.listNotes.html +19 -0
- package/docs/api-reference/functions/tools.listPdfs.html +15 -0
- package/docs/api-reference/functions/tools.listTags.html +14 -0
- package/docs/api-reference/functions/tools.ocrPdf.html +18 -0
- package/docs/api-reference/functions/tools.openInUi.html +17 -0
- package/docs/api-reference/functions/tools.paperAudit.html +16 -0
- package/docs/api-reference/functions/tools.pickEmbedTextForHyde.html +8 -0
- package/docs/api-reference/functions/tools.readCanvas.html +19 -0
- package/docs/api-reference/functions/tools.readNote.html +20 -0
- package/docs/api-reference/functions/tools.readPdf.html +18 -0
- package/docs/api-reference/functions/tools.renameNote.html +24 -0
- package/docs/api-reference/functions/tools.replaceInNotes.html +20 -0
- package/docs/api-reference/functions/tools.resolveTarget.html +24 -0
- package/docs/api-reference/functions/tools.resolveWikilink.html +20 -0
- package/docs/api-reference/functions/tools.searchHybrid.html +62 -0
- package/docs/api-reference/functions/tools.searchText.html +19 -0
- package/docs/api-reference/functions/tools.semanticSearch.html +19 -0
- package/docs/api-reference/functions/tools.validateNoteProposal.html +19 -0
- package/docs/api-reference/hierarchy.html +1 -0
- package/docs/api-reference/index.html +1 -0
- package/docs/api-reference/interfaces/index.ServeOptions.html +74 -0
- package/docs/api-reference/interfaces/index.ServerDeps.html +27 -0
- package/docs/api-reference/interfaces/tool-manifest.ToolManifestEntry.html +33 -0
- package/docs/api-reference/interfaces/tools.ArchiveNoteArgs.html +12 -0
- package/docs/api-reference/interfaces/tools.BacklinkHit.html +15 -0
- package/docs/api-reference/interfaces/tools.CanvasEdge.html +19 -0
- package/docs/api-reference/interfaces/tools.CanvasSummary.html +16 -0
- package/docs/api-reference/interfaces/tools.ChatThreadAppendArgs.html +10 -0
- package/docs/api-reference/interfaces/tools.ChatThreadMessage.html +14 -0
- package/docs/api-reference/interfaces/tools.ChatThreadReadResult.html +10 -0
- package/docs/api-reference/interfaces/tools.ContextPackArgs.html +12 -0
- package/docs/api-reference/interfaces/tools.ContextPackResult.html +20 -0
- package/docs/api-reference/interfaces/tools.EmbedHit.html +21 -0
- package/docs/api-reference/interfaces/tools.EmbedSearchResponse.html +14 -0
- package/docs/api-reference/interfaces/tools.FindPathResult.html +17 -0
- package/docs/api-reference/interfaces/tools.FrontmatterSearchArgs.html +20 -0
- package/docs/api-reference/interfaces/tools.FrontmatterSetArgs.html +13 -0
- package/docs/api-reference/interfaces/tools.HnswSearchContext.html +21 -0
- package/docs/api-reference/interfaces/tools.LintWikiArgs.html +14 -0
- package/docs/api-reference/interfaces/tools.LintWikiFinding.html +14 -0
- package/docs/api-reference/interfaces/tools.LintWikiResult.html +9 -0
- package/docs/api-reference/interfaces/tools.NoteNeighbors.html +17 -0
- package/docs/api-reference/interfaces/tools.NoteReadFull.html +20 -0
- package/docs/api-reference/interfaces/tools.NoteReadMap.html +25 -0
- package/docs/api-reference/interfaces/tools.NoteSummary.html +14 -0
- package/docs/api-reference/interfaces/tools.OcrPdfArgs.html +16 -0
- package/docs/api-reference/interfaces/tools.OcrPdfPage.html +15 -0
- package/docs/api-reference/interfaces/tools.OcrPdfResult.html +18 -0
- package/docs/api-reference/interfaces/tools.OpenInUiResult.html +11 -0
- package/docs/api-reference/interfaces/tools.OpenQuestion.html +20 -0
- package/docs/api-reference/interfaces/tools.OutboundLink.html +20 -0
- package/docs/api-reference/interfaces/tools.PaperAuditFinding.html +17 -0
- package/docs/api-reference/interfaces/tools.PathStep.html +9 -0
- package/docs/api-reference/interfaces/tools.PdfSummary.html +9 -0
- package/docs/api-reference/interfaces/tools.ReadCanvasResult.html +15 -0
- package/docs/api-reference/interfaces/tools.ReadPdfArgs.html +8 -0
- package/docs/api-reference/interfaces/tools.ReadPdfPage.html +13 -0
- package/docs/api-reference/interfaces/tools.ReadPdfResult.html +18 -0
- package/docs/api-reference/interfaces/tools.RenameNoteResult.html +14 -0
- package/docs/api-reference/interfaces/tools.RenameProposal.html +13 -0
- package/docs/api-reference/interfaces/tools.ReplaceInNotesArgs.html +15 -0
- package/docs/api-reference/interfaces/tools.ReplaceInNotesFileResult.html +6 -0
- package/docs/api-reference/interfaces/tools.ReplaceInNotesResult.html +21 -0
- package/docs/api-reference/interfaces/tools.SearchHit.html +16 -0
- package/docs/api-reference/interfaces/tools.SearchHybridHit.html +30 -0
- package/docs/api-reference/interfaces/tools.SearchHybridResponse.html +23 -0
- package/docs/api-reference/interfaces/tools.SearchResponse.html +13 -0
- package/docs/api-reference/interfaces/tools.SemanticHit.html +15 -0
- package/docs/api-reference/interfaces/tools.SimilarNote.html +15 -0
- package/docs/api-reference/interfaces/tools.TagSummary.html +13 -0
- package/docs/api-reference/interfaces/tools.UnresolvedWikilink.html +22 -0
- package/docs/api-reference/interfaces/tools.ValidateProposalArgs.html +10 -0
- package/docs/api-reference/interfaces/tools.ValidateProposalResult.html +14 -0
- package/docs/api-reference/interfaces/tools.VaultStats.html +26 -0
- package/docs/api-reference/modules/index.html +1 -0
- package/docs/api-reference/modules/tool-manifest.html +1 -0
- package/docs/api-reference/modules/tools.html +1 -0
- package/docs/api-reference/types/tools.CanvasNode.html +7 -0
- package/docs/api-reference/types/tools.SearchMode.html +7 -0
- package/docs/api-reference/variables/index.VERSION.html +9 -0
- package/docs/api-reference/variables/tool-manifest.TOOL_MANIFEST.html +1 -0
- package/docs/http-transport.md +12 -4
- package/package.json +6 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>resolveTarget | enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">resolveTarget</a></li></ul><h1>Function resolveTarget</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resolvetarget"><span class="tsd-kind-call-signature">resolveTarget</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">FileEntry</span><span class="tsd-signature-symbol">></span><a href="#resolvetarget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resolve a note target by either <code>path</code> or <code>title</code>, with periodic-alias and
|
|
2
|
+
fuzzy-suggestion fallbacks.</p>
|
|
3
|
+
<p>The universal target-resolver used by every read/write tool. Resolution
|
|
4
|
+
order:</p>
|
|
5
|
+
<ol>
|
|
6
|
+
<li>If <code>path</code> is set → try exact path (with <code>.md</code> appended if missing).</li>
|
|
7
|
+
<li>If <code>title</code> is set → try literal title match.</li>
|
|
8
|
+
<li>If <code>title</code> is one of the periodic aliases (<code>daily</code> / <code>today</code> / <code>weekly</code> /
|
|
9
|
+
<code>monthly</code>) → respect the user's Daily-Notes / Periodic-Notes plugin
|
|
10
|
+
config first; fall back to default formats only if the plugin folder is
|
|
11
|
+
at vault root (privacy-safe).</li>
|
|
12
|
+
<li>On miss → throw with did-you-mean suggestions via <code>suggestSimilar</code>.</li>
|
|
13
|
+
</ol>
|
|
14
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault.</p>
|
|
15
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>Exactly one of <code>path</code> or <code>title</code> should be provided. If
|
|
16
|
+
both are set, <code>path</code> takes precedence.</p>
|
|
17
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">FileEntry</span><span class="tsd-signature-symbol">></span></h4><p>A <code>FileEntry</code> pointing at the resolved file on disk.</p>
|
|
18
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If neither is set, or no note matches (with did-you-mean
|
|
19
|
+
hints in the message).</p>
|
|
20
|
+
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-1">Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>path</code> traverses outside the vault.</p>
|
|
21
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// By path</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">e1</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">resolveTarget</span><span class="hl-1">(vault, { path: </span><span class="hl-3">"Posts/Article.md"</span><span class="hl-1"> });</span><br/><br/><span class="hl-5">// By title (basename match)</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">e2</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">resolveTarget</span><span class="hl-1">(vault, { title: </span><span class="hl-3">"Article"</span><span class="hl-1"> });</span><br/><br/><span class="hl-5">// By periodic alias — respects user's Daily-Notes config</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">e3</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">resolveTarget</span><span class="hl-1">(vault, { title: </span><span class="hl-3">"today"</span><span class="hl-1"> });</span>
|
|
22
|
+
</code><button type="button">Copy</button></pre>
|
|
23
|
+
|
|
24
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/0ede7e269ea92a9388c5a7f5b809c7909b5c7460/src/tools/write.ts#L1005">tools/write.ts:1005</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>resolveWikilink | enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">resolveWikilink</a></li></ul><h1>Function resolveWikilink</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resolvewikilink"><span class="tsd-kind-call-signature">resolveWikilink</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">from_note</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">include_content</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">wikilink</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">alias</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">block</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">found</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">section</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><a href="#resolvewikilink" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resolve an Obsidian wikilink string to a concrete vault file (or report
|
|
2
|
+
unresolved).</p>
|
|
3
|
+
<p>Accepts the full wikilink syntax (<code>[[Target]]</code>, <code>[[Target|alias]]</code>,
|
|
4
|
+
<code>[[Target#section]]</code>, <code>[[Target^block]]</code>, <code>![[Embedded]]</code>) and parses out
|
|
5
|
+
the components. Resolution uses the project's fuzzy-match path — exact
|
|
6
|
+
basename, then in-folder, then global — same algorithm Obsidian uses
|
|
7
|
+
client-side. Pass <code>from_note</code> to bias resolution toward the same folder.</p>
|
|
8
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to resolve against.</p>
|
|
9
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">from_note</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">include_content</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">wikilink</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p><code>wikilink</code> is required and may include or omit the
|
|
10
|
+
<code>[[</code> ... <code>]]</code> brackets. <code>from_note</code> (vault-relative path) is the
|
|
11
|
+
source note — used for folder-local resolution priority.
|
|
12
|
+
<code>include_content</code> defaults to <code>true</code>; set false to skip the body read.</p>
|
|
13
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">alias</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">block</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">found</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">section</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span></h4><p><code>{ found, path, title, content, section, block, alias }</code>. When
|
|
14
|
+
<code>found</code> is false all path/title/content are null but section/block/alias
|
|
15
|
+
are still parsed (so the agent can report "broken link to
|
|
16
|
+
<code>[[Foo#Bar]]</code>").</p>
|
|
17
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">r</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">resolveWikilink</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> wikilink: </span><span class="hl-3">"[[Hybrid Retrieval#BM25|the BM25 part]]"</span><span class="hl-1">,</span><br/><span class="hl-1"> from_note: </span><span class="hl-3">"Posts/2026/Article.md"</span><br/><span class="hl-1">});</span><br/><span class="hl-0">if</span><span class="hl-1"> (r.found) console.</span><span class="hl-2">log</span><span class="hl-1">(r.path, r.section, r.alias);</span>
|
|
18
|
+
</code><button type="button">Copy</button></pre>
|
|
19
|
+
|
|
20
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/0ede7e269ea92a9388c5a7f5b809c7909b5c7460/src/tools/read.ts#L260">tools/read.ts:260</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>searchHybrid | enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">searchHybrid</a></li></ul><h1>Function searchHybrid</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="searchhybrid"><span class="tsd-kind-call-signature">searchHybrid</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">embedding_model</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">granularity</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">"block"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"note"</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">graph_boost</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">min_signals</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">ctx</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">embedFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">ftsIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">FtsIndex</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">hnsw</span><span class="tsd-signature-symbol">?:</span> <a href="../interfaces/tools.HnswSearchContext.html" class="tsd-signature-type tsd-kind-interface">HnswSearchContext</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">reranker</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">alias</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">topN</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">rerankerOverride</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-call-signature">score</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">passages</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.SearchHybridResponse.html" class="tsd-signature-type tsd-kind-interface">SearchHybridResponse</a><span class="tsd-signature-symbol">></span><a href="#searchhybrid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Hybrid retrieval — fuses BM25 + TF-IDF + ML embeddings via Reciprocal Rank
|
|
2
|
+
Fusion (Cormack et al, 2009). The recommended search entry point.</p>
|
|
3
|
+
<p><strong>Most agents should call this</strong> rather than the single-ranker variants
|
|
4
|
+
(<a href="tools.searchText.html" class="tsd-kind-function">searchText</a>, <a href="tools.semanticSearch.html" class="tsd-kind-function">semanticSearch</a>, <a href="tools.embeddingsSearch.html" class="tsd-kind-function">embeddingsSearch</a>)
|
|
5
|
+
because the umbrella auto-detects which signals are available and produces
|
|
6
|
+
consistent recall across user setups. Gracefully degrades:</p>
|
|
7
|
+
<ul>
|
|
8
|
+
<li>All 3 signals → fuse all 3</li>
|
|
9
|
+
<li>No FTS5 (no <code>--persistent-index</code>) → TF-IDF + embeddings (or just TF-IDF)</li>
|
|
10
|
+
<li>No embeddings (no <code>build-embeddings</code>) → BM25 + TF-IDF</li>
|
|
11
|
+
<li>Only TF-IDF → fall back to TF-IDF-only ranking</li>
|
|
12
|
+
</ul>
|
|
13
|
+
<p>Two unique signal layers ride on top of RRF:</p>
|
|
14
|
+
<ul>
|
|
15
|
+
<li><strong>Wikilink graph-boost</strong> (v2.3.0): re-rank fused top-K by counting how
|
|
16
|
+
many other top-K hits link to each one. Only enquire-mcp does this —
|
|
17
|
+
wikilinks are the differentiating Obsidian primitive.</li>
|
|
18
|
+
<li><strong>Cross-encoder reranker</strong> (v2.9.0, opt-in): re-score top-N candidates
|
|
19
|
+
with a BGE-style cross-encoder. ~30-50ms / query overhead on M1 CPU.</li>
|
|
20
|
+
</ul>
|
|
21
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to search.</p>
|
|
22
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">embedding_model</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">granularity</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">"block"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"note"</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">graph_boost</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">min_signals</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p><code>query</code> is required + non-empty. <code>limit</code> defaults to 10.
|
|
23
|
+
<code>min_signals</code> (default 1) requires that many rankers fired for a hit.
|
|
24
|
+
<code>granularity: "note"</code> (default) collapses to best chunk per note;
|
|
25
|
+
<code>"block"</code> keeps each chunk distinct. <code>graph_boost</code> defaults to <code>true</code>.</p>
|
|
26
|
+
</div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">embedding_model</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">granularity</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"block"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"note"</span></h5><div class="tsd-comment tsd-typography"><p>v2.2.0: "note" (default) returns 1 hit per note, picking the best
|
|
27
|
+
chunk; "block" returns each chunk as a distinct hit so you see the
|
|
28
|
+
multiple-paragraph case where one note covers a topic in two places.</p>
|
|
29
|
+
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">graph_boost</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>v2.3.0: post-RRF graph boost — rerank by counting how many other
|
|
30
|
+
top-K hits link to each one. Default true; set false to disable for
|
|
31
|
+
diagnostic comparison (e.g. measuring whether boost helped).</p>
|
|
32
|
+
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">min_signals</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li><span><span class="tsd-kind-parameter">ctx</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">embedFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">ftsIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">FtsIndex</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">hnsw</span><span class="tsd-signature-symbol">?:</span> <a href="../interfaces/tools.HnswSearchContext.html" class="tsd-signature-type tsd-kind-interface">HnswSearchContext</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">reranker</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">alias</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">topN</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">rerankerOverride</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-call-signature">score</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">passages</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>Server-side context: <code>ftsIndex</code> (nullable), <code>embedFile</code>
|
|
33
|
+
(path may not exist), optional <code>reranker</code> config, optional
|
|
34
|
+
<code>rerankerOverride</code> (test injection point), optional <code>hnsw</code> context for
|
|
35
|
+
accelerated k-NN.</p>
|
|
36
|
+
</div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">embedFile</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Path to the <code>.embed.db</code> (file may or may not exist — checked at call time).</p>
|
|
37
|
+
</div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">ftsIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FtsIndex</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></h5><div class="tsd-comment tsd-typography"><p>FTS5 index, if <code>--persistent-index</code> is enabled at server start.</p>
|
|
38
|
+
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">hnsw</span><span class="tsd-signature-symbol">?: </span><a href="../interfaces/tools.HnswSearchContext.html" class="tsd-signature-type tsd-kind-interface">HnswSearchContext</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></h5><div class="tsd-comment tsd-typography"><p>v2.13.0 — optional HNSW context for the embeddings-search arm.
|
|
39
|
+
When passed, the embedding-side k-NN goes through the in-memory
|
|
40
|
+
HNSW index (sub-10ms at any scale) instead of the O(n) brute-force
|
|
41
|
+
cosine in EmbedDb.search(). Built on serve start; lives in
|
|
42
|
+
ServerDeps.hnswContext. Null/undefined → brute-force fallback.</p>
|
|
43
|
+
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">reranker</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">alias</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">topN</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span></h5><div class="tsd-comment tsd-typography"><p>v2.9.0 — optional cross-encoder reranker config. When set, the top-N
|
|
44
|
+
hits from RRF (default 50) are re-scored by a BGE-style cross-encoder
|
|
45
|
+
and re-sorted before truncation. Adds ~30-50ms per query on M1 CPU
|
|
46
|
+
for a 50-candidate set.</p>
|
|
47
|
+
<p><code>alias</code> resolves to a <code>RERANKER_MODELS</code> entry. <code>topN</code> defaults to 50.
|
|
48
|
+
Lazy-loaded — first call downloads the model from HuggingFace
|
|
49
|
+
(~25-110 MB depending on alias). Failures are swallowed and surface
|
|
50
|
+
via <code>signal_errors.reranker</code> so the whole search doesn't break on a
|
|
51
|
+
model load issue.</p>
|
|
52
|
+
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">rerankerOverride</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-call-signature">score</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">passages</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">}</span></h5><div class="tsd-comment tsd-typography"><p>v2.9.0 — test-only injection point. When set, this pre-loaded
|
|
53
|
+
reranker is used instead of lazy-loading via <code>loadReranker(alias)</code>.
|
|
54
|
+
Lets unit tests validate the rerank-and-resort plumbing without
|
|
55
|
+
pulling in the real ML model. Unused in production callers.</p>
|
|
56
|
+
</div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.SearchHybridResponse.html" class="tsd-signature-type tsd-kind-interface">SearchHybridResponse</a><span class="tsd-signature-symbol">></span></h4><p>A <a href="../interfaces/tools.SearchHybridResponse.html" class="tsd-kind-interface">SearchHybridResponse</a> with sorted <code>matches</code>, observability
|
|
57
|
+
in <code>signals_used</code> / <code>signal_errors</code>, and per-hit <code>per_signal</code> breakdown.</p>
|
|
58
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>query</code> is empty / whitespace-only.</p>
|
|
59
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">searchHybrid</span><span class="hl-1">(</span><br/><span class="hl-1"> vault,</span><br/><span class="hl-1"> { query: </span><span class="hl-3">"RAG hybrid retrieval"</span><span class="hl-1">, limit: </span><span class="hl-4">10</span><span class="hl-1">, folder: </span><span class="hl-3">"Reference"</span><span class="hl-1"> },</span><br/><span class="hl-1"> { ftsIndex, embedFile: </span><span class="hl-3">"/path/to/vault.embed.db"</span><span class="hl-1"> }</span><br/><span class="hl-1">);</span><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">hit</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> result.matches) {</span><br/><span class="hl-1"> console.</span><span class="hl-2">log</span><span class="hl-1">(hit.path, hit.score, hit.per_signal);</span><br/><span class="hl-1">}</span><br/><span class="hl-1">console.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-3">"Rankers fired:"</span><span class="hl-1">, result.signals_used);</span>
|
|
60
|
+
</code><button type="button">Copy</button></pre>
|
|
61
|
+
|
|
62
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/0ede7e269ea92a9388c5a7f5b809c7909b5c7460/src/tools/search.ts#L1165">tools/search.ts:1165</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>searchText | enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">searchText</a></li></ul><h1>Function searchText</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="searchtext"><span class="tsd-kind-call-signature">searchText</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">mode</span><span class="tsd-signature-symbol">?:</span> <a href="../types/tools.SearchMode.html" class="tsd-signature-type tsd-kind-type-alias">SearchMode</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.SearchResponse.html" class="tsd-signature-type tsd-kind-interface">SearchResponse</a><span class="tsd-signature-symbol">></span><a href="#searchtext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Substring-grep search over the vault: scans every <code>.md</code> body for token
|
|
2
|
+
occurrences in <code>all</code> / <code>any</code> / <code>phrase</code> mode and ranks by occurrence count.</p>
|
|
3
|
+
<p>This is the simplest retrieval primitive — no index, no embeddings, no
|
|
4
|
+
native deps. Useful when the agent already knows specific keywords; for
|
|
5
|
+
fuzzier semantic recall prefer <a href="tools.searchHybrid.html" class="tsd-kind-function">searchHybrid</a> or <a href="tools.semanticSearch.html" class="tsd-kind-function">semanticSearch</a>.
|
|
6
|
+
Read concurrency is bounded to 16 to avoid blowing the fd limit on large
|
|
7
|
+
vaults. Tokenization is whitespace-split + lowercased; case-insensitive.</p>
|
|
8
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to search.</p>
|
|
9
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">mode</span><span class="tsd-signature-symbol">?:</span> <a href="../types/tools.SearchMode.html" class="tsd-signature-type tsd-kind-type-alias">SearchMode</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>Search arguments. <code>query</code> is required and must be non-empty.
|
|
10
|
+
<code>folder</code> restricts the scan to a subdirectory (vault-relative).
|
|
11
|
+
<code>limit</code> caps results (default 25). <code>mode</code> defaults to <code>"all"</code>.</p>
|
|
12
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.SearchResponse.html" class="tsd-signature-type tsd-kind-interface">SearchResponse</a><span class="tsd-signature-symbol">></span></h4><p>A <a href="../interfaces/tools.SearchResponse.html" class="tsd-kind-interface">SearchResponse</a> with sorted <code>matches</code> and a
|
|
13
|
+
<code>scanned_notes</code> observability count.</p>
|
|
14
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>query</code> is empty / whitespace-only.</p>
|
|
15
|
+
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-1">Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>folder</code> resolves outside the vault root.</p>
|
|
16
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">searchText</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> query: </span><span class="hl-3">"RAG retrieval"</span><span class="hl-1">,</span><br/><span class="hl-1"> folder: </span><span class="hl-3">"Reference"</span><span class="hl-1">,</span><br/><span class="hl-1"> mode: </span><span class="hl-3">"all"</span><span class="hl-1">,</span><br/><span class="hl-1"> limit: </span><span class="hl-4">10</span><br/><span class="hl-1">});</span><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">hit</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> result.matches) {</span><br/><span class="hl-1"> console.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-3">`${</span><span class="hl-1">hit</span><span class="hl-3">.</span><span class="hl-1">path</span><span class="hl-3">}:${</span><span class="hl-1">hit</span><span class="hl-3">.</span><span class="hl-1">line</span><span class="hl-3">} — ${</span><span class="hl-1">hit</span><span class="hl-3">.</span><span class="hl-1">snippet</span><span class="hl-3">}`</span><span class="hl-1">);</span><br/><span class="hl-1">}</span>
|
|
17
|
+
</code><button type="button">Copy</button></pre>
|
|
18
|
+
|
|
19
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/0ede7e269ea92a9388c5a7f5b809c7909b5c7460/src/tools/search.ts#L86">tools/search.ts:86</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>semanticSearch | enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">semanticSearch</a></li></ul><h1>Function semanticSearch</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="semanticsearch"><span class="tsd-kind-call-signature">semanticSearch</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">matches</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools.SemanticHit.html" class="tsd-signature-type tsd-kind-interface">SemanticHit</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">method</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"tfidf-cosine"</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">total_docs</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><a href="#semanticsearch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Pure-JS lexical-semantic search via TF-IDF cosine similarity.</p>
|
|
2
|
+
<p>Builds (or reuses cached) per-vault TF-IDF index, then ranks notes by
|
|
3
|
+
cosine similarity of the query vector against each body vector. Catches
|
|
4
|
+
"related-term" recall that the substring path of <a href="tools.searchText.html" class="tsd-kind-function">searchText</a> misses
|
|
5
|
+
(e.g. searching <code>"retrieval"</code> will surface notes about <code>"recall"</code> if the
|
|
6
|
+
vocabulary co-occurs). Zero native deps — works on every platform with
|
|
7
|
+
no model download. For full ML retrieval use <a href="tools.embeddingsSearch.html" class="tsd-kind-function">embeddingsSearch</a>;
|
|
8
|
+
for graceful-degradation fusion use <a href="tools.searchHybrid.html" class="tsd-kind-function">searchHybrid</a>.</p>
|
|
9
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to search.</p>
|
|
10
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p><code>query</code> is required. <code>limit</code> defaults to 10. <code>min_score</code>
|
|
11
|
+
defaults to 0.05 — anything below is pruned. <code>folder</code> restricts to a
|
|
12
|
+
subdirectory.</p>
|
|
13
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">matches</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools.SemanticHit.html" class="tsd-signature-type tsd-kind-interface">SemanticHit</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">method</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"tfidf-cosine"</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">total_docs</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span></h4><p>An envelope with <code>query</code>, <code>total_docs</code> (corpus size), <code>method</code>
|
|
14
|
+
(always <code>"tfidf-cosine"</code>), and <code>matches</code> sorted by <code>score</code> desc.</p>
|
|
15
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>query</code> is empty / whitespace-only.</p>
|
|
16
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">semanticSearch</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> query: </span><span class="hl-3">"vector retrieval cosine"</span><span class="hl-1">,</span><br/><span class="hl-1"> limit: </span><span class="hl-4">5</span><br/><span class="hl-1">});</span><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">hit</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> result.matches) {</span><br/><span class="hl-1"> console.</span><span class="hl-2">log</span><span class="hl-1">(hit.path, hit.score, hit.matched_terms);</span><br/><span class="hl-1">}</span>
|
|
17
|
+
</code><button type="button">Copy</button></pre>
|
|
18
|
+
|
|
19
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/0ede7e269ea92a9388c5a7f5b809c7909b5c7460/src/tools/search.ts#L592">tools/search.ts:592</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>validateNoteProposal | enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">validateNoteProposal</a></li></ul><h1>Function validateNoteProposal</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="validatenoteproposal"><span class="tsd-kind-call-signature">validateNoteProposal</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools.ValidateProposalArgs.html" class="tsd-signature-type tsd-kind-interface">ValidateProposalArgs</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.ValidateProposalResult.html" class="tsd-signature-type tsd-kind-interface">ValidateProposalResult</a><span class="tsd-signature-symbol">></span><a href="#validatenoteproposal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Pre-write validator — lint an LLM-proposed note against the live vault
|
|
2
|
+
before writing.</p>
|
|
3
|
+
<p>The "anti-slop" first call: the LLM proposes a draft, this validator
|
|
4
|
+
checks YAML / wikilinks / tags / path-collision against the vault, and
|
|
5
|
+
returns structured <code>errors[]</code> + <code>warnings[]</code>. The LLM can fix-and-retry
|
|
6
|
+
via the same call, finally invoking <a href="tools.createNote.html" class="tsd-kind-function">createNote</a> / <a href="tools.appendToNote.html" class="tsd-kind-function">appendToNote</a>
|
|
7
|
+
only after the validator reports <code>ok: true</code>. Read-only — never mutates
|
|
8
|
+
disk. Always returns a structured result for ANY input, even malformed —
|
|
9
|
+
path-traversal errors become <code>kind: "path-traversal"</code> errors rather than
|
|
10
|
+
exceptions.</p>
|
|
11
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault.</p>
|
|
12
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <a href="../interfaces/tools.ValidateProposalArgs.html" class="tsd-signature-type tsd-kind-interface">ValidateProposalArgs</a></span><div class="tsd-comment tsd-typography"><p><a href="../interfaces/tools.ValidateProposalArgs.html" class="tsd-kind-interface">ValidateProposalArgs</a>. <code>path</code> + <code>content</code> required.</p>
|
|
13
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.ValidateProposalResult.html" class="tsd-signature-type tsd-kind-interface">ValidateProposalResult</a><span class="tsd-signature-symbol">></span></h4><p>A <a href="../interfaces/tools.ValidateProposalResult.html" class="tsd-kind-interface">ValidateProposalResult</a> with <code>ok</code>, <code>errors</code>, <code>warnings</code>,
|
|
14
|
+
YAML parse status, per-wikilink resolution, tag classification, and
|
|
15
|
+
collision detection.</p>
|
|
16
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">v</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">validateNoteProposal</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> path: </span><span class="hl-3">"Inbox/draft.md"</span><span class="hl-1">,</span><br/><span class="hl-1"> content: </span><span class="hl-3">"---</span><span class="hl-4">\n</span><span class="hl-3">status: draft</span><span class="hl-4">\n</span><span class="hl-3">---</span><span class="hl-4">\n</span><span class="hl-3"># Title</span><span class="hl-4">\n\n</span><span class="hl-3">[[Bar]] is broken."</span><span class="hl-1">,</span><br/><span class="hl-1"> mode: </span><span class="hl-3">"create"</span><br/><span class="hl-1">});</span><br/><span class="hl-0">if</span><span class="hl-1"> (</span><span class="hl-0">!</span><span class="hl-1">v.ok) {</span><br/><span class="hl-1"> </span><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">e</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> v.errors) console.</span><span class="hl-2">error</span><span class="hl-1">(e.kind, e.message);</span><br/><span class="hl-1">}</span>
|
|
17
|
+
</code><button type="button">Copy</button></pre>
|
|
18
|
+
|
|
19
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/0ede7e269ea92a9388c5a7f5b809c7909b5c7460/src/tools/meta.ts#L97">tools/meta.ts:97</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>enquire-mcp API reference - v3.7.12</h1></div><h2>Hierarchy Summary</h2></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="index.html">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>enquire-mcp API reference - v3.7.12</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">enquire-mcp API reference - v3.7.12</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>enquire-mcp API reference - v3.7.12</h1></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Modules"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h2>Modules</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="index"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Module"><use href="assets/icons.svg#icon-2"></use></svg><a href="modules/index.html">index</a><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="tool-manifest"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Module"><use href="assets/icons.svg#icon-2"></use></svg><a href="modules/tool-manifest.html">tool-manifest</a><a href="#tool-manifest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="tools"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Module"><use href="assets/icons.svg#icon-2"></use></svg><a href="modules/tools.html">tools</a><a href="#tools" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd></dl></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Modules"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Modules</summary><div><a href="#index"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Module"><use href="assets/icons.svg#icon-2"></use></svg><span>index</span></a><a href="#tool-manifest"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Module"><use href="assets/icons.svg#icon-2"></use></svg><span>tool-<wbr/>manifest</span></a><a href="#tools"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Module"><use href="assets/icons.svg#icon-2"></use></svg><span>tools</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="index.html" class="current">enquire-mcp API reference - v3.7.12</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|