@corenel/mcp 0.1.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.
Files changed (74) hide show
  1. package/LICENSE +93 -0
  2. package/dist/asAgentTools.d.ts +12 -0
  3. package/dist/asAgentTools.d.ts.map +1 -0
  4. package/dist/asAgentTools.js +71 -0
  5. package/dist/asAgentTools.js.map +1 -0
  6. package/dist/auth.d.ts +25 -0
  7. package/dist/auth.d.ts.map +1 -0
  8. package/dist/auth.js +97 -0
  9. package/dist/auth.js.map +1 -0
  10. package/dist/cache.d.ts +17 -0
  11. package/dist/cache.d.ts.map +1 -0
  12. package/dist/cache.js +81 -0
  13. package/dist/cache.js.map +1 -0
  14. package/dist/config.d.ts +71 -0
  15. package/dist/config.d.ts.map +1 -0
  16. package/dist/config.js +239 -0
  17. package/dist/config.js.map +1 -0
  18. package/dist/gatedAgentTools.d.ts +12 -0
  19. package/dist/gatedAgentTools.d.ts.map +1 -0
  20. package/dist/gatedAgentTools.js +36 -0
  21. package/dist/gatedAgentTools.js.map +1 -0
  22. package/dist/httpClient.d.ts +47 -0
  23. package/dist/httpClient.d.ts.map +1 -0
  24. package/dist/httpClient.js +196 -0
  25. package/dist/httpClient.js.map +1 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +9 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/oauth/discovery.d.ts +55 -0
  31. package/dist/oauth/discovery.d.ts.map +1 -0
  32. package/dist/oauth/discovery.js +211 -0
  33. package/dist/oauth/discovery.js.map +1 -0
  34. package/dist/oauth/login.d.ts +41 -0
  35. package/dist/oauth/login.d.ts.map +1 -0
  36. package/dist/oauth/login.js +206 -0
  37. package/dist/oauth/login.js.map +1 -0
  38. package/dist/oauth/loopback.d.ts +58 -0
  39. package/dist/oauth/loopback.d.ts.map +1 -0
  40. package/dist/oauth/loopback.js +165 -0
  41. package/dist/oauth/loopback.js.map +1 -0
  42. package/dist/oauth/pkce.d.ts +45 -0
  43. package/dist/oauth/pkce.d.ts.map +1 -0
  44. package/dist/oauth/pkce.js +67 -0
  45. package/dist/oauth/pkce.js.map +1 -0
  46. package/dist/oauth/register.d.ts +34 -0
  47. package/dist/oauth/register.d.ts.map +1 -0
  48. package/dist/oauth/register.js +57 -0
  49. package/dist/oauth/register.js.map +1 -0
  50. package/dist/oauth/tokens.d.ts +62 -0
  51. package/dist/oauth/tokens.d.ts.map +1 -0
  52. package/dist/oauth/tokens.js +118 -0
  53. package/dist/oauth/tokens.js.map +1 -0
  54. package/dist/policy.d.ts +10 -0
  55. package/dist/policy.d.ts.map +1 -0
  56. package/dist/policy.js +71 -0
  57. package/dist/policy.js.map +1 -0
  58. package/dist/registry.d.ts +124 -0
  59. package/dist/registry.d.ts.map +1 -0
  60. package/dist/registry.js +265 -0
  61. package/dist/registry.js.map +1 -0
  62. package/dist/timedFetch.d.ts +10 -0
  63. package/dist/timedFetch.d.ts.map +1 -0
  64. package/dist/timedFetch.js +39 -0
  65. package/dist/timedFetch.js.map +1 -0
  66. package/dist/toolNames.d.ts +2 -0
  67. package/dist/toolNames.d.ts.map +1 -0
  68. package/dist/toolNames.js +14 -0
  69. package/dist/toolNames.js.map +1 -0
  70. package/dist/types.d.ts +62 -0
  71. package/dist/types.d.ts.map +1 -0
  72. package/dist/types.js +19 -0
  73. package/dist/types.js.map +1 -0
  74. package/package.json +44 -0
package/dist/types.js ADDED
@@ -0,0 +1,19 @@
1
+ /* THE SHAPE OF AN MCP SERVER AND ITS CREDENTIAL.
2
+ *
3
+ * Split deliberately across two stores, mirroring the split daemon.json /
4
+ * auth.json already draws for the user's own sign-in (see
5
+ * packages/sidecar/src/auth/store.ts): the SERVER is config -- a name and a
6
+ * URL, safe to paste into a support thread or copy to another machine -- and
7
+ * the CREDENTIAL is a secret that must never land in a file meant to be
8
+ * shareable that way. `config/keyTypes.ts` enforces the first half of that
9
+ * split by refusing `config set mcpServers` outright; this file and
10
+ * `mcp/config.ts` hold the rest.
11
+ *
12
+ * McpCredential is a TAGGED UNION from the start, not a headers-only shape
13
+ * grown into one later. OAuth is in this milestone's design even though only
14
+ * headers-based auth ships first, and a later reader/writer must not have to
15
+ * guess which fields imply which kind -- `kind` says so directly, and nothing
16
+ * downstream may branch on the PRESENCE of a field instead of the tag.
17
+ */
18
+ export {};
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@corenel/mcp",
3
+ "version": "0.1.0",
4
+ "license": "Elastic-2.0",
5
+ "type": "module",
6
+ "description": "Corenel MCP — a JSON-RPC-over-HTTP MCP client, its registry, OAuth and call policy. Node-only. Shared by the sidecar daemon and the CLI so the two cannot drift.",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./*": {
13
+ "types": "./dist/*.d.ts",
14
+ "default": "./dist/*.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "dependencies": {
21
+ "@corenel/config": "0.1.0",
22
+ "@corenel/protocol": "0.7.3",
23
+ "@corenel/harness": "0.8.0",
24
+ "@corenel/tools-node": "0.4.0"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^24.13.1",
28
+ "typescript": "^5.9.3",
29
+ "esbuild": "^0.21.5"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/Prompd/prompd-web.git",
37
+ "directory": "packages/mcp"
38
+ },
39
+ "scripts": {
40
+ "typecheck": "tsc --noEmit",
41
+ "prebuild": "pnpm --filter @corenel/tools-node build && pnpm --filter @corenel/config build && pnpm --filter @corenel/protocol build && pnpm --filter @corenel/harness build",
42
+ "build": "node build.mjs"
43
+ }
44
+ }