@yeaft/webchat-agent 1.0.469 → 1.0.471
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/message-router.js +10 -6
- package/local-runtime/server/handlers/agent-sync.js +2 -2
- package/local-runtime/server/ws-utils.js +1 -1
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +2 -2
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +1 -1
- package/package.json +1 -1
- package/yeaft/config.js +2 -2
- package/yeaft/dream/session-wiring.js +1 -1
- package/yeaft/web-bridge.js +13 -0
|
Binary file
|
package/package.json
CHANGED
package/yeaft/config.js
CHANGED
|
@@ -377,7 +377,7 @@ function loadLegacyConfig(dir, overrides) {
|
|
|
377
377
|
// task-318: legacy path never had the `yeaft` section — defaults.
|
|
378
378
|
yeaft: normaliseYeaftSection(null),
|
|
379
379
|
telemetry: normaliseTelemetrySection(null),
|
|
380
|
-
dream: { enabled:
|
|
380
|
+
dream: { enabled: false },
|
|
381
381
|
browserRuntime: normaliseBrowserRuntimeSection(null),
|
|
382
382
|
plugins: {},
|
|
383
383
|
providers: null,
|
|
@@ -535,7 +535,7 @@ export function loadConfig(overrides = {}) {
|
|
|
535
535
|
// don't pollute the flat config namespace used by chat code.
|
|
536
536
|
yeaft: normaliseYeaftSection(jsonConfig.yeaft),
|
|
537
537
|
telemetry: normaliseTelemetrySection(jsonConfig.telemetry),
|
|
538
|
-
dream: { enabled: jsonConfig.dream?.enabled
|
|
538
|
+
dream: { enabled: jsonConfig.dream?.enabled === true },
|
|
539
539
|
browserRuntime: normaliseBrowserRuntimeSection(jsonConfig.browserRuntime),
|
|
540
540
|
|
|
541
541
|
// Agent-level tools / skills / MCP server allowlists. Missing fields mean
|
|
@@ -668,7 +668,7 @@ export function createV2DreamScheduler(session) {
|
|
|
668
668
|
keepAlive: !!session?.config?.serverMode,
|
|
669
669
|
logger: session.config?.debug ? console : undefined,
|
|
670
670
|
});
|
|
671
|
-
let enabled = session?.config?.dream?.enabled
|
|
671
|
+
let enabled = session?.config?.dream?.enabled === true;
|
|
672
672
|
if (enabled) v2.start();
|
|
673
673
|
|
|
674
674
|
// task-710: wire `noteUserMessage` to a real per-session message
|
package/yeaft/web-bridge.js
CHANGED
|
@@ -175,6 +175,19 @@ function applyLiveLanguage(language) {
|
|
|
175
175
|
try { session?.engine?.setLanguage?.(language); } catch { /* best-effort */ }
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
/**
|
|
179
|
+
* Apply an Agent-level Dream toggle to an already loaded runtime.
|
|
180
|
+
* This must never bootstrap a Session: config.json is the authoritative commit,
|
|
181
|
+
* while the live scheduler update is only a best-effort cache refresh.
|
|
182
|
+
*/
|
|
183
|
+
export function setLiveDreamEnabled(enabled) {
|
|
184
|
+
const next = enabled !== false;
|
|
185
|
+
if (session?.config && typeof session.config === 'object') {
|
|
186
|
+
session.config.dream = { ...(session.config.dream || {}), enabled: next };
|
|
187
|
+
}
|
|
188
|
+
session?.dreamScheduler?.setEnabled?.(next);
|
|
189
|
+
}
|
|
190
|
+
|
|
178
191
|
function modelRefIdentity(value) {
|
|
179
192
|
const text = String(value || '');
|
|
180
193
|
const slash = text.indexOf('/');
|