osborn 0.9.222 → 0.9.223
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/env-keys.d.ts +27 -0
- package/dist/env-keys.js +47 -0
- package/dist/index.js +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* env-keys.ts — the agent's source-of-truth list of environment variables it
|
|
3
|
+
* expects to find in process.env at runtime, mirroring the frontend's
|
|
4
|
+
* platform-env.ts injection spec.
|
|
5
|
+
*
|
|
6
|
+
* Today the agent reads these directly from process.env (some explicitly, some
|
|
7
|
+
* implicitly via the LiveKit plugin SDKs which read env internally). This module
|
|
8
|
+
* gives that set ONE name so:
|
|
9
|
+
* • a future runtime path can hydrate process.env from a cloud/user config
|
|
10
|
+
* layer before the plugins read it, using this list as the set to fetch, and
|
|
11
|
+
* • startup can log which expected keys are missing for diagnosis.
|
|
12
|
+
*
|
|
13
|
+
* Keep in sync with frontend/src/lib/platform-env.ts (PLATFORM_ENV_SPEC).
|
|
14
|
+
*/
|
|
15
|
+
export interface AgentEnvKey {
|
|
16
|
+
key: string;
|
|
17
|
+
required: boolean;
|
|
18
|
+
/** true = read directly via process.env.X in agent source; false = consumed
|
|
19
|
+
* implicitly by a plugin SDK (Deepgram/Soniox/Gemini realtime) reading env. */
|
|
20
|
+
explicit: boolean;
|
|
21
|
+
description: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const AGENT_ENV_KEYS: AgentEnvKey[];
|
|
24
|
+
/** Keys the agent treats as required — absence should be surfaced at startup. */
|
|
25
|
+
export declare const REQUIRED_AGENT_ENV_KEYS: string[];
|
|
26
|
+
/** Return the required keys that are missing from the given env (default process.env). */
|
|
27
|
+
export declare function missingRequiredEnv(env?: NodeJS.ProcessEnv): string[];
|
package/dist/env-keys.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* env-keys.ts — the agent's source-of-truth list of environment variables it
|
|
3
|
+
* expects to find in process.env at runtime, mirroring the frontend's
|
|
4
|
+
* platform-env.ts injection spec.
|
|
5
|
+
*
|
|
6
|
+
* Today the agent reads these directly from process.env (some explicitly, some
|
|
7
|
+
* implicitly via the LiveKit plugin SDKs which read env internally). This module
|
|
8
|
+
* gives that set ONE name so:
|
|
9
|
+
* • a future runtime path can hydrate process.env from a cloud/user config
|
|
10
|
+
* layer before the plugins read it, using this list as the set to fetch, and
|
|
11
|
+
* • startup can log which expected keys are missing for diagnosis.
|
|
12
|
+
*
|
|
13
|
+
* Keep in sync with frontend/src/lib/platform-env.ts (PLATFORM_ENV_SPEC).
|
|
14
|
+
*/
|
|
15
|
+
export const AGENT_ENV_KEYS = [
|
|
16
|
+
// Voice transport
|
|
17
|
+
{ key: 'LIVEKIT_URL', required: true, explicit: true, description: 'LiveKit server URL.' },
|
|
18
|
+
{ key: 'LIVEKIT_API_KEY', required: true, explicit: true, description: 'LiveKit API key.' },
|
|
19
|
+
{ key: 'LIVEKIT_API_SECRET', required: true, explicit: true, description: 'LiveKit API secret.' },
|
|
20
|
+
// STT / inference (plugin-consumed unless noted)
|
|
21
|
+
{ key: 'DEEPGRAM_API_KEY', required: true, explicit: false, description: 'Deepgram STT (LiveKit plugin).' },
|
|
22
|
+
{ key: 'SONIOX_API_KEY', required: false, explicit: false, description: 'Soniox STT (LiveKit plugin).' },
|
|
23
|
+
{ key: 'GROQ_API_KEY', required: false, explicit: true, description: 'Groq fast-brain inference.' },
|
|
24
|
+
{ key: 'OPENAI_API_KEY', required: true, explicit: true, description: 'OpenAI realtime + pipeline.' },
|
|
25
|
+
{ key: 'GOOGLE_API_KEY', required: false, explicit: false, description: 'Google Gemini realtime (plugin).' },
|
|
26
|
+
// LLM auth (Claude vs OpenRouter switch)
|
|
27
|
+
{ key: 'ANTHROPIC_API_KEY', required: false, explicit: true, description: 'Anthropic/Claude auth (per-user; may be OAuth file instead).' },
|
|
28
|
+
{ key: 'OPENROUTER_API_KEY', required: false, explicit: true, description: 'OpenRouter model routing.' },
|
|
29
|
+
// Integrations
|
|
30
|
+
{ key: 'RECALL_API_KEY', required: false, explicit: true, description: 'Recall.ai meeting bot.' },
|
|
31
|
+
{ key: 'RECALL_REGION', required: false, explicit: true, description: 'Recall.ai region.' },
|
|
32
|
+
{ key: 'SMITHERY_API_KEY', required: false, explicit: true, description: 'Smithery hosted-MCP catalog.' },
|
|
33
|
+
// Platform / infra
|
|
34
|
+
{ key: 'OSBORN_API_PORT', required: true, explicit: true, description: 'Agent HTTP server port.' },
|
|
35
|
+
{ key: 'OSBORN_CWD', required: false, explicit: true, description: 'Agent working directory.' },
|
|
36
|
+
{ key: 'OSBORN_SYNC_TOKEN', required: false, explicit: true, description: 'Session export/import auth token.' },
|
|
37
|
+
{ key: 'OSBORN_FRONTEND_URL', required: false, explicit: true, description: 'Frontend base URL for artifact upload.' },
|
|
38
|
+
{ key: 'DEV_DOMAIN', required: false, explicit: true, description: 'Wildcard dev-routing domain.' },
|
|
39
|
+
];
|
|
40
|
+
/** Keys the agent treats as required — absence should be surfaced at startup. */
|
|
41
|
+
export const REQUIRED_AGENT_ENV_KEYS = AGENT_ENV_KEYS
|
|
42
|
+
.filter((k) => k.required)
|
|
43
|
+
.map((k) => k.key);
|
|
44
|
+
/** Return the required keys that are missing from the given env (default process.env). */
|
|
45
|
+
export function missingRequiredEnv(env = process.env) {
|
|
46
|
+
return REQUIRED_AGENT_ENV_KEYS.filter((k) => !env[k]);
|
|
47
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,7 @@ import { DIRECT_MODE_PROMPT } from './prompts.js';
|
|
|
40
40
|
import { MCP_CATALOG } from './config.js';
|
|
41
41
|
import { getRecallClient } from './recall-client.js';
|
|
42
42
|
import { MeetingTranscriptPoller } from './meeting-transcript-poller.js';
|
|
43
|
+
import { missingRequiredEnv } from './env-keys.js';
|
|
43
44
|
import { llm } from '@livekit/agents';
|
|
44
45
|
// ============================================================
|
|
45
46
|
// PIPELINE MODE: STT (Deepgram) → Claude Agent SDK → TTS
|
|
@@ -1816,6 +1817,16 @@ async function main() {
|
|
|
1816
1817
|
console.error('\nSet these in your .env file or environment.');
|
|
1817
1818
|
process.exit(1);
|
|
1818
1819
|
}
|
|
1820
|
+
// Non-fatal diagnostic: surface any OTHER expected-required keys that are
|
|
1821
|
+
// missing (per the shared env-keys.ts manifest — mirror of the frontend's
|
|
1822
|
+
// platform-env.ts injection spec). The LiveKit trio above is the only
|
|
1823
|
+
// hard-fail; the rest degrade gracefully (a plugin falls back, a feature
|
|
1824
|
+
// no-ops), so we log rather than exit — but a missing OPENAI/DEEPGRAM key is
|
|
1825
|
+
// the usual root cause of "voice works but STT/realtime is dead", worth naming.
|
|
1826
|
+
const missingEnv = missingRequiredEnv().filter((k) => !['LIVEKIT_URL', 'LIVEKIT_API_KEY', 'LIVEKIT_API_SECRET'].includes(k));
|
|
1827
|
+
if (missingEnv.length > 0) {
|
|
1828
|
+
console.warn(`⚠️ Missing expected env keys (non-fatal): ${missingEnv.join(', ')}`);
|
|
1829
|
+
}
|
|
1819
1830
|
// Parse CLI args
|
|
1820
1831
|
const cliArgs = parseArgs();
|
|
1821
1832
|
// Load configuration
|