clementine-agent 1.0.53 → 1.0.55
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 +5 -2
- package/dist/config.d.ts +2 -0
- package/dist/config.js +4 -0
- package/dist/tools/admin-tools.js +11 -3
- package/package.json +1 -1
package/dist/agent/assistant.js
CHANGED
|
@@ -1091,7 +1091,9 @@ The **only source of truth for tool availability is your function schema**. Do n
|
|
|
1091
1091
|
2. **If refused** with "not in my function schema" / "tool not allowed," call \`allow_tool(exact_name)\` and retry. \`allow_tool\` auto-refreshes the inventory if the name is new — handles the case where the owner just added a connector at claude.ai.
|
|
1092
1092
|
3. **If the owner says "I just added X at claude.ai"** or anything similar, call \`refresh_tool_inventory\` first to pick up the new connector. Report what came online.
|
|
1093
1093
|
|
|
1094
|
-
**Never** say the tool "isn't loaded in this session," "doesn't carry over from Claude Desktop," "the tools array is empty,"
|
|
1094
|
+
**Never** say the tool "isn't loaded in this session," "doesn't carry over from Claude Desktop," "the tools array is empty," "MCP server still connecting," "the connector is a dead end," "the tool doesn't exist in the current session's schema," or "schema-level rejection." If any of those phrasings come to mind, call the tool directly and report what actually happens instead.
|
|
1095
|
+
|
|
1096
|
+
**Per-call errors are not connector failures.** If a \`mcp__claude_ai_*\` tool returns an error (invalid arguments, auth failure, rate limit, etc.), that error is about **this one call** — it does NOT mean the tool doesn't exist or the connector is broken. Report the literal error message and, if it's an argument error, re-read the tool's schema from your SDK inventory and retry with correct args. Example: if \`search_files\` complains about unknown field \`orderBy\`, that field belongs to \`list_recent_files\`, not \`search_files\` — fix the args, don't declare the connector dead.
|
|
1095
1097
|
|
|
1096
1098
|
\`list_allowed_tools\` / \`disallow_tool\` manage the whitelist. \`integration_status\` is for env-var (API key) integrations — **not** for claude_ai_* connectors, which are schema-driven. Don't use \`integration_status\` as a proxy for "can I call Drive / Gmail / etc." — those are always tried by direct tool call, not status lookup.
|
|
1097
1099
|
|
|
@@ -1334,7 +1336,8 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
1334
1336
|
if (!isAutonomous) {
|
|
1335
1337
|
try {
|
|
1336
1338
|
const { summarizeIntegrationStatus } = require('../config/integrations-registry.js');
|
|
1337
|
-
const
|
|
1339
|
+
const { envSnapshot } = require('../config.js');
|
|
1340
|
+
const summary = summarizeIntegrationStatus(envSnapshot());
|
|
1338
1341
|
if (summary)
|
|
1339
1342
|
parts.push(`## Integration Status\n\n${summary}\n\nCall \`integration_status\`, \`list_integrations\`, or \`setup_integration\` for details.`);
|
|
1340
1343
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import type { Models } from './types.js';
|
|
|
10
10
|
export declare const PKG_DIR: string;
|
|
11
11
|
/** Data home — user data, vault, .env, logs, sessions. */
|
|
12
12
|
export declare const BASE_DIR: string;
|
|
13
|
+
/** Merged view of process.env overlaid with .env. Use for classifyIntegrations / summarizeIntegrationStatus. */
|
|
14
|
+
export declare function envSnapshot(): Record<string, string | undefined>;
|
|
13
15
|
export declare const VAULT_DIR: string;
|
|
14
16
|
export declare const SYSTEM_DIR: string;
|
|
15
17
|
export declare const DAILY_NOTES_DIR: string;
|
package/dist/config.js
CHANGED
|
@@ -46,6 +46,10 @@ const env = readEnvFile();
|
|
|
46
46
|
function getEnv(key, fallback = '') {
|
|
47
47
|
return env[key] ?? process.env[key] ?? fallback;
|
|
48
48
|
}
|
|
49
|
+
/** Merged view of process.env overlaid with .env. Use for classifyIntegrations / summarizeIntegrationStatus. */
|
|
50
|
+
export function envSnapshot() {
|
|
51
|
+
return { ...process.env, ...env };
|
|
52
|
+
}
|
|
49
53
|
// ── Paths ────────────────────────────────────────────────────────────
|
|
50
54
|
export const VAULT_DIR = path.join(BASE_DIR, 'vault');
|
|
51
55
|
export const SYSTEM_DIR = path.join(VAULT_DIR, '00-System');
|
|
@@ -217,7 +217,14 @@ export function registerAdminTools(server) {
|
|
|
217
217
|
slug: z.string().optional().describe('Optional: specific integration slug to check (e.g. "slack"). If omitted, returns all.'),
|
|
218
218
|
}, async ({ slug }) => {
|
|
219
219
|
const slugs = slug ? [slug] : undefined;
|
|
220
|
-
|
|
220
|
+
// `env` from shared.ts is the parsed .env file — the authoritative source
|
|
221
|
+
// for configured credentials in this project. Falls through to process.env
|
|
222
|
+
// for anything overridden at runtime (keychain-hydrated secrets, shell
|
|
223
|
+
// env, etc.). Do NOT read process.env alone: config.ts deliberately
|
|
224
|
+
// keeps .env values out of process.env, so classifying from process.env
|
|
225
|
+
// shows everything "missing."
|
|
226
|
+
const merged = { ...process.env, ...env };
|
|
227
|
+
const reports = classifyIntegrations(merged, slugs);
|
|
221
228
|
if (reports.length === 0)
|
|
222
229
|
return textResult(`Unknown integration slug: ${slug}. Use list_integrations to see available.`);
|
|
223
230
|
const icon = (s) => s === 'configured' ? '✓' : s === 'partial' ? '~' : '✗';
|
|
@@ -248,7 +255,8 @@ export function registerAdminTools(server) {
|
|
|
248
255
|
if (!integration) {
|
|
249
256
|
return textResult(`Unknown integration slug: ${slug}. Run list_integrations to see what's available.`);
|
|
250
257
|
}
|
|
251
|
-
const
|
|
258
|
+
const merged = { ...process.env, ...env };
|
|
259
|
+
const [status] = classifyIntegrations(merged, [integration.slug]);
|
|
252
260
|
const lines = [];
|
|
253
261
|
lines.push(`## ${integration.label} (${integration.slug})`);
|
|
254
262
|
lines.push('');
|
|
@@ -262,7 +270,7 @@ export function registerAdminTools(server) {
|
|
|
262
270
|
lines.push('');
|
|
263
271
|
lines.push('**Credentials:**');
|
|
264
272
|
for (const req of integration.requirements) {
|
|
265
|
-
const present = !!
|
|
273
|
+
const present = !!merged[req.envVar];
|
|
266
274
|
const badge = present ? '✓ set' : (req.required ? '✗ REQUIRED' : '○ optional');
|
|
267
275
|
const line = `- \`${req.envVar}\` — ${req.label} [${badge}]`;
|
|
268
276
|
lines.push(line);
|