MCPcopy Create free account
hub / github.com/ZenSystemAI/Zengram / startupConfigIssues

Function startupConfigIssues

api/src/services/config-utils.js:17–37  ·  view source on GitHub ↗
(env = process.env)

Source from the content-addressed store, hash-verified

15]);
16
17export function startupConfigIssues(env = process.env) {
18 const issues = [];
19 const apiKey = env.BRAIN_API_KEY;
20
21 if (typeof apiKey !== 'string' || apiKey.trim() === '') {
22 issues.push('BRAIN_API_KEY is required. Set it in .env or environment.');
23 } else {
24 const trimmed = apiKey.trim();
25 if (trimmed !== apiKey) {
26 issues.push('BRAIN_API_KEY must not have leading or trailing whitespace.');
27 }
28 if (PLACEHOLDER_API_KEYS.has(trimmed.toLowerCase())) {
29 issues.push('BRAIN_API_KEY still has a placeholder value. Generate a unique secret before starting the API.');
30 }
31 if (trimmed.length < 16) {
32 issues.push('BRAIN_API_KEY must be at least 16 characters.');
33 }
34 }
35
36 return issues;
37}

Callers 2

index.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected