clementine-agent 1.0.47 → 1.0.48

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.
@@ -1081,16 +1081,17 @@ Call \`self_update\` — **never** manually \`cd ~/clementine && git pull\` or h
1081
1081
 
1082
1082
  If you're unsure what's happening first, run \`where_is_source\` — it reports the absolute source path, current branch/commit, and whether there are uncommitted changes. \`self_update\` does git pull + npm install (if lockfile changed) + npm run build + SIGUSR1 restart, all in the right place.
1083
1083
 
1084
- ### When a tool call is refused
1084
+ ### Calling Claude Desktop connector tools (Drive, Gmail, etc.)
1085
1085
 
1086
- If any tool call fails with "not in my function schema" / "tool not allowed" / "unknown tool" while the tool appears in your SDK inventory:
1086
+ **Do not inspect \`claude-integrations.json\` or any integration file to decide whether a tool is "loaded."** That file is a telemetry log, not a source of truth. Reading \`tools: []\` from it doesn't mean the tool is unavailable — it just means no one has called it yet in telemetry. The **only source of truth for tool availability is the SDK init inventory**, which you see implicitly through your own function schema.
1087
1087
 
1088
- 1. Call \`allow_tool("<exact_tool_name>")\` persists to your whitelist
1089
- 2. Retry the original call
1088
+ The right sequence when the user asks you to do something with a connector:
1090
1089
 
1091
- Takes effect on your next query. **Never** respond with "this tool isn't available to agents," "you need to edit my config," or "try it in a different app." If the tool name exists, you can add it.
1090
+ 1. **Just call the tool.** \`mcp__claude_ai_Google_Drive__search_files\`, \`mcp__claude_ai_Gmail__authenticate\`, etc. attempt the call. If it works, great. If it returns an auth error, report the auth error. If it returns results, use them.
1091
+ 2. **Only if the call is refused** with "not in my function schema" / "tool not allowed," call \`allow_tool(exact_name)\` and retry.
1092
+ 3. **Never** tell the user the tool "isn't loaded in this session," "doesn't carry over from Claude Desktop," "the tools array is empty," or anything that blames integration-log state. Those rationalizations are wrong and the user has seen them too many times.
1092
1093
 
1093
- \`list_allowed_tools\` / \`disallow_tool\` manage the list.
1094
+ \`list_allowed_tools\` / \`disallow_tool\` manage the whitelist. Use \`integration_status\` to see which integrations are configured for env-var purposes — not as a check on whether tools work.
1094
1095
 
1095
1096
  ## Context Window Management
1096
1097
 
@@ -443,6 +443,19 @@ export async function probeAvailableTools(force = false) {
443
443
  }
444
444
  const inv = { probedAt: new Date().toISOString(), tools };
445
445
  saveToolInventory(inv);
446
+ // Also sync claude-integrations.json so the agent-facing integration list
447
+ // stays consistent with what the SDK actually has available. Without this
448
+ // sync, the integrations file stays empty for freshly-connected services
449
+ // (e.g. Google_Drive tools: []) even though the inventory probe sees
450
+ // them — and the agent reads the integrations file, sees empty, and
451
+ // confabulates that the tools aren't loaded.
452
+ try {
453
+ const result = registerClaudeIntegrationsFromToolList(tools);
454
+ if (result.added.length + result.updated.length > 0) {
455
+ logger.info({ added: result.added, updated: result.updated }, 'Synced integrations from probed tool inventory');
456
+ }
457
+ }
458
+ catch { /* non-fatal */ }
446
459
  logger.info({ toolCount: tools.length }, 'Tool inventory probed');
447
460
  return inv;
448
461
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",