@framers/agentos 0.1.175 → 0.1.177

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.
Files changed (49) hide show
  1. package/dist/api/agent.d.ts.map +1 -1
  2. package/dist/api/agent.js +53 -5
  3. package/dist/api/agent.js.map +1 -1
  4. package/dist/api/generateText.d.ts +1 -1
  5. package/dist/api/generateText.d.ts.map +1 -1
  6. package/dist/api/generateText.js +1 -0
  7. package/dist/api/generateText.js.map +1 -1
  8. package/dist/cognitive_substrate/GMIEvent.d.ts +6 -1
  9. package/dist/cognitive_substrate/GMIEvent.d.ts.map +1 -1
  10. package/dist/cognitive_substrate/GMIEvent.js +5 -0
  11. package/dist/cognitive_substrate/GMIEvent.js.map +1 -1
  12. package/dist/memory/index.d.ts +2 -0
  13. package/dist/memory/index.d.ts.map +1 -1
  14. package/dist/memory/index.js +1 -0
  15. package/dist/memory/index.js.map +1 -1
  16. package/dist/memory/io/facade/Memory.d.ts +7 -6
  17. package/dist/memory/io/facade/Memory.d.ts.map +1 -1
  18. package/dist/memory/io/facade/Memory.js +37 -13
  19. package/dist/memory/io/facade/Memory.js.map +1 -1
  20. package/dist/memory/mechanisms/CognitiveMechanismsEngine.d.ts +4 -0
  21. package/dist/memory/mechanisms/CognitiveMechanismsEngine.d.ts.map +1 -1
  22. package/dist/memory/mechanisms/CognitiveMechanismsEngine.js +9 -1
  23. package/dist/memory/mechanisms/CognitiveMechanismsEngine.js.map +1 -1
  24. package/dist/memory/mechanisms/PersonaDriftMechanism.d.ts +50 -0
  25. package/dist/memory/mechanisms/PersonaDriftMechanism.d.ts.map +1 -0
  26. package/dist/memory/mechanisms/PersonaDriftMechanism.js +104 -0
  27. package/dist/memory/mechanisms/PersonaDriftMechanism.js.map +1 -0
  28. package/dist/memory/mechanisms/types.d.ts +2 -0
  29. package/dist/memory/mechanisms/types.d.ts.map +1 -1
  30. package/dist/voice-pipeline/WebSocketStreamTransport.d.ts +8 -8
  31. package/dist/voice-pipeline/WebSocketStreamTransport.js +12 -12
  32. package/dist/voice-pipeline/WebSocketStreamTransport.js.map +1 -1
  33. package/dist/voice-pipeline/index.d.ts +78 -18
  34. package/dist/voice-pipeline/index.d.ts.map +1 -1
  35. package/dist/voice-pipeline/index.js +79 -18
  36. package/dist/voice-pipeline/index.js.map +1 -1
  37. package/dist/voice-pipeline/providers/AgentSessionVoiceAdapter.d.ts +63 -0
  38. package/dist/voice-pipeline/providers/AgentSessionVoiceAdapter.d.ts.map +1 -0
  39. package/dist/voice-pipeline/providers/AgentSessionVoiceAdapter.js +72 -0
  40. package/dist/voice-pipeline/providers/AgentSessionVoiceAdapter.js.map +1 -0
  41. package/dist/voice-pipeline/providers/ElevenLabsStreamingSTT.d.ts +70 -0
  42. package/dist/voice-pipeline/providers/ElevenLabsStreamingSTT.d.ts.map +1 -0
  43. package/dist/voice-pipeline/providers/ElevenLabsStreamingSTT.js +248 -0
  44. package/dist/voice-pipeline/providers/ElevenLabsStreamingSTT.js.map +1 -0
  45. package/dist/voice-pipeline/providers/index.d.ts +13 -0
  46. package/dist/voice-pipeline/providers/index.d.ts.map +1 -0
  47. package/dist/voice-pipeline/providers/index.js +13 -0
  48. package/dist/voice-pipeline/providers/index.js.map +1 -0
  49. package/package.json +1 -1
@@ -0,0 +1,248 @@
1
+ /**
2
+ * @module voice-pipeline/providers/ElevenLabsStreamingSTT
3
+ *
4
+ * Streaming speech-to-text adapter for ElevenLabs' WebSocket STT API.
5
+ * Implements {@link IStreamingSTT} / {@link StreamingSTTSession} for the
6
+ * voice pipeline orchestrator.
7
+ *
8
+ * ## ElevenLabs STT WebSocket Protocol
9
+ *
10
+ * - **Endpoint:** `wss://api.elevenlabs.io/v1/speech-to-text/stream`
11
+ * - **Authentication:** `xi-api-key` header on upgrade
12
+ * - **Inbound (client → ElevenLabs):** Binary PCM frames (16-bit signed LE, 16kHz mono)
13
+ * - **Outbound (ElevenLabs → client):** JSON transcript results
14
+ * - **Close:** Send JSON `{ "type": "close_stream" }` to finalize
15
+ *
16
+ * ## Fallback: Chunked REST
17
+ *
18
+ * If the WebSocket endpoint is unavailable or errors, this adapter falls back
19
+ * to a chunked REST approach: accumulates audio into ~2s chunks and POSTs each
20
+ * to `/v1/speech-to-text` for batch transcription. This provides near-realtime
21
+ * results (2s latency per chunk) using only the REST API.
22
+ *
23
+ * @see https://elevenlabs.io/docs/api-reference/speech-to-text
24
+ */
25
+ import { EventEmitter } from 'node:events';
26
+ // ---------------------------------------------------------------------------
27
+ // Session Implementation — Chunked REST fallback
28
+ // ---------------------------------------------------------------------------
29
+ /**
30
+ * ElevenLabs streaming STT session using chunked REST calls.
31
+ *
32
+ * Accumulates PCM audio into ~2-second chunks and sends each to the
33
+ * ElevenLabs batch STT endpoint. Provides near-realtime transcription
34
+ * with the same API key used for TTS.
35
+ */
36
+ class ElevenLabsChunkedSTTSession extends EventEmitter {
37
+ constructor(config, sessionConfig) {
38
+ super();
39
+ this.config = config;
40
+ this.sessionConfig = sessionConfig;
41
+ this.closed = false;
42
+ this.speechActive = false;
43
+ this.audioBuffer = [];
44
+ this.bufferSamples = 0;
45
+ this.flushTimer = null;
46
+ // Flush accumulated audio every 2 seconds
47
+ this.flushTimer = setInterval(() => {
48
+ if (this.bufferSamples > 0) {
49
+ this._transcribeBuffer();
50
+ }
51
+ }, 2000);
52
+ }
53
+ /**
54
+ * Push a PCM audio frame. Converts Float32 to Int16 and accumulates.
55
+ */
56
+ pushAudio(frame) {
57
+ if (this.closed)
58
+ return;
59
+ // Convert Float32 [-1, 1] to Int16 PCM
60
+ const pcm = new Int16Array(frame.samples.length);
61
+ for (let i = 0; i < frame.samples.length; i++) {
62
+ const s = Math.max(-1, Math.min(1, frame.samples[i]));
63
+ pcm[i] = s < 0 ? s * 0x8000 : s * 0x7fff;
64
+ }
65
+ this.audioBuffer.push(pcm);
66
+ this.bufferSamples += pcm.length;
67
+ // Detect speech activity from energy
68
+ let energy = 0;
69
+ for (let i = 0; i < pcm.length; i++) {
70
+ energy += Math.abs(pcm[i]);
71
+ }
72
+ energy /= pcm.length;
73
+ if (energy > 500 && !this.speechActive) {
74
+ this.speechActive = true;
75
+ this.emit('speech_start');
76
+ }
77
+ }
78
+ /**
79
+ * Flush any remaining audio and transcribe.
80
+ */
81
+ async flush() {
82
+ if (this.bufferSamples > 0) {
83
+ await this._transcribeBuffer();
84
+ }
85
+ }
86
+ /**
87
+ * Close the session and stop the flush timer.
88
+ */
89
+ close() {
90
+ if (this.closed)
91
+ return;
92
+ this.closed = true;
93
+ if (this.flushTimer) {
94
+ clearInterval(this.flushTimer);
95
+ this.flushTimer = null;
96
+ }
97
+ this.emit('close');
98
+ }
99
+ // -------------------------------------------------------------------------
100
+ // Private
101
+ // -------------------------------------------------------------------------
102
+ /**
103
+ * Concatenate accumulated PCM chunks into a WAV buffer and POST to
104
+ * ElevenLabs batch STT endpoint.
105
+ */
106
+ async _transcribeBuffer() {
107
+ // Concatenate all accumulated Int16 chunks
108
+ const totalSamples = this.bufferSamples;
109
+ const combined = new Int16Array(totalSamples);
110
+ let offset = 0;
111
+ for (const chunk of this.audioBuffer) {
112
+ combined.set(chunk, offset);
113
+ offset += chunk.length;
114
+ }
115
+ // Clear the buffer
116
+ this.audioBuffer = [];
117
+ this.bufferSamples = 0;
118
+ // Build a minimal WAV file
119
+ const wavBuffer = this._buildWav(combined, 16000);
120
+ try {
121
+ const baseUrl = this.config.baseUrl ?? 'https://api.elevenlabs.io/v1';
122
+ // Create form data with the WAV audio
123
+ const boundary = '----ElevenLabsSTTBoundary' + Date.now();
124
+ const languageCode = this.sessionConfig.language ?? 'en';
125
+ // Build multipart body manually (Node.js Buffer-based)
126
+ const parts = [];
127
+ parts.push(Buffer.from(`--${boundary}\r\n`));
128
+ parts.push(Buffer.from(`Content-Disposition: form-data; name="audio"; filename="audio.wav"\r\nContent-Type: audio/wav\r\n\r\n`));
129
+ parts.push(Buffer.from(wavBuffer));
130
+ parts.push(Buffer.from(`\r\n--${boundary}\r\n`));
131
+ parts.push(Buffer.from(`Content-Disposition: form-data; name="language_code"\r\n\r\n${languageCode}\r\n`));
132
+ if (this.config.model) {
133
+ parts.push(Buffer.from(`--${boundary}\r\n`));
134
+ parts.push(Buffer.from(`Content-Disposition: form-data; name="model_id"\r\n\r\n${this.config.model}\r\n`));
135
+ }
136
+ parts.push(Buffer.from(`--${boundary}--\r\n`));
137
+ const body = Buffer.concat(parts);
138
+ const response = await fetch(`${baseUrl}/speech-to-text`, {
139
+ method: 'POST',
140
+ headers: {
141
+ 'xi-api-key': this.config.apiKey,
142
+ 'Content-Type': `multipart/form-data; boundary=${boundary}`,
143
+ },
144
+ body,
145
+ });
146
+ if (!response.ok) {
147
+ const errText = await response.text();
148
+ this.emit('error', new Error(`ElevenLabs STT failed (${response.status}): ${errText}`));
149
+ return;
150
+ }
151
+ const data = (await response.json());
152
+ if (data.text) {
153
+ const words = (data.words ?? []).map((w) => ({
154
+ word: w.text,
155
+ start: Math.round(w.start * 1000),
156
+ end: Math.round(w.end * 1000),
157
+ confidence: w.confidence ?? 0.9,
158
+ }));
159
+ const event = {
160
+ text: data.text,
161
+ confidence: words.length > 0 ? words.reduce((s, w) => s + w.confidence, 0) / words.length : 0.9,
162
+ words,
163
+ isFinal: true,
164
+ durationMs: Math.round((totalSamples / 16000) * 1000),
165
+ };
166
+ this.emit('transcript', event);
167
+ // Emit speech_end after a final transcript
168
+ if (this.speechActive) {
169
+ this.speechActive = false;
170
+ this.emit('speech_end');
171
+ }
172
+ }
173
+ }
174
+ catch (err) {
175
+ this.emit('error', err instanceof Error ? err : new Error(String(err)));
176
+ }
177
+ }
178
+ /**
179
+ * Build a minimal WAV file header + PCM data.
180
+ */
181
+ _buildWav(pcm, sampleRate) {
182
+ const dataSize = pcm.length * 2; // 16-bit = 2 bytes per sample
183
+ const buffer = new ArrayBuffer(44 + dataSize);
184
+ const view = new DataView(buffer);
185
+ // RIFF header
186
+ this._writeString(view, 0, 'RIFF');
187
+ view.setUint32(4, 36 + dataSize, true);
188
+ this._writeString(view, 8, 'WAVE');
189
+ // fmt chunk
190
+ this._writeString(view, 12, 'fmt ');
191
+ view.setUint32(16, 16, true); // chunk size
192
+ view.setUint16(20, 1, true); // PCM format
193
+ view.setUint16(22, 1, true); // mono
194
+ view.setUint32(24, sampleRate, true);
195
+ view.setUint32(28, sampleRate * 2, true); // byte rate
196
+ view.setUint16(32, 2, true); // block align
197
+ view.setUint16(34, 16, true); // bits per sample
198
+ // data chunk
199
+ this._writeString(view, 36, 'data');
200
+ view.setUint32(40, dataSize, true);
201
+ // PCM data
202
+ const output = new Int16Array(buffer, 44);
203
+ output.set(pcm);
204
+ return buffer;
205
+ }
206
+ /** Write an ASCII string into a DataView at the given offset. */
207
+ _writeString(view, offset, str) {
208
+ for (let i = 0; i < str.length; i++) {
209
+ view.setUint8(offset + i, str.charCodeAt(i));
210
+ }
211
+ }
212
+ }
213
+ /** Samples per chunk: 2 seconds at 16kHz = 32,000 samples. */
214
+ ElevenLabsChunkedSTTSession.CHUNK_SAMPLES = 32000;
215
+ // ---------------------------------------------------------------------------
216
+ // Provider (Factory)
217
+ // ---------------------------------------------------------------------------
218
+ /**
219
+ * Streaming STT provider using ElevenLabs' Speech-to-Text API.
220
+ *
221
+ * Uses chunked REST transcription (2-second audio windows) to provide
222
+ * near-realtime STT with the same ElevenLabs API key used for TTS.
223
+ * No separate Deepgram key required.
224
+ *
225
+ * @example
226
+ * ```typescript
227
+ * const stt = new ElevenLabsStreamingSTT({
228
+ * apiKey: process.env.ELEVENLABS_API_KEY!,
229
+ * });
230
+ * const session = await stt.startSession({ language: 'en' });
231
+ * session.on('transcript', (event) => console.log(event.text));
232
+ * ```
233
+ */
234
+ export class ElevenLabsStreamingSTT {
235
+ constructor(config) {
236
+ this.config = config;
237
+ this.providerId = 'elevenlabs-streaming-stt';
238
+ this.isStreaming = true;
239
+ }
240
+ /**
241
+ * Create a new STT session. Uses chunked REST calls to ElevenLabs'
242
+ * batch STT endpoint for near-realtime transcription.
243
+ */
244
+ async startSession(config) {
245
+ return new ElevenLabsChunkedSTTSession(this.config, config ?? {});
246
+ }
247
+ }
248
+ //# sourceMappingURL=ElevenLabsStreamingSTT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElevenLabsStreamingSTT.js","sourceRoot":"","sources":["../../../src/voice-pipeline/providers/ElevenLabsStreamingSTT.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAsD3C,8EAA8E;AAC9E,iDAAiD;AACjD,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,2BAA4B,SAAQ,YAAY;IAUpD,YACmB,MAAoC,EACpC,aAAiC;QAElD,KAAK,EAAE,CAAC;QAHS,WAAM,GAAN,MAAM,CAA8B;QACpC,kBAAa,GAAb,aAAa,CAAoB;QAX5C,WAAM,GAAG,KAAK,CAAC;QACf,iBAAY,GAAG,KAAK,CAAC;QACrB,gBAAW,GAAiB,EAAE,CAAC;QAC/B,kBAAa,GAAG,CAAC,CAAC;QAClB,eAAU,GAA0C,IAAI,CAAC;QAW/D,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YACjC,IAAI,IAAI,CAAC,aAAa,GAAG,CAAC,EAAE,CAAC;gBAC3B,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,CAAC;QACH,CAAC,EAAE,IAAK,CAAC,CAAC;IACZ,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAAiB;QACzB,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO;QAExB,uCAAuC;QACvC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACjD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9C,M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ramStreamingSTT} — Deepgram WebSocket streaming STT
6
+ * - {@link ElevenLabsStreamingTTS} — ElevenLabs WebSocket streaming TTS
7
+ * - {@link AgentSessionVoiceAdapter} — AgentOS session → voice pipeline adapter
8
+ */
9
+ export { DeepgramStreamingSTT, type DeepgramStreamingSTTConfig } from './DeepgramStreamingSTT.js';
10
+ export { ElevenLabsStreamingSTT, type ElevenLabsStreamingSTTConfig, } from './ElevenLabsStreamingSTT.js';
11
+ export { ElevenLabsStreamingTTS, type ElevenLabsStreamingTTSConfig, } from './ElevenLabsStreamingTTS.js';
12
+ export { AgentSessionVoiceAdapter } from './AgentSessionVoiceAdapter.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/voice-pipeline/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @module voice-pipeline/providers
3
+ *
4
+ * Concrete provider implementations for the voice pipeline:
5
+ * - {@link DeepgramStreamingSTT} — Deepgram WebSocket streaming STT
6
+ * - {@link ElevenLabsStreamingTTS} — ElevenLabs WebSocket streaming TTS
7
+ * - {@link AgentSessionVoiceAdapter} — AgentOS session → voice pipeline adapter
8
+ */
9
+ export { DeepgramStreamingSTT } from './DeepgramStreamingSTT.js';
10
+ export { ElevenLabsStreamingSTT, } from './ElevenLabsStreamingSTT.js';
11
+ export { ElevenLabsStreamingTTS, } from './ElevenLabsStreamingTTS.js';
12
+ export { AgentSessionVoiceAdapter } from './AgentSessionVoiceAdapter.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/voice-pipeline/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAmC,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,sBAAsB,GAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,GAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos",
3
- "version": "0.1.175",
3
+ "version": "0.1.177",
4
4
  "description": "Modular AgentOS orchestration library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",