@fses/workbench-app 0.2.1 → 0.2.2
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/WORKBENCH-CLOSURE.json +12 -12
- package/dist/Workspace-fYH2XNdb.js +22699 -0
- package/dist/fses-workbench-app.js +2 -2
- package/dist/{index-DbH6tMQy.js → index-CbIJlts1.js} +8 -8
- package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +2 -2
- package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +41 -2
- package/dist/internal/personal-workbench/lib/deepAgentQueueState.d.ts +111 -0
- package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +72 -0
- package/dist/internal/personal-workbench/lib/workbenchSocketClient.d.ts +1 -1
- package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +2 -0
- package/dist/runtime/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useWorkbenchRuntime-XpOzwm56.js → useWorkbenchRuntime-Ch8lqkjO.js} +6707 -6315
- package/node_modules/@fses/ai-chat/package.json +3 -3
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +1517 -1506
- package/node_modules/@fses/workbench-card/dist/types/block.d.ts +9 -0
- package/node_modules/@fses/workbench-card/package.json +4 -3
- package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.js +19950 -0
- package/node_modules/@fses/workbench-card/src/renderers/WorkbenchBlockRenderer.vue +2 -2
- package/node_modules/@fses/workbench-card/src/renderers/native/nativeBindings.ts +20 -5
- package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceCompositeBindings.ts +5 -1
- package/node_modules/@fses/workbench-card/src/types/block.ts +9 -0
- package/package.json +3 -3
- package/dist/Workspace-DMye5DU8.js +0 -43113
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as s, o,
|
|
1
|
+
import { D as s, q as o, t as r, k as t, u as n, v as c, x as i, l, y as p, z as C, A, B as m, C as g, E as d, F as E, m as _, p as u, j as T, a as R, c as S, e as h, g as L, s as M, d as P, G as v, w as y } from "./index-CbIJlts1.js";
|
|
2
2
|
import { c as W } from "./canvasFacade-B0oy__da.js";
|
|
3
|
-
import { D as b, b as D, c as N, d as O, e as B, f as I, g as x, h as w, i as H, j as F, k as G, l as K, m as U, n as V, o as j, p as z, q as Y, r as q, s as X, t as Z, v as J, w as Q, x as $, y as ee, z as ae, A as se, B as oe, C as re, E as te, F as ne, G as ce, u as ie, a as le, H as pe, I as Ce } from "./useWorkbenchRuntime-
|
|
3
|
+
import { D as b, b as D, c as N, d as O, e as B, f as I, g as x, h as w, i as H, j as F, k as G, l as K, m as U, n as V, o as j, p as z, q as Y, r as q, s as X, t as Z, v as J, w as Q, x as $, y as ee, z as ae, A as se, B as oe, C as re, E as te, F as ne, G as ce, u as ie, a as le, H as pe, I as Ce } from "./useWorkbenchRuntime-Ch8lqkjO.js";
|
|
4
4
|
import { D as me, L as ge, S as de, d as Ee, e as _e, b as ue, f as Te, g as Re, h as Se, i as he, j as Le, k as Me, l as Pe, m as ve, p as ye, n as ke, o as We, q as fe, r as be, s as De } from "./cardFactory-CoDF-zsR.js";
|
|
5
5
|
import { W as Oe, a as Be, b as Ie, c as xe, d as we } from "./workbenchCustomComponentRegistry-6GHzavdM.js";
|
|
6
6
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toRefs as ne, shallowReadonly as W, inject as oe, defineComponent as E, provide as ae, openBlock as b, createElementBlock as I, renderSlot as g, createElementVNode as A, normalizeClass as q, normalizeStyle as R, withModifiers as se, createCommentVNode as P, createVNode as z, Transition as ie, withCtx as w, computed as de, createBlock as K, defineAsyncComponent as ce, unref as le } from "vue";
|
|
2
2
|
import "./canvasFacade-B0oy__da.js";
|
|
3
|
-
import "./useWorkbenchRuntime-
|
|
3
|
+
import "./useWorkbenchRuntime-Ch8lqkjO.js";
|
|
4
4
|
import "./cardFactory-CoDF-zsR.js";
|
|
5
5
|
import "./workbenchCustomComponentRegistry-6GHzavdM.js";
|
|
6
6
|
const G = Symbol("workbench-app-context");
|
|
@@ -197,7 +197,7 @@ const sr = /* @__PURE__ */ E({
|
|
|
197
197
|
setup(e) {
|
|
198
198
|
const r = e;
|
|
199
199
|
Ie(r.adapters, r.config, r.extensions);
|
|
200
|
-
const t = ce(() => import("./Workspace-
|
|
200
|
+
const t = ce(() => import("./Workspace-fYH2XNdb.js"));
|
|
201
201
|
return (n, o) => (b(), K(le(t), {
|
|
202
202
|
"embed-in-portal": r.embedInPortal
|
|
203
203
|
}, {
|
|
@@ -818,16 +818,16 @@ export {
|
|
|
818
818
|
tr as h,
|
|
819
819
|
nr as i,
|
|
820
820
|
yr as j,
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
821
|
+
rr as k,
|
|
822
|
+
Ir as l,
|
|
823
|
+
wr as m,
|
|
824
824
|
T as n,
|
|
825
|
-
|
|
825
|
+
kr as o,
|
|
826
826
|
lr as p,
|
|
827
|
-
|
|
827
|
+
G as q,
|
|
828
828
|
or as r,
|
|
829
829
|
mr as s,
|
|
830
|
-
|
|
830
|
+
Sr as t,
|
|
831
831
|
sr as u,
|
|
832
832
|
we as v,
|
|
833
833
|
ve as w,
|
|
@@ -126,7 +126,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
126
126
|
insertSystemCard: (selection: SystemCardPromptSelection) => any;
|
|
127
127
|
inputChange: (value: string) => any;
|
|
128
128
|
send: (payload?: WorkbenchChatSendPayload) => any;
|
|
129
|
-
stop: () => any;
|
|
129
|
+
stop: (turnId?: string) => any;
|
|
130
130
|
composerIntentSelect: (intent: WorkbenchIntentChannel) => any;
|
|
131
131
|
toggleTurnCollapse: (turnId: string) => any;
|
|
132
132
|
confirmLayoutDraft: (turnId: string) => any;
|
|
@@ -195,7 +195,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
195
195
|
onInsertSystemCard?: (selection: SystemCardPromptSelection) => any;
|
|
196
196
|
onInputChange?: (value: string) => any;
|
|
197
197
|
onSend?: (payload?: WorkbenchChatSendPayload) => any;
|
|
198
|
-
onStop?: () => any;
|
|
198
|
+
onStop?: (turnId?: string) => any;
|
|
199
199
|
onComposerIntentSelect?: (intent: WorkbenchIntentChannel) => any;
|
|
200
200
|
onToggleTurnCollapse?: (turnId: string) => any;
|
|
201
201
|
onConfirmLayoutDraft?: (turnId: string) => any;
|
|
@@ -22,7 +22,33 @@ export interface DeepAgentRunView {
|
|
|
22
22
|
eventsUrl?: string;
|
|
23
23
|
currentInterrupt?: unknown;
|
|
24
24
|
error?: unknown;
|
|
25
|
+
queuePosition?: number;
|
|
26
|
+
startedAt?: string;
|
|
27
|
+
lastProgressAt?: string;
|
|
28
|
+
cancellingAt?: string;
|
|
29
|
+
terminationReason?: string;
|
|
25
30
|
}
|
|
31
|
+
export interface DeepAgentQueueRunInputSummary {
|
|
32
|
+
content: string;
|
|
33
|
+
clientTurnId?: string;
|
|
34
|
+
attachments?: Array<{
|
|
35
|
+
fileId: string;
|
|
36
|
+
fileName?: string;
|
|
37
|
+
mimeType?: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
export interface DeepAgentThreadQueueRunView extends DeepAgentRunView {
|
|
41
|
+
input?: DeepAgentQueueRunInputSummary;
|
|
42
|
+
}
|
|
43
|
+
export interface DeepAgentThreadQueueView {
|
|
44
|
+
version?: string;
|
|
45
|
+
active: DeepAgentThreadQueueRunView | null;
|
|
46
|
+
pending: Array<DeepAgentThreadQueueRunView & {
|
|
47
|
+
input?: DeepAgentQueueRunInputSummary;
|
|
48
|
+
queuePosition: number;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export type DeepAgentCreateErrorKind = 'queue_full' | 'migration' | 'legacy_active' | 'network' | 'unknown';
|
|
26
52
|
export interface ListDeepAgentMessagesQuery {
|
|
27
53
|
cursor?: string;
|
|
28
54
|
limit?: number;
|
|
@@ -47,13 +73,19 @@ export interface DeepAgentRunEventMeta {
|
|
|
47
73
|
* @returns true 表示前端应展示等待当前任务完成的业务提示
|
|
48
74
|
*/
|
|
49
75
|
export declare function isDeepAgentActiveRunConflict(error: unknown): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 将创建请求错误归类为前端可稳定恢复的队列状态。
|
|
78
|
+
* @param error - 请求层抛出的任意错误。
|
|
79
|
+
* @returns 队列已满、迁移、旧 active 冲突、网络或未知错误。
|
|
80
|
+
*/
|
|
81
|
+
export declare function classifyDeepAgentCreateError(error: unknown): DeepAgentCreateErrorKind;
|
|
50
82
|
/**
|
|
51
83
|
* 首次创建 DeepAgent run。
|
|
52
84
|
* @param context - 运行态身份上下文
|
|
53
85
|
* @param payload - 用户输入和 UI 上下文
|
|
54
86
|
* @returns run 视图
|
|
55
87
|
*/
|
|
56
|
-
export declare function createDeepAgentRun(context: DeepAgentClientContext, payload: CreateDeepAgentRunPayload): Promise<DeepAgentRunView>;
|
|
88
|
+
export declare function createDeepAgentRun(context: DeepAgentClientContext, payload: CreateDeepAgentRunPayload, idempotencyKey: string): Promise<DeepAgentRunView>;
|
|
57
89
|
/**
|
|
58
90
|
* 在已有 thread 下创建后续 run。
|
|
59
91
|
* @param context - 运行态身份上下文
|
|
@@ -61,7 +93,14 @@ export declare function createDeepAgentRun(context: DeepAgentClientContext, payl
|
|
|
61
93
|
* @param payload - 用户输入和 UI 上下文
|
|
62
94
|
* @returns run 视图
|
|
63
95
|
*/
|
|
64
|
-
export declare function createDeepAgentThreadRun(context: DeepAgentClientContext, threadId: string, payload: CreateDeepAgentRunPayload): Promise<DeepAgentRunView>;
|
|
96
|
+
export declare function createDeepAgentThreadRun(context: DeepAgentClientContext, threadId: string, payload: CreateDeepAgentRunPayload, idempotencyKey: string): Promise<DeepAgentRunView>;
|
|
97
|
+
/**
|
|
98
|
+
* 查询 thread 当前 active owner 与 FIFO pending 快照。
|
|
99
|
+
* @param context - 运行态身份上下文。
|
|
100
|
+
* @param threadId - DeepAgent thread id。
|
|
101
|
+
* @returns 带单调版本号的队列快照。
|
|
102
|
+
*/
|
|
103
|
+
export declare function getDeepAgentThreadQueue(context: DeepAgentClientContext, threadId: string): Promise<DeepAgentThreadQueueView>;
|
|
65
104
|
/**
|
|
66
105
|
* 查询 run 视图。
|
|
67
106
|
* @param context - 运行态身份上下文
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview DeepAgent 前端队列状态 - 管理稳定幂等键、轻量恢复快照和单调快照合并。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-08-13
|
|
5
|
+
*/
|
|
6
|
+
export type DeepAgentSubmissionStatus = 'submitting' | 'pending' | 'active' | 'retry_waiting' | 'accepted';
|
|
7
|
+
export interface DeepAgentSubmissionState {
|
|
8
|
+
idempotencyKey: string;
|
|
9
|
+
runId?: string;
|
|
10
|
+
threadId?: string;
|
|
11
|
+
queuePosition?: number;
|
|
12
|
+
status: DeepAgentSubmissionStatus;
|
|
13
|
+
retryCount?: number;
|
|
14
|
+
retryKind?: 'queue_full' | 'migration' | 'legacy_active' | 'network' | 'unknown';
|
|
15
|
+
}
|
|
16
|
+
export interface DeepAgentAttachmentReference {
|
|
17
|
+
id?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
type?: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RecoverableDeepAgentTurnSnapshot {
|
|
23
|
+
id: string;
|
|
24
|
+
conversationId?: string;
|
|
25
|
+
userPrompt: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
attachments?: DeepAgentAttachmentReference[];
|
|
28
|
+
deepAgentSubmission: DeepAgentSubmissionState;
|
|
29
|
+
}
|
|
30
|
+
interface RecoverableTurnInput {
|
|
31
|
+
id: string;
|
|
32
|
+
conversationId?: string;
|
|
33
|
+
userPrompt: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
attachments?: Array<DeepAgentAttachmentReference & Record<string, unknown>>;
|
|
36
|
+
submission: DeepAgentSubmissionState;
|
|
37
|
+
clientContext?: unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface VersionedDeepAgentQueueSnapshot {
|
|
40
|
+
version?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DeepAgentQueueSnapshotRun {
|
|
43
|
+
runId: string;
|
|
44
|
+
threadId: string;
|
|
45
|
+
status: string;
|
|
46
|
+
queuePosition?: number;
|
|
47
|
+
input?: {
|
|
48
|
+
content: string;
|
|
49
|
+
clientTurnId?: string;
|
|
50
|
+
attachments?: Array<{
|
|
51
|
+
fileId: string;
|
|
52
|
+
fileName?: string;
|
|
53
|
+
mimeType?: string;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface DeepAgentQueueSnapshot extends VersionedDeepAgentQueueSnapshot {
|
|
58
|
+
active: DeepAgentQueueSnapshotRun | null;
|
|
59
|
+
pending: DeepAgentQueueSnapshotRun[];
|
|
60
|
+
}
|
|
61
|
+
export interface DeepAgentQueueProjectedTurn {
|
|
62
|
+
id: string;
|
|
63
|
+
conversationId: string;
|
|
64
|
+
userPrompt: string;
|
|
65
|
+
status: 'streaming';
|
|
66
|
+
worklogStageDetail: string;
|
|
67
|
+
attachmentReferences?: DeepAgentAttachmentReference[];
|
|
68
|
+
deepAgentSubmission: DeepAgentSubmissionState;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 生成浏览器会话内稳定且足够唯一的 DeepAgent 提交键。
|
|
72
|
+
* @returns UUID 或兼容环境下的随机键。
|
|
73
|
+
*/
|
|
74
|
+
export declare function createDeepAgentIdempotencyKey(): string;
|
|
75
|
+
/**
|
|
76
|
+
* 创建首次提交状态。
|
|
77
|
+
* @param createKey - 幂等键生成器,单测可注入确定性实现。
|
|
78
|
+
* @returns submitting 状态。
|
|
79
|
+
*/
|
|
80
|
+
export declare function createDeepAgentSubmission(createKey?: () => string): DeepAgentSubmissionState;
|
|
81
|
+
/**
|
|
82
|
+
* 根据用户输入变化决定复用原幂等键还是开启新提交。
|
|
83
|
+
* @param prompt - 当前待提交文本。
|
|
84
|
+
* @param originalPrompt - 原提交文本。
|
|
85
|
+
* @param submission - 原提交状态。
|
|
86
|
+
* @param createKey - 幂等键生成器。
|
|
87
|
+
* @returns 可用于本次提交的状态。
|
|
88
|
+
*/
|
|
89
|
+
export declare function submissionForPrompt(prompt: string, originalPrompt: string, submission: DeepAgentSubmissionState, createKey?: () => string): DeepAgentSubmissionState;
|
|
90
|
+
/**
|
|
91
|
+
* 生成仅含恢复提交所需内容的本地快照。
|
|
92
|
+
* @param turn - 原始 turn、附件和提交状态。
|
|
93
|
+
* @returns 已剥离附件正文与 clientContext 的轻量快照。
|
|
94
|
+
*/
|
|
95
|
+
export declare function recoverableDeepAgentTurnSnapshot(turn: RecoverableTurnInput): RecoverableDeepAgentTurnSnapshot;
|
|
96
|
+
/**
|
|
97
|
+
* 单调合并轮询快照,避免慢响应覆盖更新的 owner 或队列位置。
|
|
98
|
+
* @param current - 当前已应用快照。
|
|
99
|
+
* @param incoming - 新到达快照。
|
|
100
|
+
* @returns 版本不倒退的快照。
|
|
101
|
+
*/
|
|
102
|
+
export declare function mergeDeepAgentQueueSnapshot<T extends VersionedDeepAgentQueueSnapshot & Record<string, unknown>>(current: T | null, incoming: T): T & {
|
|
103
|
+
version: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* 把服务端队列快照投影为可与 transcript 合并的轻量 turn,最多恢复五个 pending。
|
|
107
|
+
* @param snapshot - 同一次原子读取返回的 active/pending 快照。
|
|
108
|
+
* @returns active 在前、pending 按队列位置排列的 turn 列表。
|
|
109
|
+
*/
|
|
110
|
+
export declare function queueTurnsFromSnapshot(snapshot: DeepAgentQueueSnapshot): DeepAgentQueueProjectedTurn[];
|
|
111
|
+
export {};
|
|
@@ -111,6 +111,15 @@ export declare function applyStreamMessageEvent(turn: ConversationTurn, event: S
|
|
|
111
111
|
error?: string;
|
|
112
112
|
suppressErrorDisplay?: boolean;
|
|
113
113
|
collapsed?: boolean;
|
|
114
|
+
deepAgentSubmission?: {
|
|
115
|
+
idempotencyKey: string;
|
|
116
|
+
runId?: string;
|
|
117
|
+
threadId?: string;
|
|
118
|
+
queuePosition?: number;
|
|
119
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
120
|
+
retryCount?: number;
|
|
121
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
122
|
+
};
|
|
114
123
|
};
|
|
115
124
|
/**
|
|
116
125
|
* 应用智能体规划事件。
|
|
@@ -177,6 +186,15 @@ export declare function applyPatchPlanReadyEvent(turn: ConversationTurn, event:
|
|
|
177
186
|
error?: string;
|
|
178
187
|
suppressErrorDisplay?: boolean;
|
|
179
188
|
collapsed?: boolean;
|
|
189
|
+
deepAgentSubmission?: {
|
|
190
|
+
idempotencyKey: string;
|
|
191
|
+
runId?: string;
|
|
192
|
+
threadId?: string;
|
|
193
|
+
queuePosition?: number;
|
|
194
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
195
|
+
retryCount?: number;
|
|
196
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
197
|
+
};
|
|
180
198
|
};
|
|
181
199
|
/**
|
|
182
200
|
* 将确认请求事件写入 turn 状态和返回项,保证左右两侧都有统一的渲染数据。
|
|
@@ -221,6 +239,15 @@ export declare function applyNeedsConfirmationEvent(turn: ConversationTurn, even
|
|
|
221
239
|
error?: string;
|
|
222
240
|
suppressErrorDisplay?: boolean;
|
|
223
241
|
collapsed?: boolean;
|
|
242
|
+
deepAgentSubmission?: {
|
|
243
|
+
idempotencyKey: string;
|
|
244
|
+
runId?: string;
|
|
245
|
+
threadId?: string;
|
|
246
|
+
queuePosition?: number;
|
|
247
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
248
|
+
retryCount?: number;
|
|
249
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
250
|
+
};
|
|
224
251
|
};
|
|
225
252
|
export declare function applyStatusPulseEvent(turn: ConversationTurn, event: StatusPulseEvent): {
|
|
226
253
|
worklogStageText: WorklogStageText;
|
|
@@ -259,6 +286,15 @@ export declare function applyStatusPulseEvent(turn: ConversationTurn, event: Sta
|
|
|
259
286
|
error?: string;
|
|
260
287
|
suppressErrorDisplay?: boolean;
|
|
261
288
|
collapsed?: boolean;
|
|
289
|
+
deepAgentSubmission?: {
|
|
290
|
+
idempotencyKey: string;
|
|
291
|
+
runId?: string;
|
|
292
|
+
threadId?: string;
|
|
293
|
+
queuePosition?: number;
|
|
294
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
295
|
+
retryCount?: number;
|
|
296
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
297
|
+
};
|
|
262
298
|
};
|
|
263
299
|
export declare function applyActionStreamEvent(turn: ConversationTurn, event: ActionStreamEvent): {
|
|
264
300
|
streamActions: StreamActionItem[];
|
|
@@ -297,6 +333,15 @@ export declare function applyActionStreamEvent(turn: ConversationTurn, event: Ac
|
|
|
297
333
|
error?: string;
|
|
298
334
|
suppressErrorDisplay?: boolean;
|
|
299
335
|
collapsed?: boolean;
|
|
336
|
+
deepAgentSubmission?: {
|
|
337
|
+
idempotencyKey: string;
|
|
338
|
+
runId?: string;
|
|
339
|
+
threadId?: string;
|
|
340
|
+
queuePosition?: number;
|
|
341
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
342
|
+
retryCount?: number;
|
|
343
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
344
|
+
};
|
|
300
345
|
};
|
|
301
346
|
export declare function applyFinalDeltaEvent(turn: ConversationTurn, event: FinalDeltaEvent): ConversationTurn;
|
|
302
347
|
export declare function applyUsageStreamEvent(turn: ConversationTurn, event: UsageStreamEvent): {
|
|
@@ -336,6 +381,15 @@ export declare function applyUsageStreamEvent(turn: ConversationTurn, event: Usa
|
|
|
336
381
|
error?: string;
|
|
337
382
|
suppressErrorDisplay?: boolean;
|
|
338
383
|
collapsed?: boolean;
|
|
384
|
+
deepAgentSubmission?: {
|
|
385
|
+
idempotencyKey: string;
|
|
386
|
+
runId?: string;
|
|
387
|
+
threadId?: string;
|
|
388
|
+
queuePosition?: number;
|
|
389
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
390
|
+
retryCount?: number;
|
|
391
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
392
|
+
};
|
|
339
393
|
};
|
|
340
394
|
export declare function applyTraceEvent(turn: ConversationTurn, event: TraceEvent): {
|
|
341
395
|
returnItems: ConversationReturnItem[];
|
|
@@ -374,6 +428,15 @@ export declare function applyTraceEvent(turn: ConversationTurn, event: TraceEven
|
|
|
374
428
|
error?: string;
|
|
375
429
|
suppressErrorDisplay?: boolean;
|
|
376
430
|
collapsed?: boolean;
|
|
431
|
+
deepAgentSubmission?: {
|
|
432
|
+
idempotencyKey: string;
|
|
433
|
+
runId?: string;
|
|
434
|
+
threadId?: string;
|
|
435
|
+
queuePosition?: number;
|
|
436
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
437
|
+
retryCount?: number;
|
|
438
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
439
|
+
};
|
|
377
440
|
};
|
|
378
441
|
export declare function finishStreamedTurn(turn: ConversationTurn, fillFinalText?: boolean): {
|
|
379
442
|
assistantFinalText: string;
|
|
@@ -412,6 +475,15 @@ export declare function finishStreamedTurn(turn: ConversationTurn, fillFinalText
|
|
|
412
475
|
error?: string;
|
|
413
476
|
suppressErrorDisplay?: boolean;
|
|
414
477
|
collapsed?: boolean;
|
|
478
|
+
deepAgentSubmission?: {
|
|
479
|
+
idempotencyKey: string;
|
|
480
|
+
runId?: string;
|
|
481
|
+
threadId?: string;
|
|
482
|
+
queuePosition?: number;
|
|
483
|
+
status: "submitting" | "pending" | "active" | "retry_waiting" | "accepted";
|
|
484
|
+
retryCount?: number;
|
|
485
|
+
retryKind?: "queue_full" | "migration" | "legacy_active" | "network" | "unknown";
|
|
486
|
+
};
|
|
415
487
|
};
|
|
416
488
|
export declare function updateTurn(turns: ConversationTurn[], turnId: string, updater: (turn: ConversationTurn) => ConversationTurn): ConversationTurn[];
|
|
417
489
|
export declare function sortBlocks(blocks: MaterializedBlock[]): MaterializedBlock[];
|
|
@@ -20,7 +20,7 @@ export declare function createWorkbenchSocketClient(input: {
|
|
|
20
20
|
baseUrl?: string;
|
|
21
21
|
workspaceId: string;
|
|
22
22
|
userId: string;
|
|
23
|
-
onEvent: (event: WorkbenchSocketEvent) => void;
|
|
23
|
+
onEvent: (event: WorkbenchSocketEvent) => Promise<void> | void;
|
|
24
24
|
socketPath?: string;
|
|
25
25
|
transports?: WorkbenchSocketTransport[];
|
|
26
26
|
socketFactory?: WorkbenchSocketFactory;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AssistantPersonaKey, LayoutConfig, RoleId } from '@fses/workbench-app/types';
|
|
2
2
|
import type { WorkbenchCanvasGapPreset, WorkbenchCardPresetSizeConfig } from './cardSizeConfig';
|
|
3
3
|
import type { WorkbenchCardStyleConfig } from './cardStyleConfig';
|
|
4
|
+
import type { RecoverableDeepAgentTurnSnapshot } from './deepAgentQueueState';
|
|
4
5
|
export interface WorkbenchCanvasSettingsMemory {
|
|
5
6
|
layoutConfig?: LayoutConfig;
|
|
6
7
|
cardStyleConfig?: WorkbenchCardStyleConfig;
|
|
@@ -37,6 +38,7 @@ export interface WorkbenchUiMemory {
|
|
|
37
38
|
cardPresetSizeConfig?: WorkbenchCardPresetSizeConfig;
|
|
38
39
|
canvasGapPreset?: WorkbenchCanvasGapPreset;
|
|
39
40
|
canvasSettingsByWorkspaceId?: Record<string, WorkbenchCanvasSettingsMemory>;
|
|
41
|
+
recoverableDeepAgentTurnsByScope?: Record<string, RecoverableDeepAgentTurnSnapshot[]>;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* 构建会话恢复作用域 key。
|
package/dist/runtime/index.js
CHANGED