@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
|
@@ -779,7 +779,18 @@ export async function handleMessage(msg) {
|
|
|
779
779
|
break;
|
|
780
780
|
|
|
781
781
|
case 'work_center_request':
|
|
782
|
-
|
|
782
|
+
if (ctx.CONFIG?.workCenterEnabled === true) {
|
|
783
|
+
await handleWorkCenterRequest(msg);
|
|
784
|
+
} else {
|
|
785
|
+
await sendToServer({
|
|
786
|
+
type: 'work_center_response',
|
|
787
|
+
requestId: typeof msg.requestId === 'string' ? msg.requestId : null,
|
|
788
|
+
op: typeof msg.op === 'string' ? msg.op : '',
|
|
789
|
+
ok: false,
|
|
790
|
+
error: 'Work Center is disabled',
|
|
791
|
+
_requestUserId: msg._requestUserId || null,
|
|
792
|
+
});
|
|
793
|
+
}
|
|
783
794
|
break;
|
|
784
795
|
|
|
785
796
|
// Expert roles definition (for ExpertPanel detail view)
|
package/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
} from './upgrade-command.js';
|
|
26
26
|
import { loadConfig as loadYeaftConfig } from './yeaft/config.js';
|
|
27
27
|
import { initYeaftDir } from './yeaft/init.js';
|
|
28
|
+
import { isWorkCenterEnabled } from './yeaft/work-center/feature.js';
|
|
28
29
|
import { updateBrowserRuntimeSettings } from './yeaft/config-api.js';
|
|
29
30
|
import { bootBrowserRuntime, shutdownBrowserRuntime } from './browser-runtime/index.js';
|
|
30
31
|
import {
|
|
@@ -138,6 +139,7 @@ const CONFIG = {
|
|
|
138
139
|
workDir: WORK_DIR,
|
|
139
140
|
yeaftDir: YEAFT_DIR,
|
|
140
141
|
telemetry: loadYeaftConfig({ dir: YEAFT_DIR }).telemetry,
|
|
142
|
+
workCenterEnabled: isWorkCenterEnabled(),
|
|
141
143
|
reconnectInterval: fileConfig.reconnectInterval,
|
|
142
144
|
agentSecret,
|
|
143
145
|
// 显式禁用的工具(非 MCP 相关)
|
|
@@ -175,9 +177,12 @@ async function detectCapabilities() {
|
|
|
175
177
|
// agent build can speak plaintext WS frames. New servers see this and
|
|
176
178
|
// flip `agent.encryptOutbound = false`, stopping outbound encryption
|
|
177
179
|
// to this peer. Old servers ignore the unknown capability token.
|
|
178
|
-
const capabilities = ['background_tasks', 'file_editor', 'ping_session', 'plaintext-ok', 'workbench_session_routes', '
|
|
180
|
+
const capabilities = ['background_tasks', 'file_editor', 'ping_session', 'plaintext-ok', 'workbench_session_routes', 'session_history_search', 'session_history_outline', 'session_history_window_prefetch', 'file_reference_resolution', 'yeaft_plugins', 'yeaft_managed_skills', 'settings_request_correlation'];
|
|
179
181
|
capabilities.push(getAgentUpgradeCapability());
|
|
180
|
-
if (
|
|
182
|
+
if (isWorkCenterEnabled()) {
|
|
183
|
+
capabilities.push('work_center', 'work_center_message_v2');
|
|
184
|
+
if (process.platform === 'linux') capabilities.push('work_item_attachments');
|
|
185
|
+
}
|
|
181
186
|
const pty = await loadNodePty();
|
|
182
187
|
if (pty) capabilities.push('terminal');
|
|
183
188
|
if (ctx.browserRuntime) {
|
|
@@ -467,12 +472,16 @@ process.on('SIGTERM', async () => {
|
|
|
467
472
|
} catch (err) {
|
|
468
473
|
console.warn(`[Agent] models.dev prime failed (will use config/defaults): ${err?.message || err}`);
|
|
469
474
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
475
|
+
if (isWorkCenterEnabled()) {
|
|
476
|
+
try {
|
|
477
|
+
const { bootWorkCenter } = await import('./yeaft/work-center/bridge.js');
|
|
478
|
+
await bootWorkCenter();
|
|
479
|
+
console.log('[Agent] Work Center watcher started');
|
|
480
|
+
} catch (err) {
|
|
481
|
+
console.warn(`[Agent] Work Center failed to start: ${err?.message || err}`);
|
|
482
|
+
}
|
|
483
|
+
} else {
|
|
484
|
+
console.log('[Agent] Work Center disabled; watcher not started');
|
|
476
485
|
}
|
|
477
486
|
connect();
|
|
478
487
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.473"}
|