clementine-agent 1.0.74 → 1.0.75

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.
@@ -208,16 +208,10 @@ Steps:
208
208
  fields: [
209
209
  {
210
210
  key: 'contact',
211
- label: 'Contact',
211
+ label: 'Phone number or email',
212
+ placeholder: '+15551234567 or someone@example.com',
212
213
  required: true,
213
- help: 'Pick an iMessage contact. Their phone number or email becomes the thread id.',
214
- picker: {
215
- tool: 'mcp__imessage__search_contacts',
216
- intent: 'call search_contacts with query "{{query}}". For each match, output {id: the contact\'s phone number or email handle, label: the display name (or the handle if no name), sublabel: "handle: " + handle}. Return up to 15 results.',
217
- queryArg: 'query',
218
- minQueryLength: 2,
219
- allowCustom: true,
220
- },
214
+ help: 'Paste the contact\'s iMessage handle exactly as it appears in your Messages thread. The iMessage MCP\'s search_contacts reads the Contacts app via AppleScript and is unreliable — we bypass it by letting you paste the handle directly.',
221
215
  },
222
216
  { key: 'limit', label: 'Max messages per run', placeholder: '50', defaultValue: '50' },
223
217
  ],
@@ -2659,7 +2659,13 @@ export async function cmdDashboard(opts) {
2659
2659
  }
2660
2660
  const { query } = await import('@anthropic-ai/claude-agent-sdk');
2661
2661
  const { parseJsonResponse } = await import('../brain/llm-client.js');
2662
+ const { getMcpServersForAgent } = await import('../agent/mcp-bridge.js');
2662
2663
  const { MODELS } = await import('../config.js');
2664
+ // Pass the full MCP server map so the one-shot probe can call
2665
+ // Extension-provided tools (iMessage, figma, supabase, etc.).
2666
+ // Without this the SDK only sees built-in + claude_ai_* tools
2667
+ // and every Extension tool call is silently rejected at runtime.
2668
+ const mcpServers = getMcpServersForAgent();
2663
2669
  // Strict prompt: force JSON-only output. The tool lookup goes through
2664
2670
  // the SDK so claude_ai_* and regular MCP servers work uniformly.
2665
2671
  const stream = query({
@@ -2672,6 +2678,7 @@ If the tool returns nothing or errors, return an empty array \`[]\`.`,
2672
2678
  maxTurns: 3,
2673
2679
  systemPrompt: 'You are a data enumerator. You call the given tool once, extract the items from its response, and emit a strict JSON array. No commentary.',
2674
2680
  allowedTools: [tool],
2681
+ mcpServers,
2675
2682
  permissionMode: 'bypassPermissions',
2676
2683
  settingSources: [],
2677
2684
  },
@@ -10820,7 +10827,7 @@ if('serviceWorker' in navigator){navigator.serviceWorker.getRegistrations().then
10820
10827
  return;
10821
10828
  }
10822
10829
  brainPickerTypeahead[field.key] = {
10823
- timer: setTimeout(function() { brainFireTypeaheadProbe(field, q); }, 400),
10830
+ timer: setTimeout(function() { brainFireTypeaheadProbe(field, q); }, 600),
10824
10831
  };
10825
10832
  };
10826
10833
  return;
@@ -10886,7 +10893,15 @@ if('serviceWorker' in navigator){navigator.serviceWorker.getRegistrations().then
10886
10893
  if (!resp.ok) throw new Error(data.error || 'probe failed');
10887
10894
  const items = data.items || [];
10888
10895
  if (!items.length) {
10889
- resultsEl.innerHTML = '<div style="color:#8a5a00;font-size:12px;padding:6px">No matches for "' + escapeHtml(query) + '"' + (data.rawPreview ? ' (' + escapeHtml(data.rawPreview.slice(0, 100)) + ')' : '') + '</div>';
10896
+ // If the raw preview is anything other than an empty array (with
10897
+ // or without a markdown code fence), show it so the user can tell
10898
+ // whether the tool actually ran.
10899
+ const trimmed = (data.rawPreview || '').trim();
10900
+ const isEmptyArray = /^\s*\[\s*\]\s*$/.test(trimmed.replace(/^[^\[]*/, '').replace(/[^\]]*$/, ''));
10901
+ const rawHint = trimmed && !isEmptyArray
10902
+ ? ' <span style="color:var(--muted)">Tool said: ' + escapeHtml(trimmed.slice(0, 140)) + '</span>'
10903
+ : '';
10904
+ resultsEl.innerHTML = '<div style="color:#8a5a00;font-size:12px;padding:6px">No matches for "' + escapeHtml(query) + '". The tool may be limited by macOS permissions or not support this query — use <a href="#" onclick="brainFieldPickerToggleCustom(\\'' + field.key + '\\', \\'\\');return false">type a value directly</a>.' + rawHint + '</div>';
10890
10905
  return;
10891
10906
  }
10892
10907
  resultsEl.innerHTML = items.map(function(it) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",