feat: rename server package to hub

Rename the `server/` directory to `hub/` and update all references
across CLI, docs, web, and workspace configuration.
This commit is contained in:
weishu
2026-01-27 19:51:21 +08:00
parent 10fe9f0cd9
commit 37e10a831b
125 changed files with 301 additions and 285 deletions
+6 -6
View File
@@ -1,11 +1,11 @@
/**
* API functions for voice assistant integration.
*
* Fetches conversation tokens from the server for ElevenLabs integration.
* The server handles authentication with ElevenLabs API, keeping credentials secure.
* Fetches conversation tokens from the hub for ElevenLabs integration.
* The hub handles authentication with ElevenLabs API, keeping credentials secure.
*
* Supports two modes:
* 1. Default: Server uses its own ElevenLabs credentials (production)
* 1. Default: Hub uses its own ElevenLabs credentials (production)
* 2. Custom: Client provides their own ElevenLabs agent ID and API key
*/
@@ -29,11 +29,11 @@ export interface VoiceTokenRequest {
}
/**
* Fetch a conversation token from the server for ElevenLabs voice sessions.
* Fetch a conversation token from the hub for ElevenLabs voice sessions.
*
* This uses the private agent flow where:
* 1. Server holds the ELEVENLABS_API_KEY and ELEVENLABS_AGENT_ID (or uses user-provided ones)
* 2. Server fetches a short-lived conversation token from ElevenLabs
* 1. Hub holds the ELEVENLABS_API_KEY and ELEVENLABS_AGENT_ID (or uses user-provided ones)
* 2. Hub fetches a short-lived conversation token from ElevenLabs
* 3. Client uses this token to establish WebRTC connection
*/
export async function fetchVoiceToken(