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
- // For new sessions: use HOME so the agent's CLAUDE.md boot sequence is NOT triggered.
305
- // The --system-prompt arg already injects the agent's identity and personality.
306
- // For resumed sessions: CLAUDE.md isn't re-read anyway, so cwd doesn't matter.
307
- const cwd = resumeId && existsSync(dir) ? dir : HOME;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froggo-mission-control",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "description": "Self-hosted AI agent platform for Claude Code CLI. Multi-agent orchestration, task management, Gmail, Calendar, Kanban and more.",
5
5
  "keywords": [
6
6
  "claude",