froggo-mission-control 1.2.21 → 1.2.22
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.
|
@@ -2,7 +2,7 @@ import { ENV } from '@/lib/env';
|
|
|
2
2
|
import { NextRequest } from 'next/server';
|
|
3
3
|
import { getDb } from '@/lib/database';
|
|
4
4
|
import { calcCostUsd } from '@/lib/env';
|
|
5
|
-
import { existsSync, readFileSync, statSync } from 'fs';
|
|
5
|
+
import { existsSync, readFileSync, statSync, mkdirSync } from 'fs';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
import { homedir } from 'os';
|
|
8
8
|
import { spawn } from 'child_process';
|
|
@@ -301,10 +301,12 @@ export async function POST(
|
|
|
301
301
|
const resumeId = (existing && existing.soulMtime === sm) ? existing.sessionId : null;
|
|
302
302
|
|
|
303
303
|
const dir = join(HOME, 'mission-control', 'agents', id);
|
|
304
|
-
//
|
|
305
|
-
//
|
|
306
|
-
//
|
|
307
|
-
|
|
304
|
+
// Always use the agent workspace dir as cwd so Claude finds ~/mission-control/.mcp.json
|
|
305
|
+
// and ~/.claude/settings.json via directory traversal. Creating it if it doesn't exist.
|
|
306
|
+
// (Using HOME directly would skip ~/mission-control/ in the search path, causing MCP
|
|
307
|
+
// servers to not be found and all tool calls to silently fail → 120s timeout.)
|
|
308
|
+
try { if (!existsSync(dir)) mkdirSync(dir, { recursive: true }); } catch {}
|
|
309
|
+
const cwd = existsSync(dir) ? dir : HOME;
|
|
308
310
|
|
|
309
311
|
const { allowed, disallowed } = resolveAgentTools(id);
|
|
310
312
|
const args = [
|
package/package.json
CHANGED