mcp-scraper 0.24.0 → 0.25.0

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.
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var PACKAGE_VERSION = "0.25.0";
3
+
4
+ export {
5
+ PACKAGE_VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-UELJZCUC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.25.0'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
@@ -35,7 +35,7 @@ import {
35
35
  sanitizeAttempts,
36
36
  sanitizeHarvestResult,
37
37
  transcribeMediaUrl
38
- } from "./chunk-SUPUHPJS.js";
38
+ } from "./chunk-NC37L5RW.js";
39
39
  import {
40
40
  auditImages,
41
41
  buildLinkReport,
@@ -76,7 +76,7 @@ import {
76
76
  RawMapsOverviewSchema,
77
77
  RawMapsReviewStatsSchema
78
78
  } from "./chunk-XGIPATLV.js";
79
- import "./chunk-CDLHUCMT.js";
79
+ import "./chunk-UELJZCUC.js";
80
80
  import {
81
81
  completeExtractJob,
82
82
  countSuccessfulPages,
@@ -25191,4 +25191,4 @@ app.get("/blog/:slug/", (c) => {
25191
25191
  export {
25192
25192
  app
25193
25193
  };
25194
- //# sourceMappingURL=server-I5U3OUZZ.js.map
25194
+ //# sourceMappingURL=server-PILR3U5E.js.map
@@ -0,0 +1,62 @@
1
+ # ADR 0002: Hybrid Smart RAG retrieval for memory vaults
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-07-16
5
+ - **Deciders:** Andrew (operator), engineering
6
+ - **Applies to:** MCP Memory retrieval, memory writes, vault search, and the default Skills vault
7
+
8
+ ## Context
9
+
10
+ Semantic similarity alone can miss exact tags, dates, metadata, and the note graph that gives an Obsidian vault its useful local context. Expanding every link from every semantic result has the opposite problem: it creates a large, noisy candidate set and can make structural proximity look like evidence of relevance. The connected AI also needs a strong habit of reusing the live tag vocabulary without turning one advisory tool-call order into a persisted write precondition.
11
+
12
+ Skills add a second vault-specific constraint. A stored skill is not just one note: its internal links may point to reference material, templates, and executable support files, so the vault needs a stable folder contract.
13
+
14
+ ## Decision
15
+
16
+ **Use bounded hybrid Smart RAG for memory retrieval, and treat tag and graph context as evidence-bearing candidates rather than automatic conclusions.**
17
+
18
+ The default retrieval flow is:
19
+
20
+ 1. Form **2–4 focused query variants**, with **3** as the default.
21
+ 2. Combine exact **tag, metadata, vault, and date** retrieval with semantic retrieval.
22
+ 3. Fuse and deduplicate those channels into a total candidate pool of **50**.
23
+ 4. Select the top **8** preliminary seeds.
24
+ 5. Expand each seed to **depth 1**, considering at most **5** outgoing links or backlinks per seed.
25
+ 6. Apply **Jina reranking** to the combined candidates and retain the top **30** for reasoning.
26
+
27
+ Graph-expanded items remain candidates. They are not automatically relevant and must never become automatic note links; the AI adds an internal link only when the note contents support it.
28
+
29
+ Before memory search, creation, or update, the MCP instructions strongly direct the AI to inspect the complete accessible tag inventory, reuse existing tags, and add a tag only when the inventory does not contain an adequate equivalent. This is an automatic behavioral directive, **not** a persisted call-order precondition that makes writes fail solely because a separate tag-list call was not recorded.
30
+
31
+ The default **Skills** vault stores reusable skill packages. Every skill requires a `scripts/` folder and at least one of `references/` or `templates/`; a skill may have both. Skill notes use normal internal links to those supporting files.
32
+
33
+ ## Consequences
34
+
35
+ **Positive**
36
+ - Exact filters preserve high-precision matches while multi-query semantic retrieval recovers differently worded concepts.
37
+ - Bounded one-hop expansion recovers directly connected context without recursively walking the vault.
38
+ - Jina reranking makes semantic, exact, and graph-derived candidates comparable before the AI reasons over them.
39
+ - The 50-candidate and 30-result bounds provide predictable retrieval and context costs.
40
+ - Tag reuse becomes the default AI behavior without coupling persisted data validity to orchestration traces.
41
+ - Skills have a portable, inspectable support-file layout.
42
+
43
+ **Negative / risks**
44
+ - Multi-query retrieval, graph expansion, and reranking add latency and Jina dependency cost.
45
+ - A fixed pool of 50 may under-recall unusually broad vaults; 30 reranked notes may still exceed the useful reading budget for narrow questions.
46
+ - Link quality depends on note contents and graph maintenance; a bad link can introduce a weak candidate even though reranking limits its impact.
47
+ - The tag-inventory-first behavior remains advisory at the AI layer and can be skipped by a non-compliant client.
48
+ - Skills that do not need executable logic must still carry a `scripts/` folder to satisfy the vault contract.
49
+
50
+ ## Alternatives considered
51
+
52
+ - **One semantic query only.** Rejected because it misses exact structured constraints and alternate phrasings.
53
+ - **Expand every link from every retrieved note.** Rejected because candidate growth and graph noise become unbounded; expansion is limited to the strongest eight seeds.
54
+ - **Treat graph neighbors as automatically relevant or automatically link them.** Rejected because structural proximity is not evidence that a note answers the current request.
55
+ - **Persist tag-list call order as a write precondition.** Rejected because it couples durable writes to client orchestration history; forceful instructions provide the intended behavior without rejecting otherwise valid writes.
56
+
57
+ ## Revisit when
58
+
59
+ - Retrieval evaluation shows that the 50/8/5/30 bounds materially harm recall or precision.
60
+ - Jina reranking becomes unavailable, too costly, or is outperformed by a tested replacement.
61
+ - Vault graphs become dense enough that one-hop expansion regularly adds mostly irrelevant candidates.
62
+ - The Skills packaging contract adopts an external standard that makes `scripts/`, `references/`, or `templates/` incompatible.
@@ -9,3 +9,4 @@ Write one when a decision is hard to reverse, surprising, or encodes a constrain
9
9
 
10
10
  ## Index
11
11
  - [0001 — In-page API interception for anti-bot scraping (Facebook Ad Library)](./0001-in-page-graphql-interception-for-anti-bot-scraping.md)
12
+ - [0002 — Hybrid Smart RAG retrieval for memory vaults](./0002-hybrid-smart-rag-vault-retrieval.md)