cache-overflow-mcp 0.3.0 → 0.3.1
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/.env.example +3 -3
- package/AGENTS.md +235 -0
- package/E2E-TESTING.md +5 -5
- package/LICENSE +21 -0
- package/README.md +13 -6
- package/dist/prompts/index.d.ts +1 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +61 -1
- package/dist/prompts/index.js.map +1 -1
- package/dist/server.js +1 -1
- package/dist/testing/mock-data.js +40 -40
- package/dist/tools/find-solution.d.ts.map +1 -1
- package/dist/tools/find-solution.js +22 -3
- package/dist/tools/find-solution.js.map +1 -1
- package/dist/tools/get-balance.d.ts +3 -0
- package/dist/tools/get-balance.d.ts.map +1 -0
- package/dist/tools/get-balance.js +34 -0
- package/dist/tools/get-balance.js.map +1 -0
- package/dist/tools/submit-feedback.js +1 -1
- package/dist/tools/submit-feedback.js.map +1 -1
- package/dist/tools/submit-verification.js +1 -1
- package/dist/tools/submit-verification.js.map +1 -1
- package/dist/tools/unlock-solution.d.ts.map +1 -1
- package/dist/tools/unlock-solution.js +3 -2
- package/dist/tools/unlock-solution.js.map +1 -1
- package/dist/ui/verification-dialog.js +267 -267
- package/package.json +3 -3
- package/{mock-server.js → scripts/mock-server.js} +1 -1
- package/src/cli.ts +10 -10
- package/src/client.test.ts +116 -116
- package/src/client.ts +76 -76
- package/src/config.ts +9 -9
- package/src/index.ts +3 -3
- package/src/prompts/index.ts +63 -1
- package/src/server.ts +1 -1
- package/src/testing/mock-data.ts +142 -142
- package/src/testing/mock-server.ts +176 -176
- package/src/tools/find-solution.ts +26 -3
- package/src/tools/index.ts +23 -23
- package/src/tools/submit-feedback.ts +1 -1
- package/src/tools/submit-verification.ts +1 -1
- package/src/tools/unlock-solution.ts +4 -2
- package/src/types.ts +39 -39
- package/src/ui/verification-dialog.ts +342 -342
- package/tsconfig.json +20 -20
- package/test-dialog.js +0 -37
package/tsconfig.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"lib": ["ES2022"],
|
|
7
|
-
"outDir": "./dist",
|
|
8
|
-
"rootDir": "./src",
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"declarationMap": true,
|
|
15
|
-
"sourceMap": true,
|
|
16
|
-
"resolveJsonModule": true
|
|
17
|
-
},
|
|
18
|
-
"include": ["src/**/*"],
|
|
19
|
-
"exclude": ["node_modules", "dist"]
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"declarationMap": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"resolveJsonModule": true
|
|
17
|
+
},
|
|
18
|
+
"include": ["src/**/*"],
|
|
19
|
+
"exclude": ["node_modules", "dist"]
|
|
20
|
+
}
|
package/test-dialog.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// End-to-end test: Mock API server -> MCP client -> Verification dialog
|
|
2
|
-
import { MockServer } from './dist/testing/mock-server.js';
|
|
3
|
-
import { CacheOverflowClient } from './dist/client.js';
|
|
4
|
-
import { findSolution } from './dist/tools/find-solution.js';
|
|
5
|
-
|
|
6
|
-
async function main() {
|
|
7
|
-
// 1. Start mock API server
|
|
8
|
-
console.log('Starting mock API server...');
|
|
9
|
-
const mockServer = new MockServer();
|
|
10
|
-
await mockServer.start();
|
|
11
|
-
console.log(`Mock server running at ${mockServer.url}\n`);
|
|
12
|
-
|
|
13
|
-
// 2. Create client pointing to mock server
|
|
14
|
-
const client = new CacheOverflowClient(mockServer.url);
|
|
15
|
-
|
|
16
|
-
// 3. Call find_solution tool (this will trigger the verification dialog)
|
|
17
|
-
console.log('Calling find_solution tool...');
|
|
18
|
-
console.log('This will open a verification dialog for solutions requiring human review.\n');
|
|
19
|
-
|
|
20
|
-
const result = await findSolution.handler({ query: 'memory leak' }, client);
|
|
21
|
-
|
|
22
|
-
// 4. Show results
|
|
23
|
-
console.log('Tool response:');
|
|
24
|
-
console.log(result.content[0].text);
|
|
25
|
-
|
|
26
|
-
// 5. Cleanup
|
|
27
|
-
await mockServer.stop();
|
|
28
|
-
console.log('\nMock server stopped.');
|
|
29
|
-
|
|
30
|
-
// Allow pending handles to close gracefully
|
|
31
|
-
setTimeout(() => process.exit(0), 100);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
main().catch((err) => {
|
|
35
|
-
console.error('Error:', err);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
});
|