@rvry/mcp 0.4.0 → 0.4.2

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/dist/client.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * RVRY MCP Client -- HTTP client for the RVRY engine /api/v1/think endpoint.
3
3
  */
4
+ import { fetch } from './fetch.js';
4
5
  const DEFAULT_ENGINE_URL = 'https://engine.rvry.ai';
5
6
  /**
6
7
  * Call the RVRY engine /api/v1/think endpoint with a specific tool.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Portable fetch — uses globalThis.fetch if available, falls back to
3
+ * Node's bundled undici (ships with Node 18+, no extra install).
4
+ *
5
+ * Delegates at call time (not import time) so globalThis.fetch can be
6
+ * overridden in tests.
7
+ */
8
+ /**
9
+ * Portable fetch that delegates to globalThis.fetch (checked at call time)
10
+ * or the undici fallback resolved at import time.
11
+ */
12
+ export declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
package/dist/fetch.js ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Portable fetch — uses globalThis.fetch if available, falls back to
3
+ * Node's bundled undici (ships with Node 18+, no extra install).
4
+ *
5
+ * Delegates at call time (not import time) so globalThis.fetch can be
6
+ * overridden in tests.
7
+ */
8
+ let _undiciFetch = null;
9
+ if (typeof globalThis.fetch !== 'function') {
10
+ try {
11
+ // @ts-ignore -- undici has no type declarations in this package; runtime-only fallback
12
+ const mod = await import('undici');
13
+ _undiciFetch = mod.fetch;
14
+ }
15
+ catch {
16
+ throw new Error('[rvry-mcp] fetch is not available and undici import failed. ' +
17
+ 'Node.js 18.13.0+ or Bun is required. Current version: ' + process.version);
18
+ }
19
+ }
20
+ /**
21
+ * Portable fetch that delegates to globalThis.fetch (checked at call time)
22
+ * or the undici fallback resolved at import time.
23
+ */
24
+ export function fetch(input, init) {
25
+ const fn = globalThis.fetch ?? _undiciFetch;
26
+ if (!fn) {
27
+ throw new Error('[rvry-mcp] No fetch implementation available.');
28
+ }
29
+ return fn(input, init);
30
+ }
package/dist/setup.js CHANGED
@@ -16,6 +16,7 @@ import { createInterface } from 'readline';
16
16
  import { execSync } from 'child_process';
17
17
  import { platform } from 'os';
18
18
  import { createRequire } from 'module';
19
+ import { fetch } from './fetch.js';
19
20
  const require = createRequire(import.meta.url);
20
21
  const PKG_VERSION = require('../package.json').version;
21
22
  const ENGINE_URL = 'https://engine.rvry.ai';
@@ -927,6 +928,17 @@ export async function runSetup() {
927
928
  console.log(` ${step}. Restart desktop apps for the new MCP server to load`);
928
929
  step++;
929
930
  }
931
+ // Generic MCP config for any client
932
+ console.log(` ${step}. Add RVRY to any other MCP-compatible client —`);
933
+ console.log(' add this to your MCP config:');
934
+ console.log('');
935
+ const mcpBlock = { rvry: RVRY_SERVER_ENTRY('YOUR_RVRY_TOKEN') };
936
+ const lines = JSON.stringify(mcpBlock, null, 2).split('\n');
937
+ for (const line of lines.slice(1, -1)) {
938
+ console.log(` ${line}`);
939
+ }
940
+ console.log('');
941
+ step++;
930
942
  if (hasCodeStyle) {
931
943
  console.log(` ${step}. In Claude Code, try:`);
932
944
  console.log(' /deepthink "your question"');
@@ -942,14 +954,4 @@ export async function runSetup() {
942
954
  console.log(' 1. Configure a client using the manual instructions above');
943
955
  console.log(' 2. Then try: /deepthink "your question"');
944
956
  }
945
- // Generic MCP config for any client
946
- console.log(` ${step}. Add RVRY to any other MCP-compatible client —`);
947
- console.log(' add this to your MCP config:');
948
- console.log('');
949
- const mcpBlock = { rvry: RVRY_SERVER_ENTRY('YOUR_RVRY_TOKEN') };
950
- const lines = JSON.stringify(mcpBlock, null, 2).split('\n');
951
- for (const line of lines.slice(1, -1)) {
952
- console.log(` ${line}`);
953
- }
954
- console.log('');
955
957
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rvry/mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "RVRY reasoning depth enforcement (RDE) engine client.",
5
5
  "type": "module",
6
6
  "bin": {