@yeaft/webchat-agent 1.0.82 → 1.0.83

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.82",
3
+ "version": "1.0.83",
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",
@@ -1190,6 +1190,12 @@ export function __testGroupHistory(sessionId) {
1190
1190
  return getOrCreateSessionHistory(sessionId);
1191
1191
  }
1192
1192
 
1193
+ export function __testResolveVpEffectiveConfig(sessionId) {
1194
+ if (!session) return null;
1195
+ const sessionConfigRoot = ctx.CONFIG?.yeaftDir || session.yeaftDir;
1196
+ return resolveSessionConfig(session.config, loadSessionConfig(sessionConfigRoot, sessionId));
1197
+ }
1198
+
1193
1199
  /**
1194
1200
  * Test-only: install a minimal `session` so `hydrateGroupHistory` can
1195
1201
  * read from a real `ConversationStore`. Pass `null` to clear.
@@ -1293,11 +1299,13 @@ function getOrCreateVpEngine(sessionId, vpId, threadId = 'main') {
1293
1299
  let eng = vpEngines.get(key);
1294
1300
  if (eng) return eng;
1295
1301
  if (!session) throw new Error('getOrCreateVpEngine: session not loaded');
1296
- // Per-group config overlay (v1: model only). Falls back to the
1297
- // session's user-level config when no override is set. The resolver
1298
- // never mutates session.config it returns a new object.
1299
- const yeaftDir = ctx.CONFIG?.yeaftDir || session.yeaftDir;
1300
- const groupCfg = loadSessionConfig(yeaftDir, sessionId);
1302
+ // Per-session config overlay (v1: model only). Falls back to the
1303
+ // session's user-level config when no override is set. Prefer the agent-local
1304
+ // config root: sessionConfigPath() resolves registered workDir-backed
1305
+ // sessions from there, while still allowing a later agent-local session in
1306
+ // the same bridge runtime to read its own override after a workDir-first boot.
1307
+ const sessionConfigRoot = ctx.CONFIG?.yeaftDir || session.yeaftDir;
1308
+ const groupCfg = loadSessionConfig(sessionConfigRoot, sessionId);
1301
1309
  const effectiveConfig = resolveSessionConfig(session.config, groupCfg);
1302
1310
  eng = new Engine({
1303
1311
  adapter: session.adapter,