appium-mcp 1.83.0 → 1.84.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.
- package/CHANGELOG.md +6 -0
- package/dist/create-server.d.ts.map +1 -1
- package/dist/create-server.js +4 -0
- package/dist/create-server.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +7 -4
- package/dist/server.js.map +1 -1
- package/dist/tests/create-server.test.js +8 -0
- package/dist/tests/create-server.test.js.map +1 -1
- package/dist/tests/utils/paths.test.js +5 -6
- package/dist/tests/utils/paths.test.js.map +1 -1
- package/package.json +8 -19
- package/server.json +2 -2
- package/src/create-server.ts +4 -0
- package/src/server.ts +9 -4
- package/dist/scripts/eval-documentation-rag.d.ts +0 -50
- package/dist/scripts/eval-documentation-rag.d.ts.map +0 -1
- package/dist/scripts/eval-documentation-rag.js +0 -287
- package/dist/scripts/eval-documentation-rag.js.map +0 -1
- package/dist/scripts/generate-embeddings-cache.d.ts +0 -13
- package/dist/scripts/generate-embeddings-cache.d.ts.map +0 -1
- package/dist/scripts/generate-embeddings-cache.js +0 -24
- package/dist/scripts/generate-embeddings-cache.js.map +0 -1
- package/dist/scripts/rag-eval-dataset.json +0 -516
- package/dist/scripts/simple-index-documentation.d.ts +0 -21
- package/dist/scripts/simple-index-documentation.d.ts.map +0 -1
- package/dist/scripts/simple-index-documentation.js +0 -77
- package/dist/scripts/simple-index-documentation.js.map +0 -1
- package/dist/scripts/simple-query-documentation.d.ts +0 -13
- package/dist/scripts/simple-query-documentation.d.ts.map +0 -1
- package/dist/scripts/simple-query-documentation.js +0 -52
- package/dist/scripts/simple-query-documentation.js.map +0 -1
- package/dist/tests/tools/documentation/appium-skills.test.d.ts +0 -2
- package/dist/tests/tools/documentation/appium-skills.test.d.ts.map +0 -1
- package/dist/tests/tools/documentation/appium-skills.test.js +0 -106
- package/dist/tests/tools/documentation/appium-skills.test.js.map +0 -1
- package/dist/tests/tools/documentation/plugin.test.d.ts +0 -2
- package/dist/tests/tools/documentation/plugin.test.d.ts.map +0 -1
- package/dist/tests/tools/documentation/plugin.test.js +0 -34
- package/dist/tests/tools/documentation/plugin.test.js.map +0 -1
- package/dist/tests/tools/documentation/simple-pdf-indexer.test.d.ts +0 -2
- package/dist/tests/tools/documentation/simple-pdf-indexer.test.d.ts.map +0 -1
- package/dist/tests/tools/documentation/simple-pdf-indexer.test.js +0 -46
- package/dist/tests/tools/documentation/simple-pdf-indexer.test.js.map +0 -1
- package/dist/tools/documentation/answer-appium.d.ts +0 -8
- package/dist/tools/documentation/answer-appium.d.ts.map +0 -1
- package/dist/tools/documentation/answer-appium.js +0 -38
- package/dist/tools/documentation/answer-appium.js.map +0 -1
- package/dist/tools/documentation/appium-skills.d.ts +0 -5
- package/dist/tools/documentation/appium-skills.d.ts.map +0 -1
- package/dist/tools/documentation/appium-skills.js +0 -168
- package/dist/tools/documentation/appium-skills.js.map +0 -1
- package/dist/tools/documentation/index.d.ts +0 -29
- package/dist/tools/documentation/index.d.ts.map +0 -1
- package/dist/tools/documentation/index.js +0 -66
- package/dist/tools/documentation/index.js.map +0 -1
- package/dist/tools/documentation/markdown-header-splitter.d.ts +0 -32
- package/dist/tools/documentation/markdown-header-splitter.d.ts.map +0 -1
- package/dist/tools/documentation/markdown-header-splitter.js +0 -180
- package/dist/tools/documentation/markdown-header-splitter.js.map +0 -1
- package/dist/tools/documentation/plugin.d.ts +0 -14
- package/dist/tools/documentation/plugin.d.ts.map +0 -1
- package/dist/tools/documentation/plugin.js +0 -19
- package/dist/tools/documentation/plugin.js.map +0 -1
- package/dist/tools/documentation/reasoning-rag.d.ts +0 -89
- package/dist/tools/documentation/reasoning-rag.d.ts.map +0 -1
- package/dist/tools/documentation/reasoning-rag.js +0 -282
- package/dist/tools/documentation/reasoning-rag.js.map +0 -1
- package/dist/tools/documentation/sentence-transformers-embeddings.d.ts +0 -40
- package/dist/tools/documentation/sentence-transformers-embeddings.d.ts.map +0 -1
- package/dist/tools/documentation/sentence-transformers-embeddings.js +0 -119
- package/dist/tools/documentation/sentence-transformers-embeddings.js.map +0 -1
- package/dist/tools/documentation/simple-pdf-indexer.d.ts +0 -47
- package/dist/tools/documentation/simple-pdf-indexer.d.ts.map +0 -1
- package/dist/tools/documentation/simple-pdf-indexer.js +0 -572
- package/dist/tools/documentation/simple-pdf-indexer.js.map +0 -1
- package/dist/tools/documentation/uploads/documents.json +0 -1
- package/dist/tools/documentation/uploads/embeddings-Xenova-bge-small-en-v1.5.json +0 -1
- package/scripts/setup-submodules-sparse.sh +0 -53
- package/scripts/update-submodules.sh +0 -14
- package/scripts/zip-assets.mjs +0 -55
- package/src/resources/submodules.zip +0 -0
- package/src/scripts/eval-documentation-rag.ts +0 -433
- package/src/scripts/generate-embeddings-cache.ts +0 -24
- package/src/scripts/rag-eval-dataset.json +0 -516
- package/src/scripts/simple-index-documentation.ts +0 -93
- package/src/scripts/simple-query-documentation.ts +0 -61
- package/src/tools/documentation/answer-appium.ts +0 -47
- package/src/tools/documentation/appium-skills.ts +0 -244
- package/src/tools/documentation/index.ts +0 -99
- package/src/tools/documentation/markdown-header-splitter.ts +0 -209
- package/src/tools/documentation/plugin.ts +0 -21
- package/src/tools/documentation/reasoning-rag.ts +0 -438
- package/src/tools/documentation/sentence-transformers-embeddings.ts +0 -152
- package/src/tools/documentation/simple-pdf-indexer.ts +0 -755
- package/src/tools/documentation/uploads/documents.json +0 -1
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Answer-grounded RAG eval for the Appium documentation tool.
|
|
3
|
-
*
|
|
4
|
-
* Runs the documentation_query retrieval pipeline against a fixed set of
|
|
5
|
-
* realistic queries and asks the only question that matters downstream:
|
|
6
|
-
* "did the answer text actually land in the chunks an LLM would see?"
|
|
7
|
-
*
|
|
8
|
-
* What we measure:
|
|
9
|
-
*
|
|
10
|
-
* 1. answerSpanRecall@K
|
|
11
|
-
* For each query, the dataset declares short verbatim phrases lifted
|
|
12
|
-
* from the docs (`answerSpans`). We concatenate the top-K retrieved
|
|
13
|
-
* chunks and check what fraction of the spans appears in that text.
|
|
14
|
-
* "anyOf" semantics: a query that finds at least one span counts as a
|
|
15
|
-
* hit. Spans are 30-140 chars and chosen so any reasonable chunk
|
|
16
|
-
* containing the answer will include them, regardless of chunk
|
|
17
|
-
* boundaries -- so the metric is splitter-neutral.
|
|
18
|
-
*
|
|
19
|
-
* 2. hit@{1,3,5,10}
|
|
20
|
-
* Did any chunk at rank <= K carry any answerSpan? Direct measure of
|
|
21
|
-
* "does the LLM see the answer" at different context budgets.
|
|
22
|
-
*
|
|
23
|
-
* 3. MRR
|
|
24
|
-
* Mean reciprocal rank of the *first* chunk that carries an answerSpan.
|
|
25
|
-
* MRR-equivalent on content, not on file paths -- a chunk from the
|
|
26
|
-
* right file but wrong section is worth nothing here.
|
|
27
|
-
*
|
|
28
|
-
* 4. contextEfficiency
|
|
29
|
-
* For queries we hit, 1000 * spansCovered / totalChars(topK). Spans-per-
|
|
30
|
-
* kchar density. Low = lots of noise around the answer.
|
|
31
|
-
*
|
|
32
|
-
* 5. fileRecall@{5,10} (diagnostic only)
|
|
33
|
-
* Did the right *file* appear in top-K? Kept so we can spot the
|
|
34
|
-
* "right-file wrong-chunk" failure mode (right file present but no
|
|
35
|
-
* answerSpan landed).
|
|
36
|
-
*
|
|
37
|
-
* Match semantics: lowercase + collapse whitespace, then substring check.
|
|
38
|
-
*
|
|
39
|
-
* Usage (after `npm run build`):
|
|
40
|
-
* node dist/scripts/eval-documentation-rag.js \
|
|
41
|
-
* [--top-k=10] [--label=NAME] [--quiet] [--no-save]
|
|
42
|
-
*
|
|
43
|
-
* --top-k=N number of chunks to retrieve & evaluate (default 10)
|
|
44
|
-
* --label=N label written into the saved run, useful for comparing
|
|
45
|
-
* index variants (e.g. --label=before, --label=after)
|
|
46
|
-
* --quiet suppress the per-query log lines and table
|
|
47
|
-
* --no-save don't persist results JSON to disk
|
|
48
|
-
*/
|
|
49
|
-
import * as fs from 'node:fs';
|
|
50
|
-
import * as path from 'node:path';
|
|
51
|
-
import { fileURLToPath } from 'node:url';
|
|
52
|
-
import { queryVectorStore } from '../tools/documentation/simple-pdf-indexer.js';
|
|
53
|
-
// -- arg parsing ----------------------------------------------------------
|
|
54
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
55
|
-
const __dirname = path.dirname(__filename);
|
|
56
|
-
const args = process.argv.slice(2);
|
|
57
|
-
const flagSet = new Set(args);
|
|
58
|
-
const QUIET = flagSet.has('--quiet');
|
|
59
|
-
const NO_SAVE = flagSet.has('--no-save');
|
|
60
|
-
function flagValue(name, dflt) {
|
|
61
|
-
const a = args.find((x) => x.startsWith(`${name}=`));
|
|
62
|
-
return a ? a.split('=').slice(1).join('=') : dflt;
|
|
63
|
-
}
|
|
64
|
-
const TOP_K = Number(flagValue('--top-k', '10'));
|
|
65
|
-
const LABEL = flagValue('--label', 'default');
|
|
66
|
-
// -- paths ----------------------------------------------------------------
|
|
67
|
-
function resolveDatasetPath() {
|
|
68
|
-
const candidates = [
|
|
69
|
-
path.resolve(__dirname, 'rag-eval-dataset.json'),
|
|
70
|
-
path.resolve(__dirname, '../../src/scripts/rag-eval-dataset.json'),
|
|
71
|
-
];
|
|
72
|
-
for (const p of candidates) {
|
|
73
|
-
if (fs.existsSync(p)) {
|
|
74
|
-
return p;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
throw new Error(`rag-eval-dataset.json not found in: ${candidates.join(', ')}`);
|
|
78
|
-
}
|
|
79
|
-
function resolveResultsDir() {
|
|
80
|
-
const dir = path.resolve(__dirname, '../../src/scripts/eval-results');
|
|
81
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
82
|
-
return dir;
|
|
83
|
-
}
|
|
84
|
-
// -- matching helpers -----------------------------------------------------
|
|
85
|
-
function normalize(s) {
|
|
86
|
-
return s.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
87
|
-
}
|
|
88
|
-
function chunkContainsSpan(chunkText, span) {
|
|
89
|
-
return normalize(chunkText).includes(normalize(span));
|
|
90
|
-
}
|
|
91
|
-
function endsWithExpected(retrievedRelPath, expected) {
|
|
92
|
-
return retrievedRelPath === expected || retrievedRelPath.endsWith(expected);
|
|
93
|
-
}
|
|
94
|
-
// -- per-query evaluation -------------------------------------------------
|
|
95
|
-
function evaluateQuery(q, chunks) {
|
|
96
|
-
const hitRanks = [];
|
|
97
|
-
const spansCovered = new Set();
|
|
98
|
-
for (const chunk of chunks) {
|
|
99
|
-
let chunkHadHit = false;
|
|
100
|
-
for (const span of q.answerSpans) {
|
|
101
|
-
if (chunkContainsSpan(chunk.text, span)) {
|
|
102
|
-
spansCovered.add(span);
|
|
103
|
-
chunkHadHit = true;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (chunkHadHit) {
|
|
107
|
-
hitRanks.push(chunk.rank);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
const firstHitRank = hitRanks.length > 0 ? hitRanks[0] : null;
|
|
111
|
-
const spansMissing = q.answerSpans.filter((s) => !spansCovered.has(s));
|
|
112
|
-
return {
|
|
113
|
-
hitRanks,
|
|
114
|
-
firstHitRank,
|
|
115
|
-
spansCovered: [...spansCovered],
|
|
116
|
-
spansMissing,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
// -- aggregation ----------------------------------------------------------
|
|
120
|
-
function aggregate(results) {
|
|
121
|
-
if (results.length === 0) {
|
|
122
|
-
return {
|
|
123
|
-
count: 0,
|
|
124
|
-
answerSpanRecall: 0,
|
|
125
|
-
hitAnyAt1: 0,
|
|
126
|
-
hitAnyAt3: 0,
|
|
127
|
-
hitAnyAt5: 0,
|
|
128
|
-
hitAnyAt10: 0,
|
|
129
|
-
mrr: 0,
|
|
130
|
-
contextEfficiency: 0,
|
|
131
|
-
fileRecallAt5: 0,
|
|
132
|
-
fileRecallAt10: 0,
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
const n = results.length;
|
|
136
|
-
const mean = (xs) => xs.reduce((a, b) => a + b, 0) / xs.length;
|
|
137
|
-
const hitResults = results.filter((r) => r.hitAnyAt10 === 1);
|
|
138
|
-
return {
|
|
139
|
-
count: n,
|
|
140
|
-
answerSpanRecall: mean(results.map((r) => r.answerSpanRecall)),
|
|
141
|
-
hitAnyAt1: mean(results.map((r) => r.hitAnyAt1)),
|
|
142
|
-
hitAnyAt3: mean(results.map((r) => r.hitAnyAt3)),
|
|
143
|
-
hitAnyAt5: mean(results.map((r) => r.hitAnyAt5)),
|
|
144
|
-
hitAnyAt10: mean(results.map((r) => r.hitAnyAt10)),
|
|
145
|
-
mrr: mean(results.map((r) => r.reciprocalRank)),
|
|
146
|
-
contextEfficiency: hitResults.length
|
|
147
|
-
? mean(hitResults.map((r) => r.contextEfficiency))
|
|
148
|
-
: 0,
|
|
149
|
-
fileRecallAt5: mean(results.map((r) => r.fileRecallAt5)),
|
|
150
|
-
fileRecallAt10: mean(results.map((r) => r.fileRecallAt10)),
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
function fmt(n, dp = 3) {
|
|
154
|
-
return n.toFixed(dp);
|
|
155
|
-
}
|
|
156
|
-
function printAggregate(label, m) {
|
|
157
|
-
const tag = `${label} (n=${m.count})`.padEnd(20);
|
|
158
|
-
console.log(`${tag} spanRecall=${fmt(m.answerSpanRecall)} hit@1=${fmt(m.hitAnyAt1)} hit@3=${fmt(m.hitAnyAt3)} hit@5=${fmt(m.hitAnyAt5)} hit@10=${fmt(m.hitAnyAt10)} MRR=${fmt(m.mrr)} ctxEff=${fmt(m.contextEfficiency, 2)} fileR@5=${fmt(m.fileRecallAt5)}`);
|
|
159
|
-
}
|
|
160
|
-
function printPerQueryTable(results) {
|
|
161
|
-
const header = 'id | diff | fhr | spans | hit@5 | unique | sources';
|
|
162
|
-
const sep = '-'.repeat(110);
|
|
163
|
-
console.log(sep);
|
|
164
|
-
console.log(header);
|
|
165
|
-
console.log(sep);
|
|
166
|
-
for (const r of results) {
|
|
167
|
-
const fhr = r.firstHitRank === null ? ' - ' : String(r.firstHitRank).padStart(3, ' ');
|
|
168
|
-
const spans = `${r.spansCovered.length}/${r.answerSpans.length}`;
|
|
169
|
-
const matched = r.retrievedSources[0]
|
|
170
|
-
? r.retrievedSources.slice(0, 2).join(', ')
|
|
171
|
-
: '(empty)';
|
|
172
|
-
console.log(`${r.id.padEnd(4)} | ${r.difficulty.padEnd(6)} | ${fhr} | ${spans.padEnd(6)} | ${String(r.hitAnyAt5).padEnd(5)} | ${String(r.uniqueFiles).padEnd(6)} | ${matched}`);
|
|
173
|
-
}
|
|
174
|
-
console.log(sep);
|
|
175
|
-
}
|
|
176
|
-
// -- main -----------------------------------------------------------------
|
|
177
|
-
async function runEval() {
|
|
178
|
-
const datasetPath = resolveDatasetPath();
|
|
179
|
-
const dataset = JSON.parse(fs.readFileSync(datasetPath, 'utf-8'));
|
|
180
|
-
console.log(`\n=== Appium RAG eval (answer-grounded) ===`);
|
|
181
|
-
console.log(`Dataset: ${datasetPath}`);
|
|
182
|
-
console.log(`Queries: ${dataset.queries.length} topK: ${TOP_K} label: ${LABEL}\n`);
|
|
183
|
-
const perQuery = [];
|
|
184
|
-
for (const q of dataset.queries) {
|
|
185
|
-
const docs = await queryVectorStore(q.query, TOP_K);
|
|
186
|
-
const chunks = docs.map((d, i) => ({
|
|
187
|
-
rank: i + 1,
|
|
188
|
-
text: d.pageContent,
|
|
189
|
-
source: d.metadata?.relativePath ??
|
|
190
|
-
d.metadata?.filename,
|
|
191
|
-
charCount: d.pageContent.length,
|
|
192
|
-
}));
|
|
193
|
-
const retrievedSources = chunks
|
|
194
|
-
.map((c) => c.source)
|
|
195
|
-
.filter((s) => !!s);
|
|
196
|
-
const topKChars = chunks.reduce((a, c) => a + c.charCount, 0);
|
|
197
|
-
const uniqueFiles = new Set(retrievedSources).size;
|
|
198
|
-
const { hitRanks, firstHitRank, spansCovered, spansMissing } = evaluateQuery(q, chunks);
|
|
199
|
-
const answerSpanRecall = q.answerSpans.length === 0
|
|
200
|
-
? 0
|
|
201
|
-
: spansCovered.length / q.answerSpans.length;
|
|
202
|
-
const hitAnyAt = (k) => hitRanks.some((r) => r <= k) ? 1 : 0;
|
|
203
|
-
const reciprocalRank = firstHitRank ? 1 / firstHitRank : 0;
|
|
204
|
-
const contextEfficiency = firstHitRank !== null && topKChars > 0
|
|
205
|
-
? (1000 * spansCovered.length) / topKChars
|
|
206
|
-
: 0;
|
|
207
|
-
const fileMatched = (k) => {
|
|
208
|
-
const top = retrievedSources.slice(0, k);
|
|
209
|
-
return top.some((rs) => q.expectedSources.some((es) => endsWithExpected(rs, es)))
|
|
210
|
-
? 1
|
|
211
|
-
: 0;
|
|
212
|
-
};
|
|
213
|
-
perQuery.push({
|
|
214
|
-
id: q.id,
|
|
215
|
-
query: q.query,
|
|
216
|
-
difficulty: q.difficulty,
|
|
217
|
-
category: q.category,
|
|
218
|
-
expectedSources: q.expectedSources,
|
|
219
|
-
answerSpans: q.answerSpans,
|
|
220
|
-
retrievedSources,
|
|
221
|
-
topKChunks: chunks.length,
|
|
222
|
-
topKChars,
|
|
223
|
-
uniqueFiles,
|
|
224
|
-
hitRanks,
|
|
225
|
-
firstHitRank,
|
|
226
|
-
spansCovered,
|
|
227
|
-
spansMissing,
|
|
228
|
-
answerSpanRecall,
|
|
229
|
-
hitAnyAt1: hitAnyAt(1),
|
|
230
|
-
hitAnyAt3: hitAnyAt(3),
|
|
231
|
-
hitAnyAt5: hitAnyAt(5),
|
|
232
|
-
hitAnyAt10: hitAnyAt(10),
|
|
233
|
-
reciprocalRank,
|
|
234
|
-
contextEfficiency,
|
|
235
|
-
fileRecallAt5: fileMatched(5),
|
|
236
|
-
fileRecallAt10: fileMatched(10),
|
|
237
|
-
});
|
|
238
|
-
if (!QUIET) {
|
|
239
|
-
const status = hitAnyAt(5) ? 'OK' : 'MISS';
|
|
240
|
-
console.log(`${status.padEnd(4)} ${q.id} spans=${spansCovered.length}/${q.answerSpans.length} fhr=${firstHitRank ?? '-'}`);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
if (!QUIET) {
|
|
244
|
-
printPerQueryTable(perQuery);
|
|
245
|
-
}
|
|
246
|
-
const overall = aggregate(perQuery);
|
|
247
|
-
const byDifficulty = {};
|
|
248
|
-
for (const d of ['easy', 'medium', 'vague']) {
|
|
249
|
-
byDifficulty[d] = aggregate(perQuery.filter((r) => r.difficulty === d));
|
|
250
|
-
}
|
|
251
|
-
console.log('');
|
|
252
|
-
printAggregate('overall', overall);
|
|
253
|
-
for (const d of ['easy', 'medium', 'vague']) {
|
|
254
|
-
printAggregate(d, byDifficulty[d]);
|
|
255
|
-
}
|
|
256
|
-
console.log('');
|
|
257
|
-
if (!NO_SAVE) {
|
|
258
|
-
const run = {
|
|
259
|
-
timestamp: new Date().toISOString(),
|
|
260
|
-
label: LABEL,
|
|
261
|
-
datasetVersion: dataset.version,
|
|
262
|
-
topK: TOP_K,
|
|
263
|
-
overall,
|
|
264
|
-
byDifficulty,
|
|
265
|
-
perQuery,
|
|
266
|
-
};
|
|
267
|
-
const dir = resolveResultsDir();
|
|
268
|
-
const stamp = run.timestamp.replace(/[:.]/g, '-');
|
|
269
|
-
const outPath = path.join(dir, `${LABEL}-${stamp}.json`);
|
|
270
|
-
const labelLatestPath = path.join(dir, `${LABEL}-latest.json`);
|
|
271
|
-
const latestPath = path.join(dir, 'latest.json');
|
|
272
|
-
fs.writeFileSync(outPath, JSON.stringify(run, null, 2));
|
|
273
|
-
fs.writeFileSync(labelLatestPath, JSON.stringify(run, null, 2));
|
|
274
|
-
fs.writeFileSync(latestPath, JSON.stringify(run, null, 2));
|
|
275
|
-
console.log(`Saved: ${path.relative(process.cwd(), outPath)}`);
|
|
276
|
-
console.log(` ${path.relative(process.cwd(), labelLatestPath)}`);
|
|
277
|
-
console.log(` ${path.relative(process.cwd(), latestPath)}\n`);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
try {
|
|
281
|
-
await runEval();
|
|
282
|
-
}
|
|
283
|
-
catch (err) {
|
|
284
|
-
console.error('Eval failed:', err);
|
|
285
|
-
process.exit(1);
|
|
286
|
-
}
|
|
287
|
-
//# sourceMappingURL=eval-documentation-rag.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eval-documentation-rag.js","sourceRoot":"","sources":["../../src/scripts/eval-documentation-rag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAmFhF,4EAA4E;AAE5E,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;AAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAEzC,SAAS,SAAS,CAAC,IAAY,EAAE,IAAY;IAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC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CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxD,EAAE,CAAC,aAAa,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAChE,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;AACH,CAAC;AAED,IAAI,CAAC;IACH,MAAM,OAAO,EAAE,CAAC;AAClB,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate the embeddings cache for the currently configured model.
|
|
3
|
-
*
|
|
4
|
-
* Idempotent: if a valid cache already exists for the current model and the
|
|
5
|
-
* fingerprint matches documents.json, this exits quickly. Otherwise it
|
|
6
|
-
* embeds all chunks and writes the cache.
|
|
7
|
-
*
|
|
8
|
-
* Intended for the maintainer release flow:
|
|
9
|
-
* npm run build && npm run generate-cache
|
|
10
|
-
* to ensure the published tarball ships a warm cache for the default model.
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=generate-embeddings-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-embeddings-cache.d.ts","sourceRoot":"","sources":["../../src/scripts/generate-embeddings-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate the embeddings cache for the currently configured model.
|
|
3
|
-
*
|
|
4
|
-
* Idempotent: if a valid cache already exists for the current model and the
|
|
5
|
-
* fingerprint matches documents.json, this exits quickly. Otherwise it
|
|
6
|
-
* embeds all chunks and writes the cache.
|
|
7
|
-
*
|
|
8
|
-
* Intended for the maintainer release flow:
|
|
9
|
-
* npm run build && npm run generate-cache
|
|
10
|
-
* to ensure the published tarball ships a warm cache for the default model.
|
|
11
|
-
*/
|
|
12
|
-
import { queryVectorStore } from '../tools/documentation/simple-pdf-indexer.js';
|
|
13
|
-
const start = Date.now();
|
|
14
|
-
try {
|
|
15
|
-
// A single query forces the cold-start path inside queryVectorStore, which
|
|
16
|
-
// checks the cache and embeds+saves on miss. We don't care about results.
|
|
17
|
-
await queryVectorStore('warmup', 1);
|
|
18
|
-
console.log(`Embeddings cache ready (${Date.now() - start}ms)`);
|
|
19
|
-
}
|
|
20
|
-
catch (err) {
|
|
21
|
-
console.error('Failed to generate embeddings cache:', err);
|
|
22
|
-
process.exit(1);
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=generate-embeddings-cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-embeddings-cache.js","sourceRoot":"","sources":["../../src/scripts/generate-embeddings-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAEhF,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AACzB,IAAI,CAAC;IACH,2EAA2E;IAC3E,0EAA0E;IAC1E,MAAM,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;AAClE,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;IAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|