@yeaft/webchat-agent 1.0.471 → 1.0.473
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 +12 -1
- package/index.js +17 -8
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +40 -26
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +2 -2
- package/local-runtime/web/style.bundle.css +1 -1
- package/local-runtime/web/style.bundle.css.gz +0 -0
- package/package.json +1 -1
- package/yeaft/session.js +4 -0
- package/yeaft/web-bridge.js +2 -0
- package/yeaft/work-center/feature.js +10 -0
|
Binary file
|
package/package.json
CHANGED
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) {
|
package/yeaft/web-bridge.js
CHANGED
|
@@ -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
|
+
}
|