@blockrun/runcode 2.2.3 → 2.2.5

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.
@@ -124,7 +124,7 @@ const DIRECT_COMMANDS = {
124
124
  });
125
125
  emitDone(ctx);
126
126
  },
127
- '/doctor': (ctx) => {
127
+ '/doctor': async (ctx) => {
128
128
  const checks = [];
129
129
  try {
130
130
  execSync('git --version', { stdio: 'pipe' });
@@ -6,24 +6,38 @@
6
6
  */
7
7
  import fs from 'node:fs';
8
8
  import path from 'node:path';
9
+ import { execSync } from 'node:child_process';
9
10
  import { BLOCKRUN_DIR } from '../config.js';
10
11
  const GLOBAL_MCP_FILE = path.join(BLOCKRUN_DIR, 'mcp.json');
11
12
  /**
12
13
  * Load MCP server configurations from global + project files.
13
14
  * Project config overrides global for same server name.
14
15
  */
15
- // Built-in MCP server: @blockrun/mcp is always available (zero config)
16
+ // Built-in MCP server: @blockrun/mcp available when globally installed
17
+ // Uses `blockrun-mcp` binary instead of `npx` for fast startup
16
18
  const BUILTIN_MCP_SERVERS = {
17
19
  blockrun: {
18
20
  transport: 'stdio',
19
- command: 'npx',
20
- args: ['-y', '@blockrun/mcp'],
21
+ command: 'blockrun-mcp',
22
+ args: [],
21
23
  label: 'BlockRun (built-in)',
22
24
  },
23
25
  };
26
+ function isCommandAvailable(cmd) {
27
+ try {
28
+ execSync(`which ${cmd}`, { stdio: 'pipe' });
29
+ return true;
30
+ }
31
+ catch {
32
+ return false;
33
+ }
34
+ }
24
35
  export function loadMcpConfig(workDir) {
25
- // Start with built-in servers
26
- const servers = { ...BUILTIN_MCP_SERVERS };
36
+ // Start with built-in servers (only if binary is available)
37
+ const servers = {};
38
+ if (isCommandAvailable('blockrun-mcp')) {
39
+ Object.assign(servers, BUILTIN_MCP_SERVERS);
40
+ }
27
41
  // 1. Global config
28
42
  try {
29
43
  if (fs.existsSync(GLOBAL_MCP_FILE)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/runcode",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "RunCode — AI coding agent powered by 41+ models. Pay per use with USDC.",
5
5
  "type": "module",
6
6
  "bin": {