@yeaft/webchat-agent 1.0.470 → 1.0.472

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.
Binary file
@@ -16,6 +16,6 @@
16
16
  </head>
17
17
  <body>
18
18
  <div id="app"></div>
19
- <script type="module" src="app.bundle.js?v=57798f71"></script>
19
+ <script type="module" src="app.bundle.js?v=35fbd552"></script>
20
20
  </body>
21
21
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "1.0.470",
3
+ "version": "1.0.472",
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",
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: true },
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 !== false },
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 !== false;
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/session.js CHANGED
@@ -50,6 +50,7 @@ import { seedDefaultVps } from './vp/seed-defaults.js';
50
50
  import { topUpDefaultVps } from './vp/seed-topup.js';
51
51
  import { archiveLegacyScopes } from './memory/seed-backfill.js';
52
52
  import { createV2DreamScheduler, bootInitEmptyGroups, bootCatchUpStaleDream } from './dream/session-wiring.js';
53
+ import { isWorkCenterEnabled } from './work-center/feature.js';
53
54
  import { openSegmentIndex } from './memory/index-db.js';
54
55
  import { syncAll as syncSegmentIndex } from './memory/segment-sync.js';
55
56
  import { backfillCanonicalContent } from './memory/content-backfill.js';
@@ -69,6 +70,7 @@ import { existsSync as existsSyncSafe, readFileSync as readFileSyncSafe, mkdirSy
69
70
  * @property {object[]} [extraTools] — Additional ToolDef objects to register
70
71
  * @property {object} [configOverrides] — Additional config overrides
71
72
  * @property {Promise<Array>} [managedCliReady] — optional entrypoint-owned CLI setup
73
+ * @property {boolean} [workCenterEnabled] — override Work Center producer-tool registration
72
74
  */
73
75
 
74
76
  /**
@@ -138,6 +140,7 @@ export async function loadSession(options = {}) {
138
140
  serverMode = false,
139
141
  dreamEnabled,
140
142
  managedCliReady = null,
143
+ workCenterEnabled = isWorkCenterEnabled(),
141
144
  } = options;
142
145
 
143
146
  // ─── 1. Determine config + store directories ─────────────
@@ -408,6 +411,7 @@ export async function loadSession(options = {}) {
408
411
  // ─── 8. Build tool registry ────────────────────────────
409
412
  const taskManager = new TaskManager({ yeaftDir });
410
413
  const toolRegistry = createFullRegistry();
414
+ if (!workCenterEnabled) toolRegistry.unregister('CreateWorkItem');
411
415
 
412
416
  // Register any extra tools from caller
413
417
  for (const tool of extraTools) {
@@ -5125,6 +5125,7 @@ export async function ensureSessionLoaded(opts = {}) {
5125
5125
  skipSkills: true,
5126
5126
  serverMode: true,
5127
5127
  managedCliReady: ctx.managedCliReady,
5128
+ workCenterEnabled: ctx.CONFIG?.workCenterEnabled === true,
5128
5129
  });
5129
5130
  claimRuntimeOwnership(session);
5130
5131
 
@@ -7660,6 +7661,7 @@ export async function resetYeaftSession() {
7660
7661
  skipSkills: true,
7661
7662
  serverMode: true,
7662
7663
  managedCliReady: ctx.managedCliReady,
7664
+ workCenterEnabled: ctx.CONFIG?.workCenterEnabled === true,
7663
7665
  });
7664
7666
  claimRuntimeOwnership(session);
7665
7667
  installYeaftRuntimeBridge(session);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Work Center is opt-in. Only the explicit string "true" enables the feature;
3
+ * missing, malformed, and legacy configurations remain disabled.
4
+ *
5
+ * @param {NodeJS.ProcessEnv|Record<string, string|undefined>} [env]
6
+ * @returns {boolean}
7
+ */
8
+ export function isWorkCenterEnabled(env = process.env) {
9
+ return env?.YEAFT_WORK_CENTER_ENABLED === 'true';
10
+ }