@yeaft/webchat-agent 1.0.468 → 1.0.470

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.468",
3
+ "version": "1.0.470",
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",
@@ -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('/');