@teamlearners/clawops 0.6.0 → 0.8.1
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/README.md +13 -0
- package/dist/agent/index.cjs +9 -8
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +64 -1
- package/dist/agent/index.d.ts +64 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-R742GPVL.cjs → chunk-MOH4FRJZ.cjs} +3 -3
- package/dist/chunk-MOH4FRJZ.cjs.map +1 -0
- package/dist/{chunk-2B74QZZJ.js → chunk-RUVY7MYW.js} +3 -3
- package/dist/chunk-RUVY7MYW.js.map +1 -0
- package/dist/index.cjs +48 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -2
- package/dist/index.d.ts +64 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2B74QZZJ.js.map +0 -1
- package/dist/chunk-R742GPVL.cjs.map +0 -1
package/dist/agent/index.d.cts
CHANGED
|
@@ -472,6 +472,69 @@ declare class ClawOpsAgent {
|
|
|
472
472
|
private _startCallSession;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
/**
|
|
476
|
+
* Media WebSocket for streaming audio to/from the telephony platform.
|
|
477
|
+
*
|
|
478
|
+
* ClawOps VoiceML Stream protocol:
|
|
479
|
+
* connected -> start -> media (G.711 ulaw 8kHz base64) -> mark -> stop
|
|
480
|
+
*/
|
|
481
|
+
|
|
482
|
+
interface MediaStartEvent {
|
|
483
|
+
streamId: string;
|
|
484
|
+
callId: string;
|
|
485
|
+
accountId: string;
|
|
486
|
+
sampleRate: number;
|
|
487
|
+
}
|
|
488
|
+
interface MediaEvent {
|
|
489
|
+
audio: Buffer;
|
|
490
|
+
timestamp: number;
|
|
491
|
+
}
|
|
492
|
+
interface DtmfEvent {
|
|
493
|
+
digit: string;
|
|
494
|
+
track: string;
|
|
495
|
+
}
|
|
496
|
+
declare class MediaWebSocket {
|
|
497
|
+
private _ws;
|
|
498
|
+
private _audioQueue;
|
|
499
|
+
private _sendLoopRunning;
|
|
500
|
+
private _closed;
|
|
501
|
+
private _onAudio;
|
|
502
|
+
private _onStart;
|
|
503
|
+
private _onClose;
|
|
504
|
+
private _onDtmf;
|
|
505
|
+
private _markWaiters;
|
|
506
|
+
private _log;
|
|
507
|
+
setLogger(logger: Logger): void;
|
|
508
|
+
/** Set the handler for inbound audio data. */
|
|
509
|
+
onAudio(handler: (audio: Buffer, timestamp: number) => void): void;
|
|
510
|
+
/** Set the handler for the start event. */
|
|
511
|
+
onStart(handler: (event: MediaStartEvent) => void): void;
|
|
512
|
+
/** Set the handler for connection close. */
|
|
513
|
+
onClose(handler: () => void): void;
|
|
514
|
+
/** Set the handler for inbound DTMF events. */
|
|
515
|
+
onDtmf(handler: (digit: string) => void): void;
|
|
516
|
+
/** Send a single DTMF digit to the platform. */
|
|
517
|
+
sendDtmf(digit: string): void;
|
|
518
|
+
/** Whether the WebSocket is connected. */
|
|
519
|
+
get isConnected(): boolean;
|
|
520
|
+
/** Connect to a media WebSocket URL with Bearer authentication. */
|
|
521
|
+
connect(url: string, apiKey: string): Promise<void>;
|
|
522
|
+
/** Queue base64-encoded audio for sending. */
|
|
523
|
+
sendAudio(audioBase64: string): void;
|
|
524
|
+
/** Clear all queued outbound audio. */
|
|
525
|
+
sendClear(): void;
|
|
526
|
+
/** Send a mark event. */
|
|
527
|
+
sendMark(name: string): void;
|
|
528
|
+
/** Wait for all queued audio to be sent. */
|
|
529
|
+
flush(): Promise<void>;
|
|
530
|
+
/** Wait for a named mark to be echoed back by the server. */
|
|
531
|
+
waitForMark(name: string, timeoutMs?: number): Promise<void>;
|
|
532
|
+
/** Close the media WebSocket. */
|
|
533
|
+
close(): void;
|
|
534
|
+
private _handleMessage;
|
|
535
|
+
private _startSendLoop;
|
|
536
|
+
}
|
|
537
|
+
|
|
475
538
|
/**
|
|
476
539
|
* Audio codec utilities: PCM16 <-> ulaw conversion and resampling.
|
|
477
540
|
*/
|
|
@@ -1077,4 +1140,4 @@ declare function createAgentLogger(userLogger?: Logger): Logger;
|
|
|
1077
1140
|
*/
|
|
1078
1141
|
declare function createPipelineLogger(parent: Logger): Logger;
|
|
1079
1142
|
|
|
1080
|
-
export { type AgentEventType, AnthropicLLM, type AnthropicLLMOptions, AudioRecorder, BUILTIN_TOOL_NAMES, BuiltinTool, type CallDirection, CallSession, type CallStatus, ClawOpsAgent, type ClawOpsAgentOptions, type ConversationMessage, DECODE_TABLE, DeepSeekLLM, type DeepSeekLLMOptions, DeepgramSTT, type DeepgramSTTOptions, ElevenLabsTTS, type ElevenLabsTTSOptions, FireworksLLM, type FireworksLLMOptions, type FunctionTool, GeminiLLM, type GeminiLLMOptions, GeminiRealtime, type GeminiRealtimeOptions, GroqLLM, type GroqLLMOptions, type LLM, type LLMChunk, MCPClient, type MCPServerConfig, type MCPServerHTTP, type MCPServerStdio, MistralLLM, type MistralLLMOptions, OllamaLLM, type OllamaLLMOptions, OpenAICompatLLM, type OpenAICompatLLMOptions, OpenAILLM, type OpenAILLMOptions, OpenAIRealtime, type OpenAIRealtimeOptions, type OpenAIToolDefinition, PerplexityLLM, type PerplexityLLMOptions, PipelineSession, type PipelineSessionOptions, type STT, type Session, type SpeechEvent, type TTS, TogetherLLM, type TogetherLLMOptions, type ToolCallRequest, ToolRegistry, type TracingConfig, XaiLLM, type XaiLLMOptions, createAgentLogger, createPipelineLogger, executeBuiltinTool, functionTool, getBuiltinToolSchemas, getTracingConfig, isBuiltinTool, mcpServerHTTP, mcpServerStdio, pcm16ToUlaw, resamplePcm16, resetTracingConfig, setTracingConfig, ulawToPcm16, zodToToolParams };
|
|
1143
|
+
export { type AgentEventType, AnthropicLLM, type AnthropicLLMOptions, AudioRecorder, BUILTIN_TOOL_NAMES, BuiltinTool, type CallDirection, CallSession, type CallStatus, ClawOpsAgent, type ClawOpsAgentOptions, type ConversationMessage, DECODE_TABLE, DeepSeekLLM, type DeepSeekLLMOptions, DeepgramSTT, type DeepgramSTTOptions, type DtmfEvent, ElevenLabsTTS, type ElevenLabsTTSOptions, FireworksLLM, type FireworksLLMOptions, type FunctionTool, GeminiLLM, type GeminiLLMOptions, GeminiRealtime, type GeminiRealtimeOptions, GroqLLM, type GroqLLMOptions, type LLM, type LLMChunk, MCPClient, type MCPServerConfig, type MCPServerHTTP, type MCPServerStdio, type MediaEvent, type MediaStartEvent, MediaWebSocket, MistralLLM, type MistralLLMOptions, OllamaLLM, type OllamaLLMOptions, OpenAICompatLLM, type OpenAICompatLLMOptions, OpenAILLM, type OpenAILLMOptions, OpenAIRealtime, type OpenAIRealtimeOptions, type OpenAIToolDefinition, PerplexityLLM, type PerplexityLLMOptions, PipelineSession, type PipelineSessionOptions, type STT, type Session, type SpeechEvent, type TTS, TogetherLLM, type TogetherLLMOptions, type ToolCallRequest, ToolRegistry, type TracingConfig, XaiLLM, type XaiLLMOptions, createAgentLogger, createPipelineLogger, executeBuiltinTool, functionTool, getBuiltinToolSchemas, getTracingConfig, isBuiltinTool, mcpServerHTTP, mcpServerStdio, pcm16ToUlaw, resamplePcm16, resetTracingConfig, setTracingConfig, ulawToPcm16, zodToToolParams };
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -472,6 +472,69 @@ declare class ClawOpsAgent {
|
|
|
472
472
|
private _startCallSession;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
/**
|
|
476
|
+
* Media WebSocket for streaming audio to/from the telephony platform.
|
|
477
|
+
*
|
|
478
|
+
* ClawOps VoiceML Stream protocol:
|
|
479
|
+
* connected -> start -> media (G.711 ulaw 8kHz base64) -> mark -> stop
|
|
480
|
+
*/
|
|
481
|
+
|
|
482
|
+
interface MediaStartEvent {
|
|
483
|
+
streamId: string;
|
|
484
|
+
callId: string;
|
|
485
|
+
accountId: string;
|
|
486
|
+
sampleRate: number;
|
|
487
|
+
}
|
|
488
|
+
interface MediaEvent {
|
|
489
|
+
audio: Buffer;
|
|
490
|
+
timestamp: number;
|
|
491
|
+
}
|
|
492
|
+
interface DtmfEvent {
|
|
493
|
+
digit: string;
|
|
494
|
+
track: string;
|
|
495
|
+
}
|
|
496
|
+
declare class MediaWebSocket {
|
|
497
|
+
private _ws;
|
|
498
|
+
private _audioQueue;
|
|
499
|
+
private _sendLoopRunning;
|
|
500
|
+
private _closed;
|
|
501
|
+
private _onAudio;
|
|
502
|
+
private _onStart;
|
|
503
|
+
private _onClose;
|
|
504
|
+
private _onDtmf;
|
|
505
|
+
private _markWaiters;
|
|
506
|
+
private _log;
|
|
507
|
+
setLogger(logger: Logger): void;
|
|
508
|
+
/** Set the handler for inbound audio data. */
|
|
509
|
+
onAudio(handler: (audio: Buffer, timestamp: number) => void): void;
|
|
510
|
+
/** Set the handler for the start event. */
|
|
511
|
+
onStart(handler: (event: MediaStartEvent) => void): void;
|
|
512
|
+
/** Set the handler for connection close. */
|
|
513
|
+
onClose(handler: () => void): void;
|
|
514
|
+
/** Set the handler for inbound DTMF events. */
|
|
515
|
+
onDtmf(handler: (digit: string) => void): void;
|
|
516
|
+
/** Send a single DTMF digit to the platform. */
|
|
517
|
+
sendDtmf(digit: string): void;
|
|
518
|
+
/** Whether the WebSocket is connected. */
|
|
519
|
+
get isConnected(): boolean;
|
|
520
|
+
/** Connect to a media WebSocket URL with Bearer authentication. */
|
|
521
|
+
connect(url: string, apiKey: string): Promise<void>;
|
|
522
|
+
/** Queue base64-encoded audio for sending. */
|
|
523
|
+
sendAudio(audioBase64: string): void;
|
|
524
|
+
/** Clear all queued outbound audio. */
|
|
525
|
+
sendClear(): void;
|
|
526
|
+
/** Send a mark event. */
|
|
527
|
+
sendMark(name: string): void;
|
|
528
|
+
/** Wait for all queued audio to be sent. */
|
|
529
|
+
flush(): Promise<void>;
|
|
530
|
+
/** Wait for a named mark to be echoed back by the server. */
|
|
531
|
+
waitForMark(name: string, timeoutMs?: number): Promise<void>;
|
|
532
|
+
/** Close the media WebSocket. */
|
|
533
|
+
close(): void;
|
|
534
|
+
private _handleMessage;
|
|
535
|
+
private _startSendLoop;
|
|
536
|
+
}
|
|
537
|
+
|
|
475
538
|
/**
|
|
476
539
|
* Audio codec utilities: PCM16 <-> ulaw conversion and resampling.
|
|
477
540
|
*/
|
|
@@ -1077,4 +1140,4 @@ declare function createAgentLogger(userLogger?: Logger): Logger;
|
|
|
1077
1140
|
*/
|
|
1078
1141
|
declare function createPipelineLogger(parent: Logger): Logger;
|
|
1079
1142
|
|
|
1080
|
-
export { type AgentEventType, AnthropicLLM, type AnthropicLLMOptions, AudioRecorder, BUILTIN_TOOL_NAMES, BuiltinTool, type CallDirection, CallSession, type CallStatus, ClawOpsAgent, type ClawOpsAgentOptions, type ConversationMessage, DECODE_TABLE, DeepSeekLLM, type DeepSeekLLMOptions, DeepgramSTT, type DeepgramSTTOptions, ElevenLabsTTS, type ElevenLabsTTSOptions, FireworksLLM, type FireworksLLMOptions, type FunctionTool, GeminiLLM, type GeminiLLMOptions, GeminiRealtime, type GeminiRealtimeOptions, GroqLLM, type GroqLLMOptions, type LLM, type LLMChunk, MCPClient, type MCPServerConfig, type MCPServerHTTP, type MCPServerStdio, MistralLLM, type MistralLLMOptions, OllamaLLM, type OllamaLLMOptions, OpenAICompatLLM, type OpenAICompatLLMOptions, OpenAILLM, type OpenAILLMOptions, OpenAIRealtime, type OpenAIRealtimeOptions, type OpenAIToolDefinition, PerplexityLLM, type PerplexityLLMOptions, PipelineSession, type PipelineSessionOptions, type STT, type Session, type SpeechEvent, type TTS, TogetherLLM, type TogetherLLMOptions, type ToolCallRequest, ToolRegistry, type TracingConfig, XaiLLM, type XaiLLMOptions, createAgentLogger, createPipelineLogger, executeBuiltinTool, functionTool, getBuiltinToolSchemas, getTracingConfig, isBuiltinTool, mcpServerHTTP, mcpServerStdio, pcm16ToUlaw, resamplePcm16, resetTracingConfig, setTracingConfig, ulawToPcm16, zodToToolParams };
|
|
1143
|
+
export { type AgentEventType, AnthropicLLM, type AnthropicLLMOptions, AudioRecorder, BUILTIN_TOOL_NAMES, BuiltinTool, type CallDirection, CallSession, type CallStatus, ClawOpsAgent, type ClawOpsAgentOptions, type ConversationMessage, DECODE_TABLE, DeepSeekLLM, type DeepSeekLLMOptions, DeepgramSTT, type DeepgramSTTOptions, type DtmfEvent, ElevenLabsTTS, type ElevenLabsTTSOptions, FireworksLLM, type FireworksLLMOptions, type FunctionTool, GeminiLLM, type GeminiLLMOptions, GeminiRealtime, type GeminiRealtimeOptions, GroqLLM, type GroqLLMOptions, type LLM, type LLMChunk, MCPClient, type MCPServerConfig, type MCPServerHTTP, type MCPServerStdio, type MediaEvent, type MediaStartEvent, MediaWebSocket, MistralLLM, type MistralLLMOptions, OllamaLLM, type OllamaLLMOptions, OpenAICompatLLM, type OpenAICompatLLMOptions, OpenAILLM, type OpenAILLMOptions, OpenAIRealtime, type OpenAIRealtimeOptions, type OpenAIToolDefinition, PerplexityLLM, type PerplexityLLMOptions, PipelineSession, type PipelineSessionOptions, type STT, type Session, type SpeechEvent, type TTS, TogetherLLM, type TogetherLLMOptions, type ToolCallRequest, ToolRegistry, type TracingConfig, XaiLLM, type XaiLLMOptions, createAgentLogger, createPipelineLogger, executeBuiltinTool, functionTool, getBuiltinToolSchemas, getTracingConfig, isBuiltinTool, mcpServerHTTP, mcpServerStdio, pcm16ToUlaw, resamplePcm16, resetTracingConfig, setTracingConfig, ulawToPcm16, zodToToolParams };
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-
|
|
1
|
+
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-RUVY7MYW.js';
|
|
2
2
|
import pino from 'pino';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
@@ -3842,6 +3842,6 @@ function mcpServerHTTP(options) {
|
|
|
3842
3842
|
};
|
|
3843
3843
|
}
|
|
3844
3844
|
|
|
3845
|
-
export { AnthropicLLM, AudioRecorder, BUILTIN_TOOL_NAMES, BuiltinTool, CallSession, ClawOpsAgent, DECODE_TABLE, DeepSeekLLM, DeepgramSTT, ElevenLabsTTS, FireworksLLM, GeminiLLM, GeminiRealtime, GroqLLM, MCPClient, MistralLLM, OllamaLLM, OpenAICompatLLM, OpenAILLM, OpenAIRealtime, PerplexityLLM, PipelineSession, TogetherLLM, ToolRegistry, XaiLLM, createAgentLogger, createPipelineLogger, executeBuiltinTool, functionTool, getBuiltinToolSchemas, getTracingConfig, isBuiltinTool, mcpServerHTTP, mcpServerStdio, pcm16ToUlaw, resamplePcm16, resetTracingConfig, setTracingConfig, ulawToPcm16, zodToToolParams };
|
|
3845
|
+
export { AnthropicLLM, AudioRecorder, BUILTIN_TOOL_NAMES, BuiltinTool, CallSession, ClawOpsAgent, DECODE_TABLE, DeepSeekLLM, DeepgramSTT, ElevenLabsTTS, FireworksLLM, GeminiLLM, GeminiRealtime, GroqLLM, MCPClient, MediaWebSocket, MistralLLM, OllamaLLM, OpenAICompatLLM, OpenAILLM, OpenAIRealtime, PerplexityLLM, PipelineSession, TogetherLLM, ToolRegistry, XaiLLM, createAgentLogger, createPipelineLogger, executeBuiltinTool, functionTool, getBuiltinToolSchemas, getTracingConfig, isBuiltinTool, mcpServerHTTP, mcpServerStdio, pcm16ToUlaw, resamplePcm16, resetTracingConfig, setTracingConfig, ulawToPcm16, zodToToolParams };
|
|
3846
3846
|
//# sourceMappingURL=index.js.map
|
|
3847
3847
|
//# sourceMappingURL=index.js.map
|