@tehreet/conduit
Version:
LLM API gateway with intelligent routing, robust process management, and health monitoring
42 lines • 1.29 kB
TypeScript
import { EventEmitter } from 'events';
import { ChildProcess } from 'child_process';
import { ConduitConfig } from '../utils/config-presets';
export interface WrapperOptions {
claudeBinaryPath: string;
config: ConduitConfig;
loggingEnabled?: boolean;
metricsEnabled?: boolean;
}
export interface ClaudeArgs {
model?: string;
messages?: Array<{
role: string;
content: string;
}>;
systemPrompt?: string;
outputFormat?: string;
thinking?: boolean;
[key: string]: any;
}
export interface RoutingDecision {
model: string;
source: 'synapse-context' | 'plugin' | 'preset-rule' | 'token-based' | 'default';
reason: string;
tokenCount?: number;
metadata?: Record<string, any>;
}
export declare class ClaudeWrapper extends EventEmitter {
private options;
constructor(options: WrapperOptions);
wrapCommand(args: string[], env?: NodeJS.ProcessEnv): Promise<ChildProcess>;
private parseClaudeArgs;
private extractContext;
private makeRoutingDecision;
private routeWithSynapseContext;
private mapSynapseModelToClaude;
private applyRoutingDecision;
private setupMetadataInjection;
private logRoutingDecision;
private trackUsage;
}
//# sourceMappingURL=claude-wrapper.d.ts.map