clementine-agent 1.0.53 → 1.0.54
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 +2 -1
- 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
|
@@ -1334,7 +1334,8 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
1334
1334
|
if (!isAutonomous) {
|
|
1335
1335
|
try {
|
|
1336
1336
|
const { summarizeIntegrationStatus } = require('../config/integrations-registry.js');
|
|
1337
|
-
const
|
|
1337
|
+
const { envSnapshot } = require('../config.js');
|
|
1338
|
+
const summary = summarizeIntegrationStatus(envSnapshot());
|
|
1338
1339
|
if (summary)
|
|
1339
1340
|
parts.push(`## Integration Status\n\n${summary}\n\nCall \`integration_status\`, \`list_integrations\`, or \`setup_integration\` for details.`);
|
|
1340
1341
|
}
|
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);
|