@yeaft/webchat-agent 0.1.892 → 0.1.893

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": "0.1.892",
3
+ "version": "0.1.893",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/yeaft/session.js CHANGED
@@ -323,11 +323,15 @@ export async function loadSession(options = {}) {
323
323
  } catch (err) {
324
324
  console.warn(`[Yeaft] topUpDefaultVps failed: ${err?.message || err}`);
325
325
  }
326
- try {
327
- ensureDefaultSessionIfEmpty(yeaftDir, { memoryRoot: join(yeaftDir, 'memory') });
328
- } catch (err) {
329
- console.warn(`[Yeaft] ensureDefaultSessionIfEmpty failed: ${err?.message || err}`);
330
- }
326
+ // fix-yeaft-session-server-persistence: stop auto-seeding a
327
+ // `grp_default` per agent. Previously every agent that booted with
328
+ // zero sessions would manufacture an empty default group, which on
329
+ // the unified sidebar shows up as a phantom row distinct from the
330
+ // user's real session — and on agent switch it stole the active-
331
+ // session slot. With server-side persistence the user's actual
332
+ // yeaft sessions are now hydrated from the DB; if they have none,
333
+ // the sidebar shows the empty state + "create session" CTA, which
334
+ // is the explicit behaviour the user asked for.
331
335
 
332
336
  // task-fix-memory-load: backfill summary.md for VPs / groups created
333
337
  // before the create-time seed was added. Without this, an existing
@@ -2223,15 +2223,13 @@ export async function handleYeaftSessionSend(msg) {
2223
2223
  const dir = join(sessionRoot, sessionId);
2224
2224
  if (existsSync(dir) && loadSessionMeta(dir)) {
2225
2225
  sessionHandle = openSession(sessionRoot, sessionId);
2226
- } else if (sessionId === 'grp_default') {
2227
- try {
2228
- const seeded = seedDefaultSession(groupYeaftDir, { memoryRoot: join(groupYeaftDir, 'memory') });
2229
- sessionHandle = seeded.group;
2230
- } catch (seedErr) {
2231
- seedFailed = true;
2232
- console.warn('[Yeaft] yeaft_group_chat: seedDefaultSession failed', seedErr?.message || seedErr);
2233
- }
2234
2226
  } else {
2227
+ // fix-yeaft-session-server-persistence: the `grp_default` on-the-
2228
+ // fly seed used to manufacture a missing session here. That
2229
+ // hid the "session not found" error and re-created the phantom
2230
+ // default-group row across agents. Now we surface the not-found
2231
+ // case so the web can show an "agent offline / session missing"
2232
+ // hint instead of silently creating a different session.
2235
2233
  console.warn('[Yeaft] yeaft_group_chat: sessionId %s not found', sessionId);
2236
2234
  }
2237
2235
  } catch (err) {