synabun 2026.3.313 → 2026.3.315

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.
@@ -134,7 +134,7 @@ export async function checkHealth() {
134
134
  */
135
135
  function updateCmdText(projectDir) {
136
136
  const cmdEl = $('loading-cmd-text');
137
- if (cmdEl) cmdEl.textContent = `cd ${projectDir} && npm start`;
137
+ if (cmdEl) cmdEl.textContent = `cd "${projectDir}" ; npm start`;
138
138
  }
139
139
 
140
140
  // ═══════════════════════════════════════════
@@ -2194,6 +2194,7 @@ function handleClaudeSkinWebSocket(ws) {
2194
2194
  let inTurn = false; // true while CLI is processing a user message
2195
2195
  let lastEventTime = Date.now(); // shared with stall detector
2196
2196
  const approvedTools = new Set(); // tools the user has approved — persists across respawns
2197
+ let mcpAllowedTools = new Set(); // MCP tools in permissions.allow — refreshed each spawn
2197
2198
  let lastPermissionDenials = null; // cached for retry after approval
2198
2199
  let awaitingPermission = false; // true when permission card shown, suppresses 'done' from close handler
2199
2200
  const permCardToolNames = new Map(); // requestId → toolName, for proactive permission cards
@@ -2263,6 +2264,11 @@ function handleClaudeSkinWebSocket(ws) {
2263
2264
 
2264
2265
  function spawnProc(sessionId, model, cwd, effort, prompt) {
2265
2266
  killProc();
2267
+ // Read current MCP permissions so we can show proactive cards for non-allowed MCP tools
2268
+ const _globalSettings = readClaudeSettings(getGlobalClaudeSettingsPath()) || {};
2269
+ mcpAllowedTools = new Set(
2270
+ (_globalSettings.permissions?.allow || []).filter(t => t.startsWith('mcp__'))
2271
+ );
2266
2272
  const workDir = validateWorkDir(cwd) || PACKAGE_ROOT;
2267
2273
  const args = [
2268
2274
  '--print',
@@ -2526,6 +2532,21 @@ function handleClaudeSkinWebSocket(ws) {
2526
2532
  request: { tool_name: tool.name, subtype: 'can_use_tool', input },
2527
2533
  });
2528
2534
  }
2535
+ // MCP tools: proactive card when not session-approved and not in permissions.allow
2536
+ // --print mode silently denies MCP tools without emitting permission_denials,
2537
+ // so we must intercept tool_use blocks and prompt the user ourselves.
2538
+ if (tool.name.startsWith('mcp__') && !approvedTools.has(tool.name) && !mcpAllowedTools.has(tool.name)) {
2539
+ const requestId = `perm-${tool.id}`;
2540
+ const input = tool.input || {};
2541
+ permCardToolNames.set(requestId, tool.name);
2542
+ console.log(`[claude-skin] ▶ PROACTIVE MCP permission card for ${tool.name}`);
2543
+ sendToClient({
2544
+ type: 'control_request',
2545
+ request_id: requestId,
2546
+ request: { tool_name: tool.name, subtype: 'can_use_tool', input },
2547
+ });
2548
+ awaitingPermission = true;
2549
+ }
2529
2550
  }
2530
2551
  }
2531
2552
  // Forward all events to client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synabun",
3
- "version": "2026.3.313",
3
+ "version": "2026.3.315",
4
4
  "description": "Persistent vector memory for AI assistants",
5
5
  "license": "Apache-2.0",
6
6
  "author": "The SynaBun Authors",