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.
Files changed (46) hide show
  1. package/.env.example +3 -3
  2. package/AGENTS.md +235 -0
  3. package/E2E-TESTING.md +5 -5
  4. package/LICENSE +21 -0
  5. package/README.md +13 -6
  6. package/dist/prompts/index.d.ts +1 -0
  7. package/dist/prompts/index.d.ts.map +1 -1
  8. package/dist/prompts/index.js +61 -1
  9. package/dist/prompts/index.js.map +1 -1
  10. package/dist/server.js +1 -1
  11. package/dist/testing/mock-data.js +40 -40
  12. package/dist/tools/find-solution.d.ts.map +1 -1
  13. package/dist/tools/find-solution.js +22 -3
  14. package/dist/tools/find-solution.js.map +1 -1
  15. package/dist/tools/get-balance.d.ts +3 -0
  16. package/dist/tools/get-balance.d.ts.map +1 -0
  17. package/dist/tools/get-balance.js +34 -0
  18. package/dist/tools/get-balance.js.map +1 -0
  19. package/dist/tools/submit-feedback.js +1 -1
  20. package/dist/tools/submit-feedback.js.map +1 -1
  21. package/dist/tools/submit-verification.js +1 -1
  22. package/dist/tools/submit-verification.js.map +1 -1
  23. package/dist/tools/unlock-solution.d.ts.map +1 -1
  24. package/dist/tools/unlock-solution.js +3 -2
  25. package/dist/tools/unlock-solution.js.map +1 -1
  26. package/dist/ui/verification-dialog.js +267 -267
  27. package/package.json +3 -3
  28. package/{mock-server.js → scripts/mock-server.js} +1 -1
  29. package/src/cli.ts +10 -10
  30. package/src/client.test.ts +116 -116
  31. package/src/client.ts +76 -76
  32. package/src/config.ts +9 -9
  33. package/src/index.ts +3 -3
  34. package/src/prompts/index.ts +63 -1
  35. package/src/server.ts +1 -1
  36. package/src/testing/mock-data.ts +142 -142
  37. package/src/testing/mock-server.ts +176 -176
  38. package/src/tools/find-solution.ts +26 -3
  39. package/src/tools/index.ts +23 -23
  40. package/src/tools/submit-feedback.ts +1 -1
  41. package/src/tools/submit-verification.ts +1 -1
  42. package/src/tools/unlock-solution.ts +4 -2
  43. package/src/types.ts +39 -39
  44. package/src/ui/verification-dialog.ts +342 -342
  45. package/tsconfig.json +20 -20
  46. 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
- });