clementine-agent 1.0.61 → 1.0.63

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.
@@ -1624,7 +1624,16 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
1624
1624
  ...(fallback ? { fallbackModel: fallback } : {}),
1625
1625
  permissionMode: effectivePermissionMode,
1626
1626
  allowDangerouslySkipPermissions: true,
1627
- tools: disableAllTools ? [] : allowedTools,
1627
+ // SDK field semantics (per node_modules/@anthropic-ai/claude-agent-sdk/sdk.d.ts):
1628
+ // - `tools` → which built-in tools the model can see (Read, Bash, Task, …)
1629
+ // - `mcpServers` → MCP servers to spawn; all their declared tools are exposed automatically
1630
+ // - `allowedTools` → auto-allow list covering both built-ins AND MCP tool names
1631
+ // (MCP names MUST live here, not in `tools` — that was the bug
1632
+ // producing `<tool_use_error>No such tool available: mcp__*__*`
1633
+ // for every Extension and custom stdio server).
1634
+ // - `disallowedTools` → blocklist, takes precedence.
1635
+ tools: disableAllTools ? [] : allowedTools.filter(t => !t.startsWith('mcp__')),
1636
+ allowedTools: disableAllTools ? [] : allowedTools,
1628
1637
  disallowedTools: disallowed,
1629
1638
  ...(streaming ? { includePartialMessages: true } : {}),
1630
1639
  mcpServers: {
@@ -2580,6 +2589,24 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
2580
2589
  sdkMessagesCaptured: collectedSdkMessages.length,
2581
2590
  toolCallsPaired: toolCallRecords.length,
2582
2591
  resultClasses: toolCallRecords.map(r => `${r.name}:${r.resultClass}`),
2592
+ firstResultPreview: toolCallRecords[0]?.resultPreview?.slice(0, 300),
2593
+ rawFirstToolResult: (() => {
2594
+ // Dump the raw user-message tool_result block so we can
2595
+ // see is_error + content shape when the classifier picks
2596
+ // a result class that looks wrong (e.g. other_error when
2597
+ // the MCP server actually returned success).
2598
+ for (const msg of collectedSdkMessages) {
2599
+ if (msg.type !== 'user' || !msg.message?.content)
2600
+ continue;
2601
+ const blocks = Array.isArray(msg.message.content) ? msg.message.content : [];
2602
+ for (const b of blocks) {
2603
+ if (b?.type === 'tool_result') {
2604
+ return { is_error: b.is_error, content_shape: Array.isArray(b.content) ? 'array' : typeof b.content, content_head: JSON.stringify(b.content).slice(0, 300) };
2605
+ }
2606
+ }
2607
+ }
2608
+ return null;
2609
+ })(),
2583
2610
  replyPreview: responseText.slice(0, 200).replace(/\n/g, ' '),
2584
2611
  }, 'Contradiction validator pass');
2585
2612
  }
@@ -3157,7 +3184,10 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
3157
3184
  model: AUTO_MEMORY_MODEL,
3158
3185
  permissionMode: 'bypassPermissions',
3159
3186
  allowDangerouslySkipPermissions: true,
3160
- tools: [
3187
+ // MCP tool names live in allowedTools, not tools. See note at
3188
+ // buildOptions — `tools` is for built-ins only.
3189
+ tools: [],
3190
+ allowedTools: [
3161
3191
  mcpTool('memory_write'),
3162
3192
  mcpTool('memory_search'),
3163
3193
  mcpTool('note_create'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",