@voicethere/agent 0.7.11 → 0.7.13
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/dist/agent.js +24 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +24 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/runtime.d.ts +3 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +68 -1
- package/dist/runtime.js.map +1 -1
- package/dist/templates/echo/agent.js +26 -2
- package/dist/templates/echo-dc/agent.js +26 -2
- package/dist/templates/game-sync/agent.js +26 -2
- package/dist/templates/positional-tts/agent.js +26 -2
- package/dist/templates/recording-consent/agent.js +26 -2
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +2 -1
- package/dist/templates/registry.js.map +1 -1
- package/dist/templates/spatial-showcase/agent.js +498 -29
- package/dist/templates/voice-showcase/agent.js +26 -2
- package/dist/templates/voice-starter/agent.js +26 -2
- package/dist/templates/webhooks/agent.js +26 -2
- package/dist/templates/webhooks-redis/agent.js +26 -2
- package/package.json +4 -4
- package/templates/README.md +10 -10
- package/templates/spatial-showcase/agent.ts +404 -34
- package/templates/spatial-showcase/protocol.ts +82 -1
- package/templates/spatial-showcase/sine.ts +66 -0
|
@@ -148,6 +148,12 @@ function isPlayStopAckMessage(value) {
|
|
|
148
148
|
const msg = value;
|
|
149
149
|
return msg.type === "play_stop_ack" && typeof msg.requestId === "string";
|
|
150
150
|
}
|
|
151
|
+
function isPlayPoseAckMessage(value) {
|
|
152
|
+
if (!value || typeof value !== "object")
|
|
153
|
+
return false;
|
|
154
|
+
const msg = value;
|
|
155
|
+
return msg.type === "play_pose_ack" && typeof msg.requestId === "string";
|
|
156
|
+
}
|
|
151
157
|
function isRecordingControlAckMessage(value) {
|
|
152
158
|
if (!value || typeof value !== "object")
|
|
153
159
|
return false;
|
|
@@ -208,7 +214,7 @@ function isParentMessage(value) {
|
|
|
208
214
|
if (!value || typeof value !== "object")
|
|
209
215
|
return false;
|
|
210
216
|
const msg = value;
|
|
211
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
217
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
212
218
|
}
|
|
213
219
|
function isSessionScopedParentMessage(value) {
|
|
214
220
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -230,6 +236,7 @@ var pendingRecordingAcks = /* @__PURE__ */ new Map();
|
|
|
230
236
|
var pendingPlayAcks = /* @__PURE__ */ new Map();
|
|
231
237
|
var pendingPlayStatusAcks = /* @__PURE__ */ new Map();
|
|
232
238
|
var pendingPlayStopAcks = /* @__PURE__ */ new Map();
|
|
239
|
+
var pendingPlayPoseAcks = /* @__PURE__ */ new Map();
|
|
233
240
|
var pendingMixAcks = /* @__PURE__ */ new Map();
|
|
234
241
|
var pendingSttAcks = /* @__PURE__ */ new Map();
|
|
235
242
|
function handleRecordingControlAck(message) {
|
|
@@ -284,6 +291,19 @@ function handlePlayStopAck(message) {
|
|
|
284
291
|
requestId: message.requestId
|
|
285
292
|
});
|
|
286
293
|
}
|
|
294
|
+
function handlePlayPoseAck(message) {
|
|
295
|
+
const pending = pendingPlayPoseAcks.get(message.requestId);
|
|
296
|
+
if (!pending)
|
|
297
|
+
return;
|
|
298
|
+
clearTimeout(pending.timer);
|
|
299
|
+
pendingPlayPoseAcks.delete(message.requestId);
|
|
300
|
+
pending.resolve({
|
|
301
|
+
ok: message.ok,
|
|
302
|
+
playId: message.playId,
|
|
303
|
+
reason: message.reason,
|
|
304
|
+
requestId: message.requestId
|
|
305
|
+
});
|
|
306
|
+
}
|
|
287
307
|
function handleMixControlAck(message) {
|
|
288
308
|
const pending = pendingMixAcks.get(message.requestId);
|
|
289
309
|
if (!pending)
|
|
@@ -369,7 +389,7 @@ function sendParentMessage(message) {
|
|
|
369
389
|
process.send?.(message);
|
|
370
390
|
return;
|
|
371
391
|
}
|
|
372
|
-
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop") {
|
|
392
|
+
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop" || msgType === "play_pose") {
|
|
373
393
|
process.send?.(message);
|
|
374
394
|
return;
|
|
375
395
|
}
|
|
@@ -555,6 +575,10 @@ function defineAgent(handlers) {
|
|
|
555
575
|
handlePlayStopAck(message);
|
|
556
576
|
return;
|
|
557
577
|
}
|
|
578
|
+
if (isPlayPoseAckMessage(message)) {
|
|
579
|
+
handlePlayPoseAck(message);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
558
582
|
if (isMixControlAckMessage(message)) {
|
|
559
583
|
handleMixControlAck(message);
|
|
560
584
|
return;
|
|
@@ -148,6 +148,12 @@ function isPlayStopAckMessage(value) {
|
|
|
148
148
|
const msg = value;
|
|
149
149
|
return msg.type === "play_stop_ack" && typeof msg.requestId === "string";
|
|
150
150
|
}
|
|
151
|
+
function isPlayPoseAckMessage(value) {
|
|
152
|
+
if (!value || typeof value !== "object")
|
|
153
|
+
return false;
|
|
154
|
+
const msg = value;
|
|
155
|
+
return msg.type === "play_pose_ack" && typeof msg.requestId === "string";
|
|
156
|
+
}
|
|
151
157
|
function isRecordingControlAckMessage(value) {
|
|
152
158
|
if (!value || typeof value !== "object")
|
|
153
159
|
return false;
|
|
@@ -208,7 +214,7 @@ function isParentMessage(value) {
|
|
|
208
214
|
if (!value || typeof value !== "object")
|
|
209
215
|
return false;
|
|
210
216
|
const msg = value;
|
|
211
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
217
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
212
218
|
}
|
|
213
219
|
function isSessionScopedParentMessage(value) {
|
|
214
220
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -230,6 +236,7 @@ var pendingRecordingAcks = /* @__PURE__ */ new Map();
|
|
|
230
236
|
var pendingPlayAcks = /* @__PURE__ */ new Map();
|
|
231
237
|
var pendingPlayStatusAcks = /* @__PURE__ */ new Map();
|
|
232
238
|
var pendingPlayStopAcks = /* @__PURE__ */ new Map();
|
|
239
|
+
var pendingPlayPoseAcks = /* @__PURE__ */ new Map();
|
|
233
240
|
var pendingMixAcks = /* @__PURE__ */ new Map();
|
|
234
241
|
var pendingSttAcks = /* @__PURE__ */ new Map();
|
|
235
242
|
function handleRecordingControlAck(message) {
|
|
@@ -284,6 +291,19 @@ function handlePlayStopAck(message) {
|
|
|
284
291
|
requestId: message.requestId
|
|
285
292
|
});
|
|
286
293
|
}
|
|
294
|
+
function handlePlayPoseAck(message) {
|
|
295
|
+
const pending = pendingPlayPoseAcks.get(message.requestId);
|
|
296
|
+
if (!pending)
|
|
297
|
+
return;
|
|
298
|
+
clearTimeout(pending.timer);
|
|
299
|
+
pendingPlayPoseAcks.delete(message.requestId);
|
|
300
|
+
pending.resolve({
|
|
301
|
+
ok: message.ok,
|
|
302
|
+
playId: message.playId,
|
|
303
|
+
reason: message.reason,
|
|
304
|
+
requestId: message.requestId
|
|
305
|
+
});
|
|
306
|
+
}
|
|
287
307
|
function handleMixControlAck(message) {
|
|
288
308
|
const pending = pendingMixAcks.get(message.requestId);
|
|
289
309
|
if (!pending)
|
|
@@ -369,7 +389,7 @@ function sendParentMessage(message) {
|
|
|
369
389
|
process.send?.(message);
|
|
370
390
|
return;
|
|
371
391
|
}
|
|
372
|
-
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop") {
|
|
392
|
+
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop" || msgType === "play_pose") {
|
|
373
393
|
process.send?.(message);
|
|
374
394
|
return;
|
|
375
395
|
}
|
|
@@ -555,6 +575,10 @@ function defineAgent(handlers) {
|
|
|
555
575
|
handlePlayStopAck(message);
|
|
556
576
|
return;
|
|
557
577
|
}
|
|
578
|
+
if (isPlayPoseAckMessage(message)) {
|
|
579
|
+
handlePlayPoseAck(message);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
558
582
|
if (isMixControlAckMessage(message)) {
|
|
559
583
|
handleMixControlAck(message);
|
|
560
584
|
return;
|
|
@@ -10902,6 +10902,12 @@ function isPlayStopAckMessage(value) {
|
|
|
10902
10902
|
const msg = value;
|
|
10903
10903
|
return msg.type === "play_stop_ack" && typeof msg.requestId === "string";
|
|
10904
10904
|
}
|
|
10905
|
+
function isPlayPoseAckMessage(value) {
|
|
10906
|
+
if (!value || typeof value !== "object")
|
|
10907
|
+
return false;
|
|
10908
|
+
const msg = value;
|
|
10909
|
+
return msg.type === "play_pose_ack" && typeof msg.requestId === "string";
|
|
10910
|
+
}
|
|
10905
10911
|
function isRecordingControlAckMessage(value) {
|
|
10906
10912
|
if (!value || typeof value !== "object")
|
|
10907
10913
|
return false;
|
|
@@ -10962,7 +10968,7 @@ function isParentMessage(value) {
|
|
|
10962
10968
|
if (!value || typeof value !== "object")
|
|
10963
10969
|
return false;
|
|
10964
10970
|
const msg = value;
|
|
10965
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
10971
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
10966
10972
|
}
|
|
10967
10973
|
function isSessionScopedParentMessage(value) {
|
|
10968
10974
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -10984,6 +10990,7 @@ var pendingRecordingAcks = /* @__PURE__ */ new Map();
|
|
|
10984
10990
|
var pendingPlayAcks = /* @__PURE__ */ new Map();
|
|
10985
10991
|
var pendingPlayStatusAcks = /* @__PURE__ */ new Map();
|
|
10986
10992
|
var pendingPlayStopAcks = /* @__PURE__ */ new Map();
|
|
10993
|
+
var pendingPlayPoseAcks = /* @__PURE__ */ new Map();
|
|
10987
10994
|
var pendingMixAcks = /* @__PURE__ */ new Map();
|
|
10988
10995
|
var pendingSttAcks = /* @__PURE__ */ new Map();
|
|
10989
10996
|
function handleRecordingControlAck(message) {
|
|
@@ -11038,6 +11045,19 @@ function handlePlayStopAck(message) {
|
|
|
11038
11045
|
requestId: message.requestId
|
|
11039
11046
|
});
|
|
11040
11047
|
}
|
|
11048
|
+
function handlePlayPoseAck(message) {
|
|
11049
|
+
const pending = pendingPlayPoseAcks.get(message.requestId);
|
|
11050
|
+
if (!pending)
|
|
11051
|
+
return;
|
|
11052
|
+
clearTimeout(pending.timer);
|
|
11053
|
+
pendingPlayPoseAcks.delete(message.requestId);
|
|
11054
|
+
pending.resolve({
|
|
11055
|
+
ok: message.ok,
|
|
11056
|
+
playId: message.playId,
|
|
11057
|
+
reason: message.reason,
|
|
11058
|
+
requestId: message.requestId
|
|
11059
|
+
});
|
|
11060
|
+
}
|
|
11041
11061
|
function handleMixControlAck(message) {
|
|
11042
11062
|
const pending = pendingMixAcks.get(message.requestId);
|
|
11043
11063
|
if (!pending)
|
|
@@ -11123,7 +11143,7 @@ function sendParentMessage(message) {
|
|
|
11123
11143
|
process.send?.(message);
|
|
11124
11144
|
return;
|
|
11125
11145
|
}
|
|
11126
|
-
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop") {
|
|
11146
|
+
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop" || msgType === "play_pose") {
|
|
11127
11147
|
process.send?.(message);
|
|
11128
11148
|
return;
|
|
11129
11149
|
}
|
|
@@ -11309,6 +11329,10 @@ function defineAgent(handlers) {
|
|
|
11309
11329
|
handlePlayStopAck(message);
|
|
11310
11330
|
return;
|
|
11311
11331
|
}
|
|
11332
|
+
if (isPlayPoseAckMessage(message)) {
|
|
11333
|
+
handlePlayPoseAck(message);
|
|
11334
|
+
return;
|
|
11335
|
+
}
|
|
11312
11336
|
if (isMixControlAckMessage(message)) {
|
|
11313
11337
|
handleMixControlAck(message);
|
|
11314
11338
|
return;
|
|
@@ -151,6 +151,12 @@ function isPlayStopAckMessage(value) {
|
|
|
151
151
|
const msg = value;
|
|
152
152
|
return msg.type === "play_stop_ack" && typeof msg.requestId === "string";
|
|
153
153
|
}
|
|
154
|
+
function isPlayPoseAckMessage(value) {
|
|
155
|
+
if (!value || typeof value !== "object")
|
|
156
|
+
return false;
|
|
157
|
+
const msg = value;
|
|
158
|
+
return msg.type === "play_pose_ack" && typeof msg.requestId === "string";
|
|
159
|
+
}
|
|
154
160
|
function isRecordingControlAckMessage(value) {
|
|
155
161
|
if (!value || typeof value !== "object")
|
|
156
162
|
return false;
|
|
@@ -211,7 +217,7 @@ function isParentMessage(value) {
|
|
|
211
217
|
if (!value || typeof value !== "object")
|
|
212
218
|
return false;
|
|
213
219
|
const msg = value;
|
|
214
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
220
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
215
221
|
}
|
|
216
222
|
function isSessionScopedParentMessage(value) {
|
|
217
223
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -233,6 +239,7 @@ var pendingRecordingAcks = /* @__PURE__ */ new Map();
|
|
|
233
239
|
var pendingPlayAcks = /* @__PURE__ */ new Map();
|
|
234
240
|
var pendingPlayStatusAcks = /* @__PURE__ */ new Map();
|
|
235
241
|
var pendingPlayStopAcks = /* @__PURE__ */ new Map();
|
|
242
|
+
var pendingPlayPoseAcks = /* @__PURE__ */ new Map();
|
|
236
243
|
var MIX_CONTROL_ACK_TIMEOUT_MS = 5e3;
|
|
237
244
|
var pendingMixAcks = /* @__PURE__ */ new Map();
|
|
238
245
|
var pendingSttAcks = /* @__PURE__ */ new Map();
|
|
@@ -288,6 +295,19 @@ function handlePlayStopAck(message) {
|
|
|
288
295
|
requestId: message.requestId
|
|
289
296
|
});
|
|
290
297
|
}
|
|
298
|
+
function handlePlayPoseAck(message) {
|
|
299
|
+
const pending = pendingPlayPoseAcks.get(message.requestId);
|
|
300
|
+
if (!pending)
|
|
301
|
+
return;
|
|
302
|
+
clearTimeout(pending.timer);
|
|
303
|
+
pendingPlayPoseAcks.delete(message.requestId);
|
|
304
|
+
pending.resolve({
|
|
305
|
+
ok: message.ok,
|
|
306
|
+
playId: message.playId,
|
|
307
|
+
reason: message.reason,
|
|
308
|
+
requestId: message.requestId
|
|
309
|
+
});
|
|
310
|
+
}
|
|
291
311
|
function handleMixControlAck(message) {
|
|
292
312
|
const pending = pendingMixAcks.get(message.requestId);
|
|
293
313
|
if (!pending)
|
|
@@ -388,7 +408,7 @@ function sendParentMessage(message) {
|
|
|
388
408
|
process.send?.(message);
|
|
389
409
|
return;
|
|
390
410
|
}
|
|
391
|
-
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop") {
|
|
411
|
+
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop" || msgType === "play_pose") {
|
|
392
412
|
process.send?.(message);
|
|
393
413
|
return;
|
|
394
414
|
}
|
|
@@ -574,6 +594,10 @@ function defineAgent(handlers) {
|
|
|
574
594
|
handlePlayStopAck(message);
|
|
575
595
|
return;
|
|
576
596
|
}
|
|
597
|
+
if (isPlayPoseAckMessage(message)) {
|
|
598
|
+
handlePlayPoseAck(message);
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
577
601
|
if (isMixControlAckMessage(message)) {
|
|
578
602
|
handleMixControlAck(message);
|
|
579
603
|
return;
|
|
@@ -148,6 +148,12 @@ function isPlayStopAckMessage(value) {
|
|
|
148
148
|
const msg = value;
|
|
149
149
|
return msg.type === "play_stop_ack" && typeof msg.requestId === "string";
|
|
150
150
|
}
|
|
151
|
+
function isPlayPoseAckMessage(value) {
|
|
152
|
+
if (!value || typeof value !== "object")
|
|
153
|
+
return false;
|
|
154
|
+
const msg = value;
|
|
155
|
+
return msg.type === "play_pose_ack" && typeof msg.requestId === "string";
|
|
156
|
+
}
|
|
151
157
|
function isRecordingControlAckMessage(value) {
|
|
152
158
|
if (!value || typeof value !== "object")
|
|
153
159
|
return false;
|
|
@@ -208,7 +214,7 @@ function isParentMessage(value) {
|
|
|
208
214
|
if (!value || typeof value !== "object")
|
|
209
215
|
return false;
|
|
210
216
|
const msg = value;
|
|
211
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
217
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "recording_control_ack" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "webhook";
|
|
212
218
|
}
|
|
213
219
|
function isSessionScopedParentMessage(value) {
|
|
214
220
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -231,6 +237,7 @@ var pendingRecordingAcks = /* @__PURE__ */ new Map();
|
|
|
231
237
|
var pendingPlayAcks = /* @__PURE__ */ new Map();
|
|
232
238
|
var pendingPlayStatusAcks = /* @__PURE__ */ new Map();
|
|
233
239
|
var pendingPlayStopAcks = /* @__PURE__ */ new Map();
|
|
240
|
+
var pendingPlayPoseAcks = /* @__PURE__ */ new Map();
|
|
234
241
|
var pendingMixAcks = /* @__PURE__ */ new Map();
|
|
235
242
|
var pendingSttAcks = /* @__PURE__ */ new Map();
|
|
236
243
|
function handleRecordingControlAck(message) {
|
|
@@ -285,6 +292,19 @@ function handlePlayStopAck(message) {
|
|
|
285
292
|
requestId: message.requestId
|
|
286
293
|
});
|
|
287
294
|
}
|
|
295
|
+
function handlePlayPoseAck(message) {
|
|
296
|
+
const pending = pendingPlayPoseAcks.get(message.requestId);
|
|
297
|
+
if (!pending)
|
|
298
|
+
return;
|
|
299
|
+
clearTimeout(pending.timer);
|
|
300
|
+
pendingPlayPoseAcks.delete(message.requestId);
|
|
301
|
+
pending.resolve({
|
|
302
|
+
ok: message.ok,
|
|
303
|
+
playId: message.playId,
|
|
304
|
+
reason: message.reason,
|
|
305
|
+
requestId: message.requestId
|
|
306
|
+
});
|
|
307
|
+
}
|
|
288
308
|
function handleMixControlAck(message) {
|
|
289
309
|
const pending = pendingMixAcks.get(message.requestId);
|
|
290
310
|
if (!pending)
|
|
@@ -373,7 +393,7 @@ function sendParentMessage(message) {
|
|
|
373
393
|
process.send?.(message);
|
|
374
394
|
return;
|
|
375
395
|
}
|
|
376
|
-
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop") {
|
|
396
|
+
if (msgType === "play" || msgType === "play_status" || msgType === "play_stop" || msgType === "play_pose") {
|
|
377
397
|
process.send?.(message);
|
|
378
398
|
return;
|
|
379
399
|
}
|
|
@@ -559,6 +579,10 @@ function defineAgent(handlers) {
|
|
|
559
579
|
handlePlayStopAck(message);
|
|
560
580
|
return;
|
|
561
581
|
}
|
|
582
|
+
if (isPlayPoseAckMessage(message)) {
|
|
583
|
+
handlePlayPoseAck(message);
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
562
586
|
if (isMixControlAckMessage(message)) {
|
|
563
587
|
handleMixControlAck(message);
|
|
564
588
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,CAAC;AAE7C,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,mFAAmF;IACnF,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,uBAAuB,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,CAAC;AAE7C,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,mFAAmF;IACnF,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,uBAAuB,EAmKpD,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,eAAe,CAEnE;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAMnE;AAED,wBAAgB,yBAAyB,IAAI,uBAAuB,EAAE,CAErE"}
|
|
@@ -77,7 +77,7 @@ export const AGENT_TEMPLATES = [
|
|
|
77
77
|
entry: "spatial-showcase/agent.ts",
|
|
78
78
|
kind: "product",
|
|
79
79
|
seedOnCreate: true,
|
|
80
|
-
description: "Spatial audio showcase — orbiting TTS, positional clip soundboard, proximity room via DataChannel commands.",
|
|
80
|
+
description: "Spatial audio showcase — orbiting sine + TTS, positional clip soundboard, proximity room via DataChannel commands.",
|
|
81
81
|
sourceFiles: [
|
|
82
82
|
"spatial-showcase/agent.ts",
|
|
83
83
|
"spatial-showcase/protocol.ts",
|
|
@@ -85,6 +85,7 @@ export const AGENT_TEMPLATES = [
|
|
|
85
85
|
"spatial-showcase/room.ts",
|
|
86
86
|
"spatial-showcase/orbit.ts",
|
|
87
87
|
"spatial-showcase/orbit-session.ts",
|
|
88
|
+
"spatial-showcase/sine.ts",
|
|
88
89
|
],
|
|
89
90
|
},
|
|
90
91
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,eAAe,GAAuC;IACjE;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,8EAA8E;QAChF,WAAW,EAAE,CAAC,SAAS,CAAC;KACzB;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,qEAAqE;QACvE,WAAW,EAAE,CAAC,YAAY,CAAC;KAC5B;IACD;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,uFAAuF;QACzF,WAAW,EAAE,CAAC,UAAU,CAAC;KAC1B;IACD;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,6EAA6E;QAC/E,WAAW,EAAE;YACX,cAAc;YACd,uBAAuB;YACvB,2BAA2B;YAC3B,kBAAkB;YAClB,oBAAoB;SACrB;QACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACxC;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,yBAAyB;QAChC,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,0FAA0F;QAC5F,WAAW,EAAE;YACX,yBAAyB;YACzB,gCAAgC;YAChC,4BAA4B;YAC5B,2BAA2B;YAC3B,2BAA2B;YAC3B,6BAA6B;SAC9B;KACF;IACD;QACE,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,mFAAmF;QACrF,WAAW,EAAE;YACX,4BAA4B;YAC5B,mCAAmC;SACpC;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,yBAAyB;QAChC,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,gFAAgF;QAClF,WAAW,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;KACpE;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,KAAK,EAAE,2BAA2B;QAClC,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,eAAe,GAAuC;IACjE;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,8EAA8E;QAChF,WAAW,EAAE,CAAC,SAAS,CAAC;KACzB;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,WAAW,EACT,qEAAqE;QACvE,WAAW,EAA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