@remcp/remcp 0.1.3 → 0.1.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.
Files changed (56) hide show
  1. package/README.md +54 -105
  2. package/package.json +12 -52
  3. package/src/agent.mjs +19 -24
  4. package/src/cli.mjs +42 -19
  5. package/src/runtime.mjs +15 -0
  6. package/src/version.mjs +0 -2
  7. package/THIRD_PARTY_NOTICES.md +0 -7
  8. package/assets/remcp-icon.png +0 -0
  9. package/mcp.json +0 -9
  10. package/plugin.json +0 -37
  11. package/public/android-chrome-192x192.png +0 -0
  12. package/public/android-chrome-512x512.png +0 -0
  13. package/public/app.js +0 -96
  14. package/public/apple-touch-icon.png +0 -0
  15. package/public/assets/art/hero-relay.webp +0 -0
  16. package/public/assets/art/relay-detail.webp +0 -0
  17. package/public/assets/icon-120.png +0 -0
  18. package/public/assets/icon-16.png +0 -0
  19. package/public/assets/icon-180.png +0 -0
  20. package/public/assets/icon-192.png +0 -0
  21. package/public/assets/icon-256.png +0 -0
  22. package/public/assets/icon-32.png +0 -0
  23. package/public/assets/icon-48.png +0 -0
  24. package/public/assets/icon-512.png +0 -0
  25. package/public/assets/og-remcp.png +0 -0
  26. package/public/authorize.html +0 -59
  27. package/public/copy.js +0 -40
  28. package/public/docs.html +0 -93
  29. package/public/favicon-16x16.png +0 -0
  30. package/public/favicon-32x32.png +0 -0
  31. package/public/favicon-48x48.png +0 -0
  32. package/public/favicon.ico +0 -0
  33. package/public/index.html +0 -134
  34. package/public/oauth-app.js +0 -63
  35. package/public/privacy.html +0 -80
  36. package/public/remcp-darkmode-16x16.png +0 -0
  37. package/public/remcp-darkmode-192x192.png +0 -0
  38. package/public/remcp-darkmode-32x32.png +0 -0
  39. package/public/remcp-darkmode-48x48.png +0 -0
  40. package/public/remcp-darkmode-512x512.png +0 -0
  41. package/public/security.html +0 -70
  42. package/public/site.webmanifest +0 -23
  43. package/public/style.css +0 -261
  44. package/public/support.html +0 -75
  45. package/public/terms.html +0 -77
  46. package/skills/remcp-operator/SKILL.md +0 -36
  47. package/src/auth.mjs +0 -71
  48. package/src/config.mjs +0 -51
  49. package/src/db.mjs +0 -102
  50. package/src/mcp.mjs +0 -95
  51. package/src/oauth.mjs +0 -164
  52. package/src/relay.mjs +0 -97
  53. package/src/review-sandbox.mjs +0 -96
  54. package/src/server.mjs +0 -159
  55. package/src/tool-catalog.json +0 -796
  56. package/src/util.mjs +0 -24
package/src/util.mjs DELETED
@@ -1,24 +0,0 @@
1
- import crypto from 'node:crypto';
2
-
3
- export const now = () => Date.now();
4
- export const sha256 = value => crypto.createHash('sha256').update(String(value)).digest('hex');
5
- export const randomToken = (bytes = 32) => crypto.randomBytes(bytes).toString('base64url');
6
- export const randomId = () => crypto.randomUUID();
7
- export const bearer = req => {
8
- const value = req.headers.authorization || '';
9
- return value.startsWith('Bearer ') ? value.slice(7).trim() : '';
10
- };
11
- export function normalizeScope(value = '') {
12
- const allowed = new Set(['openid', 'email', 'offline_access', 'remcp:control']);
13
- const scopes = String(value).split(/\s+/).filter(Boolean).filter(scope => allowed.has(scope));
14
- if (!scopes.includes('remcp:control')) scopes.push('remcp:control');
15
- if (!scopes.includes('offline_access')) scopes.push('offline_access');
16
- return [...new Set(scopes)].join(' ');
17
- }
18
- export function validRedirectUri(value) {
19
- try {
20
- const url = new URL(value);
21
- if (url.protocol === 'https:') return true;
22
- return url.protocol === 'http:' && ['127.0.0.1', 'localhost', '[::1]'].includes(url.hostname);
23
- } catch { return false; }
24
- }