@yeaft/webchat-agent 0.1.933 → 0.1.934

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.933",
3
+ "version": "0.1.934",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -29,7 +29,10 @@ export function truncateDreamText(value, limit = DREAM_SNAPSHOT_TEXT_LIMIT) {
29
29
  */
30
30
  export async function buildDreamOutputSnapshot(sessionLike, sessionId) {
31
31
  if (!sessionId || !sessionLike?.yeaftDir) return null;
32
- const scope = `group/${sessionId}`;
32
+ const scope = `sessions/${sessionId}`;
33
+ // Disk compatibility: Dream currently writes session summaries through
34
+ // the historical kind:'group' store path. The snapshot's public scope label
35
+ // is still sessions/<id>.
33
36
  const memoryScope = { kind: 'group', id: sessionId };
34
37
  const root = join(sessionLike.yeaftDir, 'memory');
35
38
  const [memoryRaw, summaryRaw, state] = await Promise.all([
package/yeaft/engine.js CHANGED
@@ -260,7 +260,9 @@ export function buildResidentEntries(args) {
260
260
  const out = [];
261
261
  if (summaries.user) out.push({ scope: 'user', summary: summaries.user });
262
262
  if (args.sessionId && summaries.group) {
263
- out.push({ scope: `group/${args.sessionId}`, summary: summaries.group });
263
+ // Presentation label: product-facing prompt scopes are sessions, even
264
+ // though the current disk compatibility path still reads kind:'group'.
265
+ out.push({ scope: `sessions/${args.sessionId}`, summary: summaries.group });
264
266
  }
265
267
  // VP per-session isolation (2026-06-09): the VP summary scope MUST be
266
268
  // session-qualified. The legacy bare `vp/<id>` scope was a structural
@@ -273,7 +275,7 @@ export function buildResidentEntries(args) {
273
275
  // makes the per-session boundary explicit and matches the on-disk
274
276
  // layout 1:1.
275
277
  if (args.sessionId && args.ownVpId && summaries.vp && !isVpSeedBackfillStub(summaries.vp)) {
276
- out.push({ scope: `group/${args.sessionId}/vp/${args.ownVpId}`, summary: summaries.vp });
278
+ out.push({ scope: `sessions/${args.sessionId}/vp/${args.ownVpId}`, summary: summaries.vp });
277
279
  }
278
280
  return out;
279
281
  }
@@ -1478,12 +1480,12 @@ export class Engine {
1478
1480
 
1479
1481
  // Diagnostic payload for the Dream debug panel. The full AMS Resident
1480
1482
  // layer can include user and per-VP summaries, but the browser-facing
1481
- // Dream prompt-load view only needs to prove the active group Dream
1483
+ // Dream prompt-load view only needs to prove the active session Dream
1482
1484
  // summary entered `system_prompt.memory`. Keep the payload scoped to the
1483
- // exact group resident to avoid leaking unrelated resident summaries into
1485
+ // exact session resident to avoid leaking unrelated resident summaries into
1484
1486
  // frontend state. The full system prompt remains visible in the existing
1485
1487
  // debug-only system-prompt panel.
1486
- const activeGroupDreamScope = sessionId ? `group/${sessionId}` : null;
1488
+ const activeGroupDreamScope = sessionId ? `sessions/${sessionId}` : null;
1487
1489
  const dreamResidentLoaded = amsContext && Array.isArray(amsContext.residentEntries)
1488
1490
  ? amsContext.residentEntries
1489
1491
  .filter(e => e && e.scope === activeGroupDreamScope && e.summary)