@yeaft/webchat-agent 1.0.161 → 1.0.163

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": "@yeaft/webchat-agent",
3
- "version": "1.0.161",
3
+ "version": "1.0.163",
4
4
  "description": "Remote worker agent for Yeaft Web Code Agent — connects the native Yeaft engine, CLI providers, and workbench tools",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -111,26 +111,29 @@ export function selectRespondingVps(input) {
111
111
  };
112
112
  }
113
113
 
114
- // Explicit @-mentions
114
+ // Explicit @-mentions. Unknown tokens may be ordinary user text rather
115
+ // than VP routing, so ignore them. If none resolve to a roster member,
116
+ // continue to the normal default-VP fallback instead of rejecting the turn.
115
117
  if (mentions.length > 0) {
116
118
  const dispatched = [];
117
119
  const errors = [];
120
+ let hasRosterMention = false;
118
121
  for (const vpId of mentions) {
119
122
  const canonicalVpId = resolveMemberId(meta, vpId);
120
- if (!canonicalVpId) {
121
- errors.push({ vpId, error: 'not_in_roster' });
122
- continue;
123
- }
123
+ if (!canonicalVpId) continue;
124
+ hasRosterMention = true;
124
125
  if (taskMembers && !taskMembers.includes(canonicalVpId)) {
125
126
  errors.push({ vpId, error: 'not_in_task_members' });
126
127
  continue;
127
128
  }
128
129
  if (!dispatched.includes(canonicalVpId)) dispatched.push(canonicalVpId);
129
130
  }
130
- return { dispatched, fallback: null, errors, reason: 'mention' };
131
+ if (hasRosterMention) {
132
+ return { dispatched, fallback: null, errors, reason: 'mention' };
133
+ }
131
134
  }
132
135
 
133
- // No @-mention → fallback to defaultVpId (architecture G2)
136
+ // No valid @-mention → fallback to defaultVpId (architecture G2)
134
137
  const fallback = resolveFallbackVp(meta);
135
138
  if (!fallback) {
136
139
  return {