@riotprompt/riotprompt 1.0.3-dev.0 → 1.0.4
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/MCP-IMPLEMENTATION.md +192 -0
- package/MCP-SUMMARY.md +198 -0
- package/MCP.md +185 -0
- package/README.md +16 -1
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/prompts/create_and_execute.md +17 -0
- package/dist/mcp/prompts/index.d.ts +9 -0
- package/dist/mcp/prompts/process_and_export.md +17 -0
- package/dist/mcp/resources/config.d.ts +4 -0
- package/dist/mcp/resources/index.d.ts +9 -0
- package/dist/mcp/resources/version.d.ts +4 -0
- package/dist/mcp/server.d.ts +19 -0
- package/dist/mcp/tools/create.d.ts +3 -0
- package/dist/mcp/tools/execute.d.ts +3 -0
- package/dist/mcp/tools/get-version.d.ts +3 -0
- package/dist/mcp/tools/index.d.ts +9 -0
- package/dist/mcp/tools/process.d.ts +3 -0
- package/dist/mcp/types.d.ts +157 -0
- package/dist/mcp-server.js +31149 -0
- package/dist/mcp-server.js.map +7 -0
- package/package.json +13 -3
- package/scripts/build-mcp.js +67 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riotprompt/riotprompt",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"_versionReset": "2026-01-15",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prompt",
|
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"bin": {
|
|
26
|
-
"riotprompt": "./dist/cli.js"
|
|
26
|
+
"riotprompt": "./dist/cli.js",
|
|
27
|
+
"riotprompt-mcp": "./dist/mcp-server.js"
|
|
27
28
|
},
|
|
28
29
|
"engines": {
|
|
29
30
|
"node": ">=24.0.0"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
|
-
"build": "npm run lint && tsc --noEmit && vite build && vite build -c vite.config.cli.ts",
|
|
33
|
+
"build": "npm run lint && tsc --noEmit && vite build && vite build -c vite.config.cli.ts && node scripts/build-mcp.js && copyfiles -u 1 \"src/mcp/prompts/*.md\" dist && chmod 755 ./dist/mcp-server.js 2>/dev/null || true",
|
|
33
34
|
"start": "dist/main.js",
|
|
34
35
|
"dev": "vite",
|
|
35
36
|
"watch": "vite build --watch",
|
|
@@ -44,6 +45,9 @@
|
|
|
44
45
|
"clean": "rm -rf dist",
|
|
45
46
|
"precommit": "npm run build && npm run lint && npm run test",
|
|
46
47
|
"prepublishOnly": "npm run clean && npm run build",
|
|
48
|
+
"mcp:build": "vite build && node scripts/build-mcp.js && chmod 755 ./dist/mcp-server.js 2>/dev/null || true",
|
|
49
|
+
"mcp:inspect": "mcp-inspector npx -y @modelcontextprotocol/server-riotprompt",
|
|
50
|
+
"mcp:dev": "vite build --watch",
|
|
47
51
|
"docs:dev": "cd docs && cp ../README.md public/ && npm install && npm run dev",
|
|
48
52
|
"docs:build": "cd docs && cp ../README.md public/ && npm install && npm run build",
|
|
49
53
|
"docs:preview": "cd docs && npm run preview",
|
|
@@ -60,16 +64,21 @@
|
|
|
60
64
|
"@doccident/doccident": "^0.0.9",
|
|
61
65
|
"@eslint/eslintrc": "^3.3.1",
|
|
62
66
|
"@eslint/js": "^9.30.1",
|
|
67
|
+
"@modelcontextprotocol/inspector": "^0.19.0",
|
|
63
68
|
"@rollup/plugin-replace": "^6.0.2",
|
|
64
69
|
"@swc/core": "^1.12.11",
|
|
70
|
+
"@types/js-yaml": "^4.0.9",
|
|
65
71
|
"@types/node": "^24.0.12",
|
|
66
72
|
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
|
67
73
|
"@typescript-eslint/parser": "^8.36.0",
|
|
68
74
|
"@vitest/coverage-v8": "^4.0.17",
|
|
69
75
|
"ajv": "^8.17.1",
|
|
76
|
+
"copyfiles": "^2.4.1",
|
|
77
|
+
"esbuild": "0.27.2",
|
|
70
78
|
"eslint": "^9.30.1",
|
|
71
79
|
"eslint-plugin-import": "^2.32.0",
|
|
72
80
|
"globals": "^17.0.0",
|
|
81
|
+
"rollup-plugin-preserve-shebang": "^1.0.1",
|
|
73
82
|
"typescript": "^5.8.3",
|
|
74
83
|
"vite": "^7.0.4",
|
|
75
84
|
"vite-plugin-dts": "^4.5.4",
|
|
@@ -80,6 +89,7 @@
|
|
|
80
89
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
81
90
|
"@fjell/logging": "^4.4.68",
|
|
82
91
|
"@google/generative-ai": "^0.24.1",
|
|
92
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
83
93
|
"@theunwalked/cardigantime": "^0.0.22",
|
|
84
94
|
"@theunwalked/pressurelid": "^1.0.2",
|
|
85
95
|
"@theunwalked/spotclean": "^0.0.3",
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build MCP Server
|
|
4
|
+
* Simple build script to compile the MCP server separately from main build
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { build } from 'esbuild';
|
|
8
|
+
import { resolve, dirname } from 'path';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
import { readFileSync, writeFileSync, chmodSync } from 'fs';
|
|
11
|
+
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = dirname(__filename);
|
|
14
|
+
const root = resolve(__dirname, '..');
|
|
15
|
+
|
|
16
|
+
// Get package version
|
|
17
|
+
const packageJson = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf-8'));
|
|
18
|
+
const version = packageJson.version;
|
|
19
|
+
|
|
20
|
+
async function buildMCPServer() {
|
|
21
|
+
try {
|
|
22
|
+
console.log('Building MCP server...');
|
|
23
|
+
|
|
24
|
+
await build({
|
|
25
|
+
entryPoints: [resolve(root, 'src/mcp/server.ts')],
|
|
26
|
+
bundle: true,
|
|
27
|
+
platform: 'node',
|
|
28
|
+
target: 'esnext',
|
|
29
|
+
format: 'esm',
|
|
30
|
+
outfile: resolve(root, 'dist/mcp-server.js'),
|
|
31
|
+
external: [
|
|
32
|
+
'@modelcontextprotocol/*',
|
|
33
|
+
'@riotprompt/*',
|
|
34
|
+
'@anthropic-ai/*',
|
|
35
|
+
'@google/*',
|
|
36
|
+
'@fjell/*',
|
|
37
|
+
'@theunwalked/*',
|
|
38
|
+
'openai',
|
|
39
|
+
'tiktoken',
|
|
40
|
+
],
|
|
41
|
+
sourcemap: true,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Add shebang and replace placeholders
|
|
45
|
+
const outputPath = resolve(root, 'dist/mcp-server.js');
|
|
46
|
+
let content = readFileSync(outputPath, 'utf-8');
|
|
47
|
+
|
|
48
|
+
// Replace version placeholder if any
|
|
49
|
+
content = content.replace(/__VERSION__/g, version);
|
|
50
|
+
|
|
51
|
+
if (!content.startsWith('#!')) {
|
|
52
|
+
content = `#!/usr/bin/env node\n${content}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
writeFileSync(outputPath, content);
|
|
56
|
+
|
|
57
|
+
// Make executable
|
|
58
|
+
chmodSync(outputPath, 0o755);
|
|
59
|
+
|
|
60
|
+
console.log('✓ MCP server built successfully');
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error('✗ MCP server build failed:', error);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
buildMCPServer();
|