@yeaft/webchat-agent 0.0.92 → 0.0.93

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/connection.js CHANGED
@@ -46,7 +46,15 @@ async function sendToServer(msg) {
46
46
  ctx.messageBuffer.push(msg);
47
47
  console.log(`[WS] Buffered message: ${msg.type} (queue: ${ctx.messageBuffer.length})`);
48
48
  } else {
49
- console.warn(`[WS] Buffer full (${ctx.messageBufferMaxSize}), dropping: ${msg.type}`);
49
+ // Buffer full: drop oldest non-status messages to make room
50
+ const dropIdx = ctx.messageBuffer.findIndex(m => m.type !== 'crew_status' && m.type !== 'turn_completed');
51
+ if (dropIdx >= 0) {
52
+ ctx.messageBuffer.splice(dropIdx, 1);
53
+ ctx.messageBuffer.push(msg);
54
+ console.warn(`[WS] Buffer full, dropped oldest to make room for: ${msg.type}`);
55
+ } else {
56
+ console.warn(`[WS] Buffer full (${ctx.messageBufferMaxSize}), dropping: ${msg.type}`);
57
+ }
50
58
  }
51
59
  } else {
52
60
  console.warn(`[WS] Cannot send message, WebSocket not open: ${msg.type}`);
package/crew.js CHANGED
@@ -724,7 +724,7 @@ summary: <简要说明要传递什么>
724
724
  \`\`\`
725
725
 
726
726
  可用的路由目标:
727
- ${otherRoles.map(r => `- ${r.name}: ${r.displayName}`).join('\n')}
727
+ ${otherRoles.map(r => `- ${r.name}: ${r.icon} ${r.displayName} — ${r.description}`).join('\n')}
728
728
  - human: 人工(只在决策者也无法决定时使用)
729
729
 
730
730
  注意:
@@ -733,7 +733,8 @@ ${otherRoles.map(r => `- ${r.name}: ${r.displayName}`).join('\n')}
733
733
  - 如果你是决策者且遇到需要人类判断的问题,才 @ human
734
734
  - 每次回复最多只能有一个 ROUTE 块
735
735
  - ROUTE 块必须在回复的最末尾
736
- - 当你的任务已完成且不需要其他角色继续时,ROUTE 回决策者 "${session.decisionMaker}" 做总结`;
736
+ - 当你的任务已完成且不需要其他角色继续时,ROUTE 回决策者 "${session.decisionMaker}" 做总结
737
+ - 在正文中可用 @角色name 提及某个角色(如 @developer),但这不会触发路由,仅供阅读`;
737
738
  }
738
739
 
739
740
  // 决策者额外 prompt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",