@appium/mcp-documentation 1.0.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 +0 -0
- package/LICENSE +201 -0
- package/README.md +126 -0
- package/dist/answer-appium.d.ts +8 -0
- package/dist/answer-appium.d.ts.map +1 -0
- package/dist/answer-appium.js +38 -0
- package/dist/answer-appium.js.map +1 -0
- package/dist/appium-skills.d.ts +5 -0
- package/dist/appium-skills.d.ts.map +1 -0
- package/dist/appium-skills.js +168 -0
- package/dist/appium-skills.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +5 -0
- package/dist/logger.js.map +1 -0
- package/dist/markdown-header-splitter.d.ts +32 -0
- package/dist/markdown-header-splitter.d.ts.map +1 -0
- package/dist/markdown-header-splitter.js +180 -0
- package/dist/markdown-header-splitter.js.map +1 -0
- package/dist/paths.d.ts +2 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +22 -0
- package/dist/paths.js.map +1 -0
- package/dist/plugin.d.ts +19 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +18 -0
- package/dist/plugin.js.map +1 -0
- package/dist/reasoning-rag.d.ts +89 -0
- package/dist/reasoning-rag.d.ts.map +1 -0
- package/dist/reasoning-rag.js +282 -0
- package/dist/reasoning-rag.js.map +1 -0
- package/dist/scripts/eval-documentation-rag.d.ts +50 -0
- package/dist/scripts/eval-documentation-rag.d.ts.map +1 -0
- package/dist/scripts/eval-documentation-rag.js +287 -0
- package/dist/scripts/eval-documentation-rag.js.map +1 -0
- package/dist/scripts/generate-embeddings-cache.d.ts +13 -0
- package/dist/scripts/generate-embeddings-cache.d.ts.map +1 -0
- package/dist/scripts/generate-embeddings-cache.js +24 -0
- package/dist/scripts/generate-embeddings-cache.js.map +1 -0
- package/dist/scripts/rag-eval-dataset.json +516 -0
- package/dist/scripts/simple-index-documentation.d.ts +21 -0
- package/dist/scripts/simple-index-documentation.d.ts.map +1 -0
- package/dist/scripts/simple-index-documentation.js +77 -0
- package/dist/scripts/simple-index-documentation.js.map +1 -0
- package/dist/scripts/simple-query-documentation.d.ts +13 -0
- package/dist/scripts/simple-query-documentation.d.ts.map +1 -0
- package/dist/scripts/simple-query-documentation.js +52 -0
- package/dist/scripts/simple-query-documentation.js.map +1 -0
- package/dist/sentence-transformers-embeddings.d.ts +40 -0
- package/dist/sentence-transformers-embeddings.d.ts.map +1 -0
- package/dist/sentence-transformers-embeddings.js +119 -0
- package/dist/sentence-transformers-embeddings.js.map +1 -0
- package/dist/simple-pdf-indexer.d.ts +47 -0
- package/dist/simple-pdf-indexer.d.ts.map +1 -0
- package/dist/simple-pdf-indexer.js +572 -0
- package/dist/simple-pdf-indexer.js.map +1 -0
- package/dist/tests/__mocks__/@appium/support.d.ts +92 -0
- package/dist/tests/__mocks__/@appium/support.d.ts.map +1 -0
- package/dist/tests/__mocks__/@appium/support.js +66 -0
- package/dist/tests/__mocks__/@appium/support.js.map +1 -0
- package/dist/tests/appium-skills.test.d.ts +2 -0
- package/dist/tests/appium-skills.test.d.ts.map +1 -0
- package/dist/tests/appium-skills.test.js +26 -0
- package/dist/tests/appium-skills.test.js.map +1 -0
- package/dist/tests/plugin.test.d.ts +2 -0
- package/dist/tests/plugin.test.d.ts.map +1 -0
- package/dist/tests/plugin.test.js +18 -0
- package/dist/tests/plugin.test.js.map +1 -0
- package/dist/tests/simple-pdf-indexer.test.d.ts +2 -0
- package/dist/tests/simple-pdf-indexer.test.d.ts.map +1 -0
- package/dist/tests/simple-pdf-indexer.test.js +37 -0
- package/dist/tests/simple-pdf-indexer.test.js.map +1 -0
- package/dist/tool-response.d.ts +4 -0
- package/dist/tool-response.d.ts.map +1 -0
- package/dist/tool-response.js +12 -0
- package/dist/tool-response.js.map +1 -0
- package/dist/tools.d.ts +3 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +3 -0
- package/dist/tools.js.map +1 -0
- package/dist/uploads/documents.json +1 -0
- package/package.json +84 -0
- package/scripts/zip-assets.mjs +75 -0
- package/src/resources/submodules.zip +0 -0
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appium/mcp-documentation",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Appium MCP documentation query tools and indexed documentation assets",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/appium/appium-mcp-documentation.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/appium/appium-mcp-documentation/issues"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"main": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./tools": {
|
|
24
|
+
"types": "./dist/tools.d.ts",
|
|
25
|
+
"import": "./dist/tools.js"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "rimraf dist tsconfig.tsbuildinfo && tsc -b && npm run copy-assets",
|
|
31
|
+
"copy-assets": "mkdir -p dist/uploads dist/scripts && cp -f src/uploads/documents.json dist/uploads/documents.json 2>/dev/null || true && cp -f src/uploads/embeddings-*.json dist/uploads/ 2>/dev/null || true && cp -f src/scripts/rag-eval-dataset.json dist/scripts/rag-eval-dataset.json 2>/dev/null || true",
|
|
32
|
+
"index-docs": "node dist/scripts/simple-index-documentation.js",
|
|
33
|
+
"query-docs": "node dist/scripts/simple-query-documentation.js",
|
|
34
|
+
"eval-docs": "node dist/scripts/eval-documentation-rag.js",
|
|
35
|
+
"generate-cache": "node dist/scripts/generate-embeddings-cache.js",
|
|
36
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
37
|
+
"lint": "eslint src --ext .ts",
|
|
38
|
+
"format:check": "prettier --check \"src/**/*.{ts,js,json}\"",
|
|
39
|
+
"format": "prettier --write \"src/**/*.{ts,js,json}\"",
|
|
40
|
+
"setup-submodules": "./scripts/setup-submodules-sparse.sh",
|
|
41
|
+
"update-submodules": "./scripts/update-submodules.sh",
|
|
42
|
+
"zip-assets": "node scripts/zip-assets.mjs zip",
|
|
43
|
+
"unzip-assets": "node scripts/zip-assets.mjs unzip",
|
|
44
|
+
"preinstall": "node scripts/zip-assets.mjs unzip"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"scripts/zip-assets.mjs",
|
|
49
|
+
"src/resources/submodules.zip",
|
|
50
|
+
"README.md",
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"CHANGELOG.md",
|
|
53
|
+
"README.md"
|
|
54
|
+
],
|
|
55
|
+
"keywords": [
|
|
56
|
+
"appium",
|
|
57
|
+
"mcp",
|
|
58
|
+
"documentation",
|
|
59
|
+
"rag"
|
|
60
|
+
],
|
|
61
|
+
"license": "Apache-2.0",
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@appium/support": "^7.0.2",
|
|
64
|
+
"@langchain/classic": "^1.0.10",
|
|
65
|
+
"@langchain/core": "^1.1.17",
|
|
66
|
+
"@langchain/textsplitters": "^1.0.1",
|
|
67
|
+
"@xenova/transformers": "^2.17.2",
|
|
68
|
+
"zod": "^4.3.6"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@appium/eslint-config-appium-ts": "^3.0.0",
|
|
72
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
73
|
+
"@semantic-release/git": "^10.0.1",
|
|
74
|
+
"@jest/globals": "^30.2.0",
|
|
75
|
+
"@types/jest": "^30.0.0",
|
|
76
|
+
"@types/node": "^25.0.9",
|
|
77
|
+
"fastmcp": "^4.0.0",
|
|
78
|
+
"jest": "^30.2.0",
|
|
79
|
+
"prettier": "^3.5.3",
|
|
80
|
+
"rimraf": "^6.0.1",
|
|
81
|
+
"semantic-release": "^25.0.3",
|
|
82
|
+
"typescript": "^6.0.2"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
|
|
5
|
+
import { zip as appiumZip } from '@appium/support';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
// Adjust these paths for your use case
|
|
11
|
+
const ZIP_SOURCE_DIR = path.join(
|
|
12
|
+
__dirname,
|
|
13
|
+
'..',
|
|
14
|
+
'src',
|
|
15
|
+
'resources',
|
|
16
|
+
'submodules'
|
|
17
|
+
);
|
|
18
|
+
const ZIP_OUTPUT_PATH = path.join(
|
|
19
|
+
__dirname,
|
|
20
|
+
'..',
|
|
21
|
+
'src',
|
|
22
|
+
'resources',
|
|
23
|
+
'submodules.zip'
|
|
24
|
+
);
|
|
25
|
+
const UNZIP_TARGET_DIR = path.join(
|
|
26
|
+
__dirname,
|
|
27
|
+
'..',
|
|
28
|
+
'src',
|
|
29
|
+
'resources',
|
|
30
|
+
'submodules'
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export async function zipAssets() {
|
|
34
|
+
const zipBase64 = await appiumZip.toInMemoryZip(ZIP_SOURCE_DIR);
|
|
35
|
+
const zipBuffer = Buffer.from(zipBase64, 'base64');
|
|
36
|
+
await fs.writeFile(ZIP_OUTPUT_PATH, zipBuffer);
|
|
37
|
+
console.log(`Zipped ${ZIP_SOURCE_DIR} -> ${ZIP_OUTPUT_PATH}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const fileExists = async (filePath) => {
|
|
41
|
+
try {
|
|
42
|
+
await fs.access(filePath);
|
|
43
|
+
return true;
|
|
44
|
+
} catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export async function unzipAssets() {
|
|
50
|
+
if (!(await fileExists(ZIP_OUTPUT_PATH))) {
|
|
51
|
+
console.log(
|
|
52
|
+
`Target directory ${ZIP_OUTPUT_PATH} does not exist. Skipping unzip.`
|
|
53
|
+
);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
await appiumZip.extractAllTo(ZIP_OUTPUT_PATH, UNZIP_TARGET_DIR);
|
|
57
|
+
console.log(`Unzipped ${ZIP_OUTPUT_PATH} -> ${UNZIP_TARGET_DIR}`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
61
|
+
const cmd = process.argv[2];
|
|
62
|
+
if (cmd === 'zip') {
|
|
63
|
+
zipAssets().catch((e) => {
|
|
64
|
+
console.error(e);
|
|
65
|
+
process.exitCode = 1;
|
|
66
|
+
});
|
|
67
|
+
} else if (cmd === 'unzip') {
|
|
68
|
+
unzipAssets().catch((e) => {
|
|
69
|
+
console.error(e);
|
|
70
|
+
process.exitCode = 1;
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
console.log('Usage: node zip-assets.mjs [zip|unzip]');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
Binary file
|