dsh-realtime-agent 0.2.1 → 0.2.2
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/lib/index.d.ts +15 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +16 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +31 -0
package/lib/index.d.ts
CHANGED
|
@@ -54,6 +54,21 @@ declare module '@deepseek-ai/cordis' {
|
|
|
54
54
|
* only object that can write them. Emitted with no session open, this is dropped — not buffered.
|
|
55
55
|
*/
|
|
56
56
|
'realtime-agent/mic'(pcm16: Uint8Array): void;
|
|
57
|
+
/**
|
|
58
|
+
* Open the voice session.
|
|
59
|
+
*
|
|
60
|
+
* Emitted by a transport when an authenticated client arrives, so that connecting a microphone is
|
|
61
|
+
* enough to be heard — with no profile option and no dependence on a model choosing to call
|
|
62
|
+
* `voice_start`. The session belongs to the agent, so the transport asks rather than opens one itself.
|
|
63
|
+
*/
|
|
64
|
+
'realtime-agent/start'(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Close the voice session.
|
|
67
|
+
*
|
|
68
|
+
* Emitted by a transport when its last client goes away, including when the transport itself is
|
|
69
|
+
* disposed — a session outliving the microphone that asked for it is a socket nobody is listening to.
|
|
70
|
+
*/
|
|
71
|
+
'realtime-agent/stop'(): void;
|
|
57
72
|
}
|
|
58
73
|
}
|
|
59
74
|
export * from './types.ts';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAsB,eAAe,EAAE,uBAAuB,EAAsB,MAAM,cAAc,CAAA;AACpH,OAAO,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AAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,uBAAuB,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAgGrE"}
|
package/lib/index.js
CHANGED
|
@@ -152,6 +152,22 @@ export function apply(ctx, config) {
|
|
|
152
152
|
});
|
|
153
153
|
yield () => { dispose(); };
|
|
154
154
|
}, 'realtime-agent.mic');
|
|
155
|
+
// Session requests from the transport. The route knows when an authenticated client connects and the
|
|
156
|
+
// agent owns the session, so one event is the whole of the wiring between them.
|
|
157
|
+
ctx.effect(function* () {
|
|
158
|
+
const disposers = [
|
|
159
|
+
ctx.on('realtime-agent/start', () => {
|
|
160
|
+
// Fire-and-forget for the same reason `autoStart` is: a listener has no caller to catch a
|
|
161
|
+
// rejection, and the failure is reported on the bus rather than thrown into one.
|
|
162
|
+
void open().catch((error) => { ctx.emit('realtime-agent/error', error); });
|
|
163
|
+
}),
|
|
164
|
+
ctx.on('realtime-agent/stop', () => {
|
|
165
|
+
void stop().catch((error) => { ctx.emit('realtime-agent/error', error); });
|
|
166
|
+
}),
|
|
167
|
+
];
|
|
168
|
+
yield () => { for (const dispose of disposers)
|
|
169
|
+
dispose(); };
|
|
170
|
+
}, 'realtime-agent.session-requests');
|
|
155
171
|
if (config.autoStart) {
|
|
156
172
|
// `apply` is synchronous, so a failed open cannot be thrown from it — it is reported on the bus
|
|
157
173
|
// instead. The plugin stays valid and a later start may succeed.
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,MAAM,MAAM,0BAA0B,C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CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;IAClF,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -57,6 +57,21 @@ declare module '@deepseek-ai/cordis' {
|
|
|
57
57
|
* only object that can write them. Emitted with no session open, this is dropped — not buffered.
|
|
58
58
|
*/
|
|
59
59
|
'realtime-agent/mic'(pcm16: Uint8Array): void
|
|
60
|
+
/**
|
|
61
|
+
* Open the voice session.
|
|
62
|
+
*
|
|
63
|
+
* Emitted by a transport when an authenticated client arrives, so that connecting a microphone is
|
|
64
|
+
* enough to be heard — with no profile option and no dependence on a model choosing to call
|
|
65
|
+
* `voice_start`. The session belongs to the agent, so the transport asks rather than opens one itself.
|
|
66
|
+
*/
|
|
67
|
+
'realtime-agent/start'(): void
|
|
68
|
+
/**
|
|
69
|
+
* Close the voice session.
|
|
70
|
+
*
|
|
71
|
+
* Emitted by a transport when its last client goes away, including when the transport itself is
|
|
72
|
+
* disposed — a session outliving the microphone that asked for it is a socket nobody is listening to.
|
|
73
|
+
*/
|
|
74
|
+
'realtime-agent/stop'(): void
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
77
|
|
|
@@ -212,6 +227,22 @@ export function apply(ctx: Context, config: RealtimeAgentConfig): void {
|
|
|
212
227
|
yield () => { dispose() }
|
|
213
228
|
}, 'realtime-agent.mic')
|
|
214
229
|
|
|
230
|
+
// Session requests from the transport. The route knows when an authenticated client connects and the
|
|
231
|
+
// agent owns the session, so one event is the whole of the wiring between them.
|
|
232
|
+
ctx.effect(function* () {
|
|
233
|
+
const disposers = [
|
|
234
|
+
ctx.on('realtime-agent/start', () => {
|
|
235
|
+
// Fire-and-forget for the same reason `autoStart` is: a listener has no caller to catch a
|
|
236
|
+
// rejection, and the failure is reported on the bus rather than thrown into one.
|
|
237
|
+
void open().catch((error: Error) => { ctx.emit('realtime-agent/error', error) })
|
|
238
|
+
}),
|
|
239
|
+
ctx.on('realtime-agent/stop', () => {
|
|
240
|
+
void stop().catch((error: Error) => { ctx.emit('realtime-agent/error', error) })
|
|
241
|
+
}),
|
|
242
|
+
]
|
|
243
|
+
yield () => { for (const dispose of disposers) dispose() }
|
|
244
|
+
}, 'realtime-agent.session-requests')
|
|
245
|
+
|
|
215
246
|
if (config.autoStart) {
|
|
216
247
|
// `apply` is synchronous, so a failed open cannot be thrown from it — it is reported on the bus
|
|
217
248
|
// instead. The plugin stays valid and a later start may succeed.
|