@agentprojectcontext/apx 1.53.0 → 1.53.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentprojectcontext/apx",
3
- "version": "1.53.0",
3
+ "version": "1.53.1",
4
4
  "description": "APX — unified CLI + daemon for the Agent Project Context (APC) standard.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,6 +24,7 @@ import {
24
24
  } from "../../desktop-ws.js";
25
25
  import { runSuperAgent, isSuperAgentEnabled } from "#core/agent/super-agent.js";
26
26
  import { appendGlobalMessage } from "#core/stores/messages.js";
27
+ import { stripEmotionTags } from "#core/voice/emotions.js";
27
28
  import { CHANNELS } from "#core/constants/channels.js";
28
29
  import { tryResolveSkillCommand } from "#core/agent/skills/trigger.js";
29
30
 
@@ -120,7 +121,9 @@ async function _handleMessage({ ws, text, previousMessages }, { projects, config
120
121
  if (!seg || seg === lastSegText) return;
121
122
  lastSegText = seg;
122
123
  emittedSegments.push(seg);
123
- _send(ws, { type: "segment", seq: ++segSeq, text: seg });
124
+ // `text` is what the bubble shows (no [tags]); `speak` keeps the inline
125
+ // emotion tags so the renderer's per-segment TTS can use them.
126
+ _send(ws, { type: "segment", seq: ++segSeq, text: stripEmotionTags(seg), speak: seg });
124
127
  };
125
128
 
126
129
  try {
@@ -178,7 +181,9 @@ async function _handleMessage({ ws, text, previousMessages }, { projects, config
178
181
  // the closing segment (deduped against the last one).
179
182
  emitSegment((result.text || "").trim() || liveBuf.trim());
180
183
 
181
- const finalText = emittedSegments.join("\n\n");
184
+ // Emotion tags are a TTS-only signal — strip them from the text we display,
185
+ // persist, and feed back as conversation context.
186
+ const finalText = stripEmotionTags(emittedSegments.join("\n\n"));
182
187
  log(`desktop: super-agent turn done in ${Date.now() - t0}ms segments=${segSeq} text_len=${finalText.length} tools=${toolsExecuted.length}`);
183
188
 
184
189
  // Turn end. `segments` lets the renderer know how many bubbles to expect.
@@ -1187,8 +1187,10 @@
1187
1187
  appendTurn(m, true);
1188
1188
  queueRegisterSegment(m);
1189
1189
  // Synthesize THIS segment; tts-ready(seg=id) attaches its audio + queues
1190
- // it for gapless sequential playback.
1191
- window.apx?.requestTts?.(text, id);
1190
+ // it for gapless sequential playback. `speak` carries the inline emotion
1191
+ // tags (the bubble `text` has them stripped) so a tag-aware engine like
1192
+ // QVox can act on them; falls back to the visible text.
1193
+ window.apx?.requestTts?.(msg.speak || text, id);
1192
1194
  requestWindowResize();
1193
1195
  scrollConvToBottom();
1194
1196
  break;