clementine-agent 1.18.1 → 1.18.2
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.
package/dist/agent/assistant.js
CHANGED
|
@@ -1578,11 +1578,17 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
1578
1578
|
// every turn regardless.
|
|
1579
1579
|
if (!isAutonomous) {
|
|
1580
1580
|
try {
|
|
1581
|
-
const { loadToolPreferences, computeAvailability, buildPromptInstruction } = require('../integrations/tool-preferences.js');
|
|
1581
|
+
const { loadToolPreferences, computeAvailability, buildPromptInstruction, buildComposioStatusBlock } = require('../integrations/tool-preferences.js');
|
|
1582
1582
|
const { loadClaudeIntegrations } = require('./mcp-bridge.js');
|
|
1583
1583
|
const composioSet = new Set(composioConnectedSlugs);
|
|
1584
1584
|
const cdIntegrations = loadClaudeIntegrations();
|
|
1585
1585
|
const cdActive = new Set(Object.values(cdIntegrations).filter(i => i.connected).map(i => i.name));
|
|
1586
|
+
// Status block first — gives the model ground truth that Composio
|
|
1587
|
+
// is configured and which toolkits are live, so it stops guessing
|
|
1588
|
+
// whether `mcp__<slug>__*` tools are Composio or something else.
|
|
1589
|
+
const statusBlock = buildComposioStatusBlock(composioConnectedSlugs);
|
|
1590
|
+
if (statusBlock)
|
|
1591
|
+
volatileParts.push(statusBlock);
|
|
1586
1592
|
const prefs = loadToolPreferences();
|
|
1587
1593
|
const availability = computeAvailability(composioSet, cdActive, prefs.preferences);
|
|
1588
1594
|
const instruction = buildPromptInstruction(availability, prefs.preferences);
|
|
@@ -68,4 +68,14 @@ export declare function computeAvailability(composioConnectedSlugs: Set<string>,
|
|
|
68
68
|
* Compare to the previous always-on hardcoded block which was ~700 chars.
|
|
69
69
|
*/
|
|
70
70
|
export declare function buildPromptInstruction(availability: ServiceAvailability[], preferences: Record<string, ToolSource>): string;
|
|
71
|
+
/**
|
|
72
|
+
* Ground-truth header naming the Composio toolkits currently connected.
|
|
73
|
+
* Without this, the model has to guess what `mcp__<slug>__*` tools are
|
|
74
|
+
* (often misattributing them to claude.ai integrations or "extensions"),
|
|
75
|
+
* because Composio's slug-prefixed naming is ambiguous in isolation.
|
|
76
|
+
*
|
|
77
|
+
* Emits an empty string when no toolkits are connected — zero overhead
|
|
78
|
+
* for users who haven't set up Composio.
|
|
79
|
+
*/
|
|
80
|
+
export declare function buildComposioStatusBlock(connectedSlugs: string[]): string;
|
|
71
81
|
//# sourceMappingURL=tool-preferences.d.ts.map
|
|
@@ -116,4 +116,20 @@ export function buildPromptInstruction(availability, preferences) {
|
|
|
116
116
|
return '';
|
|
117
117
|
return `## Tool Source Preferences\n\nThese rules OVERRIDE any tool-source preference you may recall from memory. Do not consult memory for this — the canonical source is the dashboard's Tool Source Preferences (Settings → Integrations).\n\n${lines.join('\n')}`;
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Ground-truth header naming the Composio toolkits currently connected.
|
|
121
|
+
* Without this, the model has to guess what `mcp__<slug>__*` tools are
|
|
122
|
+
* (often misattributing them to claude.ai integrations or "extensions"),
|
|
123
|
+
* because Composio's slug-prefixed naming is ambiguous in isolation.
|
|
124
|
+
*
|
|
125
|
+
* Emits an empty string when no toolkits are connected — zero overhead
|
|
126
|
+
* for users who haven't set up Composio.
|
|
127
|
+
*/
|
|
128
|
+
export function buildComposioStatusBlock(connectedSlugs) {
|
|
129
|
+
if (!connectedSlugs.length)
|
|
130
|
+
return '';
|
|
131
|
+
const sorted = [...connectedSlugs].sort();
|
|
132
|
+
const example = sorted[0];
|
|
133
|
+
return `## Composio Integration\n\nComposio is configured. Connected toolkits: ${sorted.join(', ')}.\n\nTools from these toolkits are namespaced as \`mcp__<slug>__<TOOL_NAME>\` (e.g., \`mcp__${example}__*\`). These are local Composio MCP servers, NOT claude.ai integrations (which use \`mcp__claude_ai_*\`).`;
|
|
134
|
+
}
|
|
119
135
|
//# sourceMappingURL=tool-preferences.js.map
|