@yeaft/webchat-agent 1.0.619 → 1.0.621
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/local-runtime/server/handlers/client-workbench.js +1 -0
- package/local-runtime/server/workbench-correlation.js +2 -0
- package/local-runtime/server/workbench-preview.js +7 -0
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +86 -86
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +1 -1
- package/package.json +1 -1
- package/workbench/file-ops.js +19 -11
- package/yeaft/person/capabilities.js +1 -1
- package/yeaft/person/contracts.js +19 -8
- package/yeaft/person/inspection.js +1 -0
- package/yeaft/person/runtime.js +48 -4
- package/yeaft/person/sqlite-store.js +3 -1
|
@@ -231,6 +231,7 @@ function correlateWorkbenchRequest({ agentId, clientId, client, msg, resolved, c
|
|
|
231
231
|
route: resolved.route,
|
|
232
232
|
role: client.role,
|
|
233
233
|
requestType: msg.type,
|
|
234
|
+
responseImagePreview: msg.type === 'read_file' && msg.responseImagePreview === true,
|
|
234
235
|
expectedResponseTypes,
|
|
235
236
|
publicRequestId: typeof msg.requestId === 'string' ? msg.requestId : null,
|
|
236
237
|
terminalId: msg.terminalId || null,
|
|
@@ -108,6 +108,7 @@ export function registerWorkbenchRequest({
|
|
|
108
108
|
route,
|
|
109
109
|
role = null,
|
|
110
110
|
requestType,
|
|
111
|
+
responseImagePreview = false,
|
|
111
112
|
expectedResponseTypes,
|
|
112
113
|
publicRequestId = null,
|
|
113
114
|
terminalId = null,
|
|
@@ -140,6 +141,7 @@ export function registerWorkbenchRequest({
|
|
|
140
141
|
route: route ? { ...route } : null,
|
|
141
142
|
role,
|
|
142
143
|
requestType,
|
|
144
|
+
responseImagePreview: responseImagePreview === true,
|
|
143
145
|
expectedResponseTypes: new Set(expected),
|
|
144
146
|
publicRequestId,
|
|
145
147
|
terminalId,
|
|
@@ -24,6 +24,7 @@ export function createWorkbenchPreview(fileId, pending, filePath) {
|
|
|
24
24
|
const source = {
|
|
25
25
|
fileId, filePath, agentId: pending.agentId, userId: pending.userId,
|
|
26
26
|
route: pending.route, workspaceGeneration: pending.workspaceGeneration,
|
|
27
|
+
responseImagePreview: pending.responseImagePreview === true,
|
|
27
28
|
};
|
|
28
29
|
const iv = randomBytes(12);
|
|
29
30
|
const cipher = createCipheriv('aes-256-gcm', key(), iv);
|
|
@@ -39,6 +40,7 @@ export function createWorkbenchVideo(fileId, pending, metadata) {
|
|
|
39
40
|
mimeType: metadata.mimeType, filename: metadata.filePath.split(/[\\/]/).pop(),
|
|
40
41
|
agentId: pending.agentId, userId: pending.userId,
|
|
41
42
|
route: pending.route, workspaceGeneration: pending.workspaceGeneration,
|
|
43
|
+
workspaceBoundPreview: false,
|
|
42
44
|
};
|
|
43
45
|
const iv = randomBytes(12);
|
|
44
46
|
const cipher = createCipheriv('aes-256-gcm', key(), iv);
|
|
@@ -104,6 +106,10 @@ async function refill(source, token, { client, resolved }) {
|
|
|
104
106
|
if (!requestId) return reject(failure(503, 'Preview read unavailable'));
|
|
105
107
|
Promise.resolve(forwardToAgent(source.agentId, {
|
|
106
108
|
type: 'read_file', filePath: source.filePath, workDir: resolved.workDir,
|
|
109
|
+
...(source.responseImagePreview === true ? { responseImagePreview: true } : {}),
|
|
110
|
+
// Missing purpose identifies an old workspace-bound capability, not a
|
|
111
|
+
// new explicit file selection. PDF/Office refills must remain supported.
|
|
112
|
+
...(source.responseImagePreview === undefined ? { workspaceBoundPreview: true } : {}),
|
|
107
113
|
conversationId: resolved.conversationId, workbenchRoute: source.route,
|
|
108
114
|
workbenchRouteKey: resolved.routeKey, workbenchWorkspaceGeneration: source.workspaceGeneration,
|
|
109
115
|
_workbenchRequestId: requestId, _requestUserId: source.userId,
|
|
@@ -157,6 +163,7 @@ async function requestVideoChunk(source, start, end, signal) {
|
|
|
157
163
|
if (!requestId) return reject(failure(503, 'Video stream unavailable'));
|
|
158
164
|
Promise.resolve(forwardToAgent(source.agentId, {
|
|
159
165
|
type: 'video_chunk', filePath: source.filePath, workDir: resolved.workDir,
|
|
166
|
+
...(source.workspaceBoundPreview !== false ? { workspaceBoundPreview: true } : {}),
|
|
160
167
|
conversationId: resolved.conversationId, workbenchRoute: source.route,
|
|
161
168
|
workbenchRouteKey: resolved.routeKey, workbenchWorkspaceGeneration: source.workspaceGeneration,
|
|
162
169
|
_workbenchRequestId: requestId, _requestUserId: source.userId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.621"}
|