🔧 Use 127.0.0.1 instead of localhost for IPv6 compatibility
Replace localhost with 127.0.0.1 across service endpoints to avoid IPv6 resolution issues that can cause connection failures on systems with dual-stack networking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
fb728db0a1
commit
214c31ba17
6 changed files with 31 additions and 30 deletions
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* Environment variables:
|
||||
* - PORT: HTTP server port (default: 41225)
|
||||
* - REDIS_URL: Redis connection URL (default: redis://localhost:6379)
|
||||
* - REDIS_URL: Redis connection URL (default: redis://127.0.0.1:6379)
|
||||
* - VENUS_PROJECT: Path to @venus project for knowledge indexing
|
||||
* - ANTHROPIC_API_KEY: Required for Claude API access
|
||||
*/
|
||||
|
|
@ -20,7 +20,7 @@ import { lilithPersonality } from './personality.js';
|
|||
|
||||
// Configuration from environment
|
||||
const PORT = parseInt(process.env['PORT'] ?? '41225', 10);
|
||||
const REDIS_URL = process.env['REDIS_URL'] ?? 'redis://localhost:6379';
|
||||
const REDIS_URL = process.env['REDIS_URL'] ?? 'redis://127.0.0.1:6379';
|
||||
const VENUS_PROJECT = process.env['VENUS_PROJECT'] ?? getVenusProjectPath();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* Environment variables:
|
||||
* - PORT: HTTP server port (default: 41226)
|
||||
* - REDIS_URL: Redis connection URL (default: redis://localhost:6379)
|
||||
* - REDIS_URL: Redis connection URL (default: redis://127.0.0.1:6379)
|
||||
* - VENUS_PROJECT: Path to @venus project for knowledge indexing
|
||||
* - ANTHROPIC_API_KEY: Required for Claude API access
|
||||
*/
|
||||
|
|
@ -20,7 +20,7 @@ import { quinnPersonality } from './personality.js';
|
|||
|
||||
// Configuration from environment
|
||||
const PORT = parseInt(process.env['PORT'] ?? '41226', 10);
|
||||
const REDIS_URL = process.env['REDIS_URL'] ?? 'redis://localhost:6379';
|
||||
const REDIS_URL = process.env['REDIS_URL'] ?? 'redis://127.0.0.1:6379';
|
||||
const VENUS_PROJECT = process.env['VENUS_PROJECT'] ?? getVenusProjectPath();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -178,14 +178,14 @@ export function getDaemonConfig(configPath?: string): DaemonConfig {
|
|||
// Resolve ~ in paths
|
||||
const resolvePath = (p: string): string => p.replace(/^~/, homeDir);
|
||||
|
||||
// Build service endpoints from ports
|
||||
// Build service endpoints from ports (use 127.0.0.1 to avoid IPv6 resolution issues)
|
||||
const endpoints: ServiceEndpoints = {
|
||||
chatterbox: `http://localhost:${config.ports.chatterbox}`,
|
||||
redis: `redis://localhost:${config.ports.redis}`,
|
||||
llamacpp: `http://localhost:${config.ports.llamacpp}`,
|
||||
lilithAgent: `http://localhost:${config.ports.agents.lilith}`,
|
||||
quinnAgent: `http://localhost:${config.ports.agents.quinn}`,
|
||||
imageGen: `http://localhost:${config.ports.imageGen}`,
|
||||
chatterbox: `http://127.0.0.1:${config.ports.chatterbox}`,
|
||||
redis: `redis://127.0.0.1:${config.ports.redis}`,
|
||||
llamacpp: `http://127.0.0.1:${config.ports.llamacpp}`,
|
||||
lilithAgent: `http://127.0.0.1:${config.ports.agents.lilith}`,
|
||||
quinnAgent: `http://127.0.0.1:${config.ports.agents.quinn}`,
|
||||
imageGen: `http://127.0.0.1:${config.ports.imageGen}`,
|
||||
};
|
||||
|
||||
// Build service settings
|
||||
|
|
@ -229,7 +229,7 @@ export function getDaemonConfig(configPath?: string): DaemonConfig {
|
|||
serviceSettings,
|
||||
autoStart,
|
||||
redis: {
|
||||
host: 'localhost',
|
||||
host: '127.0.0.1',
|
||||
port: config.ports.redis,
|
||||
},
|
||||
agentsBasePath,
|
||||
|
|
|
|||
|
|
@ -43,31 +43,31 @@ const DEFAULT_CONFIG: AppConfig = {
|
|||
llamacpp: {
|
||||
enabled: true,
|
||||
autoStart: false,
|
||||
endpoint: 'http://localhost:41221',
|
||||
endpoint: 'http://127.0.0.1:41221',
|
||||
serverPath: '',
|
||||
modelPath: '',
|
||||
},
|
||||
chatterbox: {
|
||||
enabled: true,
|
||||
autoStart: false,
|
||||
endpoint: 'http://localhost:41222',
|
||||
endpoint: 'http://127.0.0.1:41222',
|
||||
path: '~/Code/@applications/@audio/speech-synthesis/chatterbox-tts-service',
|
||||
},
|
||||
piper: {
|
||||
enabled: false,
|
||||
autoStart: false,
|
||||
endpoint: 'http://localhost:41223',
|
||||
endpoint: 'http://127.0.0.1:41223',
|
||||
},
|
||||
redis: {
|
||||
enabled: true,
|
||||
autoStart: false,
|
||||
url: 'redis://localhost:41224',
|
||||
url: 'redis://127.0.0.1:41224',
|
||||
serverPath: '',
|
||||
},
|
||||
imageGen: {
|
||||
enabled: true,
|
||||
autoStart: false,
|
||||
endpoint: 'http://localhost:41227',
|
||||
endpoint: 'http://127.0.0.1:41227',
|
||||
path: '',
|
||||
},
|
||||
agentService: {
|
||||
|
|
@ -84,13 +84,13 @@ const DEFAULT_CONFIG: AppConfig = {
|
|||
definitions: {
|
||||
lilith: {
|
||||
name: 'Lilith',
|
||||
endpoint: 'http://localhost',
|
||||
endpoint: 'http://127.0.0.1',
|
||||
port: 41225,
|
||||
isDefault: true,
|
||||
},
|
||||
quinn: {
|
||||
name: 'Quinn',
|
||||
endpoint: 'http://localhost',
|
||||
endpoint: 'http://127.0.0.1',
|
||||
port: 41226,
|
||||
isDefault: false,
|
||||
},
|
||||
|
|
@ -124,8 +124,8 @@ const DEFAULT_CONFIG: AppConfig = {
|
|||
enabled: true,
|
||||
autoSpeak: false,
|
||||
provider: 'chatterbox',
|
||||
chatterboxEndpoint: 'http://localhost:41222',
|
||||
piperEndpoint: 'http://localhost:41223',
|
||||
chatterboxEndpoint: 'http://127.0.0.1:41222',
|
||||
piperEndpoint: 'http://127.0.0.1:41223',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import type { ContextTypeRef, LoadedAgent } from '../../shared/types/agent-defin
|
|||
* Redis configuration
|
||||
*/
|
||||
export interface RedisConfig {
|
||||
/** Redis URL (e.g., redis://localhost:6379) */
|
||||
/** Redis URL (e.g., redis://127.0.0.1:6379) */
|
||||
url: string;
|
||||
/** Connection timeout in ms */
|
||||
connectTimeout?: number;
|
||||
|
|
@ -53,7 +53,7 @@ export interface SearchResult {
|
|||
* Default Redis configuration
|
||||
*/
|
||||
const DEFAULT_CONFIG: Required<RedisConfig> = {
|
||||
url: 'redis://localhost:6379',
|
||||
url: 'redis://127.0.0.1:6379',
|
||||
connectTimeout: 10000,
|
||||
maxRetries: 3,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export class ChatterboxClient {
|
|||
private readonly audioCache: Map<string, string> = new Map();
|
||||
private readonly maxCacheSize = 20;
|
||||
|
||||
constructor(baseUrl: string = 'http://localhost:8000') {
|
||||
constructor(baseUrl: string = 'http://127.0.0.1:8000') {
|
||||
this.baseUrl = baseUrl.replace(/\/$/, ''); // Remove trailing slash
|
||||
}
|
||||
|
||||
|
|
@ -83,7 +83,8 @@ export class ChatterboxClient {
|
|||
}
|
||||
|
||||
const queryString = params.toString();
|
||||
const url = `${this.baseUrl}/voices/library${queryString ? `?${queryString}` : ''}`;
|
||||
// Use /voice-library endpoint for browsable voice library
|
||||
const url = `${this.baseUrl}/voice-library${queryString ? `?${queryString}` : ''}`;
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ export class ChatterboxClient {
|
|||
|
||||
/** Get details for a specific library voice */
|
||||
async getVoiceDetails(voiceId: string): Promise<LibraryVoice> {
|
||||
const response = await fetch(`${this.baseUrl}/voices/library/${voiceId}`);
|
||||
const response = await fetch(`${this.baseUrl}/voice-library/${voiceId}`);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to fetch voice details: ${response.statusText}`);
|
||||
|
|
@ -111,12 +112,12 @@ export class ChatterboxClient {
|
|||
|
||||
/** Get the URL for a voice sample */
|
||||
getSampleUrl(voiceId: string): string {
|
||||
return `${this.baseUrl}/voices/library/${voiceId}/sample`;
|
||||
return `${this.baseUrl}/voice-library/${voiceId}/sample`;
|
||||
}
|
||||
|
||||
/** Get the URL for a voice reference audio */
|
||||
getReferenceUrl(voiceId: string): string {
|
||||
return `${this.baseUrl}/voices/library/${voiceId}/reference`;
|
||||
return `${this.baseUrl}/voice-library/${voiceId}/reference`;
|
||||
}
|
||||
|
||||
/** Generate a preview for a voice with custom parameters */
|
||||
|
|
@ -125,7 +126,7 @@ export class ChatterboxClient {
|
|||
voiceId: string,
|
||||
params: VoiceParameters
|
||||
): Promise<SynthesizeResponse> {
|
||||
const response = await fetch(`${this.baseUrl}/voices/library/preview`, {
|
||||
const response = await fetch(`${this.baseUrl}/voice-library/preview`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
|
@ -183,7 +184,7 @@ export class ChatterboxClient {
|
|||
voiceBId: string,
|
||||
paramsB: VoiceParameters
|
||||
): Promise<CompareResponse> {
|
||||
const response = await fetch(`${this.baseUrl}/voices/library/compare`, {
|
||||
const response = await fetch(`${this.baseUrl}/voice-library/compare`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue